Merge pull request #351 from flatcar-linux/krnowak/pkg-updates-2021-part-3-toolchain-take-2

Toolchain update
This commit is contained in:
Krzesimir Nowak 2022-08-23 16:04:14 +02:00 committed by GitHub
commit 7058ef8ff9
166 changed files with 7621 additions and 2375 deletions

View File

@ -1 +1,2 @@
DIST bzip2-1.0.8.tar.gz 810029 BLAKE2B 22ab3acd84f4db8c3d6f59340c252faedfd4447cea00dafbd652e65b6cf8a20adf6835c22e58563004cfafdb15348c924996230b4b23cae42da5e25eeac4bdad SHA512 083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3
DIST bzip2-1.0.8.tar.gz.sig 310 BLAKE2B 0d702dcb19f7738da9f05ee9d719f5cd3653540365e78db143404e599ea54bc6f9d5e6a38cdf5cdd3c6550243d34266343467c6b1db9d5d3c134f9353b00f395 SHA512 4a4a3fa0ec1c10a704b9870e8e629fd007cca55184423c6bfc3049a702fb41e4aeb73bfe9ca7442c27d32d278f1f34f27523a6be67d35b37896acdded12bf40d

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
@ -6,17 +6,25 @@
EAPI=7
inherit toolchain-funcs multilib-minimal usr-ldscript
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/bzip2.gpg
inherit toolchain-funcs multilib-minimal usr-ldscript verify-sig
if [[ ${PVR} != 1.0.8-r1 ]]; then
die "Please remove libbz2.so.1.0 logic from multilib_src_install"
fi
DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
HOMEPAGE="https://sourceware.org/bzip2/"
SRC_URI="https://sourceware.org/pub/${PN}/${P}.tar.gz"
SRC_URI+=" verify-sig? ( https://sourceware.org/pub/${PN}/${P}.tar.gz.sig )"
LICENSE="BZIP2"
SLOT="0/1" # subslot = SONAME
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="static static-libs"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-bzip2 )"
PATCHES=(
"${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
"${FILESDIR}"/${PN}-1.0.8-saneso.patch
@ -59,6 +67,11 @@ multilib_src_compile() {
bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')"
}
multilib_src_test() {
cp "${S}"/sample* "${BUILD_DIR}" || die
bemake -f "${S}"/Makefile check
}
multilib_src_install() {
into /usr

View File

@ -1,3 +1,5 @@
DIST portage-utils-0.90.1.tar.xz 1779252 BLAKE2B 27c94694cab84970c0c92e835b9039d9420fbfa20f9f2e03f4f53d118df4dc243cddce33994095a3e41bd1027a42c9c29cda65cb7cf4f45279a028b21555f4f8 SHA512 67290a69ad6ac40da3ce0f41d2630096690e69bb97a1428af921ccc582dcfbf903bbf98259f68afdbe9e96aef81672ea3352a9266a649e75f99acec7fa00cd8a
DIST portage-utils-0.90.tar.xz 1776636 BLAKE2B bbacc05aa97c77705ae4fbdb5efde5f1d49a99ac8ed259e026c9a997f43a86551b3a10a397e0c5f1da161d2c0d88afe88e22870705ca39d911c4a98ad13f4928 SHA512 2077061dd7dfd444d4ad38faf5a87aa44392d7747f71d7283b5e2775ce3d714773cd642ea085aea3dd34a715f2c446d42fd64ba42fa99e716e8d843aae3d9682
DIST portage-utils-0.92.tar.xz 1819676 BLAKE2B 01798e3984745140bca1bcc1eda5c2aea7c517bee2656acfe1bd810fc8088ddcb474f2c64fee6832c5e1699e2ec8ad5a9c6d5afba8a2e2b6f1861d49fbf7fcb7 SHA512 7d36263c9c242c8e82786fa12e171a3f396f65520acb8caa91516862615bd71241699ab6c2232122f7009875aa0a10b06b614a842d45afc86e599b39711e12b3
DIST portage-utils-0.93.3.tar.xz 1796828 BLAKE2B cfad7ab27ff2d92f631f4e31012e8903c5fa6113485f727338812059379cdd4a9552d80dc3aef6bb91264c361c0554fe9054a12347e274c4c5c3db66fd36008b SHA512 c1245aa78d236263cd266fc8565312c2ac30cb992037a7b0f26da04ecf2dfeebc85bff653784e186cf2c7d7468e4772fb0bd93bcdb3a37d46e493d000933e5a1
DIST portage-utils-0.94.1.tar.xz 1871688 BLAKE2B bec5ddd514b397c157c3b1bff70d61730f15804a6751f56eb69c4030a35fc6a6b11fa1e2bde94332772660f02bf9428623210733ae9e2f1290f29aa3b31a1813 SHA512 29fdb4093997eb95703d407da6b00305c949f0a00ae3aa5cfb2c47b66bddc59e034fae114663b40b611f906332066b648018aa4e5bc1b935e61a64f4b4bf1088

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>grobian@gentoo.org</email>

View File

@ -15,7 +15,7 @@ if [[ ${PV} == *9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
else
SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
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"
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"
fi
RDEPEND="

View File

@ -0,0 +1,67 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Small and fast Portage helper tools written in C"
HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
LICENSE="GPL-2"
SLOT="0"
IUSE="nls static openmp +qmanifest +qtegrity"
if [[ ${PV} == *9999 ]]; then
inherit git-r3 autotools
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
else
SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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"
fi
RDEPEND="
qmanifest? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
app-crypt/libb2:=[static-libs]
dev-libs/openssl:0=[static-libs]
sys-libs/zlib:=[static-libs]
app-crypt/gpgme:=[static-libs]
)
!static? (
app-crypt/libb2:=
dev-libs/openssl:0=
sys-libs/zlib:=
app-crypt/gpgme:=
)
)
qtegrity? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
dev-libs/openssl:0=[static-libs]
)
!static? (
dev-libs/openssl:0=
)
)
"
DEPEND="${RDEPEND}"
src_configure() {
econf \
--disable-maintainer-mode \
--with-eprefix="${EPREFIX}" \
$(use_enable qmanifest) \
$(use_enable qtegrity) \
$(use_enable openmp) \
$(use_enable static)
}

View File

@ -0,0 +1,67 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Small and fast Portage helper tools written in C"
HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
LICENSE="GPL-2"
SLOT="0"
IUSE="nls static openmp +qmanifest +qtegrity"
if [[ ${PV} == *9999 ]]; then
inherit git-r3 autotools
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
else
SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
fi
RDEPEND="
qmanifest? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
app-crypt/libb2:=[static-libs]
dev-libs/openssl:0=[static-libs]
sys-libs/zlib:=[static-libs]
app-crypt/gpgme:=[static-libs]
)
!static? (
app-crypt/libb2:=
dev-libs/openssl:0=
sys-libs/zlib:=
app-crypt/gpgme:=
)
)
qtegrity? (
openmp? (
|| (
>=sys-devel/gcc-4.2:*[openmp]
sys-devel/clang-runtime:*[openmp]
)
)
static? (
dev-libs/openssl:0=[static-libs]
)
!static? (
dev-libs/openssl:0=
)
)
"
DEPEND="${RDEPEND}"
src_configure() {
econf \
--disable-maintainer-mode \
--with-eprefix="${EPREFIX}" \
$(use_enable qmanifest) \
$(use_enable qtegrity) \
$(use_enable openmp) \
$(use_enable static)
}

View File

