From d18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 15 Jun 2021 14:57:03 +0100 Subject: gentoo resync : 15.06.2021 --- sys-libs/Manifest.gz | Bin 14058 -> 14044 bytes sys-libs/fortify-headers/Manifest | 8 +- .../fortify-headers/fortify-headers-0.6.ebuild | 28 - .../fortify-headers/fortify-headers-0.7.ebuild | 21 +- .../fortify-headers/fortify-headers-1.1.ebuild | 36 + .../fortify-headers/fortify-headers-9999.ebuild | 30 +- sys-libs/freeipmi/Manifest | 2 +- sys-libs/freeipmi/freeipmi-1.6.8.ebuild | 2 +- sys-libs/gdbm/Manifest | 3 - sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch | 40 - sys-libs/gdbm/gdbm-1.18.1-r1.ebuild | 53 - sys-libs/glibc/Manifest | 18 +- sys-libs/glibc/glibc-2.19-r2.ebuild | 5 +- sys-libs/glibc/glibc-2.30-r9.ebuild | 5 +- sys-libs/glibc/glibc-2.31-r7.ebuild | 5 +- sys-libs/glibc/glibc-2.32-r6.ebuild | 1514 ------------------- sys-libs/glibc/glibc-2.32-r7.ebuild | 1514 ------------------- sys-libs/glibc/glibc-2.32-r8.ebuild | 7 +- sys-libs/glibc/glibc-2.33-r1.ebuild | 1515 ++++++++++++++++++++ sys-libs/glibc/glibc-2.33.ebuild | 7 +- sys-libs/glibc/glibc-9999.ebuild | 26 +- sys-libs/kpmcore/Manifest | 4 +- sys-libs/kpmcore/kpmcore-21.04.1.ebuild | 34 - sys-libs/kpmcore/kpmcore-21.04.2.ebuild | 34 + sys-libs/libapparmor/Manifest | 5 - .../files/libapparmor-2.10-symbol_visibility.patch | 13 - sys-libs/libapparmor/libapparmor-2.13.4.ebuild | 99 -- sys-libs/libapparmor/libapparmor-3.0.0.ebuild | 100 -- sys-libs/libcap-ng/Manifest | 7 - sys-libs/libcap-ng/libcap-ng-0.7.11.ebuild | 89 -- sys-libs/libcap-ng/libcap-ng-0.8.1-r1.ebuild | 98 -- sys-libs/libcap-ng/libcap-ng-0.8.ebuild | 89 -- sys-libs/libcap/Manifest | 5 - .../files/libcap-2.42-build-system-fixes.patch | 200 --- sys-libs/libcap/libcap-2.43.ebuild | 87 -- sys-libs/libcap/libcap-2.48.ebuild | 89 -- sys-libs/libselinux/Manifest | 2 +- sys-libs/libselinux/libselinux-3.2.ebuild | 2 +- sys-libs/libservicelog/Manifest | 2 + sys-libs/libservicelog/libservicelog-1.1.19.ebuild | 38 + sys-libs/libxcrypt/Manifest | 2 +- sys-libs/libxcrypt/libxcrypt-4.4.17.ebuild | 2 +- sys-libs/musl-nscd/Manifest | 2 + sys-libs/musl-nscd/musl-nscd-1.0.3.ebuild | 48 + sys-libs/musl/Manifest | 4 +- sys-libs/musl/musl-1.2.2-r2.ebuild | 2 +- sys-libs/musl/musl-9999.ebuild | 2 +- sys-libs/readline/Manifest | 10 +- .../files/readline-8.1-windows-signals.patch | 23 + sys-libs/readline/readline-8.0_p4.ebuild | 175 --- sys-libs/readline/readline-8.1.ebuild | 185 --- sys-libs/readline/readline-8.1_p1.ebuild | 1 + sys-libs/zlib-ng/Manifest | 4 +- sys-libs/zlib-ng/zlib-ng-2.0.3.ebuild | 75 - sys-libs/zlib-ng/zlib-ng-2.0.4.ebuild | 75 + 55 files changed, 1879 insertions(+), 4567 deletions(-) delete mode 100644 sys-libs/fortify-headers/fortify-headers-0.6.ebuild create mode 100644 sys-libs/fortify-headers/fortify-headers-1.1.ebuild delete mode 100644 sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch delete mode 100644 sys-libs/gdbm/gdbm-1.18.1-r1.ebuild delete mode 100644 sys-libs/glibc/glibc-2.32-r6.ebuild delete mode 100644 sys-libs/glibc/glibc-2.32-r7.ebuild create mode 100644 sys-libs/glibc/glibc-2.33-r1.ebuild delete mode 100644 sys-libs/kpmcore/kpmcore-21.04.1.ebuild create mode 100644 sys-libs/kpmcore/kpmcore-21.04.2.ebuild delete mode 100644 sys-libs/libapparmor/files/libapparmor-2.10-symbol_visibility.patch delete mode 100644 sys-libs/libapparmor/libapparmor-2.13.4.ebuild delete mode 100644 sys-libs/libapparmor/libapparmor-3.0.0.ebuild delete mode 100644 sys-libs/libcap-ng/libcap-ng-0.7.11.ebuild delete mode 100644 sys-libs/libcap-ng/libcap-ng-0.8.1-r1.ebuild delete mode 100644 sys-libs/libcap-ng/libcap-ng-0.8.ebuild delete mode 100644 sys-libs/libcap/files/libcap-2.42-build-system-fixes.patch delete mode 100644 sys-libs/libcap/libcap-2.43.ebuild delete mode 100644 sys-libs/libcap/libcap-2.48.ebuild create mode 100644 sys-libs/libservicelog/libservicelog-1.1.19.ebuild create mode 100644 sys-libs/musl-nscd/musl-nscd-1.0.3.ebuild create mode 100644 sys-libs/readline/files/readline-8.1-windows-signals.patch delete mode 100644 sys-libs/readline/readline-8.0_p4.ebuild delete mode 100644 sys-libs/readline/readline-8.1.ebuild delete mode 100644 sys-libs/zlib-ng/zlib-ng-2.0.3.ebuild create mode 100644 sys-libs/zlib-ng/zlib-ng-2.0.4.ebuild (limited to 'sys-libs') diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz index 7b188893d247..9d74ad5749ec 100644 Binary files a/sys-libs/Manifest.gz and b/sys-libs/Manifest.gz differ diff --git a/sys-libs/fortify-headers/Manifest b/sys-libs/fortify-headers/Manifest index e9786e75337b..72ca6ff49fa7 100644 --- a/sys-libs/fortify-headers/Manifest +++ b/sys-libs/fortify-headers/Manifest @@ -1,6 +1,6 @@ -DIST fortify-headers-0.6.tar.gz 5339 BLAKE2B 404a20de075551e11750f989e05d78f450b09fc879a7ff4b649773ebc012a93c42432cc7b60c70843a375d64f6aea3ec356cdfafc0133f8cc58dadfea9b982d3 SHA512 6106219332515e7c23354d916383cdac6efccba7eefa13b0c2c221d0fd03be7afb29b3a8622bd29b62ee0b602f9d1f273e1a08c07583bdcd12db9938ef4d7acc DIST fortify-headers-0.7.tar.gz 5524 BLAKE2B 76ec4ee5b50bc77db05bf45a4a5550f3a369e5a49e333cd095613acbc04794d074103f3110c353a3283757f12cec866c45ed7d71ef4509667cae49926ee6953a SHA512 9335d5042f973904cf131d4894c71d3d25c84e82427500064a4ed3f798abd8051c3b52375a17c807ca89227115fa5ba9922939f0e86059a9f04fee61f0b69e53 -EBUILD fortify-headers-0.6.ebuild 638 BLAKE2B 12446ff4e6c6e3bd0f0ced80cd113279246a929a79ad3866b51ce5884f69ea798344dfd0809f3494a3d15c8785abade9ffbe59248b8188007dc33729cc2e6b49 SHA512 48584a51a37366577d6da17a5d1c61891e0ed75c1b65ef749fca5f4174eb81d5221589f454e0490856bac0132684eba9b4cb9e95684aa589faed9213768781b2 -EBUILD fortify-headers-0.7.ebuild 638 BLAKE2B 12446ff4e6c6e3bd0f0ced80cd113279246a929a79ad3866b51ce5884f69ea798344dfd0809f3494a3d15c8785abade9ffbe59248b8188007dc33729cc2e6b49 SHA512 48584a51a37366577d6da17a5d1c61891e0ed75c1b65ef749fca5f4174eb81d5221589f454e0490856bac0132684eba9b4cb9e95684aa589faed9213768781b2 -EBUILD fortify-headers-9999.ebuild 638 BLAKE2B 12446ff4e6c6e3bd0f0ced80cd113279246a929a79ad3866b51ce5884f69ea798344dfd0809f3494a3d15c8785abade9ffbe59248b8188007dc33729cc2e6b49 SHA512 48584a51a37366577d6da17a5d1c61891e0ed75c1b65ef749fca5f4174eb81d5221589f454e0490856bac0132684eba9b4cb9e95684aa589faed9213768781b2 +DIST fortify-headers-1.1.tar.gz 5510 BLAKE2B d0454ad3ba432c051aeabfffad82799fae4ef37c07a8d2b8efcc26cd867dea8b31586f312d2947cb7e6ef7eedcacc3bb68591be4409376cc702ffbbafe144ea0 SHA512 a39d6e7c002bf91085f712aa46bc3f53ff934cc963694a229fa82d84ff4a7556105212a84a231ab5367c01c6a1e385172173f1f4a34d5eb4d2d9c58472c23dd0 +EBUILD fortify-headers-0.7.ebuild 681 BLAKE2B c1642399ee0555b96a8f1f3cc2813427b6dda70260d34ab45cf866df0844267c0467ea44fa0549e19e56851c3072c2b8a4129b2ed6396bb21409faf14c852b09 SHA512 9cabefb0a167b7d327d1801c26749da1044c17c0557a5e971fc520c764c57027493f0dde7a9e3ff3afb6a6d5ecd4849ef5c80a7b7c412df6f8db165fca0f6d03 +EBUILD fortify-headers-1.1.ebuild 862 BLAKE2B db23bac223f4a359e7e984a5a6d364adc8d04e56d32791909a7b6e6bfe678d494fa67d0b6f3068df78c2690bf73ab7a6fef0ad5cf47654879c9afde2aa014a5f SHA512 4040d7ce9bdf4e2a6e6b34cce0abb46b6016419def5f4e31c738cc38abc6a2494c4619be68091b7aa78df973e0a5ba84b1461d5c7f848a7b9ffaf80b7f4c9518 +EBUILD fortify-headers-9999.ebuild 862 BLAKE2B db23bac223f4a359e7e984a5a6d364adc8d04e56d32791909a7b6e6bfe678d494fa67d0b6f3068df78c2690bf73ab7a6fef0ad5cf47654879c9afde2aa014a5f SHA512 4040d7ce9bdf4e2a6e6b34cce0abb46b6016419def5f4e31c738cc38abc6a2494c4619be68091b7aa78df973e0a5ba84b1461d5c7f848a7b9ffaf80b7f4c9518 MISC metadata.xml 252 BLAKE2B f6282e2a99df668246ea8570c72345463f06d282b6adc6d9de2a08ef0827cf4572332c580caa594aad5ba8e200870d8d25494549ee4413798025f0d885b61a68 SHA512 cbda7bf9832872764ae776ce16b2966c37a2ba3a1982d9817006fd6b82d7b17146434cde428bf114062a483e9053d2acdcdd004695e6ebf428d19cdc09937c65 diff --git a/sys-libs/fortify-headers/fortify-headers-0.6.ebuild b/sys-libs/fortify-headers/fortify-headers-0.6.ebuild deleted file mode 100644 index 9f9374176ea0..000000000000 --- a/sys-libs/fortify-headers/fortify-headers-0.6.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -if [[ ${PV} == *9999* ]] ; then - EGIT_REPO_URI="git://git.2f30.org/fortify-headers" - inherit git-r3 -else - SRC_URI="http://git.2f30.org/fortify-headers/snapshot/fortify-headers-${PV}.tar.gz" - KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86" -fi - -DESCRIPTION="A standalone implementation of fortify source." -HOMEPAGE="http://git.2f30.org/fortify-headers/" - -LICENSE="ISC" -SLOT="0" -IUSE="" - -DEPEND="" -RDEPEND="${DEPEND}" - -src_prepare() { - sed -i -e 's|^PREFIX = /usr/local|PREFIX = /usr|g' Makefile - export DESTDIR="${D}" - eapply_user -} diff --git a/sys-libs/fortify-headers/fortify-headers-0.7.ebuild b/sys-libs/fortify-headers/fortify-headers-0.7.ebuild index 9f9374176ea0..12b1d42a9749 100644 --- a/sys-libs/fortify-headers/fortify-headers-0.7.ebuild +++ b/sys-libs/fortify-headers/fortify-headers-0.7.ebuild @@ -1,13 +1,14 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 if [[ ${PV} == *9999* ]] ; then EGIT_REPO_URI="git://git.2f30.org/fortify-headers" inherit git-r3 else - SRC_URI="http://git.2f30.org/fortify-headers/snapshot/fortify-headers-${PV}.tar.gz" + #SRC_URI="http://git.2f30.org/fortify-headers/snapshot/fortify-headers-${PV}.tar.gz" + SRC_URI="https://dl.2f30.org/releases/${P}.tar.gz" KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86" fi @@ -16,13 +17,13 @@ HOMEPAGE="http://git.2f30.org/fortify-headers/" LICENSE="ISC" SLOT="0" -IUSE="" - -DEPEND="" -RDEPEND="${DEPEND}" src_prepare() { - sed -i -e 's|^PREFIX = /usr/local|PREFIX = /usr|g' Makefile - export DESTDIR="${D}" - eapply_user + sed -i -e 's|^PREFIX = /usr/local|PREFIX = /usr|g' Makefile || die + default +} + +src_install() { + export DESTDIR="${ED}" + default } diff --git a/sys-libs/fortify-headers/fortify-headers-1.1.ebuild b/sys-libs/fortify-headers/fortify-headers-1.1.ebuild new file mode 100644 index 000000000000..5347e1e57683 --- /dev/null +++ b/sys-libs/fortify-headers/fortify-headers-1.1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +if [[ ${PV} == *9999* ]] ; then + EGIT_REPO_URI="git://git.2f30.org/fortify-headers" + inherit git-r3 +else + #SRC_URI="http://git.2f30.org/fortify-headers/snapshot/fortify-headers-${PV}.tar.gz" + SRC_URI="https://dl.2f30.org/releases/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86" +fi + +DESCRIPTION="A standalone implementation of fortify source" +HOMEPAGE="http://git.2f30.org/fortify-headers/" + +LICENSE="ISC" +SLOT="0" + +src_prepare() { + sed -i -e 's|^PREFIX = /usr/local|PREFIX = /usr|g' Makefile || die + default +} + +src_compile() { + # Nothing to do here but defining a dummy phase allows us to not trigger + # the catch-all rule and try to install here where we don't have access + # to ${ED} + :; +} + +src_install() { + export DESTDIR="${ED}" + default +} diff --git a/sys-libs/fortify-headers/fortify-headers-9999.ebuild b/sys-libs/fortify-headers/fortify-headers-9999.ebuild index 9f9374176ea0..5347e1e57683 100644 --- a/sys-libs/fortify-headers/fortify-headers-9999.ebuild +++ b/sys-libs/fortify-headers/fortify-headers-9999.ebuild @@ -1,28 +1,36 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 if [[ ${PV} == *9999* ]] ; then EGIT_REPO_URI="git://git.2f30.org/fortify-headers" inherit git-r3 else - SRC_URI="http://git.2f30.org/fortify-headers/snapshot/fortify-headers-${PV}.tar.gz" + #SRC_URI="http://git.2f30.org/fortify-headers/snapshot/fortify-headers-${PV}.tar.gz" + SRC_URI="https://dl.2f30.org/releases/${P}.tar.gz" KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86" fi -DESCRIPTION="A standalone implementation of fortify source." +DESCRIPTION="A standalone implementation of fortify source" HOMEPAGE="http://git.2f30.org/fortify-headers/" LICENSE="ISC" SLOT="0" -IUSE="" - -DEPEND="" -RDEPEND="${DEPEND}" src_prepare() { - sed -i -e 's|^PREFIX = /usr/local|PREFIX = /usr|g' Makefile - export DESTDIR="${D}" - eapply_user + sed -i -e 's|^PREFIX = /usr/local|PREFIX = /usr|g' Makefile || die + default +} + +src_compile() { + # Nothing to do here but defining a dummy phase allows us to not trigger + # the catch-all rule and try to install here where we don't have access + # to ${ED} + :; +} + +src_install() { + export DESTDIR="${ED}" + default } diff --git a/sys-libs/freeipmi/Manifest b/sys-libs/freeipmi/Manifest index f976717fef65..06836dade404 100644 --- a/sys-libs/freeipmi/Manifest +++ b/sys-libs/freeipmi/Manifest @@ -8,5 +8,5 @@ DIST freeipmi-1.6.7.tar.gz 3419196 BLAKE2B 6e07afb7e93ec41c18c82725e781177d8a5fe DIST freeipmi-1.6.8.tar.gz 3426706 BLAKE2B afe3238955786b13aae0e0062028f5c969a8e686b46bea3850696361355b3bd82a55bd93523ea7fe2223fe5bb04922c26b46023f783bd879bbd01e34ffd6d59e SHA512 66cae2aed95ddb3fd9301146d5a1065b61267232d6ced726b106402bf3840a17364a29d7bf6bbe4db7955b77dcd23510f1258aac85ead5c295c876c6fa4333c3 EBUILD freeipmi-1.5.7.ebuild 2344 BLAKE2B 7329bb06a60524102ce6840ed5dfe32034595b84d46fcffc053c7ab94b0f8076259905bfc4aff90161d24720bcfc51e7c1b7bbcb5087d75f4ba9ca73dc8e1e1a SHA512 01db52e96fb2e0e5c599ee235a4c8693242d086298fcee903c43f8708e0afca77fd480ecde02a3b14ee0dd44826334272ecf901f4a6a7b95a78cd74355f44bac EBUILD freeipmi-1.6.7.ebuild 2427 BLAKE2B 260fb05d6e2a0ac544b13038e7dcf67a4281334194cc797ca1e9e38befc20f813ff8ba4c19a85b70f918685f33ef6fe681f40c60983c22f754a34e84aa68042d SHA512 fd127efe81afb6913604de4db0e0c670ca09307fb5fd02f8cc2039e6825135e2af579436a785722021272fb7fc341a3954bbfda6f11e6ebf7b7ea5b5125b099a -EBUILD freeipmi-1.6.8.ebuild 2451 BLAKE2B b94f3860235a034a2913f9a976babc84a35fe7398dad26df4861915d15d5a66718aa81900bfcbdf8400e574d1ad022cdb0170a5128a8728c8495cf663bb47295 SHA512 03eeaeb10a4168e53b71b89c5b336faae0bb1f573bb02b2e2824bec2ce991aa7680d5d8493fd44783c1a79ccfb799fd42d604d4fabda459dd2819fe5603e6f7d +EBUILD freeipmi-1.6.8.ebuild 2458 BLAKE2B 931110983c1913944d47d968d16aae2d35a7f32ae4bbee4ee159d9f4855da26a711cac67e849dc70607436e46534af92d7a7a3fe38fedf9c9041cf0509f06eb5 SHA512 857891113c1eb9c419daf1ad6f948d6412c1c44cc6a28800a35a1c5bbe3921ad5e9bb306fcb509bfb197d26dcaab6500282a840b3b571e298da7e41203a142d8 MISC metadata.xml 376 BLAKE2B f9bd1d470315ace8e1a7b71b77a2616131dec7530cba329cf10118df75e78b5c26e2891f3f5ff78b5df94f1ff67e93e05721d941a94cef847eabfea90b860abf SHA512 10922a1b392edce6cdb447eb2a06694570a88f765fd49eb7f154deed1cb3a33901c68ff1881f3068ae212ba6182c61e598e7ab7d4d683602f4016adc3ca7d7e8 diff --git a/sys-libs/freeipmi/freeipmi-1.6.8.ebuild b/sys-libs/freeipmi/freeipmi-1.6.8.ebuild index 2778e0c06997..55bbd2399070 100644 --- a/sys-libs/freeipmi/freeipmi-1.6.8.ebuild +++ b/sys-libs/freeipmi/freeipmi-1.6.8.ebuild @@ -15,7 +15,7 @@ SRC_URI="mirror://gnu${ALPHA}/${PN}/${MY_P}.tar.gz" LICENSE="GPL-3" SLOT="0" -KEYWORDS="~amd64 ~hppa ~x86" +KEYWORDS="~amd64 ~hppa ~ppc64 ~x86" IUSE="debug nagios" RDEPEND="dev-libs/libgcrypt:0=" diff --git a/sys-libs/gdbm/Manifest b/sys-libs/gdbm/Manifest index 0fcfe158c7e0..3e6bbf5c15af 100644 --- a/sys-libs/gdbm/Manifest +++ b/sys-libs/gdbm/Manifest @@ -1,7 +1,4 @@ -AUX gdbm-1.18.1-gcc-10.patch 1243 BLAKE2B d956231e7df353c203e37054438aa9c50f875e83afbefad5de5d150ee272131a2f4825f330b25a2eaf8aa0e2977645e827934778f77f9752aaa887fe99917b86 SHA512 23dd6edcad930bfffd8248015862674fa12402693a24dea65ba61819d81c9e4eb594223c85483cb6ca5b908967f3509ace2753702118db3e79e7d137b63c00b2 AUX gdbm-1.18.1-gettext.patch 444 BLAKE2B 43496bf0e950e1af452439f881bca4fe5e318717c27692639196884405b0b6ed8e32e056afeda2040f651d26ff1607e69e7f482d023c2b98b7c080b67f3392b2 SHA512 fd033d7de3a1bc53c10115fd27d7001ce1b376126c11f934adf8a25c9df195754835fd707f40c540539553c091fa196115e02bb56cc41702a12a1d4fb1724a52 -DIST gdbm-1.18.1.tar.gz 941863 BLAKE2B b7717224e966321d7499a90214bfb62d0402e867db475ed4eddacfe3944d8d9cca1052e41d625f447936bfb3cbd7f1b79cfe6ff435a018efed3d5a7c5eae52d7 SHA512 adf9d6c5bc843ff0d7f88c2a1667d509973b2d63378d0001d7e74cc10aee6ea498a4513cc88ddf78c32ba4db5cb040b2794f4f1b3338c65d9894058850e2f5ef DIST gdbm-1.19.tar.gz 967861 BLAKE2B 92a1a9c461c763b01d7abced58800aa8db200ae746240c8ef8079a615d920efe95f0d805a8cfa63d8aa6bcbda637bcb07d98d630f58de5678b7633c3fcf6bf9b SHA512 118c5b8cdf74898bfb7c2100302fedf80096be017bf08e80a44486563cad5d93b93567622f2e7c7aceb72f30460504bd0b4ddfccf34df994ed65166e12ecd495 -EBUILD gdbm-1.18.1-r1.ebuild 1357 BLAKE2B aa2a7ab93463f3400b8760ebde02bd1a93164c96c3d7b68807fad6d68002373470583f9e9f9dab78b7171b7579940a171ba688330d3f679431b37b5054ac6e2e SHA512 3e86f0cf3eff1e4c5a8aad315992efd2cb452ef117b1b961612db186144ef42c2158adea2d998e2c2ac58472c379a3553abac0613419884c57922a8fb433eed4 EBUILD gdbm-1.19.ebuild 1316 BLAKE2B 93f38c5f423af1033a05b2225589ce5643941b7bb158b9369d58494356333017ce0eea2e74fdd64b2beccf6754bc192729bdaab24ae703be268fc61ffdb757f4 SHA512 2198bd55c2d87547d3fa4eed0893947b6e33c11299bcbeca744c45c5df5ccb770a66c441c717d3b908e5d72c2a5ce4d9842e962f82bdd2d86b40fdc519724f69 MISC metadata.xml 359 BLAKE2B f58b008f8cd663d499052f6d3ea0f658b3816d28c044a4fb8a341a8ce7382104962f58b5ba881bb1dcfc8835cbfc22782471eb48088c547706caa63c35e21e97 SHA512 12da6a0492c269ebff68bf1b1d5ea44b9e011a9197c353157da04283fe865ffff01d6f6c28ecc73b5985ec39959c1c7911b2aa5c3e905929f41521b7cae0b169 diff --git a/sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch b/sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch deleted file mode 100644 index 9b3e3d736c15..000000000000 --- a/sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch +++ /dev/null @@ -1,40 +0,0 @@ -From ab05ea727942b5c1469e2e86548581264c6e2de4 Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -Date: Sat, 2 May 2020 12:39:39 +0100 -Subject: [PATCH] gdbm: fix link failure against gcc-10 - -Before the change on gcc-10 link failed as: -``` - CCLD gdbmtool -ld: ./libgdbmapp.a(parseopt.o):(.bss+0x8): multiple definition of `parseopt_program_args'; - gdbmtool.o:(.data.rel.local+0x260): first defined here -ld: ./libgdbmapp.a(parseopt.o):(.bss+0x10): multiple definition of `parseopt_program_doc'; - gdbmtool.o:(.data.rel.local+0x268): first defined here -``` - -gcc-10 will change the default from -fcommon to fno-common: - https://gcc.gnu.org/PR85678. - -The fix is to avoid multiple definition and rely on -declarations only. - -Bug: https://bugs.gentoo.org/705898 -Signed-off-by: Sergei Trofimovich ---- - src/parseopt.c | 2 -- - 1 file changed, 2 deletions(-) - ---- a/src/parseopt.c -+++ b/src/parseopt.c -@@ -255,8 +255,6 @@ print_option_descr (const char *descr, size_t lmargin, size_t rmargin) - } - - char *parseopt_program_name; --char *parseopt_program_doc; --char *parseopt_program_args; - const char *program_bug_address = "<" PACKAGE_BUGREPORT ">"; - void (*parseopt_help_hook) (FILE *stream); - --- -2.26.2 - diff --git a/sys-libs/gdbm/gdbm-1.18.1-r1.ebuild b/sys-libs/gdbm/gdbm-1.18.1-r1.ebuild deleted file mode 100644 index 87ad4ca3a375..000000000000 --- a/sys-libs/gdbm/gdbm-1.18.1-r1.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools multilib-minimal - -DESCRIPTION="Standard GNU database libraries" -HOMEPAGE="https://www.gnu.org/software/gdbm/" -SRC_URI="mirror://gnu/gdbm/${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0/6" # libgdbm.so version -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="+berkdb nls +readline static-libs" - -DEPEND=" - readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] ) -" -RDEPEND="${DEPEND}" - -PATCHES=( - "${FILESDIR}"/${PN}-1.18.1-gcc-10.patch - "${FILESDIR}"/${PN}-1.18.1-gettext.patch #696838 -) - -src_prepare() { - default - eautoreconf -} - -multilib_src_configure() { - # gdbm doesn't appear to use either of these libraries - export ac_cv_lib_dbm_main=no ac_cv_lib_ndbm_main=no - - local myeconfargs=( - --includedir="${EPREFIX}"/usr/include/gdbm - $(use_enable berkdb libgdbm-compat) - $(use_enable nls) - $(use_enable static-libs static) - $(use_with readline) - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -multilib_src_install_all() { - einstalldocs - - if ! use static-libs ; then - find "${ED}" -name '*.la' -delete || die - fi - mv "${ED}"/usr/include/gdbm/gdbm.h "${ED}"/usr/include/ || die -} diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index 12790b76133a..b25dac6e3499 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -20,21 +20,19 @@ DIST glibc-2.30-sparc-reg-fix-clobber.patch 6106 BLAKE2B cad6a4cbef5d529519ef486 DIST glibc-2.30.tar.xz 16576920 BLAKE2B bd5aae4c9854f40785b91f83c3b632de6d48d811027ddfe61651cb1bc617db8017d7914c23a770cdd3feed06fcc316da841eea916cdba54179e7eace4ea45484 SHA512 37483990cd653685873e96c45dd1651b32b441b6d7919a68ebe3bae31a0c3f7ce183fc9b110f0b268b353f80312f18370559a1e7aecea0e5aa755c8f2aef1d6b DIST glibc-2.31-patches-9.tar.xz 74712 BLAKE2B 62991b67de4def4cca944e8420d2f0139f88b6754c6bc81072bb321c574c1db22641857345325848e1dfb551c10758f582e4425e687a7921cdbd4e7e7923a047 SHA512 699d898e3a8ed02b04573c675f572076e8f747767bfc577a033a49cd7d9078a7a60ac325acd4bd419a93b56edf90ce067baa7578ab315e27885f1f0e13916354 DIST glibc-2.31.tar.xz 16676764 BLAKE2B 91df1792345f157265eae405185a81fd4b8ce36d4c2388f44b0d5b1ae38174ea374cbc909cd260770b9f38ea58051da13766d4fa22abf41c2d4a2493257b179b SHA512 735e4c0ef10418b6ea945ad3906585e5bbd8b282d76f2131309dce4cec6b15066a5e4a3731773ce428a819b542579c9957867bb0abf05ed2030983fca4412306 -DIST glibc-2.32-patches-5.tar.xz 53116 BLAKE2B b2bd9d2cc7fb8f7d3cd96d8439842c30aeed4703e69f959a470967d82dc37ce141f747387c793a3ee6663ed8889af1bcca87fd9ca66c51f1099bba36fe6759d5 SHA512 b3b2baf7b25e28cd4884c4d61f1337b3e49c39dc3f6d789e7cb0a1e180402028da9e8a69828940d2e9676a857d6248da1173d45e8465adca4e148bc2bd76cb62 -DIST glibc-2.32-patches-6.tar.xz 54552 BLAKE2B 3c14b7849f53a3c9132c50c4ddcf6cfe42eabfabdfab21231bc1834e030ace88cc2121e4e1e8e74d9137e5b0692b5aca8b62762437317dc57665a1ea63d05014 SHA512 0e03891d992b211ffc5ef21d604f9f8a0adc783af46eea5a81c28024ff13f793dd236f83652eec19308645c9dd68c6017c64626f14edf30fdaeccd65af2167b7 DIST glibc-2.32-patches-8.tar.xz 65532 BLAKE2B 00c572cff396e52313d0324f7bc28192a65f06b22fc5a04aa631b76b3016842365006399715531ee693f3519720edcebef7884247f2f8c19e3518c1ddafab7cc SHA512 5240bc3a6df46d12c03ea4ce7b1a0df85301256ae3bd003fd04c61dadaaec34998873bf20544d891f6eedf896302bb916010aebc1d8d646a3cce09a93b533d0b DIST glibc-2.32.tar.xz 16744512 BLAKE2B a56b4afbb35315c5cd6dca0f62e44455dceae3e6e88a8453621f9a5394a60ddf10ca9309b2db0911830c7fd77e3faa5d94694eb94d5b2c05fc5285cef52255da SHA512 8460c155b7003e04f18dabece4ed9ad77445fa2288a7dc08e80a8fc4c418828af29e0649951bd71a54ea2ad2d4da7570aafd9bdfe4a37e9951b772b442afe50b DIST glibc-2.33-patches-3.tar.xz 37076 BLAKE2B 718ab706df85c966145958fb6137b5499c1989ff27a62c22beaabd530d641e4937e6d6ab0cf00052b649dc99c3acc319997640eef95669235dab864f5e0afc9f SHA512 6d460976610a1c3bd3dabee9250008b5b3024ba486d598f85bc81cbd0b88188d125714b93a8b253f9b59b292e998f35118562e2a3ca90c418ff14fa53af2a7c3 +DIST glibc-2.33-patches-4.tar.xz 60124 BLAKE2B a7a99f39c16df241745772c31b10946dc44c51e6c09f8a447b905e7dd6ba529aee08f66a581431453c6665485ac1848861559aa3f0aaba8c2061c1f1eb77d9be SHA512 05c33dc465a98097f836783bb5037dfa14b3a2c0c140014f642ea72954222ae919fe2db9573ee70ca9c1881b3b59dd4b815a8f39f331494fa12951c9012797ef DIST glibc-2.33.tar.xz 17031280 BLAKE2B 703d12121c1e2c5d9e0c6ba5341f5fb5c4d9111611a83f2360029b5de9c6e5a5611249d1833684a58ed4afdf49cae614365d87ec8721ba0e5d218f593b1f229d SHA512 4cb5777b68b22b746cc51669e0e9282b43c83f6944e42656e6db7195ebb68f2f9260f130fdeb4e3cfc64efae4f58d96c43d388f52be1eb024ca448084684abdb DIST locale-gen-2.00.tar.gz 7738 BLAKE2B cde6de5ba3400aea24d0d5f1b79471f89f09fb747c8e371e38316c7ada92f967e0865f573f23cb353d82419c234724143c0aeca9eb70eb945dfc581cc7491eb1 SHA512 b609fddb9ec5e567c008841fef3390eddb5d6e7699a8271b3b8c0ade1b44b0ac2e5d1daa8b9acabf3432e3b88110b538a96f209b1ad0f9e988b7efce66606dff DIST locale-gen-2.10.tar.gz 7747 BLAKE2B 49f569c5ae5260fca128503bc6f22d6f6f1cda817920c41fdadadf1527bbb4f3eb161f79fa729830666a4673e9092f99f4685ec8fcac8ddea0b8242bca9c1f4f SHA512 e350e60d458d67638e3090711fca05af6fafac06c51b97648244549f8a0621dab7543f09dc7ad4c62392f13bdae8e5875dc6d0b6c3d83efc29d116bc2eef92db -EBUILD glibc-2.19-r2.ebuild 38329 BLAKE2B 95d17a7eb672b99a74df49b6bba6a6634522dd992325b6c2e72dbd19518f634d6820be39fd4abb9c98930ff3663b3c631151468cdc9f244188045492acaf45e8 SHA512 60e72c109d18486e17126f5372656107fe202509424775a9bcc14e32bc59d2629c7e64bfeac4be22cce8f86fb424162b78939e1755e8c6626d98901e90f78671 +EBUILD glibc-2.19-r2.ebuild 38454 BLAKE2B 6019c17c3cd333132abd3d88afd019367d451e6727a7528524ad8835a62d1a741068041dce840c0350a1acdfd8eddb840ac38a9cf6d25dcf46b07c98a31137b3 SHA512 e14489e34e3db70740b31e7b1250884a57a597021f913cd86cd4d946a4b8ceef2ed3fbc409b0c0b13526e128306276c96d48e5f437620835b5d1cf245d778262 EBUILD glibc-2.25-r11.ebuild 6071 BLAKE2B aed6cdc8141eb47e7f734ca59e98314d0c5340f619a1a2bb0d895942e46835932f50ac240faa54d6926a6b30a951d4c3ec7e25ee16aa20050a2c581b3cf61098 SHA512 d83bfefb81b42ad7efc056eb7bb3054263356b98f475b29ce032a0a623eb51bd23fc6a5adb8941b14c1fcd1267b1eeac2eb52fa11827df3250ce4fb2fb1de010 -EBUILD glibc-2.30-r9.ebuild 43278 BLAKE2B 836802d5e28a4202964e13f708f61bd65be495b43baebfccb26935b78bf8e6493bc74483f7c5d88649c186476f0c12459d09b62688b67eadcc75af4e89390b74 SHA512 a2579650e72968a516cdf7c115ef7d72a46c8ce5ca3f52e7a762cccb9c4fff31de7d8856ac2ecd28613055c2b2265f07df60d583289fd375d12512cdef75cd7c -EBUILD glibc-2.31-r7.ebuild 44397 BLAKE2B c43a3104751b92239d2bba5121d2d03d0c1279ea5b84e6c62a3e23d5ef9f76cad1fe5177baec2085db75c5a5f9d8005acd85b9fa470589142c3974b5c1206163 SHA512 2b96b8b1fac60df14d6f4853380356d87715fca652f575b163e9e06541dc6b80c3cd9add0022ffcac4aa9aa6ff113e55866575422882333f197a8b0e7aa89720 -EBUILD glibc-2.32-r6.ebuild 44725 BLAKE2B d1bbd4f9362d42c262ccd2f2f99802d000fab7268347056bffcd9af24646bf8f9d64f24ac6efea50189cecb26c8b011853b1775ac7e070e8a4dd87072ecf0c68 SHA512 8127942411ae8494552f75a2134221df085c5d1330a1671173acae951c880786c8da4293fc23d206736cffd821c40e5a28eae862318b4c1983cb1fdefb45f3c8 -EBUILD glibc-2.32-r7.ebuild 44728 BLAKE2B 56b47e092aab1918b0a9b5bf6b804322a7045a2d17522411312204b82911514e5278aa4b6d063b158ab29d5501c44de62033834debe5ccc1ccb9c40844128c7a SHA512 aa741cb727653c6896b8d3c4382eb232d1847ba54244f7a644d2c07ec393d7edd97e77acd6cd73252f3d44ced99ce637a291047e9ba4b4ff4dff117ca4cce10b -EBUILD glibc-2.32-r8.ebuild 44736 BLAKE2B d0536afe64d441de0c19686699e956dd9bc90af7d15ac12d392904eef552d54ddb209fcc00f36ddb010d0c77fa55e58b11a37b510654dee4012adfb7712118ec SHA512 5dab53cf1c940cad56004a91d4ced422193272d3994e8ee272958c22702392c891273343f59c62ab4c9660bcc130bc477c4e54c2b07c6d448ea597296efe707e -EBUILD glibc-2.33.ebuild 43875 BLAKE2B 6c6e540497fbe25a2b663ad98b34ec5db7ff473f0b74698f6f89b9f634c3cfcc7d94a2a20451ef3002af82935c73bf38c05ca83dc5635764cfd832a280722f75 SHA512 df82b1f210b7aa3339187c441beea50e69d1fe796fbfeaf924abb35c6d53f9d667d8c40289921b18221ab55af98b18027c2819a96cf522f49df60cf05e05c44c -EBUILD glibc-9999.ebuild 43887 BLAKE2B 760b8d67d86cc1f7f10c2c955deadeb82b7e7d2d8a84c687bc9b264a3264aed63941028e1191a6ed227c8286acceb9099c3db1a21f8ba72ffcb378529ef1a811 SHA512 35a11056f3faff6df0fdc7beebdb3ce17562012b2cd3dc799efa1ec4b67f3cea0abc4810451d9d063fa5e2d47009f67c3ece50c26757ebd47cd178839643d294 +EBUILD glibc-2.30-r9.ebuild 43403 BLAKE2B 039f1e866d0ecbe7e6805265694800ed4873a5643b5ccbaedd18c24ab42bdb2797bd4a597d3cb5321a527eb4feda555b31a143ce80f984774f2ae5498b57c45f SHA512 b9843ca092e6814b23ac1b9741bec02bd9d54a6d48df3caf451e65eae8db2068137a425c9d03d86daccdf67c856f8bf1c8200b8c95461fcbc7aa790599fdccd6 +EBUILD glibc-2.31-r7.ebuild 44522 BLAKE2B 1adfba68c35d3af5ec8476b2fe5d3bebf13880eeacb5aaa8438b41b98f5b275f0816a0e654446f62ee2f34f412c5c6e72befcc0deb8988b6faec2c53a07601a9 SHA512 5247b1d75efa86b1a1c85a09219f54d402aae8aaecf0e377ca663a984daf7c69ea97b3072fe83a20002ec7d72661ec7737fbc72982122b58c26cb5bc89997548 +EBUILD glibc-2.32-r8.ebuild 44853 BLAKE2B 724f95c0ed2cda18dc2edcaa03b0783a2bc603b72a67e1451535040ddc83be6d1a90ad4b30f9623140b5c0a329ecafb6f19793390137e629d43a3c26e202b28a SHA512 0973b86c266e40203e301cf0c6f8fddc4273c002ffb8fd6c16f6e78f2cfdfbea95fda04adfebb8ee84a14dc950763ba706eadadb2e83f7982b800bee636d5d8f +EBUILD glibc-2.33-r1.ebuild 45023 BLAKE2B 9e900bf100a7242efa2023ac31191bb3983600c93e933c1a41dff16cb0ebf0c7fb2bfd3e98e08cda854c475f1bc79c008f0f6fdc1835eb27332c29b60d8562a6 SHA512 cbfe1246fffa6f0789a09a5dd8bb1415d587b106aaf375280b65033ee3fe0bb8cf708d0ec56fee4c61a090288d9487f34bafcb7900457c484e1c990fc55db49f +EBUILD glibc-2.33.ebuild 43992 BLAKE2B b5fd1fa3b2e2b727574028241e7805cab448b37d3975502f12140e2cd6cf98784af36393a1116c13ebaa490db3f18b7b20a56bd53343015abc521201c193eb3f SHA512 911c152ce3ff50ff79db9d53b570ff0fcf837549a072656fef8ad429d02788f89d6ee1266605c539dcbcf273aa791cf075043e8b4895eb8d67404be531631086 +EBUILD glibc-9999.ebuild 45035 BLAKE2B 1868d9c2d762697c31de330955fbfc8a201e15e7f631e2e20fe99eda85716044709a3d1c353841cf2339f040e37bee542a46f95d2e2546bd66319ad7a8130822 SHA512 f8e2257dbffda00fba7c1caad84856944ee9c893ec53ec00cc2b4dbfe1ff2b3f7bc2e9a97c6df93c4b80e416ecdd9320026017e2c0354019ca179c5775662f4b MISC metadata.xml 1611 BLAKE2B 3bd777c160ea20cdbd86cca791d9fd4ff02f8d100344235ec74fff37d5cae1e7119e0ec26969707e75a983dcdb23e994559c8be128ef40fa0ec9ed655017466d SHA512 08be6d085ac47b140fff17a3be8cee77e066a4536cdce76fa44c77875dec2a9dc236ff67ff44301abf75cb196d1902feb2a139dda420220248b46dd9cdb16b9f diff --git a/sys-libs/glibc/glibc-2.19-r2.ebuild b/sys-libs/glibc/glibc-2.19-r2.ebuild index 74facde07363..933241c81394 100644 --- a/sys-libs/glibc/glibc-2.19-r2.ebuild +++ b/sys-libs/glibc/glibc-2.19-r2.ebuild @@ -1078,7 +1078,6 @@ glibc_do_src_install() { n64 /lib64/ld.so.1 # powerpc ppc /lib/ld.so.1 - ppc64 /lib64/ld64.so.1 # s390 s390 /lib/ld.so.1 s390x /lib/ld64.so.1 @@ -1091,12 +1090,16 @@ glibc_do_src_install() { ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 ) ;; big) ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 ) ;; esac diff --git a/sys-libs/glibc/glibc-2.30-r9.ebuild b/sys-libs/glibc/glibc-2.30-r9.ebuild index 6999aab3d92f..c914722d46b0 100644 --- a/sys-libs/glibc/glibc-2.30-r9.ebuild +++ b/sys-libs/glibc/glibc-2.30-r9.ebuild @@ -1215,7 +1215,6 @@ glibc_do_src_install() { n64 /lib64/ld.so.1 # powerpc ppc /lib/ld.so.1 - ppc64 /lib64/ld64.so.1 # riscv lp64d /lib/ld-linux-riscv64-lp64d.so.1 lp64 /lib/ld-linux-riscv64-lp64.so.1 @@ -1231,12 +1230,16 @@ glibc_do_src_install() { ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 ) ;; big) ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 ) ;; esac diff --git a/sys-libs/glibc/glibc-2.31-r7.ebuild b/sys-libs/glibc/glibc-2.31-r7.ebuild index c9d28dcd752a..975a2dec59c9 100644 --- a/sys-libs/glibc/glibc-2.31-r7.ebuild +++ b/sys-libs/glibc/glibc-2.31-r7.ebuild @@ -1242,7 +1242,6 @@ glibc_do_src_install() { n64 /lib64/ld.so.1 # powerpc ppc /lib/ld.so.1 - ppc64 /lib64/ld64.so.1 # riscv lp64d /lib/ld-linux-riscv64-lp64d.so.1 lp64 /lib/ld-linux-riscv64-lp64.so.1 @@ -1258,12 +1257,16 @@ glibc_do_src_install() { ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 ) ;; big) ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 ) ;; esac diff --git a/sys-libs/glibc/glibc-2.32-r6.ebuild b/sys-libs/glibc/glibc-2.32-r6.ebuild deleted file mode 100644 index b22bf22729e2..000000000000 --- a/sys-libs/glibc/glibc-2.32-r6.ebuild +++ /dev/null @@ -1,1514 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9} ) -TMPFILES_OPTIONAL=1 - -inherit python-any-r1 prefix toolchain-funcs flag-o-matic gnuconfig \ - multilib systemd multiprocessing tmpfiles - -DESCRIPTION="GNU libc C library" -HOMEPAGE="https://www.gnu.org/software/libc/" -LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" -SLOT="2.2" - -EMULTILIB_PKG="true" - -# Gentoo patchset (ignored for live ebuilds) -PATCH_VER=5 -PATCH_DEV=slyfox - -if [[ ${PV} == 9999* ]]; then - inherit git-r3 -else - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" - SRC_URI="mirror://gnu/glibc/${P}.tar.xz" - SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" - SRC_URI+=" riscv? ( https://dev.gentoo.org/~dilfridge/distfiles/backport-rv32.txz )" -fi - -RELEASE_VER=${PV} - -GCC_BOOTSTRAP_VER=20201208 - -LOCALE_GEN_VER=2.10 - -SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz" -SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" - -IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla" - -# Minimum kernel version that glibc requires -MIN_KERN_VER="3.2.0" - -# Here's how the cross-compile logic breaks down ... -# CTARGET - machine that will target the binaries -# CHOST - machine that will host the binaries -# CBUILD - machine that will build the binaries -# If CTARGET != CHOST, it means you want a libc for cross-compiling. -# If CHOST != CBUILD, it means you want to cross-compile the libc. -# CBUILD = CHOST = CTARGET - native build/install -# CBUILD != (CHOST = CTARGET) - cross-compile a native build -# (CBUILD = CHOST) != CTARGET - libc for cross-compiler -# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler -# For install paths: -# CHOST = CTARGET - install into / -# CHOST != CTARGET - install into /usr/CTARGET/ -# -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - -# Note [Disable automatic stripping] -# Disabling automatic stripping for a few reasons: -# - portage's attempt to strip breaks non-native binaries at least on -# arm: bug #697428 -# - portage's attempt to strip libpthread.so.0 breaks gdb thread -# enumeration: bug #697910. This is quite subtle: -# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. -# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols -# via 'ps_pglobal_lookup' symbol defined in gdb. -# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all -# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' -# (unexported) is used to sanity check compatibility before enabling -# debugging. -# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint -# * normal 'strip' command trims '.symtab' -# Thus our main goal here is to prevent 'libpthread.so.0' from -# losing it's '.symtab' entries. -# As Gentoo's strip does not allow us to pass less aggressive stripping -# options and does not check the machine target we strip selectively. - -# We need a new-enough binutils/gcc to match upstream baseline. -# Also we need to make sure our binutils/gcc supports TLS, -# and that gcc already contains the hardened patches. -# Lastly, let's avoid some openssh nastiness, bug 708224, as -# convenience to our users. - -# gzip, grep, awk are needed by locale-gen, bug 740750 - -BDEPEND=" - ${PYTHON_DEPS} - >=app-misc/pax-utils-0.1.10 - sys-devel/bison - doc? ( sys-apps/texinfo ) - !compile-locales? ( - app-arch/gzip - sys-apps/grep - virtual/awk - ) -" -COMMON_DEPEND=" - gd? ( media-libs/gd:2= ) - nscd? ( selinux? ( - audit? ( sys-process/audit ) - caps? ( sys-libs/libcap ) - ) ) - suid? ( caps? ( sys-libs/libcap ) ) - selinux? ( sys-libs/libselinux ) - systemtap? ( dev-util/systemtap ) - !' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') - ALT_BUILD_HEADERS=${header_path%/linux/version.h} - fi - fi - fi - echo "${ALT_BUILD_HEADERS}" -} - -alt_libdir() { - echo $(alt_prefix)/$(get_libdir) -} -alt_usrlibdir() { - echo $(alt_prefix)/usr/$(get_libdir) -} - -builddir() { - echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1" -} - -do_compile_test() { - local ret save_cflags=${CFLAGS} - CFLAGS+=" $1" - shift - - pushd "${T}" >/dev/null - - rm -f glibc-test* - printf '%b' "$*" > glibc-test.c - - # Most of the time CC is already set, but not in early sanity checks. - nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}" - ret=$? - - popd >/dev/null - - CFLAGS=${save_cflags} - return ${ret} -} - -do_run_test() { - local ret - - if [[ ${MERGE_TYPE} == "binary" ]] ; then - # ignore build failures when installing a binary package #324685 - do_compile_test "" "$@" 2>/dev/null || return 0 - else - if ! do_compile_test "" "$@" ; then - ewarn "Simple build failed ... assuming this is desired #324685" - return 0 - fi - fi - - pushd "${T}" >/dev/null - - ./glibc-test - ret=$? - rm -f glibc-test* - - popd >/dev/null - - return ${ret} -} - -setup_target_flags() { - # This largely mucks with compiler flags. None of which should matter - # when building up just the headers. - just_headers && return 0 - - case $(tc-arch) in - x86) - # -march needed for #185404 #199334 - # TODO: When creating the first glibc cross-compile, this test will - # always fail as it does a full link which in turn requires glibc. - # Probably also applies when changing multilib profile settings (e.g. - # enabling x86 when the profile was amd64-only previously). - # We could change main to _start and pass -nostdlib here so that we - # only test the gcc code compilation. Or we could do a compile and - # then look for the symbol via scanelf. - if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then - local t=${CTARGET_OPT:-${CTARGET}} - t=${t%%-*} - filter-flags '-march=*' - export CFLAGS="-march=${t} ${CFLAGS}" - einfo "Auto adding -march=${t} to CFLAGS #185404" - fi - ;; - amd64) - # -march needed for #185404 #199334 - # TODO: See cross-compile issues listed above for x86. - [[ ${ABI} == x86 ]] && - if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then - local t=${CTARGET_OPT:-${CTARGET}} - t=${t%%-*} - # Normally the target is x86_64-xxx, so turn that into the -march that - # gcc actually accepts. #528708 - [[ ${t} == "x86_64" ]] && t="x86-64" - filter-flags '-march=*' - # ugly, ugly, ugly. ugly. - CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") - export CFLAGS_x86="${CFLAGS_x86} -march=${t}" - einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" - fi - ;; - mips) - # The mips abi cannot support the GNU style hashes. #233233 - filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both - ;; - ppc|ppc64) - # Many arch-specific implementations do not work on ppc with - # cache-block not equal to 128 bytes. This breaks memset: - # https://sourceware.org/PR26522 - # https://bugs.gentoo.org/737996 - # Use default -mcpu=. For ppc it means non-multiarch setup. - filter-flags '-mcpu=*' - ;; - sparc) - # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. - filter-flags "-fcall-used-g7" - append-flags "-fcall-used-g6" - - local cpu - case ${CTARGET} in - sparc64-*) - cpu="sparc64" - case $(get-flag mcpu) in - v9) - # We need to force at least v9a because the base build doesn't - # work with just v9. - # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 - append-flags "-Wa,-xarch=v9a" - ;; - esac - ;; - sparc-*) - case $(get-flag mcpu) in - v8|supersparc|hypersparc|leon|leon3) - cpu="sparcv8" - ;; - *) - cpu="sparcv9" - ;; - esac - ;; - esac - [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" - ;; - esac -} - -setup_flags() { - # Make sure host make.conf doesn't pollute us - if is_crosscompile || tc-is-cross-compiler ; then - CHOST=${CTARGET} strip-unsupported-flags - fi - - # Store our CFLAGS because it's changed depending on which CTARGET - # we are building when pulling glibc on a multilib profile - CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} - CFLAGS=${CFLAGS_BASE} - CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} - CXXFLAGS=${CXXFLAGS_BASE} - ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} - ASFLAGS=${ASFLAGS_BASE} - - # Allow users to explicitly avoid flag sanitization via - # USE=custom-cflags. - if ! use custom-cflags; then - # Over-zealous CFLAGS can often cause problems. What may work for one - # person may not work for another. To avoid a large influx of bugs - # relating to failed builds, we strip most CFLAGS out to ensure as few - # problems as possible. - strip-flags - # Lock glibc at -O2; we want to be conservative here. - filter-flags '-O?' - append-flags -O2 - fi - strip-unsupported-flags - filter-flags -m32 -m64 '-mabi=*' - - # glibc aborts if rpath is set by LDFLAGS - filter-ldflags '-Wl,-rpath=*' - - # #492892 - filter-flags -frecord-gcc-switches - - unset CBUILD_OPT CTARGET_OPT - if use multilib ; then - CTARGET_OPT=$(get_abi_CTARGET) - [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) - fi - - setup_target_flags - - if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then - CBUILD_OPT=${CTARGET_OPT} - fi - - # glibc's headers disallow -O0 and fail at build time: - # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" - replace-flags -O0 -O1 - - filter-flags '-fstack-protector*' -} - -want_tls() { - # Archs that can use TLS (Thread Local Storage) - case $(tc-arch) in - x86) - # requires i486 or better #106556 - [[ ${CTARGET} == i[4567]86* ]] && return 0 - return 1 - ;; - esac - return 0 -} - -want__thread() { - want_tls || return 1 - - # For some reason --with-tls --with__thread is causing segfaults on sparc32. - [[ ${PROFILE_ARCH} == "sparc" ]] && return 1 - - [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD} - - # only test gcc -- can't test linking yet - tc-has-tls -c ${CTARGET} - WANT__THREAD=$? - - return ${WANT__THREAD} -} - -use_multiarch() { - # Allow user to disable runtime arch detection in multilib. - use multiarch || return 1 - # Make sure binutils is new enough to support indirect functions, - # #336792. This funky sed supports gold and bfd linkers. - local bver nver - bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') - case $(tc-arch ${CTARGET}) in - amd64|x86) nver="2.20" ;; - arm) nver="2.22" ;; - hppa) nver="2.23" ;; - ppc|ppc64) nver="2.20" ;; - # ifunc support was added in 2.23, but glibc also needs - # machinemode which is in 2.24. - s390) nver="2.24" ;; - sparc) nver="2.21" ;; - *) return 1 ;; - esac - ver_test ${bver} -ge ${nver} -} - -# Setup toolchain variables that had historically been defined in the -# profiles for these archs. -setup_env() { - # silly users - unset LD_RUN_PATH - unset LD_ASSUME_KERNEL - - if is_crosscompile || tc-is-cross-compiler ; then - multilib_env ${CTARGET_OPT:-${CTARGET}} - - if ! use multilib ; then - MULTILIB_ABIS=${DEFAULT_ABI} - else - MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} - fi - - # If the user has CFLAGS_ in their make.conf, use that, - # and fall back on CFLAGS. - local VAR=CFLAGS_${CTARGET//[-.]/_} - CFLAGS=${!VAR-${CFLAGS}} - einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" - fi - - setup_flags - - export ABI=${ABI:-${DEFAULT_ABI:-default}} - - if just_headers ; then - # Avoid mixing host's CC and target's CFLAGS_${ABI}: - # At this bootstrap stage we have only binutils for - # target but not compiler yet. - einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." - return 0 - fi - local VAR=CFLAGS_${ABI} - # We need to export CFLAGS with abi information in them because glibc's - # configure script checks CFLAGS for some targets (like mips). Keep - # around the original clean value to avoid appending multiple ABIs on - # top of each other. - : ${__GLIBC_CC:=$(tc-getCC ${CTARGET})} - export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}" - einfo " $(printf '%15s' 'Manual CC:') ${CC}" -} - -foreach_abi() { - setup_env - - local ret=0 - local abilist="" - if use multilib ; then - abilist=$(get_install_abis) - else - abilist=${DEFAULT_ABI} - fi - local -x ABI - for ABI in ${abilist:-default} ; do - setup_env - einfo "Running $1 for ABI ${ABI}" - $1 - : $(( ret |= $? )) - done - return ${ret} -} - -glibc_banner() { - local b="Gentoo ${PVR}" - [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}" - echo "${b}" -} - -# The following Kernel version handling functions are mostly copied from portage -# source. It's better not to use linux-info.eclass here since a) it adds too -# much magic, see bug 326693 for some of the arguments, and b) some of the -# functions are just not provided. - -g_get_running_KV() { - uname -r - return $? -} - -g_KV_major() { - [[ -z $1 ]] && return 1 - local KV=$@ - echo "${KV%%.*}" -} - -g_KV_minor() { - [[ -z $1 ]] && return 1 - local KV=$@ - KV=${KV#*.} - echo "${KV%%.*}" -} - -g_KV_micro() { - [[ -z $1 ]] && return 1 - local KV=$@ - KV=${KV#*.*.} - echo "${KV%%[^[:digit:]]*}" -} - -g_KV_to_int() { - [[ -z $1 ]] && return 1 - local KV_MAJOR=$(g_KV_major "$1") - local KV_MINOR=$(g_KV_minor "$1") - local KV_MICRO=$(g_KV_micro "$1") - local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) - - # We make version 2.2.0 the minimum version we will handle as - # a sanity check ... if its less, we fail ... - if [[ ${KV_int} -ge 131584 ]] ; then - echo "${KV_int}" - return 0 - fi - return 1 -} - -g_int_to_KV() { - local version=$1 major minor micro - major=$((version / 65536)) - minor=$(((version % 65536) / 256)) - micro=$((version % 256)) - echo ${major}.${minor}.${micro} -} - -eend_KV() { - [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] - eend $? -} - -get_kheader_version() { - printf '#include \nLINUX_VERSION_CODE\n' | \ - $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ - tail -n 1 -} - -# We collect all sanity checks here. Consistency is not guranteed between -# pkg_ and src_ phases, so we call this function both in pkg_pretend and in -# src_unpack. -sanity_prechecks() { - # Prevent native builds from downgrading - if [[ ${MERGE_TYPE} != "buildonly" ]] && \ - [[ -z ${ROOT} ]] && \ - [[ ${CBUILD} == ${CHOST} ]] && \ - [[ ${CHOST} == ${CTARGET} ]] ; then - - # The high rev # is to allow people to downgrade between -r# - # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 - # should be fine. Hopefully we never actually use a r# this - # high. - if has_version ">${CATEGORY}/${P}-r10000" ; then - eerror "Sanity check to keep you from breaking your system:" - eerror " Downgrading glibc is not supported and a sure way to destruction." - [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." - fi - - if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then - eerror "Your old kernel is broken. You need to update it to a newer" - eerror "version as syscall() will break. See bug 279260." - die "Old and broken kernel." - fi - fi - - # Users have had a chance to phase themselves, time to give em the boot - if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then - eerror "You still haven't deleted ${EROOT}/etc/locales.build." - eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher." - die "Lazy upgrader detected" - fi - - if [[ ${CTARGET} == i386-* ]] ; then - eerror "i386 CHOSTs are no longer supported." - eerror "Chances are you don't actually want/need i386." - eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" - die "Please fix your CHOST" - fi - - if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then - ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." - ewarn "This will result in a 50% performance penalty when running with a 32bit" - ewarn "hypervisor, which is probably not what you want." - fi - - # Check for sanity of /etc/nsswitch.conf - if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then - local entry - for entry in passwd group shadow; do - if ! egrep -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then - eerror "Your ${EROOT}/etc/nsswitch.conf is out of date." - eerror "Please make sure you have 'files' entries for" - eerror "'passwd:', 'group:' and 'shadow:' databases." - eerror "For more details see:" - eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26" - die "nsswitch.conf has no 'files' provider in '${entry}'." - fi - done - fi - - # ABI-specific checks follow here. Hey, we have a lot more specific conditions that - # we test for... - if ! is_crosscompile ; then - if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then - ebegin "Checking that IA32 emulation is enabled in the running kernel" - echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" - local STAT - if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then - "${T}/check-ia32-emulation.elf32" - STAT=$? - else - # Don't fail here to allow single->multi ABI switch - # or recover from breakage like bug #646424 - ewarn "Failed to compile the ABI test. Broken host glibc?" - STAT=0 - fi - rm -f "${T}/check-ia32-emulation.elf32" - eend $STAT - [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc." - fi - - fi - - # When we actually have to compile something... - if ! just_headers ; then - ebegin "Checking gcc for __thread support" - if ! eend $(want__thread ; echo $?) ; then - echo - eerror "Could not find a gcc that supports the __thread directive!" - eerror "Please update your binutils/gcc and try again." - die "No __thread support in gcc!" - fi - - if [[ ${CTARGET} == *-linux* ]] ; then - local run_kv build_kv want_kv - - run_kv=$(g_get_running_KV) - build_kv=$(g_int_to_KV $(get_kheader_version)) - want_kv=${MIN_KERN_VER} - - if ! is_crosscompile && ! tc-is-cross-compiler ; then - # Building fails on an non-supporting kernel - ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" - if ! eend_KV ${run_kv} ${want_kv} ; then - echo - eerror "You need a kernel of at least ${want_kv}!" - die "Kernel version too low!" - fi - fi - - ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" - if ! eend_KV ${build_kv} ${want_kv} ; then - echo - eerror "You need linux-headers of at least ${want_kv}!" - die "linux-headers version too low!" - fi - fi - fi -} - -# -# the phases -# - -# pkg_pretend - -pkg_pretend() { - # All the checks... - einfo "Checking general environment sanity." - sanity_prechecks -} - -pkg_setup() { - # see bug 682570 - [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup -} - -# src_unpack - -src_unpack() { - # Consistency is not guaranteed between pkg_ and src_ ... - sanity_prechecks - - use multilib && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz - - setup_env - - if [[ ${PV} == 9999* ]] ; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" - EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git - git-r3_src_unpack - mv patches-git/9999 patches || die - - EGIT_REPO_URI="https://sourceware.org/git/glibc.git" - EGIT_CHECKOUT_DIR=${S} - git-r3_src_unpack - else - unpack ${P}.tar.xz - - cd "${WORKDIR}" || die - unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz - fi - - cd "${WORKDIR}" || die - unpack locale-gen-${LOCALE_GEN_VER}.tar.gz - use riscv && unpack backport-rv32.txz -} - -src_prepare() { - local patchsetname - if ! use vanilla ; then - if [[ ${PV} == 9999* ]] ; then - patchsetname="from git master" - else - patchsetname="${RELEASE_VER}-${PATCH_VER}" - fi - elog "Applying Gentoo Glibc Patchset ${patchsetname}" - eapply "${WORKDIR}"/patches - einfo "Done." - - if use riscv ; then - elog "Adding rv32 backport patchset for glibc-2.32 (experimental)" - eapply "${WORKDIR}"/backport-rv32 - einfo "Done." - fi - fi - - default - - gnuconfig_update - - cd "${WORKDIR}" - find . -name configure -exec touch {} + - - # move the external locale-gen to its old place - mkdir extra || die - mv locale-gen-${LOCALE_GEN_VER} extra/locale || die - - eprefixify extra/locale/locale-gen - - # Fix permissions on some of the scripts. - chmod u+x "${S}"/scripts/*.sh - - cd "${S}" -} - -glibc_do_configure() { - # Glibc does not work with gold (for various reasons) #269274. - tc-ld-disable-gold - - # CXX isnt handled by the multilib system, so if we dont unset here - # we accumulate crap across abis - unset CXX - - einfo "Configuring glibc for nptl" - - if use doc ; then - export MAKEINFO=makeinfo - else - export MAKEINFO=/dev/null - fi - - local v - for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do - einfo " $(printf '%15s' ${v}:) ${!v}" - done - - # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 - # To build .S (assembly) files with the same ABI-specific flags - # upstream currently recommends adding CFLAGS to CC/CXX: - # https://sourceware.org/PR23273 - # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS - # and breaks multiarch support. See 659030#c3 for an example. - # The glibc configure script doesn't properly use LDFLAGS all the time. - export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}" - einfo " $(printf '%15s' 'Manual CC:') ${CC}" - - # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 - export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}" - - if is_crosscompile; then - # Assume worst-case bootstrap: glibc is buil first time - # when ${CTARGET}-g++ is not available yet. We avoid - # building auxiliary programs that require C++: bug #683074 - # It should not affect final result. - export libc_cv_cxx_link_ok=no - # The line above has the same effect. We set CXX explicitly - # to make build logs less confusing. - export CXX= - fi - einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" - - # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure - # can't detect them automatically due to ${CHOST} mismatch and fallbacks - # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). - export NM="$(tc-getNM ${CTARGET})" - export READELF="$(tc-getREADELF ${CTARGET})" - einfo " $(printf '%15s' 'Manual NM:') ${NM}" - einfo " $(printf '%15s' 'Manual READELF:') ${READELF}" - - echo - - local myconf=() - - case ${CTARGET} in - m68k*) - # setjmp() is not compatible with stack protection: - # https://sourceware.org/PR24202 - myconf+=( --enable-stack-protector=no ) - ;; - powerpc-*) - # Currently gcc on powerpc32 generates invalid code for - # __builtin_return_address(0) calls. Normally programs - # don't do that but malloc hooks in glibc do: - # https://gcc.gnu.org/PR81996 - # https://bugs.gentoo.org/629054 - myconf+=( --enable-stack-protector=no ) - ;; - *) - # Use '=strong' instead of '=all' to protect only functions - # worth protecting from stack smashes. - # '=all' is also known to have a problem in IFUNC resolution - # tests: https://sourceware.org/PR25680, bug #712356. - myconf+=( --enable-stack-protector=$(usex ssp strong no) ) - ;; - esac - myconf+=( --enable-stackguard-randomization ) - - # Keep a whitelist of targets supporing IFUNC. glibc's ./configure - # is not robust enough to detect proper support: - # https://bugs.gentoo.org/641216 - # https://sourceware.org/PR22634#c0 - case $(tc-arch ${CTARGET}) in - # Keep whitelist of targets where autodetection mostly works. - amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;; - # Blacklist everywhere else - *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; - esac - - # Enable Intel Control-flow Enforcement Technology on amd64 if requested - case ${CTARGET} in - x86_64-*) myconf+=( $(use_enable cet) ) ;; - *) ;; - esac - - [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) - - myconf+=( --enable-kernel=${MIN_KERN_VER} ) - - # Since SELinux support is only required for nscd, only enable it if: - # 1. USE selinux - # 2. only for the primary ABI on multilib systems - # 3. Not a crosscompile - if ! is_crosscompile && use selinux ; then - if use multilib ; then - if is_final_abi ; then - myconf+=( --with-selinux ) - else - myconf+=( --without-selinux ) - fi - else - myconf+=( --with-selinux ) - fi - else - myconf+=( --without-selinux ) - fi - - # Force a few tests where we always know the answer but - # configure is incapable of finding it. - if is_crosscompile ; then - export \ - libc_cv_c_cleanup=yes \ - libc_cv_forced_unwind=yes - fi - - myconf+=( - --without-cvs - --disable-werror - --enable-bind-now - --build=${CBUILD_OPT:-${CBUILD}} - --host=${CTARGET_OPT:-${CTARGET}} - $(use_enable profile) - $(use_with gd) - --with-headers=$(build_eprefix)$(alt_build_headers) - --prefix="$(host_eprefix)/usr" - --sysconfdir="$(host_eprefix)/etc" - --localstatedir="$(host_eprefix)/var" - --libdir='$(prefix)'/$(get_libdir) - --mandir='$(prefix)'/share/man - --infodir='$(prefix)'/share/info - --libexecdir='$(libdir)'/misc/glibc - --with-bugurl=https://bugs.gentoo.org/ - --with-pkgversion="$(glibc_banner)" - $(use_enable crypt) - $(use_multiarch || echo --disable-multi-arch) - $(use_enable static-pie) - $(use_enable systemtap) - $(use_enable nscd) - - # locale data is arch-independent - # https://bugs.gentoo.org/753740 - libc_cv_complocaledir='${exec_prefix}/lib/locale' - - ${EXTRA_ECONF} - ) - - # We rely on sys-libs/timezone-data for timezone tools normally. - myconf+=( $(use_enable vanilla timezone-tools) ) - - # These libs don't have configure flags. - ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) - ac_cv_lib_cap_cap_init=$(usex caps || echo no) - - # There is no configure option for this and we need to export it - # since the glibc build will re-run configure on itself - export libc_cv_rootsbindir="$(host_eprefix)/sbin" - export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" - - # We take care of patching our binutils to use both hash styles, - # and many people like to force gnu hash style only, so disable - # this overriding check. #347761 - export libc_cv_hashstyle=no - - local builddir=$(builddir nptl) - mkdir -p "${builddir}" - cd "${builddir}" - set -- "${S}"/configure "${myconf[@]}" - echo "$@" - "$@" || die "failed to configure glibc" - - # ia64 static cross-compilers are a pita in so much that they - # can't produce static ELFs (as the libgcc.a is broken). so - # disable building of the programs for those targets if it - # doesn't work. - # XXX: We could turn this into a compiler test, but ia64 is - # the only one that matters, so this should be fine for now. - if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then - sed -i '1i+link-static = touch $@' config.make - fi - - # If we're trying to migrate between ABI sets, we need - # to lie and use a local copy of gcc. Like if the system - # is built with MULTILIB_ABIS="amd64 x86" but we want to - # add x32 to it, gcc/glibc don't yet support x32. - # - if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then - echo 'main(){}' > "${T}"/test.c - if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then - sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die - fi - fi -} - -glibc_headers_configure() { - export ABI=default - - local builddir=$(builddir "headers") - mkdir -p "${builddir}" - cd "${builddir}" - - # if we don't have a compiler yet, we can't really test it now ... - # hopefully they don't affect header generation, so let's hope for - # the best here ... - local v vars=( - ac_cv_header_cpuid_h=yes - libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes - libc_cv_asm_cfi_directives=yes - libc_cv_broken_visibility_attribute=no - libc_cv_c_cleanup=yes - libc_cv_compiler_powerpc64le_binary128_ok=yes - libc_cv_forced_unwind=yes - libc_cv_gcc___thread=yes - libc_cv_mlong_double_128=yes - libc_cv_mlong_double_128ibm=yes - libc_cv_ppc_machine=yes - libc_cv_ppc_rel16=yes - libc_cv_predef_fortify_source=no - libc_cv_target_power8_ok=yes - libc_cv_visibility_attribute=yes - libc_cv_z_combreloc=yes - libc_cv_z_execstack=yes - libc_cv_z_initfirst=yes - libc_cv_z_nodelete=yes - libc_cv_z_nodlopen=yes - libc_cv_z_relro=yes - libc_mips_abi=${ABI} - libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) - # These libs don't have configure flags. - ac_cv_lib_audit_audit_log_user_avc_message=no - ac_cv_lib_cap_cap_init=no - ) - - einfo "Forcing cached settings:" - for v in "${vars[@]}" ; do - einfo " ${v}" - export ${v} - done - - local headers_only_arch_CPPFLAGS=() - - # Blow away some random CC settings that screw things up. #550192 - if [[ -d ${S}/sysdeps/mips ]]; then - pushd "${S}"/sysdeps/mips >/dev/null - sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die - sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die - - # Force the mips ABI to the default. This is OK because the set of - # installed headers in this phase is the same between the 3 ABIs. - # If this ever changes, this hack will break, but that's unlikely - # as glibc discourages that behavior. - # https://crbug.com/647033 - sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die - - popd >/dev/null - fi - - case ${CTARGET} in - riscv*) - # RISC-V interrogates the compiler to determine which target to - # build. If building the headers then we don't strictly need a - # RISC-V compiler, so the built-in definitions that are provided - # along with all RISC-V compiler might not exist. This causes - # glibc's RISC-V preconfigure script to blow up. Since we're just - # building the headers any value will actually work here, so just - # pick the standard one (rv64g/lp64d) to make the build scripts - # happy for now -- the headers are all the same anyway so it - # doesn't matter. - headers_only_arch_CPPFLAGS+=( - -D__riscv_xlen=64 - -D__riscv_flen=64 - -D__riscv_float_abi_double=1 - -D__riscv_atomic=1 - ) ;; - esac - - local myconf=() - myconf+=( - --disable-sanity-checks - --enable-hacker-mode - --without-cvs - --disable-werror - --enable-bind-now - --build=${CBUILD_OPT:-${CBUILD}} - --host=${CTARGET_OPT:-${CTARGET}} - --with-headers=$(build_eprefix)$(alt_build_headers) - --prefix="$(host_eprefix)/usr" - ${EXTRA_ECONF} - ) - - # Nothing is compiled here which would affect the headers for the target. - # So forcing CC/CFLAGS is sane. - local headers_only_CC=$(tc-getBUILD_CC) - local headers_only_CFLAGS="-O1 -pipe" - local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" - local headers_only_LDFLAGS="" - set -- "${S}"/configure "${myconf[@]}" - echo \ - "CC=${headers_only_CC}" \ - "CFLAGS=${headers_only_CFLAGS}" \ - "CPPFLAGS=${headers_only_CPPFLAGS}" \ - "LDFLAGS=${headers_only_LDFLAGS}" \ - "$@" - CC=${headers_only_CC} \ - CFLAGS=${headers_only_CFLAGS} \ - CPPFLAGS=${headers_only_CPPFLAGS} \ - LDFLAGS="" \ - "$@" || die "failed to configure glibc" -} - -do_src_configure() { - if just_headers ; then - glibc_headers_configure - else - glibc_do_configure nptl - fi -} - -src_configure() { - foreach_abi do_src_configure -} - -do_src_compile() { - emake -C "$(builddir nptl)" -} - -src_compile() { - if just_headers ; then - return - fi - - foreach_abi do_src_compile -} - -glibc_src_test() { - cd "$(builddir nptl)" - - local myxfailparams="" - if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then - for myt in ${XFAIL_TEST_LIST[@]} ; do - myxfailparams+="test-xfail-${myt}=yes " - done - fi - - # sandbox does not understand unshare() and prevents - # writes to /proc/, which makes many tests fail - - SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check -} - -do_src_test() { - local ret=0 - - glibc_src_test - : $(( ret |= $? )) - - return ${ret} -} - -src_test() { - if just_headers ; then - return - fi - - # Give tests more time to complete. - export TIMEOUTFACTOR=5 - - foreach_abi do_src_test || die "tests failed" -} - -run_locale_gen() { - # if the host locales.gen contains no entries, we'll install everything - local root="$1" - local inplace="" - - if [[ "${root}" == "--inplace-glibc" ]] ; then - inplace="--inplace-glibc" - root="$2" - fi - - local locale_list="${root}/etc/locale.gen" - - pushd "${ED}"/$(get_libdir) >/dev/null - - if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then - [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" - locale_list="${root}/usr/share/i18n/SUPPORTED" - fi - - set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ - --destdir "${root}" - echo "$@" - "$@" - - popd >/dev/null -} - -glibc_do_src_install() { - local builddir=$(builddir nptl) - cd "${builddir}" - - emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install - - # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support - # which come without headers etc. Only needed for binary packages since the - # external net-libs/libnsl has increased soversion. Keep only versioned libraries. - find "${D}" -name "libnsl.a" -delete - find "${D}" -name "libnsl.so" -delete - - # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need - # to infer upstream version: - # '#define VERSION "2.26.90"' -> '2.26.90' - local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) - - # Avoid stripping binaries not targeted by ${CHOST}. Or else - # ${CHOST}-strip would break binaries build for ${CTARGET}. - is_crosscompile && dostrip -x / - # gdb thread introspection relies on local libpthreas symbols. stripping breaks it - # See Note [Disable automatic stripping] - dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so - - if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then - # Move versioned .a file out of libdir to evade portage QA checks - # instead of using gen_usr_ldscript(). We fix ldscript as: - # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." - sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die - dodir $(alt_usrlibdir)/${P} - mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die - fi - - # We'll take care of the cache ourselves - rm -f "${ED}"/etc/ld.so.cache - - # Everything past this point just needs to be done once ... - is_final_abi || return 0 - - # Make sure the non-native interp can be found on multilib systems even - # if the main library set isn't installed into the right place. Maybe - # we should query the active gcc for info instead of hardcoding it ? - local i ldso_abi ldso_name - local ldso_abi_list=( - # x86 - amd64 /lib64/ld-linux-x86-64.so.2 - x32 /libx32/ld-linux-x32.so.2 - x86 /lib/ld-linux.so.2 - # mips - o32 /lib/ld.so.1 - n32 /lib32/ld.so.1 - n64 /lib64/ld.so.1 - # powerpc - ppc /lib/ld.so.1 - ppc64 /lib64/ld64.so.1 - # riscv - ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 - ilp32 /lib/ld-linux-riscv32-ilp32.so.1 - lp64d /lib/ld-linux-riscv64-lp64d.so.1 - lp64 /lib/ld-linux-riscv64-lp64.so.1 - # s390 - s390 /lib/ld.so.1 - s390x /lib/ld64.so.1 - # sparc - sparc32 /lib/ld-linux.so.2 - sparc64 /lib64/ld-linux.so.2 - ) - case $(tc-endian) in - little) - ldso_abi_list+=( - # arm - arm64 /lib/ld-linux-aarch64.so.1 - ) - ;; - big) - ldso_abi_list+=( - # arm - arm64 /lib/ld-linux-aarch64_be.so.1 - ) - ;; - esac - if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then - dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib - fi - for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do - ldso_abi=${ldso_abi_list[i]} - has ${ldso_abi} $(get_install_abis) || continue - - ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" - if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then - dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} - fi - done - - # With devpts under Linux mounted properly, we do not need the pt_chown - # binary to be setuid. This is because the default owners/perms will be - # exactly what we want. - if ! use suid ; then - find "${ED}" -name pt_chown -exec chmod -s {} + - fi - - ################################################################# - # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # - # Make sure we install some symlink hacks so that when we build - # a 2nd stage cross-compiler, gcc finds the target system - # headers correctly. See gcc/doc/gccinstall.info - if is_crosscompile ; then - # We need to make sure that /lib and /usr/lib always exists. - # gcc likes to use relative paths to get to its multilibs like - # /usr/lib/../lib64/. So while we don't install any files into - # /usr/lib/, we do need it to exist. - keepdir $(alt_prefix)/lib - keepdir $(alt_prefix)/usr/lib - - dosym usr/include $(alt_prefix)/sys-include - return 0 - fi - - # Files for Debian-style locale updating - dodir /usr/share/i18n - sed \ - -e "/^#/d" \ - -e "/SUPPORTED-LOCALES=/d" \ - -e "s: \\\\::g" -e "s:/: :g" \ - "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ - || die "generating /usr/share/i18n/SUPPORTED failed" - cd "${WORKDIR}"/extra/locale - dosbin locale-gen - doman *.[0-8] - insinto /etc - doins locale.gen - - keepdir /usr/lib/locale - - cd "${S}" - - # Install misc network config files - insinto /etc - doins posix/gai.conf nss/nsswitch.conf - - # Gentoo-specific - newins "${FILESDIR}"/host.conf-1 host.conf - - if use nscd ; then - doins nscd/nscd.conf - - newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd - - local nscd_args=( - -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" - ) - - sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd - - systemd_dounit nscd/nscd.service - newtmpfiles nscd/nscd.tmpfiles nscd.conf - fi - - echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc - doenvd "${T}"/00glibc - - for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do - [[ -s ${d} ]] && dodoc ${d} - done - dodoc -r ChangeLog.old - - # Prevent overwriting of the /etc/localtime symlink. We'll handle the - # creation of the "factory" symlink in pkg_postinst(). - rm -f "${ED}"/etc/localtime - - # Generate all locales if this is a native build as locale generation - if use compile-locales && ! is_crosscompile ; then - run_locale_gen --inplace-glibc "${ED}/" - sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die - fi -} - -glibc_headers_install() { - local builddir=$(builddir "headers") - cd "${builddir}" - emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers - - insinto $(alt_headers)/gnu - doins "${S}"/include/gnu/stubs.h - - # Make sure we install the sys-include symlink so that when - # we build a 2nd stage cross-compiler, gcc finds the target - # system headers correctly. See gcc/doc/gccinstall.info - dosym usr/include $(alt_prefix)/sys-include -} - -src_install() { - if just_headers ; then - export ABI=default - glibc_headers_install - return - fi - - foreach_abi glibc_do_src_install - - if ! use static-libs ; then - elog "Not installing static glibc libraries" - find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete - fi -} - -# Simple test to make sure our new glibc isn't completely broken. -# Make sure we don't test with statically built binaries since -# they will fail. Also, skip if this glibc is a cross compiler. -# -# If coreutils is built with USE=multicall, some of these files -# will just be wrapper scripts, not actual ELFs we can test. -glibc_sanity_check() { - cd / #228809 - - # We enter ${ED} so to avoid trouble if the path contains - # special characters; for instance if the path contains the - # colon character (:), then the linker will try to split it - # and look for the libraries in an unexpected place. This can - # lead to unsafe code execution if the generated prefix is - # within a world-writable directory. - # (e.g. /var/tmp/portage:${HOSTNAME}) - pushd "${ED}"/$(get_libdir) >/dev/null - - local x striptest - for x in cal date env free ls true uname uptime ; do - x=$(type -p ${x}) - [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue - striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue - case ${striptest} in - *"statically linked"*) continue;; - *"ASCII text"*) continue;; - esac - # We need to clear the locale settings as the upgrade might want - # incompatible locale data. This test is not for verifying that. - LC_ALL=C \ - ./ld-*.so --library-path . ${x} > /dev/null \ - || die "simple run test (${x}) failed" - done - - popd >/dev/null -} - -pkg_preinst() { - # nothing to do if just installing headers - just_headers && return - - # prepare /etc/ld.so.conf.d/ for files - mkdir -p "${EROOT}"/etc/ld.so.conf.d - - # Default /etc/hosts.conf:multi to on for systems with small dbs. - if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then - sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf - einfo "Defaulting /etc/host.conf:multi to on" - fi - - [[ -n ${ROOT} ]] && return 0 - [[ -d ${ED}/$(get_libdir) ]] || return 0 - [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check - - if [[ -L ${EROOT}/usr/lib/locale ]]; then - # Help portage migrate this to a directory - # https://bugs.gentoo.org/753740 - rm "${EROOT}"/usr/lib/locale || die - fi -} - -pkg_postinst() { - # nothing to do if just installing headers - just_headers && return - - if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then - # Generate fastloading iconv module configuration file. - "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" - fi - - if ! is_crosscompile && [[ -z ${ROOT} ]] ; then - use compile-locales || run_locale_gen "${EROOT}/" - fi - - # Check for sanity of /etc/nsswitch.conf, take 2 - if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then - local entry - for entry in passwd group shadow; do - if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then - ewarn "" - ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" - ewarn "removed from glibc and is now provided by the package" - ewarn " sys-auth/libnss-nis" - ewarn "Install it now to keep your NIS setup working." - ewarn "" - fi - done - fi -} diff --git a/sys-libs/glibc/glibc-2.32-r7.ebuild b/sys-libs/glibc/glibc-2.32-r7.ebuild deleted file mode 100644 index f8798e21fcf5..000000000000 --- a/sys-libs/glibc/glibc-2.32-r7.ebuild +++ /dev/null @@ -1,1514 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9} ) -TMPFILES_OPTIONAL=1 - -inherit python-any-r1 prefix toolchain-funcs flag-o-matic gnuconfig \ - multilib systemd multiprocessing tmpfiles - -DESCRIPTION="GNU libc C library" -HOMEPAGE="https://www.gnu.org/software/libc/" -LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" -SLOT="2.2" - -EMULTILIB_PKG="true" - -# Gentoo patchset (ignored for live ebuilds) -PATCH_VER=6 -PATCH_DEV=dilfridge - -if [[ ${PV} == 9999* ]]; then - inherit git-r3 -else - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" - SRC_URI="mirror://gnu/glibc/${P}.tar.xz" - SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" - SRC_URI+=" riscv? ( https://dev.gentoo.org/~dilfridge/distfiles/backport-rv32.txz )" -fi - -RELEASE_VER=${PV} - -GCC_BOOTSTRAP_VER=20201208 - -LOCALE_GEN_VER=2.10 - -SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz" -SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" - -IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla" - -# Minimum kernel version that glibc requires -MIN_KERN_VER="3.2.0" - -# Here's how the cross-compile logic breaks down ... -# CTARGET - machine that will target the binaries -# CHOST - machine that will host the binaries -# CBUILD - machine that will build the binaries -# If CTARGET != CHOST, it means you want a libc for cross-compiling. -# If CHOST != CBUILD, it means you want to cross-compile the libc. -# CBUILD = CHOST = CTARGET - native build/install -# CBUILD != (CHOST = CTARGET) - cross-compile a native build -# (CBUILD = CHOST) != CTARGET - libc for cross-compiler -# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler -# For install paths: -# CHOST = CTARGET - install into / -# CHOST != CTARGET - install into /usr/CTARGET/ -# -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - -# Note [Disable automatic stripping] -# Disabling automatic stripping for a few reasons: -# - portage's attempt to strip breaks non-native binaries at least on -# arm: bug #697428 -# - portage's attempt to strip libpthread.so.0 breaks gdb thread -# enumeration: bug #697910. This is quite subtle: -# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. -# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols -# via 'ps_pglobal_lookup' symbol defined in gdb. -# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all -# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' -# (unexported) is used to sanity check compatibility before enabling -# debugging. -# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint -# * normal 'strip' command trims '.symtab' -# Thus our main goal here is to prevent 'libpthread.so.0' from -# losing it's '.symtab' entries. -# As Gentoo's strip does not allow us to pass less aggressive stripping -# options and does not check the machine target we strip selectively. - -# We need a new-enough binutils/gcc to match upstream baseline. -# Also we need to make sure our binutils/gcc supports TLS, -# and that gcc already contains the hardened patches. -# Lastly, let's avoid some openssh nastiness, bug 708224, as -# convenience to our users. - -# gzip, grep, awk are needed by locale-gen, bug 740750 - -BDEPEND=" - ${PYTHON_DEPS} - >=app-misc/pax-utils-0.1.10 - sys-devel/bison - doc? ( sys-apps/texinfo ) - !compile-locales? ( - app-arch/gzip - sys-apps/grep - virtual/awk - ) -" -COMMON_DEPEND=" - gd? ( media-libs/gd:2= ) - nscd? ( selinux? ( - audit? ( sys-process/audit ) - caps? ( sys-libs/libcap ) - ) ) - suid? ( caps? ( sys-libs/libcap ) ) - selinux? ( sys-libs/libselinux ) - systemtap? ( dev-util/systemtap ) - !' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') - ALT_BUILD_HEADERS=${header_path%/linux/version.h} - fi - fi - fi - echo "${ALT_BUILD_HEADERS}" -} - -alt_libdir() { - echo $(alt_prefix)/$(get_libdir) -} -alt_usrlibdir() { - echo $(alt_prefix)/usr/$(get_libdir) -} - -builddir() { - echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1" -} - -do_compile_test() { - local ret save_cflags=${CFLAGS} - CFLAGS+=" $1" - shift - - pushd "${T}" >/dev/null - - rm -f glibc-test* - printf '%b' "$*" > glibc-test.c - - # Most of the time CC is already set, but not in early sanity checks. - nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}" - ret=$? - - popd >/dev/null - - CFLAGS=${save_cflags} - return ${ret} -} - -do_run_test() { - local ret - - if [[ ${MERGE_TYPE} == "binary" ]] ; then - # ignore build failures when installing a binary package #324685 - do_compile_test "" "$@" 2>/dev/null || return 0 - else - if ! do_compile_test "" "$@" ; then - ewarn "Simple build failed ... assuming this is desired #324685" - return 0 - fi - fi - - pushd "${T}" >/dev/null - - ./glibc-test - ret=$? - rm -f glibc-test* - - popd >/dev/null - - return ${ret} -} - -setup_target_flags() { - # This largely mucks with compiler flags. None of which should matter - # when building up just the headers. - just_headers && return 0 - - case $(tc-arch) in - x86) - # -march needed for #185404 #199334 - # TODO: When creating the first glibc cross-compile, this test will - # always fail as it does a full link which in turn requires glibc. - # Probably also applies when changing multilib profile settings (e.g. - # enabling x86 when the profile was amd64-only previously). - # We could change main to _start and pass -nostdlib here so that we - # only test the gcc code compilation. Or we could do a compile and - # then look for the symbol via scanelf. - if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then - local t=${CTARGET_OPT:-${CTARGET}} - t=${t%%-*} - filter-flags '-march=*' - export CFLAGS="-march=${t} ${CFLAGS}" - einfo "Auto adding -march=${t} to CFLAGS #185404" - fi - ;; - amd64) - # -march needed for #185404 #199334 - # TODO: See cross-compile issues listed above for x86. - [[ ${ABI} == x86 ]] && - if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then - local t=${CTARGET_OPT:-${CTARGET}} - t=${t%%-*} - # Normally the target is x86_64-xxx, so turn that into the -march that - # gcc actually accepts. #528708 - [[ ${t} == "x86_64" ]] && t="x86-64" - filter-flags '-march=*' - # ugly, ugly, ugly. ugly. - CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") - export CFLAGS_x86="${CFLAGS_x86} -march=${t}" - einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" - fi - ;; - mips) - # The mips abi cannot support the GNU style hashes. #233233 - filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both - ;; - ppc|ppc64) - # Many arch-specific implementations do not work on ppc with - # cache-block not equal to 128 bytes. This breaks memset: - # https://sourceware.org/PR26522 - # https://bugs.gentoo.org/737996 - # Use default -mcpu=. For ppc it means non-multiarch setup. - filter-flags '-mcpu=*' - ;; - sparc) - # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. - filter-flags "-fcall-used-g7" - append-flags "-fcall-used-g6" - - local cpu - case ${CTARGET} in - sparc64-*) - cpu="sparc64" - case $(get-flag mcpu) in - v9) - # We need to force at least v9a because the base build doesn't - # work with just v9. - # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 - append-flags "-Wa,-xarch=v9a" - ;; - esac - ;; - sparc-*) - case $(get-flag mcpu) in - v8|supersparc|hypersparc|leon|leon3) - cpu="sparcv8" - ;; - *) - cpu="sparcv9" - ;; - esac - ;; - esac - [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" - ;; - esac -} - -setup_flags() { - # Make sure host make.conf doesn't pollute us - if is_crosscompile || tc-is-cross-compiler ; then - CHOST=${CTARGET} strip-unsupported-flags - fi - - # Store our CFLAGS because it's changed depending on which CTARGET - # we are building when pulling glibc on a multilib profile - CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} - CFLAGS=${CFLAGS_BASE} - CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} - CXXFLAGS=${CXXFLAGS_BASE} - ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} - ASFLAGS=${ASFLAGS_BASE} - - # Allow users to explicitly avoid flag sanitization via - # USE=custom-cflags. - if ! use custom-cflags; then - # Over-zealous CFLAGS can often cause problems. What may work for one - # person may not work for another. To avoid a large influx of bugs - # relating to failed builds, we strip most CFLAGS out to ensure as few - # problems as possible. - strip-flags - # Lock glibc at -O2; we want to be conservative here. - filter-flags '-O?' - append-flags -O2 - fi - strip-unsupported-flags - filter-flags -m32 -m64 '-mabi=*' - - # glibc aborts if rpath is set by LDFLAGS - filter-ldflags '-Wl,-rpath=*' - - # #492892 - filter-flags -frecord-gcc-switches - - unset CBUILD_OPT CTARGET_OPT - if use multilib ; then - CTARGET_OPT=$(get_abi_CTARGET) - [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) - fi - - setup_target_flags - - if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then - CBUILD_OPT=${CTARGET_OPT} - fi - - # glibc's headers disallow -O0 and fail at build time: - # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" - replace-flags -O0 -O1 - - filter-flags '-fstack-protector*' -} - -want_tls() { - # Archs that can use TLS (Thread Local Storage) - case $(tc-arch) in - x86) - # requires i486 or better #106556 - [[ ${CTARGET} == i[4567]86* ]] && return 0 - return 1 - ;; - esac - return 0 -} - -want__thread() { - want_tls || return 1 - - # For some reason --with-tls --with__thread is causing segfaults on sparc32. - [[ ${PROFILE_ARCH} == "sparc" ]] && return 1 - - [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD} - - # only test gcc -- can't test linking yet - tc-has-tls -c ${CTARGET} - WANT__THREAD=$? - - return ${WANT__THREAD} -} - -use_multiarch() { - # Allow user to disable runtime arch detection in multilib. - use multiarch || return 1 - # Make sure binutils is new enough to support indirect functions, - # #336792. This funky sed supports gold and bfd linkers. - local bver nver - bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') - case $(tc-arch ${CTARGET}) in - amd64|x86) nver="2.20" ;; - arm) nver="2.22" ;; - hppa) nver="2.23" ;; - ppc|ppc64) nver="2.20" ;; - # ifunc support was added in 2.23, but glibc also needs - # machinemode which is in 2.24. - s390) nver="2.24" ;; - sparc) nver="2.21" ;; - *) return 1 ;; - esac - ver_test ${bver} -ge ${nver} -} - -# Setup toolchain variables that had historically been defined in the -# profiles for these archs. -setup_env() { - # silly users - unset LD_RUN_PATH - unset LD_ASSUME_KERNEL - - if is_crosscompile || tc-is-cross-compiler ; then - multilib_env ${CTARGET_OPT:-${CTARGET}} - - if ! use multilib ; then - MULTILIB_ABIS=${DEFAULT_ABI} - else - MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} - fi - - # If the user has CFLAGS_ in their make.conf, use that, - # and fall back on CFLAGS. - local VAR=CFLAGS_${CTARGET//[-.]/_} - CFLAGS=${!VAR-${CFLAGS}} - einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" - fi - - setup_flags - - export ABI=${ABI:-${DEFAULT_ABI:-default}} - - if just_headers ; then - # Avoid mixing host's CC and target's CFLAGS_${ABI}: - # At this bootstrap stage we have only binutils for - # target but not compiler yet. - einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." - return 0 - fi - local VAR=CFLAGS_${ABI} - # We need to export CFLAGS with abi information in them because glibc's - # configure script checks CFLAGS for some targets (like mips). Keep - # around the original clean value to avoid appending multiple ABIs on - # top of each other. - : ${__GLIBC_CC:=$(tc-getCC ${CTARGET})} - export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}" - einfo " $(printf '%15s' 'Manual CC:') ${CC}" -} - -foreach_abi() { - setup_env - - local ret=0 - local abilist="" - if use multilib ; then - abilist=$(get_install_abis) - else - abilist=${DEFAULT_ABI} - fi - local -x ABI - for ABI in ${abilist:-default} ; do - setup_env - einfo "Running $1 for ABI ${ABI}" - $1 - : $(( ret |= $? )) - done - return ${ret} -} - -glibc_banner() { - local b="Gentoo ${PVR}" - [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}" - echo "${b}" -} - -# The following Kernel version handling functions are mostly copied from portage -# source. It's better not to use linux-info.eclass here since a) it adds too -# much magic, see bug 326693 for some of the arguments, and b) some of the -# functions are just not provided. - -g_get_running_KV() { - uname -r - return $? -} - -g_KV_major() { - [[ -z $1 ]] && return 1 - local KV=$@ - echo "${KV%%.*}" -} - -g_KV_minor() { - [[ -z $1 ]] && return 1 - local KV=$@ - KV=${KV#*.} - echo "${KV%%.*}" -} - -g_KV_micro() { - [[ -z $1 ]] && return 1 - local KV=$@ - KV=${KV#*.*.} - echo "${KV%%[^[:digit:]]*}" -} - -g_KV_to_int() { - [[ -z $1 ]] && return 1 - local KV_MAJOR=$(g_KV_major "$1") - local KV_MINOR=$(g_KV_minor "$1") - local KV_MICRO=$(g_KV_micro "$1") - local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) - - # We make version 2.2.0 the minimum version we will handle as - # a sanity check ... if its less, we fail ... - if [[ ${KV_int} -ge 131584 ]] ; then - echo "${KV_int}" - return 0 - fi - return 1 -} - -g_int_to_KV() { - local version=$1 major minor micro - major=$((version / 65536)) - minor=$(((version % 65536) / 256)) - micro=$((version % 256)) - echo ${major}.${minor}.${micro} -} - -eend_KV() { - [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] - eend $? -} - -get_kheader_version() { - printf '#include \nLINUX_VERSION_CODE\n' | \ - $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ - tail -n 1 -} - -# We collect all sanity checks here. Consistency is not guranteed between -# pkg_ and src_ phases, so we call this function both in pkg_pretend and in -# src_unpack. -sanity_prechecks() { - # Prevent native builds from downgrading - if [[ ${MERGE_TYPE} != "buildonly" ]] && \ - [[ -z ${ROOT} ]] && \ - [[ ${CBUILD} == ${CHOST} ]] && \ - [[ ${CHOST} == ${CTARGET} ]] ; then - - # The high rev # is to allow people to downgrade between -r# - # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 - # should be fine. Hopefully we never actually use a r# this - # high. - if has_version ">${CATEGORY}/${P}-r10000" ; then - eerror "Sanity check to keep you from breaking your system:" - eerror " Downgrading glibc is not supported and a sure way to destruction." - [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." - fi - - if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then - eerror "Your old kernel is broken. You need to update it to a newer" - eerror "version as syscall() will break. See bug 279260." - die "Old and broken kernel." - fi - fi - - # Users have had a chance to phase themselves, time to give em the boot - if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then - eerror "You still haven't deleted ${EROOT}/etc/locales.build." - eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher." - die "Lazy upgrader detected" - fi - - if [[ ${CTARGET} == i386-* ]] ; then - eerror "i386 CHOSTs are no longer supported." - eerror "Chances are you don't actually want/need i386." - eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" - die "Please fix your CHOST" - fi - - if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then - ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." - ewarn "This will result in a 50% performance penalty when running with a 32bit" - ewarn "hypervisor, which is probably not what you want." - fi - - # Check for sanity of /etc/nsswitch.conf - if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then - local entry - for entry in passwd group shadow; do - if ! egrep -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then - eerror "Your ${EROOT}/etc/nsswitch.conf is out of date." - eerror "Please make sure you have 'files' entries for" - eerror "'passwd:', 'group:' and 'shadow:' databases." - eerror "For more details see:" - eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26" - die "nsswitch.conf has no 'files' provider in '${entry}'." - fi - done - fi - - # ABI-specific checks follow here. Hey, we have a lot more specific conditions that - # we test for... - if ! is_crosscompile ; then - if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then - ebegin "Checking that IA32 emulation is enabled in the running kernel" - echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" - local STAT - if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then - "${T}/check-ia32-emulation.elf32" - STAT=$? - else - # Don't fail here to allow single->multi ABI switch - # or recover from breakage like bug #646424 - ewarn "Failed to compile the ABI test. Broken host glibc?" - STAT=0 - fi - rm -f "${T}/check-ia32-emulation.elf32" - eend $STAT - [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc." - fi - - fi - - # When we actually have to compile something... - if ! just_headers ; then - ebegin "Checking gcc for __thread support" - if ! eend $(want__thread ; echo $?) ; then - echo - eerror "Could not find a gcc that supports the __thread directive!" - eerror "Please update your binutils/gcc and try again." - die "No __thread support in gcc!" - fi - - if [[ ${CTARGET} == *-linux* ]] ; then - local run_kv build_kv want_kv - - run_kv=$(g_get_running_KV) - build_kv=$(g_int_to_KV $(get_kheader_version)) - want_kv=${MIN_KERN_VER} - - if ! is_crosscompile && ! tc-is-cross-compiler ; then - # Building fails on an non-supporting kernel - ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" - if ! eend_KV ${run_kv} ${want_kv} ; then - echo - eerror "You need a kernel of at least ${want_kv}!" - die "Kernel version too low!" - fi - fi - - ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" - if ! eend_KV ${build_kv} ${want_kv} ; then - echo - eerror "You need linux-headers of at least ${want_kv}!" - die "linux-headers version too low!" - fi - fi - fi -} - -# -# the phases -# - -# pkg_pretend - -pkg_pretend() { - # All the checks... - einfo "Checking general environment sanity." - sanity_prechecks -} - -pkg_setup() { - # see bug 682570 - [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup -} - -# src_unpack - -src_unpack() { - # Consistency is not guaranteed between pkg_ and src_ ... - sanity_prechecks - - use multilib && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz - - setup_env - - if [[ ${PV} == 9999* ]] ; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" - EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git - git-r3_src_unpack - mv patches-git/9999 patches || die - - EGIT_REPO_URI="https://sourceware.org/git/glibc.git" - EGIT_CHECKOUT_DIR=${S} - git-r3_src_unpack - else - unpack ${P}.tar.xz - - cd "${WORKDIR}" || die - unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz - fi - - cd "${WORKDIR}" || die - unpack locale-gen-${LOCALE_GEN_VER}.tar.gz - use riscv && unpack backport-rv32.txz -} - -src_prepare() { - local patchsetname - if ! use vanilla ; then - if [[ ${PV} == 9999* ]] ; then - patchsetname="from git master" - else - patchsetname="${RELEASE_VER}-${PATCH_VER}" - fi - elog "Applying Gentoo Glibc Patchset ${patchsetname}" - eapply "${WORKDIR}"/patches - einfo "Done." - - if use riscv ; then - elog "Adding rv32 backport patchset for glibc-2.32 (experimental)" - eapply "${WORKDIR}"/backport-rv32 - einfo "Done." - fi - fi - - default - - gnuconfig_update - - cd "${WORKDIR}" - find . -name configure -exec touch {} + - - # move the external locale-gen to its old place - mkdir extra || die - mv locale-gen-${LOCALE_GEN_VER} extra/locale || die - - eprefixify extra/locale/locale-gen - - # Fix permissions on some of the scripts. - chmod u+x "${S}"/scripts/*.sh - - cd "${S}" -} - -glibc_do_configure() { - # Glibc does not work with gold (for various reasons) #269274. - tc-ld-disable-gold - - # CXX isnt handled by the multilib system, so if we dont unset here - # we accumulate crap across abis - unset CXX - - einfo "Configuring glibc for nptl" - - if use doc ; then - export MAKEINFO=makeinfo - else - export MAKEINFO=/dev/null - fi - - local v - for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do - einfo " $(printf '%15s' ${v}:) ${!v}" - done - - # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 - # To build .S (assembly) files with the same ABI-specific flags - # upstream currently recommends adding CFLAGS to CC/CXX: - # https://sourceware.org/PR23273 - # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS - # and breaks multiarch support. See 659030#c3 for an example. - # The glibc configure script doesn't properly use LDFLAGS all the time. - export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}" - einfo " $(printf '%15s' 'Manual CC:') ${CC}" - - # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 - export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}" - - if is_crosscompile; then - # Assume worst-case bootstrap: glibc is buil first time - # when ${CTARGET}-g++ is not available yet. We avoid - # building auxiliary programs that require C++: bug #683074 - # It should not affect final result. - export libc_cv_cxx_link_ok=no - # The line above has the same effect. We set CXX explicitly - # to make build logs less confusing. - export CXX= - fi - einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" - - # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure - # can't detect them automatically due to ${CHOST} mismatch and fallbacks - # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). - export NM="$(tc-getNM ${CTARGET})" - export READELF="$(tc-getREADELF ${CTARGET})" - einfo " $(printf '%15s' 'Manual NM:') ${NM}" - einfo " $(printf '%15s' 'Manual READELF:') ${READELF}" - - echo - - local myconf=() - - case ${CTARGET} in - m68k*) - # setjmp() is not compatible with stack protection: - # https://sourceware.org/PR24202 - myconf+=( --enable-stack-protector=no ) - ;; - powerpc-*) - # Currently gcc on powerpc32 generates invalid code for - # __builtin_return_address(0) calls. Normally programs - # don't do that but malloc hooks in glibc do: - # https://gcc.gnu.org/PR81996 - # https://bugs.gentoo.org/629054 - myconf+=( --enable-stack-protector=no ) - ;; - *) - # Use '=strong' instead of '=all' to protect only functions - # worth protecting from stack smashes. - # '=all' is also known to have a problem in IFUNC resolution - # tests: https://sourceware.org/PR25680, bug #712356. - myconf+=( --enable-stack-protector=$(usex ssp strong no) ) - ;; - esac - myconf+=( --enable-stackguard-randomization ) - - # Keep a whitelist of targets supporing IFUNC. glibc's ./configure - # is not robust enough to detect proper support: - # https://bugs.gentoo.org/641216 - # https://sourceware.org/PR22634#c0 - case $(tc-arch ${CTARGET}) in - # Keep whitelist of targets where autodetection mostly works. - amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;; - # Blacklist everywhere else - *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; - esac - - # Enable Intel Control-flow Enforcement Technology on amd64 if requested - case ${CTARGET} in - x86_64-*) myconf+=( $(use_enable cet) ) ;; - *) ;; - esac - - [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) - - myconf+=( --enable-kernel=${MIN_KERN_VER} ) - - # Since SELinux support is only required for nscd, only enable it if: - # 1. USE selinux - # 2. only for the primary ABI on multilib systems - # 3. Not a crosscompile - if ! is_crosscompile && use selinux ; then - if use multilib ; then - if is_final_abi ; then - myconf+=( --with-selinux ) - else - myconf+=( --without-selinux ) - fi - else - myconf+=( --with-selinux ) - fi - else - myconf+=( --without-selinux ) - fi - - # Force a few tests where we always know the answer but - # configure is incapable of finding it. - if is_crosscompile ; then - export \ - libc_cv_c_cleanup=yes \ - libc_cv_forced_unwind=yes - fi - - myconf+=( - --without-cvs - --disable-werror - --enable-bind-now - --build=${CBUILD_OPT:-${CBUILD}} - --host=${CTARGET_OPT:-${CTARGET}} - $(use_enable profile) - $(use_with gd) - --with-headers=$(build_eprefix)$(alt_build_headers) - --prefix="$(host_eprefix)/usr" - --sysconfdir="$(host_eprefix)/etc" - --localstatedir="$(host_eprefix)/var" - --libdir='$(prefix)'/$(get_libdir) - --mandir='$(prefix)'/share/man - --infodir='$(prefix)'/share/info - --libexecdir='$(libdir)'/misc/glibc - --with-bugurl=https://bugs.gentoo.org/ - --with-pkgversion="$(glibc_banner)" - $(use_enable crypt) - $(use_multiarch || echo --disable-multi-arch) - $(use_enable static-pie) - $(use_enable systemtap) - $(use_enable nscd) - - # locale data is arch-independent - # https://bugs.gentoo.org/753740 - libc_cv_complocaledir='${exec_prefix}/lib/locale' - - ${EXTRA_ECONF} - ) - - # We rely on sys-libs/timezone-data for timezone tools normally. - myconf+=( $(use_enable vanilla timezone-tools) ) - - # These libs don't have configure flags. - ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) - ac_cv_lib_cap_cap_init=$(usex caps || echo no) - - # There is no configure option for this and we need to export it - # since the glibc build will re-run configure on itself - export libc_cv_rootsbindir="$(host_eprefix)/sbin" - export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" - - # We take care of patching our binutils to use both hash styles, - # and many people like to force gnu hash style only, so disable - # this overriding check. #347761 - export libc_cv_hashstyle=no - - local builddir=$(builddir nptl) - mkdir -p "${builddir}" - cd "${builddir}" - set -- "${S}"/configure "${myconf[@]}" - echo "$@" - "$@" || die "failed to configure glibc" - - # ia64 static cross-compilers are a pita in so much that they - # can't produce static ELFs (as the libgcc.a is broken). so - # disable building of the programs for those targets if it - # doesn't work. - # XXX: We could turn this into a compiler test, but ia64 is - # the only one that matters, so this should be fine for now. - if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then - sed -i '1i+link-static = touch $@' config.make - fi - - # If we're trying to migrate between ABI sets, we need - # to lie and use a local copy of gcc. Like if the system - # is built with MULTILIB_ABIS="amd64 x86" but we want to - # add x32 to it, gcc/glibc don't yet support x32. - # - if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then - echo 'main(){}' > "${T}"/test.c - if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then - sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die - fi - fi -} - -glibc_headers_configure() { - export ABI=default - - local builddir=$(builddir "headers") - mkdir -p "${builddir}" - cd "${builddir}" - - # if we don't have a compiler yet, we can't really test it now ... - # hopefully they don't affect header generation, so let's hope for - # the best here ... - local v vars=( - ac_cv_header_cpuid_h=yes - libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes - libc_cv_asm_cfi_directives=yes - libc_cv_broken_visibility_attribute=no - libc_cv_c_cleanup=yes - libc_cv_compiler_powerpc64le_binary128_ok=yes - libc_cv_forced_unwind=yes - libc_cv_gcc___thread=yes - libc_cv_mlong_double_128=yes - libc_cv_mlong_double_128ibm=yes - libc_cv_ppc_machine=yes - libc_cv_ppc_rel16=yes - libc_cv_predef_fortify_source=no - libc_cv_target_power8_ok=yes - libc_cv_visibility_attribute=yes - libc_cv_z_combreloc=yes - libc_cv_z_execstack=yes - libc_cv_z_initfirst=yes - libc_cv_z_nodelete=yes - libc_cv_z_nodlopen=yes - libc_cv_z_relro=yes - libc_mips_abi=${ABI} - libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) - # These libs don't have configure flags. - ac_cv_lib_audit_audit_log_user_avc_message=no - ac_cv_lib_cap_cap_init=no - ) - - einfo "Forcing cached settings:" - for v in "${vars[@]}" ; do - einfo " ${v}" - export ${v} - done - - local headers_only_arch_CPPFLAGS=() - - # Blow away some random CC settings that screw things up. #550192 - if [[ -d ${S}/sysdeps/mips ]]; then - pushd "${S}"/sysdeps/mips >/dev/null - sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die - sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die - - # Force the mips ABI to the default. This is OK because the set of - # installed headers in this phase is the same between the 3 ABIs. - # If this ever changes, this hack will break, but that's unlikely - # as glibc discourages that behavior. - # https://crbug.com/647033 - sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die - - popd >/dev/null - fi - - case ${CTARGET} in - riscv*) - # RISC-V interrogates the compiler to determine which target to - # build. If building the headers then we don't strictly need a - # RISC-V compiler, so the built-in definitions that are provided - # along with all RISC-V compiler might not exist. This causes - # glibc's RISC-V preconfigure script to blow up. Since we're just - # building the headers any value will actually work here, so just - # pick the standard one (rv64g/lp64d) to make the build scripts - # happy for now -- the headers are all the same anyway so it - # doesn't matter. - headers_only_arch_CPPFLAGS+=( - -D__riscv_xlen=64 - -D__riscv_flen=64 - -D__riscv_float_abi_double=1 - -D__riscv_atomic=1 - ) ;; - esac - - local myconf=() - myconf+=( - --disable-sanity-checks - --enable-hacker-mode - --without-cvs - --disable-werror - --enable-bind-now - --build=${CBUILD_OPT:-${CBUILD}} - --host=${CTARGET_OPT:-${CTARGET}} - --with-headers=$(build_eprefix)$(alt_build_headers) - --prefix="$(host_eprefix)/usr" - ${EXTRA_ECONF} - ) - - # Nothing is compiled here which would affect the headers for the target. - # So forcing CC/CFLAGS is sane. - local headers_only_CC=$(tc-getBUILD_CC) - local headers_only_CFLAGS="-O1 -pipe" - local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" - local headers_only_LDFLAGS="" - set -- "${S}"/configure "${myconf[@]}" - echo \ - "CC=${headers_only_CC}" \ - "CFLAGS=${headers_only_CFLAGS}" \ - "CPPFLAGS=${headers_only_CPPFLAGS}" \ - "LDFLAGS=${headers_only_LDFLAGS}" \ - "$@" - CC=${headers_only_CC} \ - CFLAGS=${headers_only_CFLAGS} \ - CPPFLAGS=${headers_only_CPPFLAGS} \ - LDFLAGS="" \ - "$@" || die "failed to configure glibc" -} - -do_src_configure() { - if just_headers ; then - glibc_headers_configure - else - glibc_do_configure nptl - fi -} - -src_configure() { - foreach_abi do_src_configure -} - -do_src_compile() { - emake -C "$(builddir nptl)" -} - -src_compile() { - if just_headers ; then - return - fi - - foreach_abi do_src_compile -} - -glibc_src_test() { - cd "$(builddir nptl)" - - local myxfailparams="" - if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then - for myt in ${XFAIL_TEST_LIST[@]} ; do - myxfailparams+="test-xfail-${myt}=yes " - done - fi - - # sandbox does not understand unshare() and prevents - # writes to /proc/, which makes many tests fail - - SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check -} - -do_src_test() { - local ret=0 - - glibc_src_test - : $(( ret |= $? )) - - return ${ret} -} - -src_test() { - if just_headers ; then - return - fi - - # Give tests more time to complete. - export TIMEOUTFACTOR=5 - - foreach_abi do_src_test || die "tests failed" -} - -run_locale_gen() { - # if the host locales.gen contains no entries, we'll install everything - local root="$1" - local inplace="" - - if [[ "${root}" == "--inplace-glibc" ]] ; then - inplace="--inplace-glibc" - root="$2" - fi - - local locale_list="${root}/etc/locale.gen" - - pushd "${ED}"/$(get_libdir) >/dev/null - - if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then - [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" - locale_list="${root}/usr/share/i18n/SUPPORTED" - fi - - set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ - --destdir "${root}" - echo "$@" - "$@" - - popd >/dev/null -} - -glibc_do_src_install() { - local builddir=$(builddir nptl) - cd "${builddir}" - - emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install - - # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support - # which come without headers etc. Only needed for binary packages since the - # external net-libs/libnsl has increased soversion. Keep only versioned libraries. - find "${D}" -name "libnsl.a" -delete - find "${D}" -name "libnsl.so" -delete - - # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need - # to infer upstream version: - # '#define VERSION "2.26.90"' -> '2.26.90' - local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) - - # Avoid stripping binaries not targeted by ${CHOST}. Or else - # ${CHOST}-strip would break binaries build for ${CTARGET}. - is_crosscompile && dostrip -x / - # gdb thread introspection relies on local libpthreas symbols. stripping breaks it - # See Note [Disable automatic stripping] - dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so - - if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then - # Move versioned .a file out of libdir to evade portage QA checks - # instead of using gen_usr_ldscript(). We fix ldscript as: - # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." - sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die - dodir $(alt_usrlibdir)/${P} - mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die - fi - - # We'll take care of the cache ourselves - rm -f "${ED}"/etc/ld.so.cache - - # Everything past this point just needs to be done once ... - is_final_abi || return 0 - - # Make sure the non-native interp can be found on multilib systems even - # if the main library set isn't installed into the right place. Maybe - # we should query the active gcc for info instead of hardcoding it ? - local i ldso_abi ldso_name - local ldso_abi_list=( - # x86 - amd64 /lib64/ld-linux-x86-64.so.2 - x32 /libx32/ld-linux-x32.so.2 - x86 /lib/ld-linux.so.2 - # mips - o32 /lib/ld.so.1 - n32 /lib32/ld.so.1 - n64 /lib64/ld.so.1 - # powerpc - ppc /lib/ld.so.1 - ppc64 /lib64/ld64.so.1 - # riscv - ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 - ilp32 /lib/ld-linux-riscv32-ilp32.so.1 - lp64d /lib/ld-linux-riscv64-lp64d.so.1 - lp64 /lib/ld-linux-riscv64-lp64.so.1 - # s390 - s390 /lib/ld.so.1 - s390x /lib/ld64.so.1 - # sparc - sparc32 /lib/ld-linux.so.2 - sparc64 /lib64/ld-linux.so.2 - ) - case $(tc-endian) in - little) - ldso_abi_list+=( - # arm - arm64 /lib/ld-linux-aarch64.so.1 - ) - ;; - big) - ldso_abi_list+=( - # arm - arm64 /lib/ld-linux-aarch64_be.so.1 - ) - ;; - esac - if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then - dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib - fi - for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do - ldso_abi=${ldso_abi_list[i]} - has ${ldso_abi} $(get_install_abis) || continue - - ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" - if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then - dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} - fi - done - - # With devpts under Linux mounted properly, we do not need the pt_chown - # binary to be setuid. This is because the default owners/perms will be - # exactly what we want. - if ! use suid ; then - find "${ED}" -name pt_chown -exec chmod -s {} + - fi - - ################################################################# - # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # - # Make sure we install some symlink hacks so that when we build - # a 2nd stage cross-compiler, gcc finds the target system - # headers correctly. See gcc/doc/gccinstall.info - if is_crosscompile ; then - # We need to make sure that /lib and /usr/lib always exists. - # gcc likes to use relative paths to get to its multilibs like - # /usr/lib/../lib64/. So while we don't install any files into - # /usr/lib/, we do need it to exist. - keepdir $(alt_prefix)/lib - keepdir $(alt_prefix)/usr/lib - - dosym usr/include $(alt_prefix)/sys-include - return 0 - fi - - # Files for Debian-style locale updating - dodir /usr/share/i18n - sed \ - -e "/^#/d" \ - -e "/SUPPORTED-LOCALES=/d" \ - -e "s: \\\\::g" -e "s:/: :g" \ - "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ - || die "generating /usr/share/i18n/SUPPORTED failed" - cd "${WORKDIR}"/extra/locale - dosbin locale-gen - doman *.[0-8] - insinto /etc - doins locale.gen - - keepdir /usr/lib/locale - - cd "${S}" - - # Install misc network config files - insinto /etc - doins posix/gai.conf nss/nsswitch.conf - - # Gentoo-specific - newins "${FILESDIR}"/host.conf-1 host.conf - - if use nscd ; then - doins nscd/nscd.conf - - newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd - - local nscd_args=( - -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" - ) - - sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd - - systemd_dounit nscd/nscd.service - newtmpfiles nscd/nscd.tmpfiles nscd.conf - fi - - echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc - doenvd "${T}"/00glibc - - for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do - [[ -s ${d} ]] && dodoc ${d} - done - dodoc -r ChangeLog.old - - # Prevent overwriting of the /etc/localtime symlink. We'll handle the - # creation of the "factory" symlink in pkg_postinst(). - rm -f "${ED}"/etc/localtime - - # Generate all locales if this is a native build as locale generation - if use compile-locales && ! is_crosscompile ; then - run_locale_gen --inplace-glibc "${ED}/" - sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die - fi -} - -glibc_headers_install() { - local builddir=$(builddir "headers") - cd "${builddir}" - emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers - - insinto $(alt_headers)/gnu - doins "${S}"/include/gnu/stubs.h - - # Make sure we install the sys-include symlink so that when - # we build a 2nd stage cross-compiler, gcc finds the target - # system headers correctly. See gcc/doc/gccinstall.info - dosym usr/include $(alt_prefix)/sys-include -} - -src_install() { - if just_headers ; then - export ABI=default - glibc_headers_install - return - fi - - foreach_abi glibc_do_src_install - - if ! use static-libs ; then - elog "Not installing static glibc libraries" - find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete - fi -} - -# Simple test to make sure our new glibc isn't completely broken. -# Make sure we don't test with statically built binaries since -# they will fail. Also, skip if this glibc is a cross compiler. -# -# If coreutils is built with USE=multicall, some of these files -# will just be wrapper scripts, not actual ELFs we can test. -glibc_sanity_check() { - cd / #228809 - - # We enter ${ED} so to avoid trouble if the path contains - # special characters; for instance if the path contains the - # colon character (:), then the linker will try to split it - # and look for the libraries in an unexpected place. This can - # lead to unsafe code execution if the generated prefix is - # within a world-writable directory. - # (e.g. /var/tmp/portage:${HOSTNAME}) - pushd "${ED}"/$(get_libdir) >/dev/null - - local x striptest - for x in cal date env free ls true uname uptime ; do - x=$(type -p ${x}) - [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue - striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue - case ${striptest} in - *"statically linked"*) continue;; - *"ASCII text"*) continue;; - esac - # We need to clear the locale settings as the upgrade might want - # incompatible locale data. This test is not for verifying that. - LC_ALL=C \ - ./ld-*.so --library-path . ${x} > /dev/null \ - || die "simple run test (${x}) failed" - done - - popd >/dev/null -} - -pkg_preinst() { - # nothing to do if just installing headers - just_headers && return - - # prepare /etc/ld.so.conf.d/ for files - mkdir -p "${EROOT}"/etc/ld.so.conf.d - - # Default /etc/hosts.conf:multi to on for systems with small dbs. - if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then - sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf - einfo "Defaulting /etc/host.conf:multi to on" - fi - - [[ -n ${ROOT} ]] && return 0 - [[ -d ${ED}/$(get_libdir) ]] || return 0 - [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check - - if [[ -L ${EROOT}/usr/lib/locale ]]; then - # Help portage migrate this to a directory - # https://bugs.gentoo.org/753740 - rm "${EROOT}"/usr/lib/locale || die - fi -} - -pkg_postinst() { - # nothing to do if just installing headers - just_headers && return - - if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then - # Generate fastloading iconv module configuration file. - "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" - fi - - if ! is_crosscompile && [[ -z ${ROOT} ]] ; then - use compile-locales || run_locale_gen "${EROOT}/" - fi - - # Check for sanity of /etc/nsswitch.conf, take 2 - if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then - local entry - for entry in passwd group shadow; do - if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then - ewarn "" - ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" - ewarn "removed from glibc and is now provided by the package" - ewarn " sys-auth/libnss-nis" - ewarn "Install it now to keep your NIS setup working." - ewarn "" - fi - done - fi -} diff --git a/sys-libs/glibc/glibc-2.32-r8.ebuild b/sys-libs/glibc/glibc-2.32-r8.ebuild index d9bf2bc1beea..101254fce5ab 100644 --- a/sys-libs/glibc/glibc-2.32-r8.ebuild +++ b/sys-libs/glibc/glibc-2.32-r8.ebuild @@ -23,7 +23,7 @@ PATCH_DEV=dilfridge if [[ ${PV} == 9999* ]]; then inherit git-r3 else - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" SRC_URI="mirror://gnu/glibc/${P}.tar.xz" SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" SRC_URI+=" riscv? ( https://dev.gentoo.org/~dilfridge/distfiles/backport-rv32.txz )" @@ -1271,7 +1271,6 @@ glibc_do_src_install() { n64 /lib64/ld.so.1 # powerpc ppc /lib/ld.so.1 - ppc64 /lib64/ld64.so.1 # riscv ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 ilp32 /lib/ld-linux-riscv32-ilp32.so.1 @@ -1289,12 +1288,16 @@ glibc_do_src_install() { ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 ) ;; big) ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 ) ;; esac diff --git a/sys-libs/glibc/glibc-2.33-r1.ebuild b/sys-libs/glibc/glibc-2.33-r1.ebuild new file mode 100644 index 000000000000..fc5b4b0474f9 --- /dev/null +++ b/sys-libs/glibc/glibc-2.33-r1.ebuild @@ -0,0 +1,1515 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8,9,10} ) +TMPFILES_OPTIONAL=1 + +inherit python-any-r1 prefix toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=4 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +fi + +RELEASE_VER=${PV} + +GCC_BOOTSTRAP_VER=20201208 + +LOCALE_GEN_VER=2.10 + +SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz" +SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" + +IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla" + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +# gzip, grep, awk are needed by locale-gen, bug 740750 + +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-0.1.10 + sys-devel/bison + doc? ( sys-apps/texinfo ) + !compile-locales? ( + app-arch/gzip + sys-apps/grep + virtual/awk + ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-util/systemtap ) + !' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') + ALT_BUILD_HEADERS=${header_path%/linux/version.h} + fi + fi + fi + echo "${ALT_BUILD_HEADERS}" +} + +alt_libdir() { + echo $(alt_prefix)/$(get_libdir) +} +alt_usrlibdir() { + echo $(alt_prefix)/usr/$(get_libdir) +} + +builddir() { + echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1" +} + +do_compile_test() { + local ret save_cflags=${CFLAGS} + CFLAGS+=" $1" + shift + + pushd "${T}" >/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + # Most of the time CC is already set, but not in early sanity checks. + nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}" + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + return 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + [[ ${ABI} == x86 ]] && + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + # Lock glibc at -O2; we want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + strip-unsupported-flags + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # ld can't use -r & --relax at the same time, bug #788901 + # https://sourceware.org/PR27837 + filter-ldflags '-Wl,--relax' + + # #492892 + filter-flags -frecord-gcc-switches + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # glibc's headers disallow -O0 and fail at build time: + # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" + replace-flags -O0 -O1 + + filter-flags '-fstack-protector*' +} + +want_tls() { + # Archs that can use TLS (Thread Local Storage) + case $(tc-arch) in + x86) + # requires i486 or better #106556 + [[ ${CTARGET} == i[4567]86* ]] && return 0 + return 1 + ;; + esac + return 0 +} + +want__thread() { + want_tls || return 1 + + # For some reason --with-tls --with__thread is causing segfaults on sparc32. + [[ ${PROFILE_ARCH} == "sparc" ]] && return 1 + + [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD} + + # only test gcc -- can't test linking yet + tc-has-tls -c ${CTARGET} + WANT__THREAD=$? + + return ${WANT__THREAD} +} + +use_multiarch() { + # Allow user to disable runtime arch detection in multilib. + use multiarch || return 1 + # Make sure binutils is new enough to support indirect functions, + # #336792. This funky sed supports gold and bfd linkers. + local bver nver + bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') + case $(tc-arch ${CTARGET}) in + amd64|x86) nver="2.20" ;; + arm) nver="2.22" ;; + hppa) nver="2.23" ;; + ppc|ppc64) nver="2.20" ;; + # ifunc support was added in 2.23, but glibc also needs + # machinemode which is in 2.24. + s390) nver="2.24" ;; + sparc) nver="2.21" ;; + *) return 1 ;; + esac + ver_test ${bver} -ge ${nver} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + if just_headers ; then + # Avoid mixing host's CC and target's CFLAGS_${ABI}: + # At this bootstrap stage we have only binutils for + # target but not compiler yet. + einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." + return 0 + fi + local VAR=CFLAGS_${ABI} + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. + : ${__GLIBC_CC:=$(tc-getCC ${CTARGET})} + export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}" + einfo " $(printf '%15s' 'Manual CC:') ${CC}" +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + # Users have had a chance to phase themselves, time to give em the boot + if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then + eerror "You still haven't deleted ${EROOT}/etc/locales.build." + eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher." + die "Lazy upgrader detected" + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking that IA32 emulation is enabled in the running kernel" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend $STAT + [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc." + fi + + fi + + # When we actually have to compile something... + if ! just_headers ; then + ebegin "Checking gcc for __thread support" + if ! eend $(want__thread ; echo $?) ; then + echo + eerror "Could not find a gcc that supports the __thread directive!" + eerror "Please update your binutils/gcc and try again." + die "No __thread support in gcc!" + fi + + if [[ ${CTARGET} == *-linux* ]] ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + # All the checks... + einfo "Checking general environment sanity." + sanity_prechecks +} + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + # Consistency is not guaranteed between pkg_ and src_ ... + sanity_prechecks + + use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + setup_env + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + unpack locale-gen-${LOCALE_GEN_VER}.tar.gz +} + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${RELEASE_VER}-${PATCH_VER}" + fi + einfo "Applying Gentoo Glibc Patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" + find . -name configure -exec touch {} + + + # move the external locale-gen to its old place + mkdir extra || die + mv locale-gen-${LOCALE_GEN_VER} extra/locale || die + + eprefixify extra/locale/locale-gen + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" +} + +glibc_do_configure() { + # Glibc does not work with gold (for various reasons) #269274. + tc-ld-disable-gold + + # CXX isnt handled by the multilib system, so if we dont unset here + # we accumulate crap across abis + unset CXX + + einfo "Configuring glibc for nptl" + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + local v + for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do + einfo " $(printf '%15s' ${v}:) ${!v}" + done + + # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 + # To build .S (assembly) files with the same ABI-specific flags + # upstream currently recommends adding CFLAGS to CC/CXX: + # https://sourceware.org/PR23273 + # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS + # and breaks multiarch support. See 659030#c3 for an example. + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}" + einfo " $(printf '%15s' 'Manual CC:') ${CC}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is buil first time + # when ${CTARGET}-g++ is not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi + einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + einfo " $(printf '%15s' 'Manual NM:') ${NM}" + einfo " $(printf '%15s' 'Manual READELF:') ${READELF}" + + echo + + local myconf=() + + case ${CTARGET} in + m68k*) + # setjmp() is not compatible with stack protection: + # https://sourceware.org/PR24202 + myconf+=( --enable-stack-protector=no ) + ;; + *) + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + # '=all' is also known to have a problem in IFUNC resolution + # tests: https://sourceware.org/PR25680, bug #712356. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + ;; + esac + myconf+=( --enable-stackguard-randomization ) + + # Keep a whitelist of targets supporing IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + # Enable Intel Control-flow Enforcement Technology on amd64 if requested + case ${CTARGET} in + x86_64-*) myconf+=( $(use_enable cet) ) ;; + *) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_enable crypt) + $(use_multiarch || echo --disable-multi-arch) + $(use_enable static-pie) + $(use_enable systemtap) + $(use_enable nscd) + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + + # -march= option tricks build system to infer too + # high ISA level: https://sourceware.org/PR27318 + libc_cv_include_x86_isa_level=no + + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="$(host_eprefix)/sbin" + export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" + + # We take care of patching our binutils to use both hash styles, + # and many people like to force gnu hash style only, so disable + # this overriding check. #347761 + export libc_cv_hashstyle=no + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # ia64 static cross-compilers are a pita in so much that they + # can't produce static ELFs (as the libgcc.a is broken). so + # disable building of the programs for those targets if it + # doesn't work. + # XXX: We could turn this into a compiler test, but ia64 is + # the only one that matters, so this should be fine for now. + if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then + sed -i '1i+link-static = touch $@' config.make + fi + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then + echo 'main(){}' > "${T}"/test.c + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_compiler_powerpc64le_binary128_ok=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_target_power8_ok=yes + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + local headers_only_arch_CPPFLAGS=() + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + case ${CTARGET} in + riscv*) + # RISC-V interrogates the compiler to determine which target to + # build. If building the headers then we don't strictly need a + # RISC-V compiler, so the built-in definitions that are provided + # along with all RISC-V compiler might not exist. This causes + # glibc's RISC-V preconfigure script to blow up. Since we're just + # building the headers any value will actually work here, so just + # pick the standard one (rv64g/lp64d) to make the build scripts + # happy for now -- the headers are all the same anyway so it + # doesn't matter. + headers_only_arch_CPPFLAGS+=( + -D__riscv_xlen=64 + -D__riscv_flen=64 + -D__riscv_float_abi_double=1 + -D__riscv_atomic=1 + ) ;; + esac + + local myconf=() + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check +} + +do_src_test() { + local ret=0 + + glibc_src_test + : $(( ret |= $? )) + + return ${ret} +} + +src_test() { + if just_headers ; then + return + fi + + # Give tests more time to complete. + export TIMEOUTFACTOR=5 + + foreach_abi do_src_test || die "tests failed" +} + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local inplace="" + + if [[ "${root}" == "--inplace-glibc" ]] ; then + inplace="--inplace-glibc" + root="$2" + fi + + local locale_list="${root}/etc/locale.gen" + + pushd "${ED}"/$(get_libdir) >/dev/null + + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root}/usr/share/i18n/SUPPORTED" + fi + + set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + # gdb thread introspection relies on local libpthreas symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + cd "${WORKDIR}"/extra/locale + dosbin locale-gen + doman *.[0-8] + insinto /etc + doins locale.gen + + keepdir /usr/lib/locale + + cd "${S}" + + # Install misc network config files + insinto /etc + doins posix/gai.conf nss/nsswitch.conf + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + einfo "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ./ld-*.so --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + use compile-locales || run_locale_gen "${EROOT}/" + fi + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi +} diff --git a/sys-libs/glibc/glibc-2.33.ebuild b/sys-libs/glibc/glibc-2.33.ebuild index db0be61369f3..c97ef6b4c661 100644 --- a/sys-libs/glibc/glibc-2.33.ebuild +++ b/sys-libs/glibc/glibc-2.33.ebuild @@ -23,7 +23,7 @@ PATCH_DEV=dilfridge if [[ ${PV} == 9999* ]]; then inherit git-r3 else - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" SRC_URI="mirror://gnu/glibc/${P}.tar.xz" SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" fi @@ -1248,7 +1248,6 @@ glibc_do_src_install() { n64 /lib64/ld.so.1 # powerpc ppc /lib/ld.so.1 - ppc64 /lib64/ld64.so.1 # riscv ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 ilp32 /lib/ld-linux-riscv32-ilp32.so.1 @@ -1266,12 +1265,16 @@ glibc_do_src_install() { ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 ) ;; big) ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 ) ;; esac diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index fd820a1d5235..112a714c393e 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -1249,7 +1249,6 @@ glibc_do_src_install() { n64 /lib64/ld.so.1 # powerpc ppc /lib/ld.so.1 - ppc64 /lib64/ld64.so.1 # riscv ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 ilp32 /lib/ld-linux-riscv32-ilp32.so.1 @@ -1267,12 +1266,16 @@ glibc_do_src_install() { ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 ) ;; big) ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 ) ;; esac @@ -1289,6 +1292,27 @@ glibc_do_src_install() { fi done + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + # With devpts under Linux mounted properly, we do not need the pt_chown # binary to be setuid. This is because the default owners/perms will be # exactly what we want. diff --git a/sys-libs/kpmcore/Manifest b/sys-libs/kpmcore/Manifest index 26ec0664d69a..4eac64295b95 100644 --- a/sys-libs/kpmcore/Manifest +++ b/sys-libs/kpmcore/Manifest @@ -1,5 +1,5 @@ DIST kpmcore-20.12.3.tar.xz 584264 BLAKE2B de80d48bb6becb3e8d6f5b9b4456e4ad4e220ca52d76700c6be33942c5d762e1fc39b43b3595894a3d28605d7010662ebec588c3f1d3a4525a9efe797dbf65ed SHA512 90083374bbc4b91e948e9ef8e3e272cf7bd6b038261414c7e08eea1a903bd61c723f29a4afe462e29c1a083c6771be435fd4dfbf8a364c2c167f1eed19d04323 -DIST kpmcore-21.04.1.tar.xz 586056 BLAKE2B 1d80fb3ea54853537ccf58297237b94ddbd5dc5889afb18013f1774f448e31c365f7d77a6955b1962427037eaa1a95aafb5d460e622833e1b011683aba993db0 SHA512 7b55399f2a923c61eb381f691c95c32751cde0666bf84d270cad3bbbabc39392e754ed77be0bd4996e365b95a5383b8f8ca20bd6f7ab856153b3d3d7b03088fb +DIST kpmcore-21.04.2.tar.xz 586284 BLAKE2B 33ade0b66b5f48fac3566226556b0f5316c3e5cac8c4f9c9a37737d84d8df585d3e7754bcf146e86ca7c074a18aead0eeb427906d11a21d37780231dcec39704 SHA512 0dc18d52cfd36530bc40ffbbed178d069d30ece50142221077700fca6c7aee2b4dfeb4974c9d01eb67e01cfb1e02e7a64a12131dace06edcff938c4fb587b7f3 EBUILD kpmcore-20.12.3.ebuild 749 BLAKE2B 0e0cd54e67d6fed17f721cf615ac5ebb0a405ed67a7338834d235e15e156119cbd0f8fe9489abb13231e47b89b975314f0fc84f7576833b1262cd6823a4cc1ba SHA512 4db6919ded366d2c343f68c84e929727a0cc6cc2762f886f4a087829b1c30b1f350d20fdaa57fe89cc041f96b30150e79f5966b7f9f968c41a5b79cc63af67d9 -EBUILD kpmcore-21.04.1.ebuild 741 BLAKE2B 41fa2450cc6387ee771ba56aa2e62343b656fd6dcf55076a3105550205dd10f72d0a974fcde784117a1c94274e2c2b4ad2c29c3891391b091944ba130cb39a4e SHA512 c9e94cf51a85e97536686f65011166b5d88504348c99d2d0ceab5fc259f3f42c06d46a986806ed963042b93419c67e41c753df38fe222b58485f2e4f25f9bdc3 +EBUILD kpmcore-21.04.2.ebuild 741 BLAKE2B 41fa2450cc6387ee771ba56aa2e62343b656fd6dcf55076a3105550205dd10f72d0a974fcde784117a1c94274e2c2b4ad2c29c3891391b091944ba130cb39a4e SHA512 c9e94cf51a85e97536686f65011166b5d88504348c99d2d0ceab5fc259f3f42c06d46a986806ed963042b93419c67e41c753df38fe222b58485f2e4f25f9bdc3 MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3 diff --git a/sys-libs/kpmcore/kpmcore-21.04.1.ebuild b/sys-libs/kpmcore/kpmcore-21.04.1.ebuild deleted file mode 100644 index 202540698757..000000000000 --- a/sys-libs/kpmcore/kpmcore-21.04.1.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -ECM_NONGUI="true" -KDE_GEAR="true" -KFMIN=5.80.0 -QTMIN=5.15.2 -inherit ecm kde.org - -DESCRIPTION="Library for managing partitions" -HOMEPAGE="https://apps.kde.org/partitionmanager/" - -LICENSE="GPL-3" -SLOT="5/10" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" -IUSE="" - -# bug 689468, tests need polkit etc. -RESTRICT+=" test" - -BDEPEND="virtual/pkgconfig" -DEPEND=" - >=dev-qt/qtdbus-${QTMIN}:5 - >=dev-qt/qtgui-${QTMIN}:5 - >=dev-qt/qtwidgets-${QTMIN}:5 - >=kde-frameworks/kcoreaddons-${KFMIN}:5 - >=kde-frameworks/ki18n-${KFMIN}:5 - >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 - >=sys-apps/util-linux-2.33.2 - sys-auth/polkit-qt -" -RDEPEND="${DEPEND}" diff --git a/sys-libs/kpmcore/kpmcore-21.04.2.ebuild b/sys-libs/kpmcore/kpmcore-21.04.2.ebuild new file mode 100644 index 000000000000..202540698757 --- /dev/null +++ b/sys-libs/kpmcore/kpmcore-21.04.2.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +ECM_NONGUI="true" +KDE_GEAR="true" +KFMIN=5.80.0 +QTMIN=5.15.2 +inherit ecm kde.org + +DESCRIPTION="Library for managing partitions" +HOMEPAGE="https://apps.kde.org/partitionmanager/" + +LICENSE="GPL-3" +SLOT="5/10" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +IUSE="" + +# bug 689468, tests need polkit etc. +RESTRICT+=" test" + +BDEPEND="virtual/pkgconfig" +DEPEND=" + >=dev-qt/qtdbus-${QTMIN}:5 + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 + >=sys-apps/util-linux-2.33.2 + sys-auth/polkit-qt +" +RDEPEND="${DEPEND}" diff --git a/sys-libs/libapparmor/Manifest b/sys-libs/libapparmor/Manifest index c01321bc70cd..874051f1b5b6 100644 --- a/sys-libs/libapparmor/Manifest +++ b/sys-libs/libapparmor/Manifest @@ -1,9 +1,4 @@ -AUX libapparmor-2.10-symbol_visibility.patch 219 BLAKE2B 37bb9ceabfedde6f21e313fcc6a85563fdeca86863e681fa40689b5ce8cb5bdf87947c19b176d7f96edac562b6420a0ae6aae717967782e1bd1bb6ffd4782671 SHA512 93c5e19a6cdfce232a71f9b33b1e96dff44b947c06fc6e348a31038ef78bec7b90e49698681a4010bffd4274ff17a304542b549a8840458b3ab17d4ef1b53d36 AUX libapparmor-3.0.0-symbol_visibility.patch 354 BLAKE2B 292bb70c043908943ddc553395ccd2a7b61b6d1643b3f9e659057f65065b448e83f821ad6f86abd00aeb96a1dd701864b5491e03a6802b7cc05141594da67c5f SHA512 0fceef027707056b7a22b0782c761c672735bc663d7e0d0200a445ed388f71a646841c3f72bac1f261c0a9fa3c3c0ff239397d53b56b1ef6080a1400c97f89ba -DIST apparmor-2.13.4.tar.gz 7390179 BLAKE2B 49818a010d5e5757dd43710f2af925fbb62a9f8f9be74556ff31a9a8834bebac010762fc6bef3da8d295e487b65d0e0135f4be25bcb01a834846c5e5d65d92a4 SHA512 d42748bf36ae66849f79653a62d499e9d17a97c4d680fb653eb1c379d0593aaa09f7ddfc6f2fa0d2fb468bce05fb25444976f60a5ec24778fdd7ec20d1c13651 -DIST apparmor-3.0.0.tar.gz 7780686 BLAKE2B a9d9edb4fd2cb32b3db322a3f145aac7cea40fac3401b82947b2c5183598cc326d70859466823e3ac0a2227483c7ed7ba0b2f727e9fb7fbf532468716ef8d18f SHA512 2465a8bc400e24e548b0589b7b022fb8325c53858429b9c54204f989d5589d7bd99c9507bde88a48f9965a55edcbac98efeeb6b93aeefe6a27afa0b7e851aea6 DIST apparmor-3.0.1.tar.gz 7785713 BLAKE2B c530d159a4139de8e59d9d975af866259b56d555e3abe2d1e2a6bfd2db57d8371d643bb93f1cd6ca96172960c09a74cc05c82d34a2e253c4c1f6ecce747f4129 SHA512 e1073e7b2cde7cc4cefcfddce8fa5069845b5873c260b9fbd4bea2ff801708101d813ff30e23a64da36f3c6394cd9339e01a170e9add69deef2d70ecd9ed9687 -EBUILD libapparmor-2.13.4.ebuild 2129 BLAKE2B c1cb757b4df3b1c0d285d6f22d43c921aff5ae091f27de6c1bd87273ab4bbddc8a0bcf073ed9183bf0f922ab9742b5a1533d71aad4eb4cfe4984ef0a3272e3ba SHA512 efb43e0bec424fe05204721f9361c5b1f51645f22ec617cc5e1e60e62b165ba61cb748c318f371fd86695e2198b496efdaa2e8ccf90f76f4a0c2786ae188ccd7 -EBUILD libapparmor-3.0.0.ebuild 2164 BLAKE2B 96091697a0d90ef481687b928e062946cef57e7f681146dd7587d909cedd969f4be2afd7391032ddfca4ea96dfd7c1f2d3f7873578e6cb8ca74c8488f1e7f1f8 SHA512 43ac5f822a3f764fb51296bc33b6da85530d64dd5c3171b8f0885ac01950d5ba918ab35e5ebac40e38f3ab375ffd8359fc09cefc568327ca58484fd3040a86a3 EBUILD libapparmor-3.0.1.ebuild 2099 BLAKE2B 78917701ade725899091e4e76d5bec62dc9cc61d0f678d182764434ea91e515a98f8413413e184747c5e9863fe829860e1e9d1b23fd4c5ac5a06eb007b946659 SHA512 c56a65ab1ca44c0bbbe46eeb6e82ae0eea681c8f12f96dc9569c4a5d842b6a3537517ea3578e04e0a6b07fa39c81d0882a199642159819d1a3f8e82d4ea32cec MISC metadata.xml 409 BLAKE2B 63cb1726a015cf118e8ffcc8cf9d49795a75d367e36b0332fbf23faad8b3eed41e2ae090cc92757e12248d831e0ea1782b6f275ef02b7d2d2022bf2b79f69042 SHA512 a66647c5e40f2593017942c12786dc30995e7980fdb58c1de0b9ae34069434cb5a4c70b2bd268a239df82edfcc1e7288e8033bf57609f757a321639afd5e78b8 diff --git a/sys-libs/libapparmor/files/libapparmor-2.10-symbol_visibility.patch b/sys-libs/libapparmor/files/libapparmor-2.10-symbol_visibility.patch deleted file mode 100644 index fa2c384b014f..000000000000 --- a/sys-libs/libapparmor/files/libapparmor-2.10-symbol_visibility.patch +++ /dev/null @@ -1,13 +0,0 @@ -Adds an aditional symbol to allow dynamic linking. - ---- a/src/libapparmor.map -+++ b/src/libapparmor.map -@@ -94,6 +94,7 @@ - _aa_autoclose; - _aa_autofclose; - _aa_dirat_for_each; -+ _aa_asprintf; - local: - *; - }; - diff --git a/sys-libs/libapparmor/libapparmor-2.13.4.ebuild b/sys-libs/libapparmor/libapparmor-2.13.4.ebuild deleted file mode 100644 index e87d5f295ebc..000000000000 --- a/sys-libs/libapparmor/libapparmor-2.13.4.ebuild +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_OPTIONAL=1 -PYTHON_COMPAT=( python3_{7,8} ) -GENTOO_DEPEND_ON_PERL="no" - -inherit autotools distutils-r1 perl-functions - -MY_PV="$(ver_cut 1-2)" - -DESCRIPTION="Library to support AppArmor userspace utilities" -HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home" -SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${PV}/+download/apparmor-${PV}.tar.gz" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~x86" -IUSE="doc +perl +python static-libs" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -RDEPEND="perl? ( dev-lang/perl:= ) - python? ( ${PYTHON_DEPS} )" -DEPEND="${RDEPEND}" -BDEPEND=" - sys-devel/autoconf-archive - sys-devel/bison - sys-devel/flex - doc? ( dev-lang/perl ) - perl? ( dev-lang/swig ) - python? ( dev-lang/swig )" - -S=${WORKDIR}/apparmor-${PV}/libraries/${PN} - -PATCHES=( "${FILESDIR}/${PN}-2.10-symbol_visibility.patch" ) - -# depends on the package already being installed -RESTRICT="test" - -src_prepare() { - rm -r m4 || die "failed to remove bundled macros" - default - eautoreconf - use python && distutils-r1_src_prepare -} - -src_configure() { - econf \ - $(use_enable static-libs static) \ - $(use_with perl) \ - $(use_with python) -} - -src_compile() { - emake -C src - emake -C include - use doc && emake -C doc - use perl && emake -C swig/perl - - if use python ; then - pushd swig/python > /dev/null - emake libapparmor_wrap.c - distutils-r1_src_compile - popd > /dev/null - fi -} - -src_install() { - emake DESTDIR="${D}" -C src install - emake DESTDIR="${D}" -C include install - use doc && emake DESTDIR="${D}" -C doc install - - if use perl ; then - emake DESTDIR="${D}" -C swig/perl install - perl_set_version - insinto "${VENDOR_ARCH}" - doins swig/perl/LibAppArmor.pm - - # bug 620886 - perl_delete_localpod - perl_fix_packlist - fi - - if use python ; then - pushd swig/python > /dev/null - distutils-r1_src_install - - python_moduleinto LibAppArmor - python_foreach_impl python_domodule LibAppArmor.py - popd > /dev/null - fi - - dodoc AUTHORS ChangeLog NEWS README - - find "${D}" -name '*.la' -delete || die -} diff --git a/sys-libs/libapparmor/libapparmor-3.0.0.ebuild b/sys-libs/libapparmor/libapparmor-3.0.0.ebuild deleted file mode 100644 index a3bba356f5d0..000000000000 --- a/sys-libs/libapparmor/libapparmor-3.0.0.ebuild +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_OPTIONAL=1 -DISTUTILS_USE_SETUPTOOLS="no" -PYTHON_COMPAT=( python3_{7,8} ) -GENTOO_DEPEND_ON_PERL="no" - -inherit autotools distutils-r1 perl-functions - -MY_PV="$(ver_cut 1-2)" - -DESCRIPTION="Library to support AppArmor userspace utilities" -HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home" -SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${MY_PV}/+download/apparmor-${PV}.tar.gz" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~x86" -IUSE="doc +perl +python static-libs" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -RDEPEND="perl? ( dev-lang/perl:= ) - python? ( ${PYTHON_DEPS} )" -DEPEND="${RDEPEND}" -BDEPEND=" - sys-devel/autoconf-archive - sys-devel/bison - sys-devel/flex - doc? ( dev-lang/perl ) - perl? ( dev-lang/swig ) - python? ( dev-lang/swig )" - -S=${WORKDIR}/apparmor-${PV}/libraries/${PN} - -PATCHES=( "${FILESDIR}/${PN}-3.0.0-symbol_visibility.patch" ) - -# depends on the package already being installed -RESTRICT="test" - -src_prepare() { - rm -r m4 || die "failed to remove bundled macros" - default - eautoreconf - use python && distutils-r1_src_prepare -} - -src_configure() { - econf \ - $(use_enable static-libs static) \ - $(use_with perl) \ - $(use_with python) -} - -src_compile() { - emake -C src - emake -C include - use doc && emake -C doc - use perl && emake -C swig/perl - - if use python ; then - pushd swig/python > /dev/null - emake libapparmor_wrap.c - distutils-r1_src_compile - popd > /dev/null - fi -} - -src_install() { - emake DESTDIR="${D}" -C src install - emake DESTDIR="${D}" -C include install - use doc && emake DESTDIR="${D}" -C doc install - - if use perl ; then - emake DESTDIR="${D}" -C swig/perl install - perl_set_version - insinto "${VENDOR_ARCH}" - doins swig/perl/LibAppArmor.pm - - # bug 620886 - perl_delete_localpod - perl_fix_packlist - fi - - if use python ; then - pushd swig/python > /dev/null - distutils-r1_src_install - - python_moduleinto LibAppArmor - python_foreach_impl python_domodule LibAppArmor.py - popd > /dev/null - fi - - dodoc AUTHORS ChangeLog NEWS README - - find "${D}" -name '*.la' -delete || die -} diff --git a/sys-libs/libcap-ng/Manifest b/sys-libs/libcap-ng/Manifest index a9da9438e3a4..7b367b6e0f15 100644 --- a/sys-libs/libcap-ng/Manifest +++ b/sys-libs/libcap-ng/Manifest @@ -1,11 +1,4 @@ -DIST libcap-ng-0.7.11.tar.gz 450541 BLAKE2B 66217f7fb9e3b3876ada6f355a2b69f16fda4ab3ab490e524358c4120583280ce6497770ec6452596426594b877d79c0e03db10d6413c1cf20bd01e996f7347b SHA512 150c4f48d7334966aa7af683e46bc3b8b4d4a2e80be826e6f6a61a0ea0666e2f4dafcd012c536fa321c4954c00059c689cc8d6dc089000ca1dca2fd52e3efe9c -DIST libcap-ng-0.8.1.tar.gz 454950 BLAKE2B d2d8902526f1cb6f1f579ec4ca1ca33bf45db325eac07a94b97dcee58411f8657591a840cb7420a94617bf8c21858c4b31138ca3126f6cfaff6b8c82b991149f SHA512 cd28ceb43e2cf5d3a0140fddbd2ea13dfda8eeea8a6de1817f3cc3b38df874ab8653917dbd405ad7aaaa71bcb9ec246d995079aa3cb0af1cffbdb37dfdd99232 DIST libcap-ng-0.8.2-apply-disable.patch 723 BLAKE2B 70d9959c55119c02bbc4ea605251491c04c477511c20b9fe93e6527ffd3fe2f35a72fabab5ca149c4aaf536c6cd8dceb15375297158f8827a0c676744381bbc1 SHA512 8c9317bdd4fde7d6a4618ec613bce46bed7646891bd16bc3fa307e9a814e38601bf3c6ad13102389d4596d9ed6a7ad853cca58624e724fe07383007e386c51f8 -DIST libcap-ng-0.8.2-apply.patch 2898 BLAKE2B 4c388bc2a61646639a78b6b3038a1027df7807076b9d0bef7c850e8c86e354260eaee47b4f3d10a1db3d961584935005e155eba04a38decbe4256fc3e5fab968 SHA512 1d3d443c524fb4b885702b460f7ec7eda6377ed571528ca679add9494eb8172ead607ba32e139d4150672e81e79e12687a5b09c93d4f24eb2edb1381c2ced76d DIST libcap-ng-0.8.2.tar.gz 456066 BLAKE2B 7e721d05b92fd3708b970527e76b1898daa91bde3ab6ed5d8f23b1435404fbe7d15731461c6d9d2c791738e5498d1f5eaba727413480d34b7edea13c8691c32b SHA512 0ac6e55c03b1fba3a849048b721e250951afb59190d9646704d4fd9938eccc3bd0767380fbddc42f186b4f55695475e31f34f537ae91c04a37662577a5b7a19b -DIST libcap-ng-0.8.tar.gz 453181 BLAKE2B 8f4b2e13e5c2c21f1ac1455ebdaf04b42e07fa79d9026651f41eab041cdf99bd40d91b8ce2262e58bc2de3e2a793f676df8c69d832ccadfa4b486ebefeb4b128 SHA512 d410d66f46ad25765f35ffac17e0d36740329c334c6535d55a13fa218718a750763b7ad4610efa47efe7c256c143ead7dde7d37a29e99cb5c55161f577c40bb2 -EBUILD libcap-ng-0.7.11.ebuild 2049 BLAKE2B 35338ba2407a07b2477a12064c41573de88eb24bc8b237b329c007f7d3958c2d0b1af1eba4ff5f928aea566a33ac966acc6df08052df69de0df21319891b7d18 SHA512 e8a66b995343cabcf000bfbcae83a66e638c12be38b628a669429c603909e6868497309c2e66538dc34c6a84b8a874ab9b11a2783505baa45072d55c5b49b633 -EBUILD libcap-ng-0.8.1-r1.ebuild 2648 BLAKE2B 7575eefdfdd2a62e973cd1485523fa2247665babcb858c78ba30036ff46b97dcea644e9be672d64a509e112dd07b61586ea92ba0f7c3100b5aad2778fe079931 SHA512 3778f3ebff0e4e9e2f1ed91159700a7db9e3529ab31de4c9bc0d597d92706be57a03451cb4ad82dd5b8da22e376758dc733bbecbfdb02f1c4d189a4d364f8e2b EBUILD libcap-ng-0.8.2-r1.ebuild 2360 BLAKE2B 80205b9fe7bace9bf26e569c1c07d91eae2e07afb619697d2f62d84a0ae2b520d688225fcf897e8e33aee9b989e01fd39b55a9bde2e13ff806d379138ea683bd SHA512 b941ffc08d3c9bd1018ece53bd42e548697c48999250a5e76d71b6b51bbddd63e750061aeed65b6175265e04353dd9e4f04be23038771184a239f9ad714b5217 -EBUILD libcap-ng-0.8.ebuild 2057 BLAKE2B 6d9b1f73c76c72c698f497ac602d149ca8ad673142ab698a84382e8e273e1ba6805fd856947102db03fbc038675f6faf291a38d123a085d4ba8b182132b862a4 SHA512 6aef3e5a87aa6e6bec3dabd1c4259a8b0bb13fd31defecd4ff36957171ef292ba63314542c861d5768802721badb90bca4cd2a87edc021a68f3fca1889522de9 MISC metadata.xml 673 BLAKE2B f4890411426cd85bc65373e34f5e1c2b5b294ee6774b8af47cb8effcb4d5730772fee52bcf0fdd477f56b412b1918214467cc0afc3f13b56098d45a98009ce4d SHA512 8f15beccf0bed144b7cceb7699e9e90e05bca2b0fa2bc198dc6cdc5af95f57c9fb07c9049d5b7229b2ec71b945cee3b20210874ebb030566caee850d50980d95 diff --git a/sys-libs/libcap-ng/libcap-ng-0.7.11.ebuild b/sys-libs/libcap-ng/libcap-ng-0.7.11.ebuild deleted file mode 100644 index a8cccecf3c6a..000000000000 --- a/sys-libs/libcap-ng/libcap-ng-0.7.11.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8} ) - -inherit autotools flag-o-matic python-r1 - -DESCRIPTION="POSIX 1003.1e capabilities" -HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/" -SRC_URI="https://people.redhat.com/sgrubb/${PN}/${P}.tar.gz" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux" -IUSE="python static-libs" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND="python? ( ${PYTHON_DEPS} )" -DEPEND="${RDEPEND} - sys-kernel/linux-headers" -BDEPEND="python? ( >=dev-lang/swig-2 )" - -src_prepare() { - default - if use prefix ; then - sed -i "s@cat /usr@cat ${EPREFIX}/usr@" bindings/python*/Makefile.am || die - eautomake #668722 - fi -} - -src_configure() { - use sparc && replace-flags -O? -O0 - - local ECONF_SOURCE="${S}" - - local myconf=( - $(use_enable static-libs static) - ) - - local pythonconf=( --without-python --without-python3 ) - - # set up python bindings build(s) - if use python ; then - setup_python_flags_configure() { - pythonconf=( --without-python --with-python3 ) - run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}" - } - - python_foreach_impl setup_python_flags_configure - else - local BUILD_DIR=${WORKDIR}/build - run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}" - fi -} - -src_compile() { - if use python; then - python_foreach_impl run_in_build_dir emake - else - local BUILD_DIR=${WORKDIR}/build - emake -C "${BUILD_DIR}" - fi -} - -src_test() { - if [[ "${EUID}" -eq 0 ]]; then - ewarn "Skipping tests due to root permissions." - return - fi - - if use python; then - python_foreach_impl run_in_build_dir emake check - else - local BUILD_DIR=${WORKDIR}/build - emake -C "${BUILD_DIR}" check - fi -} - -src_install() { - if use python; then - python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install - else - local BUILD_DIR=${WORKDIR}/build - emake -C "${BUILD_DIR}" DESTDIR="${D}" install - fi - find "${ED}" -name '*.la' -delete || die -} diff --git a/sys-libs/libcap-ng/libcap-ng-0.8.1-r1.ebuild b/sys-libs/libcap-ng/libcap-ng-0.8.1-r1.ebuild deleted file mode 100644 index 4e348e781af4..000000000000 --- a/sys-libs/libcap-ng/libcap-ng-0.8.1-r1.ebuild +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8} ) - -inherit autotools flag-o-matic python-r1 - -DESCRIPTION="POSIX 1003.1e capabilities" -HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/" -# Fedora 0.8.1 https://src.fedoraproject.org/rpms/libcap-ng/c/49e3114cf75fabe9919300e42f7b151eee9e37d1?branch=master -# Fedora 0.8.2 https://src.fedoraproject.org/rpms/libcap-ng/c/a5b0f536df1132d8e7afa4c0ce07b630e7970cad?branch=master -SRC_URI="https://people.redhat.com/sgrubb/${PN}/${P}.tar.gz - https://src.fedoraproject.org/rpms/libcap-ng/raw/49e3114cf75fabe9919300e42f7b151eee9e37d1/f/libcap-ng-0.8.2-apply.patch - https://src.fedoraproject.org/rpms/libcap-ng/raw/a5b0f536df1132d8e7afa4c0ce07b630e7970cad/f/libcap-ng-0.8.2-apply-disable.patch" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux" -IUSE="python static-libs" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND="python? ( ${PYTHON_DEPS} )" -DEPEND="${RDEPEND} - sys-kernel/linux-headers" -BDEPEND="python? ( >=dev-lang/swig-2 )" - -PATCHES=( - "${DISTDIR}"/libcap-ng-0.8.2-apply.patch - "${DISTDIR}"/libcap-ng-0.8.2-apply-disable.patch -) - -src_prepare() { - default - if use prefix ; then - sed -i "s@cat /usr@cat ${EPREFIX}/usr@" bindings/python*/Makefile.am || die - eautomake #668722 - fi -} - -src_configure() { - use sparc && replace-flags -O? -O0 - - local ECONF_SOURCE="${S}" - - local myconf=( - $(use_enable static-libs static) - ) - - local pythonconf=( --without-python --without-python3 ) - - # set up python bindings build(s) - if use python ; then - setup_python_flags_configure() { - pythonconf=( --without-python --with-python3 ) - run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}" - } - - python_foreach_impl setup_python_flags_configure - else - local BUILD_DIR=${WORKDIR}/build - run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}" - fi -} - -src_compile() { - if use python; then - python_foreach_impl run_in_build_dir emake - else - local BUILD_DIR=${WORKDIR}/build - emake -C "${BUILD_DIR}" - fi -} - -src_test() { - if [[ "${EUID}" -eq 0 ]]; then - ewarn "Skipping tests due to root permissions." - return - fi - - if use python; then - python_foreach_impl run_in_build_dir emake check - else - local BUILD_DIR=${WORKDIR}/build - emake -C "${BUILD_DIR}" check - fi -} - -src_install() { - if use python; then - python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install - else - local BUILD_DIR=${WORKDIR}/build - emake -C "${BUILD_DIR}" DESTDIR="${D}" install - fi - find "${ED}" -name '*.la' -delete || die -} diff --git a/sys-libs/libcap-ng/libcap-ng-0.8.ebuild b/sys-libs/libcap-ng/libcap-ng-0.8.ebuild deleted file mode 100644 index 0885295ff35b..000000000000 --- a/sys-libs/libcap-ng/libcap-ng-0.8.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8} ) - -inherit autotools flag-o-matic python-r1 - -DESCRIPTION="POSIX 1003.1e capabilities" -HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/" -SRC_URI="https://people.redhat.com/sgrubb/${PN}/${P}.tar.gz" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux" -IUSE="python static-libs" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND="python? ( ${PYTHON_DEPS} )" -DEPEND="${RDEPEND} - sys-kernel/linux-headers" -BDEPEND="python? ( >=dev-lang/swig-2 )" - -src_prepare() { - default - if use prefix ; then - sed -i "s@cat /usr@cat ${EPREFIX}/usr@" bindings/python*/Makefile.am || die - eautomake #668722 - fi -} - -src_configure() { - use sparc && replace-flags -O? -O0 - - local ECONF_SOURCE="${S}" - - local myconf=( - $(use_enable static-libs static) - ) - - local pythonconf=( --without-python --without-python3 ) - - # set up python bindings build(s) - if use python ; then - setup_python_flags_configure() { - pythonconf=( --without-python --with-python3 ) - run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}" - } - - python_foreach_impl setup_python_flags_configure - else - local BUILD_DIR=${WORKDIR}/build - run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}" - fi -} - -src_compile() { - if use python; then - python_foreach_impl run_in_build_dir emake - else - local BUILD_DIR=${WORKDIR}/build - emake -C "${BUILD_DIR}" - fi -} - -src_test() { - if [[ "${EUID}" -eq 0 ]]; then - ewarn "Skipping tests due to root permissions." - return - fi - - if use python; then - python_foreach_impl run_in_build_dir emake check - else - local BUILD_DIR=${WORKDIR}/build - emake -C "${BUILD_DIR}" check - fi -} - -src_install() { - if use python; then - python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install - else - local BUILD_DIR=${WORKDIR}/build - emake -C "${BUILD_DIR}" DESTDIR="${D}" install - fi - find "${ED}" -name '*.la' -delete || die -} diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest index 66a9bd53db68..0d0ae4d77201 100644 --- a/sys-libs/libcap/Manifest +++ b/sys-libs/libcap/Manifest @@ -1,16 +1,11 @@ AUX libcap-2.21-include.patch 218 BLAKE2B 536be33e749bc818efb29e3a7a010029025520c4694178aa1d85bf0c48abfca4c77f940b4fbb9bd08464edc31af657960fc41cab71d112ebf3573d1aa1f23148 SHA512 637f5dc2d7ead44a19a57db436ddf7e8afa1b368c72e5520a1ac77633c20b0f9a2af9defdafed1edb7209474798d1bcd236c712a160b5c6920d8864411baefed AUX libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch 988 BLAKE2B 63417032b843ff7cb704c9880cfca4db5083d05d479c71dd12925d729f22a4900c2ae277a20399d58830eaca969842d587a2ae0a646809d6b659a75d13678312 SHA512 ba573ce68858c1370f3d25ad03678a534e6f3052076694d09e795d1febf2f3d76a6a170658b71d9e31105521fd5d22dd72095585a5402286dba424937064b389 AUX libcap-2.38-no_perl.patch 3049 BLAKE2B 77fdcda75b273fd69695161d48f37fda40375f5f36acdb31e9f9e5b7585e6933733586c6ad96673efb79a6657dbbffd4431612ed723905e9f4d595a9dd8c49c4 SHA512 f3938a8a78407639bfdda4d9c4b4096025f956430f9efbce438689aabbea74915c55c6afbd45a7af4ecc0c437ee72e9aa8335da52d3237c928702e62824e537a -AUX libcap-2.42-build-system-fixes.patch 6518 BLAKE2B 138347d98901a0a41c36a3f3e1ff7c539836ba00e0cb1c80005d1e261c35f822bee51a4ca86be324f84b29fc6362e9b891ef105b2142f22be4e8896731b3ee16 SHA512 fbe8fe06ab3650b3247811b04b4afa1d56fc641de0b90c448b99904816b7d4e02d30c5dc54cd038d57c16f828a671c73f3c176e1e5826e6b9c69e2d3085015ff AUX libcap-2.48-build-system-fixes.patch 6274 BLAKE2B 4c81eb50b0a682ca9df03145a53e884589e0961e1b754b522f40d48fca60fe983ae93349d256e62977bf28c99c8c25763d05aa8483aebfc436664756a220d70a SHA512 5b88a5c5ea14d2270ed4018249ceb32b0c91db03ed18a6989cc44250da91887385dc3f37087f716771ddbaa90c7e3d733a64063507465eb354252d9f64b85f80 AUX libcap-2.50-build-system-fixes.patch 6687 BLAKE2B d46b6f0734a5acd930248b29c17850447d87f4e554b4d3e79cb35d978b17552e84e27e036c3b0c4ae6573f94e9e7033a9264b646d61dc8c441c04bc6d9b12af8 SHA512 0fd3b5463dcbbaca41d7c1099be7dd370945408f3763dad68d128a650cbf62c23c653a971b07ed4cdc1b56d425caeec3775b91912635c6a2539534bd20e00756 AUX libcap-2.50-install_capsh_again.patch 991 BLAKE2B f9260fe8d3045e7d4408d5c2ba976a7c22031f174a14c282c31df8e4ac9a7a9cfe8207bdacd0b10d4ed741030319f2524edfc6ca28abdc0040118f2e3286b350 SHA512 891f690440b6d67a2d1f32bb1a8fc51048ba2b6d8c5e0cc1543d741e1ed0b32898a7df7641382698b23056b279c7cf7ed1cfa162a1908ff6362cf011e22d632b -DIST libcap-2.43.tar.xz 125284 BLAKE2B bde36f8397f4adb74760eb403daa06bee1b8f45ddc253cc3c3ef1f6e95d0e4c76d0f2e6fa3335a8bc451f18ac7128c96230f6aba9ae0320fa4f9d669e7b4f715 SHA512 817add571fb2c54ad2a39974e6545b8fc8d855ecdcf2e00b2cc10e583802c49dfea2d8bca484c89ecd574fdacfc46565b51e3064a4407cf1985defb913240d45 -DIST libcap-2.48.tar.xz 132280 BLAKE2B 43ab75b73a5297ec24467fae82378f8c7aba5356afcebfb32a695d664a4b5268526fd90a009596c0f516a626d8f4523a9b49ec3225b6a886da32e62eb5b55ea5 SHA512 3cb1e2b026c0f60d6f225c7255944d45023e59fd065b8f832739fc90d33b3347981675de12dd705c4ecbd647a494a17daf39e1d92599bcd1a83306886edadba1 DIST libcap-2.49.tar.xz 139568 BLAKE2B 5746dcdf2a737e747450bd50a701ee8543277b17b7fbf1304b79f707a088ea74dc6dc79c61ff89b55b718a460a7b0814f960f44d07944a97b832b78f4e14e07f SHA512 2934a2ded1370edeb9603dbf43d8ca23a2eb5d67efc5cec5d4ba96c707a8db2702da8aa9be0cb86c5ff100d37ec96115c7777a7566ad0ab2e0b4a288bbe357d0 DIST libcap-2.50.tar.xz 143792 BLAKE2B be83dfe1e55a4363936f53afb13edd2c1fd8c9bc27f7946bfda1eb8fb3046d0370997dcf85ba9dab7de10673527b4e8d15f104a75eaf407cba8ed0fc42465790 SHA512 6ac2df1ea9a9154e082c0595d343380ff8abed953b53c635a9297683289f2fa708eff488a42c6053e5ac556a5d90faa8709b3d98a47b2911f05bf80f2663a543 -EBUILD libcap-2.43.ebuild 2164 BLAKE2B dce446ad76deb296dd6c526ada8b15e6d0965dae57acd3599a84fc28295ab1d30ebe9f3de7b346d8247ee782235037a30c60599c06a0db444aa6d4ab0434a0d6 SHA512 112e5c6fae86a2e3a01681853515eca16fd65e42d6c9857f451b5e6188259daf6d7e80a23371d3a97b4af3688a3e13cf339daa938381eae6206d7b4a63d720e3 -EBUILD libcap-2.48.ebuild 2202 BLAKE2B dec34ea59189902fec1554dd51f425a86c1cc74484b8ac8c5c8c3fbacd878a5c671db1c7028349cfadaf2e69ddd3947e854f0fc58bcc1936566b9d0ab63a3927 SHA512 1389c09e6dfda0a790b0974240de29ea958acc2cbb38b23e10408007a1feb19d58999f8c964a54f470f4dc630215cdf16ac8b9b48611e8da81862239ad3d5c2c EBUILD libcap-2.49.ebuild 2195 BLAKE2B b5950f22f86e8ee2008751b9ab76013d603c201e5b1c1665c34f4d7e31bb2102ad1e3ad1c0ad67b2ca48ae5f76ba4c12169f61493a3861e97f1744a3d5355133 SHA512 2a84719633d35cd16a301cbdcde67dc1ee4e7f1f04c043303404d1b088529491fdfdfadd29c3eb5f8a2afbfe7dede105885063322645bca986ffcdf002bb42ee EBUILD libcap-2.50-r1.ebuild 2263 BLAKE2B c05c69b56c92c537dbfa49a48ce1090552c274e638638c6e934ed8b97fb872169d077b07a73e7439210ce9d7a0a3cd935692ae766669603d9482a64f0e3d7eaa SHA512 5f667e05321f15f55ced0dc98520429085808cbbc751f9c7aeab2e75067512fc03fe04bb0f41d27390ea634cc0a2f8a30856142bbd8cbc633042e41163082f07 MISC metadata.xml 332 BLAKE2B 2177c836192a85a6d943221da405f7f11f355011767789d81009d5e4d822a203302a946fa1a0ffbc66be6a37a7069aa94a796125fa1dedbdf023762b47f8f614 SHA512 a9887500fd60b72156ac2589b1fefab8dd70b0c03477dd795f147fdc91bbe6fd027b8cf58c3e86cdb6e831368d34b4881cdf0e833af5aee9e7d1a01e90408ae1 diff --git a/sys-libs/libcap/files/libcap-2.42-build-system-fixes.patch b/sys-libs/libcap/files/libcap-2.42-build-system-fixes.patch deleted file mode 100644 index 10959cf93395..000000000000 --- a/sys-libs/libcap/files/libcap-2.42-build-system-fixes.patch +++ /dev/null @@ -1,200 +0,0 @@ -From 8599fc87e91b7903cfb1877983615dadcbcc1b29 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger -Date: Tue, 5 May 2020 09:52:40 +0200 -Subject: [PATCH] build system fixes - -This touches up the homebrewed build system to work much better "out of the -box" for people. Specifically: - - allow toolchain vars to be set via environment - - CC / BUILD_CC / AR / RANLIB - - CFLAGS / CPPFLAGS / LDFLAGS - - split CPPFLAGS out of CFLAGS - - break -fPIC out of global CFLAGS and only use where needed - - use LDLIBS for libraries, not LDFLAGS - -Signed-off-by: Mike Frysinger - -Forward ported from libcap-2.24 to libcap-2.25 -Forward ported from libcap-2.25 to libcap-2.28 -Forward ported from libcap-2.28 to libcap-2.29 -Forward ported from libcap-2.29 to libcap-2.33 -Forward ported from libcap-2.33 to libcap-2.34 -Forward ported from libcap-2.34 to libcap-2.37 -Forward ported from libcap-2.37 to libcap-2.39 -Forward ported from libcap-2.39 to libcap-2.42 - -Signed-off-by: Lars Wendler ---- - Make.Rules | 12 +++++++----- - Makefile | 1 - - libcap/Makefile | 7 ++++--- - pam_cap/Makefile | 8 +++++--- - progs/Makefile | 2 +- - tests/Makefile | 6 ++++-- - 6 files changed, 21 insertions(+), 15 deletions(-) - -diff --git a/Make.Rules b/Make.Rules -index 8440e18..67fd4a6 100644 ---- a/Make.Rules -+++ b/Make.Rules -@@ -52,13 +52,12 @@ GOMAJOR=0 - # Compilation specifics - - KERNEL_HEADERS := $(topdir)/libcap/include/uapi --IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include - - CC ?= $(CROSS_COMPILE)gcc - DEFINES := -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 - CFLAGS ?= -O2 $(DEFINES) - BUILD_CC ?= $(CC) --BUILD_CFLAGS ?= -O2 $(DEFINES) $(IPATH) -+BUILD_CFLAGS ?= $(CFLAGS) - AR ?= $(CROSS_COMPILE)ar - RANLIB ?= $(CROSS_COMPILE)ranlib - DEBUG = -g #-DDEBUG -@@ -73,16 +72,19 @@ LIBPSXLIB := -L$(topdir)/libcap -lpsx -lpthread - - BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes) - --SYSTEM_HEADERS = /usr/include -+LIBCAP_CPPFLAGS = -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include $(DEFINES) -+CPPFLAGS += $(LIBCAP_CPPFLAGS) -+BUILD_CPPFLAGS += $(LIBCAP_CPPFLAGS) - INCS=$(topdir)/libcap/include/sys/capability.h - LDFLAGS += -L$(topdir)/libcap --CFLAGS += -Dlinux $(WARNINGS) $(DEBUG) -+CPPFLAGS += -Dlinux -+CFLAGS += $(WARNINGS) $(DEBUG) - PAM_CAP ?= $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi) - INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi) - DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi) - - GO := go --GOLANG := $(shell if [ -n "$(shell $(GO) version 2>/dev/null)" ]; then echo yes ; else echo no ; fi) -+GOLANG ?= $(shell if [ -n "$(shell $(GO) version 2>/dev/null)" ]; then echo yes ; else echo no ; fi) - ifeq ($(GOLANG),yes) - GOROOT := $(shell $(GO) env GOROOT) - GOCGO := $(shell if [ "$(shell $(GO) env CGO_ENABLED)" = 1 ]; then echo yes ; else echo no ; fi) -diff --git a/Makefile b/Makefile -index 03d7748..4437468 100644 ---- a/Makefile -+++ b/Makefile -@@ -17,7 +17,6 @@ ifeq ($(GOLANG),yes) - $(MAKE) -C go $@ - rm -f cap/go.sum - endif -- $(MAKE) -C tests $@ - $(MAKE) -C progs $@ - $(MAKE) -C doc $@ - $(MAKE) -C kdebug $@ -diff --git a/libcap/Makefile b/libcap/Makefile -index 81b089e..63fe555 100644 ---- a/libcap/Makefile -+++ b/libcap/Makefile -@@ -21,6 +21,7 @@ PSXOBJS=$(addsuffix .o, $(PSXFILES)) - MAJLIBNAME=$(LIBNAME).$(VERSION) - MINLIBNAME=$(MAJLIBNAME).$(MINOR) - GPERF_OUTPUT = _caps_output.gperf -+CFLAGS += -fPIC - - all: $(MINLIBNAME) $(STACAPLIBNAME) pcs $(STAPSXLIBNAME) - -@@ -50,7 +51,7 @@ libpsx.pc: libpsx.pc.in - $< >$@ - - _makenames: _makenames.c cap_names.list.h -- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@ -+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ - - cap_names.h: _makenames - ./_makenames > cap_names.h -@@ -82,10 +83,10 @@ $(MINLIBNAME): $(CAPOBJS) - ln -sf $(MAJLIBNAME) $(LIBNAME) - - %.o: %.c $(INCLS) -- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@ -+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ - - cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS) -- $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@ -+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@ - - cap_test: cap_test.c libcap.h - $(CC) $(CFLAGS) $(IPATH) $< -o $@ -diff --git a/pam_cap/Makefile b/pam_cap/Makefile -index 56604fd..2da4674 100644 ---- a/pam_cap/Makefile -+++ b/pam_cap/Makefile -@@ -3,6 +3,8 @@ - topdir=$(shell pwd)/.. - include ../Make.Rules - -+CFLAGS += -fPIC -+ - all: pam_cap.so - $(MAKE) testlink - -@@ -16,16 +18,16 @@ install: all - # written (and you know why it fails), email me and explain why. Thanks! - - pam_cap.so: pam_cap.o -- $(LD) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS) -+ $(LD) $(CFLAGS) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS) - - pam_cap.o: pam_cap.c -- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@ -+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ - - test_pam_cap: test_pam_cap.c pam_cap.c - $(CC) $(CFLAGS) $(IPATH) -o $@ test_pam_cap.c $(LIBCAPLIB) $(LDFLAGS) --static - - testlink: test.c pam_cap.o -- $(CC) $(CFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS) -+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS) - - test: pam_cap.so - make testlink -diff --git a/progs/Makefile b/progs/Makefile -index 076e44f..fd13351 100644 ---- a/progs/Makefile -+++ b/progs/Makefile -@@ -23,7 +23,7 @@ $(BUILD): %: %.o $(DEPS) - $(CC) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) - - %.o: %.c $(INCS) -- $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -c $< -o $@ -+ $(CC) $(CAPSH_SHELL) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ - - install: all - mkdir -p -m 0755 $(FAKEROOT)$(SBINDIR) -diff --git a/tests/Makefile b/tests/Makefile -index bfedbc2..2b9a801 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -16,19 +16,21 @@ test: run_psx_test run_libcap_psx_test - - sudotest: test run_libcap_launch_test run_libcap_launch_test - -+CFLAGS += -fPIC -+ - install: all - - run_psx_test: psx_test - ./psx_test - - psx_test: psx_test.c $(DEPS) -- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create -+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create - - run_libcap_psx_test: libcap_psx_test - ./libcap_psx_test - - libcap_psx_test: libcap_psx_test.c $(DEPS) -- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static -+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static - - run_libcap_launch_test: libcap_launch_test libcap_psx_launch_test noop - sudo ./libcap_launch_test --- -2.28.0 - diff --git a/sys-libs/libcap/libcap-2.43.ebuild b/sys-libs/libcap/libcap-2.43.ebuild deleted file mode 100644 index e167daea97bc..000000000000 --- a/sys-libs/libcap/libcap-2.43.ebuild +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit multilib-minimal toolchain-funcs pam usr-ldscript - -DESCRIPTION="POSIX 1003.1e capabilities" -HOMEPAGE="https://sites.google.com/site/fullycapable/" -SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz" - -# it's available under either of the licenses -LICENSE="|| ( GPL-2 BSD )" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -IUSE="pam static-libs" - -# While the build system optionally uses gperf, we don't DEPEND on it because -# the build automatically falls back when it's unavailable. #604802 -RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]" -PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )" -DEPEND="${RDEPEND} - ${PDEPEND} - sys-kernel/linux-headers" - -# Requires test suite being run as root (via sudo) -RESTRICT="test" - -PATCHES=( - "${FILESDIR}"/${PN}-2.42-build-system-fixes.patch - "${FILESDIR}"/${PN}-2.38-no_perl.patch - "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch - "${FILESDIR}"/${PN}-2.21-include.patch -) - -src_prepare() { - default - multilib_copy_sources -} - -run_emake() { - local args=( - exec_prefix="${EPREFIX}" - lib_prefix="${EPREFIX}/usr" - lib="$(get_libdir)" - prefix="${EPREFIX}/usr" - PAM_CAP="$(usex pam yes no)" - DYNAMIC=yes - GOLANG=no - ) - emake "${args[@]}" "$@" -} - -src_configure() { - tc-export AR CC RANLIB - tc-export_build_env BUILD_CC - multilib-minimal_src_configure -} - -multilib_src_compile() { - run_emake -} - -multilib_src_install() { - # no configure, needs explicit install line #444724#c3 - run_emake DESTDIR="${D}" install - - gen_usr_ldscript -a cap - if ! use static-libs ; then - # Don't remove libpsx.a! - # See https://bugs.gentoo.org/703912 - rm "${ED}"/usr/$(get_libdir)/libcap.a || die - fi - - if [[ -d "${ED}"/usr/$(get_libdir)/security ]] ; then - rm -r "${ED}"/usr/$(get_libdir)/security || die - fi - - if use pam; then - dopammod pam_cap/pam_cap.so - dopamsecurity '' pam_cap/capability.conf - fi -} - -multilib_src_install_all() { - dodoc CHANGELOG README doc/capability.notes -} diff --git a/sys-libs/libcap/libcap-2.48.ebuild b/sys-libs/libcap/libcap-2.48.ebuild deleted file mode 100644 index 9cfc5eb049ed..000000000000 --- a/sys-libs/libcap/libcap-2.48.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit multilib-minimal toolchain-funcs pam usr-ldscript - -DESCRIPTION="POSIX 1003.1e capabilities" -HOMEPAGE="https://sites.google.com/site/fullycapable/" -SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz" - -# it's available under either of the licenses -LICENSE="|| ( GPL-2 BSD )" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" -IUSE="pam static-libs" - -# While the build system optionally uses gperf, we don't DEPEND on it because -# the build automatically falls back when it's unavailable. #604802 -RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]" -PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )" -DEPEND="${RDEPEND} - ${PDEPEND} - sys-kernel/linux-headers" - -# Requires test suite being run as root (via sudo) -RESTRICT="test" - -PATCHES=( - "${FILESDIR}"/${PN}-2.48-build-system-fixes.patch - "${FILESDIR}"/${PN}-2.38-no_perl.patch - "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch - "${FILESDIR}"/${PN}-2.21-include.patch -) - -src_prepare() { - default - multilib_copy_sources -} - -run_emake() { - local args=( - exec_prefix="${EPREFIX}" - lib_prefix="${EPREFIX}/usr" - lib="$(get_libdir)" - prefix="${EPREFIX}/usr" - PAM_CAP="$(usex pam yes no)" - DYNAMIC=yes - GOLANG=no - CC="$(tc-getCC)" - AR="$(tc-getAR)" - RANLIB="$(tc-getRANLIB)" - ) - emake "${args[@]}" "$@" -} - -src_configure() { - tc-export AR CC RANLIB - tc-export_build_env BUILD_CC - multilib-minimal_src_configure -} - -multilib_src_compile() { - run_emake -} - -multilib_src_install() { - # no configure, needs explicit install line #444724#c3 - run_emake DESTDIR="${D}" install - - gen_usr_ldscript -a cap - gen_usr_ldscript -a psx - if ! use static-libs ; then - rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die - fi - - if [[ -d "${ED}"/usr/$(get_libdir)/security ]] ; then - rm -r "${ED}"/usr/$(get_libdir)/security || die - fi - - if use pam; then - dopammod pam_cap/pam_cap.so - dopamsecurity '' pam_cap/capability.conf - fi -} - -multilib_src_install_all() { - dodoc CHANGELOG README doc/capability.notes -} diff --git a/sys-libs/libselinux/Manifest b/sys-libs/libselinux/Manifest index 5431d52b9e67..5251638a3ec8 100644 --- a/sys-libs/libselinux/Manifest +++ b/sys-libs/libselinux/Manifest @@ -1,6 +1,6 @@ DIST libselinux-3.1.tar.gz 204703 BLAKE2B 72ff2d99dd6640405e804f58bdfbf05e152615ea92f902b3942602af13dc17080afeabb942ed33ae6b3f528870f4b11584e533848e455a97bf8f7151a8d44646 SHA512 57730cddd2d4751556d9e1f207c0f85119c81848f0620c16239e997150989e3f9a586a8c23861fd51ed89f7e084ad441190a58a288258a49a95f7beef7dbbb13 DIST libselinux-3.2.tar.gz 206380 BLAKE2B 544eaaa87b9738c61929abe48713b530a8909eaea017890040f2fe299af86f09b6eb2cf4c9a68e06268ba09923b2b67703ac7a2b973906acb45f698e9ccaeed2 SHA512 18129ac0b9936e1f66021f1b311cf1c1e27a01e50cb70f08a3e1c642c5251e4538aec25a8427778569dfecf5333cf1fb84f1a59afdce8019328d0cff7e5833c5 EBUILD libselinux-3.1-r1.ebuild 4215 BLAKE2B 36d801acf1836645c710ba451aee245317c85dca7452ee990b1ae4f409e758d1cbdd3e47bd839e642e04e6d0cc30a4413060470a47a613a503361182d51128d6 SHA512 1e62339dd7530ce1eed4884024960e2012b533bc7d1160ce3a821956c502af7eaefee69dddb166df44a5d2a26940d5357400f5019c7b62cfc0209161cfa33af5 -EBUILD libselinux-3.2.ebuild 4235 BLAKE2B 907af15311f4f5e94583ecd32a097021feb022ef997d95eaddf046c6d36c384f6d9ad4de9f2a58cdeb8a65a2993ea5faf4060a840a2af23fe7fd7c5c1e42fef0 SHA512 83b2dca2f27d387db7ce337a217ff3cc25f2271b9a57d0017aec52f4dbed53aab7bbdea3f5f930ad033dcb9bfa1ac3bd3f37ccaa72b31f4b2341919d0d739e65 +EBUILD libselinux-3.2.ebuild 4236 BLAKE2B f80952681363234b36d8e6427a799b952c7c9a880d02d6fd445338043bf371e8e353e6a228f638adec2d3b00f44443a3136845522bc0bbf251050126f5d497da SHA512 49256ada8e1fad4bc3b8d630cbec1952bd6c0e220a9b1aa4322d76a0e3e213b5bc1004c02bfdfa25573c973c3ab264de5bc96961aed60c0eee8bc6897a51d43e EBUILD libselinux-9999.ebuild 4235 BLAKE2B 907af15311f4f5e94583ecd32a097021feb022ef997d95eaddf046c6d36c384f6d9ad4de9f2a58cdeb8a65a2993ea5faf4060a840a2af23fe7fd7c5c1e42fef0 SHA512 83b2dca2f27d387db7ce337a217ff3cc25f2271b9a57d0017aec52f4dbed53aab7bbdea3f5f930ad033dcb9bfa1ac3bd3f37ccaa72b31f4b2341919d0d739e65 MISC metadata.xml 745 BLAKE2B 6658dad55bd195725b345865e152b62528e04201b9743dd3688058eeb6f3ca87add86035c2a14bea0b238273328464f5e2fa36ce6b96ac35fb1cc679e3cb4a7c SHA512 ee405602d0345a118c4b8eac9126417f082f4a37a7d5816a991e21191d4ce71ec883abe7e91f10f5330cdc61e6f7a174968c12f873b08a4bda5186cc4986b363 diff --git a/sys-libs/libselinux/libselinux-3.2.ebuild b/sys-libs/libselinux/libselinux-3.2.ebuild index e2b8d9f65ed0..bb2db991f95e 100644 --- a/sys-libs/libselinux/libselinux-3.2.ebuild +++ b/sys-libs/libselinux/libselinux-3.2.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI="7" -PYTHON_COMPAT=( python3_{7..9} ) +PYTHON_COMPAT=( python3_{7..10} ) USE_RUBY="ruby25 ruby26 ruby27" # No, I am not calling ruby-ng diff --git a/sys-libs/libservicelog/Manifest b/sys-libs/libservicelog/Manifest index b01e058b8aff..e1d6fea9df51 100644 --- a/sys-libs/libservicelog/Manifest +++ b/sys-libs/libservicelog/Manifest @@ -1,3 +1,5 @@ DIST libservicelog-1.1.18.tar.gz 453645 BLAKE2B bacbd3c24d97a563cc3d51872dd349780416914c8f300ba63cf43b666e18f3fc7693556ecfbb21cbb2d66e14ac2d26259f0a587a21cc70ad660626838fd4281f SHA512 a9c4a8c778c257cf9df3d35652d707ef5ff1df1bf40484a7c23bd547127d2eb0f3465ae524e2c4ab3cd67946431ed98ec876e8b4332b5f27df2e927309fd05f2 +DIST libservicelog-1.1.19.tar.gz 90198 BLAKE2B 1abeb831fe2103c19e8e7d2969c9749d7aa7f77ee87b2423b11ca13c717c9d026df60a9cd9c7067e484b4b6cf890ab1d3db1aba6c1071c0dc2583d350dad61e2 SHA512 71ecd7ef59a30fff6336621d279d33520d2d772445af0382609cbe4f311dbe31f35b4e03b3cfe918a9793b065400e0004188f5a5635a0ff71e62cd4d2e78ad66 EBUILD libservicelog-1.1.18.ebuild 598 BLAKE2B 7c439d2a239e8731eacdfc4a1e843dac44c3247ce7d61f464f5ec6cc1fc5c4d903e93fff73c4aae44ae3e3615cc9d983da34e498dd3e246e5d5814dec2ff9255 SHA512 9f495838877049069be55a8a1a45de57fa855453c3a64c3767e60b5559fcb7c6633ee790c8b8d72045a508523333b1e782235c59a01cd9797a604b4b2a0e86e2 +EBUILD libservicelog-1.1.19.ebuild 688 BLAKE2B 5b7bcbafa2bd6819e7551196597f4252953e39d592a36aab97ae94f173b3c226dfe6fdb05c56d23c556f361e9db003e48254ee8fed0b7b96d0e1f6673e1d5fc1 SHA512 ea27d8b5102a63ded9c0894f86fe253aa03bb4bb6487e291ca7584e5fb3c610cd7def182b3bc76c9dd5d564538fce24ffefd32d34c0e25b31ad3c4fc2c5214da MISC metadata.xml 343 BLAKE2B 88ff852b7b901d0f81c494ab49f283835edb7e312965526050fde66fcf0b259c197e0b1b312e09910a77257e4e1b8d8f3fd6c465b95a9fbe7288b8d64a4a6659 SHA512 42f1b8b76a107cfa61ae9db8b900aed22a3bc8e8d3573dbb3c507ebde688ef2c50f7f79847eb345e738365fbb99ba22d99aee56e302c6eed064379ddc1e3a710 diff --git a/sys-libs/libservicelog/libservicelog-1.1.19.ebuild b/sys-libs/libservicelog/libservicelog-1.1.19.ebuild new file mode 100644 index 000000000000..8d3fc3d75d9c --- /dev/null +++ b/sys-libs/libservicelog/libservicelog-1.1.19.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="Provides a library for logging service-related events" +SRC_URI="https://github.com/power-ras/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +HOMEPAGE="https://github.com/power-ras/libservicelog" + +SLOT="0" +LICENSE="GPL-2+" +KEYWORDS="~ppc ~ppc64" +IUSE="static-libs" + +DEPEND=" + dev-db/sqlite:= + sys-libs/librtas +" +RDEPEND=" + ${DEPEND} + virtual/logger +" +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf --disable-static +} + +src_install() { + local DOCS=( ChangeLog README ) + default + find "${D}" -name '*.la' -delete || die +} diff --git a/sys-libs/libxcrypt/Manifest b/sys-libs/libxcrypt/Manifest index 67a32e1b1221..d96148e5b2a6 100644 --- a/sys-libs/libxcrypt/Manifest +++ b/sys-libs/libxcrypt/Manifest @@ -6,7 +6,7 @@ DIST libxcrypt-4.4.17.tar.gz 519096 BLAKE2B 12cbe3d1f235baddd8d2ec8159f2a7514e75 DIST libxcrypt-4.4.19.tar.gz 534269 BLAKE2B 22c27fe2bfe32a7752f7be495a072c774a5a9ab9a7616fb80ff05afae4d9ff1ecfd1a04b4bd7c850df46f60aa5850225684464cf65d2a145302f128285ac8a9b SHA512 f5bd2598b5d0de47f3d805bbd4a045439e456d361a39e8725c40e2e1f32cf392bdc20b51840528f53cec052dff98be1a009fcd70b92e288584bedf06ef94b816 DIST libxcrypt-4.4.20.tar.gz 534367 BLAKE2B 9174bd342dc13db8fd724a13e3fbd222a0f5e2d058be2d7f511816e137fa61bd73d4b9482c85d81f27404d0e650be59c45f25d70ec3c506730d2422da4e97417 SHA512 66b1966003427728f96d5a83f75930a4b82d31133392bede3975cf9a1e1423d0312e73da598e40d0e3507f26fac5222cc92d7a5593f2b737d8557a5d4bf2461e EBUILD libxcrypt-4.4.16.ebuild 4191 BLAKE2B 64921e9c8bb070e5810504344ebda777acd45d685050e1b2dae8c0cf5530e1ef4ec148a13006be79a5d4252cf41ed08ff116e945bf75d7650ccf886b80ec5ace SHA512 0400b4078afff126f448286ca5f6285684278f1cb460ff536cfc71ac0aa5dafb843406cfdaeb2b465443d5bebd157d8264a073fb962d244c88ed270ceeeec957 -EBUILD libxcrypt-4.4.17.ebuild 4263 BLAKE2B 67b3d5d1561399d69c15912bfb4e3034e4a844e45ca31246acf12b0405e0dca26478e71d71e8fbd8df8c3aaa1eb09f687f20786fc8b92eaecf28ec0435b7c59b SHA512 dee010233c239ae089f211d908a706b1c6b5b4015e1ca80023d968b84a410a39aad4ea5b45efb27d7b32a9db280ec80d75ca1454eb32896cc6ff095c0f5cbbb4 +EBUILD libxcrypt-4.4.17.ebuild 4261 BLAKE2B 621c91e359a6d2c4d3e152b9c2590e676bfb2d5dee5d50ee7247418e37710e1a486a47b690fc015830f1464ed2eb83facec5385f3435b03359a83e38cb1f347b SHA512 f148a47f62ef9aff0fd3fde65d00df2f5819e28b44ea60fed5d04d0aa5efe7dab5eb71b9d1735fb9ce6647af12705dc6cb6a3eae06eece12874e5ba7844bc228 EBUILD libxcrypt-4.4.19.ebuild 4215 BLAKE2B 60b120aa9a9af60001c4180c2e7ba4bf9e0410b00a206aea3c4ce09e6c5af1c633b4a35e99d76a40435680e1be0a782dfed2c971a7d6d9d1b363d3f69a55e16a SHA512 0323090b8e5a909565000b7929174081a5a2fde35f08fc5b523a47c739375141c747b1d2d923f43fd80ef0913d02dc1d365eb23c8c082935560f87abfbc85acb EBUILD libxcrypt-4.4.20.ebuild 4215 BLAKE2B 60b120aa9a9af60001c4180c2e7ba4bf9e0410b00a206aea3c4ce09e6c5af1c633b4a35e99d76a40435680e1be0a782dfed2c971a7d6d9d1b363d3f69a55e16a SHA512 0323090b8e5a909565000b7929174081a5a2fde35f08fc5b523a47c739375141c747b1d2d923f43fd80ef0913d02dc1d365eb23c8c082935560f87abfbc85acb MISC metadata.xml 856 BLAKE2B e9fea1aa08f5b3f0abdd4d490973da2f133ea90e3a366d4549361233f51e674cc646b2fb6b4b15bca72d5a4e3b36be9a06e55afd3a4cb8f439d3958f09f8af25 SHA512 862cf3201efbecfc23167ecd1f6798f6729ba4e76749c174d17baf8aa4887f21d36f40234f35bc1b896e4384d110033b3f2260f01930b926f759e0243039adf8 diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.17.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.17.ebuild index 6d5eb88feb8e..15872f5b298f 100644 --- a/sys-libs/libxcrypt/libxcrypt-4.4.17.ebuild +++ b/sys-libs/libxcrypt/libxcrypt-4.4.17.ebuild @@ -11,7 +11,7 @@ HOMEPAGE="https://github.com/besser82/libxcrypt" LICENSE="LGPL-2.1+ public-domain BSD BSD-2" SLOT="0/1" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86" IUSE="+compat split-usr +static-libs system test" DEPEND="system? ( diff --git a/sys-libs/musl-nscd/Manifest b/sys-libs/musl-nscd/Manifest index b40b937daaf4..bca14a563ba3 100644 --- a/sys-libs/musl-nscd/Manifest +++ b/sys-libs/musl-nscd/Manifest @@ -3,6 +3,8 @@ AUX nscd.initd 1415 BLAKE2B 4f9ef4c36addc71bb42ba1d8e1fa8657efd4b8d52ac69f8c1baa AUX nscd.service 337 BLAKE2B 6b163465dd8db024652921892dc913da8dfc0984eec7ffce621229e48fa99dcedc3b5944844529190122c81f4884b6a6fe7836d37d2d812f34059c530856dec1 SHA512 2001100f3b054843c69b6fd2d38852c7c824282aa8998c25a3c0352db993705429d25c70d8ce6cb3579f836b7089644c520acac423ebd69cb1b36e94a77c5bea AUX nscd.tmpfilesd 111 BLAKE2B 4abb7220564e248fc7eeeced41077f186f42594facbfac9a4c0ff36209baac529c219ad6ead8d8aa53ab2b092002f1006a4479459b9e9a7c5a0294cb7d822100 SHA512 53b80b331e1a85d8ee16eb2ce547a7249e944926c3d1cdd4a47a5301a5c842ffc7ec1e3dc0a731542a8facf8261c1c57121802d01741aa89898a3476c09da340 DIST musl-nscd-1.0.2.tar.gz 44912 BLAKE2B 8a496c941232ba617b8468351cbbb780b1decc2c162210f939abb3baa430a5f5a79e21fcd3aadac2cbe62820452fc18001edc7ebc13cae7a6ab768353c45235f SHA512 45cd73f1e0eee7b32c3dcdfa96c0a11379f6208389b87fee97016af0ecb19e9e7d2a2f10e0df6e5ed8a6ad4bbbef70c01cd31ac3631fb1bcce6e69bf48843a3d +DIST musl-nscd-1.0.3.tar.gz 45023 BLAKE2B de3985878745497f0f6904efba0ecf1c5d4ab96dd190fe0b776459db946749858821f51e75d457172da75cd68c5bba22143647b269473f35d41e0ab9bbac3e36 SHA512 b931a28d70bbcc19a5b592449e7400ee61d5af93511d44e2e63416010b3938f1d350a965b0ad876699bed406926d3180a0380868279e13d3456e2264c80a4b7d EBUILD musl-nscd-1.0.2.ebuild 1015 BLAKE2B 73061b724e64c2eb47d0a56ac7dc7d6b8235ff11700e3f76664eb3c1fcff6e33c23965448a5c13d6f3209e03ccb1c3d6ccffe63b41dbcd7b2976e17e23821861 SHA512 3f31453c735d942ec069957ef32f29507be0562b266213e294642a2061c1986a273947f1675b311701aeeb6b14647abc18e9786abf24a9c109f96a226f93c790 +EBUILD musl-nscd-1.0.3.ebuild 1022 BLAKE2B 8a37057203154bb9919dc54477c44ce62dbf824a02ba68be38fed9dae89c38dccf9e0696336b08a259572240173a8d63f463c0cd34a2c3779ddfab04b0616e81 SHA512 8fed5b3aab25cc9cc23875411d9fe76abe12448fef819c9cb268f1d5a10f33250697783b324ad58d943263e2230078a228491da374af070f2ea7522227ac6676 EBUILD musl-nscd-9999.ebuild 971 BLAKE2B ec22dc743bc4506ebac6a137aaeaca5656d2f608ae59b3b6bfe547270de9d047ff6b8062fe4b56217e9a7edf64d057348f3708364c0ffc6d7cc06c9262c426a0 SHA512 92b39cd7110da5a0a18506f8e75f3eab66c9b9eb3174b0ed4422d88239d9ae1528569af1230cb60726ca653fbad3aa8c98fd726fc8f9d2466379fbb440745679 MISC metadata.xml 408 BLAKE2B 579dfe2bda31eb1fc83e098f2b3675ef14b9c62b62ed5cfc01989b22f8925a2fbb029bafcb29d12574faf39abd5611adf699e98266cb01e25324baf3adeb4e62 SHA512 e96f5818d7882c06ec6788eb7ee5caa504773d130cdc20d3f314c1787e655879490c8559b0366561ff5d209cfa9f31a10fc3f9985c522a78947870c2c8b5122f diff --git a/sys-libs/musl-nscd/musl-nscd-1.0.3.ebuild b/sys-libs/musl-nscd/musl-nscd-1.0.3.ebuild new file mode 100644 index 000000000000..fb9101f102ec --- /dev/null +++ b/sys-libs/musl-nscd/musl-nscd-1.0.3.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit systemd tmpfiles + +DESCRIPTION="musl-nscd is an implementation of the NSCD protocol for the musl libc" +HOMEPAGE="https://github.com/pikhq/musl-nscd" + +if [[ ${PV} == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/pikhq/musl-nscd" + EGIT_BRANCH=master +else + SRC_URI="https://github.com/pikhq/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="minimal" + +DEPEND=" + !sys-libs/glibc + !sys-libs/uclibc" + +PATCHES=( "${FILESDIR}"/${PN}-1.0.2-fno-common.patch ) + +src_prepare() { + default + + sed -i '/LDFLAGS_AUTO=-s/d' configure || die "Cannot patch configure file" +} + +src_install() { + if use minimal; then + emake DESTDIR="${D}" install-headers + else + emake DESTDIR="${D}" install + + newinitd "${FILESDIR}"/nscd.initd nscd + systemd_dounit "${FILESDIR}"/nscd.service + newtmpfiles "${FILESDIR}"/nscd.tmpfilesd nscd.conf + + dodoc README + fi +} diff --git a/sys-libs/musl/Manifest b/sys-libs/musl/Manifest index b2e82bf3ecc7..8ab1adf59fe4 100644 --- a/sys-libs/musl/Manifest +++ b/sys-libs/musl/Manifest @@ -4,6 +4,6 @@ DIST getconf.c 11614 BLAKE2B ba49a573fc16d51780a0b0b81fbf7b64a1142f1dbad203c9609 DIST iconv.c 2577 BLAKE2B 070ca87b30c90ab98c27d5faf7a2fcb64ff7c67ca212ee6072165b2146979c551f714954dbd465462a171837c59b6ea027e0206458a2df0f977e45f01be3ce48 SHA512 9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf DIST musl-1.2.2.tar.gz 1055220 BLAKE2B a000357ed52e417d8cebe5537df658dc0f8f02f2da3efcd79125544ad63e11e05fa96136551d0bfeb09a3f6c9a2260bffcfbd329ea92e6a7b62aa690f48968aa SHA512 5344b581bd6463d71af8c13e91792fa51f25a96a1ecbea81e42664b63d90b325aeb421dfbc8c22e187397ca08e84d9296a0c0c299ba04fa2b751d6864914bd82 DIST musl-getent-93a08815f8598db442d8b766b463d0150ed8e2ab.c 11656 BLAKE2B 1b7bf7102a1eb91a8cb881ed8ca65eb8eed911dd50238e97dc2952d89d4c6ebed6bfd046a2b38776c550b2872ab54ced8cb452fcc2ad56e5616f722debda761f SHA512 7f5b9d934d82deb5f8b23e16169a5d9b99ccab3a4708df06a95d685e1b24a3a3e69b3dcf4942f2f66c12a3d4bf0c5827e2ee2e8c4d7b1997359fccc2ac212dee -EBUILD musl-1.2.2-r2.ebuild 3690 BLAKE2B 8ad2838c095828d5effda9fb200f6848d6877753f78d766cb784a17f069ccaeb4e3b9cb1d3a9a6eb60a65bf667ae4d763adf1fa24cc4f0332766012a908cff35 SHA512 66ce996146a15d02118f964d4ecbd22791aa42896cc0a004f532d9b31c0605f265a1c2d8f66829ee39f50ddbecd91d60465d1b8afcd4fe61075727c161be2cd4 -EBUILD musl-9999.ebuild 3696 BLAKE2B 0d613ea0b6812cc8c45939d7fe042db78a455cabc0f7b35f4f1d159930a382dd649d742e86026a0a22d25c09edcddd2b0334d066c22569d2562111f863729f37 SHA512 3fe236b993113f890ac25abf0761a1df8278a24bf65b442b8ce3bda328a28a0aad2e6712624b20ff47b12ca4015a5c0b8678c597c1580da5a61efd04b008cba8 +EBUILD musl-1.2.2-r2.ebuild 3686 BLAKE2B 66d760890b32b593cb681b8c6d2ef8cfa314d540cdb0bac165acb35b13b9a69b43820fe6c8a5f8eeab555d72066e62a3dba6426b56140e534ac9a12a5e720d07 SHA512 e7f1ee6262e1f7d249086541addea444540671f135c78f84731500ff7b3b1f8b59e8219616e949b3fd167a1d520291e62ddbea16c0202233d36b797b5fd31d66 +EBUILD musl-9999.ebuild 3692 BLAKE2B 1c5437d46c9c246d3f618416f07e209af31c1dae22abdfd7a5afd25a49f163511e9de93679d89edaf553646b10d349ab3b41f652b54270bad65e0f0461c893a9 SHA512 00d876467974f641804e1a27560c348c3eb25d7b9d776160fd505810e68a7c7afb82b228acd5d2787e3bb05c3878e6bf26912efa4c5ad8f38fc7635b04302270 MISC metadata.xml 453 BLAKE2B d7b2840a6b0bb2ede2124f22bde34a9f77ac258792a9fbf9d9e3f552a85d6ee539a98c8704729efb75dec627db62b33759fc0cfdfd01614abbc4960a163c5019 SHA512 5d8bebce119ed34a6a6b8cb07b3ce056db5efc91db80709fc8031c955b16e29965f3741f75e9afbe9f428bbac1e39e7c30278cd63f04479e3a1493b006195e0a diff --git a/sys-libs/musl/musl-1.2.2-r2.ebuild b/sys-libs/musl/musl-1.2.2-r2.ebuild index 732b5c5364b5..905348ba854e 100644 --- a/sys-libs/musl/musl-1.2.2-r2.ebuild +++ b/sys-libs/musl/musl-1.2.2-r2.ebuild @@ -28,7 +28,7 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then fi DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety" -HOMEPAGE="http://www.musl-libc.org/" +HOMEPAGE="https://musl.libc.org" LICENSE="MIT LGPL-2 GPL-2" SLOT="0" IUSE="headers-only" diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild index b4f43dbfc2b4..56a2bbbc42f6 100644 --- a/sys-libs/musl/musl-9999.ebuild +++ b/sys-libs/musl/musl-9999.ebuild @@ -28,7 +28,7 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then fi DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety" -HOMEPAGE="http://www.musl-libc.org/" +HOMEPAGE="https://musl.libc.org" LICENSE="MIT LGPL-2 GPL-2" SLOT="0" IUSE="headers-only" diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest index 2aa05428e817..9706bba99f35 100644 --- a/sys-libs/readline/Manifest +++ b/sys-libs/readline/Manifest @@ -3,14 +3,8 @@ AUX readline-6.2-rlfe-tgoto.patch 379 BLAKE2B 363dee5501fa9449eeee0647f1ae65106e AUX readline-7.0-headers.patch 550 BLAKE2B 82949940cda6d042923b3dde777fbd66643d80f4c2fd984eb11ef7f0fb48776ba8938d1c8be23087b328ce9b3ad0acd668f5bb4f0bda77b4a992119688a37191 SHA512 fec3d20e1581f35609a9d9f9ee1f48df8f9aa781e1a2cdcde2edf7d149624b5770867feb65a7ba142276d95a3133b768f5589e8041049aa0cf30068d0637b938 AUX readline-8.0-darwin-shlib-versioning.patch 1888 BLAKE2B 8263c3b593150e6d31ed877195597a830ab7c8e905a285835a982b0a1c317ac27d6fbbec76f926d0bfdec4b5f36a9549d150b49c2103cd13724e38e231c40398 SHA512 73213d415bd876401e3c4ef52187171117016d9a41c621e2931067369cb2dc4975c43e7acbdb3eaba623685a076374c4c9187adcbe5941ea356514f603c9d3f8 AUX readline-8.0-headers.patch 577 BLAKE2B b8fe6cdf51188f68c852d3c9052e7840a0bcb4cd0cd0b25afa82d6fe8697dcb34aa541279010b308427c411a7133c481dd778551069893ad965ce6d3a4a9ff83 SHA512 81695abab2e9fba1b17a4c194b7c72eeb23bbc3ab84cb0716c08388c0ee60adb770ae8efcbbb6a2c7c6adab93dcff12e3a16d0423cf52a0166b38c9efee5c221 -DIST readline-8.0.tar.gz 2975937 BLAKE2B 95e08b28cc46582f036379413810ca40c97d4d3bc59a9e03e04e57d531573abfbe955f6f1cb86e39c208bf6c3f4c618cff70a87bec596d0b9120909d6c5a2f69 SHA512 41759d27bc3a258fefd7f4ff3277fa6ab9c21abb7b160e1a75aa8eba547bd90b288514e76264bd94fb0172da8a4faa54aab2c07b68a0356918ecf7f1969e866f +AUX readline-8.1-windows-signals.patch 569 BLAKE2B af1ad52b09a1a49e6045bd640d57f3932f2b8db450b2eb7e0787a4326f6c61445ad83395620caf489da14107e8a51aed5d5fdf8e3268fab83d8ff04d393b1a59 SHA512 37aa778a21e360708d371aaf3f08274f75b15d8b2c42b030bda8d65dda81b1713c748644e45b6662c608da14ad413d6d83e43800ea58309fa60256a18317f5ae DIST readline-8.1.tar.gz 2993288 BLAKE2B f0feca1ea3517b2b613adacac8c997cce0e86aa2f410c82a40ce1a2e128067112b4c68dbf25b808291c28c47583345abac994ce10b8d117958afcb96ee5e7c69 SHA512 27790d0461da3093a7fee6e89a51dcab5dc61928ec42e9228ab36493b17220641d5e481ea3d8fee5ee0044c70bf960f55c7d3f1a704cf6b9c42e5c269b797e00 -DIST readline80-001 927 BLAKE2B 95e3ac33ff4adb65813274864c17781056a8ea065f9a76571b4a6bcb2ebab090c3a021fa2b621832c11b5995e48a8a26dd6e3a8f5864a8e8b520bfcf85d7c4ab SHA512 a148cda6ac97935d51ede1bbacf847d7d2cba8861cf3941d32e3da2f45f16dcc05b20845b63d4264692520db8329e1236cf2bc4fd8ccbe6e40921bbbdeb2cb1c -DIST readline80-002 1401 BLAKE2B a2f511272f6d651208469998330059d6bae17bb8b704b64468685bb0368b76df1ca5b1dcd8e5cb0019e80932130c8a92fd1a305679bf79f0b801532a94c4b4ae SHA512 a941d142a59fe592cc45c1cf4d416e2fc0ab543dd6a0496fb8b2ec6f651cedd6fb9e0c105f14880700b69b2d6912653b3f66371e45cbe4adc0cc9554801afd3c -DIST readline80-003 2158 BLAKE2B d8910aef1b796a59500b255df8db71ad1738dd164fd69827759eade74b6d9806ecd364839cfa904fc2f2d48352342155f670e5ec43aac0693f36820fb7139a4d SHA512 85235fca047b4ac87b846d998fffc67ae67ed365b068fd2743e84f11fd00086f85e622955192e07e3560965e32ff5f6d014e0146cde528fb0d0f7b5b829875ca -DIST readline80-004 1275 BLAKE2B ac260bab163f17ccc783e0c2a21351b05e9e86ad973383d228d10ec749f265df8588c38946c9da15e987192b50f1bcb81141c2f4e171f65455f58521e864a534 SHA512 301ced2361e7583468f9932038936387a016c20d1c41966658a78c7f7c48c70308bf66b3228de0a3c6fc880427b6a90ee1ac4d2693daed432e5ae970671a7461 DIST readline81-001 2454 BLAKE2B 7ec4e5c39a224a70643b44b88bcfef5198e199c76f2a34f0b0ce24f1747dd46be49ddf93871c474cda64322b4358127fec4c2401d19422f84934546bbe1f3bf2 SHA512 cfbef10bdeb562a302ccf214878d02ebadf799343b3d2d7996a282f81bcfde83997ba6dcc9a8477af4dd7c73bca74105ca00a81e42ed13321672bd2930550e54 -EBUILD readline-8.0_p4.ebuild 4853 BLAKE2B 824ab50dd5f2c7ad40349ba4c13060cc70eadc7cb0a78c45a399206f0fda71659d1c75824662757f66ef221e3ef0c2e21a856f9cb0feaac55ff116e097a225f0 SHA512 f8cd28033c92c430de345a1c8bcf73a50c61557a7e4332bfe1023510d5915e14a62ccb7aeb1056a8cb9b120c176229dcb9f0edffa4c4a74ee1604e5a56db7e21 -EBUILD readline-8.1.ebuild 5384 BLAKE2B 9015a53e47b6e4817c55e35f74c27ba2d342867278f75213724995ae36bcacab7c5116f1c6cd7e96f568b150013c3167b2342aefd35dfeb126a19ba3f3228f7d SHA512 dd794ef79438984744cfee22bb5d67030ac027337e7c354b75d7537a922ab7a1dfcbda2bf3bfe7a230eb367eef4bd1ae591fb7c9af2964ca530fbbb76311a33a -EBUILD readline-8.1_p1.ebuild 5375 BLAKE2B caeb17536a6fb372ca472aa89acc9888e101f5fa2bc126778b9a57d74a61167c3875642201c671868015937fd799b285fae6a98e370aecfa77b35d17c55132e3 SHA512 6d3b8d7e6b57689d45c5615c494cc226880e29e04a19223205bbc7c69e85a8e2af4e82cea4bf43e4ed652b8cf075db35d8de0a7eaca2c7ab83c04e01d700897a +EBUILD readline-8.1_p1.ebuild 5422 BLAKE2B c17aa7255d9d239842ac27eadd8cd650ac9d148bfb7328d66e06b60791c091f5fca340185aea7716e3977a8163346655b0dc9f37d60b62376144abb037d30365 SHA512 214117975ae18878842a6a160f9c87dc9bb6d7ef7e491098a31707eaedf4497dd3d388e063430d11693e1617631253534358d9b51871f80f14578e71cf609ea7 MISC metadata.xml 472 BLAKE2B 8d3717ac6980105677b10449a1aabca9f9347066f73802241b904101172690bb789b8071f3670dd91ad2af0223c7bc5fb4ed594dc8af3aff20b17bdd681f7630 SHA512 f19a6f0d6aed18903778adc5ad45fdae39c4388e4f09e7cb8a110b798e8cc7ab1739ff813a227ad08ef1166309e1ead57c200b7fe42499a06db97af9f4bce173 diff --git a/sys-libs/readline/files/readline-8.1-windows-signals.patch b/sys-libs/readline/files/readline-8.1-windows-signals.patch new file mode 100644 index 000000000000..2f818fc7f9c1 --- /dev/null +++ b/sys-libs/readline/files/readline-8.1-windows-signals.patch @@ -0,0 +1,23 @@ +fix from upstream + +commit 4be5608573b2be2e31f3d2a01446e22e1c9d7839 +Author: Chet Ramey +Date: Wed Jan 27 11:49:50 2021 -0500 + + commit bash-20210122 snapshot + +diff --git a/lib/readline/signals.c b/lib/readline/signals.c +index 0943c643b27d..ecaf699e9261 100644 +--- a/signals.c ++++ b/signals.c +@@ -266,8 +266,10 @@ _rl_handle_signal (int sig) + case SIGQUIT: + #endif + ++#if defined (HAVE_POSIX_SIGNALS) + if (block_sig) + sigprocmask (SIG_BLOCK, &set, &oset); ++#endif + + rl_echo_signal_char (sig); + rl_cleanup_after_signal (); diff --git a/sys-libs/readline/readline-8.0_p4.ebuild b/sys-libs/readline/readline-8.0_p4.ebuild deleted file mode 100644 index 3918add9dde6..000000000000 --- a/sys-libs/readline/readline-8.0_p4.ebuild +++ /dev/null @@ -1,175 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs usr-ldscript - -# Official patches -# See ftp://ftp.cwru.edu/pub/bash/readline-7.0-patches/ -PLEVEL="${PV##*_p}" -MY_PV="${PV/_p*}" -MY_PV="${MY_PV/_/-}" -MY_P="${PN}-${MY_PV}" -[[ ${PV} != *_p* ]] && PLEVEL=0 -patches() { - [[ ${PLEVEL} -eq 0 ]] && return 1 - local opt=$1 - eval set -- {1..${PLEVEL}} - set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") - if [[ ${opt} == -s ]] ; then - echo "${@/#/${DISTDIR}/}" - else - local u - for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do - printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" - done - fi -} - -DESCRIPTION="Another cute console display library" -HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html" - -case ${PV} in - *_alpha*|*_beta*|*_rc*) - SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" - ;; - *) - SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" - ;; -esac - -LICENSE="GPL-3" -SLOT="0/8" # subslot matches SONAME major -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -IUSE="static-libs +unicode utils" - -RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,unicode?,${MULTILIB_USEDEP}]" -DEPEND="${RDEPEND}" -BDEPEND=" - virtual/pkgconfig -" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}"/${PN}-5.0-no_rpath.patch - "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091 - "${FILESDIR}"/${PN}-7.0-headers.patch - "${FILESDIR}"/${PN}-8.0-headers.patch -) - -# Needed because we don't want the patches being unpacked -# (which emits annoying and useless error messages) -src_unpack() { - unpack ${MY_P}.tar.gz -} - -src_prepare() { - [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) - default - - # Force ncurses linking. #71420 - # Use pkg-config to get the right values. #457558 - local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs) - sed -i \ - -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \ - support/shobj-conf || die - sed -i \ - -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \ - examples/rlfe/configure || die - - # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated - # objformat for years, so we don't want to rely on that. - sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die - - ln -s ../.. examples/rlfe/readline || die # for local readline headers -} - -src_configure() { - # fix implicit decls with widechar funcs - append-cppflags -D_GNU_SOURCE - # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html - append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free - - # Make sure configure picks a better ar than `ar`. #484866 - export ac_cv_prog_AR=$(tc-getAR) - - # Force the test since we used sed above to force it. - export bash_cv_termcap_lib=ncurses - - # Control cross-compiling cases when we know the right answer. - # In cases where the C library doesn't support wide characters, readline - # itself won't work correctly, so forcing the answer below should be OK. - if tc-is-cross-compiler ; then - use kernel_Winnt || export bash_cv_func_sigsetjmp='present' - export bash_cv_func_ctype_nonascii='yes' - export bash_cv_wcwidth_broken='no' #503312 - fi - - # This is for rlfe, but we need to make sure LDFLAGS doesn't change - # so we can re-use the config cache file between the two. - append-ldflags -L. - - multilib-minimal_src_configure -} - -multilib_src_configure() { - local myeconfargs=( - --cache-file="${BUILD_DIR}"/config.cache - --with-curses - $(use_enable static-libs static) - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" - - if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then - # code is full of AC_TRY_RUN() - mkdir -p examples/rlfe || die - cd examples/rlfe || die - ECONF_SOURCE="${S}"/examples/rlfe \ - econf --cache-file="${BUILD_DIR}"/config.cache - fi -} - -multilib_src_compile() { - emake - - if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then - # code is full of AC_TRY_RUN() - cd examples/rlfe || die - local l - for l in readline history ; do - ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die - ln -s ../../lib${l}.a lib${l}.a || die - done - emake - fi -} - -multilib_src_install() { - default - - if multilib_is_native_abi ; then - gen_usr_ldscript -a readline history #4411 - - if use utils && ! tc-is-cross-compiler; then - dobin examples/rlfe/rlfe - fi - fi -} - -multilib_src_install_all() { - HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs - dodoc USAGE - docinto ps - dodoc doc/*.ps -} -pkg_preinst() { - # bug #29865 - # Reappeared in #595324 with paludis so keeping this for now... - preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5,6,7} -} - -pkg_postinst() { - preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5,6,7} -} diff --git a/sys-libs/readline/readline-8.1.ebuild b/sys-libs/readline/readline-8.1.ebuild deleted file mode 100644 index 4a4f8c7b6f2c..000000000000 --- a/sys-libs/readline/readline-8.1.ebuild +++ /dev/null @@ -1,185 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs usr-ldscript - -# Official patches -# See ftp://ftp.cwru.edu/pub/bash/readline-7.0-patches/ -PLEVEL="${PV##*_p}" -MY_PV="${PV/_p*}" -MY_PV="${MY_PV/_/-}" -MY_P="${PN}-${MY_PV}" -[[ ${PV} != *_p* ]] && PLEVEL=0 -patches() { - [[ ${PLEVEL} -eq 0 ]] && return 1 - local opt=$1 - eval set -- {1..${PLEVEL}} - set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") - if [[ ${opt} == -s ]] ; then - echo "${@/#/${DISTDIR}/}" - else - local u - for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do - printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" - done - fi -} - -DESCRIPTION="Another cute console display library" -HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html" - -case ${PV} in - *_alpha*|*_beta*|*_rc*) - SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" - ;; - *) - SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" - ;; -esac - -LICENSE="GPL-3" -SLOT="0/8" # subslot matches SONAME major -[[ "${PV}" == *_rc* ]] || \ -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="static-libs +unicode utils" - -RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,unicode?,${MULTILIB_USEDEP}]" -DEPEND="${RDEPEND}" -BDEPEND=" - virtual/pkgconfig -" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}"/${PN}-5.0-no_rpath.patch - "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091 - "${FILESDIR}"/${PN}-7.0-headers.patch - "${FILESDIR}"/${PN}-8.0-headers.patch - "${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch -) - -# Needed because we don't want the patches being unpacked -# (which emits annoying and useless error messages) -src_unpack() { - unpack ${MY_P}.tar.gz -} - -src_prepare() { - [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) - default - - # Force ncurses linking. #71420 - # Use pkg-config to get the right values. #457558 - local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs) - sed -i \ - -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \ - support/shobj-conf || die - sed -i \ - -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \ - examples/rlfe/configure || die - - # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated - # objformat for years, so we don't want to rely on that. - sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die - - ln -s ../.. examples/rlfe/readline || die # for local readline headers -} - -src_configure() { - # fix implicit decls with widechar funcs - append-cppflags -D_GNU_SOURCE - # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html - append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free - - # Make sure configure picks a better ar than `ar`. #484866 - export ac_cv_prog_AR=$(tc-getAR) - - # Force the test since we used sed above to force it. - export bash_cv_termcap_lib=ncurses - - # Control cross-compiling cases when we know the right answer. - # In cases where the C library doesn't support wide characters, readline - # itself won't work correctly, so forcing the answer below should be OK. - if tc-is-cross-compiler ; then - use kernel_Winnt || export bash_cv_func_sigsetjmp='present' - export bash_cv_func_ctype_nonascii='yes' - export bash_cv_wcwidth_broken='no' #503312 - fi - - # This is for rlfe, but we need to make sure LDFLAGS doesn't change - # so we can re-use the config cache file between the two. - append-ldflags -L. - - multilib-minimal_src_configure -} - -multilib_src_configure() { - local myeconfargs=( - --cache-file="${BUILD_DIR}"/config.cache - --with-curses - $(use_enable static-libs static) - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" - - if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then - # code is full of AC_TRY_RUN() - mkdir -p examples/rlfe || die - cd examples/rlfe || die - ECONF_SOURCE="${S}"/examples/rlfe \ - econf --cache-file="${BUILD_DIR}"/config.cache - fi -} - -multilib_src_compile() { - emake - - if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then - # code is full of AC_TRY_RUN() - cd examples/rlfe || die - local l - for l in readline history ; do - ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die - ln -s ../../lib${l}.a lib${l}.a || die - done - emake - fi -} - -multilib_src_install() { - default - - if multilib_is_native_abi ; then - gen_usr_ldscript -a readline history #4411 - - if use utils && ! tc-is-cross-compiler; then - dobin examples/rlfe/rlfe - fi - fi -} - -multilib_src_install_all() { - HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs - dodoc USAGE - docinto ps - dodoc doc/*.ps -} -pkg_preinst() { - # bug #29865 - # Reappeared in #595324 with paludis so keeping this for now... - preserve_old_lib \ - /$(get_libdir)/lib{history,readline}$(get_libname 4) \ - /$(get_libdir)/lib{history,readline}$(get_libname 5) \ - /$(get_libdir)/lib{history,readline}$(get_libname 6) \ - /$(get_libdir)/lib{history,readline}$(get_libname 7) -} - -pkg_postinst() { - preserve_old_lib_notify \ - /$(get_libdir)/lib{history,readline}$(get_libname 4) \ - /$(get_libdir)/lib{history,readline}$(get_libname 5) \ - /$(get_libdir)/lib{history,readline}$(get_libname 6) \ - /$(get_libdir)/lib{history,readline}$(get_libname 7) -} diff --git a/sys-libs/readline/readline-8.1_p1.ebuild b/sys-libs/readline/readline-8.1_p1.ebuild index 944bdc746894..5cd7a3bdc211 100644 --- a/sys-libs/readline/readline-8.1_p1.ebuild +++ b/sys-libs/readline/readline-8.1_p1.ebuild @@ -59,6 +59,7 @@ PATCHES=( "${FILESDIR}"/${PN}-7.0-headers.patch "${FILESDIR}"/${PN}-8.0-headers.patch "${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch + "${FILESDIR}"/${PN}-8.1-windows-signals.patch ) # Needed because we don't want the patches being unpacked diff --git a/sys-libs/zlib-ng/Manifest b/sys-libs/zlib-ng/Manifest index 211d0776ebe0..5010c09e8aee 100644 --- a/sys-libs/zlib-ng/Manifest +++ b/sys-libs/zlib-ng/Manifest @@ -1,3 +1,3 @@ -DIST zlib-ng-2.0.3.tar.gz 699927 BLAKE2B 12776377ddc729b783ddbd5fab007869d941368e8abb6697ecd416732b20879fa5a995d6e613b9874f06721caa64e73ac5db2dc0cd9035edbed74b848897eb6b SHA512 e1afe91e1a8b4c54a004b672f539ae68f7dc1f1b08ba93514c0de674230354c944d496753f00ad272f16ef322705f275b5b72dac6c2a757ec741ef3f1ea1d59a -EBUILD zlib-ng-2.0.3.ebuild 1971 BLAKE2B 6c6f5f9b1af80c9a7dfa525c849990a590d140c382ee99a9c7965426f4974e34bffc6a18e6b047b336b5d41bf3939e4e6a039f29837ea6add42f0b9dac64b68e SHA512 6305b130787419a29e6c70a7af35e24ed04fb2365898e6a38c46894f6e2660686805d381f30dda00377db30c2088010c1308a9aa3665f678cb518dc4b5f0928b +DIST zlib-ng-2.0.4.tar.gz 809848 BLAKE2B 6d757c1898f1473e6bdd4bc6118958054a1fc82cb5eace57b7bf7020d2c153284674586c62046760c02ee478c9cd633e841c45dfb52728e888a710319159b74c SHA512 c9ae645b49ae9a0ba1481a4f15171a8fb6357d4bc39a5c6a9d76f2b165bccb32c92b64bf3a231cb32141bae9726519d4375928e147eb54f2e656efa4d82da74f +EBUILD zlib-ng-2.0.4.ebuild 1971 BLAKE2B 6c6f5f9b1af80c9a7dfa525c849990a590d140c382ee99a9c7965426f4974e34bffc6a18e6b047b336b5d41bf3939e4e6a039f29837ea6add42f0b9dac64b68e SHA512 6305b130787419a29e6c70a7af35e24ed04fb2365898e6a38c46894f6e2660686805d381f30dda00377db30c2088010c1308a9aa3665f678cb518dc4b5f0928b MISC metadata.xml 430 BLAKE2B 6c9dc67624e11d0cad0e9cdd748ba6e759e09a15fe5c4188c289ca234ce304f128a4150d835214a3035d570bb9b576c752d31bf194ec4e91058ac778fb24352c SHA512 a43ac0b952306ed54935ca12f5aa2d4e425a3b6056dc52df6e7f8b9a11f992222328ef8a363939bccf0e0d5b4251a9d5479aae79a2332ec535b2e1e546b6e2e0 diff --git a/sys-libs/zlib-ng/zlib-ng-2.0.3.ebuild b/sys-libs/zlib-ng/zlib-ng-2.0.3.ebuild deleted file mode 100644 index 35316b265096..000000000000 --- a/sys-libs/zlib-ng/zlib-ng-2.0.3.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake - -DESCRIPTION="Fork of the zlib data compression library" -HOMEPAGE="https://github.com/zlib-ng/zlib-ng" -SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="ZLIB" -SLOT="0" -#KEYWORDS="~amd64 ~x86" - -CPU_USE=( cpu_flags_{x86_{avx2,sse2,ssse3,sse4a,pclmul},arm_{crc32,neon},ppc_vsx2} ) -IUSE="compat ${CPU_USE[@]} test" - -RESTRICT="!test? ( test )" - -RDEPEND="compat? ( !sys-libs/zlib )" - -src_configure() { - local mycmakeargs=( - -DZLIB_COMPAT="$(usex compat)" - -DZLIB_ENABLE_TESTS="$(usex test)" - # Unaligned access is controversial and undefined behaviour - # Let's keep it off for now - # https://github.com/gentoo/gentoo/pull/17167 - -DWITH_UNALIGNED="OFF" - ) - - # The intrinsics options are all defined conditionally, so we need - # to enable them on/off per-arch here for now. - if use amd64 || use x86 ; then - mycmakeargs+=( - -DWITH_AVX2=$(usex cpu_flags_x86_avx2) - -DWITH_SSE2=$(usex cpu_flags_x86_sse2) - -DWITH_SSSE3=$(usex cpu_flags_x86_ssse3) - -DWITH_SSE4=$(usex cpu_flags_x86_sse4a) - -DWITH_PCLMULQDQ=$(usex cpu_flags_x86_pclmul) - ) - fi - - if use arm || use arm64 ; then - mycmakeargs+=( - -DWITH_ACLE=$(usex cpu_flags_arm_crc32) - -DWITH_NEON=$(usex cpu_flags_arm_neon) - ) - fi - - if use ppc || use ppc64 ; then - # The POWER8 support is VSX which was introduced - # VSX2 was introduced with POWER8, so use that as a proxy for it - mycmakeargs+=( - -DWITH_POWER8=$(usex cpu_flags_ppc_vsx2) - ) - fi - - # TODO: There's no s390x USE_EXPAND yet - - cmake_src_configure -} - -src_install() { - cmake_src_install - - if use compat ; then - ewarn "zlib-ng is experimental and replacing the system zlib is dangerous" - ewarn "Please be careful!" - ewarn - ewarn "The following link explains the guarantees (and what is NOT guaranteed):" - ewarn "https://github.com/zlib-ng/zlib-ng/blob/2.0.x/PORTING.md" - fi -} diff --git a/sys-libs/zlib-ng/zlib-ng-2.0.4.ebuild b/sys-libs/zlib-ng/zlib-ng-2.0.4.ebuild new file mode 100644 index 000000000000..35316b265096 --- /dev/null +++ b/sys-libs/zlib-ng/zlib-ng-2.0.4.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="Fork of the zlib data compression library" +HOMEPAGE="https://github.com/zlib-ng/zlib-ng" +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="ZLIB" +SLOT="0" +#KEYWORDS="~amd64 ~x86" + +CPU_USE=( cpu_flags_{x86_{avx2,sse2,ssse3,sse4a,pclmul},arm_{crc32,neon},ppc_vsx2} ) +IUSE="compat ${CPU_USE[@]} test" + +RESTRICT="!test? ( test )" + +RDEPEND="compat? ( !sys-libs/zlib )" + +src_configure() { + local mycmakeargs=( + -DZLIB_COMPAT="$(usex compat)" + -DZLIB_ENABLE_TESTS="$(usex test)" + # Unaligned access is controversial and undefined behaviour + # Let's keep it off for now + # https://github.com/gentoo/gentoo/pull/17167 + -DWITH_UNALIGNED="OFF" + ) + + # The intrinsics options are all defined conditionally, so we need + # to enable them on/off per-arch here for now. + if use amd64 || use x86 ; then + mycmakeargs+=( + -DWITH_AVX2=$(usex cpu_flags_x86_avx2) + -DWITH_SSE2=$(usex cpu_flags_x86_sse2) + -DWITH_SSSE3=$(usex cpu_flags_x86_ssse3) + -DWITH_SSE4=$(usex cpu_flags_x86_sse4a) + -DWITH_PCLMULQDQ=$(usex cpu_flags_x86_pclmul) + ) + fi + + if use arm || use arm64 ; then + mycmakeargs+=( + -DWITH_ACLE=$(usex cpu_flags_arm_crc32) + -DWITH_NEON=$(usex cpu_flags_arm_neon) + ) + fi + + if use ppc || use ppc64 ; then + # The POWER8 support is VSX which was introduced + # VSX2 was introduced with POWER8, so use that as a proxy for it + mycmakeargs+=( + -DWITH_POWER8=$(usex cpu_flags_ppc_vsx2) + ) + fi + + # TODO: There's no s390x USE_EXPAND yet + + cmake_src_configure +} + +src_install() { + cmake_src_install + + if use compat ; then + ewarn "zlib-ng is experimental and replacing the system zlib is dangerous" + ewarn "Please be careful!" + ewarn + ewarn "The following link explains the guarantees (and what is NOT guaranteed):" + ewarn "https://github.com/zlib-ng/zlib-ng/blob/2.0.x/PORTING.md" + fi +} -- cgit v1.2.3