summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Tse <liquidx@gentoo.org>2003-10-22 12:21:50 +0000
committerAlastair Tse <liquidx@gentoo.org>2003-10-22 12:21:50 +0000
commitf2fc4842164e0d641337cc1f6608cbf19386d4b2 (patch)
treec49829759bbf1bc9f70a5f7f66595b58d9ac376a /dev-lang
parentfixes for python_dontcompile patch for 2.2.3 (diff)
downloadhistorical-f2fc4842164e0d641337cc1f6608cbf19386d4b2.tar.gz
historical-f2fc4842164e0d641337cc1f6608cbf19386d4b2.tar.bz2
historical-f2fc4842164e0d641337cc1f6608cbf19386d4b2.zip
fixes for python_dontcompile patch for 2.2.3
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/python/Manifest4
-rw-r--r--dev-lang/python/files/digest-python-2.2.3-r41
-rw-r--r--dev-lang/python/files/python-2.2.3-gentoo_py_dontcompile.patch20
-rw-r--r--dev-lang/python/python-2.2.3-r4.ebuild117
4 files changed, 132 insertions, 10 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 2babdf2170bf..8cd3fea61eb4 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -1,4 +1,4 @@
-MD5 34a57d04c0cace8d111e42fd5e5c6cab ChangeLog 7914
+MD5 0073c8bcd47aaf9e28c75911cb2538ea ChangeLog 8165
MD5 8145ce0144332d6caca98fa5fb648741 metadata.xml 221
MD5 58b06d58bccd371fcbf1b781164c75a9 python-2.1.3-r1.ebuild 2345
MD5 f7959cf61958991a7e25f83a4e8b2ff8 python-2.2.1-r5.ebuild 2912
@@ -7,7 +7,7 @@ MD5 c70d578ef0b3e6358108691e8b88d458 python-2.2.2.ebuild 3027
MD5 58ed89f3cc48f16f8bc96b76490e5b6a python-2.2.3-r1.ebuild 3293
MD5 0a274212a2a49a52600b617a38bafa09 python-2.2.3-r2.ebuild 3441
MD5 48d3de450107a8702bbd30ddfdceeed2 python-2.2.3-r3.ebuild 3488
-MD5 48d3de450107a8702bbd30ddfdceeed2 python-2.2.3-r4.ebuild 3488
+MD5 a33b59dc270a89899159023564677989 python-2.2.3-r4.ebuild 3488
MD5 789d8555967a31cc0de2126fa6468fc2 python-2.2.3.ebuild 2999
MD5 a53bcd98cbe4a9ff64acc1c655409b12 python-2.3.2-r1.ebuild 4031
MD5 7c0dcd5a1aa1ec0db97cd0847faab0d7 python-2.3.2.ebuild 3675
diff --git a/dev-lang/python/files/digest-python-2.2.3-r4 b/dev-lang/python/files/digest-python-2.2.3-r4
new file mode 100644
index 000000000000..283c3d783859
--- /dev/null
+++ b/dev-lang/python/files/digest-python-2.2.3-r4
@@ -0,0 +1 @@
+MD5 169f89f318e252dac0c54dd1b165d229 Python-2.2.3.tgz 6709556
diff --git a/dev-lang/python/files/python-2.2.3-gentoo_py_dontcompile.patch b/dev-lang/python/files/python-2.2.3-gentoo_py_dontcompile.patch
index 5d3f624c9bf4..24d22e60659e 100644
--- a/dev-lang/python/files/python-2.2.3-gentoo_py_dontcompile.patch
+++ b/dev-lang/python/files/python-2.2.3-gentoo_py_dontcompile.patch
@@ -1,23 +1,27 @@
---- Python-2.2.3/Python/import.c 2003-03-23 14:32:56.000000000 +0000
-+++ Python-2.2.3/Python/import.c 2003-10-09 09:45:51.000000000 +0100
+--- Python-2.2.3/Python/import.c 2003-03-23 15:32:56.000000000 +0100
++++ Python-2.2.3/Python/import.c 2003-10-21 20:15:42.000000000 +0200
@@ -719,6 +719,7 @@
write_compiled_module(PyCodeObject *co, char *cpathname, long mtime)
{
FILE *fp;
-+ char *py_dontcompile;
++ char *py_dontcompile;
if (CANT_WRITE(co->co_argcount) ||
CANT_WRITE(co->co_nlocals) ||
-@@ -731,8 +732,10 @@
+@@ -731,8 +732,14 @@
cpathname);
return;
}
-
- fp = open_exclusive(cpathname);
-+ if ((py_dontcompile = getenv("PYTHON_DONTCOMPILE")) != NULL)
-+ fp = open_exclusive(cpathname);
-+ else
-+ fp = NULL;
++ if ((py_dontcompile = getenv("PYTHON_DONTCOMPILE")) == NULL)
++ fp = open_exclusive(cpathname);
++ else {
++ if (Py_VerboseFlag)
++ PySys_WriteStderr(
++ "# PYTHON_DONTCOMPILE is set: won't create %s\n", cpathname);
++ return;
++ }
if (fp == NULL) {
if (Py_VerboseFlag)
PySys_WriteStderr(
diff --git a/dev-lang/python/python-2.2.3-r4.ebuild b/dev-lang/python/python-2.2.3-r4.ebuild
new file mode 100644
index 000000000000..994302598696
--- /dev/null
+++ b/dev-lang/python/python-2.2.3-r4.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.2.3-r4.ebuild,v 1.1 2003/10/22 12:21:45 liquidx Exp $
+
+inherit flag-o-matic eutils python
+
+IUSE="readline tcltk berkdb bootstrap build doc"
+
+PYVER_MAJOR="`echo ${PV%_*} | cut -d '.' -f 1`"
+PYVER_MINOR="`echo ${PV%_*} | cut -d '.' -f 2`"
+PYVER="${PYVER_MAJOR}.${PYVER_MINOR}"
+
+S="${WORKDIR}/Python-${PV}"
+DESCRIPTION="A really great language"
+SRC_URI="http://www.python.org/ftp/python/${PV%_*}/Python-${PV}.tgz"
+
+HOMEPAGE="http://www.python.org"
+LICENSE="PSF-2.2"
+KEYWORDS="~amd64 ~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~arm ~ia64"
+
+DEPEND="virtual/glibc >=sys-libs/zlib-1.1.3
+ doc? ( =dev-python/python-docs-${PV}* )
+ readline? ( >=sys-libs/readline-4.1 >=sys-libs/ncurses-5.2 )
+ berkdb? ( >=sys-libs/db-3 )
+ tcltk? ( >=dev-lang/tk-8.0 )
+ || ( dev-libs/expat
+ ( !build? ( dev-libs/expat ) )
+ ( !bootstrap? ( dev-libs/expat ) )
+ )"
+# This is a hairy one. Basically depend on dev-libs/expat
+# if "build" or "bootstrap" not in USE.
+
+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"
+
+SLOT="2.2"
+
+src_unpack() {
+ unpack ${A}
+ epatch ${FILESDIR}/${P}-db4.patch
+ EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PN}-2.3-add_portage_search_path.patch
+ epatch ${FILESDIR}/${PN}-2.2.3-gentoo_py_dontcompile.patch
+}
+
+src_compile() {
+ filter-flags -malign-double
+
+ [ "${ARCH}" = "hppa" ] && append-flags -fPIC
+ [ "${ARCH}" = "alpha" ] && append-flags -fPIC
+ export OPT="${CFLAGS}"
+
+ # adjust makefile to install pydoc into ${D} correctly
+ t="${S}/Makefile.pre.in"
+ cp ${t} ${t}.orig || die
+ sed 's:install-platlib.*:& --install-scripts=$(BINDIR):' ${t}.orig > ${t}
+
+ local myopts
+ #if we are creating a new build image, we remove the dependency on g++
+ if [ "`use build`" -a ! "`use bootstrap`" ]
+ then
+ myopts="--with-cxx=no"
+ fi
+
+ # build python with threads support
+ myopts="${myopts} --with-threads"
+
+ econf --with-fpectl \
+ --infodir='${prefix}'/share/info \
+ --mandir='${prefix}'/share/man \
+ ${myopts} || die
+ emake || die "Parallel make failed"
+}
+
+src_install() {
+ dodir /usr
+ make install prefix=${D}/usr || die
+
+ rm -f ${D}/usr/bin/python
+ dodoc README
+
+ # install our own custom python-config
+ exeinto /usr/bin
+ newexe ${FILESDIR}/python-config-${PYVER} python-config
+
+ # seems like the build do not install Makefile.pre.in anymore
+ # it probably shouldn't - use DistUtils, people!
+ insinto /usr/lib/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/lib/python${PYVER}/config/Makefile
+
+ # If USE tcltk lets install idle
+ # Need to script the python version in the path
+ if [ -n "`use tcltk`" ]; then
+ dodir /usr/lib/python${PYVER}/tools
+ cp -r "${S}/Tools/idle" "${D}/usr/lib/python${PYVER}/tools/"
+ dosym /usr/bin/idle.py /usr/lib/python${PYVER}/tools/idle/idle.py
+ fi
+}
+
+pkg_postinst() {
+ python_makesym
+ PYTHON_OVERRIDE_PYVER="2.2" python_mod_optimize
+ PYTHON_OVERRIDE_PYVER="2.2" python_mod_optimize -x site-packages ${ROOT}usr/lib/python${SLOT}
+}
+
+pkg_postrm() {
+ python_makesym
+ python_mod_cleanup
+}