diff options
author | Alastair Tse <liquidx@gentoo.org> | 2003-05-08 11:50:50 +0000 |
---|---|---|
committer | Alastair Tse <liquidx@gentoo.org> | 2003-05-08 11:50:50 +0000 |
commit | a10e6f5da95e4ab84ed4061686a8b8409590e2bb (patch) | |
tree | deee29b275b725d2983d181378368d7a47dab5a0 /dev-lang/python | |
parent | being cautious about new python (diff) | |
download | gentoo-2-a10e6f5da95e4ab84ed4061686a8b8409590e2bb.tar.gz gentoo-2-a10e6f5da95e4ab84ed4061686a8b8409590e2bb.tar.bz2 gentoo-2-a10e6f5da95e4ab84ed4061686a8b8409590e2bb.zip |
add tk-8.4.x fix
Diffstat (limited to 'dev-lang/python')
-rw-r--r-- | dev-lang/python/ChangeLog | 8 | ||||
-rw-r--r-- | dev-lang/python/Manifest | 13 | ||||
-rw-r--r-- | dev-lang/python/files/digest-python-2.2.2-r1 | 1 | ||||
-rw-r--r-- | dev-lang/python/files/python-2.2.2-tk-8.4.x.patch | 87 | ||||
-rw-r--r-- | dev-lang/python/python-2.2.2-r1.ebuild | 103 |
5 files changed, 211 insertions, 1 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog index ea83119a6eb5..1bd92c8986c5 100644 --- a/dev-lang/python/ChangeLog +++ b/dev-lang/python/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-lang/python # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.25 2003/02/23 01:05:12 gmsoft Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.26 2003/05/08 11:50:24 liquidx Exp $ + +*python-2.2.2-r1 (08 May 2003) + + 08 May 2003; Alastair Tse <liquidx@gentoo.org> python-2.2.2-r1.ebuild, + files/python-2.2.2-tk-8.4.x.patch: + backported patch to fix tk-8.4.x problems (#20318) 23 Feb 2003; Guy Martin <gmsoft@gentoo.org> python-2.2.2.ebuild : Added -fPIC to CFLAGS on hppa. It's needed by apps linking to some python libs. diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest new file mode 100644 index 000000000000..c0f08dd460d3 --- /dev/null +++ b/dev-lang/python/Manifest @@ -0,0 +1,13 @@ +MD5 77b3c329bc0bdf4ae8180eaa76a56542 ChangeLog 4827 +MD5 067b51e93b48ce7877df67399883c842 python-2.1.3-r1.ebuild 2345 +MD5 34b9eed0a2276490dbe1bf42e01b4b5d python-2.2.2-r1.ebuild 3122 +MD5 4acba90247dbf1f810e372bbb8f11cb9 python-2.2.1-r5.ebuild 2919 +MD5 81969a1011c98f45f1996ca956156d77 python-2.2.2.ebuild 3027 +MD5 b7a6b00d8dede1534e7a5180a14542b1 files/digest-python-2.2.2-r1 62 +MD5 f3f370c8d1382c1a7571cfc1cbb196d9 files/digest-python-2.1.3-r1 62 +MD5 aa73c4258e3be099345a929ad6e01665 files/digest-python-2.2.1-r5 62 +MD5 8f455a90c3fcabda33ce44fe9c030534 files/python-2.2.2-tk-8.4.x.patch 3148 +MD5 b7a6b00d8dede1534e7a5180a14542b1 files/digest-python-2.2.2 62 +MD5 5f2361b3e770981b737a9ad3d2863931 files/python-2.2.1-r5-gentoo.diff 4152 +MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2.1 178 +MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2.2 178 diff --git a/dev-lang/python/files/digest-python-2.2.2-r1 b/dev-lang/python/files/digest-python-2.2.2-r1 new file mode 100644 index 000000000000..39bd384a93cf --- /dev/null +++ b/dev-lang/python/files/digest-python-2.2.2-r1 @@ -0,0 +1 @@ +MD5 1c1067396e5aa0299978486eb5bd1a5c Python-2.2.2.tgz 6669400 diff --git a/dev-lang/python/files/python-2.2.2-tk-8.4.x.patch b/dev-lang/python/files/python-2.2.2-tk-8.4.x.patch new file mode 100644 index 000000000000..498100bc476e --- /dev/null +++ b/dev-lang/python/files/python-2.2.2-tk-8.4.x.patch @@ -0,0 +1,87 @@ +=================================================================== +RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tkinter.py,v +retrieving revision 1.160.10.2 +retrieving revision 1.160.10.3 +diff -u -r1.160.10.2 -r1.160.10.3 +--- python/python/dist/src/Lib/lib-tk/Tkinter.py 2002/08/23 15:27:52 1.160.10.2 ++++ python/python/dist/src/Lib/lib-tk/Tkinter.py 2003/03/29 09:48:12 1.160.10.3 +@@ -27,7 +27,7 @@ + tk.mainloop() + """ + +-__version__ = "$Revision: 1.1 $" ++__version__ = "$Revision: 1.1 $" + + import sys + if sys.platform == "win32": +@@ -1024,38 +1024,54 @@ + """Internal function.""" + if len(args) != len(self._subst_format): return args + getboolean = self.tk.getboolean ++ + getint = int ++ def getint_event(s): ++ """Tk changed behavior in 8.4.2, returning "??" rather more often.""" ++ try: ++ return int(s) ++ except ValueError: ++ return s ++ + nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args + # Missing: (a, c, d, m, o, v, B, R) + e = Event() ++ # serial field: valid vor all events ++ # number of button: ButtonPress and ButtonRelease events only ++ # height field: Configure, ConfigureRequest, Create, ++ # ResizeRequest, and Expose events only ++ # keycode field: KeyPress and KeyRelease events only ++ # time field: "valid for events that contain a time field" ++ # width field: Configure, ConfigureRequest, Create, ResizeRequest, ++ # and Expose events only ++ # x field: "valid for events that contain a x field" ++ # y field: "valid for events that contain a y field" ++ # keysym as decimal: KeyPress and KeyRelease events only ++ # x_root, y_root fields: ButtonPress, ButtonRelease, KeyPress, ++ # KeyRelease,and Motion events + e.serial = getint(nsign) +- e.num = getint(b) ++ e.num = getint_event(b) + try: e.focus = getboolean(f) + except TclError: pass +- e.height = getint(h) +- e.keycode = getint(k) +- # For Visibility events, event state is a string and +- # not an integer: +- try: +- e.state = getint(s) +- except ValueError: +- e.state = s +- e.time = getint(t) +- e.width = getint(w) +- e.x = getint(x) +- e.y = getint(y) ++ e.height = getint_event(h) ++ e.keycode = getint_event(k) ++ e.state = getint_event(s) ++ e.time = getint_event(t) ++ e.width = getint_event(w) ++ e.x = getint_event(x) ++ e.y = getint_event(y) + e.char = A + try: e.send_event = getboolean(E) + except TclError: pass + e.keysym = K +- e.keysym_num = getint(N) ++ e.keysym_num = getint_event(N) + e.type = T + try: + e.widget = self._nametowidget(W) + except KeyError: + e.widget = W +- e.x_root = getint(X) +- e.y_root = getint(Y) ++ e.x_root = getint_event(X) ++ e.y_root = getint_event(Y) + try: + e.delta = getint(D) + except ValueError: diff --git a/dev-lang/python/python-2.2.2-r1.ebuild b/dev-lang/python/python-2.2.2-r1.ebuild new file mode 100644 index 000000000000..4526106438f7 --- /dev/null +++ b/dev-lang/python/python-2.2.2-r1.ebuild @@ -0,0 +1,103 @@ +# 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.2-r1.ebuild,v 1.1 2003/05/08 11:50:24 liquidx Exp $ + +IUSE="readline tcltk berkdb bootstrap" + +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="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~arm" + +DEPEND="virtual/glibc >=sys-libs/zlib-1.1.3 + 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" + +inherit flag-o-matic + +src_unpack() { + unpack ${A} + einfo "Applying python-2.2.2-tk8.4.x.patch .." + cd ${S}; patch -p4 < ${FILESDIR}/${P}-tk-8.4.x.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 + + 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 + dosym python${PYVER_MAJOR} /usr/bin/python + dosym python${PYVER_MAJOR}.${PYVER_MINOR} /usr/bin/python${PYVER_MAJOR} + dodoc README + + # install our own custom python-config + exeinto /usr/bin + newexe ${FILESDIR}/python-config-${PV} 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 use tcltk; then + dodir /usr/lib/python${PYVER}/tools + mv "${S}/Tools/idle" "${D}/usr/lib/python${PYVER}/tools/" + dosym /usr/lib/python${PYVER}/tools/idle/idle.py /usr/bin/idle.py + fi +} + |