summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-lang/python/Manifest8
-rw-r--r--dev-lang/python/python-3.8.7_p2.ebuild387
-rw-r--r--dev-lang/python/python-3.8.8_p1-r1.ebuild (renamed from dev-lang/python/python-3.8.8_p1.ebuild)6
-rw-r--r--dev-lang/python/python-3.9.1_p2.ebuild389
-rw-r--r--dev-lang/python/python-3.9.3.ebuild406
-rw-r--r--dev-lang/python/python-3.9.6_p1-r1.ebuild (renamed from dev-lang/python/python-3.9.6_p1.ebuild)6
-rw-r--r--dev-libs/libgcrypt/Manifest1
-rw-r--r--dev-libs/libgcrypt/files/libgcrypt-1.6.1-uscore.patch26
-rw-r--r--dev-libs/libgcrypt/files/libgcrypt-multilib-syspath.patch23
-rw-r--r--dev-libs/libgcrypt/libgcrypt-1.8.7.ebuild82
-rw-r--r--dev-libs/libgcrypt/metadata.xml15
-rw-r--r--dev-libs/libintl/Manifest4
-rw-r--r--dev-libs/libintl/files/0.19.3-localename.patch168
-rw-r--r--dev-libs/libintl/files/0.19.8.1-hide-newlocale.patch31
-rw-r--r--dev-libs/libintl/files/0.19.8.1-winnt.patch11
-rw-r--r--dev-libs/libintl/files/libintl-0.19.5-langinfo.patch35
-rw-r--r--dev-libs/libintl/libintl-0.19.6.ebuild74
-rw-r--r--dev-libs/libintl/libintl-0.19.7.ebuild79
-rw-r--r--dev-libs/libintl/libintl-0.19.8.1.ebuild80
-rw-r--r--dev-libs/libintl/libintl-0.21.ebuild80
-rw-r--r--dev-libs/libintl/metadata.xml8
-rw-r--r--dev-libs/openssl/Manifest5
-rwxr-xr-xdev-libs/openssl/files/gentoo.config-1.0.2184
-rw-r--r--dev-libs/openssl/files/openssl-0.9.8g-engines-installnames.patch14
-rw-r--r--dev-libs/openssl/files/openssl-1.0.0b-darwin-bundle-compile-fix.patch52
-rw-r--r--dev-libs/openssl/files/openssl-1.0.2-gethostbyname2-solaris.patch18
-rw-r--r--dev-libs/openssl/files/openssl-1.0.2l-winnt.patch31
-rw-r--r--dev-libs/openssl/files/openssl-1.1.0j-parallel_install_fix.patch21
-rw-r--r--dev-libs/openssl/files/openssl-1.1.1i-riscv32.patch61
-rw-r--r--dev-libs/openssl/metadata.xml26
-rw-r--r--dev-libs/openssl/openssl-1.0.2u.ebuild321
-rw-r--r--dev-libs/openssl/openssl-1.1.1k.ebuild341
-rw-r--r--eclass/autotools.eclass38
-rw-r--r--eclass/java-utils-2.eclass35
-rw-r--r--eclass/python-utils-r1.eclass138
-rwxr-xr-xscripts/auto-bootstraps/analyse_result.py27
-rwxr-xr-xscripts/bootstrap-prefix.sh158
-rw-r--r--sys-apps/coreutils/Manifest1
-rw-r--r--sys-apps/coreutils/coreutils-9.0-r2.ebuild251
-rw-r--r--sys-apps/coreutils/files/coreutils-9.0-fix-chmod-symlink-exit.patch35
-rw-r--r--sys-apps/help2man/Manifest1
-rw-r--r--sys-apps/help2man/files/help2man-1.48.5-cygwin.patch167
-rw-r--r--sys-apps/help2man/help2man-1.48.5.ebuild44
-rw-r--r--sys-apps/portage/Manifest3
-rw-r--r--sys-apps/portage/files/portage-3.0.30-ebuildshell.patch349
-rw-r--r--sys-apps/portage/files/portage-3.0.30-prefix-stack.patch81
-rw-r--r--sys-apps/portage/portage-3.0.14.ebuild298
-rw-r--r--sys-apps/portage/portage-3.0.21.ebuild41
-rw-r--r--sys-apps/portage/portage-3.0.30.1.ebuild (renamed from sys-apps/portage/portage-3.0.18.ebuild)45
-rw-r--r--sys-devel/gcc/Manifest2
-rw-r--r--sys-devel/gcc/files/gcc-10.3.0-monterey.patch80
-rw-r--r--sys-devel/gcc/files/gcc-11-illumnos-o_directory.patch65
-rw-r--r--sys-devel/gcc/gcc-10.3.0-r2.ebuild2
-rw-r--r--sys-devel/gcc/gcc-11.2.0.ebuild118
-rw-r--r--sys-devel/gcc/gcc-11_pre20210226.ebuild3
55 files changed, 1527 insertions, 3448 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 13cb36defe..c5e846887a 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -1,20 +1,12 @@
DIST Python-2.7.16.tar.xz 12752104 BLAKE2B 7d6b5b853f9974d44e04dd35ecdffaab87511e183b4b01dd4f8f4ee109c4b4ab208f045708f69717be9d3a706aa078b71438ed482c062c0b89c12730eae074ae SHA512 16e814e8dcffc707b595ca2919bd2fa3db0d15794c63d977364652c4a5b92e90e72b8c9e1cc83b5020398bd90a1b397dbdd7cb931c49f1aa4af6ef95414b43e0
-DIST Python-3.8.7.tar.xz 18261096 BLAKE2B 6ac20efef41e828cb796aabcb7808400d494b9b48759950c8c15ee90762394f6763163d8e37ab407c1c79ebb9cda09189eaa969a75f96c86a96ccee962443924 SHA512 6a27d8eab3076930df46b0cf127f9b664f8d4147349b2b98132f464deb7f69d87e0167e8ee8e6c64249125ad73760d965ecbc81c252b63a1e7aac95594c62b74
DIST Python-3.8.8.tar.xz 18271736 BLAKE2B af0ff1acd919b365a58278e82678324ff884cc8120bcaf12e0e3afb1bd978e6469e256335df131935f51ff481fb83dda04e4b6f1cd1746611f9ec944db73d692 SHA512 64181db5aa48281284a3230436ebfb8cb91b645a9dec956fd48c0048334498477073fc4e14d6b426d0ef7fbcdcfd5d59cbf01a504e6c9014dc9529494b9309fb
DIST Python-3.8.8.tar.xz.asc 833 BLAKE2B a11188f9f68c518259de1a4e271bf56409d7356a7eb3dd8cbea7bbb0b5bc1b43f9aeb85bda4add65bbae906bef65cb20a30bcc77da04c0d383cd5b527821fd85 SHA512 0e6f11a310c1796dd056d9a4b63b5e03aa8dbd290088966e04a590a78c00003887dbfd7a7029a6cf8c5626ecd6ca91c1c16433bb0a41bf1225b02b8db8541b95
-DIST Python-3.9.1.tar.xz 18897104 BLAKE2B bcbce176510e8e7c6ba6070588bedc52121c21c5271f59b3d629dfb542c51ee62622b2ca53a6e2041f1a51b2d089368cc4de9bb749e8ebad9a2c4eb4de83538e SHA512 b90029d6825751685983e9dcf0e0ec9e46f18e6c7d37b0dd7a245a94316f8c0090308ad7c2b2b49ed2514b0b909177231dd5bcad03031bf4624e37136fcf8019
-DIST Python-3.9.3.tar.xz 18899676 BLAKE2B c879fc55e7e654413fbcddb4d032cf10b061c39a273428cdf281a7bf3505ce6de885cc38f73095b02f20126f551d18f94662893d71be01b0da40768d5beaf427 SHA512 420b07c272b8da4b97f6edc21c3b51ef8ee1fffd291eebb032991ec2da4fc40ace3e9b608d7cea0c43ad3716792640c508e84a807c29cfa5a40f89d294f7b0ab
-DIST Python-3.9.3.tar.xz.asc 833 BLAKE2B 04ad005c7a41e02478659e65cce79053e962144f2bb3d47ca798a3478cc72ca162d0e199a8d96fe681079456e6553dd76323235c727954e1e3e04e97c3549c6b SHA512 6cc9fc77450a8d3781b24c13163f813f32e177bc70163a0f42949353b559a296a79e4da7b45d63928285f7d852021bcdcede885909235532ee9128468788d6c9
DIST Python-3.9.6.tar.xz 19051972 BLAKE2B 0d8586b2935088eeab7138cf2210c1a74f1bf7359359d25750af5f69de55eb39c92f518b887a8b749c772ed7d33e85b912928ae6d878514eb58d85ef210f54f0 SHA512 01c529e3207738d8771caeb5ed6217e10745c21aa39832fe3185e1c87fdb6aedead97ce38dbb11e02d873654028bd8071c3f345c18452769520723284efe9dc1
DIST Python-3.9.6.tar.xz.asc 833 BLAKE2B 41901bfb80a901f2f14e86769e6d08ded8f75656d347201345183162e180e61442da871a1067572a54da579551166a19bf5436e51581bb10cb78afc4d28773fc SHA512 0673c8833f302c829bfde97453c52744f6aa99b4a72520f4cc384d4aa9d6ffd28a1407ceafb0a1ec4462b3aa74b656bf39c67872c4e6a131429ea58c47ad0ecc
DIST python-gentoo-patches-2.7.16.tar.xz 13904 BLAKE2B 218b46f8656f4a792dcd47eabca6d59a1558276b77676544991ee75914cd76dda84c36f43e72e477b850dd4cb52374d289f20dccd244a3b52ae5debaf3363432 SHA512 83f90545231c663a34c6925352a357a2b15997ac0362578a1893304c5070b5251922585ae8bc1bafb68d306bcddd4cdba4b6406648d473bd3e980eef65fe3ecd
-DIST python-gentoo-patches-3.8.7_p2.tar.xz 17708 BLAKE2B 495a24e0496be246d2beddfaaa8886049197ca5973dadccfcd26b3b2237e4b06b85f0e4d418db411d055ca3d0c1173e03dd5a62e29f64c133e8da6261b17c99b SHA512 c06f2fc1fe48be010e8230ac3d474b9c8386bba8f762dbe35d128ad63eaa1a4c2a5a991ec6044564331d0dec4f248a71e37959ebe666b0693d6ed41f460a67f7
DIST python-gentoo-patches-3.8.8_p1.tar.xz 15456 BLAKE2B 7d9f55f951f97ef7e08d0245dddd21f5b8d126735c1c392ba6326ad1c18023b477f62e9b6663d8e5b6f0362e442137d0b6ed3ea13b279cca6734d36dbe6e654f SHA512 7fff74d03a0c4cd4b5c977761179c2b9a0ed472847ee9544f54331cef7549557ac4d6b78e676058bd2b01c96ca59d84f04c55beca8ddc45f16b11ce349210eea
-DIST python-gentoo-patches-3.9.1_p2.tar.xz 15556 BLAKE2B 5e265ef8edee70694d73c6df6eb908a747be34e1e89b900d2470d41e7e043d179408bc643a52ade6e54e61a210ee8850d02a2cb452a9336f3973345c1d027158 SHA512 eabfd304b39975258705f5e9b238f709196ce0cbd3803f157dc77d864631a3eea380084a3a4de180e3ba7e92239608ae369e810f8066c0f1ff9fa251bbc1816c
-DIST python-gentoo-patches-3.9.3.tar.xz 8820 BLAKE2B e46d910e4f427ea4cd4f912c5e2864140137c9414998a30fcf79509c231003a55ed480a5fd3eaccb6281f54c0a4f4a6ef76502761c91e37947b17a7a80bb5a94 SHA512 2e4204ca273b6ff0e3b97a73d018bf262c08c40f7e94b7b99fbff5299a799bb806f1410b0ca960efc6f2001e098954ea8b55e604bce451b2ccacd691ffcbe9ce
DIST python-gentoo-patches-3.9.6_p1.tar.xz 12764 BLAKE2B 927718f1aadb5d5ef67e647a639a10bffdd48474bf01e50bd37ef1242bce57606b7b54c4823c1da3585ee76e737028163e38e9b4e19037585cc53f925e1c5fa7 SHA512 f06fb55786bd942e72e3225ee9ce218724aeee29f301279743588749007e991851a8f29db5b5dfd85435e3d763c00942947909a6fc60581bd0f3e8a6e913bff8
DIST python-prefix-2.7.16-gentoo-patches-r0.tar.xz 14636 BLAKE2B 54320f5197bb7adeca1e7c97447253e6535a11f380b6d66bc2ce46fa671fe23697aced8fd5619633a00e3ea19ae9dbc3ffe2981173d83dcab6b447d514555c43 SHA512 5380d9b92eb81603ec4d60ff9c940a3a061c06bd6f593d5837e600da5d4417b529d20d98d758aa95cef18fac10bdb5c33f90fa943deb15fdaf048492cf286581
DIST python-prefix-gentoo-3.8.7-patches-r2.tar.xz 8312 BLAKE2B 268f3cff62dc51d4f91994c3f6b05cea0e29edb1ccf39476ba52485fb94c3cad72b54ed5cd941c227bdad004a7ae0069d60ee6bbde5a30d16115263d0dc2a5c3 SHA512 e43ce1e9e851bebce968ee025f765fc9a558c8edc4ee2d51616043183fd12301ab3d5c7f92915238e53b5cf92f6c00617ab0fcf9859d4cebe0966271e6f64725
-DIST python-prefix-gentoo-3.9.1-patches-r2.tar.xz 6996 BLAKE2B 5de68537998c19d19cc1b2f630da73da3e70a88581c010028107cb7c9571c821637388022ab7659bd20992a8cf683199af22863cc5af25eb1030e2a5956e156d SHA512 c3d6998b3a00fb4bf7f84fe5fa6788b3f725120a73991075e7feb5762ff0186e27bfb455354365f3b84844ec28876792bf11baf124776a1ea3375ed2d0e1882e
DIST python-prefix-gentoo-3.9.6_p1-patches-r0.tar.xz 6984 BLAKE2B 8b032d3000fd2dfcb8e099ac071c1a911ba2a0e30343788f7191043800f9d0088307cd7007b2b3f6cc7d2f315fc22bbac5990fed81f0dd8d60dca0314bd59b88 SHA512 76c56895c99ee203bd266f475766d2572659939abaf478932e7c9c65ddc52cb5e012e23c9455dd0a4bf0281a07c70e23a2fea8337c693b8a4ac8abb534e21982
DIST python2-cygwinports-7be648659ef46f33db6913ca0ca5a809219d5629.zip 9199 BLAKE2B 85803bc1677bd16650cb5fc4a2c54fdac0228326f25cfba4fcd098ac9d689312d3e0dde6fca57f720d5235361d6462461cf018325c23fda9139e0f1683055aff SHA512 cabc21d2d7379daf1f4bafe7ab00b70e5b4f707d3102496b96ff0dfdced26347097ad771c69e0b9488b7c54b1ef36f9bc019bee72f1ffcbb55dcd0e71095edfe
diff --git a/dev-lang/python/python-3.8.7_p2.ebuild b/dev-lang/python/python-3.8.7_p2.ebuild
deleted file mode 100644
index 462873fb58..0000000000
--- a/dev-lang/python/python-3.8.7_p2.ebuild
+++ /dev/null
@@ -1,387 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic multiprocessing pax-utils \
- python-utils-r1 toolchain-funcs
-
-MY_P="Python-${PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${PV}"
-PREFIX_PATCHSET="python-prefix-gentoo-${PV%_p*}-patches-r2"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- https://dev.gentoo.org/~grobian/distfiles/${PREFIX_PATCHSET}.tar.xz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="aqua bluetooth build examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl test tk wininst +xml"
-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:=
- dev-libs/libffi:=
- kernel_linux? ( sys-apps/util-linux:= )
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- gdbm? ( sys-libs/gdbm:=[berkdb] )
- ncurses? ( >=sys-libs/ncurses-5.2:= )
- readline? ( >=sys-libs/readline-4.1:= )
- sqlite? ( >=dev-db/sqlite-3.3.8:3= )
- ssl? ( dev-libs/openssl:= )
- tk? (
- >=dev-lang/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )
- virtual/pkgconfig
- !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- # Prefix' round of patches
- "${WORKDIR}"/${PREFIX_PATCHSET}
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- # workaround a problem on ppc-macos with >=GCC-8 where dtoa gets
- # miscompiled when optimisation is being used
- if [[ ${CHOST} == powerpc*-darwin* ]] && \
- tc-is-gcc && [[ $(gcc-major-version) -ge 8 ]] ;
- then
- sed -i \
- -e '/^CFLAGS_ALIASING=/s/$/ -fno-tree-ter/' Makefile.pre.in || die
- fi
-
- # Darwin 9's kqueue seems to act up (at least at this stage), so
- # make Python's selectors resort to poll() or select()
- if [[ ${CHOST} == powerpc*-darwin9 ]] ; then
- sed -i \
- -e 's/KQUEUE/KQUEUE_DISABLED/' \
- configure.ac configure || die
- fi
-
- # Python doesn't know about arm64-macos yet
- if [[ ${CHOST} == arm64-*-darwin* ]] ; then
- # Teach Python a new trick (arm64)
- sed -i \
- -e "/Unexpected output of 'arch' on OSX/d" \
- configure.ac configure || die
- fi
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- if [[ "$(gcc-major-version)" -ge 4 ]]; then
- append-flags -fwrapv
- fi
-
- filter-flags -malign-double
-
- # https://bugs.gentoo.org/show_bug.cgi?id=50309
- if is-flagq -O3; then
- is-flagq -fstack-protector-all && replace-flags -O3 -O2
- use hardened && replace-flags -O3 -O2
- fi
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Set LDFLAGS so we link modules with -lpython3.2 correctly.
- # Needed on FreeBSD unless Python 3.2 is already installed.
- # Please query BSD team before removing this!
- append-ldflags "-L."
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
- use prefix && append-ldflags -L"${ESYSROOT}"/lib -L"${ESYSROOT}"/usr/lib
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- if use aqua ; then
- ECONF_SOURCE="${S}" OPT="" \
- econf \
- --enable-framework="${EPREFIX}" \
- --config-cache
- fi
-
- # flock on 32-bits sparc Solaris is broken
- [[ ${CHOST} == sparc-*-solaris* ]] && \
- export ac_cv_flock_decl=no
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- # except on non-glibc systems this breaks the build, so be
- # conservative!
- $(use elibc_glibc && echo ac_cv_header_stropts_h=no)
-
- $(use aqua && echo --config-cache)
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # 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
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local result=$?
-
- for test in ${skipped_tests}; do
- mv "${T}/test_${test}.py" "${S}"/Lib/test
- done
-
- elog "The following tests have been skipped:"
- for test in ${skipped_tests}; do
- elog "test_${test}.py"
- done
-
- elog "If you would like to run them, you may:"
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- if use aqua ; then
- # avoid config.status to be triggered
- find Mac -name "Makefile" -exec touch \{\} + || die
-
- # Python_Launcher is kind of a wrapper, and we should fix it for
- # Prefix (it uses /usr/bin/pythonw) so useless
- # IDLE doesn't run, no idea, but definitely not used
- emake DESTDIR="${D}" -C Mac install_Python || die
- rmdir "${ED}"/Applications/Python* || die
- rmdir "${ED}"/Applications || die
-
- local fwdir=/Frameworks/Python.framework/Versions/${PYVER}
- ln -s "${EPREFIX}"/usr/include/python${PYVER} \
- "${ED}${fwdir}"/Headers || die
- ln -s "${EPREFIX}"/usr/lib/libpython${PYVER}.dylib \
- "${ED}${fwdir}"/Python || die
- fi
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm -f "${ED}/usr/$(get_libdir)/libpython3$(get_libname)" || 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
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
-
- 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
- if use aqua ; then
- # we do framework, so the emake trick below returns a pathname
- # since that won't work here, use a (cheap) trick instead
- local libname=libpython${PYVER}
- else
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
- emake --no-print-directory -s -f - 2>/dev/null)
- fi
- newins "${S}"/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"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python$(sed -n '/BUILDEXE=/s/^.*=\s\+//p' Makefile)
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- local -x DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${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
-}
diff --git a/dev-lang/python/python-3.8.8_p1.ebuild b/dev-lang/python/python-3.8.8_p1-r1.ebuild
index 0dde20dafe..046cbbc700 100644
--- a/dev-lang/python/python-3.8.8_p1.ebuild
+++ b/dev-lang/python/python-3.8.8_p1-r1.ebuild
@@ -37,6 +37,7 @@ RESTRICT="!test? ( test )"
RDEPEND="app-arch/bzip2:=
app-arch/xz-utils:=
dev-libs/libffi:=
+ dev-lang/python-exec[python_targets_python3_8(-)]
kernel_linux? ( sys-apps/util-linux:= )
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
@@ -60,7 +61,7 @@ DEPEND="${RDEPEND}
BDEPEND="
virtual/pkgconfig
sys-devel/autoconf-archive
- verify-sig? ( app-crypt/openpgp-keys-python )
+ verify-sig? ( sec-keys/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]"
PDEPEND="app-eselect/eselect-python"
RDEPEND+=" !build? ( app-misc/mime-types )"
@@ -228,6 +229,9 @@ src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
+ # Prevent using distutils bundled by setuptools.
+ # https://bugs.gentoo.org/823728
+ export SETUPTOOLS_USE_DISTUTILS=stdlib
emake CPPFLAGS= CFLAGS= LDFLAGS=
diff --git a/dev-lang/python/python-3.9.1_p2.ebuild b/dev-lang/python/python-3.9.1_p2.ebuild
deleted file mode 100644
index e3f0b02d15..0000000000
--- a/dev-lang/python/python-3.9.1_p2.ebuild
+++ /dev/null
@@ -1,389 +0,0 @@
-# Copyright 1999-2021 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 \
- python-utils-r1 toolchain-funcs
-
-MY_P="Python-${PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${PV}"
-PREFIX_PATCHSET="python-prefix-gentoo-${PV%_p*}-patches-r2"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- https://dev.gentoo.org/~grobian/distfiles/${PREFIX_PATCHSET}.tar.xz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="aqua bluetooth build examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl test tk +xml"
-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:=
- dev-libs/libffi:=
- kernel_linux? ( sys-apps/util-linux:= )
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- gdbm? ( sys-libs/gdbm:=[berkdb] )
- ncurses? ( >=sys-libs/ncurses-5.2:= )
- readline? ( >=sys-libs/readline-4.1:= )
- sqlite? ( >=dev-db/sqlite-3.3.8:3= )
- ssl? ( dev-libs/openssl:= )
- tk? (
- >=dev-lang/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )
- virtual/pkgconfig
- !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND=">=app-eselect/eselect-python-20140125-r1"
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- # Prefix' round of patches
- "${WORKDIR}"/${PREFIX_PATCHSET}
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- # workaround a problem on ppc-macos with >=GCC-8 where dtoa gets
- # miscompiled when optimisation is being used
- if [[ ${CHOST} == powerpc*-darwin* ]] && \
- tc-is-gcc && [[ $(gcc-major-version) -ge 8 ]] ;
- then
- sed -i \
- -e '/^CFLAGS_ALIASING=/s/$/ -fno-tree-ter/' Makefile.pre.in || die
- fi
-
- # Darwin 9's kqueue seems to act up (at least at this stage), so
- # make Python's selectors resort to poll() or select()
- if [[ ${CHOST} == powerpc*-darwin9 ]] ; then
- sed -i \
- -e 's/KQUEUE/KQUEUE_DISABLED/' \
- configure.ac configure || die
- fi
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- if [[ "$(gcc-major-version)" -ge 4 ]]; then
- append-flags -fwrapv
- fi
-
- filter-flags -malign-double
-
- # https://bugs.gentoo.org/show_bug.cgi?id=50309
- if is-flagq -O3; then
- is-flagq -fstack-protector-all && replace-flags -O3 -O2
- use hardened && replace-flags -O3 -O2
- fi
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Set LDFLAGS so we link modules with -lpython3.2 correctly.
- # Needed on FreeBSD unless Python 3.2 is already installed.
- # Please query BSD team before removing this!
- append-ldflags "-L."
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
- use prefix && append-ldflags -L"${ESYSROOT}"/lib -L"${ESYSROOT}"/usr/lib
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- if use aqua ; then
- ECONF_SOURCE="${S}" OPT="" \
- econf \
- --enable-framework="${EPREFIX}" \
- --config-cache
- fi
-
- # flock on 32-bits sparc Solaris is broken
- [[ ${CHOST} == sparc-*-solaris* ]] && \
- export ac_cv_flock_decl=no
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- # except on non-glibc systems this breaks the build, so be
- # conservative!
- $(use elibc_glibc && echo ac_cv_header_stropts_h=no)
-
- $(use aqua && echo --config-cache)
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # 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
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local result=$?
-
- for test in ${skipped_tests}; do
- mv "${T}/test_${test}.py" "${S}"/Lib/test
- done
-
- elog "The following tests have been skipped:"
- for test in ${skipped_tests}; do
- elog "test_${test}.py"
- done
-
- elog "If you would like to run them, you may:"
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- if use aqua ; then
- # avoid config.status to be triggered
- find Mac -name "Makefile" -exec touch \{\} + || die
-
- # Python_Launcher is kind of a wrapper, and we should fix it for
- # Prefix (it uses /usr/bin/pythonw) so useless
- # IDLE doesn't run, no idea, but definitely not used
- emake DESTDIR="${D}" -C Mac install_Python || die
- rmdir "${ED}"/Applications/Python* || die
- rmdir "${ED}"/Applications || die
-
- local fwdir=/Frameworks/Python.framework/Versions/${PYVER}
- ln -s "${EPREFIX}"/usr/include/python${PYVER} \
- "${ED}${fwdir}"/Headers || die
- ln -s "${EPREFIX}"/usr/lib/libpython${PYVER}.dylib \
- "${ED}${fwdir}"/Python || die
- fi
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm -f "${ED}/usr/$(get_libdir)/libpython3$(get_libname)" || 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
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- 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
- if use aqua ; then
- # we do framework, so the emake trick below returns a pathname
- # since that won't work here, use a (cheap) trick instead
- local libname=libpython${PYVER}
- else
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
- emake --no-print-directory -s -f - 2>/dev/null)
- fi
- newins "${S}"/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"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python$(sed -n '/BUILDEXE=/s/^.*=\s\+//p' Makefile)
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- local -x DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${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
-}
diff --git a/dev-lang/python/python-3.9.3.ebuild b/dev-lang/python/python-3.9.3.ebuild
deleted file mode 100644
index 94dabce063..0000000000
--- a/dev-lang/python/python-3.9.3.ebuild
+++ /dev/null
@@ -1,406 +0,0 @@
-# Copyright 1999-2021 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 \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-PREFIX_PATCHSET="python-prefix-gentoo-3.9.1-patches-r2"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- https://dev.gentoo.org/~grobian/distfiles/${PREFIX_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="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="aqua bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml"
-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:=
- dev-libs/libffi:=
- kernel_linux? ( sys-apps/util-linux:= )
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- gdbm? ( sys-libs/gdbm:=[berkdb] )
- ncurses? ( >=sys-libs/ncurses-5.2:= )
- readline? ( >=sys-libs/readline-4.1:= )
- sqlite? ( >=dev-db/sqlite-3.3.8:3= )
- ssl? ( dev-libs/openssl:= )
- tk? (
- >=dev-lang/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )"
-BDEPEND="
- virtual/pkgconfig
- sys-devel/autoconf-archive
- verify-sig? ( app-crypt/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND="app-eselect/eselect-python"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat || die
- rm -fr Modules/_ctypes/libffi* || die
- rm -fr Modules/zlib || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- # Prefix' round of patches
- "${WORKDIR}"/${PREFIX_PATCHSET}
- )
-
- default
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # force correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- # workaround a problem on ppc-macos with >=GCC-8 where dtoa gets
- # miscompiled when optimisation is being used
- if [[ ${CHOST} == powerpc*-darwin* ]] && \
- tc-is-gcc && [[ $(gcc-major-version) -ge 8 ]] ;
- then
- sed -i \
- -e '/^CFLAGS_ALIASING=/s/$/ -fno-tree-ter/' Makefile.pre.in || die
- fi
-
- # Darwin 9's kqueue seems to act up (at least at this stage), so
- # make Python's selectors resort to poll() or select()
- if [[ ${CHOST} == powerpc*-darwin9 ]] ; then
- sed -i \
- -e 's/KQUEUE/KQUEUE_DISABLED/' \
- configure.ac configure || die
- fi
-
- eautoreconf
-}
-
-src_configure() {
- local disable
- # disable automagic bluetooth headers detection
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- if [[ "$(gcc-major-version)" -ge 4 ]]; then
- append-flags -fwrapv
- fi
-
- filter-flags -malign-double
-
- # https://bugs.gentoo.org/show_bug.cgi?id=50309
- if is-flagq -O3; then
- is-flagq -fstack-protector-all && replace-flags -O3 -O2
- use hardened && replace-flags -O3 -O2
- fi
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
- use prefix && append-ldflags -L"${ESYSROOT}"/lib -L"${ESYSROOT}"/usr/lib
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- if use aqua ; then
- ECONF_SOURCE="${S}" OPT="" \
- econf \
- --enable-framework="${EPREFIX}" \
- --config-cache
- fi
-
- # flock on 32-bits sparc Solaris is broken
- [[ ${CHOST} == sparc-*-solaris* ]] && \
- export ac_cv_flock_decl=no
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- # except on non-glibc systems this breaks the build, so be
- # conservative!
- $(use elibc_glibc && echo ac_cv_header_stropts_h=no)
-
- $(use aqua && echo --config-cache)
- --enable-shared
- $(use_enable ipv6)
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- )
-
- OPT="" 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
-}
-
-src_compile() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
-
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # 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
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local result=$?
-
- for test in ${skipped_tests}; do
- mv "${T}/test_${test}.py" "${S}"/Lib/test
- done
-
- elog "The following tests have been skipped:"
- for test in ${skipped_tests}; do
- elog "test_${test}.py"
- done
-
- elog "If you would like to run them, you may:"
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ ${result} -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- if use aqua ; then
- # avoid config.status to be triggered
- find Mac -name "Makefile" -exec touch \{\} + || die
-
- # Python_Launcher is kind of a wrapper, and we should fix it for
- # Prefix (it uses /usr/bin/pythonw) so useless
- # IDLE doesn't run, no idea, but definitely not used
- emake DESTDIR="${D}" -C Mac install_Python || die
- rmdir "${ED}"/Applications/Python* || die
- rmdir "${ED}"/Applications || die
-
- local fwdir=/Frameworks/Python.framework/Versions/${PYVER}
- ln -s "${EPREFIX}"/usr/include/python${PYVER} \
- "${ED}${fwdir}"/Headers || die
- ln -s "${EPREFIX}"/usr/lib/libpython${PYVER}.dylib \
- "${ED}${fwdir}"/Python || die
- fi
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm -f "${ED}/usr/$(get_libdir)/libpython3$(get_libname)" || 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
-
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
- 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
- if use aqua ; then
- # we do framework, so the emake trick below returns a pathname
- # since that won't work here, use a (cheap) trick instead
- local libname=libpython${PYVER}
- else
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
- emake --no-print-directory -s -f - 2>/dev/null)
- fi
- newins "${S}"/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"
-
- local -x EPYTHON=python${PYVER}
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python$(sed -n '/BUILDEXE=/s/^.*=\s\+//p' Makefile)
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
- local -x DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${PWD}
- else
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${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
-}
diff --git a/dev-lang/python/python-3.9.6_p1.ebuild b/dev-lang/python/python-3.9.6_p1-r1.ebuild
index 844cd297c2..7885b7cfcc 100644
--- a/dev-lang/python/python-3.9.6_p1.ebuild
+++ b/dev-lang/python/python-3.9.6_p1-r1.ebuild
@@ -36,6 +36,7 @@ RESTRICT="!test? ( test )"
RDEPEND="app-arch/bzip2:=
app-arch/xz-utils:=
+ dev-lang/python-exec[python_targets_python3_9(-)]
dev-libs/libffi:=
kernel_linux? ( sys-apps/util-linux:= )
>=sys-libs/zlib-1.1.3:=
@@ -60,7 +61,7 @@ DEPEND="${RDEPEND}
BDEPEND="
virtual/pkgconfig
sys-devel/autoconf-archive
- verify-sig? ( app-crypt/openpgp-keys-python )
+ verify-sig? ( sec-keys/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]"
RDEPEND+=" !build? ( app-misc/mime-types )"
@@ -235,6 +236,9 @@ src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
+ # Prevent using distutils bundled by setuptools.
+ # https://bugs.gentoo.org/823728
+ export SETUPTOOLS_USE_DISTUTILS=stdlib
emake CPPFLAGS= CFLAGS= LDFLAGS=
diff --git a/dev-libs/libgcrypt/Manifest b/dev-libs/libgcrypt/Manifest
deleted file mode 100644
index 7119883d3c..0000000000
--- a/dev-libs/libgcrypt/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libgcrypt-1.8.7.tar.bz2 2985660 BLAKE2B cb2132b826f3f3af240e6c9ac5fd992808aa17ce64144d17452591a5b1e402564af82c021b58f5fd620ebeb5894ac9654835f6d8376ec05ee41fc02189dd6825 SHA512 6309d17624d8029848990d225d5924886c951cef691266c8e010fbbb7f678972cee70cbb91d370ad0bcdc8c8761402a090c2c853c9427ec79293624a59da5060
diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.6.1-uscore.patch b/dev-libs/libgcrypt/files/libgcrypt-1.6.1-uscore.patch
deleted file mode 100644
index 22bfac3104..0000000000
--- a/dev-libs/libgcrypt/files/libgcrypt-1.6.1-uscore.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-The version taken from GnuPG 1.4 assumes any cross-compiled package have
-prefixed underscores, which is not the case; by using libtool's own macro,
-we can avoid the whole issue.
-
---- libgcrypt-1.6.1/configure.ac
-+++ libgcrypt-1.6.1/configure.ac
-@@ -1022,7 +1022,7 @@
- # Check whether underscores in symbols are required. This needs to be
- # done before setting up the assembler stuff.
- #
--GNUPG_SYS_SYMBOL_UNDERSCORE()
-+LT_SYS_SYMBOL_USCORE
-
-
- #################################
---- libgcrypt-1.6.1/mpi/config.links
-+++ libgcrypt-1.6.1/mpi/config.links
-@@ -362,7 +362,7 @@
-
- # Make sysdep.h
- echo '/* created by config.links - do not edit */' >./mpi/sysdep.h
--if test x$ac_cv_sys_symbol_underscore = xyes; then
-+if test x$sys_symbol_underscore = xyes; then
- cat <<EOF >>./mpi/sysdep.h
- #if __STDC__
- #define C_SYMBOL_NAME(name) _##name
diff --git a/dev-libs/libgcrypt/files/libgcrypt-multilib-syspath.patch b/dev-libs/libgcrypt/files/libgcrypt-multilib-syspath.patch
deleted file mode 100644
index 7859851ccc..0000000000
--- a/dev-libs/libgcrypt/files/libgcrypt-multilib-syspath.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/src/libgcrypt-config.in b/src/libgcrypt-config.in
-index c052638..4c8ddc3 100644
---- a/src/libgcrypt-config.in
-+++ b/src/libgcrypt-config.in
-@@ -154,9 +154,12 @@ if test "$echo_libs" = "yes"; then
- libs_final="$libs"
-
- # Set up `libdirs'.
-- if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/lib"; then
-- libdirs="-L$libdir"
-- fi
-+ case "$libdir" in
-+ /usr/lib|/usr/lib64|/lib|/lib64) ;;
-+ *)
-+ libdirs="-L$libdir"
-+ ;;
-+ esac
-
- # Set up `libs_final'.
- libs_final="$libs_final $gpg_error_libs"
---
-1.7.6.1
-
diff --git a/dev-libs/libgcrypt/libgcrypt-1.8.7.ebuild b/dev-libs/libgcrypt/libgcrypt-1.8.7.ebuild
deleted file mode 100644
index 9236d04075..0000000000
--- a/dev-libs/libgcrypt/libgcrypt-1.8.7.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools flag-o-matic multilib-minimal
-
-DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
-HOMEPAGE="http://www.gnupg.org/"
-SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
-
-LICENSE="LGPL-2.1 MIT"
-SLOT="0/20" # subslot = soname major version
-KEYWORDS="~x64-cygwin ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc o-flag-munging static-libs"
-
-RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}"
-BDEPEND="doc? ( virtual/texi2dvi )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.6.1-uscore.patch
- "${FILESDIR}"/${PN}-multilib-syspath.patch
-)
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/libgcrypt-config
-)
-
-src_prepare() {
- default
- # missing attribute(sysv_abi) for Cygwin?
- [[ ${CHOST} == *-cygwin* ]] && rm -f mpi/*/*.S
- # always use -no-undefined even if upstream is not convinced yet
- sed -i -e 's/^no_undefined\s*=\s*$/& -no-undefined/' src/Makefile.am || die
- eautoreconf
-}
-
-multilib_src_configure() {
- if [[ ${CHOST} == *86*-solaris* ]] ; then
- # ASM code uses GNU ELF syntax, divide in particular, we need to
- # allow this via ASFLAGS, since we don't have a flag-o-matic
- # function for that, we'll have to abuse cflags for this
- append-cflags -Wa,--divide
- fi
- local myeconfargs=(
- --enable-noexecstack
- $(use_enable o-flag-munging O-flag-munging)
- $(use_enable static-libs static)
-
- # disabled due to various applications requiring privileges
- # after libgcrypt drops them (bug #468616)
- --without-capabilities
-
- # http://trac.videolan.org/vlc/ticket/620
- # causes bus-errors on sparc64-solaris
- $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
- $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
- # no cygwin patch yet
- $([[ ${CHOST} == *-cygwin* ]] && \
- echo "gcry_cv_gcc_win64_platform_as_ok=no")
-
- GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config"
- )
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
- $("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g')
-}
-
-multilib_src_compile() {
- default
- multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
- multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
-}
-
-multilib_src_install_all() {
- default
- find "${D}" -name '*.la' -delete || die
-}
diff --git a/dev-libs/libgcrypt/metadata.xml b/dev-libs/libgcrypt/metadata.xml
deleted file mode 100644
index 9b7e9f273f..0000000000
--- a/dev-libs/libgcrypt/metadata.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>k_f@gentoo.org</email>
- <name>Kristian Fiskerstrand</name>
- </maintainer>
- <maintainer type="project">
- <email>crypto@gentoo.org</email>
- <name>Crypto</name>
- </maintainer>
-<use>
-<flag name="o-flag-munging">Enable O-flag mangling during build</flag>
-</use>
-</pkgmetadata>
diff --git a/dev-libs/libintl/Manifest b/dev-libs/libintl/Manifest
deleted file mode 100644
index 3f9d6130b3..0000000000
--- a/dev-libs/libintl/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST gettext-0.19.6.tar.gz 18619659 BLAKE2B fb5e518cef2048c89d2c637d3551d6d7debff2fcdeb35b60f0ae9943733bf5cd8ec46f0a4cccd9f1806a6af4b16eef372a0621af611d3706356af6ae82d0d5bf SHA512 46adfd4a6d0038aba999658bebe51117e3ab3dc149a9054c1087d3e79ec7ba3371a7e78a8ca30a8872d162c2dc44aba6e67e4d64808c4f92e1e2bd674174f1db
-DIST gettext-0.19.7.tar.gz 19235781 BLAKE2B 4c2cfcb0b21a66a9f8d2d57de7420e624a1235f97180ad5ac194a5eb629760a9cacc7f3966cdf893d7af86c1740d8bb2266c639ebe2664ea44f2c47a962a841a SHA512 7ba89074d3eddd0b4a5e2980e1ec74b53c49b7a04a1fa91c70c4bc11ce9c30415e4df9d79698148eaaed325fb4feb25a340a2e8e01fbe86b1a66b1376a4c9e3d
-DIST gettext-0.19.8.1.tar.gz 19704011 BLAKE2B 17dc7aad338a26d71b818fea51e46a47dccf14744ee575ce86b591becaea402e36d64dc018e1a84113c356122ffef367cf2fa424e51ebc9720350040b4960091 SHA512 073042fa2dc48804c58e76f036130a669e19612c25427b0ab14d0b366b549a63751bf3af03bfd0745d7c4f72497a4b2aab26a3cc6de83189ce111679073878e1
-DIST gettext-0.21.tar.gz 24181849 BLAKE2B 2eae99d0916b00b2af6fbc6bf7e309076519a10fea16cd49e7aa29fe8aec1ee7c784c6277281b764dc4abacf400cd3fe461129586303c8cd337db15c76cb4b87 SHA512 bbe590c5dd3580c75bf30ff768da99a88eb8d466ec1ac9eea20be4cab4357ecf72448e6b81b47425e39d50fa6320ba426632914d7898dfebb4f159abc39c31d1
diff --git a/dev-libs/libintl/files/0.19.3-localename.patch b/dev-libs/libintl/files/0.19.3-localename.patch
deleted file mode 100644
index 1df7811ed7..0000000000
--- a/dev-libs/libintl/files/0.19.3-localename.patch
+++ /dev/null
@@ -1,168 +0,0 @@
---- origsrc/gettext-0.19.3/gettext-runtime/gnulib-lib/localename.c 2014-10-16 01:00:08.000000000 -0500
-+++ src/gettext-0.19.3/gettext-runtime/gnulib-lib/localename.c 2014-11-17 23:22:47.747353600 -0600
-@@ -60,7 +60,7 @@
- # endif
- #endif
-
--#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
-+#if defined WINDOWS_NATIVE /* Native Windows */
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- # include <winnls.h>
-@@ -1412,7 +1412,7 @@ gl_locale_name_canonicalize (char *name)
- #endif
-
-
--#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
-+#if defined WINDOWS_NATIVE /* Native Windows */
-
- /* Canonicalize a Windows native locale name to a Unix locale name.
- NAME is a sufficiently large buffer.
-@@ -2825,11 +2825,6 @@ gl_locale_name_environ (int category, co
- Ignore invalid LANG value set by the Terminal application. */
- if (strcmp (retval, "UTF-8") != 0)
- #endif
--#if defined __CYGWIN__
-- /* Cygwin.
-- Ignore dummy LANG value set by ~/.profile. */
-- if (strcmp (retval, "C.UTF-8") != 0)
--#endif
- return retval;
- }
-
-@@ -2867,7 +2862,7 @@ gl_locale_name_default (void)
- "C.UTF-8" locale, which operates in the same way as the "C" locale.
- */
-
--#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE || defined __CYGWIN__)
-+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE)
-
- /* The system does not have a way of setting the locale, other than the
- POSIX specified environment variables. We use C as default locale. */
-@@ -2922,7 +2917,7 @@ gl_locale_name_default (void)
-
- # endif
-
--# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
-+# if defined WINDOWS_NATIVE /* Native Windows */
- {
- LCID lcid;
-
---- origsrc/gettext-0.19.3/gettext-runtime/intl/localename.c 2014-09-30 21:35:20.000000000 -0500
-+++ src/gettext-0.19.3/gettext-runtime/intl/localename.c 2014-11-17 23:22:47.755854700 -0600
-@@ -60,7 +60,7 @@
- # endif
- #endif
-
--#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
-+#if defined WINDOWS_NATIVE /* Native Windows */
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- # include <winnls.h>
-@@ -1412,7 +1412,7 @@ gl_locale_name_canonicalize (char *name)
- #endif
-
-
--#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
-+#if defined WINDOWS_NATIVE /* Native Windows */
-
- /* Canonicalize a Windows native locale name to a Unix locale name.
- NAME is a sufficiently large buffer.
-@@ -2770,7 +2770,7 @@ gl_locale_name_thread (int category, con
- However it does not specify the exact format. Neither do SUSV2 and
- ISO C 99. So we can use this feature only on selected systems (e.g.
- those using GNU C Library). */
--#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__)
-+#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__) || defined(__CYGWIN__)
- # define HAVE_LOCALE_NULL
- #endif
-
-@@ -2825,11 +2825,6 @@ gl_locale_name_environ (int category, co
- Ignore invalid LANG value set by the Terminal application. */
- if (strcmp (retval, "UTF-8") != 0)
- #endif
--#if defined __CYGWIN__
-- /* Cygwin.
-- Ignore dummy LANG value set by ~/.profile. */
-- if (strcmp (retval, "C.UTF-8") != 0)
--#endif
- return retval;
- }
-
-@@ -2867,7 +2862,7 @@ gl_locale_name_default (void)
- "C.UTF-8" locale, which operates in the same way as the "C" locale.
- */
-
--#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE || defined __CYGWIN__)
-+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE)
-
- /* The system does not have a way of setting the locale, other than the
- POSIX specified environment variables. We use C as default locale. */
-@@ -2922,7 +2917,7 @@ gl_locale_name_default (void)
-
- # endif
-
--# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
-+# if defined WINDOWS_NATIVE /* Native Windows */
- {
- LCID lcid;
-
---- origsrc/gettext-0.19.3/gettext-tools/gnulib-lib/localename.c 2014-10-16 01:00:35.000000000 -0500
-+++ src/gettext-0.19.3/gettext-tools/gnulib-lib/localename.c 2014-11-17 23:22:47.763355600 -0600
-#@@ -60,7 +60,7 @@
- # endif
- #endif
-
--#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
-+#if defined WINDOWS_NATIVE /* Native Windows */
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- # include <winnls.h>
-#@@ -1412,7 +1412,7 @@ gl_locale_name_canonicalize (char *name)
- #endif
-
-
--#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
-+#if defined WINDOWS_NATIVE /* Native Windows */
-
- /* Canonicalize a Windows native locale name to a Unix locale name.
- NAME is a sufficiently large buffer.
-#@@ -2770,7 +2770,7 @@ gl_locale_name_thread (int category, con
- However it does not specify the exact format. Neither do SUSV2 and
- ISO C 99. So we can use this feature only on selected systems (e.g.
- those using GNU C Library). */
--#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__)
-+#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__) || defined(__CYGWIN__)
- # define HAVE_LOCALE_NULL
- #endif
-
-#@@ -2825,11 +2825,6 @@ gl_locale_name_environ (int category, co
- Ignore invalid LANG value set by the Terminal application. */
- if (strcmp (retval, "UTF-8") != 0)
- #endif
--#if defined __CYGWIN__
-- /* Cygwin.
-- Ignore dummy LANG value set by ~/.profile. */
-- if (strcmp (retval, "C.UTF-8") != 0)
--#endif
- return retval;
- }
-
-#@@ -2867,7 +2862,7 @@ gl_locale_name_default (void)
- "C.UTF-8" locale, which operates in the same way as the "C" locale.
- */
-
--#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE || defined __CYGWIN__)
-+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE)
-
- /* The system does not have a way of setting the locale, other than the
- POSIX specified environment variables. We use C as default locale. */
-#@@ -2922,7 +2917,7 @@ gl_locale_name_default (void)
-
- # endif
-
--# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
-+# if defined WINDOWS_NATIVE /* Native Windows */
- {
- LCID lcid;
-
diff --git a/dev-libs/libintl/files/0.19.8.1-hide-newlocale.patch b/dev-libs/libintl/files/0.19.8.1-hide-newlocale.patch
deleted file mode 100644
index a8450f9840..0000000000
--- a/dev-libs/libintl/files/0.19.8.1-hide-newlocale.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 41e5199f0e4a3e9d518d6f95a3efdfae5e2c7913 Mon Sep 17 00:00:00 2001
-From: Bruno Haible <bruno@clisp.org>
-Date: Mon, 20 Mar 2017 22:36:36 +0100
-Subject: [PATCH] Fix compilation error in <libintl.h> on Cygwin.
-
-Reported by Michael Haubenwallner at https://savannah.gnu.org/bugs/?50595 .
-
-* gettext-runtime/intl/libgnuintl.in.h (newlocale): Hide declaration if
- locale_t type is not visible on Cygwin.
----
- gettext-runtime/intl/libgnuintl.in.h | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gettext-runtime/intl/libgnuintl.in.h b/gettext-runtime/intl/libgnuintl.in.h
-index dc1947f..95dcc16 100644
---- a/gettext-runtime/intl/libgnuintl.in.h
-+++ b/gettext-runtime/intl/libgnuintl.in.h
-@@ -439,7 +439,10 @@ extern char *setlocale (int, const char *);
-
- #undef newlocale
- #define newlocale libintl_newlocale
-+/* Declare newlocale() only if the system headers define the 'locale_t' type. */
-+#if !(defined __CYGWIN__ && !defined LC_ALL_MASK)
- extern locale_t newlocale (int, const char *, locale_t);
-+#endif
-
- #endif
-
---
-1.9.1
-
diff --git a/dev-libs/libintl/files/0.19.8.1-winnt.patch b/dev-libs/libintl/files/0.19.8.1-winnt.patch
deleted file mode 100644
index 009e0dd551..0000000000
--- a/dev-libs/libintl/files/0.19.8.1-winnt.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- gettext-0.19.8.1/gettext-runtime/intl/export.h.orig 2017-09-25 17:11:21.466134600 +0200
-+++ gettext-0.19.8.1/gettext-runtime/intl/export.h 2017-09-25 17:11:23.294289400 +0200
-@@ -1,6 +1,8 @@
-
- #if @HAVE_VISIBILITY@ && BUILDING_LIBINTL
- #define LIBINTL_DLL_EXPORTED __attribute__((__visibility__("default")))
-+#elif defined(_MSC_VER) && BUILDING_LIBINTL
-+#define LIBINTL_DLL_EXPORTED __declspec(dllexport)
- #else
- #define LIBINTL_DLL_EXPORTED
- #endif
diff --git a/dev-libs/libintl/files/libintl-0.19.5-langinfo.patch b/dev-libs/libintl/files/libintl-0.19.5-langinfo.patch
deleted file mode 100644
index bf96e69f92..0000000000
--- a/dev-libs/libintl/files/libintl-0.19.5-langinfo.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-this has been sent upstream
-
-From eac944b0757963ac1ba035ea72617734510ede22 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@chromium.org>
-Date: Mon, 12 Oct 2015 17:58:51 -0400
-Subject: [PATCH] intl/localename: control langinfo.h inclusion
-
-This header is only used to work around buggy behavior in old versions
-of glibc, so do not include it all the time. Otherwise we get build
-failures on systems that do not provide langinfo.h.
-
-* gettext-runtime/intl/localename.c: Wrap langinfo.h include with same
-ifdefs used in the source later on.
----
- gettext-runtime/intl/localename.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/gettext-runtime/intl/localename.c b/gettext-runtime/intl/localename.c
-index f8cf3f2..c27be86 100644
---- a/gettext-runtime/intl/localename.c
-+++ b/gettext-runtime/intl/localename.c
-@@ -38,7 +38,9 @@
- # if defined __APPLE__ && defined __MACH__
- # include <xlocale.h>
- # endif
--# include <langinfo.h>
-+# if __GLIBC__ >= 2 && !defined __UCLIBC__
-+# include <langinfo.h>
-+# endif
- # if !defined IN_LIBINTL
- # include "glthread/lock.h"
- # endif
---
-2.5.2
-
diff --git a/dev-libs/libintl/libintl-0.19.6.ebuild b/dev-libs/libintl/libintl-0.19.6.ebuild
deleted file mode 100644
index 37c00855df..0000000000
--- a/dev-libs/libintl/libintl-0.19.6.ebuild
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# Note: Keep version bumps in sync with sys-devel/gettext.
-
-EAPI="5"
-
-MY_P="gettext-${PV}"
-
-inherit eutils multilib-minimal toolchain-funcs libtool
-
-DESCRIPTION="the GNU international library (split out of gettext)"
-HOMEPAGE="https://www.gnu.org/software/gettext/"
-SRC_URI="mirror://gnu/gettext/${MY_P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="static-libs +threads"
-
-DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]"
-# Block C libraries known to provide libintl.
-RDEPEND="${DEPEND}
- !sys-libs/glibc
- !sys-libs/musl
- !<sys-devel/gettext-0.19.6-r1"
-
-S="${WORKDIR}/${MY_P}/gettext-runtime"
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-0.19.5-langinfo.patch
-
- # The libtool files are stored higher up, so make sure we run in the
- # whole tree and not just the subdir we build.
- elibtoolize "${WORKDIR}"
-}
-
-multilib_src_configure() {
- local myconf=(
- # Emacs support is now in a separate package.
- --without-emacs
- --without-lispdir
- # Normally this controls nls behavior in general, but the libintl
- # subdir is skipped unless this is explicitly set. ugh.
- --enable-nls
- # This magic flag enables libintl.
- --with-included-gettext
- # The gettext package provides this library.
- --disable-c++
- --disable-libasprintf
- # No java until someone cares.
- --disable-java
-
- $(use_enable static-libs static)
- $(use_enable threads)
- )
- ECONF_SOURCE=${S} econf "${myconf[@]}"
-}
-
-multilib_src_install() {
- # We only need things in the intl/ subdir.
- emake DESTDIR="${D}" install -C intl
-
- gen_usr_ldscript -a intl
-}
-
-multilib_src_install_all() {
- use static-libs || prune_libtool_files --all
-
- rm -f "${ED}"/usr/share/locale/locale.alias "${ED}"/usr/lib/charset.alias
-
- dodoc AUTHORS ChangeLog NEWS README
-}
diff --git a/dev-libs/libintl/libintl-0.19.7.ebuild b/dev-libs/libintl/libintl-0.19.7.ebuild
deleted file mode 100644
index d751e00786..0000000000
--- a/dev-libs/libintl/libintl-0.19.7.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# Note: Keep version bumps in sync with sys-devel/gettext.
-
-EAPI="5"
-
-MY_P="gettext-${PV}"
-
-inherit multilib-minimal toolchain-funcs libtool
-
-DESCRIPTION="the GNU international library (split out of gettext)"
-HOMEPAGE="https://www.gnu.org/software/gettext/"
-SRC_URI="mirror://gnu/gettext/${MY_P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="static-libs +threads"
-
-DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]"
-# Block C libraries known to provide libintl.
-RDEPEND="${DEPEND}
- !sys-libs/glibc
- !sys-libs/musl
- !<sys-devel/gettext-0.19.6-r1"
-
-S="${WORKDIR}/${MY_P}/gettext-runtime"
-
-src_prepare() {
- epatch "${FILESDIR}"/0.19.3-localename.patch # Cygwin
-
- # The libtool files are stored higher up, so make sure we run in the
- # whole tree and not just the subdir we build.
- elibtoolize "${WORKDIR}"
-}
-
-multilib_src_configure() {
- local myconf=(
- # Emacs support is now in a separate package.
- --without-emacs
- --without-lispdir
- # Normally this controls nls behavior in general, but the libintl
- # subdir is skipped unless this is explicitly set. ugh.
- --enable-nls
- # This magic flag enables libintl.
- --with-included-gettext
- # The gettext package provides this library.
- --disable-c++
- --disable-libasprintf
- # No java until someone cares.
- --disable-java
-
- $(use_enable static-libs static)
- $(use_enable threads)
- )
- ECONF_SOURCE=${S} econf "${myconf[@]}"
-}
-
-multilib_src_compile() {
- # We only need things in the intl/ subdir.
- emake -C intl
-}
-
-multilib_src_install() {
- # We only need things in the intl/ subdir.
- emake DESTDIR="${D}" install -C intl
-
- gen_usr_ldscript -a intl
-}
-
-multilib_src_install_all() {
- use static-libs || prune_libtool_files --all
-
- rm -f "${ED}"/usr/share/locale/locale.alias "${ED}"/usr/lib/charset.alias
-
- dodoc AUTHORS ChangeLog NEWS README
-}
diff --git a/dev-libs/libintl/libintl-0.19.8.1.ebuild b/dev-libs/libintl/libintl-0.19.8.1.ebuild
deleted file mode 100644
index dde5f9e9ba..0000000000
--- a/dev-libs/libintl/libintl-0.19.8.1.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# Note: Keep version bumps in sync with sys-devel/gettext.
-
-EAPI="5"
-
-MY_P="gettext-${PV}"
-
-inherit multilib-minimal toolchain-funcs libtool
-
-DESCRIPTION="the GNU international library (split out of gettext)"
-HOMEPAGE="https://www.gnu.org/software/gettext/"
-SRC_URI="mirror://gnu/gettext/${MY_P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="static-libs +threads"
-
-DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]"
-# Block C libraries known to provide libintl.
-RDEPEND="${DEPEND}
- !sys-libs/glibc
- !sys-libs/musl
- !<sys-devel/gettext-0.19.6-r1"
-
-S="${WORKDIR}/${MY_P}/gettext-runtime"
-
-src_prepare() {
- epatch "${FILESDIR}"/0.19.3-localename.patch # Cygwin
- epatch "${FILESDIR}"/0.19.8.1-hide-newlocale.patch # feature test
- epatch "${FILESDIR}"/0.19.8.1-winnt.patch
-
- # The libtool files are stored higher up, so make sure we run in the
- # whole tree and not just the subdir we build.
- elibtoolize "${WORKDIR}"
-}
-
-multilib_src_configure() {
- local myconf=(
- # Emacs support is now in a separate package.
- --without-emacs
- --without-lispdir
- # Normally this controls nls behavior in general, but the libintl
- # subdir is skipped unless this is explicitly set. ugh.
- --enable-nls
- # This magic flag enables libintl.
- --with-included-gettext
- # The gettext package provides this library.
- --disable-c++
- --disable-libasprintf
- # No java until someone cares.
- --disable-java
-
- $(use_enable static-libs static)
- $(use_enable threads)
- )
- ECONF_SOURCE=${S} econf "${myconf[@]}"
-}
-
-multilib_src_compile() {
- # We only need things in the intl/ subdir.
- emake -C intl
-}
-
-multilib_src_install() {
- # We only need things in the intl/ subdir.
- emake DESTDIR="${D}" install -C intl
-
- gen_usr_ldscript -a intl
-}
-
-multilib_src_install_all() {
- use static-libs || prune_libtool_files --all
-
- rm -f "${ED}"/usr/share/locale/locale.alias "${ED}"/usr/lib/charset.alias
-
- dodoc AUTHORS ChangeLog NEWS README
-}
diff --git a/dev-libs/libintl/libintl-0.21.ebuild b/dev-libs/libintl/libintl-0.21.ebuild
deleted file mode 100644
index cee764e6f1..0000000000
--- a/dev-libs/libintl/libintl-0.21.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# Note: Keep version bumps in sync with sys-devel/gettext.
-
-EAPI="5"
-
-MY_P="gettext-${PV}"
-
-inherit multilib-minimal toolchain-funcs libtool
-
-DESCRIPTION="the GNU international library (split out of gettext)"
-HOMEPAGE="https://www.gnu.org/software/gettext/"
-SRC_URI="mirror://gnu/gettext/${MY_P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="static-libs +threads"
-
-DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]"
-# Block C libraries known to provide libintl.
-RDEPEND="${DEPEND}
- !sys-libs/glibc
- !sys-libs/musl
- !<sys-devel/gettext-0.19.6-r1"
-
-S="${WORKDIR}/${MY_P}/gettext-runtime"
-
-src_prepare() {
- # Doesn't apply to 0.21
- # Looks like a lot of the fixes have landed upstream
- #epatch "${FILESDIR}"/0.19.3-localename.patch # Cygwin
-
- # The libtool files are stored higher up, so make sure we run in the
- # whole tree and not just the subdir we build.
- elibtoolize "${WORKDIR}"
-}
-
-multilib_src_configure() {
- local myconf=(
- # Emacs support is now in a separate package.
- --without-emacs
- --without-lispdir
- # Normally this controls nls behavior in general, but the libintl
- # subdir is skipped unless this is explicitly set. ugh.
- --enable-nls
- # This magic flag enables libintl.
- --with-included-gettext
- # The gettext package provides this library.
- --disable-c++
- --disable-libasprintf
- # No java until someone cares.
- --disable-java
-
- $(use_enable static-libs static)
- $(use_enable threads)
- )
- ECONF_SOURCE=${S} econf "${myconf[@]}"
-}
-
-multilib_src_compile() {
- # We only need things in the intl/ subdir.
- emake -C intl
-}
-
-multilib_src_install() {
- # We only need things in the intl/ subdir.
- emake DESTDIR="${D}" install -C intl
-
- gen_usr_ldscript -a intl
-}
-
-multilib_src_install_all() {
- use static-libs || prune_libtool_files --all
-
- rm -f "${ED}"/usr/share/locale/locale.alias "${ED}"/usr/lib/charset.alias
-
- dodoc AUTHORS ChangeLog NEWS README
-}
diff --git a/dev-libs/libintl/metadata.xml b/dev-libs/libintl/metadata.xml
deleted file mode 100644
index 56c1244130..0000000000
--- a/dev-libs/libintl/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-</pkgmetadata>
diff --git a/dev-libs/openssl/Manifest b/dev-libs/openssl/Manifest
deleted file mode 100644
index 18b48a6e84..0000000000
--- a/dev-libs/openssl/Manifest
+++ /dev/null
@@ -1,5 +0,0 @@
-DIST openssl-1.0.2-patches-1.5.tar.xz 12404 BLAKE2B 6c1b8c28f339f539b2ab8643379502a24cf62bffde00041dce54d5dd9e8d2620b181362ee5464b0ab32ba4948e209697bfabadbea2944a409a1009100d298f24 SHA512 5725e2d9d1ee8cc074bcef3bed61c71bdab2ff1c114362110c3fb8da11ad5bc8f2ff28e90a293f5f3a5cf96ecda54dffdb7ab3fb3f8b23ef6472250dc3037659
-DIST openssl-1.0.2t-bindist-1.0.tar.xz 13872 BLAKE2B b2aade96a6e0ca6209a39e205b1c838de945903fcf959c62cc29ddcd1a0cb360fc5db234df86860a6a4c096f5ecc237611e4c2946b986a5500c24ba93c208ef4 SHA512 a48a7efb9b973b865bcc5009d450b428ed6b4b95e4cefe70c51056e47392c8a7bec58215168d8b07712419dc74646c2bd2fd23bcfbba2031376e292249a6b1b6
-DIST openssl-1.0.2u.tar.gz 5355412 BLAKE2B b2ff2a10e5851af5aca4093422a9a072c794e87b997263826c1c35910c040f695fac63decac5856cb49399ed03d410f97701d9fd4e1ebfbcacd8f3a74ce8bf57 SHA512 c455bb309e20e2c2d47fdc5619c734d107d5c8c38c1409903ce979acc120b0d5fa0312917c0aa0d630e402d092a703d4249643f36078e8528a3cafc9dac6ab32
-DIST openssl-1.1.1i-bindist-1.0.tar.xz 18124 BLAKE2B bcbce700676d1d61498ac98281b7ad06f9970d91afa6bfb2c259ab7462b2554be79a1c06759bc7aaeca9948c2f5276bac2c4f42dbc6822669f863444b9913ccd SHA512 1dbb81bcb4cf7e634bb363c7e2bb2590a1fe3fcb6c3b5e377cac3c5241abd116c2a89c516be8e5fd1799ab64375a58052a4df944eeadc87b0b7785da710906d8
-DIST openssl-1.1.1k.tar.gz 9823400 BLAKE2B e9bd90f17bc819c4960d07bbee04346e8a7adb87a764a09d033ef76f1d638c67b180c4f2beb84ec25fbff54ccc9c14c13b9b16a27cac231a5dd22b02635d5cec SHA512 73cd042d4056585e5a9dd7ab68e7c7310a3a4c783eafa07ab0b560e7462b924e4376436a6d38a155c687f6942a881cfc0c1b9394afcde1d8c46bf396e7d51121
diff --git a/dev-libs/openssl/files/gentoo.config-1.0.2 b/dev-libs/openssl/files/gentoo.config-1.0.2
deleted file mode 100755
index a47829154e..0000000000
--- a/dev-libs/openssl/files/gentoo.config-1.0.2
+++ /dev/null
@@ -1,184 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-#
-# Openssl doesn't play along nicely with cross-compiling
-# like autotools based projects, so let's teach it new tricks.
-#
-# Review the bundled 'config' script to see why kind of targets
-# we can pass to the 'Configure' script.
-
-
-# Testing routines
-if [[ $1 == "test" ]] ; then
- for c in \
- "arm-gentoo-linux-uclibc |linux-generic32 -DL_ENDIAN" \
- "armv5b-linux-gnu |linux-armv4 -DB_ENDIAN" \
- "x86_64-pc-linux-gnu |linux-x86_64" \
- "alpha-linux-gnu |linux-alpha-gcc" \
- "alphaev56-unknown-linux-gnu |linux-alpha+bwx-gcc" \
- "i686-pc-linux-gnu |linux-elf" \
- "whatever-gentoo-freebsdX.Y |BSD-generic32" \
- "i686-gentoo-freebsdX.Y |BSD-x86-elf" \
- "sparc64-alpha-freebsdX.Y |BSD-sparc64" \
- "ia64-gentoo-freebsd5.99234 |BSD-ia64" \
- "x86_64-gentoo-freebsdX.Y |BSD-x86_64" \
- "hppa64-aldsF-linux-gnu5.3 |linux-generic32 -DB_ENDIAN" \
- "powerpc-gentOO-linux-uclibc |linux-ppc" \
- "powerpc64-unk-linux-gnu |linux-ppc64" \
- "powerpc64le-linux-gnu |linux-ppc64le" \
- "x86_64-apple-darwinX |darwin64-x86_64-cc" \
- "powerpc64-apple-darwinX |darwin64-ppc-cc" \
- "i686-apple-darwinX |darwin-i386-cc" \
- "i386-apple-darwinX |darwin-i386-cc" \
- "powerpc-apple-darwinX |darwin-ppc-cc" \
- "i586-pc-winnt |mingwvc-parity" \
- "i586-pc-cygwin2.0 |Cygwin" \
- "x86_64-pc-cygwin |Cygwin-x86_64" \
- "s390-ibm-linux-gnu |linux-generic32 -DB_ENDIAN" \
- "s390x-linux-gnu |linux64-s390x" \
- ;do
- CHOST=${c/|*}
- ret_want=${c/*|}
- ret_got=$(CHOST=${CHOST} "$0")
-
- if [[ ${ret_want} == "${ret_got}" ]] ; then
- echo "PASS: ${CHOST}"
- else
- echo "FAIL: ${CHOST}"
- echo -e "\twanted: ${ret_want}"
- echo -e "\twe got: ${ret_got}"
- fi
- done
- exit 0
-fi
-[[ -z ${CHOST} && -n $1 ]] && CHOST=$1
-
-
-# Detect the operating system
-case ${CHOST} in
- *-aix*) system="aix";;
- *-cygwin*) system="Cygwin";;
- *-darwin*) system="darwin";;
- *-freebsd*) system="BSD";;
- *-hpux*) system="hpux";;
- *-linux*) system="linux";;
- *-solaris*) system="solaris";;
- *-winnt*) system="mingwvc";;
- x86_64-*-mingw*) system="mingw64";;
- *mingw*) system="mingw";;
- *) exit 0;;
-esac
-
-
-# Compiler munging
-compiler="gcc"
-if [[ ${CC} == "ccc" ]] ; then
- compiler=${CC}
-fi
-
-
-# Detect target arch
-machine=""
-chost_machine=${CHOST%%-*}
-case ${system} in
-linux)
- case ${chost_machine}:${ABI} in
- aarch64*be*) machine="aarch64 -DB_ENDIAN";;
- aarch64*) machine="aarch64 -DL_ENDIAN";;
- alphaev56*|\
- alphaev[678]*)machine=alpha+bwx-${compiler};;
- alpha*) machine=alpha-${compiler};;
- armv[4-9]*b*) machine="armv4 -DB_ENDIAN";;
- armv[4-9]*) machine="armv4 -DL_ENDIAN";;
- arm*b*) machine="generic32 -DB_ENDIAN";;
- arm*) machine="generic32 -DL_ENDIAN";;
- avr*) machine="generic32 -DL_ENDIAN";;
- bfin*) machine="generic32 -DL_ENDIAN";;
- # hppa64*) machine=parisc64;;
- hppa*) machine="generic32 -DB_ENDIAN";;
- i[0-9]86*|\
- x86_64*:x86) machine=elf;;
- ia64*) machine=ia64;;
- m68*) machine="generic32 -DB_ENDIAN";;
- mips*el*) machine="generic32 -DL_ENDIAN";;
- mips*) machine="generic32 -DB_ENDIAN";;
- powerpc64*le*)machine=ppc64le;;
- powerpc64*) machine=ppc64;;
- powerpc*le*) machine="generic32 -DL_ENDIAN";;
- powerpc*) machine=ppc;;
- # sh64*) machine=elf;;
- sh*b*) machine="generic32 -DB_ENDIAN";;
- sh*) machine="generic32 -DL_ENDIAN";;
- # TODO: Might want to do -mcpu probing like glibc to determine a
- # better default for sparc-linux-gnu targets. This logic will
- # break v7 and older systems when they use it.
- sparc*v7*) machine="generic32 -DB_ENDIAN";;
- sparc64*) machine=sparcv9 system=linux64;;
- sparc*v9*) machine=sparcv9;;
- sparc*v8*) machine=sparcv8;;
- sparc*) machine=sparcv8;;
- s390x*) machine=s390x system=linux64;;
- s390*) machine="generic32 -DB_ENDIAN";;
- x86_64*:x32) machine=x32;;
- x86_64*) machine=x86_64;;
- esac
- ;;
-BSD)
- case ${chost_machine} in
- alpha*) machine=generic64;;
- i[6-9]86*) machine=x86-elf;;
- ia64*) machine=ia64;;
- sparc64*) machine=sparc64;;
- x86_64*) machine=x86_64;;
- *) machine=generic32;;
- esac
- ;;
-aix)
- machine=${compiler}
- ;;
-Cygwin)
- case ${chost_machine} in
- x86_64) machine=x86_64 ;;
- *) echo ${system} ;; # Cygwin-x86 is 'Cygwin' only
- esac
- ;;
-darwin)
- case ${chost_machine} in
- powerpc64) machine=ppc-cc; system=${system}64;;
- powerpc) machine=ppc-cc;;
- i?86*) machine=i386-cc;;
- x86_64) machine=x86_64-cc; system=${system}64;;
- arm64) machine=arm64-cc; system=${system}64;;
- esac
- ;;
-hpux)
- case ${chost_machine} in
- ia64) machine=ia64-${compiler} ;;
- esac
- ;;
-solaris)
- case ${chost_machine} in
- i386) machine=x86-${compiler} ;;
- x86_64*) machine=x86_64-${compiler}; system=${system}64;;
- sparcv9*) machine=sparcv9-${compiler}; system=${system}64;;
- sparc*)
- # this is a bit retarded, but openssl uses sparcv9
- # with 32-bits to target the CPU specific features,
- # so we need to figure out if we do v9 here
- machine=$(isainfo -k)-${compiler}
- ;;
- esac
- ;;
-mingwvc)
- machine=parity
- ;;
-mingw*)
- # special case ... no xxx-yyy style name
- echo ${system}
- ;;
-esac
-
-
-# If we have something, show it
-[[ -n ${machine} ]] && echo ${system}-${machine}
diff --git a/dev-libs/openssl/files/openssl-0.9.8g-engines-installnames.patch b/dev-libs/openssl/files/openssl-0.9.8g-engines-installnames.patch
deleted file mode 100644
index 8673e0612b..0000000000
--- a/dev-libs/openssl/files/openssl-0.9.8g-engines-installnames.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-* grobian@gentoo.org: shared objects, even when disguised as .so files,
- need to have a proper install_name in order to
- work without getting trapped by the kernel
-
---- a/Makefile.shared
-+++ b/Makefile.shared
-@@ -213,6 +213,7 @@
- if [ -n "$$SHLIB_SOVER_NODOT" ]; then \
- SHAREDFLAGS="$$SHAREDFLAGS -compatibility_version $$SHLIB_SOVER_NODOT"; \
- fi; \
-+ SHAREDFLAGS="$$SHAREDFLAGS -install_name ${INSTALLTOP}/lib/engines/$$SHLIB$$SHLIB_SUFFIX"; \
- $(LINK_SO_O)
- link_a.darwin:
- @ $(CALC_VERSIONS); \
diff --git a/dev-libs/openssl/files/openssl-1.0.0b-darwin-bundle-compile-fix.patch b/dev-libs/openssl/files/openssl-1.0.0b-darwin-bundle-compile-fix.patch
deleted file mode 100644
index c865de6799..0000000000
--- a/dev-libs/openssl/files/openssl-1.0.0b-darwin-bundle-compile-fix.patch
+++ /dev/null
@@ -1,52 +0,0 @@
---- a/Makefile.shared
-+++ b/Makefile.shared
-@@ -226,7 +226,7 @@
- link_o.darwin:
- @ $(CALC_VERSIONS); \
- SHLIB=lib$(LIBNAME); \
-- SHLIB_SUFFIX=.dylib; \
-+ SHLIB_SUFFIX=.bundle; \
- ALLSYMSFLAGS='-all_load'; \
- NOALLSYMSFLAGS=''; \
- SHAREDFLAGS="$(CFLAGS) `echo $(SHARED_LDFLAGS) | sed s/dynamiclib/bundle/`"; \
-@@ -236,7 +236,7 @@
- if [ -n "$$SHLIB_SOVER_NODOT" ]; then \
- SHAREDFLAGS="$$SHAREDFLAGS -compatibility_version $$SHLIB_SOVER_NODOT"; \
- fi; \
-- SHAREDFLAGS="$$SHAREDFLAGS -install_name ${INSTALLTOP}/lib/engines/$$SHLIB$$SHLIB_SUFFIX"; \
-+ SHAREDFLAGS="$$SHAREDFLAGS"; \
- $(LINK_SO_O)
- link_a.darwin:
- @ $(CALC_VERSIONS); \
---- a/engines/Makefile
-+++ b/engines/Makefile
-@@ -114,7 +114,12 @@
- if [ "$(PLATFORM)" != "Cygwin" ]; then \
- case "$(CFLAGS)" in \
- *DSO_BEOS*) sfx=".so";; \
-- *DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
-+ *DSO_DLFCN*) \
-+ case "$(PLATFORM)" in \
-+ darwin64-*|darwin-*) sfx=".bundle";; \
-+ *) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
-+ esac; \
-+ ;; \
- *DSO_DL*) sfx=".sl";; \
- *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
- *) sfx=".bad";; \
---- a/engines/ccgost/Makefile
-+++ b/engines/ccgost/Makefile
-@@ -48,7 +48,12 @@
- if [ "$(PLATFORM)" != "Cygwin" ]; then \
- case "$(CFLAGS)" in \
- *DSO_BEOS*) sfx=".so";; \
-- *DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
-+ *DSO_DLFCN*) \
-+ case "$(PLATFORM)" in \
-+ darwin64-*|darwin-*) sfx=".bundle";; \
-+ *) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
-+ esac; \
-+ ;; \
- *DSO_DL*) sfx=".sl";; \
- *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
- *) sfx=".bad";; \
diff --git a/dev-libs/openssl/files/openssl-1.0.2-gethostbyname2-solaris.patch b/dev-libs/openssl/files/openssl-1.0.2-gethostbyname2-solaris.patch
deleted file mode 100644
index 3474281ae8..0000000000
--- a/dev-libs/openssl/files/openssl-1.0.2-gethostbyname2-solaris.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-introduced by Gentoo's own patches, not present upstream
-
---- a/apps/s_socket.c
-+++ b/apps/s_socket.c
-@@ -718,8 +718,13 @@
- if (domain == AF_INET)
- ret = gethostbyname(name);
- # if OPENSSL_USE_IPV6
-+# if defined (__SVR4) && defined (__sun)
-+ else
-+ ret = getipnodebyname(name, AF_INET6, AI_DEFAULT, NULL);
-+# else
- else
- ret = gethostbyname2(name, AF_INET6);
-+# endif
- # endif
- if (ret == NULL)
- return (NULL);
diff --git a/dev-libs/openssl/files/openssl-1.0.2l-winnt.patch b/dev-libs/openssl/files/openssl-1.0.2l-winnt.patch
deleted file mode 100644
index cbf1bad692..0000000000
--- a/dev-libs/openssl/files/openssl-1.0.2l-winnt.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- openssl-1.0.2l/Configure 2017-10-02 13:14:38.701296300 +0200
-+++ openssl-1.0.2l-.default/Configure 2017-10-02 13:19:34.325506800 +0200
-@@ -602,6 +602,7 @@
-
- # MinGW
- "mingw", "gcc:-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall::-D_MT:MINGW32:-lws2_32 -lgdi32 -lcrypt32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_asm}:coff:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
-+"mingwvc-parity","parity.gnu.gcc:-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE:::MINGW32:-lws2_32 -lgdi32 -lcrypt32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${no_asm}:win32:cygwin-shared:-D_WINDLL -fPIC -DPIC::.dll.a",
- # As for OPENSSL_USE_APPLINK. Applink makes it possible to use .dll
- # compiled with one compiler with application compiled with another
- # compiler. It's possible to engage Applink support in mingw64 build,
---- openssl-1.0.2l/e_os.h 2017-05-25 14:54:34.000000000 +0200
-+++ openssl-1.0.2l-.default/e_os.h 2017-10-02 15:13:18.575589700 +0200
-@@ -652,7 +652,7 @@
- * Some IPv6 implementations are broken, disable them in known bad versions.
- */
- # if !defined(OPENSSL_USE_IPV6)
--# if defined(AF_INET6) && !defined(OPENSSL_SYS_BEOS_BONE) && !defined(NETWARE_CLIB)
-+# if defined(AF_INET6) && !defined(OPENSSL_SYS_BEOS_BONE) && !defined(NETWARE_CLIB) && !defined(_WIN32)
- # define OPENSSL_USE_IPV6 1
- # else
- # define OPENSSL_USE_IPV6 0
---- openssl-1.0.2l/util/mklink.pl 2017-05-25 14:54:34.000000000 +0200
-+++ openssl-1.0.2l-.default/util/mklink.pl 2017-09-27 17:22:29.528648000 +0200
-@@ -52,6 +52,7 @@
- my $file;
- $symlink_exists=eval {symlink("",""); 1};
- if ($^O eq "msys") { $symlink_exists=0 };
-+if ($^O eq "cygwin") { $symlink_exists=0 }; # may use cl.exe on cygwin
- foreach $file (@files) {
- my $err = "";
- if ($symlink_exists) {
diff --git a/dev-libs/openssl/files/openssl-1.1.0j-parallel_install_fix.patch b/dev-libs/openssl/files/openssl-1.1.0j-parallel_install_fix.patch
deleted file mode 100644
index c837e208cf..0000000000
--- a/dev-libs/openssl/files/openssl-1.1.0j-parallel_install_fix.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-https://github.com/openssl/openssl/issues/7679
-
---- a/Configurations/unix-Makefile.tmpl
-+++ b/Configurations/unix-Makefile.tmpl
-@@ -77,8 +77,14 @@
- # to. You're welcome.
- sub dependmagic {
- my $target = shift;
--
-- return "$target: build_generated\n\t\$(MAKE) depend && \$(MAKE) _$target\n_$target";
-+ my $magic = <<"_____";
-+$target: build_generated depend
-+ \$(MAKE) _$target
-+_$target
-+_____
-+ # Remove line ending
-+ $magic =~ s|\R$||;
-+ return $magic;
- }
- '';
- -}
diff --git a/dev-libs/openssl/files/openssl-1.1.1i-riscv32.patch b/dev-libs/openssl/files/openssl-1.1.1i-riscv32.patch
deleted file mode 100644
index c94b0323eb..0000000000
--- a/dev-libs/openssl/files/openssl-1.1.1i-riscv32.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 5b5e2985f355c8e99c196d9ce5d02c15bebadfbc Mon Sep 17 00:00:00 2001
-From: Alistair Francis <alistair.francis@wdc.com>
-Date: Thu, 29 Aug 2019 13:56:21 -0700
-Subject: [PATCH] Add support for io_pgetevents_time64 syscall
-
-32-bit architectures that are y2038 safe don't include syscalls that use
-32-bit time_t. Instead these architectures have suffixed syscalls that
-always use a 64-bit time_t. In the case of the io_getevents syscall the
-syscall has been replaced with the io_pgetevents_time64 syscall instead.
-
-This patch changes the io_getevents() function to use the correct
-syscall based on the avaliable syscalls and the time_t size. We will
-only use the new 64-bit time_t syscall if the architecture is using a
-64-bit time_t. This is to avoid having to deal with 32/64-bit
-conversions and relying on a 64-bit timespec struct on 32-bit time_t
-platforms. As of Linux 5.3 there are no 32-bit time_t architectures
-without __NR_io_getevents. In the future if a 32-bit time_t architecture
-wants to use the 64-bit syscalls we can handle the conversion.
-
-This fixes build failures on 32-bit RISC-V.
-
-Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
-
-Reviewed-by: Richard Levitte <levitte@openssl.org>
-Reviewed-by: Paul Dale <paul.dale@oracle.com>
-(Merged from https://github.com/openssl/openssl/pull/9819)
----
- engines/e_afalg.c | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-diff --git a/engines/e_afalg.c b/engines/e_afalg.c
-index dacbe358cb..99516cb1bb 100644
---- a/engines/e_afalg.c
-+++ b/engines/e_afalg.c
-@@ -125,7 +125,23 @@ static ossl_inline int io_getevents(aio_context_t ctx, long min, long max,
- struct io_event *events,
- struct timespec *timeout)
- {
-+#if defined(__NR_io_getevents)
- return syscall(__NR_io_getevents, ctx, min, max, events, timeout);
-+#elif defined(__NR_io_pgetevents_time64)
-+ /* Let's only support the 64 suffix syscalls for 64-bit time_t.
-+ * This simplifies the code for us as we don't need to use a 64-bit
-+ * version of timespec with a 32-bit time_t and handle converting
-+ * between 64-bit and 32-bit times and check for overflows.
-+ */
-+ if (sizeof(timeout->tv_sec) == 8)
-+ return syscall(__NR_io_pgetevents_time64, ctx, min, max, events, timeout, NULL);
-+ else {
-+ errno = ENOSYS;
-+ return -1;
-+ }
-+#else
-+# error "We require either the io_getevents syscall or __NR_io_pgetevents_time64."
-+#endif
- }
-
- static void afalg_waitfd_cleanup(ASYNC_WAIT_CTX *ctx, const void *key,
---
-2.26.2
-
diff --git a/dev-libs/openssl/metadata.xml b/dev-libs/openssl/metadata.xml
deleted file mode 100644
index 0ee764ebd0..0000000000
--- a/dev-libs/openssl/metadata.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<use>
- <flag name="asm">Support assembly hand optimized crypto functions (i.e. faster run time)</flag>
- <flag name="bindist">Disable EC algorithms (as they seem to be patented) -- note: changes the ABI</flag>
- <flag name="rfc3779">Enable support for RFC 3779 (X.509 Extensions for IP Addresses and AS Identifiers)</flag>
- <flag name="sslv2">Support for the old/insecure SSLv2 protocol -- note: not required for TLS/https</flag>
- <flag name="sslv3">Support for the old/insecure SSLv3 protocol -- note: not required for TLS/https</flag>
- <flag name="tls-heartbeat">Enable the Heartbeat Extension in TLS and DTLS</flag>
-</use>
-<upstream>
- <remote-id type="cpe">cpe:/a:openssl:openssl</remote-id>
-</upstream>
-<slots>
- <slot name="0">For building against. This is the only slot
- that provides headers and command line tools.</slot>
- <slot name="0.9.8">For binary compatibility, provides libcrypto.so.0.9.8
- and libssl.so.0.9.8 only.</slot>
- <subslots>Reflect ABI of libcrypto.so and libssl.so.</subslots>
-</slots>
-</pkgmetadata>
diff --git a/dev-libs/openssl/openssl-1.0.2u.ebuild b/dev-libs/openssl/openssl-1.0.2u.ebuild
deleted file mode 100644
index 2785d306d1..0000000000
--- a/dev-libs/openssl/openssl-1.0.2u.ebuild
+++ /dev/null
@@ -1,321 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit flag-o-matic toolchain-funcs multilib multilib-minimal
-
-# openssl-1.0.2-patches-1.6 contain additional CVE patches
-# which got fixed with this release.
-# Please use 1.7 version number when rolling a new tarball!
-PATCH_SET="openssl-1.0.2-patches-1.5"
-
-MY_P=${P/_/-}
-
-# This patch set is based on the following files from Fedora 25,
-# see https://src.fedoraproject.org/rpms/openssl/blob/25/f/openssl.spec
-# for more details:
-# - hobble-openssl (SOURCE1)
-# - ec_curve.c (SOURCE12) -- MODIFIED
-# - ectest.c (SOURCE13)
-# - openssl-1.1.1-ec-curves.patch (PATCH37) -- MODIFIED
-BINDIST_PATCH_SET="openssl-1.0.2t-bindist-1.0.tar.xz"
-
-DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
-HOMEPAGE="https://www.openssl.org/"
-SRC_URI="mirror://openssl/source/${MY_P}.tar.gz
- bindist? (
- mirror://gentoo/${BINDIST_PATCH_SET}
- https://dev.gentoo.org/~whissi/dist/openssl/${BINDIST_PATCH_SET}
- )
- !vanilla? (
- mirror://gentoo/${PATCH_SET}.tar.xz
- https://dev.gentoo.org/~chutzpah/dist/${PN}/${PATCH_SET}.tar.xz
- https://dev.gentoo.org/~whissi/dist/${PN}/${PATCH_SET}.tar.xz
- https://dev.gentoo.org/~polynomial-c/dist/${PATCH_SET}.tar.xz
- )"
-
-LICENSE="openssl"
-SLOT="0"
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="+asm bindist gmp kerberos rfc3779 sctp cpu_flags_x86_sse2 sslv2 +sslv3 static-libs test +tls-heartbeat vanilla zlib"
-RESTRICT="!bindist? ( bindist )
- !test? ( test )"
-
-MY_PKGINSTDEPS=">=app-misc/c_rehash-1.7-r1"
-RDEPEND="!prefix-stack? ( ${MY_PKGINSTDEPS} )
- gmp? ( >=dev-libs/gmp-5.1.3-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
- kerberos? ( >=app-crypt/mit-krb5-1.11.4[${MULTILIB_USEDEP}] )
- zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- prefix-stack? ( ${MY_PKGINSTDEPS} )"
-BDEPEND="
- >=dev-lang/perl-5
- sctp? ( >=net-misc/lksctp-tools-1.0.12 )
- test? (
- sys-apps/diffutils
- sys-devel/bc
- )"
-PDEPEND="app-misc/ca-certificates"
-
-S="${WORKDIR}/${MY_P}"
-
-MULTILIB_WRAPPED_HEADERS=(
- usr/include/openssl/opensslconf.h
-)
-
-src_prepare() {
- if use bindist; then
- mv "${WORKDIR}"/bindist-patches/hobble-openssl "${WORKDIR}" || die
- bash "${WORKDIR}"/hobble-openssl || die
-
- cp -f "${WORKDIR}"/bindist-patches/ec_curve.c "${S}"/crypto/ec/ || die
- cp -f "${WORKDIR}"/bindist-patches/ectest.c "${S}"/crypto/ec/ || die
-
- eapply "${WORKDIR}"/bindist-patches/ec-curves.patch
-
- # Also see the configure parts below:
- # enable-ec \
- # $(use_ssl !bindist ec2m) \
- # $(use_ssl !bindist srp) \
- fi
-
- # keep this in sync with app-misc/c_rehash
- SSL_CNF_DIR="/etc/ssl"
-
- # Make sure we only ever touch Makefile.org and avoid patching a file
- # that gets blown away anyways by the Configure script in src_configure
- rm -f Makefile
-
- if ! use vanilla ; then
- eapply "${WORKDIR}"/patch/*.patch
- fi
-
- eapply_user
-
- # <=Solaris-10 /bin/sh does not support "[ -e file ]", added by patches
- sed -e 's/\[ -e /\[ -r /' -i Makefile.shared
-
- # disable fips in the build
- # make sure the man pages are suffixed #302165
- # don't bother building man pages if they're disabled
- sed -i \
- -e '/DIRS/s: fips : :g' \
- -e '/^MANSUFFIX/s:=.*:=ssl:' \
- -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
- -e $(has noman FEATURES \
- && echo '/^install:/s:install_docs::' \
- || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \
- Makefile.org \
- || die
- # show the actual commands in the log
- sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
-
- eapply "${FILESDIR}"/${PN}-0.9.8g-engines-installnames.patch
- eapply "${FILESDIR}"/${PN}-1.0.0b-darwin-bundle-compile-fix.patch
- eapply "${FILESDIR}"/${PN}-1.0.2-gethostbyname2-solaris.patch
- eapply "${FILESDIR}"/${PN}-1.0.2l-winnt.patch # parity
-
- # remove -arch for Darwin
- sed -i '/^"darwin/s,-arch [^ ]\+,,g' Configure || die
-
- # since we're forcing $(CC) as makedep anyway, just fix
- # the conditional as always-on
- # helps clang (#417795), and versioned gcc (#499818)
- # this breaks build with 1.0.2p, not sure if it is needed anymore
- #sed -i 's/expr.*MAKEDEPEND.*;/true;/' util/domd || die
-
- # quiet out unknown driver argument warnings since openssl
- # doesn't have well-split CFLAGS and we're making it even worse
- # and 'make depend' uses -Werror for added fun (#417795 again)
- [[ ${CC} == *clang* ]] && append-flags -Qunused-arguments
-
- # allow openssl to be cross-compiled
- cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die
- chmod a+rx gentoo.config || die
-
- append-flags -fno-strict-aliasing
- append-flags $(test-flags-CC -Wa,--noexecstack)
- append-cppflags -DOPENSSL_NO_BUF_FREELISTS
-
- sed -i '1s,^:$,#!'${EPREFIX}'/usr/bin/perl,' Configure #141906
- # The config script does stupid stuff to prompt the user. Kill it.
- sed -i '/stty -icanon min 0 time 50; read waste/d' config || die
- ./config --test-sanity || die "I AM NOT SANE"
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- unset APPS #197996
- unset SCRIPTS #312551
- unset CROSS_COMPILE #311473
-
- tc-export CC AR RANLIB RC
-
- # Clean out patent-or-otherwise-encumbered code
- # Camellia: Royalty Free https://en.wikipedia.org/wiki/Camellia_(cipher)
- # IDEA: Expired https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
- # EC: ????????? ??/??/2015 https://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
- # MDC2: Expired https://en.wikipedia.org/wiki/MDC-2
- # RC5: Expired https://en.wikipedia.org/wiki/RC5
-
- use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; }
- echoit() { echo "$@" ; "$@" ; }
-
- local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
-
- # See if our toolchain supports __uint128_t. If so, it's 64bit
- # friendly and can use the nicely optimized code paths. #460790
- local ec_nistp_64_gcc_128
- # Disable it for now though #469976
- #if ! use bindist ; then
- # echo "__uint128_t i;" > "${T}"/128.c
- # if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then
- # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128"
- # fi
- #fi
-
- # https://github.com/openssl/openssl/issues/2286
- if use ia64 ; then
- replace-flags -g3 -g2
- replace-flags -ggdb3 -ggdb2
- fi
-
- local sslout=$(./gentoo.config)
- einfo "Use configuration ${sslout:-(openssl knows best)}"
- local config="Configure"
- [[ -z ${sslout} ]] && config="config"
-
- # Fedora hobbled-EC needs 'no-ec2m', 'no-srp'
- # Make sure user flags don't get added *yet* to avoid duplicated
- # flags.
- CFLAGS= LDFLAGS= echoit \
- ./${config} \
- ${sslout} \
- $(use cpu_flags_x86_sse2 || echo "no-sse2") \
- enable-camellia \
- enable-ec \
- $(use_ssl !bindist ec2m) \
- $(use_ssl !bindist srp) \
- ${ec_nistp_64_gcc_128} \
- enable-idea \
- enable-mdc2 \
- enable-rc5 \
- enable-tlsext \
- $(use_ssl asm) \
- $(use_ssl gmp gmp -lgmp) \
- $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
- $(use_ssl rfc3779) \
- $(use_ssl sctp) \
- $(use_ssl sslv2 ssl2) \
- $(use_ssl sslv3 ssl3) \
- $(use_ssl tls-heartbeat heartbeats) \
- $(use_ssl zlib) \
- --prefix="${EPREFIX}"/usr \
- --openssldir="${EPREFIX}"${SSL_CNF_DIR} \
- --libdir=$(get_libdir) \
- shared threads \
- || die
-
- # Clean out hardcoded flags that openssl uses
- local DEFAULT_CFLAGS=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
- -e 's:^CFLAG=::' \
- -e 's:\(^\| \)-fomit-frame-pointer::g' \
- -e 's:\(^\| \)-O[^ ]*::g' \
- -e 's:\(^\| \)-march=[^ ]*::g' \
- -e 's:\(^\| \)-mcpu=[^ ]*::g' \
- -e 's:\(^\| \)-m[^ ]*::g' \
- -e 's:^ *::' \
- -e 's: *$::' \
- -e 's: \+: :g' \
- -e 's:\\:\\\\:g'
- )
-
- # Now insert clean default flags with user flags
- sed -i \
- -e "/^CFLAG/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
- -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \
- Makefile || die
-}
-
-multilib_src_compile() {
- # depend is needed to use $confopts; it also doesn't matter
- # that it's -j1 as the code itself serializes subdirs
- emake -j1 V=1 depend
- emake all
- # rehash is needed to prep the certs/ dir; do this
- # separately to avoid parallel build issues.
- emake rehash
-}
-
-multilib_src_test() {
- emake -j1 test
-}
-
-multilib_src_install() {
- # We need to create $ED/usr on our own to avoid a race condition #665130
- if [[ ! -d "${ED}/usr" ]]; then
- # We can only create this directory once
- mkdir "${ED}"/usr || die
- fi
-
- emake INSTALL_PREFIX="${D}" install
-}
-
-multilib_src_install_all() {
- # openssl installs perl version of c_rehash by default, but
- # we provide a shell version via app-misc/c_rehash
- rm "${ED}"/usr/bin/c_rehash || die
-
- local -a DOCS=( CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el )
- einstalldocs
-
- use rfc3779 && dodoc engines/ccgost/README.gost
-
- # This is crappy in that the static archives are still built even
- # when USE=static-libs. But this is due to a failing in the openssl
- # build system: the static archives are built as PIC all the time.
- # Only way around this would be to manually configure+compile openssl
- # twice; once with shared lib support enabled and once without.
- use static-libs || rm -f "${ED}"/usr/lib*/lib*.a
-
- # create the certs directory
- dodir ${SSL_CNF_DIR}/certs
- cp -RP certs/* "${ED}"${SSL_CNF_DIR}/certs/ || die
- rm -r "${ED}"${SSL_CNF_DIR}/certs/{demo,expired}
-
- # Namespace openssl programs to prevent conflicts with other man pages
- cd "${ED}"/usr/share/man
- local m d s
- for m in $(find . -type f | xargs grep -L '#include') ; do
- d=${m%/*} ; d=${d#./} ; m=${m##*/}
- [[ ${m} == openssl.1* ]] && continue
- [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
- mv ${d}/{,ssl-}${m}
- # fix up references to renamed man pages
- sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
- ln -s ssl-${m} ${d}/openssl-${m}
- # locate any symlinks that point to this man page ... we assume
- # that any broken links are due to the above renaming
- for s in $(find -L ${d} -type l) ; do
- s=${s##*/}
- rm -f ${d}/${s}
- ln -s ssl-${m} ${d}/ssl-${s}
- ln -s ssl-${s} ${d}/openssl-${s}
- done
- done
- [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
-
- dodir /etc/sandbox.d #254521
- echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl
-
- diropts -m0700
- keepdir ${SSL_CNF_DIR}/private
-}
-
-pkg_postinst() {
- ebegin "Running 'c_rehash ${EROOT}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069"
- c_rehash "${EROOT}${SSL_CNF_DIR}/certs" >/dev/null
- eend $?
-}
diff --git a/dev-libs/openssl/openssl-1.1.1k.ebuild b/dev-libs/openssl/openssl-1.1.1k.ebuild
deleted file mode 100644
index ce544b470d..0000000000
--- a/dev-libs/openssl/openssl-1.1.1k.ebuild
+++ /dev/null
@@ -1,341 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit flag-o-matic toolchain-funcs multilib-minimal
-
-MY_P=${P/_/-}
-
-# This patch set is based on the following files from Fedora 31,
-# see https://src.fedoraproject.org/rpms/openssl/blob/f31/f/openssl.spec
-# for more details:
-# - hobble-openssl (SOURCE1)
-# - ec_curve.c (SOURCE12) -- MODIFIED
-# - ectest.c (SOURCE13)
-# - openssl-1.1.1-ec-curves.patch (PATCH37) -- MODIFIED
-BINDIST_PATCH_SET="openssl-1.1.1i-bindist-1.0.tar.xz"
-
-DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
-HOMEPAGE="https://www.openssl.org/"
-SRC_URI="mirror://openssl/source/${MY_P}.tar.gz
- bindist? (
- mirror://gentoo/${BINDIST_PATCH_SET}
- https://dev.gentoo.org/~whissi/dist/openssl/${BINDIST_PATCH_SET}
- )"
-
-LICENSE="openssl"
-SLOT="0/1.1" # .so version of libssl/libcrypto
-[[ "${PV}" = *_pre* ]] || \
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="+asm bindist elibc_musl rfc3779 sctp cpu_flags_x86_sse2 sslv3 static-libs test tls-heartbeat vanilla zlib"
-RESTRICT="!bindist? ( bindist )
- !test? ( test )"
-
-RDEPEND="!prefix-stack? ( >=app-misc/c_rehash-1.7-r1 )
- zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- prefix-stack? ( >=app-misc/c_rehash-1.7-r1 )"
-BDEPEND="
- >=dev-lang/perl-5
- sctp? ( >=net-misc/lksctp-tools-1.0.12 )
- test? (
- sys-apps/diffutils
- sys-devel/bc
- kernel_linux? ( sys-process/procps )
- )"
-PDEPEND="app-misc/ca-certificates"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.1.0j-parallel_install_fix.patch #671602
- "${FILESDIR}"/${PN}-1.1.1i-riscv32.patch
-)
-
-S="${WORKDIR}/${MY_P}"
-
-# force upgrade to prevent broken login, bug 696950
-RDEPEND+=" !<net-misc/openssh-8.0_p1-r3"
-
-MULTILIB_WRAPPED_HEADERS=(
- usr/include/openssl/opensslconf.h
-)
-
-pkg_setup() {
- [[ ${MERGE_TYPE} == binary ]] && return
-
- # must check in pkg_setup; sysctl don't work with userpriv!
- if has test ${FEATURES} && use sctp; then
- # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel"
- # if sctp.auth_enable is not enabled.
- local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null)
- if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]]; then
- die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!"
- fi
- fi
-}
-
-src_prepare() {
- # allow openssl to be cross-compiled
- cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die
- chmod a+rx gentoo.config || die
-
- if use bindist; then
- mv "${WORKDIR}"/bindist-patches/hobble-openssl "${WORKDIR}" || die
- bash "${WORKDIR}"/hobble-openssl || die
-
- cp -f "${WORKDIR}"/bindist-patches/ec_curve.c "${S}"/crypto/ec/ || die
- cp -f "${WORKDIR}"/bindist-patches/ectest.c "${S}"/test/ || die
-
- eapply "${WORKDIR}"/bindist-patches/ec-curves.patch
-
- local known_failing_test
- for known_failing_test in \
- 30-test_evp_extra.t \
- 80-test_ssl_new.t \
- ; do
- ebegin "Disabling test '${known_failing_test}' which is known to fail with USE=bindist"
- rm test/recipes/${known_failing_test} || die
- eend $?
- done
-
- # Also see the configure parts below:
- # enable-ec \
- # $(use_ssl !bindist ec2m) \
- fi
-
- # keep this in sync with app-misc/c_rehash
- SSL_CNF_DIR="/etc/ssl"
-
- # Make sure we only ever touch Makefile.org and avoid patching a file
- # that gets blown away anyways by the Configure script in src_configure
- rm -f Makefile
-
- if ! use vanilla ; then
- if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]] ; then
- [[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}"
- fi
- fi
-
- eapply_user #332661
-
- if has test ${FEATURES} && use sctp && has network-sandbox ${FEATURES}; then
- ebegin "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox"
- rm test/recipes/80-test_ssl_new.t || die
- eend $?
- fi
-
- # make sure the man pages are suffixed #302165
- # don't bother building man pages if they're disabled
- # Make DOCDIR Gentoo compliant
- sed -i \
- -e '/^MANSUFFIX/s:=.*:=ssl:' \
- -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
- -e $(has noman FEATURES \
- && echo '/^install:/s:install_docs::' \
- || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \
- -e "/^DOCDIR/s@\$(BASENAME)@&-${PVR}@" \
- Configurations/unix-Makefile.tmpl \
- || die
-
- # quiet out unknown driver argument warnings since openssl
- # doesn't have well-split CFLAGS and we're making it even worse
- # and 'make depend' uses -Werror for added fun (#417795 again)
- [[ ${CC} == *clang* ]] && append-flags -Qunused-arguments
-
- append-flags -fno-strict-aliasing
- append-flags $(test-flags-CC -Wa,--noexecstack)
- append-cppflags -DOPENSSL_NO_BUF_FREELISTS
-
- # Prefixify Configure shebang (#141906)
- sed \
- -e "1s,/usr/bin/env,${EPREFIX}&," \
- -i Configure || die
- # Remove test target when FEATURES=test isn't set
- if ! use test ; then
- sed \
- -e '/^$config{dirs}/s@ "test",@@' \
- -i Configure || die
- fi
- # use GNU ld full option, not to confuse it on Solaris
- sed -i \
- -e 's/-Wl,-M,/-Wl,--version-script=/' \
- -e 's/-Wl,-h,/-Wl,--soname=/' \
- Configurations/10-main.conf || die
- # fix building on Solaris 10
- # https://github.com/openssl/openssl/issues/6333
- sed -i \
- -e 's/-lsocket -lnsl -ldl/-lsocket -lnsl -ldl -lrt/' \
- Configurations/10-main.conf || die
- # The config script does stupid stuff to prompt the user. Kill it.
- sed -i '/stty -icanon min 0 time 50; read waste/d' config || die
- # The MS Azure build agent does set SYSTEM=build. Ignore such vars.
- sed -i '1aunset MACHINE RELEASE SYSTEM VERSION' config || die
- ./config --test-sanity || die "I AM NOT SANE"
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- unset APPS #197996
- unset SCRIPTS #312551
- unset CROSS_COMPILE #311473
-
- tc-export CC AR RANLIB RC
-
- # Clean out patent-or-otherwise-encumbered code
- # Camellia: Royalty Free https://en.wikipedia.org/wiki/Camellia_(cipher)
- # IDEA: Expired https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
- # EC: ????????? ??/??/2015 https://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
- # MDC2: Expired https://en.wikipedia.org/wiki/MDC-2
- # RC5: Expired https://en.wikipedia.org/wiki/RC5
-
- use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; }
- echoit() { echo "$@" ; "$@" ; }
-
- local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
-
- # See if our toolchain supports __uint128_t. If so, it's 64bit
- # friendly and can use the nicely optimized code paths. #460790
- local ec_nistp_64_gcc_128
- # Disable it for now though #469976
- #if ! use bindist ; then
- # echo "__uint128_t i;" > "${T}"/128.c
- # if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then
- # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128"
- # fi
- #fi
-
- local sslout=$(./gentoo.config)
- einfo "Use configuration ${sslout:-(openssl knows best)}"
- local config="Configure"
- [[ -z ${sslout} ]] && config="config"
-
- # Fedora hobbled-EC needs 'no-ec2m'
- # 'srp' was restricted until early 2017 as well.
- # "disable-deprecated" option breaks too many consumers.
- # Don't set it without thorough revdeps testing.
- # Make sure user flags don't get added *yet* to avoid duplicated
- # flags.
- CFLAGS= LDFLAGS= echoit \
- ./${config} \
- ${sslout} \
- $(use cpu_flags_x86_sse2 || echo "no-sse2") \
- enable-camellia \
- enable-ec \
- $(use_ssl !bindist ec2m) \
- $(use_ssl !bindist sm2) \
- enable-srp \
- $(use elibc_musl && echo "no-async") \
- ${ec_nistp_64_gcc_128} \
- enable-idea \
- enable-mdc2 \
- enable-rc5 \
- $(use_ssl sslv3 ssl3) \
- $(use_ssl sslv3 ssl3-method) \
- $(use_ssl asm) \
- $(use_ssl rfc3779) \
- $(use_ssl sctp) \
- $(use_ssl tls-heartbeat heartbeats) \
- $(use_ssl zlib) \
- --prefix="${EPREFIX}"/usr \
- --openssldir="${EPREFIX}"${SSL_CNF_DIR} \
- --libdir=$(get_libdir) \
- shared threads \
- || die
-
- # Clean out hardcoded flags that openssl uses
- local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \
- -e 's:^CFLAGS=::' \
- -e 's:\(^\| \)-fomit-frame-pointer::g' \
- -e 's:\(^\| \)-O[^ ]*::g' \
- -e 's:\(^\| \)-march=[^ ]*::g' \
- -e 's:\(^\| \)-mcpu=[^ ]*::g' \
- -e 's:\(^\| \)-m[^ ]*::g' \
- -e 's:^ *::' \
- -e 's: *$::' \
- -e 's: \+: :g' \
- -e 's:\\:\\\\:g'
- )
-
- # Now insert clean default flags with user flags
- sed -i \
- -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
- -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \
- Makefile || die
-}
-
-multilib_src_compile() {
- # depend is needed to use $confopts; it also doesn't matter
- # that it's -j1 as the code itself serializes subdirs
- emake -j1 depend
- emake all
-}
-
-multilib_src_test() {
- emake -j1 test
-}
-
-multilib_src_install() {
- # We need to create $ED/usr on our own to avoid a race condition #665130
- if [[ ! -d "${ED}/usr" ]]; then
- # We can only create this directory once
- mkdir "${ED}"/usr || die
- fi
-
- emake DESTDIR="${D}" install
-
- # This is crappy in that the static archives are still built even
- # when USE=static-libs. But this is due to a failing in the openssl
- # build system: the static archives are built as PIC all the time.
- # Only way around this would be to manually configure+compile openssl
- # twice; once with shared lib support enabled and once without.
- if ! use static-libs; then
- rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die
- fi
-}
-
-multilib_src_install_all() {
- # openssl installs perl version of c_rehash by default, but
- # we provide a shell version via app-misc/c_rehash
- rm "${ED}"/usr/bin/c_rehash || die
-
- dodoc CHANGES* FAQ NEWS README doc/*.txt doc/${PN}-c-indent.el
-
- # create the certs directory
- keepdir ${SSL_CNF_DIR}/certs
-
- # Namespace openssl programs to prevent conflicts with other man pages
- cd "${ED}"/usr/share/man || die
- local m d s
- for m in $(find . -type f | xargs grep -L '#include') ; do
- d=${m%/*} ; d=${d#./} ; m=${m##*/}
- [[ ${m} == openssl.1* ]] && continue
- [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
- mv ${d}/{,ssl-}${m}
- # fix up references to renamed man pages
- sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
- ln -s ssl-${m} ${d}/openssl-${m}
- # locate any symlinks that point to this man page ... we assume
- # that any broken links are due to the above renaming
- for s in $(find -L ${d} -type l) ; do
- s=${s##*/}
- rm -f ${d}/${s}
- # We don't want to "|| die" here
- ln -s ssl-${m} ${d}/ssl-${s}
- ln -s ssl-${s} ${d}/openssl-${s}
- done
- done
- [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
-
- dodir /etc/sandbox.d #254521
- echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl
-
- diropts -m0700
- keepdir ${SSL_CNF_DIR}/private
-}
-
-pkg_postinst() {
- ebegin "Running 'c_rehash ${EROOT}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069"
- c_rehash "${EROOT}${SSL_CNF_DIR}/certs" >/dev/null
- eend $?
-}
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 5b4d4457ee..cf1c3461f9 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: autotools.eclass
@@ -74,7 +74,7 @@ inherit gnuconfig libtool
# Do NOT change this variable in your ebuilds!
# If you want to force a newer minor version, you can specify the correct
# WANT value by using a colon: <PV>:<WANT_AUTOMAKE>
-_LATEST_AUTOMAKE=( 1.16.2-r1:1.16 )
+_LATEST_AUTOMAKE=( 1.16.4:1.16 )
_automake_atom="sys-devel/automake"
_autoconf_atom="sys-devel/autoconf"
@@ -95,7 +95,7 @@ if [[ -n ${WANT_AUTOCONF} ]] ; then
none) _autoconf_atom="" ;; # some packages don't require autoconf at all
2.1) _autoconf_atom="~sys-devel/autoconf-2.13" ;;
# if you change the "latest" version here, change also autotools_env_setup
- latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.69" ;;
+ latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.71" ;;
*) die "Invalid WANT_AUTOCONF value '${WANT_AUTOCONF}'" ;;
esac
export WANT_AUTOCONF
@@ -112,7 +112,7 @@ if [[ -n ${WANT_LIBTOOL} ]] ; then
fi
# @ECLASS-VARIABLE: AUTOTOOLS_DEPEND
-# @INTERNAL
+# @OUTPUT_VARIABLE
# @DESCRIPTION:
# Contains the combination of requested automake/autoconf/libtool
# versions in *DEPEND format.
@@ -131,7 +131,7 @@ RDEPEND=""
if [[ ${AUTOTOOLS_AUTO_DEPEND} != "no" ]] ; then
case ${EAPI} in
5|6) DEPEND=${AUTOTOOLS_DEPEND} ;;
- 7) BDEPEND=${AUTOTOOLS_DEPEND} ;;
+ *) BDEPEND=${AUTOTOOLS_DEPEND} ;;
esac
fi
__AUTOTOOLS_AUTO_DEPEND=${AUTOTOOLS_AUTO_DEPEND} # See top of eclass
@@ -332,8 +332,26 @@ eaclocal_amflags() {
# They also force installing the support files for safety.
# Respects AT_M4DIR for additional directories to search for macros.
eaclocal() {
+ # Feed in a list of paths:
+ # - ${BROOT}/usr/share/aclocal
+ # - ${ESYSROOT}/usr/share/aclocal
+ # See bug #677002
+ if [[ ${EAPI} != [56] ]] ; then
+ if [[ ! -f "${T}"/aclocal/dirlist ]] ; then
+ mkdir "${T}"/aclocal || die
+ cat <<- EOF > "${T}"/aclocal/dirlist || die
+ ${BROOT}/usr/share/aclocal
+ ${ESYSROOT}/usr/share/aclocal
+ EOF
+ fi
+
+ local system_acdir=" --system-acdir=${T}/aclocal"
+ else
+ local system_acdir=""
+ fi
+
[[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \
- autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags)
+ autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags) ${system_acdir}
}
# @FUNCTION: _elibtoolize
@@ -514,7 +532,7 @@ autotools_env_setup() {
[[ ${WANT_AUTOMAKE} == "latest" ]] && \
die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE[*]}"
fi
- [[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.5
+ [[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.71
}
# @FUNCTION: autotools_run_tool
@@ -670,12 +688,6 @@ autotools_m4sysdir_include() {
# First try to use the paths the system integrator has set up.
local paths=( $(eval echo ${AT_SYS_M4DIR}) )
- if [[ ${#paths[@]} -eq 0 && -n ${SYSROOT} ]] ; then
- # If they didn't give us anything, then default to the SYSROOT.
- # This helps when cross-compiling.
- local path="${SYSROOT}/usr/share/aclocal"
- [[ -d ${path} ]] && paths+=( "${path}" )
- fi
_autotools_m4dir_include "${paths[@]}"
}
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index 8a6db80fdb..a778b387b3 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -6,7 +6,7 @@
# java@gentoo.org
# @AUTHOR:
# Thomas Matthijs <axxo@gentoo.org>, Karl Trygve Kalleberg <karltk@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: Base eclass for Java packages
# @DESCRIPTION:
# This eclass provides functionality which is used by java-pkg-2.eclass,
@@ -18,7 +18,7 @@
# Ant-based packages.
case ${EAPI:-0} in
- [567]) ;;
+ [5678]) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -118,13 +118,29 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
# Normally this is determined from the jre/jdk version specified in RDEPEND.
# See java-pkg_get-target function below.
#
-# Should generallyonly be used for testing and debugging.
+# Should generally only be used for testing and debugging.
#
# emerge bar to be compatible with 1.3
# @CODE
# JAVA_PKG_WANT_TARGET=1.3 emerge bar
# @CODE
+# @ECLASS-VARIABLE: JAVA_TEST_EXTRA_ARGS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Array of extra arguments that should be passed to java command when running tests.
+# It is useful when you need to pass a value to a Java program that uses
+# System.getProperty(). If it uses System.getenv(), use `export var=value` instead.
+#
+# It is used only when running tests.
+#
+# @CODE
+# JAVA_TEST_EXTRA_ARGS=(
+# -Dsome.var=x
+# "-Dother.var=\"y z\""
+# )
+# @CODE
+
# @ECLASS-VARIABLE: JAVA_PKG_DEBUG
# @DEFAULT_UNSET
# @DESCRIPTION:
@@ -1549,8 +1565,7 @@ java-pkg_ensure-vm-version-ge() {
# Parameters:
# $@ - VM version to compare current VM to
# @CODE
-# @RETURN: zero - current VM version is greater than checked version;
-# non-zero - current VM version is not greater than checked version
+# @RETURN: zero - current VM version is greater than checked version; non-zero - current VM version is not greater than checked version
java-pkg_is-vm-version-ge() {
debug-print-function ${FUNCNAME} $*
@@ -1801,8 +1816,8 @@ ejunit_() {
if [[ "${junit}" == "junit-4" ]] ; then
runner=org.junit.runner.JUnitCore
fi
- debug-print "Calling: java -cp \"${cp}\" -Djava.io.tmpdir=\"${T}\" -Djava.awt.headless=true ${runner} ${@}"
- java -cp "${cp}" -Djava.io.tmpdir="${T}/" -Djava.awt.headless=true ${runner} "${@}" || die "Running junit failed"
+ debug-print "Calling: java -cp \"${cp}\" -Djava.io.tmpdir=\"${T}\" -Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]} ${runner} ${@}"
+ java -cp "${cp}" -Djava.io.tmpdir="${T}/" -Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]} ${runner} "${@}" || die "Running junit failed"
}
# @FUNCTION: ejunit
@@ -1881,9 +1896,9 @@ etestng() {
done
debug-print "java -cp \"${cp}\" -Djava.io.tmpdir=\"${T}\""\
- "-Djava.awt.headless=true ${runner}"\
+ "-Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]} ${runner}"\
"-usedefaultlisteners false -testclass ${tests}"
- java -cp "${cp}" -Djava.io.tmpdir=\"${T}\" -Djava.awt.headless=true\
+ java -cp "${cp}" -Djava.io.tmpdir=\"${T}\" -Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]}\
${runner} -usedefaultlisteners false -testclass ${tests}\
|| die "Running TestNG failed."
}
@@ -1894,7 +1909,7 @@ etestng() {
# Don't call directly, but via java-pkg-2_src_prepare!
java-utils-2_src_prepare() {
case ${EAPI:-0} in
- [0-5])
+ 5)
java-pkg_func-exists java_prepare && java_prepare ;;
*)
java-pkg_func-exists java_prepare &&
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 0c173e2308..9170229202 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -35,7 +35,7 @@ fi
if [[ ! ${_PYTHON_UTILS_R1} ]]; then
[[ ${EAPI} == [67] ]] && inherit eapi8-dosym
-inherit toolchain-funcs
+inherit multiprocessing toolchain-funcs
# @ECLASS-VARIABLE: _PYTHON_ALL_IMPLS
# @INTERNAL
@@ -353,16 +353,13 @@ _python_export() {
;;
PYTHON_SITEDIR)
[[ -n ${PYTHON} ]] || die "PYTHON needs to be set for ${var} to be exported, or requested before it"
- # sysconfig can't be used because:
- # 1) pypy doesn't give site-packages but stdlib
- # 2) jython gives paths with wrong case
- PYTHON_SITEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())') || die
+ PYTHON_SITEDIR=$("${PYTHON}" -c 'import sysconfig; print(sysconfig.get_path("purelib"))') || die
export PYTHON_SITEDIR
debug-print "${FUNCNAME}: PYTHON_SITEDIR = ${PYTHON_SITEDIR}"
;;
PYTHON_INCLUDEDIR)
[[ -n ${PYTHON} ]] || die "PYTHON needs to be set for ${var} to be exported, or requested before it"
- PYTHON_INCLUDEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())') || die
+ PYTHON_INCLUDEDIR=$("${PYTHON}" -c 'import sysconfig; print(sysconfig.get_path("platinclude"))') || die
export PYTHON_INCLUDEDIR
debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = ${PYTHON_INCLUDEDIR}"
@@ -439,6 +436,12 @@ _python_export() {
case ${impl} in
python2.7)
PYTHON_PKG_DEP='>=dev-lang/python-2.7.5-r2:2.7';;
+ python3.8)
+ PYTHON_PKG_DEP=">=dev-lang/python-3.8.8_p1-r1:3.8";;
+ python3.9)
+ PYTHON_PKG_DEP=">=dev-lang/python-3.9.6_p1-r1:3.9";;
+ python3.10)
+ PYTHON_PKG_DEP=">=dev-lang/python-3.10.0_p1-r1:3.10";;
python*)
PYTHON_PKG_DEP="dev-lang/python:${impl#python}";;
pypy)
@@ -580,46 +583,6 @@ python_get_scriptdir() {
echo "${PYTHON_SCRIPTDIR}"
}
-# @FUNCTION: _python_ln_rel
-# @USAGE: <from> <to>
-# @INTERNAL
-# @DESCRIPTION:
-# Create a relative symlink.
-_python_ln_rel() {
- debug-print-function ${FUNCNAME} "${@}"
-
- local target=${1}
- local symname=${2}
-
- local tgpath=${target%/*}/
- local sympath=${symname%/*}/
- local rel_target=
-
- while [[ ${sympath} ]]; do
- local tgseg= symseg=
-
- while [[ ! ${tgseg} && ${tgpath} ]]; do
- tgseg=${tgpath%%/*}
- tgpath=${tgpath#${tgseg}/}
- done
-
- while [[ ! ${symseg} && ${sympath} ]]; do
- symseg=${sympath%%/*}
- sympath=${sympath#${symseg}/}
- done
-
- if [[ ${tgseg} != ${symseg} ]]; then
- rel_target=../${rel_target}${tgseg:+${tgseg}/}
- fi
- done
- rel_target+=${tgpath}${target##*/}
-
- debug-print "${FUNCNAME}: ${symname} -> ${target}"
- debug-print "${FUNCNAME}: rel_target = ${rel_target}"
-
- ln -fs "${rel_target}" "${symname}"
-}
-
# @FUNCTION: python_optimize
# @USAGE: [<directory>...]
# @DESCRIPTION:
@@ -661,6 +624,9 @@ python_optimize() {
debug-print "${FUNCNAME}: using sys.path: ${*/%/;}"
fi
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" INF)
+ [[ ${jobs} == INF ]] && jobs=$(get_nproc)
+
local d
for d; do
# make sure to get a nice path without //
@@ -672,11 +638,14 @@ python_optimize() {
"${PYTHON}" -m compileall -q -f -d "${instpath}" "${d}"
"${PYTHON}" -OO -m compileall -q -f -d "${instpath}" "${d}"
;;
- python*|pypy3)
+ python3.[5678]|pypy3)
# both levels of optimization are separate since 3.5
- "${PYTHON}" -m compileall -q -f -d "${instpath}" "${d}"
- "${PYTHON}" -O -m compileall -q -f -d "${instpath}" "${d}"
- "${PYTHON}" -OO -m compileall -q -f -d "${instpath}" "${d}"
+ "${PYTHON}" -m compileall -j "${jobs}" -q -f -d "${instpath}" "${d}"
+ "${PYTHON}" -O -m compileall -j "${jobs}" -q -f -d "${instpath}" "${d}"
+ "${PYTHON}" -OO -m compileall -j "${jobs}" -q -f -d "${instpath}" "${d}"
+ ;;
+ python*)
+ "${PYTHON}" -m compileall -j "${jobs}" -o 0 -o 1 -o 2 --hardlink-dupes -q -f -d "${instpath}" "${d}"
;;
*)
"${PYTHON}" -m compileall -q -f -d "${instpath}" "${d}"
@@ -1310,23 +1279,63 @@ build_sphinx() {
sed -i -e 's:^intersphinx_mapping:disabled_&:' \
"${dir}"/conf.py || die
# not all packages include the Makefile in pypi tarball
- sphinx-build -b html -d "${dir}"/_build/doctrees "${dir}" \
+ "${EPYTHON}" -m sphinx.cmd.build \
+ -b html -d "${dir}"/_build/doctrees "${dir}" \
"${dir}"/_build/html || die
HTML_DOCS+=( "${dir}/_build/html/." )
}
+# @FUNCTION: _python_check_EPYTHON
+# @INTERNAL
+# @DESCRIPTION:
+# Check if EPYTHON is set, die if not.
+_python_check_EPYTHON() {
+ if [[ -z ${EPYTHON} ]]; then
+ die "EPYTHON unset, invalid call context"
+ fi
+}
+
+# @VARIABLE: EPYTEST_DESELECT
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Specifies an array of tests to be deselected via pytest's --deselect
+# parameter, when calling epytest. The list can include file paths,
+# specific test functions or parametrized test invocations.
+#
+# Note that the listed files will still be subject to collection,
+# i.e. modules imported in global scope will need to be available.
+# If this is undesirable, EPYTEST_IGNORE can be used instead.
+
+# @VARIABLE: EPYTEST_IGNORE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Specifies an array of paths to be ignored via pytest's --ignore
+# parameter, when calling epytest. The listed files will be entirely
+# skipped from test collection.
+
# @FUNCTION: epytest
# @USAGE: [<args>...]
# @DESCRIPTION:
-# Run pytest, passing the standard set of pytest options, followed
-# by user-specified options.
+# Run pytest, passing the standard set of pytest options, then
+# --deselect and --ignore options based on EPYTEST_DESELECT
+# and EPYTEST_IGNORE, then user-specified options.
#
# This command dies on failure and respects nonfatal.
epytest() {
debug-print-function ${FUNCNAME} "${@}"
- [[ -n ${EPYTHON} ]] || die "EPYTHON unset, invalid call context"
+ _python_check_EPYTHON
+
+ local color
+ case ${NOCOLOR} in
+ true|yes)
+ color=no
+ ;;
+ *)
+ color=yes
+ ;;
+ esac
local args=(
# verbose progress reporting and tracebacks
@@ -1336,12 +1345,29 @@ epytest() {
-ra
# print local variables in tracebacks, useful for debugging
-l
+ # override filterwarnings=error, we do not really want -Werror
+ # for end users, as it tends to fail on new warnings from deps
+ -Wdefault
+ # override color output
+ "--color=${color}"
)
+ local x
+ for x in "${EPYTEST_DESELECT[@]}"; do
+ args+=( --deselect "${x}" )
+ done
+ for x in "${EPYTEST_IGNORE[@]}"; do
+ args+=( --ignore "${x}" )
+ done
set -- "${EPYTHON}" -m pytest "${args[@]}" "${@}"
echo "${@}" >&2
"${@}" || die -n "pytest failed with ${EPYTHON}"
- return ${?}
+ local ret=${?}
+
+ # remove common temporary directories left over by pytest plugins
+ rm -rf .hypothesis .pytest_cache || die
+
+ return ${ret}
}
# @FUNCTION: eunittest
@@ -1354,7 +1380,7 @@ epytest() {
eunittest() {
debug-print-function ${FUNCNAME} "${@}"
- [[ -n ${EPYTHON} ]] || die "EPYTHON unset, invalid call context"
+ _python_check_EPYTHON
set -- "${EPYTHON}" -m unittest_or_fail discover -v "${@}"
diff --git a/scripts/auto-bootstraps/analyse_result.py b/scripts/auto-bootstraps/analyse_result.py
index 23ff06c5f5..a131dfc848 100755
--- a/scripts/auto-bootstraps/analyse_result.py
+++ b/scripts/auto-bootstraps/analyse_result.py
@@ -12,7 +12,9 @@ resultsdir='./results'
deprecated_archs = (
'x86_64-pc-cygwin',
'sparc-sun-solaris2.10',
- 'sparcv9-sun-solaris2.10'
+ 'sparcv9-sun-solaris2.10',
+ 'sparc-sun-solaris2.11',
+ 'sparcv9-sun-solaris2.11'
)
def find_last_stage(d):
@@ -150,13 +152,22 @@ with os.scandir(resultsdir) as it:
elapsedtime = int(l)
mconf = os.path.join(resultsdir, arch, "%s" % d, "make.conf")
- if os.path.exists(mconf):
- with open(mconf, 'rb') as f:
- l = [x.decode('utf-8', 'ignore') for x in f.readlines()]
- l = list(filter(lambda x: 'USE=' in x, l))
- for x in l:
- if 'libressl' in x:
- haslssl = True
+ conffiles = []
+ if os.path.isdir(mconf):
+ with os.scandir(mconf) as it:
+ for f in it:
+ if f.is_file():
+ conffiles += [ f.name ]
+ else:
+ conffiles = [ mconf ]
+ for mconf in conffiles:
+ if os.path.exists(mconf):
+ with open(mconf, 'rb') as f:
+ l = [x.decode('utf-8', 'ignore') for x in f.readlines()]
+ l = list(filter(lambda x: 'USE=' in x, l))
+ for x in l:
+ if 'libressl' in x:
+ haslssl = True
mconf = os.path.join(resultsdir, arch, "%s" % d, "stage1.log")
if os.path.exists(mconf):
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index ec489f1f26..76383c0210 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -105,7 +105,7 @@ efetch() {
configure_cflags() {
export CPPFLAGS="-I${ROOT}/tmp/usr/include"
-
+
case ${CHOST} in
*-darwin*)
export LDFLAGS="-Wl,-search_paths_first -L${ROOT}/tmp/usr/lib"
@@ -190,9 +190,11 @@ configure_toolchain() {
einfo "Triggering Darwin with GCC toolchain"
compiler_stage1+=" sys-apps/darwin-miscutils"
local ccvers="$(unset CHOST; /usr/bin/gcc --version 2>/dev/null)"
+ local isgcc=
case "${ccvers}" in
*"(GCC) 4.2.1 "*)
linker="=sys-devel/binutils-apple-3.2.6"
+ isgcc=true
;;
*"(GCC) 4.0.1 "*)
linker="=sys-devel/binutils-apple-3.2.6"
@@ -200,12 +202,13 @@ configure_toolchain() {
compiler_stage1+="
sys-devel/gcc-apple
=sys-devel/binutils-apple-3.2.6"
+ isgcc=true
;;
*"Apple clang version "*|*"Apple LLVM version "*)
# recent binutils-apple are hard to build (C++11
- # features, and cmake buildsystem) so avoid going
+ # features, and cmake build system) so avoid going
# there, the system ld is good enough to bring us to
- # stage3, after which system set will take care of
+ # stage3, after which the @system set will take care of
# the rest
linker=sys-devel/native-cctools
;;
@@ -214,7 +217,15 @@ configure_toolchain() {
return 1
;;
esac
- compiler_stage1+=" sys-devel/gcc"
+ if [[ ${isgcc} == true ]] ; then
+ # current compiler (gcc-11) requires C++11, which is
+ # available since 4.8, so need to bootstrap with <11
+ compiler_stage1+=" <sys-devel/gcc-11"
+ compiler="${compiler%sys-devel/gcc} <sys-devel/gcc-11"
+ else
+ # assume LLVM/Clang has C++11 support
+ compiler_stage1+=" sys-devel/gcc"
+ fi
;;
*-darwin*)
einfo "Triggering Darwin with LLVM/Clang toolchain"
@@ -309,7 +320,8 @@ bootstrap_setup() {
[[ -e ${ROOT}/foo.$$ ]] && FS_INSENSITIVE=1
rm "${ROOT}"/FOO.$$
- if [[ ! -f ${ROOT}/etc/portage/make.conf ]] ; then
+ [[ ! -e "${MAKE_CONF_DIR}" ]] && mkdir -p -- "${MAKE_CONF_DIR}"
+ if [[ ! -f ${MAKE_CONF_DIR}/0100_bootstrap_prefix_make.conf ]] ; then
{
echo "# Added by bootstrap-prefix.sh for ${CHOST}"
echo 'USE="unicode nls"'
@@ -319,9 +331,9 @@ bootstrap_setup() {
echo "CONFIG_SHELL=\"${ROOT}/bin/bash\""
echo "DISTDIR=\"${DISTDIR:-${ROOT}/var/cache/distfiles}\""
if is-rap ; then
- echo "# sandbox does not work well on Prefix, bug 490246"
+ echo "# sandbox does not work well on Prefix, bug #490246"
echo 'FEATURES="${FEATURES} -usersandbox -sandbox"'
- # bug 759424
+ # bug #759424
[[ -n ${STABLE_PREFIX} ]] && \
echo 'ACCEPT_KEYWORDS="${ARCH} -~${ARCH}"'
else
@@ -340,14 +352,28 @@ bootstrap_setup() {
echo "USE=\"\${USE} ${MAKE_CONF_ADDITIONAL_USE}\""
[[ ${OFFLINE_MODE} ]] && \
echo 'FETCHCOMMAND="bash -c \"echo I need \${FILE} from \${URI} in \${DISTDIR}; read\""'
- } > "${ROOT}"/etc/portage/make.conf
+ } > "${MAKE_CONF_DIR}/0100_bootstrap_prefix_make.conf"
fi
if is-rap ; then
- [[ -f ${ROOT}/etc/passwd ]] || getent passwd > "${ROOT}"/etc/passwd || \
- ln -sf {,"${ROOT}"}/etc/passwd
- [[ -f ${ROOT}/etc/group ]] || getent group > "${ROOT}"/etc/group || \
- ln -sf {,"${ROOT}"}/etc/group
+ if [[ ! -f ${ROOT}/etc/passwd ]]; then
+ if grep -q $(id -un) /etc/passwd; then
+ ln -sf {,"${ROOT}"}/etc/passwd
+ else
+ getent passwd > "${ROOT}"/etc/passwd
+ # add user if it's not in /etc/passwd, bug #766417
+ getent passwd $(id -un) >> "${ROOT}"/etc/passwd
+ fi
+ fi
+ if [[ ! -f ${ROOT}/etc/group ]]; then
+ if grep -q $(id -gn) /etc/group; then
+ ln -sf {,"${ROOT}"}/etc/group
+ else
+ getent group > "${ROOT}"/etc/group
+ # add group if it's not in /etc/group, bug #766417
+ getent group $(id -gn) >> "${ROOT}"/etc/group
+ fi
+ fi
[[ -f ${ROOT}/etc/resolv.conf ]] || ln -s {,"${ROOT}"}/etc/resolv.conf
[[ -f ${ROOT}/etc/hosts ]] || cp {,"${ROOT}"}/etc/hosts
local profile_linux=default/linux/ARCH/17.0/prefix/$(profile-kernel)
@@ -368,15 +394,31 @@ bootstrap_setup() {
rev=${CHOST##*darwin}
profile="prefix/darwin/macos/10.$((rev - 4))/x64"
;;
- x86_64-apple-darwin2[0123456789])
+ x86_64-apple-darwin20)
# Big Sur is 11.0
rev=${CHOST##*darwin}
profile="prefix/darwin/macos/11.$((rev - 20))/x64"
;;
- arm64-apple-darwin2[0123456789])
+ x86_64-apple-darwin2[123456789])
+ # Monterey is 12.0
+ rev=${CHOST##*darwin}
+ profile="prefix/darwin/macos/12.$((rev - 21))/x64"
+ ;;
+ arm64-apple-darwin20)
rev=${CHOST##*darwin}
profile="prefix/darwin/macos/11.$((rev - 20))/arm64"
;;
+ # TODO: Come up with something better for macOS 11+
+ x86_64-apple-darwin2[123456789])
+ # Monterey is 12.0
+ rev=${CHOST##*darwin}
+ profile="prefix/darwin/macos/12.$((rev - 21))/x64"
+ ;;
+ arm64-apple-darwin2[123456789])
+ # Monterey is 12.0
+ rev=${CHOST##*darwin}
+ profile="prefix/darwin/macos/12.$((rev - 21))/arm64"
+ ;;
i*86-pc-linux-gnu)
profile=${profile_linux/ARCH/x86}
;;
@@ -417,7 +459,7 @@ bootstrap_setup() {
x86_64-pc-cygwin*)
profile="prefix/windows/cygwin/x64"
;;
- *)
+ *)
eerror "UNKNOWN ARCH: You need to set up a make.profile symlink to a"
eerror "profile in ${PORTDIR} for your CHOST ${CHOST}"
exit 1
@@ -447,7 +489,7 @@ bootstrap_setup() {
profile=${PROFILE_BASE:-prefix}/${profile#prefix/}${PROFILE_VARIANT:+/${PROFILE_VARIANT}}
if [[ -n ${profile} && ! -e ${ROOT}/etc/portage/make.profile ]] ; then
local fullprofile="${PORTDIR}/profiles/${profile}"
-
+
ln -s "${fullprofile}" "${ROOT}"/etc/portage/make.profile
einfo "Your profile is set to ${fullprofile}."
fi
@@ -463,6 +505,29 @@ bootstrap_setup() {
>=sys-devel/gcc-11
EOF
+ # bug #824482 avoid glibc-2.34
+ if is-rap; then
+ if ! [ -d "${ROOT}"/etc/portage/package.mask ]; then
+ mkdir "${ROOT}"/etc/portage/package.mask
+ fi
+
+ if ! [ -d "${ROOT}"/etc/portage/package.unmask ]; then
+ mkdir "${ROOT}"/etc/portage/package.unmask
+ fi
+
+ cat >> "${ROOT}"/etc/portage/package.mask/glibc <<-EOF
+ # Temporary mask for newer glibc until bootstrapping issues are fixed.
+ # bug #824482: Avoid glibc-2.34 for now. See package.unmask/glibc too.
+ >=sys-libs/glibc-2.34
+ EOF
+
+ cat >> "${ROOT}"/etc/portage/package.unmask/glibc <<-EOF
+ # Temporary mask for newer glibc until bootstrapping issues are fixed.
+ # bug #824482: Avoid glibc-2.34 for now. See package.mask/glibc too.
+ >=sys-libs/glibc-2.34_p1
+ EOF
+ fi
+
# Use package.use to disable in the portage tree to be shared between
# stage2 and stage3. The hack will be undone during tree sync in stage3.
cat >> "${ROOT}"/etc/portage/make.profile/package.use <<-EOF
@@ -535,7 +600,6 @@ do_tree() {
else
efetch "$1/$2" || return 1
fi
- [[ -e ${PORTDIR} ]] || mkdir -p ${PORTDIR}
einfo "Unpacking, this may take a while"
estatus "stage1: unpacking Portage tree"
bzip2 -dc ${DISTDIR}/$2 | \
@@ -547,7 +611,7 @@ do_tree() {
bootstrap_tree() {
# RAP uses the latest gentoo main repo snapshot to bootstrap.
is-rap && LATEST_TREE_YES=1
- local PV="20211014"
+ local PV="20220116"
if [[ -n ${LATEST_TREE_YES} ]]; then
do_tree "${SNAPSHOT_URL}" portage-latest.tar.bz2
else
@@ -614,12 +678,12 @@ bootstrap_portage() {
# STABLE_PV that is known to work. Intended for power users only.
## It is critical that STABLE_PV is the lastest (non-masked) version that is
## included in the snapshot for bootstrap_tree.
- STABLE_PV="3.0.21"
- [[ ${TESTING_PV} == latest ]] && TESTING_PV="3.0.21"
+ STABLE_PV="3.0.30.1"
+ [[ ${TESTING_PV} == latest ]] && TESTING_PV="3.0.30.1"
PV="${TESTING_PV:-${STABLE_PV}}"
A=prefix-portage-${PV}.tar.bz2
einfo "Bootstrapping ${A%.tar.*}"
-
+
efetch ${DISTFILES_URL}/${A} || return 1
einfo "Unpacking ${A%.tar.*}"
@@ -668,7 +732,7 @@ bootstrap_portage() {
cd "${ROOT}"
rm -Rf ${ptmp} >& /dev/null
- # Some people will skip the tree() step and hence var/log is not created
+ # Some people will skip the tree() step and hence var/log is not created
# As such, portage complains..
mkdir -p "${ROOT}"/tmp/var/log
@@ -949,9 +1013,9 @@ bootstrap_gnu() {
einfo "${A%.tar.*} successfully bootstrapped"
}
-PYTHONMAJMIN=3.8 # keep this number in line with PV below for stage1,2
+PYTHONMAJMIN=3.9 # keep this number in line with PV below for stage1,2
bootstrap_python() {
- PV=3.8.6
+ PV=3.9.6
A=Python-${PV}.tar.xz
einfo "Bootstrapping ${A%.tar.*}"
@@ -1017,8 +1081,8 @@ bootstrap_python() {
-e 's/KQUEUE/KQUEUE_DISABLED/' \
configure
# fixup thread id detection
- efetch "http://dev.gentoo.org/~grobian/distfiles/python-3.8.6-darwin9.patch"
- patch -p1 < "${DISTDIR}"/python-3.8.6-darwin9.patch
+ efetch "https://dev.gentoo.org/~sam/distfiles/dev-lang/python/python-3.9.6-darwin9_pthreadid.patch"
+ patch -p1 < "${DISTDIR}"/python-3.9.6-darwin9_pthreadid.patch
;;
(arm64-*-darwin*)
# Teach Python a new trick (arm64)
@@ -1160,7 +1224,7 @@ bootstrap_cmake_core() {
emake install || return 1
# we need sysroot crap to build cmake itself, but it makes trouble
- # lateron, so kill it in the installed version
+ # later on, so kill it in the installed version
ver=${A%-*} ; ver=${ver%.*}
sed -i -e '/cmake_gnu_set_sysroot_flag/d' \
"${ROOT}"/tmp/usr/share/${ver}/Modules/Platform/Apple-GNU-*.cmake || die
@@ -1372,7 +1436,7 @@ bootstrap_stage_host_gentoo() {
einfo "are bootstrapping prefix-rpath. Do nothing."
return 0
fi
-
+
if [[ ! -L ${ROOT}/tmp ]] ; then
if [[ -e ${ROOT}/tmp ]] ; then
einfo "${ROOT}/tmp exists and is not a symlink to ${HOST_GENTOO_EROOT}"
@@ -1386,7 +1450,9 @@ bootstrap_stage_host_gentoo() {
(bootstrap_tree) || return 1
# setup a profile
- [[ -e ${ROOT}/etc/portage/make.profile && -e ${ROOT}/etc/portage/make.conf ]] || (bootstrap_setup) || return 1
+ [[ -e ${ROOT}/etc/portage/make.profile && \
+ -e ${MAKE_CONF_DIR}/0100_bootstrap_prefix_make.conf ]] \
+ || (bootstrap_setup) || return 1
prepare_portage
}
@@ -1545,7 +1611,9 @@ bootstrap_stage1() {
(bootstrap_tree) || return 1
# setup a profile
- [[ -e ${ROOT}/etc/portage/make.profile && -e ${ROOT}/etc/portage/make.conf ]] || (bootstrap_setup) || return 1
+ [[ -e ${ROOT}/etc/portage/make.profile && \
+ -e ${MAKE_CONF_DIR}/0100_bootstrap_prefix_make.conf ]] \
+ || (bootstrap_setup) || return 1
mkdir -p "${ROOT}"/tmp/etc/. || return 1
[[ -e ${ROOT}/tmp/etc/portage/make.profile ]] || cp -dpR "${ROOT}"/etc/portage "${ROOT}"/tmp/etc || return 1
@@ -1614,16 +1682,20 @@ do_emerge_pkgs() {
clang
internal-glib
)
+ local override_make_conf_dir="${PORTAGE_OVERRIDE_EPREFIX}${MAKE_CONF_DIR#${ROOT}}"
+
if [[ " ${USE} " == *" prefix-stack "* ]] &&
[[ ${PORTAGE_OVERRIDE_EPREFIX} == */tmp ]] &&
- ! grep -q '^USE=".*" # by bootstrap-prefix.sh$' "${PORTAGE_OVERRIDE_EPREFIX}/etc/portage/make.conf"
+ ! grep -Rq '^USE=".*" # by bootstrap-prefix.sh$' \
+ "${override_make_conf_dir}"
then
# With prefix-stack, the USE env var does apply to the stacked
# prefix only, not the base prefix (any more? since some portage
# version?), so we have to persist the base USE flags into the
# base prefix - without the additional incoming USE flags.
+ mkdir -p -- "${override_make_conf_dir}"
echo "USE=\"\${USE} ${myuse[*]}\" # by bootstrap-prefix.sh" \
- >> "${PORTAGE_OVERRIDE_EPREFIX}/etc/portage/make.conf"
+ >> "${override_make_conf_dir}/0101_bootstrap_prefix_stack.conf"
fi
myuse=" ${myuse[*]} "
local use
@@ -1814,6 +1886,7 @@ bootstrap_stage2() {
if [[ ${compiler_type} == clang ]] ; then
# we use Clang as our toolchain compiler, so we need to make
# sure we actually use it
+ mkdir -p -- "${MAKE_CONF_DIR}"
{
echo
echo "# System compiler on $(uname) Prefix is Clang, do not remove this"
@@ -1823,7 +1896,7 @@ bootstrap_stage2() {
echo "OBJCXX=${CHOST}-clang++"
echo "BUILD_CC=${CHOST}-clang"
echo "BUILD_CXX=${CHOST}-clang++"
- } >> "${ROOT}"/etc/portage/make.conf
+ } >> "${MAKE_CONF_DIR}/0100_bootstrap_prefix_clang.conf"
# llvm won't setup symlinks to CHOST-clang here because
# we're in a cross-ish situation (at least according to
# multilib.eclass -- can't blame it at this point really)
@@ -2050,7 +2123,7 @@ bootstrap_stage3() {
# in addition, avoid collisions
rm -Rf "${ROOT}"/tmp/usr/lib/python${PYTHONMAJMIN}/site-packages/clang
- # try to get ourself out of the mudd, bug #575324
+ # try to get ourself out of the mud, bug #575324
EXTRA_ECONF="--disable-compiler-version-checks $(rapx '--disable-lto --disable-bootstrap')" \
GCC_MAKE_TARGET=$(rapx all) \
MYCMAKEARGS="-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=OFF" \
@@ -2135,13 +2208,10 @@ bootstrap_stage3() {
export USE="-git -crypt"
# Portage should figure out itself what it needs to do, if anything.
- # Avoid glib compiling for Cocoa libs if it finds them, since we're
- # still with an old llvm that may not understand the system headers
- # very well on Darwin (-DGNUSTEP_BASE_VERSION hack)
- einfo "running emerge -u system"
- estatus "stage3: emerge -u system"
- CPPFLAGS="-DGNUSTEP_BASE_VERSION" \
- CFLAGS= CXXFLAGS= emerge --color n -u -v system || return 1
+ einfo "running emerge -uDNv system"
+ estatus "stage3: emerge -uDNv system"
+ unset CFLAGS CXXFLAGS CPPFLAGS
+ emerge --color n -uDNv system || return 1
# remove anything that we don't need (compilers most likely)
einfo "running emerge --depclean"
@@ -2168,6 +2238,7 @@ set_helper_vars() {
export PORTDIR=${PORTDIR:-"${ROOT}/var/db/repos/gentoo"}
export DISTDIR=${DISTDIR:-"${ROOT}/var/cache/distfiles"}
PORTAGE_TMPDIR=${PORTAGE_TMPDIR:-${ROOT}/var/tmp}
+ MAKE_CONF_DIR="${ROOT}/etc/portage/make.conf/"
DISTFILES_URL=${DISTFILES_URL:-"http://dev.gentoo.org/~grobian/distfiles"}
GNU_URL=${GNU_URL:="http://ftp.gnu.org/gnu"}
DISTFILES_G_O="http://distfiles.prefix.bitzolder.nl"
@@ -2292,9 +2363,8 @@ EOF
echo
echo "It seems to me you are '${USER:-$(whoami 2> /dev/null)}' (${UID}), that looks cool to me."
- # Expect noninteractive users to know what they do:
- # Take EPREFIX from argv1 (=ROOT), not from env var.
- [[ ${TODO} == 'noninteractive' ]] && EPREFIX=${ROOT}
+ # In case $ROOT were specified as $1, use it
+ [[ -z "${EPREFIX}" ]] && EPREFIX="${ROOT}"
echo
echo "I'm going to check for some variables in your environment now:"
diff --git a/sys-apps/coreutils/Manifest b/sys-apps/coreutils/Manifest
index 23cda18b29..b0fcebe2bb 100644
--- a/sys-apps/coreutils/Manifest
+++ b/sys-apps/coreutils/Manifest
@@ -1,3 +1,4 @@
DIST coreutils-8.28-cygwin-8.26-3.patch 36792 BLAKE2B f494be97595ff9532f57ca3d5386d185d813647fb07480dc1b22434fa5eecfa22acb6940b82cc733ae4448757e5f69cf2c7c746a5752409fe4aa11dd47482e63 SHA512 53d05262118a0063a0b3992b80dcda28256516da4d077a691117384ea808e5468488443d9c4b0e38a4d5148e5e721e733dcb0562dcf23a1370d4090251458951
DIST coreutils-8.30-patches-01.tar.xz 5788 BLAKE2B a41511ce39ac570cb14b7f12d125eebef92217469a9490808719fa0665f5e5c0adb96fbd02c4bac4d280d1502295669575790a81dbc01afe2ca3a9d384cbefb0 SHA512 b1e1933637de4581d5f8c6ede4e80a012435d13f0cf5550a76ab5bbe9441e3c15ce19ef3f78a7ea3b8368d5e9a3bb17c1207c471d26171b59786f38adeba0454
DIST coreutils-8.32.tar.xz 5547836 BLAKE2B 0ad99c176c19ec214fcfd0845523e5362f0151827707c759bd46c0fe8d2501c6ad1c29c5b71266f6525857bc0d56c472db0d7fe29953b6c65e2e6c76bdf3c515 SHA512 1c8f3584efd61b4b02e7ac5db8e103b63cfb2063432caaf1e64cb2dcc56d8c657d1133bbf10bd41468d6a1f31142e6caa81d16ae68fa3e6e84075c253613a145
+DIST coreutils-9.0.tar.xz 5612752 BLAKE2B 59617cd25fd4c70f51bfbef851bd83e73f9c9ba5c11eb539f7f75c0184d55832e004b28e9268fb8064db145cb071ead2b9c0c3346bc35a11934ffe1b15bf17ac SHA512 9be08212891dbf48e5b22e7689dc27dac50df4631ebf29313470b72b7921f0b2aa5242917d05587785358495ca56e3b21f5b3ca81043d53cab92354da6c53a03
diff --git a/sys-apps/coreutils/coreutils-9.0-r2.ebuild b/sys-apps/coreutils/coreutils-9.0-r2.ebuild
new file mode 100644
index 0000000000..1774109986
--- /dev/null
+++ b/sys-apps/coreutils/coreutils-9.0-r2.ebuild
@@ -0,0 +1,251 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8,9,10} )
+
+inherit eutils flag-o-matic python-any-r1 toolchain-funcs
+
+PATCH="${PN}-8.30-patches-01"
+DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)"
+HOMEPAGE="https://www.gnu.org/software/coreutils/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
+ !vanilla? (
+ mirror://gentoo/${PATCH}.tar.xz
+ https://dev.gentoo.org/~polynomial-c/dist/${PATCH}.tar.xz
+ )
+ elibc_Cygwin? (
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-8.28-cygwin-8.26-3.patch
+ )
+"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="acl caps gmp hostname kill multicall nls selinux +split-usr static test userland_BSD vanilla xattr"
+RESTRICT="!test? ( test )"
+
+LIB_DEPEND="acl? ( sys-apps/acl[static-libs] )
+ caps? ( sys-libs/libcap )
+ gmp? ( dev-libs/gmp:=[static-libs] )
+ xattr? ( !userland_BSD? ( sys-apps/attr[static-libs] ) )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs]} )
+ selinux? ( sys-libs/libselinux )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ app-arch/xz-utils
+ test? (
+ dev-lang/perl
+ dev-perl/Expect
+ !userland_BSD? (
+ dev-util/strace
+ )
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep 'dev-python/pyinotify[${PYTHON_USEDEP}]')
+ )"
+RDEPEND+="
+ hostname? ( !sys-apps/net-tools[hostname] )
+ kill? (
+ !sys-apps/util-linux[kill]
+ !sys-process/procps[kill]
+ )
+ !app-misc/realpath
+ !<sys-apps/util-linux-2.13
+ !<sys-apps/sandbox-2.10-r4
+ !sys-apps/stat
+ !net-mail/base64
+ !sys-apps/mktemp
+ !<app-forensics/tct-1.18-r1
+ !<net-fs/netatalk-2.0.3-r4"
+
+pkg_setup() {
+ if use test ; then
+ python-any-r1_pkg_setup
+ fi
+}
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/${P}-fix-chmod-symlink-exit.patch
+ )
+
+ if ! use vanilla ; then
+ PATCHES+=( "${WORKDIR}"/patch )
+ PATCHES+=( "${FILESDIR}"/${PN}-8.32-sandbox-env-test.patch )
+ fi
+
+ if use elibc_Cygwin ; then
+ PATCHES+=( "${DISTDIR}"/${PN}-8.28-cygwin-8.26-3.patch )
+ fi
+
+ default
+
+ # fixup libstdbuf non-libtool stuff
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # we need replacement libs from libcoreutils.a here in order
+ # to finish the linking (they try to avoid this, but it doesn't
+ # during bootstrap, a re-install is fine though)
+ sed -i \
+ -e "/src_libstdbuf_so_LDADD/s:$: lib/libcoreutils.a:" \
+ Makefile.in \
+ || die
+ # and we need serial building :(
+ export MAKEOPTS+=" -j1"
+ # set a proper install_name
+ sed -i \
+ -e "/src_libstdbuf_so_LDFLAGS = -shared/s:-shared:-dynamiclib -install_name ${EPREFIX}/usr/libexec/coreutils/libstdbuf.dylib:" \
+ Makefile.in \
+ || die
+ elif use elibc_Cygwin ; then
+ sed -i -e 's|\(libstdbuf\.so\)$(EXEEXT)|\1|g' Makefile.in || die
+ fi
+ sed -i \
+ -e "s/libstdbuf\\.so/libstdbuf$(get_libname)/" \
+ src/stdbuf.c \
+ Makefile.in \
+ configure \
+ || die
+
+ # Since we've patched many .c files, the make process will try to
+ # re-build the manpages by running `./bin --help`. When doing a
+ # cross-compile, we can't do that since 'bin' isn't a native bin.
+ # Also, it's not like we changed the usage on any of these things,
+ # so let's just update the timestamps and skip the help2man step.
+ set -- man/*.x
+ touch ${@/%x/1}
+
+ # Avoid perl dep for compiled in dircolors default #348642
+ if ! has_version dev-lang/perl ; then
+ touch src/dircolors.h
+ touch ${@/%x/1}
+ fi
+}
+
+src_configure() {
+ local myconf=(
+ --with-packager="Gentoo"
+ --with-packager-version="${PVR} (p${PATCH_VER:-0})"
+ --with-packager-bug-reports="https://bugs.gentoo.org/"
+ --enable-install-program="arch,$(usev hostname),$(usev kill)"
+ --enable-no-install-program="groups,$(usev !hostname),$(usev !kill),su,uptime"
+ --enable-largefile
+ $(usex caps '' --disable-libcap)
+ $(use_enable nls)
+ $(use_enable acl)
+ $(use_enable multicall single-binary)
+ $(use_enable xattr)
+ $(use_with gmp libgmp)
+ )
+ if tc-is-cross-compiler && [[ ${CHOST} == *linux* ]] ; then
+ export fu_cv_sys_stat_statfs2_bsize=yes #311569
+ export gl_cv_func_realpath_works=yes #416629
+ fi
+
+ export gl_cv_func_mknod_works=yes #409919
+ use static && append-ldflags -static && sed -i '/elf_sys=yes/s:yes:no:' configure #321821
+ use selinux || export ac_cv_{header_selinux_{context,flash,selinux}_h,search_setfilecon}=no #301782
+ use userland_BSD && myconf+=( -program-prefix=g --program-transform-name=s/stat/nustat/ )
+ # kill/uptime - procps
+ # groups/su - shadow
+ # hostname - net-tools
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ # Known to fail with FEATURES=usersandbox (bug #439574):
+ # - tests/du/long-from-unreadable.sh} (bug #413621)
+ # - tests/rm/deep-2.sh (bug #413621)
+ # - tests/dd/no-allocate.sh (bug #629660)
+ if has usersandbox ${FEATURES} ; then
+ ewarn "You are emerging ${P} with 'usersandbox' enabled." \
+ "Expect some test failures or emerge with 'FEATURES=-usersandbox'!"
+ fi
+
+ # Non-root tests will fail if the full path isn't
+ # accessible to non-root users
+ chmod -R go-w "${WORKDIR}"
+ chmod a+rx "${WORKDIR}"
+
+ # coreutils tests like to do `mount` and such with temp dirs
+ # so make sure /etc/mtab is writable #265725
+ # make sure /dev/loop* can be mounted #269758
+ mkdir -p "${T}"/mount-wrappers || die
+ mkwrap() {
+ local w ww
+ for w in "${@}" ; do
+ ww="${T}/mount-wrappers/${w}"
+ cat <<-EOF > "${ww}"
+ #!${EPREFIX}/bin/sh
+ exec env SANDBOX_WRITE="\${SANDBOX_WRITE}:/etc/mtab:/dev/loop" $(type -P ${w}) "\$@"
+ EOF
+ chmod a+rx "${ww}"
+ done
+ }
+ mkwrap mount umount
+
+ addwrite /dev/full
+ #export RUN_EXPENSIVE_TESTS="yes"
+ #export FETISH_GROUPS="portage wheel"
+ env PATH="${T}/mount-wrappers:${PATH}" \
+ emake -j1 -k check
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ newins src/dircolors.hin DIR_COLORS
+
+ if [[ ${USERLAND} == "GNU" ]] ; then
+ cd "${ED%/}"/usr/bin || die
+ dodir /bin
+ # move critical binaries into /bin (required by FHS)
+ local fhs="cat chgrp chmod chown cp date dd df echo false ln ls
+ mkdir mknod mv pwd rm rmdir stty sync true uname"
+ mv ${fhs} ../../bin/ || die "could not move fhs bins"
+ if use hostname; then
+ mv hostname ../../bin/ || die
+ fi
+ if use kill; then
+ mv kill ../../bin/ || die
+ fi
+ if use split-usr ; then
+ # move critical binaries into /bin (common scripts)
+ local com="basename chroot cut dir dirname du env expr head mkfifo
+ mktemp readlink seq sleep sort tail touch tr tty vdir wc yes"
+ mv ${com} ../../bin/ || die "could not move common bins"
+ # create a symlink for uname in /usr/bin/ since autotools require it
+ local x
+ for x in ${com} uname ; do
+ dosym ../../bin/${x} /usr/bin/${x}
+ done
+ fi
+ else
+ # For now, drop the man pages, collides with the ones of the system.
+ rm -rf "${ED%/}"/usr/share/man
+ fi
+
+ if use elibc_Cygwin ; then
+ ! use kill || mv "${ED}"/bin/{,g}kill || die
+ mv "${ED}"/usr/libexec/${PN}/libstdbuf$(get_libname){.exe,} || die
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure you run 'hash -r' in your active shells."
+ ewarn "You should also re-source your shell settings for LS_COLORS"
+ ewarn " changes, such as: source /etc/profile"
+
+ # Help out users using experimental filesystems
+ if grep -qs btrfs "${EROOT%/}"/etc/fstab /proc/mounts ; then
+ case $(uname -r) in
+ 2.6.[12][0-9]|2.6.3[0-7]*)
+ ewarn "You are running a system with a buggy btrfs driver."
+ ewarn "Please upgrade your kernel to avoid silent corruption."
+ ewarn "See: https://bugs.gentoo.org/353907"
+ ;;
+ esac
+ fi
+}
diff --git a/sys-apps/coreutils/files/coreutils-9.0-fix-chmod-symlink-exit.patch b/sys-apps/coreutils/files/coreutils-9.0-fix-chmod-symlink-exit.patch
new file mode 100644
index 0000000000..25b2b72bcb
--- /dev/null
+++ b/sys-apps/coreutils/files/coreutils-9.0-fix-chmod-symlink-exit.patch
@@ -0,0 +1,35 @@
+https://git.savannah.gnu.org/cgit/coreutils.git/patch/?id=e8b56ebd536e82b15542a00c888109471936bfda
+https://lists.gnu.org/archive/html/bug-coreutils/2021-09/msg00031.html
+(and https://lists.gnu.org/archive/html/bug-coreutils/2021-09/msg00035.html)
+
+From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
+Date: Fri, 24 Sep 2021 20:57:41 +0100
+Subject: chmod: fix exit status when ignoring symlinks
+
+* src/chmod.c: Reorder enum so CH_NOT_APPLIED
+can be treated as a non error.
+* tests/chmod/ignore-symlink.sh: A new test.
+* tests/local.mk: Reference the new test.
+* NEWS: Mention the bug fix.
+Fixes https://bugs.gnu.org/50784
+--- a/src/chmod.c
++++ b/src/chmod.c
+@@ -44,8 +44,8 @@ struct change_status
+ enum
+ {
+ CH_NO_STAT,
+- CH_NOT_APPLIED,
+ CH_FAILED,
++ CH_NOT_APPLIED,
+ CH_NO_CHANGE_REQUESTED,
+ CH_SUCCEEDED
+ }
+@@ -322,7 +322,7 @@ process_file (FTS *fts, FTSENT *ent)
+ if ( ! recurse)
+ fts_set (fts, ent, FTS_SKIP);
+
+- return CH_NO_CHANGE_REQUESTED <= ch.status;
++ return CH_NOT_APPLIED <= ch.status;
+ }
+
+ /* Recursively change the modes of the specified FILES (the last entry
diff --git a/sys-apps/help2man/Manifest b/sys-apps/help2man/Manifest
index dc717cbf51..591e813c6c 100644
--- a/sys-apps/help2man/Manifest
+++ b/sys-apps/help2man/Manifest
@@ -1 +1,2 @@
DIST help2man-1.47.16.tar.xz 203036 BLAKE2B 8e06c2c2e90adfc2ab8345908516b15ae50b02a7a9554d5d9beee4373b71c131aeaa0c148b9a988c531bbfe2149c25069af56a79101a4248b6c1adfeb734a132 SHA512 b427e60a9e3d2e805caf1ae84c337b09c7ca6f92b7ff14771f946c4a1bf7adf177df99b9c1c223ad76df99756005ababf5b548ff8e08d4746702ff7f8150b544
+DIST help2man-1.48.5.tar.xz 204672 BLAKE2B 6d96f5f65f8c637d524e5c373f2b89f114adf544c1d3508a9cb51115279b9bf6399c8ebb0a8d831de12ef8cdaca40b6e75412a221efc5d2dd1794e9c9643196f SHA512 800eb0daa9daef8e423d52ede55eee2960122ea0269865295afada4cf4fcc1c6791da8429c3a57c0fc1bf0a14c8a77953952325413a8faa5dd07b1bc5bc0edd1
diff --git a/sys-apps/help2man/files/help2man-1.48.5-cygwin.patch b/sys-apps/help2man/files/help2man-1.48.5-cygwin.patch
new file mode 100644
index 0000000000..aa75d10e38
--- /dev/null
+++ b/sys-apps/help2man/files/help2man-1.48.5-cygwin.patch
@@ -0,0 +1,167 @@
+https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/help2man.git;a=blob;f=help2man-preload-intl.patch;h=2fbc34bbc6bc7a36414257a29fee13944f5c087c;hb=b47c3b0de257e3cda4455e16e196e629c69d28e7
+
+LD_PRELOAD by itself only works with Cygwin builtin functions, but
+textdomain() and friends come from libintl. In order to override
+those functions, we have to "replace" cygintl-?.dll since functions are
+bound to a DLL name at link time. Our replacement will be used since
+it is loaded first by LD_PRELOAD.
+
+But as we are making this *the* libintl, we need to provide
+pass-throughs for the other functions which we're not overriding,
+otherwise Locale::gettext won't load (not to mention the program
+that we're trying to help2man).
+
+--- origsrc/help2man-1.48.5/Makefile.in 2020-03-15 04:52:00.000000000 -0600
++++ src/help2man-1.48.5/Makefile.in 2021-09-07 03:10:00.000000000 -0600
+@@ -76,7 +76,8 @@ install_base:
+
+ install_preload: preload
+ $(MKINSTALLDIRS) $(DESTDIR)$(pkglibdir)
+- $(INSTALL_PROGRAM) $(preload).so $(DESTDIR)$(pkglibdir)
++ $(INSTALL_PROGRAM) lib/cygintl-8.dll $(DESTDIR)$(pkglibdir)
++ ln -sf cygintl-8.dll $(DESTDIR)$(pkglibdir)/$(preload).so
+
+ install_l10n: msg_l10n man_l10n info_l10n
+ set -e; \
+@@ -145,7 +146,9 @@ $(target).h2m: $(srcdir)/$(target).h2m.PL
+
+ preload: $(preload).so
+ $(preload).so: $(srcdir)/$(preload).c
+- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ -fPIC -shared $? $(LIBS)
++ mkdir -p lib
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o lib/cygintl-8.dll -shared $? $(LIBS)
++ ln -sf lib/cygintl-8.dll $@
+
+ man: $(target).1
+ $(target).1: $(srcdir)/$(target).PL $(srcdir)/$(target).h2m.PL
+--- origsrc/help2man-1.48.5/bindtextdomain.c 2009-11-13 00:01:34.000000000 -0600
++++ src/help2man-1.48.5/bindtextdomain.c 2011-12-29 00:24:33.608078600 -0600
+@@ -36,12 +36,34 @@ static char *(*r_textdomain)(char const *) = 0;
+ static char *(*r_bindtextdomain)(char const *, char const *) = 0;
+ static char *(*r_bind_textdomain_codeset)(char const *, char const *) = 0;
+
++#ifdef __CYGWIN__
++static void *RTLD_NEXT = 0;
++static char *(*r_gettext)(const char *) = 0;
++static char *(*r_dgettext)(const char *, const char *) = 0;
++static char *(*r_dcgettext)(const char *, const char *, int) = 0;
++static char *(*r_ngettext)(const char *, const char *, unsigned long int) = 0;
++static char *(*r_dngettext)(const char *, const char *, const char *,
++ unsigned long int) = 0;
++static char *(*r_dcngettext)(const char *, const char *, const char *,
++ unsigned long int, int) = 0;
++static char *(*r_setlocale)(int, const char *) = 0;
++
++#define SYM(sym) libintl_ ## sym
++#else
++#define SYM(sym) sym
++#endif
++
+ void setup()
+ {
+ static int done = 0;
+ if (done++)
+ return;
+
++#ifdef __CYGWIN__
++ if (!(RTLD_NEXT = dlopen("/usr/bin/cygintl-8.dll", RTLD_LAZY)))
++ die("libintl8 not found");
++#endif
++
+ if (!(e_textdomain = getenv("TEXTDOMAIN")))
+ die("TEXTDOMAIN not set");
+
+@@ -57,9 +79,19 @@ void setup()
+ if (!(r_bind_textdomain_codeset = dlsym(RTLD_NEXT,
+ "bind_textdomain_codeset")))
+ die("can't find symbol \"bind_textdomain_codeset\"");
++
++#ifdef __CYGWIN__
++ r_gettext = dlsym(RTLD_NEXT, "libintl_gettext");
++ r_dgettext = dlsym(RTLD_NEXT, "libintl_dgettext");
++ r_dcgettext = dlsym(RTLD_NEXT, "libintl_dcgettext");
++ r_ngettext = dlsym(RTLD_NEXT, "libintl_ngettext");
++ r_dngettext = dlsym(RTLD_NEXT, "libintl_dngettext");
++ r_dcngettext = dlsym(RTLD_NEXT, "libintl_dcngettext");
++ r_setlocale = dlsym(RTLD_NEXT, "libintl_setlocale");
++#endif
+ }
+
+-char *textdomain(char const *domainname)
++char *SYM(textdomain)(char const *domainname)
+ {
+ char *r;
+ setup();
+@@ -70,7 +102,7 @@ char *textdomain(char const *domainname)
+ return r;
+ }
+
+-char *bindtextdomain(char const *domainname, char const *dirname)
++char *SYM(bindtextdomain)(char const *domainname, char const *dirname)
+ {
+ char const *dir = dirname;
+ setup();
+@@ -80,7 +112,7 @@ char *bindtextdomain(char const *domainname,
+ return r_bindtextdomain(domainname, dir);
+ }
+
+-char *bind_textdomain_codeset(char const *domainname, char const *codeset)
++char *SYM(bind_textdomain_codeset)(char const *domainname, char const *codeset)
+ {
+ char *r;
+ setup();
+@@ -90,3 +122,54 @@ char *bind_textdomain_codeset(char const
+
+ return r;
+ }
++
++#ifdef __CYGWIN__
++
++char *libintl_gettext(const char *msgid)
++{
++ setup();
++ return r_gettext(msgid);
++}
++
++char *libintl_dgettext (const char *domainname, const char *msgid)
++{
++ setup();
++ return r_dgettext(domainname, msgid);
++}
++
++char *libintl_dcgettext (const char *domainname, const char *msgid,
++ int category)
++{
++ setup();
++ return r_dcgettext (domainname, msgid, category);
++}
++
++char *libintl_ngettext (const char *msgid1, const char *msgid2,
++ unsigned long int n)
++{
++ setup();
++ return r_ngettext (msgid1, msgid2, n);
++}
++
++char *libintl_dngettext (const char *domainname, const char *msgid1,
++ const char *msgid2, unsigned long int n)
++{
++ setup();
++ return r_dngettext (domainname, msgid1, msgid2, n);
++}
++
++char *libintl_dcngettext (const char *domainname,
++ const char *msgid1, const char *msgid2,
++ unsigned long int n, int category)
++{
++ setup();
++ return r_dcngettext (domainname, msgid1, msgid2, n, category);
++}
++
++char *libintl_setlocale (int i, const char *s)
++{
++ setup();
++ return r_setlocale (i, s);
++}
++
++#endif
diff --git a/sys-apps/help2man/help2man-1.48.5.ebuild b/sys-apps/help2man/help2man-1.48.5.ebuild
new file mode 100644
index 0000000000..6f98d5da46
--- /dev/null
+++ b/sys-apps/help2man/help2man-1.48.5.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="GNU utility to convert program --help output to a man page"
+HOMEPAGE="https://www.gnu.org/software/help2man/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls"
+
+RDEPEND="dev-lang/perl
+ nls? ( dev-perl/Locale-gettext )"
+DEPEND="${RDEPEND}"
+
+DOCS=( debian/changelog NEWS README THANKS ) #385753
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.46.1-linguas.patch
+)
+
+src_prepare() {
+ default
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i \
+ -e 's/-shared/-bundle/' \
+ Makefile.in || die
+ fi
+
+ use elibc_Cygwin && eapply -p2 "${FILESDIR}"/${PN}-1.48.5-cygwin.patch
+}
+
+src_configure() {
+ # Disable gettext requirement as the release includes the gmo files #555018
+ local myeconfargs=(
+ ac_cv_path_MSGFMT=$(type -P false)
+ $(use_enable nls)
+ )
+ econf "${myeconfargs[@]}"
+}
diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
index 128f2ba77a..23c719e776 100644
--- a/sys-apps/portage/Manifest
+++ b/sys-apps/portage/Manifest
@@ -1,3 +1,2 @@
-DIST prefix-portage-3.0.14.tar.bz2 1314909 BLAKE2B 5e5e0390466e5073795fece5d75800e7181f691d9fb81affdf5eb291b72a917a51976a83b9df5db6f5069a567c4c96e94e4ddb485cbff8b6827d281770006f2a SHA512 a41dee35ae3e5eb1c77801640d6cedd75a706993a38d3260348ad13d570c128101443bc761ef6f207a305c0d03aa45fb8a88c29237e116c426382f2e2fd265e6
-DIST prefix-portage-3.0.18.tar.bz2 1348023 BLAKE2B fe0a39611e0a4c2af60f6b73bf56a432193dd859bd3d0a7ab91d5b716b980abe55823c48fa7811bacf152ff9ebfc499792ba37ff94920d3a0d5604536a119d3c SHA512 ca0b78ceda58f225ab5f27e0998d5d9486d9f6609dc94b4471f4b5613fbdb6275c019ff994736cf9d85abb127e207e7065f00aea9f36ad6ebd36c196272cbfb1
DIST prefix-portage-3.0.21.tar.bz2 1339211 BLAKE2B 019cf0f3d2d1c45e7849221fc40b49e2c84949b74c8a8c74fbd2ca451a2dd075fb7b8bfec121a173ca0848c57a5a57a62d465b2957c4eb4d87f6a180299da91e SHA512 0aff5004ae80e2cd9dce740c56c3c2643ef390510c3b3821d893e5c76733d3a8d4e7648963febb29479b9ee155868ec11526a393beb3b383e741451178f39e5a
+DIST prefix-portage-3.0.30.1.tar.bz2 1476396 BLAKE2B 955db5832b1d7d19e25c4ee644f7daa0dbfc7a259ea7018f207865aa8cf5eb8e1e8e2a31c90578162e181af6c043590f239b042e652c3eb2cba9f442bbfc0476 SHA512 1ff8afbee4b204488eb0ecb4bdd216bf754ae015a3bcd298d7b6fb0dd7a671ccbf31d9a4a49be8e3182708641abe008f25df5319e135aa25363b979d49517506
diff --git a/sys-apps/portage/files/portage-3.0.30-ebuildshell.patch b/sys-apps/portage/files/portage-3.0.30-ebuildshell.patch
new file mode 100644
index 0000000000..20f0aab813
--- /dev/null
+++ b/sys-apps/portage/files/portage-3.0.30-ebuildshell.patch
@@ -0,0 +1,349 @@
+From 8c6b115fa0325b5bed2e1a9c4c8e8af45cdecc2e Mon Sep 17 00:00:00 2001
+From: Michael Haubenwallner <michael.haubenwallner@salomon.at>
+Date: Wed, 6 Nov 2013 12:40:05 +0100
+Subject: [PATCH 1/2] Add ebuildshell feature, bug#155161.
+
+---
+ bin/ebuild.sh | 146 ++++++++++++++++++++++++++++++++++-
+ bin/filter-bash-environment.py | 55 +++++++++----
+ bin/save-ebuild-env.sh | 2 +-
+ man/make.conf.5 | 6 ++
+ lib/_emerge/AbstractEbuildProcess.py | 1 +
+ lib/portage/const.py | 1 +
+ 6 files changed, 194 insertions(+), 17 deletions(-)
+
+diff --git a/bin/ebuild.sh b/bin/ebuild.sh
+index f76a48d8e..683a4e9c1 100755
+--- a/bin/ebuild.sh
++++ b/bin/ebuild.sh
+@@ -121,7 +121,7 @@ __qa_source() {
+ __qa_call() {
+ local shopts=$(shopt) OLDIFS="$IFS"
+ local retval
+- "$@"
++ __call-ebuildshell "$@"
+ retval=$?
+ set +e
+ [[ $shopts != $(shopt) ]] &&
+@@ -547,6 +547,150 @@ if [[ -n ${QA_INTERCEPTORS} ]] ; then
+ unset BIN_PATH BIN BODY FUNC_SRC
+ fi
+
++__call-ebuildshell() {
++ if ! has ebuildshell ${FEATURES}; then
++ "$@"
++ return $?
++ fi
++ local __ebuildshell_args=( "$@" )
++ # These are the variables I have seen 'bash -i' maintaining the values for:
++ local __ebuildshell_bash_i_vars="__ebuildshell_.*
++ _ BASH_ARGC BASH_ARGV BASH_COMMAND BASH_LINENO BASH_SOURCE
++ BASH_VERSINFO BASH_SUBSHELL BASHOPTS BASHPID COMP_WORDBREAKS
++ DIRSTACK EUID FUNCNAME GROUPS HISTCMD HISTFILE LINENO PIPESTATUS
++ PPID PS1 PS2 PS3 PS4 PWD RANDOM SECONDS SHELLOPTS UID"
++ # Allow recursive ebuildshell, for use in multibuild.eclass and similar:
++ local __ebuildshell_pid=${BASHPID:-$(__bashpid)}
++ local __ebuildshell_tmpf="${T}/ebuildshell.${__ebuildshell_pid}"
++ rm -f "${__ebuildshell_tmpf}."{ebuild,return}-{env,rovars}
++ (
++ cat <<-EOE
++ # local variables of functions using recursive ebuildshell are
++ # visible to the EXIT trap of that recursive ebuildshell. To
++ # keep them local, we have to filter them from that recursive
++ # ebuildshell's return-env. As 'declare -p' is unable to tell
++ # local-ity of variables, we abuse the trace attribute for local
++ # variables to filter them from the return-env. So we need the
++ # local alias active before declaring any functions.
++ # On a sidehand, this allows for copy&paste of function body
++ # lines including the local keyword.
++ alias local='declare -t'
++ shopt -s expand_aliases
++ EOE
++ (
++ declare -p
++ declare -fp
++ shopt -p
++ [[ ${BASH_VERSINFO[0]} == 3 ]] && export
++ ) |
++ (
++ # we need everything but the bash vars after 'env -i'
++ 2>"${__ebuildshell_tmpf}.ebuild-rovars" \
++ "${PORTAGE_PYTHON:-/tools/haubi/gentoo/s01en24/usr/bin/python}" \
++ "${PORTAGE_BIN_PATH}"/filter-bash-environment.py \
++ --report-readonly-variables \
++ --preserve-readonly-attribute \
++ "${__ebuildshell_bash_i_vars}" \
++ || die "filter-bash-environment.py failed"
++ )
++ # 'declare -g' is available since bash-4.2,
++ # https://bugs.gentoo.org/show_bug.cgi?id=155161#c35
++ if (( ${BASH_VERSINFO[0]} > 4 )) ||
++ (( ${BASH_VERSINFO[0]} == 4 && ${BASH_VERSINFO[1]} >= 2 ))
++ then
++ __ebuildshell_bash42_true=
++ __ebuildshell_bash42_false='#bash-4.2#'
++ else
++ __ebuildshell_bash42_true='#bash-4.2#'
++ __ebuildshell_bash42_false=
++ fi
++ # The already readonly variables, without bash maintained ones:
++ __ebuildshell_ro_ebuild_vars=$(<"${__ebuildshell_tmpf}.ebuild-rovars")
++ cat <<-EOE
++ # properly quote the function arguments
++ $(declare -p __ebuildshell_args)
++ set -- "\${__ebuildshell_args[@]}"
++ unset __ebuildshell_args
++ # be informative about what to do
++ PS1="EBUILD ${PN} $1 \$ "
++ type $1
++ ${__ebuildshell_bash42_false}echo 'warning: preserving variables across phases requires bash-4.2'
++ echo "WANTED: \$@"
++ echo "or use: \"\\\$@\""
++ # use bash history, but not the 'user's real one
++ HISTFILE=~/.bash_history
++ # but do not use history-expansion with '!',
++ # for copy&paste of function body lines containing: !
++ set +H
++ # this is a debugging shell already
++ shopt -u extdebug
++ trap - DEBUG
++ # at exit, dump the current environment
++ trap "
++ unalias local
++ unset -f __call-ebuildshell
++ rm -f '${__ebuildshell_tmpf}.return-'*
++ (
++ (
++ # declare -p does not tell the -g flag,
++ # so we add it by aliasing declare.
++ ${__ebuildshell_bash42_true}echo \"alias declare='declare -g'\"
++ declare -p
++ ${__ebuildshell_bash42_true}echo \"unalias declare\"
++ declare -fp
++ shopt -p | grep -v '\\(expand_aliases\\|extdebug\\)$'
++ $([[ ${BASH_VERSINFO[0]} == 3 ]] && echo export)
++ ) |
++ (
++ # We may have more readonly variables now, yet we
++ # need to filter variables that were readonly before.
++ # And filter local variables by their trace attribute.
++ 2>'${__ebuildshell_tmpf}.return-rovars' \\
++ '${PORTAGE_PYTHON:-/tools/haubi/gentoo/s01en24/usr/bin/python}' \\
++ '${PORTAGE_BIN_PATH}'/filter-bash-environment.py \\
++ --report-readonly-variables \\
++ --preserve-readonly-attribute \\
++ --filter-traced-variables \\
++ '${__ebuildshell_bash_i_vars} \
++ ${__ebuildshell_ro_ebuild_vars}' \\
++ || die 'filter-bash-environment.py failed'
++ )
++ ) > '${__ebuildshell_tmpf}.return-env'
++ " EXIT
++ # can do some cleanup right now
++ rm -f '${__ebuildshell_tmpf}.ebuild-'*
++ EOE
++ ) > "${__ebuildshell_tmpf}.ebuild-env"
++
++ # pre-fill the history with "$@"
++ echo '"$@"' >> ~/.bash_history
++ chown ${PORTAGE_USER:-portage}:${PORTAGE_GROUP:-portage} ~/.bash_history &>/dev/null
++
++ env -i HOME=~ ${BASH} --rcfile "${__ebuildshell_tmpf}.ebuild-env" -i
++
++ # The environment- and exit-status handling after leaving the ebuildshell
++ # prompt is expected to be identical as without the ebuildshell prompt.
++ local __ebuildshell_status=$?
++
++ # We might be in a recursive ebuildshell, but do not want
++ # any aliases being active while sourcing the return-env.
++ local __ebuildshell_orig_aliases=$(alias)
++ unalias -a
++ source "${__ebuildshell_tmpf}.return-env"
++ unalias -a
++ eval "${__ebuildshell_orig_aliases}"
++
++ # Portage has a whitelist of readonly variables: If an ebuild defines
++ # additional readonly variables, their readonly attribute is removed
++ # across ebuild phases. If we ever want to preserve the readonly
++ # attribute of additional ebuild-defined variables across phases,
++ # when returning from the ebuildshell their names are in
++ # "${__ebuildshell_tmpf}.return-rovars"
++ rm -f "${__ebuildshell_tmpf}."{ebuild,return}-{env,rovars}
++
++ return ${__ebuildshell_status}
++}
++
+ # Subshell/helper die support (must export for the die helper).
+ export EBUILD_MASTER_PID=${BASHPID:-$(__bashpid)}
+ trap 'exit 1' SIGTERM
+diff --git a/bin/filter-bash-environment.py b/bin/filter-bash-environment.py
+index 06cac7214..5590dbfc4 100755
+--- a/bin/filter-bash-environment.py
++++ b/bin/filter-bash-environment.py
+@@ -14,7 +14,8 @@
+ br'(^|^declare\s+-\S+\s+|^declare\s+|^export\s+)([^=\s]+)=("|\')?.*$'
+ )
+ close_quote_re = re.compile(br'(\\"|"|\')\s*$')
+-readonly_re = re.compile(br"^declare\s+-(\S*)r(\S*)\s+")
++readonly_re = re.compile(br"^declare\s+-(\S*)r(\S*)\s+([^=\s]+)")
++trace_re = re.compile(br"^declare\s+-\S*t\S*\s+")
+ # declare without assignment
+ var_declare_re = re.compile(br"^declare(\s+-\S+)?\s+([^=\s]+)\s*$")
+
+@@ -30,7 +31,7 @@
+ return close_quote_match is not None and close_quote_match.group(1) == quote
+
+
+-def filter_declare_readonly_opt(line):
++def filter_declare_readonly_opt(line, options):
+ readonly_match = readonly_re.match(line)
+ if readonly_match is not None:
+ declare_opts = b""
+@@ -38,14 +39,19 @@
+ group = readonly_match.group(i)
+ if group is not None:
+ declare_opts += group
++ var = readonly_match.group(3)
++ if '--report-readonly-variables' in options:
++ getattr(sys.stderr, 'buffer', sys.stderr).write(var + b'\n')
++ if '--preserve-readonly-attribute' in options:
++ declare_opts += b'r'
+ if declare_opts:
+- line = b"declare -" + declare_opts + b" " + line[readonly_match.end() :]
++ line = b"declare -" + declare_opts + b" " + var + line[readonly_match.end() :]
+ else:
+- line = b"declare " + line[readonly_match.end() :]
++ line = b"declare " + var + line[readonly_match.end() :]
+ return line
+
+
+-def filter_bash_environment(pattern, file_in, file_out):
++def filter_bash_environment(pattern, file_in, file_out, options):
+ # Filter out any instances of the \1 character from variable values
+ # since this character multiplies each time that the environment
+ # is saved (strange bash behavior). This can eventually result in
+@@ -68,6 +74,8 @@
+ if var_assign_match is not None:
+ quote = var_assign_match.group(3)
+ filter_this = pattern.match(var_assign_match.group(2)) is not None
++ if not filter_this and '--filter-traced-variables' in options:
++ filter_this = trace_re.match(line) is not None
+ # Exclude the start quote when searching for the end quote,
+ # to ensure that the start quote is not misidentified as the
+ # end quote (happens if there is a newline immediately after
+@@ -78,7 +86,7 @@
+ multi_line_quote = quote
+ multi_line_quote_filter = filter_this
+ if not filter_this:
+- line = filter_declare_readonly_opt(line)
++ line = filter_declare_readonly_opt(line, options)
+ file_out.write(line.replace(b"\1", b""))
+ continue
+ else:
+@@ -86,8 +94,10 @@
+ if declare_match is not None:
+ # declare without assignment
+ filter_this = pattern.match(declare_match.group(2)) is not None
++ if not filter_this and '--filter-traced-variables' in options:
++ filter_this = trace_re.match(line) is not None
+ if not filter_this:
+- line = filter_declare_readonly_opt(line)
++ line = filter_declare_readonly_opt(line, options)
+ file_out.write(line)
+ continue
+
+@@ -127,8 +137,28 @@
+ + "intact. The PATTERN is a space separated list of variable names"
+ + " and it supports python regular expression syntax."
+ )
+- usage = "usage: %s PATTERN" % os.path.basename(sys.argv[0])
+- args = sys.argv[1:]
++ usage = "usage: %s [-h|OPTIONS] PATTERN" % os.path.basename(sys.argv[0])
++ args = []
++ known_options = {
++ '--report-readonly-variables':
++ "Write names of readonly variables to stderr.",
++ '--preserve-readonly-attribute':
++ "Preserve the '-r' flag in 'declare -r'.",
++ '--filter-traced-variables':
++ "Filter out variables declared with '-t' attribute."
++ }
++ options = {}
++ for arg in sys.argv[1:]:
++ if arg in known_options.keys():
++ options[arg] = True
++ continue
++ if '-h' == arg or '--help' == arg:
++ sys.stdout.write(usage + "\n\nKnown <options>:\n\n")
++ for option, descr in known_options.items():
++ sys.stdout.write(" " + option + "\t" + descr + "\n")
++ sys.stdout.flush()
++ sys.exit(os.EX_OK)
++ args.append(arg)
+
+ if "-h" in args or "--help" in args:
+ sys.stdout.write(usage + "\n")
+@@ -150,5 +180,5 @@
+ var_pattern.append(br".*\W.*")
+
+ var_pattern = b"^(" + b"|".join(var_pattern) + b")$"
+- filter_bash_environment(re.compile(var_pattern), file_in, file_out)
++ filter_bash_environment(re.compile(var_pattern), file_in, file_out, options)
+ file_out.flush()
+diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
+index bb17382d4..af35a3327 100755
+--- a/bin/save-ebuild-env.sh
++++ b/bin/save-ebuild-env.sh
+@@ -53,7 +53,7 @@
+ einfo einfon ewarn eerror ebegin __eend eend KV_major \
+ KV_minor KV_micro KV_to_int get_KV has \
+ __has_phase_defined_up_to \
+- hasv hasq __qa_source __qa_call \
++ hasv hasq __qa_source __qa_call __call-ebuildshell \
+ addread addwrite adddeny addpredict __sb_append_var \
+ use usev useq has_version portageq \
+ best_version use_with use_enable register_die_hook \
+diff --git a/man/make.conf.5 b/man/make.conf.5
+index b0c1aa4f2..568f350a0 100644
+--- a/man/make.conf.5
++++ b/man/make.conf.5
+@@ -408,6 +408,12 @@ exist). Also see the related \fIunmerge\-backup\fR feature.
+ Use locks to ensure that unsandboxed ebuild phases never execute
+ concurrently. Also see \fIparallel\-install\fR.
+ .TP
++.B ebuildshell
++Drop into an interactive shell for each phase function, meant for
++debugging. Because the shell would normally be used to execute the
++phase function, commands like src_unpack or epatch are available in the
++interactive shell. Use `die` to terminate the merge.
++.TP
+ .B fail\-clean
+ Clean up temporary files after a build failure. This is particularly useful
+ if you have \fBPORTAGE_TMPDIR\fR on tmpfs. If this feature is enabled, you
+diff --git a/lib/_emerge/AbstractEbuildProcess.py b/lib/_emerge/AbstractEbuildProcess.py
+index 370cac529..a521596e5 100644
+--- a/lib/_emerge/AbstractEbuildProcess.py
++++ b/lib/_emerge/AbstractEbuildProcess.py
+@@ -234,6 +234,7 @@
+ null_fd = None
+ if (
+ 0 not in self.fd_pipes
++ and "ebuildshell" not in self.settings.features
+ and self.phase not in self._phases_interactive_whitelist
+ and "interactive" not in self.settings.get("PROPERTIES", "").split()
+ ):
+diff --git a/lib/portage/const.py b/lib/portage/const.py
+index 3c23c85ed..d9c57f300 100644
+--- a/lib/portage/const.py
++++ b/lib/portage/const.py
+@@ -172,6 +172,7 @@
+ "distlocks",
+ "downgrade-backup",
+ "ebuild-locks",
++ "ebuildshell",
+ "fail-clean",
+ "fakeroot",
+ "fixlafiles",
+--
+2.16.1
+
diff --git a/sys-apps/portage/files/portage-3.0.30-prefix-stack.patch b/sys-apps/portage/files/portage-3.0.30-prefix-stack.patch
new file mode 100644
index 0000000000..c49c473ea3
--- /dev/null
+++ b/sys-apps/portage/files/portage-3.0.30-prefix-stack.patch
@@ -0,0 +1,81 @@
+From 1fe30e79c368ce71e024d70c3ec07a6aed3ef262 Mon Sep 17 00:00:00 2001
+From: Michael Haubenwallner <haubi@gentoo.org>
+Date: Fri, 22 Mar 2019 17:52:05 +0100
+Subject: [PATCH] from FEATURES=stacked-prefix to USE=prefix-stack
+
+Rather than telling the base prefix' portage to support stacked prefix,
+be explicit in the stacked prefix about to USE that feature.
+Bug: https://bugs.gentoo.org/658572
+---
+ bin/install-qa-check.d/05prefix | 10 +++-------
+ bin/phase-helpers.sh | 12 ++++--------
+ lib/portage/const.py | 1 -
+ 3 files changed, 7 insertions(+), 16 deletions(-)
+
+diff --git a/bin/install-qa-check.d/05prefix b/bin/install-qa-check.d/05prefix
+index 03da3bbce..4f48e4216 100644
+--- a/bin/install-qa-check.d/05prefix
++++ b/bin/install-qa-check.d/05prefix
+@@ -36,16 +36,12 @@ install_qa_check_prefix() {
+ local WHITELIST=" /usr/bin/env "
+ # shebang can be an absolutised path, bug #342929
+ local eprefix=$(canonicalize ${EPREFIX})
+- # Without the stacked-prefix feature, tests using BPREFIX
+- # are redundant to EPREFIX, but run only if we will fail.
++ # Without USE=prefix-stack, tests using BPREFIX are
++ # redundant to EPREFIX, but run only if we will fail.
+ # Otherways, BPREFIX really is BROOT (the EAPI 7 one).
+ local BPREFIX=${EPREFIX}
+ local bprefix=${eprefix}
+- if has stacked-prefix ${FEATURES} &&
+- [[ -z ${ROOT%/} ]] &&
+- [[ ${CBUILD} == ${CHOST} ]] &&
+- [[ ${EPREFIX} != ${BROOT-${PORTAGE_OVERRIDE_EPREFIX}} ]] &&
+- :; then
++ if has prefix-stack ${USE} ; then
+ BPREFIX=${BROOT-${PORTAGE_OVERRIDE_EPREFIX}}
+ bprefix=$(canonicalize ${BPREFIX})
+ fi
+diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
+index 606b1cdfd..c64f1106b 100644
+--- a/bin/phase-helpers.sh
++++ b/bin/phase-helpers.sh
+@@ -932,18 +932,14 @@ ___best_version_and_has_version_common() {
+ fi ;;
+ esac
+
+- # PREFIX LOCAL: stacked-prefix feature
++ # PREFIX LOCAL: prefix-stack feature
+ if ___eapi_has_prefix_variables &&
+ has "${root_arg}" '--host-root' '-b' &&
+- has stacked-prefix ${FEATURES} &&
++ has prefix-stack ${USE} &&
+ [[ -z ${ROOT%/} ]] &&
+- [[ ${CBUILD} == ${CHOST} ]] &&
+- [[ ${EPREFIX} != ${BROOT-${PORTAGE_OVERRIDE_EPREFIX}} ]] &&
+ :; then
+- # When we merge into another EPREFIX, but not into some ROOT,
+- # and CHOST is equal to CBUILD, build tools found in EPREFIX
+- # perfectly work for the current build environment.
+- # In a "stacked prefix" we explicitly utilize this situation.
++ # When we merge into "stacked" EPREFIX, but not into some ROOT, build
++ # tools found in EPREFIX perfectly work for current build environment.
+ "${FUNCNAME[1]}" "${atom}" && return 0
+ fi
+ # END PREFIX LOCAL
+diff --git a/lib/portage/const.py b/lib/portage/const.py
+index eddce377d..db02cbc56 100644
+--- a/lib/portage/const.py
++++ b/lib/portage/const.py
+@@ -207,8 +207,6 @@ SUPPORTED_FEATURES = frozenset([
+ "usersync",
+ "webrsync-gpg",
+ "xattr",
+- # PREFIX LOCAL
+- "stacked-prefix",
+ ]
+ )
+
+--
+2.19.2
+
diff --git a/sys-apps/portage/portage-3.0.14.ebuild b/sys-apps/portage/portage-3.0.14.ebuild
deleted file mode 100644
index bf3300c246..0000000000
--- a/sys-apps/portage/portage-3.0.14.ebuild
+++ /dev/null
@@ -1,298 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS=no
-PYTHON_COMPAT=( pypy3 python3_{7..9} )
-PYTHON_REQ_USE='bzip2(+),threads(+)'
-
-inherit distutils-r1 linux-info systemd prefix
-
-DESCRIPTION="Portage package manager used in Gentoo Prefix"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
-
-LICENSE="GPL-2"
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-SLOT="0"
-IUSE="apidoc build doc gentoo-dev +ipc +native-extensions rsync-verify selinux xattr"
-
-DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
- >=app-arch/tar-1.27
- dev-lang/python-exec:2
- >=sys-apps/sed-4.0.5 sys-devel/patch
- doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
- apidoc? (
- dev-python/sphinx
- dev-python/sphinx-epytext
- )"
-# Require sandbox-2.2 for bug #288863.
-# For whirlpool hash, require python[ssl] (bug #425046).
-# For compgen, require bash[readline] (bug #445576).
-# app-portage/gemato goes without PYTHON_USEDEP since we're calling
-# the executable.
-RDEPEND="
- app-arch/zstd
- >=app-arch/tar-1.27
- dev-lang/python-exec:2
- !build? (
- >=sys-apps/sed-4.0.5
- app-shells/bash:0[readline]
- >=app-admin/eselect-1.2
- rsync-verify? (
- >=app-portage/gemato-14[${PYTHON_USEDEP}]
- >=app-crypt/openpgp-keys-gentoo-release-20180706
- >=app-crypt/gnupg-2.2.4-r2[ssl(-)]
- )
- )
- elibc_FreeBSD? ( !prefix? ( sys-freebsd/freebsd-bin ) )
- elibc_glibc? ( !prefix? ( >=sys-apps/sandbox-2.2 ) )
- elibc_uclibc? ( !prefix? ( >=sys-apps/sandbox-2.2 ) )
- kernel_linux? ( >=app-misc/pax-utils-0.1.17 )
- kernel_SunOS? ( >=app-misc/pax-utils-0.1.17 )
- kernel_FreeBSD? ( >=app-misc/pax-utils-0.1.17 )
- kernel_Darwin? ( >=app-misc/pax-utils-0.1.18 )
- selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
- xattr? ( kernel_linux? (
- >=sys-apps/install-xattr-0.3
- ) )
- !<app-admin/logrotate-3.8.0
- !<app-portage/gentoolkit-0.4.6
- !<app-portage/repoman-2.3.10"
-PDEPEND="
- !build? (
- >=net-misc/rsync-2.6.4
- userland_GNU? ( >=sys-apps/coreutils-6.4 )
- )"
-# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
-# NOTE: FEATURES=installsources requires debugedit and rsync
-
-SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives https://dev.gentoo.org/~grobian/distfiles"
-
-prefix_src_archives() {
- local x y
- for x in ${@}; do
- for y in ${SRC_ARCHIVES}; do
- echo ${y}/${x}
- done
- done
-}
-
-TARBALL_PV=${PV}
-SRC_URI="mirror://gentoo/prefix-${PN}-${TARBALL_PV}.tar.bz2
- $(prefix_src_archives prefix-${PN}-${TARBALL_PV}.tar.bz2)"
-
-S="${WORKDIR}"/prefix-${PN}-${TARBALL_PV}
-
-pkg_pretend() {
- local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS"
-
- check_extra_config
-}
-
-python_prepare_all() {
- distutils-r1_python_prepare_all
-
- eapply "${FILESDIR}"/${PN}-2.3.62-prefix-stack.patch # 658572
- eapply "${FILESDIR}"/${PN}-2.3.45-ebuildshell.patch # 155161
- if use gentoo-dev; then
- einfo "Disabling --dynamic-deps by default for gentoo-dev..."
- sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \
- -i lib/_emerge/create_depgraph_params.py || \
- die "failed to patch create_depgraph_params.py"
-
- einfo "Enabling additional FEATURES for gentoo-dev..."
- echo 'FEATURES="${FEATURES} strict-keepdir"' \
- >> cnf/make.globals || die
- fi
-
- if use native-extensions; then
- printf "[build_ext]\nportage-ext-modules=true\n" >> \
- setup.cfg || die
- fi
-
- if ! use ipc ; then
- einfo "Disabling ipc..."
- sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
- -i lib/_emerge/AbstractEbuildProcess.py || \
- die "failed to patch AbstractEbuildProcess.py"
- fi
-
- if use xattr && use kernel_linux ; then
- einfo "Adding FEATURES=xattr to make.globals ..."
- echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
- || die "failed to append to make.globals"
- fi
-
- if use build || ! use rsync-verify; then
- sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \
- -e '/^sync-webrsync-verify-signature/s|yes|no|' \
- -i cnf/repos.conf || die "sed failed"
- fi
-
- if [[ -n ${EPREFIX} ]] ; then
- # PREFIX LOCAL: only hack const_autotool
- local extrapath="/usr/sbin:/usr/bin:/sbin:/bin"
- # ok, we can't rely on PORTAGE_ROOT_USER being there yet, as people
- # tend not to update that often, as long as we are a separate ebuild
- # we can assume when unset, it's time for some older trick
- if [[ -z ${PORTAGE_ROOT_USER} ]] ; then
- PORTAGE_ROOT_USER=$(python -c 'from portage.const import rootuser; print rootuser')
- fi
- # We need to probe for bash in the Prefix, because it may not
- # exist, in which case we fall back to the currently in use
- # bash. This logic is necessary in particular during bootstrap,
- # where we pull ourselves out of a temporary place with tools
- local bash="${EPREFIX}/bin/bash"
- [[ ! -x ${bash} ]] && bash=${BASH}
-
- einfo "Adjusting sources for ${EPREFIX}"
- find . -type f -exec \
- sed -e "s|@PORTAGE_EPREFIX@|${EPREFIX}|" \
- -e "s|@PORTAGE_MV@|$(type -P mv)|" \
- -e "s|@PORTAGE_BASH@|${bash}|" \
- -e "s|@PREFIX_PORTAGE_PYTHON@|$(type -P python)|" \
- -e "s|@EXTRA_PATH@|${extrapath}|" \
- -e "s|@portagegroup@|${PORTAGE_GROUP:-portage}|" \
- -e "s|@portageuser@|${PORTAGE_USER:-portage}|" \
- -e "s|@rootuser@|${PORTAGE_ROOT_USER:-root}|" \
- -e "s|@rootuid@|$(id -u ${PORTAGE_ROOT_USER:-root})|" \
- -e "s|@rootgid@|$(id -g ${PORTAGE_ROOT_USER:-root})|" \
- -e "s|@sysconfdir@|${EPREFIX}/etc|" \
- -i '{}' + || \
- die "Failed to patch sources"
- # We don't need the below, since setup.py deals with this (and
- # more) so we don't have to make this correct
- # -e "s|@PORTAGE_BASE@|${EPREFIX}/usr/lib/portage/${EPYTHON}|" \
-
- # remove Makefiles, or else they will get installed
- find . -name "Makefile.*" -delete
-
- einfo "Prefixing shebangs ..."
- while read -r -d $'\0' ; do
- local shebang=$(head -n1 "$REPLY")
- if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
- sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
- die "sed failed"
- fi
- done < <(find . -type f ! -name etc-update -print0)
-
- einfo "Setting gentoo_prefix as reponame for emerge-webrsync"
- sed -i -e 's/repo_name=gentoo/repo_name=gentoo_prefix/' \
- bin/emerge-webrsync || die
-
- einfo "Making absent gemato non-fatal"
- sed -i -e '/exitcode = 127/d' \
- lib/portage/sync/modules/rsync/rsync.py || die
- # END PREFIX LOCAL
- fi
-
- # PREFIX LOCAL: make.conf is written by bootstrap-prefix.sh
- if use !prefix ; then
- cd "${S}/cnf" || die
- if [ -f "make.conf.example.${ARCH}".diff ]; then
- patch make.conf.example "make.conf.example.${ARCH}".diff || \
- die "Failed to patch make.conf.example"
- else
- eerror ""
- eerror "Portage does not have an arch-specific configuration for this arch."
- eerror "Please notify the arch maintainer about this issue. Using generic."
- eerror ""
- fi
- fi
-}
-
-python_compile_all() {
- local targets=()
- use doc && targets+=( docbook )
- use apidoc && targets+=( apidoc )
-
- if [[ ${targets[@]} ]]; then
- esetup.py "${targets[@]}"
- fi
-}
-
-python_test() {
- esetup.py test
-}
-
-python_install() {
- # Install sbin scripts to bindir for python-exec linking
- # they will be relocated in pkg_preinst()
- distutils-r1_python_install \
- --system-prefix="${EPREFIX}/usr" \
- --bindir="$(python_get_scriptdir)" \
- --docdir="${EPREFIX}/usr/share/doc/${PF}" \
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
- --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
- --sbindir="$(python_get_scriptdir)" \
- --sysconfdir="${EPREFIX}/etc" \
- "${@}"
-}
-
-python_install_all() {
- distutils-r1_python_install_all
-
- local targets=()
- use doc && targets+=(
- install_docbook
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
- )
- use apidoc && targets+=(
- install_apidoc
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
- )
-
- # install docs
- if [[ ${targets[@]} ]]; then
- esetup.py "${targets[@]}"
- fi
-
- systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf
-
- # Due to distutils/python-exec limitations
- # these must be installed to /usr/bin.
- local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
- einfo "Moving admin scripts to the correct directory"
- dodir /usr/sbin
- for target in ${sbin_relocations}; do
- einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
- mv "${ED}/usr/bin/${target}" "${ED}/usr/sbin/${target}" || die "sbin scripts move failed!"
- done
-}
-
-pkg_preinst() {
- python_setup
- local sitedir=$(python_get_sitedir)
- [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory"
- env -u DISTDIR \
- -u PORTAGE_OVERRIDE_EPREFIX \
- -u PORTAGE_REPOSITORIES \
- -u PORTDIR \
- -u PORTDIR_OVERLAY \
- PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
- "${PYTHON}" -m portage._compat_upgrade.default_locations || die
-
- env -u BINPKG_COMPRESS \
- PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
- "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die
-
- # elog dir must exist to avoid logrotate error for bug #415911.
- # This code runs in preinst in order to bypass the mapping of
- # portage:portage to root:root which happens after src_install.
- keepdir /var/log/portage/elog
- # This is allowed to fail if the user/group are invalid for prefix users.
- if chown ${PORTAGE_USER}:${PORTAGE_GROUP} "${ED}"/var/log/portage{,/elog} 2>/dev/null ; then
- chmod g+s,ug+rwx "${ED}"/var/log/portage{,/elog}
- fi
-
- if has_version "<${CATEGORY}/${PN}-2.3.77"; then
- elog "The emerge --autounmask option is now disabled by default, except for"
- elog "portions of behavior which are controlled by the --autounmask-use and"
- elog "--autounmask-license options. For backward compatibility, previous"
- elog "behavior of --autounmask=y and --autounmask=n is entirely preserved."
- elog "Users can get the old behavior simply by adding --autounmask to the"
- elog "make.conf EMERGE_DEFAULT_OPTS variable. For the rationale for this"
- elog "change, see https://bugs.gentoo.org/658648."
- fi
-}
diff --git a/sys-apps/portage/portage-3.0.21.ebuild b/sys-apps/portage/portage-3.0.21.ebuild
index bf3300c246..6505c08858 100644
--- a/sys-apps/portage/portage-3.0.21.ebuild
+++ b/sys-apps/portage/portage-3.0.21.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -15,8 +15,12 @@ HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
LICENSE="GPL-2"
KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT="0"
-IUSE="apidoc build doc gentoo-dev +ipc +native-extensions rsync-verify selinux xattr"
+IUSE="apidoc build doc gentoo-dev +ipc +native-extensions rsync-verify selinux test xattr"
+RESTRICT="!test? ( test )"
+BDEPEND="
+ app-arch/xz-utils
+ test? ( dev-vcs/git )"
DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
>=app-arch/tar-1.27
dev-lang/python-exec:2
@@ -32,37 +36,38 @@ DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
# app-portage/gemato goes without PYTHON_USEDEP since we're calling
# the executable.
RDEPEND="
+ !prefix? ( acct-user/portage )
app-arch/zstd
>=app-arch/tar-1.27
dev-lang/python-exec:2
+ >=sys-apps/findutils-4.4
!build? (
>=sys-apps/sed-4.0.5
- app-shells/bash:0[readline]
+ >=app-shells/bash-5.0:0[readline]
>=app-admin/eselect-1.2
rsync-verify? (
- >=app-portage/gemato-14[${PYTHON_USEDEP}]
- >=app-crypt/openpgp-keys-gentoo-release-20180706
+ >=app-portage/gemato-14.5[${PYTHON_USEDEP}]
+ >=sec-keys/openpgp-keys-gentoo-release-20180706
>=app-crypt/gnupg-2.2.4-r2[ssl(-)]
)
)
- elibc_FreeBSD? ( !prefix? ( sys-freebsd/freebsd-bin ) )
elibc_glibc? ( !prefix? ( >=sys-apps/sandbox-2.2 ) )
- elibc_uclibc? ( !prefix? ( >=sys-apps/sandbox-2.2 ) )
- kernel_linux? ( >=app-misc/pax-utils-0.1.17 )
- kernel_SunOS? ( >=app-misc/pax-utils-0.1.17 )
- kernel_FreeBSD? ( >=app-misc/pax-utils-0.1.17 )
- kernel_Darwin? ( >=app-misc/pax-utils-0.1.18 )
+ elibc_musl? ( >=sys-apps/sandbox-2.2 )
+ kernel_linux? ( sys-apps/util-linux )
+ >=app-misc/pax-utils-0.1.18
selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
xattr? ( kernel_linux? (
>=sys-apps/install-xattr-0.3
) )
!<app-admin/logrotate-3.8.0
!<app-portage/gentoolkit-0.4.6
- !<app-portage/repoman-2.3.10"
+ !<app-portage/repoman-2.3.10
+ !~app-portage/repoman-3.0.0"
PDEPEND="
!build? (
>=net-misc/rsync-2.6.4
- userland_GNU? ( >=sys-apps/coreutils-6.4 )
+ >=sys-apps/file-5.41
+ >=sys-apps/coreutils-6.4
)"
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
# NOTE: FEATURES=installsources requires debugedit and rsync
@@ -107,7 +112,7 @@ python_prepare_all() {
fi
if use native-extensions; then
- printf "[build_ext]\nportage-ext-modules=true\n" >> \
+ printf "[build_ext]\nportage_ext_modules=true\n" >> \
setup.cfg || die
fi
@@ -248,7 +253,7 @@ python_install_all() {
esetup.py "${targets[@]}"
fi
- systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf
+ dotmpfiles "${FILESDIR}"/portage-ccache.conf
# Due to distutils/python-exec limitations
# these must be installed to /usr/bin.
@@ -273,10 +278,14 @@ pkg_preinst() {
PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
"${PYTHON}" -m portage._compat_upgrade.default_locations || die
- env -u BINPKG_COMPRESS \
+ env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \
PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
"${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die
+ env -u FEATURES -u PORTAGE_REPOSITORIES \
+ PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
+ "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die
+
# elog dir must exist to avoid logrotate error for bug #415911.
# This code runs in preinst in order to bypass the mapping of
# portage:portage to root:root which happens after src_install.
diff --git a/sys-apps/portage/portage-3.0.18.ebuild b/sys-apps/portage/portage-3.0.30.1.ebuild
index bf3300c246..88a5cd8eac 100644
--- a/sys-apps/portage/portage-3.0.18.ebuild
+++ b/sys-apps/portage/portage-3.0.30.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -15,8 +15,12 @@ HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
LICENSE="GPL-2"
KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT="0"
-IUSE="apidoc build doc gentoo-dev +ipc +native-extensions rsync-verify selinux xattr"
+IUSE="apidoc build doc gentoo-dev +ipc +native-extensions rsync-verify selinux test xattr"
+RESTRICT="!test? ( test )"
+BDEPEND="
+ app-arch/xz-utils
+ test? ( dev-vcs/git )"
DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
>=app-arch/tar-1.27
dev-lang/python-exec:2
@@ -32,37 +36,38 @@ DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
# app-portage/gemato goes without PYTHON_USEDEP since we're calling
# the executable.
RDEPEND="
+ !prefix? ( acct-user/portage )
app-arch/zstd
>=app-arch/tar-1.27
dev-lang/python-exec:2
+ >=sys-apps/findutils-4.4
!build? (
>=sys-apps/sed-4.0.5
- app-shells/bash:0[readline]
+ >=app-shells/bash-5.0:0[readline]
>=app-admin/eselect-1.2
rsync-verify? (
- >=app-portage/gemato-14[${PYTHON_USEDEP}]
- >=app-crypt/openpgp-keys-gentoo-release-20180706
+ >=app-portage/gemato-14.5[${PYTHON_USEDEP}]
+ >=sec-keys/openpgp-keys-gentoo-release-20180706
>=app-crypt/gnupg-2.2.4-r2[ssl(-)]
)
)
- elibc_FreeBSD? ( !prefix? ( sys-freebsd/freebsd-bin ) )
elibc_glibc? ( !prefix? ( >=sys-apps/sandbox-2.2 ) )
- elibc_uclibc? ( !prefix? ( >=sys-apps/sandbox-2.2 ) )
- kernel_linux? ( >=app-misc/pax-utils-0.1.17 )
- kernel_SunOS? ( >=app-misc/pax-utils-0.1.17 )
- kernel_FreeBSD? ( >=app-misc/pax-utils-0.1.17 )
- kernel_Darwin? ( >=app-misc/pax-utils-0.1.18 )
+ elibc_musl? ( >=sys-apps/sandbox-2.2 )
+ kernel_linux? ( sys-apps/util-linux )
+ >=app-misc/pax-utils-0.1.18
selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
xattr? ( kernel_linux? (
>=sys-apps/install-xattr-0.3
) )
!<app-admin/logrotate-3.8.0
!<app-portage/gentoolkit-0.4.6
- !<app-portage/repoman-2.3.10"
+ !<app-portage/repoman-2.3.10
+ !~app-portage/repoman-3.0.0"
PDEPEND="
!build? (
>=net-misc/rsync-2.6.4
- userland_GNU? ( >=sys-apps/coreutils-6.4 )
+ >=sys-apps/file-5.41
+ >=sys-apps/coreutils-6.4
)"
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
# NOTE: FEATURES=installsources requires debugedit and rsync
@@ -93,8 +98,8 @@ pkg_pretend() {
python_prepare_all() {
distutils-r1_python_prepare_all
- eapply "${FILESDIR}"/${PN}-2.3.62-prefix-stack.patch # 658572
- eapply "${FILESDIR}"/${PN}-2.3.45-ebuildshell.patch # 155161
+ eapply "${FILESDIR}"/${PN}-3.0.30-prefix-stack.patch # 658572
+ eapply "${FILESDIR}"/${PN}-3.0.30-ebuildshell.patch # 155161
if use gentoo-dev; then
einfo "Disabling --dynamic-deps by default for gentoo-dev..."
sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \
@@ -107,7 +112,7 @@ python_prepare_all() {
fi
if use native-extensions; then
- printf "[build_ext]\nportage-ext-modules=true\n" >> \
+ printf "[build_ext]\nportage_ext_modules=true\n" >> \
setup.cfg || die
fi
@@ -248,7 +253,7 @@ python_install_all() {
esetup.py "${targets[@]}"
fi
- systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf
+ dotmpfiles "${FILESDIR}"/portage-ccache.conf
# Due to distutils/python-exec limitations
# these must be installed to /usr/bin.
@@ -273,10 +278,14 @@ pkg_preinst() {
PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
"${PYTHON}" -m portage._compat_upgrade.default_locations || die
- env -u BINPKG_COMPRESS \
+ env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \
PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
"${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die
+ env -u FEATURES -u PORTAGE_REPOSITORIES \
+ PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
+ "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die
+
# elog dir must exist to avoid logrotate error for bug #415911.
# This code runs in preinst in order to bypass the mapping of
# portage:portage to root:root which happens after src_install.
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 60ac7bb07b..c2eb112112 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -4,6 +4,8 @@ DIST gcc-10.2.0.tar.xz 75004144 BLAKE2B 1d79397330354e61439283cac96a109bf78ffc72
DIST gcc-10.3.0-patches-3.tar.bz2 18935 BLAKE2B 13eaf1e055b5b63069aed1575ed93f6bc822b5e3f2181ddfc88f4e7ff801f58997cd131b2efd79b90469b1f861db994feb2adcaecacf165442078f76e233fd9a SHA512 c3d6a6f32863cc0ff7c877314ff0c00a892e473f64d16b82d46b4a77aa97c3e7a575492d27f0d423acb2621c86c9a49bca0e26e45bda9e697495444fcac85084
DIST gcc-10.3.0.tar.xz 76692288 BLAKE2B ac7898f5eb8a7c5f151a526d1bb38913a68b50a65e4d010ac09fa20b6c801c671c790d780f23ccb8e4ecdfc686f4aa588082ccc9eb5c80c7b0e30788f824c1eb SHA512 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86
DIST gcc-11.0.0-patches-6.tar.bz2 12744 BLAKE2B 05e8d8b87cd1069bc6c03a6cbd61e5414148b7c6467e5b2ebf03af1493075280d8f1a5a123148f786724e3f813ef7fbb5f2728598ab4ab7879b4e649f592156b SHA512 9e873a40eca07e471a9832ed062575063144554ca306b60a9b5f7da61fa1f148a13fd5ea933c852d105931e452de1c6ab3cd7baf4f80da17b9d81eeb36c5b3fd
+DIST gcc-11.2.0-patches-1.tar.bz2 11537 BLAKE2B 9dd791ada244c9b70b8b99f9f305a688c248134715ed1b26d406e53b114983faae6873cdc521497164388d24d5f61c199e98df146bc02f5578e877295bcf5c82 SHA512 6539efc60c656d0798a5896dc1b944ed69914b815102c7a1c10bdba4ef935abd326b01309f38316e121f1ed90ceb2abcaf65df6af116892daad829ac2623cefc
+DIST gcc-11.2.0.tar.xz 80888824 BLAKE2B 69b61234ac436edfea2933df68c434a2ce7aa4454ef4da573e82587e1a42dc420189e949cfdadaf4cb37fc0de9674822210a95b77ff03aca0dbedfe67df19cc6 SHA512 d53a0a966230895c54f01aea38696f818817b505f1e2bfa65e508753fcd01b2aedb4a61434f41f3a2ddbbd9f41384b96153c684ded3f0fa97c82758d9de5c7cf
DIST gcc-4.1.2-patches-1.5.tar.bz2 53576 BLAKE2B 16dcbf8bac85c3e95a8526ffd504f298ac09fbd79d8ee9f633782ffcd177eb0de256dc8ff36d45dc40dd8582b712e2ea0cd3b2063e3205d51cc022ad7befa7cc SHA512 3c7c15f740ec80aaa6f9c1ad77daeb2a2527f1719fbcc5d96d956e1fe1f24da961b1b030cf2bb631f1a0cc970f6462823e9a78441c9fd6b57f3645b04cd6a362
DIST gcc-4.1.2-uclibc-patches-1.0.tar.bz2 20980 BLAKE2B cfc7dd4c7a0b1ed80c491d4ad56b05b05ff308fdbed2faa1b9f15b10c0f7834ee4ffcb0df1619f959f7a1a5f315305b550665c232404a8a3306e3e615539a0c8 SHA512 57789f4236a3085136afa83be3cef677bd813afd258d67bfdbecd2058f497cd459366d5515044c0208ab753946dc951dac6a3889752ca6dae836d837c22ce33b
DIST gcc-4.1.2.tar.bz2 39707720 BLAKE2B 966b6a64c118456c7fb66eb2ad0dd84b1d53ad88dcbd146f446ef097a6975f5d6a7f1bcbbc4bfcd4e48b00eeb8054728e412db3d9818cff1f195e37859a4e510 SHA512 b97d3b72a3b0355611d5090b2c715b7a774f0e466a89326a0226c2809d12dfafb2d7c5a7af54bd5e00c135bbb6596f535e1a484740f7f1f691e8a57e6f0425cc
diff --git a/sys-devel/gcc/files/gcc-10.3.0-monterey.patch b/sys-devel/gcc/files/gcc-10.3.0-monterey.patch
new file mode 100644
index 0000000000..904414dad1
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-10.3.0-monterey.patch
@@ -0,0 +1,80 @@
+https://github.com/macports/macports-ports/blob/573b82fd5df538ea2ad75e2c2373f4727ef3430c/lang/gcc11/files/patch-darwin21-support.diff
+
+From 20f61faaed3b335d792e38892d826054d2ac9f15 Mon Sep 17 00:00:00 2001
+From: Saagar Jha <saagar@saagarjha.com>
+Date: Tue, 15 Jun 2021 04:08:23 -0700
+Subject: [PATCH] Darwin, config: Amend for Darwin 21 / macOS 12.
+
+It seems that the OS major version is now tracking the kernel
+major version - 9. Minor version tracking is unknown.
+
+Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
+Signed-off-by: Saagar Jha <saagar@saagarjha.com>
+
+gcc/ChangeLog:
+
+ * config.gcc: Adjust for Darwin21.
+ * config/darwin-c.c (macosx_version_as_macro): Likewise.
+ * config/darwin-driver.c (validate_macosx_version_min):
+ Likewise.
+ (darwin_find_version_from_kernel): Likewise.
+
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -679,9 +679,9 @@ case ${target} in
+ *-*-darwin[4-9]* | *-*-darwin1[0-9]*)
+ macos_min=`expr $darwin_maj - 4`
+ ;;
+- *-*-darwin20*)
+- # Darwin 20 corresponds to macOS 11.
+- macos_maj=11
++ *-*-darwin2*)
++ # Darwin 20 corresponds to macOS 11, Darwin 21 to macOS 12.
++ macos_maj=`expr $darwin_maj - 9`
+ def_ld64=609.0
+ ;;
+ *-*-darwin)
+--- a/gcc/config/darwin-c.c
++++ b/gcc/config/darwin-c.c
+@@ -691,7 +691,7 @@ macosx_version_as_macro (void)
+ if (!version_array)
+ goto fail;
+
+- if (version_array[MAJOR] < 10 || version_array[MAJOR] > 11)
++ if (version_array[MAJOR] < 10 || version_array[MAJOR] > 12)
+ goto fail;
+
+ if (version_array[MAJOR] == 10 && version_array[MINOR] < 10)
+--- a/gcc/config/darwin-driver.c
++++ b/gcc/config/darwin-driver.c
+@@ -64,17 +64,17 @@ validate_macosx_version_min (const char *version_str)
+
+ major = strtoul (version_str, &end, 10);
+
+- if (major < 10 || major > 11 ) /* MacOS 10 and 11 are known. */
++ if (major < 10 || major > 12 ) /* macOS 10, 11, and 12 are known. */
+ return NULL;
+
+ /* Skip a separating period, if there's one. */
+ version_str = end + ((*end == '.') ? 1 : 0);
+
+- if (major == 11 && *end != '\0' && !ISDIGIT (version_str[0]))
+- /* For MacOS 11, we allow just the major number, but if the minor is
++ if (major > 10 && *end != '\0' && !ISDIGIT (version_str[0]))
++ /* For macOS 11+, we allow just the major number, but if the minor is
+ there it must be numeric. */
+ return NULL;
+- else if (major == 11 && *end == '\0')
++ else if (major > 10 && *end == '\0')
+ /* We will rewrite 11 => 11.0.0. */
+ need_rewrite = true;
+ else if (major == 10 && (*end == '\0' || !ISDIGIT (version_str[0])))
+@@ -172,7 +172,7 @@ darwin_find_version_from_kernel (void)
+ if (minor_vers > 0)
+ minor_vers -= 1; /* Kernel 20.3 => macOS 11.2. */
+ /* It's not yet clear whether patch level will be considered. */
+- asprintf (&new_flag, "11.%02d.00", minor_vers);
++ asprintf (&new_flag, "%d.%02d.00", major_vers - 9, minor_vers);
+ }
+ else if (major_vers - 4 <= 4)
+ /* On 10.4 and earlier, the old linker is used which does not
diff --git a/sys-devel/gcc/files/gcc-11-illumnos-o_directory.patch b/sys-devel/gcc/files/gcc-11-illumnos-o_directory.patch
new file mode 100644
index 0000000000..fd212e5f47
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-11-illumnos-o_directory.patch
@@ -0,0 +1,65 @@
+fix build on non Solaris 11 (including derivatives)
+
+Solaris 11 got post-release O_DIRECTORY added, so derivatives like
+Illumnos-based don't have this yet. Nor does Solaris 10.
+Use posix_madvise instead of madvise, because the latter isn't declared
+on Solaris.
+
+--- a/c++tools/resolver.cc
++++ b/c++tools/resolver.cc
+@@ -58,6 +58,10 @@
+ #define O_CLOEXEC 0
+ #endif
+
++#ifndef O_DIRECTORY
++# define O_DIRECTORY 0
++#endif
++
+ #ifndef DIR_SEPARATOR
+ #define DIR_SEPARATOR '/'
+ #endif
+--- a/libcody/resolver.cc
++++ b/libcody/resolver.cc
+@@ -22,6 +22,10 @@
+ #define HAVE_FSTATAT 0
+ #endif
+
++#ifndef O_DIRECTORY
++# define O_DIRECTORY 0
++#endif
++
+ // Resolver code
+
+ #if __windows__
+--- a/libsanitizer/sanitizer_common/sanitizer_linux.cpp
++++ b/libsanitizer/sanitizer_common/sanitizer_linux.cpp
+@@ -900,6 +900,9 @@
+ #endif // !SANITIZER_SOLARIS
+
+ #if !SANITIZER_NETBSD
++#ifndef O_DIRECTORY
++# define O_DIRECTORY 0
++#endif
+ // ThreadLister implementation.
+ ThreadLister::ThreadLister(pid_t pid) : pid_(pid), buffer_(4096) {
+ char task_directory_path[80];
+--- a/gcc/cp/module.cc
++++ b/gcc/cp/module.cc
+@@ -1631,7 +1631,7 @@
+ set_error (errno);
+ else
+ {
+- if (madvise (mapping, hdr.pos, MADV_RANDOM))
++ if (posix_madvise (mapping, hdr.pos, MADV_RANDOM))
+ goto fail;
+
+ /* These buffers are never NULL in this case. */
+@@ -1742,7 +1742,7 @@
+ }
+ /* We'll be hopping over this randomly. Some systems declare the
+ first parm as char *, and other declare it as void *. */
+- if (madvise (reinterpret_cast <char *> (mapping), size, MADV_RANDOM))
++ if (posix_madvise (reinterpret_cast <char *> (mapping), size, MADV_RANDOM))
+ goto fail;
+
+ hdr.buffer = (char *)mapping;
diff --git a/sys-devel/gcc/gcc-10.3.0-r2.ebuild b/sys-devel/gcc/gcc-10.3.0-r2.ebuild
index b1e30bf1e1..3b0eecc0a4 100644
--- a/sys-devel/gcc/gcc-10.3.0-r2.ebuild
+++ b/sys-devel/gcc/gcc-10.3.0-r2.ebuild
@@ -59,6 +59,8 @@ src_prepare() {
# fix interoperation with Xcode 12.5, bug #799170
eapply -p1 "${FILESDIR}"/${PN}-10.2.0-xcode-12.5.patch
+ # allow building with macOS 12
+ eapply -p1 "${FILESDIR}"/${PN}-10.3.0-monterey.patch
}
src_configure() {
diff --git a/sys-devel/gcc/gcc-11.2.0.ebuild b/sys-devel/gcc/gcc-11.2.0.ebuild
new file mode 100644
index 0000000000..7a6f5581fe
--- /dev/null
+++ b/sys-devel/gcc/gcc-11.2.0.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PATCH_VER="1"
+
+inherit toolchain
+
+KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+RDEPEND=""
+BDEPEND="
+ kernel_linux? ( ${CATEGORY}/binutils )
+ kernel_Darwin? (
+ || ( ${CATEGORY}/binutils-apple ${CATEGORY}/native-cctools )
+ )"
+
+src_prepare() {
+ has_version '>=sys-libs/glibc-2.32-r1' && rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch"
+ toolchain_src_prepare
+
+ if use elibc_Cygwin; then
+ sed -e '/0001-share-mingw-fset-stack-executable-with-cygwin.patch/d' \
+ -i "${WORKDIR}/gcc-${CYGWINPORTS_GITREV}/gcc.cygport" || die
+ fi
+
+ # make sure 64-bits native targets don't screw up the linker paths
+ eapply -p0 "${FILESDIR}"/no-libs-for-startfile.patch
+ if use prefix; then
+ eapply -p0 "${FILESDIR}"/4.5.2/prefix-search-dirs.patch
+ # try /usr/lib32 in 32bit profile on x86_64-linux (needs
+ # --enable-multilib), but this does make sense in prefix only
+ eapply -p0 "${FILESDIR}"/${PN}-4.8.3-linux-x86-on-amd64.patch
+ fi
+
+ # make it have correct install_names on Darwin
+ eapply -p1 "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # Backport another bootstrapping fix when building with Clang
+ eapply -p1 "${FILESDIR}"/gcc-10.3.0-clang-bootstrap.patch
+ fi
+
+ if [[ ${CHOST} == powerpc*-darwin* ]] ; then
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44107
+ sed -i -e 's|^ifeq (/usr/lib,|ifneq (/usr/lib,|' \
+ libgcc/config/t-slibgcc-darwin || die
+ fi
+
+ # up macosx-version-min from 10.4 to 10.6 on Catalina, bug #767415
+ if [[ ${CHOST} == *-darwin19 ]] ; then
+ sed -i -e 's/=10.4/=10.6/' libgcc/config/t-darwin || die
+ fi
+
+ find . -name "configure" | xargs \
+ sed -i -e '/^\s*10\.\*)/N' \
+ -e '/^\s*10\.\*)\s*_lt_dar_allow_undefined/s/10\.\*/10.*|11.*/' || die
+
+ # fix interoperation with Xcode 12.5, bug #799170
+ eapply -p1 "${FILESDIR}"/${PN}-10.2.0-xcode-12.5.patch
+ # allow building with macOS 12
+ eapply -p1 "${FILESDIR}"/${PN}-10.3.0-monterey.patch
+ # allow building on Solaris derivatives
+ eapply "${FILESDIR}"/${PN}-11-illumnos-o_directory.patch
+}
+
+src_configure() {
+ local myconf=()
+ case ${CTARGET}:" ${USE} " in
+ powerpc*-darwin*)
+ # bug #381179
+ filter-flags "-mcpu=*" "-mtune=*"
+ # bug #657522
+ # A bug in configure checks whether -no-pie works, but the
+ # compiler doesn't pass -no-pie onto the linker if -fno-PIE
+ # isn't passed, so the configure check always finds -no-pie
+ # is accepted. (Likewise, when -fno-PIE is passed, the
+ # compiler passes -no_pie onto the linker.)
+ # Since our linker doesn't grok this, avoid above checks to
+ # be run
+ # NOTE: later ld64 does grok -no_pie, not -no-pie (as checked)
+ export gcc_cv_c_no_fpie=no
+ export gcc_cv_no_pie=no
+ ;;
+ *-darwin20)
+ # use sysroot with the linker, #756160
+ export gcc_cv_ld_sysroot=yes
+ ;;
+ *-solaris*)
+ # todo: some magic for native vs. GNU linking?
+ myconf+=( --with-gnu-ld --with-gnu-as --enable-largefile )
+ # Solaris 11 defines this in its headers, but that causes a
+ # mismatch whilst compiling, bug #657514
+ export ac_cv_func_aligned_alloc=no
+ export ac_cv_func_memalign=no
+ export ac_cv_func_posix_memalign=no
+ ;;
+ i[34567]86-*-linux*:*" prefix "*)
+ # to allow the linux-x86-on-amd64.patch become useful, we need
+ # to enable multilib, even if there is just one multilib option.
+ myconf+=( --enable-multilib )
+ if [[ ${CBUILD:-${CHOST}} == "${CHOST}" ]]; then
+ # we might be on x86_64-linux, but don't do cross-compile, so
+ # tell the host-compiler to really create 32bits (for stage1)
+ # (real x86-linux-gcc also accept -m32).
+ append-flags -m32
+ fi
+ ;;
+ esac
+
+ # Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
+ # least on Solaris, and AIX /bin/sh is way too slow,
+ # so force it to use $BASH (that portage uses) - it can't be EPREFIX
+ # in case that doesn't exist yet
+ export CONFIG_SHELL="${CONFIG_SHELL:-${BASH}}"
+ toolchain_src_configure "${myconf[@]}"
+}
diff --git a/sys-devel/gcc/gcc-11_pre20210226.ebuild b/sys-devel/gcc/gcc-11_pre20210226.ebuild
index e423f88664..3aa29c8610 100644
--- a/sys-devel/gcc/gcc-11_pre20210226.ebuild
+++ b/sys-devel/gcc/gcc-11_pre20210226.ebuild
@@ -53,6 +53,9 @@ src_prepare() {
# found
sed -i -e 's/ALL_SPPFLAGS/ALL_CPPFLAGS/' \
gcc/config/aarch64/t-aarch64 || die
+
+ # allow building with macOS 12
+ eapply -p1 "${FILESDIR}"/${PN}-10.3.0-monterey.patch
}
src_configure() {