summaryrefslogtreecommitdiff
path: root/sys-libs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-01-23 06:45:02 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-01-23 06:45:02 +0000
commitc78477d222e1ceb9516a9bbbadbba0b5c1ce11db (patch)
tree5187cbad4740387edb2c1cca0942036a0fdccd88 /sys-libs
parent564687d289b862b8b079569a45a2d39d7b8c3585 (diff)
gentoo auto-resync : 23:01:2025 - 06:45:02
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/Manifest.gzbin13747 -> 13749 bytes
-rw-r--r--sys-libs/glibc/Manifest2
-rw-r--r--sys-libs/glibc/glibc-2.40-r8.ebuild1754
-rw-r--r--sys-libs/libxcrypt/Manifest1
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild335
-rw-r--r--sys-libs/pam/Manifest4
-rw-r--r--sys-libs/pam/files/pam-1.5.3-termios.patch34
-rw-r--r--sys-libs/pam/pam-1.5.3-r1.ebuild153
-rw-r--r--sys-libs/timezone-data/Manifest5
-rw-r--r--sys-libs/timezone-data/timezone-data-2025a.ebuild (renamed from sys-libs/timezone-data/timezone-data-2023d.ebuild)28
-rw-r--r--sys-libs/zlib/Manifest7
-rw-r--r--sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch88
-rw-r--r--sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch40
-rw-r--r--sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch59
-rw-r--r--sys-libs/zlib/files/zlib-1.2.13-use-LDFLAGS-in-configure.patch72
-rw-r--r--sys-libs/zlib/zlib-1.3-r4.ebuild173
16 files changed, 1768 insertions, 987 deletions
diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz
index 57dcaa0f013f..83fae5e90aa0 100644
--- a/sys-libs/Manifest.gz
+++ b/sys-libs/Manifest.gz
Binary files differ
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index 15493972a143..1a92111ecfae 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -34,6 +34,7 @@ DIST glibc-2.39-patches-11.tar.xz 192784 BLAKE2B fef42e0bd2a3341f41cac56dc878dcc
DIST glibc-2.39.tar.xz 18520988 BLAKE2B 9d98459a2d58401e07c081e0d841935b23998da75a7eb5a7ebd23a1f9ebab99dee623fe166397c1b6c926960c570f62dbca5cb3b5ce84a918adff6b7a15e16bb SHA512 818f58172a52815b4338ea9f2a69ecaa3335492b9f8f64cbf8afb24c0d737982341968ecd79631cae3d3074ab0ae4bc6056fc4ba3ffe790849dc374835cd57e2
DIST glibc-2.40-patches-5.tar.xz 87376 BLAKE2B b09b9d2c8e45c0b494223cd01effb14ef205b030f2aeb76e1d7d289997258c1e46d85f8f4ad761e22afc35b1f4747fbca51d7caf252181c7b054b6a3e6bd2bfe SHA512 bf4776c27e5d962d2774afbed2236996a712a6127e5fdccd051af212d86a7e699a932cf4cb22f5516d513b9490b91d5e145727035e845cd4ef290985ac3dc524
DIST glibc-2.40-patches-7.tar.xz 104100 BLAKE2B 6e91571bea0475b1a47a2c1b796cc91d2ab0f542cc82dba8691f99d09459bea73c0940c89c8f559edfb315cf9844a5c1eb0392f40499b1b8861f1e16f8b549db SHA512 8d61810f11f4c2ce97037e0f3c62e2a7bf0d83571fe68c7f80a248df744c31c2bda075c1f4c6189e8d5de0b200c1070e667a753144c61b0cb9bd5456b1c99d8b
+DIST glibc-2.40-patches-8.tar.xz 112020 BLAKE2B 17f5a3e5486aa570cb4d9103a84b649af9731bc398a4ff65d3d24c8912215dc7f5f2d6fa9a0222c514374a132b96796e8926a5cc31c87b326bf6d1a39772bd7a SHA512 97a28822f97d1c06773953750a8d9a38a6bd9ce488f4c4d5f0752b573591cbdc84dfbbb277e3fb8e5664c56596efc093fd83a78e4c47bb9c11cafe942b13a0f1
DIST glibc-2.40.tar.xz 18752204 BLAKE2B 8593cab5b2549b77159b6866fbb40b917e491fd5bc0814f7f85b6529166d78d4583436450c479b86cdfe468304fc4d2a9ba8294230a55dbc4c15e89c3ab6c000 SHA512 33caf91dbfddde6480b7cdf7a68b36aff8c522bfee56160af26af297f1b768668edb08bc4e1a7ff61c64721e3c1d49c347a5dd01c5edd3b914ee6479c8b27885
DIST glibc-systemd-20210729.tar.gz 1480 BLAKE2B 37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979 SHA512 efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238
DIST glibc-systemd-20210814.tar.gz 1469 BLAKE2B 10fa7bcb46d4fdce9c0ab353cbd30871e9b09a347a13a9c9a3b5777f931aa3c826c158d2e49532c604d4a834f2fab4089b67495fb88d0398945dc50d45ad9ef1 SHA512 5346a9ea459a1e6ccf665389f2a294de1e16f1e3e05cdf07e3dd99ed0e4f6f8b52cc333d4bff3c75ac90ab6ce70cd4ab2b3e126f920ce7979abd6dda56315efc
@@ -53,5 +54,6 @@ EBUILD glibc-2.38-r13.ebuild 55028 BLAKE2B fcee988603b8bcec9cf184c54e040c9190a98
EBUILD glibc-2.39-r11.ebuild 54663 BLAKE2B ef95a8014c990f42738c5b66b73416a55fab1b433af10d879a60d4d798ed3b9fca747242fb09d110f6a258e37bdbb384a85cc59dd8dc80f375c6faaa30ab4932 SHA512 3e8c216ac02f129a37de9d475980d911fb1ff77d09949f87ff6c5ffa666afdc6a35004d32d60d8a78b1abc17a823083442a68cbea6df35d4409897648ce8783f
EBUILD glibc-2.40-r5.ebuild 54662 BLAKE2B 62dd423d70cd8598bc4e69dc49e9b5442d283af497b80c58a99fcc6d4977936b0171c0c76325978fd43ddccd7e3c6496984c90a171bfd7b27ce5296bd204f7e9 SHA512 4daab8f45afa47660e9edce14ce5733702a5c229e1dea24e702858425d30201686eb62b0fd2d6a9c99343e4c6e138352f18eacde24d99aada8ce610f001c5b33
EBUILD glibc-2.40-r7.ebuild 55146 BLAKE2B ddaf2453c38b1841a5fbbab2710f5a9214dd25453d6fdfd89e461ac9b075678c98a78c859e6f516c9bea7138d4209441e76296a2157f7c4406d66fcf0c736d35 SHA512 7bbb58df4ef7d6a28657586dbe51a940c0e2f2aafd77f3c28a3ee97e6ae73a91c6d2197eda0850efa8208e32cd64d76e9a4e87f8a89cdb03a95bc0dd302ad25c
+EBUILD glibc-2.40-r8.ebuild 55083 BLAKE2B 3d9e8f127c6bf4220b145542676accc1b0051bfe374eb7d09ff1d9bb186172dcfe0a5cff47fac55383e637fe2ff834efb7a330a240b09c79b6007d244d98a24d SHA512 815b66d11371560bfe6f1d5e4c25b3935f926029c0a9605f5e8c069189216e9e9dcabdeb9f53c308ac9249166c7a8fff9fbb59d4476439cfd45eda4c2c702bf2
EBUILD glibc-9999.ebuild 55758 BLAKE2B 83561d0f3f8101160488e6141a7137fe94e86a44e5b962c75ee728d0b81ed4e8bc2faa104e99912bb58603815b7cea463746a781d3d00d480ac2296377784901 SHA512 474e0511247c4991eac5e88de60fffd70851ac8769289e08a4a056e03c9d7d6e4ef586e65a71a9b7b9caf7d994eb4aed03c4c0642c6afadb305fe21de917e5dc
MISC metadata.xml 2142 BLAKE2B 765ba540eb10afccd1bade4de56f0c13ce269225500a62d1d17328194de69e7fa15d359a14eac6bfa8a36df45344db3d52f5e1811b174cf1fa2bfb95ad7760a7 SHA512 2f4a148c076a0967663d14e76b85a698ddae7093ff299b0dc95a6c3b00957c9bf73443f2bace9670eb62a45465efbcca892bb52b6aac8577acb2bc5f74a7397c
diff --git a/sys-libs/glibc/glibc-2.40-r8.ebuild b/sys-libs/glibc/glibc-2.40-r8.ebuild
new file mode 100644
index 000000000000..a04a45bd8cbf
--- /dev/null
+++ b/sys-libs/glibc/glibc-2.40-r8.ebuild
@@ -0,0 +1,1754 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
+# Please read & adapt the page as necessary if obsolete.
+
+PYTHON_COMPAT=( python3_{10..13} )
+TMPFILES_OPTIONAL=1
+
+EMULTILIB_PKG="true"
+
+# Gentoo patchset (ignored for live ebuilds)
+PATCH_VER=8
+PATCH_DEV=dilfridge
+
+# gcc mulitilib bootstrap files version
+GCC_BOOTSTRAP_VER=20201208
+
+# systemd integration version
+GLIBC_SYSTEMD_VER=20210729
+
+# Minimum kernel version that glibc requires
+MIN_KERN_VER="3.2.0"
+
+# Minimum pax-utils version needed (which contains any new syscall changes for
+# its seccomp filter!). Please double check this!
+MIN_PAX_UTILS_VER="1.3.3"
+
+# Minimum systemd version needed (which contains any new syscall changes for
+# its seccomp filter!). Please double check this!
+MIN_SYSTEMD_VER="254.9-r1"
+
+inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
+ multilib systemd multiprocessing tmpfiles
+
+DESCRIPTION="GNU libc C library"
+HOMEPAGE="https://www.gnu.org/software/libc/"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+else
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
+ SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
+fi
+
+SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
+SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )"
+
+LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
+SLOT="2.2"
+IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla"
+
+# Here's how the cross-compile logic breaks down ...
+# CTARGET - machine that will target the binaries
+# CHOST - machine that will host the binaries
+# CBUILD - machine that will build the binaries
+# If CTARGET != CHOST, it means you want a libc for cross-compiling.
+# If CHOST != CBUILD, it means you want to cross-compile the libc.
+# CBUILD = CHOST = CTARGET - native build/install
+# CBUILD != (CHOST = CTARGET) - cross-compile a native build
+# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
+# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
+# For install paths:
+# CHOST = CTARGET - install into /
+# CHOST != CTARGET - install into /usr/CTARGET/
+#
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# - similarly, valgrind requires knowledge about symbols in ld.so:
+# bug #920753
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we strip selectively.
+
+# We need a new-enough binutils/gcc to match upstream baseline.
+# Also we need to make sure our binutils/gcc supports TLS,
+# and that gcc already contains the hardened patches.
+# Lastly, let's avoid some openssh nastiness, bug 708224, as
+# convenience to our users.
+
+IDEPEND="
+ !compile-locales? ( sys-apps/locale-gen )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ >=app-misc/pax-utils-${MIN_PAX_UTILS_VER}
+ sys-devel/bison
+ compile-locales? ( sys-apps/locale-gen )
+ doc? (
+ dev-lang/perl
+ sys-apps/texinfo
+ )
+ test? (
+ dev-lang/perl
+ >=net-dns/libidn2-2.3.0
+ )
+"
+COMMON_DEPEND="
+ gd? ( media-libs/gd:2= )
+ nscd? ( selinux? (
+ audit? ( sys-process/audit )
+ caps? ( sys-libs/libcap )
+ ) )
+ suid? ( caps? ( sys-libs/libcap ) )
+ selinux? ( sys-libs/libselinux )
+ systemtap? ( dev-debug/systemtap )
+"
+DEPEND="${COMMON_DEPEND}
+"
+RDEPEND="${COMMON_DEPEND}
+ !<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
+ !<sys-apps/systemd-${MIN_SYSTEMD_VER}
+ perl? ( dev-lang/perl )
+"
+
+RESTRICT="!test? ( test )"
+
+if [[ ${CATEGORY} == cross-* ]] ; then
+ BDEPEND+=" !headers-only? (
+ >=${CATEGORY}/binutils-2.27
+ >=${CATEGORY}/gcc-6.2
+ )"
+ [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
+else
+ BDEPEND+="
+ >=sys-devel/binutils-2.27
+ >=sys-devel/gcc-6.2
+ "
+ DEPEND+=" virtual/os-headers "
+ RDEPEND+="
+ >=net-dns/libidn2-2.3.0
+ vanilla? ( !sys-libs/timezone-data )
+ "
+ PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
+fi
+
+# Ignore tests whitelisted below
+GENTOO_GLIBC_XFAIL_TESTS="${GENTOO_GLIBC_XFAIL_TESTS:-yes}"
+
+# The following tests fail due to the Gentoo build system and are thus
+# executed but ignored:
+XFAIL_TEST_LIST=(
+ # buggy test, assumes /dev/ and /dev/null on a single filesystem
+ # 'mount --bind /dev/null /chroot/dev/null' breaks it.
+ # https://sourceware.org/PR25909
+ tst-support_descriptors
+
+ # The following tests fail only inside portage
+ # https://bugs.gentoo.org/831267
+ tst-system
+ tst-strerror
+ tst-strsignal
+
+ # Fails with certain PORTAGE_NICENESS/PORTAGE_SCHEDULING_POLICY
+ tst-sched1
+
+ # Fails regularly, unreliable
+ tst-valgrind-smoke
+
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=31877 (bug #927973)
+ tst-shstk-legacy-1g
+)
+
+XFAIL_NSPAWN_TEST_LIST=(
+ # These tests need to be adapted to handle EPERM/ENOSYS(?) properly
+ # upstream, as systemd-nspawn's default seccomp whitelist is too strict.
+ # https://sourceware.org/PR30603
+ test-errno-linux
+ tst-bz21269
+ tst-mlock2
+ tst-ntp_gettime
+ tst-ntp_gettime-time64
+ tst-ntp_gettimex
+ tst-ntp_gettimex-time64
+ tst-pkey
+ tst-process_mrelease
+ tst-adjtime
+ tst-adjtime-time64
+ tst-clock2
+ tst-clock2-time64
+
+ # These fail if --suppress-sync and/or low priority is set
+ tst-sync_file_range
+ test-errno
+)
+
+#
+# Small helper functions
+#
+
+dump_build_environment() {
+ einfo ==== glibc build environment ========================================================
+ local v
+ for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX CPP LD \
+ {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM AR AS STRIP RANLIB OBJCOPY \
+ STRINGS OBJDUMP READELF; do
+ einfo " $(printf '%15s' ${v}:) ${!v}"
+ done
+ einfo =====================================================================================
+}
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+just_headers() {
+ is_crosscompile && use headers-only
+}
+
+alt_prefix() {
+ is_crosscompile && echo /usr/${CTARGET}
+}
+
+# This prefix is applicable to CHOST when building against this
+# glibc. It is baked into the library at configure time.
+host_eprefix() {
+ is_crosscompile || echo "${EPREFIX}"
+}
+
+# This prefix is applicable to CBUILD when building against this
+# glibc. It determines the destination path at install time.
+build_eprefix() {
+ is_crosscompile && echo "${EPREFIX}"
+}
+
+alt_headers() {
+ echo $(alt_prefix)/usr/include
+}
+alt_libdir() {
+ echo $(alt_prefix)/$(get_libdir)
+}
+alt_usrlibdir() {
+ echo $(alt_prefix)/usr/$(get_libdir)
+}
+
+builddir() {
+ echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
+}
+
+do_compile_test() {
+ local ret save_cflags=${CFLAGS}
+ CFLAGS+=" $1"
+ shift
+
+ pushd "${T}" >/dev/null
+
+ rm -f glibc-test*
+ printf '%b' "$*" > glibc-test.c
+
+ # We assume CC is already set up.
+ nonfatal emake glibc-test
+ ret=$?
+
+ popd >/dev/null
+
+ CFLAGS=${save_cflags}
+ return ${ret}
+}
+
+do_run_test() {
+ local ret
+
+ if [[ ${MERGE_TYPE} == "binary" ]] ; then
+ # ignore build failures when installing a binary package #324685
+ do_compile_test "" "$@" 2>/dev/null || return 0
+ else
+ if ! do_compile_test "" "$@" ; then
+ ewarn "Simple build failed ... assuming this is desired #324685"
+ return 0
+ fi
+ fi
+
+ pushd "${T}" >/dev/null
+
+ ./glibc-test
+ ret=$?
+ rm -f glibc-test*
+
+ popd >/dev/null
+
+ return ${ret}
+}
+
+setup_target_flags() {
+ # This largely mucks with compiler flags. None of which should matter
+ # when building up just the headers.
+ just_headers && return 0
+
+ case $(tc-arch) in
+ x86)
+ # -march needed for #185404 #199334
+ # TODO: When creating the first glibc cross-compile, this test will
+ # always fail as it does a full link which in turn requires glibc.
+ # Probably also applies when changing multilib profile settings (e.g.
+ # enabling x86 when the profile was amd64-only previously).
+ # We could change main to _start and pass -nostdlib here so that we
+ # only test the gcc code compilation. Or we could do a compile and
+ # then look for the symbol via scanelf.
+ if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
+ local t=${CTARGET_OPT:-${CTARGET}}
+ t=${t%%-*}
+ filter-flags '-march=*'
+ export CFLAGS="-march=${t} ${CFLAGS}"
+ einfo "Auto adding -march=${t} to CFLAGS #185404"
+ fi
+ # For compatibility with older binaries at slight performance cost.
+ use stack-realign && export CFLAGS+=" -mstackrealign"
+ ;;
+ amd64)
+ # -march needed for #185404 #199334
+ # TODO: See cross-compile issues listed above for x86.
+ if [[ ${ABI} == x86 ]]; then
+ if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
+ local t=${CTARGET_OPT:-${CTARGET}}
+ t=${t%%-*}
+ # Normally the target is x86_64-xxx, so turn that into the -march that
+ # gcc actually accepts. #528708
+ [[ ${t} == "x86_64" ]] && t="x86-64"
+ filter-flags '-march=*'
+ # ugly, ugly, ugly. ugly.
+ CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}")
+ export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
+ einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})"
+ fi
+ # For compatibility with older binaries at slight performance cost.
+ use stack-realign && export CFLAGS_x86+=" -mstackrealign"
+ fi
+ ;;
+ mips)
+ # The mips abi cannot support the GNU style hashes. #233233
+ filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
+ ;;
+ ppc|ppc64)
+ # Many arch-specific implementations do not work on ppc with
+ # cache-block not equal to 128 bytes. This breaks memset:
+ # https://sourceware.org/PR26522
+ # https://bugs.gentoo.org/737996
+ # Use default -mcpu=. For ppc it means non-multiarch setup.
+ filter-flags '-mcpu=*'
+ ;;
+ sparc)
+ # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
+ filter-flags "-fcall-used-g7"
+ append-flags "-fcall-used-g6"
+
+ local cpu
+ case ${CTARGET} in
+ sparc64-*)
+ cpu="sparc64"
+ case $(get-flag mcpu) in
+ v9)
+ # We need to force at least v9a because the base build doesn't
+ # work with just v9.
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
+ append-flags "-Wa,-xarch=v9a"
+ ;;
+ esac
+ ;;
+ sparc-*)
+ case $(get-flag mcpu) in
+ v8|supersparc|hypersparc|leon|leon3)
+ cpu="sparcv8"
+ ;;
+ *)
+ cpu="sparcv9"
+ ;;
+ esac
+ ;;
+ esac
+ [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
+ ;;
+ esac
+}
+
+setup_flags() {
+ # Make sure host make.conf doesn't pollute us
+ if is_crosscompile || tc-is-cross-compiler ; then
+ CHOST=${CTARGET} strip-unsupported-flags
+ fi
+
+ # Store our CFLAGS because it's changed depending on which CTARGET
+ # we are building when pulling glibc on a multilib profile
+ CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
+ CFLAGS=${CFLAGS_BASE}
+ CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
+ CXXFLAGS=${CXXFLAGS_BASE}
+ ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
+ ASFLAGS=${ASFLAGS_BASE}
+
+ # Allow users to explicitly avoid flag sanitization via
+ # USE=custom-cflags.
+ if ! use custom-cflags; then
+ # Over-zealous CFLAGS can often cause problems. What may work for one
+ # person may not work for another. To avoid a large influx of bugs
+ # relating to failed builds, we strip most CFLAGS out to ensure as few
+ # problems as possible.
+ strip-flags
+
+ # Allow -O2 and -O3, but nothing else for now.
+ # TODO: Test -Os, -Oz.
+ if ! is-flagq '-O@(2|3)' ; then
+ # Lock glibc at -O2. We want to be conservative here.
+ filter-flags '-O?'
+ append-flags -O2
+ fi
+ fi
+
+ strip-unsupported-flags
+ filter-lto
+ filter-flags -m32 -m64 '-mabi=*'
+
+ # glibc aborts if rpath is set by LDFLAGS
+ filter-ldflags '-Wl,-rpath=*'
+
+ # ld can't use -r & --relax at the same time, bug #788901
+ # https://sourceware.org/PR27837
+ filter-ldflags '-Wl,--relax'
+
+ # Flag added for cross-prefix, but causes ldconfig to segfault. Not needed
+ # anyway because glibc already handles this by itself.
+ filter-ldflags '-Wl,--dynamic-linker=*'
+
+ # Fails to link (bug #940709) in some cases but even if it manages to,
+ # subtle runtime breakage will occur because the linker scripts need
+ # adaptation. Mentioned in PR21557#c0.
+ filter-ldflags '-Wl,--gc-sections'
+
+ # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100
+ # we have to do that here already so mips can filter it out again :P
+ if use hash-sysv-compat ; then
+ append-ldflags '-Wl,--hash-style=both'
+ fi
+
+ # #492892
+ filter-flags -frecord-gcc-switches
+
+ # #898098
+ filter-flags -fno-builtin
+
+ # #798774
+ filter-flags -fno-semantic-interposition
+
+ # #829583
+ filter-lfs-flags
+
+ unset CBUILD_OPT CTARGET_OPT
+ if use multilib ; then
+ CTARGET_OPT=$(get_abi_CTARGET)
+ [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
+ fi
+
+ setup_target_flags
+
+ if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
+ CBUILD_OPT=${CTARGET_OPT}
+ fi
+
+ # glibc's headers disallow -O0 and fail at build time:
+ # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization"
+ # https://sourceware.org/glibc/wiki/FAQ#Why_do_I_get:.60.23error_.22glibc_cannot_be_compiled_without_optimization.22.27.2C_when_trying_to_compile_GNU_libc_with_GNU_CC.3F
+ replace-flags -O0 -O1
+
+ # glibc handles this internally already where it's appropriate;
+ # can't always have SSP when we're the ones setting it up, etc
+ filter-flags '-fstack-protector*'
+
+ # Similar issues as with SSP. Can't inject yourself that early.
+ filter-flags '-fsanitize=*'
+
+ # See end of bug #830454; we handle this via USE=cet
+ filter-flags '-fcf-protection=*'
+
+ # When bootstrapping, we may have a situation where
+ # CET-enabled gcc from seed is used to build CET-disabled
+ # glibc. As such, gcc implicitly enables CET if no
+ # -fcf-protection flag is passed. For a typical package it
+ # should not be a problem, but for glibc it matters as it is
+ # dealing with CET in ld.so. So if CET is supposed to be
+ # disabled for glibc, be explicit about it.
+ if ! use cet; then
+ case ${ABI}-${CTARGET} in
+ amd64-x86_64-*|x32-x86_64-*-*-gnux32)
+ append-flags '-fcf-protection=none'
+ ;;
+ arm64-aarch64*)
+ append-flags '-mbranch-protection=none'
+ ;;
+ esac
+ fi
+}
+
+use_multiarch() {
+ # Allow user to disable runtime arch detection in multilib.
+ use multiarch || return 1
+ # Make sure binutils is new enough to support indirect functions,
+ # #336792. This funky sed supports gold and bfd linkers.
+ local bver nver
+ bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}')
+ case $(tc-arch ${CTARGET}) in
+ amd64|x86) nver="2.20" ;;
+ arm) nver="2.22" ;;
+ hppa) nver="2.23" ;;
+ ppc|ppc64) nver="2.20" ;;
+ # ifunc support was added in 2.23, but glibc also needs
+ # machinemode which is in 2.24.
+ s390) nver="2.24" ;;
+ sparc) nver="2.21" ;;
+ *) return 1 ;;
+ esac
+ ver_test ${bver} -ge ${nver}
+}
+
+# Setup toolchain variables that had historically been defined in the
+# profiles for these archs.
+setup_env() {
+ # silly users
+ unset LD_RUN_PATH
+ unset LD_ASSUME_KERNEL
+
+ if is_crosscompile || tc-is-cross-compiler ; then
+ multilib_env ${CTARGET_OPT:-${CTARGET}}
+
+ if ! use multilib ; then
+ MULTILIB_ABIS=${DEFAULT_ABI}
+ else
+ MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
+ fi
+
+ # If the user has CFLAGS_<CTARGET> in their make.conf, use that,
+ # and fall back on CFLAGS.
+ local VAR=CFLAGS_${CTARGET//[-.]/_}
+ CFLAGS=${!VAR-${CFLAGS}}
+ einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}"
+ fi
+
+ setup_flags
+
+ export ABI=${ABI:-${DEFAULT_ABI:-default}}
+
+ if just_headers ; then
+ # Avoid mixing host's CC and target's CFLAGS_${ABI}:
+ # At this bootstrap stage we have only binutils for
+ # target but not compiler yet.
+ einfo "Skip CC ABI injection. We can't use (cross-)compiler yet."
+ return 0
+ fi
+
+ # glibc does not work with non-bfd (for various reasons):
+ # * gold (bug #269274)
+ # * mold (bug #860900)
+ tc-ld-force-bfd
+
+ if use doc ; then
+ export MAKEINFO=makeinfo
+ else
+ export MAKEINFO=/dev/null
+ fi
+
+ # Reset CC and CXX to the value at start of emerge
+ export CC=${glibc__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}}
+ export CXX=${glibc__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}}
+ export CPP=${glibc__ORIG_CPP:-${CPP:-$(tc-getCPP ${CTARGET})}}
+
+ # and make sure glibc__ORIG_CC and glibc__ORIG_CXX is defined now.
+ export glibc__ORIG_CC=${CC}
+ export glibc__ORIG_CXX=${CXX}
+ export glibc__ORIG_CPP=${CPP}
+
+ if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then
+ export glibc__force_gcc=yes
+ # once this is toggled on, it needs to stay on, since with CPP manipulated
+ # tc-is-clang does not work correctly anymore...
+ fi
+
+ if [[ ${glibc__force_gcc} == "yes" ]] ; then
+ # If we are running in an otherwise clang/llvm environment, we need to
+ # recover the proper gcc and binutils settings here, at least until glibc
+ # is finally building with clang. So let's override everything that is
+ # set in the clang profiles.
+ # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always
+ # a good start into that direction.
+ # Also, if you're crosscompiling, let's assume you know what you are doing.
+ # Hopefully.
+ # Last, we need the settings of the *build* environment, not of the
+ # target environment...
+
+ local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B)
+ local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B)
+ einfo "Overriding clang configuration, since it won't work here"
+
+ export CC="${current_gcc_path}/gcc"
+ export CPP="${current_gcc_path}/cpp"
+ export CXX="${current_gcc_path}/g++"
+ export LD="${current_binutils_path}/ld.bfd"
+ export AR="${current_binutils_path}/ar"
+ export AS="${current_binutils_path}/as"
+ export NM="${current_binutils_path}/nm"
+ export STRIP="${current_binutils_path}/strip"
+ export RANLIB="${current_binutils_path}/ranlib"
+ export OBJCOPY="${current_binutils_path}/objcopy"
+ export STRINGS="${current_binutils_path}/strings"
+ export OBJDUMP="${current_binutils_path}/objdump"
+ export READELF="${current_binutils_path}/readelf"
+ export ADDR2LINE="${current_binutils_path}/addr2line"
+
+ # do we need to also do flags munging here? yes! at least...
+ filter-flags '-fuse-ld=*'
+ filter-flags '-D_FORTIFY_SOURCE=*'
+
+ else
+
+ # this is the "normal" case
+
+ export CC="$(tc-getCC ${CTARGET})"
+ export CXX="$(tc-getCXX ${CTARGET})"
+ export CPP="$(tc-getCPP ${CTARGET})"
+
+ # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
+ # can't detect them automatically due to ${CHOST} mismatch and fallbacks
+ # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
+ export NM="$(tc-getNM ${CTARGET})"
+ export READELF="$(tc-getREADELF ${CTARGET})"
+
+ fi
+
+ # We need to export CFLAGS with abi information in them because glibc's
+ # configure script checks CFLAGS for some targets (like mips). Keep
+ # around the original clean value to avoid appending multiple ABIs on
+ # top of each other. (Why does the comment talk about CFLAGS if the code
+ # acts on CC?)
+ export glibc__GLIBC_CC=${CC}
+ export glibc__GLIBC_CXX=${CXX}
+ export glibc__GLIBC_CPP=${CPP}
+
+ export glibc__abi_CFLAGS="$(get_abi_CFLAGS)"
+
+ # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760
+ # To build .S (assembly) files with the same ABI-specific flags
+ # upstream currently recommends adding CFLAGS to CC/CXX:
+ # https://sourceware.org/PR23273
+ # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS
+ # and breaks multiarch support. See 659030#c3 for an example.
+ # The glibc configure script doesn't properly use LDFLAGS all the time.
+ export CC="${glibc__GLIBC_CC} ${glibc__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}"
+
+ # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
+ export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}"
+
+ export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS} ${CFLAGS}"
+
+ if is_crosscompile; then
+ # Assume worst-case bootstrap: glibc is built for the first time
+ # with ${CTARGET}-g++ not available yet. We avoid
+ # building auxiliary programs that require C++: bug #683074
+ # It should not affect final result.
+ export libc_cv_cxx_link_ok=no
+ # The line above has the same effect. We set CXX explicitly
+ # to make build logs less confusing.
+ export CXX=
+ fi
+}
+
+foreach_abi() {
+ setup_env
+
+ local ret=0
+ local abilist=""
+ if use multilib ; then
+ abilist=$(get_install_abis)
+ else
+ abilist=${DEFAULT_ABI}
+ fi
+ local -x ABI
+ for ABI in ${abilist:-default} ; do
+ setup_env
+ einfo "Running $1 for ABI ${ABI}"
+ $1
+ : $(( ret |= $? ))
+ done
+ return ${ret}
+}
+
+glibc_banner() {
+ local b="Gentoo ${PVR}"
+ [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" (patchset ${PATCH_VER})"
+ echo "${b}"
+}
+
+# The following Kernel version handling functions are mostly copied from portage
+# source. It's better not to use linux-info.eclass here since a) it adds too
+# much magic, see bug 326693 for some of the arguments, and b) some of the
+# functions are just not provided.
+
+g_get_running_KV() {
+ uname -r
+ return $?
+}
+
+g_KV_major() {
+ [[ -z $1 ]] && return 1
+ local KV=$@
+ echo "${KV%%.*}"
+}
+
+g_KV_minor() {
+ [[ -z $1 ]] && return 1
+ local KV=$@
+ KV=${KV#*.}
+ echo "${KV%%.*}"
+}
+
+g_KV_micro() {
+ [[ -z $1 ]] && return 1
+ local KV=$@
+ KV=${KV#*.*.}
+ echo "${KV%%[^[:digit:]]*}"
+}
+
+g_KV_to_int() {
+ [[ -z $1 ]] && return 1
+ local KV_MAJOR=$(g_KV_major "$1")
+ local KV_MINOR=$(g_KV_minor "$1")
+ local KV_MICRO=$(g_KV_micro "$1")
+ local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
+
+ # We make version 2.2.0 the minimum version we will handle as
+ # a sanity check ... if its less, we fail ...
+ if [[ ${KV_int} -ge 131584 ]] ; then
+ echo "${KV_int}"
+ return 0
+ fi
+ return 1
+}
+
+g_int_to_KV() {
+ local version=$1 major minor micro
+ major=$((version / 65536))
+ minor=$(((version % 65536) / 256))
+ micro=$((version % 256))
+ echo ${major}.${minor}.${micro}
+}
+
+eend_KV() {
+ [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]]
+ eend $?
+}
+
+get_kheader_version() {
+ printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
+ $(tc-getCPP ${CTARGET}) -I "${ESYSROOT}$(alt_headers)" - | \
+ tail -n 1
+}
+
+# We collect all sanity checks here. Consistency is not guranteed between
+# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
+# src_unpack.
+sanity_prechecks() {
+ # Prevent native builds from downgrading
+ if [[ ${MERGE_TYPE} != "buildonly" ]] && \
+ [[ -z ${ROOT} ]] && \
+ [[ ${CBUILD} == ${CHOST} ]] && \
+ [[ ${CHOST} == ${CTARGET} ]] ; then
+
+ # The high rev # is to allow people to downgrade between -r#
+ # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2
+ # should be fine. Hopefully we never actually use a r# this
+ # high.
+ if has_version ">${CATEGORY}/${P}-r10000" ; then
+ eerror "Sanity check to keep you from breaking your system:"
+ eerror " Downgrading glibc is not supported and a sure way to destruction."
+ [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
+ fi
+
+ if ! do_run_test '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n' ; then
+ eerror "Your old kernel is broken. You need to update it to a newer"
+ eerror "version as syscall(<bignum>) will break. See bug 279260."
+ die "Old and broken kernel."
+ fi
+ fi
+
+ if [[ ${CTARGET} == i386-* ]] ; then
+ eerror "i386 CHOSTs are no longer supported."
+ eerror "Chances are you don't actually want/need i386."
+ eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml"
+ die "Please fix your CHOST"
+ fi
+
+ if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
+ ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
+ ewarn "This will result in a 50% performance penalty when running with a 32bit"
+ ewarn "hypervisor, which is probably not what you want."
+ fi
+
+ # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
+ # we test for...
+ if ! is_crosscompile ; then
+ if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then
+ ebegin "Checking if the system can execute 32-bit binaries"
+ echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
+ local STAT
+ if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
+ "${T}/check-ia32-emulation.elf32"
+ STAT=$?
+ else
+ # Don't fail here to allow single->multi ABI switch
+ # or recover from breakage like bug #646424
+ ewarn "Failed to compile the ABI test. Broken host glibc?"
+ STAT=0
+ fi
+ rm -f "${T}/check-ia32-emulation.elf32"
+ eend $STAT
+ if [[ $STAT -ne 0 ]]; then
+ eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel."
+ eerror "Seek support otherwise."
+ die "Unable to execute 32-bit binaries"
+ fi
+ fi
+
+ fi
+
+ # When we actually have to compile something...
+ if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then
+ if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then
+ # bug #833620, bug #643302
+ eerror "Found ${ESYSROOT}/usr/lib/include directory!"
+ eerror "This is known to break glibc's build."
+ eerror "Please backup its contents then remove the directory."
+ die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!"
+ fi
+
+ if [[ ${CTARGET} == *-linux* ]] ; then
+ local run_kv build_kv want_kv
+
+ run_kv=$(g_get_running_KV)
+ build_kv=$(g_int_to_KV $(get_kheader_version))
+ want_kv=${MIN_KERN_VER}
+
+ if ! is_crosscompile && ! tc-is-cross-compiler ; then
+ # Building fails on an non-supporting kernel
+ ebegin "Checking running kernel version (${run_kv} >= ${want_kv})"
+ if ! eend_KV ${run_kv} ${want_kv} ; then
+ echo
+ eerror "You need a kernel of at least ${want_kv}!"
+ die "Kernel version too low!"
+ fi
+ fi
+
+ # Do not run this check for pkg_pretend, just pkg_setup and friends (if we ever get used there).
+ # It's plausible (seen it in the wild) that Portage will (correctly) schedule a linux-headers
+ # upgrade before glibc, but because pkg_pretend gets run before any packages are merged at all (not
+ # just glibc), the whole emerge gets aborted without a good reason. We probably don't
+ # need to run this check at all given we have a dependency on the right headers,
+ # but let's leave it as-is for now.
+ if [[ ${EBUILD_PHASE_FUNC} != pkg_pretend ]] ; then
+ ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})"
+ if ! eend_KV ${build_kv} ${want_kv} ; then
+ echo
+ eerror "You need linux-headers of at least ${want_kv}!"
+ die "linux-headers version too low!"
+ fi
+ fi
+ fi
+ fi
+}
+
+upgrade_warning() {
+ is_crosscompile && return
+
+ if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then
+ local oldv newv=$(ver_cut 1-2 ${PV})
+ for oldv in ${REPLACING_VERSIONS}; do
+ if ver_test ${oldv} -lt ${newv}; then
+ ewarn "After upgrading glibc, please restart all running processes."
+ ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)."
+ ewarn "Alternatively, reboot your system."
+ ewarn "(See bug #660556, bug #741116, bug #823756, etc)"
+ break
+ fi
+ done
+ fi
+}
+
+#
+# the phases
+#
+
+# pkg_pretend
+
+pkg_pretend() {
+ upgrade_warning
+}
+
+# pkg_setup
+
+pkg_setup() {
+ # see bug 682570
+ [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup
+}
+
+# src_unpack
+
+src_unpack() {
+ setup_env
+
+ einfo "Checking general environment sanity."
+ sanity_prechecks
+
+ use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
+
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patches || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack glibc-${PV}-patches-${PATCH_VER}.tar.xz
+ fi
+
+ cd "${WORKDIR}" || die
+ use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz
+}
+
+# src_prepare
+
+src_prepare() {
+ local patchsetname
+ if ! use vanilla ; then
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PV}-${PATCH_VER}"
+ fi
+ einfo "Applying Gentoo Glibc patchset ${patchsetname}"
+ eapply "${WORKDIR}"/patches
+ einfo "Done."
+ fi
+
+ default
+
+ gnuconfig_update
+
+ cd "${WORKDIR}" || die
+ find . -name configure -exec touch {} +
+
+ # Fix permissions on some of the scripts.
+ chmod u+x "${S}"/scripts/*.sh
+
+ cd "${S}" || die
+}
+
+# src_configure
+
+glibc_do_configure() {
+ dump_build_environment
+
+ local myconf=()
+
+ # Use '=strong' instead of '=all' to protect only functions
+ # worth protecting from stack smashes.
+ myconf+=( --enable-stack-protector=$(usex ssp strong no) )
+
+ # Keep a whitelist of targets supporting IFUNC. glibc's ./configure
+ # is not robust enough to detect proper support:
+ # https://bugs.gentoo.org/641216
+ # https://sourceware.org/PR22634#c0
+ case $(tc-arch ${CTARGET}) in
+ # Keep whitelist of targets where autodetection mostly works.
+ amd64|x86|sparc|ppc|ppc64|arm|arm64|s390|riscv|loong) ;;
+ # Blacklist everywhere else
+ *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
+ esac
+
+ case ${ABI}-${CTARGET} in
+ amd64-x86_64-*|x32-x86_64-*-*-gnux32) myconf+=( $(use_enable cet) ) ;;
+ *) ;;
+ esac
+
+ [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
+
+ myconf+=( --enable-kernel=${MIN_KERN_VER} )
+
+ # Since SELinux support is only required for nscd, only enable it if:
+ # 1. USE selinux
+ # 2. only for the primary ABI on multilib systems
+ # 3. Not a crosscompile
+ if ! is_crosscompile && use selinux ; then
+ if use multilib ; then
+ if is_final_abi ; then
+ myconf+=( --with-selinux )
+ else
+ myconf+=( --without-selinux )
+ fi
+ else
+ myconf+=( --with-selinux )
+ fi
+ else
+ myconf+=( --without-selinux )
+ fi
+
+ # Force a few tests where we always know the answer but
+ # configure is incapable of finding it.
+ if is_crosscompile ; then
+ export \
+ libc_cv_c_cleanup=yes \
+ libc_cv_forced_unwind=yes
+ fi
+
+ myconf+=(
+ --disable-werror
+ --enable-bind-now
+ --enable-fortify-source
+ --build=${CBUILD_OPT:-${CBUILD}}
+ --host=${CTARGET_OPT:-${CTARGET}}
+ $(use_enable profile)
+ $(use_with gd)
+ --with-headers="${ESYSROOT}$(alt_headers)"
+ --prefix="$(host_eprefix)/usr"
+ --sysconfdir="$(host_eprefix)/etc"
+ --localstatedir="$(host_eprefix)/var"
+ --libdir='$(prefix)'/$(get_libdir)
+ --mandir='$(prefix)'/share/man
+ --infodir='$(prefix)'/share/info
+ --libexecdir='$(libdir)'/misc/glibc
+ --with-bugurl=https://bugs.gentoo.org/
+ --with-pkgversion="$(glibc_banner)"
+ $(use_multiarch || echo --disable-multi-arch)
+ $(use_enable systemtap)
+ $(use_enable nscd)
+
+ # /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if
+ # Perl hasn't been installed inside the prefix yet and configure picks
+ # up a Perl from outside the prefix instead. configure will fail to
+ # execute Perl during configure if we're cross-compiling a prefix, but
+ # it will just disable mtrace in that case.
+ # Note: mtrace is needed by the test suite.
+ ac_cv_path_PERL="$(usex perl "${EPREFIX}"/usr/bin/perl $(usex test "${EPREFIX}"/usr/bin/perl $(usex doc "${EPREFIX}"/usr/bin/perl no)))"
+
+ # locale data is arch-independent
+ # https://bugs.gentoo.org/753740
+ libc_cv_complocaledir='${exec_prefix}/lib/locale'
+
+ # On aarch64 there is no way to override -mcpu=native, and if
+ # the current cpu does not support SVE configure fails.
+ # Let's boldly assume our toolchain can always build SVE instructions.
+ libc_cv_aarch64_sve_asm=yes
+
+ ${EXTRA_ECONF}
+ )
+
+ # We rely on sys-libs/timezone-data for timezone tools normally.
+ myconf+=( $(use_enable vanilla timezone-tools) )
+
+ # These libs don't have configure flags.
+ ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
+ ac_cv_lib_cap_cap_init=$(usex caps || echo no)
+
+ # There is no configure option for this and we need to export it
+ # since the glibc build will re-run configure on itself
+ export libc_cv_rootsbindir="$(host_eprefix)/sbin"
+ export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)"
+
+ local builddir=$(builddir nptl)
+ mkdir -p "${builddir}"
+ cd "${builddir}"
+ set -- "${S}"/configure "${myconf[@]}"
+ echo "$@"
+ "$@" || die "failed to configure glibc"
+
+ # If we're trying to migrate between ABI sets, we need
+ # to lie and use a local copy of gcc. Like if the system
+ # is built with MULTILIB_ABIS="amd64 x86" but we want to
+ # add x32 to it, gcc/glibc don't yet support x32.
+ #
+ if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then
+ echo 'int main(void){}' > "${T}"/test.c || die
+ if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
+ sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
+ fi
+ fi
+}
+
+glibc_headers_configure() {
+ export ABI=default
+
+ local builddir=$(builddir "headers")
+ mkdir -p "${builddir}"
+ cd "${builddir}"
+
+ # if we don't have a compiler yet, we can't really test it now ...
+ # hopefully they don't affect header generation, so let's hope for
+ # the best here ...
+ local v vars=(
+ ac_cv_header_cpuid_h=yes
+ libc_cv_{386,390,alpha,arm,hppa,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
+ libc_cv_asm_cfi_directives=yes
+ libc_cv_broken_visibility_attribute=no
+ libc_cv_c_cleanup=yes
+ libc_cv_compiler_powerpc64le_binary128_ok=yes
+ libc_cv_forced_unwind=yes
+ libc_cv_gcc___thread=yes
+ libc_cv_mlong_double_128=yes
+ libc_cv_mlong_double_128ibm=yes
+ libc_cv_ppc_machine=yes
+ libc_cv_ppc_rel16=yes
+ libc_cv_predef_fortify_source=no
+ libc_cv_target_power8_ok=yes
+ libc_cv_visibility_attribute=yes
+ libc_cv_z_combreloc=yes
+ libc_cv_z_execstack=yes
+ libc_cv_z_initfirst=yes
+ libc_cv_z_nodelete=yes
+ libc_cv_z_nodlopen=yes
+ libc_cv_z_relro=yes
+ libc_mips_abi=${ABI}
+ libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
+ # These libs don't have configure flags.
+ ac_cv_lib_audit_audit_log_user_avc_message=no
+ ac_cv_lib_cap_cap_init=no
+ )
+
+ einfo "Forcing cached settings:"
+ for v in "${vars[@]}" ; do
+ einfo " ${v}"
+ export ${v}
+ done
+
+ local headers_only_arch_CPPFLAGS=()
+
+ # Blow away some random CC settings that screw things up. #550192
+ if [[ -d ${S}/sysdeps/mips ]]; then
+ pushd "${S}"/sysdeps/mips >/dev/null
+ sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
+ sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
+
+ # Force the mips ABI to the default. This is OK because the set of
+ # installed headers in this phase is the same between the 3 ABIs.
+ # If this ever changes, this hack will break, but that's unlikely
+ # as glibc discourages that behavior.
+ # https://crbug.com/647033
+ sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
+
+ popd >/dev/null
+ fi
+
+ local myconf=()
+
+ case ${CTARGET} in
+ aarch64*)
+ # The configure checks fail during cross-build, so disable here
+ # for headers-only
+ myconf+=(
+ --disable-mathvec
+ ) ;;
+ riscv*)
+ # RISC-V interrogates the compiler to determine which target to
+ # build. If building the headers then we don't strictly need a
+ # RISC-V compiler, so the built-in definitions that are provided
+ # along with all RISC-V compiler might not exist. This causes
+ # glibc's RISC-V preconfigure script to blow up. Since we're just
+ # building the headers any value will actually work here, so just
+ # pick the standard one (rv64g/lp64d) to make the build scripts
+ # happy for now -- the headers are all the same anyway so it
+ # doesn't matter.
+ headers_only_arch_CPPFLAGS+=(
+ -D__riscv_xlen=64
+ -D__riscv_flen=64
+ -D__riscv_float_abi_double=1
+ -D__riscv_atomic=1
+ ) ;;
+ esac
+
+ myconf+=(
+ --disable-sanity-checks
+ --enable-hacker-mode
+ --disable-werror
+ --enable-bind-now
+ --build=${CBUILD_OPT:-${CBUILD}}
+ --host=${CTARGET_OPT:-${CTARGET}}
+ --with-headers="${ESYSROOT}$(alt_headers)"
+ --prefix="$(host_eprefix)/usr"
+ ${EXTRA_ECONF}
+ )
+
+ # Nothing is compiled here which would affect the headers for the target.
+ # So forcing CC/CFLAGS is sane.
+ local headers_only_CC=$(tc-getBUILD_CC)
+ local headers_only_CFLAGS="-O1 -pipe"
+ local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}"
+ local headers_only_LDFLAGS=""
+ set -- "${S}"/configure "${myconf[@]}"
+ echo \
+ "CC=${headers_only_CC}" \
+ "CFLAGS=${headers_only_CFLAGS}" \
+ "CPPFLAGS=${headers_only_CPPFLAGS}" \
+ "LDFLAGS=${headers_only_LDFLAGS}" \
+ "$@"
+ CC=${headers_only_CC} \
+ CFLAGS=${headers_only_CFLAGS} \
+ CPPFLAGS=${headers_only_CPPFLAGS} \
+ LDFLAGS="" \
+ "$@" || die "failed to configure glibc"
+}
+
+do_src_configure() {
+ if just_headers ; then
+ glibc_headers_configure
+ else
+ glibc_do_configure nptl
+ fi
+}
+
+src_configure() {
+ foreach_abi do_src_configure
+}
+
+# src_compile
+
+do_src_compile() {
+ emake -C "$(builddir nptl)"
+}
+
+src_compile() {
+ if just_headers ; then
+ return
+ fi
+
+ foreach_abi do_src_compile
+}
+
+# src_test
+
+glibc_src_test() {
+ cd "$(builddir nptl)"
+
+ local myxfailparams=""
+ if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
+ local virt=$(systemd-detect-virt 2>/dev/null)
+ if [[ ${virt} == systemd-nspawn ]] ; then
+ ewarn "Skipping extra tests because in systemd-nspawn container"
+ XFAIL_TEST_LIST+=( "${XFAIL_NSPAWN_TEST_LIST[@]}" )
+ fi
+ if [[ "$(nice)" == "19" ]] ; then
+ # Expects to be able to increase niceness, which it can't do if
+ # already at the highest nice value
+ XFAIL_TEST_LIST+=( "tst-nice" )
+ fi
+
+ for myt in ${XFAIL_TEST_LIST[@]} ; do
+ myxfailparams+="test-xfail-${myt}=yes "
+ done
+ fi
+
+ # sandbox does not understand unshare() and prevents
+ # writes to /proc/, which makes many tests fail
+
+ # we give the tests a bit more time to avoid spurious
+ # bug reports on slow arches
+
+ SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check
+}
+
+src_test() {
+ if just_headers ; then
+ return
+ fi
+
+ foreach_abi glibc_src_test || die "tests failed"
+}
+
+# src_install
+
+run_locale_gen() {
+ # if the host locales.gen contains no entries, we'll install everything
+ local root="$1"
+ local inplace=""
+
+ if [[ "${root}" == "--inplace-glibc" ]] ; then
+ inplace="--inplace-glibc"
+ root="$2"
+ fi
+
+ local locale_list="${root%/}/etc/locale.gen"
+
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
+ [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
+ locale_list="${root%/}/usr/share/i18n/SUPPORTED"
+ fi
+
+ # bug 736794: we need to be careful with the parallelization... the number of
+ # processors saved in the environment of a binary package may differ strongly
+ # from the number of processes available during postinst
+ local mygenjobs="$(makeopts_jobs)"
+ if [[ "${EMERGE_FROM}" == "binary" ]] ; then
+ mygenjobs="$(nproc)"
+ fi
+
+ set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \
+ --destdir "${root}"
+ echo "$@"
+ "$@"
+
+ popd >/dev/null
+}
+
+glibc_do_src_install() {
+ local builddir=$(builddir nptl)
+ cd "${builddir}"
+
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
+
+ # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
+ # which come without headers etc. Only needed for binary packages since the
+ # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
+ find "${D}" -name "libnsl.a" -delete
+ find "${D}" -name "libnsl.so" -delete
+
+ # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
+ # to infer upstream version:
+ # '#define VERSION "2.26.90"' -> '2.26.90'
+ local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
+
+ # Avoid stripping binaries not targeted by ${CHOST}. Or else
+ # ${CHOST}-strip would break binaries build for ${CTARGET}.
+ is_crosscompile && dostrip -x /
+
+ # gdb thread introspection relies on local libpthreads symbols. stripping breaks it
+ # See Note [Disable automatic stripping]
+ dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
+ # valgrind requires knowledge about ld.so symbols.
+ dostrip -x $(alt_libdir)/ld-*.so*
+
+ if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
+ # Move versioned .a file out of libdir to evade portage QA checks
+ # instead of using gen_usr_ldscript(). We fix ldscript as:
+ # "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..."
+ sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" \
+ "${ED}"/$(alt_usrlibdir)/libm.a || die
+ dodir $(alt_usrlibdir)/${P}
+ mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a \
+ "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
+ fi
+
+ # We configure toolchains for standalone prefix systems with a sysroot,
+ # which is prepended to paths in ld scripts, so strip the prefix from these.
+ # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) )
+ # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )
+ if [[ -n $(host_eprefix) ]] ; then
+ local file
+ grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do
+ sed -i "s|$(host_eprefix)/|/|g" "${file}" || die
+ done
+ fi
+
+ # We'll take care of the cache ourselves
+ rm -f "${ED}"/etc/ld.so.cache
+
+ # Everything past this point just needs to be done once ...
+ is_final_abi || return 0
+
+ # Make sure the non-native interp can be found on multilib systems even
+ # if the main library set isn't installed into the right place. Maybe
+ # we should query the active gcc for info instead of hardcoding it ?
+ local i ldso_abi ldso_name
+ local ldso_abi_list=(
+ # x86
+ amd64 /lib64/ld-linux-x86-64.so.2
+ x32 /libx32/ld-linux-x32.so.2
+ x86 /lib/ld-linux.so.2
+ # mips
+ o32 /lib/ld.so.1
+ n32 /lib32/ld.so.1
+ n64 /lib64/ld.so.1
+ # powerpc
+ ppc /lib/ld.so.1
+ # riscv
+ ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
+ ilp32 /lib/ld-linux-riscv32-ilp32.so.1
+ lp64d /lib/ld-linux-riscv64-lp64d.so.1
+ lp64 /lib/ld-linux-riscv64-lp64.so.1
+ # s390
+ s390 /lib/ld.so.1
+ s390x /lib/ld64.so.1
+ # sparc
+ sparc32 /lib/ld-linux.so.2
+ sparc64 /lib64/ld-linux.so.2
+ )
+ case $(tc-endian) in
+ little)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
+ )
+ ;;
+ big)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
+ )
+ ;;
+ esac
+ if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
+ fi
+ for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
+ ldso_abi=${ldso_abi_list[i]}
+ has ${ldso_abi} $(get_install_abis) || continue
+
+ ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
+ if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
+ dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
+ fi
+ done
+
+ # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that require this.
+ # However, binary commercial packages are known to adhere to weird practices.
+ # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
+ # With devpts under Linux mounted properly, we do not need the pt_chown
+ # binary to be setuid. This is because the default owners/perms will be
+ # exactly what we want.
+ if ! use suid ; then
+ find "${ED}" -name pt_chown -exec chmod -s {} +
+ fi
+
+ #################################################################
+ # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
+ #################################################################
+
+ # Make sure we install some symlink hacks so that when we build
+ # a 2nd stage cross-compiler, gcc finds the target system
+ # headers correctly. See gcc/doc/gccinstall.info
+ if is_crosscompile ; then
+ # We need to make sure that /lib and /usr/lib always exists.
+ # gcc likes to use relative paths to get to its multilibs like
+ # /usr/lib/../lib64/. So while we don't install any files into
+ # /usr/lib/, we do need it to exist.
+ keepdir $(alt_prefix)/lib
+ keepdir $(alt_prefix)/usr/lib
+
+ dosym usr/include $(alt_prefix)/sys-include
+ return 0
+ fi
+
+ # Files for Debian-style locale updating
+ dodir /usr/share/i18n
+ sed \
+ -e "/^#/d" \
+ -e "/SUPPORTED-LOCALES=/d" \
+ -e "s: \\\\::g" -e "s:/: :g" \
+ "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
+ || die "generating /usr/share/i18n/SUPPORTED failed"
+
+ cd "${S}" || die
+
+ # Install misc network config files
+ insinto /etc
+ doins posix/gai.conf
+
+ if use systemd ; then
+ doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf"
+ else
+ doins nss/nsswitch.conf
+ fi
+
+ # Gentoo-specific
+ newins "${FILESDIR}"/host.conf-1 host.conf
+
+ if use nscd ; then
+ doins nscd/nscd.conf
+
+ newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd
+
+ local nscd_args=(
+ -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
+ )
+
+ sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
+
+ use systemd && systemd_dounit nscd/nscd.service
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
+ fi
+
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
+ doenvd "${T}"/00glibc
+
+ for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
+ [[ -s ${d} ]] && dodoc ${d}
+ done
+ dodoc -r ChangeLog.old
+
+ # Prevent overwriting of the /etc/localtime symlink. We'll handle the
+ # creation of the "factory" symlink in pkg_postinst().
+ rm -f "${ED}"/etc/localtime
+
+ # Generate all locales if this is a native build as locale generation
+ if use compile-locales && ! is_crosscompile ; then
+ run_locale_gen --inplace-glibc "${ED}/"
+ fi
+}
+
+glibc_headers_install() {
+ local builddir=$(builddir "headers")
+ cd "${builddir}"
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
+
+ insinto $(alt_headers)/gnu
+ doins "${S}"/include/gnu/stubs.h
+
+ # Make sure we install the sys-include symlink so that when
+ # we build a 2nd stage cross-compiler, gcc finds the target
+ # system headers correctly. See gcc/doc/gccinstall.info
+ dosym usr/include $(alt_prefix)/sys-include
+}
+
+src_install() {
+ if just_headers ; then
+ export ABI=default
+ glibc_headers_install
+ return
+ fi
+
+ foreach_abi glibc_do_src_install
+
+ if ! use static-libs ; then
+ einfo "Not installing static glibc libraries"
+ find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
+ fi
+}
+
+# Simple test to make sure our new glibc isn't completely broken.
+# Make sure we don't test with statically built binaries since
+# they will fail. Also, skip if this glibc is a cross compiler.
+#
+# If coreutils is built with USE=multicall, some of these files
+# will just be wrapper scripts, not actual ELFs we can test.
+glibc_sanity_check() {
+ cd / #228809
+
+ # We enter ${ED} so to avoid trouble if the path contains
+ # special characters; for instance if the path contains the
+ # colon character (:), then the linker will try to split it
+ # and look for the libraries in an unexpected place. This can
+ # lead to unsafe code execution if the generated prefix is
+ # within a world-writable directory.
+ # (e.g. /var/tmp/portage:${HOSTNAME})
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ # first let's find the actual dynamic linker here
+ # symlinks may point to the wrong abi
+ local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit)
+
+ einfo Last-minute run tests with ${newldso} in /$(get_libdir) ...
+
+ local x striptest
+ for x in cal date env free ls true uname uptime ; do
+ x=$(type -p ${x})
+ [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
+ striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
+ case ${striptest} in
+ *"statically linked"*) continue;;
+ *"ASCII text"*) continue;;
+ esac
+ # We need to clear the locale settings as the upgrade might want
+ # incompatible locale data. This test is not for verifying that.
+ LC_ALL=C \
+ ${newldso} --library-path . ${x} > /dev/null \
+ || die "simple run test (${x}) failed"
+ done
+
+ popd >/dev/null
+}
+
+pkg_preinst() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ einfo "Checking general environment sanity."
+ sanity_prechecks
+
+ # prepare /etc/ld.so.conf.d/ for files
+ mkdir -p "${EROOT}"/etc/ld.so.conf.d
+
+ # Default /etc/hosts.conf:multi to on for systems with small dbs.
+ if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
+ sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
+ einfo "Defaulting /etc/host.conf:multi to on"
+ fi
+
+ [[ -n ${ROOT} ]] && return 0
+ [[ -d ${ED}/$(get_libdir) ]] || return 0
+ [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
+
+ if [[ -L ${EROOT}/usr/lib/locale ]]; then
+ # Help portage migrate this to a directory
+ # https://bugs.gentoo.org/753740
+ rm "${EROOT}"/usr/lib/locale || die
+ fi
+
+ # Keep around libcrypt so that Perl doesn't break when merging libxcrypt
+ # (libxcrypt is the new provider for now of libcrypt.so.{1,2}).
+ # bug #802207
+ if has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then
+ PRESERVED_OLD_LIBCRYPT=1
+ cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" \
+ "${T}/libcrypt$(get_libname 1)" || die
+ else
+ PRESERVED_OLD_LIBCRYPT=0
+ fi
+}
+
+glibc_refresh_ldconfig() {
+ if [[ ${MERGE_TYPE} == buildonly ]]; then
+ return
+ fi
+
+ # Version check could be added to avoid unnecessary work, but ldconfig
+ # should finish quickly enough to not matter.
+ ebegin "Refreshing ld.so.cache"
+ ldconfig -i
+ if ! eend $?; then
+ ewarn "Failed to refresh the ld.so.cache for you. Some programs may be broken"
+ ewarn "before you manually do so (ldconfig -i)."
+ fi
+}
+
+pkg_postinst() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then
+ # Generate fastloading iconv module configuration file.
+ "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/"
+ fi
+
+ if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
+ # glibc-2.38+ on loong has ldconfig support added, but the ELF e_flags
+ # handling has changed as well, which means stale ldconfig auxiliary
+ # cache entries and failure to lookup libgcc_s / libstdc++ (breaking
+ # every C++ application) / libgomp etc., among other breakages.
+ #
+ # To fix this, simply refresh the ld.so.cache without using the
+ # auxiliary cache if we're natively installing on loong. This should
+ # be done relatively soon because we want to minimize the breakage
+ # window for the affected programs.
+ use loong && glibc_refresh_ldconfig
+
+ use compile-locales || run_locale_gen "${EROOT}/"
+
+ # If fixincludes was/is active for a particular GCC slot, we
+ # must refresh it. See bug #933282 and GCC's documentation:
+ # https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html
+ #
+ # TODO: Could this be done for non-cross? Some care would be needed
+ # to pass the right arguments.
+ while IFS= read -r -d $'\0' slot ; do
+ local mkheaders_path="${BROOT}"/usr/libexec/gcc/${CBUILD}/${slot##*/}/install-tools/mkheaders
+ local pthread_h="${BROOT}"/usr/lib/gcc/${CBUILD}/${slot##*/}/include-fixed/pthread.h
+ if [[ -x ${mkheaders_path} ]] ; then
+ ebegin "Refreshing fixincludes for ${CBUILD} with gcc-${slot##*/}"
+ ${mkheaders_path} -v
+ eend $?
+ elif [[ -f ${pthread_h} ]] ; then
+ # fixincludes might have been enabled in the past for this
+ # GCC slot but not since we fixed toolchain.eclass to install
+ # mkheaders, so we need to manually delete pthread.h at least.
+ ebegin "Deleting stale fixincludes'd pthread.h for ${CBUILD} with gcc-${slot##*/}"
+ mv -v "${pthread_h}" "${pthread_h}.bak"
+ eend $?
+ fi
+ done < <(find "${BROOT}"/usr/libexec/gcc/${CBUILD}/ -mindepth 1 -maxdepth 1 -type d -print0)
+ fi
+
+ upgrade_warning
+
+ # Check for sanity of /etc/nsswitch.conf, take 2
+ if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
+ local entry
+ for entry in passwd group shadow; do
+ if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
+ ewarn ""
+ ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been"
+ ewarn "removed from glibc and is now provided by the package"
+ ewarn " sys-auth/libnss-nis"
+ ewarn "Install it now to keep your NIS setup working."
+ ewarn ""
+ fi
+ done
+ fi
+
+ if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then
+ cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die
+ preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1)
+
+ elog "Please ignore a possible later error message about a file collision involving"
+ elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep"
+ elog "the upgrade working, but it also needs to be overwritten when"
+ elog "sys-libs/libxcrypt is installed. See bug 802210 for more details."
+ fi
+}
diff --git a/sys-libs/libxcrypt/Manifest b/sys-libs/libxcrypt/Manifest
index 4544e53b3868..15898728b7db 100644
--- a/sys-libs/libxcrypt/Manifest
+++ b/sys-libs/libxcrypt/Manifest
@@ -1,6 +1,5 @@
AUX libxcrypt-4.4.19-multibuild.patch 303 BLAKE2B cd342eef2a8ce3e305e544d37373370748690878b4171709028b7b894ad2c76c9188496ab089a46645ad6f9fca09fa4f89cdcb444e1400747ee358c079441661 SHA512 3cbd4bbd0827801faaaa2198eccccb285100cdfc43525b70816121aa70b32dc2c8479c53e16b9e99920926b1b11014dcc19909c4f72a09d9d19fcdb0fa6350cd
DIST libxcrypt-4.4.36-autotools.tar.xz 624660 BLAKE2B 8dc3d0f354baf8c64dc011e95e7df10d48b0dfe428503936ffd55edf2745de04003c7efe231ed5d9a14cea7f682ba377b7e00f0463b4060c50c9c29f555b790f SHA512 fb8391ecb89622eb0d74d13c5fc1369718e83c47671449044ca0c2f78a236d7b06177a60bf8cda47694caa840c68eaaf0b23690e8975fa5d64b734c8eb246d10
-EBUILD libxcrypt-4.4.36-r2.ebuild 9077 BLAKE2B 09a3d627d925440c17e5c4508c607c874293111030ab55112abee65da2d509489af0550c4a3700435c3d2c3ff896e1fa0b2f09910eb89f74de1d68f9473be711 SHA512 8acfca5b1f9b8bf4a2c05ccbb6f0332a450a3e30cf9c44ada9a2fa4f9cdf3e64f4561d7655287f12fdda59daa136dbf3d8a5c50c73536c0c125cbed95986f533
EBUILD libxcrypt-4.4.36-r3.ebuild 6517 BLAKE2B b822ee679e02beac72e630d061743c13a75b57ee2ff11d80a74160737fb1307818821796a6d68b404657b612637b1fd6fcd850105ede2ca5e479192d164a111b SHA512 5070b6177f037f5efda0ffd2867497c7ad09ad480afc37a2fdc74ba816cbed7154820f4303f4784d5e4467d422f939ecd62d073c5cb5b24d9ebdabcc46701a58
EBUILD libxcrypt-4.4.36.ebuild 9270 BLAKE2B 4c8a349c1b5496f0727476fcec727fb9c348ec09389d9caf7e1a4a09e32cf478f74ed8d4c4e71fcc6aae7c87348f150316c22354fe317cc5be38b76601c4d1f3 SHA512 ae10a1021720bd168fd7029024a8ddf5a009deb056a013ff38943f1fee38c101ea4e6b1c3d03b8e7e2606f260e1bf36e13a35e7248e92f924b254090f52c469b
MISC metadata.xml 913 BLAKE2B c2b3f52bd72bb46b0de4eb4a5f47dcb3aacfd248b811bcdc88db88c6f9cbe3ed1af4fda3e643b350fd22131273af03f2f888d78d306f0f7274d9432eb65075a3 SHA512 0ebbc3c2aa661f1a40e7f654384a395662b1b0235f145c7778b7b86bfb65ad09d4e8900bc6ede94413f057e769397c355bfd1bcafe8540acbf7e00e5451400c9
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild
deleted file mode 100644
index 514363772010..000000000000
--- a/sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild
+++ /dev/null
@@ -1,335 +0,0 @@
-# Copyright 2004-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..11} )
-# NEED_BOOTSTRAP is for developers to quickly generate a tarball
-# for publishing to the tree.
-NEED_BOOTSTRAP="no"
-inherit multibuild multilib python-any-r1 flag-o-matic toolchain-funcs multilib-minimal
-
-DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others"
-HOMEPAGE="https://github.com/besser82/libxcrypt"
-if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then
- inherit autotools
- SRC_URI="https://github.com/besser82/libxcrypt/releases/download/v${PV}/${P}.tar.xz"
-else
- SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-autotools.tar.xz"
-fi
-
-LICENSE="LGPL-2.1+ public-domain BSD BSD-2"
-SLOT="0/1"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="+compat split-usr static-libs +system test headers-only"
-REQUIRED_USE="split-usr? ( system )"
-RESTRICT="!test? ( test )"
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-is_cross() {
- local enabled_abis=( $(multilib_get_enabled_abis) )
- [[ "${#enabled_abis[@]}" -le 1 ]] && [[ ${CHOST} != ${CTARGET} ]]
-}
-
-DEPEND="
- system? (
- elibc_glibc? (
- ${CATEGORY}/glibc[-crypt(-)]
- !${CATEGORY}/glibc[crypt(-)]
- )
- elibc_musl? (
- ${CATEGORY}/musl[-crypt(+)]
- !${CATEGORY}/musl[crypt(+)]
- )
- )
-"
-RDEPEND="${DEPEND}"
-BDEPEND="
- dev-lang/perl
- test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') )
-"
-
-python_check_deps() {
- python_has_version "dev-python/passlib[${PYTHON_USEDEP}]"
-}
-
-pkg_pretend() {
- if has "distcc" ${FEATURES} ; then
- ewarn "Please verify all distcc nodes are using the same versions of GCC (>= 10) and Binutils!"
- ewarn "Older/mismatched versions of GCC may lead to a misbehaving library: bug #823179."
-
- if [[ ${BUILD_TYPE} != "binary" ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]] ; then
- die "libxcrypt is known to fail to build or be broken at runtime with < GCC 10 (bug #823179)!"
- fi
- fi
-}
-
-pkg_setup() {
- MULTIBUILD_VARIANTS=(
- $(usev compat 'xcrypt_compat')
- xcrypt_nocompat
- )
-
- use test && python-any-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # WARNING: Please read on bumping or applying patches!
- #
- # There are two circular dependencies to be aware of:
- # 1)
- # if we're bootstrapping configure and makefiles:
- # libxcrypt -> automake -> perl -> libxcrypt
- #
- # mitigation:
- # toolchain@ manually runs `make dist` after running autoconf + `./configure`
- # and the ebuild uses that.
- # (Don't include the pre-generated Perl artefacts.)
- #
- # solution for future:
- # Upstream are working on producing `make dist` tarballs.
- # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573
- #
- # 2)
- # configure *unconditionally* needs Perl at build time to generate
- # a list of enabled algorithms based on the set passed to `configure`:
- # libxcrypt -> perl -> libxcrypt
- #
- # mitigation:
- # None at the moment.
- #
- # solution for future:
- # Not possible right now. Upstream intend on depending on Perl for further
- # configuration options.
- # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573
- #
- # Therefore, on changes (inc. bumps):
- # * You must check whether upstream have started providing tarballs with bootstrapped
- # auto{conf,make};
- #
- # * diff the build system changes!
- #
- if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then
- # Facilitate our split variant build for compat + non-compat
- eapply "${FILESDIR}"/${PN}-4.4.19-multibuild.patch
- eautoreconf
- fi
-}
-
-src_configure() {
- # Avoid possible "illegal instruction" errors with gold
- # bug #821496
- tc-ld-disable-gold
-
- # Doesn't work with LTO: bug #852917.
- # https://github.com/besser82/libxcrypt/issues/24
- filter-lto
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- multibuild_foreach_variant multilib-minimal_src_configure
-}
-
-get_xcprefix() {
- if is_cross; then
- echo "${EPREFIX}/usr/${CTARGET}"
- else
- echo "${EPREFIX}"
- fi
-}
-
-get_xclibdir() {
- printf -- "%s/%s/%s/%s\n" \
- "$(get_xcprefix)" \
- "$(usev !split-usr '/usr')" \
- "$(get_libdir)" \
- "$(usev !system 'xcrypt')"
-}
-
-get_xcincludedir() {
- printf -- "%s/usr/include/%s\n" \
- "$(get_xcprefix)" \
- "$(usev !system 'xcrypt')"
-}
-
-get_xcmandir() {
- printf -- "%s/usr/share/man\n" \
- "$(get_xcprefix)"
-}
-
-get_xcpkgconfigdir() {
- printf -- "%s/usr/%s/pkgconfig\n" \
- "$(get_xcprefix)" \
- "$(get_libdir)"
-}
-
-multilib_src_configure() {
- local -a myconf=(
- --host=${CTARGET}
- --disable-werror
- --libdir=$(get_xclibdir)
- --with-pkgconfigdir=$(get_xcpkgconfigdir)
- --includedir=$(get_xcincludedir)
- --mandir="$(get_xcmandir)"
- )
-
- tc-export PKG_CONFIG
-
- if is_cross; then
- if tc-is-clang; then
- export CC="${CTARGET}-clang"
- else
- export CC="${CTARGET}-gcc"
- fi
- fi
-
- case "${MULTIBUILD_ID}" in
- xcrypt_compat-*)
- myconf+=(
- --disable-static
- --disable-xcrypt-compat-files
- --enable-obsolete-api=yes
- )
- ;;
- xcrypt_nocompat-*)
- myconf+=(
- --enable-obsolete-api=no
- $(use_enable static-libs static)
- )
- ;;
- *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
- esac
-
- if use headers-only; then
- # Nothing is compiled here which would affect the headers for the target.
- # So forcing CC is sane.
- headers_only_flags="CC=$(tc-getBUILD_CC)"
- fi
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}" "${headers_only_flags}"
-}
-
-src_compile() {
- use headers-only && return
-
- multibuild_foreach_variant multilib-minimal_src_compile
-}
-
-multilib_src_test() {
- emake check
-}
-
-src_test() {
- multibuild_foreach_variant multilib-minimal_src_test
-}
-
-src_install() {
- multibuild_foreach_variant multilib-minimal_src_install
-
- use headers-only || \
- (
- shopt -s failglob || die "failglob failed"
-
- # Make sure our man pages do not collide with glibc or man-pages.
- for manpage in "${D}$(get_xcmandir)"/man3/crypt{,_r}.?*; do
- mv -n "${manpage}" "$(dirname "${manpage}")/xcrypt_$(basename "${manpage}")" \
- || die "mv failed"
- done
- ) || die "failglob error"
-
- # Remove useless stuff from installation
- find "${ED}"/usr/share/doc/${PF} -type l -delete || die
- find "${ED}" -name '*.la' -delete || die
-
- # workaround broken upstream cross-* --docdir by installing files in proper locations
- if is_cross; then
- insinto "$(get_xcprefix)"/usr/share
- doins -r "${ED}"/usr/share/doc
- rm -r "${ED}"/usr/share/doc || die
- fi
-}
-
-multilib_src_install() {
- if use headers-only; then
- emake DESTDIR="${D}" install-nodist_includeHEADERS
- return
- fi
-
- emake DESTDIR="${D}" install
-
- # Don't install the libcrypt.so symlink for the "compat" version
- case "${MULTIBUILD_ID}" in
- xcrypt_compat-*)
- rm "${D}"$(get_xclibdir)/libcrypt$(get_libname) \
- || die "failed to remove extra compat libraries"
- ;;
- xcrypt_nocompat-*)
- if use split-usr; then
- (
- if use static-libs; then
- # .a files are installed to /$(get_libdir) by default
- # Move static libraries to /usr prefix or portage will abort
- shopt -s nullglob || die "failglob failed"
- static_libs=( "${D}"/$(get_xclibdir)/*.a )
-
- if [[ -n ${static_libs[*]} ]]; then
- dodir "/usr/$(get_xclibdir)"
- mv "${static_libs[@]}" "${ED}/usr/$(get_xclibdir)" \
- || die "Moving static libs failed"
- fi
- fi
-
- if use system; then
- # Move versionless .so symlinks from /$(get_libdir) to /usr/$(get_libdir)
- # to allow linker to correctly find shared libraries.
- shopt -s failglob || die "failglob failed"
-
- for lib_file in "${D}"$(get_xclibdir)/*$(get_libname); do
- lib_file_basename="$(basename "${lib_file}")"
- lib_file_target="$(basename "$(readlink -f "${lib_file}")")"
-
- # We already know we're in split-usr (checked above)
- # See bug #843209 (also worth keeping in mind bug #802222 too)
- local libdir_no_prefix=$(get_xclibdir)
- libdir_no_prefix=${libdir_no_prefix#${EPREFIX}}
- libdir_no_prefix=${libdir_no_prefix%/usr}
- dosym -r "/$(get_libdir)/${lib_file_target}" "/usr/${libdir_no_prefix}/${lib_file_basename}"
- done
-
- rm "${D}"$(get_xclibdir)/*$(get_libname) || die "Removing symlinks in incorrect location failed"
- fi
- )
- fi
- ;;
- *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
- esac
-}
-
-pkg_preinst() {
- # Verify we're not in a bad case like bug #843209 with broken symlinks.
- # This can be dropped when, if ever, the split-usr && system && compat case
- # is cleaned up in *_src_install.
- local broken_symlinks=()
- mapfile -d '' broken_symlinks < <(
- find "${ED}" -xtype l -print0
- )
-
- if [[ ${#broken_symlinks[@]} -gt 0 ]]; then
- eerror "Broken symlinks found before merging!"
- local symlink target resolved
- for symlink in "${broken_symlinks[@]}" ; do
- target="$(readlink "${symlink}")"
- resolved="$(readlink -f "${symlink}")"
- eerror " '${symlink}' -> '${target}' (${resolved})"
- done
- die "Broken symlinks found! Aborting to avoid damaging system. Please report a bug."
- fi
-}
diff --git a/sys-libs/pam/Manifest b/sys-libs/pam/Manifest
index 9ae0e0028337..28311baaeb0f 100644
--- a/sys-libs/pam/Manifest
+++ b/sys-libs/pam/Manifest
@@ -1,10 +1,6 @@
-AUX pam-1.5.3-termios.patch 913 BLAKE2B 3fdb9c6320c56fd2c10b76b58700263a1c190dde4a62bb33fdfe2e59e2aebedffe87bd14fb7f02ca9c3df8f9ca21af13a1e5b42cd4eb0b112bb03f311e975288 SHA512 c432af010b188ff8a3f1fb08cc7e68b12651f8a2592fa43c5aec8c60e938c04a62ae67bc0fdb6704df3ec39aa3b40a56c1abbf07e0e5105a7b7ca4af7e44c715
-DIST Linux-PAM-1.5.3-docs.tar.xz 466340 BLAKE2B 6bade3c63ebe6b6ca7a86d7385850bb87bf1d6526add3ac5aad140533516c1d27b594a17d09c4127ff985c42e6c571618785d6b2a2913e6575678c4dcf947dc0 SHA512 a9082823da88e0054d74e13aef872519ced5fbef25c8cc1a7e3a99160f835aa09c9ef701b6ec507acd3b540da0019288424bb4c8ebd828181ea90450db1494a9
-DIST Linux-PAM-1.5.3.tar.xz 1020076 BLAKE2B 362c939f3afc343e6f4e78e7f6ba6f7a9c6ee0a9948bb5a4fc34cecfd29e9fa974082534d4ceedd04d8d3e34c7b3ef43d2a07ba5f41d26da04ec8330fc3790fb SHA512 af88e8c1b6a9b737ffaffff7dd9ed8eec996d1fbb5804fb76f590bed66d8a1c2c6024a534d7a7b6d18496b300f3d6571a08874cf406cd2e8cea1d5eff49c136a
DIST Linux-PAM-1.6.1-docs.tar.xz 465516 BLAKE2B c39dfba2e327120edc1f30be6ea7f8e6cf20d1f4dd17752cc34e0ae1c0bd22b3d19b94ab665bf3df5bd6ecc7fc358dbbedd8a3069df95ff6189580e538aa3547 SHA512 c6054ec6832f604c0654cf074e4e241c44037fd41cd37cca7da94abe008ff72adc4466d31bd254517eda083c7ec3f6aefd37785b3ee3d0d4553250bd29963855
DIST Linux-PAM-1.6.1.tar.xz 1054152 BLAKE2B 649b4ff892fbd3eb90adcbd9ccc5b3f5df51bf1c79b9084c7a1613c432587b13b81761d1eb4f31ef12d58843d16af24a3c441d0b6f5d2f2a1db9c8da15a61e2f SHA512 ddb5a5f296f564b76925324550d29f15d342841a97815336789c7bb922a8663e831edeb54f3dcd1eaf297e3325c9e2e6c14b8740def5c43cf3f160a8a14fa2ea
DIST pam-1.7.0_p20241230.gh.tar.gz 719108 BLAKE2B c37daabae380ce75c630a0af1b9960676bc973c773025bc7f65ae87aebff4ca3b667e16ec9635c7677e8a00e6b26eb590f84b798529c3340cdc2c262e7e5649e SHA512 d9d53ddd420fe754c76303b99c37e5cc2eca3d4af9f64043f3f9e69c3abfc3c05d5a1efdbbdfb39ad46a301a0df7a18425d0e8c110c1d76bad3e62dfa97b61ef
-EBUILD pam-1.5.3-r1.ebuild 4456 BLAKE2B 11d04b870ae3571fa71aa7d1bdaa29eb59b5593899aa70223d3ad708331b875d21ac1ab6b28f06392651db04bca8821c747e478fb87744968d6cc6a23a652951 SHA512 a98f212ddcdef9542e6f3bcd05c3a1f6243b5e2696bf93bd4596ae8f84a88acf0ad7bba4a196dfc91775a20b5d3dff30659406437491f476252f4cb1e7c3c92a
EBUILD pam-1.6.1.ebuild 4459 BLAKE2B b6c946278113f8c0cf63676382fce8dfee77ed4d02f56314f55734c4c5e32b1dc668d851315ff27fe98c470a61cda43cb9bd31b3430fc859aaa3aca767fd4c33 SHA512 4100f9df870643f57f8d99114d6ff02553d9fc6ebd5fc3a3fea85ab49ec248482bddfe5b0767551d6bcb0a8a42439f9b35cf81f087750aa030d4d9d144f20834
EBUILD pam-1.7.0_p20241230-r3.ebuild 5710 BLAKE2B f221b0df0d204732cd01562eca79e715880374b8df9da91c183dfec1f96c5f4beabc8498baac3daf5d0e32d9d2027ec9bdaf735cd20a4803fbea3a2e088f6d66 SHA512 9471418ddefa41fa0e8550f704742579e4e6367c0b941f657befaf86db1d34c18cbc8f2d36225da935fef9e95f1efc7423f52344f5fd41f8f2d4d0fa4e7e8cba
MISC metadata.xml 846 BLAKE2B e236bd8c7a53097d96164d9063d1dbb9372cef4ec92731dc43df6731cc7f4fc2935aeeb2e069b6da1d4bce3f1cc6a657e0361208581da615f3f41ec72c02261e SHA512 e2e28deadb2c941f8fa31447ec20c95ccb340d638f8b1e742a89ccc2dbb3c8d88e764f750d6e13c5a6320a612d6f2447689c02862a5e897919d1e9bca7857089
diff --git a/sys-libs/pam/files/pam-1.5.3-termios.patch b/sys-libs/pam/files/pam-1.5.3-termios.patch
deleted file mode 100644
index 8f7baf76fee4..000000000000
--- a/sys-libs/pam/files/pam-1.5.3-termios.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Replace System V termio.h with POSIX termios.h for musl
-Upstream: https://github.com/linux-pam/linux-pam/pull/576
-Bug: https://bugs.gentoo.org/906137
-
-From 5658105b04ad4df212baf302898ee2cca99516a6 Mon Sep 17 00:00:00 2001
-From: Violet Purcell <vimproved@inventati.org>
-Date: Thu, 11 May 2023 10:27:53 -0400
-Subject: [PATCH] fix build on musl
-
---- a/examples/tty_conv.c
-+++ b/examples/tty_conv.c
-@@ -6,8 +6,9 @@
- #include <string.h>
- #include <errno.h>
- #include <unistd.h>
--#include <termio.h>
-+#include <termios.h>
- #include <security/pam_appl.h>
-+#include <sys/ioctl.h>
-
- /***************************************
- * @brief echo off/on
-@@ -16,7 +17,7 @@
- ***************************************/
- static void echoOff(int fd, int off)
- {
-- struct termio tty;
-+ struct termios tty;
- if (ioctl(fd, TCGETA, &tty) < 0)
- {
- fprintf(stderr, "TCGETA failed: %s\n", strerror(errno));
---
-2.40.1
-
diff --git a/sys-libs/pam/pam-1.5.3-r1.ebuild b/sys-libs/pam/pam-1.5.3-r1.ebuild
deleted file mode 100644
index 2fa18d994c43..000000000000
--- a/sys-libs/pam/pam-1.5.3-r1.ebuild
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MY_P="Linux-${PN^^}-${PV}"
-
-# Avoid QA warnings
-# Can reconsider w/ EAPI 8 and IDEPEND, bug #810979
-TMPFILES_OPTIONAL=1
-
-inherit db-use fcaps flag-o-matic toolchain-funcs multilib-minimal
-
-DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
-HOMEPAGE="https://github.com/linux-pam/linux-pam"
-SRC_URI="
- https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}.tar.xz
- https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}-docs.tar.xz
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="|| ( BSD GPL-2 )"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="audit berkdb debug nis selinux"
-
-BDEPEND="
- app-alternatives/yacc
- dev-libs/libxslt
- app-alternatives/lex
- sys-devel/gettext
- virtual/pkgconfig
-"
-DEPEND="
- virtual/libcrypt:=[${MULTILIB_USEDEP}]
- >=virtual/libintl-0-r1[${MULTILIB_USEDEP}]
- audit? ( >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}] )
- berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] )
- selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- nis? (
- net-libs/libnsl:=[${MULTILIB_USEDEP}]
- >=net-libs/libtirpc-0.2.4-r2:=[${MULTILIB_USEDEP}]
- )
-"
-RDEPEND="${DEPEND}"
-PDEPEND=">=sys-auth/pambase-20200616"
-
-PATCHES=(
- "${FILESDIR}/${P}-termios.patch"
-)
-
-src_prepare() {
- default
- touch ChangeLog || die
-}
-
-multilib_src_configure() {
- # Do not let user's BROWSER setting mess us up, bug #549684
- unset BROWSER
-
- # This whole weird has_version libxcrypt block can go once
- # musl systems have libxcrypt[system] if we ever make
- # that mandatory. See bug #867991.
- if use elibc_musl && ! has_version sys-libs/libxcrypt[system] ; then
- # Avoid picking up symbol-versioned compat symbol on musl systems
- export ac_cv_search_crypt_gensalt_rn=no
-
- # Need to avoid picking up the libxcrypt headers which define
- # CRYPT_GENSALT_IMPLEMENTS_AUTO_ENTROPY.
- cp "${ESYSROOT}"/usr/include/crypt.h "${T}"/crypt.h || die
- append-cppflags -I"${T}"
- fi
-
- local myconf=(
- CC_FOR_BUILD="$(tc-getBUILD_CC)"
- --with-db-uniquename=-$(db_findver sys-libs/db)
- --with-xml-catalog="${EPREFIX}"/etc/xml/catalog
- --enable-securedir="${EPREFIX}"/$(get_libdir)/security
- --includedir="${EPREFIX}"/usr/include/security
- --libdir="${EPREFIX}"/usr/$(get_libdir)
- --enable-pie
- --enable-unix
- --disable-prelude
- --disable-doc
- --disable-regenerate-docu
- --disable-static
- --disable-Werror
- # TODO: wire this up now it's more useful as of 1.5.3 (bug #931117)
- --disable-econf
-
- # TODO: add elogind support (bug #931115)
- # lastlog is enabled again for now by us until logind support
- # is handled. Even then, disabling lastlog will probably need
- # a news item.
- --disable-logind
- --enable-lastlog
-
- $(use_enable audit)
- $(use_enable berkdb db)
- $(use_enable debug)
- $(use_enable nis)
- $(use_enable selinux)
- --enable-isadir='.' # bug #464016
- )
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-}
-
-multilib_src_compile() {
- emake sepermitlockdir="/run/sepermit"
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install \
- sepermitlockdir="/run/sepermit"
-}
-
-multilib_src_install_all() {
- find "${ED}" -type f -name '*.la' -delete || die
-
- # tmpfiles.eclass is impossible to use because
- # there is the pam -> tmpfiles -> systemd -> pam dependency loop
- dodir /usr/lib/tmpfiles.d
-
- cat ->> "${D}"/usr/lib/tmpfiles.d/${CATEGORY}-${PN}.conf <<-_EOF_
- d /run/faillock 0755 root root
- _EOF_
- use selinux && cat ->> "${D}"/usr/lib/tmpfiles.d/${CATEGORY}-${PN}-selinux.conf <<-_EOF_
- d /run/sepermit 0755 root root
- _EOF_
-
- local page
-
- for page in doc/man/*.{3,5,8} modules/*/*.{5,8} ; do
- doman ${page}
- done
-}
-
-pkg_postinst() {
- ewarn "Some software with pre-loaded PAM libraries might experience"
- ewarn "warnings or failures related to missing symbols and/or versions"
- ewarn "after any update. While unfortunate this is a limit of the"
- ewarn "implementation of PAM and the software, and it requires you to"
- ewarn "restart the software manually after the update."
- ewarn ""
- ewarn "You can get a list of such software running a command like"
- ewarn " lsof / | grep -E -i 'del.*libpam\\.so'"
- ewarn ""
- ewarn "Alternatively, simply reboot your system."
-
- # The pam_unix module needs to check the password of the user which requires
- # read access to /etc/shadow only.
- fcaps cap_dac_override sbin/unix_chkpwd
-}
diff --git a/sys-libs/timezone-data/Manifest b/sys-libs/timezone-data/Manifest
index 8b524092682f..d2989ce4f5f9 100644
--- a/sys-libs/timezone-data/Manifest
+++ b/sys-libs/timezone-data/Manifest
@@ -1,11 +1,10 @@
AUX timezone-data-2024a-AsiaAlmaty.patch 1211 BLAKE2B 2d85afd4aa93ecbc051efc67ef0451fa8acd342b7f949db6a07b3f0108da612abe4002c44e308ccdfc1bb4cd3f078814951cdb623907d68a1a5a69de817bf96c SHA512 988dd962d85f2ba02e8e47fc982da1830b0e184135403fa4fe38e2ff251ac242ce7f36ed5298830a91dc76cfd428b09faaf1319c4f20cd29833b9164def079cb
AUX timezone-data-2024b-April-short.patch 877 BLAKE2B b15f547759e3418011dc0dd83c09573bcae5a9ce6b22387dd694b4ab8a138e470e6bec68492efb9251ae20c63bfb9dae87b9d208d467b3ae6a3170def4eff0cf SHA512 dcff5b75c023c317482c58c4ccef91bd86ce2a1c6f9993985daa542ccf61616251b56b4d091ba7a44dceb7549caa7e18ff50970ffc28e0db89c4e949fe1ba2ff
-DIST tzcode2023d.tar.gz 298795 BLAKE2B 3e759de2e1dfe033bb98b5af5239631ef5dc33e25b6aeb95ab3e6041d5db3dd1b1cb8b210f072bc0d671117f2ad162cdcdcb3ecae97aa2d3be3bc2e809845666 SHA512 3994a5a060a7a5fffc6585f5191cf7679f9f9be44dbcee4d67d0e42c5b6020c308cb55caf8bf8d51554697665105a174cb470c8c4fc069438350f3bac725709b
DIST tzcode2024a.tar.gz 301595 BLAKE2B f3b8d1e7735ad858d071df564a8e11ac4d252b97a5729fa6c282112ff3903f7d35897735920b4466a926ef647dc283356879134046805411c694efd3fd89b282 SHA512 46da8bfa762c7d109db93e5c060789097fc0e1e38bdad5bb8fec886ef47f138bd03b913a743cd5f7e23dc359a72bfd63e7ffc0de199d2b51e6a174361dbdc43c
-DIST tzdata2023d.tar.gz 449767 BLAKE2B b79be37a8a258745d162a575c795ee6476b4fa5f6d2f7b562d9431a238eca276a1747a983778291184fc6e40a0c1f5e6284d41290fd6d1d3bd3118bda83f426e SHA512 81832b2d738c28cecbcb3906cc07568c5ae574adc9de35b25d4bf613581c92d471d67213b4261a56f0ec02efcf211b4e298b7e1dc367c972e726b0a2e9498df4
DIST tzdata2024a.tar.gz 451270 BLAKE2B 5ec49bbce704411a1d8b3f018b0d8f6c7de24c5600e0cb6c61a7ee29b4a49b1e502d23b40bce6584ea0aa9b66327321608cbabb994071ec4ca2b3a496aa2d621 SHA512 1f09f1b2327cc9e1afc7e9045e83ee3377918dafe1bee2f282b6991828d03b3c70a4d3a17f9207dfb1361bb25bc214a8922a756e84fa114e9ba476226db57236
DIST tzdb-2024b.tar.lz 544381 BLAKE2B 7e9e7d88aa25813c461bd9a9653fcb5e9b212bd07f7c6d5632a75e7f2200af121382ffe98bdf2a88f21b88e1fcebb3fee1bdc39322fe65520084144065d3445f SHA512 72446e5cf445515512437c8deaae3063b093aab9620d6441cafaa9b3b71603c857f7ba53557579595788bbc901cd6142404b4db6b0e9f2b23d57b2b3cbc837a8
-EBUILD timezone-data-2023d.ebuild 5268 BLAKE2B c024f891c44c43307711aad7df3ccb61cd3aa9bcec9ea0cb950387b439fc8208b80dfa8d3ce8c28b489a9b9eb56dde30ddac9ca0bd1b7085e0559a8f21dbc7bd SHA512 5983388e17ff96305d6687818a47e47f8a2262bbfa515ef728cfb8fe41e057a025d29256a90fd12ae0d467680ddaac8b3f4b24d206efa3ec07b0e81cec5eff67
+DIST tzdb-2025a.tar.lz 548434 BLAKE2B cccd37ca71bfde7e56ed5138be5a610ec9d5ca59658b90e5e2a10af9221ed6d09b24b106bef46b04bbc97bff74b6e97a1f800c078a523aa32c13416a33264df2 SHA512 1e8c4e141158d63ca5c39babc9d18c32df14e2e59bc7649a7fed8c3e577f7b175bafa43883cf351139ff198515f5f8c22b1418e2ac7efb7f837faa8f61d2574d
EBUILD timezone-data-2024a-r1.ebuild 5321 BLAKE2B d2e649172a2193fdc5844727a156683b9bc28c3386c754c949f0e3a3edef9a8a26a710f75697b1bb635b5e7be79c31e1abb81e1bb21abfb18756d7657fd336e3 SHA512 6c2b9de0467ac8a5285faf7b85b71bc2b632c72c397b2caa6467417a3c80ee6866c60991e5db73312e8d42ffd7108ddcf42d8ae1eab151131b7792a82416d4bb
EBUILD timezone-data-2024b.ebuild 5043 BLAKE2B 7d8f15ae7bcca725bc8d90625b8d92aca27a99c17e642bd0d34753b17217343dd9525501d0e0c14d0a1c15018ecbe7f8b451baf21d4c5c8dbbfda2f6c9a2959e SHA512 b1215e4004224fb3c3237fcad753f8bb549943065f8c539de9579e71aadfbb7c656d76827143bb7c67732fe9c25fddb24af62073993b10a0cf8d88374095a912
+EBUILD timezone-data-2025a.ebuild 4992 BLAKE2B 4248af78931815226b91df7571fd2980ca0550c617565bb328cc08e016d6c2833941af1adaa253c377c299c80975a5f0bb6baeccc21c9ad2d74fc1a732059a21 SHA512 813db47d3fe45bd5032d270f83d9c7f1cfa51d61f16374e175c71e3a7b8f11951495e14c1552528b1b57460699f87ec5b9fe472155fa8c0172c0cdc72fa28ce3
MISC metadata.xml 807 BLAKE2B 24b09c4228c232b607e6e6c165a20e364136d77aa970e72c70124636a038cd3b672bad16ddd68c0b75373be6a09f969e59bc38f7e451bb2869cd46c521e2ca82 SHA512 0b95b32d79651493a04032f175f3320d8975cea714b43fa56aa528f10f51a7c52b58a934828f98a770855485af6f8db048bd2bfa3010802cff8c26ae05bb16e2
diff --git a/sys-libs/timezone-data/timezone-data-2023d.ebuild b/sys-libs/timezone-data/timezone-data-2025a.ebuild
index 6d1148de0ed7..e6a0cc38fb88 100644
--- a/sys-libs/timezone-data/timezone-data-2023d.ebuild
+++ b/sys-libs/timezone-data/timezone-data-2025a.ebuild
@@ -1,20 +1,20 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-inherit toolchain-funcs flag-o-matic
+inherit toolchain-funcs flag-o-matic unpacker
-MY_CODE_VER=${PV}
-MY_DATA_VER=${PV}
DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
HOMEPAGE="https://www.iana.org/time-zones"
-SRC_URI="https://www.iana.org/time-zones/repository/releases/tzdata${MY_DATA_VER}.tar.gz
- https://www.iana.org/time-zones/repository/releases/tzcode${MY_CODE_VER}.tar.gz"
+SRC_URI="
+ https://data.iana.org/time-zones/releases/tzdb-${PV}.tar.lz
+"
+S="${WORKDIR}"/tzdb-${PV}
LICENSE="BSD public-domain"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="nls leaps-timezone zic-slim"
DEPEND="nls? ( virtual/libintl )"
@@ -22,19 +22,11 @@ RDEPEND="
${DEPEND}
!sys-libs/glibc[vanilla(+)]
"
-
-src_unpack() {
- mkdir "${S}" && cd "${S}" || die
- default
-}
+BDEPEND="$(unpacker_src_uri_depends)"
src_prepare() {
default
- # check_web contacts validator.w3.org
- sed -i -e 's/check_tables check_web/check_tables/g' \
- Makefile || die "Failed to disable check_web"
-
if tc-is-cross-compiler ; then
cp -pR "${S}" "${S}"-native || die
fi
@@ -97,8 +89,8 @@ src_compile() {
}
src_test() {
- # VALIDATE_ENV is used for extended/web based tests. Punt on them.
- emake check VALIDATE_ENV=true
+ # CURL is used for extended/web based tests. Punt on them.
+ emake check CURL=:
}
src_install() {
diff --git a/sys-libs/zlib/Manifest b/sys-libs/zlib/Manifest
index a92c04d8491d..5e815d826841 100644
--- a/sys-libs/zlib/Manifest
+++ b/sys-libs/zlib/Manifest
@@ -1,16 +1,9 @@
-AUX zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch 3209 BLAKE2B 26e9fd2d68534c6b2d5d88c5dc8150d63dede949ab71d454d94c13736c3f02c8e01201d39ccaa7fe189db0a272a315aa01a6a214f0cc7e25030b2c96b5fbe0ce SHA512 e5db2181e21d6fe7ef4d36b99fd80f4df576dabb7cbf3d205b30abd6760fdc33efaa3668fd927efe2c27a019c419b769b721760d9eb2f10d5d6955adf7a751bf
AUX zlib-1.2.11-minizip-drop-crypt-header.patch 997 BLAKE2B a964dfb26d05045507cb2ebf1154b890782d9952288627dd5093eeeaed9265a6041922e9fef378333ad3b9ac2333d692b06db1d6425df25d6062b9fc42ec8c50 SHA512 158c4b711e8afc248cbd55f2057dede18540ad35ec1a47d0cfb0fe9bf10b1507bb1b4525badcc0a8b6505062d838ee4fb2d4ebfbf9c9d1694336a704bc0b690e
-AUX zlib-1.2.13-CVE-2023-45853.patch 1657 BLAKE2B d18588e24ec87454f4056751756881cfb3632ab24ace37dbd1a173e4914a20d9101cecc505251a9635c034f3ee99e31532fe95fe273df92fc83b0f9e0691a473 SHA512 38d801e2072cc9f6dacf25704cf935e7ec75f006ecda6933ea1667fce8e5fe154ed5d0b20a334a9c55b4d8ea9a8e7e466aa93fda5de3f409f2ccf8d5fa938bd1
-AUX zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch 1944 BLAKE2B eb6f1d7dbc44905b462a9181fb3e213f18f515786cbba3ef182d76a1cf94d1b4d7220a7abde3f3f8cad25f3651025be35f1c99e4e4099314c4a47852979a586f SHA512 3a3577ce0ffb168685af9e6f77b94cde5669765273ec63be9a777f74431a2438866c6d0db9a5cd32246bd317eab5dd63f410bafb3312d3bc1f3b8f6c83135786
-AUX zlib-1.2.13-use-LDFLAGS-in-configure.patch 2650 BLAKE2B 3cfae2b0658534aab64f7969d86307bf96724f4ec847e378c2f87b6b9e43c00bae96845d1c3405d5d913d2005e9f18f53923329ad1cfd73e9395f94d035e275f SHA512 77499165a934d171c7d4bbd177f3cfa2e57db8923c61222a48734f8d3879245ed91fe2b900b3a429db89e098a4d4fcd9f3b6f2c1c3a86f761e1b33b56a73987d
AUX zlib-1.3.1-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch 685 BLAKE2B ce9e9898050d123026fdb7739bc8e31af0eb40ab45d6ca91d25330011e014f68612ab1e680adbd14ecf0286a41f1674814c9ffff9b112bcbd859ddfb147a8e98 SHA512 de0528191bcd18ec42901291bdfb931f269c5294e6223062aeddd47466a67bd8176a84dd30f1570fe8a65b90ba5b5fce3050813789edaa66aeaad6e823a182d2
AUX zlib-1.3.1-configure-fix-AR-RANLIB-NM-detection.patch 2940 BLAKE2B ad0cd287eeb1a78a220063966138dc618ce010c30587c84c5f18f1690814c30ecebc7e28c310d9570015b8da8b5997f99dccdf4aa8665243ab172e2c1ba74c93 SHA512 28ca95ad2e95ab0cef6a0c728ff0fd94ab9bdce445de1dd40531ceb613b11bdfb7b519a8301d6ed529b76df04d561a022595de1e880bd8e00538c71384148f91
AUX zlib-1.3.1-configure-fix-AR-libtool-on-darwin.patch 849 BLAKE2B 6bd8c5486e925ad263f35b25f774969a5ed8eb462cc6839129ec994668a022d7a1b7dd0f101fad3dbb303bfd8c637751e24f9f7dc7245899b12ede7ba8d7c184 SHA512 ae325263261618a8b9280e3b56113f079c0cc2713c3f93d715d4771a71631de6cbff9de82b39c256e15fd243ab93f35ea6428d4c5a2474675cfc09ac41d49397
AUX zlib-1.3.1-use-LDFLAGS-in-configure.patch 2698 BLAKE2B cbb28d07c44edbf1403792f147aa20c87d3954c1724c6c87f3c099a2fb1855163a1aeea0d9e67b5e8b868d404080b6ff434ab8c5ef3cfa966281579556d186ea SHA512 5ed35372202f59032ed2929ae253b81c9e4362816e7adabae68312c20c9675f9fa9749b5f8a247c77d2f415d1592bcc229d7ddca431b1931c78e3368a5d6848e
DIST zlib-1.3.1.tar.xz 1305740 BLAKE2B 42d109223801a493de6d52e7343403d7fc3234a6ca816425fe41ac9c18019b01b93841acd28a235e99f2256a6a17f93624e96b2ddb58d588c8190a6bedb82910 SHA512 1e8e70b362d64a233591906a1f50b59001db04ca14aaffad522198b04680be501736e7d536b4191e2f99767e7001ca486cd802362cca2be05d5d409b83ea732d
DIST zlib-1.3.1.tar.xz.asc 235 BLAKE2B b135336ef55a0c4b8e219e760bbe04bad082c405246ce51a2b373c3dfba0b05cb1e6f539363972f4cabd8290be1db1fdb2fc47fb562c6c612a08d9393065f75b SHA512 d181e9772a8139b3b2f3f42b994a65a966101db35eb46b5c84021c5eb0cc3b4511eb5e9172c509483bd9f7015794b15cfca78ed0959bd91e8216dc12c1c6e668
-DIST zlib-1.3.tar.xz 1295740 BLAKE2B 5fe0f32339267348a313f23a21e9588bdb180b7415be303c85f5f169444d019e5f176ef7322f6e64297c360acc2a6041c50e2f66d1860e5c392d8970990f176a SHA512 3868ac4da5842dd36c9dad794930675b9082ce15cbd099ddb79c0f6bd20a24aa8f33a123f378f26fe0ae02d91f31f2994dccaac565cedeaffed7b315e6ded2a2
-DIST zlib-1.3.tar.xz.asc 235 BLAKE2B 5fe6ce952699a19e848d0a6e6c3622f934340068fdcd29afb35c74f3c8ae66d04de644800d10b38c743bb2f4852ba28f1a97313cb0e6e6f9b804cbca5289ebbb SHA512 8f3ce5c21938d6abc7e121d2939648a0ce2dc01a8ab4eb001d44eb159935dd0b4f5b5e371b3ecfc0ceb23689e2cefe002065968908503cde15b1bba08aff9db6
-EBUILD zlib-1.3-r4.ebuild 4360 BLAKE2B e5d5eb2bc581ae5c2585e0da4f7a13d0243d362081fb3c2fb401b84375d7df7b62c42fd06ad313ecab5fb6ac54989745c7b3e2c4f15183286358a7700bd29795 SHA512 2587a9d203c7fe8ee426037f1431cf83e77e62ad77293cb551490479e6b4a2e6f94eaafd96bf766217369715840ccec4a5476d569a493e257281242ca8653abb
EBUILD zlib-1.3.1-r1.ebuild 4406 BLAKE2B b4e71503ca4106a88ddd74154b82e676e5b7e76ae204cf5c32ad88ed0fd24acb5a24c9a2356b4da1c830efa59e82c98e08e7514d9748bc0f431481c2987c9681 SHA512 57e8ca76aee4701f5ea09bda26c47ca15563633f85f86f2416d39c53024eb022783f95133105ea7e1027bd518eed4cc471b2209650c4c99aba5ffb48e08b38f5
MISC metadata.xml 494 BLAKE2B a4a57a4153aefc189e407bcb8ce84f7c94581cc66967f69097087da7e6ff48d2de683b919fb00445d095c47ef39d31e01590f8c989ce0e5e01474e73ee2a0565 SHA512 a7e0160c127b3c2a6afe99e95992d9dbd017061303759c299ec38800efd6a9e11a35ae850c23c77c09c8833cd9d61ac1267f6becadf9c22437ee35e4304400c9
diff --git a/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch b/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
deleted file mode 100644
index 1ab5b2f5dc81..000000000000
--- a/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 4232e67ee1440634af8209c7022dfc64cf862819 Mon Sep 17 00:00:00 2001
-From: Adrian Ratiu <adrian.ratiu@collabora.com>
-Date: Mon, 17 Jan 2022 10:49:58 +0200
-Subject: [PATCH v3] configure: fix AR/RANLIB/NM detection
-
-Taken from zlib-devel ML:
-https://madler.net/pipermail/zlib-devel_madler.net/2022-January/003322.html
-
-Bug: https://bugs.gentoo.org/831628
-
-Scenarios where ${CROSS_PREFIX}ar & co are set but not desired
-are possible, for example in ChromiumOS we use the GNU binutils
-tools & GCC to build glibc but LLVM/Clang is used for the rest
-of the system.
-
-This allows $AR/$RANLIB/$NM to override default CROSS_PREFIX
-tools so they can be set to llvm-ar/ranlib/nm.
-
-Suggested-by: Manoj Gupta <manojgupta@chromium.org>
-Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
----
-
-Changes in v3:
- * Whitespace style fixes
- * Fixed top level variable tests (eg -z AR -> -z $AR)
- * Review and testing as part of Gentoo PR:
- https://github.com/gentoo/gentoo/pull/23888
-Changes in v2:
- * Fixed a typo in the "unset NM" case
----
- configure | 38 ++++++++++++++++++++++----------------
- 1 file changed, 22 insertions(+), 16 deletions(-)
-
-diff --git a/configure b/configure
-index e974d1f..045c616 100755
---- a/configure
-+++ b/configure
-@@ -46,25 +46,31 @@ VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.
- VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h`
-
- # establish commands for library building
--if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
-- AR=${AR-"${CROSS_PREFIX}ar"}
-- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
--else
-- AR=${AR-"ar"}
-- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
-+if [ -z "$AR" ]; then
-+ if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
-+ AR=${AR-"${CROSS_PREFIX}ar"}
-+ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
-+ else
-+ AR="ar"
-+ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
-+ fi
- fi
- ARFLAGS=${ARFLAGS-"rc"}
--if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
-- RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
-- test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
--else
-- RANLIB=${RANLIB-"ranlib"}
-+if [ -z "$RANLIB" ]; then
-+ if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
-+ RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
-+ test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
-+ else
-+ RANLIB="ranlib"
-+ fi
- fi
--if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
-- NM=${NM-"${CROSS_PREFIX}nm"}
-- test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
--else
-- NM=${NM-"nm"}
-+if [ -z "$NM" ]; then
-+ if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
-+ NM=${NM-"${CROSS_PREFIX}nm"}
-+ test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
-+ else
-+ NM="nm"
-+ fi
- fi
-
- # set defaults before processing command line options
---
-2.35.0
-
diff --git a/sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch b/sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch
deleted file mode 100644
index ecb5acecbb33..000000000000
--- a/sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-https://bugs.gentoo.org/916484
-https://github.com/madler/zlib/pull/843
-https://github.com/madler/zlib/commit/73331a6a0481067628f065ffe87bb1d8f787d10c
-
-From 73331a6a0481067628f065ffe87bb1d8f787d10c Mon Sep 17 00:00:00 2001
-From: Hans Wennborg <hans@chromium.org>
-Date: Fri, 18 Aug 2023 11:05:33 +0200
-Subject: [PATCH] Reject overflows of zip header fields in minizip.
-
-This checks the lengths of the file name, extra field, and comment
-that would be put in the zip headers, and rejects them if they are
-too long. They are each limited to 65535 bytes in length by the zip
-format. This also avoids possible buffer overflows if the provided
-fields are too long.
----
- contrib/minizip/zip.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c
-index 3d3d4cadd..0446109b2 100644
---- a/contrib/minizip/zip.c
-+++ b/contrib/minizip/zip.c
-@@ -1043,6 +1043,17 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c
- return ZIP_PARAMERROR;
- #endif
-
-+ // The filename and comment length must fit in 16 bits.
-+ if ((filename!=NULL) && (strlen(filename)>0xffff))
-+ return ZIP_PARAMERROR;
-+ if ((comment!=NULL) && (strlen(comment)>0xffff))
-+ return ZIP_PARAMERROR;
-+ // The extra field length must fit in 16 bits. If the member also requires
-+ // a Zip64 extra block, that will also need to fit within that 16-bit
-+ // length, but that will be checked for later.
-+ if ((size_extrafield_local>0xffff) || (size_extrafield_global>0xffff))
-+ return ZIP_PARAMERROR;
-+
- zi = (zip64_internal*)file;
-
- if (zi->in_opened_file_inzip == 1)
diff --git a/sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch b/sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
deleted file mode 100644
index b5a1b4de2c47..000000000000
--- a/sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-https://bugs.gentoo.org/879883
-https://github.com/madler/zlib/issues/751
-
-From 2ad2713e6cb9166dcede9a020f6913b8189ff0c6 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Wed, 23 Nov 2022 04:17:16 +0000
-Subject: [PATCH] Revert "Turn off RWX segment warnings on sparc systems."
-
-This breaks building on sparc with older binutils.
-
-This reverts commit 29fd715fd0bdaffee21e2d2d37be8c5a6ac67ee4.
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -22,7 +22,7 @@ CFLAGS=-O
-
- SFLAGS=-O
- LDFLAGS=
--TEST_LDFLAGS=$(LDFLAGS) -L. libz.a
-+TEST_LDFLAGS=-L. libz.a
- LDSHARED=$(CC)
- CPP=$(CC) -E
-
-@@ -288,10 +288,10 @@ minigzip$(EXE): minigzip.o $(STATICLIB)
- $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
-
- examplesh$(EXE): example.o $(SHAREDLIBV)
-- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(SHAREDLIBV)
-+ $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
-
- minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
-- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(SHAREDLIBV)
-+ $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
-
- example64$(EXE): example64.o $(STATICLIB)
- $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
---- a/configure
-+++ b/configure
-@@ -33,10 +33,7 @@ fi
- # set command prefix for cross-compilation
- if [ -n "${CHOST}" ]; then
- uname=${CHOST}
-- mname=${CHOST}
- CROSS_PREFIX="${CHOST}-"
--else
-- mname=`(uname -a || echo unknown) 2>/dev/null`
- fi
-
- # destination name for static library
-@@ -223,10 +220,6 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
- fi
- case "$uname" in
- Linux* | linux* | *-linux* | GNU | GNU/* | solaris*)
-- case "$mname" in
-- *sparc*)
-- LDFLAGS="${LDFLAGS} -Wl,--no-warn-rwx-segments" ;;
-- esac
- LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;;
- *BSD | *bsd* | DragonFly)
- LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"}
diff --git a/sys-libs/zlib/files/zlib-1.2.13-use-LDFLAGS-in-configure.patch b/sys-libs/zlib/files/zlib-1.2.13-use-LDFLAGS-in-configure.patch
deleted file mode 100644
index 9f2b240334e8..000000000000
--- a/sys-libs/zlib/files/zlib-1.2.13-use-LDFLAGS-in-configure.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-https://github.com/madler/zlib/pull/599
-
-Rebased version of:
-
-From 37c9730ba474d274f4cc6a974943eef95087b9f6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 8 Mar 2022 22:38:47 -0800
-Subject: [PATCH] configure: Pass LDFLAGS to link tests
-
-LDFLAGS can contain critical flags without which linking wont succeed
-therefore ensure that all configure tests involving link time checks are
-using LDFLAGS on compiler commandline along with CFLAGS to ensure the
-tests perform correctly. Without this some tests may fail resulting in
-wrong confgure result, ending in miscompiling the package
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
---- a/configure
-+++ b/configure
-@@ -436,7 +436,7 @@ if test $shared -eq 1; then
- echo Checking for shared library support... | tee -a configure.log
- # we must test in two steps (cc then ld), required at least on SunOS 4.x
- if try $CC -w -c $SFLAGS $test.c &&
-- try $LDSHARED $SFLAGS -o $test$shared_ext $test.o; then
-+ try $LDSHARED $SFLAGS $LDFLAGS -o $test$shared_ext $test.o; then
- echo Building shared library $SHAREDLIBV with $CC. | tee -a configure.log
- elif test -z "$old_cc" -a -z "$old_cflags"; then
- echo No shared library support. | tee -a configure.log
-@@ -498,7 +498,7 @@ int main(void) {
- }
- EOF
- fi
-- if try $CC $CFLAGS -o $test $test.c; then
-+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
- sizet=`./$test`
- echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log
- CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}"
-@@ -532,7 +532,7 @@ int main(void) {
- return 0;
- }
- EOF
-- if try $CC $CFLAGS -o $test $test.c; then
-+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
- echo "Checking for fseeko... Yes." | tee -a configure.log
- else
- CFLAGS="${CFLAGS} -DNO_FSEEKO"
-@@ -549,7 +549,7 @@ cat > $test.c <<EOF
- #include <errno.h>
- int main() { return strlen(strerror(errno)); }
- EOF
--if try $CC $CFLAGS -o $test $test.c; then
-+if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
- echo "Checking for strerror... Yes." | tee -a configure.log
- else
- CFLAGS="${CFLAGS} -DNO_STRERROR"
-@@ -656,7 +656,7 @@ int main()
- return (mytest("Hello%d\n", 1));
- }
- EOF
-- if try $CC $CFLAGS -o $test $test.c; then
-+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
- echo "Checking for vsnprintf() in stdio.h... Yes." | tee -a configure.log
-
- echo >> configure.log
-@@ -746,7 +746,7 @@ int main()
- }
- EOF
-
-- if try $CC $CFLAGS -o $test $test.c; then
-+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
- echo "Checking for snprintf() in stdio.h... Yes." | tee -a configure.log
-
- echo >> configure.log
diff --git a/sys-libs/zlib/zlib-1.3-r4.ebuild b/sys-libs/zlib/zlib-1.3-r4.ebuild
deleted file mode 100644
index d96a00b393a1..000000000000
--- a/sys-libs/zlib/zlib-1.3-r4.ebuild
+++ /dev/null
@@ -1,173 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Worth keeping an eye on 'develop' branch upstream for possible backports.
-AUTOTOOLS_AUTO_DEPEND="no"
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/madler.asc
-inherit autotools edo multilib-minimal flag-o-matic verify-sig
-
-DESCRIPTION="Standard (de)compression library"
-HOMEPAGE="https://zlib.net/"
-SRC_URI="
- https://zlib.net/${P}.tar.xz
- https://zlib.net/fossils/${P}.tar.xz
- https://zlib.net/current/beta/${P}.tar.xz
- https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz
- verify-sig? (
- https://zlib.net/${P}.tar.xz.asc
- https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz.asc
- )
-"
-
-LICENSE="ZLIB"
-SLOT="0/1" # subslot = SONAME
-KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-IUSE="minizip static-libs"
-
-RDEPEND="!sys-libs/zlib-ng[compat]"
-DEPEND="${RDEPEND}"
-BDEPEND="
- minizip? ( ${AUTOTOOLS_DEPEND} )
- verify-sig? ( sec-keys/openpgp-keys-madler )
-"
-
-PATCHES=(
- # Don't install unexpected & unused crypt.h header (which would clash with other pkgs)
- # Pending upstream. bug #658536
- "${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch
-
- # Respect AR, RANLIB, NM during build. Pending upstream. bug #831628
- "${FILESDIR}"/${PN}-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
-
- # Respect LDFLAGS during configure tests. Pending upstream
- "${FILESDIR}"/${PN}-1.2.13-use-LDFLAGS-in-configure.patch
-
- # Fix building on sparc with older binutils, we pass it in ebuild instead
- "${FILESDIR}"/${PN}-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
-
- # CVE-2023-45853 (bug #916484)
- "${FILESDIR}"/${PN}-1.2.13-CVE-2023-45853.patch
-)
-
-src_prepare() {
- default
-
- if use minizip ; then
- cd contrib/minizip || die
- eautoreconf
- fi
-
- case ${CHOST} in
- *-mingw*|mingw*)
- # Uses preconfigured Makefile rather than configure script
- multilib_copy_sources
-
- ;;
- esac
-}
-
-multilib_src_configure() {
- # We pass manually instead of relying on the configure script/makefile
- # because it would pass it even for older binutils.
- use sparc && append-flags $(test-flags-CCLD -Wl,--no-warn-rwx-segments)
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- case ${CHOST} in
- *-mingw*|mingw*)
- ;;
-
- *)
- # bug #347167
- local uname=$("${BROOT}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3)
-
- local myconf=(
- --shared
- --prefix="${EPREFIX}/usr"
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- ${uname:+--uname=${uname}}
- )
-
- # Not an autoconf script, so can't use econf
- edo "${S}"/configure "${myconf[@]}"
-
- ;;
- esac
-
- if use minizip ; then
- local minizipdir="contrib/minizip"
- mkdir -p "${BUILD_DIR}/${minizipdir}" || die
-
- cd ${minizipdir} || die
- ECONF_SOURCE="${S}/${minizipdir}" econf $(use_enable static-libs static)
- fi
-}
-
-multilib_src_compile() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
- sed \
- -e 's|@prefix@|'"${EPREFIX}"'/usr|g' \
- -e 's|@exec_prefix@|${prefix}|g' \
- -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@includedir@|${prefix}/include|g' \
- -e 's|@VERSION@|'${PV}'|g' \
- zlib.pc.in > zlib.pc || die
- ;;
-
- *)
- emake
-
- ;;
- esac
-
- use minizip && emake -C contrib/minizip
-}
-
-multilib_src_install() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc install \
- BINARY_PATH="${ED}/usr/bin" \
- LIBRARY_PATH="${ED}/usr/$(get_libdir)" \
- INCLUDE_PATH="${ED}/usr/include" \
- SHARED_MODE=1
-
- # Overwrites zlib.pc created from win32/Makefile.gcc, bug #620136
- insinto /usr/$(get_libdir)/pkgconfig
- doins zlib.pc
-
- ;;
-
- *)
- emake install DESTDIR="${D}" LDCONFIG=:
-
- ;;
- esac
-
- if use minizip ; then
- emake -C contrib/minizip install DESTDIR="${D}"
-
- # This might not exist if slibtool is used.
- # bug #816756
- rm -f "${ED}"/usr/$(get_libdir)/libminizip.la || die
- fi
-
- if ! use static-libs ; then
- # bug #419645
- rm "${ED}"/usr/$(get_libdir)/libz.a || die
- fi
-}
-
-multilib_src_install_all() {
- dodoc FAQ README ChangeLog doc/*.txt
-
- if use minizip ; then
- dodoc contrib/minizip/*.txt
- doman contrib/minizip/*.1
- fi
-}