# HG changeset patch # User Michael Schloh von Bennewitz # Date 1372792512 -7200 # Node ID 8a194ef19c9c666055b78beda8094d97d449bfc1 # Parent 193650beba3375952132f365428d84502c2ddf2c Update to new vendor version and adjust dependencies to correct build. diff -r 193650beba33 -r 8a194ef19c9c python/python.patch --- a/python/python.patch Tue Jul 02 18:27:47 2013 +0200 +++ b/python/python.patch Tue Jul 02 21:15:12 2013 +0200 @@ -1,7 +1,7 @@ Index: configure --- configure.orig 2011-06-11 17:46:28.000000000 +0200 +++ configure 2011-12-11 16:42:17.000000000 +0100 -@@ -3920,9 +3920,9 @@ +@@ -4241,9 +4241,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 -@@ -5425,7 +5425,7 @@ +@@ -6232,7 +6232,7 @@ # debug builds. OPT="-g -O0 -Wall $STRICT_PROTO" else @@ -22,7 +22,7 @@ fi ;; *) -@@ -7813,7 +7813,7 @@ +@@ -8618,7 +8618,7 @@ then LINKFORSHARED="-Wl,--export-dynamic" fi;; @@ -34,18 +34,18 @@ Index: setup.py --- setup.py.orig 2011-06-11 17:46:28.000000000 +0200 +++ setup.py 2011-12-11 16:43:40.000000000 +0100 -@@ -369,8 +369,8 @@ - - def detect_modules(self): - # Ensure that /usr/local is always used -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -+ add_dir_to_list(self.compiler.library_dirs, '@l_prefix@/lib') -+ add_dir_to_list(self.compiler.include_dirs, '@l_prefix@/include') - self.add_multiarch_paths() - - # Add paths specified in the environment variables LDFLAGS and -@@ -703,8 +703,6 @@ +@@ -439,8 +439,8 @@ + # directories (i.e. '.' and 'Include') must be first. See issue + # 10520. + if not cross_compiling: +- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') +- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') ++ add_dir_to_list(self.compiler.library_dirs, '@l_prefix@/lib') ++ add_dir_to_list(self.compiler.include_dirs, '@l_prefix@/include') + # only change this for cross builds for 3.3, issues on Mageia + if cross_compiling: + self.add_gcc_paths() +@@ -741,8 +741,6 @@ depends = ['socketmodule.h']) ) # Detect SSL support for the socket module (via _ssl) search_for_ssl_incs_in = [ @@ -54,7 +54,7 @@ ] ssl_incs = find_file('openssl/ssl.h', inc_dirs, search_for_ssl_incs_in -@@ -715,8 +713,7 @@ +@@ -753,8 +751,7 @@ if krb5_h: ssl_incs += krb5_h ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, @@ -64,7 +64,7 @@ ] ) if (ssl_incs is not None and -@@ -836,14 +833,8 @@ +@@ -866,14 +863,8 @@ # top of the normal inc_dirs. db_inc_paths = [ '/usr/include/db4', @@ -79,7 +79,7 @@ ] # 4.x minor number specific paths for x in gen_db_minor_ver_nums(4): -@@ -1731,6 +1722,7 @@ +@@ -1652,6 +1643,7 @@ dotversion = dotversion[:-1] + '.' + dotversion[-1] tcl_include_sub = [] tk_include_sub = [] diff -r 193650beba33 -r 8a194ef19c9c python/python.spec --- a/python/python.spec Tue Jul 02 18:27:47 2013 +0200 +++ b/python/python.spec Tue Jul 02 21:15:12 2013 +0200 @@ -31,7 +31,7 @@ Class: BASE Group: Language License: GPL -Version: 2.7.3 +Version: 3.3.2 Release: 20120800 # package options @@ -42,7 +42,6 @@ %option with_zlib no %option with_bzip2 no %option with_xml no -%option with_locale no %option with_ssl no # list of sources @@ -52,8 +51,8 @@ # build information BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, make PreReq: OpenPKG, openpkg >= 20100101, gcc -BuildPreReq: zlib -PreReq: zlib +BuildPreReq: zlib, gettext, libiconv +PreReq: zlib, gettext, libiconv %if "%{with_readline}" == "yes" BuildPreReq: readline PreReq: readline @@ -82,10 +81,6 @@ BuildPreReq: expat PreReq: expat %endif -%if "%{with_locale}" == "yes" -BuildPreReq: gettext, libiconv -PreReq: gettext, libiconv -%endif %if "%{with_ssl}" == "yes" BuildPreReq: openssl PreReq: openssl @@ -162,10 +157,6 @@ echo "pyexpat pyexpat.c -DHAVE_EXPAT_H %{l_cppflags} %{l_ldflags} -lexpat" ) >>Modules/Setup.local %endif -%if "%{with_locale}" == "yes" - ( echo "_locale _localemodule.c %{l_cppflags} %{l_ldflags} -lintl -liconv" - ) >>Modules/Setup.local -%endif %if "%{with_ssl}" == "yes" ( echo "_socket socketmodule.c" echo "SSL=%{l_prefix}" @@ -184,17 +175,19 @@ CXXFLAGS="%{l_cxxflags -O}" \ CPPFLAGS="$l_cppflags" \ LDFLAGS="%{l_ldflags}" \ + LIBS="-lintl -liconv" \ ./configure \ --prefix=%{l_prefix} \ --mandir=%{l_prefix}/man \ --with-dbmliborder=ndbm \ --with-gcc - %{l_make} %{l_mflags -O} + %{l_make} %{l_mflags} %install %{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 + ( cd $RPM_BUILD_ROOT%{l_prefix}/lib/python/config* + ln libpython*.a libpython.a + ) || exit $? rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/smtpd.py rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/idle rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/python/test