Lines 19-25
Link Here
|
19 |
LICENSE="PSF-2.2" |
19 |
LICENSE="PSF-2.2" |
20 |
SLOT="2.5" |
20 |
SLOT="2.5" |
21 |
PYTHON_ABI="${SLOT}" |
21 |
PYTHON_ABI="${SLOT}" |
22 |
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" |
22 |
KEYWORDS="~ppc-aix ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
23 |
IUSE="-berkdb build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" |
23 |
IUSE="-berkdb build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" |
24 |
|
24 |
|
25 |
# NOTE: dev-python/{elementtree,celementtree,pysqlite,ctypes} |
25 |
# NOTE: dev-python/{elementtree,celementtree,pysqlite,ctypes} |
Lines 80-85
Link Here
|
80 |
rm "${WORKDIR}/${PV}"/*_all_crosscompile.patch |
80 |
rm "${WORKDIR}/${PV}"/*_all_crosscompile.patch |
81 |
fi |
81 |
fi |
82 |
|
82 |
|
|
|
83 |
# hardcoding GNU specifics breaks platforms not using GNU binutils |
84 |
case $($(tc-getAS) --noexecstack -v 2>&1 </dev/null) in |
85 |
*"GNU Binutils"*) # GNU as with noexecstack support |
86 |
: |
87 |
;; |
88 |
*) |
89 |
EPATCH_EXCLUDE=07_all_ctypes_execstack.patch |
90 |
;; |
91 |
esac |
83 |
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}" |
92 |
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}" |
84 |
|
93 |
|
85 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
94 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
Lines 100-105
Link Here
|
100 |
rm Lib/distutils/command/wininst-*.exe |
109 |
rm Lib/distutils/command/wininst-*.exe |
101 |
fi |
110 |
fi |
102 |
|
111 |
|
|
|
112 |
# build static for mint |
113 |
[[ ${CHOST} == *-mint* ]] && epatch "${FILESDIR}"/${PN}-2.5.1-mint.patch |
114 |
|
115 |
epatch "${FILESDIR}"/${PN}-2.4.4-darwin-fsf-gcc.patch |
116 |
epatch "${FILESDIR}"/${PN}-2.5.1-darwin-bundle.patch |
117 |
epatch "${FILESDIR}"/${PN}-2.5.1-darwin-libpython2.5.patch |
118 |
# to build libpython.dylib, we need -fno-common, which python doesn't use, |
119 |
# and to have _NSGetEnviron being used, which by default it isn't... |
120 |
[[ ${CHOST} == *-darwin* ]] && \ |
121 |
append-flags -fno-common -DWITH_NEXT_FRAMEWORK |
122 |
|
123 |
use prefix && epatch "${FILESDIR}"/${PN}-2.5.1-no-usrlocal.patch |
124 |
|
125 |
epatch "${FILESDIR}"/${PN}-2.5.1-darwin-gcc-version.patch |
126 |
|
127 |
# set RUNSHARED for 'regen' in Lib/plat-* |
128 |
epatch "${FILESDIR}"/${PN}-2.5.1-platdir-runshared.patch |
129 |
|
130 |
epatch "${FILESDIR}"/${PN}-2.5.1-hpux-ldshared.patch |
131 |
epatch "${FILESDIR}"/${PN}-2.4.4-ld_so_aix-which.patch |
132 |
epatch "${FILESDIR}"/${PN}-2.5.1-aix-ldshared.patch |
133 |
epatch "${FILESDIR}"/${PN}-2.5.1-no-hardcoded-grep.patch |
134 |
epatch "${FILESDIR}"/${P}-irix.patch |
135 |
epatch "${FILESDIR}"/${PN}-2.5.1-distutils-aixnfs.patch |
136 |
epatch "${FILESDIR}"/${PN}-2.5.4-disable-sunaudiodev-bsddb185.patch |
137 |
epatch "${FILESDIR}"/${PN}-2.6.2-solaris64-crypt.patch |
138 |
epatch "${FILESDIR}"/${PN}-2.6.4-netpacket-solaris.patch |
139 |
|
140 |
# patch to make python behave nice with interix. There is one part |
141 |
# maybe affecting other x86-platforms, thus conditional. |
142 |
if [[ ${CHOST} == *-interix* ]] ; then |
143 |
epatch "${FILESDIR}"/${PN}-2.5.1-interix.patch |
144 |
# this one could be applied unconditionally, but to keep it |
145 |
# clean, I do it together with the conditional one. |
146 |
epatch "${FILESDIR}"/${PN}-2.5.1-interix-sleep.patch |
147 |
fi |
148 |
|
103 |
eautoreconf |
149 |
eautoreconf |
104 |
} |
150 |
} |
105 |
|
151 |
|
Lines 134-139
Link Here
|
134 |
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
180 |
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
135 |
fi |
181 |
fi |
136 |
|
182 |
|
|
|
183 |
[[ ${CHOST} == *-interix* ]] && export ac_cv_func_poll=no |
184 |
[[ ${CHOST} == *-mint* ]] && export ac_cv_func_poll=no |
185 |
|
137 |
if [[ "$(gcc-major-version)" -ge 4 ]]; then |
186 |
if [[ "$(gcc-major-version)" -ge 4 ]]; then |
138 |
append-flags -fwrapv |
187 |
append-flags -fwrapv |
139 |
fi |
188 |
fi |
Lines 171-176
Link Here
|
171 |
# Please query BSD team before removing this! |
220 |
# Please query BSD team before removing this! |
172 |
append-ldflags "-L." |
221 |
append-ldflags "-L." |
173 |
|
222 |
|
|
|
223 |
# python defaults to use 'cc_r' on aix |
224 |
[[ ${CHOST} == *-aix* ]] && myconf="${myconf} --with-gcc=$(tc-getCC)" |
225 |
# http://bugs.python.org/issue4026 |
226 |
if [[ ${CHOST} == *-aix6* ]]; then |
227 |
sed -i -e 's:-lm :-lm -lbsd :' Modules/ld_so_aix || die "sed failure" |
228 |
fi |
229 |
|
174 |
econf \ |
230 |
econf \ |
175 |
--with-fpectl \ |
231 |
--with-fpectl \ |
176 |
--enable-shared \ |
232 |
--enable-shared \ |
Lines 186-191
Link Here
|
186 |
src_compile() { |
242 |
src_compile() { |
187 |
src_configure |
243 |
src_configure |
188 |
emake || die "emake failed" |
244 |
emake || die "emake failed" |
|
|
245 |
if [[ ${CHOST} == *-darwin* ]] ; then |
246 |
# create libpython on Darwin |
247 |
emake libpython2.5.dylib || die |
248 |
fi |
189 |
} |
249 |
} |
190 |
|
250 |
|
191 |
src_test() { |
251 |
src_test() { |
Lines 231-257
Link Here
|
231 |
} |
291 |
} |
232 |
|
292 |
|
233 |
src_install() { |
293 |
src_install() { |
|
|
294 |
[[ ${CHOST} == *-mint* ]] && keepdir /usr/lib/python${PYVER}/lib-dynload/ |
234 |
emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed" |
295 |
emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed" |
235 |
|
296 |
|
236 |
mv "${D}usr/bin/python${SLOT}-config" "${D}usr/bin/python-config-${SLOT}" |
297 |
mv "${ED}usr/bin/python${SLOT}-config" "${ED}usr/bin/python-config-${SLOT}" |
237 |
|
298 |
|
238 |
# Fix collisions between different slots of Python. |
299 |
# Fix collisions between different slots of Python. |
239 |
mv "${D}usr/bin/pydoc" "${D}usr/bin/pydoc${SLOT}" |
300 |
mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" |
240 |
mv "${D}usr/bin/idle" "${D}usr/bin/idle${SLOT}" |
301 |
mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" |
241 |
mv "${D}usr/share/man/man1/python.1" "${D}usr/share/man/man1/python${SLOT}.1" |
302 |
mv "${ED}usr/share/man/man1/python.1" "${ED}usr/share/man/man1/python${SLOT}.1" |
242 |
rm -f "${D}usr/bin/smtpd.py" |
303 |
rm -f "${ED}usr/bin/smtpd.py" |
243 |
|
304 |
|
244 |
# Fix the OPT variable so that it doesn't have any flags listed in it. |
305 |
# Fix the OPT variable so that it doesn't have any flags listed in it. |
245 |
# Prevents the problem with compiling things with conflicting flags later. |
306 |
# Prevents the problem with compiling things with conflicting flags later. |
246 |
sed -e "s:^OPT=.*:OPT=\t\t-DNDEBUG:" -i "${D}$(python_get_libdir)/config/Makefile" |
307 |
sed -e "s:^OPT=.*:OPT=\t\t-DNDEBUG:" -i "${ED}$(python_get_libdir)/config/Makefile" |
247 |
|
308 |
|
248 |
if use build; then |
309 |
if use build ; then |
249 |
rm -fr "${D}usr/bin/idle${SLOT}" "${D}$(python_get_libdir)/"{bsddb,idlelib,lib-tk,sqlite3,test} |
310 |
rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{bsddb,idlelib,lib-tk,sqlite3,test} |
250 |
else |
311 |
else |
251 |
use elibc_uclibc && rm -fr "${D}$(python_get_libdir)/"{bsddb/test,test} |
312 |
use elibc_uclibc && rm -fr "${ED}$(python_get_libdir)/"{bsddb/test,test} |
252 |
use berkdb || rm -fr "${D}$(python_get_libdir)/"{bsddb,test/test_bsddb*} |
313 |
use berkdb || rm -fr "${ED}$(python_get_libdir)/"{bsddb,test/test_bsddb*} |
253 |
use sqlite || rm -fr "${D}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} |
314 |
use sqlite || rm -fr "${ED}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} |
254 |
use tk || rm -fr "${D}usr/bin/idle${SLOT}" "${D}$(python_get_libdir)/"{idlelib,lib-tk} |
315 |
use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,lib-tk} |
255 |
fi |
316 |
fi |
256 |
|
317 |
|
257 |
prep_ml_includes $(python_get_includedir) |
318 |
prep_ml_includes $(python_get_includedir) |