From 267a8d70323248bd7c5d5cf8ecf771dd891d5050 Mon Sep 17 00:00:00 2001 From: Mirko Vogt Date: Fri, 30 Mar 2012 13:24:08 +0000 Subject: [PATCH] [packages/python] Python 2.7.3 got released meanwhile - level up, package python-readline - thanks again to Cybjit SVN-Revision: 31152 --- lang/python/Makefile | 22 +++++++++--- lang/python/patches/130-readline-setup.patch | 36 +++++++++++++++++++ .../patches/140-verbose-sharedmods.patch | 11 ++++++ 3 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 lang/python/patches/130-readline-setup.patch create mode 100644 lang/python/patches/140-verbose-sharedmods.patch diff --git a/lang/python/Makefile b/lang/python/Makefile index 2a541d0dc1..6879898bfd 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -8,11 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python -PKG_VERSION:=2.7.3rc2 -PKG_RELEASE:=1 + +PY_VERSION:=2.7.3 +PY_RC:=rc2 +PKG_VERSION:=$(PY_VERSION)$(PY_RC) +PKG_RELEASE:=2 PKG_SOURCE:=Python-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PY_VERSION)/ PKG_MD5SUM:=67059e1bcaf19e19394d16b80637f75f PKG_INSTALL:=1 @@ -118,6 +121,12 @@ $(call Package/python/Default) DEPENDS+=+python-mini +libgdbm endef +define Package/python-readline +$(call Package/python/Default) + TITLE:=Python support for readline + DEPENDS+=+python-mini +libreadline +libncurses @BROKEN +endef + MAKE_FLAGS:=\ $(TARGET_CONFIGURE_OPTS) \ DESTDIR="$(PKG_INSTALL_DIR)" \ @@ -147,7 +156,6 @@ define Build/Configure --with-threads \ --with-system-ffi="$(STAGING_DIR)/usr" \ $(ENABLE_IPV6) \ - ac_cv_lib_readline_readline=no \ ac_cv_have_chflags=no \ ac_cv_have_lchflags=no \ ac_cv_py_format_size_t=no \ @@ -427,6 +435,10 @@ define PyPackage/python-gdbm/filespec +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/gdbm.so endef +define PyPackage/python-readline/filespec ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline.so +endef + define Host/Configure -$(MAKE) -C $(HOST_BUILD_DIR) distclean (cd $(HOST_BUILD_DIR); autoreconf --force --install || exit 0) @@ -467,6 +479,7 @@ $(eval $(call PyPackage,python-openssl)) $(eval $(call PyPackage,python-shutil)) $(eval $(call PyPackage,python-sqlite3)) $(eval $(call PyPackage,python-gdbm)) +$(eval $(call PyPackage,python-readline)) $(eval $(call BuildPackage,python)) $(eval $(call BuildPackage,python-mini)) @@ -478,3 +491,4 @@ $(eval $(call BuildPackage,python-openssl)) $(eval $(call BuildPackage,python-shutil)) $(eval $(call BuildPackage,python-sqlite3)) $(eval $(call BuildPackage,python-gdbm)) +$(eval $(call BuildPackage,python-readline)) diff --git a/lang/python/patches/130-readline-setup.patch b/lang/python/patches/130-readline-setup.patch new file mode 100644 index 0000000000..c19dbb2795 --- /dev/null +++ b/lang/python/patches/130-readline-setup.patch @@ -0,0 +1,36 @@ +--- a/setup.py ++++ b/setup.py +@@ -573,32 +573,7 @@ class PyBuildExt(build_ext): + # readline + do_readline = self.compiler.find_library_file(lib_dirs, 'readline') + readline_termcap_library = "" +- curses_library = "" +- # Determine if readline is already linked against curses or tinfo. +- if do_readline and find_executable('ldd'): +- fp = os.popen("ldd %s" % do_readline) +- ldd_output = fp.readlines() +- ret = fp.close() +- if ret is None or ret >> 8 == 0: +- for ln in ldd_output: +- if 'curses' in ln: +- readline_termcap_library = re.sub( +- r'.*lib(n?cursesw?)\.so.*', r'\1', ln +- ).rstrip() +- break +- if 'tinfo' in ln: # termcap interface split out from ncurses +- readline_termcap_library = 'tinfo' +- break +- # Issue 7384: If readline is already linked against curses, +- # use the same library for the readline and curses modules. +- if 'curses' in readline_termcap_library: +- curses_library = readline_termcap_library +- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): +- curses_library = 'ncursesw' +- elif self.compiler.find_library_file(lib_dirs, 'ncurses'): +- curses_library = 'ncurses' +- elif self.compiler.find_library_file(lib_dirs, 'curses'): +- curses_library = 'curses' ++ curses_library = "ncurses" + + if platform == 'darwin': + os_release = int(os.uname()[2].split('.')[0]) diff --git a/lang/python/patches/140-verbose-sharedmods.patch b/lang/python/patches/140-verbose-sharedmods.patch new file mode 100644 index 0000000000..a761c344b0 --- /dev/null +++ b/lang/python/patches/140-verbose-sharedmods.patch @@ -0,0 +1,11 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -410,7 +410,7 @@ platform: $(BUILDPYTHON) + # Build the shared modules + sharedmods: $(BUILDPYTHON) + @case $$MAKEFLAGS in \ +- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ ++ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ + esac + -- 2.30.2