diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2005-02-07 20:47:42 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2005-02-07 20:47:42 +0000 |
commit | 71074c1336d5cde36d2e26814f11b6e24dd13887 (patch) | |
tree | d85ed2942f894b186a250e84eca843910bc374d8 /dev-lang | |
parent | Added python version. (diff) | |
download | gentoo-2-71074c1336d5cde36d2e26814f11b6e24dd13887.tar.gz gentoo-2-71074c1336d5cde36d2e26814f11b6e24dd13887.tar.bz2 gentoo-2-71074c1336d5cde36d2e26814f11b6e24dd13887.zip |
Multilib releated cleanup.
(Portage version: 2.0.51-r15)
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/ChangeLog | 8 | ||||
-rw-r--r-- | dev-lang/python/Manifest | 39 | ||||
-rw-r--r-- | dev-lang/python/files/digest-python-2.4-r2 | 1 | ||||
-rw-r--r-- | dev-lang/python/files/python-2.4-libdir.patch | 170 | ||||
-rw-r--r-- | dev-lang/python/python-2.4-r2.ebuild | 214 |
5 files changed, 408 insertions, 24 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog index 579319c20647..12be6680e394 100644 --- a/dev-lang/python/ChangeLog +++ b/dev-lang/python/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-lang/python # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.126 2005/02/07 04:28:20 pythonhead Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.127 2005/02/07 20:47:42 eradicator Exp $ + +*python-2.4-r2 (07 Feb 2005) + + 07 Feb 2005; Jeremy Huddleston <eradicator@gentoo.org> + +files/python-2.4-libdir.patch, +python-2.4-r2.ebuild: + Multilib releated cleanup. *python-2.2.3-r6 (06 Feb 2005) diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 62f9f8c748e7..78e5072fb57d 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -1,17 +1,13 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - MD5 d394c3e599719294e4085cccc5c96f5d ChangeLog 21645 MD5 8145ce0144332d6caca98fa5fb648741 metadata.xml 221 MD5 b0dabb5b661c34b2054f5ae852c2fd45 python-2.1.3-r1.ebuild 2329 MD5 1e424541a26b4d5785a6e830e6a14fe8 python-2.2.3-r6.ebuild 4498 MD5 d6caef1d9e32c8f6a3c0f04de5152fb1 python-2.3.3-r2.ebuild 7182 MD5 5a86dd1a431b7adc66b634bde23e14ef python-2.3.4-r1.ebuild 7183 -MD5 99f8bbd61c29e69242730071f964faf4 python-2.4-r1.ebuild 6826 +MD5 f4539b6539745bc92a9ba43286faf15e python-2.4-r1.ebuild 6642 +MD5 f4539b6539745bc92a9ba43286faf15e python-2.4-r2.ebuild 6642 MD5 1c5cd53cb89c821a549968bac31df0f1 files/depreorder.py 2235 MD5 f3f370c8d1382c1a7571cfc1cbb196d9 files/digest-python-2.1.3-r1 62 -MD5 55af7ba61954f03e09bcafbce1227c61 files/python-2.2.3-xmlrpc.patch 3659 -MD5 e8c8ffd37f007b6ee62180d31b2100fe files/python-2.3-xmlrpc.patch 4228 MD5 5f2361b3e770981b737a9ad3d2863931 files/python-2.2.1-r5-gentoo.diff 4152 MD5 11aa066154fe2e0a4c306124c7e5dd4a files/python-2.2.2-tk-8.4.x.patch 2997 MD5 96d4207fb41391c70d5f02e1785c9527 files/python-2.2.3-db4.patch 1220 @@ -19,33 +15,30 @@ MD5 7480e63a1ff3aff7eaf8718424add7f8 files/python-2.2.3-disable_modules_and_ssl. MD5 9fe31aedbbc7e8ea1847ed6dd70bf15b files/python-2.2.3-fPIC.patch 767 MD5 07398060a831f18193315973df204cbf files/python-2.2.3-gentoo_py_dontcompile.patch 732 MD5 46588eb4b2cfdd8277153e8e6f728eca files/python-2.3-add_portage_search_path.patch 607 +MD5 4b9922f74b1076d82d1fdb653fa5769a files/python-2.3-add_portage_search_path_take_2.patch 614 MD5 7a12ce3bbe0961cf1533fcf838e17fa9 files/python-2.3-db4.2.patch 1015 MD5 7808762bbf53647c7cd597be4044e9f7 files/python-2.3-gentoo_py_dontcompile.patch 478 MD5 ec16631b538a7481f0537191d5f23b27 files/python-2.3-mimetypes_apache.patch 454 MD5 2b953054102d344834597bc73b209e12 files/python-2.3.2-disable_modules_and_ssl.patch 1285 -MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2 178 -MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2.1 178 -MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2.2 178 -MD5 201acd1cfd5124f25c58a8db3f78a502 files/python-config-2.3 178 -MD5 fe5a878d2ba1e49ebc789b65f430290a files/python-updater 8611 -MD5 e8c8ffd37f007b6ee62180d31b2100fe files/python-2.4-xmlrpc.patch 4228 -MD5 7a12ce3bbe0961cf1533fcf838e17fa9 files/python-2.4-db4.2.patch 1015 -MD5 4b9922f74b1076d82d1fdb653fa5769a files/python-2.3-add_portage_search_path_take_2.patch 614 MD5 a387f41bfc6767b90a51daaa0c0aac45 files/python-2.3.4-lib64.patch 11779 MD5 5bee9fa15d4effc7423e76d2f7f47655 files/python-2.4-add_portage_search_path.patch 556 +MD5 7a12ce3bbe0961cf1533fcf838e17fa9 files/python-2.4-db4.2.patch 1015 MD5 2b953054102d344834597bc73b209e12 files/python-2.4-disable_modules_and_ssl.patch 1285 MD5 2121d3986faa4b6c2c3ed472f77f2a9d files/python-2.4-gentoo_py_dontcompile.patch 477 +MD5 7ed8f8f52ed392ef28dd320b130e3c6b files/python-2.4-lib64.patch 9941 MD5 ec16631b538a7481f0537191d5f23b27 files/python-2.4-mimetypes_apache.patch 454 +MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2 178 +MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2.1 178 +MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2.2 178 +MD5 201acd1cfd5124f25c58a8db3f78a502 files/python-config-2.3 178 MD5 d74e7f0fd47f00e8b3fe7ca36b7eb629 files/python-config-2.4 179 -MD5 7ed8f8f52ed392ef28dd320b130e3c6b files/python-2.4-lib64.patch 9941 +MD5 fe5a878d2ba1e49ebc789b65f430290a files/python-updater 8611 +MD5 f11f5d528c570ef739ea10806cebfa9f files/digest-python-2.2.3-r6 62 MD5 d5e1334ddcc639401001d01f26ce0af5 files/digest-python-2.3.3-r2 66 MD5 c2e3a6ed5d700a7976f5b763cd935599 files/digest-python-2.3.4-r1 66 MD5 fccf57b8c47164b676517e516898dc46 files/digest-python-2.4-r1 64 -MD5 f11f5d528c570ef739ea10806cebfa9f files/digest-python-2.2.3-r6 62 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.0 (GNU/Linux) - -iD8DBQFCBu6ez2gxt1z4IGYRAkqBAKCGvjGOpxSsVPQ4Em70MwuCsfYSoACfRID4 -yavVaNbrBw9oI4BX2LYzjxE= -=+PaS ------END PGP SIGNATURE----- +MD5 55af7ba61954f03e09bcafbce1227c61 files/python-2.2.3-xmlrpc.patch 3659 +MD5 e8c8ffd37f007b6ee62180d31b2100fe files/python-2.3-xmlrpc.patch 4228 +MD5 e8c8ffd37f007b6ee62180d31b2100fe files/python-2.4-xmlrpc.patch 4228 +MD5 2b561d7e687d43260b6c5b324998a151 files/python-2.4-libdir.patch 8200 +MD5 fccf57b8c47164b676517e516898dc46 files/digest-python-2.4-r2 64 diff --git a/dev-lang/python/files/digest-python-2.4-r2 b/dev-lang/python/files/digest-python-2.4-r2 new file mode 100644 index 000000000000..f096fae6214a --- /dev/null +++ b/dev-lang/python/files/digest-python-2.4-r2 @@ -0,0 +1 @@ +MD5 44c2226eff0f3fc1f2fedaa1ce596533 Python-2.4.tar.bz2 7840762 diff --git a/dev-lang/python/files/python-2.4-libdir.patch b/dev-lang/python/files/python-2.4-libdir.patch new file mode 100644 index 000000000000..61ca31f58a53 --- /dev/null +++ b/dev-lang/python/files/python-2.4-libdir.patch @@ -0,0 +1,170 @@ +diff -Naurp Python-2.4.orig/Lib/distutils/command/install.py Python-2.4/Lib/distutils/command/install.py +--- Python-2.4.orig/Lib/distutils/command/install.py 2004-11-10 14:23:15.000000000 -0800 ++++ Python-2.4/Lib/distutils/command/install.py 2005-02-07 12:13:14.000000000 -0800 +@@ -39,14 +39,14 @@ else: + INSTALL_SCHEMES = { + 'unix_prefix': { + 'purelib': '$base/lib/python$py_version_short/site-packages', +- 'platlib': '$platbase/lib/python$py_version_short/site-packages', ++ 'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages', + 'headers': '$base/include/python$py_version_short/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', + }, + 'unix_home': { + 'purelib': '$base/lib/python', +- 'platlib': '$base/lib/python', ++ 'platlib': '$base/@@GENTOO_LIBDIR@@/python', + 'headers': '$base/include/python/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', +diff -Naurp Python-2.4.orig/Lib/distutils/sysconfig.py Python-2.4/Lib/distutils/sysconfig.py +--- Python-2.4.orig/Lib/distutils/sysconfig.py 2004-10-13 08:54:16.000000000 -0700 ++++ Python-2.4/Lib/distutils/sysconfig.py 2005-02-07 12:16:17.000000000 -0800 +@@ -99,8 +99,12 @@ def get_python_lib(plat_specific=0, stan + prefix = plat_specific and EXEC_PREFIX or PREFIX + + if os.name == "posix": ++ if plat_specific: ++ lib = "@@GENTOO_LIBDIR@@" ++ else: ++ lib = "lib" + libpython = os.path.join(prefix, +- "lib", "python" + get_python_version()) ++ lib, "python" + get_python_version()) + if standard_lib: + return libpython + else: +diff -Naurp Python-2.4.orig/Lib/site.py Python-2.4/Lib/site.py +--- Python-2.4.orig/Lib/site.py 2004-07-19 19:28:28.000000000 -0700 ++++ Python-2.4/Lib/site.py 2005-02-07 12:17:13.000000000 -0800 +@@ -179,9 +179,14 @@ def addsitepackages(known_paths): + sitedirs = [os.path.join(prefix, "Lib", "site-packages")] + elif os.sep == '/': + sitedirs = [os.path.join(prefix, ++ "@@GENTOO_LIBDIR@@", ++ "python" + sys.version[:3], ++ "site-packages"), ++ os.path.join(prefix, + "lib", + "python" + sys.version[:3], + "site-packages"), ++ os.path.join(prefix, "lib64", "site-python"), + os.path.join(prefix, "lib", "site-python")] + else: + sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")] +diff -Naurp Python-2.4.orig/Makefile.pre.in Python-2.4/Makefile.pre.in +--- Python-2.4.orig/Makefile.pre.in 2004-09-26 10:26:55.000000000 -0700 ++++ Python-2.4/Makefile.pre.in 2005-02-07 12:18:39.000000000 -0800 +@@ -79,7 +79,7 @@ exec_prefix= @exec_prefix@ + + # Expanded directories + BINDIR= $(exec_prefix)/bin +-LIBDIR= $(exec_prefix)/lib ++LIBDIR= $(exec_prefix)/@@GENTOO_LIBDIR@@ + MANDIR= @mandir@ + INCLUDEDIR= @includedir@ + CONFINCLUDEDIR= $(exec_prefix)/include +diff -Naurp Python-2.4.orig/Modules/Setup.dist Python-2.4/Modules/Setup.dist +--- Python-2.4.orig/Modules/Setup.dist 2004-08-31 06:50:12.000000000 -0700 ++++ Python-2.4/Modules/Setup.dist 2005-02-07 12:19:48.000000000 -0800 +@@ -325,7 +325,7 @@ GLHACK=-Dclear=__GLclear + # *** Uncomment and edit to reflect your Tcl/Tk versions: + # -ltk8.2 -ltcl8.2 \ + # *** Uncomment and edit to reflect where your X11 libraries are: +-# -L/usr/X11R6/lib \ ++# -L/usr/X11R6/lib \ + # *** Or uncomment this for Solaris: + # -L/usr/openwin/lib \ + # *** Uncomment these for TOGL extension only: +@@ -396,7 +396,7 @@ GLHACK=-Dclear=__GLclear + #DB=/usr/local/BerkeleyDB.4.0 + #DBLIBVER=4.0 + #DBINC=$(DB)/include +-#DBLIB=$(DB)/lib ++DBLIB=$(DB)/@@GENTOO_LIBDIR@@ + #_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER) + + # Historical Berkeley DB 1.85 +@@ -442,7 +442,7 @@ GLHACK=-Dclear=__GLclear + # Andrew Kuchling's zlib module. + # This require zlib 1.1.3 (or later). + # See http://www.gzip.org/zlib/ +-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz ++zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz + + # Interface to the Expat XML parser + # +diff -Naurp Python-2.4.orig/Modules/getpath.c Python-2.4/Modules/getpath.c +--- Python-2.4.orig/Modules/getpath.c 2004-08-07 18:00:47.000000000 -0700 ++++ Python-2.4/Modules/getpath.c 2005-02-07 12:22:15.137580048 -0800 +@@ -113,7 +113,7 @@ + + #ifndef PYTHONPATH + #define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ +- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" ++ EXEC_PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION "/lib-dynload" + #endif + + #ifndef LANDMARK +@@ -525,7 +525,7 @@ calculate_path(void) + fprintf(stderr, + "Could not find platform dependent libraries <exec_prefix>\n"); + strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN); +- joinpath(exec_prefix, "lib/lib-dynload"); ++ joinpath(exec_prefix, "@@GENTOO_LIBDIR@@/lib-dynload"); + } + /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */ + +diff -Naurp Python-2.4.orig/setup.py Python-2.4/setup.py +--- Python-2.4.orig/setup.py 2005-02-07 12:11:30.000000000 -0800 ++++ Python-2.4/setup.py 2005-02-07 12:25:21.746978894 -0800 +@@ -248,6 +248,7 @@ class PyBuildExt(build_ext): + global disable_ssl + # Ensure that /usr/local is always used + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') ++ add_dir_to_list(self.compiler.library_dirs, '/usr/local/@@GENTOO_LIBDIR@@') + add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + + # Add paths to popular package managers on OS X/darwin +@@ -274,7 +275,7 @@ class PyBuildExt(build_ext): + # if a file is found in one of those directories, it can + # be assumed that no additional -I,-L directives are needed. + lib_dirs = self.compiler.library_dirs + [ +- '/lib64', '/usr/lib64', ++ '/@@GENTOO_LIBDIR@@', '/usr/@@GENTOO_LIBDIR@@', + '/lib', '/usr/lib', + ] + inc_dirs = self.compiler.include_dirs + ['/usr/include'] +@@ -437,11 +438,11 @@ class PyBuildExt(build_ext): + elif self.compiler.find_library_file(lib_dirs, 'curses'): + readline_libs.append('curses') + elif self.compiler.find_library_file(lib_dirs + +- ['/usr/lib/termcap'], ++ ['/usr/@@GENTOO_LIBDIR@@/termcap'], + 'termcap'): + readline_libs.append('termcap') + exts.append( Extension('readline', ['readline.c'], +- library_dirs=['/usr/lib/termcap'], ++ library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'], + libraries=readline_libs) ) + if platform not in ['mac']: + # crypt module. +@@ -507,7 +508,7 @@ class PyBuildExt(build_ext): + '/usr/local/BerkeleyDB.4.0/lib', + '/usr/local/lib', + '/opt/sfw', +- '/sw/lib', ++ '/sw/libi64', + ), + 'incdirs': ('/usr/include/db4.2', + '/usr/include/db4.1', +@@ -996,7 +997,7 @@ class PyBuildExt(build_ext): + added_lib_dirs.append('/usr/openwin/lib') + elif os.path.exists('/usr/X11R6/include'): + include_dirs.append('/usr/X11R6/include') +- added_lib_dirs.append('/usr/X11R6/lib64') ++ added_lib_dirs.append('/usr/X11R6/lib') + added_lib_dirs.append('/usr/X11R6/lib') + elif os.path.exists('/usr/X11R5/include'): + include_dirs.append('/usr/X11R5/include') diff --git a/dev-lang/python/python-2.4-r2.ebuild b/dev-lang/python/python-2.4-r2.ebuild new file mode 100644 index 000000000000..60e85de5d7fd --- /dev/null +++ b/dev-lang/python/python-2.4-r2.ebuild @@ -0,0 +1,214 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.4-r2.ebuild,v 1.1 2005/02/07 20:47:42 eradicator Exp $ + +# NOTE about python-portage interactions : +# - Do not add a pkg_setup() check for a certain version of portage +# in dev-lang/python. It _WILL_ stop people installing from +# Gentoo 1.4 images. + +inherit eutils flag-o-matic python multilib + +PYVER_MAJOR="`echo ${PV%_*} | cut -d '.' -f 1`" +PYVER_MINOR="`echo ${PV%_*} | cut -d '.' -f 2`" +PYVER="${PYVER_MAJOR}.${PYVER_MINOR}" +MY_P="Python-${PV}" +S="${WORKDIR}/${MY_P}" +DESCRIPTION="A really great language" +SRC_URI="http://www.python.org/ftp/python/${PYVER}/${MY_P}.tar.bz2" +HOMEPAGE="http://www.python.org" + +IUSE="ncurses gdbm ssl readline tcltk berkdb bootstrap ipv6 build ucs2 doc X" +LICENSE="PSF-2.2" +SLOT="2.4" + +KEYWORDS="~x86 ~ppc ~sparc ~arm ~hppa ~amd64 ~s390 ~alpha ~ia64 ~mips" + +DEPEND="virtual/libc + >=sys-libs/zlib-1.1.3 + !build? ( + X? ( tcltk? ( >=dev-lang/tk-8.0 ) ) + ncurses? ( >=sys-libs/ncurses-5.2 readline? ( >=sys-libs/readline-4.1 ) ) + berkdb? ( >=sys-libs/db-3.1 ) + gdbm? ( sys-libs/gdbm ) + ssl? ( dev-libs/openssl ) + doc? ( =dev-python/python-docs-${PV}* ) + dev-libs/expat + )" + +RDEPEND="${DEPEND} dev-python/python-fchksum" + +# The dev-python/python-fchksum RDEPEND is needed to that this python provides +# the functionality expected from previous pythons. + +PROVIDE="virtual/python" + +src_unpack() { + unpack ${A} + cd ${S} + #Fixes security vulnerability in XML-RPC server - pythonhead (06 Feb 05) + #http://www.python.org/security/PSF-2005-001/ + epatch ${FILESDIR}/${PN}-2.4-xmlrpc.patch + # adds support for PYTHON_DONTCOMPILE shell environment to + # supress automatic generation of .pyc and .pyo files - liquidx (08 Oct 03) + epatch ${FILESDIR}/${PN}-${PYVER}-gentoo_py_dontcompile.patch + epatch ${FILESDIR}/${PN}-${PYVER}-disable_modules_and_ssl.patch + epatch ${FILESDIR}/${PN}-${PYVER}-mimetypes_apache.patch + epatch ${FILESDIR}/${PN}-${PYVER}-db4.2.patch + + # prepends /usr/lib/portage/pym to sys.path + epatch ${FILESDIR}/${PN}-${PYVER}-add_portage_search_path.patch + + epatch ${FILESDIR}/python-${PYVER}-libdir.patch + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ + Lib/distutils/command/install.py \ + Lib/distutils/sysconfig.py \ + Lib/site.py \ + Makefile.pre.in \ + Modules/Setup.dist \ + Modules/getpath.c \ + setup.py +} + +src_configure() { + # disable extraneous modules with extra dependencies + if use build; then + export PYTHON_DISABLE_MODULES="readline pyexpat dbm gdbm bsddb _curses _curses_panel _tkinter" + export PYTHON_DISABLE_SSL=1 + else + use gdbm \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} gdbm" + use berkdb \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} dbm bsddb" + use readline \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} readline" + ( use !X || use !tcltk ) \ + && PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _tkinter" + use ncurses \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _curses _curses_panel" + use ssl \ + || export PYTHON_DISABLE_SSL=1 + export PYTHON_DISABLE_MODULES + echo $PYTHON_DISABLE_MODULES + fi +} + +src_compile() { + filter-flags -malign-double + + [ "${ARCH}" = "alpha" ] && append-flags -fPIC + [ "${ARCH}" = "amd64" ] && append-flags -fPIC + + # http://bugs.gentoo.org/show_bug.cgi?id=50309 + if is-flag -O3; then + is-flag -fstack-protector-all && replace-flags -O3 -O2 + use hardened && replace-flags -O3 -O2 + fi + + export OPT="${CFLAGS}" + + local myconf + #if we are creating a new build image, we remove the dependency on g++ + if use build && ! use bootstrap; then + myconf="--with-cxx=no" + fi + + # super-secret switch. don't use this unless you know what you're + # doing. enabling UCS2 support will break your existing python + # modules + use ucs2 \ + && myconf="${myconf} --enable-unicode=ucs2" \ + || myconf="${myconf} --enable-unicode=ucs4" + + src_configure + + econf --with-fpectl \ + --enable-shared \ + `use_enable ipv6` \ + --infodir='${prefix}'/share/info \ + --mandir='${prefix}'/share/man \ + --with-threads \ + --with-cxx=no \ + ${myconf} || die + emake || die "Parallel make failed" +} + +src_install() { + dodir /usr + src_configure + make DESTDIR="${D}" altinstall || die + + # install our own custom python-config + exeinto /usr/bin + newexe ${FILESDIR}/python-config-${PYVER} python-config + + # The stuff below this line extends from 2.1, and should be deprecated + # in 2.3, or possibly can wait till 2.4 + + # seems like the build do not install Makefile.pre.in anymore + # it probably shouldn't - use DistUtils, people! + insinto /usr/$(get_libdir)/python${PYVER}/config + doins ${S}/Makefile.pre.in + + # While we're working on the config stuff... Let's fix the OPT var + # so that it doesn't have any opts listed in it. Prevents the problem + # with compiling things with conflicting opts later. + dosed -e 's:^OPT=.*:OPT=-DNDEBUG:' \ + /usr/$(get_libdir)/python${PYVER}/config/Makefile + + # install python-updater in /usr/sbin + dosbin ${FILESDIR}/python-updater + + if use build ; then + rm -rf ${D}/usr/lib/python${PYVER}/{test,encodings,email,lib-tk,bsddb/test} + else + use uclibc && rm -rf ${D}/usr/lib/python${PYVER}/{test,bsddb/test} + use berkdb || rm -rf ${D}/usr/lib/python${PYVER}/bsddb + ( use !X || use !tcltk ) && rm -rf ${D}/usr/lib/python${PYVER}/lib-tk + fi + + prep_ml_includes usr/include/python${PYVER} +} + +pkg_postrm() { + python_makesym + python_mod_cleanup /usr/lib/python${PYVER} + [[ "$(get_libdir)" == "lib" ]] || python_mod_cleanup /usr/$(get_libdir)/python${PYVER} +} + +pkg_postinst() { + local myroot + myroot=$(echo $ROOT | sed 's:/$::') + + + python_makesym + python_mod_optimize + python_mod_optimize -x site-packages -x test ${myroot}/usr/lib/python${PYVER} + [[ "$(get_libdir)" == "lib" ]] || python_mod_optimize -x site-packages -x test ${myroot}/usr/$(get_libdir)/python${PYVER} + + + # workaround possible python-upgrade-breaks-portage situation + if [ ! -f ${myroot}/usr/lib/portage/pym/portage.py ]; then + if [ -f ${myroot}/usr/lib/python2.3/site-packages/portage.py ]; then + einfo "Working around possible python-portage upgrade breakage" + mkdir -p ${myroot}/usr/lib/portage/pym + cp ${myroot}/usr/lib/python2.4/site-packages/{portage,xpak,output,cvstree,getbinpkg,emergehelp,dispatch_conf}.py ${myroot}/usr/lib/portage/pym + python_mod_optimize ${myroot}/usr/lib/portage/pym + fi + fi + + echo + ewarn + ewarn "If you have just upgraded from an older version of python you will need to run:" + ewarn + ewarn "/usr/sbin/python-updater" + ewarn + ewarn "This will automatically rebuild all the python dependent modules" + ewarn "to run with python-${PYVER}." + ewarn + ewarn "Your original Python is still installed and can be accessed via" + ewarn "/usr/bin/python2.x." + ewarn + ebeep 5 +} + |