summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-03-24 21:44:08 +0100
committerFabian Groffen <grobian@gentoo.org>2019-03-24 21:44:08 +0100
commit0c456196ac923b86e82d3a6a76cff689e3f83257 (patch)
treea5735c1f89794a7e3689627e0f30d1ce4caf4350
parentmedia-libs/libdv: align with gx86 (diff)
downloadprefix-0c456196ac923b86e82d3a6a76cff689e3f83257.tar.gz
prefix-0c456196ac923b86e82d3a6a76cff689e3f83257.tar.bz2
prefix-0c456196ac923b86e82d3a6a76cff689e3f83257.zip
dev-lang/python: fix compilation when not upgrading on Darwin
python-2.7.16 changed to build in-tree, which on case-insensitive filesystems causes a clash, resulting in a build-failure. restore the out-of-tree building again so we can bootstrap on Darwin (failure observed with latesttree on powerpc-apple-darwin9/20190323) Package-Manager: Portage-2.3.62-prefix, Repoman-2.3.12 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r--dev-lang/python/python-2.7.16.ebuild14
1 files changed, 12 insertions, 2 deletions
diff --git a/dev-lang/python/python-2.7.16.ebuild b/dev-lang/python/python-2.7.16.ebuild
index 6d65eb7c60..0fef25c421 100644
--- a/dev-lang/python/python-2.7.16.ebuild
+++ b/dev-lang/python/python-2.7.16.ebuild
@@ -300,6 +300,12 @@ src_configure() {
--without-ensurepip
)
+ # we need to build in a separate dir to avoid problems due to
+ # case-insensitivity on Darwin
+ BUILD_DIR="${WORKDIR}/${CHOST}"
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
OPT= econf "${myeconfargs[@]}"
if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
@@ -313,6 +319,7 @@ src_compile() {
# Avoid invoking pgen for cross-compiles.
touch Include/graminit.h Python/graminit.c
+ cd "${BUILD_DIR}" || die
emake
# Work around bug 329499. See also bug 413751 and 457194.
@@ -330,6 +337,8 @@ src_test() {
return
fi
+ cd "${BUILD_DIR}" || die
+
# Skip failing tests.
local skipped_tests="distutils gdb"
@@ -370,6 +379,7 @@ src_test() {
src_install() {
local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
+ cd "${BUILD_DIR}" || die
[[ ${CHOST} == *-mint* ]] && keepdir /usr/lib/python${SLOT}/lib-dynload/
if use aqua ; then
local fwdir="${EPREFIX}"/usr/$(get_libdir)/Python.framework
@@ -388,7 +398,7 @@ src_install() {
rmdir "${ED}"/Applications/Python* || die
rmdir "${ED}"/Applications || die
- # avoid framework incompatability, degrade to a normal UNIX lib
+ # avoid framework incompatibility, degrade to a normal UNIX lib
mkdir -p "${ED}"/usr/$(get_libdir)
cp "${D}${fwdir}"/Versions/${SLOT}/Python \
"${ED}"/usr/$(get_libdir)/libpython${SLOT}.dylib || die
@@ -536,7 +546,7 @@ EOF
# http://bugs.python.org/issue1759169
[[ ${CHOST} == *-solaris* ]] && sed -i -e \
's:^\(^#define \(_POSIX_C_SOURCE\|_XOPEN_SOURCE\|_XOPEN_SOURCE_EXTENDED\).*$\):/* \1 */:' \
- "${ED}"/usr/include/python${SLOT}/pyconfig.h
+ "${ED}"/usr/include/python${SLOT}/pyconfig.h
use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die