summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/python/ChangeLog11
-rw-r--r--dev-lang/python/Manifest32
-rw-r--r--dev-lang/python/files/digest-python-2.4.4-r86
-rw-r--r--dev-lang/python/files/digest-python-2.5.1-r56
-rw-r--r--dev-lang/python/python-2.4.4-r8.ebuild321
-rw-r--r--dev-lang/python/python-2.5.1-r5.ebuild323
6 files changed, 689 insertions, 10 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog
index 551f13c07a53..9427673b3982 100644
--- a/dev-lang/python/ChangeLog
+++ b/dev-lang/python/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-lang/python
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.291 2007/11/18 22:43:32 hawking Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.292 2008/01/07 17:40:51 hawking Exp $
+
+*python-2.5.1-r5 (07 Jan 2008)
+*python-2.4.4-r8 (07 Jan 2008)
+
+ 07 Jan 2008; Ali Polatel <hawking@gentoo.org> +python-2.4.4-r8.ebuild,
+ +python-2.5.1-r5.ebuild:
+ Revision bump(s). New patchsets for 2.4.4 and 2.5.1 wrt #204700 and #204343
*python-2.5.1-r4 (18 Nov 2007)
*python-2.4.4-r7 (18 Nov 2007)
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 15afb5bae1f9..5af44fcdbcc1 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -56,8 +56,10 @@ DIST python-gentoo-patches-2.3.6-r3.tar.bz2 8950 RMD160 a9bd4dfadf711ade1a314ace
DIST python-gentoo-patches-2.3.6-r4.tar.bz2 10161 RMD160 61b9f9b7f16e0d17db1a135dc3a0e9c12ceb6534 SHA1 714159683adb86e0b8cb9c16073e9bdfc399ea60 SHA256 96a235e7e23b4b2767b001738fbf66f31f16ebf5e106c18aa636857e62f1585c
DIST python-gentoo-patches-2.4.4-r3.tar.bz2 8348 RMD160 e9b59a7cd1469668d43a41d396d7a275bef78270 SHA1 16373b922895d1c14ccfa9d6b39079f2d5a2bcb6 SHA256 1c81397312136625fc220db660f701d4eccbde75e74bb40a0d77015b4d5d4f9f
DIST python-gentoo-patches-2.4.4-r4.tar.bz2 9569 RMD160 2e618e2bf8d0d9d1e722f60b6b781af8906b1750 SHA1 f2253df5b52350fdfbd06054597814d705c088c5 SHA256 a5e9783a4ad57c60f91e3f943f4ff60dcb9b2eb64aa9226598bff9658473781e
+DIST python-gentoo-patches-2.4.4-r5.tar.bz2 10105 RMD160 2489fc0fb709f862fc56d9dc17c2ba03ebd426da SHA1 0e5391fc434fbaa759964c263c2d32af81af0100 SHA256 147b74697c73788f192fea7b8034a99367a2ffc0c5cf6536a5fe5e76b8624a99
DIST python-gentoo-patches-2.5.1-r1.tar.bz2 6701 RMD160 7c2ad1de35a1ff73b703ef8ffe4d42b4151082ab SHA1 444b5580ad334a507603363ecac2f8a61b9b48e8 SHA256 e721bdb30cee9cd0bebfab604821d94111dc6a00276b486b39016aa8984c7c78
DIST python-gentoo-patches-2.5.1-r2.tar.bz2 7277 RMD160 c919653b71c3a46d4d41b02afe6c2caa634c975d SHA1 f430f021f5cf9ba81e3f22d4e9344f2d757fb6b8 SHA256 3946c52dae8321ac06d12b7da26b4d5cf34e972b00c28289ead51fc8af8313d1
+DIST python-gentoo-patches-2.5.1-r3.tar.bz2 9597 RMD160 02f26d19e6bab99c41ef2a293f081e90bb653e5a SHA1 8d1a6fe57d61f96c9ae737ab61bb2cc23e330431 SHA256 ce3d085f3948169b28b00b9a5dfa7719bcac9cc2974a50110db9843ce1cbd360
DIST python-gentoo-patches-2.5.1.tar.bz2 5430 RMD160 7cdfb51c00a49ebb9027228691e10b8c4c3f574f SHA1 435bb50e342555fc6fac79d72a22a88b592a3627 SHA256 065f31d46c3b57d99b1c3236bbaf445ca142fda33c9ef13e7e2e39be3d027499
EBUILD python-2.3.5-r2.ebuild 8034 RMD160 b805698e84278ee285bf32a6e5a7da5f92a851c6 SHA1 121aa7cff6ddbbc1dcce1cda420bf6463cdadbe6 SHA256 048e89c2c9f22909f5a4660f532c0faefa919725d6f20a8a8d0f1fdda17643e6
MD5 d64e6a7deb12ed51594d9a6f57cda6de python-2.3.5-r2.ebuild 8034
@@ -95,6 +97,10 @@ EBUILD python-2.4.4-r7.ebuild 10471 RMD160 ddb7e39a115126d1679dff5766032f66b4e2e
MD5 cd9374d76ede45dbf1843a1caf14af09 python-2.4.4-r7.ebuild 10471
RMD160 ddb7e39a115126d1679dff5766032f66b4e2e596 python-2.4.4-r7.ebuild 10471
SHA256 f88229dbde6d128f8ac4fd7c44aa48157c141ee8b014c096b52d564e9aedb7d8 python-2.4.4-r7.ebuild 10471
+EBUILD python-2.4.4-r8.ebuild 10656 RMD160 c8ba17c06ea8053902a3be590951a3da0404e47f SHA1 9c4e3f7d05998f26414e2bc04a4652eda7bdff8c SHA256 c9990f1babde1186d4dca56a1b994739909b411daa237169dbd943b9211c7dac
+MD5 0fecade8ff437d4c926779cf70706725 python-2.4.4-r8.ebuild 10656
+RMD160 c8ba17c06ea8053902a3be590951a3da0404e47f python-2.4.4-r8.ebuild 10656
+SHA256 c9990f1babde1186d4dca56a1b994739909b411daa237169dbd943b9211c7dac python-2.4.4-r8.ebuild 10656
EBUILD python-2.5.1-r2.ebuild 10346 RMD160 e04f22c557c3fcb8e79955d39dda26a25e03f73b SHA1 bf59ae8a2b2fa07ce8713ca6c17b3915884f8760 SHA256 cde4a7ed6543798b727283e302653e2d8594d6b7491d52a3581b410ba40ba8bf
MD5 c319d98fc46529027d76e02bb2949563 python-2.5.1-r2.ebuild 10346
RMD160 e04f22c557c3fcb8e79955d39dda26a25e03f73b python-2.5.1-r2.ebuild 10346
@@ -107,10 +113,14 @@ EBUILD python-2.5.1-r4.ebuild 10476 RMD160 1d74c53b21eb8242659bcf9d528e35401c303
MD5 bf1d3c19afdc537957c52621910d7bfe python-2.5.1-r4.ebuild 10476
RMD160 1d74c53b21eb8242659bcf9d528e35401c303ed3 python-2.5.1-r4.ebuild 10476
SHA256 dedc062353e2c359a3024410f1f86643f405a66bb27da626149bafdd1742c06a python-2.5.1-r4.ebuild 10476
-MISC ChangeLog 50157 RMD160 3b3c5d3ec18d68487d3aadc7a3d5b9b60b91b390 SHA1 218ce31d4e76795de3244f91d274d6876d574694 SHA256 f87f2c01db435af478ca62f7abeb0f4142cd957e1c578845551a5c9251390035
-MD5 ce9e0a7fe3962d06c7e849284feaf0ca ChangeLog 50157
-RMD160 3b3c5d3ec18d68487d3aadc7a3d5b9b60b91b390 ChangeLog 50157
-SHA256 f87f2c01db435af478ca62f7abeb0f4142cd957e1c578845551a5c9251390035 ChangeLog 50157
+EBUILD python-2.5.1-r5.ebuild 10661 RMD160 c3171b93576aec797f00aa2927c39cf93660c9cd SHA1 00ec9f340ed64557321b03227ce95d480e57f660 SHA256 cdea8026c100726360e77684a551562e1575a8a1a193ba4d0bb9e40b7f90d962
+MD5 9a14cc39e516150bd9fb50e1e3557b1a python-2.5.1-r5.ebuild 10661
+RMD160 c3171b93576aec797f00aa2927c39cf93660c9cd python-2.5.1-r5.ebuild 10661
+SHA256 cdea8026c100726360e77684a551562e1575a8a1a193ba4d0bb9e40b7f90d962 python-2.5.1-r5.ebuild 10661
+MISC ChangeLog 50399 RMD160 60bbc1e24b9c28c9a581e58b991a3deed4623170 SHA1 0f100e3acc0ab8ea727b02cca1138b4de93ba1a9 SHA256 3161fc926073eeaaad223dddcd309a5ff17c321db935c028805ea1ede5b3fc2b
+MD5 8299392d124f5a95ea817cd9f44bdc54 ChangeLog 50399
+RMD160 60bbc1e24b9c28c9a581e58b991a3deed4623170 ChangeLog 50399
+SHA256 3161fc926073eeaaad223dddcd309a5ff17c321db935c028805ea1ede5b3fc2b ChangeLog 50399
MISC metadata.xml 159 RMD160 900a8c55d7a7d2f6312594769aaf941bf9e99c7f SHA1 c8e604d56dae898258b5254d78cfeac0b981e288 SHA256 9f01104d3484792496faff4805eed0ecea2352a897151f3397d49a13800037b4
MD5 71c4638c9c88af75b58e5f5cb54fe008 metadata.xml 159
RMD160 900a8c55d7a7d2f6312594769aaf941bf9e99c7f metadata.xml 159
@@ -142,6 +152,9 @@ SHA256 f0e646a4a0ee31e5f6eb48ab27c64968d352556a1269ba33e8926dd4889cc7d4 files/di
MD5 9c32faf4d8eda5bbf2036949de404d7d files/digest-python-2.4.4-r7 533
RMD160 a8f69f27fca74ad7e50b3245235907632a428a82 files/digest-python-2.4.4-r7 533
SHA256 f0e646a4a0ee31e5f6eb48ab27c64968d352556a1269ba33e8926dd4889cc7d4 files/digest-python-2.4.4-r7 533
+MD5 ecc023ac2247dd206e9763fe722655ff files/digest-python-2.4.4-r8 536
+RMD160 94b646b6b9728cd4fe3c23c2429b4355c033be2f files/digest-python-2.4.4-r8 536
+SHA256 ad3e9aef6d099d669a319056b8674874940a5acf59434addbebcb93861dee42f files/digest-python-2.4.4-r8 536
MD5 324d60a42f00557119aa50958d0ee6fd files/digest-python-2.5.1-r2 524
RMD160 d49c6128cbed41384a15cacfd1c728a1b2bc9f8d files/digest-python-2.5.1-r2 524
SHA256 a45e1cf55eda4d760225944ed0f598d594b573174479651cfa8a78ca9ca4db3c files/digest-python-2.5.1-r2 524
@@ -151,10 +164,13 @@ SHA256 2dcb46bc1f0f5ebf74d6c3917e34c211636941d8f28f5be876722141c38478fc files/di
MD5 e5a6e1570bcf0dcd8dae8a8ab50c133d files/digest-python-2.5.1-r4 533
RMD160 82dd5404bcffa384e1cc5a88569a910acb41f96e files/digest-python-2.5.1-r4 533
SHA256 99728ce54c6aae68d6069f7c361ff515e85390cd193155b5cd9f532395953770 files/digest-python-2.5.1-r4 533
+MD5 89042197bc3116d6c2344e2ba245fc9d files/digest-python-2.5.1-r5 533
+RMD160 aea9ef7a44c6fcb48570c454c7ced5a4b2a31d37 files/digest-python-2.5.1-r5 533
+SHA256 f16b011831afaf61410a5629b185bc9ca82b2608c5a51af06ca367f516504b2e files/digest-python-2.5.1-r5 533
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.7-ecc0.1.6 (GNU/Linux)
+Version: GnuPG v2.0.8 (GNU/Linux)
-iD8DBQFHQMAaQU4yORhF8iARArVAAJ4hi3b28ffrAWKC1BTW3Sl/sIieMQCgjGiz
-MWgbpx//etHPoRMu2n4aL4k=
-=iwNs
+iEYEARECAAYFAkeCZDEACgkQQU4yORhF8iCBvwCeKYFugJSJ3UxIMxeyroiml7XB
+JHYAn2qU5ukuWUegi6Hccweap4mm8AHK
+=b29u
-----END PGP SIGNATURE-----
diff --git a/dev-lang/python/files/digest-python-2.4.4-r8 b/dev-lang/python/files/digest-python-2.4.4-r8
new file mode 100644
index 000000000000..df495b4fb30d
--- /dev/null
+++ b/dev-lang/python/files/digest-python-2.4.4-r8
@@ -0,0 +1,6 @@
+MD5 0ba90c79175c017101100ebf5978e906 Python-2.4.4.tar.bz2 8158073
+RMD160 4c7b5b70178fe69881b62201ef0bab55037d8708 Python-2.4.4.tar.bz2 8158073
+SHA256 325fdc7351a08bd8d811e7fb53c41bff11764648ab1a671abd910afec946b38a Python-2.4.4.tar.bz2 8158073
+MD5 949647a00f85c157e0fe4dd5864182de python-gentoo-patches-2.4.4-r5.tar.bz2 10105
+RMD160 2489fc0fb709f862fc56d9dc17c2ba03ebd426da python-gentoo-patches-2.4.4-r5.tar.bz2 10105
+SHA256 147b74697c73788f192fea7b8034a99367a2ffc0c5cf6536a5fe5e76b8624a99 python-gentoo-patches-2.4.4-r5.tar.bz2 10105
diff --git a/dev-lang/python/files/digest-python-2.5.1-r5 b/dev-lang/python/files/digest-python-2.5.1-r5
new file mode 100644
index 000000000000..04dddcf06b6d
--- /dev/null
+++ b/dev-lang/python/files/digest-python-2.5.1-r5
@@ -0,0 +1,6 @@
+MD5 70084ffa561660f07de466c2c8c4842d Python-2.5.1.tar.bz2 9383651
+RMD160 af0e8ed93bbc07015c338ae19bbee8811da21c1c Python-2.5.1.tar.bz2 9383651
+SHA256 d0b5d4dce02c56d2eb0728db3ebd63afc3dae906d158be6532ae4480d311e167 Python-2.5.1.tar.bz2 9383651
+MD5 778d20a0145a7cb2d0a56494081b1237 python-gentoo-patches-2.5.1-r3.tar.bz2 9597
+RMD160 02f26d19e6bab99c41ef2a293f081e90bb653e5a python-gentoo-patches-2.5.1-r3.tar.bz2 9597
+SHA256 ce3d085f3948169b28b00b9a5dfa7719bcac9cc2974a50110db9843ce1cbd360 python-gentoo-patches-2.5.1-r3.tar.bz2 9597
diff --git a/dev-lang/python/python-2.4.4-r8.ebuild b/dev-lang/python/python-2.4.4-r8.ebuild
new file mode 100644
index 000000000000..c6276c66aa20
--- /dev/null
+++ b/dev-lang/python/python-2.4.4-r8.ebuild
@@ -0,0 +1,321 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.4.4-r8.ebuild,v 1.1 2008/01/07 17:40:51 hawking 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 autotools eutils flag-o-matic python multilib versionator toolchain-funcs alternatives
+
+# we need this so that we don't depends on python.eclass
+PYVER_MAJOR=$(get_major_version)
+PYVER_MINOR=$(get_version_component_range 2)
+PYVER="${PYVER_MAJOR}.${PYVER_MINOR}"
+
+MY_P="Python-${PV}"
+S="${WORKDIR}/${MY_P}"
+DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language."
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.bz2
+ mirror://gentoo/python-gentoo-patches-${PV}-r5.tar.bz2"
+
+LICENSE="PSF-2.2"
+SLOT="2.4"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="ncurses gdbm ssl readline tk berkdb bootstrap ipv6 build ucs2 doc nocxx nothreads examples elibc_uclibc"
+
+DEPEND=">=sys-libs/zlib-1.1.3
+ !dev-python/cjkcodecs
+ !build? (
+ tk? ( >=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
+ )"
+
+# NOTE: The dev-python/python-fchksum RDEPEND is needed so that this python
+# provides the functionality expected from previous pythons.
+
+# NOTE: python-fchksum is only a RDEPEND and not a DEPEND since we don't need
+# it to compile python. We just need to ensure that when we install
+# python, we definitely have fchksum support. - liquidx
+
+# NOTE: changed RDEPEND to PDEPEND to resolve bug 88777. - kloeri
+# NOTE: added blocker to enforce correct merge order for bug 88777. - zmedico
+
+RDEPEND="${DEPEND} build? ( !dev-python/python-fchksum !dev-python/pycrypto )"
+PDEPEND="${DEPEND} !build? ( dev-python/python-fchksum ) app-admin/python-updater"
+
+PROVIDE="virtual/python"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ if tc-is-cross-compiler ; then
+ [[ $(python -V 2>&1) != "Python ${PV}" ]] && \
+ die "Crosscompiling requires the same host and build versions."
+ epatch "${FILESDIR}"/python-2.4.4-test-cross.patch
+ else
+ rm "${WORKDIR}/${PV}"/*_all_crosscompile.patch
+ fi
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}"
+ 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 || die
+
+ # fix os.utime() on hppa. utimes it not supported but unfortunately
+ # reported as working - gmsoft (22 May 04)
+ # PLEASE LEAVE THIS FIX FOR NEXT VERSIONS AS IT'S A CRITICAL FIX !!!
+ [ "${ARCH}" = "hppa" ] && sed -e 's/utimes //' -i "${S}"/configure
+
+ # remove microsoft windows executables
+ rm Lib/distutils/command/wininst-*.exe
+
+ eautoreconf
+}
+
+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
+ # dbm module can link to berkdb or gdbm -- defaults to gdbm when
+ # both are enabled, see #204343
+ use berkdb || use gdbm \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} dbm"
+ use gdbm \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} gdbm"
+ use berkdb \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} bsddb"
+ use readline \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} readline"
+ use tk \
+ || 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
+
+ # Seems to no longer be necessary
+ #[ "${ARCH}" = "amd64" ] && append-flags -fPIC
+ [ "${ARCH}" = "alpha" ] && 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 || use nocxx ; 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"
+
+ use nothreads \
+ && myconf="${myconf} --without-threads" \
+ || myconf="${myconf} --with-threads"
+
+ src_configure
+
+ if tc-is-cross-compiler ; then
+ OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \
+ ./configure --with-cxx=no || die "cross-configure failed"
+ emake python Parser/pgen || die "cross-make failed"
+ mv python hostpython
+ mv Parser/pgen Parser/hostpgen
+ make distclean
+ sed -i \
+ -e '/^HOSTPYTHON/s:=.*:=./hostpython:' \
+ -e '/^HOSTPGEN/s:=.*:=./Parser/hostpgen:' \
+ Makefile.pre.in || die
+ fi
+
+ # export CXX so it ends up in /usr/lib/python2.x/config/Makefile
+ tc-export CXX
+ # set LINKCC to prevent python from being linked to libstdc++.so
+ export LINKCC="\$(PURIFY) \$(CC)"
+ econf \
+ --with-fpectl \
+ --enable-shared \
+ `use_enable ipv6` \
+ --infodir='${prefix}'/share/info \
+ --mandir='${prefix}'/share/man \
+ --with-libc='' \
+ ${myconf} || die
+ emake || die "Parallel make failed"
+}
+
+src_install() {
+ dodir /usr
+ src_configure
+ make DESTDIR="${D}" altinstall maninstall || die
+
+ # install our own custom python-config
+ exeinto /usr/bin
+ newexe "${FILESDIR}"/python-config-${PYVER}-r1 python-config-${PYVER}
+
+ # Use correct libdir in python-config
+ dosed "s:/usr/lib/:/usr/$(get_libdir)/:" /usr/bin/python-config-${PYVER}
+
+ if use build ; then
+ rm -rf "${D}"/usr/$(get_libdir)/python${PYVER}/{test,encodings,email,lib-tk,bsddb/test}
+ else
+ use elibc_uclibc && rm -rf "${D}"/usr/$(get_libdir)/python${PYVER}/{test,bsddb/test}
+ use berkdb || rm -rf "${D}"/usr/$(get_libdir)/python${PYVER}/bsddb
+ use tk || rm -rf "${D}"/usr/$(get_libdir)/python${PYVER}/lib-tk
+ fi
+
+ # Fix slotted collisions
+ mv "${D}"/usr/bin/pydoc "${D}"/usr/bin/pydoc${PYVER}
+ mv "${D}"/usr/bin/idle "${D}"/usr/bin/idle${PYVER}
+ mv "${D}"/usr/share/man/man1/python.1 \
+ "${D}"/usr/share/man/man1/python${PYVER}.1
+ rm -f "${D}"/usr/bin/smtpd.py
+
+ prep_ml_includes usr/include/python${PYVER}
+
+ # 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
+
+ if use examples ; then
+ mkdir -p "${D}"/usr/share/doc/${P}/examples
+ cp -r "${S}"/Tools "${D}"/usr/share/doc/${P}/examples
+ fi
+}
+
+pkg_postrm() {
+ local mansuffix=$(ecompress --suffix)
+ python_makesym
+ alternatives_auto_makesym "/usr/bin/idle" "idle[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/bin/pydoc" "pydoc[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/bin/python-config" \
+ "python-config-[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/share/man/man1/python.1${mansuffix}" \
+ "python[0-9].[0-9].1${mansuffix}"
+
+ 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:/$::')
+ local mansuffix=$(ecompress --suffix)
+
+ python_makesym
+ alternatives_auto_makesym "/usr/bin/idle" "idle[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/bin/pydoc" "pydoc[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/bin/python-config" \
+ "python-config-[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/share/man/man1/python.1${mansuffix}" \
+ "python[0-9].[0-9].1${mansuffix}"
+
+ 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"
+ ewarn "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
+}
+
+src_test() {
+ # Tests won't work when cross compiling
+ if tc-is-cross-compiler ; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ # PYTHON_DONTCOMPILE=1 breaks test_import
+ unset PYTHON_DONTCOMPILE
+
+ #skip all tests that fail during emerge but pass without emerge:
+ #(See bug# 67970)
+ local skip_tests="cookielib distutils global hotshot mimetools minidom mmap posix sax strptime subprocess syntax tcl time urllib urllib2"
+
+ for test in ${skip_tests} ; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # rerun failed tests in verbose mode (regrtest -w)
+ EXTRATESTOPTS="-w" make test || die "make test failed"
+
+ for test in ${skip_tests} ; do
+ mv "${T}"/test_${test}.py "${S}"/Lib/test/test_${test}.py
+ done
+
+ elog "Portage skipped the following tests which aren't able to run from emerge:"
+ for test in ${skip_tests} ; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you'd like to run them, you may:"
+ elog "cd /usr/lib/python${PYVER}/test"
+ elog "and run the tests separately."
+}
diff --git a/dev-lang/python/python-2.5.1-r5.ebuild b/dev-lang/python/python-2.5.1-r5.ebuild
new file mode 100644
index 000000000000..4f5e9603b6db
--- /dev/null
+++ b/dev-lang/python/python-2.5.1-r5.ebuild
@@ -0,0 +1,323 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.5.1-r5.ebuild,v 1.1 2008/01/07 17:40:51 hawking 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 autotools flag-o-matic python multilib versionator toolchain-funcs alternatives libtool
+
+# we need this so that we don't depends on python.eclass
+PYVER_MAJOR=$(get_major_version)
+PYVER_MINOR=$(get_version_component_range 2)
+PYVER="${PYVER_MAJOR}.${PYVER_MINOR}"
+
+MY_P="Python-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language."
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.bz2
+ mirror://gentoo/python-gentoo-patches-${PV}-r3.tar.bz2"
+
+LICENSE="PSF-2.2"
+SLOT="2.5"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="ncurses gdbm ssl readline tk berkdb bootstrap ipv6 build ucs2 sqlite doc nothreads examples elibc_uclibc"
+
+# NOTE: dev-python/{elementtree,celementtree,pysqlite,ctypes,cjkcodecs}
+# do not conflict with the ones in python proper. - liquidx
+
+DEPEND=">=sys-libs/zlib-1.1.3
+ !build? (
+ sqlite? ( >=dev-db/sqlite-3 )
+ tk? ( >=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
+ )"
+
+# NOTE: The dev-python/python-fchksum RDEPEND is needed so that this python
+# provides the functionality expected from previous pythons.
+
+# NOTE: python-fchksum is only a RDEPEND and not a DEPEND since we don't need
+# it to compile python. We just need to ensure that when we install
+# python, we definitely have fchksum support. - liquidx
+
+# NOTE: changed RDEPEND to PDEPEND to resolve bug 88777. - kloeri
+# NOTE: added blocker to enforce correct merge order for bug 88777. - zmedico
+
+RDEPEND="${DEPEND} build? ( !dev-python/python-fchksum )"
+PDEPEND="${DEPEND} !build? ( dev-python/python-fchksum ) app-admin/python-updater"
+PROVIDE="virtual/python"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ if tc-is-cross-compiler ; then
+ [[ $(python -V 2>&1) != "Python ${PV}" ]] && \
+ die "Crosscompiling requires the same host and build versions."
+ epatch "${FILESDIR}"/python-2.4.4-test-cross.patch
+ else
+ rm "${WORKDIR}/${PV}"/*_all_crosscompile.patch
+ fi
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}"
+ 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 || die
+
+ # fix os.utime() on hppa. utimes it not supported but unfortunately reported as working - gmsoft (22 May 04)
+ # PLEASE LEAVE THIS FIX FOR NEXT VERSIONS AS IT'S A CRITICAL FIX !!!
+ [ "${ARCH}" = "hppa" ] && sed -e 's/utimes //' -i "${S}"/configure
+
+ # remove microsoft windows executables
+ rm Lib/distutils/command/wininst-*.exe
+
+ eautoreconf
+}
+
+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 _sqlite3"
+ export PYTHON_DISABLE_SSL=1
+ else
+ # dbm module can link to berkdb or gdbm -- defaults to gdbm when
+ # both are enabled, see #204343
+ use berkdb || use gdbm \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} dbm"
+ use gdbm \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} gdbm"
+ use berkdb \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} bsddb"
+ use readline \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} readline"
+ use tk \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _tkinter"
+ use ncurses \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _curses _curses_panel"
+ use sqlite \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _sqlite3"
+ use ssl \
+ || export PYTHON_DISABLE_SSL=1
+ export PYTHON_DISABLE_MODULES
+ echo $PYTHON_DISABLE_MODULES
+ fi
+}
+
+src_compile() {
+ filter-flags -malign-double
+
+ # Seems to no longer be necessary
+ #[ "${ARCH}" = "amd64" ] && append-flags -fPIC
+ [ "${ARCH}" = "alpha" ] && 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
+
+ # 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"
+
+ use nothreads \
+ && myconf="${myconf} --without-threads" \
+ || myconf="${myconf} --with-threads"
+
+ src_configure
+
+ if tc-is-cross-compiler ; then
+ OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \
+ ./configure || die "cross-configure failed"
+ emake python Parser/pgen || die "cross-make failed"
+ mv python hostpython
+ mv Parser/pgen Parser/hostpgen
+ make distclean
+ sed -i \
+ -e '/^HOSTPYTHON/s:=.*:=./hostpython:' \
+ -e '/^HOSTPGEN/s:=.*:=./Parser/hostpgen:' \
+ Makefile.pre.in || die
+ fi
+
+ # export CXX so it ends up in /usr/lib/python2.x/config/Makefile
+ tc-export CXX
+
+ # set LDFLAGS so we link modules with -lpython2.5 correctly.
+ # Needed on FreeBSD unless python2.5 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ econf \
+ --with-fpectl \
+ --enable-shared \
+ `use_enable ipv6` \
+ --infodir='${prefix}'/share/info \
+ --mandir='${prefix}'/share/man \
+ --with-libc='' \
+ ${myconf} || die
+ emake || die "Parallel make failed"
+}
+
+src_install() {
+ dodir /usr
+ src_configure
+ make DESTDIR="${D}" altinstall maninstall || die
+
+ mv "${D}"/usr/bin/python${PYVER}-config "${D}"/usr/bin/python-config-${PYVER}
+
+ # Fix slotted collisions
+ mv "${D}"/usr/bin/pydoc "${D}"/usr/bin/pydoc${PYVER}
+ mv "${D}"/usr/bin/idle "${D}"/usr/bin/idle${PYVER}
+ mv "${D}"/usr/share/man/man1/python.1 \
+ "${D}"/usr/share/man/man1/python${PYVER}.1
+ rm -f "${D}"/usr/bin/smtpd.py
+
+ # 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
+
+ if use build ; then
+ rm -rf "${D}"/usr/$(get_libdir)/python${PYVER}/{test,encodings,email,lib-tk,bsddb/test}
+ else
+ use elibc_uclibc && rm -rf "${D}"/usr/$(get_libdir)/python${PYVER}/{test,bsddb/test}
+ use berkdb || rm -rf "${D}"/usr/$(get_libdir)/python${PYVER}/bsddb
+ use tk || rm -rf "${D}"/usr/$(get_libdir)/python${PYVER}/lib-tk
+ fi
+
+ prep_ml_includes usr/include/python${PYVER}
+
+ # 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
+
+ if use examples ; then
+ mkdir -p "${D}"/usr/share/doc/${P}/examples
+ cp -r "${S}"/Tools "${D}"/usr/share/doc/${P}/examples
+ fi
+}
+
+pkg_postrm() {
+ local mansuffix=$(ecompress --suffix)
+ python_makesym
+ alternatives_auto_makesym "/usr/bin/idle" "idle[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/bin/pydoc" "pydoc[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/bin/python-config" \
+ "python-config-[0-9].[0-9]"
+
+ alternatives_auto_makesym "/usr/share/man/man1/python.1${mansuffix}" \
+ "python[0-9].[0-9].1${mansuffix}"
+
+ 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:/$::')
+ local mansuffix=$(ecompress --suffix)
+
+ python_makesym
+ alternatives_auto_makesym "/usr/bin/idle" "idle[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/bin/pydoc" "pydoc[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/bin/python-config" \
+ "python-config-[0-9].[0-9]"
+
+ alternatives_auto_makesym "/usr/share/man/man1/python.1${mansuffix}" \
+ "python[0-9].[0-9].1${mansuffix}"
+
+ 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"
+ ewarn "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
+}
+
+src_test() {
+ # Tests won't work when cross compiling
+ if tc-is-cross-compiler ; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ # PYTHON_DONTCOMPILE=1 breaks test_import
+ unset PYTHON_DONTCOMPILE
+
+ #skip all tests that fail during emerge but pass without emerge:
+ #(See bug# 67970)
+ local skip_tests="distutils global mimetools minidom mmap posix pyexpat sax strptime subprocess syntax tcl time urllib urllib2 webbrowser xml_etree"
+
+ for test in ${skip_tests} ; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # rerun failed tests in verbose mode (regrtest -w)
+ EXTRATESTOPTS="-w" make test || die "make test failed"
+
+ for test in ${skip_tests} ; do
+ mv "${T}"/test_${test}.py "${S}"/Lib/test/test_${test}.py
+ done
+
+ elog "Portage skipped the following tests which aren't able to run from emerge:"
+ for test in ${skip_tests} ; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you'd like to run them, you may:"
+ elog "cd /usr/lib/python${PYVER}/test"
+ elog "and run the tests separately."
+}