Gentoo Archives: gentoo-commits

From: "Mike Gilbert (floppym)" <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/python: python-2.7.5-r2.ebuild ChangeLog
Date: Thu, 26 Sep 2013 19:17:24
Message-Id: 20130926191717.30D3F2004E@flycatcher.gentoo.org
1 floppym 13/09/26 19:17:17
2
3 Modified: python-2.7.5-r2.ebuild ChangeLog
4 Log:
5 Apply cross-compile fixes to python-2.7.5.
6
7 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
8
9 Revision Changes Path
10 1.14 dev-lang/python/python-2.7.5-r2.ebuild
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.5-r2.ebuild?rev=1.14&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.5-r2.ebuild?rev=1.14&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.5-r2.ebuild?r1=1.13&r2=1.14
15
16 Index: python-2.7.5-r2.ebuild
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.5-r2.ebuild,v
19 retrieving revision 1.13
20 retrieving revision 1.14
21 diff -u -r1.13 -r1.14
22 --- python-2.7.5-r2.ebuild 28 Aug 2013 15:59:25 -0000 1.13
23 +++ python-2.7.5-r2.ebuild 26 Sep 2013 19:17:17 -0000 1.14
24 @@ -1,6 +1,6 @@
25 # Copyright 1999-2013 Gentoo Foundation
26 # Distributed under the terms of the GNU General Public License v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.5-r2.ebuild,v 1.13 2013/08/28 15:59:25 floppym Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.5-r2.ebuild,v 1.14 2013/09/26 19:17:17 floppym Exp $
29
30 EAPI="4"
31 WANT_AUTOMAKE="none"
32 @@ -90,18 +90,19 @@
33 rm -r Modules/_ctypes/libffi* || die
34 rm -r Modules/zlib || die
35
36 - local excluded_patches
37 - if ! tc-is-cross-compiler; then
38 - excluded_patches="*_all_crosscompile.patch"
39 + if tc-is-cross-compiler; then
40 + local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
41 fi
42
43 - EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" \
44 - epatch "${WORKDIR}/${PV}-${PATCHSET_REVISION}"
45 + EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}-${PATCHSET_REVISION}"
46
47 epatch "${FILESDIR}/${P}-library-path.patch" #474882
48 epatch "${FILESDIR}/${P}-re_unsigned_ptrdiff.patch" #476426
49 epatch "${FILESDIR}/CVE-2013-4238_py27.patch"
50
51 + # Fix for cross-compiling.
52 + epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch"
53 +
54 sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
55 Lib/distutils/command/install.py \
56 Lib/distutils/sysconfig.py \
57 @@ -164,27 +165,6 @@
58 use hardened && replace-flags -O3 -O2
59 fi
60
61 - # Run the configure scripts in parallel.
62 - multijob_init
63 -
64 - mkdir -p "${WORKDIR}"/{${CBUILD},${CHOST}}
65 -
66 - if tc-is-cross-compiler; then
67 - (
68 - multijob_child_init
69 - cd "${WORKDIR}"/${CBUILD} >/dev/null
70 - OPT="-O1" CFLAGS="" CPPFLAGS="" LDFLAGS="" CC="" \
71 - "${S}"/configure \
72 - --{build,host}=${CBUILD} \
73 - || die "cross-configure failed"
74 - ) &
75 - multijob_post_fork
76 -
77 - # The configure script assumes it's buggy when cross-compiling.
78 - export ac_cv_buggy_getaddrinfo=no
79 - export ac_cv_have_long_long_format=yes
80 - fi
81 -
82 # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile.
83 tc-export CXX
84 # The configure script fails to use pkg-config correctly.
85 @@ -204,7 +184,10 @@
86 dbmliborder+="${dbmliborder:+:}bdb"
87 fi
88
89 - cd "${WORKDIR}"/${CHOST}
90 + BUILD_DIR="${WORKDIR}/${CHOST}"
91 + mkdir -p "${BUILD_DIR}" || die
92 + cd "${BUILD_DIR}" || die
93 +
94 ECONF_SOURCE="${S}" OPT="" \
95 econf \
96 --with-fpectl \
97 @@ -219,42 +202,14 @@
98 --enable-loadable-sqlite-extensions \
99 --with-system-expat \
100 --with-system-ffi
101 -
102 - if tc-is-cross-compiler; then
103 - # Modify the Makefile.pre so we don't regen for the host/ one.
104 - # We need to link the host python programs into $PWD and run
105 - # them from here because the distutils sysconfig module will
106 - # parse Makefile/etc... from argv[0], and we need it to pick
107 - # up the target settings, not the host ones.
108 - sed -i \
109 - -e '1iHOSTPYTHONPATH = ./hostpythonpath:' \
110 - -e '/^HOSTPYTHON/s:=.*:= ./hostpython:' \
111 - -e '/^HOSTPGEN/s:=.*:= ./Parser/hostpgen:' \
112 - Makefile{.pre,} || die "sed failed"
113 - fi
114 -
115 - multijob_finish
116 }
117
118 src_compile() {
119 - if tc-is-cross-compiler; then
120 - cd "${WORKDIR}"/${CBUILD}
121 - # Disable as many modules as possible -- but we need a few to install.
122 - PYTHON_DISABLE_MODULES=$(
123 - sed -n "/Extension('/{s:^.*Extension('::;s:'.*::;p}" "${S}"/setup.py | \
124 - egrep -v '(unicodedata|time|cStringIO|_struct|binascii)'
125 - ) \
126 - PTHON_DISABLE_SSL="1" \
127 - SYSROOT= \
128 - emake
129 - # See comment in src_configure about these.
130 - ln python ../${CHOST}/hostpython || die
131 - ln Parser/pgen ../${CHOST}/Parser/hostpgen || die
132 - ln -s ../${CBUILD}/build/lib.*/ ../${CHOST}/hostpythonpath || die
133 - fi
134 + # Avoid invoking pgen for cross-compiles.
135 + touch Include/graminit.h Python/graminit.c
136
137 - cd "${WORKDIR}"/${CHOST}
138 - default
139 + cd "${BUILD_DIR}" || die
140 + emake
141
142 # Work around bug 329499. See also bug 413751 and 457194.
143 if has_version dev-libs/libffi[pax_kernel]; then
144 @@ -271,7 +226,7 @@
145 return
146 fi
147
148 - cd "${WORKDIR}"/${CHOST}
149 + cd "${BUILD_DIR}" || die
150
151 # Skip failing tests.
152 local skipped_tests="distutils gdb"
153 @@ -305,7 +260,7 @@
154 src_install() {
155 local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
156
157 - cd "${WORKDIR}"/${CHOST}
158 + cd "${BUILD_DIR}" || die
159 emake DESTDIR="${D}" altinstall
160
161 sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed"
162 @@ -354,9 +309,8 @@
163
164 # if not using a cross-compiler, use the fresh binary
165 if ! tc-is-cross-compiler; then
166 - local PYTHON=./python \
167 - LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
168 - export LD_LIBRARY_PATH
169 + local PYTHON=./python
170 + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
171 fi
172
173 echo "EPYTHON='${EPYTHON}'" > epython.py
174
175
176
177 1.708 dev-lang/python/ChangeLog
178
179 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.708&view=markup
180 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.708&content-type=text/plain
181 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?r1=1.707&r2=1.708
182
183 Index: ChangeLog
184 ===================================================================
185 RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v
186 retrieving revision 1.707
187 retrieving revision 1.708
188 diff -u -r1.707 -r1.708
189 --- ChangeLog 26 Sep 2013 04:20:27 -0000 1.707
190 +++ ChangeLog 26 Sep 2013 19:17:17 -0000 1.708
191 @@ -1,6 +1,10 @@
192 # ChangeLog for dev-lang/python
193 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
194 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.707 2013/09/26 04:20:27 floppym Exp $
195 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.708 2013/09/26 19:17:17 floppym Exp $
196 +
197 + 26 Sep 2013; Mike Gilbert <floppym@g.o>
198 + +files/python-2.7.5-nonfatal-compileall.patch, python-2.7.5-r2.ebuild:
199 + Apply cross-compile fixes to python-2.7.5.
200
201 26 Sep 2013; Mike Gilbert <floppym@g.o> python-3.3.2-r2.ebuild:
202 Fix/simplify cross-compiles.