From 1e8a2130a5b5ce6697956379e17bdeee435286ae Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 29 Oct 2013 09:17:25 +0100 Subject: update python2 and use new host infrastructure --- package/python2/Makefile | 155 +++++++++++++++++++++++++++-------------------- 1 file changed, 90 insertions(+), 65 deletions(-) (limited to 'package/python2/Makefile') diff --git a/package/python2/Makefile b/package/python2/Makefile index b97266468..fdf39f45f 100644 --- a/package/python2/Makefile +++ b/package/python2/Makefile @@ -4,13 +4,13 @@ include ${TOPDIR}/rules.mk PKG_NAME:= python2 -PKG_VERSION:= 2.7.1 -PKG_RELEASE:= 3 -PKG_MD5SUM:= 15ed56733655e3fab785e49a7278d2fb +PKG_VERSION:= 2.7.5 +PKG_RELEASE:= 1 +PKG_MD5SUM:= b4f01a1d0ba0b46b05c73b2ac909b1df PKG_DESCR:= Python scripting language (Version 2) PKG_SECTION:= lang -PKG_BUILDDEP:= zlib libffi openssl readline bzip2 -PKG_DEPENDS:= libpthread zlib libffi libopenssl libgcc +PKG_BUILDDEP:= libffi python2-host +PKG_DEPENDS:= libpthread libffi libgcc PKG_URL:= http://www.python.org/ PKG_SITES:= http://www.python.org/ftp/python/${PKG_VERSION}/ PKG_OPTS:= dev noscripts @@ -20,59 +20,96 @@ PKG_HOST_DEPENDS:= !netbsd !openbsd DISTFILES= Python-${PKG_VERSION}.tgz WRKDIST= ${WRKDIR}/Python-${PKG_VERSION} -PKG_SUBPKGS:= PYTHON2 PYTHON2_READLINE PYTHON2_BZIP2 -PKGSS_PYTHON2_READLINE:=libreadline -PKGSS_PYTHON2_BZIP2:= bzip2 +PKG_FLAVOURS_PYTHON2:= MOD_ZLIB MOD_BZ2 MOD_EXPAT MOD_SQLITE MOD_GDBM +PKG_FLAVOURS_PYTHON2+= MOD_NCURSES MOD_SSL MOD_READLINE + +PKGFD_MOD_ZLIB:= ZLIB support +PKGFB_MOD_ZLIB:= zlib +PKGFS_MOD_ZLIB:= zlib +PKGFD_MOD_BZ2:= BZIP2 support +PKGFB_MOD_BZ2:= bzip2 +PKGFS_MOD_BZ2:= libbz2 +PKGFD_MOD_EXPAT:= XML support +PKGFB_MOD_EXPAT:= expat +PKGFS_MOD_EXPAT:= libexpat +PKGFD_MOD_SQLITE:= SQLITE support +PKGFB_MOD_SQLITE:= sqlite +PKGFS_MOD_SQLITE:= libsqlite +PKGFD_MOD_GDBM:= GDBM support +PKGFB_MOD_GDBM:= gdbm +PKGFS_MOD_GDBM:= libgdbm +PKGFD_MOD_NCURSES:= NCURSES support +PKGFB_MOD_NCURSES:= ncurses +PKGFS_MOD_NCURSES:= libncurses +PKGFD_MOD_READLINE:= READLINE support +PKGFB_MOD_READLINE:= readline +PKGFS_MOD_READLINE:= libreadline +PKGFD_MOD_SSL:= OpenSSL support +PKGFB_MOD_SSL:= openssl +PKGFS_MOD_SSL:= libopenssl +include ${TOPDIR}/mk/host.mk include ${TOPDIR}/mk/package.mk +$(eval $(call HOST_template,PYTHON2,python2,${PKG_VERSION}-${PKG_RELEASE})) $(eval $(call PKG_template,PYTHON2,python2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -$(eval $(call PKG_template,PYTHON2_BZIP2,python2-bzip2,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_PYTHON2_BZIP2},${PKG_DESCR},${PKG_SECTION})) -$(eval $(call PKG_template,PYTHON2_READLINE,python2-readline,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_PYTHON2_READLINE},${PKG_DESCR},${PKG_SECTION})) - -ifeq ($(ADK_HOST_CYGWIN),y) -EXE:= .exe -endif - -TARGET_CFLAGS+= -fPIC -TARGET_LDFLAGS+= -L. -MAKE_ENV+= OPT="$(TARGET_CFLAGS)" \ - RANLIB="${TARGET_CROSS}ranlib" \ - HOSTPYTHON=./hostpython \ - HOSTPGEN=./Parser/hostpgen -CONFIGURE_ENV+= OPT="$(TARGET_CFLAGS)" \ - ac_cv_have_long_long_format=yes + +define PKG_mod_template + +INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install + +${2}-install: + echo foo $(1) + ${INSTALL_DIR} $$(IDIR_$(1))/usr/lib/python2.7/lib-dynload + for m in ${2}; do \ + ${INSTALL_DATA} $(WRKINST)/usr/lib/python2.7/lib-dynload/$$$${m}*.so $$(IDIR_$(1))/usr/lib/python2.7/lib-dynload ;\ + done +endef + +$(eval $(call PKG_template,PYTHON2_MOD_ZLIB,python2-mod-zlib,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_ZLIB},${PKGFD_MOD_ZLIB},${PKG_SECTION})) +$(eval $(call PKG_template,PYTHON2_MOD_BZ2,python2-mod-bz2,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_BZ2},${PKGFD_MOD_BZ2},${PKG_SECTION})) +$(eval $(call PKG_template,PYTHON2_MOD_EXPAT,python2-mod-expat,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_EXPAT},${PKGFD_MOD_EXPAT},${PKG_SECTION})) +$(eval $(call PKG_template,PYTHON2_MOD_SQLITE,python2-mod-sqlite,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_SQLITE},${PKGFD_MOD_SQLITE},${PKG_SECTION})) +$(eval $(call PKG_template,PYTHON2_MOD_GDBM,python2-mod-gdbm,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_GDBM},${PKGFD_MOD_GDBM},${PKG_SECTION})) +$(eval $(call PKG_template,PYTHON2_MOD_NCURSES,python2-mod-ncurses,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_NCURSES},${PKGFD_MOD_NCURSES},${PKG_SECTION})) +$(eval $(call PKG_template,PYTHON2_MOD_SSL,python2-mod-ssl,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_SSL},${PKGFD_MOD_SSL},${PKG_SECTION})) +$(eval $(call PKG_template,PYTHON2_MOD_READLINE,python2-mod-readline,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_READLINE},${PKGFD_MOD_READLINE},${PKG_SECTION})) + +$(eval $(call PKG_mod_template,PYTHON2_MOD_ZLIB,zlib)) +$(eval $(call PKG_mod_template,PYTHON2_MOD_BZ2,bz2)) +$(eval $(call PKG_mod_template,PYTHON2_MOD_EXPAT,pyexpat)) +$(eval $(call PKG_mod_template,PYTHON2_MOD_SQLITE,_sqlite)) +$(eval $(call PKG_mod_template,PYTHON2_MOD_GDBM,gdbm)) +$(eval $(call PKG_mod_template,PYTHON2_MOD_NCURSES,_curses)) +$(eval $(call PKG_mod_template,PYTHON2_MOD_SSL,_ssl)) +$(eval $(call PKG_mod_template,PYTHON2_MOD_READLINE,readline)) + +MAKE_ENV+= HOSTPGEN=$(STAGING_HOST_DIR)/usr/bin/pgen +CONFIGURE_ENV+= ac_cv_have_long_long_format=yes \ + ac_cv_file__dev_ptmx=yes \ + ac_cv_file__dev_ptc=no CONFIGURE_ARGS:= --with-threads \ + --disable-ipv6 \ --disable-toolbox-glue \ --with-system-ffi \ --without-cxx-main -post-extract: - $(CP) ${WRKBUILD}/setup.py ${WRKBUILD}/setup.py.sav - $(CP) ./files/setup.py ${WRKBUILD}/setup.py - $(CP) ./files/posixmodule.c ${WRKBUILD}/Modules/posixmodule.c - $(CP) ./files/python-config.in ${WRKBUILD}/Misc/python-config.in - $(CP) ./files/build_scripts.py ${WRKBUILD}/Lib/distutils/command/build_scripts.py - $(CP) ./files/sysconfig.py ${WRKBUILD}/Lib/distutils/sysconfig.py - (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \ - OPT="$(CFLAGS_FOR_BUILD)" \ - ./configure --without-cxx-main --with-threads \ - --prefix=$(STAGING_HOST_DIR)/usr \ - ); - $(MAKE) -C ${WRKBUILD} python$(EXE) Parser/pgen$(EXE) - $(MAKE) -C ${WRKBUILD} install - ${CP} ${WRKBUILD}/Parser/pgen ${STAGING_HOST_DIR}/usr/bin/pgen - ${CP} ${WRKBUILD}/python ${STAGING_HOST_DIR}/usr/bin/hostpython - ${CP} ${WRKBUILD}/Parser/pgen ${WRKBUILD}/Parser/hostpgen - ${CP} ${WRKBUILD}/python ${WRKBUILD}/hostpython - $(MAKE) -C ${WRKBUILD} distclean - $(CP) ${WRKBUILD}/setup.py.sav ${WRKBUILD}/setup.py - -pre-configure: - $(SED) "s#@@CPU_ARCH@@#$(CPU_ARCH)#" ${WRKBUILD}/configure - $(SED) "s#@@STAGING_DIR@@#$(STAGING_DIR)#" ${WRKBUILD}/setup.py - -python2-install: +HOST_CONFIGURE_ARGS:= --without-threads \ + --disable-toolbox-glue \ + --without-cxx-main + +python2-hostinstall: + $(INSTALL_BIN) ${HOST_WRKINST}/usr/bin/python \ + $(STAGING_HOST_DIR)/usr/bin + $(INSTALL_BIN) ${WRKBUILD}/Parser/pgen \ + $(STAGING_HOST_DIR)/usr/bin/pgen + $(CP) $(HOST_WRKINST)/usr/lib/python2.7 \ + $(STAGING_HOST_DIR)/usr/lib + $(INSTALL_DIR) $(STAGING_HOST_DIR)/usr/include/python2.7 + ${CP} ${HOST_WRKINST}/usr/include/python2.7/pyconfig.h \ + $(STAGING_HOST_DIR)/usr/include/python2.7 + +python2-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m} ${INSTALL_DIR} ${IDIR_PYTHON2}/usr/bin ${IDIR_PYTHON2}/usr/lib ${INSTALL_DIR} ${IDIR_PYTHON2}/usr/lib/python2.7 ${INSTALL_DIR} ${IDIR_PYTHON2}/usr/include/python2.7 @@ -81,21 +118,9 @@ python2-install: ${CP} ${WRKINST}/usr/lib/python2.7/* ${IDIR_PYTHON2}/usr/lib/python2.7 ${CP} ${WRKINST}/usr/include/python2.7/pyconfig.h \ ${IDIR_PYTHON2}/usr/include/python2.7 - -find ${IDIR_PYTHON2} -name "\*.pyc" -o -name "*\.pyo" -exec rm {} \; - -rm ${IDIR_PYTHON2}/usr/lib/python2.7/lib-dynload/readline.so - -rm ${IDIR_PYTHON2}/usr/lib/python2.7/lib-dynload/bz2.so - # workaround, copy host python-config to target scripts directory - ${CP} ${STAGING_HOST_DIR}/usr/bin/python*-config ${STAGING_DIR}/scripts - (cd ${STAGING_DIR}/usr/bin/ && ln -sf $(STAGING_HOST_DIR)/usr/bin/hostpython hostpython) - -python2-readline-install: - ${INSTALL_DIR} ${IDIR_PYTHON2_READLINE}/usr/lib/python2.7/lib-dynload - ${CP} ${WRKINST}/usr/lib/python2.7/lib-dynload/readline.so \ - ${IDIR_PYTHON2_READLINE}/usr/lib/python2.7/lib-dynload - -python2-bzip2-install: - ${INSTALL_DIR} ${IDIR_PYTHON2_BZIP2}/usr/lib/python2.7/lib-dynload - ${CP} ${WRKINST}/usr/lib/python2.7/lib-dynload/bz2.so \ - ${IDIR_PYTHON2_BZIP2}/usr/lib/python2.7/lib-dynload + for i in zlib bz2 _curses _ssl gdbm _sqlite pyexpat readline; do \ + rm ${IDIR_PYTHON2}/usr/lib/python2.7/lib-dynload/$${i}*so; \ + done +include ${TOPDIR}/mk/host-bottom.mk include ${TOPDIR}/mk/pkg-bottom.mk -- cgit v1.2.3 From 1a3f7151d55fd0eb4508bfbd65d70bd9d3cf6399 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 30 Oct 2013 15:44:51 +0100 Subject: fix python cross-compile, when a python host binary is available --- package/python2/Makefile | 7 ++--- package/python2/patches/patch-Makefile_pre_in | 2 +- package/python2/patches/patch-setup_py | 38 ++++++++++++++++++++++++--- package/python3/Makefile | 2 +- 4 files changed, 40 insertions(+), 9 deletions(-) (limited to 'package/python2/Makefile') diff --git a/package/python2/Makefile b/package/python2/Makefile index fdf39f45f..c0678a528 100644 --- a/package/python2/Makefile +++ b/package/python2/Makefile @@ -5,11 +5,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= python2 PKG_VERSION:= 2.7.5 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= b4f01a1d0ba0b46b05c73b2ac909b1df PKG_DESCR:= Python scripting language (Version 2) PKG_SECTION:= lang -PKG_BUILDDEP:= libffi python2-host +PKG_BUILDDEP:= libffi python2-host autotool PKG_DEPENDS:= libpthread libffi libgcc PKG_URL:= http://www.python.org/ PKG_SITES:= http://www.python.org/ftp/python/${PKG_VERSION}/ @@ -84,6 +84,7 @@ $(eval $(call PKG_mod_template,PYTHON2_MOD_NCURSES,_curses)) $(eval $(call PKG_mod_template,PYTHON2_MOD_SSL,_ssl)) $(eval $(call PKG_mod_template,PYTHON2_MOD_READLINE,readline)) +AUTOTOOL_STYLE:= autoreconf MAKE_ENV+= HOSTPGEN=$(STAGING_HOST_DIR)/usr/bin/pgen CONFIGURE_ENV+= ac_cv_have_long_long_format=yes \ ac_cv_file__dev_ptmx=yes \ @@ -118,7 +119,7 @@ python2-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m} ${CP} ${WRKINST}/usr/lib/python2.7/* ${IDIR_PYTHON2}/usr/lib/python2.7 ${CP} ${WRKINST}/usr/include/python2.7/pyconfig.h \ ${IDIR_PYTHON2}/usr/include/python2.7 - for i in zlib bz2 _curses _ssl gdbm _sqlite pyexpat readline; do \ + @-for i in zlib bz2 _curses _ssl gdbm _sqlite pyexpat readline; do \ rm ${IDIR_PYTHON2}/usr/lib/python2.7/lib-dynload/$${i}*so; \ done diff --git a/package/python2/patches/patch-Makefile_pre_in b/package/python2/patches/patch-Makefile_pre_in index e4f59f0ba..8c6aba5c2 100644 --- a/package/python2/patches/patch-Makefile_pre_in +++ b/package/python2/patches/patch-Makefile_pre_in @@ -1,5 +1,5 @@ --- Python-2.7.5.orig/Makefile.pre.in 2013-05-12 05:32:49.000000000 +0200 -+++ Python-2.7.5/Makefile.pre.in 2013-10-29 08:12:25.000000000 +0100 ++++ Python-2.7.5/Makefile.pre.in 2013-10-30 14:10:07.000000000 +0100 @@ -227,6 +227,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ ########################################################################## # Parser diff --git a/package/python2/patches/patch-setup_py b/package/python2/patches/patch-setup_py index f8f2fa1c0..0cb811de9 100644 --- a/package/python2/patches/patch-setup_py +++ b/package/python2/patches/patch-setup_py @@ -1,5 +1,5 @@ --- Python-2.7.5.orig/setup.py 2013-05-12 05:32:54.000000000 +0200 -+++ Python-2.7.5/setup.py 2013-10-29 07:33:37.000000000 +0100 ++++ Python-2.7.5/setup.py 2013-10-30 14:18:23.000000000 +0100 @@ -74,7 +74,7 @@ def find_file(filename, std_dirs, paths) 'paths' is a list of additional locations to check; if the file is found in one of them, the resulting list will contain the directory. @@ -54,7 +54,23 @@ if os.path.join(sysroot, p[1:]) == dirname: return [ p ] -@@ -437,10 +437,12 @@ class PyBuildExt(build_ext): +@@ -162,6 +162,7 @@ class PyBuildExt(build_ext): + + def build_extensions(self): + ++ self.compiler.library_dirs = [] + # Detect which modules should be compiled + missing = self.detect_modules() + +@@ -281,6 +282,7 @@ class PyBuildExt(build_ext): + + def build_extension(self, ext): + ++ + if ext.name == '_ctypes': + if not self.configure_ctypes(ext): + return +@@ -437,10 +439,12 @@ class PyBuildExt(build_ext): def detect_modules(self): # Ensure that /usr/local is always used @@ -70,7 +86,7 @@ # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. -@@ -477,7 +479,8 @@ class PyBuildExt(build_ext): +@@ -477,7 +481,8 @@ class PyBuildExt(build_ext): add_dir_to_list(dir_list, directory) if os.path.normpath(sys.prefix) != '/usr' \ @@ -80,7 +96,21 @@ # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework # (PYTHONFRAMEWORK is set) to avoid # linking problems when # building a framework with different architectures than -@@ -530,7 +533,7 @@ class PyBuildExt(build_ext): +@@ -495,8 +500,13 @@ class PyBuildExt(build_ext): + # lib_dirs and inc_dirs are used to search for files; + # if a file is found in one of those directories, it can + # be assumed that no additional -I,-L directives are needed. ++ if cross_compiling: ++ add_dir_to_list(self.compiler.library_dirs, ++ sysconfig.get_config_var('srcdir')) ++ + inc_dirs = self.compiler.include_dirs[:] + lib_dirs = self.compiler.library_dirs[:] ++ + if not cross_compiling: + for d in ( + '/usr/include', +@@ -530,7 +540,7 @@ class PyBuildExt(build_ext): if host_platform == 'hp-ux11': lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32'] diff --git a/package/python3/Makefile b/package/python3/Makefile index c18423290..40659bff4 100644 --- a/package/python3/Makefile +++ b/package/python3/Makefile @@ -115,7 +115,7 @@ python3-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m} ${CP} ${WRKINST}/usr/lib/python3.3/* ${IDIR_PYTHON3}/usr/lib/python3.3 ${CP} ${WRKINST}/usr/include/python3.3m/pyconfig.h \ ${IDIR_PYTHON3}/usr/include/python3.3m - for i in zlib _bz2 _curses _ssl _gdbm _sqlite pyexpat readline; do \ + @-for i in zlib _bz2 _curses _ssl _gdbm _sqlite pyexpat readline; do \ rm ${IDIR_PYTHON3}/usr/lib/python3.3/lib-dynload/$${i}*so; \ done -- cgit v1.2.3 From 94722f640dd0851e151211c4399bcade1c82a37c Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 31 Oct 2013 08:52:29 +0100 Subject: fix libxml2-python package --- package/libxml2/Makefile | 12 ++- package/libxml2/patches/patch-configure | 42 ----------- package/libxml2/patches/patch-configure_in | 87 ++++++++++++++++++++++ package/python2/Makefile | 14 +--- .../python2/patches/patch-Misc_python-config_in | 13 ++++ 5 files changed, 107 insertions(+), 61 deletions(-) delete mode 100644 package/libxml2/patches/patch-configure create mode 100644 package/libxml2/patches/patch-configure_in create mode 100644 package/python2/patches/patch-Misc_python-config_in (limited to 'package/python2/Makefile') diff --git a/package/libxml2/Makefile b/package/libxml2/Makefile index 6b48226e6..4d5577eb1 100644 --- a/package/libxml2/Makefile +++ b/package/libxml2/Makefile @@ -10,7 +10,7 @@ PKG_MD5SUM:= 9c0cfef285d5c4a5c80d00904ddab380 PKG_DESCR:= XML C parser and toolkit PKG_SECTION:= libs PKG_DEPENDS:= zlib -PKG_BUILDDEP:= zlib +PKG_BUILDDEP:= zlib autotool PKG_URL:= http://www.xmlsoft.org/ PKG_SITES:= http://xmlsoft.org/sources/ PKG_OPTS:= dev @@ -18,7 +18,7 @@ PKG_OPTS:= dev PKG_SUBPKGS:= LIBXML2 LIBXML2_PYTHON PKGSD_LIBXML2_PYTHON:= XML python bindings PKGSC_LIBXML2_PYTHON:= libs -PKGSB_LIBXML2_PYTHON:= python2 +PKGSB_LIBXML2_PYTHON:= python2-host ifeq ($(ADK_STATIC),y) PKG_OPTS+= libmix @@ -31,10 +31,11 @@ $(eval $(call PKG_template,LIBXML2_PYTHON,libxml2-python,${PKG_VERSION}-${PKG_RE include $(TOPDIR)/mk/python.mk +AUTOTOOL_STYLE:= autoreconf TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) TARGET_LDFLAGS+= -lpthread ifneq ($(ADK_PACKAGE_LIBXML2_PYTHON),) -CONFIGURE_ARGS+= --with-python=${STAGING_DIR}/usr +CONFIGURE_ARGS+= --with-python=$(STAGING_TARGET_DIR)/usr else CONFIGURE_ARGS+= --without-python endif @@ -65,16 +66,13 @@ CONFIGURE_ARGS+= --without-c14n \ --with-xptr \ --with-zlib -pre-configure: - ${INSTALL_DIR} ${STAGING_DIR}/usr/lib/site-packages - libxml2-install: ${INSTALL_DIR} ${IDIR_LIBXML2}/usr/lib ${CP} ${WRKINST}/usr/lib/libxml2.so* ${IDIR_LIBXML2}/usr/lib libxml2-python-install: $(INSTALL_DIR) $(IDIR_LIBXML2_PYTHON)/usr/lib/python$(PYTHON_VERSION)/site-packages - $(CP) $(WRKINST)/usr/lib/python$(PYTHON_VERSION)/site-packages/* \ + $(CP) $(WRKINST)/usr/lib/python$(PYTHON_VERSION)/site-packages/*.{so,py} \ $(IDIR_LIBXML2_PYTHON)/usr/lib/python$(PYTHON_VERSION)/site-packages include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libxml2/patches/patch-configure b/package/libxml2/patches/patch-configure deleted file mode 100644 index 2f9b3b5bf..000000000 --- a/package/libxml2/patches/patch-configure +++ /dev/null @@ -1,42 +0,0 @@ ---- libxml2-2.9.1.orig/configure 2013-04-19 09:36:11.000000000 +0200 -+++ libxml2-2.9.1/configure 2013-09-25 13:59:27.000000000 +0200 -@@ -14010,17 +14010,17 @@ case ${host} in - esac - - -- -+set -x - PYTHON_VERSION= - PYTHON_INCLUDES= - PYTHON_SITE_PACKAGES= - PYTHON_TESTS= - pythondir= - if test "$with_python" != "no" ; then -- if test -x "$with_python/bin/python" -+ if test -x "$with_python/bin/hostpython" - then -- echo Found python in $with_python/bin/python -- PYTHON="$with_python/bin/python" -+ echo Found python in $with_python/bin/hostpython -+ PYTHON="$with_python/bin/hostpython" - else - if test -x "$with_python/python.exe" - then -@@ -14122,7 +14122,7 @@ fi - else - if test -d $with_python/lib/site-packages - then -- PYTHON_SITE_PACKAGES=$with_python/lib/site-packages -+ PYTHON_SITE_PACKAGES=/usr/lib/python$PYTHON_VERSION/site-packages - else - PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"` - fi -@@ -14148,7 +14148,7 @@ else - PYTHON_SUBDIR= - fi - -- -+set +x - - - WITH_MODULES=0 diff --git a/package/libxml2/patches/patch-configure_in b/package/libxml2/patches/patch-configure_in new file mode 100644 index 000000000..a8340e906 --- /dev/null +++ b/package/libxml2/patches/patch-configure_in @@ -0,0 +1,87 @@ +--- libxml2-2.9.1.orig/configure.in 2013-04-19 09:25:20.000000000 +0200 ++++ libxml2-2.9.1/configure.in 2013-10-31 08:37:36.000000000 +0100 +@@ -748,80 +748,16 @@ PYTHON_SITE_PACKAGES= + PYTHON_TESTS= + pythondir= + if test "$with_python" != "no" ; then +- if test -x "$with_python/bin/python" +- then +- echo Found python in $with_python/bin/python +- PYTHON="$with_python/bin/python" +- else +- if test -x "$with_python/python.exe" +- then +- echo Found python in $with_python/python.exe +- PYTHON="$with_python/python.exe" +- else +- if test -x "$with_python" +- then +- echo Found python in $with_python +- PYTHON="$with_python" +- else +- if test -x "$PYTHON" +- then +- echo Found python in environment PYTHON=$PYTHON +- with_python=`$PYTHON -c "import sys; print(sys.exec_prefix)"` +- else +- AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) +- fi +- fi +- fi +- fi ++ AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) + if test "$PYTHON" != "" + then + PYTHON_VERSION=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_version())"` +- PYTHON_INCLUDES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"` +-# does not work as it produce a /usr/lib/python path instead of/usr/lib64/python +-# +-# PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"` + echo Found Python version $PYTHON_VERSION + fi +- if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = "" +- then +- if test -r $with_python/include/python$PYTHON_VERSION/Python.h +- then +- PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION +- else +- if test -r $prefix/include/python$PYTHON_VERSION/Python.h +- then +- PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION +- else +- if test -r /usr/include/python$PYTHON_VERSION/Python.h +- then +- PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION +- else +- if test -r $with_python/include/Python.h +- then +- PYTHON_INCLUDES=$with_python/include +- else +- echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h +- fi +- fi +- fi +- fi +- fi +- if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = "" +- then +- if test -d $libdir/python$PYTHON_VERSION/site-packages +- then +- PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages +- else +- if test -d $with_python/lib/site-packages +- then +- PYTHON_SITE_PACKAGES=$with_python/lib/site-packages +- else +- PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"` +- fi +- fi +- fi ++ PYTHON_INCLUDES=`$PYTHON$PYTHON_VERSION-config --includes` ++ PYTHON_LIBS=`$PYTHON$PYTHON_VERSION-config --ldflags` ++ PYTHON_SITE_PACKAGES=/usr/lib/python$PYTHON_VERSION/site-packages + pythondir='$(PYTHON_SITE_PACKAGES)' +- PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags` + else + PYTHON= + fi diff --git a/package/python2/Makefile b/package/python2/Makefile index c0678a528..82c89c433 100644 --- a/package/python2/Makefile +++ b/package/python2/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= python2 PKG_VERSION:= 2.7.5 -PKG_RELEASE:= 2 +PKG_RELEASE:= 3 PKG_MD5SUM:= b4f01a1d0ba0b46b05c73b2ac909b1df PKG_DESCR:= Python scripting language (Version 2) PKG_SECTION:= lang @@ -95,21 +95,11 @@ CONFIGURE_ARGS:= --with-threads \ --with-system-ffi \ --without-cxx-main +HOST_STYLE:= auto HOST_CONFIGURE_ARGS:= --without-threads \ --disable-toolbox-glue \ --without-cxx-main -python2-hostinstall: - $(INSTALL_BIN) ${HOST_WRKINST}/usr/bin/python \ - $(STAGING_HOST_DIR)/usr/bin - $(INSTALL_BIN) ${WRKBUILD}/Parser/pgen \ - $(STAGING_HOST_DIR)/usr/bin/pgen - $(CP) $(HOST_WRKINST)/usr/lib/python2.7 \ - $(STAGING_HOST_DIR)/usr/lib - $(INSTALL_DIR) $(STAGING_HOST_DIR)/usr/include/python2.7 - ${CP} ${HOST_WRKINST}/usr/include/python2.7/pyconfig.h \ - $(STAGING_HOST_DIR)/usr/include/python2.7 - python2-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m} ${INSTALL_DIR} ${IDIR_PYTHON2}/usr/bin ${IDIR_PYTHON2}/usr/lib ${INSTALL_DIR} ${IDIR_PYTHON2}/usr/lib/python2.7 diff --git a/package/python2/patches/patch-Misc_python-config_in b/package/python2/patches/patch-Misc_python-config_in new file mode 100644 index 000000000..7ea806bea --- /dev/null +++ b/package/python2/patches/patch-Misc_python-config_in @@ -0,0 +1,13 @@ +--- Python-2.7.5.orig/Misc/python-config.in 2013-05-12 05:32:49.000000000 +0200 ++++ Python-2.7.5/Misc/python-config.in 2013-10-30 21:09:36.000000000 +0100 +@@ -37,8 +37,8 @@ for opt in opt_flags: + print sysconfig.EXEC_PREFIX + + elif opt in ('--includes', '--cflags'): +- flags = ['-I' + sysconfig.get_python_inc(), +- '-I' + sysconfig.get_python_inc(plat_specific=True)] ++ flags = ['-I' + re.sub('host_', 'target_', sysconfig.get_python_inc()), ++ '-I' + re.sub('host_', 'target_', sysconfig.get_python_inc(plat_specific=True))] + if opt == '--cflags': + flags.extend(getvar('CFLAGS').split()) + print ' '.join(flags) -- cgit v1.2.3 From b520d5c344c10b079673446d7f3cce1c24449d2a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 31 Oct 2013 09:20:22 +0100 Subject: forgot to import regular expression module --- mk/buildhlp.mk | 4 ++-- package/python2/Makefile | 2 +- package/python2/patches/patch-Misc_python-config_in | 12 ++++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'package/python2/Makefile') diff --git a/mk/buildhlp.mk b/mk/buildhlp.mk index 79014ac4b..587a97125 100644 --- a/mk/buildhlp.mk +++ b/mk/buildhlp.mk @@ -96,8 +96,8 @@ endif @-test ! -r ${WRKDIR}/.autoreconf_done || \ (wrkdist=$(WRKDIST) dir=$${wrkdist#$(WRKDIR)}; \ cd ${WRKDIR}.orig$${dir}; \ - env ${AUTOTOOL_ENV} autoreconf -if) $(MAKE_TRACE) - @rm -rf ${WRKDIR}.orig/${PKG_NAME}-${PKG_VERSION}/autom4te.cache + env ${AUTOTOOL_ENV} autoreconf -if; \ + rm -rf ${WRKDIR}.orig$${dir}/autom4te.cache ) $(MAKE_TRACE) @# restore config.sub/config.guess @for i in $$(find ${WRKDIR} -name config.sub);do \ if [ -f $$i.bak ];then \ diff --git a/package/python2/Makefile b/package/python2/Makefile index 82c89c433..2eb0e7bde 100644 --- a/package/python2/Makefile +++ b/package/python2/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= python2 PKG_VERSION:= 2.7.5 -PKG_RELEASE:= 3 +PKG_RELEASE:= 2 PKG_MD5SUM:= b4f01a1d0ba0b46b05c73b2ac909b1df PKG_DESCR:= Python scripting language (Version 2) PKG_SECTION:= lang diff --git a/package/python2/patches/patch-Misc_python-config_in b/package/python2/patches/patch-Misc_python-config_in index 7ea806bea..9734d4fbd 100644 --- a/package/python2/patches/patch-Misc_python-config_in +++ b/package/python2/patches/patch-Misc_python-config_in @@ -1,6 +1,14 @@ --- Python-2.7.5.orig/Misc/python-config.in 2013-05-12 05:32:49.000000000 +0200 -+++ Python-2.7.5/Misc/python-config.in 2013-10-30 21:09:36.000000000 +0100 -@@ -37,8 +37,8 @@ for opt in opt_flags: ++++ Python-2.7.5/Misc/python-config.in 2013-10-30 21:29:47.000000000 +0100 +@@ -3,6 +3,7 @@ + import sys + import os + import getopt ++import re + from distutils import sysconfig + + valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', +@@ -37,8 +38,8 @@ for opt in opt_flags: print sysconfig.EXEC_PREFIX elif opt in ('--includes', '--cflags'): -- cgit v1.2.3 From 5e1af1d22d4e680d1b5f5486df023a2f0ddb9c9c Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 31 Oct 2013 09:21:12 +0100 Subject: bump version --- package/python2/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package/python2/Makefile') diff --git a/package/python2/Makefile b/package/python2/Makefile index 2eb0e7bde..ad4b4d781 100644 --- a/package/python2/Makefile +++ b/package/python2/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= python2 PKG_VERSION:= 2.7.5 -PKG_RELEASE:= 2 +PKG_RELEASE:= 4 PKG_MD5SUM:= b4f01a1d0ba0b46b05c73b2ac909b1df PKG_DESCR:= Python scripting language (Version 2) PKG_SECTION:= lang -- cgit v1.2.3