From 50098d976449286058396cebad0087e28f771b90 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 13 Dec 2022 15:27:30 +0000 Subject: gentoo auto-resync : 13:12:2022 - 15:27:30 --- dev-lang/Manifest.gz | Bin 19487 -> 19484 bytes dev-lang/lazarus/Manifest | 2 +- dev-lang/lazarus/metadata.xml | 4 - dev-lang/python/Manifest | 2 +- dev-lang/python/python-3.12.0_alpha3-r1.ebuild | 505 +++++++++++++++++++++++++ dev-lang/python/python-3.12.0_alpha3.ebuild | 501 ------------------------ 6 files changed, 507 insertions(+), 507 deletions(-) create mode 100644 dev-lang/python/python-3.12.0_alpha3-r1.ebuild delete mode 100644 dev-lang/python/python-3.12.0_alpha3.ebuild (limited to 'dev-lang') diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz index 54766ee7d460..1685b998de6d 100644 Binary files a/dev-lang/Manifest.gz and b/dev-lang/Manifest.gz differ diff --git a/dev-lang/lazarus/Manifest b/dev-lang/lazarus/Manifest index 90d9c3893e9e..5481f6c32e38 100644 --- a/dev-lang/lazarus/Manifest +++ b/dev-lang/lazarus/Manifest @@ -5,4 +5,4 @@ DIST lazarus-2.2.4-0.tar.gz 77272959 BLAKE2B 2d7b2872a7399eb1a3a7d9fb20fed209900 EBUILD lazarus-2.0.12.ebuild 2667 BLAKE2B d6e1a545dd5a90f61b2f447205bdfb325f7a10e26f79891dd8fb229f76933f437277aba252253b123313ebc3189440d8b82bd1e794873e127c0f543ad514e1b8 SHA512 479430f9b6f5b15cb1fac203fe9d133706d2a01bc9020b23f35d1a5935dbf1bf116e2e9095b7e4175cad964f91def11cbfbb5f3daa21c0b3c47c834d4195643f EBUILD lazarus-2.2.0.ebuild 2413 BLAKE2B f09dee3695b75dd6c59ff54b3358c7674a445d0476cce66ca0efb30331a66eaaa5596184913a798d9ceb6b95df1f428f206c6d886dd3fd0900df3de43a2494ba SHA512 5e2090fad65e9ad74679010c704643ec290a63f022711b5b454f6c564ae38758d501aaa3045e4a794e9fdb6a5afa1b694bcbc932ca3d0174fcaa22b628924a2f EBUILD lazarus-2.2.4.ebuild 2702 BLAKE2B e95ff12b0f7a46a0f50f02fe935169d0e259bd1f5f1e52e86d28076dd0926900745b254329807622f673914e2759213941e3cfd3daaca2d4a31c8f794a7a2c2a SHA512 c23e0dd788aafaac24871a919e546c8ca974d16cafdb8ff68833b5ce2b69e23600459ba9d461d35633780dd39929b33e978d431788469f577d5efad70c219cc9 -MISC metadata.xml 838 BLAKE2B 28f142e14aec433e45bdd99d5b139488aaeff7680a1cc8ad9d66f9de9f8aa73a8e867c16082e935305018b1766c1fcfc658c66ecfb0cd3ae78125336c6fa774b SHA512 fe67d4e5776479fbf1f56ae6a51031ecc11db7545b0947c72fd9147e47dde4f696d1f9c4b522326991addfe6d553e2ff829159ac77ff38d22ef02868ee13b39a +MISC metadata.xml 705 BLAKE2B 7f8f2abfba78c25b044ebdf621c76bf3027e24dc3dcf8d7b9085f96b8728b77a41dab1596bd24533fa263ac357c23027005baa818436524dcc7f6f57973ec433 SHA512 24b7e63cda2b01714b3790a3f55fcc70e54186ecf9f98bd45d659361b5280280aee643d1737efffbcd0e14ee9e30c1379bb4bfd7382b5b6613b18ce7fea70146 diff --git a/dev-lang/lazarus/metadata.xml b/dev-lang/lazarus/metadata.xml index e7fb1364df58..f2a8edc62b9f 100644 --- a/dev-lang/lazarus/metadata.xml +++ b/dev-lang/lazarus/metadata.xml @@ -8,10 +8,6 @@ voron1@gmail.com Michael Corvinus - - proxy-maint@gentoo.org - Proxy Maintainers - Don't build extra packages from the bigide component Build GUI IDE. diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 8c6b90065960..a50c197335d5 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -21,7 +21,7 @@ DIST python-gentoo-patches-3.9.16.tar.xz 23348 BLAKE2B 26b66e57530d167776d2aee60 EBUILD python-2.7.18_p16.ebuild 8398 BLAKE2B f136256fc59c3d6808f964e647a50bf5107e9e9154ec3420de1ab8602421bc96541951ee607b4ef2c106982b2f7c280b9bb9eb86a324492c780bde5f26f0f60e SHA512 a36f0ae948b4cae1d86c3f8080cb41ba98b507ebb3a79142f79e1db25f5056b872862c2d76291a22e9eeba32cb6929aac54de5422d24b7e81f15c855012316d3 EBUILD python-3.10.9.ebuild 13466 BLAKE2B e9be692675d2cf6ea6bbee63bc77587a1c31e3eccb94d9448a286888fb9b550f6ab61250340dd052b43ba8bc1245c87fd280451110a7a89050bf88e25c54732c SHA512 4ae0505bc3ce65062ff499692093886e359532efc068ad1a87fd6346e08c331d5e6aabdb569b1ab0595ae89146b3a35125c1f4b9cfe997af515c739d4171d2a2 EBUILD python-3.11.1.ebuild 14365 BLAKE2B 503553133d937406f98ac7b93ecb7e5bef3eec2d983117a3a1fe734f07463ec46702c6cd1cb1d51ccb7fb9bba278db9ffcf5fef9d8b5071b4d05ea20a4e71a25 SHA512 0e28d7e0a4fa31a941d5417479187f98728005e4055fff36729a0bbd3da0dfe41edcfb12b167df804bb00bd815d375de6ac7c261c77f14bfcab67b657e5f615f -EBUILD python-3.12.0_alpha3.ebuild 14135 BLAKE2B 227f90a9c6f94260f411ca441ad53e7ad7cd26c955921b201dadef15642706f3c900d8ff5992e1c1edca95aee28af1549b9f63244a61c955e6dbc910f48c913c SHA512 5f4c14dc3f7d510af049314e71204b66fbfbac096574552559f37f3ab8f251fcb57668566493f4c53f7fcbbf8802843f7351b2145021543fc34e6c226c380513 +EBUILD python-3.12.0_alpha3-r1.ebuild 14261 BLAKE2B 666156ec7f0ece4c5d6d28ef6ed75f9e9e6343bb8fbe954be566204fa15e1261d0a96159c10cbbc52388f9f218cebfddb37ceabfbee1a251e865d3ede2fd39aa SHA512 1bd4373b009c84ed964bde20805268194281dd74ec95eb46dacd5e79081530cf4b0f782b002db29b27034f388f86a61c7868158e5f53e10488d5956341ae3c60 EBUILD python-3.8.16.ebuild 12005 BLAKE2B 4f9271633edd5075874f84b603db6b8db9d2e2e1f9e4948587472b0047b3d2483e5dc6b5d217c4fee2ff3d42cd69104c7cc99cc1d2706a944610465152ce2db2 SHA512 5a91bae84c6de37832fc48b314d345185945520a1c6fc8061c5ae03eac3b0f1f5692ad0dbc35027ac59317e1bccf310729245df8bd6b3b77634c3263cdb08cdb EBUILD python-3.9.16.ebuild 13264 BLAKE2B 71f8098f1e276d8c8e0a2ed80e2a214fe2500d795832ac591ec8f0f1332207d4876fe921e06b6be786a7973d79d35aa49edecd903bf361c5bd7d8d32be12b0d7 SHA512 84825ce86539366ea83f99eec0bfdaebf247d0fb54909a58d2b6072207ebd6480ba76b2c623432b1db1f5ed2098d611f92521c3eb3854a3fea83c1c0b61d52d8 MISC metadata.xml 1315 BLAKE2B eb468cc22ed763d197ee9292e5531bfad6d05123a68466fb9a1f3c3f790d3ee7e16e2fb74ce652a1dde33ed38d089fc442b629395f711f056dcda34d3058feaa SHA512 9c38f152b3ee3bb9d9f0d5640ccbb28032c9e770d0aaad266fb2758218259c28ca3f6c76542a5b79f6c20ca09ad284772ecc6c7e484d77e995ad51f418f616ec diff --git a/dev-lang/python/python-3.12.0_alpha3-r1.ebuild b/dev-lang/python/python-3.12.0_alpha3-r1.ebuild new file mode 100644 index 000000000000..9cdbb7bfcca9 --- /dev/null +++ b/dev-lang/python/python-3.12.0_alpha3-r1.ebuild @@ -0,0 +1,505 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic multiprocessing pax-utils +inherit python-utils-r1 toolchain-funcs verify-sig + +MY_PV=${PV/_alpha/a} +MY_P="Python-${MY_PV%_p*}" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-${MY_PV}" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE=" + https://www.python.org/ + https://github.com/python/cpython/ +" +SRC_URI=" + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc + ) +" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE=" + bluetooth build +ensurepip examples gdbm hardened libedit lto + +ncurses pgo +readline +sqlite +ssl test tk valgrind +" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND=" + app-arch/bzip2:= + app-arch/xz-utils:= + app-crypt/libb2 + >=dev-libs/expat-2.1:= + dev-libs/libffi:= + sys-apps/util-linux:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + ensurepip? ( dev-python/ensurepip-wheels ) + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( + !libedit? ( >=sys-libs/readline-4.1:= ) + libedit? ( dev-libs/libedit:= ) + ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) + !! /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 + # propagated to sysconfig for built extensions + local -x CFLAGS_NODIST=${CFLAGS} + local -x LDFLAGS_NODIST=${LDFLAGS} + local -x CFLAGS= LDFLAGS= + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + if use ncurses; then + append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + fi + + econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi + + # force-disable modules we don't want built + local disable_modules=( NIS ) + use gdbm || disable_modules+=( _GDBM _DBM ) + use sqlite || disable_modules+=( _SQLITE3 ) + use ssl || disable_modules+=( _HASHLIB _SSL ) + use ncurses || disable_modules+=( _CURSES _CURSES_PANEL ) + use readline || disable_modules+=( READLINE ) + use tk || disable_modules+=( _TKINTER ) + + local mod + for mod in "${disable_modules[@]}"; do + echo "MODULE_${mod}_STATE=disabled" + done >> Makefile || die + + # install epython.py as part of stdlib + echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + export PYTHONSTRICTEXTENSIONBUILD=1 + + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + addpredict "/usr/lib/python${PYVER}/site-packages" + fi + + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # this just happens to skip test_support.test_freeze that is broken + # without bundled expat + # TODO: get a proper skip for it upstream + local -x LOGNAME=buildbot + + local test_opts=( + -u-network + -j "$(makeopts_jobs)" + + # fails + -x test_gdb + ) + + if use sparc ; then + # bug #788022 + test_opts+=( + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + ) + fi + + # workaround docutils breaking tests + cat > Lib/docutils.py <<-EOF || die + raise ImportError("Thou shalt not import!") + EOF + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + # workaround https://bugs.gentoo.org/775416 + addwrite "/usr/lib/python${PYVER}/site-packages" + + nonfatal emake test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + rm Lib/docutils.py || die + + [[ ${ret} -eq 0 ]] || die "emake test failed" +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + # the Makefile rules are broken + # https://github.com/python/cpython/issues/100221 + mkdir -p "${libdir}"/lib-dynload || die + + # -j1 hack for now for bug #843458 + emake -j1 DESTDIR="${D}" altinstall + + # Fix collisions between different slots of Python. + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die + + # Cheap hack to get version with ABIFLAGS + local abiver=$(cd "${ED}/usr/include"; echo python*) + if [[ ${abiver} != python${PYVER} ]]; then + # Replace python3.X with a symlink to python3.Xm + rm "${ED}/usr/bin/python${PYVER}" || die + dosym "${abiver}" "/usr/bin/python${PYVER}" + # Create python3.X-config symlink + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" + # Create python-3.5m.pc symlink + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" + fi + + # python seems to get rebuilt in src_install (bug 569908) + # Work around it for now. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E "${ED}/usr/bin/${abiver}" + else + pax-mark m "${ED}/usr/bin/${abiver}" + fi + + rm -r "${libdir}"/ensurepip/_bundled || die + if ! use ensurepip; then + rm -r "${libdir}"/ensurepip || die + fi + if ! use sqlite; then + rm -r "${libdir}/"sqlite3 || die + fi + if ! use tk; then + rm -r "${ED}/usr/bin/idle${PYVER}" || die + rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die + fi + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$( + printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | + emake --no-print-directory -s -f - 2>/dev/null + ) + newins Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} + +pkg_postinst() { + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test "${v}" -lt 3.11.0_beta4-r2; then + ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files" + ewarn "installed previously are no longer valid and will be regenerated" + ewarn "(or ignored) on the next import. This may cause sandbox failures" + ewarn "when installing some packages and checksum mismatches when removing" + ewarn "old versions. To actively prevent this, rebuild all packages" + ewarn "installing Python 3.11 modules, e.g. using:" + ewarn + ewarn " emerge -1v /usr/lib/python3.11/site-packages" + fi + done +} diff --git a/dev-lang/python/python-3.12.0_alpha3.ebuild b/dev-lang/python/python-3.12.0_alpha3.ebuild deleted file mode 100644 index 6a277535661c..000000000000 --- a/dev-lang/python/python-3.12.0_alpha3.ebuild +++ /dev/null @@ -1,501 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic multiprocessing pax-utils -inherit python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_alpha/a} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE=" - bluetooth build +ensurepip examples gdbm hardened libedit lto - +ncurses pgo +readline +sqlite +ssl test tk valgrind -" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - app-crypt/libb2 - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - sys-apps/util-linux:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-wheels ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !libedit? ( >=sys-libs/readline-4.1:= ) - libedit? ( dev-libs/libedit:= ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - !! /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 - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # force-disable modules we don't want built - local disable_modules=( NIS ) - use gdbm || disable_modules+=( _GDBM _DBM ) - use sqlite || disable_modules+=( _SQLITE3 ) - use ssl || disable_modules+=( _HASHLIB _SSL ) - use ncurses || disable_modules+=( _CURSES _CURSES_PANEL ) - use readline || disable_modules+=( READLINE ) - use tk || disable_modules+=( _TKINTER ) - - local mod - for mod in "${disable_modules[@]}"; do - echo "MODULE_${mod}_STATE=disabled" - done >> Makefile || die - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - export PYTHONSTRICTEXTENSIONBUILD=1 - - # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't - # end up writing bytecode & violating sandbox. - # bug #831897 - local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - addpredict "/usr/lib/python${PYVER}/site-packages" - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Restore saved value from above. - local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # this just happens to skip test_support.test_freeze that is broken - # without bundled expat - # TODO: get a proper skip for it upstream - local -x LOGNAME=buildbot - - local test_opts=( - -u-network - -j "$(makeopts_jobs)" - - # fails - -x test_gdb - ) - - if use sparc ; then - # bug #788022 - test_opts+=( - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - ) - fi - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite "/usr/lib/python${PYVER}/site-packages" - - nonfatal emake test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - # -j1 hack for now for bug #843458 - emake -j1 DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"sqlite3 || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3.11.0_beta4-r2; then - ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files" - ewarn "installed previously are no longer valid and will be regenerated" - ewarn "(or ignored) on the next import. This may cause sandbox failures" - ewarn "when installing some packages and checksum mismatches when removing" - ewarn "old versions. To actively prevent this, rebuild all packages" - ewarn "installing Python 3.11 modules, e.g. using:" - ewarn - ewarn " emerge -1v /usr/lib/python3.11/site-packages" - fi - done -} -- cgit v1.2.3