1 |
floppym 15/02/07 21:24:15 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: python-2.7.9-r2.ebuild |
5 |
Log: |
6 |
Drop 61_all_process_data.patch, fixes musl build, bug 539210. |
7 |
|
8 |
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4) |
9 |
|
10 |
Revision Changes Path |
11 |
1.812 dev-lang/python/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.812&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.812&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?r1=1.811&r2=1.812 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v |
20 |
retrieving revision 1.811 |
21 |
retrieving revision 1.812 |
22 |
diff -u -r1.811 -r1.812 |
23 |
--- ChangeLog 7 Feb 2015 21:20:29 -0000 1.811 |
24 |
+++ ChangeLog 7 Feb 2015 21:24:15 -0000 1.812 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for dev-lang/python |
27 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.811 2015/02/07 21:20:29 floppym Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.812 2015/02/07 21:24:15 floppym Exp $ |
30 |
+ |
31 |
+*python-2.7.9-r2 (07 Feb 2015) |
32 |
+ |
33 |
+ 07 Feb 2015; Mike Gilbert <floppym@g.o> +python-2.7.9-r2.ebuild: |
34 |
+ Drop 61_all_process_data.patch, fixes musl build, bug 539210. |
35 |
|
36 |
07 Feb 2015; Mike Gilbert <floppym@g.o> -python-2.7.7.ebuild, |
37 |
-python-2.7.8.ebuild: |
38 |
|
39 |
|
40 |
|
41 |
1.1 dev-lang/python/python-2.7.9-r2.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.9-r2.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.9-r2.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: python-2.7.9-r2.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2015 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.9-r2.ebuild,v 1.1 2015/02/07 21:24:15 floppym Exp $ |
51 |
|
52 |
EAPI="4" |
53 |
WANT_AUTOMAKE="none" |
54 |
WANT_LIBTOOL="none" |
55 |
|
56 |
inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing |
57 |
|
58 |
MY_P="Python-${PV}" |
59 |
PATCHSET_VERSION="2.7.9-1" |
60 |
|
61 |
DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
62 |
HOMEPAGE="http://www.python.org/" |
63 |
SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
64 |
http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
65 |
|
66 |
LICENSE="PSF-2" |
67 |
SLOT="2.7" |
68 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
69 |
IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" |
70 |
|
71 |
# Do not add a dependency on dev-lang/python to this ebuild. |
72 |
# If you need to apply a patch which requires python for bootstrapping, please |
73 |
# run the bootstrap code on your dev box and include the results in the |
74 |
# patchset. See bug 447752. |
75 |
|
76 |
RDEPEND="app-arch/bzip2 |
77 |
>=sys-libs/zlib-1.1.3 |
78 |
virtual/libffi |
79 |
virtual/libintl |
80 |
!build? ( |
81 |
berkdb? ( || ( |
82 |
sys-libs/db:5.3 |
83 |
sys-libs/db:5.2 |
84 |
sys-libs/db:5.1 |
85 |
sys-libs/db:5.0 |
86 |
sys-libs/db:4.8 |
87 |
sys-libs/db:4.7 |
88 |
sys-libs/db:4.6 |
89 |
sys-libs/db:4.5 |
90 |
sys-libs/db:4.4 |
91 |
sys-libs/db:4.3 |
92 |
sys-libs/db:4.2 |
93 |
) ) |
94 |
gdbm? ( sys-libs/gdbm[berkdb] ) |
95 |
ncurses? ( |
96 |
>=sys-libs/ncurses-5.2 |
97 |
readline? ( >=sys-libs/readline-4.1 ) |
98 |
) |
99 |
sqlite? ( >=dev-db/sqlite-3.3.8:3 ) |
100 |
ssl? ( dev-libs/openssl ) |
101 |
tk? ( |
102 |
>=dev-lang/tk-8.0 |
103 |
dev-tcltk/blt |
104 |
dev-tcltk/tix |
105 |
) |
106 |
xml? ( >=dev-libs/expat-2.1 ) |
107 |
) |
108 |
!!<sys-apps/portage-2.1.9" |
109 |
DEPEND="${RDEPEND} |
110 |
virtual/pkgconfig |
111 |
>=sys-devel/autoconf-2.65 |
112 |
!sys-devel/gcc[libffi]" |
113 |
RDEPEND+=" !build? ( app-misc/mime-types ) |
114 |
doc? ( dev-python/python-docs:${SLOT} )" |
115 |
PDEPEND="app-admin/eselect-python |
116 |
app-admin/python-updater" |
117 |
|
118 |
S="${WORKDIR}/${MY_P}" |
119 |
|
120 |
pkg_setup() { |
121 |
if use berkdb; then |
122 |
ewarn "'bsddb' module is out-of-date and no longer maintained inside" |
123 |
ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" |
124 |
ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" |
125 |
ewarn "is provided by dev-python/bsddb3." |
126 |
else |
127 |
if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then |
128 |
ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" |
129 |
ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." |
130 |
ewarn "You might need to migrate your databases." |
131 |
fi |
132 |
fi |
133 |
} |
134 |
|
135 |
src_prepare() { |
136 |
# Ensure that internal copies of expat, libffi and zlib are not used. |
137 |
rm -r Modules/expat || die |
138 |
rm -r Modules/_ctypes/libffi* || die |
139 |
rm -r Modules/zlib || die |
140 |
|
141 |
if tc-is-cross-compiler; then |
142 |
local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" |
143 |
fi |
144 |
|
145 |
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
146 |
|
147 |
# Fix for cross-compiling. |
148 |
epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch" |
149 |
|
150 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
151 |
Lib/distutils/command/install.py \ |
152 |
Lib/distutils/sysconfig.py \ |
153 |
Lib/site.py \ |
154 |
Lib/sysconfig.py \ |
155 |
Lib/test/test_site.py \ |
156 |
Makefile.pre.in \ |
157 |
Modules/Setup.dist \ |
158 |
Modules/getpath.c \ |
159 |
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
160 |
|
161 |
epatch_user |
162 |
|
163 |
eautoconf |
164 |
eautoheader |
165 |
} |
166 |
|
167 |
src_configure() { |
168 |
if use build; then |
169 |
# Disable extraneous modules with extra dependencies. |
170 |
export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" |
171 |
export PYTHON_DISABLE_SSL="1" |
172 |
else |
173 |
# dbm module can be linked against berkdb or gdbm. |
174 |
# Defaults to gdbm when both are enabled, #204343. |
175 |
local disable |
176 |
use berkdb || use gdbm || disable+=" dbm" |
177 |
use berkdb || disable+=" _bsddb" |
178 |
use gdbm || disable+=" gdbm" |
179 |
use ncurses || disable+=" _curses _curses_panel" |
180 |
use readline || disable+=" readline" |
181 |
use sqlite || disable+=" _sqlite3" |
182 |
use ssl || export PYTHON_DISABLE_SSL="1" |
183 |
use tk || disable+=" _tkinter" |
184 |
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
185 |
export PYTHON_DISABLE_MODULES="${disable}" |
186 |
|
187 |
if ! use xml; then |
188 |
ewarn "You have configured Python without XML support." |
189 |
ewarn "This is NOT a recommended configuration as you" |
190 |
ewarn "may face problems parsing any XML documents." |
191 |
fi |
192 |
fi |
193 |
|
194 |
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
195 |
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
196 |
fi |
197 |
|
198 |
if [[ "$(gcc-major-version)" -ge 4 ]]; then |
199 |
append-flags -fwrapv |
200 |
fi |
201 |
|
202 |
filter-flags -malign-double |
203 |
|
204 |
[[ "${ARCH}" == "alpha" ]] && append-flags -fPIC |
205 |
|
206 |
# https://bugs.gentoo.org/show_bug.cgi?id=50309 |
207 |
if is-flagq -O3; then |
208 |
is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
209 |
use hardened && replace-flags -O3 -O2 |
210 |
fi |
211 |
|
212 |
if tc-is-cross-compiler; then |
213 |
# Force some tests that try to poke fs paths. |
214 |
export ac_cv_file__dev_ptc=no |
215 |
export ac_cv_file__dev_ptmx=yes |
216 |
fi |
217 |
|
218 |
# Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. |
219 |
tc-export CXX |
220 |
# The configure script fails to use pkg-config correctly. |
221 |
# http://bugs.python.org/issue15506 |
222 |
export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
223 |
|
224 |
# Set LDFLAGS so we link modules with -lpython2.7 correctly. |
225 |
# Needed on FreeBSD unless Python 2.7 is already installed. |
226 |
# Please query BSD team before removing this! |
227 |
append-ldflags "-L." |
228 |
|
229 |
local dbmliborder |
230 |
if use gdbm; then |
231 |
dbmliborder+="${dbmliborder:+:}gdbm" |
232 |
fi |
233 |
if use berkdb; then |
234 |
dbmliborder+="${dbmliborder:+:}bdb" |
235 |
fi |
236 |
|
237 |
BUILD_DIR="${WORKDIR}/${CHOST}" |
238 |
mkdir -p "${BUILD_DIR}" || die |
239 |
cd "${BUILD_DIR}" || die |
240 |
|
241 |
ECONF_SOURCE="${S}" OPT="" \ |
242 |
econf \ |
243 |
--with-fpectl \ |
244 |
--enable-shared \ |
245 |
$(use_enable ipv6) \ |
246 |
$(use_with threads) \ |
247 |
$(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ |
248 |
--infodir='${prefix}/share/info' \ |
249 |
--mandir='${prefix}/share/man' \ |
250 |
--with-dbmliborder="${dbmliborder}" \ |
251 |
--with-libc="" \ |
252 |
--enable-loadable-sqlite-extensions \ |
253 |
--with-system-expat \ |
254 |
--with-system-ffi \ |
255 |
--without-ensurepip |
256 |
|
257 |
if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
258 |
eerror "configure has detected that the sem_open function is broken." |
259 |
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
260 |
die "Broken sem_open function (bug 496328)" |
261 |
fi |
262 |
} |
263 |
|
264 |
src_compile() { |
265 |
# Avoid invoking pgen for cross-compiles. |
266 |
touch Include/graminit.h Python/graminit.c |
267 |
|
268 |
cd "${BUILD_DIR}" || die |
269 |
emake |
270 |
|
271 |
# Work around bug 329499. See also bug 413751 and 457194. |
272 |
if has_version dev-libs/libffi[pax_kernel]; then |
273 |
pax-mark E python |
274 |
else |
275 |
pax-mark m python |
276 |
fi |
277 |
} |
278 |
|
279 |
src_test() { |
280 |
# Tests will not work when cross compiling. |
281 |
if tc-is-cross-compiler; then |
282 |
elog "Disabling tests due to crosscompiling." |
283 |
return |
284 |
fi |
285 |
|
286 |
cd "${BUILD_DIR}" || die |
287 |
|
288 |
# Skip failing tests. |
289 |
local skipped_tests="distutils gdb" |
290 |
|
291 |
for test in ${skipped_tests}; do |
292 |
mv "${S}"/Lib/test/test_${test}.py "${T}" |
293 |
done |
294 |
|
295 |
# Rerun failed tests in verbose mode (regrtest -w). |
296 |
emake test EXTRATESTOPTS="-w" < /dev/tty |
297 |
local result="$?" |
298 |
|
299 |
for test in ${skipped_tests}; do |
300 |
mv "${T}/test_${test}.py" "${S}"/Lib/test |
301 |
done |
302 |
|
303 |
elog "The following tests have been skipped:" |
304 |
for test in ${skipped_tests}; do |
305 |
elog "test_${test}.py" |
306 |
done |
307 |
|
308 |
elog "If you would like to run them, you may:" |
309 |
elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" |
310 |
elog "and run the tests separately." |
311 |
|
312 |
if [[ "${result}" -ne 0 ]]; then |
313 |
die "emake test failed" |
314 |
fi |
315 |
} |
316 |
|
317 |
src_install() { |
318 |
local libdir=${ED}/usr/$(get_libdir)/python${SLOT} |
319 |
|
320 |
cd "${BUILD_DIR}" || die |
321 |
emake DESTDIR="${D}" altinstall |
322 |
|
323 |
sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" |
324 |
|
325 |
# Backwards compat with Gentoo divergence. |
326 |
dosym python${SLOT}-config /usr/bin/python-config-${SLOT} |
327 |
|
328 |
# Fix collisions between different slots of Python. |
329 |
mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" |
330 |
mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" |
331 |
mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" |
332 |
rm -f "${ED}usr/bin/smtpd.py" |
333 |
|
334 |
if use build; then |
335 |
rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test} |
336 |
else |
337 |
use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} || die |
338 |
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
339 |
use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die |
340 |
use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} |
341 |
fi |
342 |
|
343 |
use threads || rm -r "${libdir}/multiprocessing" || die |
344 |
use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die |
345 |
|
346 |
dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
347 |
|
348 |
if use examples; then |
349 |
insinto /usr/share/doc/${PF}/examples |
350 |
doins -r "${S}"/Tools |
351 |
fi |
352 |
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
353 |
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
354 |
emake --no-print-directory -s -f - 2>/dev/null) |
355 |
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
356 |
|
357 |
newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} |
358 |
newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} |
359 |
sed \ |
360 |
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ |
361 |
-e "s:@PYDOC@:pydoc${SLOT}:" \ |
362 |
-i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" |
363 |
|
364 |
# for python-exec |
365 |
python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR |
366 |
|
367 |
# if not using a cross-compiler, use the fresh binary |
368 |
if ! tc-is-cross-compiler; then |
369 |
local PYTHON=./python |
370 |
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. |
371 |
fi |
372 |
|
373 |
echo "EPYTHON='${EPYTHON}'" > epython.py |
374 |
python_domodule epython.py |
375 |
} |
376 |
|
377 |
pkg_preinst() { |
378 |
if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; then |
379 |
python_updater_warning="1" |
380 |
fi |
381 |
} |
382 |
|
383 |
eselect_python_update() { |
384 |
if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
385 |
eselect python update |
386 |
fi |
387 |
|
388 |
if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
389 |
eselect python update --python${PV%%.*} |
390 |
fi |
391 |
} |
392 |
|
393 |
pkg_postinst() { |
394 |
eselect_python_update |
395 |
|
396 |
if [[ "${python_updater_warning}" == "1" ]]; then |
397 |
ewarn "You have just upgraded from an older version of Python." |
398 |
ewarn "You should switch active version of Python ${PV%%.*} and run" |
399 |
ewarn "'python-updater [options]' to rebuild Python modules." |
400 |
fi |
401 |
} |
402 |
|
403 |
pkg_postrm() { |
404 |
eselect_python_update |
405 |
} |