1 |
commit: 1896ea58f9eef2916986ade1d46aa3e727fbccc7 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 29 13:25:28 2017 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 29 13:25:28 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=1896ea58 |
7 |
|
8 |
dev-lang/python: fix bootstrapping on Darwin, bug #642590 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/642590 |
11 |
Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6 |
12 |
|
13 |
dev-lang/python/python-2.7.12.ebuild | 10 ++++--- |
14 |
dev-lang/python/python-2.7.14.ebuild | 53 ++++++++++++++++++------------------ |
15 |
2 files changed, 33 insertions(+), 30 deletions(-) |
16 |
|
17 |
diff --git a/dev-lang/python/python-2.7.12.ebuild b/dev-lang/python/python-2.7.12.ebuild |
18 |
index 3ee38dd690..040c3847e2 100644 |
19 |
--- a/dev-lang/python/python-2.7.12.ebuild |
20 |
+++ b/dev-lang/python/python-2.7.12.ebuild |
21 |
@@ -237,10 +237,12 @@ src_configure() { |
22 |
append-ldflags -L"${EPREFIX}"/$(get_libdir) |
23 |
append-ldflags -L"${EPREFIX}"/usr/$(get_libdir) |
24 |
# fix compilation on some 64-bits Linux hosts, #381163, #473520 |
25 |
- for hostlibdir in /usr/lib32 /usr/lib64 /usr/lib /lib32 /lib64; do |
26 |
- [[ -d ${hostlibdir} ]] || continue |
27 |
- append-ldflags -L${hostlibdir} |
28 |
- done |
29 |
+ if use amd64-linux ; then |
30 |
+ for hostlibdir in /usr/lib32 /usr/lib64 /usr/lib /lib32 /lib64; do |
31 |
+ [[ -d ${hostlibdir} ]] || continue |
32 |
+ append-ldflags -L${hostlibdir} |
33 |
+ done |
34 |
+ fi |
35 |
# Have to move $(CPPFLAGS) to before $(CFLAGS) to ensure that |
36 |
# local include paths - set in $(CPPFLAGS) - are searched first. |
37 |
sed -i -e "/^PY_CFLAGS[ \\t]*=/s,\\\$(CFLAGS)[ \\t]*\\\$(CPPFLAGS),\$(CPPFLAGS) \$(CFLAGS)," Makefile.pre.in || die |
38 |
|
39 |
diff --git a/dev-lang/python/python-2.7.14.ebuild b/dev-lang/python/python-2.7.14.ebuild |
40 |
index a97995fb67..28d3cb2f0b 100644 |
41 |
--- a/dev-lang/python/python-2.7.14.ebuild |
42 |
+++ b/dev-lang/python/python-2.7.14.ebuild |
43 |
@@ -175,27 +175,27 @@ src_prepare() { |
44 |
} |
45 |
|
46 |
src_configure() { |
47 |
- # dbm module can be linked against berkdb or gdbm. |
48 |
- # Defaults to gdbm when both are enabled, #204343. |
49 |
- local disable |
50 |
- use berkdb || use gdbm || disable+=" dbm" |
51 |
- use berkdb || disable+=" _bsddb" |
52 |
- use gdbm || disable+=" gdbm" |
53 |
- use ncurses || disable+=" _curses _curses_panel" |
54 |
- use readline || disable+=" readline" |
55 |
- use sqlite || disable+=" _sqlite3" |
56 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
57 |
- use tk || disable+=" _tkinter" |
58 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
59 |
- [[ ${CHOST} == *64-apple-darwin* ]] && disable+=" Nav _Qt" # Carbon |
60 |
- [[ ${CHOST} == *-apple-darwin11 ]] && disable+=" _Fm _Qd _Qdoffs" |
61 |
- export PYTHON_DISABLE_MODULES="${disable}" |
62 |
- |
63 |
- if ! use xml; then |
64 |
- ewarn "You have configured Python without XML support." |
65 |
- ewarn "This is NOT a recommended configuration as you" |
66 |
- ewarn "may face problems parsing any XML documents." |
67 |
- fi |
68 |
+ # dbm module can be linked against berkdb or gdbm. |
69 |
+ # Defaults to gdbm when both are enabled, #204343. |
70 |
+ local disable |
71 |
+ use berkdb || use gdbm || disable+=" dbm" |
72 |
+ use berkdb || disable+=" _bsddb" |
73 |
+ use gdbm || disable+=" gdbm" |
74 |
+ use ncurses || disable+=" _curses _curses_panel" |
75 |
+ use readline || disable+=" readline" |
76 |
+ use sqlite || disable+=" _sqlite3" |
77 |
+ use ssl || export PYTHON_DISABLE_SSL="1" |
78 |
+ use tk || disable+=" _tkinter" |
79 |
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
80 |
+ [[ ${CHOST} == *64-apple-darwin* ]] && disable+=" Nav _Qt" # Carbon |
81 |
+ [[ ${CHOST} == *-apple-darwin11 ]] && disable+=" _Fm _Qd _Qdoffs" |
82 |
+ export PYTHON_DISABLE_MODULES="${disable}" |
83 |
+ |
84 |
+ if ! use xml; then |
85 |
+ ewarn "You have configured Python without XML support." |
86 |
+ ewarn "This is NOT a recommended configuration as you" |
87 |
+ ewarn "may face problems parsing any XML documents." |
88 |
+ fi |
89 |
|
90 |
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
91 |
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
92 |
@@ -228,7 +228,6 @@ src_configure() { |
93 |
replace-flags -Os -O3 # comment #14 |
94 |
fi |
95 |
|
96 |
- |
97 |
if use prefix ; then |
98 |
# for Python's setup.py not to do false assumptions (only looking in |
99 |
# host paths) we need to make explicit where Prefix stuff is |
100 |
@@ -236,10 +235,12 @@ src_configure() { |
101 |
append-ldflags -L"${EPREFIX}"/$(get_libdir) |
102 |
append-ldflags -L"${EPREFIX}"/usr/$(get_libdir) |
103 |
# fix compilation on some 64-bits Linux hosts, #381163, #473520 |
104 |
- for hostlibdir in /usr/lib32 /usr/lib64 /usr/lib /lib32 /lib64; do |
105 |
- [[ -d ${hostlibdir} ]] || continue |
106 |
- append-ldflags -L${hostlibdir} |
107 |
- done |
108 |
+ if use amd64-linux ; then |
109 |
+ for hostlibdir in /usr/lib32 /usr/lib64 /usr/lib /lib32 /lib64; do |
110 |
+ [[ -d ${hostlibdir} ]] || continue |
111 |
+ append-ldflags -L${hostlibdir} |
112 |
+ done |
113 |
+ fi |
114 |
# Have to move $(CPPFLAGS) to before $(CFLAGS) to ensure that |
115 |
# local include paths - set in $(CPPFLAGS) - are searched first. |
116 |
sed -i -e "/^PY_CFLAGS[ \\t]*=/s,\\\$(CFLAGS)[ \\t]*\\\$(CPPFLAGS),\$(CPPFLAGS) \$(CFLAGS)," Makefile.pre.in || die |