summaryrefslogtreecommitdiff
path: root/dev-lang/python
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/python')
-rw-r--r--dev-lang/python/Manifest6
-rw-r--r--dev-lang/python/python-3.10.13.ebuild125
-rw-r--r--dev-lang/python/python-3.11.5.ebuild127
-rw-r--r--dev-lang/python/python-3.12.0_rc2_p1-r1.ebuild126
4 files changed, 197 insertions, 187 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 14a0e4e38c2d..bd38e598552d 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -26,12 +26,12 @@ DIST python-gentoo-patches-3.12.0rc2_p1.tar.xz 5168 BLAKE2B 399ad4854c46e0a2bdc7
DIST python-gentoo-patches-3.8.18.tar.xz 32424 BLAKE2B 2e0b6e1c8e3df666934ba283214ca1577b01140dea00513f6420b0255650002e4bc4cb142076620227cd430bc2547123fd392883285886e543ef72ca466f8ea6 SHA512 b005f1054b726fc8c82a50b006309de64fb7858fe5c22cc7b160687d059a7859ec9388706b74a0e6c1f42301bed071dc639eb8cfae0d7c5eef2f565c63cc2d29
DIST python-gentoo-patches-3.9.18.tar.xz 25044 BLAKE2B 1d9ace5c5a0f1c15bc23595cc51d64b4c2b416552cdaaa960c3e34360aba3e7029a06e2a077212c68fa7aee4fd20f649a3b0926bd4ebb10e529e8350ab051e63 SHA512 bc180c3346dfae60a7db221d114146ee83409bc42092171eb05c83de528bf5f0e5654d1441f40ba839d0a98e866a5b43452fb7a72047c837497620a12097b8f5
EBUILD python-2.7.18_p16-r1.ebuild 8603 BLAKE2B 13c654aad809e8f999fa36e63f4a4eec5c2804644fab92c6f1a5c8ef75b20bde8509c34358e32350d7ddcbf8a309b9c5c008a9f9ab83c7d208434bd7efab0467 SHA512 88de339a316876a5a71560842cd879ba96b522f7dc4e409e6a22109639a538cb38abdc1a3d6c8ef468476841d1fe6014327197e8e2b0dd2d357ecde34bf8993a
-EBUILD python-3.10.13.ebuild 14267 BLAKE2B 29a9748bd5327f24b24e90757c0df208ae866b5e89bb3a40ea3f4e6283a4881a711cf7671909854bccb97c2e3d4e31dc5ece845a23e1fbc42bb1f76a55d220c9 SHA512 03929a07b1043d76ec35bc2fd240a348d4d16bbb35d0db91c07f04182f52ef7d5e36bdd823b5be4c5630436257c26c689ab40deab3700343f5e21a4342b9a040
-EBUILD python-3.11.5.ebuild 15166 BLAKE2B 11dfe68e7911d2a714ed05641489b4cee8826ef66af711588a672a6131c775a4c1bbef6b14a39d67001cda905b77894d7a4b390ea62bb1bbf0a6681509e493dc SHA512 6b41984295b463cd07b40d657aac00de49cff44a765680cbde716c1ba399f2fc41d4aea815d556279a57d0a6401efb9757cbd5cd6c26e49c5e949425747a3c96
+EBUILD python-3.10.13.ebuild 14215 BLAKE2B acf158b6f1120937cefb007a0eb8d85347206e8659694bfb21a440006556ecd9e75dd499873430083ca2f7181aecdf6b9944c3975d69aef9f9f9433ee6d46f0d SHA512 998608cb321174ea4e66ce60738db66cc0d2a9d2af499272818eafd857afba86aa7b95a1604d97b60ce6d19ffd10e156e5d7b9f607cd604e0bf379beed091c8a
+EBUILD python-3.11.5.ebuild 15113 BLAKE2B 798ec18287d66c76fdcb7a711475cb7a3b8bd46c5c2f49601f0ee8cafa660cc64ea1d44655a6348c794220658622d35a7ce11bad87e6cb86d12e22e1fab0b391 SHA512 a659bd88ac8e0da070ed97003e22738321485c056a15c0f87b6e572a18cfcf988d10d02c8a011abf8a7a11a3fc228aaeaae1aee600f739f413279730c6060717
EBUILD python-3.12.0_beta4_p2.ebuild 15038 BLAKE2B f228f611b0294effb0f8fda97c48c1c322c224feea5d3e1e71e55bf1335085d266e0858c88f5be407eede13df39e6b1f920e017c7dca2257f4f12eb60ea7590c SHA512 78c08885e6b8dfd25e88abbaafdbc4d0c73594945852fd7e124dce3521dc09ee959d9a1d2e23222c63bb5b7aec2b925a74c0b1650649775e87b3afbec037cfd9
EBUILD python-3.12.0_rc1_p5.ebuild 15037 BLAKE2B 0a12685727c7b54f442e6f5bad91a7f154b6c00efb9784516109add90f69fc0b975a5c797148bba1a30385b982e8448b6fc1bfb4d2fef16c6bf76e6349ef0169 SHA512 b683086fab83c08f6667656d133703c4941d1fdf6569c84951a66437f59d335b7ad727ce1e6b5cdf91c2d429eba84e13658b4831b4cc75f0c14126be446b3e41
EBUILD python-3.12.0_rc1_p6.ebuild 15037 BLAKE2B 0a12685727c7b54f442e6f5bad91a7f154b6c00efb9784516109add90f69fc0b975a5c797148bba1a30385b982e8448b6fc1bfb4d2fef16c6bf76e6349ef0169 SHA512 b683086fab83c08f6667656d133703c4941d1fdf6569c84951a66437f59d335b7ad727ce1e6b5cdf91c2d429eba84e13658b4831b4cc75f0c14126be446b3e41
-EBUILD python-3.12.0_rc2_p1-r1.ebuild 14658 BLAKE2B 847cd395de911f9eb3a20aeb3deb0e50348594db1ca10866fe4ba70eef355fe55f1c159cf3a9d5c5312323895b43e2f7aea7c11ccb29b914b3c4892534d4077b SHA512 b7dd2b0f33d67f8233d3dac8c0f1b60ffe05701fd152024a23f37f56c66eee93ed86561af5dd20956658b28065857ffd9d2042a7b83f3a835cf97171e0c54def
+EBUILD python-3.12.0_rc2_p1-r1.ebuild 14681 BLAKE2B 9cdf429936b069e99782907e013fe94f4c80253103b30266a42cd1c74a4f0844f83f92cc679cba0199e99c4e5935d866fd9a5e39b90077bb1bf420f1fd8287cb SHA512 d179af9d4244b450177f6f1053c0650998c4d41ebd7b8d99f3d417e1354e4290dfdc0b2e57bf22d3be7e14963408fcaf4a4a34c9aef6652701e1aa6074bb622b
EBUILD python-3.12.0_rc2_p1.ebuild 15064 BLAKE2B 757229ebd88aaae7397a28ae19e2998efb23332aa4155da8b84153ccc12a6f489b1122409661fd765593a56f1e7e3a87320acd018d2697f949b3210110398474 SHA512 a7421e7d9d70f92f5ff84917d79d6eaec046de54d7ddeb671238f29b7743edd071cb5d2d570fafd6f29d3e3961a52546802fe105ade6abb2cb9887d6457e305e
EBUILD python-3.8.18.ebuild 12365 BLAKE2B f186fea669f32e250e044d575690418ba81dc0f9389c9c1c61a91ce09261277028042a80daefdc5b4946d88fbf4ea159d68896d27d1d981502f8a32fb76b010d SHA512 4b7cc3ab54d43c0eebfa72b3e7b41755d391b6d9076fd56a155dd28b18f8e8c5d67a6472d03913e1b766f030152ae158e40edab1dc2a4a6c9f8251d7e44fc8c9
EBUILD python-3.9.18.ebuild 13866 BLAKE2B 06ebd3752ef075f85633b74c8237537bdc551de1e6fa20ffe5a914cedfd5186678b4e9bd3d5e46539607c317e18f3e03e671a19ffb065767a7d32811d9c543fe SHA512 886622cf89cc87ad7490a94775e01d02305953be1caf3de5c771fb7d926db33a69961c1048428f8c07dde7670d1be05dbd81822cc50ad348ad07a5ebfb005deb
diff --git a/dev-lang/python/python-3.10.13.ebuild b/dev-lang/python/python-3.10.13.ebuild
index 67085bcef06b..7c9b6e88f370 100644
--- a/dev-lang/python/python-3.10.13.ebuild
+++ b/dev-lang/python/python-3.10.13.ebuild
@@ -132,6 +132,69 @@ src_prepare() {
eautoreconf
}
+build_cbuild_python() {
+ # 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
+ #
+ # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
+ local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
+ local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
+ local -x CFLAGS= LDFLAGS=
+ local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
+ local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
+
+ # We need to build our own Python on CBUILD first, and feed it in.
+ # bug #847910 and bug #864911.
+ local myeconfargs_cbuild=(
+ "${myeconfargs[@]}"
+
+ --prefix="${BROOT}"/usr
+ --libdir="${cbuild_libdir:2}"
+
+ # Avoid needing to load the right libpython.so.
+ --disable-shared
+
+ # As minimal as possible for the mini CBUILD Python
+ # we build just for cross.
+ --without-lto
+ --disable-optimizations
+ )
+
+ mkdir "${WORKDIR}"/${P}-${CBUILD} || die
+ pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
+ # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
+ # libdir correctly for cross.
+ 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
+ MODULE_NIS=disabled
+ MODULE__DBM=disabled
+ MODULE__GDBM=disabled
+ MODULE__DBM=disabled
+ MODULE__SQLITE3=disabled
+ MODULE__HASHLIB=disabled
+ MODULE__SSL=disabled
+ MODULE__CURSES=disabled
+ MODULE__CURSES_PANEL=disabled
+ MODULE_READLINE=disabled
+ MODULE__TKINTER=disabled
+ MODULE_PYEXPAT=disabled
+ MODULE_ZLIB=disabled
+ EOF
+
+ # Unfortunately, we do have to build this immediately, and
+ # not in src_compile, because CHOST configure for Python
+ # will check the existence of the Python it was pointed to
+ # immediately.
+ PYTHON_DISABLE_MODULES+=" _ctypes _crypt" emake
+ popd &> /dev/null || die
+}
+
src_configure() {
# disable automagic bluetooth headers detection
if ! use bluetooth; then
@@ -243,70 +306,10 @@ 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
- #
- # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
- local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
- local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
- local -x CFLAGS= LDFLAGS=
- local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
- local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
-
- # We need to build our own Python on CBUILD first, and feed it in.
- # bug #847910 and bug #864911.
- local myeconfargs_cbuild=(
- "${myeconfargs[@]}"
-
- --prefix="${BROOT}"/usr
- --libdir="${cbuild_libdir:2}"
-
- # Avoid needing to load the right libpython.so.
- --disable-shared
-
- # As minimal as possible for the mini CBUILD Python
- # we build just for cross.
- --without-lto
- --disable-optimizations
- )
-
+ build_cbuild_python
# Point the imminent CHOST build to the Python we just
# built for CBUILD.
export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}"
-
- mkdir "${WORKDIR}"/${P}-${CBUILD} || die
- pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
- # 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
- MODULE_NIS=disabled
- MODULE__DBM=disabled
- MODULE__GDBM=disabled
- MODULE__DBM=disabled
- MODULE__SQLITE3=disabled
- MODULE__HASHLIB=disabled
- MODULE__SSL=disabled
- MODULE__CURSES=disabled
- MODULE__CURSES_PANEL=disabled
- MODULE_READLINE=disabled
- MODULE__TKINTER=disabled
- MODULE_PYEXPAT=disabled
- MODULE_ZLIB=disabled
- EOF
-
- # Unfortunately, we do have to build this immediately, and
- # not in src_compile, because CHOST configure for Python
- # will check the existence of the Python it was pointed to
- # immediately.
- PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake
- popd &> /dev/null || die
fi
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
diff --git a/dev-lang/python/python-3.11.5.ebuild b/dev-lang/python/python-3.11.5.ebuild
index df3980352b02..1740b9d96079 100644
--- a/dev-lang/python/python-3.11.5.ebuild
+++ b/dev-lang/python/python-3.11.5.ebuild
@@ -137,6 +137,70 @@ src_prepare() {
eautoreconf
}
+build_cbuild_python() {
+ # 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
+ #
+ # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
+ local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
+ local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
+ local -x CFLAGS= LDFLAGS=
+ local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
+ local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
+
+ # We need to build our own Python on CBUILD first, and feed it in.
+ # bug #847910
+ local myeconfargs_cbuild=(
+ "${myeconfargs[@]}"
+
+ --prefix="${BROOT}"/usr
+ --libdir="${cbuild_libdir:2}"
+
+ # Avoid needing to load the right libpython.so.
+ --disable-shared
+
+ # As minimal as possible for the mini CBUILD Python
+ # we build just for cross to satisfy --with-build-python.
+ --without-lto
+ --without-readline
+ --disable-optimizations
+ )
+
+ mkdir "${WORKDIR}"/${P}-${CBUILD} || die
+ pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
+ # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
+ # libdir correctly for cross.
+ 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
+ MODULE_NIS_STATE=disabled
+ MODULE__DBM_STATE=disabled
+ MODULE__GDBM_STATE=disabled
+ MODULE__DBM_STATE=disabled
+ MODULE__SQLITE3_STATE=disabled
+ MODULE__HASHLIB_STATE=disabled
+ MODULE__SSL_STATE=disabled
+ MODULE__CURSES_STATE=disabled
+ MODULE__CURSES_PANEL_STATE=disabled
+ MODULE_READLINE_STATE=disabled
+ MODULE__TKINTER_STATE=disabled
+ MODULE_PYEXPAT_STATE=disabled
+ MODULE_ZLIB_STATE=disabled
+ EOF
+
+ # Unfortunately, we do have to build this immediately, and
+ # not in src_compile, because CHOST configure for Python
+ # will check the existence of the --with-build-python value
+ # immediately.
+ PYTHON_DISABLE_MODULES+=" _ctypes _crypt" emake
+ popd &> /dev/null || die
+}
+
src_configure() {
local disable
# disable automagic bluetooth headers detection
@@ -232,73 +296,12 @@ 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
- #
- # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
- local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
- local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
- local -x CFLAGS= LDFLAGS=
- local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
- local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
-
- # We need to build our own Python on CBUILD first, and feed it in.
- # bug #847910
- local myeconfargs_cbuild=(
- "${myeconfargs[@]}"
-
- --prefix="${BROOT}"/usr
- --libdir="${cbuild_libdir:2}"
-
- # Avoid needing to load the right libpython.so.
- --disable-shared
-
- # As minimal as possible for the mini CBUILD Python
- # we build just for cross to satisfy --with-build-python.
- --without-lto
- --without-readline
- --disable-optimizations
- )
-
+ build_cbuild_python
myeconfargs+=(
# Point the imminent CHOST build to the Python we just
# built for CBUILD.
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
)
-
- mkdir "${WORKDIR}"/${P}-${CBUILD} || die
- pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
- # 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
- MODULE_NIS_STATE=disabled
- MODULE__DBM_STATE=disabled
- MODULE__GDBM_STATE=disabled
- MODULE__DBM_STATE=disabled
- MODULE__SQLITE3_STATE=disabled
- MODULE__HASHLIB_STATE=disabled
- MODULE__SSL_STATE=disabled
- MODULE__CURSES_STATE=disabled
- MODULE__CURSES_PANEL_STATE=disabled
- MODULE_READLINE_STATE=disabled
- MODULE__TKINTER_STATE=disabled
- MODULE_PYEXPAT_STATE=disabled
- MODULE_ZLIB_STATE=disabled
- EOF
-
- # Unfortunately, we do have to build this immediately, and
- # not in src_compile, because CHOST configure for Python
- # will check the existence of the --with-build-python value
- # immediately.
- PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake
- popd &> /dev/null || die
fi
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
diff --git a/dev-lang/python/python-3.12.0_rc2_p1-r1.ebuild b/dev-lang/python/python-3.12.0_rc2_p1-r1.ebuild
index 07d09f165320..1a53a9eb0e9f 100644
--- a/dev-lang/python/python-3.12.0_rc2_p1-r1.ebuild
+++ b/dev-lang/python/python-3.12.0_rc2_p1-r1.ebuild
@@ -137,6 +137,70 @@ src_prepare() {
eautoreconf
}
+build_cbuild_python() {
+ # 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
+ #
+ # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
+ local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
+ local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
+ local -x CFLAGS= LDFLAGS=
+ local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
+ local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
+
+ # We need to build our own Python on CBUILD first, and feed it in.
+ # bug #847910
+ local myeconfargs_cbuild=(
+ "${myeconfargs[@]}"
+
+ --prefix="${BROOT}"/usr
+ --libdir="${cbuild_libdir:2}"
+
+ # Avoid needing to load the right libpython.so.
+ --disable-shared
+
+ # As minimal as possible for the mini CBUILD Python
+ # we build just for cross to satisfy --with-build-python.
+ --without-lto
+ --without-readline
+ --disable-optimizations
+ )
+
+ mkdir "${WORKDIR}"/${P}-${CBUILD} || die
+ pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
+
+ # Avoid as many dependencies as possible for the cross build.
+ mkdir Modules || die
+ cat > Modules/Setup.local <<-EOF || die
+ *disabled*
+ nis
+ _dbm _gdbm
+ _sqlite3
+ _hashlib _ssl
+ _curses _curses_panel
+ readline
+ _tkinter
+ pyexpat
+ zlib
+ # We disabled these for CBUILD because Python's setup.py can't handle locating
+ # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
+ # and uncommented if needed.
+ #_ctypes _crypt
+ EOF
+
+ ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
+
+ # Unfortunately, we do have to build this immediately, and
+ # not in src_compile, because CHOST configure for Python
+ # will check the existence of the --with-build-python value
+ # immediately.
+ emake
+ popd &> /dev/null || die
+}
+
src_configure() {
local disable
# disable automagic bluetooth headers detection
@@ -243,72 +307,12 @@ 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
- #
- # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
- local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
- local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
- local -x CFLAGS= LDFLAGS=
- local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
- local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
-
- # We need to build our own Python on CBUILD first, and feed it in.
- # bug #847910
- local myeconfargs_cbuild=(
- "${myeconfargs[@]}"
-
- --libdir="${cbuild_libdir:2}"
-
- # Avoid needing to load the right libpython.so.
- --disable-shared
-
- # As minimal as possible for the mini CBUILD Python
- # we build just for cross to satisfy --with-build-python.
- --without-lto
- --without-readline
- --disable-optimizations
- )
-
+ build_cbuild_python
myeconfargs+=(
# Point the imminent CHOST build to the Python we just
# built for CBUILD.
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
)
-
- mkdir "${WORKDIR}"/${P}-${CBUILD} || die
- pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes _crypt
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # Unfortunately, we do have to build this immediately, and
- # not in src_compile, because CHOST configure for Python
- # will check the existence of the --with-build-python value
- # immediately.
- emake
- popd &> /dev/null || die
fi
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get