@ -1,7 +1,7 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
EAPI=7
DESCRIPTION="Small and fast Portage helper tools written in C"
HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
@ -15,7 +15,7 @@ if [[ ${PV} == *9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
else
SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
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"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
fi
RDEPEND="

View File

@ -0,0 +1 @@
- binutils ([CVE-2021-45078](https://nvd.nist.gov/vuln/detail/CVE-2021-45078))

View File

@ -0,0 +1,7 @@
- automake ([1.16.5](https://savannah.gnu.org/forum/forum.php?forum_id=10055))
- binutils ([2.38](https://lwn.net/Articles/884264/))
- bison ([3.8.2](https://lists.gnu.org/archive/html/bug-bison/2021-09/msg00056.html))
- gcc ([11.3.0](https://gcc.gnu.org/gcc-11/changes.html))
- libtool ([2.4.7](https://savannah.gnu.org/forum/forum.php?forum_id=10139))
- perl ([5.34.1](https://perldoc.perl.org/5.34.1/perldelta))
- pkgconf ([1.8.0](https://gitea.treehouse.systems/ariadne/pkgconf/src/tag/pkgconf-1.8.0/NEWS))

View File

@ -1,6 +1,10 @@
DIST perl-5.32.0-patches-1.tar.xz 20220 BLAKE2B 46ebca5c74f59aa935ceec2a5807426c0e653ad7ba27de441d26e049e62dc67b17d58dfe5755f31bdd157e349d47fd46a98699207729f8f4f747930ed1064ba2 SHA512 42ed00f5f6be40af59e02691ff439a048cccd96fb970cca0976209faa921af98a773cc4cb1466e164328350d58cb46950ffa8c6f2fddabbeb3e8819349b06849
DIST perl-5.32.1.tar.xz 12610988 BLAKE2B 9f89bcf9cffb245a0f2cb0afa17c25f092c84cc2f29bb1c744294c2f0393c72dc3beb9fcbe256cf252677b33bc594b294b3f6a4774ad9e30b771aceed1f4f147 SHA512 3443c75aea91f0fe3712fee576239f1946d2301b8f7390b690e2f5d070fe71af8f9fa7769e42086c2d33d5f84370f80368fa9350b4f10cc0ac3e6c1f6209d8f9
DIST perl-5.34.0-patches-1.tar.xz 20360 BLAKE2B e60074c49f357d4841708f58b5165a44201783238ff33ee81580bb83ba07d3d2dda447edd30a71ce8c9bafe5e5e0235b68e31a79081c3482bdd589231f0e898e SHA512 909e1fb22cda4ca769b51645b51a64df81b92210cfee388ac57834406bc13e404f0a1e6bad0888fafc73fc34b7fb224801fd02e87fb4c2f9145482ad74374e7b
DIST perl-5.34.0.tar.xz 12881416 BLAKE2B 4139e77fbb38b2b72671c0b130233cf5ed35112bbba3301b8ed724739c7ff96b041752aa505b938e257ef6ebf98a9b6dad1858e00f756c841a0520688d974e9a SHA512 691b4b31eacec357191fba777612b4e3eae59e946a22998a50766697c0d61db1d42a9b3bc1e41abf0d1ca1893e4a7c06d7bf3290480cf03d7f79befd7a8a3267
DIST perl-cross-1.3.4.tar.gz 108461 BLAKE2B 28f207d235f51ebf681598cf85f7f16923574aafb593426a59d67578135ee3632efb12b9e1a672759195a79f80e49f5c929ec42b2b4571b1d36f5d8c8dceadc2 SHA512 7e1fc7b2b19d8c2e2fb8615e074e218b2e1a4d276b563ffabccfd0c7398bc8680fca96da89cc61d611993f38a2c67dfbb0201c58658e05437395ad8c00d31874
DIST perl-5.34.1-zlib-1.2.12-encrypt-standard.zip.bin 207 BLAKE2B b52e1322930d5f7b8d6e3a319d24322b5dffb2313bdc757c0c8eb8713fd03adace199c8449ccc306e49b5b71e3c1b9786b2acb0ab8780a09d718a1c54f653226 SHA512 5a7e0950f0f94bd961fa9cf3e4ab5dd30006bee0f4553da755688a32d0411a4a850a28d4f998b36e7177dcf3aba192b899ca4138e84452baffef1a0b2ed1fb7b
DIST perl-5.34.1-zlib-1.2.12.patch.xz 180480 BLAKE2B 39da5c1ef406d018f73e641d86ff81d5257cf1f7d6c1b0caac9651a546d70a2e0fff53bf0fc584907e792cb681a961c8442ab355f8f0c2cfffbb26c997cdbac0 SHA512 b32b57721b10943e21003429b42c535f7833e450f097855162241775a161a557fe0ea86ce615d6a9c885f165f45438cabba5580f9b299796d3a3da5ea720f1ff
DIST perl-5.34.1.tar.xz 12760168 BLAKE2B 3768e55f66551c83295153e91d25d568b7b8638789141f7fcd5a304509cb391cb9ad0232ba6ac70113bb0881ddb00ca5b19c53aa01e1e206c44401dad60d8942 SHA512 9261958291b49eea30c120a89e5ee32dc6a5fd46de4869c89c3d6a4c1162d6cf192ebe429d01a293eda93d8680ce15294af27717fd4ec4c75f511c1fa820fdac
DIST perl-5.36.0-patches-1.tar.xz 20352 BLAKE2B f5413c75c5bbced230ad7fa692998caef8e4041f3394ae5212dc2aaee465de619b56cf07551be1bb36f2e06b9ed7d0ddda31ad4a7ec81d5c0c64b698ddd80379 SHA512 ab24577b6d71a13d9ccf272efa0881b29933b6a39532ca0d71d4c9a134f451bbe5f3d87c6c851f26114702ac3f92af5c5a72129a458ebee31e372106955eb157
DIST perl-5.36.0.tar.xz 13051500 BLAKE2B e4864a4c21e5242df4164c73db8af10f7b9c36b075e0c05777abec79716db7778ccbf2c0c9e7e749518ad310019d2a6b32bd8b5ab2af5a8b16b5d920f83d034f SHA512 6dd6ac2a77566c173c5ab9c238cf555f2c3e592e89abb5600bc23ce1cbd0c349e0233f6417cbbf1f6d0aefc6a734ba491285af0d3dc68a605b658b65c89f1dab
DIST perl-cross-1.3.6.tar.gz 110210 BLAKE2B 39074d6f4a526f59de2b1c40432936552e625a5a4e44fbb7ce3c1c3828b12c5298d1ab49b7d34ea92e2a4c8c88f8bbef8cc0c582a3fbbed975cf46d331e89c08 SHA512 d394fbd75d890442aa599eae8893a26540c8b7af966583ad1c3213c3fe0e074415cfed8814de8f397830833fd78267bdc55adc5267168198f269634c2ef3b982
DIST perl-cross-1.3.7.tar.gz 118291 BLAKE2B dc9c060857d6905c817e91c3f5b1f546b76e02c6de02dc260185e0de8628a5ead3a557501da75549e2585cd30879190558740e697b1c78a69fa08ccb5649efcd SHA512 1111274f34f8b46e9f418883e9b1652ba4a5a9b4a5880a9a5b38bc8aeb5d75a9f4943233870f5ebf5fbcdc0c30b2983ace11ad051b55d3283327d8f2c15e172c
DIST perl-cross-1.4.tar.gz 113861 BLAKE2B 7c7783afccc6a04ab122a7c60b1cff7f0a2725655b2b63325ca25d7b8acb0cf993b496e2a590db943054336337ad215550b6b2a565f1d91a5aa9cfe3a4c36db4 SHA512 bde73cac13c0b42c4c6783d7e30dea491d70b65131e1c8434ef75db1f39a8e15ef5857568b706e8456faa3822402676dd247a1f20f4bed983597fdd5a6b4faad

View File

@ -1,105 +0,0 @@
https://bugs.gentoo.org/634162
Source:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869122
Index: perl-5.26.0/op.c
===================================================================
--- perl-5.26.0.orig/op.c
+++ perl-5.26.0/op.c
@@ -14832,6 +14832,7 @@ Perl_custom_op_get_field(pTHX_ const OP
SV *keysv;
HE *he = NULL;
XOP *xop;
+ XOPRETANY any;
static const XOP xop_null = { 0, 0, 0, 0, 0 };
@@ -14874,58 +14875,37 @@ Perl_custom_op_get_field(pTHX_ const OP
else
xop = INT2PTR(XOP *, SvIV(HeVAL(he)));
}
- {
- XOPRETANY any;
- if(field == XOPe_xop_ptr) {
- any.xop_ptr = xop;
- } else {
- const U32 flags = XopFLAGS(xop);
- if(flags & field) {
- switch(field) {
- case XOPe_xop_name:
- any.xop_name = xop->xop_name;
- break;
- case XOPe_xop_desc:
- any.xop_desc = xop->xop_desc;
- break;
- case XOPe_xop_class:
- any.xop_class = xop->xop_class;
- break;
- case XOPe_xop_peep:
- any.xop_peep = xop->xop_peep;
- break;
- default:
- NOT_REACHED; /* NOTREACHED */
- break;
- }
- } else {
- switch(field) {
- case XOPe_xop_name:
- any.xop_name = XOPd_xop_name;
- break;
- case XOPe_xop_desc:
- any.xop_desc = XOPd_xop_desc;
- break;
- case XOPe_xop_class:
- any.xop_class = XOPd_xop_class;
- break;
- case XOPe_xop_peep:
- any.xop_peep = XOPd_xop_peep;
- break;
- default:
- NOT_REACHED; /* NOTREACHED */
- break;
- }
- }
+
+ if(field == XOPe_xop_ptr) {
+ any.xop_ptr = xop;
+ } else {
+ const U32 flags = XopFLAGS(xop);
+ switch(field) {
+ case XOPe_xop_name:
+ any.xop_name = (flags & field) ? xop->xop_name : XOPd_xop_name;
+ break;
+ case XOPe_xop_desc:
+ any.xop_desc = (flags & field) ? xop->xop_desc : XOPd_xop_desc;
+ break;
+ case XOPe_xop_class:
+ any.xop_class = (flags & field) ? xop->xop_class : XOPd_xop_class;
+ break;
+ case XOPe_xop_peep:
+ any.xop_peep = (flags & field) ? xop->xop_peep : XOPd_xop_peep;
+ break;
+ default:
+ NOT_REACHED; /* NOTREACHED */
+ break;
}
- /* On some platforms (HP-UX, IA64) gcc emits a warning for this function:
- * op.c: In function 'Perl_custom_op_get_field':
- * op.c:...: warning: 'any.xop_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
- * This is because on those platforms (with -DEBUGGING) NOT_REACHED
- * expands to assert(0), which expands to ((0) ? (void)0 :
- * __assert(...)), and gcc doesn't know that __assert can never return. */
- return any;
}
+
+ /* On some platforms (HP-UX, IA64) gcc emits a warning for this function:
+ * op.c: In function 'Perl_custom_op_get_field':
+ * op.c:...: warning: 'any.xop_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
+ * This is because on those platforms (with -DEBUGGING) NOT_REACHED
+ * expands to assert(0), which expands to ((0) ? (void)0 :
+ * __assert(...)), and gcc doesn't know that __assert can never return. */
+ return any;
}
/*

View File

@ -0,0 +1,263 @@
https://github.com/Perl/perl5/pull/18791
https://github.com/Perl/perl5/issues/18703
https://bugs.gentoo.org/818172
From: Tony Cook <tony@develop-help.com>
Date: Tue, 4 May 2021 14:55:50 +1000
Subject: [PATCH 1/4] remove code that assuming finding pwd on the path is
reasonable
We deliberately clear PATH when invoking pwd, so this search is
useless.
---
dist/PathTools/Cwd.pm | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm
index 6a1d2f17ee57..49c12885b32e 100644
--- a/dist/PathTools/Cwd.pm
+++ b/dist/PathTools/Cwd.pm
@@ -213,20 +213,6 @@ sub _backtick_pwd {
# we take care not to override an existing definition for cwd().
unless ($METHOD_MAP{$^O}{cwd} or defined &cwd) {
- # The pwd command is not available in some chroot(2)'ed environments
- my $sep = $Config::Config{path_sep} || ':';
- my $os = $^O; # Protect $^O from tainting
-
-
- # Try again to find a pwd, this time searching the whole PATH.
- if (defined $ENV{PATH} and $os ne 'MSWin32') { # no pwd on Windows
- my @candidates = split($sep, $ENV{PATH});
- while (!$found_pwd_cmd and @candidates) {
- my $candidate = shift @candidates;
- $found_pwd_cmd = 1 if -x "$candidate/pwd";
- }
- }
-
if( $found_pwd_cmd )
{
*cwd = \&_backtick_pwd;
From e5378ea37c6c4910107975d8099c1d552af0c7b3 Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Wed, 5 May 2021 10:12:31 +1000
Subject: [PATCH 2/4] don't fallback to simple pwd
When _backtick_pwd invokes $pwd_cmd it first clears the PATH, and since
the command has no shell metacharacters, it perl won't invoke the
shell, so it will always fail.
An alternative here might be to use "/bin/sh -c pwd" but there's no
guarantee that pwd is available as a shell builtin.
---
dist/PathTools/Cwd.pm | 6 ------
1 file changed, 6 deletions(-)
diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm
index 49c12885b32e..fbe683e20b8a 100644
--- a/dist/PathTools/Cwd.pm
+++ b/dist/PathTools/Cwd.pm
@@ -181,12 +181,6 @@ if ($^O =~ /android/) {
}
my $found_pwd_cmd = defined($pwd_cmd);
-unless ($pwd_cmd) {
- # Isn't this wrong? _backtick_pwd() will fail if someone has
- # pwd in their path but it is not /bin/pwd or /usr/bin/pwd?
- # See [perl #16774]. --jhi
- $pwd_cmd = 'pwd';
-}
# Lazy-load Carp
sub _carp { require Carp; Carp::carp(@_) }
From e14ffd3c21efe708a5fb5e25f29d61ccb6ee0a0a Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Tue, 4 May 2021 15:04:25 +1000
Subject: [PATCH 3/4] avoid a prototype warning assigning \&getcwd to *cwd
This would produce a warning if we fallback to using getcwd() where
getcwd() has a prototype.
---
dist/PathTools/Cwd.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm
index fbe683e20b8a..b6dc0b798e8c 100644
--- a/dist/PathTools/Cwd.pm
+++ b/dist/PathTools/Cwd.pm
@@ -212,7 +212,8 @@ unless ($METHOD_MAP{$^O}{cwd} or defined &cwd) {
*cwd = \&_backtick_pwd;
}
else {
- *cwd = \&getcwd;
+ # getcwd() might have an empty prototype
+ *cwd = sub { getcwd(); };
}
}
From e725e6ced4d2bbb6a5866992509c2ac3e995c228 Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Wed, 12 May 2021 12:24:59 +1000
Subject: [PATCH 4/4] bump PathTools to 3.81
---
dist/PathTools/Cwd.pm | 2 +-
dist/PathTools/lib/File/Spec.pm | 2 +-
dist/PathTools/lib/File/Spec/AmigaOS.pm | 2 +-
dist/PathTools/lib/File/Spec/Cygwin.pm | 2 +-
dist/PathTools/lib/File/Spec/Epoc.pm | 2 +-
dist/PathTools/lib/File/Spec/Functions.pm | 2 +-
dist/PathTools/lib/File/Spec/Mac.pm | 2 +-
dist/PathTools/lib/File/Spec/OS2.pm | 2 +-
dist/PathTools/lib/File/Spec/Unix.pm | 2 +-
dist/PathTools/lib/File/Spec/VMS.pm | 2 +-
dist/PathTools/lib/File/Spec/Win32.pm | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm
index b6dc0b798e8c..4a9c786c1c3c 100644
--- a/dist/PathTools/Cwd.pm
+++ b/dist/PathTools/Cwd.pm
@@ -3,7 +3,7 @@ use strict;
use Exporter;
-our $VERSION = '3.80';
+our $VERSION = '3.81';
my $xs_version = $VERSION;
$VERSION =~ tr/_//d;
diff --git a/dist/PathTools/lib/File/Spec.pm b/dist/PathTools/lib/File/Spec.pm
index 30d883b61b3e..fe738acf58bd 100644
--- a/dist/PathTools/lib/File/Spec.pm
+++ b/dist/PathTools/lib/File/Spec.pm
@@ -2,7 +2,7 @@ package File::Spec;
use strict;
-our $VERSION = '3.80';
+our $VERSION = '3.81';
$VERSION =~ tr/_//d;
my %module = (
diff --git a/dist/PathTools/lib/File/Spec/AmigaOS.pm b/dist/PathTools/lib/File/Spec/AmigaOS.pm
index fd9da81cdf5a..1398379ca57c 100644
--- a/dist/PathTools/lib/File/Spec/AmigaOS.pm
+++ b/dist/PathTools/lib/File/Spec/AmigaOS.pm
@@ -3,7 +3,7 @@ package File::Spec::AmigaOS;
use strict;
require File::Spec::Unix;
-our $VERSION = '3.80';
+our $VERSION = '3.81';
$VERSION =~ tr/_//d;
our @ISA = qw(File::Spec::Unix);
diff --git a/dist/PathTools/lib/File/Spec/Cygwin.pm b/dist/PathTools/lib/File/Spec/Cygwin.pm
index 953c23361a10..55d551ce0663 100644
--- a/dist/PathTools/lib/File/Spec/Cygwin.pm
+++ b/dist/PathTools/lib/File/Spec/Cygwin.pm
@@ -3,7 +3,7 @@ package File::Spec::Cygwin;
use strict;
require File::Spec::Unix;
-our $VERSION = '3.80';
+our $VERSION = '3.81';
$VERSION =~ tr/_//d;
our @ISA = qw(File::Spec::Unix);
diff --git a/dist/PathTools/lib/File/Spec/Epoc.pm b/dist/PathTools/lib/File/Spec/Epoc.pm
index fcb9e894e33c..4cde744231aa 100644
--- a/dist/PathTools/lib/File/Spec/Epoc.pm
+++ b/dist/PathTools/lib/File/Spec/Epoc.pm
@@ -2,7 +2,7 @@ package File::Spec::Epoc;
use strict;
-our $VERSION = '3.80';
+our $VERSION = '3.81';
$VERSION =~ tr/_//d;
require File::Spec::Unix;
diff --git a/dist/PathTools/lib/File/Spec/Functions.pm b/dist/PathTools/lib/File/Spec/Functions.pm
index e14ad2f74538..4b3d7bbde130 100644
--- a/dist/PathTools/lib/File/Spec/Functions.pm
+++ b/dist/PathTools/lib/File/Spec/Functions.pm
@@ -3,7 +3,7 @@ package File::Spec::Functions;
use File::Spec;
use strict;
-our $VERSION = '3.80';
+our $VERSION = '3.81';
$VERSION =~ tr/_//d;
require Exporter;
diff --git a/dist/PathTools/lib/File/Spec/Mac.pm b/dist/PathTools/lib/File/Spec/Mac.pm
index 8026edcb1261..51d00a01f6f7 100644
--- a/dist/PathTools/lib/File/Spec/Mac.pm
+++ b/dist/PathTools/lib/File/Spec/Mac.pm
@@ -4,7 +4,7 @@ use strict;
use Cwd ();
require File::Spec::Unix;
-our $VERSION = '3.80';
+our $VERSION = '3.81';
$VERSION =~ tr/_//d;
our @ISA = qw(File::Spec::Unix);
diff --git a/dist/PathTools/lib/File/Spec/OS2.pm b/dist/PathTools/lib/File/Spec/OS2.pm
index 3c35ba99b48a..57d67ba01e93 100644
--- a/dist/PathTools/lib/File/Spec/OS2.pm
+++ b/dist/PathTools/lib/File/Spec/OS2.pm
@@ -4,7 +4,7 @@ use strict;
use Cwd ();
require File::Spec::Unix;
-our $VERSION = '3.80';
+our $VERSION = '3.81';
$VERSION =~ tr/_//d;
our @ISA = qw(File::Spec::Unix);
diff --git a/dist/PathTools/lib/File/Spec/Unix.pm b/dist/PathTools/lib/File/Spec/Unix.pm
index c06d18f46819..df98f580c3ea 100644
--- a/dist/PathTools/lib/File/Spec/Unix.pm
+++ b/dist/PathTools/lib/File/Spec/Unix.pm
@@ -3,7 +3,7 @@ package File::Spec::Unix;
use strict;
use Cwd ();
-our $VERSION = '3.80';
+our $VERSION = '3.81';
$VERSION =~ tr/_//d;
=head1 NAME
diff --git a/dist/PathTools/lib/File/Spec/VMS.pm b/dist/PathTools/lib/File/Spec/VMS.pm
index 9b78c8b4bc6e..bbff3ad7d807 100644
--- a/dist/PathTools/lib/File/Spec/VMS.pm
+++ b/dist/PathTools/lib/File/Spec/VMS.pm
@@ -4,7 +4,7 @@ use strict;
use Cwd ();
require File::Spec::Unix;
-our $VERSION = '3.80';
+our $VERSION = '3.81';
$VERSION =~ tr/_//d;
our @ISA = qw(File::Spec::Unix);
diff --git a/dist/PathTools/lib/File/Spec/Win32.pm b/dist/PathTools/lib/File/Spec/Win32.pm
index 153744202338..b38419cdf1a6 100644
--- a/dist/PathTools/lib/File/Spec/Win32.pm
+++ b/dist/PathTools/lib/File/Spec/Win32.pm
@@ -5,7 +5,7 @@ use strict;
use Cwd ();
require File::Spec::Unix;
-our $VERSION = '3.80';
+our $VERSION = '3.81';
$VERSION =~ tr/_//d;
our @ISA = qw(File::Spec::Unix);

View File

@ -0,0 +1,40 @@
From: Sergey Poznyakoff <gray@gnu.org>
Date: Wed, 23 Jun 2021 10:26:50 +0300
Subject: Fix GDBM_File to compile with version 1.20 and earlier
* ext/GDBM_File/GDBM_File.xs (ITEM_NOT_FOUND): Define conditionally,
depending on the GDBM_VERSION_MAJOR and GDBM_VERSION_MINOR.
Don't assume GDBM_ITEM_NOT_FOUND is a define (it isn't since
gdbm commit d3e27957).
Origin: backport, https://github.com/Perl/perl5/pull/18924/commits/aacd2398e766500cb5d83c4d76b642fcf31d997a
Bug: https://github.com/Perl/perl5/issues/18915
Bug-Debian: https://bugs.debian.org/993514
---
ext/GDBM_File/GDBM_File.xs | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
index cd0bb6f..494c288 100644
--- a/ext/GDBM_File/GDBM_File.xs
+++ b/ext/GDBM_File/GDBM_File.xs
@@ -145,14 +145,13 @@ output_datum(pTHX_ SV *arg, char *str, int size)
#define gdbm_setopt(db,optflag,optval,optlen) not_here("gdbm_setopt")
#endif
-#ifndef GDBM_ITEM_NOT_FOUND
-# define GDBM_ITEM_NOT_FOUND GDBM_NO_ERROR
-#endif
-
+#if GDBM_VERSION_MAJOR == 1 && GDBM_VERSION_MINOR < 13
/* Prior to 1.13, gdbm_fetch family functions set gdbm_errno to GDBM_NO_ERROR
if the requested key did not exist */
-#define ITEM_NOT_FOUND() \
- (gdbm_errno == GDBM_ITEM_NOT_FOUND || gdbm_errno == GDBM_NO_ERROR)
+# define ITEM_NOT_FOUND() (gdbm_errno == GDBM_NO_ERROR)
+#else
+# define ITEM_NOT_FOUND() (gdbm_errno == GDBM_ITEM_NOT_FOUND)
+#endif
#define CHECKDB(db) do { \
if (!db->dbp) { \

View File

@ -7,8 +7,10 @@
</maintainer>
<use>
<flag name="ithreads">Enable Perl threads, has some compatibility problems</flag>
<flag name="quadmath">Enable 128bit floating point arithmetic via libquadmath</flag>
</use>
<upstream>
<remote-id type="github">Perl/perl5</remote-id>
<remote-id type="github">arsv/perl-cross</remote-id>
</upstream>
</pkgmetadata>

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -14,18 +14,16 @@ DIST_AUTHOR=XSAWYERX
# Greatest first, don't include yourself
# Devel point-releases are not ABI-intercompatible, but stable point releases are
# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
# BIN_OLDVERSEN contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN=""
# Yes we can.
PERL_SINGLE_SLOT=y
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.30.0
else
DIST_VERSION="${PV/_rc/-RC}"
fi
SHORT_PV="${DIST_VERSION%.*}"
# Even numbered major versions are ABI intercompatible
# Odd numbered major versions are not
if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
@ -33,6 +31,7 @@ if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
else
SUBSLOT="${DIST_VERSION%.*}"
fi
# Used only in tar paths
MY_P="perl-${DIST_VERSION}"
# Used in library paths
@ -53,10 +52,10 @@ LICENSE="|| ( Artistic GPL-1+ )"
SLOT="0/${SUBSLOT}"
if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
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"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
IUSE="berkdb debug doc gdbm ithreads minimal"
IUSE="berkdb debug doc gdbm ithreads minimal quadmath"
RDEPEND="
berkdb? ( sys-libs/db:= )
@ -71,6 +70,7 @@ BDEPEND="${RDEPEND}"
PDEPEND="
!minimal? (
>=app-admin/perl-cleaner-2.5
>=virtual/perl-CPAN-2.290.0
>=virtual/perl-Encode-3.120.0
>=virtual/perl-File-Temp-0.230.400-r2
>=virtual/perl-Data-Dumper-2.154.0
@ -126,13 +126,16 @@ check_rebuild() {
return 0;
# Reinstall w/ USE Change
elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
elif
( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
( use quadmath && ! has_version dev-lang/perl[quadmath] ) || \
( ! use quadmath && has_version dev-lang/perl[quadmath] ) || \
( use debug && ! has_version dev-lang/perl[debug] ) || \
( ! use debug && has_version dev-lang/perl[debug] ) ; then
echo ""
ewarn "TOGGLED USE-FLAGS WARNING:"
ewarn "You changed one of the use-flags ithreads or debug."
ewarn "You changed one of the use-flags ithreads, quadmath, or debug."
ewarn "You must rebuild all perl-modules installed."
ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
fi
@ -154,6 +157,9 @@ pkg_setup() {
if use debug ; then
myarch+="-debug"
fi
if use quadmath ; then
myarch+="-quadmath"
fi
if use ithreads ; then
mythreading="-multi"
myarch+="-thread"
@ -165,24 +171,12 @@ pkg_setup() {
LIBPERL="libperl$(get_libname ${MY_PV} )"
# This ENV var tells perl to build with a directory like "5.30"
# regardless of its patch version. This is for experts only
# at this point.
if [[ -z "${PERL_SINGLE_SLOT}" ]]; then
PRIV_LIB="${PRIV_BASE}/${MY_PV}"
ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${MY_PV}"
SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
else
PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${SUBSLOT}"
SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
fi
PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${SUBSLOT}"
SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
dual_scripts
}
@ -264,6 +258,7 @@ src_prepare_perlcross() {
MAKEOPTS+=" -j1"
export MAKEOPTS
}
src_prepare_dynamic() {
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
ln -s ${LIBPERL} libperl$(get_libname ) || die
@ -292,9 +287,10 @@ add_patch() {
printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
fi
}
# Remove a patch using a glob expr
# eg:
# rm_patch *-darin-Use-CC*
# rm_patch *-darwin-Use-CC*
#
rm_patch() {
local patchdir="${WORKDIR}/patches"
@ -307,6 +303,7 @@ rm_patch() {
ewarn "No ${expr} found in ${patchdir} to remove"
fi
}
# Yes, this is a reasonable amount of code for something seemingly simple
# but this is far easier to debug when things go wrong, and things went wrong
# multiple times while I was getting the exact number of slashes right, which
@ -388,6 +385,7 @@ apply_patchdir() {
printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
}
src_prepare() {
local patchdir="${WORKDIR}/patches"
@ -398,6 +396,16 @@ src_prepare() {
# "Fix broken miniperl on hppa"\
# "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
add_patch "${FILESDIR}/${P}-gdbm-1.20.patch" "0101-Fix-build-with-gdb120.patch"\
"Fix GDBM_File to compile with version 1.20 and earlier"\
"https://bugs.gentoo.org/802945"
if use prefix ; then
add_patch "${FILESDIR}/${P}"-fallback-getcwd-pwd.patch "0102-5.34.0-fallback-get-cwd-pwd.patch"\
"Fix installation during Prefix bootstrap (finding 'pwd' from coreutils)"\
"https://bugs.gentoo.org/818172"
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# do NOT mess with nsl, on Solaris this is always necessary,
# when -lsocket is used e.g. to get h_errno
@ -428,6 +436,12 @@ src_prepare() {
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name (soname) not to reference $D
sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
# fix environ linkage absence (only a real issue on Darwin9)
if [[ ${CHOST##*-darwin} -le 9 ]] ; then
sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \
Makefile.SH || die
fi
fi
default
@ -444,16 +458,10 @@ myconf() {
# /usr/local/lib64/perl5/<NUMBER>
# /usr/lib64/perl5/vendor_perl/<NUMBER>
#
# All values of NUMBER must be like "5.x.y", unless PERL_SUPPORT_SINGLE_SLOT
# is enabled, where it will also allow numbers like "5.x"
# All values of NUMBER must be like "5.x.y" or like "5.x"
#
# PERL_SUPPORT_SINGLE_SLOT should only be used to transition *away* from PERL_SINGLE_SLOT
# if you used that.
find_candidate_inc_versions() {
local regex='.*/5[.][0-9]+[.][0-9]+$';
if [[ ! -z "${PERL_SUPPORT_SINGLE_SLOT}" || ! -z "${PERL_SINGLE_SLOT}" ]]; then
regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
fi
local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
local dirs=(
"${EROOT}${PRIV_BASE}"
"${EROOT}${SITE_BASE}"
@ -477,13 +485,11 @@ find_candidate_inc_versions() {
einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
}
# Sort versions passed versiony-ly, remove self-version if present
# dedup. Takes each version as an argument
sanitize_inc_versions() {
local vexclude="${DIST_VERSION%-RC}"
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
vexclude="${SUBSLOT}"
fi
local vexclude="${SUBSLOT}"
einfo "Normalizing/Sorting candidate list: $*"
einfo " to remove '${vexclude}'"
# Note, general numeric sort has to be used
@ -495,22 +501,18 @@ sanitize_inc_versions() {
}
versions_to_inclist() {
local oldv="${PERL_BIN_OLDVERSEN}"
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
fi
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
for v; do
has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
echo -n "${v}/ ";
done
}
versions_to_gentoolibdirs() {
local oldv="${PERL_BIN_OLDVERSEN}"
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
local root
local v
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
fi
for v; do
for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
local fullpath="${EROOT}${root}/${v}"
@ -577,6 +579,8 @@ src_configure() {
use ithreads && myconf -Dusethreads
use quadmath && myconf -Dusequadmath
if use debug ; then
append-cflags "-g"
myconf -DDEBUGGING
@ -624,9 +628,11 @@ src_configure() {
myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
# Older macOS with non-Apple GCC chokes on inline in system headers
# using c89 mode as injected by cflags.SH
# using c89 mode as injected by cflags.SH, in addition, we override
# cflags, so we loose PERL_DARWIN which enables compat code that
# apparently on more recent macOS releases is no longer necessary
[[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
append-cflags -Dinline=__inline__
append-cflags -Dinline=__inline__ -DPERL_DARWIN
# flock on 32-bit sparc Solaris is broken, fall back to fcntl
[[ ${CHOST} == sparc-*-solaris* ]] && \
@ -676,6 +682,7 @@ src_configure() {
-Dnm="$(tc-getNM)" \
-Dcpp="$(tc-getCPP)" \
-Dranlib="$(tc-getRANLIB)" \
-Dccflags="${CFLAGS}" \
-Doptimize="${CFLAGS}" \
-Dldflags="${LDFLAGS}" \
-Dprefix="${EPREFIX}"'/usr' \
@ -708,7 +715,6 @@ src_configure() {
-Dsh="${EPREFIX}"/bin/sh \
-Dtargetsh="${EPREFIX}"/bin/sh \
-Uusenm \
"${myconf[@]}" \
"${EXTRA_ECONF[@]}"
if tc-is-cross-compiler; then
@ -795,7 +801,7 @@ pkg_preinst() {
pkg_postinst() {
dual_scripts
if [[ "${ROOT}" = "/" ]] ; then
if [[ -z "${ROOT}" ]] ; then
local INC DIR file
INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
einfo "Removing old .ph files"

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -14,18 +14,16 @@ DIST_AUTHOR=XSAWYERX
# Greatest first, don't include yourself
# Devel point-releases are not ABI-intercompatible, but stable point releases are
# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
# BIN_OLDVERSEN contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN=""
# Yes we can.
PERL_SINGLE_SLOT=y
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.30.0
else
DIST_VERSION="${PV/_rc/-RC}"
fi
SHORT_PV="${DIST_VERSION%.*}"
# Even numbered major versions are ABI intercompatible
# Odd numbered major versions are not
if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
@ -33,6 +31,7 @@ if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
else
SUBSLOT="${DIST_VERSION%.*}"
fi
# Used only in tar paths
MY_P="perl-${DIST_VERSION}"
# Used in library paths
@ -56,7 +55,7 @@ if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
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"
fi
IUSE="berkdb debug doc gdbm ithreads minimal"
IUSE="berkdb debug doc gdbm ithreads minimal quadmath"
RDEPEND="
berkdb? ( sys-libs/db:= )
@ -71,6 +70,8 @@ BDEPEND="${RDEPEND}"
PDEPEND="
!minimal? (
>=app-admin/perl-cleaner-2.5
>=virtual/perl-CPAN-2.290.0
>=virtual/perl-Encode-3.120.0
>=virtual/perl-File-Temp-0.230.400-r2
>=virtual/perl-Data-Dumper-2.154.0
virtual/perl-Test-Harness
@ -125,13 +126,16 @@ check_rebuild() {
return 0;
# Reinstall w/ USE Change
elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
elif
( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
( use quadmath && ! has_version dev-lang/perl[quadmath] ) || \
( ! use quadmath && has_version dev-lang/perl[quadmath] ) || \
( use debug && ! has_version dev-lang/perl[debug] ) || \
( ! use debug && has_version dev-lang/perl[debug] ) ; then
echo ""
ewarn "TOGGLED USE-FLAGS WARNING:"
ewarn "You changed one of the use-flags ithreads or debug."
ewarn "You changed one of the use-flags ithreads, quadmath, or debug."
ewarn "You must rebuild all perl-modules installed."
ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
fi
@ -153,6 +157,9 @@ pkg_setup() {
if use debug ; then
myarch+="-debug"
fi
if use quadmath ; then
myarch+="-quadmath"
fi
if use ithreads ; then
mythreading="-multi"
myarch+="-thread"
@ -164,24 +171,12 @@ pkg_setup() {
LIBPERL="libperl$(get_libname ${MY_PV} )"
# This ENV var tells perl to build with a directory like "5.30"
# regardless of its patch version. This is for experts only
# at this point.
if [[ -z "${PERL_SINGLE_SLOT}" ]]; then
PRIV_LIB="${PRIV_BASE}/${MY_PV}"
ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${MY_PV}"
SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
else
PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${SUBSLOT}"
SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
fi
PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${SUBSLOT}"
SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
dual_scripts
}
@ -263,6 +258,7 @@ src_prepare_perlcross() {
MAKEOPTS+=" -j1"
export MAKEOPTS
}
src_prepare_dynamic() {
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
ln -s ${LIBPERL} libperl$(get_libname ) || die
@ -291,9 +287,10 @@ add_patch() {
printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
fi
}
# Remove a patch using a glob expr
# eg:
# rm_patch *-darin-Use-CC*
# rm_patch *-darwin-Use-CC*
#
rm_patch() {
local patchdir="${WORKDIR}/patches"
@ -306,6 +303,7 @@ rm_patch() {
ewarn "No ${expr} found in ${patchdir} to remove"
fi
}
# Yes, this is a reasonable amount of code for something seemingly simple
# but this is far easier to debug when things go wrong, and things went wrong
# multiple times while I was getting the exact number of slashes right, which
@ -387,6 +385,7 @@ apply_patchdir() {
printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
}
src_prepare() {
local patchdir="${WORKDIR}/patches"
@ -397,6 +396,16 @@ src_prepare() {
# "Fix broken miniperl on hppa"\
# "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
add_patch "${FILESDIR}/${P}-gdbm-1.20.patch" "0101-Fix-build-with-gdb120.patch"\
"Fix GDBM_File to compile with version 1.20 and earlier"\
"https://bugs.gentoo.org/802945"
if use prefix ; then
add_patch "${FILESDIR}/${P}"-fallback-getcwd-pwd.patch "0102-5.34.0-fallback-get-cwd-pwd.patch"\
"Fix installation during Prefix bootstrap (finding 'pwd' from coreutils)"\
"https://bugs.gentoo.org/818172"
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# do NOT mess with nsl, on Solaris this is always necessary,
# when -lsocket is used e.g. to get h_errno
@ -427,6 +436,12 @@ src_prepare() {
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name (soname) not to reference $D
sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
# fix environ linkage absence (only a real issue on Darwin9)
if [[ ${CHOST##*-darwin} -le 9 ]] ; then
sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \
Makefile.SH || die
fi
fi
default
@ -443,16 +458,10 @@ myconf() {
# /usr/local/lib64/perl5/<NUMBER>
# /usr/lib64/perl5/vendor_perl/<NUMBER>
#
# All values of NUMBER must be like "5.x.y", unless PERL_SUPPORT_SINGLE_SLOT
# is enabled, where it will also allow numbers like "5.x"
# All values of NUMBER must be like "5.x.y" or like "5.x"
#
# PERL_SUPPORT_SINGLE_SLOT should only be used to transition *away* from PERL_SINGLE_SLOT
# if you used that.
find_candidate_inc_versions() {
local regex='.*/5[.][0-9]+[.][0-9]+$';
if [[ ! -z "${PERL_SUPPORT_SINGLE_SLOT}" || ! -z "${PERL_SINGLE_SLOT}" ]]; then
regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
fi
local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
local dirs=(
"${EROOT}${PRIV_BASE}"
"${EROOT}${SITE_BASE}"
@ -476,13 +485,11 @@ find_candidate_inc_versions() {
einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
}
# Sort versions passed versiony-ly, remove self-version if present
# dedup. Takes each version as an argument
sanitize_inc_versions() {
local vexclude="${DIST_VERSION%-RC}"
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
vexclude="${SUBSLOT}"
fi
local vexclude="${SUBSLOT}"
einfo "Normalizing/Sorting candidate list: $*"
einfo " to remove '${vexclude}'"
# Note, general numeric sort has to be used
@ -494,22 +501,18 @@ sanitize_inc_versions() {
}
versions_to_inclist() {
local oldv="${PERL_BIN_OLDVERSEN}"
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
fi
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
for v; do
has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
echo -n "${v}/ ";
done
}
versions_to_gentoolibdirs() {
local oldv="${PERL_BIN_OLDVERSEN}"
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
local root
local v
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
fi
for v; do
for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
local fullpath="${EROOT}${root}/${v}"
@ -576,6 +579,8 @@ src_configure() {
use ithreads && myconf -Dusethreads
use quadmath && myconf -Dusequadmath
if use debug ; then
append-cflags "-g"
myconf -DDEBUGGING
@ -623,9 +628,11 @@ src_configure() {
myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
# Older macOS with non-Apple GCC chokes on inline in system headers
# using c89 mode as injected by cflags.SH
# using c89 mode as injected by cflags.SH, in addition, we override
# cflags, so we loose PERL_DARWIN which enables compat code that
# apparently on more recent macOS releases is no longer necessary
[[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
append-cflags -Dinline=__inline__
append-cflags -Dinline=__inline__ -DPERL_DARWIN
# flock on 32-bit sparc Solaris is broken, fall back to fcntl
[[ ${CHOST} == sparc-*-solaris* ]] && \
@ -675,6 +682,7 @@ src_configure() {
-Dnm="$(tc-getNM)" \
-Dcpp="$(tc-getCPP)" \
-Dranlib="$(tc-getRANLIB)" \
-Accflags="${CFLAGS}" \
-Doptimize="${CFLAGS}" \
-Dldflags="${LDFLAGS}" \
-Dprefix="${EPREFIX}"'/usr' \
@ -707,7 +715,6 @@ src_configure() {
-Dsh="${EPREFIX}"/bin/sh \
-Dtargetsh="${EPREFIX}"/bin/sh \
-Uusenm \
"${myconf[@]}" \
"${EXTRA_ECONF[@]}"
if tc-is-cross-compiler; then
@ -794,7 +801,7 @@ pkg_preinst() {
pkg_postinst() {
dual_scripts
if [[ "${ROOT}" = "/" ]] ; then
if [[ -z "${ROOT}" ]] ; then
local INC DIR file
INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
einfo "Removing old .ph files"

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -14,18 +14,16 @@ DIST_AUTHOR=XSAWYERX
# Greatest first, don't include yourself
# Devel point-releases are not ABI-intercompatible, but stable point releases are
# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
# BIN_OLDVERSEN contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN=""
# Yes we can.
PERL_SINGLE_SLOT=y
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.30.0
else
DIST_VERSION="${PV/_rc/-RC}"
fi
SHORT_PV="${DIST_VERSION%.*}"
# Even numbered major versions are ABI intercompatible
# Odd numbered major versions are not
if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
@ -33,6 +31,7 @@ if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
else
SUBSLOT="${DIST_VERSION%.*}"
fi
# Used only in tar paths
MY_P="perl-${DIST_VERSION}"
# Used in library paths
@ -53,7 +52,7 @@ LICENSE="|| ( Artistic GPL-1+ )"
SLOT="0/${SUBSLOT}"
if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
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"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
IUSE="berkdb debug doc gdbm ithreads minimal"
@ -71,6 +70,8 @@ BDEPEND="${RDEPEND}"
PDEPEND="
!minimal? (
>=app-admin/perl-cleaner-2.5
>=virtual/perl-CPAN-2.290.0
>=virtual/perl-Encode-3.120.0
>=virtual/perl-File-Temp-0.230.400-r2
>=virtual/perl-Data-Dumper-2.154.0
virtual/perl-Test-Harness
@ -164,24 +165,12 @@ pkg_setup() {
LIBPERL="libperl$(get_libname ${MY_PV} )"
# This ENV var tells perl to build with a directory like "5.30"
# regardless of its patch version. This is for experts only
# at this point.
if [[ -z "${PERL_SINGLE_SLOT}" ]]; then
PRIV_LIB="${PRIV_BASE}/${MY_PV}"
ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${MY_PV}"
SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
else
PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${SUBSLOT}"
SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
fi
PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${SUBSLOT}"
SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
dual_scripts
}
@ -256,10 +245,14 @@ src_remove_dual() {
src_prepare_perlcross() {
cp -a ../perl-cross-${CROSS_VER}/* . || die
# bug 794463, needs further analysis what is exactly wrong here
eapply "${FILESDIR}/perl-5.34.0-crossfit.patch"
# bug 604072
MAKEOPTS+=" -j1"
export MAKEOPTS
}
src_prepare_dynamic() {
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
ln -s ${LIBPERL} libperl$(get_libname ) || die
@ -288,9 +281,10 @@ add_patch() {
printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
fi
}
# Remove a patch using a glob expr
# eg:
# rm_patch *-darin-Use-CC*
# rm_patch *-darwin-Use-CC*
#
rm_patch() {
local patchdir="${WORKDIR}/patches"
@ -303,6 +297,7 @@ rm_patch() {
ewarn "No ${expr} found in ${patchdir} to remove"
fi
}
# Yes, this is a reasonable amount of code for something seemingly simple
# but this is far easier to debug when things go wrong, and things went wrong
# multiple times while I was getting the exact number of slashes right, which
@ -384,6 +379,7 @@ apply_patchdir() {
printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
}
src_prepare() {
local patchdir="${WORKDIR}/patches"
@ -394,6 +390,16 @@ src_prepare() {
# "Fix broken miniperl on hppa"\
# "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
add_patch "${FILESDIR}/${P}-gdbm-1.20.patch" "0101-Fix-build-with-gdb120.patch"\
"Fix GDBM_File to compile with version 1.20 and earlier"\
"https://bugs.gentoo.org/802945"
if use prefix ; then
add_patch "${FILESDIR}/${P}"-fallback-getcwd-pwd.patch "0102-5.34.0-fallback-get-cwd-pwd.patch"\
"Fix installation during Prefix bootstrap (finding 'pwd' from coreutils)"\
"https://bugs.gentoo.org/818172"
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# do NOT mess with nsl, on Solaris this is always necessary,
# when -lsocket is used e.g. to get h_errno
@ -424,6 +430,12 @@ src_prepare() {
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name (soname) not to reference $D
sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
# fix environ linkage absence (only a real issue on Darwin9)
if [[ ${CHOST##*-darwin} -le 9 ]] ; then
sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \
Makefile.SH || die
fi
fi
default
@ -440,16 +452,10 @@ myconf() {
# /usr/local/lib64/perl5/<NUMBER>
# /usr/lib64/perl5/vendor_perl/<NUMBER>
#
# All values of NUMBER must be like "5.x.y", unless PERL_SUPPORT_SINGLE_SLOT
# is enabled, where it will also allow numbers like "5.x"
# All values of NUMBER must be like "5.x.y" or like "5.x"
#
# PERL_SUPPORT_SINGLE_SLOT should only be used to transition *away* from PERL_SINGLE_SLOT
# if you used that.
find_candidate_inc_versions() {
local regex='.*/5[.][0-9]+[.][0-9]+$';
if [[ ! -z "${PERL_SUPPORT_SINGLE_SLOT}" || ! -z "${PERL_SINGLE_SLOT}" ]]; then
regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
fi
local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
local dirs=(
"${EROOT}${PRIV_BASE}"
"${EROOT}${SITE_BASE}"
@ -473,13 +479,11 @@ find_candidate_inc_versions() {
einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
}
# Sort versions passed versiony-ly, remove self-version if present
# dedup. Takes each version as an argument
sanitize_inc_versions() {
local vexclude="${DIST_VERSION%-RC}"
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
vexclude="${SUBSLOT}"
fi
local vexclude="${SUBSLOT}"
einfo "Normalizing/Sorting candidate list: $*"
einfo " to remove '${vexclude}'"
# Note, general numeric sort has to be used
@ -491,22 +495,18 @@ sanitize_inc_versions() {
}
versions_to_inclist() {
local oldv="${PERL_BIN_OLDVERSEN}"
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
fi
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
for v; do
has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
echo -n "${v}/ ";
done
}
versions_to_gentoolibdirs() {
local oldv="${PERL_BIN_OLDVERSEN}"
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
local root
local v
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
fi
for v; do
for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
local fullpath="${EROOT}${root}/${v}"
@ -620,9 +620,11 @@ src_configure() {
myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
# Older macOS with non-Apple GCC chokes on inline in system headers
# using c89 mode as injected by cflags.SH
# using c89 mode as injected by cflags.SH, in addition, we override
# cflags, so we loose PERL_DARWIN which enables compat code that
# apparently on more recent macOS releases is no longer necessary
[[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
append-cflags -Dinline=__inline__
append-cflags -Dinline=__inline__ -DPERL_DARWIN
# flock on 32-bit sparc Solaris is broken, fall back to fcntl
[[ ${CHOST} == sparc-*-solaris* ]] && \
@ -672,6 +674,7 @@ src_configure() {
-Dnm="$(tc-getNM)" \
-Dcpp="$(tc-getCPP)" \
-Dranlib="$(tc-getRANLIB)" \
-Dccflags="${CFLAGS}" \
-Doptimize="${CFLAGS}" \
-Dldflags="${LDFLAGS}" \
-Dprefix="${EPREFIX}"'/usr' \
@ -704,7 +707,6 @@ src_configure() {
-Dsh="${EPREFIX}"/bin/sh \
-Dtargetsh="${EPREFIX}"/bin/sh \
-Uusenm \
"${myconf[@]}" \
"${EXTRA_ECONF[@]}"
if tc-is-cross-compiler; then
@ -791,7 +793,7 @@ pkg_preinst() {
pkg_postinst() {
dual_scripts
if [[ "${ROOT}" = "/" ]] ; then
if [[ -z "${ROOT}" ]] ; then
local INC DIR file
INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
einfo "Removing old .ph files"

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -6,26 +6,24 @@ EAPI=7
inherit alternatives flag-o-matic toolchain-funcs multilib multiprocessing
PATCH_VER=1
CROSS_VER=1.3.4
PATCH_BASE="perl-5.32.0-patches-${PATCH_VER}"
PATCH_DEV=kentnl
CROSS_VER=1.3.7
PATCH_BASE="perl-5.34.0-patches-${PATCH_VER}"
PATCH_DEV=dilfridge
DIST_AUTHOR=XSAWYERX
# Greatest first, don't include yourself
# Devel point-releases are not ABI-intercompatible, but stable point releases are
# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
# BIN_OLDVERSEN contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN=""
# Yes we can.
PERL_SINGLE_SLOT=y
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.30.0
else
DIST_VERSION="${PV/_rc/-RC}"
fi
SHORT_PV="${DIST_VERSION%.*}"
# Even numbered major versions are ABI intercompatible
# Odd numbered major versions are not
if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
@ -33,6 +31,7 @@ if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
else
SUBSLOT="${DIST_VERSION%.*}"
fi
# Used only in tar paths
MY_P="perl-${DIST_VERSION}"
# Used in library paths
@ -53,12 +52,10 @@ LICENSE="|| ( Artistic GPL-1+ )"
SLOT="0/${SUBSLOT}"
if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
# SOMEWHAT EXPERIMENTAL CODE, DO NOT USE WITHOUT AN ADULT PRESENT, CHECK CHANGELOG
# FOR DETAILS
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"
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"
fi
IUSE="berkdb debug doc gdbm ithreads minimal"
IUSE="berkdb debug doc gdbm ithreads minimal quadmath"
RDEPEND="
berkdb? ( sys-libs/db:= )
@ -73,6 +70,8 @@ BDEPEND="${RDEPEND}"
PDEPEND="
!minimal? (
>=app-admin/perl-cleaner-2.5
>=virtual/perl-CPAN-2.290.0
>=virtual/perl-Encode-3.120.0
>=virtual/perl-File-Temp-0.230.400-r2
>=virtual/perl-Data-Dumper-2.154.0
virtual/perl-Test-Harness
@ -84,19 +83,19 @@ PDEPEND="
S="${WORKDIR}/${MY_P}"
dual_scripts() {
src_remove_dual perl-core/Archive-Tar 2.360.0 ptar ptardiff ptargrep
src_remove_dual perl-core/CPAN 2.270.0 cpan
src_remove_dual perl-core/Archive-Tar 2.380.0 ptar ptardiff ptargrep
src_remove_dual perl-core/CPAN 2.280.0 cpan
src_remove_dual perl-core/Digest-SHA 6.20.0 shasum
src_remove_dual perl-core/Encode 3.60.0 enc2xs piconv
src_remove_dual perl-core/ExtUtils-MakeMaker 7.440.0 instmodsh
src_remove_dual perl-core/ExtUtils-ParseXS 3.400.0 xsubpp
src_remove_dual perl-core/IO-Compress 2.93.0 zipdetails
src_remove_dual perl-core/JSON-PP 4.40.0 json_pp
src_remove_dual perl-core/Module-CoreList 5.202.101.23 corelist
src_remove_dual perl-core/Pod-Checker 1.730.0 podchecker
src_remove_dual perl-core/Encode 3.80.100_rc enc2xs piconv
src_remove_dual perl-core/ExtUtils-MakeMaker 7.620.0 instmodsh
src_remove_dual perl-core/ExtUtils-ParseXS 3.430.0 xsubpp
src_remove_dual perl-core/IO-Compress 2.102.0 zipdetails
src_remove_dual perl-core/JSON-PP 4.60.0 json_pp
src_remove_dual perl-core/Module-CoreList 5.202.203.130 corelist
src_remove_dual perl-core/Pod-Checker 1.740.0 podchecker
src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc
src_remove_dual perl-core/Pod-Usage 1.690.0 pod2usage
src_remove_dual perl-core/Test-Harness 3.420.0 prove
src_remove_dual perl-core/Pod-Usage 2.10.0 pod2usage
src_remove_dual perl-core/Test-Harness 3.430.0 prove
src_remove_dual perl-core/podlators 4.140.0 pod2man pod2text
src_remove_dual_man perl-core/podlators 4.140.0 /usr/share/man/man1/perlpodstyle.1
}
@ -127,13 +126,16 @@ check_rebuild() {
return 0;
# Reinstall w/ USE Change
elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
elif
( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
( use quadmath && ! has_version dev-lang/perl[quadmath] ) || \
( ! use quadmath && has_version dev-lang/perl[quadmath] ) || \
( use debug && ! has_version dev-lang/perl[debug] ) || \
( ! use debug && has_version dev-lang/perl[debug] ) ; then
echo ""
ewarn "TOGGLED USE-FLAGS WARNING:"
ewarn "You changed one of the use-flags ithreads or debug."
ewarn "You changed one of the use-flags ithreads, quadmath, or debug."
ewarn "You must rebuild all perl-modules installed."
ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
fi
@ -155,6 +157,9 @@ pkg_setup() {
if use debug ; then
myarch+="-debug"
fi
if use quadmath ; then
myarch+="-quadmath"
fi
if use ithreads ; then
mythreading="-multi"
myarch+="-thread"
@ -166,24 +171,12 @@ pkg_setup() {
LIBPERL="libperl$(get_libname ${MY_PV} )"
# This ENV var tells perl to build with a directory like "5.30"
# regardless of its patch version. This is for experts only
# at this point.
if [[ -z "${PERL_SINGLE_SLOT}" ]]; then
PRIV_LIB="${PRIV_BASE}/${MY_PV}"
ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${MY_PV}"
SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
else
PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${SUBSLOT}"
SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
fi
PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${SUBSLOT}"
SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
dual_scripts
}
@ -258,10 +251,14 @@ src_remove_dual() {
src_prepare_perlcross() {
cp -a ../perl-cross-${CROSS_VER}/* . || die
# bug 794463, needs further analysis what is exactly wrong here
eapply "${FILESDIR}/perl-5.34.0-crossfit.patch"
# bug 604072
MAKEOPTS+=" -j1"
export MAKEOPTS
}
src_prepare_dynamic() {
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
ln -s ${LIBPERL} libperl$(get_libname ) || die
@ -290,9 +287,10 @@ add_patch() {
printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
fi
}
# Remove a patch using a glob expr
# eg:
# rm_patch *-darin-Use-CC*
# rm_patch *-darwin-Use-CC*
#
rm_patch() {
local patchdir="${WORKDIR}/patches"
@ -305,6 +303,7 @@ rm_patch() {
ewarn "No ${expr} found in ${patchdir} to remove"
fi
}
# Yes, this is a reasonable amount of code for something seemingly simple
# but this is far easier to debug when things go wrong, and things went wrong
# multiple times while I was getting the exact number of slashes right, which
@ -386,17 +385,23 @@ apply_patchdir() {
printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
}
src_prepare() {
local patchdir="${WORKDIR}/patches"
# Prepare Patch dir with additional patches / remove unwanted patches
# Inject bug/desc entries for perl -V
if use hppa ; then
# bug 634162
add_patch "${FILESDIR}/${PN}-5.26.2-hppa.patch" "100-5.26.2-hppa.patch"\
"Fix broken miniperl on hppa"\
"https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
# Old example:
# add_patch "${FILESDIR}/${PN}-5.26.2-hppa.patch" "100-5.26.2-hppa.patch"\
# "Fix broken miniperl on hppa"\
# "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
if use prefix ; then
add_patch "${FILESDIR}/${PN}"-5.34.0-fallback-getcwd-pwd.patch "0102-5.34.0-fallback-get-cwd-pwd.patch"\
"Fix installation during Prefix bootstrap (finding 'pwd' from coreutils)"\
"https://bugs.gentoo.org/818172"
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# do NOT mess with nsl, on Solaris this is always necessary,
# when -lsocket is used e.g. to get h_errno
@ -427,6 +432,12 @@ src_prepare() {
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name (soname) not to reference $D
sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
# fix environ linkage absence (only a real issue on Darwin9)
if [[ ${CHOST##*-darwin} -le 9 ]] ; then
sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \
Makefile.SH || die
fi
fi
default
@ -443,16 +454,10 @@ myconf() {
# /usr/local/lib64/perl5/<NUMBER>
# /usr/lib64/perl5/vendor_perl/<NUMBER>
#
# All values of NUMBER must be like "5.x.y", unless PERL_SUPPORT_SINGLE_SLOT
# is enabled, where it will also allow numbers like "5.x"
# All values of NUMBER must be like "5.x.y" or like "5.x"
#
# PERL_SUPPORT_SINGLE_SLOT should only be used to transition *away* from PERL_SINGLE_SLOT
# if you used that.
find_candidate_inc_versions() {
local regex='.*/5[.][0-9]+[.][0-9]+$';
if [[ ! -z "${PERL_SUPPORT_SINGLE_SLOT}" || ! -z "${PERL_SINGLE_SLOT}" ]]; then
regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
fi
local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
local dirs=(
"${EROOT}${PRIV_BASE}"
"${EROOT}${SITE_BASE}"
@ -476,13 +481,11 @@ find_candidate_inc_versions() {
einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
}
# Sort versions passed versiony-ly, remove self-version if present
# dedup. Takes each version as an argument
sanitize_inc_versions() {
local vexclude="${DIST_VERSION%-RC}"
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
vexclude="${SUBSLOT}"
fi
local vexclude="${SUBSLOT}"
einfo "Normalizing/Sorting candidate list: $*"
einfo " to remove '${vexclude}'"
# Note, general numeric sort has to be used
@ -494,22 +497,18 @@ sanitize_inc_versions() {
}
versions_to_inclist() {
local oldv="${PERL_BIN_OLDVERSEN}"
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
fi
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
for v; do
has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
echo -n "${v}/ ";
done
}
versions_to_gentoolibdirs() {
local oldv="${PERL_BIN_OLDVERSEN}"
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
local root
local v
if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
fi
for v; do
for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
local fullpath="${EROOT}${root}/${v}"
@ -576,6 +575,8 @@ src_configure() {
use ithreads && myconf -Dusethreads
use quadmath && myconf -Dusequadmath
if use debug ; then
append-cflags "-g"
myconf -DDEBUGGING
@ -623,9 +624,11 @@ src_configure() {
myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
# Older macOS with non-Apple GCC chokes on inline in system headers
# using c89 mode as injected by cflags.SH
# using c89 mode as injected by cflags.SH, in addition, we override
# cflags, so we loose PERL_DARWIN which enables compat code that
# apparently on more recent macOS releases is no longer necessary
[[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
append-cflags -Dinline=__inline__
append-cflags -Dinline=__inline__ -DPERL_DARWIN
# flock on 32-bit sparc Solaris is broken, fall back to fcntl
[[ ${CHOST} == sparc-*-solaris* ]] && \
@ -675,6 +678,7 @@ src_configure() {
-Dnm="$(tc-getNM)" \
-Dcpp="$(tc-getCPP)" \
-Dranlib="$(tc-getRANLIB)" \
-Accflags="${CFLAGS}" \
-Doptimize="${CFLAGS}" \
-Dldflags="${LDFLAGS}" \
-Dprefix="${EPREFIX}"'/usr' \
@ -707,7 +711,6 @@ src_configure() {
-Dsh="${EPREFIX}"/bin/sh \
-Dtargetsh="${EPREFIX}"/bin/sh \
-Uusenm \
"${myconf[@]}" \
"${EXTRA_ECONF[@]}"
if tc-is-cross-compiler; then
@ -794,7 +797,7 @@ pkg_preinst() {
pkg_postinst() {
dual_scripts
if [[ "${ROOT}" = "/" ]] ; then
if [[ -z "${ROOT}" ]] ; then
local INC DIR file
INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
einfo "Removing old .ph files"

View File

@ -0,0 +1,836 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit alternatives flag-o-matic toolchain-funcs multilib multiprocessing
PATCH_VER=1
CROSS_VER=1.3.7
PATCH_BASE="perl-5.34.0-patches-${PATCH_VER}"
PATCH_DEV=dilfridge
DIST_AUTHOR=XSAWYERX
# Greatest first, don't include yourself
# Devel point-releases are not ABI-intercompatible, but stable point releases are
# BIN_OLDVERSEN contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN=""
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.30.0
else
DIST_VERSION="${PV/_rc/-RC}"
fi
SHORT_PV="${DIST_VERSION%.*}"
# Even numbered major versions are ABI intercompatible
# Odd numbered major versions are not
if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
SUBSLOT="${DIST_VERSION%-RC*}"
else
SUBSLOT="${DIST_VERSION%.*}"
fi
# Used only in tar paths
MY_P="perl-${DIST_VERSION}"
# Used in library paths
MY_PV="${DIST_VERSION%-RC*}"
DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
SRC_URI="
mirror://cpan/src/5.0/${MY_P}.tar.xz
mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PATCH_BASE}.tar.xz
https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
"
SRC_URI+="
https://dev.gentoo.org/~dilfridge/distfiles/perl-5.34.1-zlib-1.2.12.patch.xz
https://dev.gentoo.org/~dilfridge/distfiles/perl-5.34.1-zlib-1.2.12-encrypt-standard.zip.bin
"
HOMEPAGE="https://www.perl.org/"
LICENSE="|| ( Artistic GPL-1+ )"
SLOT="0/${SUBSLOT}"
if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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"
fi
IUSE="berkdb debug doc gdbm ithreads minimal quadmath"
RDEPEND="
berkdb? ( sys-libs/db:= )
gdbm? ( >=sys-libs/gdbm-1.8.3:= )
app-arch/bzip2
sys-libs/zlib
virtual/libcrypt:=
"
DEPEND="${RDEPEND}"
BDEPEND="${RDEPEND}"
PDEPEND="
!minimal? (
>=app-admin/perl-cleaner-2.5
>=virtual/perl-CPAN-2.290.0
>=virtual/perl-Encode-3.120.0
>=virtual/perl-File-Temp-0.230.400-r2
>=virtual/perl-Data-Dumper-2.154.0
virtual/perl-Test-Harness
)
"
# bug 390719, bug 523624
# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
S="${WORKDIR}/${MY_P}"
dual_scripts() {
src_remove_dual perl-core/Archive-Tar 2.380.0 ptar ptardiff ptargrep
src_remove_dual perl-core/CPAN 2.280.0 cpan
src_remove_dual perl-core/Digest-SHA 6.20.0 shasum
src_remove_dual perl-core/Encode 3.80.100_rc enc2xs piconv
src_remove_dual perl-core/ExtUtils-MakeMaker 7.620.0 instmodsh
src_remove_dual perl-core/ExtUtils-ParseXS 3.430.0 xsubpp
src_remove_dual perl-core/IO-Compress 2.103.0 zipdetails
src_remove_dual perl-core/JSON-PP 4.60.0 json_pp
src_remove_dual perl-core/Module-CoreList 5.202.203.130 corelist
src_remove_dual perl-core/Pod-Checker 1.740.0 podchecker
src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc
src_remove_dual perl-core/Pod-Usage 2.10.0 pod2usage
src_remove_dual perl-core/Test-Harness 3.430.0 prove
src_remove_dual perl-core/podlators 4.140.0 pod2man pod2text
src_remove_dual_man perl-core/podlators 4.140.0 /usr/share/man/man1/perlpodstyle.1
}
check_rebuild() {
# Fresh install
if [[ -z "${REPLACING_VERSIONS}" ]]; then
return 0;
# Major Upgrade
# doesn't matter if there's multiple copies, it still needs a rebuild
# if the string is anything other than "5.CURRENTMAJOR"
elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
echo ""
ewarn "UPDATE THE PERL MODULES:"
ewarn "After updating dev-lang/perl the installed Perl modules"
ewarn "have to be re-installed. In most cases, this is done automatically"
ewarn "by the package manager, but subsequent steps are still recommended"
ewarn "to ensure system consistency."
ewarn
ewarn "You should start with a depclean to remove any unused perl dependencies"
ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
ewarn "Recommended: emerge --depclean -va"
ewarn
ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
ewarn "remaining rebuilds portage may have missed."
ewarn "Use: perl-cleaner --all"
return 0;
# Reinstall w/ USE Change
elif
( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
( use quadmath && ! has_version dev-lang/perl[quadmath] ) || \
( ! use quadmath && has_version dev-lang/perl[quadmath] ) || \
( use debug && ! has_version dev-lang/perl[debug] ) || \
( ! use debug && has_version dev-lang/perl[debug] ) ; then
echo ""
ewarn "TOGGLED USE-FLAGS WARNING:"
ewarn "You changed one of the use-flags ithreads, quadmath, or debug."
ewarn "You must rebuild all perl-modules installed."
ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
fi
}
pkg_setup() {
case ${CHOST} in
*-freebsd*) osname="freebsd" ;;
*-dragonfly*) osname="dragonfly" ;;
*-netbsd*) osname="netbsd" ;;
*-openbsd*) osname="openbsd" ;;
*-darwin*) osname="darwin" ;;
*-solaris*) osname="solaris" ;;
*-cygwin*) osname="cygwin" ;;
*) osname="linux" ;;
esac
myarch="${CHOST%%-*}-${osname}"
if use debug ; then
myarch+="-debug"
fi
if use quadmath ; then
myarch+="-quadmath"
fi
if use ithreads ; then
mythreading="-multi"
myarch+="-thread"
fi
PRIV_BASE="/usr/$(get_libdir)/perl5"
SITE_BASE="/usr/local/$(get_libdir)/perl5"
VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
LIBPERL="libperl$(get_libname ${MY_PV} )"
PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${SUBSLOT}"
SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
dual_scripts
}
src_remove_dual_file() {
local i pkg ver
pkg="$1"
ver="$2"
shift 2
case "${EBUILD_PHASE:-none}" in
postinst|postrm)
for i in "$@" ; do
alternatives_auto_makesym "${i}" "${i}-[0-9]*"
done
;;
setup)
for i in "$@" ; do
if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
break
fi
done
;;
install)
for i in "$@" ; do
if ! [[ -f "${ED}"${i} ]] ; then
ewarn "${i} does not exist!"
continue
fi
mv "${ED}"${i}{,-${ver}-${P}} || die
done
;;
esac
}
src_remove_dual_man() {
local i pkg ver ff
pkg="$1"
ver="$2"
shift 2
case "${EBUILD_PHASE:-none}" in
postinst|postrm)
for i in "$@" ; do
ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
ff=${ff##*${i#${i%.[0-9]}}}
alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
done
;;
install)
for i in "$@" ; do
if ! [[ -f "${ED}"${i} ]] ; then
ewarn "${i} does not exist!"
continue
fi
mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
done
;;
esac
}
src_remove_dual() {
local i pkg ver
pkg="$1"
ver="$2"
shift 2
for i in "$@" ; do
src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
done
}
src_prepare_perlcross() {
cp -a ../perl-cross-${CROSS_VER}/* . || die
# bug 794463, needs further analysis what is exactly wrong here
eapply "${FILESDIR}/perl-5.34.0-crossfit.patch"
# bug 604072
MAKEOPTS+=" -j1"
export MAKEOPTS
}
src_prepare_dynamic() {
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
ln -s ${LIBPERL} libperl$(get_libname ) || die
}
# Copy a patch into the patch series
# add_patch SRC_PATH DEST_NAME ['description'] ['bug'] ['bug']
# - description is optional, but recommended
# - all arguments after descriptions are bug URLs
add_patch() {
local patchdir="${WORKDIR}/patches"
local infodir="${WORKDIR}/patch-info"
local src_name dest_name desc
src_name="$1"
dest_name="$2"
desc="$3"
shift; shift; shift;
einfo "Adding ${dest_name} to patch bundle"
cp "${src_name}" "${patchdir}/${dest_name}" || die "Couldn't copy ${src_name} to ${dest_name}"
if [[ -n "${desc}" ]]; then
printf "%s" "${desc}" > "${infodir}/${dest_name}.desc" || die "Couldn't write ${dest_name}.desc"
fi
if [[ $# -gt 0 ]]; then
# Note: when $@ is more than one element, this emits a
# line for each element
printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
fi
}
# Remove a patch using a glob expr
# eg:
# rm_patch *-darwin-Use-CC*
#
rm_patch() {
local patchdir="${WORKDIR}/patches"
local expr="$1"
local patch="$( cd "${patchdir}"; echo $expr )"
einfo "Removing $patch ($expr) from patch bundle"
if [[ -e "${patchdir}/${patch}" ]]; then
rm -f "${patchdir}/${patch}" || die "Can't remove ${patch} ( $expr )"
else
ewarn "No ${expr} found in ${patchdir} to remove"
fi
}
# Yes, this is a reasonable amount of code for something seemingly simple
# but this is far easier to debug when things go wrong, and things went wrong
# multiple times while I was getting the exact number of slashes right, which
# requires circumnavigating both bash and sed escape mechanisms.
c_escape_string() {
local slash dquote
slash='\'
dquote='"'
re_slash="${slash}${slash}"
re_dquote="${slash}${dquote}"
# Convert \ to \\,
# " to \"
echo "$1" |\
sed "s|${re_slash}|${re_slash}${re_slash}|g" |\
sed "s|${re_dquote}|${re_slash}${re_dquote}|g"
}
c_escape_file() {
c_escape_string "$(cat "$1")"
}
apply_patchdir() {
local patchdir="${WORKDIR}/patches"
local infodir="${WORKDIR}/patch-info"
local patchoutput="patchlevel-gentoo.h"
# Inject Patch-Level info into description for patchlevel.h patch
# to show in -V
local patch_expr="*List-packaged-patches*"
local patch="$( cd "${patchdir}"; echo $patch_expr )";
einfo "Injecting patch-level info into ${patch}.desc ( $patch_expr )"
if [[ -e "${patchdir}/${patch}" ]]; then
printf "List packaged patches for %s(%s) in patchlevel.h" "${PF}" "${PATCH_BASE}"\
>"${infodir}/${patch}.desc" || die "Can't rewrite ${patch}.desc"
else
eerror "No $patch_expr found in ${patchdir}"
fi
# Compute patch list to apply
# different name other than PATCHES to stop default
# reapplying it
# Single depth is currently only supported, as artifacts can reside
# from the old layout being multiple-directories, as well as it grossly
# simplifying the patchlevel_gentoo.h generation.
local PERL_PATCHES=($(
find "${patchdir}" -maxdepth 1 -mindepth 1 -type f -printf "%f\n" |\
grep -E '[.](diff|patch)$' |\
sort -n
))
for patch in "${PERL_PATCHES[@]}"; do
eapply "${WORKDIR}"/patches/${patch}
done
einfo "Generating $patchoutput"
# This code creates a header file, each iteration
# creates one-or-more-lines for each entry found in PERL_PATCHES
# and STDOUT is redirected to the .h file
for patch in "${PERL_PATCHES[@]}"; do
local desc_f="${infodir}/${patch}.desc"
local bugs_f="${infodir}/${patch}.bugs"
printf ',"%s"\n' "${patch}"
if [[ ! -e "${desc_f}" ]]; then
ewarn "No description provided for ${patch} (expected: ${desc_f} )"
else
local desc="$(c_escape_file "${desc_f}")"
printf ',"- %s"\n' "${desc}"
fi
if [[ -e "${bugs_f}" ]]; then
while read -d $'\n' -r line; do
local esc_line="$(c_escape_string "${line}")"
printf ',"- Bug: %s"\n' "${esc_line}"
done <"${bugs_f}"
fi
done > "${S}/${patchoutput}"
printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
}
src_prepare() {
local patchdir="${WORKDIR}/patches"
# Prepare Patch dir with additional patches / remove unwanted patches
# Inject bug/desc entries for perl -V
# Old example:
# add_patch "${FILESDIR}/${PN}-5.26.2-hppa.patch" "100-5.26.2-hppa.patch"\
# "Fix broken miniperl on hppa"\
# "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
add_patch "${WORKDIR}/perl-5.34.1-zlib-1.2.12.patch" "0501-5.34.1-zlib-1.2.12.patch"\
"Update IO-Compress, Compress-Raw-* to 2.103"\
"https://bugs.gentoo.org/837176"
# this is the binary chunk that gnu patch can't do
cp "${DISTDIR}/perl-5.34.1-zlib-1.2.12-encrypt-standard.zip.bin" "${S}/cpan/IO-Compress/t/files/encrypt-standard.zip" || die
if use prefix ; then
add_patch "${FILESDIR}/${PN}"-5.34.0-fallback-getcwd-pwd.patch "0102-5.34.0-fallback-get-cwd-pwd.patch"\
"Fix installation during Prefix bootstrap (finding 'pwd' from coreutils)"\
"https://bugs.gentoo.org/818172"
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# do NOT mess with nsl, on Solaris this is always necessary,
# when -lsocket is used e.g. to get h_errno
rm_patch "*-nsl-and-cl*"
fi
apply_patchdir
tc-is-cross-compiler && src_prepare_perlcross
tc-is-static-only || src_prepare_dynamic
if use gdbm; then
sed -i "s:INC => .*:INC => \"-I${EROOT}/usr/include/gdbm\":g" \
ext/NDBM_File/Makefile.PL || die
fi
# Use errno.h from prefix rather than from host system, bug #645804
if use prefix && [[ -e "${EPREFIX}"/usr/include/errno.h ]] ; then
sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.PL || die
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# set a soname, fix linking against just built libperl
sed -i -e 's/netbsd\*/netbsd*|solaris*/' Makefile.SH || die
fi
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name (soname) not to reference $D
sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
# fix environ linkage absence (only a real issue on Darwin9)
if [[ ${CHOST##*-darwin} -le 9 ]] ; then
sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \
Makefile.SH || die
fi
fi
default
}
myconf() {
# the myconf array is declared in src_configure
myconf=( "${myconf[@]}" "$@" )
}
# Outputs a list of versions which have been seen in any of the
# primary perl @INC prefix paths, such as:
# /usr/lib64/perl5/<NUMBER>
# /usr/local/lib64/perl5/<NUMBER>
# /usr/lib64/perl5/vendor_perl/<NUMBER>
#
# All values of NUMBER must be like "5.x.y" or like "5.x"
#
find_candidate_inc_versions() {
local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
local dirs=(
"${EROOT}${PRIV_BASE}"
"${EROOT}${SITE_BASE}"
"${EROOT}${VENDOR_BASE}"
)
for dir in "${dirs[@]}"; do
if [[ ! -e "${dir}" ]]; then
continue
fi
# Without access to readdir() on these dirs, find will not be able
# to reveal any @INC directories inside them, and will subsequently prune
# them from the built perl's @INC support, breaking our compatiblity options
# entirely.
if [[ ! -r "${dir}" || ! -x "${dir}" ]]; then
eerror "Bad permissions on ${dir}, this will probably break things"
eerror "Ensure ${dir} is +rx for at least uid=$EUID"
eerror "Recommended permission is +rx for all"
eerror "> chmod o+rx ${dir}"
fi
done
einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
}
# Sort versions passed versiony-ly, remove self-version if present
# dedup. Takes each version as an argument
sanitize_inc_versions() {
local vexclude="${SUBSLOT}"
einfo "Normalizing/Sorting candidate list: $*"
einfo " to remove '${vexclude}'"
# Note, general numeric sort has to be used
# for the last component, or unique will convert
# 5.30.0 + 5.30 into just 5.30
printf "%s\n" "$@" |\
grep -vxF "${vexclude}" |\
sort -u -nr -t'.' -k1,1rn -k2,2rn -k3,3rg
}
versions_to_inclist() {
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
for v; do
has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
echo -n "${v}/ ";
done
}
versions_to_gentoolibdirs() {
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
local root
local v
for v; do
for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
local fullpath="${EROOT}${root}/${v}"
if [[ -e "${fullpath}" ]]; then
has "${v}" ${oldv} && printf "%s:" "${fullpath}/${myarch}${mythreading}";
printf "%s:" "${fullpath}"
fi
done
done
}
src_configure() {
declare -a myconf
export LC_ALL="C"
[[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
# Perl has problems compiling with -Os in your flags with glibc
replace-flags "-Os" "-O2"
# xlocale.h is going away in glibc-2.26, so it's counterproductive
# if we use it and include it in CORE/perl.h ... Perl builds just
# fine with glibc and locale.h only.
# However, the darwin prefix people have no locale.h ...
use elibc_glibc && myconf -Ui_xlocale
# This flag makes compiling crash in interesting ways
filter-flags "-malign-double"
# Generic LTO broken since 5.28, triggers EUMM failures
filter-flags "-flto"
use sparc && myconf -Ud_longdbl
export BUILD_BZIP2=0
export BZIP2_INCLUDE=${EROOT}/usr/include
export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
export BUILD_ZLIB=False
export ZLIB_INCLUDE=${EROOT}/usr/include
export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
# allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
myndbm='U'
mygdbm='U'
mydb='U'
if use gdbm ; then
mygdbm='D'
if use berkdb ; then
myndbm='D'
fi
fi
if use berkdb ; then
mydb='D'
has_version '=sys-libs/db-1*' && myndbm='D'
fi
myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
myconf -Ui_db -Ui_ndbm
fi
use ithreads && myconf -Dusethreads
use quadmath && myconf -Dusequadmath
if use debug ; then
append-cflags "-g"
myconf -DDEBUGGING
elif [[ ${CFLAGS} == *-g* ]] ; then
myconf -DDEBUGGING=-g
else
myconf -DDEBUGGING=none
fi
# modifying 'optimize' prevents cross configure script from appending required flags
if tc-is-cross-compiler; then
append-cflags "-fwrapv -fno-strict-aliasing"
fi
# Autodiscover all old version directories, some of them will even be newer
# if you downgrade
if [[ -z ${PERL_OLDVERSEN} ]]; then
PERL_OLDVERSEN="$( find_candidate_inc_versions )"
fi
# Fixup versions, removing self match, fixing order and dupes
PERL_OLDVERSEN="$( sanitize_inc_versions ${PERL_OLDVERSEN} )"
# Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
if [[ -n "${PERL_OLDVERSEN// }" ]]; then
local inclist="$( versions_to_inclist ${PERL_OLDVERSEN} )"
einfo "This version of perl may partially support modules previously"
einfo "installed in any of the following paths:"
for incpath in ${inclist}; do
[[ -e "${EROOT}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT}${VENDOR_BASE}/${incpath}"
[[ -e "${EROOT}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROOT}${PRIV_BASE}/${incpath}"
[[ -e "${EROOT}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT}${SITE_BASE}/${incpath}"
done
einfo "This is a temporary measure and you should aim to cleanup these paths"
einfo "via world updates and perl-cleaner"
# myconf -Dinc_version_list="${inclist}"
myconf -Dgentoolibdirs="$( versions_to_gentoolibdirs ${PERL_OLDVERSEN} )"
fi
[[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
# Make sure we can do the final link #523730, need to set deployment
# target to override hardcoded 10.3 which breaks on modern OSX
[[ ${CHOST} == *-darwin* ]] && \
myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
# Older macOS with non-Apple GCC chokes on inline in system headers
# using c89 mode as injected by cflags.SH, in addition, we override
# cflags, so we loose PERL_DARWIN which enables compat code that
# apparently on more recent macOS releases is no longer necessary
[[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
append-cflags -Dinline=__inline__ -DPERL_DARWIN
# flock on 32-bit sparc Solaris is broken, fall back to fcntl
[[ ${CHOST} == sparc-*-solaris* ]] && \
myconf -Ud_flock
# Prefix: the host system needs not to follow Gentoo multilib stuff, and in
# Prefix itself we don't do multilib either, so make sure perl can find
# something compatible.
if use prefix ; then
# Set a hook to check for each detected library whether it actually works.
export libscheck="
( echo 'main(){}' > '${T}'/conftest.c &&
$(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
) || xxx=/dev/null"
# Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
elif [[ $(get_libdir) != "lib" ]] ; then
# We need to use " and not ', as the written config.sh use ' ...
myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
fi
# don't try building ODBM, bug #354453
disabled_extensions="ODBM_File"
if ! use gdbm ; then
# workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
fi
myconf -Dnoextensions="${disabled_extensions}"
[[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
[[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
# allow fiddling via EXTRA_ECONF, bug 558070
eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
# setting -Dld= to tc-getLD breaks perl and all perl things
# https://github.com/Perl/perl5/issues/17791#issuecomment-630145202
myconf \
-Duseshrplib \
-Darchname="${myarch}" \
-Dcc="$(tc-getCC)" \
-Dar="$(tc-getAR)" \
-Dnm="$(tc-getNM)" \
-Dcpp="$(tc-getCPP)" \
-Dranlib="$(tc-getRANLIB)" \
-Accflags="${CFLAGS}" \
-Doptimize="${CFLAGS}" \
-Dldflags="${LDFLAGS}" \
-Dprefix="${EPREFIX}"'/usr' \
-Dsiteprefix="${EPREFIX}"'/usr/local' \
-Dvendorprefix="${EPREFIX}"'/usr' \
-Dscriptdir="${EPREFIX}"'/usr/bin' \
-Dprivlib="${EPREFIX}${PRIV_LIB}" \
-Darchlib="${EPREFIX}${ARCH_LIB}" \
-Dsitelib="${EPREFIX}${SITE_LIB}" \
-Dsitearch="${EPREFIX}${SITE_ARCH}" \
-Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
-Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
-Dman1dir="${EPREFIX}"/usr/share/man/man1 \
-Dman3dir="${EPREFIX}"/usr/share/man/man3 \
-Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
-Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
-Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
-Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
-Dman1ext='1' \
-Dman3ext='3pm' \
-Dlibperl="${LIBPERL}" \
-Dlocincpth="${EPREFIX}"'/usr/include ' \
-Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
-Duselargefiles \
-Dd_semctl_semun \
-Dcf_by='Gentoo' \
-Dmyhostname='localhost' \
-Dperladmin='root@localhost' \
-Ud_csh \
-Dsh="${EPREFIX}"/bin/sh \
-Dtargetsh="${EPREFIX}"/bin/sh \
-Uusenm \
"${EXTRA_ECONF[@]}"
if tc-is-cross-compiler; then
./configure \
--target="${CHOST}" \
--build="${CBUILD}" \
-Dinstallprefix='' \
-Dinstallusrbinperl='undef' \
-Dusevendorprefix='define' \
"${myconf[@]}" \
|| die "Unable to configure"
else
sh Configure \
-des \
-Dinstallprefix="${EPREFIX}"'/usr' \
-Dinstallusrbinperl='n' \
"${myconf[@]}" \
|| die "Unable to configure"
fi
}
src_test() {
export NO_GENTOO_NETWORK_TESTS=1;
export GENTOO_ASSUME_SANDBOXED="${GENTOO_ASSUME_SANDBOXED:-1}"
export GENTOO_NO_PORTING_TESTS="${GENTOO_NO_PORTING_TESTS:-1}"
if [[ ${EUID} == 0 ]] ; then
ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
return 0
fi
TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
}
src_install() {
local i
local coredir="${ARCH_LIB}/CORE"
emake DESTDIR="${D}" install
rm -f "${ED}/usr/bin/perl${MY_PV}"
ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
if ! tc-is-static-only ; then
dolib.so "${ED}"${coredir}/${LIBPERL}
rm -f "${ED}"${coredir}/${LIBPERL}
ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
fi
rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
# This removes ${D} from Config.pm
for i in $(find "${D}" -iname "Config.pm" ) ; do
einfo "Removing ${D} from ${i}..."
sed -i -e "s:${D}::" "${i}" || die "Sed failed"
done
dodoc Changes* README AUTHORS
if use doc ; then
# HTML Documentation
# We expect errors, warnings, and such with the following.
dodir /usr/share/doc/${PF}/html
LD_LIBRARY_PATH=. ./perl installhtml \
--podroot='.' \
--podpath='lib:ext:pod:vms' \
--recurse \
--htmldir="${ED}/usr/share/doc/${PF}/html"
fi
[[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
dual_scripts
}
pkg_preinst() {
check_rebuild
}
pkg_postinst() {
dual_scripts
if [[ -z "${ROOT}" ]] ; then
local INC DIR file
INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
einfo "Removing old .ph files"
for DIR in ${INC} ; do
if [[ -d "${DIR}" ]] ; then
for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
rm -f "${file}"
einfo "<< ${file}"
done
fi
done
# Silently remove the now empty dirs
for DIR in ${INC} ; do
if [[ -d "${DIR}" ]] ; then
find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
fi
done
fi
}
pkg_postrm() {
dual_scripts
}

View File

@ -0,0 +1,819 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit alternatives flag-o-matic toolchain-funcs multilib multiprocessing
PATCH_VER=1
CROSS_VER=1.4
PATCH_BASE="perl-5.36.0-patches-${PATCH_VER}"
PATCH_DEV=dilfridge
DIST_AUTHOR=RJBS
# Greatest first, don't include yourself
# Devel point-releases are not ABI-intercompatible, but stable point releases are
# BIN_OLDVERSEN contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN=""
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.30.0
else
DIST_VERSION="${PV/_rc/-RC}"
fi
SHORT_PV="${DIST_VERSION%.*}"
# Even numbered major versions are ABI intercompatible
# Odd numbered major versions are not
if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
SUBSLOT="${DIST_VERSION%-RC*}"
else
SUBSLOT="${DIST_VERSION%.*}"
fi
# Used only in tar paths
MY_P="perl-${DIST_VERSION}"
# Used in library paths
MY_PV="${DIST_VERSION%-RC*}"
DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
SRC_URI="
mirror://cpan/src/5.0/${MY_P}.tar.xz
mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PATCH_BASE}.tar.xz
https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
"
HOMEPAGE="https://www.perl.org/"
LICENSE="|| ( Artistic GPL-1+ )"
SLOT="0/${SUBSLOT}"
if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
fi
IUSE="berkdb debug doc gdbm ithreads minimal quadmath"
RDEPEND="
berkdb? ( sys-libs/db:= )
gdbm? ( >=sys-libs/gdbm-1.8.3:= )
app-arch/bzip2
>=sys-libs/zlib-1.2.12
virtual/libcrypt:=
"
DEPEND="${RDEPEND}"
BDEPEND="${RDEPEND}"
PDEPEND="
!minimal? (
>=app-admin/perl-cleaner-2.5
>=virtual/perl-CPAN-2.290.0
>=virtual/perl-Encode-3.120.0
>=virtual/perl-File-Temp-0.230.400-r2
>=virtual/perl-Data-Dumper-2.154.0
virtual/perl-Test-Harness
)
"
# bug 390719, bug 523624
# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
S="${WORKDIR}/${MY_P}"
dual_scripts() {
src_remove_dual perl-core/Archive-Tar 2.400.0 ptar ptardiff ptargrep
src_remove_dual perl-core/CPAN 2.330.0 cpan
src_remove_dual perl-core/Digest-SHA 6.20.0 shasum
src_remove_dual perl-core/Encode 3.170.0 enc2xs piconv
src_remove_dual perl-core/ExtUtils-MakeMaker 7.640.0 instmodsh
src_remove_dual perl-core/ExtUtils-ParseXS 3.450.0 xsubpp
src_remove_dual perl-core/IO-Compress 2.106.0 zipdetails
src_remove_dual perl-core/JSON-PP 4.70.0 json_pp
src_remove_dual perl-core/Module-CoreList 5.202.205.200 corelist
src_remove_dual perl-core/Pod-Checker 1.740.0 podchecker
src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc
src_remove_dual perl-core/Pod-Usage 2.10.0 pod2usage
src_remove_dual perl-core/Test-Harness 3.440.0 prove
src_remove_dual perl-core/podlators 4.140.0 pod2man pod2text
src_remove_dual_man perl-core/podlators 4.140.0 /usr/share/man/man1/perlpodstyle.1
}
check_rebuild() {
# Fresh install
if [[ -z "${REPLACING_VERSIONS}" ]]; then
return 0;
# Major Upgrade
# doesn't matter if there's multiple copies, it still needs a rebuild
# if the string is anything other than "5.CURRENTMAJOR"
elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
echo ""
ewarn "UPDATE THE PERL MODULES:"
ewarn "After updating dev-lang/perl the installed Perl modules"
ewarn "have to be re-installed. In most cases, this is done automatically"
ewarn "by the package manager, but subsequent steps are still recommended"
ewarn "to ensure system consistency."
ewarn
ewarn "You should start with a depclean to remove any unused perl dependencies"
ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
ewarn "Recommended: emerge --depclean -va"
ewarn
ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
ewarn "remaining rebuilds portage may have missed."
ewarn "Use: perl-cleaner --all"
return 0;
# Reinstall w/ USE Change
elif
( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
( use quadmath && ! has_version dev-lang/perl[quadmath] ) || \
( ! use quadmath && has_version dev-lang/perl[quadmath] ) || \
( use debug && ! has_version dev-lang/perl[debug] ) || \
( ! use debug && has_version dev-lang/perl[debug] ) ; then
echo ""
ewarn "TOGGLED USE-FLAGS WARNING:"
ewarn "You changed one of the use-flags ithreads, quadmath, or debug."
ewarn "You must rebuild all perl-modules installed."
ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
fi
}
pkg_setup() {
case ${CHOST} in
*-freebsd*) osname="freebsd" ;;
*-dragonfly*) osname="dragonfly" ;;
*-netbsd*) osname="netbsd" ;;
*-openbsd*) osname="openbsd" ;;
*-darwin*) osname="darwin" ;;
*-solaris*) osname="solaris" ;;
*-cygwin*) osname="cygwin" ;;
*) osname="linux" ;;
esac
myarch="${CHOST%%-*}-${osname}"
if use debug ; then
myarch+="-debug"
fi
if use quadmath ; then
myarch+="-quadmath"
fi
if use ithreads ; then
mythreading="-multi"
myarch+="-thread"
fi
PRIV_BASE="/usr/$(get_libdir)/perl5"
SITE_BASE="/usr/local/$(get_libdir)/perl5"
VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
LIBPERL="libperl$(get_libname ${MY_PV} )"
PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${SUBSLOT}"
SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
dual_scripts
}
src_remove_dual_file() {
local i pkg ver
pkg="$1"
ver="$2"
shift 2
case "${EBUILD_PHASE:-none}" in
postinst|postrm)
for i in "$@" ; do
alternatives_auto_makesym "${i}" "${i}-[0-9]*"
done
;;
setup)
for i in "$@" ; do
if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
break
fi
done
;;
install)
for i in "$@" ; do
if ! [[ -f "${ED}"${i} ]] ; then
ewarn "${i} does not exist!"
continue
fi
mv "${ED}"${i}{,-${ver}-${P}} || die
done
;;
esac
}
src_remove_dual_man() {
local i pkg ver ff
pkg="$1"
ver="$2"
shift 2
case "${EBUILD_PHASE:-none}" in
postinst|postrm)
for i in "$@" ; do
ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
ff=${ff##*${i#${i%.[0-9]}}}
alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
done
;;
install)
for i in "$@" ; do
if ! [[ -f "${ED}"${i} ]] ; then
ewarn "${i} does not exist!"
continue
fi
mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
done
;;
esac
}
src_remove_dual() {
local i pkg ver
pkg="$1"
ver="$2"
shift 2
for i in "$@" ; do
src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
done
}
src_prepare_perlcross() {
cp -a ../perl-cross-${CROSS_VER}/* . || die
# bug 794463, needs further analysis what is exactly wrong here
eapply "${FILESDIR}/perl-5.34.0-crossfit.patch"
# bug 604072
MAKEOPTS+=" -j1"
export MAKEOPTS
}
src_prepare_dynamic() {
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
ln -s ${LIBPERL} libperl$(get_libname ) || die
}
# Copy a patch into the patch series
# add_patch SRC_PATH DEST_NAME ['description'] ['bug'] ['bug']
# - description is optional, but recommended
# - all arguments after descriptions are bug URLs
add_patch() {
local patchdir="${WORKDIR}/patches"
local infodir="${WORKDIR}/patch-info"
local src_name dest_name desc
src_name="$1"
dest_name="$2"
desc="$3"
shift; shift; shift;
einfo "Adding ${dest_name} to patch bundle"
cp "${src_name}" "${patchdir}/${dest_name}" || die "Couldn't copy ${src_name} to ${dest_name}"
if [[ -n "${desc}" ]]; then
printf "%s" "${desc}" > "${infodir}/${dest_name}.desc" || die "Couldn't write ${dest_name}.desc"
fi
if [[ $# -gt 0 ]]; then
# Note: when $@ is more than one element, this emits a
# line for each element
printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
fi
}
# Remove a patch using a glob expr
# eg:
# rm_patch *-darwin-Use-CC*
#
rm_patch() {
local patchdir="${WORKDIR}/patches"
local expr="$1"
local patch="$( cd "${patchdir}"; echo $expr )"
einfo "Removing $patch ($expr) from patch bundle"
if [[ -e "${patchdir}/${patch}" ]]; then
rm -f "${patchdir}/${patch}" || die "Can't remove ${patch} ( $expr )"
else
ewarn "No ${expr} found in ${patchdir} to remove"
fi
}
# Yes, this is a reasonable amount of code for something seemingly simple
# but this is far easier to debug when things go wrong, and things went wrong
# multiple times while I was getting the exact number of slashes right, which
# requires circumnavigating both bash and sed escape mechanisms.
c_escape_string() {
local slash dquote
slash='\'
dquote='"'
re_slash="${slash}${slash}"
re_dquote="${slash}${dquote}"
# Convert \ to \\,
# " to \"
echo "$1" |\
sed "s|${re_slash}|${re_slash}${re_slash}|g" |\
sed "s|${re_dquote}|${re_slash}${re_dquote}|g"
}
c_escape_file() {
c_escape_string "$(cat "$1")"
}
apply_patchdir() {
local patchdir="${WORKDIR}/patches"
local infodir="${WORKDIR}/patch-info"
local patchoutput="patchlevel-gentoo.h"
# Inject Patch-Level info into description for patchlevel.h patch
# to show in -V
local patch_expr="*List-packaged-patches*"
local patch="$( cd "${patchdir}"; echo $patch_expr )";
einfo "Injecting patch-level info into ${patch}.desc ( $patch_expr )"
if [[ -e "${patchdir}/${patch}" ]]; then
printf "List packaged patches for %s(%s) in patchlevel.h" "${PF}" "${PATCH_BASE}"\
>"${infodir}/${patch}.desc" || die "Can't rewrite ${patch}.desc"
else
eerror "No $patch_expr found in ${patchdir}"
fi
# Compute patch list to apply
# different name other than PATCHES to stop default
# reapplying it
# Single depth is currently only supported, as artifacts can reside
# from the old layout being multiple-directories, as well as it grossly
# simplifying the patchlevel_gentoo.h generation.
local PERL_PATCHES=($(
find "${patchdir}" -maxdepth 1 -mindepth 1 -type f -printf "%f\n" |\
grep -E '[.](diff|patch)$' |\
sort -n
))
for patch in "${PERL_PATCHES[@]}"; do
eapply "${WORKDIR}"/patches/${patch}
done
einfo "Generating $patchoutput"
# This code creates a header file, each iteration
# creates one-or-more-lines for each entry found in PERL_PATCHES
# and STDOUT is redirected to the .h file
for patch in "${PERL_PATCHES[@]}"; do
local desc_f="${infodir}/${patch}.desc"
local bugs_f="${infodir}/${patch}.bugs"
printf ',"%s"\n' "${patch}"
if [[ ! -e "${desc_f}" ]]; then
ewarn "No description provided for ${patch} (expected: ${desc_f} )"
else
local desc="$(c_escape_file "${desc_f}")"
printf ',"- %s"\n' "${desc}"
fi
if [[ -e "${bugs_f}" ]]; then
while read -d $'\n' -r line; do
local esc_line="$(c_escape_string "${line}")"
printf ',"- Bug: %s"\n' "${esc_line}"
done <"${bugs_f}"
fi
done > "${S}/${patchoutput}"
printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
}
src_prepare() {
local patchdir="${WORKDIR}/patches"
# Prepare Patch dir with additional patches / remove unwanted patches
# Inject bug/desc entries for perl -V
# Old example:
# add_patch "${FILESDIR}/${PN}-5.26.2-hppa.patch" "100-5.26.2-hppa.patch"\
# "Fix broken miniperl on hppa"\
# "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
if [[ ${CHOST} == *-solaris* ]] ; then
# do NOT mess with nsl, on Solaris this is always necessary,
# when -lsocket is used e.g. to get h_errno
rm_patch "*-nsl-and-cl*"
fi
apply_patchdir
tc-is-cross-compiler && src_prepare_perlcross
tc-is-static-only || src_prepare_dynamic
if use gdbm; then
sed -i "s:INC => .*:INC => \"-I${EROOT}/usr/include/gdbm\":g" \
ext/NDBM_File/Makefile.PL || die
fi
# Use errno.h from prefix rather than from host system, bug #645804
if use prefix && [[ -e "${EPREFIX}"/usr/include/errno.h ]] ; then
sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.PL || die
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# set a soname, fix linking against just built libperl
sed -i -e 's/netbsd\*/netbsd*|solaris*/' Makefile.SH || die
fi
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name (soname) not to reference $D
sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
# fix environ linkage absence (only a real issue on Darwin9)
if [[ ${CHOST##*-darwin} -le 9 ]] ; then
sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \
Makefile.SH || die
fi
fi
default
}
myconf() {
# the myconf array is declared in src_configure
myconf=( "${myconf[@]}" "$@" )
}
# Outputs a list of versions which have been seen in any of the
# primary perl @INC prefix paths, such as:
# /usr/lib64/perl5/<NUMBER>
# /usr/local/lib64/perl5/<NUMBER>
# /usr/lib64/perl5/vendor_perl/<NUMBER>
#
# All values of NUMBER must be like "5.x.y" or like "5.x"
#
find_candidate_inc_versions() {
local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
local dirs=(
"${EROOT}${PRIV_BASE}"
"${EROOT}${SITE_BASE}"
"${EROOT}${VENDOR_BASE}"
)
for dir in "${dirs[@]}"; do
if [[ ! -e "${dir}" ]]; then
continue
fi
# Without access to readdir() on these dirs, find will not be able
# to reveal any @INC directories inside them, and will subsequently prune
# them from the built perl's @INC support, breaking our compatiblity options
# entirely.
if [[ ! -r "${dir}" || ! -x "${dir}" ]]; then
eerror "Bad permissions on ${dir}, this will probably break things"
eerror "Ensure ${dir} is +rx for at least uid=$EUID"
eerror "Recommended permission is +rx for all"
eerror "> chmod o+rx ${dir}"
fi
done
einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
}
# Sort versions passed versiony-ly, remove self-version if present
# dedup. Takes each version as an argument
sanitize_inc_versions() {
local vexclude="${SUBSLOT}"
einfo "Normalizing/Sorting candidate list: $*"
einfo " to remove '${vexclude}'"
# Note, general numeric sort has to be used
# for the last component, or unique will convert
# 5.30.0 + 5.30 into just 5.30
printf "%s\n" "$@" |\
grep -vxF "${vexclude}" |\
sort -u -nr -t'.' -k1,1rn -k2,2rn -k3,3rg
}
versions_to_inclist() {
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
for v; do
has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
echo -n "${v}/ ";
done
}
versions_to_gentoolibdirs() {
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
local root
local v
for v; do
for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
local fullpath="${EROOT}${root}/${v}"
if [[ -e "${fullpath}" ]]; then
has "${v}" ${oldv} && printf "%s:" "${fullpath}/${myarch}${mythreading}";
printf "%s:" "${fullpath}"
fi
done
done
}
src_configure() {
declare -a myconf
export LC_ALL="C"
[[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
# Perl has problems compiling with -Os in your flags with glibc
replace-flags "-Os" "-O2"
# xlocale.h is going away in glibc-2.26, so it's counterproductive
# if we use it and include it in CORE/perl.h ... Perl builds just
# fine with glibc and locale.h only.
# However, the darwin prefix people have no locale.h ...
use elibc_glibc && myconf -Ui_xlocale
# This flag makes compiling crash in interesting ways
filter-flags "-malign-double"
# Generic LTO broken since 5.28, triggers EUMM failures
filter-flags "-flto"
use sparc && myconf -Ud_longdbl
export BUILD_BZIP2=0
export BZIP2_INCLUDE=${EROOT}/usr/include
export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
export BUILD_ZLIB=False
export ZLIB_INCLUDE=${EROOT}/usr/include
export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
# allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
myndbm='U'
mygdbm='U'
mydb='U'
if use gdbm ; then
mygdbm='D'
if use berkdb ; then
myndbm='D'
fi
fi
if use berkdb ; then
mydb='D'
has_version '=sys-libs/db-1*' && myndbm='D'
fi
myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
myconf -Ui_db -Ui_ndbm
fi
use ithreads && myconf -Dusethreads
use quadmath && myconf -Dusequadmath
if use debug ; then
append-cflags "-g"
myconf -DDEBUGGING
elif [[ ${CFLAGS} == *-g* ]] ; then
myconf -DDEBUGGING=-g
else
myconf -DDEBUGGING=none
fi
# modifying 'optimize' prevents cross configure script from appending required flags
if tc-is-cross-compiler; then
append-cflags "-fwrapv -fno-strict-aliasing"
fi
# Autodiscover all old version directories, some of them will even be newer
# if you downgrade
if [[ -z ${PERL_OLDVERSEN} ]]; then
PERL_OLDVERSEN="$( find_candidate_inc_versions )"
fi
# Fixup versions, removing self match, fixing order and dupes
PERL_OLDVERSEN="$( sanitize_inc_versions ${PERL_OLDVERSEN} )"
# Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
if [[ -n "${PERL_OLDVERSEN// }" ]]; then
local inclist="$( versions_to_inclist ${PERL_OLDVERSEN} )"
einfo "This version of perl may partially support modules previously"
einfo "installed in any of the following paths:"
for incpath in ${inclist}; do
[[ -e "${EROOT}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT}${VENDOR_BASE}/${incpath}"
[[ -e "${EROOT}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROOT}${PRIV_BASE}/${incpath}"
[[ -e "${EROOT}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT}${SITE_BASE}/${incpath}"
done
einfo "This is a temporary measure and you should aim to cleanup these paths"
einfo "via world updates and perl-cleaner"
# myconf -Dinc_version_list="${inclist}"
myconf -Dgentoolibdirs="$( versions_to_gentoolibdirs ${PERL_OLDVERSEN} )"
fi
[[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
# Make sure we can do the final link #523730, need to set deployment
# target to override hardcoded 10.3 which breaks on modern OSX
[[ ${CHOST} == *-darwin* ]] && \
myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
# Older macOS with non-Apple GCC chokes on inline in system headers
# using c89 mode as injected by cflags.SH, in addition, we override
# cflags, so we loose PERL_DARWIN which enables compat code that
# apparently on more recent macOS releases is no longer necessary
[[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
append-cflags -Dinline=__inline__ -DPERL_DARWIN
# flock on 32-bit sparc Solaris is broken, fall back to fcntl
[[ ${CHOST} == sparc-*-solaris* ]] && \
myconf -Ud_flock
# Prefix: the host system needs not to follow Gentoo multilib stuff, and in
# Prefix itself we don't do multilib either, so make sure perl can find
# something compatible.
if use prefix ; then
# Set a hook to check for each detected library whether it actually works.
export libscheck="
( echo 'main(){}' > '${T}'/conftest.c &&
$(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
) || xxx=/dev/null"
# Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
elif [[ $(get_libdir) != "lib" ]] ; then
# We need to use " and not ', as the written config.sh use ' ...
myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
fi
# don't try building ODBM, bug #354453
disabled_extensions="ODBM_File"
if ! use gdbm ; then
# workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
fi
myconf -Dnoextensions="${disabled_extensions}"
[[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
[[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
# allow fiddling via EXTRA_ECONF, bug 558070
eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
# setting -Dld= to tc-getLD breaks perl and all perl things
# https://github.com/Perl/perl5/issues/17791#issuecomment-630145202
myconf \
-Duseshrplib \
-Darchname="${myarch}" \
-Dcc="$(tc-getCC)" \
-Dar="$(tc-getAR)" \
-Dnm="$(tc-getNM)" \
-Dcpp="$(tc-getCPP)" \
-Dranlib="$(tc-getRANLIB)" \
-Accflags="${CFLAGS}" \
-Doptimize="${CFLAGS}" \
-Dldflags="${LDFLAGS}" \
-Dprefix="${EPREFIX}"'/usr' \
-Dsiteprefix="${EPREFIX}"'/usr/local' \
-Dvendorprefix="${EPREFIX}"'/usr' \
-Dscriptdir="${EPREFIX}"'/usr/bin' \
-Dprivlib="${EPREFIX}${PRIV_LIB}" \
-Darchlib="${EPREFIX}${ARCH_LIB}" \
-Dsitelib="${EPREFIX}${SITE_LIB}" \
-Dsitearch="${EPREFIX}${SITE_ARCH}" \
-Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
-Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
-Dman1dir="${EPREFIX}"/usr/share/man/man1 \
-Dman3dir="${EPREFIX}"/usr/share/man/man3 \
-Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
-Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
-Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
-Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
-Dman1ext='1' \
-Dman3ext='3pm' \
-Dlibperl="${LIBPERL}" \
-Dlocincpth="${EPREFIX}"'/usr/include ' \
-Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
-Duselargefiles \
-Dd_semctl_semun \
-Dcf_by='Gentoo' \
-Dmyhostname='localhost' \
-Dperladmin='root@localhost' \
-Ud_csh \
-Dsh="${EPREFIX}"/bin/sh \
-Dtargetsh="${EPREFIX}"/bin/sh \
-Uusenm \
"${EXTRA_ECONF[@]}"
if tc-is-cross-compiler; then
./configure \
--target="${CHOST}" \
--build="${CBUILD}" \
-Dinstallprefix='' \
-Dinstallusrbinperl='undef' \
-Dusevendorprefix='define' \
"${myconf[@]}" \
|| die "Unable to configure"
else
sh Configure \
-des \
-Dinstallprefix="${EPREFIX}"'/usr' \
-Dinstallusrbinperl='n' \
"${myconf[@]}" \
|| die "Unable to configure"
fi
}
src_test() {
export NO_GENTOO_NETWORK_TESTS=1;
export GENTOO_ASSUME_SANDBOXED="${GENTOO_ASSUME_SANDBOXED:-1}"
export GENTOO_NO_PORTING_TESTS="${GENTOO_NO_PORTING_TESTS:-1}"
if [[ ${EUID} == 0 ]] ; then
ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
return 0
fi
TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
}
src_install() {
local i
local coredir="${ARCH_LIB}/CORE"
emake DESTDIR="${D}" install
rm -f "${ED}/usr/bin/perl${MY_PV}"
ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
if ! tc-is-static-only ; then
dolib.so "${ED}"${coredir}/${LIBPERL}
rm -f "${ED}"${coredir}/${LIBPERL}
ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
fi
rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
# This removes ${D} from Config.pm
for i in $(find "${D}" -iname "Config.pm" ) ; do
einfo "Removing ${D} from ${i}..."
sed -i -e "s:${D}::" "${i}" || die "Sed failed"
done
dodoc Changes* README AUTHORS
if use doc ; then
# HTML Documentation
# We expect errors, warnings, and such with the following.
dodir /usr/share/doc/${PF}/html
LD_LIBRARY_PATH=. ./perl installhtml \
--podroot='.' \
--podpath='lib:ext:pod:vms' \
--recurse \
--htmldir="${ED}/usr/share/doc/${PF}/html"
fi
[[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
dual_scripts
}
pkg_preinst() {
check_rebuild
}
pkg_postinst() {
dual_scripts
if [[ -z "${ROOT}" ]] ; then
local INC DIR file
INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
einfo "Removing old .ph files"
for DIR in ${INC} ; do
if [[ -d "${DIR}" ]] ; then
for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
rm -f "${file}"
einfo "<< ${file}"
done
fi
done
# Silently remove the now empty dirs
for DIR in ${INC} ; do
if [[ -d "${DIR}" ]] ; then
find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
fi
done
fi
}
pkg_postrm() {
dual_scripts
}

View File

@ -1 +1,2 @@
DIST libtool-2.4.6.tar.xz 973080 BLAKE2B 0865af9f8701ca9dc62eec8294a088d24f4a3ff541bc76acfe7b69f70637d7e8261a17d69f7d54a4177f974c429be68467883a1560edb539061966cbf7d4a356 SHA512 a6eef35f3cbccf2c9e2667f44a476ebc80ab888725eb768e91a3a6c33b8c931afc46eb23efaee76c8696d3e4eed74ab1c71157bcb924f38ee912c8a90a6521a4
DIST libtool-2.4.7.tar.xz 1016040 BLAKE2B 5e022586337637dd634bd40578ad944bec6e3b8de41f95d55777b90cc88cbc4badb3d76cbf0e638166ece1ea7de828e83590e1e6bac30c1e4b1c254a11a742f2 SHA512 47f4c6de40927254ff9ba452612c0702aea6f4edc7e797f0966c8c6bf0340d533598976cdba17f0bdc64545572e71cd319bbb587aa5f47cd2e7c1d96f873a3da

View File

@ -0,0 +1,37 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
# Please bump with sys-devel/libtool.
inherit multilib-minimal
MY_P="libtool-${PV}"
DESCRIPTION="A shared library tool for developers"
HOMEPAGE="https://www.gnu.org/software/libtool/"
SRC_URI="mirror://gnu/libtool/${MY_P}.tar.xz"
S="${WORKDIR}"/${MY_P}/libltdl
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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"
# libltdl doesn't have a testsuite.
BDEPEND="app-arch/xz-utils"
multilib_src_configure() {
ECONF_SOURCE="${S}" econf \
--enable-ltdl-install \
$(use_enable static-libs static)
}
multilib_src_install() {
emake DESTDIR="${D}" install
# While the libltdl.la file is not used directly, the m4 ltdl logic
# keys off of its existence when searching for ltdl support. # bug #293921
#use static-libs || find "${D}" -name libltdl.la -delete
}

View File

@ -1,2 +1,2 @@
DIST pkgconf-1.7.4.tar.xz 293888 BLAKE2B af814174b59e3ea7009230f639a6237226caafb22300946904dd10810c0b5cfcbfeea21767a3a1d2c2b5cb1fe4b7b1d995a52d820fcfce3adb383c66762b7576 SHA512 92c080684898b42824a1f1a7e3ce8a600896fc9c20fcf263f032b856fa4c7139607f87ba44d18ed358b8c5f4f04477708800d20a4e10f96e4268a55682f7f0c1
DIST pkgconf-1.8.0.tar.xz 296304 BLAKE2B 6585a855a313406f77d26fba3cc3cef798b27c4b7ece81738bdba12f36ee93fbcaf838e1065406c28adc20852e34e2de14bc5f4837982f9cc35360d9a3ac83a5 SHA512 58204006408ad5ce91222ed3c93c2e0b61c04fa83c0a8ad337b747b583744578dbebd4ad5ccbc577689637caa1c5dc246b7795ac46e39c6666b1aa78199b7c28
DIST pkgconf-1.9.3.tar.xz 308612 BLAKE2B 90d48171e24235906c41e97f7a2fa53825724c7500e90e502e5e2e4d668d3be863119e39b83a8e02adcef83a7def42e1c5e3641e77f6194bd81f653776bc95b4 SHA512 f65583f78571e4da161201d6387091562b38893adc31df421b0e6d560a060deb306a0b7ad8b28266253244c935d0a8169f35e04825a7857f21a09527d36f921e

View File

@ -5,10 +5,6 @@
<email>floppym@gentoo.org</email>
<name>Mike Gilbert</name>
</maintainer>
<maintainer type="person">
<email>polynomial-c@gentoo.org</email>
<name>Lars Wendler</name>
</maintainer>
<maintainer type="project">
<email>base-system@gentoo.org</email>
</maintainer>

View File

@ -1,4 +1,4 @@
# Copyright 2012-2021 Gentoo Authors
# Copyright 2012-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -7,14 +7,14 @@ inherit multilib multilib-minimal
if [[ ${PV} == "9999" ]] ; then
inherit autotools git-r3
EGIT_REPO_URI="https://git.sr.ht/~kaniini/pkgconf"
EGIT_REPO_URI="https://gitea.treehouse.systems/ariadne/pkgconf.git"
else
SRC_URI="http://distfiles.dereferenced.org/${PN}/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SRC_URI="https://distfiles.dereferenced.org/${PN}/${P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
DESCRIPTION="pkg-config compatible replacement with no dependencies other than ANSI C89"
HOMEPAGE="https://git.sr.ht/~kaniini/pkgconf"
HOMEPAGE="https://gitea.treehouse.systems/ariadne/pkgconf"
LICENSE="ISC"
SLOT="0/3"

View File

@ -1,26 +1,26 @@
# Copyright 2012-2021 Gentoo Authors
# Copyright 2012-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
inherit multilib multilib-minimal
if [[ ${PV} == "9999" ]] ; then
if [[ ${PV} == 9999 ]] ; then
inherit autotools git-r3
EGIT_REPO_URI="https://git.sr.ht/~kaniini/pkgconf"
EGIT_REPO_URI="https://gitea.treehouse.systems/ariadne/pkgconf.git"
else
SRC_URI="http://distfiles.dereferenced.org/${PN}/${P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~ppc-macos ~x64-macos"
SRC_URI="https://distfiles.dereferenced.org/${PN}/${P}.tar.xz"
# Per release notes, 1.9.x is a testing/development release.
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
DESCRIPTION="pkg-config compatible replacement with no dependencies other than ANSI C89"
HOMEPAGE="https://git.sr.ht/~kaniini/pkgconf"
HOMEPAGE="https://gitea.treehouse.systems/ariadne/pkgconf"
LICENSE="ISC"
SLOT="0/3"
SLOT="0/4"
IUSE="test"
# tests require 'kyua'
RESTRICT="!test? ( test )"
BDEPEND="
@ -29,31 +29,26 @@ BDEPEND="
dev-util/kyua
)
"
RDEPEND="
!dev-util/pkgconfig
"
MULTILIB_CHOST_TOOLS=(
/usr/bin/pkgconf$(get_exeext)
)
RDEPEND="!dev-util/pkgconfig"
src_prepare() {
default
[[ ${PV} == "9999" ]] && eautoreconf
MULTILIB_CHOST_TOOLS+=(
[[ ${PV} == 9999 ]] && eautoreconf
MULTILIB_CHOST_TOOLS=(
/usr/bin/pkgconf
/usr/bin/pkg-config$(get_exeext)
)
}
multilib_src_configure() {
local ECONF_SOURCE="${S}"
local args=(
--disable-static
local myeconfargs=(
--with-system-includedir="${EPREFIX}/usr/include"
--with-system-libdir="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)"
)
econf "${args[@]}"
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_test() {
@ -70,5 +65,6 @@ multilib_src_install() {
multilib_src_install_all() {
einstalldocs
find "${ED}" -type f -name '*.la' -delete || die
}

View File

@ -1,26 +1,26 @@
# Copyright 2012-2021 Gentoo Authors
# Copyright 2012-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
inherit multilib multilib-minimal
if [[ ${PV} == "9999" ]] ; then
if [[ ${PV} == 9999 ]] ; then
inherit autotools git-r3
EGIT_REPO_URI="https://github.com/pkgconf/pkgconf.git"
EGIT_REPO_URI="https://gitea.treehouse.systems/ariadne/pkgconf.git"
else
SRC_URI="http://distfiles.dereferenced.org/${PN}/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~ppc-macos ~x64-macos"
SRC_URI="https://distfiles.dereferenced.org/${PN}/${P}.tar.xz"
# Per release notes, 1.9.x is a testing/development release.
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
DESCRIPTION="pkg-config compatible replacement with no dependencies other than ANSI C89"
HOMEPAGE="https://git.sr.ht/~kaniini/pkgconf"
HOMEPAGE="https://gitea.treehouse.systems/ariadne/pkgconf"
LICENSE="ISC"
SLOT="0/3"
SLOT="0/4"
IUSE="test"
# tests require 'kyua'
RESTRICT="!test? ( test )"
BDEPEND="
@ -29,31 +29,26 @@ BDEPEND="
dev-util/kyua
)
"
RDEPEND="
!dev-util/pkgconfig
"
MULTILIB_CHOST_TOOLS=(
/usr/bin/pkgconf$(get_exeext)
)
RDEPEND="!dev-util/pkgconfig"
src_prepare() {
default
[[ ${PV} == "9999" ]] && eautoreconf
MULTILIB_CHOST_TOOLS+=(
[[ ${PV} == 9999 ]] && eautoreconf
MULTILIB_CHOST_TOOLS=(
/usr/bin/pkgconf
/usr/bin/pkg-config$(get_exeext)
)
}
multilib_src_configure() {
local ECONF_SOURCE="${S}"
local args=(
--disable-static
local myeconfargs=(
--with-system-includedir="${EPREFIX}/usr/include"
--with-system-libdir="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)"
)
econf "${args[@]}"
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_test() {
@ -70,5 +65,6 @@ multilib_src_install() {
multilib_src_install_all() {
einstalldocs
find "${ED}" -type f -name '*.la' -delete || die
}

View File

@ -51,12 +51,12 @@ EXPORT_FUNCTIONS pkg_postinst pkg_postrm
if [[ -z ${_ALTERNATIVES_ECLASS} ]]; then
_ALTERNATIVES_ECLASS=1
# @ECLASS-VARIABLE: SOURCE
# @ECLASS_VARIABLE: SOURCE
# @DEFAULT_UNSET
# @DESCRIPTION:
# The symlink to be created
# @ECLASS-VARIABLE: ALTERNATIVES
# @ECLASS_VARIABLE: ALTERNATIVES
# @DEFAULT_UNSET
# @DESCRIPTION:
# The list of alternatives

View File

@ -1,12 +1,10 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Flatcar: Support EAPI 0 and 4.
# @ECLASS: autotools.eclass
# @MAINTAINER:
# base-system@gentoo.org
# @SUPPORTED_EAPIS: 0 4 5 6 7 8
# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: Regenerates auto* build scripts
# @DESCRIPTION:
# This eclass is for safely handling autotooled software packages that need to
@ -15,21 +13,21 @@
# Note: We require GNU m4, as does autoconf. So feel free to use any features
# from the GNU version of m4 without worrying about other variants (i.e. BSD).
if [[ ${__AUTOTOOLS_AUTO_DEPEND+set} == "set" ]] ; then
if [[ ${_AUTOTOOLS_AUTO_DEPEND+set} == "set" ]] ; then
# See if we were included already, but someone changed the value
# of AUTOTOOLS_AUTO_DEPEND on us. We could reload the entire
# eclass at that point, but that adds overhead, and it's trivial
# to re-order inherit in eclasses/ebuilds instead. #409611
if [[ ${__AUTOTOOLS_AUTO_DEPEND} != ${AUTOTOOLS_AUTO_DEPEND} ]] ; then
die "AUTOTOOLS_AUTO_DEPEND changed value between inherits; please inherit ${ECLASS} first! ${__AUTOTOOLS_AUTO_DEPEND} -> ${AUTOTOOLS_AUTO_DEPEND}"
if [[ ${_AUTOTOOLS_AUTO_DEPEND} != ${AUTOTOOLS_AUTO_DEPEND} ]] ; then
die "AUTOTOOLS_AUTO_DEPEND changed value between inherits; please inherit ${ECLASS} first! ${_AUTOTOOLS_AUTO_DEPEND} -> ${AUTOTOOLS_AUTO_DEPEND}"
fi
fi
if [[ -z ${_AUTOTOOLS_ECLASS} ]] ; then
_AUTOTOOLS_ECLASS=1
case ${EAPI:-0} in
0|4|5|6)
case ${EAPI} in
6)
# Needed for eqawarn
inherit eutils
;;
@ -39,25 +37,25 @@ esac
inherit gnuconfig libtool
# @ECLASS-VARIABLE: WANT_AUTOCONF
# @ECLASS_VARIABLE: WANT_AUTOCONF
# @PRE_INHERIT
# @DESCRIPTION:
# The major version of autoconf your package needs
: ${WANT_AUTOCONF:=latest}
# @ECLASS-VARIABLE: WANT_AUTOMAKE
# @ECLASS_VARIABLE: WANT_AUTOMAKE
# @PRE_INHERIT
# @DESCRIPTION:
# The major version of automake your package needs
: ${WANT_AUTOMAKE:=latest}
# @ECLASS-VARIABLE: WANT_LIBTOOL
# @ECLASS_VARIABLE: WANT_LIBTOOL
# @PRE_INHERIT
# @DESCRIPTION:
# Do you want libtool? Valid values here are "latest" and "none".
: ${WANT_LIBTOOL:=latest}
# @ECLASS-VARIABLE: _LATEST_AUTOMAKE
# @ECLASS_VARIABLE: _LATEST_AUTOMAKE
# @INTERNAL
# @DESCRIPTION:
# CONSTANT!
@ -76,7 +74,7 @@ inherit gnuconfig libtool
# Do NOT change this variable in your ebuilds!
# If you want to force a newer minor version, you can specify the correct
# WANT value by using a colon: <PV>:<WANT_AUTOMAKE>
_LATEST_AUTOMAKE=( 1.16.2-r1:1.16 )
_LATEST_AUTOMAKE=( 1.16.5:1.16 )
_automake_atom="sys-devel/automake"
_autoconf_atom="sys-devel/autoconf"
@ -97,7 +95,7 @@ if [[ -n ${WANT_AUTOCONF} ]] ; then
none) _autoconf_atom="" ;; # some packages don't require autoconf at all
2.1) _autoconf_atom="~sys-devel/autoconf-2.13" ;;
# if you change the "latest" version here, change also autotools_env_setup
latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.69" ;;
latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.71" ;;
*) die "Invalid WANT_AUTOCONF value '${WANT_AUTOCONF}'" ;;
esac
export WANT_AUTOCONF
@ -113,7 +111,7 @@ if [[ -n ${WANT_LIBTOOL} ]] ; then
export WANT_LIBTOOL
fi
# @ECLASS-VARIABLE: AUTOTOOLS_DEPEND
# @ECLASS_VARIABLE: AUTOTOOLS_DEPEND
# @OUTPUT_VARIABLE
# @DESCRIPTION:
# Contains the combination of requested automake/autoconf/libtool
@ -123,7 +121,7 @@ AUTOTOOLS_DEPEND="${_automake_atom}
${_libtool_atom}"
RDEPEND=""
# @ECLASS-VARIABLE: AUTOTOOLS_AUTO_DEPEND
# @ECLASS_VARIABLE: AUTOTOOLS_AUTO_DEPEND
# @PRE_INHERIT
# @DESCRIPTION:
# Set to 'no' to disable automatically adding to DEPEND. This lets
@ -131,30 +129,30 @@ RDEPEND=""
# their own DEPEND string.
: ${AUTOTOOLS_AUTO_DEPEND:=yes}
if [[ ${AUTOTOOLS_AUTO_DEPEND} != "no" ]] ; then
case ${EAPI:-0} in
0|4|5|6) DEPEND=${AUTOTOOLS_DEPEND} ;;
case ${EAPI} in
6) DEPEND=${AUTOTOOLS_DEPEND} ;;
*) BDEPEND=${AUTOTOOLS_DEPEND} ;;
esac
fi
__AUTOTOOLS_AUTO_DEPEND=${AUTOTOOLS_AUTO_DEPEND} # See top of eclass
_AUTOTOOLS_AUTO_DEPEND=${AUTOTOOLS_AUTO_DEPEND} # See top of eclass
unset _automake_atom _autoconf_atom
# @ECLASS-VARIABLE: AM_OPTS
# @ECLASS_VARIABLE: AM_OPTS
# @DEFAULT_UNSET
# @DESCRIPTION:
# Additional options to pass to automake during
# eautoreconf call.
: ${AM_OPTS:=}
# @ECLASS-VARIABLE: AT_NOEAUTOHEADER
# @ECLASS_VARIABLE: AT_NOEAUTOHEADER
# @DEFAULT_UNSET
# @DESCRIPTION:
# Don't run eautoheader command if set to 'yes'; only used to work around
# packages that don't want their headers being modified.
: ${AT_NOEAUTOHEADER:=}
# @ECLASS-VARIABLE: AT_NOEAUTOMAKE
# @ECLASS_VARIABLE: AT_NOEAUTOMAKE
# @DEFAULT_UNSET
# @DESCRIPTION:
# Don't run eautomake command if set to 'yes'; only used to workaround
@ -162,7 +160,7 @@ unset _automake_atom _autoconf_atom
# not call AM_INIT_AUTOMAKE if it doesn't actually use automake.
: ${AT_NOEAUTOMAKE:=}
# @ECLASS-VARIABLE: AT_NOELIBTOOLIZE
# @ECLASS_VARIABLE: AT_NOELIBTOOLIZE
# @DEFAULT_UNSET
# @DESCRIPTION:
# Don't run elibtoolize command if set to 'yes',
@ -170,13 +168,13 @@ unset _automake_atom _autoconf_atom
# particular options
: ${AT_NOELIBTOOLIZE:=}
# @ECLASS-VARIABLE: AT_M4DIR
# @ECLASS_VARIABLE: AT_M4DIR
# @DEFAULT_UNSET
# @DESCRIPTION:
# Additional director(y|ies) aclocal should search
: ${AT_M4DIR:=}
# @ECLASS-VARIABLE: AT_SYS_M4DIR
# @ECLASS_VARIABLE: AT_SYS_M4DIR
# @DEFAULT_UNSET
# @INTERNAL
# @DESCRIPTION:
@ -285,7 +283,7 @@ _at_uses_pkg() {
for macro ; do
args+=( -e "^[[:space:]]*${macro}\>" )
done
egrep -q "${args[@]}" configure.??
grep -E -q "${args[@]}" configure.??
fi
}
_at_uses_autoheader() { _at_uses_pkg A{C,M}_CONFIG_HEADER{S,}; }
@ -334,8 +332,26 @@ eaclocal_amflags() {
# They also force installing the support files for safety.
# Respects AT_M4DIR for additional directories to search for macros.
eaclocal() {
# Feed in a list of paths:
# - ${BROOT}/usr/share/aclocal
# - ${ESYSROOT}/usr/share/aclocal
# See bug #677002
if [[ ${EAPI} != 6 ]] ; then
if [[ ! -f "${T}"/aclocal/dirlist ]] ; then
mkdir "${T}"/aclocal || die
cat <<- EOF > "${T}"/aclocal/dirlist || die
${BROOT}/usr/share/aclocal
${ESYSROOT}/usr/share/aclocal
EOF
fi
local system_acdir=" --system-acdir=${T}/aclocal"
else
local system_acdir=""
fi
[[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \
autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags)
autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags) ${system_acdir}
}
# @FUNCTION: _elibtoolize
@ -377,8 +393,8 @@ eautoconf() {
if [[ ${WANT_AUTOCONF} != "2.1" && -e configure.in ]] ; then
case ${EAPI:-0} in
0|1|2|3|4|5|6|7)
case ${EAPI} in
6|7)
eqawarn "This package has a configure.in file which has long been deprecated. Please"
eqawarn "update it to use configure.ac instead as newer versions of autotools will die"
eqawarn "when it finds this file. See https://bugs.gentoo.org/426262 for details."
@ -468,8 +484,8 @@ eautopoint() {
config_rpath_update() {
local dst src
case ${EAPI:-0} in
0|4|5|6)
case ${EAPI} in
6)
src="${EPREFIX}/usr/share/gettext/config.rpath"
;;
*)
@ -499,20 +515,30 @@ autotools_env_setup() {
for pv in ${_LATEST_AUTOMAKE[@]/#*:} ; do
# Break on first hit to respect _LATEST_AUTOMAKE order.
local hv_args=""
case ${EAPI:-0} in
0|4|5|6)
case ${EAPI} in
6)
hv_args="--host-root"
;;
7)
*)
hv_args="-b"
;;
esac
ROOT=/ has_version ${hv_args} "=sys-devel/automake-${pv}*" && export WANT_AUTOMAKE="${pv}" && break
has_version ${hv_args} "=sys-devel/automake-${pv}*" && export WANT_AUTOMAKE="${pv}" && break
done
[[ ${WANT_AUTOMAKE} == "latest" ]] && \
die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE[*]}"
# During bootstrap in prefix there might be no automake merged yet
# due to --nodeps, but still available somewhere in PATH.
# For example, ncurses needs local libtool on aix and hpux.
# So, make the check non-fatal where automake doesn't yet
# exist within BROOT. (We could possibly do better here
# and inspect PATH, but I'm not sure there's much point.)
if use prefix && [[ ! -x "${BROOT}"/usr/bin/automake ]] ; then
[[ ${WANT_AUTOMAKE} == "latest" ]] && ewarn "Ignoring missing automake during Prefix bootstrap! Tried ${_LATEST_AUTOMAKE[*]}"
else
[[ ${WANT_AUTOMAKE} == "latest" ]] && die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE[*]}"
fi
fi
[[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.5
[[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.71
}
# @FUNCTION: autotools_run_tool
@ -668,12 +694,6 @@ autotools_m4sysdir_include() {
# First try to use the paths the system integrator has set up.
local paths=( $(eval echo ${AT_SYS_M4DIR}) )
if [[ ${#paths[@]} -eq 0 && -n ${SYSROOT} ]] ; then
# If they didn't give us anything, then default to the SYSROOT.
# This helps when cross-compiling.
local path="${SYSROOT}/usr/share/aclocal"
[[ -d ${path} ]] && paths+=( "${path}" )
fi
_autotools_m4dir_include "${paths[@]}"
}

View File

@ -1,21 +1,18 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Flatcar: Support EAPI 0 and 4.
# @ECLASS: flag-o-matic.eclass
# @MAINTAINER:
# toolchain@gentoo.org
# @SUPPORTED_EAPIS: 0 4 5 6 7 8
# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: common functions to manipulate and query toolchain flags
# @DESCRIPTION:
# This eclass contains a suite of functions to help developers sanely
# and safely manage toolchain flags in their builds.
case ${EAPI:-0} in
1|2|3) die "flag-o-matic.eclass: EAPI ${EAPI} is too old." ;;
0|4|5|6|7|8) ;;
*) die "EAPI ${EAPI} is not supported by flag-o-matic.eclass." ;;
case ${EAPI} in
6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_FLAG_O_MATIC_ECLASS} ]]; then
@ -23,11 +20,11 @@ _FLAG_O_MATIC_ECLASS=1
inherit toolchain-funcs
[[ ${EAPI:-0} == [04567] ]] && inherit eutils
[[ ${EAPI} == [67] ]] && inherit eutils
# @FUNCTION: all-flag-vars
# @DESCRIPTION:
# Return all the flag variables that our high level funcs operate on.
# Return all the flag variables that our high level functions operate on.
all-flag-vars() {
echo {ADA,C,CPP,CXX,CCAS,F,FC,LD}FLAGS
}
@ -38,8 +35,8 @@ all-flag-vars() {
# {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags
# Note: shell globs and character lists are allowed
setup-allowed-flags() {
[[ ${EAPI:-0} == [04567] ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI:-0}."
[[ ${EAPI} == [67] ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_setup-allowed-flags "$@"
}
@ -50,21 +47,39 @@ setup-allowed-flags() {
# Note: shell globs and character lists are allowed
_setup-allowed-flags() {
ALLOWED_FLAGS=(
-pipe -O '-O[12sg]' -mcpu -march -mtune
'-fstack-protector*'
'-fsanitize*' '-fno-sanitize*'
'-fstack-check*' -fno-stack-check
-fbounds-check -fbounds-checking -fno-strict-overflow
-fno-PIE -fno-pie -nopie -no-pie -fno-unit-at-a-time
-pipe -O '-O[12sg]' '-mcpu=*' '-march=*' '-mtune=*'
# debugging symbols should generally be very safe to add
# Hardening flags
'-fstack-protector*'
'-fstack-check*' -fno-stack-check
-fstack-clash-protection
'-fcf-protection=*'
-fbounds-check -fbounds-checking
-fno-PIE -fno-pie -nopie -no-pie
# Spectre mitigations, bug #646076
'-mindirect-branch=*'
-mindirect-branch-register
'-mfunction-return=*'
-mretpoline
# Misc
-fno-unit-at-a-time -fno-strict-overflow
# Sanitizers
'-fsanitize*' '-fno-sanitize*'
# Debugging symbols should generally be very safe to add
-g '-g[0-9]'
-ggdb '-ggdb[0-9]'
-gdwarf '-gdwarf-*'
-gstabs -gstabs+
-gz
-glldb
# Cosmetic/output related, see e.g. bug #830534
-fno-diagnostics-color '-fmessage-length=*'
-fno-ident -fpermissive -frecord-gcc-switches
-frecord-command-line
'-fdiagnostics*' '-fplugin*'
'-W*' -w
@ -72,7 +87,7 @@ _setup-allowed-flags() {
'-[DUILR]*' '-Wl,*'
# Linker choice flag
'-fuse-ld'
'-fuse-ld=*'
)
# allow a bunch of flags that negate features / control ABI
@ -82,19 +97,22 @@ _setup-allowed-flags() {
-fno-omit-frame-pointer '-fno-builtin*'
)
ALLOWED_FLAGS+=(
-mregparm -mno-app-regs -mapp-regs -mno-mmx -mno-sse
'-mregparm=*' -mno-app-regs -mapp-regs -mno-mmx -mno-sse
-mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2
-mno-avx -mno-aes -mno-pclmul -mno-sse4a -mno-3dnow -mno-popcnt
-mno-abm -mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 -mplt
-msoft-float -mno-soft-float -mhard-float -mno-hard-float -mfpu
-mieee -mieee-with-inexact -mschedule -mfloat-gprs -mspe -mno-spe
-msoft-float -mno-soft-float -mhard-float -mno-hard-float '-mfpu=*'
-mieee -mieee-with-inexact '-mschedule=*' -mfloat-gprs -mspe -mno-spe
-mtls-direct-seg-refs -mno-tls-direct-seg-refs -mflat -mno-flat
-mno-faster-structs -mfaster-structs -m32 -m64 -mx32 -mabi
-mlittle-endian -mbig-endian -EL -EB -fPIC -mlive-g0 -mcmodel
-mstack-bias -mno-stack-bias -msecure-plt '-m*-toc' -mfloat-abi
-mno-faster-structs -mfaster-structs -m32 -m64 -mx32 '-mabi=*'
-mlittle-endian -mbig-endian -EL -EB -fPIC -mlive-g0 '-mcmodel=*'
-mstack-bias -mno-stack-bias -msecure-plt '-m*-toc' '-mfloat-abi=*'
-mfix-r4000 -mno-fix-r4000 -mfix-r4400 -mno-fix-r4400
-mfix-rm7000 -mno-fix-rm7000 -mfix-r10000 -mno-fix-r10000
-mr10k-cache-barrier -mthumb -marm
'-mr10k-cache-barrier=*' -mthumb -marm
# needed for arm64 (and in particular SCS)
-ffixed-x18
# gcc 4.5
-mno-fma4 -mno-movbe -mno-xop -mno-lwp
@ -191,6 +209,7 @@ filter-flags() {
# Remove flags that enable Large File Support.
filter-lfs-flags() {
[[ $# -ne 0 ]] && die "filter-lfs-flags takes no arguments"
# http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
# _LARGEFILE_SOURCE: enable support for new LFS funcs (ftello/etc...)
# _LARGEFILE64_SOURCE: enable support for 64bit variants (off64_t/fseeko64/etc...)
@ -199,6 +218,14 @@ filter-lfs-flags() {
filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_TIME_BITS=64
}
# @FUNCTION: filter-lto
# @DESCRIPTION:
# Remove flags that enable LTO and those that depend on it
filter-lto() {
[[ $# -ne 0 ]] && die "filter-lto takes no arguments"
filter-flags '-flto*' -fwhole-program-vtables '-fsanitize=cfi*'
}
# @FUNCTION: filter-ldflags
# @USAGE: <flags>
# @DESCRIPTION:
@ -228,7 +255,7 @@ append-cppflags() {
# @CODE
append-cflags() {
[[ $# -eq 0 ]] && return 0
# Do not do automatic flag testing ourselves. #417047
# Do not do automatic flag testing ourselves, bug #417047
export CFLAGS+=" $*"
return 0
}
@ -243,7 +270,7 @@ append-cflags() {
# @CODE
append-cxxflags() {
[[ $# -eq 0 ]] && return 0
# Do not do automatic flag testing ourselves. #417047
# Do not do automatic flag testing ourselves, bug #417047
export CXXFLAGS+=" $*"
return 0
}
@ -258,7 +285,7 @@ append-cxxflags() {
# @CODE
append-fflags() {
[[ $# -eq 0 ]] && return 0
# Do not do automatic flag testing ourselves. #417047
# Do not do automatic flag testing ourselves, bug #417047
export FFLAGS+=" $*"
export FCFLAGS+=" $*"
return 0
@ -269,7 +296,8 @@ append-fflags() {
# Add flags that enable Large File Support.
append-lfs-flags() {
[[ $# -ne 0 ]] && die "append-lfs-flags takes no arguments"
# see comments in filter-lfs-flags func for meaning of these
# See comments in filter-lfs-flags func for meaning of these
append-cppflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
}
@ -296,9 +324,9 @@ append-ldflags() {
append-flags() {
[[ $# -eq 0 ]] && return 0
case " $* " in
*' '-[DIU]*) eqawarn 'please use append-cppflags for preprocessor flags' ;;
*' '-[DIU]*) eqawarn 'Please use append-cppflags for preprocessor flags' ;;
*' '-L*|\
*' '-Wl,*) eqawarn 'please use append-ldflags for linker flags' ;;
*' '-Wl,*) eqawarn 'Please use append-ldflags for linker flags' ;;
esac
append-cflags "$@"
append-cxxflags "$@"
@ -454,9 +482,8 @@ strip-flags() {
local new=()
for x in ${!var} ; do
local flag=${x%%=*}
for y in "${ALLOWED_FLAGS[@]}" ; do
if [[ -z ${flag%%${y}} ]] ; then
if [[ ${x} == ${y} ]] ; then
new+=( "${x}" )
break
fi
@ -486,8 +513,8 @@ strip-flags() {
# Returns shell true if <flag> is supported by given <compiler>,
# else returns shell false.
test-flag-PROG() {
[[ ${EAPI:-0} == [04567] ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI:-0}."
[[ ${EAPI} == [67] ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_test-flag-PROG "$@"
}
@ -547,6 +574,15 @@ _test-flag-PROG() {
c+ld)
in_ext='c'
in_src='int main(void) { return 0; }'
if is-ldflagq -fuse-ld=* ; then
# Respect linker chosen by user so we don't
# end up giving false results by checking
# with default linker. bug #832377
fuse_ld_value=$(get-flag -fuse-ld=*)
cmdline_extra+=(${fuse_ld_value})
fi
cmdline_extra+=(-xc)
;;
esac
@ -556,7 +592,7 @@ _test-flag-PROG() {
printf "%s\n" "${in_src}" > "${test_in}" || die "Failed to create '${test_in}'"
# Currently we rely on warning-free output of a compiler
# before the flag to see if a flag prduces any warnings.
# before the flag to see if a flag produces any warnings.
# This has a few drawbacks:
# - if compiler already generates warnings we filter out
# every single flag: bug #712488
@ -582,7 +618,9 @@ _test-flag-PROG() {
# -Werror makes clang bail out on unused arguments as well;
# try to add -Qunused-arguments to work-around that
# other compilers don't support it but then, it's failure like
# any other
# any other.
#
# See also bug #712488 and bug #714742.
cmdline+=( -Qunused-arguments )
"${cmdline[@]}" &>/dev/null
fi
@ -625,8 +663,8 @@ test-flag-CCLD() { _test-flag-PROG CC c+ld "$@"; }
# Returns shell true if <flags> are supported by given <compiler>,
# else returns shell false.
test-flags-PROG() {
[[ ${EAPI:-0} == [04567] ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI:-0}."
[[ ${EAPI} == [67] ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_test-flags-PROG "$@"
}
@ -647,7 +685,7 @@ _test-flags-PROG() {
while (( $# )); do
case "$1" in
# '-B /foo': bug # 687198
# '-B /foo': bug #687198
--param|-B)
if test-flag-${comp} "$1" "$2"; then
flags+=( "$1" "$2" )
@ -833,7 +871,7 @@ raw-ldflags() {
x=${x#-Wl,}
set -- "$@" ${x//,/ }
;;
*) # Assume it's a compiler driver flag, so throw it away #441808
*) # Assume it's a compiler driver flag, so throw it away, bug #441808
;;
esac
done
@ -850,4 +888,150 @@ no-as-needed() {
esac
}
# @FUNCTION: _test-compile-PROG
# @USAGE: <language> <code>
# @INTERNAL
# @DESCRIPTION:
# Attempts to compile (and possibly link) the given program. The first
# <language> parameter corresponds to the standard -x compiler argument.
# If the program should additionally be attempted to be linked, the string
# "+ld" should be added to the <language> parameter.
_test-compile-PROG() {
local lang=$1
local code=$2
shift 2
[[ -z "${lang}" ]] && return 1
[[ -z "${code}" ]] && return 1
local compiler filename_in filename_out args=() libs=()
case "${lang}" in
c)
compiler="$(tc-getCC)"
filename_in="${T}/test.c"
filename_out="${T}/test.o"
args+=(${CFLAGS[@]} -xc -c)
;;
c++)
compiler="$(tc-getCXX)"
filename_in="${T}/test.cc"
filename_out="${T}/test.o"
args+=(${CXXFLAGS[@]} -xc++ -c)
;;
f77)
compiler="$(tc-getF77)"
filename_in="${T}/test.f"
filename_out="${T}/test.o"
args+=(${FFFLAGS[@]} -xf77 -c)
;;
f95)
compiler="$(tc-getFC)"
filename_in="${T}/test.f90"
filename_out="${T}/test.o"
args+=(${FCFLAGS[@]} -xf95 -c)
;;
c+ld)
compiler="$(tc-getCC)"
filename_in="${T}/test.c"
filename_out="${T}/test.exe"
args+=(${CFLAGS[@]} ${LDFLAGS[@]} -xc)
libs+=(${LIBS[@]})
;;
c+++ld)
compiler="$(tc-getCXX)"
filename_in="${T}/test.cc"
filename_out="${T}/test.exe"
args+=(${CXXFLAGS[@]} ${LDFLAGS[@]} -xc++)
libs+=(${LIBS[@]})
;;
f77+ld)
compiler="$(tc-getF77)"
filename_in="${T}/test.f"
filename_out="${T}/test.exe"
args+=(${FFLAGS[@]} ${LDFLAGS[@]} -xf77)
libs+=(${LIBS[@]})
;;
f95+ld)
compiler="$(tc-getFC)"
filename_in="${T}/test.f90"
filename_out="${T}/test.exe"
args+=(${FCFLAGS[@]} ${LDFLAGS[@]} -xf95)
libs+=(${LIBS[@]})
;;
*)
die "Unknown compiled language ${lang}"
;;
esac
printf "%s\n" "${code}" > "${filename_in}" || die "Failed to create '${test_in}'"
"${compiler}" ${args[@]} "${filename_in}" -o "${filename_out}" ${libs[@]} &>/dev/null
}
# @FUNCTION: append-atomic-flags
# @USAGE: [bytes]
# @DESCRIPTION:
# Attempts to detect if appending -latomic is required to use
# a specific-sized atomic intrinsic, and if so, appends it. If the bytesize
# is not specified, then check the four most common byte sizes (1, 2, 4, 8).
# >=16-byte atomics are not included in this default set and must be explicitly
# passed if required. This may require you to add a macro definition like
# -Duint128_t=__uint128_t to your CFLAGS.
append-atomic-flags() {
# this implementation is as described in bug #820101
local code
# first, ensure we can compile a trivial program
# this is because we can't distinguish if _test-compile-PROG
# fails because -latomic is actually needed or if we have a
# broken toolchain (like due to bad FLAGS)
read -r -d '' code <<- EOF
int main()
{
return 0;
}
EOF
# if toolchain is broken, just return silently. it's better to
# let other pieces of the build fail later down the line than to
# make people think that something to do with atomic support is the
# cause of their problems.
_test-compile-PROG "c+ld" "${code}" || return
local bytesizes
[[ "${#}" == "0" ]] && bytesizes=( "1" "2" "4" "8" ) || bytesizes="${@}"
for bytesize in ${bytesizes[@]}
do
# this sample program is informed by the great testing from the buildroot project:
# https://github.com/buildroot/buildroot/commit/6856e417da4f3aa77e2a814db2a89429af072f7d
read -r -d '' code <<- EOF
#include <stdint.h>
int main()
{
uint$((${bytesize} * 8))_t a = 0;
__atomic_add_fetch(&a, 3, __ATOMIC_RELAXED);
__atomic_compare_exchange_n(&a, &a, 2, 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
return 0;
}
EOF
# do nothing if test program links fine
_test-compile-PROG "c+ld" "${code}" && continue
# ensure that the toolchain supports -latomic
test-flags-CCLD "-latomic" &>/dev/null || die "-latomic is required but not supported by $(tc-getCC)"
append-libs "-latomic"
# verify that this did indeed fix the problem
_test-compile-PROG "c+ld" "${code}" || \
die "libatomic does not include an implementation of ${bytesize}-byte atomics for this toolchain"
# if any of the required bytesizes require -latomic, no need to continue
# checking the others
return
done
}
fi

View File

@ -1,19 +1,17 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Flatcar: Support EAPI 4.
# @ECLASS: git-r3.eclass
# @MAINTAINER:
# Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 4 5 6 7 8
# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: Eclass for fetching and unpacking git repositories.
# @DESCRIPTION:
# Third generation eclass for easing maintenance of live ebuilds using
# git as remote repository.
case ${EAPI:-0} in
4|5|6|7|8) ;;
5|6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@ -23,13 +21,13 @@ if [[ ! ${_GIT_R3} ]]; then
PROPERTIES+=" live"
if [[ ${EAPI} != [456] ]]; then
if [[ ${EAPI} != [56] ]]; then
BDEPEND=">=dev-vcs/git-1.8.2.1[curl]"
else
DEPEND=">=dev-vcs/git-1.8.2.1[curl]"
fi
# @ECLASS-VARIABLE: EGIT_CLONE_TYPE
# @ECLASS_VARIABLE: EGIT_CLONE_TYPE
# @USER_VARIABLE
# @DESCRIPTION:
# Type of clone that should be used against the remote repository.
@ -67,7 +65,7 @@ fi
# embedded systems with limited disk space.
: ${EGIT_CLONE_TYPE:=single}
# @ECLASS-VARIABLE: EGIT_MIN_CLONE_TYPE
# @ECLASS_VARIABLE: EGIT_MIN_CLONE_TYPE
# @DESCRIPTION:
# 'Minimum' clone type supported by the ebuild. Takes same values
# as EGIT_CLONE_TYPE. When user sets a type that's 'lower' (that is,
@ -84,7 +82,7 @@ fi
# fatal errors rather than 'non-pretty versions'.
: ${EGIT_MIN_CLONE_TYPE:=shallow}
# @ECLASS-VARIABLE: EGIT3_STORE_DIR
# @ECLASS_VARIABLE: EGIT3_STORE_DIR
# @USER_VARIABLE
# @DEFAULT_UNSET
# @DESCRIPTION:
@ -95,7 +93,7 @@ fi
#
# EGIT3_STORE_DIR=${DISTDIR}/git3-src
# @ECLASS-VARIABLE: EGIT_MIRROR_URI
# @ECLASS_VARIABLE: EGIT_MIRROR_URI
# @DEFAULT_UNSET
# @DESCRIPTION:
# 'Top' URI to a local git mirror. If specified, the eclass will try
@ -109,7 +107,7 @@ fi
# EGIT_MIRROR_URI="git://mirror.lan/"
# @CODE
# @ECLASS-VARIABLE: EGIT_REPO_URI
# @ECLASS_VARIABLE: EGIT_REPO_URI
# @REQUIRED
# @DESCRIPTION:
# URIs to the repository, e.g. https://foo. If multiple URIs are
@ -128,12 +126,12 @@ fi
# EGIT_REPO_URI="https://a/b.git https://c/d.git"
# @CODE
# @ECLASS-VARIABLE: EVCS_OFFLINE
# @ECLASS_VARIABLE: EVCS_OFFLINE
# @DEFAULT_UNSET
# @DESCRIPTION:
# If non-empty, this variable prevents any online operations.
# @ECLASS-VARIABLE: EVCS_UMASK
# @ECLASS_VARIABLE: EVCS_UMASK
# @DEFAULT_UNSET
# @DESCRIPTION:
# Set this variable to a custom umask. This is intended to be set by
@ -144,13 +142,13 @@ fi
# portage group write access already can screw the system over in more
# creative ways.
# @ECLASS-VARIABLE: EGIT_BRANCH
# @ECLASS_VARIABLE: EGIT_BRANCH
# @DEFAULT_UNSET
# @DESCRIPTION:
# The branch name to check out. If unset, the upstream default (HEAD)
# will be used.
# @ECLASS-VARIABLE: EGIT_COMMIT
# @ECLASS_VARIABLE: EGIT_COMMIT
# @DEFAULT_UNSET
# @DESCRIPTION:
# The tag name or commit identifier to check out. If unset, newest
@ -158,7 +156,7 @@ fi
# not on HEAD branch, EGIT_BRANCH needs to be set to a branch on which
# the commit is available.
# @ECLASS-VARIABLE: EGIT_COMMIT_DATE
# @ECLASS_VARIABLE: EGIT_COMMIT_DATE
# @DEFAULT_UNSET
# @DESCRIPTION:
# Attempt to check out the repository state for the specified timestamp.
@ -172,14 +170,14 @@ fi
# will be considered alike a single commit with date corresponding
# to the merge commit date.
# @ECLASS-VARIABLE: EGIT_CHECKOUT_DIR
# @ECLASS_VARIABLE: EGIT_CHECKOUT_DIR
# @DEFAULT_UNSET
# @DESCRIPTION:
# The directory to check the git sources out to.
#
# EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
# @ECLASS-VARIABLE: EGIT_SUBMODULES
# @ECLASS_VARIABLE: EGIT_SUBMODULES
# @DEFAULT_UNSET
# @DESCRIPTION:
# An array of inclusive and exclusive wildcards on submodule names,
@ -562,7 +560,7 @@ git-r3_fetch() {
local commit_date=${4:-${EGIT_COMMIT_DATE}}
# support new override API for EAPI 6+
if [[ ${EAPI} != [45] ]]; then
if [[ ${EAPI} != 5 ]]; then
# get the name and do some more processing:
# 1) kill .git suffix,
# 2) underscore (remaining) non-variable characters,

View File

@ -1,14 +1,12 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Flatcar: Support EAPI 0 and 4.
# @ECLASS: gnuconfig.eclass
# @MAINTAINER:
# Sam James <sam@gentoo.org>
# @AUTHOR:
# Will Woods <wwoods@gentoo.org>
# @SUPPORTED_EAPIS: 0 4 5 6 7 8
# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: Refresh bundled gnuconfig files (config.guess, config.sub)
# @DESCRIPTION:
# This eclass is used to automatically update files that typically come with
@ -19,7 +17,7 @@
#
case ${EAPI:-0} in
0|4|5|6|7|8) ;;
5|6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@ -28,7 +26,7 @@ if [[ -z ${_GNUCONFIG_ECLASS} ]] ; then
BDEPEND="sys-devel/gnuconfig"
[[ ${EAPI:-0} == [0456] ]] && DEPEND="${BDEPEND}"
[[ ${EAPI} == [56] ]] && DEPEND="${BDEPEND}"
# @FUNCTION: gnuconfig_update
# @USAGE: [file1 file2 ...]
@ -86,9 +84,9 @@ gnuconfig_do_update() {
if [[ -n ${targetlist} ]] ; then
for target in ${targetlist} ; do
[[ -L ${target} ]] && rm -f "${target}"
einfo " Updating ${target/$startdir\//}"
ebegin " Updating ${target/$startdir\//}"
cp -f "${configsubs_dir}/${file}" "${target}"
eend $?
eend $? || die
done
else
ewarn " No ${file} found in ${startdir}, skipping ..."
@ -107,8 +105,8 @@ gnuconfig_findnewest() {
local locations=()
local prefix
case ${EAPI:-0} in
0|4|5|6)
case ${EAPI} in
5|6)
prefix="${EPREFIX}"
;;
*)

View File

@ -23,7 +23,7 @@ _JAVA_PKG_OPT_2_ECLASS=1
inherit java-utils-2
# @ECLASS-VARIABLE: JAVA_PKG_OPT_USE
# @ECLASS_VARIABLE: JAVA_PKG_OPT_USE
# @DESCRIPTION:
# USE flag to control if optional Java stuff is build. Defaults to 'java'.
JAVA_PKG_OPT_USE=${JAVA_PKG_OPT_USE:-java}

View File

@ -43,22 +43,7 @@ has test ${JAVA_PKG_IUSE} && RESTRICT+=" !test? ( test )"
JAVA_PKG_E_DEPEND=">=dev-java/java-config-2.2.0-r3"
has source ${JAVA_PKG_IUSE} && JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} source? ( app-arch/zip )"
# @ECLASS-VARIABLE: JAVA_PKG_WANT_BOOTCLASSPATH
# @DEFAULT_UNSET
# @DESCRIPTION:
# The version of bootclasspath the package needs to work. Translates to a proper
# dependency. The bootclasspath can then be obtained by java-ant_rewrite-bootclasspath
if [[ -n "${JAVA_PKG_WANT_BOOTCLASSPATH}" ]]; then
if [[ "${JAVA_PKG_WANT_BOOTCLASSPATH}" == "1.5" ]]; then
JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} >=dev-java/gnu-classpath-0.98-r1:0.98"
else
eerror "Unknown value of JAVA_PKG_WANT_BOOTCLASSPATH"
# since die in global scope doesn't work, this will make repoman fail
JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} BAD_JAVA_PKG_WANT_BOOTCLASSPATH"
fi
fi
# @ECLASS-VARIABLE: JAVA_PKG_ALLOW_VM_CHANGE
# @ECLASS_VARIABLE: JAVA_PKG_ALLOW_VM_CHANGE
# @DESCRIPTION:
# Allow this eclass to change the active VM?
# If your system VM isn't sufficient for the package, the build will fail
@ -68,7 +53,7 @@ fi
# should not be used in the final ebuild.
JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
# @ECLASS-VARIABLE: JAVA_PKG_FORCE_VM
# @ECLASS_VARIABLE: JAVA_PKG_FORCE_VM
# @DEFAULT_UNSET
# @DESCRIPTION:
# Explicitly set a particular VM to use. If its not valid, it'll fall back to
@ -76,12 +61,12 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
#
# Should only be used for testing and debugging.
#
# Example: use sun-jdk-1.5 to emerge foo:
# Example: use openjdk-11 to emerge foo:
# @CODE
# JAVA_PKG_FORCE_VM=sun-jdk-1.5 emerge foo
# JAVA_PKG_FORCE_VM=openjdk-11 emerge foo
# @CODE
# @ECLASS-VARIABLE: JAVA_PKG_WANT_BUILD_VM
# @ECLASS_VARIABLE: JAVA_PKG_WANT_BUILD_VM
# @DEFAULT_UNSET
# @DESCRIPTION:
# A list of VM handles to choose a build VM from. If the list contains the
@ -93,7 +78,7 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
# covered by DEPEND.
# Requires JAVA_PKG_WANT_SOURCE and JAVA_PKG_WANT_TARGET to be set as well.
# @ECLASS-VARIABLE: JAVA_PKG_WANT_SOURCE
# @ECLASS_VARIABLE: JAVA_PKG_WANT_SOURCE
# @DEFAULT_UNSET
# @DESCRIPTION:
# Specify a non-standard Java source version for compilation (via javac -source
@ -103,12 +88,12 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
#
# Should generally only be used for testing and debugging.
#
# Use 1.4 source to emerge baz
# Use 1.8 source to emerge baz
# @CODE
# JAVA_PKG_WANT_SOURCE=1.4 emerge baz
# JAVA_PKG_WANT_SOURCE=1.8 emerge baz
# @CODE
# @ECLASS-VARIABLE: JAVA_PKG_WANT_TARGET
# @ECLASS_VARIABLE: JAVA_PKG_WANT_TARGET
# @DEFAULT_UNSET
# @DESCRIPTION:
# Same as JAVA_PKG_WANT_SOURCE (see above) but for javac -target parameter,
@ -118,12 +103,12 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
#
# Should generally only be used for testing and debugging.
#
# emerge bar to be compatible with 1.3
# emerge bar to be compatible with 1.8
# @CODE
# JAVA_PKG_WANT_TARGET=1.3 emerge bar
# JAVA_PKG_WANT_TARGET=1.8 emerge bar
# @CODE
# @ECLASS-VARIABLE: JAVA_TEST_EXTRA_ARGS
# @ECLASS_VARIABLE: JAVA_TEST_EXTRA_ARGS
# @DEFAULT_UNSET
# @DESCRIPTION:
# Array of extra arguments that should be passed to java command when running tests.
@ -139,7 +124,21 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
# )
# @CODE
# @ECLASS-VARIABLE: JAVA_PKG_DEBUG
# @ECLASS_VARIABLE: JAVA_TEST_RUNNER_EXTRA_ARGS
# @DEFAULT_UNSET
# @DESCRIPTION:
# Array of extra arguments that should be passed to the test runner when running tests.
# It is useful when you need to pass an extra argument to the test runner.
#
# It is used only when running tests.
#
# @CODE
# JAVA_TEST_RUNNER_EXTRA_ARGS=(
# -verbose 3
# )
# @CODE
# @ECLASS_VARIABLE: JAVA_PKG_DEBUG
# @DEFAULT_UNSET
# @DESCRIPTION:
# A variable to be set with "yes" or "y", or ANY string of length non equal to
@ -149,7 +148,7 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
# JAVA_PKG_DEBUG="yes"
# @CODE
# @ECLASS-VARIABLE: JAVA_RM_FILES
# @ECLASS_VARIABLE: JAVA_RM_FILES
# @DEFAULT_UNSET
# @DESCRIPTION:
# An array containing a list of files to remove. If defined, this array will be
@ -177,7 +176,7 @@ JAVA_PKG_COMPILER_DIR=${JAVA_PKG_COMPILER_DIR:="/usr/share/java-config-2/compile
# Can be overloaded, but it should be overloaded only for local testing.
JAVA_PKG_COMPILERS_CONF=${JAVA_PKG_COMPILERS_CONF:="/etc/java-config-2/build/compilers.conf"}
# @ECLASS-VARIABLE: JAVA_PKG_FORCE_COMPILER
# @ECLASS_VARIABLE: JAVA_PKG_FORCE_COMPILER
# @INTERNAL
# @DEFAULT_UNSET
# @DESCRIPTION:
@ -191,7 +190,7 @@ JAVA_PKG_COMPILERS_CONF=${JAVA_PKG_COMPILERS_CONF:="/etc/java-config-2/build/com
# JAVA_PKG_FORCE_COMPILER="jikes javac"
# @CODE
# @ECLASS-VARIABLE: JAVA_PKG_FORCE_ANT_TASKS
# @ECLASS_VARIABLE: JAVA_PKG_FORCE_ANT_TASKS
# @DEFAULT_UNSET
# @DESCRIPTION:
# An $IFS separated list of ant tasks. Can be set in environment before calling
@ -317,7 +316,6 @@ java-pkg_rm_files() {
[[ ! -f "${filename}" ]] && die "${filename} is not a regular file. Aborting."
einfo "Removing unneeded file ${filename}"
rm -f "${S}/${filename}" || die "cannot remove ${filename}"
eend $?
done
}
@ -1373,7 +1371,7 @@ java-pkg_register-environment-variable() {
# @DESCRIPTION:
# Returns classpath of a given bootclasspath-providing package version.
#
# @param $1 - the version of bootclasspath (e.g. 1.5), 'auto' for bootclasspath
# @param $1 - the version of bootclasspath (e.g. 1.8), 'auto' for bootclasspath
# of the current JDK
java-pkg_get-bootclasspath() {
local version="${1}"
@ -1383,9 +1381,6 @@ java-pkg_get-bootclasspath() {
auto)
bcp="$(java-config -g BOOTCLASSPATH)"
;;
1.5)
bcp="$(java-pkg_getjars --build-only gnu-classpath-0.98)"
;;
*)
eerror "unknown parameter of java-pkg_get-bootclasspath"
die "unknown parameter of java-pkg_get-bootclasspath"
@ -1807,8 +1802,18 @@ ejunit_() {
if [[ "${junit}" == "junit-4" ]] ; then
runner=org.junit.runner.JUnitCore
fi
debug-print "Calling: java -cp \"${cp}\" -Djava.io.tmpdir=\"${T}\" -Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]} ${runner} ${@}"
java -cp "${cp}" -Djava.io.tmpdir="${T}/" -Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]} ${runner} "${@}" || die "Running junit failed"
local args=(
-cp ${cp}
-Djava.io.tmpdir="${T}"
-Djava.awt.headless=true
${JAVA_TEST_EXTRA_ARGS[@]}
${runner}
${JAVA_TEST_RUNNER_EXTRA_ARGS[@]}
${@}
)
debug-print "Calling: java ${args[@]}"
java "${args[@]}" || die "Running junit failed"
}
# @FUNCTION: ejunit
@ -1886,12 +1891,26 @@ etestng() {
tests+="${test},"
done
debug-print "java -cp \"${cp}\" -Djava.io.tmpdir=\"${T}\""\
"-Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]} ${runner}"\
"-usedefaultlisteners false -testclass ${tests}"
java -cp "${cp}" -Djava.io.tmpdir=\"${T}\" -Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]}\
${runner} -usedefaultlisteners false -testclass ${tests}\
|| die "Running TestNG failed."
local args=(
-cp ${cp}
-Djava.io.tmpdir="${T}"
-Djava.awt.headless=true
${JAVA_TEST_EXTRA_ARGS[@]}
${runner}
${JAVA_TEST_RUNNER_EXTRA_ARGS[@]}
)
if [[ ! "${JAVA_TEST_RUNNER_EXTRA_ARGS[@]}" =~ "-usedefaultlisteners" ]]; then
args+=(
-verbose 3
-usedefaultlisteners true
)
fi
args+=( -testclass ${tests} )
debug-print "java ${args[@]}"
java ${args[@]} || die "Running TestNG failed."
}
# @FUNCTION: java-utils-2_src_prepare
@ -2099,8 +2118,9 @@ ejavac() {
einfo "${compiler_executable} ${javac_args} ${@}"
fi
ebegin "Compiling"
${compiler_executable} ${javac_args} "${@}" || die "ejavac failed"
local args=( ${compiler_executable} ${javac_args} "${@}" )
echo "${args[@]}" >&2
"${args[@]}" || die "ejavac failed"
}
# @FUNCTION: ejavadoc
@ -2125,8 +2145,9 @@ ejavadoc() {
einfo "javadoc ${javadoc_args} ${@}"
fi
ebegin "Generating JavaDoc"
javadoc ${javadoc_args} "${@}" || die "ejavadoc failed"
local args=( javadoc ${javadoc_args} "${@}" )
echo "${args[@]}" >&2
"${args[@]}" || die "ejavadoc failed"
}
# @FUNCTION: java-pkg_filter-compiler
@ -2545,20 +2566,9 @@ java-pkg_setup-vm() {
debug-print-function ${FUNCNAME} $*
local vendor="$(java-pkg_get-vm-vendor)"
if [[ "${vendor}" == "sun" ]] && java-pkg_is-vm-version-ge "1.5" ; then
addpredict "/dev/random"
elif [[ "${vendor}" == "ibm" ]]; then
addpredict "/proc/self/maps"
addpredict "/proc/cpuinfo"
addpredict "/proc/self/coredump_filter"
elif [[ "${vendor}" == "oracle" ]]; then
if [[ "${vendor}" == icedtea* ]] && java-pkg_is-vm-version-ge "1.8" ; then
addpredict "/dev/random"
addpredict "/proc/self/coredump_filter"
elif [[ "${vendor}" == icedtea* ]] && java-pkg_is-vm-version-ge "1.7" ; then
addpredict "/dev/random"
addpredict "/proc/self/coredump_filter"
elif [[ "${vendor}" == "jrockit" ]]; then
addpredict "/proc/cpuinfo"
fi
}

View File

@ -1,12 +1,10 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Flatcar: Support EAPI 0 and 4.
# @ECLASS: libtool.eclass
# @MAINTAINER:
# base-system@gentoo.org
# @SUPPORTED_EAPIS: 0 4 5 6 7 8
# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: quickly update bundled libtool code
# @DESCRIPTION:
# This eclass patches ltmain.sh distributed with libtoolized packages with the
@ -20,7 +18,7 @@ if [[ -z ${_LIBTOOL_ECLASS} ]]; then
_LIBTOOL_ECLASS=1
case ${EAPI:-0} in
0|4|5|6) DEPEND=">=app-portage/elt-patches-20170815" ;;
5|6) DEPEND=">=app-portage/elt-patches-20170815" ;;
7|8) BDEPEND=">=app-portage/elt-patches-20170815" ;;
*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
esac

View File

@ -1,14 +1,12 @@
# Copyright 2013-2021 Gentoo Authors
# Copyright 2013-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Flatcar: Support EAPI 4.
# @ECLASS: multilib-build.eclass
# @MAINTAINER:
# Michał Górny <mgorny@gentoo.org>
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 4 5 6 7 8
# @SUPPORTED_EAPIS: 6 7 8
# @PROVIDES: multibuild
# @BLURB: flags and utility functions for building multilib packages
# @DESCRIPTION:
@ -21,17 +19,16 @@
# to properly request multilib enabled.
case ${EAPI} in
4|5|6|7|8) ;;
6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_MULTILIB_BUILD} ]]; then
_MULTILIB_BUILD=1
if [[ -z ${_MULTILIB_BUILD_ECLASS} ]]; then
_MULTILIB_BUILD_ECLASS=1
[[ ${EAPI} == [45] ]] && inherit eutils
inherit multibuild multilib
# @ECLASS-VARIABLE: _MULTILIB_FLAGS
# @ECLASS_VARIABLE: _MULTILIB_FLAGS
# @INTERNAL
# @DESCRIPTION:
# The list of multilib flags and corresponding ABI values. If the same
@ -55,7 +52,7 @@ _MULTILIB_FLAGS=(
)
readonly _MULTILIB_FLAGS
# @ECLASS-VARIABLE: MULTILIB_COMPAT
# @ECLASS_VARIABLE: MULTILIB_COMPAT
# @DEFAULT_UNSET
# @DESCRIPTION:
# List of multilib ABIs supported by the ebuild. If unset, defaults to
@ -79,7 +76,7 @@ readonly _MULTILIB_FLAGS
# MULTILIB_COMPAT=( abi_x86_{32,64} )
# @CODE
# @ECLASS-VARIABLE: MULTILIB_USEDEP
# @ECLASS_VARIABLE: MULTILIB_USEDEP
# @OUTPUT_VARIABLE
# @DESCRIPTION:
# The USE-dependency to be used on dependencies (libraries) needing
@ -91,7 +88,7 @@ readonly _MULTILIB_FLAGS
# net-libs/libbar[ssl,${MULTILIB_USEDEP}]"
# @CODE
# @ECLASS-VARIABLE: MULTILIB_ABI_FLAG
# @ECLASS_VARIABLE: MULTILIB_ABI_FLAG
# @OUTPUT_VARIABLE
# @DESCRIPTION:
# The complete ABI name. Resembles the USE flag name.
@ -246,23 +243,6 @@ multilib_parallel_foreach_abi() {
multibuild_foreach_variant _multilib_multibuild_wrapper "${@}"
}
# @FUNCTION: multilib_for_best_abi
# @USAGE: <argv>...
# @DESCRIPTION:
# Runs the given command with setup for the 'best' (usually native) ABI.
multilib_for_best_abi() {
debug-print-function ${FUNCNAME} "${@}"
[[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead"
eqawarn "QA warning: multilib_for_best_abi() function is deprecated and should"
eqawarn "not be used. The multilib_is_native_abi() check may be used instead."
local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abi_pairs) )
multibuild_for_best_variant _multilib_multibuild_wrapper "${@}"
}
# @FUNCTION: multilib_check_headers
# @DESCRIPTION:
# Check whether the header files are consistent between ABIs.
@ -321,7 +301,7 @@ multilib_copy_sources() {
multibuild_copy_sources
}
# @ECLASS-VARIABLE: MULTILIB_WRAPPED_HEADERS
# @ECLASS_VARIABLE: MULTILIB_WRAPPED_HEADERS
# @DEFAULT_UNSET
# @DESCRIPTION:
# A list of headers to wrap for multilib support. The listed headers
@ -344,7 +324,7 @@ multilib_copy_sources() {
# )
# @CODE
# @ECLASS-VARIABLE: MULTILIB_CHOST_TOOLS
# @ECLASS_VARIABLE: MULTILIB_CHOST_TOOLS
# @DEFAULT_UNSET
# @DESCRIPTION:
# A list of tool executables to preserve for each multilib ABI.
@ -585,20 +565,6 @@ multilib_is_native_abi() {
[[ ${COMPLETE_MULTILIB} == yes || ${ABI} == ${DEFAULT_ABI} ]]
}
# @FUNCTION: multilib_build_binaries
# @DESCRIPTION:
# Deprecated synonym for multilib_is_native_abi
multilib_build_binaries() {
debug-print-function ${FUNCNAME} "${@}"
[[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead"
eqawarn "QA warning: multilib_build_binaries is deprecated. Please use the equivalent"
eqawarn "multilib_is_native_abi function instead."
multilib_is_native_abi "${@}"
}
# @FUNCTION: multilib_native_use_with
# @USAGE: <flag> [<opt-name> [<opt-value>]]
# @DESCRIPTION:
@ -666,7 +632,6 @@ multilib_native_with() {
# of <false1> (or 'no' if unspecified) and <false2>. Arguments
# are the same as for usex in the EAPI.
#
# Note: in EAPI 4 you need to inherit eutils to use this function.
multilib_native_usex() {
if multilib_is_native_abi; then
usex "${@}"

View File

@ -1,12 +1,10 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Flatcar: Support EAPI 4.
# @ECLASS: multilib-minimal.eclass
# @MAINTAINER:
# Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7 8
# @SUPPORTED_EAPIS: 6 7 8
# @PROVIDES: multilib-build
# @BLURB: wrapper for multilib builds providing convenient multilib_src_* functions
# @DESCRIPTION:
@ -25,18 +23,15 @@
#
# If you need generic install rules, use multilib_src_install_all function.
case ${EAPI} in
4|5|6|7|8) ;;
6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
[[ ${EAPI} == [45] ]] && inherit eutils
inherit multilib-build
EXPORT_FUNCTIONS src_configure src_compile src_test src_install
if [[ ! ${_MULTILIB_MINIMAL_ECLASS} ]]; then
_MULTILIB_MINIMAL_ECLASS=1
multilib-minimal_src_configure() {
debug-print-function ${FUNCNAME} "$@"
@ -125,3 +120,7 @@ multilib-minimal_src_install() {
einstalldocs
fi
}
fi
EXPORT_FUNCTIONS src_configure src_compile src_test src_install

View File

@ -4,14 +4,13 @@
# @ECLASS: multilib.eclass
# @MAINTAINER:
# toolchain@gentoo.org
# @SUPPORTED_EAPIS: 5 6 7 8
# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: This eclass is for all functions pertaining to handling multilib configurations.
# @DESCRIPTION:
# This eclass is for all functions pertaining to handling multilib configurations.
case ${EAPI:-0} in
# EAPI=0 is still used by crossdev, bug #797367
0|5|6|7|8) ;;
case ${EAPI} in
6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@ -40,32 +39,6 @@ has_multilib_profile() {
[ -n "${MULTILIB_ABIS}" -a "${MULTILIB_ABIS}" != "${MULTILIB_ABIS/ /}" ]
}
# @FUNCTION: get_libdir
# @RETURN: the libdir for the selected ABI
# @DESCRIPTION:
# This function simply returns the desired lib directory. With portage
# 2.0.51, we now have support for installing libraries to lib32/lib64
# to accomidate the needs of multilib systems. It's no longer a good idea
# to assume all libraries will end up in lib. Replace any (sane) instances
# where lib is named directly with $(get_libdir) if possible.
#
# Jeremy Huddleston <eradicator@gentoo.org> (23 Dec 2004):
# Added support for ${ABI} and ${DEFAULT_ABI}. If they're both not set,
# fall back on old behavior. Any profile that has these set should also
# depend on a newer version of portage (not yet released) which uses these
# over CONF_LIBDIR in econf, dolib, etc...
if [[ ${EAPI} == [05] ]] ; then
get_libdir() {
local CONF_LIBDIR
if [ -n "${CONF_LIBDIR_OVERRIDE}" ] ; then
# if there is an override, we want to use that... always.
echo ${CONF_LIBDIR_OVERRIDE}
else
get_abi_LIBDIR
fi
}
fi
# @FUNCTION: get_abi_var
# @USAGE: <VAR> [ABI]
# @RETURN: returns the value of ${<VAR>_<ABI>} which should be set in make.defaults
@ -422,9 +395,9 @@ multilib_env() {
# the default abi is set to the 1-level libdir default
local __libdir_riscvdefaultabi_variable="LIBDIR_${DEFAULT_ABI}"
local __libdir_riscvdefaultabi=${!__libdir_riscvdefaultabi_variable}
export ${__libdir_riscvdefaultabi_variable}=${__libdir_riscvdefaultabi:-lib64}
local _libdir_riscvdefaultabi_variable="LIBDIR_${DEFAULT_ABI}"
local _libdir_riscvdefaultabi=${!_libdir_riscvdefaultabi_variable}
export ${_libdir_riscvdefaultabi_variable}=${_libdir_riscvdefaultabi:-lib64}
# all other abi are set to the 2-level libdir default
@ -454,9 +427,9 @@ multilib_env() {
# the default abi is set to the 1-level libdir default
local __libdir_riscvdefaultabi_variable="LIBDIR_${DEFAULT_ABI}"
local __libdir_riscvdefaultabi=${!__libdir_riscvdefaultabi_variable}
export ${__libdir_riscvdefaultabi_variable}=${__libdir_riscvdefaultabi:-lib}
local _libdir_riscvdefaultabi_variable="LIBDIR_${DEFAULT_ABI}"
local _libdir_riscvdefaultabi=${!_libdir_riscvdefaultabi_variable}
export ${_libdir_riscvdefaultabi_variable}=${_libdir_riscvdefaultabi:-lib}
# all other abi are set to the 2-level libdir default

View File

@ -29,7 +29,7 @@ esac
if [[ -z ${_PAX_UTILS_ECLASS} ]]; then
_PAX_UTILS_ECLASS=1
# @ECLASS-VARIABLE: PAX_MARKINGS
# @ECLASS_VARIABLE: PAX_MARKINGS
# @DESCRIPTION:
# Control which markings are made:
# PT = PT_PAX markings, XT = XATTR_PAX markings

View File

@ -20,7 +20,7 @@ esac
if [[ -z ${_PREFIX_ECLASS} ]]; then
_PREFIX_ECLASS=1
# @ECLASS-VARIABLE: EPREFIX
# @ECLASS_VARIABLE: EPREFIX
# @DESCRIPTION:
# The offset prefix of a Gentoo Prefix installation. When Gentoo Prefix
# is not used, ${EPREFIX} should be "". Prefix Portage sets EPREFIX,

View File

@ -1,10 +1,10 @@
# Copyright 2002-2021 Gentoo Authors
# Copyright 2002-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
# Toolchain Ninjas <toolchain@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7 8
# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: functions to query common info about the toolchain
# @DESCRIPTION:
# The toolchain-funcs aims to provide a complete suite of functions
@ -13,9 +13,8 @@
# in such a way that you can rely on the function always returning
# something sane.
case ${EAPI:-0} in
# EAPI=0 is still used by crossdev, bug #797367
0|5|6|7|8) ;;
case ${EAPI} in
6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@ -453,6 +452,9 @@ econf_build() {
tc-ld-is-gold() {
local out
# Ensure ld output is in English.
local -x LC_ALL=C
# First check the linker directly.
out=$($(tc-getLD "$@") --version 2>&1)
if [[ ${out} == *"GNU gold"* ]] ; then
@ -483,6 +485,9 @@ tc-ld-is-gold() {
tc-ld-is-lld() {
local out
# Ensure ld output is in English.
local -x LC_ALL=C
# First check the linker directly.
out=$($(tc-getLD "$@") --version 2>&1)
if [[ ${out} == *"LLD"* ]] ; then
@ -569,11 +574,12 @@ tc-ld-force-bfd() {
fi
}
# @FUNCTION: tc-has-openmp
# @FUNCTION: _tc-has-openmp
# @INTERNAL
# @USAGE: [toolchain prefix]
# @DESCRIPTION:
# See if the toolchain supports OpenMP.
tc-has-openmp() {
_tc-has-openmp() {
local base="${T}/test-tc-openmp"
cat <<-EOF > "${base}.c"
#include <omp.h>
@ -593,6 +599,16 @@ tc-has-openmp() {
return ${ret}
}
# @FUNCTION: tc-has-openmp
# @USAGE: [toolchain prefix]
# @DEPRECATED: tc-check-openmp
# @DESCRIPTION:
# See if the toolchain supports OpenMP. This function is deprecated and will be
# removed on 2023-01-01.
tc-has-openmp() {
_tc-has-openmp "$@"
}
# @FUNCTION: tc-check-openmp
# @DESCRIPTION:
# Test for OpenMP support with the current compiler and error out with
@ -600,8 +616,21 @@ tc-has-openmp() {
# OpenMP support that has been requested by the ebuild. Using this function
# to test for OpenMP support should be preferred over tc-has-openmp and
# printing a custom message, as it presents a uniform interface to the user.
#
# You should test for any necessary OpenMP support in pkg_pretend in order to
# warn the user of required toolchain changes. You must still check for OpenMP
# support at build-time, e.g.
# @CODE
# pkg_pretend() {
# [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
# }
#
# pkg_setup() {
# [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
# }
# @CODE
tc-check-openmp() {
if ! tc-has-openmp; then
if ! _tc-has-openmp; then
eerror "Your current compiler does not support OpenMP!"
if tc-is-gcc; then

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,7 @@ if [[ ! ${_VERIFY_SIG_ECLASS} ]]; then
IUSE="verify-sig"
# @ECLASS-VARIABLE: VERIFY_SIG_METHOD
# @ECLASS_VARIABLE: VERIFY_SIG_METHOD
# @PRE_INHERIT
# @DESCRIPTION:
# Signature verification method to use. The allowed value are:
@ -76,7 +76,7 @@ case ${VERIFY_SIG_METHOD} in
;;
esac
# @ECLASS-VARIABLE: VERIFY_SIG_OPENPGP_KEY_PATH
# @ECLASS_VARIABLE: VERIFY_SIG_OPENPGP_KEY_PATH
# @DEFAULT_UNSET
# @DESCRIPTION:
# Path to key bundle used to perform the verification. This is required
@ -86,7 +86,7 @@ esac
# NB: this variable is also used for non-OpenPGP signatures. The name
# contains "OPENPGP" for historical reasons.
# @ECLASS-VARIABLE: VERIFY_SIG_OPENPGP_KEYSERVER
# @ECLASS_VARIABLE: VERIFY_SIG_OPENPGP_KEYSERVER
# @DEFAULT_UNSET
# @DESCRIPTION:
# Keyserver used to refresh keys. If not specified, the keyserver
@ -95,7 +95,7 @@ esac
#
# Supported for OpenPGP only.
# @ECLASS-VARIABLE: VERIFY_SIG_OPENPGP_KEY_REFRESH
# @ECLASS_VARIABLE: VERIFY_SIG_OPENPGP_KEY_REFRESH
# @USER_VARIABLE
# @DESCRIPTION:
# Attempt to refresh keys via WKD/keyserver. Set it to "yes"

View File

@ -1,2 +1,4 @@
DIST gentoo-functions-0.14.tar.gz 11330 BLAKE2B 72543941f2954e35d3671c1c482eda44ae00cf0c636a1d706c5b90c56dfbb985d20c156b6de650e5d33ff9fac0abaf9fc50b1172832c2bd5276f6adfe5baf3b8 SHA512 e1e0fee9f3e8b79478aaf2b9a54c8623c858e62f72f2885ea88f7006631cf513bdfaac7122f2a5fc97379bde57851793bf7d6c63a1c63a6923a7f13a73d803fc
DIST gentoo-functions-0.15.tar.gz 11236 BLAKE2B da3df4ee809c33a7aa275757380584abcc70dc5f54d32b2e9d3336a9453cfc935e932df065a65a7458b885a449774713fead5aea99ea5e7ee522e5493d35482b SHA512 b2a42e5b43c487d62e036eade88b5cc8e0f4eb249c783837a0293cdbba4ed8a1eea8742d531885bcc56eefa337853c41d257b6a9880fc0e7420b490bb6f98fd4
DIST gentoo-functions-0.16.tar.bz2 10769 BLAKE2B aa85c97bf07e86631f9d11fc93252099925fb798a12483bead1e270799f44d3107c28e370925c948484a3f490247caf4c17b0068a160af7f72bec0f941699c95 SHA512 aa1f1bfbdd1e7ea51b2cceaae36b15a457b726ecc4fbed5bb3e5475d88b8142642df97b729303085716b1e3c7c92da58fa3b6842af5a04152e9f4c563d3d4b12
DIST gentoo-functions-0.17.tar.bz2 10798 BLAKE2B 1b725945421ab36b1412f9addc22e9fe299c0e6460790ee2832b9f63d4c06b86bb0d054b01505640a5dc1e62f3cd257628717fec852116a4c8b2c9f9d2d149ee SHA512 6a3de93b5e4d761a53a622f41e6079606cc4ad8a964771d49dafdefbb632afdf722fd055d261e494aa0be956c4160c49a775ab40c927c5340b8e4da275ef51fb

View File

@ -1,4 +1,4 @@
# Copyright 2014-2021 Gentoo Authors
# Copyright 2014-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -13,12 +13,11 @@ fi
inherit toolchain-funcs flag-o-matic
DESCRIPTION="base functions required by all Gentoo systems"
DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
src_configure() {
tc-export CC

View File

@ -8,17 +8,16 @@ if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
else
SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.gz"
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 ~x86-winnt"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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 ~x86-winnt"
fi
inherit toolchain-funcs flag-o-matic
DESCRIPTION="base functions required by all Gentoo systems"
DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
src_configure() {
tc-export CC

View File

@ -0,0 +1,27 @@
# Copyright 2014-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
else
SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.bz2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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 ~x86-winnt"
fi
inherit toolchain-funcs flag-o-matic
DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
LICENSE="GPL-2"
SLOT="0"
src_configure() {
tc-export CC
append-lfs-flags
export ROOTPREFIX="${EPREFIX}"
export PREFIX="${EPREFIX}/usr"
}

View File

@ -0,0 +1,27 @@
# Copyright 2014-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
else
SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.bz2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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 ~x86-winnt"
fi
inherit toolchain-funcs flag-o-matic
DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
LICENSE="GPL-2"
SLOT="0"
src_configure() {
tc-export CC
append-lfs-flags
export ROOTPREFIX="${EPREFIX}"
export PREFIX="${EPREFIX}/usr"
}

View File

@ -1,24 +1,23 @@
# Copyright 2014-2021 Gentoo Authors
# Copyright 2014-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
else
SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.gz"
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 ~x86-winnt"
SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.bz2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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 ~x86-winnt"
fi
inherit toolchain-funcs flag-o-matic
DESCRIPTION="base functions required by all Gentoo systems"
DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
src_configure() {
tc-export CC

View File

@ -1,2 +1,2 @@
DIST help2man-1.48.3.tar.xz 211504 BLAKE2B 407cc87b1238242c202d37c0c4cd394e0efba95759b86a88026aef7c05d6a097d1946614547ebfab45f7fe0c1ddd057724234629246d32e94862c3d633b78c31 SHA512 e000e7380604c0986b14cb64b852d55eff48595884bddd389e876056dde6ce72b37aa16d92230e6f8f6e128003b819954bae4aa90933a58b51d3665d3c0ba356
DIST help2man-1.48.5.tar.xz 204672 BLAKE2B 6d96f5f65f8c637d524e5c373f2b89f114adf544c1d3508a9cb51115279b9bf6399c8ebb0a8d831de12ef8cdaca40b6e75412a221efc5d2dd1794e9c9643196f SHA512 800eb0daa9daef8e423d52ede55eee2960122ea0269865295afada4cf4fcc1c6791da8429c3a57c0fc1bf0a14c8a77953952325413a8faa5dd07b1bc5bc0edd1
DIST help2man-1.49.2.tar.xz 225428 BLAKE2B 62db47a5915432093991f060390a62ebf2d1e5e6e78f7142d0cd5f8a273a1fd74f55de4b3ead5c1071aaf4de084e62782981a1d888b8a8b76da9c07e0cda20ea SHA512 cb8f9f923263d7160a27a7924ae559aba93d7258167888eb9e0e3e97a2014297b8d739b2bb7869acbf586354d099bd91d85f8208b901bce5ba0c5ad4b6abd6d5

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -9,7 +9,7 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
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"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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="nls"
RDEPEND="dev-lang/perl

View File

@ -1,22 +1,23 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
DESCRIPTION="GNU utility to convert program --help output to a man page"
HOMEPAGE="https://www.gnu.org/software/help2man/"
HOMEPAGE="https://www.gnu.org/software/help2man/ https://salsa.debian.org/bod/help2man"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
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"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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="nls"
RDEPEND="dev-lang/perl
nls? ( dev-perl/Locale-gettext )"
DEPEND="${RDEPEND}"
DOCS=( debian/changelog NEWS README THANKS ) #385753
# bug #385753
DOCS=( debian/changelog NEWS README THANKS )
PATCHES=(
"${FILESDIR}"/${PN}-1.46.1-linguas.patch
@ -28,14 +29,16 @@ src_prepare() {
-e 's/-shared/-bundle/' \
Makefile.in || die
fi
default
}
src_configure() {
# Disable gettext requirement as the release includes the gmo files #555018
# Disable gettext requirement as the release includes the gmo files, bug #555018
local myeconfargs=(
ac_cv_path_MSGFMT=$(type -P false)
$(use_enable nls)
)
econf "${myeconfargs[@]}"
}

View File

@ -9,7 +9,7 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
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"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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"
# File collisions. #540246
RDEPEND="!=gnome-base/gnome-common-3.14.0-r0

View File

@ -6,4 +6,7 @@
<name>Gentoo Base System</name>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="github">autoconf-archive/autoconf-archive</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1 @@
DIST autotools-wrappers-at-20220130.tar.gz 3625 BLAKE2B c587d778a0c3331d14498308ae720dabdbcf27349ef0a3a2d5db56bb0ef597a5b1ab43388f1456e7888b40f043d68b0d89b420ac7404008f9a813ef78ae7e96f SHA512 700204b6024636dc808339aac15fb19bb645b654d4777ba8bf0febded5eb6af98659d04ed23819a8a638b6ee905e62292995bf2f838c30dedacb1a6bc0d04f1a

View File

@ -1,25 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="wrapper for autoconf to manage multiple autoconf versions"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
LICENSE="GPL-2"
SLOT="0"
[[ "${PV}" == *_pre* ]] || \
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"
S="${WORKDIR}"
src_install() {
exeinto /usr/$(get_libdir)/misc
newexe "${FILESDIR}"/ac-wrapper-${PV}.sh ac-wrapper.sh
dodir /usr/bin
local x=
for x in auto{conf,header,m4te,reconf,scan,update} ifnames ; do
dosym ../$(get_libdir)/misc/ac-wrapper.sh /usr/bin/${x}
done
}

View File

@ -0,0 +1,28 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
MY_P="autotools-wrappers-at-${PV}"
DESCRIPTION="wrapper for autoconf to manage multiple autoconf versions"
HOMEPAGE="https://gitweb.gentoo.org/proj/autotools-wrappers.git"
#SRC_URI="https://gitweb.gentoo.org/proj/autotools-wrappers.git/snapshot/${MY_P}.tar.gz"
SRC_URI="https://dev.gentoo.org/~vapier/dist/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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"
S="${WORKDIR}/${MY_P}"
src_install() {
exeinto /usr/$(get_libdir)/misc
newexe ac-wrapper.sh ac-wrapper.sh
dodir /usr/bin
local x=
for x in auto{conf,header,m4te,reconf,scan,update} ifnames ; do
dosym ../$(get_libdir)/misc/ac-wrapper.sh /usr/bin/${x}
done
}

View File

@ -1,203 +0,0 @@
#!/bin/sh
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Based on the ac-wrapper.pl script provided by MandrakeSoft
# Rewritten in bash by Gregorio Guidi
#
# Executes the correct autoconf version.
#
# - defaults to newest version available (hopefully autoconf-2.60)
# - runs autoconf 2.13 if:
# - envvar WANT_AUTOCONF is set to `2.1'
# -or-
# - `ac{local,include}.m4' or `configure.{in,ac}' have AC_PREREQ(2.1) (not higher)
# -or-
# - `configure' is already present and was generated by autoconf 2.13
warn() { printf "ac-wrapper: $*\n" 1>&2; }
err() { warn "$@"; exit 1; }
unset IFS
which() {
local p
IFS=: # we don't use IFS anywhere, so don't bother saving/restoring
for p in ${PATH} ; do
p="${p}/$1"
[ -e "${p}" ] && echo "${p}" && return 0
done
unset IFS
return 1
}
#
# Sanitize argv[0] since it isn't always a full path #385201
#
argv0=${0##*/}
case ${0} in
${argv0})
# find it in PATH
if ! full_argv0=$(which "${argv0}") ; then
err "could not locate ${argv0}; file a bug"
fi
;;
*)
# re-use full/relative paths
full_argv0=$0
;;
esac
if [ "${argv0}" = "ac-wrapper.sh" ] ; then
err "Don't call this script directly"
fi
if [ "${WANT_AUTOCONF}" = "2.1" ] && [ "${argv0}" = "autom4te" ] ; then
err "Autoconf 2.13 doesn't contain autom4te.\n" \
" Either unset WANT_AUTOCONF or don't execute anything\n" \
" that would use autom4te."
fi
if ! seq 0 0 2>/dev/null 1>&2 ; then #338518
seq() {
local f l i
case $# in
1) f=1 i=1 l=$1;;
2) f=$1 i=1 l=$2;;
3) f=$1 i=$2 l=$3;;
esac
while :; do
[ $l -lt $f -a $i -gt 0 ] && break
[ $f -lt $l -a $i -lt 0 ] && break
echo $f
: $(( f += i ))
done
return 0
}
fi
#
# Set up bindings between actual version and WANT_AUTOCONF;
# Start at last known unstable/stable versions to speed up lookup process.
#
if [ -z "${KNOWN_AUTOCONF}" ] ; then
KNOWN_AUTOCONF="2.71:2.5 2.70:2.5 2.69:2.5"
fi
vers="${KNOWN_AUTOCONF} 9999:2.5 $(printf '2.%s:2.5 ' `seq 99 -1 59`) 2.13:2.1"
binary=""
for v in ${vers} ; do
auto_ver=${v%:*}
if [ -z "${binary}" ] && [ -x "${full_argv0}-${auto_ver}" ] ; then
binary="${full_argv0}-${auto_ver}"
break
fi
done
if [ -z "${binary}" ] ; then
err "Unable to locate any usuable version of autoconf.\n" \
"\tI tried these versions: ${vers}\n" \
"\tWith a base name of '${full_argv0}'."
fi
#
# Check the WANT_AUTOCONF setting. We accept a whitespace delimited
# list of autoconf versions.
#
if [ -n "${WANT_AUTOCONF}" ] ; then
for v in ${vers} x ; do
if [ "${v}" = "x" ] ; then
warn "warning: invalid WANT_AUTOCONF '${WANT_AUTOCONF}'; ignoring."
unset WANT_AUTOCONF
break
fi
auto_ver=${v%:*}
want_ver=${v#*:}
for wx in ${WANT_AUTOCONF} ; do
if [ -x "${full_argv0}-${wx}" ] ; then
binary="${full_argv0}-${wx}"
v="x"
elif [ "${wx}" = "${want_ver}" ] && [ -x "${full_argv0}-${auto_ver}" ] ; then
binary="${full_argv0}-${auto_ver}"
v="x"
fi
done
[ "${v}" = "x" ] && break
done
fi
#
# autodetect helpers
#
acprereq_version() {
sed -n -r \
-e '/^\s*(#|dnl)/d' \
-e '/AC_PREREQ/s:.*AC_PREREQ\s*\(\[?\s*([0-9.]+)\s*\]?\):\1:p' \
"$@" |
LC_ALL=C sort -n -t . |
tail -1
}
generated_version() {
local re='^# Generated (by (GNU )?Autoconf|automatically using autoconf version) ([0-9.]+).*'
sed -n -r "/${re}/{s:${re}:\3:;p;q}" "$@"
}
#
# autodetect routine
#
if [ "${WANT_AUTOCONF}" = "2.1" ] && [ -f "configure.ac" ] ; then
err "Since configure.ac is present, aclocal always use\n" \
"\tautoconf 2.59+, which conflicts with your choice and\n" \
"\tcauses error. You have two options:\n" \
"\t1. Try execute command again after removing configure.ac\n" \
"\t2. Don't set WANT_AUTOCONF"
fi
if [ "${WANT_AUTOCONF:-2.1}" = "2.1" ] && [ -n "${WANT_AUTOMAKE}" ] ; then
# Automake-1.7 and better require autoconf-2.5x so if WANT_AUTOMAKE
# is set to an older version, let's do some sanity checks.
case "${WANT_AUTOMAKE}" in
1.[456])
acfiles=$(ls aclocal.m4 acinclude.m4 configure.in configure.ac 2>/dev/null)
[ -n "${acfiles}" ] && confversion=$(acprereq_version ${acfiles})
[ -z "${confversion}" ] && [ -r "configure" ] \
&& confversion=$(generated_version configure)
if [ "${confversion}" = "2.1" ] && [ ! -f "configure.ac" ] ; then
binary="${full_argv0}-2.13"
fi
esac
fi
if [ -n "${WANT_ACWRAPPER_DEBUG}" ] ; then
if [ -n "${WANT_AUTOCONF}" ] ; then
warn "DEBUG: WANT_AUTOCONF is set to ${WANT_AUTOCONF}"
fi
warn "DEBUG: will execute <${binary}>"
fi
#
# for further consistency
#
if [ -z "${WANT_AUTOCONF}" ] ; then
for v in ${vers} ; do
auto_ver=${v%:*}
want_ver=${v#*:}
if [ "${binary}" = "${full_argv0}-${auto_ver}" ] ; then
export WANT_AUTOCONF="${want_ver}"
break
fi
done
fi
#
# Now try to run the binary
#
if [ ! -x "${binary}" ] ; then
# this shouldn't happen
err "${binary} is missing or not executable.\n" \
"\tPlease try emerging the correct version of autoconf."
fi
exec "${binary}" "$@"
# The shell will error out if `exec` failed.

View File

@ -1,5 +1,4 @@
DIST autoconf-2.13.tar.gz 443844 BLAKE2B ade10f9d4a0b1a0e8b752eee817cfe100d77b074192b9892330402ddc5b62dda1a3485ce0c36e72191daa9fd49382b99851cb6aa3a13aca8cf2ae6e884638fb6 SHA512 602584f4c77b7a554aaa068eda5409b68eb0b3229e9c224bffb91c83c4314d25de15bd560a323626ff78f6df339c79e1ef8938c54b78ecadf4dc75c5241290ad
DIST autoconf-2.64.tar.xz 1113892 BLAKE2B 598873209a67725150cd4cf09c4b78b26b3d1782f259846da48dc8106a1d32ae2b24f3a864c3be0e9e8dc7d6b6ca8781b83ff33a691c88e68391d1ea861ccf23 SHA512 ee4b504447c14a59b849d0915e55a90522cfb071d1583af2bd3575e5a05d7bd290e55e0e9d0760c8f36043f926199fc2d962b559d27d2f95c70d0e147b4ad0a3
DIST autoconf-2.69-runstatedir_patches.tar.xz 257096 BLAKE2B ae765e0ca7fe8261117f6f6b75611c232fc3d4016c22c86346afa72f2b7e6c3b7ccc1f9dfe134b2443f8bde6d578b503d79cf88472f76ce75b6c2e843ef55b8e SHA512 55f93299fe5243151f6bb782986a7935270f06d5065929f4d365a37aba05703e3ce66ecf7981d30413db50ee6b4f77d81d10a71b539c8a366c5c5a156c5443da
DIST autoconf-2.69.tar.xz 1214744 BLAKE2B 71d33d72a06e9a05fbed0eda73bc9d8a3805c7c90bf082959862f93f3c5f01192114176e84d84ecb58fa99512eafbc0ab21ad1407be18c8c63bb3dc1117c482d SHA512 995d3e5a8eb1eb37e2b7fae53c6ec7a9b4df997286b7d643344818f94636756b1bf5ff5ea9155e755cb9461149a853dfbf2886fc6bd7132e5afa9c168e306e9b
DIST autoconf-2.71.tar.xz 1292296 BLAKE2B 7fd4b98b4cfff10720e8da6ee91045637991643b50fcb3e47a0ecfcc01600f7b7b36fd1c0a5f08b68a418f1bdbd8d5a98de1008157595dd37cc3a31facb61416 SHA512 73d32b4adcbe24e3bafa9f43f59ed3b6efbd3de0f194e5ec90375f35da1199c583f5d3e89139b7edbad35171403709270e339ffa56a2ecb9b3123e9285021ff0

View File

@ -1,7 +1,7 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
inherit toolchain-autoconf
@ -11,13 +11,13 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="${PV:0:3}"
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 ~x64-solaris ~x86-solaris"
IUSE="userland_BSD"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
DEPEND=">=sys-apps/texinfo-4.3
=sys-devel/m4-1.4*
BDEPEND="
sys-devel/m4
dev-lang/perl"
RDEPEND="${DEPEND}
RDEPEND="${BDEPEND}
sys-apps/texinfo
>=sys-devel/autoconf-wrapper-13"
PATCHES=(
@ -40,10 +40,8 @@ src_configure() {
# force to `awk` so that we don't encode another awk that
# happens to currently be installed, but might later be
# uninstalled (like mawk). same for m4.
local prepend=""
use userland_BSD && prepend="g"
ac_cv_path_M4="${prepend}m4" \
ac_cv_prog_AWK="${prepend}awk" \
ac_cv_path_M4="m4" \
ac_cv_prog_AWK="awk" \
LC_ALL=C \
econf \
--exec-prefix="${EPREFIX}"/usr \

View File

@ -1,26 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="${PV}"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE=""
DEPEND=">=sys-devel/m4-1.4.6
dev-lang/perl"
RDEPEND="${DEPEND}
!~sys-devel/${P}:2.5
>=sys-devel/autoconf-wrapper-13"
PATCHES=(
"${FILESDIR}"/${PN}-2.69-perl-5.26.patch
"${FILESDIR}"/${PN}-2.69-perl-5.26-2.patch
)

View File

@ -0,0 +1,62 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git"
inherit git-r3
else
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
ftp://alpha.gnu.org/pub/gnu/${PN}/${P}.tar.xz
https://dev.gentoo.org/~polynomial-c/dist/${P}-runstatedir_patches.tar.xz"
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"
fi
inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
LICENSE="GPL-3"
SLOT="${PV}"
IUSE="emacs"
BDEPEND="
>=sys-devel/m4-1.4.16
>=dev-lang/perl-5.6
"
RDEPEND="
${BDEPEND}
>=sys-devel/autoconf-wrapper-13
!~sys-devel/${P}:2.5
"
[[ ${PV} == 9999 ]] && BDEPEND+=" >=sys-apps/texinfo-4.3"
PDEPEND="emacs? ( app-emacs/autoconf-mode )"
PATCHES=(
"${FILESDIR}"/${PN}-2.69-perl-5.26.patch
"${FILESDIR}"/${P}-fix-libtool-test.patch
"${FILESDIR}"/${PN}-2.69-perl-5.26-2.patch
"${FILESDIR}"/${P}-make-tests-bash5-compatible.patch
"${WORKDIR}"/patches/${P}-texinfo.patch
)
src_prepare() {
# usr/bin/libtool is provided by binutils-apple, need gnu libtool
if [[ ${CHOST} == *-darwin* ]] ; then
PATCHES+=( "${FILESDIR}"/${PN}-2.61-darwin.patch )
fi
# Save timestamp to avoid later makeinfo call
touch -r doc/{,old_}autoconf.texi || die
toolchain-autoconf_src_prepare
# Restore timestamp to avoid makeinfo call
# We already have an up to date autoconf.info page at this point.
touch -r doc/{old_,}autoconf.texi || die
}

View File

@ -1,9 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} == "9999" ]] ; then
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git"
inherit git-r3
else
@ -11,12 +11,14 @@ else
MY_PV="${PV}"
MY_P="${PN}-${MY_PV}"
#PATCH_TARBALL_NAME="${PN}-2.70-patches-01"
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz -> ${P}.tar.xz
https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz -> ${P}.tar.xz"
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
#SRC_URI+=" https://dev.gentoo.org/~polynomial-c/${PATCH_TARBALL_NAME}.tar.xz"
[[ "${PV}" == *_beta* ]] || \
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"
S="${WORKDIR}/${MY_P}"
if ! [[ ${PV} == *_beta* ]] ; then
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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"
fi
S="${WORKDIR}"/${MY_P}
fi
inherit toolchain-autoconf
@ -28,13 +30,15 @@ LICENSE="GPL-3"
SLOT="${PV/_*}"
IUSE="emacs"
# for 2.71, our Perl time resolution patch changes our min Perl from 5.6
# (vanilla upstream for 2.71) to 5.8.
BDEPEND=">=sys-devel/m4-1.4.16
>=dev-lang/perl-5.6"
>=dev-lang/perl-5.8"
RDEPEND="${BDEPEND}
>=sys-devel/autoconf-wrapper-15
sys-devel/gnuconfig
!~sys-devel/${P}:2.5"
[[ ${PV} == "9999" ]] && BDEPEND+=" >=sys-apps/texinfo-4.3"
[[ ${PV} == 9999 ]] && BDEPEND+=" >=sys-apps/texinfo-4.3"
PDEPEND="emacs? ( app-emacs/autoconf-mode )"
PATCHES=( "${FILESDIR}/${P}-time.patch" )

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -22,7 +22,7 @@ SLOT="${PV}"
IUSE="emacs"
BDEPEND=">=sys-devel/m4-1.4.16
>=dev-lang/perl-5.6"
>=dev-lang/perl-5.10"
RDEPEND="${BDEPEND}
>=sys-devel/autoconf-wrapper-14
sys-devel/gnuconfig

View File

@ -0,0 +1,32 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="wrapper for automake to manage multiple automake versions"
HOMEPAGE="https://gitweb.gentoo.org/proj/autotools-wrappers.git"
S="${WORKDIR}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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"
src_unpack() {
cp "${FILESDIR}"/am-wrapper-${PV}.sh "${S}"/ || die
}
src_prepare() {
default
# usr/bin/aclocal: bad substitution -> /bin/sh != POSIX shell
if use prefix ; then
sed -i -e '1c\#!'"${EPREFIX}"'/bin/sh' am-wrapper-${PV}.sh || die
fi
}
src_install() {
newbin am-wrapper-${PV}.sh automake
dosym automake /usr/bin/aclocal
keepdir /usr/share/aclocal
}

View File

@ -1,36 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
DESCRIPTION="wrapper for automake to manage multiple automake versions"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
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=""
S=${WORKDIR}
src_unpack() {
cp "${FILESDIR}"/am-wrapper-${PV}.sh "${S}"/ || die
}
src_prepare() {
default
# usr/bin/aclocal: bad substitution -> /bin/sh != POSIX shell
if use prefix ; then
sed -i -e '1c\#!'"${EPREFIX}"'/bin/sh' \
"${S}"/am-wrapper-${PV}.sh || die
fi
}
src_install() {
newbin "${S}"/am-wrapper-${PV}.sh automake
dosym automake /usr/bin/aclocal
keepdir /usr/share/aclocal
}

View File

@ -1,6 +1,4 @@
DIST automake-1.11.6.tar.xz 1092908 BLAKE2B 17254d81d6920c32aa877b6c892025de8e4060b8bcbe50fff841ada513dd462ddde8fc6838b4976098a812f8fda047e7186cb62cea8175df615dde75a9959144 SHA512 6e4cdf69f07734954f770fd4a7211a8c9dc69fe25a7746bd3c1e01d3139c94cab2900399e87371548833e99687e0d2b59c5e746ab2fdfbc7d47f2c1d439137ba
DIST automake-1.13.4.tar.xz 1449608 BLAKE2B 03dee42d65362a6f36e81c83d516c85faba1aac59bdc0d941077fde9be7742da0f57b48d678169e7a0e8b652c3ef46c314cdd3efb0fc489c389852fed1c39a02 SHA512 c9b145c1b822a4d83f2899f4280a76ccae932301b273f4c9718dc7f53161aa03dc1be2c1fb1a61083c54186e1908ae2c8284250aa1d8f6dea484767aca1344d3
DIST automake-1.15.1.tar.xz 1509496 BLAKE2B e6ade31089f969140472004cd9854318470228c64e4f8e829d48c5379f62d2c5f8ef9509131c577653e81868d94544ecf6520f86b5d582ebb6ed65c832039f30 SHA512 02f661b2676f1d44334ce1c7188f9913a6874bf46ba487708ad8090ad57905f14aead80fefed815e21effacfbb925e23b944ea7dd32563dca39c1a4174eda688
DIST automake-1.16.3.tar.xz 1590708 BLAKE2B ab6001a1b09e171ec83bac07155a77ab0fc29f5185116616aa3080b27e8bbf759472cd0dfb75630b26f7ad8d0741e668662d00b370ef79cf5ef6c62e945c94da SHA512 7265aeb7f82a8a205761d76e6ade7b7e97831c283349fd80f86e511f4b0b3e17f429d1506fca84c76079f63781e5dbf5ca81455d6bf6cda27d2e5c3d23b0d1aa
DIST automake-1.16.4.tar.xz 1599336 BLAKE2B a74bb444e7074e7dd7cf920a94a86756a5e6dec24a9eeb669ee629a1d3ab667efef0005d488fe6d9d8b33a680ada54f098ca334b63da4a739b0fec7c630a65aa SHA512 5a8883657e73b75bfa1ee59ab04af6bf4d43f390ab62fb7a9e8e2ac66159dfe4947b2ac7bc1028afffe6a09d88f388339500e03f6cdfa1226985be45ec033246
DIST automake-1.16.5.tar.xz 1601740 BLAKE2B 87408abc57e1d4317a2b518fb3606d0f6d156522e7333016dd84747cd8922f27ef7fcc93220b11f794ce52bf8fd9a788d0166a4d1964d7c283905f269977ac7c SHA512 3084ae543aa3fb5a05104ffb2e66cfa9a53080f2343c44809707fd648516869511500dba50dae67ff10f92a1bf3b5a92b2a0fa01cda30adb69b9da03994d9d88

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -14,7 +14,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 s
IUSE=""
RESTRICT="test"
RDEPEND="dev-lang/perl
RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-10
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -14,7 +14,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 s
IUSE=""
RESTRICT="test"
RDEPEND="dev-lang/perl
RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-10
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -32,7 +32,7 @@ SLOT="${PV:0:4}"
IUSE=""
RESTRICT="test"
RDEPEND="dev-lang/perl
RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-10
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"

View File

@ -1,131 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8,9,10} )
inherit python-any-r1
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git"
inherit git-r3
else
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"
if [[ ${PV/_beta} == ${PV} ]]; then
MY_P="${P}"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
else
MY_PV="$(ver_cut 1).$(($(ver_cut 2)-1))b"
MY_P="${PN}-${MY_PV}"
# Alpha/beta releases are not distributed on the usual mirrors.
SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
fi
S="${WORKDIR}/${MY_P}"
fi
DESCRIPTION="Used to generate Makefile.in from Makefile.am"
HOMEPAGE="https://www.gnu.org/software/automake/"
LICENSE="GPL-2"
# Use Gentoo versioning for slotting.
SLOT="${PV:0:4}"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="dev-lang/perl
>=sys-devel/automake-wrapper-11
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
DEPEND="${RDEPEND}"
BDEPEND="
app-arch/gzip
sys-apps/help2man
test? ( ${PYTHON_DEPS} )
"
PATCHES=(
"${FILESDIR}"/automake-1.16.2-py3-compile.patch
"${FILESDIR}"/automake-1.16.2-fix-instmany-python.sh-test.patch
"${FILESDIR}"/automake-1.16.2-fix-py-compile-basedir.sh-test.patch
)
pkg_setup() {
# Avoid python-any-r1_pkg_setup
:
}
src_prepare() {
default
export WANT_AUTOCONF=2.5
# Don't try wrapping the autotools this thing runs as it tends
# to be a bit esoteric, and the script does `set -e` itself.
./bootstrap || die
sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
# Bug 628912
if ! has_version sys-apps/texinfo ; then
touch doc/{stamp-vti,version.texi,automake.info} || die
fi
}
src_configure() {
use test && python_setup
default
}
# slot the info pages. do this w/out munging the source so we don't have
# to depend on texinfo to regen things. #464146 (among others)
slot_info_pages() {
pushd "${ED}"/usr/share/info >/dev/null || die
rm -f dir
# Rewrite all the references to other pages.
# before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
# after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
local p pages=( *.info ) args=()
for p in "${pages[@]/%.info}" ; do
args+=(
-e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
-e "s:(${p}):(${p}-${SLOT}):g"
)
done
sed -i "${args[@]}" * || die
# Rewrite all the file references, and rename them in the process.
local f d
for f in * ; do
d=${f/.info/-${SLOT}.info}
mv "${f}" "${d}" || die
sed -i -e "s:${f}:${d}:g" * || die
done
popd >/dev/null || die
}
src_install() {
default
slot_info_pages
rm "${ED}"/usr/share/aclocal/README || die
rmdir "${ED}"/usr/share/aclocal || die
rm \
"${ED}"/usr/bin/{aclocal,automake} \
"${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die
# remove all config.guess and config.sub files replacing them
# w/a symlink to a specific gnuconfig version
local x
for x in guess sub ; do
dosym ../gnuconfig/config.${x} \
/usr/share/${PN}-${SLOT}/config.${x}
done
# Avoid QA message about pre-compressed file in docs
local tarfile="${ED}/usr/share/doc/${PF}/amhello-1.0.tar.gz"
if [[ -f "${tarfile}" ]] ; then
gunzip "${tarfile}" || die
fi
}

View File

@ -1,131 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8,9,10} )
inherit python-any-r1
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git"
inherit git-r3
else
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"
if [[ ${PV/_beta} == ${PV} ]]; then
MY_P="${P}"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
else
MY_PV="$(ver_cut 1).$(($(ver_cut 2)-1))b"
MY_P="${PN}-${MY_PV}"
# Alpha/beta releases are not distributed on the usual mirrors.
SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
fi
S="${WORKDIR}/${MY_P}"
fi
DESCRIPTION="Used to generate Makefile.in from Makefile.am"
HOMEPAGE="https://www.gnu.org/software/automake/"
LICENSE="GPL-2"
# Use Gentoo versioning for slotting.
SLOT="${PV:0:4}"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="dev-lang/perl
>=sys-devel/automake-wrapper-11
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
DEPEND="${RDEPEND}"
BDEPEND="
app-arch/gzip
sys-apps/help2man
test? ( ${PYTHON_DEPS} )
"
PATCHES=(
"${FILESDIR}"/automake-1.16.2-py3-compile.patch
"${FILESDIR}"/automake-1.16.2-fix-instmany-python.sh-test.patch
"${FILESDIR}"/automake-1.16.2-fix-py-compile-basedir.sh-test.patch
)
pkg_setup() {
# Avoid python-any-r1_pkg_setup
:
}
src_prepare() {
default
export WANT_AUTOCONF=2.5
# Don't try wrapping the autotools this thing runs as it tends
# to be a bit esoteric, and the script does `set -e` itself.
./bootstrap || die
sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
# Bug 628912
if ! has_version sys-apps/texinfo ; then
touch doc/{stamp-vti,version.texi,automake.info} || die
fi
}
src_configure() {
use test && python_setup
default
}
# slot the info pages. do this w/out munging the source so we don't have
# to depend on texinfo to regen things. #464146 (among others)
slot_info_pages() {
pushd "${ED}"/usr/share/info >/dev/null || die
rm -f dir
# Rewrite all the references to other pages.
# before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
# after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
local p pages=( *.info ) args=()
for p in "${pages[@]/%.info}" ; do
args+=(
-e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
-e "s:(${p}):(${p}-${SLOT}):g"
)
done
sed -i "${args[@]}" * || die
# Rewrite all the file references, and rename them in the process.
local f d
for f in * ; do
d=${f/.info/-${SLOT}.info}
mv "${f}" "${d}" || die
sed -i -e "s:${f}:${d}:g" * || die
done
popd >/dev/null || die
}
src_install() {
default
slot_info_pages
rm "${ED}"/usr/share/aclocal/README || die
rmdir "${ED}"/usr/share/aclocal || die
rm \
"${ED}"/usr/bin/{aclocal,automake} \
"${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die
# remove all config.guess and config.sub files replacing them
# w/a symlink to a specific gnuconfig version
local x
for x in guess sub ; do
dosym ../gnuconfig/config.${x} \
/usr/share/${PN}-${SLOT}/config.${x}
done
# Avoid QA message about pre-compressed file in docs
local tarfile="${ED}/usr/share/doc/${PF}/amhello-1.0.tar.gz"
if [[ -f "${tarfile}" ]] ; then
gunzip "${tarfile}" || die
fi
}

View File

@ -1,21 +1,21 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8,9,10} )
PYTHON_COMPAT=( python3_{8..11} )
inherit python-any-r1
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git"
inherit git-r3
else
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"
if [[ ${PV/_beta} == ${PV} ]]; then
MY_P="${P}"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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"
else
MY_PV="$(ver_cut 1).$(($(ver_cut 2)-1))b"
MY_P="${PN}-${MY_PV}"
@ -23,6 +23,7 @@ else
# Alpha/beta releases are not distributed on the usual mirrors.
SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
fi
S="${WORKDIR}/${MY_P}"
fi
@ -35,7 +36,7 @@ SLOT="${PV:0:4}"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="dev-lang/perl
RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-11
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
@ -59,14 +60,15 @@ pkg_setup() {
src_prepare() {
default
export WANT_AUTOCONF=2.5
# Don't try wrapping the autotools this thing runs as it tends
# Don't try wrapping the autotools - this thing runs as it tends
# to be a bit esoteric, and the script does `set -e` itself.
./bootstrap || die
sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
# Bug 628912
if ! has_version sys-apps/texinfo ; then
# bug #628912
if ! has_version -b sys-apps/texinfo ; then
touch doc/{stamp-vti,version.texi,automake.info} || die
fi
}
@ -76,8 +78,8 @@ src_configure() {
default
}
# slot the info pages. do this w/out munging the source so we don't have
# to depend on texinfo to regen things. #464146 (among others)
# Slot the info pages. Do this w/out munging the source so we don't have
# to depend on texinfo to regen things. bug #464146 (among others)
slot_info_pages() {
pushd "${ED}"/usr/share/info >/dev/null || die
rm -f dir

View File

@ -1,9 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8,9,10} )
PYTHON_COMPAT=( python3_{8..11} )
inherit python-any-r1
@ -23,6 +23,7 @@ else
# Alpha/beta releases are not distributed on the usual mirrors.
SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
fi
S="${WORKDIR}/${MY_P}"
fi
@ -35,7 +36,7 @@ SLOT="${PV:0:4}"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="dev-lang/perl
RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-11
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
@ -46,11 +47,6 @@ BDEPEND="
test? ( ${PYTHON_DEPS} )
"
PATCHES=(
"${FILESDIR}"/automake-1.16.2-py3-compile.patch
)
# All patches have been submitted upstream.
pkg_setup() {
# Avoid python-any-r1_pkg_setup
:
@ -58,14 +54,15 @@ pkg_setup() {
src_prepare() {
default
export WANT_AUTOCONF=2.5
# Don't try wrapping the autotools this thing runs as it tends
# Don't try wrapping the autotools - this thing runs as it tends
# to be a bit esoteric, and the script does `set -e` itself.
./bootstrap || die
sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
# Bug 628912
if ! has_version sys-apps/texinfo ; then
# bug #628912
if ! has_version -b sys-apps/texinfo ; then
touch doc/{stamp-vti,version.texi,automake.info} || die
fi
}
@ -75,8 +72,8 @@ src_configure() {
default
}
# slot the info pages. do this w/out munging the source so we don't have
# to depend on texinfo to regen things. #464146 (among others)
# Slot the info pages. Do this w/out munging the source so we don't have
# to depend on texinfo to regen things. bug #464146 (among others)
slot_info_pages() {
pushd "${ED}"/usr/share/info >/dev/null || die
rm -f dir

View File

@ -1,7 +1,7 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
EAPI=7
inherit flag-o-matic toolchain-funcs
@ -9,33 +9,29 @@ DESCRIPTION="Handy console-based calculator utility"
HOMEPAGE="https://www.gnu.org/software/bc/bc.html"
SRC_URI="mirror://gnu/bc/${P}.tar.gz"
LICENSE="GPL-2 LGPL-2.1"
LICENSE="GPL-3+"
SLOT="0"
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"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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="libedit readline static"
RDEPEND="
!readline? ( libedit? ( dev-libs/libedit:= ) )
readline? (
>=sys-libs/readline-4.1:0=
>=sys-libs/ncurses-5.2:=
)
"
DEPEND="
${RDEPEND}
sys-libs/readline:=
sys-libs/ncurses:=
)"
DEPEND="${RDEPEND}"
BDEPEND="
sys-devel/flex
virtual/yacc
"
virtual/yacc"
PATCHES=(
"${FILESDIR}/${PN}-1.07.1-no-ed-its-sed.patch"
)
PATCHES=( "${FILESDIR}"/${PN}-1.07.1-no-ed-its-sed.patch )
src_prepare() {
default
# Avoid bad build tool usage when cross-compiling. #627126
tc-is-cross-compiler && eapply "${FILESDIR}/${PN}-1.07.1-use-system-bc.patch"
# Avoid bad build tool usage when cross-compiling. Bug #627126
tc-is-cross-compiler && eapply "${FILESDIR}"/${PN}-1.07.1-use-system-bc.patch
}
src_configure() {
@ -52,8 +48,8 @@ src_configure() {
econf "${myconf[@]}"
# Do not regen docs -- configure produces a small fragment that includes
# the version info which causes all pages to regen (newer file). #554774
touch -r doc doc/*
# the version info which causes all pages to regen (newer file). Bug #554774
touch -r doc doc/* || die
}
src_compile() {

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
</pkgmetadata>

View File

@ -10,7 +10,7 @@ if [[ ${PV} == 9999 ]]; then
inherit git-r3
else
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
DESCRIPTION="Utility to change the binutils version being used"

View File

@ -8,5 +8,10 @@ DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7e
DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24
DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3
DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
DIST binutils-2.39-patches-3.tar.xz 57332 BLAKE2B 08bdcd35afb6310c5f61e8a93f60c624ff461a612d8b473b2cfc1d8eb94eedb311af0b39b5f8ac425f3676d8e1addd13a4b223983de2f6d579e50daec08d3881 SHA512 f8a1a908866637a39a3ad55d47304f3320ab663d299d8d231a873008a50bb2a09c89a2482394c017a2a73c2cfc48ed944e99b422fd5db19f829e45ff071bb659
DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3

View File

@ -1,9 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
@ -97,7 +97,7 @@ src_unpack() {
}
src_prepare() {
if [[ ! -z ${PATCH_VER} ]] ; then
if [[ -n ${PATCH_VER} ]] ; then
# Use upstream patch to enable development mode
rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die
@ -105,13 +105,6 @@ src_prepare() {
eapply "${WORKDIR}/patch"/*.patch
fi
# This check should probably go somewhere else, like pkg_pretend.
if [[ ${CTARGET} == *-uclibc* ]] ; then
if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
die "sorry, but this binutils doesn't yet support uClibc :("
fi
fi
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \

View File

@ -1,9 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
@ -93,18 +93,11 @@ src_unpack() {
}
src_prepare() {
if [[ ! -z ${PATCH_VER} ]] ; then
if [[ -n ${PATCH_VER} ]] ; then
einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
eapply "${WORKDIR}/patch"/*.patch
fi
# This check should probably go somewhere else, like pkg_pretend.
if [[ ${CTARGET} == *-uclibc* ]] ; then
if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
die "sorry, but this binutils doesn't yet support uClibc :("
fi
fi
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \

View File

@ -1,9 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
@ -90,18 +90,11 @@ src_unpack() {
}
src_prepare() {
if [[ ! -z ${PATCH_VER} ]] ; then
if [[ -n ${PATCH_VER} ]] ; then
einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
eapply "${WORKDIR}/patch"/*.patch
fi
# This check should probably go somewhere else, like pkg_pretend.
if [[ ${CTARGET} == *-uclibc* ]] ; then
if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
die "sorry, but this binutils doesn't yet support uClibc :("
fi
fi
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \

View File

@ -1,9 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
@ -104,7 +104,7 @@ src_prepare() {
patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
fi
if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if ! use vanilla; then
einfo "Applying binutils patchset ${patchsetname}"
eapply "${WORKDIR}/patch"
@ -112,13 +112,6 @@ src_prepare() {
fi
fi
# This check should probably go somewhere else, like pkg_pretend.
if [[ ${CTARGET} == *-uclibc* ]] ; then
if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
die "sorry, but this binutils doesn't yet support uClibc :("
fi
fi
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \

View File

@ -1,9 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
@ -99,7 +99,7 @@ src_prepare() {
patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
fi
if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if ! use vanilla; then
einfo "Applying binutils patchset ${patchsetname}"
eapply "${WORKDIR}/patch"
@ -107,13 +107,6 @@ src_prepare() {
fi
fi
# This check should probably go somewhere else, like pkg_pretend.
if [[ ${CTARGET} == *-uclibc* ]] ; then
if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
die "sorry, but this binutils doesn't yet support uClibc :("
fi
fi
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \

View File

@ -0,0 +1,460 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
# PATCH_VER - the patchset version
# Default: empty, no patching
# PATCH_BINUTILS_VER - the binutils version in the patchset name
# - Default: PV
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
PATCH_VER=2
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
inherit git-r3
SLOT=${PV}
else
PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
PATCH_DEV=${PATCH_DEV:-dilfridge}
SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
#
# The cross-compile logic
#
export CTARGET=${CTARGET:-${CHOST}}
if [[ ${CTARGET} == ${CHOST} ]] ; then
if [[ ${CATEGORY} == cross-* ]] ; then
export CTARGET=${CATEGORY#cross-}
fi
fi
is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
#
# The dependencies
#
RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
"
DEPEND="${RDEPEND}"
BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
sys-devel/bc
)
nls? ( sys-devel/gettext )
sys-devel/flex
virtual/yacc
"
RESTRICT="!test? ( test )"
MY_BUILDDIR=${WORKDIR}/build
src_unpack() {
if [[ ${PV} == 9999* ]] ; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
git-r3_src_unpack
mv patches-git/9999 patch || die
EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
S=${WORKDIR}/binutils
EGIT_CHECKOUT_DIR=${S}
git-r3_src_unpack
else
unpack ${P/-hppa64/}.tar.xz
cd "${WORKDIR}" || die
unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
# _p patch versions are Gentoo specific tarballs ...
local dir=${P%_p?}
dir=${dir/-hppa64/}
S=${WORKDIR}/${dir}
fi
cd "${WORKDIR}" || die
mkdir -p "${MY_BUILDDIR}" || die
}
src_prepare() {
local patchsetname
if [[ ${PV} == 9999* ]] ; then
patchsetname="from git master"
else
patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
fi
if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if ! use vanilla; then
einfo "Applying binutils patchset ${patchsetname}"
eapply "${WORKDIR}/patch"
einfo "Done."
fi
fi
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
# Fix locale issues if possible #122216
if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
einfo "Fixing misc issues in configure files"
for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
ebegin " Updating ${f/${S}\/}"
patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
|| eerror "Please file a bug about this"
eend $?
done
fi
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
fi
# Apply things from PATCHES and user dirs
default
# Run misc portage update scripts
gnuconfig_update
elibtoolize --portage --no-uclibc
}
toolchain-binutils_bugurl() {
printf "https://bugs.gentoo.org/"
}
toolchain-binutils_pkgversion() {
printf "Gentoo ${PV}"
[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
}
src_configure() {
# Setup some paths
LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
INCPATH=${LIBPATH}/include
DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
if is_cross ; then
TOOLPATH=/usr/${CHOST}/${CTARGET}
else
TOOLPATH=/usr/${CTARGET}
fi
BINPATH=${TOOLPATH}/binutils-bin/${PV}
# Make sure we filter $LINGUAS so that only ones that
# actually work make it through #42033
strip-linguas -u */po
# Keep things sane
strip-flags
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
einfo "$(printf '%10s' ${x}:) ${!x}"
done
echo
cd "${MY_BUILDDIR}"
local myconf=()
if use plugins ; then
myconf+=( --enable-plugins )
fi
# enable gold (installed as ld.gold) and ld's plugin architecture
if use gold ; then
myconf+=( --enable-gold )
if use default-gold; then
myconf+=( --enable-gold=default )
fi
fi
if use nls ; then
myconf+=( --without-included-gettext )
else
myconf+=( --disable-nls )
fi
myconf+=( --with-system-zlib )
# For bi-arch systems, enable a 64bit bfd. This matches
# the bi-arch logic in toolchain.eclass. #446946
# We used to do it for everyone, but it's slow on 32bit arches. #438522
case $(tc-arch) in
ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
esac
use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
is_cross && myconf+=(
--with-sysroot="${EPREFIX}"/usr/${CTARGET}
--enable-poison-system-directories
)
# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
# on everyone in alpha (for now), we'll just enable it when possible
has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
# mips can't do hash-style=gnu ...
if [[ $(tc-arch) != mips ]] ; then
myconf+=( --enable-default-hash-style=gnu )
fi
myconf+=(
--prefix="${EPREFIX}"/usr
--host=${CHOST}
--target=${CTARGET}
--datadir="${EPREFIX}"${DATAPATH}
--datarootdir="${EPREFIX}"${DATAPATH}
--infodir="${EPREFIX}"${DATAPATH}/info
--mandir="${EPREFIX}"${DATAPATH}/man
--bindir="${EPREFIX}"${BINPATH}
--libdir="${EPREFIX}"${LIBPATH}
--libexecdir="${EPREFIX}"${LIBPATH}
--includedir="${EPREFIX}"${INCPATH}
--enable-obsolete
--enable-shared
--enable-threads
# Newer versions (>=2.27) offer a configure flag now.
--enable-relro
# Newer versions (>=2.24) make this an explicit option. #497268
--enable-install-libiberty
# Available from 2.35 on
--enable-textrel-check=warning
# Works better than vapier's patch... #808787
--enable-new-dtags
--disable-werror
--with-bugurl="$(toolchain-binutils_bugurl)"
--with-pkgversion="$(toolchain-binutils_pkgversion)"
$(use_enable static-libs static)
${EXTRA_ECONF}
# Disable modules that are in a combined binutils/gdb tree. #490566
--disable-{gdb,libdecnumber,readline,sim}
# Strip out broken static link flags.
# https://gcc.gnu.org/PR56750
--without-stage1-ldflags
# Change SONAME to avoid conflict across
# {native,cross}/binutils, binutils-libs. #666100
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
# avoid automagic dependency on (currently prefix) systems
# systems with debuginfod library, bug #754753
--without-debuginfod
# Allow user to opt into CET for host libraries.
# Ideally we would like automagic-or-disabled here.
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
)
if ! is_cross ; then
myconf+=( $(use_enable pgo pgo-build lto) )
if use pgo ; then
export BUILD_CFLAGS="${CFLAGS}"
fi
fi
echo ./configure "${myconf[@]}"
"${S}"/configure "${myconf[@]}" || die
# Prevent makeinfo from running if doc is unset.
if ! use doc ; then
sed -i \
-e '/^MAKEINFO/s:=.*:= true:' \
Makefile || die
fi
}
src_compile() {
cd "${MY_BUILDDIR}"
# see Note [tooldir hack for ldscripts]
emake tooldir="${EPREFIX}${TOOLPATH}" all
# only build info pages if the user wants them
if use doc ; then
emake info
fi
# we nuke the manpages when we're left with junk
# (like when we bootstrap, no perl -> no manpages)
find . -name '*.1' -a -size 0 -delete
}
src_test() {
cd "${MY_BUILDDIR}"
# bug 637066
filter-flags -Wall -Wreturn-type
emake -k check
}
src_install() {
local x d
cd "${MY_BUILDDIR}"
# see Note [tooldir hack for ldscripts]
emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
rm -rf "${ED}"/${LIBPATH}/bin
use static-libs || find "${ED}" -name '*.la' -delete
# Newer versions of binutils get fancy with ${LIBPATH} #171905
cd "${ED}"/${LIBPATH}
for d in ../* ; do
[[ ${d} == ../${PV} ]] && continue
mv ${d}/* . || die
rmdir ${d} || die
done
# Now we collect everything intp the proper SLOT-ed dirs
# When something is built to cross-compile, it installs into
# /usr/$CHOST/ by default ... we have to 'fix' that :)
if is_cross ; then
cd "${ED}"/${BINPATH}
for x in * ; do
mv ${x} ${x/${CTARGET}-}
done
if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/usr/${CHOST}/{include,lib}
fi
fi
insinto ${INCPATH}
local libiberty_headers=(
# Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
demangle.h
dyn-string.h
fibheap.h
hashtab.h
libiberty.h
objalloc.h
splay-tree.h
)
doins "${libiberty_headers[@]/#/${S}/include/}"
if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/${LIBPATH}/lib
fi
# Generate an env.d entry for this binutils
insinto /etc/env.d/binutils
cat <<-EOF > "${T}"/env.d
TARGET="${CTARGET}"
VER="${PV}"
LIBPATH="${EPREFIX}${LIBPATH}"
EOF
newins "${T}"/env.d ${CTARGET}-${PV}
# Handle documentation
if ! is_cross ; then
cd "${S}"
dodoc README
docinto bfd
dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
docinto binutils
dodoc binutils/ChangeLog binutils/NEWS binutils/README
docinto gas
dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
docinto gprof
dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
docinto ld
dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
docinto libiberty
dodoc libiberty/ChangeLog* libiberty/README
docinto opcodes
dodoc opcodes/ChangeLog*
fi
# Remove shared info pages
rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
# Trim all empty dirs
find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
}
pkg_postinst() {
# Make sure this ${CTARGET} has a binutils version selected
[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
binutils-config ${CTARGET}-${PV}
}
pkg_postrm() {
local current_profile=$(binutils-config -c ${CTARGET})
# If no other versions exist, then uninstall for this
# target ... otherwise, switch to the newest version
# Note: only do this if this version is unmerged. We
# rerun binutils-config if this is a remerge, as
# we want the mtimes on the symlinks updated (if
# it is the same as the current selected profile)
if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
choice=${choice//$'\n'/ }
choice=${choice/* }
if [[ -z ${choice} ]] ; then
binutils-config -u ${CTARGET}
else
binutils-config ${choice}
fi
elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
binutils-config ${CTARGET}-${PV}
fi
}
# Note [slotting support]
# -----------------------
# Gentoo's layout for binutils files is non-standard as Gentoo
# supports slotted installation for binutils. Many tools
# still expect binutils to reside in known locations.
# binutils-config package restores symlinks into known locations,
# like:
# /usr/bin/${CTARGET}-<tool>
# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
# /usr/include/
#
# Note [tooldir hack for ldscripts]
# ---------------------------------
# Build system does not allow ./configure to tweak every location
# we need for slotting binutils hence all the shuffling in
# src_install(). This note is about SCRIPTDIR define handling.
#
# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
# Thus we can't just move files around after compilation finished.
#
# Our goal is the following:
# - at build-time set scriptdir to point to symlinked location:
# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
# - at install-time set scriptdir to point to slotted location:
# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

View File

@ -1,14 +1,14 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@ -19,7 +19,7 @@ REQUIRED_USE="default-gold? ( gold )"
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
PATCH_VER=0
PATCH_VER=3
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@ -32,7 +32,6 @@ else
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
# live ebuild
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
@ -82,13 +81,16 @@ src_unpack() {
EGIT_CHECKOUT_DIR=${S}
git-r3_src_unpack
else
unpack ${P}.tar.xz
unpack ${P/-hppa64/}.tar.xz
cd "${WORKDIR}" || die
unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
# _p patch versions are Gentoo specific tarballs ...
S=${WORKDIR}/${P%_p?}
local dir=${P%_p?}
dir=${dir/-hppa64/}
S=${WORKDIR}/${dir}
fi
cd "${WORKDIR}" || die
@ -103,7 +105,7 @@ src_prepare() {
patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
fi
if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if ! use vanilla; then
einfo "Applying binutils patchset ${patchsetname}"
eapply "${WORKDIR}/patch"
@ -111,13 +113,6 @@ src_prepare() {
fi
fi
# This check should probably go somewhere else, like pkg_pretend.
if [[ ${CTARGET} == *-uclibc* ]] ; then
if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
die "sorry, but this binutils doesn't yet support uClibc :("
fi
fi
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
@ -175,6 +170,8 @@ src_configure() {
# Keep things sane
strip-flags
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
@ -276,6 +273,15 @@ src_configure() {
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
)
if ! is_cross ; then
myconf+=( $(use_enable pgo pgo-build lto) )
if use pgo ; then
export BUILD_CFLAGS="${CFLAGS}"
fi
fi
echo ./configure "${myconf[@]}"
"${S}"/configure "${myconf[@]}" || die

View File

@ -0,0 +1,480 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit elisp-common libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
IUSE="cet default-gold doc emacs +gold multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
# PATCH_VER - the patchset version
# Default: empty, no patching
# PATCH_BINUTILS_VER - the binutils version in the patchset name
# - Default: PV
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
PATCH_VER=4
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
inherit git-r3
SLOT=${PV}
else
PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
PATCH_DEV=${PATCH_DEV:-dilfridge}
SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
#
# The cross-compile logic
#
export CTARGET=${CTARGET:-${CHOST}}
if [[ ${CTARGET} == ${CHOST} ]] ; then
if [[ ${CATEGORY} == cross-* ]] ; then
export CTARGET=${CATEGORY#cross-}
fi
fi
is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
#
# The dependencies
#
RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
emacs? ( >=app-editors/emacs-23.1:* )
"
DEPEND="${RDEPEND}"
BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
sys-devel/bc
)
nls? ( sys-devel/gettext )
sys-devel/flex
virtual/yacc
"
RESTRICT="!test? ( test )"
MY_BUILDDIR=${WORKDIR}/build
src_unpack() {
if [[ ${PV} == 9999* ]] ; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
git-r3_src_unpack
mv patches-git/9999 patch || die
EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
S=${WORKDIR}/binutils
EGIT_CHECKOUT_DIR=${S}
git-r3_src_unpack
else
unpack ${P/-hppa64/}.tar.xz
cd "${WORKDIR}" || die
unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
# _p patch versions are Gentoo specific tarballs ...
local dir=${P%_p?}
dir=${dir/-hppa64/}
S=${WORKDIR}/${dir}
fi
cd "${WORKDIR}" || die
mkdir -p "${MY_BUILDDIR}" || die
}
src_prepare() {
local patchsetname
if [[ ${PV} == 9999* ]] ; then
patchsetname="from git master"
else
patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
fi
if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if ! use vanilla; then
einfo "Applying binutils patchset ${patchsetname}"
eapply "${WORKDIR}/patch"
einfo "Done."
fi
fi
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
# Fix locale issues if possible #122216
if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
einfo "Fixing misc issues in configure files"
for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
ebegin " Updating ${f/${S}\/}"
patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
|| eerror "Please file a bug about this"
eend $?
done
fi
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
fi
# Apply things from PATCHES and user dirs
default
# Run misc portage update scripts
gnuconfig_update
elibtoolize --portage --no-uclibc
}
toolchain-binutils_bugurl() {
printf "https://bugs.gentoo.org/"
}
toolchain-binutils_pkgversion() {
printf "Gentoo ${PV}"
[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
}
src_configure() {
# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
# Avoid really confusing logs from subconfigure spam, makes logs far
# more legible.
MAKEOPTS="--output-sync=line ${MAKEOPTS}"
# Setup some paths
LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
INCPATH=${LIBPATH}/include
DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
if is_cross ; then
TOOLPATH=/usr/${CHOST}/${CTARGET}
else
TOOLPATH=/usr/${CTARGET}
fi
BINPATH=${TOOLPATH}/binutils-bin/${PV}
# Make sure we filter $LINGUAS so that only ones that
# actually work make it through #42033
strip-linguas -u */po
# Keep things sane
strip-flags
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
einfo "$(printf '%10s' ${x}:) ${!x}"
done
echo
cd "${MY_BUILDDIR}"
local myconf=()
if use plugins ; then
myconf+=( --enable-plugins )
fi
# enable gold (installed as ld.gold) and ld's plugin architecture
if use gold ; then
myconf+=( --enable-gold )
if use default-gold; then
myconf+=( --enable-gold=default )
fi
fi
if use nls ; then
myconf+=( --without-included-gettext )
else
myconf+=( --disable-nls )
fi
myconf+=( --with-system-zlib )
# For bi-arch systems, enable a 64bit bfd. This matches
# the bi-arch logic in toolchain.eclass. #446946
# We used to do it for everyone, but it's slow on 32bit arches. #438522
case $(tc-arch) in
ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
esac
use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
is_cross && myconf+=(
--with-sysroot="${EPREFIX}"/usr/${CTARGET}
--enable-poison-system-directories
)
# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
# on everyone in alpha (for now), we'll just enable it when possible
has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
# mips can't do hash-style=gnu ...
if [[ $(tc-arch) != mips ]] ; then
myconf+=( --enable-default-hash-style=gnu )
fi
myconf+=(
# (--disable-silent-rules should get passed automatically w/ econf which we use
# in >= 2.39, so can drop it then.)
--disable-silent-rules
--prefix="${EPREFIX}"/usr
--host=${CHOST}
--target=${CTARGET}
--datadir="${EPREFIX}"${DATAPATH}
--datarootdir="${EPREFIX}"${DATAPATH}
--infodir="${EPREFIX}"${DATAPATH}/info
--mandir="${EPREFIX}"${DATAPATH}/man
--bindir="${EPREFIX}"${BINPATH}
--libdir="${EPREFIX}"${LIBPATH}
--libexecdir="${EPREFIX}"${LIBPATH}
--includedir="${EPREFIX}"${INCPATH}
--enable-obsolete
--enable-shared
--enable-threads
# Newer versions (>=2.27) offer a configure flag now.
--enable-relro
# Newer versions (>=2.24) make this an explicit option. #497268
--enable-install-libiberty
# Available from 2.35 on
--enable-textrel-check=warning
# Works better than vapier's patch... #808787
--enable-new-dtags
--disable-werror
--with-bugurl="$(toolchain-binutils_bugurl)"
--with-pkgversion="$(toolchain-binutils_pkgversion)"
$(use_enable static-libs static)
${EXTRA_ECONF}
# Disable modules that are in a combined binutils/gdb tree. #490566
--disable-{gdb,libdecnumber,readline,sim}
# Strip out broken static link flags.
# https://gcc.gnu.org/PR56750
--without-stage1-ldflags
# Change SONAME to avoid conflict across
# {native,cross}/binutils, binutils-libs. #666100
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
# avoid automagic dependency on (currently prefix) systems
# systems with debuginfod library, bug #754753
--without-debuginfod
# Allow user to opt into CET for host libraries.
# Ideally we would like automagic-or-disabled here.
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
)
if ! is_cross ; then
myconf+=( $(use_enable pgo pgo-build lto) )
if use pgo ; then
export BUILD_CFLAGS="${CFLAGS}"
fi
fi
echo ./configure "${myconf[@]}"
"${S}"/configure "${myconf[@]}" || die
# Prevent makeinfo from running if doc is unset.
if ! use doc ; then
sed -i \
-e '/^MAKEINFO/s:=.*:= true:' \
Makefile || die
fi
}
src_compile() {
cd "${MY_BUILDDIR}"
# see Note [tooldir hack for ldscripts]
emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
# only build info pages if the user wants them
if use doc ; then
emake V=1 info
fi
! is_cross && use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
# we nuke the manpages when we're left with junk
# (like when we bootstrap, no perl -> no manpages)
find . -name '*.1' -a -size 0 -delete
}
src_test() {
cd "${MY_BUILDDIR}"
# bug 637066
filter-flags -Wall -Wreturn-type
emake -k V=1 check
}
src_install() {
local x d
cd "${MY_BUILDDIR}"
# see Note [tooldir hack for ldscripts]
emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
rm -rf "${ED}"/${LIBPATH}/bin
use static-libs || find "${ED}" -name '*.la' -delete
# Newer versions of binutils get fancy with ${LIBPATH} #171905
cd "${ED}"/${LIBPATH}
for d in ../* ; do
[[ ${d} == ../${PV} ]] && continue
mv ${d}/* . || die
rmdir ${d} || die
done
# Now we collect everything intp the proper SLOT-ed dirs
# When something is built to cross-compile, it installs into
# /usr/$CHOST/ by default ... we have to 'fix' that :)
if is_cross ; then
cd "${ED}"/${BINPATH}
for x in * ; do
mv ${x} ${x/${CTARGET}-}
done
if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/usr/${CHOST}/{include,lib}
fi
fi
insinto ${INCPATH}
local libiberty_headers=(
# Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
demangle.h
dyn-string.h
fibheap.h
hashtab.h
libiberty.h
objalloc.h
splay-tree.h
)
doins "${libiberty_headers[@]/#/${S}/include/}"
if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/${LIBPATH}/lib
fi
# Generate an env.d entry for this binutils
insinto /etc/env.d/binutils
cat <<-EOF > "${T}"/env.d
TARGET="${CTARGET}"
VER="${PV}"
LIBPATH="${EPREFIX}${LIBPATH}"
EOF
newins "${T}"/env.d ${CTARGET}-${PV}
# Handle documentation
if ! is_cross ; then
cd "${S}"
dodoc README
docinto bfd
dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
docinto binutils
dodoc binutils/ChangeLog binutils/NEWS binutils/README
docinto gas
dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
docinto gprof
dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
docinto ld
dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
docinto libiberty
dodoc libiberty/ChangeLog* libiberty/README
docinto opcodes
dodoc opcodes/ChangeLog*
fi
if ! is_cross && use emacs ; then
elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
fi
# Remove shared info pages
rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
# Trim all empty dirs
find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
}
pkg_postinst() {
# Make sure this ${CTARGET} has a binutils version selected
[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
binutils-config ${CTARGET}-${PV}
! is_cross && use emacs && elisp-site-regen
}
pkg_postrm() {
local current_profile=$(binutils-config -c ${CTARGET})
# If no other versions exist, then uninstall for this
# target ... otherwise, switch to the newest version
# Note: only do this if this version is unmerged. We
# rerun binutils-config if this is a remerge, as
# we want the mtimes on the symlinks updated (if
# it is the same as the current selected profile)
if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
choice=${choice//$'\n'/ }
choice=${choice/* }
if [[ -z ${choice} ]] ; then
binutils-config -u ${CTARGET}
else
binutils-config ${choice}
fi
elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
binutils-config ${CTARGET}-${PV}
fi
! is_cross && use emacs && elisp-site-regen
}
# Note [slotting support]
# -----------------------
# Gentoo's layout for binutils files is non-standard as Gentoo
# supports slotted installation for binutils. Many tools
# still expect binutils to reside in known locations.
# binutils-config package restores symlinks into known locations,
# like:
# /usr/bin/${CTARGET}-<tool>
# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
# /usr/include/
#
# Note [tooldir hack for ldscripts]
# ---------------------------------
# Build system does not allow ./configure to tweak every location
# we need for slotting binutils hence all the shuffling in
# src_install(). This note is about SCRIPTDIR define handling.
#
# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
# Thus we can't just move files around after compilation finished.
#
# Our goal is the following:
# - at build-time set scriptdir to point to symlinked location:
# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
# - at install-time set scriptdir to point to slotted location:
# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

View File

@ -0,0 +1,494 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit elisp-common libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
IUSE="cet default-gold doc emacs gold multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
# PATCH_VER - the patchset version
# Default: empty, no patching
# PATCH_BINUTILS_VER - the binutils version in the patchset name
# - Default: PV
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
PATCH_VER=3
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
inherit git-r3
SLOT=${PV}
else
PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
PATCH_DEV=${PATCH_DEV:-dilfridge}
SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
# live ebuild
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
KEYWORDS="~loong"
fi
#
# The cross-compile logic
#
export CTARGET=${CTARGET:-${CHOST}}
if [[ ${CTARGET} == ${CHOST} ]] ; then
if [[ ${CATEGORY} == cross-* ]] ; then
export CTARGET=${CATEGORY#cross-}
fi
fi
is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
#
# The dependencies
#
RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
emacs? ( >=app-editors/emacs-23.1:* )
"
DEPEND="${RDEPEND}"
BDEPEND="
doc? ( sys-apps/texinfo )
test? (
dev-util/dejagnu
sys-devel/bc
)
nls? ( sys-devel/gettext )
sys-devel/flex
virtual/yacc
"
RESTRICT="!test? ( test )"
MY_BUILDDIR=${WORKDIR}/build
src_unpack() {
if [[ ${PV} == 9999* ]] ; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
git-r3_src_unpack
mv patches-git/9999 patch || die
EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
S=${WORKDIR}/binutils
EGIT_CHECKOUT_DIR=${S}
git-r3_src_unpack
else
unpack ${P/-hppa64/}.tar.xz
cd "${WORKDIR}" || die
unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
# _p patch versions are Gentoo specific tarballs ...
local dir=${P%_p?}
dir=${dir/-hppa64/}
S=${WORKDIR}/${dir}
fi
cd "${WORKDIR}" || die
mkdir -p "${MY_BUILDDIR}" || die
}
src_prepare() {
local patchsetname
if [[ ${PV} == 9999* ]] ; then
patchsetname="from git master"
else
patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
fi
if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if ! use vanilla; then
einfo "Applying binutils patchset ${patchsetname}"
eapply "${WORKDIR}/patch"
einfo "Done."
fi
fi
# Make sure our explicit libdir paths don't get clobbered, bug #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
# Fix locale issues if possible, bug #122216
if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
einfo "Fixing misc issues in configure files"
for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
ebegin " Updating ${f/${S}\/}"
patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
|| eerror "Please file a bug about this"
eend $?
done
fi
# Apply things from PATCHES and user dirs
default
# Run misc portage update scripts
gnuconfig_update
elibtoolize --portage --no-uclibc
}
toolchain-binutils_bugurl() {
printf "https://bugs.gentoo.org/"
}
toolchain-binutils_pkgversion() {
printf "Gentoo ${PV}"
[[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
}
src_configure() {
# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
# Avoid really confusing logs from subconfigure spam, makes logs far
# more legible.
MAKEOPTS="--output-sync=line ${MAKEOPTS}"
# Setup some paths
LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
INCPATH=${LIBPATH}/include
DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
if is_cross ; then
TOOLPATH=/usr/${CHOST}/${CTARGET}
else
TOOLPATH=/usr/${CTARGET}
fi
BINPATH=${TOOLPATH}/binutils-bin/${PV}
# Make sure we filter $LINGUAS so that only ones that
# actually work make it through, bug #42033
strip-linguas -u */po
# Keep things sane
strip-flags
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
einfo "$(printf '%10s' ${x}:) ${!x}"
done
echo
cd "${MY_BUILDDIR}" || die
local myconf=()
if use plugins ; then
myconf+=( --enable-plugins )
fi
# enable gold (installed as ld.gold) and ld's plugin architecture
if use gold ; then
myconf+=( --enable-gold )
if use default-gold; then
myconf+=( --enable-gold=default )
fi
fi
if use nls ; then
myconf+=( --without-included-gettext )
else
myconf+=( --disable-nls )
fi
myconf+=( --with-system-zlib )
# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
# logic in toolchain.eclass. bug #446946
#
# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
case $(tc-arch) in
ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
esac
use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
[[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
is_cross && myconf+=(
--with-sysroot="${EPREFIX}"/usr/${CTARGET}
--enable-poison-system-directories
)
myconf+=( --enable-secureplt )
# mips can't do hash-style=gnu ...
if [[ $(tc-arch) != mips ]] ; then
myconf+=( --enable-default-hash-style=gnu )
fi
myconf+=(
--prefix="${EPREFIX}"/usr
--host=${CHOST}
--target=${CTARGET}
--datadir="${EPREFIX}"${DATAPATH}
--datarootdir="${EPREFIX}"${DATAPATH}
--infodir="${EPREFIX}"${DATAPATH}/info
--mandir="${EPREFIX}"${DATAPATH}/man
--bindir="${EPREFIX}"${BINPATH}
--libdir="${EPREFIX}"${LIBPATH}
--libexecdir="${EPREFIX}"${LIBPATH}
--includedir="${EPREFIX}"${INCPATH}
--enable-obsolete
--enable-shared
--enable-threads
# Newer versions (>=2.27) offer a configure flag now.
--enable-relro
# Newer versions (>=2.24) make this an explicit option, bug #497268
--enable-install-libiberty
# Available from 2.35 on
--enable-textrel-check=warning
# Available from 2.39 on
--enable-warn-execstack
--enable-warn-rwx-segments
# TODO: Available from 2.39+ on but let's try the warning on for a bit
# first... (--enable-warn-execstack)
# Could put it under USE=hardened?
#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
# Things to think about
#--enable-deterministic-archives
# Works better than vapier's patch, bug #808787
--enable-new-dtags
--disable-jansson
--disable-werror
--with-bugurl="$(toolchain-binutils_bugurl)"
--with-pkgversion="$(toolchain-binutils_pkgversion)"
$(use_enable static-libs static)
# Disable modules that are in a combined binutils/gdb tree, bug #490566
--disable-{gdb,libdecnumber,readline,sim}
# Strip out broken static link flags.
# https://gcc.gnu.org/PR56750
--without-stage1-ldflags
# Change SONAME to avoid conflict across
# {native,cross}/binutils, binutils-libs. bug #666100
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
# avoid automagic dependency on (currently prefix) systems
# systems with debuginfod library, bug #754753
--without-debuginfod
# Allow user to opt into CET for host libraries.
# Ideally we would like automagic-or-disabled here.
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
)
if ! is_cross ; then
myconf+=( $(use_enable pgo pgo-build lto) )
if use pgo ; then
export BUILD_CFLAGS="${CFLAGS}"
fi
fi
ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
# Prevent makeinfo from running if doc is unset.
if ! use doc ; then
sed -i \
-e '/^MAKEINFO/s:=.*:= true:' \
Makefile || die
fi
}
src_compile() {
cd "${MY_BUILDDIR}" || die
# see Note [tooldir hack for ldscripts]
emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
# only build info pages if the user wants them
if use doc ; then
emake V=1 info
fi
! is_cross && use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
# we nuke the manpages when we're left with junk
# (like when we bootstrap, no perl -> no manpages)
find . -name '*.1' -a -size 0 -delete
}
src_test() {
cd "${MY_BUILDDIR}" || die
# bug #637066
filter-flags -Wall -Wreturn-type
emake -k V=1 check
}
src_install() {
local x d
cd "${MY_BUILDDIR}" || die
# see Note [tooldir hack for ldscripts]
emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
rm -rf "${ED}"/${LIBPATH}/bin || die
use static-libs || find "${ED}" -name '*.la' -delete
# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
cd "${ED}"/${LIBPATH} || die
for d in ../* ; do
[[ ${d} == ../${PV} ]] && continue
mv ${d}/* . || die
rmdir ${d} || die
done
# Now we collect everything intp the proper SLOT-ed dirs
# When something is built to cross-compile, it installs into
# /usr/$CHOST/ by default ... we have to 'fix' that :)
if is_cross ; then
cd "${ED}"/${BINPATH} || die
for x in * ; do
mv ${x} ${x/${CTARGET}-} || die
done
if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/usr/${CHOST}/{include,lib}
fi
fi
insinto ${INCPATH}
local libiberty_headers=(
# Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
demangle.h
dyn-string.h
fibheap.h
hashtab.h
libiberty.h
objalloc.h
splay-tree.h
)
doins "${libiberty_headers[@]/#/${S}/include/}"
if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
rm -r "${ED}"/${LIBPATH}/lib || die
fi
# Generate an env.d entry for this binutils
insinto /etc/env.d/binutils
cat <<-EOF > "${T}"/env.d
TARGET="${CTARGET}"
VER="${PV}"
LIBPATH="${EPREFIX}${LIBPATH}"
EOF
newins "${T}"/env.d ${CTARGET}-${PV}
# Handle documentation
if ! is_cross ; then
cd "${S}" || die
dodoc README
docinto bfd
dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
docinto binutils
dodoc binutils/ChangeLog binutils/NEWS binutils/README
docinto gas
dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
docinto gprof
dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
docinto ld
dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
docinto libiberty
dodoc libiberty/ChangeLog* libiberty/README
docinto opcodes
dodoc opcodes/ChangeLog*
fi
if ! is_cross && use emacs ; then
elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
fi
# Remove shared info pages
rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
# Trim all empty dirs
find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
}
pkg_postinst() {
# Make sure this ${CTARGET} has a binutils version selected
[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
binutils-config ${CTARGET}-${PV}
! is_cross && use emacs && elisp-site-regen
}
pkg_postrm() {
local current_profile=$(binutils-config -c ${CTARGET})
# If no other versions exist, then uninstall for this
# target ... otherwise, switch to the newest version
# Note: only do this if this version is unmerged. We
# rerun binutils-config if this is a remerge, as
# we want the mtimes on the symlinks updated (if
# it is the same as the current selected profile)
if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
choice=${choice//$'\n'/ }
choice=${choice/* }
if [[ -z ${choice} ]] ; then
binutils-config -u ${CTARGET}
else
binutils-config ${choice}
fi
elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
binutils-config ${CTARGET}-${PV}
fi
! is_cross && use emacs && elisp-site-regen
}
# Note [slotting support]
# -----------------------
# Gentoo's layout for binutils files is non-standard as Gentoo
# supports slotted installation for binutils. Many tools
# still expect binutils to reside in known locations.
# binutils-config package restores symlinks into known locations,
# like:
# /usr/bin/${CTARGET}-<tool>
# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
# /usr/include/
#
# Note [tooldir hack for ldscripts]
# ---------------------------------
# Build system does not allow ./configure to tweak every location
# we need for slotting binutils hence all the shuffling in
# src_install(). This note is about SCRIPTDIR define handling.
#
# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
# Thus we can't just move files around after compilation finished.
#
# Our goal is the following:
# - at build-time set scriptdir to point to symlinked location:
# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
# - at install-time set scriptdir to point to slotted location:
# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}

View File

@ -1,14 +1,14 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
inherit elisp-common libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
IUSE="cet default-gold doc emacs +gold multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@ -19,7 +19,7 @@ REQUIRED_USE="default-gold? ( gold )"
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
PATCH_VER=1
PATCH_VER=0
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@ -33,7 +33,7 @@ else
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
# live ebuild
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
#
@ -53,6 +53,7 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
emacs? ( >=app-editors/emacs-23.1:* )
"
DEPEND="${RDEPEND}"
BDEPEND="
@ -82,13 +83,16 @@ src_unpack() {
EGIT_CHECKOUT_DIR=${S}
git-r3_src_unpack
else
unpack ${P}.tar.xz
unpack ${P/-hppa64/}.tar.xz
cd "${WORKDIR}" || die
unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
# _p patch versions are Gentoo specific tarballs ...
S=${WORKDIR}/${P%_p?}
local dir=${P%_p?}
dir=${dir/-hppa64/}
S=${WORKDIR}/${dir}
fi
cd "${WORKDIR}" || die
@ -103,7 +107,7 @@ src_prepare() {
patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
fi
if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if ! use vanilla; then
einfo "Applying binutils patchset ${patchsetname}"
eapply "${WORKDIR}/patch"
@ -111,20 +115,13 @@ src_prepare() {
fi
fi
# This check should probably go somewhere else, like pkg_pretend.
if [[ ${CTARGET} == *-uclibc* ]] ; then
if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
die "sorry, but this binutils doesn't yet support uClibc :("
fi
fi
# Make sure our explicit libdir paths don't get clobbered. #562460
# Make sure our explicit libdir paths don't get clobbered, bug #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
# Fix locale issues if possible #122216
# Fix locale issues if possible, bug #122216
if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
einfo "Fixing misc issues in configure files"
for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
@ -135,11 +132,6 @@ src_prepare() {
done
fi
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
fi
# Apply things from PATCHES and user dirs
default
@ -157,6 +149,11 @@ toolchain-binutils_pkgversion() {
}
src_configure() {
# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
# Avoid really confusing logs from subconfigure spam, makes logs far
# more legible.
MAKEOPTS="--output-sync=line ${MAKEOPTS}"
# Setup some paths
LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
INCPATH=${LIBPATH}/include
@ -169,12 +166,14 @@ src_configure() {
BINPATH=${TOOLPATH}/binutils-bin/${PV}
# Make sure we filter $LINGUAS so that only ones that
# actually work make it through #42033
# actually work make it through, bug #42033
strip-linguas -u */po
# Keep things sane
strip-flags
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
@ -182,7 +181,7 @@ src_configure() {
done
echo
cd "${MY_BUILDDIR}"
cd "${MY_BUILDDIR}" || die
local myconf=()
if use plugins ; then
@ -204,9 +203,10 @@ src_configure() {
myconf+=( --with-system-zlib )
# For bi-arch systems, enable a 64bit bfd. This matches
# the bi-arch logic in toolchain.eclass. #446946
# We used to do it for everyone, but it's slow on 32bit arches. #438522
# For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
# logic in toolchain.eclass. bug #446946
#
# We used to do it for everyone, but it's slow on 32bit arches. bug #438522
case $(tc-arch) in
ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
esac
@ -220,10 +220,7 @@ src_configure() {
--enable-poison-system-directories
)
# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
# on everyone in alpha (for now), we'll just enable it when possible
has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
myconf+=( --enable-secureplt )
# mips can't do hash-style=gnu ...
if [[ $(tc-arch) != mips ]] ; then
@ -247,24 +244,37 @@ src_configure() {
--enable-threads
# Newer versions (>=2.27) offer a configure flag now.
--enable-relro
# Newer versions (>=2.24) make this an explicit option. #497268
# Newer versions (>=2.24) make this an explicit option, bug #497268
--enable-install-libiberty
# Available from 2.35 on
--enable-textrel-check=warning
# Works better than vapier's patch... #808787
# Available from 2.39 on
--enable-warn-execstack
--enable-warn-rwx-segments
# TODO: Available from 2.39+ on but let's try the warning on for a bit
# first... (--enable-warn-execstack)
# Could put it under USE=hardened?
#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
# Things to think about
#--enable-deterministic-archives
# Works better than vapier's patch, bug #808787
--enable-new-dtags
--disable-jansson
--disable-werror
--with-bugurl="$(toolchain-binutils_bugurl)"
--with-pkgversion="$(toolchain-binutils_pkgversion)"
$(use_enable static-libs static)
${EXTRA_ECONF}
# Disable modules that are in a combined binutils/gdb tree. #490566
# Disable modules that are in a combined binutils/gdb tree, bug #490566
--disable-{gdb,libdecnumber,readline,sim}
# Strip out broken static link flags.
# https://gcc.gnu.org/PR56750
--without-stage1-ldflags
# Change SONAME to avoid conflict across
# {native,cross}/binutils, binutils-libs. #666100
# {native,cross}/binutils, binutils-libs. bug #666100
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
# avoid automagic dependency on (currently prefix) systems
@ -276,8 +286,16 @@ src_configure() {
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
)
echo ./configure "${myconf[@]}"
"${S}"/configure "${myconf[@]}" || die
if ! is_cross ; then
myconf+=( $(use_enable pgo pgo-build lto) )
if use pgo ; then
export BUILD_CFLAGS="${CFLAGS}"
fi
fi
ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
# Prevent makeinfo from running if doc is unset.
if ! use doc ; then
@ -288,40 +306,44 @@ src_configure() {
}
src_compile() {
cd "${MY_BUILDDIR}"
cd "${MY_BUILDDIR}" || die
# see Note [tooldir hack for ldscripts]
emake tooldir="${EPREFIX}${TOOLPATH}" all
emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
# only build info pages if the user wants them
if use doc ; then
emake info
emake V=1 info
fi
! is_cross && use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
# we nuke the manpages when we're left with junk
# (like when we bootstrap, no perl -> no manpages)
find . -name '*.1' -a -size 0 -delete
}
src_test() {
cd "${MY_BUILDDIR}"
cd "${MY_BUILDDIR}" || die
# bug 637066
# bug #637066
filter-flags -Wall -Wreturn-type
emake -k check
emake -k V=1 check
}
src_install() {
local x d
cd "${MY_BUILDDIR}"
cd "${MY_BUILDDIR}" || die
# see Note [tooldir hack for ldscripts]
emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
rm -rf "${ED}"/${LIBPATH}/bin
emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
rm -rf "${ED}"/${LIBPATH}/bin || die
use static-libs || find "${ED}" -name '*.la' -delete
# Newer versions of binutils get fancy with ${LIBPATH} #171905
cd "${ED}"/${LIBPATH}
# Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
cd "${ED}"/${LIBPATH} || die
for d in ../* ; do
[[ ${d} == ../${PV} ]] && continue
mv ${d}/* . || die
@ -332,9 +354,9 @@ src_install() {
# When something is built to cross-compile, it installs into
# /usr/$CHOST/ by default ... we have to 'fix' that :)
if is_cross ; then
cd "${ED}"/${BINPATH}
cd "${ED}"/${BINPATH} || die
for x in * ; do
mv ${x} ${x/${CTARGET}-}
mv ${x} ${x/${CTARGET}-} || die
done
if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
@ -343,6 +365,7 @@ src_install() {
rm -r "${ED}"/usr/${CHOST}/{include,lib}
fi
fi
insinto ${INCPATH}
local libiberty_headers=(
# Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
@ -356,8 +379,8 @@ src_install() {
)
doins "${libiberty_headers[@]/#/${S}/include/}"
if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
rm -r "${ED}"/${LIBPATH}/lib
mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
rm -r "${ED}"/${LIBPATH}/lib || die
fi
# Generate an env.d entry for this binutils
@ -371,24 +394,36 @@ src_install() {
# Handle documentation
if ! is_cross ; then
cd "${S}"
cd "${S}" || die
dodoc README
docinto bfd
dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
docinto binutils
dodoc binutils/ChangeLog binutils/NEWS binutils/README
docinto gas
dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
docinto gprof
dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
docinto ld
dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
docinto libiberty
dodoc libiberty/ChangeLog* libiberty/README
docinto opcodes
dodoc opcodes/ChangeLog*
fi
if ! is_cross && use emacs ; then
elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
fi
# Remove shared info pages
rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
@ -400,6 +435,8 @@ pkg_postinst() {
# Make sure this ${CTARGET} has a binutils version selected
[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
binutils-config ${CTARGET}-${PV}
! is_cross && use emacs && elisp-site-regen
}
pkg_postrm() {
@ -423,6 +460,8 @@ pkg_postrm() {
elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
binutils-config ${CTARGET}-${PV}
fi
! is_cross && use emacs && elisp-site-regen
}
# Note [slotting support]

View File

@ -0,0 +1,3 @@
(add-to-list 'load-path "@SITELISP@")
(autoload 'dwarf-browse "dwarf-mode"
"Invoke `objdump' and put output into a `dwarf-mode' buffer." t)

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>toolchain@gentoo.org</email>
@ -9,6 +9,7 @@
<flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
<flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag>
<flag name="gold">Build ld.gold linker</flag>
<flag name="pgo">Build binutils with Profile Guided Optimization (PGO) and LTO</flag>
<flag name="plugins">Enable plugin support in tools</flag>
<flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
</use>

View File

@ -1,4 +1,4 @@
DIST bison-3.7.6-patches-01.tar.xz 10600 BLAKE2B c7907a327c2bbb82a2e575a864e71400f91cd4349a84f95b187ecaadefc1bfd595a91bce6c8c47e42423cace9cf78a4041fde3fdc489a4824aa3c10ca73be7cb SHA512 8f2ddee79b9678b9fd9a7a34f26d44f7c4472d0fc55c9fef8b418d27949b6a27309b7aa5ac3f4a5ad27c90ad7d92d824ffe767c77b0ed81de6b2897c91cd7560
DIST bison-3.7.6.tar.xz 2627180 BLAKE2B 2f1015b517e46ff0870378b4d0dd489c8c737f31b2b69146bd7fbbae1e3adcdff0e4837cfdf1d238e8660ecc2b310ce87ec8940ed4989278b3df6cbb2d464e54 SHA512 6c1c9b825fbd2c94b8903f03a7e68e6832599f7bbd8d3c49864537c11b038c45a15de02fd36128d662af314334c83515bbc132df84e9acc6c651e98649c65bad
DIST bison-3.8.1.tar.xz 2800372 BLAKE2B 0b70ee1b3ab8075540d9254cffdc1dfc9a9fb354d8b9b79dd3b097bf9a2235f892e120736e4195ad21ce8fbf3831c63b2d1a267a20a7abf85f0d72cdcdac1820 SHA512 f87978c41eca4db22de4f64feb3be92e44862d412f75dd84980045faf0f9e7f5a41b25bef8d4acd90743638eab61a7ac111444969d958fef5fe3535bac416921
DIST bison-3.8.2.tar.xz 2817324 BLAKE2B e211b61494c911f55b72a8b70b5a48cdf4000ce9e675a1f1f52735bb8f57d93a3f8075341451263af9c9c531004907ae2b62b1873e7e4664c2cd26fa3b12271c SHA512 d4d23af6671406e97257892f90651b67f2ab95219831372be032190b7156c10a3435d457857e677445df8b2327aacccc15344acbbc3808a6f332a93cce23b444
DIST bison-3.8.2.tar.xz.sig 195 BLAKE2B b9bd21adb5115d3d3174c94223fbc9cd33afa0e9c1805008e49f77ff154fc2b656d8a9e9503dc5290658ae2948a2ca7c0dbc812f62aec268d8f8bfafb6349096 SHA512 8bb7743ca326e81a6c091b1413e3c09bd43c7eabbb80bac0638ccd52bdf7e3395cce300a86acd95f4637a9ec8a1b0e9a4d3d25d95ab0a8f03e57fd82eb87a7ac

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -13,7 +13,7 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
https://dev.gentoo.org/~whissi/dist/bison/${PATCH_TAR}
https://dev.gentoo.org/~polynomial-c/dist/bison/${PATCH_TAR}"
LICENSE="GPL-2"
LICENSE="GPL-3+"
SLOT="0"
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="examples nls static test"

View File

@ -1,96 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit flag-o-matic
DESCRIPTION="A general-purpose (yacc-compatible) parser generator"
HOMEPAGE="https://www.gnu.org/software/bison/"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
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="examples nls static test"
RESTRICT="!test? ( test )"
# gettext _IS_ required in RDEPEND because >=bison-3.7 links against
# libtextstyle.so!!! (see bug #740754)
DEPEND="
>=sys-devel/m4-1.4.16
>=sys-devel/gettext-0.21
"
RDEPEND="${DEPEND}"
BDEPEND="
sys-devel/flex
test? ( dev-lang/perl )
"
DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release
src_prepare() {
# Old logic when we needed to patch configure.ac
# Keeping in case it's useful for future
# Record date to avoid 'config.status --recheck' & regen of 'tests/package.m4'
#touch -r configure.ac old.configure.ac || die
#touch -r configure old.configure || die
#eapply "${WORKDIR}"/patches
#default
# Restore date after patching
#touch -r old.configure.ac configure.ac || die
#touch -r old.configure configure || die
# The makefiles make the man page depend on the configure script
# which we patched above. Touch it to prevent regeneration.
#touch doc/bison.1 || die #548778 #538300#9
default
# Avoid regenerating the info page when the timezone is diff. #574492
sed -i '2iexport TZ=UTC' build-aux/mdate-sh || die
}
src_configure() {
use static && append-ldflags -static
local myeconfargs=(
$(use_enable nls)
)
econf "${myeconfargs[@]}"
}
src_install() {
default
# This one is installed by dev-util/yacc
mv "${ED}"/usr/bin/yacc{,.bison} || die
mv "${ED}"/usr/share/man/man1/yacc{,.bison}.1 || die
# We do not need liby.a
rm -r "${ED}"/usr/lib* || die
# Examples are about 200K, so let's make them optional still for now.
if ! use examples ; then
rm -r "${ED}"/usr/share/doc/${PF}/examples/ || die
fi
}
pkg_postinst() {
local f="${EROOT}/usr/bin/yacc"
if [[ ! -e ${f} ]] ; then
ln -s yacc.bison "${f}"
fi
}
pkg_postrm() {
# clean up the dead symlink when we get unmerged #377469
local f="${EROOT}/usr/bin/yacc"
if [[ -L ${f} && ! -e ${f} ]] ; then
rm -f "${f}"
fi
}

View File

@ -1,17 +1,19 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit flag-o-matic
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/bison.asc
inherit flag-o-matic verify-sig
DESCRIPTION="A general-purpose (yacc-compatible) parser generator"
HOMEPAGE="https://www.gnu.org/software/bison/"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )"
LICENSE="GPL-2"
LICENSE="GPL-3+"
SLOT="0"
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"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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="examples nls static test"
RESTRICT="!test? ( test )"
@ -25,6 +27,7 @@ RDEPEND="${DEPEND}"
BDEPEND="
sys-devel/flex
test? ( dev-lang/perl )
verify-sig? ( sec-keys/openpgp-keys-bison )
"
DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release

View File

@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
<upstream>
<remote-id type="github">akimd/bison</remote-id>
</upstream>
</pkgmetadata>

View File

@ -1,3 +1,5 @@
DIST crossdev-20210621.tar.xz 28588 BLAKE2B 33ff6069c85cbcff6bf34bf5f6dd8050bd5f9d34e3478c0200965dffd4cee46e71acf4210f533c9b22fd6fe979fa5f447d30b5aaa3a6fc0845b201a80dcb28d8 SHA512 8f8bed6ce53503fa4c2bbce4327d8e1d5ce8edab5ff698f11f312007912a2d73be56242269f798bb633ad3648f6cf936e00e019c05e5781b523059befc26f42c
DIST crossdev-20210718.tar.xz 28640 BLAKE2B 1e9b9313a5c9a1cb4d82f00e4979794d61b9eaa0035c575ac55092c6c015d820a590c5816d212a4ffad95b96a3dd99a9b94ca7c20b78a7d7b062f16dec6ed329 SHA512 e1a37aebf759abaa30f071f43a528f9059b83456e71fd86fc8202a7eff5c506c1f34fdd260c7b91a03f491b9f2a107ce6a65c2314845a352176fcc5a27a766e2
DIST crossdev-20211027.tar.xz 28752 BLAKE2B 058d6254c702709c18cc426fe15d7a11cb856336236837a15c0b2cb0c2389198f8b0ea9893e7cdadd6ecdabb3e75c05b64c22448324ce2ea86032cb57e92a5d9 SHA512 6c15d71fb551dcb5cb8e95d7e3b1ecb52b34e47335842408da5acc9d258c1a5fa7e4699681b9b414b1b444df98601aa8b99b2000700485ec6028c076abeafd03
DIST crossdev-20211121.tar.xz 28700 BLAKE2B bfe637dcd3c5b6d45e289d6298de18cab4b70b5d21a817a9207b91360b489457b9ee10266a1c2641f8dfac09dffb166bf1565a7e519ba41f84c6d5c2000f5158 SHA512 5189fa7639b819dfffc8f994bb557d8d83f115b82cd61d938db77fdcf16a33cc9d0147f9708b3bed22fdc4ace27ac863436813ebad94876ae767172ac0cbb9ce
DIST crossdev-20220205.tar.xz 29088 BLAKE2B 46e90557f0a6df49e4f6ab7be6495514a188c4366868290d3b6b879ad1e5741e1600bca237735290f7e9278d441534569853b582cd85b96581c6ae0517cb4c54 SHA512 72e7cf690d49a87b32f6fdad2462fd4156e4e35a3f0b5f30911012a2b7936bb999575f757547a7a805c0cfdd1fd0caa8b23bf61e72c4333096314043ed565f40
DIST crossdev-20220424.tar.xz 29316 BLAKE2B 8b026c165b643262ef934fb2daec5484bc2a2e8c2cafbaca08ecb81c2870a6306dd834c9f72bca8cbe219d1b24274fef0b83a88e301e66d98a1eb0825bb2e161 SHA512 3c2ac2d9c79140c6e0aa7ac9fa7838499f003c6c9c1260abf4b0b7883d2179ef1ded5ab0ba14ca48d471edde5090e22a50fffbf25fd86a32d354a9541e4fd567
DIST crossdev-20220617.tar.xz 29396 BLAKE2B e3b39edfb4cbd5808851b56d86646bc879ea875b5e320802d86073236474e3aa80c5dbefc42ef4799528334bfb5a2a0abb5c0b344ebdce39ec01aac59306eb84 SHA512 bdc5ea519e4cd6275e8171ff7cd35c8ae45b6240fefd278997e247c8b0758bff6563f7e2613072e179ec4735155f05236f32385fe13579c5e955f761e0859e43
DIST crossdev-20220709.tar.xz 29408 BLAKE2B dc96be5d86b343215564c2c15e91314c5ed88c765cec4f222b08a7e942ab5fb230915a0cdc3245719c0b12b4ce579066c6a88ae8e7ef4e44b80d8f0c5ddf7663 SHA512 f27929db8b4f7036408a0db18d46eb84312e1cef279336e13a07422ed3a154f3a21821d2d5ada66c0fca37bd70750413dab87b795c957a0a81cb9f27ebce2b90

View File

@ -1,14 +1,15 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI="8"
if [[ ${PV} == "99999999" ]] ; then
inherit git-r3
EGIT_REPO_URI="git://anongit.gentoo.org/proj/crossdev.git"
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
else
SRC_URI="mirror://gentoo/${P}.tar.xz
https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz"
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi

View File

@ -0,0 +1,36 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
if [[ ${PV} == "99999999" ]] ; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
else
SRC_URI="mirror://gentoo/${P}.tar.xz
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
DESCRIPTION="Gentoo Cross-toolchain generator"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Crossdev"
LICENSE="GPL-2"
SLOT="0"
RDEPEND="
>=sys-apps/portage-2.1
>=app-portage/portage-utils-0.55
app-shells/bash
sys-apps/gentoo-functions
"
BDEPEND="app-arch/xz-utils"
src_install() {
default
if [[ "${PV}" == "99999999" ]] ; then
sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die
fi
}

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
@ -7,8 +7,7 @@ if [[ ${PV} == "99999999" ]] ; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
else
SRC_URI="mirror://gentoo/${P}.tar.xz
https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi

Some files were not shown because too many files have changed in this diff Show More