diff -r 3429ba7ff8dc -r 6475ac4895a9 python/python.spec --- a/python/python.spec Tue Sep 20 15:22:39 2011 +0200 +++ b/python/python.spec Tue Sep 20 15:24:08 2011 +0200 @@ -1,6 +1,6 @@ ## ## python.spec -- OpenPKG RPM Package Specification -## Copyright (c) 2000-2011 OpenPKG Foundation e.V. +## Copyright (c) 2000-2010 OpenPKG Foundation e.V. ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that @@ -31,8 +31,8 @@ Class: BASE Group: Language License: GPL -Version: 2.7.1 -Release: 20110212 +Version: 2.7.2 +Release: 20110914 # package options %option with_readline no @@ -50,8 +50,10 @@ Patch0: python.patch # build information -BuildPreReq: OpenPKG, openpkg >= 20100101, gcc -PreReq: OpenPKG, openpkg >= 20100101, gcc +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20060823, gcc +PreReq: OpenPKG, openpkg >= 20060823, gcc BuildPreReq: zlib PreReq: zlib %if "%{with_readline}" == "yes" @@ -90,6 +92,8 @@ BuildPreReq: openssl PreReq: openssl %endif +AutoReq: no +AutoReqProv: no %description Python is an interpreted, interactive, object-oriented programming @@ -111,10 +115,10 @@ %prep %setup -q -n Python-%{version} %patch -p0 - -%build - %{l_shtool} subst %{l_value -s -a} \ - setup.py + %{l_shtool} subst \ + -e 's;\(LDSHARED=.*\)\$(CC);\1\\$(CC);g' \ + -e 's;\(LDCXXSHARED=.*\)\$(CXX);\1\\$(CXX);g' \ + configure %{l_shtool} subst \ -e 's;altinstall bininstall maninstall;altinstall maninstall;' \ -e 's;python$(VERSION);python;g' \ @@ -132,6 +136,9 @@ %{l_shtool} subst \ -e 's;python{py_version_short};python;g' \ Lib/sysconfig.py + +%build + echo "" >config.cache %if "%{with_readline}" == "yes" ( echo "readline readline.c %{l_cppflags} %{l_ldflags} -lreadline -ltermcap" ) >>Modules/Setup.local @@ -173,6 +180,12 @@ ) >>Modules/Setup.local %endif + # getaddrinfo bug + disableipv6="" + case "%{l_platform -t}" in + *-aix* ) disableipv6="--disable-ipv6" ;; + esac + CC="%{l_prefix}/bin/gcc" \ CXX="%{l_cxx}" \ CFLAGS="%{l_cflags -O}" \ @@ -180,13 +193,17 @@ CXXFLAGS="%{l_cxxflags -O}" \ LDFLAGS="%{l_ldflags}" \ ./configure \ + --cache-file=./config.cache \ + --with-gcc \ + $disableipv6 \ --prefix=%{l_prefix} \ --mandir=%{l_prefix}/man \ --with-dbmliborder=ndbm \ --with-gcc - %{l_make} %{l_mflags} + %{l_make} %{l_mflags -O} %install + rm -rf $RPM_BUILD_ROOT %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT ln $RPM_BUILD_ROOT%{l_prefix}/lib/python/config/libpython*.a \ $RPM_BUILD_ROOT%{l_prefix}/lib/python/config/libpython.a @@ -199,4 +216,5 @@ %files -f files %clean + rm -rf $RPM_BUILD_ROOT