diff options
Diffstat (limited to 'dev-lang/python/python-3.8.15_p3.ebuild')
-rw-r--r-- | dev-lang/python/python-3.8.15_p3.ebuild | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/dev-lang/python/python-3.8.15_p3.ebuild b/dev-lang/python/python-3.8.15_p3.ebuild index 5f5bccbf6686..39a9badeb2d6 100644 --- a/dev-lang/python/python-3.8.15_p3.ebuild +++ b/dev-lang/python/python-3.8.15_p3.ebuild @@ -184,6 +184,9 @@ src_configure() { local -x OPT= if tc-is-cross-compiler ; then + # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 + local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get # propagated to sysconfig for built extensions local -x CFLAGS_NODIST=${CFLAGS_FOR_BUILD} @@ -195,6 +198,8 @@ src_configure() { local myeconfargs_cbuild=( "${myeconfargs[@]}" + --libdir="${cbuild_libdir:2}" + # As minimal as possible for the mini CBUILD Python # we build just for cross. --without-lto @@ -207,7 +212,10 @@ src_configure() { mkdir "${WORKDIR}"/${P}-${CBUILD} || die pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. + PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \ + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" # Avoid as many dependencies as possible for the cross build. cat >> Makefile <<-EOF || die @@ -230,7 +238,7 @@ src_configure() { # not in src_compile, because CHOST configure for Python # will check the existence of the Python it was pointed to # immediately. - emake + PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake popd &> /dev/null || die fi |