summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Østergaard <kloeri@gentoo.org>2005-06-16 21:19:33 +0000
committerBryan Østergaard <kloeri@gentoo.org>2005-06-16 21:19:33 +0000
commitf0379ab14252ae845801afef2a2ab7e66aeea638 (patch)
treebb90b5ecff06784c2917728094cc5cbdea884827 /dev-lang/python
parentAdd ~m68k keyword. (diff)
downloadhistorical-f0379ab14252ae845801afef2a2ab7e66aeea638.tar.gz
historical-f0379ab14252ae845801afef2a2ab7e66aeea638.tar.bz2
historical-f0379ab14252ae845801afef2a2ab7e66aeea638.zip
Add st_flags patch, requested in bug 94637.
Package-Manager: portage-2.0.51.22-r1
Diffstat (limited to 'dev-lang/python')
-rw-r--r--dev-lang/python/ChangeLog10
-rw-r--r--dev-lang/python/Manifest83
-rw-r--r--dev-lang/python/files/digest-python-2.3.5-r11
-rw-r--r--dev-lang/python/files/digest-python-2.4.1-r11
-rw-r--r--dev-lang/python/files/python-2.3.5-st_flags.patch48
-rw-r--r--dev-lang/python/python-2.3.5-r1.ebuild239
-rw-r--r--dev-lang/python/python-2.4.1-r1.ebuild259
7 files changed, 601 insertions, 40 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog
index 0a4e12f3c16e..a9c4a4846c30 100644
--- a/dev-lang/python/ChangeLog
+++ b/dev-lang/python/ChangeLog
@@ -1,6 +1,14 @@
# 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.149 2005/06/09 19:34:03 herbs Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.150 2005/06/16 21:19:33 kloeri Exp $
+
+*python-2.4.1-r1 (16 Jun 2005)
+*python-2.3.5-r1 (16 Jun 2005)
+
+ 16 Jun 2005; Bryan Østergaard <kloeri@gentoo.org>
+ +files/python-2.3.5-st_flags.patch, +python-2.3.5-r1.ebuild,
+ +python-2.4.1-r1.ebuild:
+ Add st_flags patch, requested in bug 94637.
09 Jun 2005; Herbie Hopkins <herbs@gentoo.org>
files/python-2.4.1-libdir.patch, python-2.4.1.ebuild:
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index f77f0e485f3c..de636d43f1bc 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -1,59 +1,64 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 1df326999058ecec71a274a37ba15514 python-2.4.1.ebuild 8094
-MD5 a6d43ee33172c5dece94d4323f42dcfb python-2.3.5.ebuild 7733
-MD5 2632d539cd0ab18b40f9510118ed3099 python-2.1.3-r1.ebuild 2299
+MD5 2e9618abec395546c1aa00f63299013b python-2.4.1-r1.ebuild 8208
MD5 5857a314767fd0ae2243590999fe78b2 python-2.2.3-r6.ebuild 4491
+MD5 777a5fb050b552d2ab039502c01d1f86 ChangeLog 25577
+MD5 3c8848046c093b8d3e1d531b8cfb59d0 python-2.3.5-r1.ebuild 7857
+MD5 8145ce0144332d6caca98fa5fb648741 metadata.xml 221
+MD5 2632d539cd0ab18b40f9510118ed3099 python-2.1.3-r1.ebuild 2299
+MD5 1df326999058ecec71a274a37ba15514 python-2.4.1.ebuild 8094
MD5 5d44cc06438212c3b7db9fe19b425b33 python-2.3.4-r1.ebuild 7190
+MD5 a6d43ee33172c5dece94d4323f42dcfb python-2.3.5.ebuild 7733
MD5 ad616f0fecea68a16aea3f97e46c9a72 python-2.4-r3.ebuild 7106
-MD5 192e07c0a59c1d653b21c9d407d18f8b ChangeLog 25323
-MD5 8145ce0144332d6caca98fa5fb648741 metadata.xml 221
-MD5 7ed8f8f52ed392ef28dd320b130e3c6b files/python-2.4-lib64.patch 9941
-MD5 ec16631b538a7481f0537191d5f23b27 files/python-2.3-mimetypes_apache.patch 454
MD5 47e9455f3e16c3369c9e57388ba3d643 files/python-2.4.1-readline.patch 8984
MD5 1cf4c21ad3b0aafc571b05b9a9e54594 files/python-updater 8761
-MD5 6eab04aaa6abe2b795e4e5f4983bea38 files/python-2.4-readline.patch 9099
-MD5 5f2361b3e770981b737a9ad3d2863931 files/python-2.2.1-r5-gentoo.diff 4152
-MD5 5bee9fa15d4effc7423e76d2f7f47655 files/python-2.4-add_portage_search_path.patch 556
-MD5 55af7ba61954f03e09bcafbce1227c61 files/python-2.2.3-xmlrpc.patch 3659
-MD5 849ff6337b70ef28009c90021dfae0da files/digest-python-2.3.5 66
-MD5 1e4084c2a8ee240668d02e703e7c171f files/digest-python-2.4.1 66
-MD5 e8c8ffd37f007b6ee62180d31b2100fe files/python-2.4-xmlrpc.patch 4228
+MD5 7a12ce3bbe0961cf1533fcf838e17fa9 files/python-2.3-db4.2.patch 1015
MD5 11aa066154fe2e0a4c306124c7e5dd4a files/python-2.2.2-tk-8.4.x.patch 2997
-MD5 07398060a831f18193315973df204cbf files/python-2.2.3-gentoo_py_dontcompile.patch 732
-MD5 2121d3986faa4b6c2c3ed472f77f2a9d files/python-2.4-gentoo_py_dontcompile.patch 477
+MD5 5f2361b3e770981b737a9ad3d2863931 files/python-2.2.1-r5-gentoo.diff 4152
MD5 e9cc1b9be363e6c3f8df75cdb2ea9621 files/python-2.3-readline.patch 9596
-MD5 4b9922f74b1076d82d1fdb653fa5769a files/python-2.3-add_portage_search_path_take_2.patch 614
-MD5 96d4207fb41391c70d5f02e1785c9527 files/python-2.2.3-db4.patch 1220
+MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2.2 178
+MD5 ec16631b538a7481f0537191d5f23b27 files/python-2.3-mimetypes_apache.patch 454
+MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2 178
+MD5 3c77f8f9d55bbedacd9476a428088250 files/python-2.4-libdir.patch 8358
MD5 eaa33949f072a9787c453c37c1236108 files/python-2.4.1-db4.patch 1414
-MD5 9fe31aedbbc7e8ea1847ed6dd70bf15b files/python-2.2.3-fPIC.patch 767
-MD5 e8c8ffd37f007b6ee62180d31b2100fe files/python-2.3-xmlrpc.patch 4228
+MD5 96d4207fb41391c70d5f02e1785c9527 files/python-2.2.3-db4.patch 1220
MD5 a387f41bfc6767b90a51daaa0c0aac45 files/python-2.3.4-lib64.patch 11779
-MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2 178
-MD5 201acd1cfd5124f25c58a8db3f78a502 files/python-config-2.3 178
-MD5 d74e7f0fd47f00e8b3fe7ca36b7eb629 files/python-config-2.4 179
-MD5 7a12ce3bbe0961cf1533fcf838e17fa9 files/python-2.3-db4.2.patch 1015
-MD5 7808762bbf53647c7cd597be4044e9f7 files/python-2.3-gentoo_py_dontcompile.patch 478
-MD5 46588eb4b2cfdd8277153e8e6f728eca files/python-2.3-add_portage_search_path.patch 607
-MD5 7480e63a1ff3aff7eaf8718424add7f8 files/python-2.2.3-disable_modules_and_ssl.patch 1212
+MD5 2b953054102d344834597bc73b209e12 files/python-2.4-disable_modules_and_ssl.patch 1285
+MD5 2121d3986faa4b6c2c3ed472f77f2a9d files/python-2.4-gentoo_py_dontcompile.patch 477
+MD5 849ff6337b70ef28009c90021dfae0da files/digest-python-2.3.5 66
+MD5 b8e2b591eb203df14010db589089a522 files/python-2.3.5-st_flags.patch 1452
+MD5 1e4084c2a8ee240668d02e703e7c171f files/digest-python-2.4.1-r1 66
+MD5 f3f370c8d1382c1a7571cfc1cbb196d9 files/digest-python-2.1.3-r1 62
MD5 7a12ce3bbe0961cf1533fcf838e17fa9 files/python-2.4-db4.2.patch 1015
-MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2.1 178
-MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2.2 178
+MD5 55af7ba61954f03e09bcafbce1227c61 files/python-2.2.3-xmlrpc.patch 3659
+MD5 e8c8ffd37f007b6ee62180d31b2100fe files/python-2.3-xmlrpc.patch 4228
+MD5 fccf57b8c47164b676517e516898dc46 files/digest-python-2.4-r3 64
+MD5 07398060a831f18193315973df204cbf files/python-2.2.3-gentoo_py_dontcompile.patch 732
MD5 2b953054102d344834597bc73b209e12 files/python-2.3.2-disable_modules_and_ssl.patch 1285
-MD5 f3f370c8d1382c1a7571cfc1cbb196d9 files/digest-python-2.1.3-r1 62
+MD5 5bee9fa15d4effc7423e76d2f7f47655 files/python-2.4-add_portage_search_path.patch 556
MD5 f11f5d528c570ef739ea10806cebfa9f files/digest-python-2.2.3-r6 62
-MD5 c2e3a6ed5d700a7976f5b763cd935599 files/digest-python-2.3.4-r1 66
-MD5 bbd59b4a23c663ce9c8c5b669deaa93c files/python-2.4.1-libdir.patch 9406
-MD5 1c5cd53cb89c821a549968bac31df0f1 files/depreorder.py 2235
-MD5 3c77f8f9d55bbedacd9476a428088250 files/python-2.4-libdir.patch 8358
-MD5 2b953054102d344834597bc73b209e12 files/python-2.4-disable_modules_and_ssl.patch 1285
-MD5 fccf57b8c47164b676517e516898dc46 files/digest-python-2.4-r3 64
+MD5 7480e63a1ff3aff7eaf8718424add7f8 files/python-2.2.3-disable_modules_and_ssl.patch 1212
+MD5 9fe31aedbbc7e8ea1847ed6dd70bf15b files/python-2.2.3-fPIC.patch 767
+MD5 4b9922f74b1076d82d1fdb653fa5769a files/python-2.3-add_portage_search_path_take_2.patch 614
+MD5 849ff6337b70ef28009c90021dfae0da files/digest-python-2.3.5-r1 66
+MD5 e8c8ffd37f007b6ee62180d31b2100fe files/python-2.4-xmlrpc.patch 4228
+MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2.1 178
+MD5 7ed8f8f52ed392ef28dd320b130e3c6b files/python-2.4-lib64.patch 9941
+MD5 1e4084c2a8ee240668d02e703e7c171f files/digest-python-2.4.1 66
+MD5 d74e7f0fd47f00e8b3fe7ca36b7eb629 files/python-config-2.4 179
+MD5 46588eb4b2cfdd8277153e8e6f728eca files/python-2.3-add_portage_search_path.patch 607
MD5 ec16631b538a7481f0537191d5f23b27 files/python-2.4-mimetypes_apache.patch 454
+MD5 7808762bbf53647c7cd597be4044e9f7 files/python-2.3-gentoo_py_dontcompile.patch 478
+MD5 201acd1cfd5124f25c58a8db3f78a502 files/python-config-2.3 178
+MD5 1c5cd53cb89c821a549968bac31df0f1 files/depreorder.py 2235
+MD5 bbd59b4a23c663ce9c8c5b669deaa93c files/python-2.4.1-libdir.patch 9406
+MD5 c2e3a6ed5d700a7976f5b763cd935599 files/digest-python-2.3.4-r1 66
+MD5 6eab04aaa6abe2b795e4e5f4983bea38 files/python-2.4-readline.patch 9099
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
-iD8DBQFCqJne2G5bA0cA/ScRAthAAJ4sRXC+kLM4YbRFMG5M1fvgjrY0OQCeJRo/
-pjGZKSedqMjMcZUGpqiNv28=
-=vBkF
+iD8DBQFCsezwKf2g/qXtneoRAqDAAKCFo4mK0SZe0ezz90d+liwbxj2gAQCdFGMm
+ZV0/YajQvhqad8ESDnJevAo=
+=yno5
-----END PGP SIGNATURE-----
diff --git a/dev-lang/python/files/digest-python-2.3.5-r1 b/dev-lang/python/files/digest-python-2.3.5-r1
new file mode 100644
index 000000000000..aa7299a5af82
--- /dev/null
+++ b/dev-lang/python/files/digest-python-2.3.5-r1
@@ -0,0 +1 @@
+MD5 c12b57c6e0cf8bc676fd9444d71c9e18 Python-2.3.5.tar.bz2 7230000
diff --git a/dev-lang/python/files/digest-python-2.4.1-r1 b/dev-lang/python/files/digest-python-2.4.1-r1
new file mode 100644
index 000000000000..a3486637687c
--- /dev/null
+++ b/dev-lang/python/files/digest-python-2.4.1-r1
@@ -0,0 +1 @@
+MD5 de3e9a8836fab6df7c7ce545331afeb3 Python-2.4.1.tar.bz2 7847025
diff --git a/dev-lang/python/files/python-2.3.5-st_flags.patch b/dev-lang/python/files/python-2.3.5-st_flags.patch
new file mode 100644
index 000000000000..e8a4913dbcb4
--- /dev/null
+++ b/dev-lang/python/files/python-2.3.5-st_flags.patch
@@ -0,0 +1,48 @@
+diff -x '*~' -ur Python-2.3.5/Modules/posixmodule.c Python-2.3.5-fbsd/Modules/posixmodule.c
+--- Python-2.3.5/Modules/posixmodule.c 2004-12-18 09:46:18 +0000
++++ Python-2.3.5-fbsd/Modules/posixmodule.c 2005-05-31 15:59:25 +0000
+@@ -709,6 +709,9 @@
+ #ifdef HAVE_STRUCT_STAT_ST_RDEV
+ {"st_rdev", "device type (if inode device)"},
+ #endif
++#ifdef HAVE_STRUCT_STAT_ST_FLAGS
++ {"st_flags", "flags set onf ile"},
++#endif
+ {0}
+ };
+
+@@ -730,6 +733,12 @@
+ #define ST_RDEV_IDX ST_BLOCKS_IDX
+ #endif
+
++#ifdef HAVE_STRUCT_STAT_ST_FLAGS
++#define ST_FLAGS_IDX (ST_RDEV_IDX+1)
++#else
++#define ST_FLAGS_IDX ST_RDEV_IDX
++#endif
++
+ static PyStructSequence_Desc stat_result_desc = {
+ "stat_result", /* name */
+ stat_result__doc__, /* doc */
+@@ -893,6 +902,10 @@
+ PyStructSequence_SET_ITEM(v, ST_RDEV_IDX,
+ PyInt_FromLong((long)st.st_rdev));
+ #endif
++#ifdef HAVE_STRUCT_STAT_ST_FLAGS
++ PyStructSequence_SET_ITEM(v, ST_FLAGS_IDX,
++ PyInt_FromLong((long)st.st_flags));
++#endif
+
+ if (PyErr_Occurred()) {
+ Py_DECREF(v);
+diff -x '*~' -ur Python-2.3.5/configure.in Python-2.3.5-fbsd/configure.in
+--- Python-2.3.5/configure.in 2005-01-11 13:49:00 +0000
++++ Python-2.3.5-fbsd/configure.in 2005-05-31 15:56:00 +0000
+@@ -2436,6 +2436,7 @@
+ AC_STRUCT_TIMEZONE
+ AC_CHECK_MEMBERS([struct stat.st_rdev])
+ AC_CHECK_MEMBERS([struct stat.st_blksize])
++AC_CHECK_MEMBERS([struct stat.st_flags])
+ AC_STRUCT_ST_BLOCKS
+
+ AC_MSG_CHECKING(for time.h that defines altzone)
diff --git a/dev-lang/python/python-2.3.5-r1.ebuild b/dev-lang/python/python-2.3.5-r1.ebuild
new file mode 100644
index 000000000000..783cec9c3cd4
--- /dev/null
+++ b/dev-lang/python/python-2.3.5-r1.ebuild
@@ -0,0 +1,239 @@
+# 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.3.5-r1.ebuild,v 1.1 2005/06/16 21:19:33 kloeri 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 versionator
+
+PYVER_MAJOR=$(get_major_version)
+PYVER_MINOR=$(get_version_component_range 2)
+PYVER="${PYVER_MAJOR}.${PYVER_MINOR}"
+
+S="${WORKDIR}/Python-${PV}"
+DESCRIPTION="A really great language"
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV%_*}/Python-${PV}.tar.bz2"
+
+LICENSE="PSF-2.2"
+SLOT="2.3"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="ncurses gdbm ssl readline tcltk berkdb bootstrap ipv6 build ucs2 doc X nocxx"
+
+DEPEND=">=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
+ )"
+
+# 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
+
+RDEPEND="${DEPEND} dev-python/python-fchksum"
+
+
+PROVIDE="virtual/python"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ # fix readline detection problems due to missing termcap (#79013)
+ epatch ${FILESDIR}/${PN}-2.3-readline.patch
+
+ sed -ie 's/OpenBSD\/3.\[01234/OpenBSD\/3.\[012345/' configure || die "OpenBSD sed failed"
+ # adds /usr/lib/portage/pym to sys.path - liquidx (08 Oct 03)
+ # prepends /usr/lib/portage/pym to sys.path - liquidx (12 Apr 04)
+ epatch ${FILESDIR}/${PN}-2.3-add_portage_search_path_take_2.patch
+ # adds support for PYTHON_DONTCOMPILE shell environment to
+ # supress automatic generation of .pyc and .pyo files - liquidx (08 Oct 03)
+ epatch ${FILESDIR}/${PN}-2.3-gentoo_py_dontcompile.patch
+ epatch ${FILESDIR}/${PN}-2.3.2-disable_modules_and_ssl.patch
+ epatch ${FILESDIR}/${PN}-2.3-mimetypes_apache.patch
+ epatch ${FILESDIR}/${PN}-2.3-db4.2.patch
+
+ # installs to lib64
+ [ "$(get_libdir)" == "lib64" ] && epatch ${FILESDIR}/python-2.3.4-lib64.patch
+ # fix os.utime() on hppa. utimes it not supported but unfortunately reported as working - gmsoft (22 May 04)
+ [ "${ARCH}" = "hppa" ] && sed -e 's/utimes //' -i ${S}/configure
+
+ # add support for struct stat st_flags attribute (bug 94637)
+ epatch ${FILESDIR}/python-2.3.5-st_flags.patch
+}
+
+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 || 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"
+
+ src_configure
+
+ econf --with-fpectl \
+ --enable-shared \
+ `use_enable ipv6` \
+ --infodir='${prefix}'/share/info \
+ --mandir='${prefix}'/share/man \
+ --with-threads \
+ --with-libc='' \
+ ${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/$(get_libdir)/python2.3/{test,encodings,email,lib-tk,bsddb/test}
+ else
+ use elibc_uclibc && rm -rf ${D}/usr/$(get_libdir)/python2.3/{test,bsddb/test}
+ use berkdb || rm -rf ${D}/usr/$(get_libdir)/python2.3/bsddb
+ ( use !X || use !tcltk ) && rm -rf ${D}/usr/$(get_libdir)/python2.3/lib-tk
+ fi
+}
+
+pkg_postrm() {
+ python_makesym
+ python_mod_cleanup /usr/$(get_libdir)/python2.3
+}
+
+pkg_postinst() {
+ local myroot
+ myroot=$(echo $ROOT | sed 's:/$::')
+
+ python_makesym
+ python_mod_optimize
+ 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.2/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.2/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 python-2.2.x 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-2.3."
+ ewarn
+ ewarn "Python 2.2 is still installed and can be accessed via /usr/bin/python2.2."
+ ewarn "Portage-2.0.49-r8 and below will continue to use python-2.2.x, so"
+ ewarn "think twice about uninstalling it, otherwise your system will break."
+ ewarn
+ ebeep 5
+}
+
+src_test() {
+ # 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="subprocess tcl urllib urllib2"
+
+ for test in ${skip_tests} ; do
+ mv ${S}/Lib/test/test_${test}.py ${T}
+ done
+
+ make test || die "make test failed"
+
+ for test in ${skip_tests} ; do
+ mv ${T}/test_${test}.py ${S}/Lib/test/test_${test}.py
+ done
+
+ einfo "Portage skipped the following tests which aren't able to run from emerge:"
+ for test in ${skip_tests} ; do
+ einfo "test_${test}.py"
+ done
+
+ einfo "If you'd like to run them, you may:"
+ einfo "cd /usr/lib/python${PYVER}/test"
+ einfo "and run the tests separately."
+}
+
diff --git a/dev-lang/python/python-2.4.1-r1.ebuild b/dev-lang/python/python-2.4.1-r1.ebuild
new file mode 100644
index 000000000000..3f88e2e866bc
--- /dev/null
+++ b/dev-lang/python/python-2.4.1-r1.ebuild
@@ -0,0 +1,259 @@
+# 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.1-r1.ebuild,v 1.1 2005/06/16 21:19:33 kloeri 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 versionator
+
+# 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-orientated programming language."
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.bz2"
+
+LICENSE="PSF-2.2"
+SLOT="2.4"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~s390 ~sparc ~x86"
+IUSE="ncurses gdbm ssl readline tcltk berkdb bootstrap ipv6 build ucs2 doc X nocxx"
+
+DEPEND=">=sys-libs/zlib-1.1.3
+ !dev-python/cjkcodecs
+ !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
+ )"
+
+# 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
+
+RDEPEND="${DEPEND} dev-python/python-fchksum"
+
+PROVIDE="virtual/python"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ # unnecessary termcap dep in readline (#79013)
+ epatch ${FILESDIR}/${PN}-2.4.1-readline.patch
+ # db4.2 support
+ epatch ${FILESDIR}/${PN}-2.4.1-db4.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
+
+ # prepends /usr/lib/portage/pym to sys.path
+ epatch ${FILESDIR}/${PN}-${PYVER}-add_portage_search_path.patch
+
+ epatch ${FILESDIR}/${PN}-2.4.1-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
+
+ # add support for struct stat st_flags attribute (bug 94637)
+ epatch ${FILESDIR}/python-2.3.5-st_flags.patch
+}
+
+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
+
+ # 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"
+
+ src_configure
+
+ econf --with-fpectl \
+ --enable-shared \
+ `use_enable ipv6` \
+ --infodir='${prefix}'/share/info \
+ --mandir='${prefix}'/share/man \
+ --with-threads \
+ --with-libc='' \
+ ${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
+
+ # Use correct libdir in python-config
+ dosed "s:/usr/lib/:/usr/$(get_libdir)/:" /usr/bin/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 elibc_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
+
+ # try to upgrade to new python automatically - something to think about
+ #if [ "${ROOT}" = "/" ]; then
+ # /usr/sbin/python-updater
+ #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
+}
+
+src_test() {
+ # 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="subprocess tcl urllib urllib2"
+
+ for test in ${skip_tests} ; do
+ mv ${S}/Lib/test/test_${test}.py ${T}
+ done
+
+ make test || die "make test failed"
+
+ for test in ${skip_tests} ; do
+ mv ${T}/test_${test}.py ${S}/Lib/test/test_${test}.py
+ done
+
+ einfo "Portage skipped the following tests which aren't able to run from emerge:"
+ for test in ${skip_tests} ; do
+ einfo "test_${test}.py"
+ done
+
+ einfo "If you'd like to run them, you may:"
+ einfo "cd /usr/lib/python${PYVER}/test"
+ einfo "and run the tests separately."
+}