# HG changeset patch # User Michael Schloh von Bennewitz # Date 1316525048 -7200 # Node ID 6475ac4895a9831e8bbff2454352227c6b771c45 # Parent 3429ba7ff8dcb57c786cbfb7980d73faf2cae77b Backport RPM boilerplate logic for legacy OpenPKG and update version. diff -r 3429ba7ff8dc -r 6475ac4895a9 python/python.patch --- a/python/python.patch Tue Sep 20 15:22:39 2011 +0200 +++ b/python/python.patch Tue Sep 20 15:24:08 2011 +0200 @@ -1,7 +1,7 @@ Index: configure --- configure.orig 2010-11-01 02:47:19.000000000 +0100 +++ configure 2010-12-05 18:07:39.000000000 +0100 -@@ -3904,9 +3904,9 @@ +@@ -3920,9 +3920,9 @@ CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -13,7 +13,7 @@ fi else if test "$GCC" = yes; then -@@ -5352,7 +5352,7 @@ +@@ -5425,7 +5425,7 @@ # debug builds. OPT="-g -O0 -Wall $STRICT_PROTO" else @@ -22,38 +22,7 @@ fi ;; *) -@@ -7627,24 +7627,24 @@ - FreeBSD*) - if [ "`$CC -dM -E - +## 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