summaryrefslogtreecommitdiff
path: root/sys-libs
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 16:24:49 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 16:24:49 -0500
commita3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7 (patch)
tree0c52bbae1c242fbc296bd650fcd1167685f81492 /sys-libs
parentbfd9c39e4712ebdb442d4ca0673061faed1e70e1 (diff)
downloadbaldeagleos-repo-a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7.tar.gz
baldeagleos-repo-a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7.tar.xz
baldeagleos-repo-a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7.zip
Adding metadata
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/argp-standalone/Manifest1
-rw-r--r--sys-libs/argp-standalone/argp-standalone-1.5.0.ebuild42
-rw-r--r--sys-libs/argp-standalone/files/argp-standalone-1.5.0-shared.patch53
-rw-r--r--sys-libs/argp-standalone/metadata.xml11
-rw-r--r--sys-libs/basu/Manifest1
-rw-r--r--sys-libs/basu/basu-0.2.1.ebuild39
-rw-r--r--sys-libs/basu/files/basu-0.2.1-fix_lld.patch15
-rw-r--r--sys-libs/basu/metadata.xml18
-rw-r--r--sys-libs/binutils-libs/Manifest29
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild128
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild141
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild139
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.37_p1-r2.ebuild140
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild158
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.39-r5.ebuild158
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.40-r7.ebuild168
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.41-r5.ebuild171
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.42-r2.ebuild175
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.43-r3.ebuild176
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.44-r2.ebuild260
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.45-r1.ebuild260
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.45.1.ebuild260
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.45.ebuild260
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.46.0.ebuild260
-rw-r--r--sys-libs/binutils-libs/binutils-libs-9999.ebuild260
-rw-r--r--sys-libs/binutils-libs/files/binutils-libs-2.35.1-cet.patch103
-rw-r--r--sys-libs/binutils-libs/metadata.xml16
-rw-r--r--sys-libs/blocksruntime/Manifest1
-rw-r--r--sys-libs/blocksruntime/blocksruntime-0_pre20171027-r2.ebuild42
-rw-r--r--sys-libs/blocksruntime/files/blocksruntime-0_pre20171027-ldflags-soname.patch34
-rw-r--r--sys-libs/blocksruntime/metadata.xml8
-rw-r--r--sys-libs/cracklib/Manifest2
-rw-r--r--sys-libs/cracklib/cracklib-2.10.2.ebuild130
-rw-r--r--sys-libs/cracklib/cracklib-2.10.3.ebuild130
-rw-r--r--sys-libs/cracklib/metadata.xml12
-rw-r--r--sys-libs/cyclonedds/Manifest1
-rw-r--r--sys-libs/cyclonedds/cyclonedds-0.10.3-r1.ebuild84
-rw-r--r--sys-libs/cyclonedds/cyclonedds-9999.ebuild84
-rw-r--r--sys-libs/cyclonedds/files/cyclonedds-0.10.3-get_kind.patch87
-rw-r--r--sys-libs/cyclonedds/metadata.xml14
-rw-r--r--sys-libs/db/Manifest3
-rw-r--r--sys-libs/db/db-4.8.30-r8.ebuild170
-rw-r--r--sys-libs/db/db-4.8.30-r9.ebuild171
-rw-r--r--sys-libs/db/db-5.3.28-r10.ebuild242
-rw-r--r--sys-libs/db/db-5.3.28-r11.ebuild242
-rw-r--r--sys-libs/db/db-5.3.28-r9.ebuild241
-rw-r--r--sys-libs/db/db-6.0.35-r4.ebuild234
-rw-r--r--sys-libs/db/db-6.0.35-r5.ebuild236
-rw-r--r--sys-libs/db/files/db-4.8-libtool.patch65
-rw-r--r--sys-libs/db/files/db-4.8-wformat-security.patch43
-rw-r--r--sys-libs/db/files/db-4.8.30-clang16.patch281
-rw-r--r--sys-libs/db/files/db-4.8.30-rename-atomic-compare-exchange.patch20
-rw-r--r--sys-libs/db/files/db-4.8.30-tls-configure.patch31
-rw-r--r--sys-libs/db/files/db-5.1.29-rename-atomic-compare-exchange.patch20
-rw-r--r--sys-libs/db/files/db-5.2.28-sqlite-configure-path.patch11
-rw-r--r--sys-libs/db/files/db-5.3.28-clang16.patch325
-rw-r--r--sys-libs/db/files/db-5.3.28-modern-c.patch328
-rw-r--r--sys-libs/db/files/db-6.0.20-test-link.patch37
-rw-r--r--sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch11
-rw-r--r--sys-libs/db/metadata.xml26
-rw-r--r--sys-libs/efivar/Manifest1
-rw-r--r--sys-libs/efivar/efivar-39-r1.ebuild73
-rw-r--r--sys-libs/efivar/files/efivar-38-ia64-relro.patch60
-rw-r--r--sys-libs/efivar/metadata.xml11
-rw-r--r--sys-libs/error-standalone/Manifest2
-rw-r--r--sys-libs/error-standalone/error-standalone-1.0.ebuild14
-rw-r--r--sys-libs/error-standalone/error-standalone-2.0-r1.ebuild35
-rw-r--r--sys-libs/error-standalone/metadata.xml12
-rw-r--r--sys-libs/fortify-headers/Manifest1
-rw-r--r--sys-libs/fortify-headers/fortify-headers-1.1.ebuild36
-rw-r--r--sys-libs/fortify-headers/fortify-headers-9999.ebuild42
-rw-r--r--sys-libs/fortify-headers/metadata.xml11
-rw-r--r--sys-libs/freeipmi/Manifest3
-rw-r--r--sys-libs/freeipmi/files/bmc-watchdog.confd44
-rw-r--r--sys-libs/freeipmi/files/bmc-watchdog.initd.419
-rw-r--r--sys-libs/freeipmi/files/freeipmi.icinga4
-rw-r--r--sys-libs/freeipmi/files/ipmidetectd.confd5
-rw-r--r--sys-libs/freeipmi/files/ipmiseld.confd5
-rw-r--r--sys-libs/freeipmi/freeipmi-1.6.15.ebuild97
-rw-r--r--sys-libs/freeipmi/freeipmi-1.6.16.ebuild94
-rw-r--r--sys-libs/freeipmi/freeipmi-1.6.18.ebuild94
-rw-r--r--sys-libs/freeipmi/metadata.xml19
-rw-r--r--sys-libs/fts-standalone/Manifest1
-rw-r--r--sys-libs/fts-standalone/fts-standalone-1.2.7-r1.ebuild39
-rw-r--r--sys-libs/fts-standalone/fts-standalone-1.2.7.ebuild35
-rw-r--r--sys-libs/fts-standalone/metadata.xml11
-rw-r--r--sys-libs/gcompat/Manifest1
-rw-r--r--sys-libs/gcompat/gcompat-1.1.0.ebuild58
-rw-r--r--sys-libs/gcompat/gcompat-9999.ebuild57
-rw-r--r--sys-libs/gcompat/metadata.xml12
-rw-r--r--sys-libs/gdbm/Manifest6
-rw-r--r--sys-libs/gdbm/files/gdbm-1.25-musl.patch22
-rw-r--r--sys-libs/gdbm/gdbm-1.24.ebuild67
-rw-r--r--sys-libs/gdbm/gdbm-1.25.ebuild68
-rw-r--r--sys-libs/gdbm/gdbm-1.26.ebuild64
-rw-r--r--sys-libs/gdbm/metadata.xml14
-rw-r--r--sys-libs/glibc/Manifest45
-rw-r--r--sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch15
-rw-r--r--sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch32
-rw-r--r--sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch85
-rw-r--r--sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch16
-rw-r--r--sys-libs/glibc/files/2.35/glibc-2.35-make-4.4-MAKEFLAGS.patch102
-rw-r--r--sys-libs/glibc/files/glibc-2.41-m68k-malign.patch14
-rw-r--r--sys-libs/glibc/files/glibc-2.43-hurd-CLOCK_MONOTONIC.patch100
-rw-r--r--sys-libs/glibc/files/glibc-2.43-hurd-ldconfig.patch45
-rw-r--r--sys-libs/glibc/files/glibc-2.43-hurd-link-helpers.patch34
-rw-r--r--sys-libs/glibc/files/host.conf-123
-rw-r--r--sys-libs/glibc/files/nscd-185
-rw-r--r--sys-libs/glibc/files/nscd.service15
-rw-r--r--sys-libs/glibc/files/nscd.tmpfilesd4
-rw-r--r--sys-libs/glibc/glibc-2.19-r3.ebuild1350
-rw-r--r--sys-libs/glibc/glibc-2.31-r7.ebuild1515
-rw-r--r--sys-libs/glibc/glibc-2.32-r8.ebuild1533
-rw-r--r--sys-libs/glibc/glibc-2.33-r14.ebuild1610
-rw-r--r--sys-libs/glibc/glibc-2.34-r14.ebuild1631
-rw-r--r--sys-libs/glibc/glibc-2.35-r11.ebuild1639
-rw-r--r--sys-libs/glibc/glibc-2.36-r8.ebuild1680
-rw-r--r--sys-libs/glibc/glibc-2.37-r10.ebuild1695
-rw-r--r--sys-libs/glibc/glibc-2.38-r13.ebuild1740
-rw-r--r--sys-libs/glibc/glibc-2.39-r11.ebuild1751
-rw-r--r--sys-libs/glibc/glibc-2.40-r11.ebuild1754
-rw-r--r--sys-libs/glibc/glibc-2.41-r10.ebuild1790
-rw-r--r--sys-libs/glibc/glibc-2.42-r5.ebuild1860
-rw-r--r--sys-libs/glibc/glibc-2.42-r6.ebuild1860
-rw-r--r--sys-libs/glibc/glibc-2.42-r7.ebuild1865
-rw-r--r--sys-libs/glibc/glibc-2.43-r1.ebuild1896
-rw-r--r--sys-libs/glibc/glibc-2.43-r2.ebuild1901
-rw-r--r--sys-libs/glibc/glibc-2.43.ebuild1898
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild1900
-rw-r--r--sys-libs/glibc/metadata.xml38
-rw-r--r--sys-libs/gpm/Manifest2
-rw-r--r--sys-libs/gpm/files/gpm-1.20.7-gcc-10.patch14
-rw-r--r--sys-libs/gpm/files/gpm-1.20.7-gcc-include.patch18
-rw-r--r--sys-libs/gpm/files/gpm-1.20.7-glibc-2.26.patch12
-rw-r--r--sys-libs/gpm/files/gpm-1.20.7-musl.patch143
-rw-r--r--sys-libs/gpm/files/gpm-1.20.7-signedness.patch20
-rw-r--r--sys-libs/gpm/files/gpm-1.20.7-sysmacros.patch30
-rw-r--r--sys-libs/gpm/files/gpm-1.20.7-warnings.patch202
-rw-r--r--sys-libs/gpm/files/gpm.conf.d23
-rw-r--r--sys-libs/gpm/files/gpm.rc6-228
-rw-r--r--sys-libs/gpm/files/gpm.service12
-rw-r--r--sys-libs/gpm/files/gpm.service-r111
-rw-r--r--sys-libs/gpm/gpm-1.20.7-r6.ebuild119
-rw-r--r--sys-libs/gpm/metadata.xml11
-rw-r--r--sys-libs/gwenhywfar/Manifest2
-rw-r--r--sys-libs/gwenhywfar/gwenhywfar-5.13.0.ebuild64
-rw-r--r--sys-libs/gwenhywfar/gwenhywfar-5.14.1.ebuild64
-rw-r--r--sys-libs/gwenhywfar/metadata.xml10
-rw-r--r--sys-libs/iceoryx/Manifest1
-rw-r--r--sys-libs/iceoryx/iceoryx-2.0.3.ebuild55
-rw-r--r--sys-libs/iceoryx/iceoryx-9999.ebuild52
-rw-r--r--sys-libs/iceoryx/metadata.xml11
-rw-r--r--sys-libs/kpmcore/Manifest2
-rw-r--r--sys-libs/kpmcore/kpmcore-25.12.3.ebuild31
-rw-r--r--sys-libs/kpmcore/kpmcore-26.04.1.ebuild31
-rw-r--r--sys-libs/kpmcore/metadata.xml11
-rw-r--r--sys-libs/ldb/Manifest1
-rw-r--r--sys-libs/ldb/files/ldb-1.1.31-fix_PKGCONFIGDIR-when-python-disabled.patch17
-rw-r--r--sys-libs/ldb/files/ldb-2.4.2-skip-32bit-time_t-tests.patch35
-rw-r--r--sys-libs/ldb/files/ldb-2.5.2-skip-waf-tevent-check.patch12
-rw-r--r--sys-libs/ldb/files/ldb-2.9.0-optional_packages.patch41
-rw-r--r--sys-libs/ldb/ldb-2.9.2.ebuild175
-rw-r--r--sys-libs/ldb/metadata.xml14
-rw-r--r--sys-libs/libapparmor/Manifest2
-rw-r--r--sys-libs/libapparmor/libapparmor-4.1.7.ebuild72
-rw-r--r--sys-libs/libapparmor/libapparmor-5.0.0.ebuild72
-rw-r--r--sys-libs/libapparmor/metadata.xml20
-rw-r--r--sys-libs/libavc1394/Manifest1
-rw-r--r--sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild31
-rw-r--r--sys-libs/libavc1394/metadata.xml11
-rw-r--r--sys-libs/libblockdev/Manifest2
-rw-r--r--sys-libs/libblockdev/files/libblockdev-3.0.4-add-non-systemd-method-for-distro-info.patch32
-rw-r--r--sys-libs/libblockdev/files/libblockdev-3.3.0-fix-bashism.patch24
-rw-r--r--sys-libs/libblockdev/files/libblockdev-3.3.0-tests-nvme.patch29
-rw-r--r--sys-libs/libblockdev/files/libblockdev-3.3.0-tests-skip-vdo.patch44
-rw-r--r--sys-libs/libblockdev/libblockdev-3.3.1.ebuild165
-rw-r--r--sys-libs/libblockdev/libblockdev-3.4.0.ebuild162
-rw-r--r--sys-libs/libblockdev/metadata.xml17
-rw-r--r--sys-libs/libcap-ng/Manifest2
-rw-r--r--sys-libs/libcap-ng/files/libcap-ng-0.8.5-python.patch23
-rw-r--r--sys-libs/libcap-ng/files/libcap-ng-0.9.3-audit-out-of-source-build.patch31
-rw-r--r--sys-libs/libcap-ng/libcap-ng-0.8.5.ebuild107
-rw-r--r--sys-libs/libcap-ng/libcap-ng-0.9.3.ebuild153
-rw-r--r--sys-libs/libcap-ng/metadata.xml27
-rw-r--r--sys-libs/libcap/Manifest1
-rw-r--r--sys-libs/libcap/files/libcap-2.62-ignore-RAISE_SETFCAP-install-failures.patch21
-rw-r--r--sys-libs/libcap/libcap-2.78.ebuild96
-rw-r--r--sys-libs/libcap/libcap-9999.ebuild96
-rw-r--r--sys-libs/libcap/metadata.xml14
-rw-r--r--sys-libs/libchipcard/Manifest1
-rw-r--r--sys-libs/libchipcard/files/libchipcard-5.1.6-clang16-build-fix.patch12
-rw-r--r--sys-libs/libchipcard/libchipcard-5.1.6-r1.ebuild53
-rw-r--r--sys-libs/libchipcard/metadata.xml8
-rw-r--r--sys-libs/libfaketime/Manifest1
-rw-r--r--sys-libs/libfaketime/libfaketime-0.9.12.ebuild64
-rw-r--r--sys-libs/libfaketime/metadata.xml19
-rw-r--r--sys-libs/libfixposix/Manifest2
-rw-r--r--sys-libs/libfixposix/libfixposix-0.4.3.ebuild22
-rw-r--r--sys-libs/libfixposix/libfixposix-0.5.1.ebuild27
-rw-r--r--sys-libs/libfixposix/metadata.xml8
-rw-r--r--sys-libs/libhx/Manifest6
-rw-r--r--sys-libs/libhx/libhx-4.27.ebuild26
-rw-r--r--sys-libs/libhx/libhx-5.0.ebuild28
-rw-r--r--sys-libs/libhx/libhx-5.1.ebuild28
-rw-r--r--sys-libs/libhx/libhx-5.2.ebuild28
-rw-r--r--sys-libs/libhx/libhx-5.3.ebuild28
-rw-r--r--sys-libs/libhx/libhx-5.4.ebuild28
-rw-r--r--sys-libs/libhx/metadata.xml10
-rw-r--r--sys-libs/libieee1284/Manifest1
-rw-r--r--sys-libs/libieee1284/files/libieee1284-0.2.11-don-t-blindly-assume-outb_p-to-be-available.patch27
-rw-r--r--sys-libs/libieee1284/libieee1284-0.2.11-r9.ebuild53
-rw-r--r--sys-libs/libieee1284/metadata.xml11
-rw-r--r--sys-libs/libixp/Manifest1
-rw-r--r--sys-libs/libixp/files/libixp-0.5_p20110208-gentoo.patch40
-rw-r--r--sys-libs/libixp/libixp-0.5_p20110208-r3.ebuild44
-rw-r--r--sys-libs/libixp/metadata.xml5
-rw-r--r--sys-libs/libmodulemd/Manifest4
-rw-r--r--sys-libs/libmodulemd/files/libmodulemd-2.15.0-glib-docs.patch89
-rw-r--r--sys-libs/libmodulemd/libmodulemd-2.15.0-r1.ebuild72
-rw-r--r--sys-libs/libmodulemd/libmodulemd-2.15.2.ebuild81
-rw-r--r--sys-libs/libmodulemd/libmodulemd-9999.ebuild68
-rw-r--r--sys-libs/libmodulemd/metadata.xml11
-rw-r--r--sys-libs/libnbd/Manifest4
-rw-r--r--sys-libs/libnbd/files/libnbd-1.22.2-Makefile.am-Conditionally-compile-some-SUBDIRS.patch79
-rw-r--r--sys-libs/libnbd/files/libnbd-1.22.2-build-Remove-automagic-compiling-of-examples.patch149
-rw-r--r--sys-libs/libnbd/files/libnbd-1.22.5-which-hunt.patch13
-rw-r--r--sys-libs/libnbd/files/libnbd-1.24.0-Makefile.am-Conditionally-compile-some-SUBDIRS.patch66
-rw-r--r--sys-libs/libnbd/files/libnbd-1.24.0-build-Remove-automagic-compiling-of-examples.patch136
-rw-r--r--sys-libs/libnbd/files/libnbd-1.24.0-build-define-TLS_PRIORITY-unconditionally.patch25
-rw-r--r--sys-libs/libnbd/libnbd-1.18.1-r3.ebuild85
-rw-r--r--sys-libs/libnbd/libnbd-1.22.5-r1.ebuild114
-rw-r--r--sys-libs/libnbd/libnbd-1.23.9-r1.ebuild114
-rw-r--r--sys-libs/libnbd/libnbd-1.24.0-r1.ebuild118
-rw-r--r--sys-libs/libnbd/metadata.xml19
-rw-r--r--sys-libs/libnvidia-container/Manifest3
-rw-r--r--sys-libs/libnvidia-container/files/libnvidia-container-1.17.0-fix-makefile-r1.patch220
-rw-r--r--sys-libs/libnvidia-container/files/libnvidia-container-1.17.4-go-1.24.patch48
-rw-r--r--sys-libs/libnvidia-container/files/libnvidia-container-1.19.0-fix-makefile.patch220
-rw-r--r--sys-libs/libnvidia-container/libnvidia-container-1.18.0.ebuild131
-rw-r--r--sys-libs/libnvidia-container/libnvidia-container-1.19.0.ebuild131
-rw-r--r--sys-libs/libnvidia-container/libnvidia-container-9999.ebuild132
-rw-r--r--sys-libs/libnvidia-container/metadata.xml31
-rw-r--r--sys-libs/libnvme/Manifest2
-rw-r--r--sys-libs/libnvme/libnvme-1.16.1.ebuild77
-rw-r--r--sys-libs/libnvme/libnvme-1.16.ebuild77
-rw-r--r--sys-libs/libnvme/metadata.xml19
-rw-r--r--sys-libs/libosinfo/Manifest2
-rw-r--r--sys-libs/libosinfo/files/1.11.0-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch32
-rw-r--r--sys-libs/libosinfo/files/libosinfo-1.12.0-libxml2-2.14.patch81
-rw-r--r--sys-libs/libosinfo/libosinfo-1.11.0-r1.ebuild67
-rw-r--r--sys-libs/libosinfo/libosinfo-1.12.0-r1.ebuild66
-rw-r--r--sys-libs/libosinfo/metadata.xml11
-rw-r--r--sys-libs/libraw1394/Manifest1
-rw-r--r--sys-libs/libraw1394/libraw1394-2.1.2-r1.ebuild28
-rw-r--r--sys-libs/libraw1394/metadata.xml8
-rw-r--r--sys-libs/librtas/Manifest2
-rw-r--r--sys-libs/librtas/librtas-2.0.3.ebuild35
-rw-r--r--sys-libs/librtas/librtas-2.0.6.ebuild41
-rw-r--r--sys-libs/librtas/metadata.xml13
-rw-r--r--sys-libs/libseccomp/Manifest2
-rw-r--r--sys-libs/libseccomp/files/libseccomp-2.5.3-skip-valgrind.patch13
-rw-r--r--sys-libs/libseccomp/files/libseccomp-2.6.0-aliasing.patch93
-rw-r--r--sys-libs/libseccomp/files/libseccomp-2.6.0-bounds.patch38
-rw-r--r--sys-libs/libseccomp/files/libseccomp-2.6.0-drop-bogus-test.patch31
-rw-r--r--sys-libs/libseccomp/files/libseccomp-2.6.0-python-shared.patch25
-rw-r--r--sys-libs/libseccomp/libseccomp-2.6.0-r3.ebuild146
-rw-r--r--sys-libs/libseccomp/libseccomp-9999.ebuild143
-rw-r--r--sys-libs/libseccomp/metadata.xml12
-rw-r--r--sys-libs/libselinux/Manifest3
-rw-r--r--sys-libs/libselinux/libselinux-3.10-r1.ebuild208
-rw-r--r--sys-libs/libselinux/libselinux-3.10.ebuild176
-rw-r--r--sys-libs/libselinux/libselinux-3.8.1-r2.ebuild167
-rw-r--r--sys-libs/libselinux/libselinux-3.8.1-r3.ebuild192
-rw-r--r--sys-libs/libselinux/libselinux-3.9.ebuild176
-rw-r--r--sys-libs/libselinux/libselinux-9999.ebuild208
-rw-r--r--sys-libs/libselinux/metadata.xml17
-rw-r--r--sys-libs/libsemanage/Manifest3
-rw-r--r--sys-libs/libsemanage/libsemanage-3.10.ebuild125
-rw-r--r--sys-libs/libsemanage/libsemanage-3.8.1.ebuild117
-rw-r--r--sys-libs/libsemanage/libsemanage-3.9.ebuild118
-rw-r--r--sys-libs/libsemanage/libsemanage-9999.ebuild125
-rw-r--r--sys-libs/libsemanage/metadata.xml12
-rw-r--r--sys-libs/libsepol/Manifest3
-rw-r--r--sys-libs/libsepol/libsepol-3.10.ebuild62
-rw-r--r--sys-libs/libsepol/libsepol-3.8.1.ebuild60
-rw-r--r--sys-libs/libsepol/libsepol-3.9.ebuild60
-rw-r--r--sys-libs/libsepol/libsepol-9999.ebuild62
-rw-r--r--sys-libs/libsepol/metadata.xml12
-rw-r--r--sys-libs/libservicelog/Manifest1
-rw-r--r--sys-libs/libservicelog/libservicelog-1.1.19.ebuild39
-rw-r--r--sys-libs/libservicelog/metadata.xml11
-rw-r--r--sys-libs/libsmbios/Manifest1
-rw-r--r--sys-libs/libsmbios/files/libsmbios-2.2.28-cppunit-tests.patch10
-rw-r--r--sys-libs/libsmbios/files/libsmbios-2.4.3-avoid_bashisms.patch84
-rw-r--r--sys-libs/libsmbios/files/libsmbios-2.4.3-insecure_rpaths.patch13
-rw-r--r--sys-libs/libsmbios/files/libsmbios-2.4.3-python-3.13.patch30
-rw-r--r--sys-libs/libsmbios/files/libsmbios-2.4.3-python-deprecations.patch33
-rw-r--r--sys-libs/libsmbios/libsmbios-2.4.3-r3.ebuild97
-rw-r--r--sys-libs/libsmbios/metadata.xml13
-rw-r--r--sys-libs/libstatgrab/Manifest1
-rw-r--r--sys-libs/libstatgrab/libstatgrab-0.92.1.ebuild43
-rw-r--r--sys-libs/libstatgrab/metadata.xml8
-rw-r--r--sys-libs/libstdc++-v3/Manifest2
-rw-r--r--sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r4.ebuild202
-rw-r--r--sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r5.ebuild206
-rw-r--r--sys-libs/libstdc++-v3/metadata.xml8
-rw-r--r--sys-libs/libtermcap-compat/Manifest3
-rw-r--r--sys-libs/libtermcap-compat/libtermcap-compat-2.0.8-r4.ebuild73
-rw-r--r--sys-libs/libtermcap-compat/metadata.xml8
-rw-r--r--sys-libs/libucontext/Manifest4
-rw-r--r--sys-libs/libucontext/libucontext-1.3.1.ebuild65
-rw-r--r--sys-libs/libucontext/libucontext-1.3.2.ebuild68
-rw-r--r--sys-libs/libucontext/libucontext-1.3.3.ebuild68
-rw-r--r--sys-libs/libucontext/libucontext-1.5.1.ebuild70
-rw-r--r--sys-libs/libucontext/metadata.xml11
-rw-r--r--sys-libs/libudev-compat/files/udev_old.c37
-rw-r--r--sys-libs/libudev-compat/libudev-compat-186-r1.ebuild45
-rw-r--r--sys-libs/libudev-compat/metadata.xml8
-rw-r--r--sys-libs/libudev-zero/Manifest2
-rw-r--r--sys-libs/libudev-zero/libudev-zero-1.0.3.ebuild32
-rw-r--r--sys-libs/libudev-zero/libudev-zero-1.0.4.ebuild35
-rw-r--r--sys-libs/libudev-zero/metadata.xml11
-rw-r--r--sys-libs/libunwind/Manifest3
-rw-r--r--sys-libs/libunwind/files/libunwind-1.8.2-x32.patch26
-rw-r--r--sys-libs/libunwind/files/libunwind-1.8.3-typo.patch34
-rw-r--r--sys-libs/libunwind/libunwind-1.8.2-r1.ebuild138
-rw-r--r--sys-libs/libunwind/libunwind-1.8.2.ebuild134
-rw-r--r--sys-libs/libunwind/libunwind-1.8.3.ebuild141
-rw-r--r--sys-libs/libunwind/libunwind-9999.ebuild134
-rw-r--r--sys-libs/libunwind/metadata.xml16
-rw-r--r--sys-libs/liburing/Manifest7
-rw-r--r--sys-libs/liburing/liburing-2.10-r1.ebuild94
-rw-r--r--sys-libs/liburing/liburing-2.11.ebuild88
-rw-r--r--sys-libs/liburing/liburing-2.12.ebuild92
-rw-r--r--sys-libs/liburing/liburing-2.13.ebuild92
-rw-r--r--sys-libs/liburing/liburing-2.14.ebuild92
-rw-r--r--sys-libs/liburing/liburing-2.9.ebuild86
-rw-r--r--sys-libs/liburing/liburing-9999.ebuild95
-rw-r--r--sys-libs/liburing/metadata.xml11
-rw-r--r--sys-libs/libutempter/Manifest1
-rw-r--r--sys-libs/libutempter/libutempter-1.2.1.ebuild70
-rw-r--r--sys-libs/libutempter/metadata.xml11
-rw-r--r--sys-libs/libuuid/Manifest1
-rw-r--r--sys-libs/libuuid/libuuid-1.0.3-r1.ebuild32
-rw-r--r--sys-libs/libuuid/metadata.xml15
-rw-r--r--sys-libs/libvpd/Manifest1
-rw-r--r--sys-libs/libvpd/libvpd-2.2.9.ebuild43
-rw-r--r--sys-libs/libvpd/metadata.xml12
-rw-r--r--sys-libs/libxcrypt/Manifest1
-rw-r--r--sys-libs/libxcrypt/files/libxcrypt-4.4.19-multibuild.patch14
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.38-r1.ebuild254
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.38.ebuild254
-rw-r--r--sys-libs/libxcrypt/metadata.xml21
-rw-r--r--sys-libs/lwp/Manifest1
-rw-r--r--sys-libs/lwp/files/lwp-2.8-bool.patch14
-rw-r--r--sys-libs/lwp/files/lwp-2.8-ia64.patch18
-rw-r--r--sys-libs/lwp/lwp-2.8-r1.ebuild22
-rw-r--r--sys-libs/lwp/metadata.xml5
-rw-r--r--sys-libs/metadata.xml31
-rw-r--r--sys-libs/minizip-ng/Manifest1
-rw-r--r--sys-libs/minizip-ng/files/minizip-ng-4.0.4-libbsd-overlay.patch16
-rw-r--r--sys-libs/minizip-ng/metadata.xml18
-rw-r--r--sys-libs/minizip-ng/minizip-ng-4.0.10-r1.ebuild107
-rw-r--r--sys-libs/minizip-ng/minizip-ng-4.0.10.ebuild89
-rw-r--r--sys-libs/mtdev/Manifest1
-rw-r--r--sys-libs/mtdev/metadata.xml8
-rw-r--r--sys-libs/mtdev/mtdev-1.1.7.ebuild23
-rw-r--r--sys-libs/musl-nscd/Manifest1
-rw-r--r--sys-libs/musl-nscd/files/nscd.initd59
-rw-r--r--sys-libs/musl-nscd/files/nscd.service15
-rw-r--r--sys-libs/musl-nscd/files/nscd.tmpfilesd4
-rw-r--r--sys-libs/musl-nscd/metadata.xml14
-rw-r--r--sys-libs/musl-nscd/musl-nscd-1.1.1-r1.ebuild52
-rw-r--r--sys-libs/musl-nscd/musl-nscd-9999.ebuild52
-rw-r--r--sys-libs/musl/Manifest8
-rw-r--r--sys-libs/musl/files/ldconfig.in-r3160
-rw-r--r--sys-libs/musl/files/musl-1.2.4-arm64-crti-alignment.patch32
-rw-r--r--sys-libs/musl/files/musl-arm-crti-alignment.patch33
-rw-r--r--sys-libs/musl/files/musl-dns-union.patch33
-rw-r--r--sys-libs/musl/files/musl-getauxval.patch31
-rw-r--r--sys-libs/musl/files/musl-getifaddrs-qemu-workaround.patch25
-rw-r--r--sys-libs/musl/files/musl-iconv-out-of-bound-fix.patch76
-rw-r--r--sys-libs/musl/files/musl-isatty.patch40
-rw-r--r--sys-libs/musl/files/musl-page-size.patch48
-rw-r--r--sys-libs/musl/files/musl-ppc-clobber.patch154
-rw-r--r--sys-libs/musl/files/musl-printf-empty-iovec.patch33
-rw-r--r--sys-libs/musl/files/musl-sched.h-reduce-namespace-conflicts.patch58
-rw-r--r--sys-libs/musl/files/stack_chk_fail_local.c45
-rw-r--r--sys-libs/musl/metadata.xml19
-rw-r--r--sys-libs/musl/musl-1.2.5-r8.ebuild267
-rw-r--r--sys-libs/musl/musl-1.2.6-r1.ebuild261
-rw-r--r--sys-libs/musl/musl-1.2.6.ebuild257
-rw-r--r--sys-libs/musl/musl-9999.ebuild257
-rw-r--r--sys-libs/native-uuid/metadata.xml12
-rw-r--r--sys-libs/native-uuid/native-uuid-1.0-r1.ebuild36
-rw-r--r--sys-libs/ncurses-compat/Manifest141
-rw-r--r--sys-libs/ncurses-compat/metadata.xml24
-rw-r--r--sys-libs/ncurses-compat/ncurses-compat-6.4_p20240414.ebuild384
-rw-r--r--sys-libs/ncurses/Manifest200
-rw-r--r--sys-libs/ncurses/metadata.xml26
-rw-r--r--sys-libs/ncurses/ncurses-6.5_p20251220.ebuild517
-rw-r--r--sys-libs/ncurses/ncurses-6.6_p20260411.ebuild451
-rw-r--r--sys-libs/newlib/Manifest2
-rw-r--r--sys-libs/newlib/files/newlib-3.3.0-no-nano-cxx.patch29
-rw-r--r--sys-libs/newlib/metadata.xml17
-rw-r--r--sys-libs/newlib/newlib-4.5.0.20241231-r1.ebuild181
-rw-r--r--sys-libs/newlib/newlib-4.6.0.20260123.ebuild181
-rw-r--r--sys-libs/newlib/newlib-9999.ebuild181
-rw-r--r--sys-libs/nss-tls/Manifest2
-rw-r--r--sys-libs/nss-tls/files/nss-tlsd33
-rw-r--r--sys-libs/nss-tls/metadata.xml11
-rw-r--r--sys-libs/nss-tls/nss-tls-1.0.ebuild57
-rw-r--r--sys-libs/nss-tls/nss-tls-1.1-r1.ebuild46
-rw-r--r--sys-libs/nss-tls/nss-tls-9999.ebuild59
-rw-r--r--sys-libs/nss-usrfiles/Manifest1
-rw-r--r--sys-libs/nss-usrfiles/metadata.xml8
-rw-r--r--sys-libs/nss-usrfiles/nss-usrfiles-2.18.1.ebuild30
-rw-r--r--sys-libs/nss_wrapper/Manifest1
-rw-r--r--sys-libs/nss_wrapper/files/nss_wrapper-1.1.16-stdint.patch116
-rw-r--r--sys-libs/nss_wrapper/metadata.xml8
-rw-r--r--sys-libs/nss_wrapper/nss_wrapper-1.1.16.ebuild36
-rw-r--r--sys-libs/obstack-standalone/Manifest1
-rw-r--r--sys-libs/obstack-standalone/metadata.xml11
-rw-r--r--sys-libs/obstack-standalone/obstack-standalone-1.2.3.ebuild36
-rw-r--r--sys-libs/openipmi/Manifest2
-rw-r--r--sys-libs/openipmi/files/openipmi-2.0.26-tinfo.patch17
-rw-r--r--sys-libs/openipmi/metadata.xml11
-rw-r--r--sys-libs/openipmi/openipmi-2.0.36-r1.ebuild98
-rw-r--r--sys-libs/openipmi/openipmi-2.0.37-r1.ebuild98
-rw-r--r--sys-libs/pam/Manifest2
-rw-r--r--sys-libs/pam/metadata.xml24
-rw-r--r--sys-libs/pam/pam-1.7.2.ebuild198
-rw-r--r--sys-libs/pam_wrapper/Manifest1
-rw-r--r--sys-libs/pam_wrapper/files/pam_wrapper-1.1.5-tests-import.patch22
-rw-r--r--sys-libs/pam_wrapper/metadata.xml8
-rw-r--r--sys-libs/pam_wrapper/pam_wrapper-1.1.8.ebuild89
-rw-r--r--sys-libs/pkgcraft/Manifest1
-rw-r--r--sys-libs/pkgcraft/metadata.xml11
-rw-r--r--sys-libs/pkgcraft/pkgcraft-0.0.16-r1.ebuild99
-rw-r--r--sys-libs/pkgcraft/pkgcraft-9999.ebuild85
-rw-r--r--sys-libs/pwdb/Manifest1
-rw-r--r--sys-libs/pwdb/files/pwdb-0.62-build.patch114
-rw-r--r--sys-libs/pwdb/files/pwdb-0.62-disable-static.patch19
-rw-r--r--sys-libs/pwdb/files/pwdb-0.62-selinux.patch443
-rw-r--r--sys-libs/pwdb/metadata.xml8
-rw-r--r--sys-libs/pwdb/pwdb-0.62-r2.ebuild67
-rw-r--r--sys-libs/queue-standalone/files/queue.h574
-rw-r--r--sys-libs/queue-standalone/metadata.xml8
-rw-r--r--sys-libs/queue-standalone/queue-standalone-0.1-r1.ebuild21
-rw-r--r--sys-libs/readline/Manifest38
-rw-r--r--sys-libs/readline/files/readline-5.0-no_rpath.patch13
-rw-r--r--sys-libs/readline/files/readline-7.0-headers.patch24
-rw-r--r--sys-libs/readline/files/readline-8.0-headers.patch17
-rw-r--r--sys-libs/readline/files/readline-8.2-c23.patch21
-rw-r--r--sys-libs/readline/metadata.xml15
-rw-r--r--sys-libs/readline/readline-8.2_p13-r1.ebuild261
-rw-r--r--sys-libs/readline/readline-8.3_p3.ebuild257
-rw-r--r--sys-libs/readline/readline-8.4_alpha_pre20251007.ebuild257
-rw-r--r--sys-libs/readline/readline-9999.ebuild257
-rw-r--r--sys-libs/rpmatch-standalone/Manifest1
-rw-r--r--sys-libs/rpmatch-standalone/metadata.xml11
-rw-r--r--sys-libs/rpmatch-standalone/rpmatch-standalone-1.0-r1.ebuild36
-rw-r--r--sys-libs/scallop/Manifest1
-rw-r--r--sys-libs/scallop/files/bash-5.3_p9-general-workaround-aliasing-violation-in-REVERSE_LIS.patch53
-rw-r--r--sys-libs/scallop/metadata.xml11
-rw-r--r--sys-libs/scallop/scallop-5.3.9.20251212-r1.ebuild53
-rw-r--r--sys-libs/scallop/scallop-9999.ebuild53
-rw-r--r--sys-libs/slang/Manifest1
-rw-r--r--sys-libs/slang/files/slang-2.3.3-ld-typo.patch45
-rw-r--r--sys-libs/slang/files/slang-2.3.3-remove-undefined-symbol-from-version-script.patch30
-rw-r--r--sys-libs/slang/files/slang-2.3.3-slsh-libs.patch21
-rw-r--r--sys-libs/slang/metadata.xml8
-rw-r--r--sys-libs/slang/slang-2.3.3-r1.ebuild88
-rw-r--r--sys-libs/slang/slang-2.3.3-r2.ebuild89
-rw-r--r--sys-libs/snapd-glib/Manifest3
-rw-r--r--sys-libs/snapd-glib/files/snapd-glib-1.67-install-missing-header.patch11
-rw-r--r--sys-libs/snapd-glib/metadata.xml14
-rw-r--r--sys-libs/snapd-glib/snapd-glib-1.67-r1.ebuild81
-rw-r--r--sys-libs/snapd-glib/snapd-glib-1.70.ebuild76
-rw-r--r--sys-libs/snapd-glib/snapd-glib-1.72.ebuild76
-rw-r--r--sys-libs/solo-udev-rules/Manifest1
-rw-r--r--sys-libs/solo-udev-rules/metadata.xml12
-rw-r--r--sys-libs/solo-udev-rules/solo-udev-rules-4.1.5.ebuild40
-rw-r--r--sys-libs/spiral/Manifest2
-rw-r--r--sys-libs/spiral/metadata.xml28
-rw-r--r--sys-libs/spiral/spiral-0.3.0.ebuild56
-rw-r--r--sys-libs/talloc/Manifest3
-rw-r--r--sys-libs/talloc/metadata.xml11
-rw-r--r--sys-libs/talloc/talloc-2.4.2.ebuild132
-rw-r--r--sys-libs/talloc/talloc-2.4.3.ebuild132
-rw-r--r--sys-libs/talloc/talloc-2.4.4.ebuild132
-rw-r--r--sys-libs/tdb/Manifest4
-rw-r--r--sys-libs/tdb/metadata.xml8
-rw-r--r--sys-libs/tdb/tdb-1.4.12.ebuild81
-rw-r--r--sys-libs/tdb/tdb-1.4.13.ebuild81
-rw-r--r--sys-libs/tdb/tdb-1.4.14.ebuild81
-rw-r--r--sys-libs/tdb/tdb-1.4.15.ebuild81
-rw-r--r--sys-libs/tevent/Manifest3
-rw-r--r--sys-libs/tevent/metadata.xml8
-rw-r--r--sys-libs/tevent/tevent-0.16.1.ebuild105
-rw-r--r--sys-libs/tevent/tevent-0.16.2.ebuild105
-rw-r--r--sys-libs/tevent/tevent-0.17.1.ebuild105
-rw-r--r--sys-libs/timezone-data/Manifest2
-rw-r--r--sys-libs/timezone-data/metadata.xml22
-rw-r--r--sys-libs/timezone-data/timezone-data-2026a.ebuild169
-rw-r--r--sys-libs/timezone-data/timezone-data-2026b.ebuild169
-rw-r--r--sys-libs/uid_wrapper/Manifest1
-rw-r--r--sys-libs/uid_wrapper/files/uid_wrapper-1.3.2-tests-x32.patch32
-rw-r--r--sys-libs/uid_wrapper/metadata.xml8
-rw-r--r--sys-libs/uid_wrapper/uid_wrapper-1.3.2.ebuild33
-rw-r--r--sys-libs/zlib-ng/Manifest3
-rw-r--r--sys-libs/zlib-ng/metadata.xml14
-rw-r--r--sys-libs/zlib-ng/zlib-ng-2.2.5-r1.ebuild113
-rw-r--r--sys-libs/zlib-ng/zlib-ng-2.2.5.ebuild86
-rw-r--r--sys-libs/zlib-ng/zlib-ng-2.3.2.ebuild117
-rw-r--r--sys-libs/zlib-ng/zlib-ng-2.3.3.ebuild117
-rw-r--r--sys-libs/zlib/Manifest4
-rw-r--r--sys-libs/zlib/files/zlib-1.2.11-minizip-drop-crypt-header.patch38
-rw-r--r--sys-libs/zlib/files/zlib-1.3.1-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch17
-rw-r--r--sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-RANLIB-NM-detection.patch79
-rw-r--r--sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-libtool-on-darwin.patch22
-rw-r--r--sys-libs/zlib/files/zlib-1.3.1-use-LDFLAGS-in-configure.patch74
-rw-r--r--sys-libs/zlib/files/zlib-1.3.2-minizip-install.patch25
-rw-r--r--sys-libs/zlib/files/zlib-1.3.2-s390.patch29
-rw-r--r--sys-libs/zlib/metadata.xml15
-rw-r--r--sys-libs/zlib/zlib-1.3.1-r1.ebuild185
-rw-r--r--sys-libs/zlib/zlib-1.3.2-r1.ebuild180
527 files changed, 0 insertions, 64999 deletions
diff --git a/sys-libs/argp-standalone/Manifest b/sys-libs/argp-standalone/Manifest
deleted file mode 100644
index 59fdf7b532b7..000000000000
--- a/sys-libs/argp-standalone/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST argp-standalone-1.5.0.tar.gz 65889 BLAKE2B 01f4ceb3ad18be534605db09db708f17ab5df6bfd8fc0259451a70163c8e9bda92c4f9445e98d6b6cc0bc19bc61b8b122eddacf96bd026fc2ed0db00dda318f3 SHA512 fa2eb61ea00f7a13385e5c1e579dd88471d6ba3a13b6353e924fe71914b90b40688b42a9f1789bc246e03417fee1788b1990753cda8c8d4a544e85f26b63f9e2
diff --git a/sys-libs/argp-standalone/argp-standalone-1.5.0.ebuild b/sys-libs/argp-standalone/argp-standalone-1.5.0.ebuild
deleted file mode 100644
index 7f5b17768a74..000000000000
--- a/sys-libs/argp-standalone/argp-standalone-1.5.0.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools flag-o-matic
-
-DESCRIPTION="Standalone argp library for use with musl"
-HOMEPAGE="https://github.com/argp-standalone/argp-standalone"
-SRC_URI="https://github.com/argp-standalone/argp-standalone/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="public-domain GPL-2 GPL-3 XC"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~m68k ~mips ppc ppc64 ~riscv ~s390 x86"
-IUSE="static-libs"
-
-DEPEND="!sys-libs/glibc"
-
-PATCHES=(
- "${FILESDIR}"/${P}-shared.patch
-)
-
-src_prepare() {
- default
-
- eautoreconf
-}
-
-src_configure() {
- append-cflags "-fgnu89-inline"
-
- econf $(use_enable static-libs static)
-}
-
-src_install() {
- default
-
- find "${ED}" -name '*.la' -delete || die
-
- insinto /usr/include
- doins argp.h
-}
diff --git a/sys-libs/argp-standalone/files/argp-standalone-1.5.0-shared.patch b/sys-libs/argp-standalone/files/argp-standalone-1.5.0-shared.patch
deleted file mode 100644
index 1c6c599942c8..000000000000
--- a/sys-libs/argp-standalone/files/argp-standalone-1.5.0-shared.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Initially added in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb196546c62e9894a46900e8078f753388d4cc1a.
-Commit mentions it being from Debian but not found any other references yet.
-
-We use -largp fairly extensively across the tree which this patch
-accommodates (easier than forcing includes?).
---- a/Makefile.am 2022-05-03 03:41:05.000000000 -0400
-+++ b/Makefile.am 2022-05-30 12:28:33.850249380 -0400
-@@ -21,19 +21,19 @@
- AUTOMAKE_OPTIONS = foreign
- SUBDIRS = . testsuite
-
--LIBOBJS = @LIBOBJS@
-+LTLIBOBJS = @LTLIBOBJS@
-
--noinst_LIBRARIES = libargp.a
-+lib_LTLIBRARIES = libargp.la
- noinst_PROGRAMS = argp-test
- noinst_HEADERS = argp.h argp-fmtstream.h argp-namefrob.h # argp-comp.h
-
- EXTRA_DIST = mempcpy.c strchrnul.c strndup.c Versions
-
- # Leaves out argp-fs-xinl.c and argp-xinl.c
--libargp_a_SOURCES = argp-ba.c argp-eexst.c argp-fmtstream.c \
-+libargp_la_SOURCES = argp-ba.c argp-eexst.c argp-fmtstream.c \
- argp-help.c argp-parse.c argp-pv.c \
- argp-pvh.c
-
--libargp_a_LIBADD = $(LIBOBJS)
-+libargp_la_LIBADD = $(LTLIBOBJS)
-
--argp_test_LDADD = libargp.a
-+argp_test_LDADD = libargp.la
---- a/configure.ac 2022-05-03 03:41:05.000000000 -0400
-+++ b/configure.ac 2022-05-30 12:27:08.688735341 -0400
-@@ -17,6 +17,7 @@
- AC_PROG_MAKE_SET
- AC_PROG_RANLIB
- AM_PROG_CC_STDC
-+AC_PROG_LIBTOOL
-
- if test "x$am_cv_prog_cc_stdc" = xno ; then
- AC_ERROR([the C compiler doesn't handle ANSI-C])
---- a/testsuite/Makefile.am 2022-05-03 03:41:05.000000000 -0400
-+++ b/testsuite/Makefile.am 2022-05-30 12:27:08.688735341 -0400
-@@ -5,7 +5,7 @@
-
- noinst_PROGRAMS = $(TS_PROGS) ex1 ex3 ex4
-
--LDADD = ../libargp.a
-+LDADD = -L../.libs -largp
-
- EXTRA_DIST = $(TS_SH) run-tests
- CLEANFILES = test.out
diff --git a/sys-libs/argp-standalone/metadata.xml b/sys-libs/argp-standalone/metadata.xml
deleted file mode 100644
index b4d9c5f484e7..000000000000
--- a/sys-libs/argp-standalone/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>blueness@gentoo.org</email>
- <name>Anthony G. Basile</name>
- </maintainer>
- <maintainer type="project">
- <email>musl@gentoo.org</email>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/basu/Manifest b/sys-libs/basu/Manifest
deleted file mode 100644
index 0858f43311c7..000000000000
--- a/sys-libs/basu/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST basu-0.2.1.tar.gz 239178 BLAKE2B 8b8d5023b6816939a89acc9bdf6a49a464ad1d60dfafb80e9dd8485b743db9b497aef14cfa9f0bbab4aedcc07a20cac0e93b4b5071b2731f4762f9f514739aaf SHA512 b8017bbfdb5b408bd380e3b1cb1443321863ed8c9487ab0c8c80860c2ffb0c0403c81daf7e87f815027e9a826d08aa82a54c496bc87527209933e0d007b0c9ea
diff --git a/sys-libs/basu/basu-0.2.1.ebuild b/sys-libs/basu/basu-0.2.1.ebuild
deleted file mode 100644
index 715b72d0d305..000000000000
--- a/sys-libs/basu/basu-0.2.1.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-inherit meson python-any-r1
-
-DESCRIPTION="The sd-bus library, extracted from systemd"
-HOMEPAGE="https://sr.ht/~emersion/basu/"
-SRC_URI="https://git.sr.ht/~emersion/basu/refs/download/v${PV}/basu-${PV}.tar.gz"
-LICENSE="LGPL-2.1+"
-SLOT="0"
-
-KEYWORDS="amd64 ~arm64"
-IUSE="audit caps"
-
-DEPEND="
- audit? ( sys-process/audit )
- caps? ( sys-libs/libcap )
-"
-
-RDEPEND="${DEPEND}"
-# Needed to generate hash tables
-BDEPEND="${PYTHON_DEPS}
- dev-util/gperf
-"
-
-PATCHES=(
- "${FILESDIR}"/${P}-fix_lld.patch #918937
-)
-
-src_configure() {
- local emesonargs=(
- $(meson_feature audit)
- $(meson_feature caps libcap)
- )
- meson_src_configure
-}
diff --git a/sys-libs/basu/files/basu-0.2.1-fix_lld.patch b/sys-libs/basu/files/basu-0.2.1-fix_lld.patch
deleted file mode 100644
index f8c73d11ca68..000000000000
--- a/sys-libs/basu/files/basu-0.2.1-fix_lld.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-see https://bugs.gentoo.org/918937
-from upstream https://git.sr.ht/~emersion/basu/commit/a08cf5a575325435040d35710dbac3d0c32b1676.patch
-Drop unused symbols from version script
---- a/src/libsystemd/libsystemd.sym
-+++ b/src/libsystemd/libsystemd.sym
-@@ -72,9 +72,6 @@ global:
- sd_bus_get_current_message;
- sd_bus_get_current_handler;
- sd_bus_get_current_userdata;
-- sd_bus_attach_event;
-- sd_bus_detach_event;
-- sd_bus_get_event;
- sd_bus_add_filter;
- sd_bus_add_match;
- sd_bus_add_object;
diff --git a/sys-libs/basu/metadata.xml b/sys-libs/basu/metadata.xml
deleted file mode 100644
index 5e504c9ac08a..000000000000
--- a/sys-libs/basu/metadata.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>arsen@gentoo.org</email>
- <name>Arsen Arsenović</name>
- </maintainer>
- <longdescription>
- The sd-bus library, extracted from systemd.
-
- Some projects rely on the sd-bus library for DBus support.
- However not all systems have systemd or elogind installed. This
- library provides just sd-bus (and the busctl utility).
- </longdescription>
- <upstream>
- <remote-id type="sourcehut">~emersion/basu</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/binutils-libs/Manifest b/sys-libs/binutils-libs/Manifest
deleted file mode 100644
index a4c2f073c639..000000000000
--- a/sys-libs/binutils-libs/Manifest
+++ /dev/null
@@ -1,29 +0,0 @@
-DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6ee393fa13b4f2f27832f07790989476f11d1beddb5ad5a9be5c65c1d4dff9d4598d21adcb00c1d0490f69a99127f4527447 SHA512 e05ed8886acb5cb95a3e97c5bc0564215f7d44b604610f5c4545997fd9625d6de909c37063127e819926cd1548a48d3529dd3e82e98ee6a5dbaced028c57355d
-DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
-DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
-DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
-DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
-DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
-DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
-DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
-DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
-DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
-DIST binutils-2.39-patches-6.tar.xz 92380 BLAKE2B 39f490f1134fb0e7dc80924a280d3113efe0ed094ee15de97c42ab751c83d2f5aa7448966d8cbbcde722b2af4999a36c1e5aa2f37ca6d2e3942b97b6d90ff152 SHA512 213cd7a86da83987966675f3195e843d898ca4ff412dfc29fd33ed80adb7bbf80a0b2919cd8e7dd49208c73a621ab7b720970f2259418bdc82ed2a568ff62064
-DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
-DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd2490cb72376f2cb6c6a60030d8c6b71357150d956a1e71d91683d43b571cb5bf738270880f72ef175d6c8faa257b090abeb8b SHA512 984dab529276ab4f9d215f643c7c18bd1793f438aaad0be158d209787c9c4a6bb68b10bec2065d3fe14a1594d5f1c29f55b2e9bac34a6f489f4b466c02e24766
-DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
-DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691
-DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374
-DIST binutils-2.42-patches-6.tar.xz 50664 BLAKE2B f13b65a761cfba80caf2e4740c6383b40305558365b950fba22aca95a104e799e8bd476082f36fb9288de4f224b09f317792c1444e549c40d15a4b64cdf61989 SHA512 1203eca0a9e622411eac377509de8fd0db3ffcb282ac38ab7a0369b166cc1091197daad85b51b145b34a4832f1a1a4d573c8254e8d67aeb22f35adb1ab3ece1f
-DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6
-DIST binutils-2.43-patches-3.tar.xz 62692 BLAKE2B a189a01a6a99c4fdff124cf90ecc18f874812c17fc735376c855469c487b6a71489ad5c2f86c518d2e029cc83d65757144ff9abddbe7ec3fc06e22f9501c62f4 SHA512 99a30e18fdfd7bdce85bb903f8d61837cfbb639ead8a680ff1a85ad1d615b658e696bdf196c4a002d029f952d34aa441e09e861b22f5400c65f07cce5934cd8f
-DIST binutils-2.43.tar.xz 28175768 BLAKE2B 28b0a04a28273b76eab2d00e00160be889f155f77f5a9d8759ef8dce505c97e97641bf7ec70b92b731b520570a02b06e04e8215b068fcb1bb2573e9ef24732d9 SHA512 93e063163e54d6a6ee2bd48dc754270bf757a3635b49a702ed6b310e929e94063958512d191e66beaf44275f7ea60865dbde138b624626739679fcc306b133bb
-DIST binutils-2.44-patches-4.tar.xz 83612 BLAKE2B caa71849dbbfe1181072c84985c786284f5111bbaa638a44e828c6cc4c19e005793d045dc116c772cf7ffed4898f6f6c935d04f94a76c26e59fb3c4f5adf03d1 SHA512 4dd8e6c36a0423ab29a1f4b227c90a05eb61cab380c809a2f49bba27e84d621e6a5eefe4ec510a7c1c60ba93720f92159ac477c02f9e720e1bbcd6aaf6097d26
-DIST binutils-2.44.tar.xz 27285788 BLAKE2B 0eb031ace9fb5a7047b81b5a05b1760f7d332c8ed67f98899f153a45f181b83e661a484551af05c0a9b2adc422da84619103c7b1f3c9fad5327872832b5446aa SHA512 b85d3bbc0e334cf67a96219d3c7c65fbf3e832b2c98a7417bf131f3645a0307057ec81cd2b29ff2563cec53e3d42f73e2c60cc5708e80d4a730efdcc6ae14ad7
-DIST binutils-2.45-patches-1.tar.xz 15588 BLAKE2B b88c62a6483807dfb24c97c534aadc1f930ea2d6cd8ad86734c40458a0e3ac4d149c0ee47c6ba541c462ce0e619dfaa5328c3dd5ffbd94511c487956866c7a38 SHA512 05c890a71d465539b3d066c2fd92930e4d6c9003147395a4c2cb9cc514f412fa392892e2c3b8887493a56b00453ac383612d0cac42e4cacce983e65886537149
-DIST binutils-2.45-patches-3.tar.xz 31264 BLAKE2B 3fda1843a13a3ea7d6a2bbfe5826c01f588c28c24c19158e1556d52b472125964a67af6fba14ba5ff3cb61586823c5a839c6fe8e249e85d4a480c30e69e68051 SHA512 2b44300ecef4bac7d0192aa20e561f4c062c49948028753c6aa6e8fd2a34292443d68d1c3adb2f79aba6c65d1bae8005f8174fc8c8833864d9633bd0f6d936b6
-DIST binutils-2.45.1-patches-1.tar.xz 9172 BLAKE2B 37fd7f0d7d231223a88637691bcf6bdec5481a573b47e6385e4dba7f7895b94ceae308c7875bbdc1c6e537c6ff0cb5f222c782f04b5f2757a5730aa83edf1d32 SHA512 c1251d7baf352f5909570e1ee45021eeabffb68222bc80991f4a53faee97857471a68aec664bfbf35cbd3b96ea9e8d0bfa52c3d0e5bbfdbb94daf590957cd89c
-DIST binutils-2.45.1.tar.xz 27962312 BLAKE2B 1ccab38659ec47f9100b61322627345fe79ebd04ed0b1e872c988edded4d292d7c9ac33d9f6ea47bf265ec823dfba60da0e84374900c15ec89e3aa9280ac020c SHA512 ea030419eba387579ab717be7e3223fc99e93b586860b06003c12489f93441640d4082736f76aa5e98233db4f46e232f536a45e471486de1f5b64e1b827c167e
-DIST binutils-2.45.tar.xz 27868232 BLAKE2B 1ce72346b1f531c89feb86b407e2c649151b506ffbd1a02d413411d36f7ede98fa9a1adf75dd941c01df5fe7e6bf151828b269eeb7c278315ca8004bff22eb7f SHA512 c7b10a7466d9fd398d7a0b3f2a43318432668d714f2ec70069a31bdc93c86d28e0fe83792195727167743707fbae45337c0873a0786416db53bbf22860c16ce7
-DIST binutils-2.46.0-patches-1.tar.xz 6620 BLAKE2B ef5ae8ded0b635c6d85fd5220e23f1b79081369704d82edf2c7d3fc2000adae5899e0920a1fdc64bf1c518bdbeaef09aabff8abecaf3cec0e51596604162f6dd SHA512 b8f555e1ef01a23aa138c9f67b55a70c929d7cd5ec8993c9c7ab1d02d604e51e710713dbea31298291dd0afe3b8c7db85630b6314c2117861e47bd2e9c9d74a9
-DIST binutils-2.46.0.tar.xz 28548776 BLAKE2B 9f4fd8897d237eb5003bdf439537dfc5f8c681e9ff939fb06bb8235ed298031ea4cc91611edb640ffc432199d5791289d003fe0d07acce80327dc40595a5eb9e SHA512 32f880bb4f69351f4ae54a5d00359625c6c49d8e76624fb5cffdf174c79c8d3212f66225b81c12933c6ed59604ab652560773dd92fab384b930c97a9d4e1fdf2
diff --git a/sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild b/sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild
deleted file mode 100644
index 9e442d643713..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PATCH_VER=6
-PATCH_DEV=dilfridge
-
-inherit flag-o-matic libtool toolchain-funcs multilib-minimal
-
-MY_PN="binutils"
-MY_P="${MY_PN}-${PV}"
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-SLOT="0/${PV}"
-IUSE="64-bit-bfd multitarget nls static-libs"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
-
-BDEPEND="nls? ( sys-devel/gettext )"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-S="${WORKDIR}/${MY_P}"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-multilib_src_configure() {
- # https://sourceware.org/PR32372
- append-cflags -std=gnu17
- # bug #814326
- filter-lto
-
- local myconf=(
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gold,gprof}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- ECONF_SOURCE=${S} \
- econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_install() {
- default
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild b/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild
deleted file mode 100644
index d193f57033d3..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild
+++ /dev/null
@@ -1,141 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-inherit flag-o-matic libtool toolchain-funcs multilib-minimal
-
-MY_PN="binutils"
-MY_P="${MY_PN}-${PV}"
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-SLOT="0/${PV}"
-IUSE="64-bit-bfd cet multitarget nls static-libs"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
-
-BDEPEND="nls? ( sys-devel/gettext )"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-PATCHES=("${FILESDIR}"/${PN}-2.35.1-cet.patch)
-
-S="${WORKDIR}/${MY_P}"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-multilib_src_configure() {
- # https://sourceware.org/PR32372
- append-cflags -std=gnu17
- # bug #814326
- filter-lto
-
- local myconf=(
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gold,gprof}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE=${S} \
- econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_install() {
- default
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild b/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild
deleted file mode 100644
index a2acba2153c0..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild
+++ /dev/null
@@ -1,139 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PATCH_VER=5
-PATCH_DEV=dilfridge
-
-inherit flag-o-matic libtool toolchain-funcs multilib-minimal
-
-MY_PN="binutils"
-MY_P="${MY_PN}-${PV}"
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-SLOT="0/${PV}"
-IUSE="64-bit-bfd cet multitarget nls static-libs"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
-
-BDEPEND="nls? ( sys-devel/gettext )"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-S="${WORKDIR}/${MY_P}"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-multilib_src_configure() {
- # https://sourceware.org/PR32372
- append-cflags -std=gnu17
- # bug #814326
- filter-lto
-
- local myconf=(
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gold,gprof}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE=${S} \
- econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_install() {
- default
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.37_p1-r2.ebuild b/sys-libs/binutils-libs/binutils-libs-2.37_p1-r2.ebuild
deleted file mode 100644
index 4d0756b1ef87..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.37_p1-r2.ebuild
+++ /dev/null
@@ -1,140 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PATCH_VER=2
-PATCH_DEV=dilfridge
-
-inherit flag-o-matic libtool toolchain-funcs multilib-minimal
-
-MY_PN="binutils"
-MY_P="${MY_PN}-${PV}"
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-SLOT="0/${PV%_p?}"
-IUSE="64-bit-bfd cet multitarget nls static-libs"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
-
-BDEPEND="nls? ( sys-devel/gettext )"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-S="${WORKDIR}/${MY_P%_p?}"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-multilib_src_configure() {
- # https://sourceware.org/PR32372
- append-cflags -std=gnu17
- # bug #814326
- filter-lto
-
- local myconf=(
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gold,gprof}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE=${S} \
- econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_install() {
- default
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild b/sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild
deleted file mode 100644
index 1354f930fcf1..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild
+++ /dev/null
@@ -1,158 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PATCH_VER=4
-PATCH_DEV=dilfridge
-
-inherit flag-o-matic libtool toolchain-funcs multilib-minimal
-
-MY_PN="binutils"
-MY_P="${MY_PN}-${PV}"
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-SLOT="0/${PV%_p?}"
-IUSE="64-bit-bfd cet multitarget nls static-libs"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
-
-BDEPEND="nls? ( sys-devel/gettext )"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-S="${WORKDIR}/${MY_P%_p?}"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # somehow libtool/configure is messed up and (custom patch at
- # upstream?) and misdetects (basically assumes) nm can be called
- # with -B arg -- can't run eautoreconf (fails), so patch up
- # manually, this would break any target that needs -B to nm
- sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
- libctf/configure || die
- fi
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-multilib_src_configure() {
- # https://sourceware.org/PR32372
- append-cflags -std=gnu17
- # bug #814326
- filter-lto
-
- local myconf=(
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gold,gprof}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_compile() {
- emake V=1
-}
-
-multilib_src_install() {
- emake V=1 DESTDIR="${D}" install
-
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.39-r5.ebuild b/sys-libs/binutils-libs/binutils-libs-2.39-r5.ebuild
deleted file mode 100644
index fe0ee32c0a34..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.39-r5.ebuild
+++ /dev/null
@@ -1,158 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PATCH_VER=6
-PATCH_DEV=dilfridge
-
-inherit flag-o-matic libtool toolchain-funcs multilib-minimal
-
-MY_PN="binutils"
-MY_P="${MY_PN}-${PV}"
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-SLOT="0/${PV%_p?}"
-IUSE="64-bit-bfd cet multitarget nls static-libs"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
-
-BDEPEND="nls? ( sys-devel/gettext )"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-S="${WORKDIR}/${MY_P%_p?}"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # somehow libtool/configure is messed up and (custom patch at
- # upstream?) and misdetects (basically assumes) nm can be called
- # with -B arg -- can't run eautoreconf (fails), so patch up
- # manually, this would break any target that needs -B to nm
- sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
- libctf/configure || die
- fi
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-multilib_src_configure() {
- # https://sourceware.org/PR32372
- append-cflags -std=gnu17
- # bug #814326
- filter-lto
-
- local myconf=(
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gold,gprof,gprofng}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_compile() {
- emake V=1
-}
-
-multilib_src_install() {
- emake V=1 DESTDIR="${D}" install
-
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.40-r7.ebuild b/sys-libs/binutils-libs/binutils-libs-2.40-r7.ebuild
deleted file mode 100644
index 1e9737cf080a..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.40-r7.ebuild
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PATCH_VER=6
-PATCH_DEV=dilfridge
-
-inherit flag-o-matic libtool toolchain-funcs multilib-minimal
-
-MY_PN="binutils"
-MY_P="${MY_PN}-${PV}"
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-SLOT="0/${PV%_p?}"
-IUSE="64-bit-bfd cet multitarget nls static-libs test"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
-RESTRICT="!test? ( test )"
-
-BDEPEND="
- nls? ( sys-devel/gettext )
- test? ( dev-util/dejagnu )
-"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-S="${WORKDIR}/${MY_P%_p?}"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # somehow libtool/configure is messed up and (custom patch at
- # upstream?) and misdetects (basically assumes) nm can be called
- # with -B arg -- can't run eautoreconf (fails), so patch up
- # manually, this would break any target that needs -B to nm
- sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
- libctf/configure || die
- fi
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- export MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-multilib_src_configure() {
- # https://sourceware.org/PR32372
- append-cflags -std=gnu17
- # bug #814326
- filter-lto
-
- local myconf=(
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gold,gprof,gprofng}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Revisit if it's useful, we do have binutils[zstd] though
- --without-zstd
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_compile() {
- emake V=1
-}
-
-multilib_src_install() {
- emake V=1 DESTDIR="${D}" install
-
- # Provided by dev-debug/gdb instead
- rm "${ED}"/usr/share/info/sframe-spec.info || die
-
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.41-r5.ebuild b/sys-libs/binutils-libs/binutils-libs-2.41-r5.ebuild
deleted file mode 100644
index c5c3e3207fd8..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.41-r5.ebuild
+++ /dev/null
@@ -1,171 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PATCH_VER=5
-PATCH_DEV=dilfridge
-
-inherit flag-o-matic libtool toolchain-funcs multilib-minimal
-
-MY_PN="binutils"
-MY_P="${MY_PN}-${PV}"
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-
-SLOT="0/${PV%_p?}.0"
-
-IUSE="64-bit-bfd cet multitarget nls static-libs test"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-RESTRICT="!test? ( test )"
-
-BDEPEND="
- nls? ( sys-devel/gettext )
- test? ( dev-util/dejagnu )
-"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-S="${WORKDIR}/${MY_P%_p?}"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # somehow libtool/configure is messed up and (custom patch at
- # upstream?) and misdetects (basically assumes) nm can be called
- # with -B arg -- can't run eautoreconf (fails), so patch up
- # manually, this would break any target that needs -B to nm
- sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
- libctf/configure || die
- fi
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- export MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-multilib_src_configure() {
- # https://sourceware.org/PR32372
- append-cflags -std=gnu17
- # bug #814326
- filter-lto
-
- local myconf=(
- # portage's econf() does not detect presence of --d-d-t
- # because it greps only top-level ./configure. But not
- # libiberty's or bfd's configure.
- --disable-dependency-tracking
- --disable-silent-rules
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gold,gprof,gprofng}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Revisit if it's useful, we do have binutils[zstd] though
- --without-zstd
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- # Provided by dev-debug/gdb instead
- rm "${ED}"/usr/share/info/sframe-spec.info || die
-
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.42-r2.ebuild b/sys-libs/binutils-libs/binutils-libs-2.42-r2.ebuild
deleted file mode 100644
index ad8b90371a71..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.42-r2.ebuild
+++ /dev/null
@@ -1,175 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PATCH_VER=6
-PATCH_DEV=dilfridge
-
-inherit flag-o-matic libtool toolchain-funcs multilib-minimal
-
-MY_PN="binutils"
-MY_P="${MY_PN}-${PV}"
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-
-SLOT="0/${PV%_p?}.0"
-
-IUSE="64-bit-bfd cet multitarget nls static-libs test"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-RESTRICT="!test? ( test )"
-
-BDEPEND="
- nls? ( sys-devel/gettext )
- test? ( dev-util/dejagnu )
-"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-S="${WORKDIR}/${MY_P%_p?}"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # somehow libtool/configure is messed up and (custom patch at
- # upstream?) and misdetects (basically assumes) nm can be called
- # with -B arg -- can't run eautoreconf (fails), so patch up
- # manually, this would break any target that needs -B to nm
- sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
- libctf/configure || die
- fi
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- export MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-multilib_src_configure() {
- # https://sourceware.org/PR32372
- append-cflags -std=gnu17
- # bug #814326
- filter-lto
-
- # Workaround for lld-17 (bug #914640)
- # Should be able to drop this w/ >=binutils-2.43
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- local myconf=(
- # portage's econf() does not detect presence of --d-d-t
- # because it greps only top-level ./configure. But not
- # libiberty's or bfd's configure.
- --disable-dependency-tracking
- --disable-silent-rules
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gold,gprof,gprofng}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Revisit if it's useful, we do have binutils[zstd] though
- --without-zstd
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- # Provided by dev-debug/gdb instead
- rm "${ED}"/usr/share/info/sframe-spec.info || die
-
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.43-r3.ebuild b/sys-libs/binutils-libs/binutils-libs-2.43-r3.ebuild
deleted file mode 100644
index 58cd51681e26..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.43-r3.ebuild
+++ /dev/null
@@ -1,176 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PATCH_VER=3
-PATCH_DEV=dilfridge
-
-inherit flag-o-matic libtool toolchain-funcs multilib-minimal
-
-MY_PN="binutils"
-MY_P="${MY_PN}-${PV}"
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-
-if [[ ${PV} == 2.43 ]] ; then
- SLOT="0/${PV%_p?}.1"
-else
- die "Please cleanup the ebuild to drop the 2.43 fudge!"
- SLOT="0/${PV%_p?}.0"
-fi
-
-IUSE="64-bit-bfd cet multitarget nls static-libs test"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-RESTRICT="!test? ( test )"
-
-BDEPEND="
- nls? ( sys-devel/gettext )
- test? ( dev-util/dejagnu )
-"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-S="${WORKDIR}/${MY_P%_p?}"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # somehow libtool/configure is messed up and (custom patch at
- # upstream?) and misdetects (basically assumes) nm can be called
- # with -B arg -- can't run eautoreconf (fails), so patch up
- # manually, this would break any target that needs -B to nm
- sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
- libctf/configure || die
- fi
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- export MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-multilib_src_configure() {
- # https://sourceware.org/PR32372
- append-cflags -std=gnu17
- # bug #814326
- filter-lto
-
- local myconf=(
- # portage's econf() does not detect presence of --d-d-t
- # because it greps only top-level ./configure. But not
- # libiberty's or bfd's configure.
- --disable-dependency-tracking
- --disable-silent-rules
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gold,gprof,gprofng}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # avoid automagic dependency on (currently prefix) systems
- # systems with debuginfod library, bug #754753
- --without-debuginfod
-
- # Revisit if it's useful, we do have binutils[zstd] though
- --without-zstd
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- # Provided by dev-debug/gdb instead
- rm "${ED}"/usr/share/info/sframe-spec.info || die
-
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.44-r2.ebuild b/sys-libs/binutils-libs/binutils-libs-2.44-r2.ebuild
deleted file mode 100644
index 0cc6247ce574..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.44-r2.ebuild
+++ /dev/null
@@ -1,260 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit dot-a flag-o-matic libtool toolchain-funcs multilib-minimal
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-IUSE="64-bit-bfd cet multitarget nls static-libs test"
-
-# Variables that can be set here (ignored for live ebuilds)
-# PATCH_VER - the patchset version
-# Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-# - Default: PV
-# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-# for the patchsets
-
-PATCH_VER=4
-PATCH_DEV=dilfridge
-
-MY_PN=binutils
-MY_P=${MY_PN}-${PV}
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- SLOT="0/${PV}"
-elif [[ ${PV} == *9999 ]]; then
- inherit git-r3
- SLOT="0/$(ver_cut 1-2)"
-else
- PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
- PATCH_DEV=${PATCH_DEV:-dilfridge}
- SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
- SLOT="0/${PV}"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-fi
-
-BDEPEND="
- nls? ( sys-devel/gettext )
- test? ( dev-util/dejagnu )
-"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-RESTRICT="!test? ( test )"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_unpack() {
- if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="
- https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git
- https://github.com/gentoo/binutils-patches
- "
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
- git-r3_src_unpack
- mv patches-git/9999 patch || die
-
- if [[ ${PV} != 9999 ]] ; then
- EGIT_BRANCH=binutils-$(ver_cut 1)_$(ver_cut 2)-branch
- fi
- EGIT_REPO_URI="
- https://sourceware.org/git/binutils-gdb.git
- https://git.sr.ht/~sourceware/binutils-gdb
- https://gitlab.com/x86-binutils/binutils-gdb.git
- "
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
- git-r3_src_unpack
- else
- unpack ${MY_P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
- # _p patch versions are Gentoo specific tarballs ...
- local dir=${MY_P}
- dir=${dir/-hppa64/}
-
- S=${WORKDIR}/${dir}
- fi
-
- cd "${WORKDIR}" || die
-}
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # somehow libtool/configure is messed up and (custom patch at
- # upstream?) and misdetects (basically assumes) nm can be called
- # with -B arg -- can't run eautoreconf (fails), so patch up
- # manually, this would break any target that needs -B to nm
- sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
- libctf/configure || die
- fi
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- export MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-src_configure() {
- lto-guarantee-fat
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- # portage's econf() does not detect presence of --d-d-t
- # because it greps only top-level ./configure. But not
- # libiberty's or bfd's configure.
- --disable-dependency-tracking
- --disable-silent-rules
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gprof,gprofng}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # Avoid automagic dependency on (currently prefix) systems
- # with debuginfod library, bug #754753
- --without-debuginfod
-
- # Revisit if it's useful, we do have binutils[zstd] though
- --without-zstd
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_test() {
- (
- # Tests don't expect LTO
- filter-lto
-
- # If we have e.g. -mfpmath=sse -march=pentium4 in CFLAGS,
- # we'll get lto1 warnings for some tests which cause
- # spurious failures because -mfpmath isn't passed at
- # link-time. Filter accordingly.
- #
- # Alternatively, we could pass C{C,XX}_FOR_TARGET with
- # some (ideally not all, surely would break some tests)
- # stuffed in.
- filter-flags '-mfpmath=*'
-
- # lto-wrapper warnings which confuse tests
- filter-flags '-Wa,*'
-
- # bug #637066
- filter-flags -Wall -Wreturn-type
-
- # Note that we need 'check' explicitly if ever cleaning this
- # up: the default `src_test` check for the 'check' target
- # with `-n` may fail with parallel make and silently skip tests (bug #955595)
- emake -k check \
- CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \
- CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \
- LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \
- CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
- LDFLAGS="${LDFLAGS}"
- )
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- # Provided by dev-debug/gdb instead
- if [[ ${PV} != 9999 ]] ; then
- rm "${ED}"/usr/share/info/sframe-spec.info || die
- fi
-
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
- # Explicit "${ED}" as we need it to do things even w/ USE=-static-libs
- strip-lto-bytecode "${ED}"
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.45-r1.ebuild b/sys-libs/binutils-libs/binutils-libs-2.45-r1.ebuild
deleted file mode 100644
index 5d06d40a6c4a..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.45-r1.ebuild
+++ /dev/null
@@ -1,260 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit dot-a flag-o-matic libtool toolchain-funcs multilib-minimal
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-IUSE="64-bit-bfd cet multitarget nls static-libs test"
-
-# Variables that can be set here (ignored for live ebuilds)
-# PATCH_VER - the patchset version
-# Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-# - Default: PV
-# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-# for the patchsets
-
-PATCH_VER=3
-PATCH_DEV=dilfridge
-
-MY_PN=binutils
-MY_P=${MY_PN}-${PV}
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- SLOT="0/${PV}"
-elif [[ ${PV} == *9999 ]]; then
- inherit git-r3
- SLOT="0/$(ver_cut 1-2)"
-else
- PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
- PATCH_DEV=${PATCH_DEV:-dilfridge}
- SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
- SLOT="0/${PV}"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-fi
-
-BDEPEND="
- nls? ( sys-devel/gettext )
- test? ( dev-util/dejagnu )
-"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-RESTRICT="!test? ( test )"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_unpack() {
- if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="
- https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git
- https://github.com/gentoo/binutils-patches
- "
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
- git-r3_src_unpack
- mv patches-git/9999 patch || die
-
- if [[ ${PV} != 9999 ]] ; then
- EGIT_BRANCH=binutils-$(ver_cut 1)_$(ver_cut 2)-branch
- fi
- EGIT_REPO_URI="
- https://sourceware.org/git/binutils-gdb.git
- https://git.sr.ht/~sourceware/binutils-gdb
- https://gitlab.com/x86-binutils/binutils-gdb.git
- "
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
- git-r3_src_unpack
- else
- unpack ${MY_P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
- # _p patch versions are Gentoo specific tarballs ...
- local dir=${MY_P}
- dir=${dir/-hppa64/}
-
- S=${WORKDIR}/${dir}
- fi
-
- cd "${WORKDIR}" || die
-}
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # somehow libtool/configure is messed up and (custom patch at
- # upstream?) and misdetects (basically assumes) nm can be called
- # with -B arg -- can't run eautoreconf (fails), so patch up
- # manually, this would break any target that needs -B to nm
- sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
- libctf/configure || die
- fi
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- export MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-src_configure() {
- lto-guarantee-fat
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- # portage's econf() does not detect presence of --d-d-t
- # because it greps only top-level ./configure. But not
- # libiberty's or bfd's configure.
- --disable-dependency-tracking
- --disable-silent-rules
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gprof,gprofng}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # Avoid automagic dependency on (currently prefix) systems
- # with debuginfod library, bug #754753
- --without-debuginfod
-
- # Revisit if it's useful, we do have binutils[zstd] though
- --without-zstd
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_test() {
- (
- # Tests don't expect LTO
- filter-lto
-
- # If we have e.g. -mfpmath=sse -march=pentium4 in CFLAGS,
- # we'll get lto1 warnings for some tests which cause
- # spurious failures because -mfpmath isn't passed at
- # link-time. Filter accordingly.
- #
- # Alternatively, we could pass C{C,XX}_FOR_TARGET with
- # some (ideally not all, surely would break some tests)
- # stuffed in.
- filter-flags '-mfpmath=*'
-
- # lto-wrapper warnings which confuse tests
- filter-flags '-Wa,*'
-
- # bug #637066
- filter-flags -Wall -Wreturn-type
-
- # Note that we need 'check' explicitly if ever cleaning this
- # up: the default `src_test` check for the 'check' target
- # with `-n` may fail with parallel make and silently skip tests (bug #955595)
- emake -k check \
- CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \
- CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \
- LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \
- CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
- LDFLAGS="${LDFLAGS}"
- )
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- # Provided by dev-debug/gdb instead
- if [[ ${PV} != 9999 ]] ; then
- rm "${ED}"/usr/share/info/sframe-spec.info || die
- fi
-
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
- # Explicit "${ED}" as we need it to do things even w/ USE=-static-libs
- strip-lto-bytecode "${ED}"
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.45.1.ebuild b/sys-libs/binutils-libs/binutils-libs-2.45.1.ebuild
deleted file mode 100644
index fa5c34c5f6b6..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.45.1.ebuild
+++ /dev/null
@@ -1,260 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit dot-a flag-o-matic libtool toolchain-funcs multilib-minimal
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-IUSE="64-bit-bfd cet multitarget nls static-libs test"
-
-# Variables that can be set here (ignored for live ebuilds)
-# PATCH_VER - the patchset version
-# Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-# - Default: PV
-# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-# for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=sam
-
-MY_PN=binutils
-MY_P=${MY_PN}-${PV}
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- SLOT="0/${PV}"
-elif [[ ${PV} == *9999 ]]; then
- inherit git-r3
- SLOT="0/$(ver_cut 1-2)"
-else
- PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
- PATCH_DEV=${PATCH_DEV:-dilfridge}
- SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
- SLOT="0/${PV}"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-fi
-
-BDEPEND="
- nls? ( sys-devel/gettext )
- test? ( dev-util/dejagnu )
-"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-RESTRICT="!test? ( test )"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_unpack() {
- if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="
- https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git
- https://github.com/gentoo/binutils-patches
- "
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
- git-r3_src_unpack
- mv patches-git/9999 patch || die
-
- if [[ ${PV} != 9999 ]] ; then
- EGIT_BRANCH=binutils-$(ver_cut 1)_$(ver_cut 2)-branch
- fi
- EGIT_REPO_URI="
- https://sourceware.org/git/binutils-gdb.git
- https://git.sr.ht/~sourceware/binutils-gdb
- https://gitlab.com/x86-binutils/binutils-gdb.git
- "
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
- git-r3_src_unpack
- else
- unpack ${MY_P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
- # _p patch versions are Gentoo specific tarballs ...
- local dir=${MY_P}
- dir=${dir/-hppa64/}
-
- S=${WORKDIR}/${dir}
- fi
-
- cd "${WORKDIR}" || die
-}
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # somehow libtool/configure is messed up and (custom patch at
- # upstream?) and misdetects (basically assumes) nm can be called
- # with -B arg -- can't run eautoreconf (fails), so patch up
- # manually, this would break any target that needs -B to nm
- sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
- libctf/configure || die
- fi
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- export MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-src_configure() {
- lto-guarantee-fat
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- # portage's econf() does not detect presence of --d-d-t
- # because it greps only top-level ./configure. But not
- # libiberty's or bfd's configure.
- --disable-dependency-tracking
- --disable-silent-rules
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gprof,gprofng}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # Avoid automagic dependency on (currently prefix) systems
- # with debuginfod library, bug #754753
- --without-debuginfod
-
- # Revisit if it's useful, we do have binutils[zstd] though
- --without-zstd
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_test() {
- (
- # Tests don't expect LTO
- filter-lto
-
- # If we have e.g. -mfpmath=sse -march=pentium4 in CFLAGS,
- # we'll get lto1 warnings for some tests which cause
- # spurious failures because -mfpmath isn't passed at
- # link-time. Filter accordingly.
- #
- # Alternatively, we could pass C{C,XX}_FOR_TARGET with
- # some (ideally not all, surely would break some tests)
- # stuffed in.
- filter-flags '-mfpmath=*'
-
- # lto-wrapper warnings which confuse tests
- filter-flags '-Wa,*'
-
- # bug #637066
- filter-flags -Wall -Wreturn-type
-
- # Note that we need 'check' explicitly if ever cleaning this
- # up: the default `src_test` check for the 'check' target
- # with `-n` may fail with parallel make and silently skip tests (bug #955595)
- emake -k check \
- CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \
- CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \
- LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \
- CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
- LDFLAGS="${LDFLAGS}"
- )
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- # Provided by dev-debug/gdb instead
- if [[ ${PV} != 9999 ]] ; then
- rm "${ED}"/usr/share/info/sframe-spec.info || die
- fi
-
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
- # Explicit "${ED}" as we need it to do things even w/ USE=-static-libs
- strip-lto-bytecode "${ED}"
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.45.ebuild b/sys-libs/binutils-libs/binutils-libs-2.45.ebuild
deleted file mode 100644
index d5402721fb5e..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.45.ebuild
+++ /dev/null
@@ -1,260 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit dot-a flag-o-matic libtool toolchain-funcs multilib-minimal
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-IUSE="64-bit-bfd cet multitarget nls static-libs test"
-
-# Variables that can be set here (ignored for live ebuilds)
-# PATCH_VER - the patchset version
-# Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-# - Default: PV
-# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-# for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-MY_PN=binutils
-MY_P=${MY_PN}-${PV}
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- SLOT="0/${PV}"
-elif [[ ${PV} == *9999 ]]; then
- inherit git-r3
- SLOT="0/$(ver_cut 1-2)"
-else
- PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
- PATCH_DEV=${PATCH_DEV:-dilfridge}
- SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
- SLOT="0/${PV}"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
-fi
-
-BDEPEND="
- nls? ( sys-devel/gettext )
- test? ( dev-util/dejagnu )
-"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-RESTRICT="!test? ( test )"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_unpack() {
- if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="
- https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git
- https://github.com/gentoo/binutils-patches
- "
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
- git-r3_src_unpack
- mv patches-git/9999 patch || die
-
- if [[ ${PV} != 9999 ]] ; then
- EGIT_BRANCH=binutils-$(ver_cut 1)_$(ver_cut 2)-branch
- fi
- EGIT_REPO_URI="
- https://sourceware.org/git/binutils-gdb.git
- https://git.sr.ht/~sourceware/binutils-gdb
- https://gitlab.com/x86-binutils/binutils-gdb.git
- "
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
- git-r3_src_unpack
- else
- unpack ${MY_P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
- # _p patch versions are Gentoo specific tarballs ...
- local dir=${MY_P}
- dir=${dir/-hppa64/}
-
- S=${WORKDIR}/${dir}
- fi
-
- cd "${WORKDIR}" || die
-}
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # somehow libtool/configure is messed up and (custom patch at
- # upstream?) and misdetects (basically assumes) nm can be called
- # with -B arg -- can't run eautoreconf (fails), so patch up
- # manually, this would break any target that needs -B to nm
- sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
- libctf/configure || die
- fi
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- export MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-src_configure() {
- lto-guarantee-fat
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- # portage's econf() does not detect presence of --d-d-t
- # because it greps only top-level ./configure. But not
- # libiberty's or bfd's configure.
- --disable-dependency-tracking
- --disable-silent-rules
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gprof,gprofng}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # Avoid automagic dependency on (currently prefix) systems
- # with debuginfod library, bug #754753
- --without-debuginfod
-
- # Revisit if it's useful, we do have binutils[zstd] though
- --without-zstd
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_test() {
- (
- # Tests don't expect LTO
- filter-lto
-
- # If we have e.g. -mfpmath=sse -march=pentium4 in CFLAGS,
- # we'll get lto1 warnings for some tests which cause
- # spurious failures because -mfpmath isn't passed at
- # link-time. Filter accordingly.
- #
- # Alternatively, we could pass C{C,XX}_FOR_TARGET with
- # some (ideally not all, surely would break some tests)
- # stuffed in.
- filter-flags '-mfpmath=*'
-
- # lto-wrapper warnings which confuse tests
- filter-flags '-Wa,*'
-
- # bug #637066
- filter-flags -Wall -Wreturn-type
-
- # Note that we need 'check' explicitly if ever cleaning this
- # up: the default `src_test` check for the 'check' target
- # with `-n` may fail with parallel make and silently skip tests (bug #955595)
- emake -k check \
- CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \
- CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \
- LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \
- CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
- LDFLAGS="${LDFLAGS}"
- )
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- # Provided by dev-debug/gdb instead
- if [[ ${PV} != 9999 ]] ; then
- rm "${ED}"/usr/share/info/sframe-spec.info || die
- fi
-
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
- # Explicit "${ED}" as we need it to do things even w/ USE=-static-libs
- strip-lto-bytecode "${ED}"
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.46.0.ebuild b/sys-libs/binutils-libs/binutils-libs-2.46.0.ebuild
deleted file mode 100644
index 8d5208cac912..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-2.46.0.ebuild
+++ /dev/null
@@ -1,260 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit dot-a flag-o-matic libtool toolchain-funcs multilib-minimal
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-IUSE="64-bit-bfd cet multitarget nls static-libs test"
-
-# Variables that can be set here (ignored for live ebuilds)
-# PATCH_VER - the patchset version
-# Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-# - Default: PV
-# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-# for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-MY_PN=binutils
-MY_P=${MY_PN}-${PV}
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- SLOT="0/${PV}"
-elif [[ ${PV} == *9999 ]]; then
- inherit git-r3
- SLOT="0/$(ver_cut 1-2)"
-else
- PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
- PATCH_DEV=${PATCH_DEV:-dilfridge}
- SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
- SLOT="0/${PV}"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-fi
-
-BDEPEND="
- nls? ( sys-devel/gettext )
- test? ( dev-util/dejagnu )
-"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-RESTRICT="!test? ( test )"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_unpack() {
- if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="
- https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git
- https://github.com/gentoo/binutils-patches
- "
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
- git-r3_src_unpack
- mv patches-git/9999 patch || die
-
- if [[ ${PV} != 9999 ]] ; then
- EGIT_BRANCH=binutils-$(ver_cut 1)_$(ver_cut 2)-branch
- fi
- EGIT_REPO_URI="
- https://sourceware.org/git/binutils-gdb.git
- https://git.sr.ht/~sourceware/binutils-gdb
- https://gitlab.com/x86-binutils/binutils-gdb.git
- "
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
- git-r3_src_unpack
- else
- unpack ${MY_P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
- # _p patch versions are Gentoo specific tarballs ...
- local dir=${MY_P}
- dir=${dir/-hppa64/}
-
- S=${WORKDIR}/${dir}
- fi
-
- cd "${WORKDIR}" || die
-}
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # somehow libtool/configure is messed up and (custom patch at
- # upstream?) and misdetects (basically assumes) nm can be called
- # with -B arg -- can't run eautoreconf (fails), so patch up
- # manually, this would break any target that needs -B to nm
- sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
- libctf/configure || die
- fi
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- export MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-src_configure() {
- lto-guarantee-fat
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- # portage's econf() does not detect presence of --d-d-t
- # because it greps only top-level ./configure. But not
- # libiberty's or bfd's configure.
- --disable-dependency-tracking
- --disable-silent-rules
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gprof,gprofng}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # Avoid automagic dependency on (currently prefix) systems
- # with debuginfod library, bug #754753
- --without-debuginfod
-
- # Revisit if it's useful, we do have binutils[zstd] though
- --without-zstd
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_test() {
- (
- # Tests don't expect LTO
- filter-lto
-
- # If we have e.g. -mfpmath=sse -march=pentium4 in CFLAGS,
- # we'll get lto1 warnings for some tests which cause
- # spurious failures because -mfpmath isn't passed at
- # link-time. Filter accordingly.
- #
- # Alternatively, we could pass C{C,XX}_FOR_TARGET with
- # some (ideally not all, surely would break some tests)
- # stuffed in.
- filter-flags '-mfpmath=*'
-
- # lto-wrapper warnings which confuse tests
- filter-flags '-Wa,*'
-
- # bug #637066
- filter-flags -Wall -Wreturn-type
-
- # Note that we need 'check' explicitly if ever cleaning this
- # up: the default `src_test` check for the 'check' target
- # with `-n` may fail with parallel make and silently skip tests (bug #955595)
- emake -k check \
- CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \
- CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \
- LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \
- CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
- LDFLAGS="${LDFLAGS}"
- )
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- # Provided by dev-debug/gdb instead
- if [[ ${PV} != 9999 ]] ; then
- rm "${ED}"/usr/share/info/sframe-spec.info || die
- fi
-
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
- # Explicit "${ED}" as we need it to do things even w/ USE=-static-libs
- strip-lto-bytecode "${ED}"
-}
diff --git a/sys-libs/binutils-libs/binutils-libs-9999.ebuild b/sys-libs/binutils-libs/binutils-libs-9999.ebuild
deleted file mode 100644
index 6e4548728007..000000000000
--- a/sys-libs/binutils-libs/binutils-libs-9999.ebuild
+++ /dev/null
@@ -1,260 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit dot-a flag-o-matic libtool toolchain-funcs multilib-minimal
-
-DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
-HOMEPAGE="https://sourceware.org/binutils/"
-
-LICENSE="|| ( GPL-3 LGPL-3 )"
-IUSE="64-bit-bfd cet multitarget nls static-libs test"
-
-# Variables that can be set here (ignored for live ebuilds)
-# PATCH_VER - the patchset version
-# Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-# - Default: PV
-# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-# for the patchsets
-
-PATCH_VER=1
-PATCH_DEV=dilfridge
-
-MY_PN=binutils
-MY_P=${MY_PN}-${PV}
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- SLOT="0/${PV}"
-elif [[ ${PV} == *9999 ]]; then
- inherit git-r3
- SLOT="0/$(ver_cut 1-2)"
-else
- PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
- PATCH_DEV=${PATCH_DEV:-dilfridge}
- SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
- SLOT="0/${PV}"
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
-fi
-
-BDEPEND="
- nls? ( sys-devel/gettext )
- test? ( dev-util/dejagnu )
-"
-DEPEND="virtual/zlib:=[${MULTILIB_USEDEP}]"
-# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${DEPEND}
- >=sys-devel/binutils-config-5
-"
-
-RESTRICT="!test? ( test )"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/bfd.h
-)
-
-src_unpack() {
- if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="
- https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git
- https://github.com/gentoo/binutils-patches
- "
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
- git-r3_src_unpack
- mv patches-git/9999 patch || die
-
- if [[ ${PV} != 9999 ]] ; then
- EGIT_BRANCH=binutils-$(ver_cut 1)_$(ver_cut 2)-branch
- fi
- EGIT_REPO_URI="
- https://sourceware.org/git/binutils-gdb.git
- https://git.sr.ht/~sourceware/binutils-gdb
- https://gitlab.com/x86-binutils/binutils-gdb.git
- "
- S=${WORKDIR}/binutils
- EGIT_CHECKOUT_DIR=${S}
- git-r3_src_unpack
- else
- unpack ${MY_P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
-
- # _p patch versions are Gentoo specific tarballs ...
- local dir=${MY_P}
- dir=${dir/-hppa64/}
-
- S=${WORKDIR}/${dir}
- fi
-
- cd "${WORKDIR}" || die
-}
-
-src_prepare() {
- if [[ -n ${PATCH_VER} ]] ; then
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
- eapply "${WORKDIR}/patch"/*.patch
- fi
-
- # Fix cross-compile relinking issue, bug #626402
- elibtoolize
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # somehow libtool/configure is messed up and (custom patch at
- # upstream?) and misdetects (basically assumes) nm can be called
- # with -B arg -- can't run eautoreconf (fails), so patch up
- # manually, this would break any target that needs -B to nm
- sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
- libctf/configure || die
- fi
-
- # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
- # Avoid really confusing logs from subconfigure spam, makes logs far
- # more legible.
- export MAKEOPTS="--output-sync=line ${MAKEOPTS}"
-
- default
-}
-
-pkgversion() {
- printf "Gentoo ${PVR}"
- [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
-}
-
-src_configure() {
- lto-guarantee-fat
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- # portage's econf() does not detect presence of --d-d-t
- # because it greps only top-level ./configure. But not
- # libiberty's or bfd's configure.
- --disable-dependency-tracking
- --disable-silent-rules
- --enable-obsolete
- --enable-shared
- --enable-threads
- # Newer versions (>=2.24) make this an explicit option. #497268
- --enable-install-libiberty
- --disable-werror
- --with-bugurl="https://bugs.gentoo.org/"
- --with-pkgversion="$(pkgversion)"
- $(use_enable static-libs static)
- # The binutils eclass enables this flag for all bi-arch builds,
- # but other tools often don't care about that support. Put it
- # beyond a flag if people really want it, but otherwise leave
- # it disabled as it can slow things down on 32bit arches. #438522
- $(use_enable 64-bit-bfd)
- # This only disables building in the zlib subdir.
- # For binutils itself, it'll use the system version. #591516
- --without-zlib
- --with-system-zlib
- # We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gprof,gprofng}
- # Disable modules that are in a combined binutils/gdb tree. #490566
- --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim}
- # Strip out broken static link flags.
- # https://gcc.gnu.org/PR56750
- --without-stage1-ldflags
- # We pull in all USE-flags that change ABI in an incompatible
- # way. #666100
- # USE=multitarget change size of global arrays
- # USE=64-bit-bfd changes data structures of exported API
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
-
- # Avoid automagic dependency on (currently prefix) systems
- # with debuginfod library, bug #754753
- --without-debuginfod
-
- # Revisit if it's useful, we do have binutils[zstd] though
- --without-zstd
-
- # Allow user to opt into CET for host libraries.
- # Ideally we would like automagic-or-disabled here.
- # But the check does not quite work on i686: bug #760926.
- $(use_enable cet)
- )
-
- # mips can't do hash-style=gnu ...
- if [[ $(tc-arch) != mips ]] ; then
- myconf+=( --enable-default-hash-style=gnu )
- fi
-
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
-
- use nls \
- && myconf+=( --without-included-gettext ) \
- || myconf+=( --disable-nls )
-
- if [[ ${CHOST} == *-darwin* ]] && use nls ; then
- # fix underlinking in opcodes
- sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
- "${S}"/opcodes/Makefile.in || die
- fi
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-
- # Prevent makeinfo from running as we don't build docs here.
- # bug #622652
- sed -i \
- -e '/^MAKEINFO/s:=.*:= true:' \
- Makefile || die
-}
-
-multilib_src_test() {
- (
- # Tests don't expect LTO
- filter-lto
-
- # If we have e.g. -mfpmath=sse -march=pentium4 in CFLAGS,
- # we'll get lto1 warnings for some tests which cause
- # spurious failures because -mfpmath isn't passed at
- # link-time. Filter accordingly.
- #
- # Alternatively, we could pass C{C,XX}_FOR_TARGET with
- # some (ideally not all, surely would break some tests)
- # stuffed in.
- filter-flags '-mfpmath=*'
-
- # lto-wrapper warnings which confuse tests
- filter-flags '-Wa,*'
-
- # bug #637066
- filter-flags -Wall -Wreturn-type
-
- # Note that we need 'check' explicitly if ever cleaning this
- # up: the default `src_test` check for the 'check' target
- # with `-n` may fail with parallel make and silently skip tests (bug #955595)
- emake -k check \
- CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \
- CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \
- LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \
- CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
- LDFLAGS="${LDFLAGS}"
- )
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- # Provided by dev-debug/gdb instead
- if [[ ${PV} != 9999 ]] ; then
- rm "${ED}"/usr/share/info/sframe-spec.info || die
- fi
-
- # Provide libiberty.h directly.
- dosym libiberty/libiberty.h /usr/include/libiberty.h
-}
-
-multilib_src_install_all() {
- use static-libs || find "${ED}"/usr -name '*.la' -delete
- # Explicit "${ED}" as we need it to do things even w/ USE=-static-libs
- strip-lto-bytecode "${ED}"
-}
diff --git a/sys-libs/binutils-libs/files/binutils-libs-2.35.1-cet.patch b/sys-libs/binutils-libs/files/binutils-libs-2.35.1-cet.patch
deleted file mode 100644
index 7477ff90ac95..000000000000
--- a/sys-libs/binutils-libs/files/binutils-libs-2.35.1-cet.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-https://bugs.gentoo.org/771765
-https://sourceware.org/PR27397
-
-On i586-like CPUs endbr32 added by -Wl,-z,ibt,-z,shstk
-generates crashing binaries and causes ./configure failure.
-
-From 847e4b3207f97762dc641db8d3b188081c3370c3 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Fri, 12 Feb 2021 16:30:23 -0800
-Subject: [PATCH] GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs
-
----
- config/cet.m4 | 19 ++++++++++++++++---
- libiberty/configure | 29 +++++++++++++++++++++++++++++
- 2 files changed, 45 insertions(+), 3 deletions(-)
-
-diff --git a/config/cet.m4 b/config/cet.m4
-index c67fb4f35b6..7718be1afe8 100644
---- a/config/cet.m4
-+++ b/config/cet.m4
-@@ -130,6 +130,18 @@ fi
- if test x$may_have_cet = xyes; then
- if test x$cross_compiling = xno; then
- AC_TRY_RUN([
-+int
-+main ()
-+{
-+ asm ("endbr32");
-+ return 0;
-+}
-+ ],
-+ [have_multi_byte_nop=yes],
-+ [have_multi_byte_nop=no])
-+ have_cet=no
-+ if test x$have_multi_byte_nop = xyes; then
-+ AC_TRY_RUN([
- static void
- foo (void)
- {
-@@ -155,9 +167,10 @@ main ()
- bar ();
- return 0;
- }
-- ],
-- [have_cet=no],
-- [have_cet=yes])
-+ ],
-+ [have_cet=no],
-+ [have_cet=yes])
-+ fi
- if test x$enable_cet = xno -a x$have_cet = xyes; then
- AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host])
- fi
-diff --git a/libiberty/configure b/libiberty/configure
-index 160b8c9e8b1..29a690d44fc 100755
---- a/libiberty/configure
-+++ b/libiberty/configure
-@@ -5539,6 +5539,34 @@ else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
-+int
-+main ()
-+{
-+ asm ("endbr32");
-+ return 0;
-+}
-+
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+ have_multi_byte_nop=yes
-+else
-+ have_multi_byte_nop=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+ conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+ have_cet=no
-+ if test x$have_multi_byte_nop = xyes; then
-+ if test "$cross_compiling" = yes; then :
-+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error $? "cannot run test program while cross compiling
-+See \`config.log' for more details" "$LINENO" 5; }
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+
- static void
- foo (void)
- {
-@@ -5575,6 +5603,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
-
-+ fi
- if test x$enable_cet = xno -a x$have_cet = xyes; then
- as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5
- fi
---
-2.29.2
-
diff --git a/sys-libs/binutils-libs/metadata.xml b/sys-libs/binutils-libs/metadata.xml
deleted file mode 100644
index e1153400acab..000000000000
--- a/sys-libs/binutils-libs/metadata.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
- </maintainer>
- <use>
- <flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
- <flag name="64-bit-bfd">Support 64-bit targets even on 32-bit hosts (is ignored on 64-bit hosts)</flag>
- <flag name="multitarget">Enable all possible targets in libbfd</flag>
- </use>
- <upstream>
- <remote-id type="cpe">cpe:/a:gnu:binutils</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/blocksruntime/Manifest b/sys-libs/blocksruntime/Manifest
deleted file mode 100644
index 59798faef4bb..000000000000
--- a/sys-libs/blocksruntime/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST blocksruntime-0_pre20171027.tar.gz 40571 BLAKE2B 5cb5cee10d482a3028b6ed496f7ed4fba25504c5e188dd21be37f0a65b72750e0ce31f7243e9cd848d10323e43e7d058fd2f7eb5ffed9a64e543d418ac96cfac SHA512 4008730f7ee4173f22c40220c4b87cd3f5cfadd12d5ddbaec244e3c4164111f036d0b859cf4bb5f2425313148f5c6445de30af2d4ccc83e1b97a66895ccc6dc5
diff --git a/sys-libs/blocksruntime/blocksruntime-0_pre20171027-r2.ebuild b/sys-libs/blocksruntime/blocksruntime-0_pre20171027-r2.ebuild
deleted file mode 100644
index 0cf458f8f8be..000000000000
--- a/sys-libs/blocksruntime/blocksruntime-0_pre20171027-r2.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs vcs-snapshot
-
-COMMIT=9cc93ae2b58676c23fd02cf0c686fa15b7a3ff81 # 27 Oct 2017
-
-DESCRIPTION="BlocksRuntime library needed for clang's -fblocks support"
-HOMEPAGE="https://github.com/mackyle/blocksruntime"
-SRC_URI="https://github.com/mackyle/blocksruntime/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86"
-IUSE="static-libs"
-
-RDEPEND="!dev-libs/libdispatch"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-0_pre20171027-ldflags-soname.patch
-)
-
-src_prepare() {
- default
-
- tc-export CC AR RANLIB
-}
-
-src_compile() {
- ./buildlib -shared || die
-}
-
-src_install() {
- prefix="${EPREFIX}/usr" \
- includedir="${EPREFIX}/usr/include/blocksruntime" \
- libdir="${EPREFIX}/usr/$(get_libdir)" \
- DESTDIR="${D}" \
- ./installlib $(use static-libs || echo -shared) || die
-}
diff --git a/sys-libs/blocksruntime/files/blocksruntime-0_pre20171027-ldflags-soname.patch b/sys-libs/blocksruntime/files/blocksruntime-0_pre20171027-ldflags-soname.patch
deleted file mode 100644
index 66e9f1993bd8..000000000000
--- a/sys-libs/blocksruntime/files/blocksruntime-0_pre20171027-ldflags-soname.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/buildlib
-+++ b/buildlib
-@@ -28,11 +28,13 @@ if [ -n "$shared" ]; then
- SHLIB="${LIB%.a}.dylib"
- SHOPT="-dynamiclib -Wl,-all_load"
- SHOPT2=
-+ SONAME=
- ;;
- *)
- SHLIB="${LIB%.a}.so"
- SHOPT="-shared -Wl,-whole-archive"
- SHOPT2="-Wl,-no-whole-archive"
-+ SONAME="-Wl,-soname=${SHLIB}.0"
- ;;
- esac
- fi
-@@ -108,5 +110,5 @@ echo "SRC=$SRC"
- [ -z "$shared" ] ||
- (
- PS4= && set -ex
-- "$CC" $FPIC $CFLAGS -o "$SHLIB" $SHOPT $LIB $SHOPT2
-+ "$CC" $FPIC $CFLAGS $LDFLAGS -o "$SHLIB" $SHOPT $LIB $SHOPT2 ${SONAME}
- ) || exit
---- a/installlib
-+++ b/installlib
-@@ -91,5 +91,7 @@ docmd "install -d "$DESTDIR"$includedir "$DESTDIR"$libdir"
- docmd "install -m 644 $HEADER "$DESTDIR"$includedir/"
- [ -z "$LIB" ] ||
- docmd "install -m 644 $LIB "$DESTDIR"$libdir/"
--[ -z "$SHLIB" ] ||
-+[ -z "$SHLIB" ] || {
- docmd "install -m $SHLIBMODE $SHLIB "$DESTDIR"$libdir/"
-+docmd "ln -s $SHLIB "$DESTDIR"$libdir/${SHLIB}.0"
-+}
diff --git a/sys-libs/blocksruntime/metadata.xml b/sys-libs/blocksruntime/metadata.xml
deleted file mode 100644
index 0b1bc8bc7a48..000000000000
--- a/sys-libs/blocksruntime/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="github">mackyle/blocksruntime</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/cracklib/Manifest b/sys-libs/cracklib/Manifest
deleted file mode 100644
index 2e819ca68035..000000000000
--- a/sys-libs/cracklib/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST cracklib-2.10.2.tar.xz 465152 BLAKE2B 87ea88085fee30cbd6e59485f157b7c6213e21619ff8af20ed33c118fd4be78cc9fc5b8ac5d583391df7a3bd527671044410d0e5cfe1cf864c0608cd24a8ca0b SHA512 b58f513bb3094821a69e45c092483d7445ecd1ea2d4d70b6cc422c58e478146f4656fc1ddc0b276f1da31a858d2baea4cca233c9232e2acd05085d55873f3273
-DIST cracklib-2.10.3.tar.xz 466704 BLAKE2B 714b904a4f890f399fc2acd3c8ed91173cbce19d04f386cd594388e1d35197b135d760616998979051de9154f9e94c587d21f80979fe4e00ada66010006c7216 SHA512 5a86116b888dd324d17495c3ccefb061bfc6b31a7dcebc394324d87878dec5dec268591f9d7ef30cf60f70df9ff3bbf3d891c60efc198dba80f83cc43a08273c
diff --git a/sys-libs/cracklib/cracklib-2.10.2.ebuild b/sys-libs/cracklib/cracklib-2.10.2.ebuild
deleted file mode 100644
index ba75c13e3452..000000000000
--- a/sys-libs/cracklib/cracklib-2.10.2.ebuild
+++ /dev/null
@@ -1,130 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Note: ideally bump with sys-apps/cracklib-words
-DISTUTILS_EXT=1
-DISTUTILS_OPTIONAL=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{13..14} )
-inherit distutils-r1 libtool multilib-minimal usr-ldscript
-
-MY_P=${P/_}
-DESCRIPTION="Password Checking Library"
-HOMEPAGE="https://github.com/cracklib/cracklib/"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz"
-S="${WORKDIR}"/${MY_P}
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="nls python static-libs zlib"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- python? ( ${PYTHON_DEPS} )
- zlib? ( >=virtual/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] )
-"
-DEPEND="
- ${RDEPEND}
- nls? ( virtual/libintl )
-"
-BDEPEND="
- nls? ( sys-devel/gettext )
- python? ( ${DISTUTILS_DEPS} )
-"
-
-distutils_enable_tests unittest
-
-pkg_setup() {
- # Workaround bug #195017
- if has unmerge-orphans ${FEATURES} && has_version "<${CATEGORY}/${PN}-2.8.10" ; then
- eerror "Upgrade path is broken with FEATURES=unmerge-orphans"
- eerror "Please run: FEATURES=-unmerge-orphans emerge cracklib"
- die "Please run: FEATURES=-unmerge-orphans emerge cracklib"
- fi
-}
-
-src_prepare() {
- default
-
- # bug #269003
- elibtoolize
-
- if use python ; then
- distutils-r1_src_prepare
- fi
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- # use /usr/lib so that the dictionary is shared between ABIs
- --with-default-dict="/usr/lib/cracklib_dict"
- --without-python
- $(use_enable nls)
- $(use_enable static-libs static)
- )
-
- export ac_cv_header_zlib_h=$(usex zlib)
- export ac_cv_search_gzopen=$(usex zlib -lz no)
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- default
-
- if multilib_is_native_abi && use python ; then
- local -x CFLAGS="${CFLAGS} -DLOCALEDIR='\"${EPREFIX}/usr/share/locale\"' -DDEFAULT_CRACKLIB_DICT=\'${EPREFIX}/usr/lib/cracklib_dict\'"
- cd python || die
- distutils-r1_src_compile
- fi
-}
-
-multilib_src_test() {
- default
-
- if multilib_is_native_abi && use python ; then
- distutils-r1_src_test
- fi
-}
-
-python_test() {
- cd "${S}"/python || die
-
- # Make sure we load the freshly built library
- local -x LD_LIBRARY_PATH="${BUILD_DIR/-${EPYTHON/./_}}/lib/.libs:${BUILD_DIR}/lib:${LD_LIBRARY_PATH}"
-
- eunittest
-}
-
-multilib_src_install() {
- default
-
- # Move shared libs to /
- gen_usr_ldscript -a crack
-
- if multilib_is_native_abi && use python ; then
- cd python || die
- distutils-r1_src_install
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- find "${ED}" -type f -name "*.la" -delete || die
- rm -r "${ED}"/usr/share/cracklib || die
-
- insinto /usr/share/dict
- doins dicts/cracklib-small
-}
-
-pkg_postinst() {
- if [[ -z ${ROOT} ]] ; then
- ebegin "Regenerating cracklib dictionary"
- create-cracklib-dict "${EPREFIX}"/usr/share/dict/* > /dev/null
- eend $?
- fi
-}
diff --git a/sys-libs/cracklib/cracklib-2.10.3.ebuild b/sys-libs/cracklib/cracklib-2.10.3.ebuild
deleted file mode 100644
index 1c7616a5c3d8..000000000000
--- a/sys-libs/cracklib/cracklib-2.10.3.ebuild
+++ /dev/null
@@ -1,130 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Note: ideally bump with sys-apps/cracklib-words
-DISTUTILS_EXT=1
-DISTUTILS_OPTIONAL=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{13..14} )
-inherit distutils-r1 libtool multilib-minimal usr-ldscript
-
-MY_P=${P/_}
-DESCRIPTION="Password Checking Library"
-HOMEPAGE="https://github.com/cracklib/cracklib/"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz"
-S="${WORKDIR}"/${MY_P}
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="nls python static-libs zlib"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- python? ( ${PYTHON_DEPS} )
- zlib? ( >=virtual/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] )
-"
-DEPEND="
- ${RDEPEND}
- nls? ( virtual/libintl )
-"
-BDEPEND="
- nls? ( sys-devel/gettext )
- python? ( ${DISTUTILS_DEPS} )
-"
-
-distutils_enable_tests unittest
-
-pkg_setup() {
- # Workaround bug #195017
- if has unmerge-orphans ${FEATURES} && has_version "<${CATEGORY}/${PN}-2.8.10" ; then
- eerror "Upgrade path is broken with FEATURES=unmerge-orphans"
- eerror "Please run: FEATURES=-unmerge-orphans emerge cracklib"
- die "Please run: FEATURES=-unmerge-orphans emerge cracklib"
- fi
-}
-
-src_prepare() {
- default
-
- # bug #269003
- elibtoolize
-
- if use python ; then
- distutils-r1_src_prepare
- fi
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- # use /usr/lib so that the dictionary is shared between ABIs
- --with-default-dict="/usr/lib/cracklib_dict"
- --without-python
- $(use_enable nls)
- $(use_enable static-libs static)
- )
-
- export ac_cv_header_zlib_h=$(usex zlib)
- export ac_cv_search_gzopen=$(usex zlib -lz no)
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- default
-
- if multilib_is_native_abi && use python ; then
- local -x CFLAGS="${CFLAGS} -DLOCALEDIR='\"${EPREFIX}/usr/share/locale\"' -DDEFAULT_CRACKLIB_DICT=\'${EPREFIX}/usr/lib/cracklib_dict\'"
- cd python || die
- distutils-r1_src_compile
- fi
-}
-
-multilib_src_test() {
- default
-
- if multilib_is_native_abi && use python ; then
- distutils-r1_src_test
- fi
-}
-
-python_test() {
- cd "${S}"/python || die
-
- # Make sure we load the freshly built library
- local -x LD_LIBRARY_PATH="${BUILD_DIR/-${EPYTHON/./_}}/lib/.libs:${BUILD_DIR}/lib:${LD_LIBRARY_PATH}"
-
- eunittest
-}
-
-multilib_src_install() {
- default
-
- # Move shared libs to /
- gen_usr_ldscript -a crack
-
- if multilib_is_native_abi && use python ; then
- cd python || die
- distutils-r1_src_install
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- find "${ED}" -type f -name "*.la" -delete || die
- rm -r "${ED}"/usr/share/cracklib || die
-
- insinto /usr/share/dict
- doins dicts/cracklib-small
-}
-
-pkg_postinst() {
- if [[ -z ${ROOT} ]] ; then
- ebegin "Regenerating cracklib dictionary"
- create-cracklib-dict "${EPREFIX}"/usr/share/dict/* > /dev/null
- eend $?
- fi
-}
diff --git a/sys-libs/cracklib/metadata.xml b/sys-libs/cracklib/metadata.xml
deleted file mode 100644
index 8aacd02b19ce..000000000000
--- a/sys-libs/cracklib/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<upstream>
- <remote-id type="sourceforge">cracklib</remote-id>
- <remote-id type="github">cracklib/cracklib</remote-id>
-</upstream>
-</pkgmetadata>
diff --git a/sys-libs/cyclonedds/Manifest b/sys-libs/cyclonedds/Manifest
deleted file mode 100644
index 1043fbfb817c..000000000000
--- a/sys-libs/cyclonedds/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST cyclonedds-0.10.3.tar.gz 6978637 BLAKE2B 341b046d958c9f9f4200c5518525f42191d2e3954160cdffcc8bccbd5e43fe87e9e66bc18b4ae47cbb9b0f7f47b887936190cb611cfb02f61d6d983cea40763d SHA512 02cc883a892e07865b7b362919d0a756db8c20f2d4ff7912738ccaaa512a83db4114a4da74f87b5bf743891871402cc4e9d472eaf6718ef409776fa2817ce288
diff --git a/sys-libs/cyclonedds/cyclonedds-0.10.3-r1.ebuild b/sys-libs/cyclonedds/cyclonedds-0.10.3-r1.ebuild
deleted file mode 100644
index abd0986aa98c..000000000000
--- a/sys-libs/cyclonedds/cyclonedds-0.10.3-r1.ebuild
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit cmake python-any-r1
-
-DESCRIPTION="Eclipse Cyclone DDS project"
-HOMEPAGE="https://cyclonedds.io/"
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/eclipse-cyclonedds/cyclonedds.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/eclipse-cyclonedds/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
-fi
-
-LICENSE="EPL-2.0"
-SLOT="0/$(ver_cut 1-2)"
-IUSE="test ssl shm parser doc examples ipv6 idlc get-kind"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- ssl? ( dev-libs/openssl:= )
- shm? ( sys-libs/iceoryx:= )
- parser? ( sys-devel/bison )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- doc? (
- app-text/doxygen
- $(python_gen_any_dep '
- dev-python/breathe[${PYTHON_USEDEP}]
- dev-python/sphinx[${PYTHON_USEDEP}]
- ')
- )
- test? ( dev-util/cunit )
-"
-
-CMAKE_BUILD_TYPE=Release
-
-python_check_deps() {
- if use doc; then
- python_has_version \
- "dev-python/breathe[${PYTHON_USEDEP}]" \
- "dev-python/sphinx[${PYTHON_USEDEP}]"
- fi
-}
-
-pkg_setup() {
- use doc && python-any-r1_pkg_setup
-}
-
-src_prepare() {
- use get-kind && eapply "${FILESDIR}/${PN}-0.10.3-get_kind.patch"
-
- # disable tests that requires FEATURES=-network-sandbox
- sed -i '/ifaddrs.c$/d' src/ddsrt/tests/CMakeLists.txt || die
-
- # fix the dependency detection in cmake
- sed -i "/set(/s/\${_Sphinx_shebang}/${EPYTHON}/" cmake/Modules/FindSphinx.cmake || die
-
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DBUILD_DOCS=$(usex doc)
- -DBUILD_DDSPERF=OFF
- -DBUILD_EXAMPLES=$(usex examples)
- -DBUILD_TESTING=$(usex test)
- -DBUILD_IDLC_TESTING=$(usex test)
- -DBUILD_IDLC=$(usex idlc)
- -DENABLE_SSL=$(usex ssl)
- -DENABLE_SECURITY=$(usex ssl)
- -DENABLE_SECURITY=$(usex ssl)
- -DENABLE_IPV6=$(usex ipv6)
- -DENABLE_SHM=$(usex shm)
- )
- cmake_src_configure
-}
diff --git a/sys-libs/cyclonedds/cyclonedds-9999.ebuild b/sys-libs/cyclonedds/cyclonedds-9999.ebuild
deleted file mode 100644
index abd0986aa98c..000000000000
--- a/sys-libs/cyclonedds/cyclonedds-9999.ebuild
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit cmake python-any-r1
-
-DESCRIPTION="Eclipse Cyclone DDS project"
-HOMEPAGE="https://cyclonedds.io/"
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/eclipse-cyclonedds/cyclonedds.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/eclipse-cyclonedds/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
-fi
-
-LICENSE="EPL-2.0"
-SLOT="0/$(ver_cut 1-2)"
-IUSE="test ssl shm parser doc examples ipv6 idlc get-kind"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- ssl? ( dev-libs/openssl:= )
- shm? ( sys-libs/iceoryx:= )
- parser? ( sys-devel/bison )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- doc? (
- app-text/doxygen
- $(python_gen_any_dep '
- dev-python/breathe[${PYTHON_USEDEP}]
- dev-python/sphinx[${PYTHON_USEDEP}]
- ')
- )
- test? ( dev-util/cunit )
-"
-
-CMAKE_BUILD_TYPE=Release
-
-python_check_deps() {
- if use doc; then
- python_has_version \
- "dev-python/breathe[${PYTHON_USEDEP}]" \
- "dev-python/sphinx[${PYTHON_USEDEP}]"
- fi
-}
-
-pkg_setup() {
- use doc && python-any-r1_pkg_setup
-}
-
-src_prepare() {
- use get-kind && eapply "${FILESDIR}/${PN}-0.10.3-get_kind.patch"
-
- # disable tests that requires FEATURES=-network-sandbox
- sed -i '/ifaddrs.c$/d' src/ddsrt/tests/CMakeLists.txt || die
-
- # fix the dependency detection in cmake
- sed -i "/set(/s/\${_Sphinx_shebang}/${EPYTHON}/" cmake/Modules/FindSphinx.cmake || die
-
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DBUILD_DOCS=$(usex doc)
- -DBUILD_DDSPERF=OFF
- -DBUILD_EXAMPLES=$(usex examples)
- -DBUILD_TESTING=$(usex test)
- -DBUILD_IDLC_TESTING=$(usex test)
- -DBUILD_IDLC=$(usex idlc)
- -DENABLE_SSL=$(usex ssl)
- -DENABLE_SECURITY=$(usex ssl)
- -DENABLE_SECURITY=$(usex ssl)
- -DENABLE_IPV6=$(usex ipv6)
- -DENABLE_SHM=$(usex shm)
- )
- cmake_src_configure
-}
diff --git a/sys-libs/cyclonedds/files/cyclonedds-0.10.3-get_kind.patch b/sys-libs/cyclonedds/files/cyclonedds-0.10.3-get_kind.patch
deleted file mode 100644
index a6abed76c020..000000000000
--- a/sys-libs/cyclonedds/files/cyclonedds-0.10.3-get_kind.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-diff --git a/src/core/ddsc/include/dds/dds.h b/src/core/ddsc/include/dds/dds.h
-index 97647d6..b619ca7 100644
---- a/src/core/ddsc/include/dds/dds.h
-+++ b/src/core/ddsc/include/dds/dds.h
-@@ -46,6 +46,7 @@
- #include "dds/ddsc/dds_public_error.h"
- #include "dds/ddsc/dds_public_status.h"
- #include "dds/ddsc/dds_public_listener.h"
-+#include "dds/ddsc/dds_public_entity.h"
-
- #if defined (__cplusplus)
- extern "C" {
-diff --git a/src/core/ddsc/include/dds/ddsc/dds_public_entity.h b/src/core/ddsc/include/dds/ddsc/dds_public_entity.h
-new file mode 100644
-index 0000000..d1402f5
---- /dev/null
-+++ b/src/core/ddsc/include/dds/ddsc/dds_public_entity.h
-@@ -0,0 +1,36 @@
-+/*
-+ * dds_public_entity.h
-+ *
-+ * Created on: 21. nov. 2022
-+ * Author: marius
-+ */
-+
-+#ifndef _DDS_PUBLIC_ENTITY_H_
-+#define _DDS_PUBLIC_ENTITY_H_
-+#include <dds/export.h>
-+#include <dds/ddsrt/retcode.h>
-+#include <dds/ddsc/dds_public_impl.h>
-+#include <dds/ddsc/dds_basic_types.h>
-+
-+
-+/*
-+ * An addition to the external interface
-+ *
-+ * RETURN type of entity
-+ */
-+
-+DDS_EXPORT dds_entity_kind_t
-+dds_get_kind (const dds_entity_t e);
-+
-+/*
-+ *
-+ * RETURN DDS_RETCODE_OK on enabled entity
-+ * ELSE DDS_RETCODE_NOT_ENABLED
-+ *
-+ */
-+
-+DDS_EXPORT dds_return_t
-+dds_enabled(const dds_entity_t entity);
-+
-+#endif /* SRC_CORE_DDSC_INCLUDE_DDS_DDSC_DDS_PUBLIC_ENTITY_H_ */
-+
-diff --git a/src/core/ddsc/src/dds_entity.c b/src/core/ddsc/src/dds_entity.c
-index 16c99e8..e19891e 100644
---- a/src/core/ddsc/src/dds_entity.c
-+++ b/src/core/ddsc/src/dds_entity.c
-@@ -30,6 +30,7 @@
- #include "dds/ddsi/q_bswap.h"
- #include "dds/ddsi/ddsi_entity.h"
- #include "dds/ddsi/ddsi_endpoint.h"
-+#include "dds/ddsc/dds_public_entity.h"
-
- DDS_EXPORT extern inline dds_entity *dds_entity_from_handle_link (struct dds_handle_link *hdllink);
- DDS_EXPORT extern inline bool dds_entity_is_enabled (const dds_entity *e);
-@@ -52,6 +53,20 @@ const struct dds_entity_deriver *dds_entity_deriver_table[] = {
- [DDS_KIND_CYCLONEDDS] = &dds_entity_deriver_cyclonedds
- };
-
-+
-+dds_entity_kind_t dds_get_kind (const dds_entity_t e)
-+{
-+ struct dds_entity *entity;
-+ dds_return_t ret;
-+ dds_entity_kind_t kind = DDS_KIND_DONTCARE;
-+ if((ret = dds_entity_pin(e, &entity)) >0)
-+ {
-+ kind = entity->m_kind;
-+ dds_entity_unpin(entity);
-+ }
-+
-+ return kind;
-+}
- void dds_entity_deriver_dummy_interrupt (struct dds_entity *e) {
- (void) e;
- }
diff --git a/sys-libs/cyclonedds/metadata.xml b/sys-libs/cyclonedds/metadata.xml
deleted file mode 100644
index 2c9b4314536a..000000000000
--- a/sys-libs/cyclonedds/metadata.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="github">eclipse-cyclonedds/cyclonedds</remote-id>
- </upstream>
- <use>
- <flag name="get-kind">Apply patch for additional interface which returns type of entity</flag>
- <flag name="idlc">Build IDL preprocessor</flag>
- <flag name="parser">Regenerate parser</flag>
- <flag name="shm">Enable shared memory support</flag>
- </use>
-</pkgmetadata>
diff --git a/sys-libs/db/Manifest b/sys-libs/db/Manifest
deleted file mode 100644
index 99e1d0be129a..000000000000
--- a/sys-libs/db/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST db-4.8.30.tar.gz 22887305 BLAKE2B 10487580a371fa97ef5e468e1fcc4af68490934a82467da88b723f7d4ce403cd5f2b77bd95c218dda58161fe30bfef81f5093a8e5176f5ad5f482251c07c6423 SHA512 d1a3c52b0ab54ae3fd6792e6396c9f74d25f36b2eb9e853b67ef9c872508a58c784c7818108d06d184f59601b70cc877916e67dfea6f0ee1ca2b07468c1041f1
-DIST db-5.3.28.tar.gz 35090431 BLAKE2B 5b77a4ec0945fa96ce6c2b452fb4b029295e037fa64d5ff8dcb3b5e01ee3501fd75d9a73b8f5fa54d8907717d93546fbb5348ee70119e877fa2f17d301ecf50d SHA512 e91bbe550fc147a8be7e69ade86fdb7066453814971b2b0223f7d17712bd029a8eff5b2b6b238042ff6ec1ffa6879d44cb95c5645a922fee305c26c3eeaee090
-DIST db-6.0.35.tar.gz 36532251 BLAKE2B 22fbe557ccc13e4b936db8ca7d6ba11ce42e477bbf39f7e472067e06fb5910b1147fa58a44ac944c24a51ea839f1c61edda6bd8f3c450acac0c13d7fdba11e89 SHA512 002db1553def44efa715095b04b2bac2de7450cdc7142586d1d8b5d8ce79ee5e98f824b3bd276cd586ca932dc51ed35a9ffbed95b2b9847264f262cfa092479d
diff --git a/sys-libs/db/db-4.8.30-r8.ebuild b/sys-libs/db/db-4.8.30-r8.ebuild
deleted file mode 100644
index fe8ee551dc9d..000000000000
--- a/sys-libs/db/db-4.8.30-r8.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools db flag-o-matic multilib-minimal toolchain-funcs
-
-# Number of official patches
-#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
-PATCHNO="${PV/*.*.*_p}"
-if [[ ${PATCHNO} == "${PV}" ]] ; then
- MY_PV="${PV}"
- MY_P="${P}"
- PATCHNO=0
-else
- MY_PV="${PV/_p${PATCHNO}}"
- MY_P="${PN}-${MY_PV}"
-fi
-
-S="${WORKDIR}/${MY_P}/build_unix"
-DESCRIPTION="Oracle Berkeley DB"
-HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
-for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
- SRC_URI+=" http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
-done
-
-LICENSE="Sleepycat"
-SLOT="$(ver_cut 1-2)"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~s390 ~sparc x86"
-IUSE="doc cxx tcl test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="test? ( tcl )"
-
-# The entire testsuite needs the TCL functionality
-DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-# Need binutils for tc-ld-force-bfd
-BDEPEND="sys-devel/binutils:*"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-4.8-libtool.patch
- "${FILESDIR}"/${PN}-4.8.30-rename-atomic-compare-exchange.patch
- "${FILESDIR}"/${PN}-4.8-wformat-security.patch
- "${FILESDIR}"/${PN}-4.8.30-clang16.patch
-)
-
-src_prepare() {
- cd "${WORKDIR}"/"${MY_P}" || die
- for (( i=1 ; i<=${PATCHNO} ; i++ )); do
- eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
- done
-
- default
-
- sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE \
- || die
-
- cd dist || die
- rm aclocal/libtool.m4 || die
- sed \
- -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
- -i configure.ac || die
- sed \
- -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
- -i aclocal/programs.m4 || die
-
- AT_M4DIR="aclocal" eautoreconf
-
- # They do autoconf and THEN replace the version variables :(
- . ./RELEASE
- sed \
- -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
- -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
- -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
- -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
- -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
- -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \
- -i configure || die
-}
-
-src_configure() {
- # Force bfd before calling multilib_toolchain_setup
- tc-ld-force-bfd #470634 #729510
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- --enable-compat185
- --enable-o_direct
- --without-uniquename
- --disable-static
- --disable-java
- $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
- $(use_enable cxx)
- $(use_enable cxx stl)
- $(use_enable test)
- )
-
- # compilation with -O0 fails on amd64, see bug #171231
- if [[ ${ABI} == amd64 ]]; then
- local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
- replace-flags -O0 -O2
- is-flagq -O[s123] || append-flags -O2
- fi
-
- # Add linker versions to the symbols. Easier to do, and safer than header file
- # mumbo jumbo.
- append-ldflags -Wl,--default-symver
-
- # Bug #270851: test needs TCL support
- if use tcl || use test ; then
- myconf+=(
- --enable-tcl
- --with-tcl="${EPREFIX}/usr/$(get_libdir)"
- )
- else
- myconf+=(--disable-tcl )
- fi
-
- ECONF_SOURCE="${S}"/../dist STRIP="true" econf "${myconf[@]}"
-
- # The embedded assembly on ARM does not work on newer hardware
- # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
- # Specifically, it uses the SWPB op, which was deprecated:
- # http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
- # The op ALSO cannot be used in ARM-Thumb mode.
- # Trust the compiler instead.
- # >=db-6.1 uses LDREX instead.
-}
-
-multilib_src_test() {
- multilib_is_native_abi || return
-
- S="${BUILD_DIR}" db_src_test
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- db_src_install_headerslot
-
- db_src_install_usrlibcleanup
-}
-
-multilib_src_install_all() {
- db_src_install_usrbinslot
-
- db_src_install_doc
-
- dodir /usr/sbin
- # This file is not always built, and no longer exists as of db-4.8
- if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
- mv "${ED}"/usr/bin/berkeley_db_svc \
- "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
- fi
-
- # no static libraries
- find "${ED}" -name '*.la' -delete || die
-}
-
-pkg_postinst() {
- multilib_foreach_abi db_fix_so
-}
-
-pkg_postrm() {
- multilib_foreach_abi db_fix_so
-}
diff --git a/sys-libs/db/db-4.8.30-r9.ebuild b/sys-libs/db/db-4.8.30-r9.ebuild
deleted file mode 100644
index a7cf7a4e62df..000000000000
--- a/sys-libs/db/db-4.8.30-r9.ebuild
+++ /dev/null
@@ -1,171 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools db flag-o-matic multilib-minimal toolchain-funcs
-
-# Number of official patches
-#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
-PATCHNO="${PV/*.*.*_p}"
-if [[ ${PATCHNO} == "${PV}" ]] ; then
- MY_PV="${PV}"
- MY_P="${P}"
- PATCHNO=0
-else
- MY_PV="${PV/_p${PATCHNO}}"
- MY_P="${PN}-${MY_PV}"
-fi
-
-S="${WORKDIR}/${MY_P}/build_unix"
-DESCRIPTION="Oracle Berkeley DB"
-HOMEPAGE="https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-SRC_URI="https://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
-for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
- SRC_URI+=" https://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
-done
-
-LICENSE="Sleepycat"
-SLOT="$(ver_cut 1-2)"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="doc cxx tcl test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="test? ( tcl )"
-
-# The entire testsuite needs the TCL functionality
-DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-# Need binutils for tc-ld-force-bfd
-BDEPEND="sys-devel/binutils:*"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-4.8-libtool.patch
- "${FILESDIR}"/${PN}-4.8.30-rename-atomic-compare-exchange.patch
- "${FILESDIR}"/${PN}-4.8-wformat-security.patch
- "${FILESDIR}"/${PN}-4.8.30-clang16.patch
- "${FILESDIR}"/${PN}-4.8.30-tls-configure.patch
-)
-
-src_prepare() {
- cd "${WORKDIR}"/"${MY_P}" || die
- for (( i=1 ; i<=${PATCHNO} ; i++ )); do
- eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
- done
-
- default
-
- sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE \
- || die
-
- cd dist || die
- rm aclocal/libtool.m4 || die
- sed \
- -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
- -i configure.ac || die
- sed \
- -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
- -i aclocal/programs.m4 || die
-
- AT_M4DIR="aclocal" eautoreconf
-
- # They do autoconf and THEN replace the version variables :(
- . ./RELEASE
- sed \
- -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
- -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
- -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
- -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
- -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
- -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \
- -i configure || die
-}
-
-src_configure() {
- # Force bfd before calling multilib_toolchain_setup
- tc-ld-force-bfd #470634 #729510
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- --enable-compat185
- --enable-o_direct
- --without-uniquename
- --disable-static
- --disable-java
- $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
- $(use_enable cxx)
- $(use_enable cxx stl)
- $(use_enable test)
- )
-
- # compilation with -O0 fails on amd64, see bug #171231
- if [[ ${ABI} == amd64 ]]; then
- local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
- replace-flags -O0 -O2
- is-flagq -O[s123] || append-flags -O2
- fi
-
- # Add linker versions to the symbols. Easier to do, and safer than header file
- # mumbo jumbo.
- append-ldflags -Wl,--default-symver
-
- # Bug #270851: test needs TCL support
- if use tcl || use test ; then
- myconf+=(
- --enable-tcl
- --with-tcl="${EPREFIX}/usr/$(get_libdir)"
- )
- else
- myconf+=(--disable-tcl )
- fi
-
- ECONF_SOURCE="${S}"/../dist STRIP="true" econf "${myconf[@]}"
-
- # The embedded assembly on ARM does not work on newer hardware
- # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
- # Specifically, it uses the SWPB op, which was deprecated:
- # http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
- # The op ALSO cannot be used in ARM-Thumb mode.
- # Trust the compiler instead.
- # >=db-6.1 uses LDREX instead.
-}
-
-multilib_src_test() {
- multilib_is_native_abi || return
-
- S="${BUILD_DIR}" db_src_test
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- db_src_install_headerslot
-
- db_src_install_usrlibcleanup
-}
-
-multilib_src_install_all() {
- db_src_install_usrbinslot
-
- db_src_install_doc
-
- dodir /usr/sbin
- # This file is not always built, and no longer exists as of db-4.8
- if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
- mv "${ED}"/usr/bin/berkeley_db_svc \
- "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
- fi
-
- # no static libraries
- find "${ED}" -name '*.la' -delete || die
-}
-
-pkg_postinst() {
- multilib_foreach_abi db_fix_so
-}
-
-pkg_postrm() {
- multilib_foreach_abi db_fix_so
-}
diff --git a/sys-libs/db/db-5.3.28-r10.ebuild b/sys-libs/db/db-5.3.28-r10.ebuild
deleted file mode 100644
index 04a48cb578e4..000000000000
--- a/sys-libs/db/db-5.3.28-r10.ebuild
+++ /dev/null
@@ -1,242 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit autotools db flag-o-matic multilib-minimal toolchain-funcs
-
-#Number of official patches
-#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
-PATCHNO="${PV/*.*.*_p}"
-if [[ ${PATCHNO} == "${PV}" ]] ; then
- MY_PV="${PV}"
- MY_P="${P}"
- PATCHNO=0
-else
- MY_PV="${PV/_p${PATCHNO}}"
- MY_P="${PN}-${MY_PV}"
-fi
-
-RESTRICT="!test? ( test )"
-
-S_BASE="${WORKDIR}/${MY_P}"
-S="${S_BASE}/build_unix"
-DESCRIPTION="Oracle Berkeley DB"
-HOMEPAGE="https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-SRC_URI="https://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
-for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
- SRC_URI+=" https://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
-done
-
-LICENSE="Sleepycat"
-SLOT="$(ver_cut 1-2)"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="doc cxx tcl test"
-
-REQUIRED_USE="test? ( tcl )"
-
-# the entire testsuite needs the TCL functionality
-DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-# bug #841698
-# Need binutils for tc-ld-force-bfd
-BDEPEND="
- dev-build/autoconf-archive
- sys-devel/binutils:*
-"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/db${SLOT}/db.h
-)
-
-PATCHES=(
- # sqlite configure call has an extra leading ..
- # upstreamed:5.2.36, missing in 5.3.x
- "${FILESDIR}"/${PN}-5.2.28-sqlite-configure-path.patch
-
- # The upstream testsuite copies .lib and the binaries for each parallel test
- # core, ~300MB each. This patch uses links instead, saves a lot of space.
- "${FILESDIR}"/${PN}-6.0.20-test-link.patch
-
- # Needed when compiling with clang
- "${FILESDIR}"/${PN}-5.1.29-rename-atomic-compare-exchange.patch
- "${FILESDIR}"/${PN}-5.3.28-clang16.patch
- "${FILESDIR}"/${PN}-4.8.30-tls-configure.patch
-)
-
-src_prepare() {
- cd "${S_BASE}" || die
- for (( i=1 ; i<=${PATCHNO} ; i++ ))
- do
- eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
- done
-
- default
-
- # Upstream release script grabs the dates when the script was run, so lets
- # end-run them to keep the date the same.
- export REAL_DB_RELEASE_DATE="$(awk \
- '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
- "${S_BASE}"/dist/configure)"
- sed -r \
- -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
- -i dist/RELEASE || die
-
- cd dist || die
- rm aclocal/libtool.m4 || die
- sed \
- -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
- -i configure.ac || die
- sed \
- -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
- -i aclocal/programs.m4 || die
-
- AT_M4DIR="aclocal" eautoreconf
-
- # They do autoconf and THEN replace the version variables :(
- . ./RELEASE
- local v ev
- for v in \
- DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
- DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
- DB_VERSION \
- DB_RELEASE_DATE ; do
- ev="__EDIT_${v}__"
- sed -e "s/${ev}/${!v}/g" -i configure || die
- done
-
- # This is a false positive skip in the tests as the test-reviewer code
- # looks for 'Skipping\s'
- sed \
- -e '/db_repsite/s,Skipping:,Skipping,g' \
- -i "${S_BASE}"/test/tcl/reputils.tcl || die
-}
-
-src_configure() {
- # bug #943726
- append-cflags -std=gnu17
- # Force bfd before calling multilib_toolchain_setup
- tc-ld-force-bfd #470634 #729510
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- # sql_compat will cause a collision with sqlite3
- #--enable-sql_compat
- # Don't --enable-sql* because we don't want to use bundled sqlite.
- # See Gentoo bug #605688
- --enable-compat185
- --enable-dbm
- --enable-o_direct
- --without-uniquename
- --disable-sql
- --disable-sql_codegen
- --disable-sql_compat
- --disable-static
- --disable-java
- $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
- $(use_enable cxx)
- $(use_enable cxx stl)
- $(use_enable test)
- )
-
- # compilation with -O0 fails on amd64, see bug #171231
- if [[ ${ABI} == amd64 ]]; then
- local CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
- replace-flags -O0 -O2
- is-flagq -O[s123] || append-flags -O2
- fi
-
- # Add linker versions to the symbols. Easier to do, and safer than header file
- # mumbo jumbo.
- append-ldflags -Wl,--default-symver
-
- # Bug #270851: test needs TCL support
- if use tcl || use test ; then
- myconf+=(
- --enable-tcl
- --with-tcl="${EPREFIX}/usr/$(get_libdir)"
- )
- else
- myconf+=(--disable-tcl )
- fi
-
- ECONF_SOURCE="${S_BASE}"/dist \
- STRIP="true" \
- econf "${myconf[@]}"
-
- # The embedded assembly on ARM does not work on newer hardware
- # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
- # Specifically, it uses the SWPB op, which was deprecated:
- # http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
- # The op ALSO cannot be used in ARM-Thumb mode.
- # Trust the compiler instead.
- # >=db-6.1 uses LDREX instead.
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- db_src_install_headerslot
-
- db_src_install_usrlibcleanup
-}
-
-multilib_src_install_all() {
- db_src_install_usrbinslot
-
- db_src_install_doc
-
- dodir /usr/sbin
- # This file is not always built, and no longer exists as of db-4.8
- if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
- mv "${ED}"/usr/bin/berkeley_db_svc \
- "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
- fi
-
- # no static libraries
- find "${ED}" -name '*.la' -delete || die
-}
-
-pkg_postinst() {
- multilib_foreach_abi db_fix_so
-}
-
-pkg_postrm() {
- multilib_foreach_abi db_fix_so
-}
-
-src_test() {
- # db_repsite is impossible to build, as upstream strips those sources.
- # db_repsite is used directly in the setup_site_prog,
- # setup_site_prog is called from open_site_prog
- # which is called only from tests in the multi_repmgr group.
- #sed -ri \
- # -e '/set subs/s,multi_repmgr,,g' \
- # "${S_BASE}/test/testparams.tcl"
- sed -r \
- -e '/multi_repmgr/d' \
- -i "${S_BASE}/test/tcl/test.tcl" || die
-
- # This is the only failure in 5.2.28 so far, and looks like a false positive.
- # Repmgr018 (btree): Test of repmgr stats.
- # Repmgr018.a: Start a master.
- # Repmgr018.b: Start a client.
- # Repmgr018.c: Run some transactions at master.
- # Rep_test: btree 20 key/data pairs starting at 0
- # Rep_test.a: put/get loop
- # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
- sed -r \
- -e '/set parms.*repmgr018/d' \
- -e 's/repmgr018//g' \
- -i "${S_BASE}/test/tcl/test.tcl" || die
-
- multilib-minimal_src_test
-}
-
-multilib_src_test() {
- multilib_is_native_abi || return
-
- S="${BUILD_DIR}" db_src_test
-}
diff --git a/sys-libs/db/db-5.3.28-r11.ebuild b/sys-libs/db/db-5.3.28-r11.ebuild
deleted file mode 100644
index 28cfa8800e4b..000000000000
--- a/sys-libs/db/db-5.3.28-r11.ebuild
+++ /dev/null
@@ -1,242 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit autotools db flag-o-matic multilib-minimal toolchain-funcs
-
-#Number of official patches
-#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
-PATCHNO="${PV/*.*.*_p}"
-if [[ ${PATCHNO} == "${PV}" ]] ; then
- MY_PV="${PV}"
- MY_P="${P}"
- PATCHNO=0
-else
- MY_PV="${PV/_p${PATCHNO}}"
- MY_P="${PN}-${MY_PV}"
-fi
-
-RESTRICT="!test? ( test )"
-
-S_BASE="${WORKDIR}/${MY_P}"
-S="${S_BASE}/build_unix"
-DESCRIPTION="Oracle Berkeley DB"
-HOMEPAGE="https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-SRC_URI="https://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
-for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
- SRC_URI+=" https://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
-done
-
-LICENSE="Sleepycat"
-SLOT="$(ver_cut 1-2)"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="doc cxx tcl test"
-
-REQUIRED_USE="test? ( tcl )"
-
-# the entire testsuite needs the TCL functionality
-DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-# bug #841698
-# Need binutils for tc-ld-force-bfd
-BDEPEND="
- dev-build/autoconf-archive
- sys-devel/binutils:*
-"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/db${SLOT}/db.h
-)
-
-PATCHES=(
- # sqlite configure call has an extra leading ..
- # upstreamed:5.2.36, missing in 5.3.x
- "${FILESDIR}"/${PN}-5.2.28-sqlite-configure-path.patch
-
- # The upstream testsuite copies .lib and the binaries for each parallel test
- # core, ~300MB each. This patch uses links instead, saves a lot of space.
- "${FILESDIR}"/${PN}-6.0.20-test-link.patch
-
- # Needed when compiling with clang
- "${FILESDIR}"/${PN}-5.1.29-rename-atomic-compare-exchange.patch
- "${FILESDIR}"/${PN}-5.3.28-modern-c.patch
- "${FILESDIR}"/${PN}-4.8.30-tls-configure.patch
-)
-
-src_prepare() {
- cd "${S_BASE}" || die
- for (( i=1 ; i<=${PATCHNO} ; i++ ))
- do
- eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
- done
-
- default
-
- # Upstream release script grabs the dates when the script was run, so lets
- # end-run them to keep the date the same.
- export REAL_DB_RELEASE_DATE="$(awk \
- '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
- "${S_BASE}"/dist/configure)"
- sed -r \
- -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
- -i dist/RELEASE || die
-
- cd dist || die
- rm aclocal/libtool.m4 || die
- sed \
- -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
- -i configure.ac || die
- sed \
- -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
- -i aclocal/programs.m4 || die
-
- AT_M4DIR="aclocal" eautoreconf
-
- # They do autoconf and THEN replace the version variables :(
- . ./RELEASE
- local v ev
- for v in \
- DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
- DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
- DB_VERSION \
- DB_RELEASE_DATE ; do
- ev="__EDIT_${v}__"
- sed -e "s/${ev}/${!v}/g" -i configure || die
- done
-
- # This is a false positive skip in the tests as the test-reviewer code
- # looks for 'Skipping\s'
- sed \
- -e '/db_repsite/s,Skipping:,Skipping,g' \
- -i "${S_BASE}"/test/tcl/reputils.tcl || die
-}
-
-src_configure() {
- # bug #943726
- append-cflags -std=gnu17
- # Force bfd before calling multilib_toolchain_setup
- tc-ld-force-bfd #470634 #729510
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- # sql_compat will cause a collision with sqlite3
- #--enable-sql_compat
- # Don't --enable-sql* because we don't want to use bundled sqlite.
- # See Gentoo bug #605688
- --enable-compat185
- --enable-dbm
- --enable-o_direct
- --without-uniquename
- --disable-sql
- --disable-sql_codegen
- --disable-sql_compat
- --disable-static
- --disable-java
- $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
- $(use_enable cxx)
- $(use_enable cxx stl)
- $(use_enable test)
- )
-
- # compilation with -O0 fails on amd64, see bug #171231
- if [[ ${ABI} == amd64 ]]; then
- local CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
- replace-flags -O0 -O2
- is-flagq -O[s123] || append-flags -O2
- fi
-
- # Add linker versions to the symbols. Easier to do, and safer than header file
- # mumbo jumbo.
- append-ldflags -Wl,--default-symver
-
- # Bug #270851: test needs TCL support
- if use tcl || use test ; then
- myconf+=(
- --enable-tcl
- --with-tcl="${EPREFIX}/usr/$(get_libdir)"
- )
- else
- myconf+=(--disable-tcl )
- fi
-
- ECONF_SOURCE="${S_BASE}"/dist \
- STRIP="true" \
- econf "${myconf[@]}"
-
- # The embedded assembly on ARM does not work on newer hardware
- # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
- # Specifically, it uses the SWPB op, which was deprecated:
- # http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
- # The op ALSO cannot be used in ARM-Thumb mode.
- # Trust the compiler instead.
- # >=db-6.1 uses LDREX instead.
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- db_src_install_headerslot
-
- db_src_install_usrlibcleanup
-}
-
-multilib_src_install_all() {
- db_src_install_usrbinslot
-
- db_src_install_doc
-
- dodir /usr/sbin
- # This file is not always built, and no longer exists as of db-4.8
- if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
- mv "${ED}"/usr/bin/berkeley_db_svc \
- "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
- fi
-
- # no static libraries
- find "${ED}" -name '*.la' -delete || die
-}
-
-pkg_postinst() {
- multilib_foreach_abi db_fix_so
-}
-
-pkg_postrm() {
- multilib_foreach_abi db_fix_so
-}
-
-src_test() {
- # db_repsite is impossible to build, as upstream strips those sources.
- # db_repsite is used directly in the setup_site_prog,
- # setup_site_prog is called from open_site_prog
- # which is called only from tests in the multi_repmgr group.
- #sed -ri \
- # -e '/set subs/s,multi_repmgr,,g' \
- # "${S_BASE}/test/testparams.tcl"
- sed -r \
- -e '/multi_repmgr/d' \
- -i "${S_BASE}/test/tcl/test.tcl" || die
-
- # This is the only failure in 5.2.28 so far, and looks like a false positive.
- # Repmgr018 (btree): Test of repmgr stats.
- # Repmgr018.a: Start a master.
- # Repmgr018.b: Start a client.
- # Repmgr018.c: Run some transactions at master.
- # Rep_test: btree 20 key/data pairs starting at 0
- # Rep_test.a: put/get loop
- # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
- sed -r \
- -e '/set parms.*repmgr018/d' \
- -e 's/repmgr018//g' \
- -i "${S_BASE}/test/tcl/test.tcl" || die
-
- multilib-minimal_src_test
-}
-
-multilib_src_test() {
- multilib_is_native_abi || return
-
- S="${BUILD_DIR}" db_src_test
-}
diff --git a/sys-libs/db/db-5.3.28-r9.ebuild b/sys-libs/db/db-5.3.28-r9.ebuild
deleted file mode 100644
index bc1a042f41c8..000000000000
--- a/sys-libs/db/db-5.3.28-r9.ebuild
+++ /dev/null
@@ -1,241 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit autotools db flag-o-matic multilib-minimal toolchain-funcs
-
-#Number of official patches
-#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
-PATCHNO="${PV/*.*.*_p}"
-if [[ ${PATCHNO} == "${PV}" ]] ; then
- MY_PV="${PV}"
- MY_P="${P}"
- PATCHNO=0
-else
- MY_PV="${PV/_p${PATCHNO}}"
- MY_P="${PN}-${MY_PV}"
-fi
-
-RESTRICT="!test? ( test )"
-
-S_BASE="${WORKDIR}/${MY_P}"
-S="${S_BASE}/build_unix"
-DESCRIPTION="Oracle Berkeley DB"
-HOMEPAGE="https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-SRC_URI="https://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
-for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
- SRC_URI+=" https://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
-done
-
-LICENSE="Sleepycat"
-SLOT="$(ver_cut 1-2)"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="doc cxx tcl test"
-
-REQUIRED_USE="test? ( tcl )"
-
-# the entire testsuite needs the TCL functionality
-DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-# bug #841698
-# Need binutils for tc-ld-force-bfd
-BDEPEND="
- dev-build/autoconf-archive
- sys-devel/binutils:*
-"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/db${SLOT}/db.h
-)
-
-PATCHES=(
- # sqlite configure call has an extra leading ..
- # upstreamed:5.2.36, missing in 5.3.x
- "${FILESDIR}"/${PN}-5.2.28-sqlite-configure-path.patch
-
- # The upstream testsuite copies .lib and the binaries for each parallel test
- # core, ~300MB each. This patch uses links instead, saves a lot of space.
- "${FILESDIR}"/${PN}-6.0.20-test-link.patch
-
- # Needed when compiling with clang
- "${FILESDIR}"/${PN}-5.1.29-rename-atomic-compare-exchange.patch
- "${FILESDIR}"/${PN}-5.3.28-clang16.patch
-)
-
-src_prepare() {
- cd "${S_BASE}" || die
- for (( i=1 ; i<=${PATCHNO} ; i++ ))
- do
- eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
- done
-
- default
-
- # Upstream release script grabs the dates when the script was run, so lets
- # end-run them to keep the date the same.
- export REAL_DB_RELEASE_DATE="$(awk \
- '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
- "${S_BASE}"/dist/configure)"
- sed -r \
- -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
- -i dist/RELEASE || die
-
- cd dist || die
- rm aclocal/libtool.m4 || die
- sed \
- -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
- -i configure.ac || die
- sed \
- -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
- -i aclocal/programs.m4 || die
-
- AT_M4DIR="aclocal" eautoreconf
-
- # They do autoconf and THEN replace the version variables :(
- . ./RELEASE
- local v ev
- for v in \
- DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
- DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
- DB_VERSION \
- DB_RELEASE_DATE ; do
- ev="__EDIT_${v}__"
- sed -e "s/${ev}/${!v}/g" -i configure || die
- done
-
- # This is a false positive skip in the tests as the test-reviewer code
- # looks for 'Skipping\s'
- sed \
- -e '/db_repsite/s,Skipping:,Skipping,g' \
- -i "${S_BASE}"/test/tcl/reputils.tcl || die
-}
-
-src_configure() {
- # bug #943726
- append-cflags -std=gnu17
- # Force bfd before calling multilib_toolchain_setup
- tc-ld-force-bfd #470634 #729510
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- # sql_compat will cause a collision with sqlite3
- #--enable-sql_compat
- # Don't --enable-sql* because we don't want to use bundled sqlite.
- # See Gentoo bug #605688
- --enable-compat185
- --enable-dbm
- --enable-o_direct
- --without-uniquename
- --disable-sql
- --disable-sql_codegen
- --disable-sql_compat
- --disable-static
- --disable-java
- $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
- $(use_enable cxx)
- $(use_enable cxx stl)
- $(use_enable test)
- )
-
- # compilation with -O0 fails on amd64, see bug #171231
- if [[ ${ABI} == amd64 ]]; then
- local CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
- replace-flags -O0 -O2
- is-flagq -O[s123] || append-flags -O2
- fi
-
- # Add linker versions to the symbols. Easier to do, and safer than header file
- # mumbo jumbo.
- append-ldflags -Wl,--default-symver
-
- # Bug #270851: test needs TCL support
- if use tcl || use test ; then
- myconf+=(
- --enable-tcl
- --with-tcl="${EPREFIX}/usr/$(get_libdir)"
- )
- else
- myconf+=(--disable-tcl )
- fi
-
- ECONF_SOURCE="${S_BASE}"/dist \
- STRIP="true" \
- econf "${myconf[@]}"
-
- # The embedded assembly on ARM does not work on newer hardware
- # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
- # Specifically, it uses the SWPB op, which was deprecated:
- # http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
- # The op ALSO cannot be used in ARM-Thumb mode.
- # Trust the compiler instead.
- # >=db-6.1 uses LDREX instead.
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- db_src_install_headerslot
-
- db_src_install_usrlibcleanup
-}
-
-multilib_src_install_all() {
- db_src_install_usrbinslot
-
- db_src_install_doc
-
- dodir /usr/sbin
- # This file is not always built, and no longer exists as of db-4.8
- if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
- mv "${ED}"/usr/bin/berkeley_db_svc \
- "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
- fi
-
- # no static libraries
- find "${ED}" -name '*.la' -delete || die
-}
-
-pkg_postinst() {
- multilib_foreach_abi db_fix_so
-}
-
-pkg_postrm() {
- multilib_foreach_abi db_fix_so
-}
-
-src_test() {
- # db_repsite is impossible to build, as upstream strips those sources.
- # db_repsite is used directly in the setup_site_prog,
- # setup_site_prog is called from open_site_prog
- # which is called only from tests in the multi_repmgr group.
- #sed -ri \
- # -e '/set subs/s,multi_repmgr,,g' \
- # "${S_BASE}/test/testparams.tcl"
- sed -r \
- -e '/multi_repmgr/d' \
- -i "${S_BASE}/test/tcl/test.tcl" || die
-
- # This is the only failure in 5.2.28 so far, and looks like a false positive.
- # Repmgr018 (btree): Test of repmgr stats.
- # Repmgr018.a: Start a master.
- # Repmgr018.b: Start a client.
- # Repmgr018.c: Run some transactions at master.
- # Rep_test: btree 20 key/data pairs starting at 0
- # Rep_test.a: put/get loop
- # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
- sed -r \
- -e '/set parms.*repmgr018/d' \
- -e 's/repmgr018//g' \
- -i "${S_BASE}/test/tcl/test.tcl" || die
-
- multilib-minimal_src_test
-}
-
-multilib_src_test() {
- multilib_is_native_abi || return
-
- S="${BUILD_DIR}" db_src_test
-}
diff --git a/sys-libs/db/db-6.0.35-r4.ebuild b/sys-libs/db/db-6.0.35-r4.ebuild
deleted file mode 100644
index c5daac5f393c..000000000000
--- a/sys-libs/db/db-6.0.35-r4.ebuild
+++ /dev/null
@@ -1,234 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit autotools db flag-o-matic multilib-minimal toolchain-funcs
-
-#Number of official patches
-#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
-PATCHNO="${PV/*.*.*_p}"
-if [[ ${PATCHNO} == "${PV}" ]] ; then
- MY_PV="${PV}"
- MY_P="${P}"
- PATCHNO=0
-else
- MY_PV="${PV/_p${PATCHNO}}"
- MY_P="${PN}-${MY_PV}"
-fi
-
-RESTRICT="!test? ( test )"
-
-S_BASE="${WORKDIR}/${MY_P}"
-S="${S_BASE}/build_unix"
-DESCRIPTION="Oracle Berkeley DB"
-HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
-for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
- SRC_URI+=" http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
-done
-
-LICENSE="AGPL-3"
-SLOT="$(ver_cut 1-2)"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="doc cxx tcl test"
-
-REQUIRED_USE="test? ( tcl )"
-
-# the entire testsuite needs the TCL functionality
-DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-# Need binutils for tc-ld-force-bfd
-BDEPEND="sys-devel/binutils:*"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/db${SLOT}/db.h
-)
-
-PATCHES=(
- # sqlite configure call has an extra leading ..
- # upstreamed:5.2.36, missing in 5.3.x/6.x
- # still needs to be patched in 6.0.20
- "${FILESDIR}"/${PN}-6.0.35-sqlite-configure-path.patch
-
- # The upstream testsuite copies .lib and the binaries for each parallel test
- # core, ~300MB each. This patch uses links instead, saves a lot of space.
- "${FILESDIR}"/${PN}-6.0.20-test-link.patch
-)
-
-src_prepare() {
- cd "${S_BASE}" || die
- for (( i=1 ; i<=${PATCHNO} ; i++ ))
- do
- eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
- done
-
- default
-
- # Upstream release script grabs the dates when the script was run, so lets
- # end-run them to keep the date the same.
- export REAL_DB_RELEASE_DATE="$(awk \
- '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
- "${S_BASE}"/dist/configure)"
- sed -r \
- -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
- -i dist/RELEASE || die
-
- cd dist || die
- rm aclocal/libtool.m4 || die
- sed \
- -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
- -i configure.ac || die
- sed \
- -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
- -i aclocal/programs.m4 || die
-
- AT_M4DIR="aclocal" eautoreconf
-
- # They do autoconf and THEN replace the version variables :(
- . ./RELEASE
- local v ev
- for v in \
- DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
- DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
- DB_VERSION \
- DB_RELEASE_DATE ; do
- ev="__EDIT_${v}__"
- sed -e "s/${ev}/${!v}/g" -i configure || die
- done
-
- # This is a false positive skip in the tests as the test-reviewer code
- # looks for 'Skipping\s'
- sed \
- -e '/db_repsite/s,Skipping:,Skipping,g' \
- -i "${S_BASE}"/test/tcl/reputils.tcl || die
-}
-
-src_configure() {
- # bug #943726
- append-cflags -std=gnu17
- # Force bfd before calling multilib_toolchain_setup
- tc-ld-force-bfd #470634 #729510
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- --enable-compat185
- --enable-dbm
- --enable-o_direct
- --without-uniquename
- --disable-sql
- --disable-sql_codegen
- --disable-sql_compat
- --disable-static
- --disable-java
- $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
- $(use_enable cxx)
- $(use_enable cxx stl)
- $(use_enable test)
- )
-
- # compilation with -O0 fails on amd64, see bug #171231
- if [[ ${ABI} == amd64 ]]; then
- local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
- replace-flags -O0 -O2
- is-flagq -O[s123] || append-flags -O2
- fi
-
- # Add linker versions to the symbols. Easier to do, and safer than header file
- # mumbo jumbo.
- append-ldflags -Wl,--default-symver
-
- # Bug #270851: test needs TCL support
- if use tcl || use test ; then
- myconf+=(
- --enable-tcl
- --with-tcl="${EPREFIX}/usr/$(get_libdir)"
- )
- else
- myconf+=(--disable-tcl )
- fi
-
- # sql_compat will cause a collision with sqlite3
- # --enable-sql_compat
- # Don't --enable-sql* because we don't want to use bundled sqlite.
- # See Gentoo bug #605688
- ECONF_SOURCE="${S_BASE}"/dist \
- STRIP="true" \
- econf "${myconf[@]}"
-
- # The embedded assembly on ARM does not work on newer hardware
- # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
- # Specifically, it uses the SWPB op, which was deprecated:
- # http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
- # The op ALSO cannot be used in ARM-Thumb mode.
- # Trust the compiler instead.
- # >=db-6.1 uses LDREX instead.
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- db_src_install_headerslot
-
- db_src_install_usrlibcleanup
-}
-
-multilib_src_install_all() {
- db_src_install_usrbinslot
-
- db_src_install_doc
-
- dodir /usr/sbin
- # This file is not always built, and no longer exists as of db-4.8
- if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
- mv "${ED}"/usr/bin/berkeley_db_svc \
- "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
- fi
-
- # no static libraries
- find "${ED}" -name '*.la' -delete || die
-}
-
-pkg_postinst() {
- multilib_foreach_abi db_fix_so
-}
-
-pkg_postrm() {
- multilib_foreach_abi db_fix_so
-}
-
-src_test() {
- # db_repsite is impossible to build, as upstream strips those sources.
- # db_repsite is used directly in the setup_site_prog,
- # setup_site_prog is called from open_site_prog
- # which is called only from tests in the multi_repmgr group.
- #sed -r \
- # -e '/set subs/s,multi_repmgr,,g' \
- # -i "${S_BASE}/test/testparams.tcl"
- sed -r \
- -e '/multi_repmgr/d' \
- -i "${S_BASE}/test/tcl/test.tcl" || die
-
- # This is the only failure in 5.2.28 so far, and looks like a false positive.
- # Repmgr018 (btree): Test of repmgr stats.
- # Repmgr018.a: Start a master.
- # Repmgr018.b: Start a client.
- # Repmgr018.c: Run some transactions at master.
- # Rep_test: btree 20 key/data pairs starting at 0
- # Rep_test.a: put/get loop
- # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
- sed -r \
- -e '/set parms.*repmgr018/d' \
- -e 's/repmgr018//g' \
- -i "${S_BASE}/test/tcl/test.tcl" || die
-
- multilib-minimal_src_test
-}
-
-multilib_src_test() {
- multilib_is_native_abi || return
-
- S="${BUILD_DIR}" db_src_test
-}
diff --git a/sys-libs/db/db-6.0.35-r5.ebuild b/sys-libs/db/db-6.0.35-r5.ebuild
deleted file mode 100644
index f5bd5de792d0..000000000000
--- a/sys-libs/db/db-6.0.35-r5.ebuild
+++ /dev/null
@@ -1,236 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit autotools db flag-o-matic multilib-minimal toolchain-funcs
-
-#Number of official patches
-#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
-PATCHNO="${PV/*.*.*_p}"
-if [[ ${PATCHNO} == "${PV}" ]] ; then
- MY_PV="${PV}"
- MY_P="${P}"
- PATCHNO=0
-else
- MY_PV="${PV/_p${PATCHNO}}"
- MY_P="${PN}-${MY_PV}"
-fi
-
-RESTRICT="!test? ( test )"
-
-S_BASE="${WORKDIR}/${MY_P}"
-S="${S_BASE}/build_unix"
-DESCRIPTION="Oracle Berkeley DB"
-HOMEPAGE="https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-SRC_URI="https://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
-for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
- SRC_URI+=" https://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
-done
-
-LICENSE="AGPL-3"
-SLOT="$(ver_cut 1-2)"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="doc cxx tcl test"
-
-REQUIRED_USE="test? ( tcl )"
-
-# the entire testsuite needs the TCL functionality
-DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
-# Need binutils for tc-ld-force-bfd
-BDEPEND="sys-devel/binutils:*"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/db${SLOT}/db.h
-)
-
-PATCHES=(
- # sqlite configure call has an extra leading ..
- # upstreamed:5.2.36, missing in 5.3.x/6.x
- # still needs to be patched in 6.0.20
- "${FILESDIR}"/${PN}-6.0.35-sqlite-configure-path.patch
-
- # The upstream testsuite copies .lib and the binaries for each parallel test
- # core, ~300MB each. This patch uses links instead, saves a lot of space.
- "${FILESDIR}"/${PN}-6.0.20-test-link.patch
-
- "${FILESDIR}"/${PN}-4.8.30-tls-configure.patch
-)
-
-src_prepare() {
- cd "${S_BASE}" || die
- for (( i=1 ; i<=${PATCHNO} ; i++ ))
- do
- eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
- done
-
- default
-
- # Upstream release script grabs the dates when the script was run, so lets
- # end-run them to keep the date the same.
- export REAL_DB_RELEASE_DATE="$(awk \
- '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
- "${S_BASE}"/dist/configure)"
- sed -r \
- -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
- -i dist/RELEASE || die
-
- cd dist || die
- rm aclocal/libtool.m4 || die
- sed \
- -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
- -i configure.ac || die
- sed \
- -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
- -i aclocal/programs.m4 || die
-
- AT_M4DIR="aclocal" eautoreconf
-
- # They do autoconf and THEN replace the version variables :(
- . ./RELEASE
- local v ev
- for v in \
- DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
- DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
- DB_VERSION \
- DB_RELEASE_DATE ; do
- ev="__EDIT_${v}__"
- sed -e "s/${ev}/${!v}/g" -i configure || die
- done
-
- # This is a false positive skip in the tests as the test-reviewer code
- # looks for 'Skipping\s'
- sed \
- -e '/db_repsite/s,Skipping:,Skipping,g' \
- -i "${S_BASE}"/test/tcl/reputils.tcl || die
-}
-
-src_configure() {
- # bug #943726
- append-cflags -std=gnu17
- # Force bfd before calling multilib_toolchain_setup
- tc-ld-force-bfd #470634 #729510
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- --enable-compat185
- --enable-dbm
- --enable-o_direct
- --without-uniquename
- --disable-sql
- --disable-sql_codegen
- --disable-sql_compat
- --disable-static
- --disable-java
- $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
- $(use_enable cxx)
- $(use_enable cxx stl)
- $(use_enable test)
- )
-
- # compilation with -O0 fails on amd64, see bug #171231
- if [[ ${ABI} == amd64 ]]; then
- local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
- replace-flags -O0 -O2
- is-flagq -O[s123] || append-flags -O2
- fi
-
- # Add linker versions to the symbols. Easier to do, and safer than header file
- # mumbo jumbo.
- append-ldflags -Wl,--default-symver
-
- # Bug #270851: test needs TCL support
- if use tcl || use test ; then
- myconf+=(
- --enable-tcl
- --with-tcl="${EPREFIX}/usr/$(get_libdir)"
- )
- else
- myconf+=(--disable-tcl )
- fi
-
- # sql_compat will cause a collision with sqlite3
- # --enable-sql_compat
- # Don't --enable-sql* because we don't want to use bundled sqlite.
- # See Gentoo bug #605688
- ECONF_SOURCE="${S_BASE}"/dist \
- STRIP="true" \
- econf "${myconf[@]}"
-
- # The embedded assembly on ARM does not work on newer hardware
- # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
- # Specifically, it uses the SWPB op, which was deprecated:
- # http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
- # The op ALSO cannot be used in ARM-Thumb mode.
- # Trust the compiler instead.
- # >=db-6.1 uses LDREX instead.
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- db_src_install_headerslot
-
- db_src_install_usrlibcleanup
-}
-
-multilib_src_install_all() {
- db_src_install_usrbinslot
-
- db_src_install_doc
-
- dodir /usr/sbin
- # This file is not always built, and no longer exists as of db-4.8
- if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
- mv "${ED}"/usr/bin/berkeley_db_svc \
- "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
- fi
-
- # no static libraries
- find "${ED}" -name '*.la' -delete || die
-}
-
-pkg_postinst() {
- multilib_foreach_abi db_fix_so
-}
-
-pkg_postrm() {
- multilib_foreach_abi db_fix_so
-}
-
-src_test() {
- # db_repsite is impossible to build, as upstream strips those sources.
- # db_repsite is used directly in the setup_site_prog,
- # setup_site_prog is called from open_site_prog
- # which is called only from tests in the multi_repmgr group.
- #sed -r \
- # -e '/set subs/s,multi_repmgr,,g' \
- # -i "${S_BASE}/test/testparams.tcl"
- sed -r \
- -e '/multi_repmgr/d' \
- -i "${S_BASE}/test/tcl/test.tcl" || die
-
- # This is the only failure in 5.2.28 so far, and looks like a false positive.
- # Repmgr018 (btree): Test of repmgr stats.
- # Repmgr018.a: Start a master.
- # Repmgr018.b: Start a client.
- # Repmgr018.c: Run some transactions at master.
- # Rep_test: btree 20 key/data pairs starting at 0
- # Rep_test.a: put/get loop
- # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
- sed -r \
- -e '/set parms.*repmgr018/d' \
- -e 's/repmgr018//g' \
- -i "${S_BASE}/test/tcl/test.tcl" || die
-
- multilib-minimal_src_test
-}
-
-multilib_src_test() {
- multilib_is_native_abi || return
-
- S="${BUILD_DIR}" db_src_test
-}
diff --git a/sys-libs/db/files/db-4.8-libtool.patch b/sys-libs/db/files/db-4.8-libtool.patch
deleted file mode 100644
index 0c3dbffb03cc..000000000000
--- a/sys-libs/db/files/db-4.8-libtool.patch
+++ /dev/null
@@ -1,65 +0,0 @@
---- a/dist/configure
-+++ b/dist/configure
-@@ -6691,7 +6691,7 @@
- $as_echo_n "(cached) " >&6
- else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
--case `$LD -v 2>&1 </dev/null` in
-+case `"$LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-@@ -7348,7 +7348,7 @@
- ;;
-
- irix5* | irix6* | nonstopux*)
-- case $LD in
-+ case "$LD" in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
-@@ -10664,7 +10664,7 @@
- whole_archive_flag_spec=
- fi
- supports_anon_versioning=no
-- case `$LD -v 2>&1` in
-+ case `"$LD" -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-@@ -10858,7 +10858,7 @@
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-- case `$LD -v 2>&1` in
-+ case `"$LD" -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-@@ -12206,7 +12206,7 @@
- libsuff= shlibsuff=
- ;;
- *)
-- case $LD in # libtool.m4 will add one of these switches to LD
-+ case "$LD" in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-@@ -13423,7 +13423,7 @@
- $as_echo_n "(cached) " >&6
- else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
--case `$LD -v 2>&1 </dev/null` in
-+case `"$LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-@@ -15672,7 +15672,7 @@
- libsuff= shlibsuff=
- ;;
- *)
-- case $LD in # libtool.m4 will add one of these switches to LD
-+ case "$LD" in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
diff --git a/sys-libs/db/files/db-4.8-wformat-security.patch b/sys-libs/db/files/db-4.8-wformat-security.patch
deleted file mode 100644
index 4db5bada0d9f..000000000000
--- a/sys-libs/db/files/db-4.8-wformat-security.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-https://bugs.gentoo.org/632628
---- a/repmgr/repmgr_net.c
-+++ b/repmgr/repmgr_net.c
-@@ -1331,7 +1331,7 @@ __repmgr_listen(env)
- }
-
- ret = net_errno;
-- __db_err(env, ret, why);
-+ __db_err(env, ret, "%s", why);
- clean: if (s != INVALID_SOCKET)
- (void)closesocket(s);
- return (ret);
---- a/crypto/aes_method.c
-+++ b/crypto/aes_method.c
-@@ -267,6 +267,6 @@ __aes_err(env, err)
- errstr = "AES error unrecognized";
- break;
- }
-- __db_errx(env, errstr);
-+ __db_errx(env, "%s", errstr);
- return;
- }
---- a/txn/txn.c
-+++ b/txn/txn.c
-@@ -168,7 +168,7 @@ __txn_begin(env, ip, parent, txnpp, flag
-
- *txnpp = NULL;
- if ((ret = __os_calloc(env, 1, sizeof(DB_TXN), &txn)) != 0) {
-- __db_errx(env, TxnAlloc);
-+ __db_errx(env, "%s", TxnAlloc);
- return (ret);
- }
-
-@@ -315,7 +315,7 @@ __txn_compensate_begin(env, txnpp)
- int ret;
-
- if ((ret = __os_calloc(env, 1, sizeof(DB_TXN), &txn)) != 0) {
-- __db_errx(env, TxnAlloc);
-+ __db_errx(env, "%s", TxnAlloc);
- return (ret);
- }
-
-
diff --git a/sys-libs/db/files/db-4.8.30-clang16.patch b/sys-libs/db/files/db-4.8.30-clang16.patch
deleted file mode 100644
index b28eb145e4a8..000000000000
--- a/sys-libs/db/files/db-4.8.30-clang16.patch
+++ /dev/null
@@ -1,281 +0,0 @@
-https://bugs.gentoo.org/883413
---- a/dist/aclocal/clock.m4
-+++ b/dist/aclocal/clock.m4
-@@ -20,12 +20,14 @@ esac
- # existence to mean the clock really exists.
- AC_CACHE_CHECK([for clock_gettime monotonic clock], db_cv_clock_monotonic, [
- AC_TRY_RUN([
-+#include <time.h>
- #include <sys/time.h>
--main() {
-+int main(void) {
- struct timespec t;
- return (clock_gettime(CLOCK_MONOTONIC, &t) != 0);
- }], db_cv_clock_monotonic=yes, db_cv_clock_monotonic=no,
- AC_TRY_LINK([
-+#include <time.h>
- #include <sys/time.h>], [
- struct timespec t;
- clock_gettime(CLOCK_MONOTONIC, &t);
---- a/dist/aclocal/mutex.m4
-+++ b/dist/aclocal/mutex.m4
-@@ -3,8 +3,9 @@
- # POSIX pthreads tests: inter-process safe and intra-process only.
- AC_DEFUN(AM_PTHREADS_SHARED, [
- AC_TRY_RUN([
-+#include <stdlib.h>
- #include <pthread.h>
--main() {
-+int main(void) {
- pthread_cond_t cond;
- pthread_mutex_t mutex;
- pthread_condattr_t condattr;
-@@ -24,6 +25,7 @@ main() {
- pthread_mutexattr_destroy(&mutexattr));
- }], [db_cv_mutex="$1"],,
- AC_TRY_LINK([
-+#include <stdlib.h>
- #include <pthread.h>],[
- pthread_cond_t cond;
- pthread_mutex_t mutex;
-@@ -45,8 +47,9 @@ AC_TRY_LINK([
- ], [db_cv_mutex="$1"]))])
- AC_DEFUN(AM_PTHREADS_PRIVATE, [
- AC_TRY_RUN([
-+#include <stdlib.h>
- #include <pthread.h>
--main() {
-+int main(void) {
- pthread_cond_t cond;
- pthread_mutex_t mutex;
- pthread_condattr_t condattr;
-@@ -64,6 +67,7 @@ main() {
- pthread_mutexattr_destroy(&mutexattr));
- }], [db_cv_mutex="$1"],,
- AC_TRY_LINK([
-+#include <stdlib.h>
- #include <pthread.h>],[
- pthread_cond_t cond;
- pthread_mutex_t mutex;
-@@ -158,6 +162,7 @@ if test "$db_cv_mutex" = no; then
- # LWP threads: _lwp_XXX
- if test "$db_cv_mutex" = no; then
- AC_TRY_LINK([
-+ #include <stdlib.h>
- #include <synch.h>],[
- static lwp_mutex_t mi = SHAREDMUTEX;
- static lwp_cond_t ci = SHAREDCV;
-@@ -174,6 +179,7 @@ if test "$db_cv_mutex" = no; then
- LIBS="$LIBS -lthread"
- AC_TRY_LINK([
- #include <thread.h>
-+ #include <stdlib.h>
- #include <synch.h>],[
- mutex_t mutex;
- cond_t cond;
-@@ -189,6 +195,7 @@ if test "$db_cv_mutex" = no; then
- if test "$db_cv_mutex" = no -o "$db_cv_mutex" = ui_only; then
- AC_TRY_LINK([
- #include <thread.h>
-+ #include <stdlib.h>
- #include <synch.h>],[
- mutex_t mutex;
- cond_t cond;
-@@ -213,7 +220,7 @@ if test "$db_cv_mutex" = no; then
- # x86/gcc: FreeBSD, NetBSD, BSD/OS, Linux
- AC_TRY_COMPILE(,[
- #if (defined(i386) || defined(__i386__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -222,7 +229,7 @@ if test "$db_cv_mutex" = no; then
- # x86_64/gcc: FreeBSD, NetBSD, BSD/OS, Linux
- AC_TRY_COMPILE(,[
- #if (defined(x86_64) || defined(__x86_64__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -245,7 +252,7 @@ if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__sparc__) && defined(__GNUC__)
- asm volatile ("membar #StoreStore|#StoreLoad|#LoadStore");
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -287,7 +294,7 @@ AC_TRY_LINK([
- msem_init(&x, 0);
- msem_lock(&x, 0);
- msem_unlock(&x, 0);
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -304,7 +311,7 @@ AC_TRY_LINK([
- msem_init(&x, 0);
- msem_lock(&x, 0);
- msem_unlock(&x, 0);
-- exit(0);
-+ return 0;
- ], [db_cv_mutex=UNIX/msem_init])
- fi
-
-@@ -326,7 +333,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__USLC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -383,7 +390,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__alpha) && defined(__DECC)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -394,7 +401,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__alpha) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -405,7 +412,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__arm__) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -416,7 +423,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if (defined(__mips) || defined(__mips__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -427,7 +434,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if (defined(__hppa) || defined(__hppa__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -438,7 +445,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if (defined(__powerpc__) || defined(__ppc__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -449,7 +456,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if (defined(mc68020) || defined(sun3)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -460,7 +467,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__MVS__) && defined(__IBMC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -471,7 +478,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__s390__) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -482,7 +489,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__ia64) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -493,7 +500,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(_UTS)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -814,9 +821,9 @@ fi
- if test "$db_cv_atomic" = no; then
- AC_TRY_COMPILE(,[
- #if ((defined(i386) || defined(__i386__)) && defined(__GNUC__))
-- exit(0);
-+ return 0;
- #elif ((defined(x86_64) || defined(__x86_64__)) && defined(__GNUC__))
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -825,6 +832,7 @@ fi
-
- if test "$db_cv_atomic" = no; then
- AC_TRY_LINK([
-+#include <stdlib.h>
- #include <sys/atomic.h>],[
- volatile unsigned val = 1;
- exit (atomic_inc_uint_nv(&val) != 2 ||
---- a/dist/aclocal/sequence.m4
-+++ b/dist/aclocal/sequence.m4
-@@ -43,7 +43,9 @@ AC_DEFUN(AM_SEQUENCE_CONFIGURE, [
- # test, which won't test for the appropriate printf format strings.
- if test "$db_cv_build_sequence" = "yes"; then
- AC_TRY_RUN([
-- main() {
-+ #include <stdio.h>
-+ #include <string.h>
-+ int main(void) {
- $db_cv_seq_type l;
- unsigned $db_cv_seq_type u;
- char buf@<:@100@:>@;
-@@ -59,7 +61,10 @@ AC_DEFUN(AM_SEQUENCE_CONFIGURE, [
- return (1);
- return (0);
- }],, [db_cv_build_sequence="no"],
-- AC_TRY_LINK(,[
-+ AC_TRY_LINK([
-+ #include <stdio.h>
-+ #include <string.h>
-+ ],[
- $db_cv_seq_type l;
- unsigned $db_cv_seq_type u;
- char buf@<:@100@:>@;
diff --git a/sys-libs/db/files/db-4.8.30-rename-atomic-compare-exchange.patch b/sys-libs/db/files/db-4.8.30-rename-atomic-compare-exchange.patch
deleted file mode 100644
index 99a26e15fbfb..000000000000
--- a/sys-libs/db/files/db-4.8.30-rename-atomic-compare-exchange.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/dbinc/atomic.h
-+++ b/dbinc/atomic.h
-@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
- #define atomic_inc(env, p) __atomic_inc(p)
- #define atomic_dec(env, p) __atomic_dec(p)
- #define atomic_compare_exchange(env, p, o, n) \
-- __atomic_compare_exchange((p), (o), (n))
-+ __db_atomic_compare_exchange((p), (o), (n))
- static inline int __atomic_inc(db_atomic_t *p)
- {
- int temp;
-@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
- * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
- * which configure could be changed to use.
- */
--static inline int __atomic_compare_exchange(
-+static inline int __db_atomic_compare_exchange(
- db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
- {
- atomic_value_t was;
diff --git a/sys-libs/db/files/db-4.8.30-tls-configure.patch b/sys-libs/db/files/db-4.8.30-tls-configure.patch
deleted file mode 100644
index e6aaa3259e19..000000000000
--- a/sys-libs/db/files/db-4.8.30-tls-configure.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://bugs.gentoo.org/898074
-https://bugs.gentoo.org/918936
-
--ignoreme: warning: incompatible pointer to integer conversion passing 'pthread_key_t *' (aka 'unsigned int *') to parameter of type 'pthread_key_t' (aka 'unsigned int'); remove & [-Wint-conversion]
-+ignoreme: error: incompatible pointer to integer conversion passing 'pthread_key_t *' (aka 'unsigned int *') to parameter of type 'pthread_key_t' (aka 'unsigned int'); remove & [-Wint-conversion]
- 34 | return (void *)pthread_getspecific(&key);
- | ^~~~
- /usr/include/pthread.h:1305:49: note: passing argument to parameter '__key' here
- 1305 | extern void *pthread_getspecific (pthread_key_t __key) __THROW;
- | ^
--ignoreme: warning: incompatible pointer to integer conversion passing 'pthread_key_t *' (aka 'unsigned int *') to parameter of type 'pthread_key_t' (aka 'unsigned int'); remove & [-Wint-conversion]
-+ignoreme: error: incompatible pointer to integer conversion passing 'pthread_key_t *' (aka 'unsigned int *') to parameter of type 'pthread_key_t' (aka 'unsigned int'); remove & [-Wint-conversion]
- 37 | pthread_setspecific(&key, p);
- | ^~~~
- /usr/include/pthread.h:1308:47: note: passing argument to parameter '__key' here
- 1308 | extern int pthread_setspecific (pthread_key_t __key,
---- a/dist/aclocal/tls.m4
-+++ b/dist/aclocal/tls.m4
-@@ -42,10 +42,10 @@ AC_DEFUN([AX_TLS], [
- pthread_key_create(&key, NULL);
- }
- static void *get_tls() {
-- return (void *)pthread_getspecific(&key);
-+ return (void *)pthread_getspecific(key);
- }
- static void set_tls(void *p) {
-- pthread_setspecific(&key, p);
-+ pthread_setspecific(key, p);
- }], [],
- [ac_cv_tls=pthread])
- fi
diff --git a/sys-libs/db/files/db-5.1.29-rename-atomic-compare-exchange.patch b/sys-libs/db/files/db-5.1.29-rename-atomic-compare-exchange.patch
deleted file mode 100644
index 252a6213b30f..000000000000
--- a/sys-libs/db/files/db-5.1.29-rename-atomic-compare-exchange.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/src/dbinc/atomic.h
-+++ b/src/dbinc/atomic.h
-@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
- #define atomic_inc(env, p) __atomic_inc(p)
- #define atomic_dec(env, p) __atomic_dec(p)
- #define atomic_compare_exchange(env, p, o, n) \
-- __atomic_compare_exchange((p), (o), (n))
-+ __db_atomic_compare_exchange((p), (o), (n))
- static inline int __atomic_inc(db_atomic_t *p)
- {
- int temp;
-@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
- * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
- * which configure could be changed to use.
- */
--static inline int __atomic_compare_exchange(
-+static inline int __db_atomic_compare_exchange(
- db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
- {
- atomic_value_t was;
diff --git a/sys-libs/db/files/db-5.2.28-sqlite-configure-path.patch b/sys-libs/db/files/db-5.2.28-sqlite-configure-path.patch
deleted file mode 100644
index cfbe2a7ffd01..000000000000
--- a/sys-libs/db/files/db-5.2.28-sqlite-configure-path.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/dist/aclocal/sql.m4
-+++ b/dist/aclocal/sql.m4
-@@ -91,7 +91,7 @@
- # !!! END COPIED from autoconf distribution
-
- sqlite_dir=$srcdir/../lang/sql/sqlite
--(cd sql && eval "\$SHELL ../$sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline" && cat build_config.h >> config.h) || exit 1
-+(cd sql && eval "\$SHELL $sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline" && cat build_config.h >> config.h) || exit 1
-
- # Configure JDBC if --enable-jdbc
- if test "$db_cv_jdbc" != "no"; then
diff --git a/sys-libs/db/files/db-5.3.28-clang16.patch b/sys-libs/db/files/db-5.3.28-clang16.patch
deleted file mode 100644
index aab73d87a06b..000000000000
--- a/sys-libs/db/files/db-5.3.28-clang16.patch
+++ /dev/null
@@ -1,325 +0,0 @@
-https://bugs.gentoo.org/883413
---- a/dist/aclocal/clock.m4
-+++ b/dist/aclocal/clock.m4
-@@ -20,12 +20,14 @@ esac
- # existence to mean the clock really exists.
- AC_CACHE_CHECK([for clock_gettime monotonic clock], db_cv_clock_monotonic, [
- AC_TRY_RUN([
-+#include <time.h>
- #include <sys/time.h>
--main() {
-+int main(void) {
- struct timespec t;
- return (clock_gettime(CLOCK_MONOTONIC, &t) != 0);
- }], db_cv_clock_monotonic=yes, db_cv_clock_monotonic=no,
- AC_TRY_LINK([
-+#include <time.h>
- #include <sys/time.h>], [
- struct timespec t;
- clock_gettime(CLOCK_MONOTONIC, &t);
---- a/dist/aclocal/mmap.m4
-+++ b/dist/aclocal/mmap.m4
-@@ -29,6 +29,7 @@ if test "$mmap_ok" = "yes" ; then
- * system to system.
- */
- #include <stdio.h>
-+ #include <stdlib.h>
- #include <string.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-@@ -42,13 +43,12 @@ if test "$mmap_ok" = "yes" ; then
- #define MAP_FAILED (-1)
- #endif
-
-- int catch_sig(sig)
-- int sig;
-+ void catch_sig(int sig)
- {
- exit(1);
- }
-
-- main() {
-+ int main(void) {
- const char *underlying;
- unsigned gapsize;
- char *base;
---- a/dist/aclocal/mutex.m4
-+++ b/dist/aclocal/mutex.m4
-@@ -5,7 +5,7 @@ AC_DEFUN(AM_PTHREADS_SHARED, [
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <pthread.h>
--main() {
-+int main(void) {
- pthread_cond_t cond;
- pthread_mutex_t mutex;
- pthread_condattr_t condattr;
-@@ -49,7 +49,7 @@ AC_DEFUN(AM_PTHREADS_PRIVATE, [
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <pthread.h>
--main() {
-+int main(void) {
- pthread_cond_t cond;
- pthread_mutex_t mutex;
- pthread_condattr_t condattr;
-@@ -89,7 +89,7 @@ AC_DEFUN(AM_PTHREADS_CONDVAR_DUPINITCHK, [
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <pthread.h>
--main() {
-+int main(void) {
- pthread_cond_t cond;
- pthread_condattr_t condattr;
- exit(pthread_condattr_init(&condattr) ||
-@@ -110,7 +110,7 @@ AC_DEFUN(AM_PTHREADS_RWLOCKVAR_DUPINITCHK, [
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <pthread.h>
--main() {
-+int main(void) {
- pthread_rwlock_t rwlock;
- pthread_rwlockattr_t rwlockattr;
- exit(pthread_rwlockattr_init(&rwlockattr) ||
-@@ -227,6 +227,7 @@ if test "$db_cv_mutex" = no; then
- # LWP threads: _lwp_XXX
- if test "$db_cv_mutex" = no; then
- AC_TRY_LINK([
-+ #include <stdlib.h>
- #include <synch.h>],[
- static lwp_mutex_t mi = SHAREDMUTEX;
- static lwp_cond_t ci = SHAREDCV;
-@@ -243,6 +244,7 @@ if test "$db_cv_mutex" = no; then
- LIBS="$LIBS -lthread"
- AC_TRY_LINK([
- #include <thread.h>
-+ #include <stdlib.h>
- #include <synch.h>],[
- mutex_t mutex;
- cond_t cond;
-@@ -258,6 +260,7 @@ if test "$db_cv_mutex" = no; then
- if test "$db_cv_mutex" = no -o "$db_cv_mutex" = ui_only; then
- AC_TRY_LINK([
- #include <thread.h>
-+ #include <stdlib.h>
- #include <synch.h>],[
- mutex_t mutex;
- cond_t cond;
-@@ -282,7 +285,7 @@ if test "$db_cv_mutex" = no; then
- # x86/gcc: FreeBSD, NetBSD, BSD/OS, Linux
- AC_TRY_COMPILE(,[
- #if (defined(i386) || defined(__i386__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -291,7 +294,7 @@ if test "$db_cv_mutex" = no; then
- # x86_64/gcc: FreeBSD, NetBSD, BSD/OS, Linux
- AC_TRY_COMPILE(,[
- #if (defined(x86_64) || defined(__x86_64__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -314,7 +317,7 @@ if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__sparc__) && defined(__GNUC__)
- asm volatile ("membar #StoreStore|#StoreLoad|#LoadStore");
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -356,7 +359,7 @@ AC_TRY_LINK([
- msem_init(&x, 0);
- msem_lock(&x, 0);
- msem_unlock(&x, 0);
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -373,7 +376,7 @@ AC_TRY_LINK([
- msem_init(&x, 0);
- msem_lock(&x, 0);
- msem_unlock(&x, 0);
-- exit(0);
-+ return 0;
- ], [db_cv_mutex=UNIX/msem_init])
- fi
-
-@@ -395,7 +398,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__USLC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -452,7 +455,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__alpha) && defined(__DECC)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -463,7 +466,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__alpha) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -474,7 +477,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__arm__) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -485,7 +488,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if (defined(__mips) || defined(__mips__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -496,7 +499,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if (defined(__hppa) || defined(__hppa__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -507,7 +510,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if (defined(__powerpc__) || defined(__ppc__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -518,7 +521,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if (defined(mc68020) || defined(sun3)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -529,7 +532,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__MVS__) && defined(__IBMC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -540,7 +543,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__s390__) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -551,7 +554,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__ia64) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -562,7 +565,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(_UTS)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -910,9 +913,9 @@ fi
- if test "$db_cv_atomic" = no; then
- AC_TRY_COMPILE(,[
- #if ((defined(i386) || defined(__i386__)) && defined(__GNUC__))
-- exit(0);
-+ return 0;
- #elif ((defined(x86_64) || defined(__x86_64__)) && defined(__GNUC__))
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -921,6 +924,7 @@ fi
-
- if test "$db_cv_atomic" = no; then
- AC_TRY_LINK([
-+#include <stdlib.h>
- #include <sys/atomic.h>],[
- volatile unsigned val = 1;
- exit (atomic_inc_uint_nv(&val) != 2 ||
---- a/dist/aclocal/sequence.m4
-+++ b/dist/aclocal/sequence.m4
-@@ -43,7 +43,9 @@ AC_DEFUN(AM_SEQUENCE_CONFIGURE, [
- # test, which won't test for the appropriate printf format strings.
- if test "$db_cv_build_sequence" = "yes"; then
- AC_TRY_RUN([
-- main() {
-+ #include <stdio.h>
-+ #include <string.h>
-+ int main(void) {
- $db_cv_seq_type l;
- unsigned $db_cv_seq_type u;
- char buf@<:@100@:>@;
-@@ -59,7 +61,10 @@ AC_DEFUN(AM_SEQUENCE_CONFIGURE, [
- return (1);
- return (0);
- }],, [db_cv_build_sequence="no"],
-- AC_TRY_LINK(,[
-+ AC_TRY_LINK([
-+ #include <stdio.h>
-+ #include <string.h>
-+ ],[
- $db_cv_seq_type l;
- unsigned $db_cv_seq_type u;
- char buf@<:@100@:>@;
---- a/dist/aclocal/types.m4
-+++ b/dist/aclocal/types.m4
-@@ -69,7 +69,7 @@ AC_SUBST(stdint_h_decl)
- AC_MSG_CHECKING(for stdint.h)
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- #include <stdint.h>
-- int main() {
-+ int main(void) {
- uint_least8_t x=0;
- return x;
- }])],[AC_MSG_RESULT(yes)
-@@ -77,7 +77,7 @@ if test "$db_cv_cxx" = "yes"; then
- AC_MSG_CHECKING([if stdint.h can be used by C++])
- AC_LANG_PUSH(C++)
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <stdint.h>
-- int main() {
-+ int main(void) {
- uint_least8_t x=0;
- return x;
- }])],[AC_MSG_RESULT(yes)
diff --git a/sys-libs/db/files/db-5.3.28-modern-c.patch b/sys-libs/db/files/db-5.3.28-modern-c.patch
deleted file mode 100644
index 8c1755fe497f..000000000000
--- a/sys-libs/db/files/db-5.3.28-modern-c.patch
+++ /dev/null
@@ -1,328 +0,0 @@
-https://bugs.gentoo.org/883413
---- a/dist/aclocal/clock.m4
-+++ b/dist/aclocal/clock.m4
-@@ -20,12 +20,14 @@ esac
- # existence to mean the clock really exists.
- AC_CACHE_CHECK([for clock_gettime monotonic clock], db_cv_clock_monotonic, [
- AC_TRY_RUN([
-+#include <time.h>
- #include <sys/time.h>
--main() {
-+int main(void) {
- struct timespec t;
- return (clock_gettime(CLOCK_MONOTONIC, &t) != 0);
- }], db_cv_clock_monotonic=yes, db_cv_clock_monotonic=no,
- AC_TRY_LINK([
-+#include <time.h>
- #include <sys/time.h>], [
- struct timespec t;
- clock_gettime(CLOCK_MONOTONIC, &t);
---- a/dist/aclocal/mmap.m4
-+++ b/dist/aclocal/mmap.m4
-@@ -28,8 +28,10 @@ if test "$mmap_ok" = "yes" ; then
- /* Not all these includes are needed, but the minimal set varies from
- * system to system.
- */
-+ #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
-+ #include <unistd.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
-@@ -42,13 +44,12 @@ if test "$mmap_ok" = "yes" ; then
- #define MAP_FAILED (-1)
- #endif
-
-- int catch_sig(sig)
-- int sig;
-+ void catch_sig(int sig)
- {
- exit(1);
- }
-
-- main() {
-+ int main(void) {
- const char *underlying;
- unsigned gapsize;
- char *base;
---- a/dist/aclocal/mutex.m4
-+++ b/dist/aclocal/mutex.m4
-@@ -5,7 +5,7 @@ AC_DEFUN(AM_PTHREADS_SHARED, [
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <pthread.h>
--main() {
-+int main(void) {
- pthread_cond_t cond;
- pthread_mutex_t mutex;
- pthread_condattr_t condattr;
-@@ -49,7 +49,7 @@ AC_DEFUN(AM_PTHREADS_PRIVATE, [
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <pthread.h>
--main() {
-+int main(void) {
- pthread_cond_t cond;
- pthread_mutex_t mutex;
- pthread_condattr_t condattr;
-@@ -89,7 +89,7 @@ AC_DEFUN(AM_PTHREADS_CONDVAR_DUPINITCHK, [
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <pthread.h>
--main() {
-+int main(void) {
- pthread_cond_t cond;
- pthread_condattr_t condattr;
- exit(pthread_condattr_init(&condattr) ||
-@@ -110,7 +110,7 @@ AC_DEFUN(AM_PTHREADS_RWLOCKVAR_DUPINITCHK, [
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <pthread.h>
--main() {
-+int main(void) {
- pthread_rwlock_t rwlock;
- pthread_rwlockattr_t rwlockattr;
- exit(pthread_rwlockattr_init(&rwlockattr) ||
-@@ -227,6 +227,7 @@ if test "$db_cv_mutex" = no; then
- # LWP threads: _lwp_XXX
- if test "$db_cv_mutex" = no; then
- AC_TRY_LINK([
-+ #include <stdlib.h>
- #include <synch.h>],[
- static lwp_mutex_t mi = SHAREDMUTEX;
- static lwp_cond_t ci = SHAREDCV;
-@@ -243,6 +244,7 @@ if test "$db_cv_mutex" = no; then
- LIBS="$LIBS -lthread"
- AC_TRY_LINK([
- #include <thread.h>
-+ #include <stdlib.h>
- #include <synch.h>],[
- mutex_t mutex;
- cond_t cond;
-@@ -258,6 +260,7 @@ if test "$db_cv_mutex" = no; then
- if test "$db_cv_mutex" = no -o "$db_cv_mutex" = ui_only; then
- AC_TRY_LINK([
- #include <thread.h>
-+ #include <stdlib.h>
- #include <synch.h>],[
- mutex_t mutex;
- cond_t cond;
-@@ -282,7 +285,7 @@ if test "$db_cv_mutex" = no; then
- # x86/gcc: FreeBSD, NetBSD, BSD/OS, Linux
- AC_TRY_COMPILE(,[
- #if (defined(i386) || defined(__i386__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -291,7 +294,7 @@ if test "$db_cv_mutex" = no; then
- # x86_64/gcc: FreeBSD, NetBSD, BSD/OS, Linux
- AC_TRY_COMPILE(,[
- #if (defined(x86_64) || defined(__x86_64__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -314,7 +317,7 @@ if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__sparc__) && defined(__GNUC__)
- asm volatile ("membar #StoreStore|#StoreLoad|#LoadStore");
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -356,7 +359,7 @@ AC_TRY_LINK([
- msem_init(&x, 0);
- msem_lock(&x, 0);
- msem_unlock(&x, 0);
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -373,7 +376,7 @@ AC_TRY_LINK([
- msem_init(&x, 0);
- msem_lock(&x, 0);
- msem_unlock(&x, 0);
-- exit(0);
-+ return 0;
- ], [db_cv_mutex=UNIX/msem_init])
- fi
-
-@@ -395,7 +398,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__USLC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -452,7 +455,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__alpha) && defined(__DECC)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -463,7 +466,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__alpha) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -474,7 +477,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__arm__) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -485,7 +488,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if (defined(__mips) || defined(__mips__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -496,7 +499,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if (defined(__hppa) || defined(__hppa__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -507,7 +510,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if (defined(__powerpc__) || defined(__ppc__)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -518,7 +521,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if (defined(mc68020) || defined(sun3)) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -529,7 +532,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__MVS__) && defined(__IBMC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -540,7 +543,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__s390__) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -551,7 +554,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(__ia64) && defined(__GNUC__)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -562,7 +565,7 @@ fi
- if test "$db_cv_mutex" = no; then
- AC_TRY_COMPILE(,[
- #if defined(_UTS)
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -910,9 +913,9 @@ fi
- if test "$db_cv_atomic" = no; then
- AC_TRY_COMPILE(,[
- #if ((defined(i386) || defined(__i386__)) && defined(__GNUC__))
-- exit(0);
-+ return 0;
- #elif ((defined(x86_64) || defined(__x86_64__)) && defined(__GNUC__))
-- exit(0);
-+ return 0;
- #else
- FAIL TO COMPILE/LINK
- #endif
-@@ -921,6 +924,7 @@ fi
-
- if test "$db_cv_atomic" = no; then
- AC_TRY_LINK([
-+#include <stdlib.h>
- #include <sys/atomic.h>],[
- volatile unsigned val = 1;
- exit (atomic_inc_uint_nv(&val) != 2 ||
---- a/dist/aclocal/sequence.m4
-+++ b/dist/aclocal/sequence.m4
-@@ -43,7 +43,9 @@ AC_DEFUN(AM_SEQUENCE_CONFIGURE, [
- # test, which won't test for the appropriate printf format strings.
- if test "$db_cv_build_sequence" = "yes"; then
- AC_TRY_RUN([
-- main() {
-+ #include <stdio.h>
-+ #include <string.h>
-+ int main(void) {
- $db_cv_seq_type l;
- unsigned $db_cv_seq_type u;
- char buf@<:@100@:>@;
-@@ -59,7 +61,10 @@ AC_DEFUN(AM_SEQUENCE_CONFIGURE, [
- return (1);
- return (0);
- }],, [db_cv_build_sequence="no"],
-- AC_TRY_LINK(,[
-+ AC_TRY_LINK([
-+ #include <stdio.h>
-+ #include <string.h>
-+ ],[
- $db_cv_seq_type l;
- unsigned $db_cv_seq_type u;
- char buf@<:@100@:>@;
---- a/dist/aclocal/types.m4
-+++ b/dist/aclocal/types.m4
-@@ -69,7 +69,7 @@ AC_SUBST(stdint_h_decl)
- AC_MSG_CHECKING(for stdint.h)
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- #include <stdint.h>
-- int main() {
-+ int main(void) {
- uint_least8_t x=0;
- return x;
- }])],[AC_MSG_RESULT(yes)
-@@ -77,7 +77,7 @@ if test "$db_cv_cxx" = "yes"; then
- AC_MSG_CHECKING([if stdint.h can be used by C++])
- AC_LANG_PUSH(C++)
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <stdint.h>
-- int main() {
-+ int main(void) {
- uint_least8_t x=0;
- return x;
- }])],[AC_MSG_RESULT(yes)
diff --git a/sys-libs/db/files/db-6.0.20-test-link.patch b/sys-libs/db/files/db-6.0.20-test-link.patch
deleted file mode 100644
index 5fc6669465c6..000000000000
--- a/sys-libs/db/files/db-6.0.20-test-link.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/test/tcl/parallel.tcl
-+++ b/test/tcl/parallel.tcl
-@@ -289,16 +289,26 @@
- [eval glob -nocomplain {$dir/$buildpath/db_{reptest,repsite,replicate}$EXE}] \
- $destdir/$buildpath}
- }
-+ catch {
-+ set l [eval glob {$dir/.libs} {$dir/db_{checkpoint,deadlock}$EXE} \
-+ {$dir/db_{dump,load,printlog,recover,stat,upgrade}$EXE} \
-+ {$dir/db_{archive,verify,hotbackup,log_verify}$EXE}]
-+ foreach fn $l {
-+ set fbasename [file tail $fn]
-+ eval file link {$destdir/$fbasename} $fn
-+ }
-+ }
-+ # we will be modifying this file, so we must copy, not link
- catch {eval file copy \
-- [eval glob {$dir/{.libs,include.tcl}}] $destdir}
-+ [eval glob {$dir/include.tcl}] $destdir}
- # catch {eval file copy $dir/$queuedir $destdir}
-- catch {eval file copy \
-- [eval glob {$dir/db_{checkpoint,deadlock}$EXE} \
-- {$dir/db_{dump,load,printlog,recover,stat,upgrade}$EXE} \
-- {$dir/db_{archive,verify,hotbackup,log_verify}$EXE}] \
-- $destdir}
-- catch {eval file copy \
-- [eval glob -nocomplain {$dir/db_{reptest,repsite,replicate}$EXE}] $destdir}
-+ catch {
-+ set l [eval glob -nocomplain {$dir/db_{reptest,repsite,replicate}$EXE}]
-+ foreach fn $l {
-+ set fbasename [file tail $fn]
-+ eval file link {$destdir/$fbasename} $fn
-+ }
-+ }
-
- # Create modified copies of include.tcl in parallel
- # directories so paths still work.
diff --git a/sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch b/sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch
deleted file mode 100644
index 66bdcf9fe130..000000000000
--- a/sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/dist/aclocal/sql.m4
-+++ b/dist/aclocal/sql.m4
-@@ -96,7 +96,7 @@
- if test "$db_cv_build_cryptography" = "yes"; then
- CPPFLAGS="$CPPFLAGS -DSQLITE_HAS_CODEC=1"
- fi
--(cd sql && eval "\$SHELL ../$sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline " && cat build_config.h >> config.h) || exit 1
-+(cd sql && eval "\$SHELL $sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline " && cat build_config.h >> config.h) || exit 1
-
- # Configure JDBC if --enable-jdbc
- if test "$db_cv_jdbc" != "no"; then
diff --git a/sys-libs/db/metadata.xml b/sys-libs/db/metadata.xml
deleted file mode 100644
index 153a5bb94686..000000000000
--- a/sys-libs/db/metadata.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<longdescription>
-The Berkeley Database (Berkeley DB) is a programmatic toolkit
-that provides embedded database support for both traditional and client/server
-applications. Berkeley DB includes b+tree, queue, extended linear hashing,
-fixed, and variable-length record access methods, transactions, locking,
-logging, shared memory caching and database recovery. DB supports C, C++, Java,
-and Perl APIs. DB is available for a wide variety of UNIX platforms as well as
-Windows NT and Windows '95 (MSVC 4, 5 and 6).
-</longdescription>
-<longdescription lang="nl">
-De Berkeley Database is een programmatische toolkit
-die embedded database support verzorg voor en traditionele en client/server
-applicaties. Berkeley DB bevat b+tree, rij, uitgebreide lineaire hashing, vaste
-en variabele lengte record toegangsmethoden, transacties, locking, logging,
-gedeeld geheugen caching en database herstel. DB ondersteund C, C++, Java en
-Perl API's. DB is beschikbaar voor veel UNIX platformen en
-Windows.
-</longdescription>
-</pkgmetadata>
diff --git a/sys-libs/efivar/Manifest b/sys-libs/efivar/Manifest
deleted file mode 100644
index 7f8a29329c93..000000000000
--- a/sys-libs/efivar/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST efivar-39.tar.gz 463349 BLAKE2B 73ea4b3293cd708923bcd4332a8c7a5a8bbf539d81300c502a764a2ac205ba7cdf1e30b3432c42a101f56c0b6e31af2907a6a38ada69ace3b0d60e90515094cd SHA512 04493c30efbfc2773abac9a3dd93aa13403c05e29e3bfc72877d2054930811fae99119aadcb1729b6ca85abf5a24db786ea0c27c16d5458ef1b19e74696f5ff7
diff --git a/sys-libs/efivar/efivar-39-r1.ebuild b/sys-libs/efivar/efivar-39-r1.ebuild
deleted file mode 100644
index b3ccf47c6b88..000000000000
--- a/sys-libs/efivar/efivar-39-r1.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 2014-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-DESCRIPTION="Tools and library to manipulate EFI variables"
-HOMEPAGE="https://github.com/rhboot/efivar"
-SRC_URI="https://github.com/rhboot/efivar/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0/1"
-KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-BDEPEND="
- app-text/mandoc
- test? ( sys-boot/grub:2 )
-"
-RDEPEND="
- dev-libs/popt
-"
-DEPEND="${RDEPEND}
- >=sys-kernel/linux-headers-3.18
- virtual/pkgconfig
-"
-
-src_prepare() {
- local PATCHES=(
- # Rejected upstream, keep this for ia64 support
- "${FILESDIR}"/efivar-38-ia64-relro.patch
- )
- default
-}
-
-src_configure() {
- tc-export_build_env
-
- unset CROSS_COMPILE
- export COMPILER=$(tc-getCC)
- export HOSTCC=$(tc-getBUILD_CC)
- export HOST_CFLAGS=${BUILD_CFLAGS}
- export HOST_LDFLAGS=${BUILD_LDFLAGS}
-
- export PREFIX="${EPREFIX}/usr"
- export LIBDIR="${EPREFIX}/usr/$(get_libdir)"
-
- # https://bugs.gentoo.org/562004
- unset LIBS
-
- # Avoid -Werror
- export ERRORS=
-
- if [[ -n ${GCC_SPECS} ]]; then
- # The environment overrides the command line.
- GCC_SPECS+=":${S}/src/include/gcc.specs"
- fi
-
- # Used by tests/Makefile
- export GRUB_PREFIX=grub
-}
-
-src_compile() {
- # HOST_MARCH: https://bugs.gentoo.org/831334
- emake HOST_MARCH=
-}
-
-src_test() {
- # https://bugs.gentoo.org/924370
- emake -j1 test
-}
diff --git a/sys-libs/efivar/files/efivar-38-ia64-relro.patch b/sys-libs/efivar/files/efivar-38-ia64-relro.patch
deleted file mode 100644
index f43057e5e0ad..000000000000
--- a/sys-libs/efivar/files/efivar-38-ia64-relro.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 145c6593fa9206cc27229a9a40c49e4bed046739 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Mon, 19 Oct 2020 19:05:01 +0100
-Subject: [PATCH] gcc.specs: drop --fatal-warnings from linker options (ia64
- compatibility)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-```
-$ LANG=C make HOSTCC=x86_64-pc-linux-gnu-gcc CC=ia64-unknown-linux-gnu-gcc HOST_ARCH=ia64
-ia64-unknown-linux-gnu-gcc ... \
- -o libefivar.so ...
-/usr/libexec/gcc/ia64-unknown-linux-gnu/ld: warning: -z relro ignored
-collect2: error: ld returned 1 exit status
-make[1]: *** [/home/slyfox/dev/git/efivar/src/include/rules.mk:32: libefivar.so] Error 1
-```
-
-ia64 (and a few others) binutils target does not support '-z relro' and always
-issues a warning. --fatal-warnings spec option turns the build into always failing one.
-
-The change drops `--fatal-warnings` option from gcc.spec entirely.
-
-Rejected upstream in https://github.com/rhboot/efivar/pull/164.
-
-[sam: add extra hunk to fix 38 build.]
-
-Reported-by: Émeric Maschino
-Bug: https://bugs.gentoo.org/749963
-Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
----
- src/include/gcc.specs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/include/gcc.specs b/src/include/gcc.specs
-index ef28e2b..4deead5 100644
---- a/src/include/gcc.specs
-+++ b/src/include/gcc.specs
-@@ -5,4 +5,4 @@
- + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} -grecord-gcc-switches
-
- *link:
--+ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
-++ --no-undefined-version --no-allow-shlib-undefined -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
---
-2.34.1
-
-diff --git a/src/include/defaults.mk b/src/include/defaults.mk
-index 9024a3a..f5515fa 100644
---- a/src/include/defaults.mk
-+++ b/src/include/defaults.mk
-@@ -58,7 +58,7 @@ override LDFLAGS = $(CFLAGS) -L. $(_LDFLAGS) $(_CCLDFLAGS) \
- -Wl,-z,now \
- -Wl,-z,muldefs \
- -Wl,-z,relro \
-- -Wl,--fatal-warnings \
-+ -Wl,--no-fatal-warnings \
- $(call family,LDFLAGS) $(call family,CCLDFLAGS) \
- $(call pkg-config-ccldflags)
- override CCLDFLAGS = $(LDFLAGS)
diff --git a/sys-libs/efivar/metadata.xml b/sys-libs/efivar/metadata.xml
deleted file mode 100644
index 09743f0f8998..000000000000
--- a/sys-libs/efivar/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>floppym@gentoo.org</email>
- <name>Mike Gilbert</name>
- </maintainer>
- <upstream>
- <remote-id type="github">rhboot/efivar</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/error-standalone/Manifest b/sys-libs/error-standalone/Manifest
deleted file mode 100644
index 2354d840bfe2..000000000000
--- a/sys-libs/error-standalone/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST error-standalone-1.0.tar.gz 1947 BLAKE2B a6cc182caab990b841c708fd78e3539e2a0488355f7eb3e7cbe2bcf3d796c2b7c5046dd99defd005e155581363f858a4b52ac586d729a6e0d543c0d11cf1006f SHA512 4561f17896d411932fb02e8dc435b23e22c3874ccde668dcb5bc2c843383c4d774c45d295ce50607fcc32df0356f826792d7fbd14ecc768ad64b9021549135e3
-DIST error-standalone-2.0.tar.gz 2329 BLAKE2B 2f2291056b46adbaeb655b39e57acd159b597add0a79ef8cbcd3a75b3de325975253338235e993f68973490aebe5eb5e1d3f88262770cb319e3b5aa9f1365a6b SHA512 bb5cf17dd58bc022b6f18b8044460ec1f32bbdda3ac9c9ccc71d4bdf0115cc1869ae8de85b3e66726ebbfb891d7b5f85b5eec8018d53643eeb81bcbc751fcf58
diff --git a/sys-libs/error-standalone/error-standalone-1.0.ebuild b/sys-libs/error-standalone/error-standalone-1.0.ebuild
deleted file mode 100644
index c9d61a2c6ecb..000000000000
--- a/sys-libs/error-standalone/error-standalone-1.0.ebuild
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright 2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DESCRIPTION="standalone <error.h> implementation intended for musl"
-HOMEPAGE="https://hacktivis.me/git/error-standalone/"
-SRC_URI="https://hacktivis.me/releases/error-standalone/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~riscv x86"
-
-RDEPEND="!sys-libs/glibc"
diff --git a/sys-libs/error-standalone/error-standalone-2.0-r1.ebuild b/sys-libs/error-standalone/error-standalone-2.0-r1.ebuild
deleted file mode 100644
index 5268a3ae0c77..000000000000
--- a/sys-libs/error-standalone/error-standalone-2.0-r1.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 2024-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic toolchain-funcs
-
-DESCRIPTION="standalone <error.h> implementation intended for musl"
-HOMEPAGE="https://hacktivis.me/git/error-standalone/"
-SRC_URI="https://hacktivis.me/releases/error-standalone/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~m68k ~mips ppc ppc64 ~riscv x86"
-
-RDEPEND="!sys-libs/glibc"
-
-IUSE="static-libs"
-
-src_compile() {
- append-flags -fPIC
-
- emake CC="$(tc-getCC)" AR="$(tc-getAR)" liberror.so $(usex static-libs liberror.a '')
-}
-
-src_install() {
- einstalldocs
-
- emake \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR='${PREFIX}'/"$(get_libdir)" \
- DESTDIR="${D}" \
- install-shared \
- $(usex static-libs install-static '')
-}
diff --git a/sys-libs/error-standalone/metadata.xml b/sys-libs/error-standalone/metadata.xml
deleted file mode 100644
index bf5592871976..000000000000
--- a/sys-libs/error-standalone/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person" proxied="yes">
- <email>contact@hacktivis.me</email>
- <name>Haelwenn (lanodan) Monnier</name>
- </maintainer>
- <maintainer type="project" proxied="proxy">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/fortify-headers/Manifest b/sys-libs/fortify-headers/Manifest
deleted file mode 100644
index f45bc033da8d..000000000000
--- a/sys-libs/fortify-headers/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST fortify-headers-1.1.tar.gz 5510 BLAKE2B d0454ad3ba432c051aeabfffad82799fae4ef37c07a8d2b8efcc26cd867dea8b31586f312d2947cb7e6ef7eedcacc3bb68591be4409376cc702ffbbafe144ea0 SHA512 a39d6e7c002bf91085f712aa46bc3f53ff934cc963694a229fa82d84ff4a7556105212a84a231ab5367c01c6a1e385172173f1f4a34d5eb4d2d9c58472c23dd0
diff --git a/sys-libs/fortify-headers/fortify-headers-1.1.ebuild b/sys-libs/fortify-headers/fortify-headers-1.1.ebuild
deleted file mode 100644
index 5347e1e57683..000000000000
--- a/sys-libs/fortify-headers/fortify-headers-1.1.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-if [[ ${PV} == *9999* ]] ; then
- EGIT_REPO_URI="git://git.2f30.org/fortify-headers"
- inherit git-r3
-else
- #SRC_URI="http://git.2f30.org/fortify-headers/snapshot/fortify-headers-${PV}.tar.gz"
- SRC_URI="https://dl.2f30.org/releases/${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
-fi
-
-DESCRIPTION="A standalone implementation of fortify source"
-HOMEPAGE="http://git.2f30.org/fortify-headers/"
-
-LICENSE="ISC"
-SLOT="0"
-
-src_prepare() {
- sed -i -e 's|^PREFIX = /usr/local|PREFIX = /usr|g' Makefile || die
- default
-}
-
-src_compile() {
- # Nothing to do here but defining a dummy phase allows us to not trigger
- # the catch-all rule and try to install here where we don't have access
- # to ${ED}
- :;
-}
-
-src_install() {
- export DESTDIR="${ED}"
- default
-}
diff --git a/sys-libs/fortify-headers/fortify-headers-9999.ebuild b/sys-libs/fortify-headers/fortify-headers-9999.ebuild
deleted file mode 100644
index 978f5b027268..000000000000
--- a/sys-libs/fortify-headers/fortify-headers-9999.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-DESCRIPTION="Standalone implementation of fortify source"
-HOMEPAGE="https://github.com/jvoisin/fortify-headers"
-
-if [[ ${PV} == *9999* ]] ; then
- EGIT_REPO_URI="https://github.com/jvoisin/fortify-headers"
- inherit git-r3
-else
- FORTIFY_COMMIT=""
- SRC_URI="https://github.com/jvoisin/fortify-headers/archive/${FORTIFY_COMMIT}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
-fi
-
-LICENSE="ISC"
-SLOT="0"
-
-src_prepare() {
- sed -i -e 's|^PREFIX = /usr/local|PREFIX = /usr|g' Makefile || die
- default
-}
-
-src_compile() {
- # Nothing to do here but defining a dummy phase allows us to not trigger
- # the catch-all rule and try to install here where we don't have access
- # to ${ED}
- :;
-}
-
-src_test() {
- emake -C tests CC="$(tc-getCC)"
-}
-
-src_install() {
- export DESTDIR="${ED}"
- default
-}
diff --git a/sys-libs/fortify-headers/metadata.xml b/sys-libs/fortify-headers/metadata.xml
deleted file mode 100644
index dd8b1ddfa342..000000000000
--- a/sys-libs/fortify-headers/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>blueness@gentoo.org</email>
- <name>Anthony G. Basile</name>
- </maintainer>
- <upstream>
- <remote-id type="github">jvoisin/fortify-headers</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/freeipmi/Manifest b/sys-libs/freeipmi/Manifest
deleted file mode 100644
index 1af3ee4f2550..000000000000
--- a/sys-libs/freeipmi/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST freeipmi-1.6.15.tar.gz 3464927 BLAKE2B 0363b9ca58d264f9703e1615469dc5df53143e4b21111004602ab24e371d6291aacb6cef04500822cc5e86d0aec55e80f8162bfda0a98a2af1e326ec377460ba SHA512 113005f751a22584b657afa27c5659af8cae3b503f7c6358ac98c7f2461165c882b9ccfa8ad1cc4e3041f10de334def9b4faff03f2b83d56e69d891463f8931a
-DIST freeipmi-1.6.16.tar.gz 3465484 BLAKE2B 3dd261796b8958eb7dbf2debc29de27aa1b7a2edcab2e2cf4ff4596a1ff89e8e5ad4d0d761b9be5956551b743733b5bc1c13880aa910c54cde7661ac82c59860 SHA512 be2b6437bbd9c914ec113845d60288a8ecf2d53cbbe0472d89240f3323f15e1cbdc62c2788f6573fc6b032a9fa6bb41b544559ece24a8a631f9450b0166cc45f
-DIST freeipmi-1.6.18.tar.gz 3468378 BLAKE2B cf196060cb1476e7acc1b1ee80c090fdc1a39e4f989c0c0a0c3a6a39820acc64b71f1981e61ad979c8ab2d495c1fa098dc62fde66d90d669441da14ee094e992 SHA512 e9040f3b986d372edf1d0e7786b64cf25a0bb9ac65512d9f7b9967aecbc52207aca28dec96644cae67b1cda3ed494eec3d55598eae8c2ebac4544677b3bc24e1
diff --git a/sys-libs/freeipmi/files/bmc-watchdog.confd b/sys-libs/freeipmi/files/bmc-watchdog.confd
deleted file mode 100644
index 4d39cf4d8b7d..000000000000
--- a/sys-libs/freeipmi/files/bmc-watchdog.confd
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# This configuration file controls the behaviour of the bmc-watchdog daemon
-# from FreeIPMI.
-#
-# -u INT, --timer-use=INT
-# Set timer use. The timer use value can be set to one of the
-# following: 1 = BIOS FRB2, 2 = BIOS POST, 3 = OS_LOAD, 4 = SMS
-# OS, 5 = OEM.
-#
-# -p INT, --pre-timeout-interrupt=INT
-# Set pre-timeout interrupt. The pre timeout interrupt can be set
-# to one of the following: 0 = None, 1 = SMI, 2 = NMI, 3 = Messag-
-# ing Interrupt.
-#
-# -a INT, --timeout-action=INT
-# Set timeout action. The timeout action can be set to one of the
-# following: 0 = No action, 1 = Hard Reset, 2 = Power Down, 3 =
-# Power Cycle.
-#
-# -F, --clear-bios-frb2
-# Clear BIOS FRB2 Timer Use Flag.
-#
-# -P, --clear-bios-post
-# Clear BIOS POST Timer Use Flag.
-#
-# -L, --clear-os-load
-# Clear OS Load Timer Use Flag.
-#
-# -S, --clear-sms-os
-# Clear SMS/OS Timer Use Flag.
-#
-# -O, --clear-oem
-# Clear OEM Timer Use Flag.
-#
-# -i SECS, --initial-countdown=SECS
-# Set initial countdown in seconds.
-#
-# -e, --reset-period
-# Time interval to wait before resetting timer. The default is 60
-# seconds.
-#
-# For the remaining options, consult man bmc-watchdog
-#
-OPTIONS="-d -u 4 -p 0 -a 1 -F -P -L -S -O -i 900 -e 60"
diff --git a/sys-libs/freeipmi/files/bmc-watchdog.initd.4 b/sys-libs/freeipmi/files/bmc-watchdog.initd.4
deleted file mode 100644
index e0f8bf02c045..000000000000
--- a/sys-libs/freeipmi/files/bmc-watchdog.initd.4
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_commands="condrestart"
-description_condrestart="Restart the service only if started already"
-
-command="/usr/sbin/${SVCNAME}"
-command_args="${OPTIONS}"
-pidfile=/var/run/$SVCNAME.pid
-
-depend() {
- need localmount
- use logger
-}
-
-condrestart() {
- service_started && restart
-}
diff --git a/sys-libs/freeipmi/files/freeipmi.icinga b/sys-libs/freeipmi/files/freeipmi.icinga
deleted file mode 100644
index 4c4026c72b87..000000000000
--- a/sys-libs/freeipmi/files/freeipmi.icinga
+++ /dev/null
@@ -1,4 +0,0 @@
-define command {
- command_name nagios_ipmi_sensors
- command_line $USER1$/nagios_ipmi_sensors.pl -h $HOSTADDRESS$
-}
diff --git a/sys-libs/freeipmi/files/ipmidetectd.confd b/sys-libs/freeipmi/files/ipmidetectd.confd
deleted file mode 100644
index 74245f14c0c5..000000000000
--- a/sys-libs/freeipmi/files/ipmidetectd.confd
+++ /dev/null
@@ -1,5 +0,0 @@
-# This configuration file controls the behaviour of the ipmid daemon
-# from FreeIPMI.
-# See `man 8 ipmitdetectd` for further information.
-
-# OPTIONS="-c /etc/freeipmi/ipmidetectd.conf"
diff --git a/sys-libs/freeipmi/files/ipmiseld.confd b/sys-libs/freeipmi/files/ipmiseld.confd
deleted file mode 100644
index 8e40a5c0c8dc..000000000000
--- a/sys-libs/freeipmi/files/ipmiseld.confd
+++ /dev/null
@@ -1,5 +0,0 @@
-# This configuration file controls the behaviour of the ipmiseld daemon
-# from FreeIPMI.
-# See `man 8 ipmiseld` for further information.
-
-# OPTIONS="--config-file /etc/freeipmi/ipmiseld.conf"
diff --git a/sys-libs/freeipmi/freeipmi-1.6.15.ebuild b/sys-libs/freeipmi/freeipmi-1.6.15.ebuild
deleted file mode 100644
index 7b3ac0cddfa9..000000000000
--- a/sys-libs/freeipmi/freeipmi-1.6.15.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic toolchain-funcs
-
-MY_P="${P/_/.}"
-DESCRIPTION="Provides Remote-Console and System Management Software as per IPMI v1.5/2.0"
-HOMEPAGE="https://www.gnu.org/software/freeipmi/"
-SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~hppa ~ppc64 x86"
-IUSE="debug doc nagios without-root"
-
-RDEPEND="dev-libs/libgcrypt:="
-DEPEND="
- ${RDEPEND}
- virtual/os-headers
-"
-RDEPEND="
- ${RDEPEND}
- nagios? (
- || ( net-analyzer/icinga net-analyzer/nagios )
- dev-lang/perl
- )
-"
-
-src_configure() {
- # bug #943813
- append-cflags -std=gnu17
-
- local myeconfargs=(
- $(use_enable debug)
- $(use_enable doc)
- $(usev without-root --with-dont-check-for-root)
- --disable-static
- --disable-init-scripts
- --localstatedir="${EPREFIX}"/var
- ac_cv_path_CPP_FOR_BUILD="$(tc-getPROG CPP cpp)"
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- # freeipmi by defaults install _all_ commands to /usr/sbin, but
- # quite a few can be run remotely as standard user, so move them
- # in /usr/bin afterwards.
- dodir /usr/bin
- local prog
- for prog in ipmi{detect,ping,power,console}; do
- mv "${ED}"/usr/{s,}bin/${prog} || die
-
- # The default install symlinks these commands to add a dash
- # after the ipmi prefix; we repeat those after move for
- # consistency.
- rm "${ED}"/usr/sbin/${prog/ipmi/ipmi-}
- dosym ${prog} /usr/bin/${prog/ipmi/ipmi-}
- done
-
- # Install the nagios plugin in its proper place, if desired
- if use nagios; then
- dodir /usr/$(get_libdir)/nagios/plugins
- mv "${ED}"/usr/share/doc/${PF}/contrib/nagios/nagios_ipmi_sensors.pl \
- "${ED}"/usr/$(get_libdir)/nagios/plugins/ || die
- fperms 0755 /usr/$(get_libdir)/nagios/plugins/nagios_ipmi_sensors.pl
-
- insinto /etc/icinga/conf.d
- newins "${FILESDIR}"/freeipmi.icinga freeipmi-command.cfg
- fi
-
- dodoc AUTHORS ChangeLog* DISCLAIMER* NEWS README* TODO doc/*.txt
-
- keepdir \
- /var/cache/ipmiseld \
- /var/cache/ipmimonitoringsdrcache \
- /var/lib/freeipmi \
- /var/log/ipmiconsole
-
- # starting from version 1.2.0 the two daemons are similar enough
- newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmidetectd
- newconfd "${FILESDIR}"/ipmidetectd.confd ipmidetectd
-
- newinitd "${FILESDIR}"/bmc-watchdog.initd.4 bmc-watchdog
- newconfd "${FILESDIR}"/bmc-watchdog.confd bmc-watchdog
-
- newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmiseld
- newconfd "${FILESDIR}"/ipmiseld.confd ipmiseld
-
- find "${ED}" -type f -name "*.la" -delete || die
-}
diff --git a/sys-libs/freeipmi/freeipmi-1.6.16.ebuild b/sys-libs/freeipmi/freeipmi-1.6.16.ebuild
deleted file mode 100644
index eb0e6e3be646..000000000000
--- a/sys-libs/freeipmi/freeipmi-1.6.16.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-MY_P="${P/_/.}"
-DESCRIPTION="Provides Remote-Console and System Management Software as per IPMI v1.5/2.0"
-HOMEPAGE="https://www.gnu.org/software/freeipmi/"
-SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~hppa ~ppc64 x86"
-IUSE="debug doc nagios without-root"
-
-RDEPEND="dev-libs/libgcrypt:="
-DEPEND="
- ${RDEPEND}
- virtual/os-headers
-"
-RDEPEND="
- ${RDEPEND}
- nagios? (
- dev-lang/perl
- net-analyzer/nagios
- )
-"
-
-src_configure() {
- local myeconfargs=(
- $(use_enable debug)
- $(use_enable doc)
- $(usev without-root --with-dont-check-for-root)
- --disable-static
- --disable-init-scripts
- --localstatedir="${EPREFIX}"/var
- ac_cv_path_CPP_FOR_BUILD="$(tc-getPROG CPP cpp)"
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- # freeipmi by defaults install _all_ commands to /usr/sbin, but
- # quite a few can be run remotely as standard user, so move them
- # in /usr/bin afterwards.
- dodir /usr/bin
- local prog
- for prog in ipmi{detect,ping,power,console}; do
- mv "${ED}"/usr/{s,}bin/${prog} || die
-
- # The default install symlinks these commands to add a dash
- # after the ipmi prefix; we repeat those after move for
- # consistency.
- rm "${ED}"/usr/sbin/${prog/ipmi/ipmi-}
- dosym ${prog} /usr/bin/${prog/ipmi/ipmi-}
- done
-
- # Install the nagios plugin in its proper place, if desired
- if use nagios; then
- dodir /usr/$(get_libdir)/nagios/plugins
- mv "${ED}"/usr/share/doc/${PF}/contrib/nagios/nagios_ipmi_sensors.pl \
- "${ED}"/usr/$(get_libdir)/nagios/plugins/ || die
- fperms 0755 /usr/$(get_libdir)/nagios/plugins/nagios_ipmi_sensors.pl
-
- insinto /etc/icinga/conf.d
- newins "${FILESDIR}"/freeipmi.icinga freeipmi-command.cfg
- fi
-
- dodoc AUTHORS ChangeLog* DISCLAIMER* NEWS README* TODO doc/*.txt
-
- keepdir \
- /var/cache/ipmiseld \
- /var/cache/ipmimonitoringsdrcache \
- /var/lib/freeipmi \
- /var/log/ipmiconsole
-
- # starting from version 1.2.0 the two daemons are similar enough
- newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmidetectd
- newconfd "${FILESDIR}"/ipmidetectd.confd ipmidetectd
-
- newinitd "${FILESDIR}"/bmc-watchdog.initd.4 bmc-watchdog
- newconfd "${FILESDIR}"/bmc-watchdog.confd bmc-watchdog
-
- newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmiseld
- newconfd "${FILESDIR}"/ipmiseld.confd ipmiseld
-
- find "${ED}" -type f -name "*.la" -delete || die
-}
diff --git a/sys-libs/freeipmi/freeipmi-1.6.18.ebuild b/sys-libs/freeipmi/freeipmi-1.6.18.ebuild
deleted file mode 100644
index 1b7631d247d0..000000000000
--- a/sys-libs/freeipmi/freeipmi-1.6.18.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-MY_P="${P/_/.}"
-DESCRIPTION="Provides Remote-Console and System Management Software as per IPMI v1.5/2.0"
-HOMEPAGE="https://www.gnu.org/software/freeipmi/"
-SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~hppa ~ppc64 ~x86"
-IUSE="debug doc nagios without-root"
-
-RDEPEND="dev-libs/libgcrypt:="
-DEPEND="
- ${RDEPEND}
- virtual/os-headers
-"
-RDEPEND="
- ${RDEPEND}
- nagios? (
- dev-lang/perl
- net-analyzer/nagios
- )
-"
-
-src_configure() {
- local myeconfargs=(
- $(use_enable debug)
- $(use_enable doc)
- $(usev without-root --with-dont-check-for-root)
- --disable-static
- --disable-init-scripts
- --localstatedir="${EPREFIX}"/var
- ac_cv_path_CPP_FOR_BUILD="$(tc-getPROG CPP cpp)"
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- # freeipmi by defaults install _all_ commands to /usr/sbin, but
- # quite a few can be run remotely as standard user, so move them
- # in /usr/bin afterwards.
- dodir /usr/bin
- local prog
- for prog in ipmi{detect,ping,power,console}; do
- mv "${ED}"/usr/{s,}bin/${prog} || die
-
- # The default install symlinks these commands to add a dash
- # after the ipmi prefix; we repeat those after move for
- # consistency.
- rm "${ED}"/usr/sbin/${prog/ipmi/ipmi-}
- dosym ${prog} /usr/bin/${prog/ipmi/ipmi-}
- done
-
- # Install the nagios plugin in its proper place, if desired
- if use nagios; then
- dodir /usr/$(get_libdir)/nagios/plugins
- mv "${ED}"/usr/share/doc/${PF}/contrib/nagios/nagios_ipmi_sensors.pl \
- "${ED}"/usr/$(get_libdir)/nagios/plugins/ || die
- fperms 0755 /usr/$(get_libdir)/nagios/plugins/nagios_ipmi_sensors.pl
-
- insinto /etc/icinga/conf.d
- newins "${FILESDIR}"/freeipmi.icinga freeipmi-command.cfg
- fi
-
- dodoc AUTHORS ChangeLog* DISCLAIMER* NEWS README* TODO doc/*.txt
-
- keepdir \
- /var/cache/ipmiseld \
- /var/cache/ipmimonitoringsdrcache \
- /var/lib/freeipmi \
- /var/log/ipmiconsole
-
- # starting from version 1.2.0 the two daemons are similar enough
- newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmidetectd
- newconfd "${FILESDIR}"/ipmidetectd.confd ipmidetectd
-
- newinitd "${FILESDIR}"/bmc-watchdog.initd.4 bmc-watchdog
- newconfd "${FILESDIR}"/bmc-watchdog.confd bmc-watchdog
-
- newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmiseld
- newconfd "${FILESDIR}"/ipmiseld.confd ipmiseld
-
- find "${ED}" -type f -name "*.la" -delete || die
-}
diff --git a/sys-libs/freeipmi/metadata.xml b/sys-libs/freeipmi/metadata.xml
deleted file mode 100644
index afd59dfd46f3..000000000000
--- a/sys-libs/freeipmi/metadata.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>sysadmin@gentoo.org</email>
- <name>Gentoo Sysadmin Project</name>
- </maintainer>
- <use>
- <flag name="nagios">
- Install a nagios plugin to check sensors' status.
- </flag>
- <flag name="without-root">
- Configure whether or not to check for root access in ipmi tools.
- </flag>
- </use>
- <upstream>
- <remote-id type="savannah">freeipmi</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/fts-standalone/Manifest b/sys-libs/fts-standalone/Manifest
deleted file mode 100644
index 2962a836ee54..000000000000
--- a/sys-libs/fts-standalone/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST fts-standalone-1.2.7.tar.gz 19336 BLAKE2B 045cfc32dffd18b58093dfe578a029ca15083eec98812ea2849acf37fd2c8e7272840b15b4966201421624d96ba69208a36b58d5420cef2563c107cfae98ea93 SHA512 949f73b9406b06bd8712c721b4ec89afcb37d4eaef5666cccf3712242d3a57fc0acf3ca994934e0f57c1e92f40521a9370132a21eb6d1957415a83c76bf20feb
diff --git a/sys-libs/fts-standalone/fts-standalone-1.2.7-r1.ebuild b/sys-libs/fts-standalone/fts-standalone-1.2.7-r1.ebuild
deleted file mode 100644
index e6a857e45be0..000000000000
--- a/sys-libs/fts-standalone/fts-standalone-1.2.7-r1.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools
-
-DESCRIPTION="Standalone fts library for use with musl"
-HOMEPAGE="https://github.com/pullmoll/musl-fts"
-SRC_URI="https://github.com/pullmoll/musl-fts/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-S="${WORKDIR}/musl-fts-${PV}"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~m68k ~mips ppc ppc64 ~riscv x86"
-IUSE="static-libs"
-
-RDEPEND="!sys-libs/glibc"
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable static-libs static)
-}
-
-src_install() {
- default
-
- find "${ED}" -name '*.la' -delete || die
-
- # Compatibility symlink (bug #895946)
- # TODO: Drop this a while after 2024-07-02 once packages have
- # had time to adapt/fix broken patches.
- dosym musl-fts.pc /usr/$(get_libdir)/pkgconfig/fts-standalone.pc
-}
diff --git a/sys-libs/fts-standalone/fts-standalone-1.2.7.ebuild b/sys-libs/fts-standalone/fts-standalone-1.2.7.ebuild
deleted file mode 100644
index 4dd2e655db4a..000000000000
--- a/sys-libs/fts-standalone/fts-standalone-1.2.7.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools
-
-DESCRIPTION="Standalone fts library for use with musl"
-HOMEPAGE="https://github.com/pullmoll/musl-fts"
-SRC_URI="https://github.com/pullmoll/musl-fts/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-S="${WORKDIR}/musl-fts-${PV}"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~m68k ~mips ppc ppc64 ~riscv x86"
-IUSE="static-libs"
-
-DEPEND="
- !sys-libs/glibc"
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable static-libs static)
-}
-
-src_install() {
- default
- find "${ED}" -name '*.la' -delete || die
- mv "${ED}"/usr/$(get_libdir)/pkgconfig/{musl-fts,fts-standalone}.pc || die
-}
diff --git a/sys-libs/fts-standalone/metadata.xml b/sys-libs/fts-standalone/metadata.xml
deleted file mode 100644
index b9347a233c05..000000000000
--- a/sys-libs/fts-standalone/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>blueness@gentoo.org</email>
- <name>Anthony G. Basile</name>
- </maintainer>
- <upstream>
- <remote-id type="github">pullmoll/musl-fts</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/gcompat/Manifest b/sys-libs/gcompat/Manifest
deleted file mode 100644
index 3c9b4b05261a..000000000000
--- a/sys-libs/gcompat/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST gcompat-1.1.0.tar.xz 27456 BLAKE2B 60b008a08eb4841e24a5d810c7ed354e12b06d2e4046df6cf6e19ce01aca29dd5d18027c5c87b66c6821fd5f9677ce236ac6e1826339b294e936e5b90b5ad444 SHA512 fbaa5b5410bde295df11f72cf946aa81ab7d46a919a75e75f70e339d429e38f0fa9283400cbcd4bf8c646011300065f53788ffc584d6fbb093bf4dbd28e766ab
diff --git a/sys-libs/gcompat/gcompat-1.1.0.ebuild b/sys-libs/gcompat/gcompat-1.1.0.ebuild
deleted file mode 100644
index b335fc851cd8..000000000000
--- a/sys-libs/gcompat/gcompat-1.1.0.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 2018-2020 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-minimal flag-o-matic
-
-DESCRIPTION="The GNU C Library compatibility layer for musl"
-HOMEPAGE="https://git.adelielinux.org/adelie/gcompat"
-SRC_URI="https://distfiles.adelielinux.org/source/${PN}/${P}.tar.xz"
-LICENSE="UoI-NCSA"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="libucontext obstack"
-
-DEPEND="
- libucontext? ( sys-libs/libucontext )
- obstack? ( sys-libs/obstack-standalone )
-"
-RDEPEND="${DEPEND}"
-
-get_loader_name() {
- # Loosely based on Adélie APKBUILD
- # TODO: Check against glibc’s logic
-
- case "$ABI" in
- x86) echo "ld-linux.so.2" ;;
- amd64) echo "ld-linux-x86-64.so.2" ;;
- arm64) echo "ld-linux-aarch64.so.1" ;;
- arm*) echo "ld-linux-armhf.so.3" ;;
- mips | powerpc | s390) echo "ld.so.1" ;;
- esac
-}
-
-get_linker_path() {
- local arch=$(ldd 2>&1 | sed -n '1s/^musl libc (\(.*\))$/\1/p')
- echo "/lib/ld-musl-${arch}.so.1"
-}
-
-src_compile() {
- filter-flags "-Wl,--as-needed"
-
- emake \
- LINKER_PATH="$(get_linker_path)" \
- LOADER_NAME="$(get_loader_name)" \
- WITH_OBSTACK="$(usex obstack 'obstack-standalone' 'no')" \
- $(usex libucontext WITH_LIBUCONTEXT=yes '')
-}
-
-src_install() {
- emake \
- LINKER_PATH="$(get_linker_path)" \
- LOADER_NAME="$(get_loader_name)" \
- WITH_OBSTACK="$(usex obstack 'obstack-standalone' 'no')" \
- $(usex libucontext WITH_LIBUCONTEXT=yes '') \
- DESTDIR="${D}" \
- install
-}
diff --git a/sys-libs/gcompat/gcompat-9999.ebuild b/sys-libs/gcompat/gcompat-9999.ebuild
deleted file mode 100644
index 108d53a71b22..000000000000
--- a/sys-libs/gcompat/gcompat-9999.ebuild
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 2018-2020 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-minimal flag-o-matic git-r3
-
-DESCRIPTION="The GNU C Library compatibility layer for musl"
-HOMEPAGE="https://git.adelielinux.org/adelie/gcompat"
-EGIT_REPO_URI="https://git.adelielinux.org/adelie/gcompat.git"
-LICENSE="UoI-NCSA"
-SLOT="0"
-IUSE="libucontext obstack"
-
-DEPEND="
- libucontext? ( sys-libs/libucontext )
- obstack? ( sys-libs/obstack-standalone )
-"
-RDEPEND="${DEPEND}"
-
-get_loader_name() {
- # Loosely based on Adélie APKBUILD
- # TODO: Check against glibc’s logic
-
- case "$ABI" in
- x86) echo "ld-linux.so.2" ;;
- amd64) echo "ld-linux-x86-64.so.2" ;;
- arm64) echo "ld-linux-aarch64.so.1" ;;
- arm*) echo "ld-linux-armhf.so.3" ;;
- mips | powerpc | s390) echo "ld.so.1" ;;
- esac
-}
-
-get_linker_path() {
- local arch=$(ldd 2>&1 | sed -n '1s/^musl libc (\(.*\))$/\1/p')
- echo "/lib/ld-musl-${arch}.so.1"
-}
-
-src_compile() {
- filter-flags "-Wl,--as-needed"
-
- emake \
- LINKER_PATH="$(get_linker_path)" \
- LOADER_NAME="$(get_loader_name)" \
- WITH_OBSTACK="$(usex obstack 'obstack-standalone' 'no')" \
- $(usex libucontext WITH_LIBUCONTEXT=yes '')
-}
-
-src_install() {
- emake \
- LINKER_PATH="$(get_linker_path)" \
- LOADER_NAME="$(get_loader_name)" \
- WITH_OBSTACK="$(usex obstack 'obstack-standalone' 'no')" \
- $(usex libucontext WITH_LIBUCONTEXT=yes '') \
- DESTDIR="${D}" \
- install
-}
diff --git a/sys-libs/gcompat/metadata.xml b/sys-libs/gcompat/metadata.xml
deleted file mode 100644
index 368426fa9123..000000000000
--- a/sys-libs/gcompat/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>contact@hacktivis.me</email>
- <name>Haelwenn (lanodan) Monnier</name>
- </maintainer>
- <use>
- <flag name="obstack">Use <pkg>sys-libs/obstack-standalone</pkg> for greater compatibility</flag>
- <flag name="libucontext">Add support for ucontext functions via <pkg>sys-libs/libucontext</pkg></flag>
- </use>
-</pkgmetadata>
diff --git a/sys-libs/gdbm/Manifest b/sys-libs/gdbm/Manifest
deleted file mode 100644
index 741bae376ae7..000000000000
--- a/sys-libs/gdbm/Manifest
+++ /dev/null
@@ -1,6 +0,0 @@
-DIST gdbm-1.24.tar.gz 1195931 BLAKE2B 79f49adbb455c2e1b91f3450037b71165fa8de82650d6402e0e22ee1f4d278fdb0bd78100659bf416e2409b432e1f8d32ecbae523980413f7148b80ee06c9f4b SHA512 401ff8c707079f21da1ac1d6f4714a87f224b6f41943078487dc891be49f51fd1ac7a32fd599aae0fad185f2c6ba7432616d328fd6aaab068eb54db9562ff7fa
-DIST gdbm-1.24.tar.gz.sig 95 BLAKE2B 3a66c2a256d9601db57df20feb5d72d1e94d23b7a92e3099f121549c8aa2c57b05a3021d88f97291819378462a68664af958de4c9de65887d2cca6642d172bc3 SHA512 a54595e0fd23724f5e30c2ff1b9656dbb6da3b448f4ab6a2579a523c11bae53e47d3843327a1e4499b312ab947ac73b5a9aa6e78fe5e932c55a1be0cdab4e63d
-DIST gdbm-1.25.tar.gz 1224180 BLAKE2B 6abf5f77823dda7ebcaa775d58f7a311c8f73c7521fe223398b5cb4b4831ad177cfd87fd42f2b24ca2fc5984af7d51abcc5e509ceb6aab2746a52aecb550654b SHA512 1785598665d7323eed052a55708903c6abaeafcfb66a9ceb69293f57c3fdbf49cd8a821ef23715a40bf7030d0067d1340d12279ed07afe040f912e53078e47f5
-DIST gdbm-1.25.tar.gz.sig 566 BLAKE2B 7740ca7be87eb3f33ff2fd330e35dd900786d9d6a589d466202a121e0e943d3037a75daf584f0b8c99cf10ffac388b1de732c19e43af62bb8da969980c7f65b7 SHA512 0abf5198f0e5ca9678d7741181724389be2289263d2a91c07a979c03f976e7cc494f39a5fbc4d8dbb8acacba463accf28ba0eba4907f1bfe2bac0ab2f4f5eede
-DIST gdbm-1.26.tar.gz 1226591 BLAKE2B 9423ea16ee3e8f1ce57ea32371f49919e2a3819a206a61ce927676a08a71a6a495d3949714bff7be789dfce75bf0ab0ac76f07ec673b71a84ae32bd8cd483781 SHA512 44aafe254f0950a8f5215d8f1337674f07b19f2a375f6eb19a7e39690028c80c3774b705c2b76b470ae74042b21f2ca77d02f6f57aa2ee50296db801220a3352
-DIST gdbm-1.26.tar.gz.sig 566 BLAKE2B b15fdc78010a9fc020d9aad5c92394d00ebce846ac0468fee90701b19295f51df4ccbb22e7af4bde75b0e2b52e46c96dd511c6f3552d2151a828422033d1bc26 SHA512 ba126e81a660c6658bdb5aac65c12546cf4d7721da88f3767808c9c94e4082cf48eaf9655b502898603af22a52032d9cba40f94db4170e4f5878e7a2b8ec9922
diff --git a/sys-libs/gdbm/files/gdbm-1.25-musl.patch b/sys-libs/gdbm/files/gdbm-1.25-musl.patch
deleted file mode 100644
index 2b186efd0830..000000000000
--- a/sys-libs/gdbm/files/gdbm-1.25-musl.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-https://bugs.gentoo.org/951911
-https://puszcza.gnu.org.ua/bugs/index.php?649
-https://git.gnu.org.ua/gdbm.git/commit/?id=39ef0347f78ef691c9ad815360198f577043ce4c
-
-From 39ef0347f78ef691c9ad815360198f577043ce4c Mon Sep 17 00:00:00 2001
-From: Sergey Poznyakoff <gray@gnu.org>
-Date: Mon, 24 Mar 2025 07:56:00 +0200
-Subject: Add missing include
-
-* tools/gdbmapp.h: Include sys/types.h
---- a/tools/gdbmapp.h
-+++ b/tools/gdbmapp.h
-@@ -16,6 +16,7 @@
-
- #include <stdlib.h>
- #include <stdarg.h>
-+#include <sys/types.h>
- #include "gettext.h"
- #ifdef HAVE_LOCALE_H
- # include <locale.h>
---
-cgit v1.2.3
diff --git a/sys-libs/gdbm/gdbm-1.24.ebuild b/sys-libs/gdbm/gdbm-1.24.ebuild
deleted file mode 100644
index f5afb7724226..000000000000
--- a/sys-libs/gdbm/gdbm-1.24.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gdbm.asc
-inherit flag-o-matic libtool multilib-minimal multiprocessing verify-sig
-
-DESCRIPTION="Standard GNU database libraries"
-HOMEPAGE="https://www.gnu.org/software/gdbm/"
-SRC_URI="
- mirror://gnu/gdbm/${P}.tar.gz
- verify-sig? ( mirror://gnu/gdbm/${P}.tar.gz.sig )
-"
-
-LICENSE="GPL-3+ GPL-2+ FDL-1.3+"
-SLOT="0/6" # libgdbm.so version
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-IUSE="+berkdb nls +readline static-libs test"
-RESTRICT="!test? ( test )"
-
-DEPEND="readline? ( sys-libs/readline:=[${MULTILIB_USEDEP}] )"
-RDEPEND="${DEPEND}"
-BDEPEND="
- test? ( dev-util/dejagnu )
- verify-sig? ( sec-keys/openpgp-keys-gdbm )
-"
-
-src_prepare() {
- default
-
- # gdbm ships with very old libtool files, regen to avoid
- # errors when cross-compiling.
- elibtoolize
-}
-
-multilib_src_configure() {
- # https://puszcza.gnu.org.ua/bugs/index.php?642
- append-cflags $(test-flags-CC -std=gnu17)
-
- # gdbm doesn't appear to use either of these libraries
- export ac_cv_lib_dbm_main=no ac_cv_lib_ndbm_main=no
-
- local myeconfargs=(
- --includedir="${EPREFIX}"/usr/include/gdbm
- $(use_enable berkdb libgdbm-compat)
- $(use_enable nls)
- $(use_enable static-libs static)
- $(use_with readline)
- )
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_test() {
- emake -Onone check TESTSUITEFLAGS="--jobs=$(get_makeopts_jobs)"
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -name '*.la' -delete || die
- fi
-
- mv "${ED}"/usr/include/gdbm/gdbm.h "${ED}"/usr/include/ || die
-}
diff --git a/sys-libs/gdbm/gdbm-1.25.ebuild b/sys-libs/gdbm/gdbm-1.25.ebuild
deleted file mode 100644
index a90931dc9586..000000000000
--- a/sys-libs/gdbm/gdbm-1.25.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gdbm.asc
-inherit libtool multilib-minimal multiprocessing verify-sig
-
-DESCRIPTION="Standard GNU database libraries"
-HOMEPAGE="https://www.gnu.org/software/gdbm/"
-SRC_URI="
- mirror://gnu/gdbm/${P}.tar.gz
- verify-sig? ( mirror://gnu/gdbm/${P}.tar.gz.sig )
-"
-
-LICENSE="GPL-3+ GPL-2+ FDL-1.3+"
-SLOT="0/6" # libgdbm.so version
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-IUSE="+berkdb nls +readline static-libs test"
-RESTRICT="!test? ( test )"
-
-DEPEND="readline? ( sys-libs/readline:=[${MULTILIB_USEDEP}] )"
-RDEPEND="${DEPEND}"
-BDEPEND="
- test? ( dev-util/dejagnu )
- verify-sig? ( >=sec-keys/openpgp-keys-gdbm-20250323 )
-"
-
-PATCHES=(
- "${FILESDIR}"/${P}-musl.patch
-)
-
-src_prepare() {
- default
-
- # gdbm ships with very old libtool files, regen to avoid
- # errors when cross-compiling.
- elibtoolize
-}
-
-multilib_src_configure() {
- # gdbm doesn't appear to use either of these libraries
- export ac_cv_lib_dbm_main=no ac_cv_lib_ndbm_main=no
-
- local myeconfargs=(
- --includedir="${EPREFIX}"/usr/include/gdbm
- $(use_enable berkdb libgdbm-compat)
- $(use_enable nls)
- $(use_enable static-libs static)
- $(use_with readline)
- )
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_test() {
- emake -Onone check TESTSUITEFLAGS="--jobs=$(get_makeopts_jobs)"
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -name '*.la' -delete || die
- fi
-
- mv "${ED}"/usr/include/gdbm/gdbm.h "${ED}"/usr/include/ || die
-}
diff --git a/sys-libs/gdbm/gdbm-1.26.ebuild b/sys-libs/gdbm/gdbm-1.26.ebuild
deleted file mode 100644
index f88fb571943b..000000000000
--- a/sys-libs/gdbm/gdbm-1.26.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gdbm.asc
-inherit libtool multilib-minimal multiprocessing verify-sig
-
-DESCRIPTION="Standard GNU database libraries"
-HOMEPAGE="https://www.gnu.org/software/gdbm/"
-SRC_URI="
- mirror://gnu/gdbm/${P}.tar.gz
- verify-sig? ( mirror://gnu/gdbm/${P}.tar.gz.sig )
-"
-
-LICENSE="GPL-3+ GPL-2+ FDL-1.3+"
-SLOT="0/6" # libgdbm.so version
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-IUSE="+berkdb nls +readline static-libs test"
-RESTRICT="!test? ( test )"
-
-DEPEND="readline? ( sys-libs/readline:=[${MULTILIB_USEDEP}] )"
-RDEPEND="${DEPEND}"
-BDEPEND="
- test? ( dev-util/dejagnu )
- verify-sig? ( >=sec-keys/openpgp-keys-gdbm-20250323 )
-"
-
-src_prepare() {
- default
-
- # gdbm ships with very old libtool files, regen to avoid
- # errors when cross-compiling.
- elibtoolize
-}
-
-multilib_src_configure() {
- # gdbm doesn't appear to use either of these libraries
- export ac_cv_lib_dbm_main=no ac_cv_lib_ndbm_main=no
-
- local myeconfargs=(
- --includedir="${EPREFIX}"/usr/include/gdbm
- $(use_enable berkdb libgdbm-compat)
- $(use_enable nls)
- $(use_enable static-libs static)
- $(use_with readline)
- )
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_test() {
- emake -Onone check TESTSUITEFLAGS="--jobs=$(get_makeopts_jobs)"
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -name '*.la' -delete || die
- fi
-
- mv "${ED}"/usr/include/gdbm/gdbm.h "${ED}"/usr/include/ || die
-}
diff --git a/sys-libs/gdbm/metadata.xml b/sys-libs/gdbm/metadata.xml
deleted file mode 100644
index 931542e3ee05..000000000000
--- a/sys-libs/gdbm/metadata.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <use>
- <flag name="berkdb">enable compatibility layer for UNIX-like dbm and ndbm interfaces</flag>
- </use>
- <upstream>
- <remote-id type="savannah">gdbm</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
deleted file mode 100644
index 4153cd4d6622..000000000000
--- a/sys-libs/glibc/Manifest
+++ /dev/null
@@ -1,45 +0,0 @@
-DIST backport-rv32.txz 26416 BLAKE2B 7a6b593859f88a3c040f06324dace4cc6137d14d4580fad9ea285829666d761c3dd01c190746e86846c219423124c77a55bc57b6e56efe6401a9c99d7fa445cd SHA512 d08dc02c4f0a3c5a15c57fbb5190588121c0e0728e6ab2119483407a98625efe58b3c83b44d750b0146171e63dcf8a6dbb6d1a057d042f794eed9adbd1f0293e
-DIST gcc-4.7.3-r1-multilib-bootstrap.tar.bz2 8064097 BLAKE2B 3cc5c82cd57d0fbd26d9a376ee8ca02f119fe9d653311cbe4d2b7b93aec2290adac3be271be19a7fdedae2e11e4b6e32360184e557204e100ad64357f5575d4b SHA512 40b93e194ad41a75d649d84d1c49070680f253a13f0617803243bc61c44fed1ca2d0a7572a97ebb79353f312b58b5f6360be916dd7435928cc53935082e15269
-DIST gcc-multilib-bootstrap-20180511.tar.xz 2392908 BLAKE2B f3cf614399368acd8908f60d894c6344a2fa09383b30c1633a0682bc668367c8a2f8c6fec2d41b6e2178d709a2bd8db57e8b2ab56ba263c7d56f819c15acd061 SHA512 98c766e913693ab42ff790557acde2a36a8001e2648046a685b21964200df8d4d52d8452d499c0068c6648284d086ce062c2d36e2c6c2fd8aacd232d193f2853
-DIST gcc-multilib-bootstrap-20201208.tar.xz 5528452 BLAKE2B 16699a6e4df5b2f28a21776ae9e3728b26a9ea251f5580aa5349545ad7c9f6145b9cb6a12ca8f5f96b9cb2a3c70b7e66ca702e4c6f083ac00408e0a20a69e613 SHA512 a243f505e17d0a7e144e8713c077582412f61d6cf7f79baa846de4fb77f5e0f27e11c9a785e14624e04ac52287b32164e7995323aa11caef59113ac438254347
-DIST glibc-2.19-patches-9.tar.bz2 24584 BLAKE2B a96e930a5bd20fa75d9f259cc2117fa5ce98072274a24a5823bf877e3739fa4c001a94d7865e065ee0527f3974430d27da8038e042340a451ad2052c62724f26 SHA512 a95b3063ade974a3556480b798b317d33c7423a8cb9e69f67249ffb8b3d3c671d70d2d5f782c1efadc0bec4cc49a96d4fe89911f3dfcd85b459f69f3b4f38f0e
-DIST glibc-2.19.tar.xz 12083312 BLAKE2B 9dc03346e0f0df4bf009a92d894b0a9f964ff92b7f4c9663cedf1cb6cf90435f28a15539d33791ecf43ee578fa4e26f916af0367651312ef8f9c1c38ce0dafa2 SHA512 9e021fcb3afbb9ace2a0e37fded231a62de861bd766e29d47163a03182e37add718b7acc3963d1c525f9556773e842297725715acde48dcfbaab6e756af1a23d
-DIST glibc-2.31-patches-9.tar.xz 74712 BLAKE2B 62991b67de4def4cca944e8420d2f0139f88b6754c6bc81072bb321c574c1db22641857345325848e1dfb551c10758f582e4425e687a7921cdbd4e7e7923a047 SHA512 699d898e3a8ed02b04573c675f572076e8f747767bfc577a033a49cd7d9078a7a60ac325acd4bd419a93b56edf90ce067baa7578ab315e27885f1f0e13916354
-DIST glibc-2.31.tar.xz 16676764 BLAKE2B 91df1792345f157265eae405185a81fd4b8ce36d4c2388f44b0d5b1ae38174ea374cbc909cd260770b9f38ea58051da13766d4fa22abf41c2d4a2493257b179b SHA512 735e4c0ef10418b6ea945ad3906585e5bbd8b282d76f2131309dce4cec6b15066a5e4a3731773ce428a819b542579c9957867bb0abf05ed2030983fca4412306
-DIST glibc-2.32-patches-8.tar.xz 65532 BLAKE2B 00c572cff396e52313d0324f7bc28192a65f06b22fc5a04aa631b76b3016842365006399715531ee693f3519720edcebef7884247f2f8c19e3518c1ddafab7cc SHA512 5240bc3a6df46d12c03ea4ce7b1a0df85301256ae3bd003fd04c61dadaaec34998873bf20544d891f6eedf896302bb916010aebc1d8d646a3cce09a93b533d0b
-DIST glibc-2.32.tar.xz 16744512 BLAKE2B a56b4afbb35315c5cd6dca0f62e44455dceae3e6e88a8453621f9a5394a60ddf10ca9309b2db0911830c7fd77e3faa5d94694eb94d5b2c05fc5285cef52255da SHA512 8460c155b7003e04f18dabece4ed9ad77445fa2288a7dc08e80a8fc4c418828af29e0649951bd71a54ea2ad2d4da7570aafd9bdfe4a37e9951b772b442afe50b
-DIST glibc-2.33-patches-11.tar.xz 143916 BLAKE2B ac13b3ccf9681bb6d3c35ecc33e268ea3f67c1809f916019e692dc83e3ce809402a45548da5ca6c7c30d2a45a2638f9fa4254c0355bd4c53bdb216f17aa4e28b SHA512 0ee1dfcf9574543d49ab4fbfe53571258422b6e82b9d12a33e411cee7e517821a4c45c24962b5120783a4efc898afdfa170d33486cc74d94c526bdd14cc84300
-DIST glibc-2.33.tar.xz 17031280 BLAKE2B 703d12121c1e2c5d9e0c6ba5341f5fb5c4d9111611a83f2360029b5de9c6e5a5611249d1833684a58ed4afdf49cae614365d87ec8721ba0e5d218f593b1f229d SHA512 4cb5777b68b22b746cc51669e0e9282b43c83f6944e42656e6db7195ebb68f2f9260f130fdeb4e3cfc64efae4f58d96c43d388f52be1eb024ca448084684abdb
-DIST glibc-2.34-patches-17.tar.xz 241584 BLAKE2B e4eea130c331f64ba66e14a6ba318853141ee3e41b455cb45b8fdb702cae071dd307229dafcfcafcc41e5a56982f52c87e31d95295f824f1a2ae689a7e0f5b49 SHA512 c6a51b373be3986e1ad753541ccf73f29515b5df0f80e0450b26bed37e8c505e22e8f13e89554347e551819c8d89d30f306464e5d25cafa4a12400c112578dca
-DIST glibc-2.34.tar.xz 17301232 BLAKE2B 874031192f2f5a3b35c3f5b044a467d4be4e67e8593e070e5b49b901ce8ea6bde2f8d2f6c92fa33b3f61eb723572a9e5f2b45e56064168df80a96d3fdb6fa30c SHA512 15252affd9ef4523a8001db16d497f4fdcb3ddf4cde7fe80e075df0bd3cc6524dc29fbe20229dbf5f97af580556e6b1fac0de321a5fe25322bc3e72f93beb624
-DIST glibc-2.35-loongarch-patches-20220522.tar.xz 44728 BLAKE2B 09e7a061f3269ebd763cd700f7c23e6cd7aab738d87ee31f76a81281920c4e5e207964c79104cd75f0a2e07b77344c2a730a9063344aa1483cd3d9aeac87de40 SHA512 21f13892fb52ec753856d5559b032c2be3a76d1cf940127222f7aa878548ce7e6ea0d2ff8791ddb91aaa2b77ce17131cd2fb2ebbdaa99443bf0a6b4c81f7388d
-DIST glibc-2.35-patches-12.tar.xz 266056 BLAKE2B 7979dcfee270107d51c10e5ec74c9c1ab0d0a9743d6718a6d915d241fee6482958c957ef9fd25cd704925e3aa0d98c23115274c7594d149dec08c5e0766a488d SHA512 37a4c086b6a459cb378608a49d90705dddb806376edb2456b8c98e3a469fc558bce7b1b4c8a856b8dffb209e7b6e1c48382ed6f050284c5f74a92ca4f7d4b88a
-DIST glibc-2.35.tar.xz 18165952 BLAKE2B 623c728884f070cd87ffeb9203f74206197c52405ac9bc44f3dd519a3468b8e8ae2536c883e5d17d94417dbd1e91775de2e674314e4ff7424f9720026d6b7063 SHA512 e7336ce27561be5d7c217832a1136fb327e057bd8d3f92925b35c97e3e9f9e486948b5a1e03e5e4090772ef06437a074d10b82e68f17f1ad8f22077ee39e1b66
-DIST glibc-2.36-patches-10.tar.xz 118268 BLAKE2B 3d1bdb6c1a9e10ba78a344ca8940f68c49411a94aefd4d66bab17d784bc8783f2ae71efb171dea6d1919ea2c4a1f54333dabc2c4d99838ba8ec568484b84d0ae SHA512 b88dfc56ffc2df495e13cf90e709629db2b9b411a1c5ba6d39f40f45be3c2f49df7b1fe320d1cd7552515fe68dfc644c12916a6db34139ccf94ff755235d3a40
-DIST glibc-2.36.tar.xz 18610836 BLAKE2B f8375e084043f032609e66fd98c234249df57a595c59672acb1bb8c69aed64d339d526611553449492b097cda900ad1d9bae8873d7f5932b10a9a0d8c9210c55 SHA512 9ea0bbda32f83a85b7da0c34f169607fb8a102f0a11a914e6bf531be47d1bef4f5307128286cffa1e2dc5879f0e6ccaef527dd353486883fa332a0b44bde8b3e
-DIST glibc-2.37-patches-12.tar.xz 83716 BLAKE2B 123951d94dad6c22150c4ef2299bcaafc080322d6eeb58b49b0525a7f5c6867e99e96cd5c065578632d9a73b5527e2b2742bc29162da487894ecea6aff75df2e SHA512 b53c06e157b23f5fae1cd15eb90fdbf3076c79f295a687bdfd285689f94417267f167ff2d6a55c4d3c3b2e08dd6406c36fed4a5fee33378dd69976c1102c01a2
-DIST glibc-2.37.tar.xz 18674604 BLAKE2B 8139cd977b2ed3bfdbde5ffb1cda8f759763dbb83071167272fef798cfbdc0d17cfd1ec893d126c52c91511b7961f3ad12eed34534b99412dfa04a1cdd5b4ea3 SHA512 4fc5932f206bb1b8b54828a28af1a681616b838bbab60c81c82155f3629cbfe1301d271af65511ed917f4c6949a025429221fe6035753282f15346919f15b90c
-DIST glibc-2.38-patches-13.tar.xz 92708 BLAKE2B b2f05a793c92ea0b7901d2124fcd968fa846fdf687f8cbdbc17795c33fae2d538133fae66d575c5b98a7a05a29f9f816e7ecd45f3be5ed10ef65adbf92c7fc4d SHA512 24e45a88fa7676ef22a7e2bb864dff27262f69900c4ef76d21c6fee498d728949b6f5d03dd094d1774a66a8a47b779bf4b16ee31e5306bcdb55cedcc0a1c5e9f
-DIST glibc-2.38.tar.xz 18913712 BLAKE2B f9b039f0ef98a7dd8e1cba228ed10286b9e4fbe4dd89af4d26fa5c4e4cf266f19c2746b44d797ce54739d86499e74cf334aaf311bcf6e30120fd7748453e653f SHA512 a6dd5e42dcd63d58e2820c783522c8c895890b6e8c8e6c83b025553de0cc77cdf227e7044e431ead98c89c68a9ce4dd63509b47e647775fb2075f011849c1900
-DIST glibc-2.39-patches-11.tar.xz 192784 BLAKE2B fef42e0bd2a3341f41cac56dc878dcc95b7f521ffb27686a9109fe92e0458e903a24e763db17631b8ae6c1e8de7add2a11979b970689b2378aeb6ef29da7ceb6 SHA512 9daf2c57d178c7ce9d98ee454f680280738b37571bbbecc1724282e4866df29b78e60de40ad81a6efcc0a75b45d08148cb1a5f942ae7e308ae6fa63f9671b7de
-DIST glibc-2.39.tar.xz 18520988 BLAKE2B 9d98459a2d58401e07c081e0d841935b23998da75a7eb5a7ebd23a1f9ebab99dee623fe166397c1b6c926960c570f62dbca5cb3b5ce84a918adff6b7a15e16bb SHA512 818f58172a52815b4338ea9f2a69ecaa3335492b9f8f64cbf8afb24c0d737982341968ecd79631cae3d3074ab0ae4bc6056fc4ba3ffe790849dc374835cd57e2
-DIST glibc-2.40-patches-11.tar.xz 227044 BLAKE2B 2a8c799a88596f3fc28bc45fc206f231f628ff83aae242d69e216b65983def35d3aaab282287f1d77cb9d37d10bb71c483815ea83dfb2e47670a4cfcfbd1d92f SHA512 e984e4842951c24cf079e9a6f88771ede0709949402dd9f734cbfdf21ff40ca3d7380c0b9cc0c0d89943b6481adf8c7db2ab4b0ffe57e2e1fa514d925f0db395
-DIST glibc-2.40.tar.xz 18752204 BLAKE2B 8593cab5b2549b77159b6866fbb40b917e491fd5bc0814f7f85b6529166d78d4583436450c479b86cdfe468304fc4d2a9ba8294230a55dbc4c15e89c3ab6c000 SHA512 33caf91dbfddde6480b7cdf7a68b36aff8c522bfee56160af26af297f1b768668edb08bc4e1a7ff61c64721e3c1d49c347a5dd01c5edd3b914ee6479c8b27885
-DIST glibc-2.41-patches-12.tar.xz 168252 BLAKE2B c844fba0871e7aa60af636c0569d01beebd314367081313635598074643449cc047a07b88979d341ba8327ac7becd3aef8b20662c8490565d29c49ade474cb8b SHA512 b780db3e31f3724cc19129bc11f49e4ad649a1a2b8174f990041640c81e03fcda3c5f3c25dffd215c7b1173e5ebb226312af58112e9798ba7254889d7b05f454
-DIST glibc-2.41.tar.xz 19344868 BLAKE2B 4da62f489ba7a95bb069c2cfea8cf78e4d37e3a5f7e1736239670ba1dca12b69aa77bd00ced078c27d91b1e622c58cbd70258161a9d18c5b3bcc95863b8d744d SHA512 894a3e5a796bc13df30c26a5bfbe4d60b5dbdaac54e7763432235124b547070c7dda88c50584536870cab79183d8cad73a3ac6ed09bfe54fa8482aad07253169
-DIST glibc-2.42-patches-7.tar.xz 69864 BLAKE2B 59c1ec784d49ccce40c14a3b09c3edb7ad557677dc9ab9af526ca27b3716fa3727e10ef34c2c1ea09a9855ec0d8553ce873cbbf75af57e6e0717ef97d1d37def SHA512 9ac6ba2392b76dce2cf39f6e7b054166d0fc07395b7958b9a84bbb1654ae3e3548113e5fe5bfcd4b9000668c4ea07a70c8c1e5688c0e72e613462383222ae48f
-DIST glibc-2.42-patches-8.tar.xz 77696 BLAKE2B dfde3bce38f34d99e1011532ce19fdb34cc1f59fae0d8d6df4b285520e7e7c2995d14be84dc0127346b38ab9e313c4aa0eb4c112a49dc6f28822f55f16bec206 SHA512 d482b7aff496db59efb0c91f2eb4b5302374986fa241e9f9248bfceb6296c1b65ca26160019564b3f40c7d0f7512ed096d771b98ce563d4889a3499880cd9c27
-DIST glibc-2.42-patches-9.tar.xz 86380 BLAKE2B ecc9869d2e3c5e33170c05dc02c47e033450e19f590e4eeb63a5735773fc81b907038a22a990412596505b0040b4378ecffef0eec1db43602d335408b15fcc4b SHA512 92a207e8de80914437e05d59ae070331afc5fe8f48459c0608961277150208f7e4eb73838b1cfdcb737ce9d7fb2b7b96711c33f134d213288316e10430a89fc9
-DIST glibc-2.42.tar.xz 19930508 BLAKE2B 6ffabfe7942034a5a4fb5097679cb47bc3431eb2a3864af07cea0cb6aa5db63fbaf6f026b3c9299e00268058a6762eb21e92499f012d552ed87d65c7ffbd0bbe SHA512 73a617db8e0f0958c0575f7a1c5a35b72b7e070b6cbdd02a9bb134995ca7ca0909f1e50d7362c53d2572d72f1879bb201a61d5275bac16136895d9a34ef0c068
-DIST glibc-2.42.tar.xz.sig 981 BLAKE2B 890e637c444982b2b07fac4607ce3e9f416c9c7688267ebd135e53878d93db95c609facfa1f347c59f23776cafb4b5df8ffb60235c89be451276202dd676dab2 SHA512 d868220778e98d24aead10a585e6a903892e4d043cd96a404634c8aa03d001d624a46a5c0fe13c86f83f66396a1f360a10990966fe377e98a722914b5087575d
-DIST glibc-2.43-patches-1.tar.xz 23328 BLAKE2B 4d7d719d234af725861b06eee6b86c269c88386efbd6dc411fa52c196b00541c07247ef8d0e2eea02d0369da0f09c440c8ccef4a03881aad568a84978eecb17e SHA512 33d260fcfe96e5b9bf85bd12cc8f83915b197b1bf512f6c06f8542df01803b1b5152dd2e60723b193ad26885fb1473f750d556a1abfe213d39d6df30ad19b9a1
-DIST glibc-2.43-patches-2.tar.xz 90172 BLAKE2B 9927b0bfc836597047e2c268a1d5c7b593f0be1e89f5ed5156c8bb34298f13bdd4d80fd813b4535442ce6d1c535753b6f3cbca4f3f0e9bdda890029e1e3d2de3 SHA512 363f815b41e9ffe809e1db61864efa4c61666e7033df95191d58da44582a64555cedb9197e6d6a8fb2a6c6f0609cf07ca5cab2ab2f840f723bbbc4a099d3d00e
-DIST glibc-2.43-patches-3.tar.xz 99856 BLAKE2B 4bc4b2fc9b23e7e2d295b8f87919ed676147d3520b27e773db48200768c3f6647a4383fcf8962881611d622ddbc71fe1bc3732fbb7df5c1968ea78ab047226a6 SHA512 0070d0b8552f8385e3133f522dfb563b9fa5f5663e1cce3c4b99a4e1d9da57a4c0305e3908f1c739f4e17113f4775b253af83fc8ee3885a0305aebc970314edf
-DIST glibc-2.43.tar.xz 20297012 BLAKE2B a764edf3d0d52809aa94cf1a8f73341159d226ecc2a595aa3c9e1d1fd4b2d4eb9a599d70bda8812b73d8ef58b39746efdd34026772e38c0f091fe071d461ea98 SHA512 25765f86bf54a22fc69dd13023ec9be59bd7e1f9d6ea1630cf21851898df2043bb8a01538c4b5fdd06495d0163289362b0768b391b0617f709b89a777168291c
-DIST glibc-2.43.tar.xz.sig 1018 BLAKE2B 99fb3f296795498f6de8090d537e32d8af0bfa75c7d8145ba4c35ca1b54c281fd2b9cb121886aef1800c0a6e508244914a2de67339d113561a9fc2c515110924 SHA512 6e26f0edee146710bcb73c3890c455e8b479009f99d284c43ea695b73bfe45e4ba47d1460300ce8c7496689b0c21a1c77e6359e005957973648b86755160c8f5
-DIST glibc-systemd-20210729.tar.gz 1480 BLAKE2B 37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979 SHA512 efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238
-DIST glibc-systemd-20210814.tar.gz 1469 BLAKE2B 10fa7bcb46d4fdce9c0ab353cbd30871e9b09a347a13a9c9a3b5777f931aa3c826c158d2e49532c604d4a834f2fab4089b67495fb88d0398945dc50d45ad9ef1 SHA512 5346a9ea459a1e6ccf665389f2a294de1e16f1e3e05cdf07e3dd99ed0e4f6f8b52cc333d4bff3c75ac90ab6ce70cd4ab2b3e126f920ce7979abd6dda56315efc
-DIST locale-gen-2.00.tar.gz 7738 BLAKE2B cde6de5ba3400aea24d0d5f1b79471f89f09fb747c8e371e38316c7ada92f967e0865f573f23cb353d82419c234724143c0aeca9eb70eb945dfc581cc7491eb1 SHA512 b609fddb9ec5e567c008841fef3390eddb5d6e7699a8271b3b8c0ade1b44b0ac2e5d1daa8b9acabf3432e3b88110b538a96f209b1ad0f9e988b7efce66606dff
-DIST locale-gen-2.10.tar.gz 7747 BLAKE2B 49f569c5ae5260fca128503bc6f22d6f6f1cda817920c41fdadadf1527bbb4f3eb161f79fa729830666a4673e9092f99f4685ec8fcac8ddea0b8242bca9c1f4f SHA512 e350e60d458d67638e3090711fca05af6fafac06c51b97648244549f8a0621dab7543f09dc7ad4c62392f13bdae8e5875dc6d0b6c3d83efc29d116bc2eef92db
-DIST locale-gen-2.22.tar.gz 7971 BLAKE2B 2dc66fa69bf51799d0c34459b654fba6998b80a7e322e9b670036c967e269ad921f50195e6e34c4a83c1f0bad191fd5aa3f37defb82271b73acbca07b7e49d08 SHA512 9798b10dbbc792345a7b7a121dec5f4bba9839a8aec010f01a09f3402fd5bf2376f79e03a6a19bc357010db780037a8811c381136ce19be1f1370374906dff38
-DIST locale-gen-2.23.tar.gz 7977 BLAKE2B bf2cc1fa05828a9133789133ce2d910662f1b5979269869cd76dac45831c45917700fc81357441fc7691af23196c6a6c3a28bb4440ceb6a5a3b17dbdc55c2bcc SHA512 f6b3daf3e2f10bc2f68626d8e7edc0f27eb0fe16bfe8840904a1b13d8fc76318d9f83277ee7fcb7a6db177413ba8a2cda94493e56d01df3a20ca37fed64e469c
diff --git a/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch b/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch
deleted file mode 100644
index 45e8ab80007e..000000000000
--- a/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Identify gcc-10+ as a good compiler.
-
-Index: work/glibc-2.19/configure
-===================================================================
---- glibc-2.19/configure
-+++ glibc-2.19/configure
-@@ -4710,7 +4710,7 @@ $as_echo_n "checking version of $CC... "
- ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-- 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* )
-+ 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* | [1-9][0-9].* )
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
-
diff --git a/sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch b/sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch
deleted file mode 100644
index 72a616a046a8..000000000000
--- a/sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-https://bugs.gentoo.org/503838
-http://gcc.gnu.org/PR60465
-https://sourceware.org/ml/libc-alpha/2015-12/msg00556.html
-https://trofi.github.io/posts/189-glibc-on-ia64-or-how-relocations-bootstrap.html
-
-newer versions of gcc generate relocations in the elf_get_dynamic_info func
-which glibc relies on to populate some info structs. those structs are then
-used by ldso to process relocations in itself. glibc requires that there are
-no relocations until that point (*after* elf_get_dynamic_info), so we end up
-crashing during elf_get_dynamic_info because the relocation has not yet been
-processed.
-
-this hack shuffles the code in a way that tricks gcc into not generating the
-relocation. we need to figure out something better for upstream.
-
---- a/elf/get-dynamic-info.h
-+++ b/elf/get-dynamic-info.h
-@@ -66,8 +66,12 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
- info[DT_VALTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
- + DT_VERSIONTAGNUM + DT_EXTRANUM] = dyn;
- else if ((d_tag_utype) DT_ADDRTAGIDX (dyn->d_tag) < DT_ADDRNUM)
-- info[DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
-- + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] = dyn;
-+ {
-+ d_tag_utype i =
-+ DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
-+ + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM;
-+ info[i] = dyn;
-+ }
- ++dyn;
- }
-
diff --git a/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch b/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch
deleted file mode 100644
index bf75f80cb7cc..000000000000
--- a/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-Remove newer symbols that does not work on linux-2.6.16.
-
-This is only for Prefix standalone.
-
-Index: glibc-2.19/io/sys/stat.h
-===================================================================
---- glibc-2.19.orig/io/sys/stat.h
-+++ glibc-2.19/io/sys/stat.h
-@@ -361,10 +361,6 @@ extern int mkfifoat (int __fd, const cha
- #ifdef __USE_ATFILE
- /* Set file access and modification times relative to directory file
- descriptor. */
--extern int utimensat (int __fd, const char *__path,
-- const struct timespec __times[2],
-- int __flags)
-- __THROW __nonnull ((2));
- #endif
-
- #ifdef __USE_XOPEN2K8
-Index: glibc-2.19/posix/unistd.h
-===================================================================
---- glibc-2.19.orig/posix/unistd.h
-+++ glibc-2.19/posix/unistd.h
-@@ -419,7 +419,6 @@ extern int pipe (int __pipedes[2]) __THR
- #ifdef __USE_GNU
- /* Same as pipe but apply flags passed in FLAGS to the new file
- descriptors. */
--extern int pipe2 (int __pipedes[2], int __flags) __THROW __wur;
- #endif
-
- /* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM.
-Index: glibc-2.19/sysdeps/unix/sysv/linux/x86/bits/epoll.h
-===================================================================
---- glibc-2.19.orig/sysdeps/unix/sysv/linux/x86/bits/epoll.h
-+++ glibc-2.19/sysdeps/unix/sysv/linux/x86/bits/epoll.h
-@@ -19,11 +19,5 @@
- # error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
- #endif
-
--/* Flags to be passed to epoll_create1. */
--enum
-- {
-- EPOLL_CLOEXEC = 02000000
--#define EPOLL_CLOEXEC EPOLL_CLOEXEC
-- };
-
- #define __EPOLL_PACKED __attribute__ ((__packed__))
-Index: glibc-2.19/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
-===================================================================
---- glibc-2.19.orig/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
-+++ glibc-2.19/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
-@@ -187,8 +187,6 @@
- # define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
- #endif
- #ifdef __USE_XOPEN2K8
--# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
-- close-on-exit set. */
- #endif
-
- /* For F_[GET|SET]FD. */
-Index: glibc-2.19/sysdeps/unix/sysv/linux/sys/epoll.h
-===================================================================
---- glibc-2.19.orig/sysdeps/unix/sysv/linux/sys/epoll.h
-+++ glibc-2.19/sysdeps/unix/sysv/linux/sys/epoll.h
-@@ -101,7 +101,6 @@ extern int epoll_create (int __size) __T
-
- /* Same as epoll_create but with an FLAGS parameter. The unused SIZE
- parameter has been dropped. */
--extern int epoll_create1 (int __flags) __THROW;
-
-
- /* Manipulate an epoll instance "epfd". Returns 0 in case of success,
-Index: glibc-2.19/time/sys/time.h
-===================================================================
---- glibc-2.19.orig/time/sys/time.h
-+++ glibc-2.19/time/sys/time.h
-@@ -140,8 +140,6 @@ extern int utimes (const char *__file, c
-
- #ifdef __USE_BSD
- /* Same as `utimes', but does not follow symbolic links. */
--extern int lutimes (const char *__file, const struct timeval __tvp[2])
-- __THROW __nonnull ((1));
-
- /* Same as `utimes', but takes an open file descriptor instead of a name. */
- extern int futimes (int __fd, const struct timeval __tvp[2]) __THROW;
diff --git a/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch b/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch
deleted file mode 100644
index 2b9ccceced22..000000000000
--- a/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Remove the pipe2 symbol from libc.so, otherwise meson will pick it up.
-
-This is a balance. We decide not to strip all the O_CLOEXEC, otherwise
-gtk+ will need to be patched.
-Index: glibc-2.19/sysdeps/unix/make-syscalls.sh
-===================================================================
---- glibc-2.19.orig/sysdeps/unix/make-syscalls.sh
-+++ glibc-2.19/sysdeps/unix/make-syscalls.sh
-@@ -131,6 +131,7 @@ emit_weak_aliases()
- echo " echo 'libc_hidden_def ($name)'; \\"
- ;;
- *)
-+ [ $name = pipe2 ] && continue
- echo " echo 'weak_alias ($strong, $name)'; \\"
- echo " echo 'libc_hidden_weak ($name)'; \\"
- ;;
diff --git a/sys-libs/glibc/files/2.35/glibc-2.35-make-4.4-MAKEFLAGS.patch b/sys-libs/glibc/files/2.35/glibc-2.35-make-4.4-MAKEFLAGS.patch
deleted file mode 100644
index 51fbe5f54074..000000000000
--- a/sys-libs/glibc/files/2.35/glibc-2.35-make-4.4-MAKEFLAGS.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=2d7ed98add14f75041499ac189696c9bd3d757fe
-https://bugs.gentoo.org/869263
-
-From 2d7ed98add14f75041499ac189696c9bd3d757fe Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyich@gmail.com>
-Date: Tue, 13 Sep 2022 13:39:13 -0400
-Subject: [PATCH] Makerules: fix MAKEFLAGS assignment for upcoming make-4.4
- [BZ# 29564]
-
-make-4.4 will add long flags to MAKEFLAGS variable:
-
- * WARNING: Backward-incompatibility!
- Previously only simple (one-letter) options were added to the MAKEFLAGS
- variable that was visible while parsing makefiles. Now, all options
- are available in MAKEFLAGS.
-
-This causes locale builds to fail when long options are used:
-
- $ make --shuffle
- ...
- make -C localedata install-locales
- make: invalid shuffle mode: '1662724426r'
-
-The change fixes it by passing eash option via whitespace and dashes.
-That way option is appended to both single-word form and whitespace
-separated form.
-
-While at it fixed --silent mode detection in $(MAKEFLAGS) by filtering
-out --long-options. Otherwise options like --shuffle flag enable silent
-mode unintentionally. $(silent-make) variable consolidates the checks.
-
-Resolves: BZ# 29564
-
-CC: Paul Smith <psmith@gnu.org>
-CC: Siddhesh Poyarekar <siddhesh@gotplt.org>
-Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
-Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
---- a/Makeconfig
-+++ b/Makeconfig
-@@ -43,6 +43,22 @@ else
- $(error objdir must be defined by the build-directory Makefile)
- endif
-
-+# Did we request 'make -s' run? "yes" or "no".
-+# Starting from make-4.4 MAKEFLAGS now contains long
-+# options like '--shuffle'. To detect presence of 's'
-+# we pick first word with short options. Long options
-+# are guaranteed to come after whitespace. We use '-'
-+# prefix to always have a word before long options
-+# even if no short options were passed.
-+# Typical MAKEFLAGS values to watch for:
-+# "rs --shuffle=42" (silent)
-+# " --shuffle" (not silent)
-+ifeq ($(findstring s, $(firstword -$(MAKEFLAGS))),)
-+silent-make := no
-+else
-+silent-make := yes
-+endif
-+
- # Root of the sysdeps tree.
- sysdep_dir := $(..)sysdeps
- export sysdep_dir := $(sysdep_dir)
-@@ -917,7 +933,7 @@ endif
- # umpteen zillion filenames along with it (we use `...' instead)
- # but we don't want this echoing done when the user has said
- # he doesn't want to see commands echoed by using -s.
--ifneq "$(findstring s,$(MAKEFLAGS))" "" # if -s
-+ifeq ($(silent-make),yes) # if -s
- +cmdecho := echo >/dev/null
- else # not -s
- +cmdecho := echo
---- a/Makerules
-+++ b/Makerules
-@@ -794,7 +794,7 @@ endif
- # Maximize efficiency by minimizing the number of rules.
- .SUFFIXES: # Clear the suffix list. We don't use suffix rules.
- # Don't define any builtin rules.
--MAKEFLAGS := $(MAKEFLAGS)r
-+MAKEFLAGS := $(MAKEFLAGS) -r
-
- # Generic rule for making directories.
- %/:
-@@ -811,7 +811,7 @@ MAKEFLAGS := $(MAKEFLAGS)r
- .PRECIOUS: $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c))
-
- # Use the verbose option of ar and tar when not running silently.
--ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s
-+ifeq ($(silent-make),no) # if not -s
- verbose := v
- else # -s
- verbose :=
---- a/elf/rtld-Rules
-+++ b/elf/rtld-Rules
-@@ -52,7 +52,7 @@ $(objpfx)rtld-libc.a: $(foreach dir,$(rtld-subdirs),\
- mv -f $@T $@
-
- # Use the verbose option of ar and tar when not running silently.
--ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s
-+ifeq ($(silent-make),no) # if not -s
- verbose := v
- else # -s
- verbose :=
diff --git a/sys-libs/glibc/files/glibc-2.41-m68k-malign.patch b/sys-libs/glibc/files/glibc-2.41-m68k-malign.patch
deleted file mode 100644
index 4db3ccd0716a..000000000000
--- a/sys-libs/glibc/files/glibc-2.41-m68k-malign.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-
-Found by Adrian Glaubitz (cbmuser)
-
-diff --git a/sysdeps/m68k/utmp-size.h b/sysdeps/m68k/utmp-size.h
-index 5946685819..8f21ebe1b6 100644
---- a/sysdeps/m68k/utmp-size.h
-+++ b/sysdeps/m68k/utmp-size.h
-@@ -1,3 +1,2 @@
--/* m68k has 2-byte alignment. */
--#define UTMP_SIZE 382
-+#define UTMP_SIZE 384
- #define LASTLOG_SIZE 292
-
-
diff --git a/sys-libs/glibc/files/glibc-2.43-hurd-CLOCK_MONOTONIC.patch b/sys-libs/glibc/files/glibc-2.43-hurd-CLOCK_MONOTONIC.patch
deleted file mode 100644
index 0e318b7b4509..000000000000
--- a/sys-libs/glibc/files/glibc-2.43-hurd-CLOCK_MONOTONIC.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 9fdd7c3b7c89ea240f24ad8d900639904c3064e5 Mon Sep 17 00:00:00 2001
-Message-ID: <9fdd7c3b7c89ea240f24ad8d900639904c3064e5.1774310363.git.sam@gentoo.org>
-From: Samuel Thibault <sthibault@debian.org>
-Date: Sat, 12 Nov 2011 14:03:09 +0000
-Subject: [PATCH 1/2] hurd: use normal clocks for raw & coarse clock
-
-Use the normal clocks for the raw & coarse clock for now.
-
-vlc doesn't build when _POSIX_CLOCK_SELECTION is enabled but _POSIX_TIMERS is
-not, and they refuse to fix that (see #765578), so disable the former.
-
-Imported-from: https://salsa.debian.org/glibc-team/glibc/-/blob/c2bff774aba6fc93eb9c3baef4746db56a2be24c/debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff
----
- rt/timer_create.c | 2 +-
- sysdeps/mach/clock_gettime.c | 3 +++
- sysdeps/mach/clock_nanosleep.c | 2 +-
- sysdeps/mach/hurd/bits/posix_opt.h | 4 ++--
- sysdeps/posix/clock_getres.c | 4 ++++
- 5 files changed, 11 insertions(+), 4 deletions(-)
-
-diff --git a/rt/timer_create.c b/rt/timer_create.c
-index 4f03dcb867..f8c57e1b50 100644
---- a/rt/timer_create.c
-+++ b/rt/timer_create.c
-@@ -47,7 +47,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
- return -1;
- }
-
-- if (clock_id != CLOCK_REALTIME)
-+ if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE)
- {
- __set_errno (EINVAL);
- return -1;
-diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c
-index 2e8b92b1e0..a04d85d1d7 100644
---- a/sysdeps/mach/clock_gettime.c
-+++ b/sysdeps/mach/clock_gettime.c
-@@ -33,6 +33,8 @@ __clock_gettime (clockid_t clock_id, struct timespec *ts)
- switch (clock_id) {
-
- case CLOCK_MONOTONIC:
-+ case CLOCK_MONOTONIC_RAW:
-+ case CLOCK_MONOTONIC_COARSE:
- /* If HAVE_HOST_GET_UPTIME64 is not defined or not available,
- CLOCK_MONOTONIC will be equivalent to CLOCK_REALTIME. */
- #ifdef HAVE_HOST_GET_UPTIME64
-@@ -56,6 +58,7 @@ __clock_gettime (clockid_t clock_id, struct timespec *ts)
- /* FALLTHROUGH */
-
- case CLOCK_REALTIME:
-+ case CLOCK_REALTIME_COARSE:
- {
- #ifdef HAVE_HOST_GET_TIME64
- time_value64_t tv_64;
-diff --git a/sysdeps/mach/clock_nanosleep.c b/sysdeps/mach/clock_nanosleep.c
-index 65b488d952..b8de6d40f6 100644
---- a/sysdeps/mach/clock_nanosleep.c
-+++ b/sysdeps/mach/clock_nanosleep.c
-@@ -67,7 +67,7 @@ int
- __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
- struct timespec *rem)
- {
-- if ((clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC)
-+ if ((clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE)
- || req->tv_sec < 0
- || !valid_nanoseconds (req->tv_nsec)
- || (flags != 0 && flags != TIMER_ABSTIME))
-diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h
-index a1a0707d25..c9f9d3ae5a 100644
---- a/sysdeps/mach/hurd/bits/posix_opt.h
-+++ b/sysdeps/mach/hurd/bits/posix_opt.h
-@@ -165,8 +165,8 @@
- /* The monotonic clock might be available. */
- #define _POSIX_MONOTONIC_CLOCK 200809L
-
--/* The clock selection interfaces are available. */
--#define _POSIX_CLOCK_SELECTION 200809L
-+/* The clock selection interfaces are not really available yet. */
-+#define _POSIX_CLOCK_SELECTION -1
-
- /* Advisory information interfaces could be available in future. */
- #define _POSIX_ADVISORY_INFO 0
-diff --git a/sysdeps/posix/clock_getres.c b/sysdeps/posix/clock_getres.c
-index 2c5adcd0e9..4d171aa5ad 100644
---- a/sysdeps/posix/clock_getres.c
-+++ b/sysdeps/posix/clock_getres.c
-@@ -55,6 +55,10 @@ __clock_getres (clockid_t clock_id, struct timespec *res)
- switch (clock_id)
- {
- case CLOCK_REALTIME:
-+ case CLOCK_MONOTONIC:
-+ case CLOCK_MONOTONIC_RAW:
-+ case CLOCK_REALTIME_COARSE:
-+ case CLOCK_MONOTONIC_COARSE:
- retval = realtime_getres (res);
- break;
-
---
-2.53.0
-
diff --git a/sys-libs/glibc/files/glibc-2.43-hurd-ldconfig.patch b/sys-libs/glibc/files/glibc-2.43-hurd-ldconfig.patch
deleted file mode 100644
index 252fc6b7af8b..000000000000
--- a/sys-libs/glibc/files/glibc-2.43-hurd-ldconfig.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From c4d83b933e688fabc0ef24c770ac04df88cebb9d Mon Sep 17 00:00:00 2001
-Message-ID: <c4d83b933e688fabc0ef24c770ac04df88cebb9d.1774310363.git.sam@gentoo.org>
-In-Reply-To: <9fdd7c3b7c89ea240f24ad8d900639904c3064e5.1774310363.git.sam@gentoo.org>
-References: <9fdd7c3b7c89ea240f24ad8d900639904c3064e5.1774310363.git.sam@gentoo.org>
-From: Jeff Bailey <jbailey@nisa.net>
-Date: Fri, 25 Apr 2003 03:40:46 +0000
-Subject: [PATCH 2/2] hurd: enable ldconfig
-
-DP: Description: Enable ldconfig and such on hurd-i386
-DP: Author: Jeff Bailey <jbailey@nisa.net>
-DP: Upstream status: Not submitted
-DP: Status Details: Upstream disagrees with this patch, but I'm
-DP: putting it in so that we have expected Debian behaviour on the
-DP: Hurd. We should review this when the ELF standard supports runpath.
-DP: Date: 08 Apr 2003
-Imported-from: https://salsa.debian.org/glibc-team/glibc/-/blob/93d5069240943c4dcc950f6255028f7d1fcc2df0/debian/patches/hurd-i386/local-enable-ldconfig.diff
----
- sysdeps/mach/hurd/configure | 3 ++-
- sysdeps/mach/hurd/configure.ac | 2 ++
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure
-index 743bad5fcb..44ba9ff0f5 100644
---- a/sysdeps/mach/hurd/configure
-+++ b/sysdeps/mach/hurd/configure
-@@ -222,4 +222,5 @@ fi
- pthread_in_libc=no
- # Hurd already provides abort implementation for the loader
- abort_in_ld=yes
--
-+# We want ldconfig
-+use_ldconfig=yes
-diff --git a/sysdeps/mach/hurd/configure.ac b/sysdeps/mach/hurd/configure.ac
-index 6d33feed0e..30fef74bed 100644
---- a/sysdeps/mach/hurd/configure.ac
-+++ b/sysdeps/mach/hurd/configure.ac
-@@ -50,3 +50,5 @@ fi
- pthread_in_libc=no
- # Hurd already provides abort implementation for the loader
- abort_in_ld=yes
-+# We want ldconfig
-+use_ldconfig=yes
---
-2.53.0
-
diff --git a/sys-libs/glibc/files/glibc-2.43-hurd-link-helpers.patch b/sys-libs/glibc/files/glibc-2.43-hurd-link-helpers.patch
deleted file mode 100644
index 24a3fc887dff..000000000000
--- a/sys-libs/glibc/files/glibc-2.43-hurd-link-helpers.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-https://salsa.debian.org/glibc-team/glibc/-/raw/sid/debian/patches/hurd-i386/tg-mach-hurd-link.diff
-
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Subject: [PATCH] Add -lmachuser -lhurduser to libc.so on GNU/Hurd.
-
-http://lists.gnu.org/archive/html/bug-hurd/2011-03/msg00112.html
-
-2011-03-29 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * Makerules ($(inst_libdir)/libc.so): Add -lmachuser -lhurduser to
- libc.so on GNU/Hurd.
-
-It's still unclear what we want to aim for.
-
----
- Makerules | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/Makerules b/Makerules
-index 53eabfaba8..b0f5e1b3a0 100644
---- a/Makerules
-+++ b/Makerules
-@@ -1066,6 +1066,9 @@ $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
- ' AS_NEEDED (' $(rtlddir)/$(rtld-installed-name) ') )' \
- ) > $@.new
-+ifeq ($(patsubst gnu%,,$(config-os)),)
-+ echo 'INPUT ( AS_NEEDED ( -lmachuser -lhurduser ) )' >> $@.new
-+endif
- mv -f $@.new $@
-
- endif
---
-tg: (7bb5f8a836..) t/mach-hurd-link (depends on: baseline)
diff --git a/sys-libs/glibc/files/host.conf-1 b/sys-libs/glibc/files/host.conf-1
deleted file mode 100644
index 661b4af5d959..000000000000
--- a/sys-libs/glibc/files/host.conf-1
+++ /dev/null
@@ -1,23 +0,0 @@
-# /etc/host.conf:
-
-# The file /etc/host.conf contains configuration information specific to
-# the resolver library. It should contain one configuration keyword per
-# line, followed by appropriate configuration information. The keywords
-# recognized are order, trim, mdns, multi, nospoof, spoof, and reorder.
-
-
-
-# This keyword specifies how host lookups are to be performed. It
-# should be followed by one or more lookup methods, separated by
-# commas. Valid methods are bind, hosts, and nis.
-#
-order hosts, bind
-
-
-# Valid values are on and off. If set to on, the resolv+ library
-# will return all valid addresses for a host that appears in the
-# /etc/hosts file, instead of only the first. This is off by
-# default, as it may cause a substantial performance loss at sites
-# with large hosts files.
-#
-multi off
diff --git a/sys-libs/glibc/files/nscd-1 b/sys-libs/glibc/files/nscd-1
deleted file mode 100644
index f69c8e2eacd0..000000000000
--- a/sys-libs/glibc/files/nscd-1
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-description="The 'Name Service Cache Daemon' is a daemon that provides a cache"
-description="${description} for the most common name service requests"
-
-extra_started_commands="flush_all flush_hosts flush_group flush_passwd flush_netgroup flush_services"
-
-description_flush_all="Will invalidate hosts, group, passwd, netgroup and services cache"
-description_flush_hosts="Will invalidate hosts cache"
-description_flush_group="Will invalidate group cache"
-description_flush_passwd="Will invalidate passwd cache"
-description_flush_netgroup="Will invalidate netgroup cache"
-description_flush_services="Will invalidate services cache"
-
-pidfile="/run/nscd/nscd.pid"
-command="/usr/sbin/nscd"
-
-depend() {
- use dns ldap net slapd logger
-}
-
-checkconfig() {
- if [ ! -d /run/nscd ] ; then
- checkpath -d -m 755 /run/nscd
- fi
-
- if [ -z "${NSCD_PERMS_OK}" ] && [ "$(stat -c %a /run/nscd)" != "755" ] ; then
- ewarn "nscd run dir is not world readable, you should reset the perms:"
- ewarn "chmod 755 /run/nscd"
- ewarn "chmod a+rw /run/nscd/socket"
- ewarn "To disable this warning, set 'NSCD_PERMS_OK' in /etc/conf.d/nscd"
- fi
-
- if grep -qs '^[[:space:]]*persistent\>' /etc/nscd.conf ; then
- checkpath -d -m 700 /var/db/nscd
- fi
-}
-
-_flush() {
- local table=$1
-
- ebegin "Flushing ${table} table"
- ${command} --invalidate ${table}
- eend $?
-}
-
-flush_all() {
- local has_errors=0
-
- ebegin "Flushing all caches"
-
- local table=
- for table in passwd group hosts netgroup services; do
- ${command} --invalidate ${table}
- [ $? -ne 0 ] && has_errors=1
- done
-
- eend ${has_errors}
-}
-
-flush_hosts() {
- _flush hosts
-}
-
-flush_group() {
- _flush group
-}
-
-flush_passwd() {
- _flush passwd
-}
-
-flush_netgroup() {
- _flush netgroup
-}
-
-flush_services() {
- _flush services
-}
-
-start_pre() {
- checkconfig
-}
diff --git a/sys-libs/glibc/files/nscd.service b/sys-libs/glibc/files/nscd.service
deleted file mode 100644
index 25a3b1d9be0a..000000000000
--- a/sys-libs/glibc/files/nscd.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Name Service Cache Daemon
-After=network.target
-
-[Service]
-ExecStart=/usr/sbin/nscd -F
-ExecStop=/usr/sbin/nscd --shutdown
-ExecReload=/usr/sbin/nscd -i passwd
-ExecReload=/usr/sbin/nscd -i group
-ExecReload=/usr/sbin/nscd -i hosts
-ExecReload=/usr/sbin/nscd -i services
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
diff --git a/sys-libs/glibc/files/nscd.tmpfilesd b/sys-libs/glibc/files/nscd.tmpfilesd
deleted file mode 100644
index 52edbba673cf..000000000000
--- a/sys-libs/glibc/files/nscd.tmpfilesd
+++ /dev/null
@@ -1,4 +0,0 @@
-# Configuration to create /run/nscd directory
-# Used as part of systemd's tmpfiles
-
-d /run/nscd 0755 root root
diff --git a/sys-libs/glibc/glibc-2.19-r3.ebuild b/sys-libs/glibc/glibc-2.19-r3.ebuild
deleted file mode 100644
index fe1c3e5654bb..000000000000
--- a/sys-libs/glibc/glibc-2.19-r3.ebuild
+++ /dev/null
@@ -1,1350 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-TMPFILES_OPTIONAL=1
-
-inherit prefix toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing tmpfiles
-
-DESCRIPTION="GNU libc C library"
-HOMEPAGE="https://www.gnu.org/software/libc/"
-
-LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
-SLOT="2.2"
-
-EMULTILIB_PKG="true"
-
-if [[ ${PV} == 9999* ]]; then
- EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
- inherit git-r3
-else
- KEYWORDS="~amd64"
- SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
-fi
-
-RELEASE_VER=${PV}
-
-GCC_BOOTSTRAP_VER="4.7.3-r1"
-
-# Gentoo patchset
-PATCH_VER=9
-
-SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.bz2"
-SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2 )"
-
-IUSE="audit caps compile-locales +crypt debug doc gd headers-only multilib nscd profile selinux suid systemtap vanilla"
-
-# Yes this is a hack. It's always on here and we want to be able
-# to simplify the dependencies...
-REQUIRED_USE="crypt"
-
-# Minimum kernel version that glibc requires
-# hppa requires 2.6.20
-MIN_KERN_VER="2.6.16"
-
-# Here's how the cross-compile logic breaks down ...
-# CTARGET - machine that will target the binaries
-# CHOST - machine that will host the binaries
-# CBUILD - machine that will build the binaries
-# If CTARGET != CHOST, it means you want a libc for cross-compiling.
-# If CHOST != CBUILD, it means you want to cross-compile the libc.
-# CBUILD = CHOST = CTARGET - native build/install
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
-# For install paths:
-# CHOST = CTARGET - install into /
-# CHOST != CTARGET - install into /usr/CTARGET/
-#
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-# Note [Disable automatic stripping]
-# Disabling automatic stripping for a few reasons:
-# - portage's attempt to strip breaks non-native binaries at least on
-# arm: bug #697428
-# - portage's attempt to strip libpthread.so.0 breaks gdb thread
-# enumeration: bug #697910. This is quite subtle:
-# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
-# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
-# via 'ps_pglobal_lookup' symbol defined in gdb.
-# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
-# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
-# (unexported) is used to sanity check compatibility before enabling
-# debugging.
-# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
-# * normal 'strip' command trims '.symtab'
-# Thus our main goal here is to prevent 'libpthread.so.0' from
-# losing it's '.symtab' entries.
-# As Gentoo's strip does not allow us to pass less aggressive stripping
-# options and does not check the machine target we disable stripping
-# entirely.
-RESTRICT=strip
-
-# We need a new-enough binutils/gcc to match upstream baseline.
-# Also we need to make sure our binutils/gcc supports TLS.
-COMMON_DEPEND="
- 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}
- >=app-misc/pax-utils-0.1.10
- doc? ( sys-apps/texinfo )
-"
-RDEPEND="${COMMON_DEPEND}
- sys-apps/gentoo-functions
-"
-
-if [[ ${CATEGORY} == cross-* ]] ; then
- DEPEND+=" !headers-only? (
- >=${CATEGORY}/binutils-2.24
- >=${CATEGORY}/gcc-4.9
- )"
- [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
-else
- DEPEND+="
- >=sys-devel/binutils-2.24
- >=sys-devel/gcc-4.9
- virtual/os-headers
- "
- RDEPEND+=" vanilla? ( !sys-libs/timezone-data )"
- PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
-fi
-
-#
-# Small helper functions
-#
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-just_headers() {
- is_crosscompile && use headers-only
-}
-
-alt_prefix() {
- is_crosscompile && echo /usr/${CTARGET}
-}
-
-# We need to be able to set alternative headers for compiling for non-native
-# platform. Will also become useful for testing kernel-headers without screwing
-# up the whole system.
-alt_headers() {
- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
-}
-
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS="${EPREFIX}$(alt_headers)"
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- echo $(alt_prefix)/$(get_libdir)
-}
-alt_usrlibdir() {
- echo $(alt_prefix)/usr/$(get_libdir)
-}
-
-builddir() {
- echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
-}
-
-do_compile_test() {
- local ret save_cflags=${CFLAGS}
- CFLAGS+=" $1"
- shift
-
- pushd "${T}" >/dev/null
-
- rm -f glibc-test*
- printf '%b' "$*" > glibc-test.c
-
- nonfatal emake -s 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' 2>/dev/null ; then
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- filter-flags '-march=*'
- export CFLAGS="-march=${t} ${CFLAGS}"
- einfo "Auto adding -march=${t} to CFLAGS #185404"
- fi
- ;;
- amd64)
- # -march needed for #185404 #199334
- # Note: This test only matters when the x86 ABI is enabled, so we could
- # optimize a bit and elide it.
- # TODO: See cross-compile issues listed above for x86.
- if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' 2>/dev/null ; 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"
- fi
- ;;
- mips)
- # The mips abi cannot support the GNU style hashes. #233233
- filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
-
- # If the CHOST is the basic one (e.g. not sparcv9-xxx already),
- # try to pick a better one so glibc can use cpu-specific .S files.
- # We key off the CFLAGS to get a good value. Also need to handle
- # version skew.
- # We can't force users to set their CHOST to their exact machine
- # as many of these are not recognized by config.sub/gcc and such :(.
- # Note: If the mcpu values don't scale, we might try probing CPP defines.
- # Note: Should we factor in -Wa,-AvXXX flags too ? Or -mvis/etc... ?
-
- local cpu
- case ${CTARGET} in
- sparc64-*)
- case $(get-flag mcpu) in
- niagara[234])
- cpu="sparc64v2"
- ;;
- niagara)
- cpu="sparc64v"
- ;;
- ultrasparc3)
- cpu="sparc64b"
- ;;
- *)
- # 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
- [[ -z ${cpu} ]] && append-flags "-Wa,-xarch=v9a"
- ;;
- esac
- ;;
- sparc-*)
- case $(get-flag mcpu) in
- niagara[234])
- cpu="sparcv9v2"
- ;;
- niagara)
- cpu="sparcv9v"
- ;;
- ultrasparc3)
- cpu="sparcv9b"
- ;;
- v9|ultrasparc)
- cpu="sparcv9"
- ;;
- v8|supersparc|hypersparc|leon|leon3)
- cpu="sparcv8"
- ;;
- 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}
-
- # 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
- strip-unsupported-flags
- filter-lto
- filter-flags -m32 -m64 '-mabi=*'
-
- # glibc aborts if rpath is set by LDFLAGS
- filter-ldflags '-Wl,-rpath=*'
-
- # 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'
-
- # #492892
- filter-flags -frecord-gcc-switches
-
- unset CBUILD_OPT CTARGET_OPT
- if use multilib ; then
- CTARGET_OPT=$(get_abi_CTARGET)
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
- fi
-
- setup_target_flags
-
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
- CBUILD_OPT=${CTARGET_OPT}
- fi
-
- # Lock glibc at -O2; we want to be conservative here.
- # -fno-strict-aliasing is to work around #155906.
- filter-flags '-O?'
- append-flags -O2 -fno-strict-aliasing
-
- filter-flags '-fstack-protector*'
- append-flags '-fno-stack-protector'
-}
-
-want_tls() {
- # Archs that can use TLS (Thread Local Storage)
- case $(tc-arch) in
- x86)
- # requires i486 or better #106556
- [[ ${CTARGET} == i[4567]86* ]] && return 0
- return 1
- ;;
- esac
- return 0
-}
-
-want__thread() {
- want_tls || return 1
-
- # For some reason --with-tls --with__thread is causing segfaults on sparc32.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
-
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
-
- # only test gcc -- can't test linking yet
- tc-has-tls -c ${CTARGET}
- WANT__THREAD=$?
-
- return ${WANT__THREAD}
-}
-
-# 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}}
- fi
-
- setup_flags
-
- export ABI=${ABI:-${DEFAULT_ABI:-default}}
-
- local VAR=CFLAGS_${ABI}
- # We need to export CFLAGS with abi information in them because glibc's
- # configure script checks CFLAGS for some targets (like mips). Keep
- # around the original clean value to avoid appending multiple ABIs on
- # top of each other.
- : ${__GLIBC_CC:=$(tc-getCC ${CTARGET_OPT:-${CTARGET}})}
- export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}"
-}
-
-foreach_abi() {
- setup_env
-
- local ret=0
- local abilist=""
- if use multilib ; then
- abilist=$(get_install_abis)
- else
- abilist=${DEFAULT_ABI}
- fi
- local -x ABI
- for ABI in ${abilist:-default} ; do
- setup_env
- einfo "Running $1 for ABI ${ABI}"
- $1
- : $(( ret |= $? ))
- done
- return ${ret}
-}
-
-glibc_banner() {
- local b="Gentoo ${PVR}"
- [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}"
- echo "${b}"
-}
-
-check_devpts() {
- # Make sure devpts is mounted correctly for use w/out setuid pt_chown.
-
- # If merely building the binary package, then there's nothing to verify.
- [[ ${MERGE_TYPE} == "buildonly" ]] && return
-
- # Only sanity check when installing the native glibc.
- [[ -n ${ROOT} ]] && return
-
- # If they're opting in to the old suid code, then no need to check.
- use suid && return
-
- if awk '$3 == "devpts" && $4 ~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; then
- eerror "In order to use glibc with USE=-suid, you must make sure that"
- eerror "you have devpts mounted at /dev/pts with the gid=5 option."
- eerror "Openrc should do this for you, so you should check /etc/fstab"
- eerror "and make sure you do not have any invalid settings there."
- die "mount & fix your /dev/pts settings"
- fi
-}
-
-# 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 "${EPREFIX}/$(alt_build_headers)" - | \
- tail -n 1
-}
-
-# We collect all sanity checks here. Consistency is not guranteed between
-# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
-# src_unpack.
-sanity_prechecks() {
- # Make sure devpts is mounted correctly for use w/out setuid pt_chown
- check_devpts
-
- # 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
-
- # Users have had a chance to phase themselves, time to give em the boot
- if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then
- eerror "You still haven't deleted ${EROOT}/etc/locales.build."
- eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher."
- die "Lazy upgrader detected"
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml"
- die "Please fix your CHOST"
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty when running with a 32bit"
- ewarn "hypervisor, which is probably not what you want."
- fi
-
- # Check for sanity of /etc/nsswitch.conf
- if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then
- local entry
- for entry in passwd group shadow; do
- if ! grep -E -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then
- eerror "Your ${EROOT}/etc/nsswitch.conf is out of date."
- eerror "Please make sure you have 'files' entries for"
- eerror "'passwd:', 'group:' and 'shadow:' databases."
- eerror "For more details see:"
- eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26"
- die "nsswitch.conf has no 'files' provider in '${entry}'."
- fi
- done
- fi
-
- # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
- # we test for...
- if ! is_crosscompile && ! tc-is-cross-compiler ; 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 ; 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}
-
- ebegin "Checking gcc for __thread support"
- if ! eend $(want__thread ; echo $?) ; then
- echo
- eerror "Could not find a gcc that supports the __thread directive!"
- eerror "Please update your binutils/gcc and try again."
- die "No __thread support in gcc!"
- fi
-
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- # Building fails on an non-supporting kernel
- ebegin "Checking running kernel version (${run_kv} >= ${want_kv})"
- if ! eend_KV ${run_kv} ${want_kv} ; then
- echo
- eerror "You need a kernel of at least ${want_kv}!"
- die "Kernel version too low!"
- fi
- fi
-
- ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})"
- if ! eend_KV ${build_kv} ${want_kv} ; then
- echo
- eerror "You need linux-headers of at least ${want_kv}!"
- die "linux-headers version too low!"
- fi
- fi
-}
-
-#
-# the phases
-#
-
-# pkg_pretend
-
-pkg_pretend() {
- # All the checks...
- einfo "Checking general environment sanity."
- sanity_prechecks
-}
-
-# src_unpack
-
-src_unpack() {
- # Consistency is not guaranteed between pkg_ and src_ ...
- sanity_prechecks
-
- use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2
-
- setup_env
-
- if [[ -n ${EGIT_REPO_URI} ]] ; then
- git-r3_src_unpack
- else
- unpack ${P}.tar.xz
- fi
-
- cd "${S}" || die
- touch locale/C-translit.h || die #185476 #218003
-
- cd "${WORKDIR}" || die
- unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2
-}
-
-src_prepare() {
- if ! use vanilla ; then
- elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}"
- eapply "${WORKDIR}"/patches
- einfo "Done."
- fi
-
- if just_headers ; then
- if [[ -e ports/sysdeps/mips/preconfigure ]] ; then
- # mips peeps like to screw with us. if building headers,
- # we don't have a real compiler, so we can't let them
- # insert -mabi on us.
- sed -i '/CPPFLAGS=.*-mabi/s|.*|:|' ports/sysdeps/mips/preconfigure || die
- find ports/sysdeps/mips/ -name Makefile -exec sed -i '/^CC.*-mabi=/s:-mabi=.*:-D_MIPS_SZPTR=32:' {} +
- fi
- fi
-
- default
-
- gnuconfig_update
-
- eapply "${FILESDIR}"/2.19/glibc-2.19-kernel-2.6.16-compat.patch
- eapply "${FILESDIR}"/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch
- eapply "${FILESDIR}"/2.19/glibc-2.19-gcc-10.patch
-
- cd "${WORKDIR}"
- find . -name configure -exec touch {} +
-
- eprefixify extra/locale/locale-gen
-
- # Fix permissions on some of the scripts.
- chmod u+x "${S}"/scripts/*.sh
-}
-
-glibc_do_configure() {
- # glibc does not work with non-bfd (for various reasons):
- # * gold (bug #269274)
- # * mold (bug #860900)
- tc-ld-force-bfd
-
- # CXX isnt handled by the multilib system, so if we dont unset here
- # we accumulate crap across abis
- unset CXX
-
- einfo "Configuring glibc for nptl"
-
- if use doc ; then
- export MAKEINFO=makeinfo
- else
- export MAKEINFO=/dev/null
- fi
-
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO ; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
-
- # The glibc configure script doesn't properly use LDFLAGS all the time.
- export CC="$(tc-getCC ${CTARGET}) ${LDFLAGS}"
- einfo " $(printf '%15s' 'Manual CC:') ${CC}"
-
- # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
- export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS)"
- einfo " $(printf '%15s' 'Manual CXX:') ${CXX}"
-
- echo
-
- local myconf=()
-
- case ${CTARGET} in
- powerpc-*)
- # Currently gcc on powerpc32 generates invalid code for
- # __builtin_return_address(0) calls. Normally programs
- # don't do that but malloc hooks in glibc do:
- # https://gcc.gnu.org/PR81996
- # https://bugs.gentoo.org/629054
- myconf+=( --enable-stack-protector=no )
- ;;
- *)
- myconf+=( --enable-stack-protector=all )
- ;;
- esac
- myconf+=( --enable-stackguard-randomization )
-
- # Keep a whitelist of targets supporing IFUNC. glibc's ./configure
- # is not robust enough to detect proper support:
- # https://bugs.gentoo.org/641216
- # https://sourceware.org/PR22634#c0
- case $(tc-arch ${CTARGET}) in
- # Keep whitelist of targets where autodetection mostly works.
- amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;;
- # Blacklist everywhere else
- *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
- esac
-
- [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
-
- myconf+=( --enable-kernel=${MIN_KERN_VER} )
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. only for the primary ABI on multilib systems
- # 3. Not a crosscompile
- if ! is_crosscompile && use selinux ; then
- if use multilib ; then
- if is_final_abi ; then
- myconf+=( --with-selinux )
- else
- myconf+=( --without-selinux )
- fi
- else
- myconf+=( --with-selinux )
- fi
- else
- myconf+=( --without-selinux )
- fi
-
- # Force a few tests where we always know the answer but
- # configure is incapable of finding it.
- if is_crosscompile ; then
- export \
- libc_cv_c_cleanup=yes \
- libc_cv_forced_unwind=yes
- fi
-
- myconf+=(
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- $(use_with gd)
- --with-headers=$(alt_build_headers)
- --prefix="${EPREFIX}/usr"
- --sysconfdir="${EPREFIX}/etc"
- --localstatedir="${EPREFIX}/var"
- --libdir='$(prefix)'/$(get_libdir)
- --mandir='$(prefix)'/share/man
- --infodir='$(prefix)'/share/info
- --libexecdir='$(libdir)'/misc/glibc
- --with-bugurl=https://bugs.gentoo.org/
- --with-pkgversion="$(glibc_banner)"
- $(use_enable systemtap)
- $(use_enable nscd)
- ${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="${EPREFIX}/sbin"
- export libc_cv_slibdir="${EPREFIX}/$(get_libdir)"
-
- # We take care of patching our binutils to use both hash styles,
- # and many people like to force gnu hash style only, so disable
- # this overriding check. #347761
- export libc_cv_hashstyle=no
-
- local builddir=$(builddir nptl)
- mkdir -p "${builddir}"
- cd "${builddir}"
- set -- "${S}"/configure "${myconf[@]}"
- echo "$@"
- "$@" || die "failed to configure glibc"
-
- # ia64 static cross-compilers are a pita in so much that they
- # can't produce static ELFs (as the libgcc.a is broken). so
- # disable building of the programs for those targets if it
- # doesn't work.
- # XXX: We could turn this into a compiler test, but ia64 is
- # the only one that matters, so this should be fine for now.
- if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
- sed -i '1i+link-static = touch $@' config.make
- fi
-
- # If we're trying to migrate between ABI sets, we need
- # to lie and use a local copy of gcc. Like if the system
- # is built with MULTILIB_ABIS="amd64 x86" but we want to
- # add x32 to it, gcc/glibc don't yet support x32.
- #
- if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then
- echo 'int main(){}' > "${T}"/test.c
- if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
- sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
- fi
- fi
-}
-
-glibc_headers_configure() {
- export ABI=default
-
- local builddir=$(builddir "headers")
- mkdir -p "${builddir}"
- cd "${builddir}"
-
- # if we don't have a compiler yet, we can't really test it now ...
- # hopefully they don't affect header generation, so let's hope for
- # the best here ...
- local v vars=(
- ac_cv_header_cpuid_h=yes
- libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
- libc_cv_asm_cfi_directives=yes
- libc_cv_broken_visibility_attribute=no
- libc_cv_c_cleanup=yes
- libc_cv_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_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
-
- # 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=()
- myconf+=(
- --disable-sanity-checks
- --enable-hacker-mode
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(alt_build_headers)
- --prefix="${EPREFIX}/usr"
- ${EXTRA_ECONF}
- )
-
- # Nothing is compiled here which would affect the headers for the target.
- # So forcing CC/CFLAGS is sane.
- set -- "${S}"/configure "${myconf[@]}"
- echo "$@"
- CC="$(tc-getBUILD_CC)" \
- CFLAGS="-O1 -pipe" \
- CPPFLAGS="-U_FORTIFY_SOURCE" \
- LDFLAGS="" \
- "$@" || die "failed to configure glibc"
-}
-
-do_src_configure() {
- if just_headers ; then
- glibc_headers_configure
- else
- glibc_do_configure nptl
- fi
-}
-
-src_configure() {
- foreach_abi do_src_configure
-}
-
-do_src_compile() {
- emake -C "$(builddir nptl)"
-}
-
-src_compile() {
- if just_headers ; then
- return
- fi
-
- foreach_abi do_src_compile
-}
-
-glibc_src_test() {
- cd "$(builddir nptl)"
- emake check
-}
-
-do_src_test() {
- local ret=0
-
- glibc_src_test
- : $(( ret |= $? ))
-
- return ${ret}
-}
-
-src_test() {
- # Give tests more time to complete.
- export TIMEOUTFACTOR=5
-
- foreach_abi do_src_test || die "tests failed"
-}
-
-run_locale_gen() {
- local prefix=$1 user_config config
- local -a localegen_args
-
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
-
- localegen_args=( --config "${config}" --destdir "${prefix}" )
-
- # 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- locale-gen "${localegen_args[@]}"
-}
-
-glibc_do_src_install() {
- local builddir=$(builddir nptl)
- cd "${builddir}"
-
- emake install_root="${D}/$(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)
-
- 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'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
- # 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
-
- # 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.
- cd "${ED}"$(alt_libdir)/..
- [[ -e lib ]] || mkdir lib
- cd "${ED}"$(alt_usrlibdir)/..
- [[ -e lib ]] || mkdir lib
-
- dosym usr/include $(alt_prefix)/sys-include
- return 0
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen
- doman *.[0-8]
- insinto /etc
- doins locale.gen
-
- # Make sure all the ABI's can find the locales and so we only
- # have to generate one set
- local a
- keepdir /usr/$(get_libdir)/locale
- for a in $(get_install_abis) ; do
- if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then
- dosym ../$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale
- fi
- done
-
- cd "${S}"
-
- # Install misc network config files
- insinto /etc
- doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf
- doins "${WORKDIR}"/extra/etc/*.conf
-
- if use nscd ; then
- doinitd "$(prefixify_ro "${WORKDIR}"/extra/etc/nscd)"
-
- local nscd_args=(
- -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
- )
-
- sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
-
- systemd_dounit nscd/nscd.service
- newtmpfiles nscd/nscd.tmpfiles nscd.conf
- else
- # Do this since extra/etc/*.conf above might have nscd.conf.
- rm -f "${ED}"/etc/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
-
- # 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
- if ! run_locale_gen "${ED}"; then
- die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- fi
-}
-
-glibc_headers_install() {
- local builddir=$(builddir "headers")
- cd "${builddir}"
- emake install_root="${D}/$(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
-}
-
-# Simple test to make sure our new glibc isn't completely broken.
-# Make sure we don't test with statically built binaries since
-# they will fail. Also, skip if this glibc is a cross compiler.
-#
-# If coreutils is built with USE=multicall, some of these files
-# will just be wrapper scripts, not actual ELFs we can test.
-glibc_sanity_check() {
- cd / #228809
-
- # We enter ${ED} so to avoid trouble if the path contains
- # special characters; for instance if the path contains the
- # colon character (:), then the linker will try to split it
- # and look for the libraries in an unexpected place. This can
- # lead to unsafe code execution if the generated prefix is
- # within a world-writable directory.
- # (e.g. /var/tmp/portage:${HOSTNAME})
- pushd "${ED}"/$(get_libdir) >/dev/null
-
- local x striptest
- for x in cal date env free ls true uname uptime ; do
- x=$(type -p ${x})
- [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
- case ${striptest} in
- *"statically linked"*) continue;;
- *"ASCII text"*) continue;;
- esac
- # We need to clear the locale settings as the upgrade might want
- # incompatible locale data. This test is not for verifying that.
- LC_ALL=C \
- ./ld-*.so --library-path . ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-
- popd >/dev/null
-}
-
-pkg_preinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- # prepare /etc/ld.so.conf.d/ for files
- mkdir -p "${EROOT}"/etc/ld.so.conf.d
-
- # Default /etc/hosts.conf:multi to on for systems with small dbs.
- if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
- sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
- einfo "Defaulting /etc/host.conf:multi to on"
- fi
-
- [[ -n ${ROOT} ]] && return 0
- [[ -d ${ED}/$(get_libdir) ]] || return 0
- [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
-}
-
-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
- if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
- ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- fi
-
- # Check for sanity of /etc/nsswitch.conf, take 2
- if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
- local entry
- for entry in passwd group shadow; do
- if 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
-}
diff --git a/sys-libs/glibc/glibc-2.31-r7.ebuild b/sys-libs/glibc/glibc-2.31-r7.ebuild
deleted file mode 100644
index 5703d7c680e5..000000000000
--- a/sys-libs/glibc/glibc-2.31-r7.ebuild
+++ /dev/null
@@ -1,1515 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{13..14} )
-TMPFILES_OPTIONAL=1
-
-inherit python-any-r1 prefix toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing tmpfiles
-
-DESCRIPTION="GNU libc C library"
-HOMEPAGE="https://www.gnu.org/software/libc/"
-LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
-SLOT="2.2"
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=9
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
- inherit git-r3
-else
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
- SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
- SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
-fi
-
-RELEASE_VER=${PV}
-
-GCC_BOOTSTRAP_VER=20180511
-
-LOCALE_GEN_VER=2.00
-
-SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
-SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
-
-IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla"
-
-# Minimum kernel version that glibc requires
-MIN_KERN_VER="3.2.0"
-
-# Here's how the cross-compile logic breaks down ...
-# CTARGET - machine that will target the binaries
-# CHOST - machine that will host the binaries
-# CBUILD - machine that will build the binaries
-# If CTARGET != CHOST, it means you want a libc for cross-compiling.
-# If CHOST != CBUILD, it means you want to cross-compile the libc.
-# CBUILD = CHOST = CTARGET - native build/install
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
-# For install paths:
-# CHOST = CTARGET - install into /
-# CHOST != CTARGET - install into /usr/CTARGET/
-#
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-# Note [Disable automatic stripping]
-# Disabling automatic stripping for a few reasons:
-# - portage's attempt to strip breaks non-native binaries at least on
-# arm: bug #697428
-# - portage's attempt to strip libpthread.so.0 breaks gdb thread
-# enumeration: bug #697910. This is quite subtle:
-# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
-# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
-# via 'ps_pglobal_lookup' symbol defined in gdb.
-# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
-# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
-# (unexported) is used to sanity check compatibility before enabling
-# debugging.
-# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
-# * normal 'strip' command trims '.symtab'
-# Thus our main goal here is to prevent 'libpthread.so.0' from
-# losing it's '.symtab' entries.
-# As Gentoo's strip does not allow us to pass less aggressive stripping
-# options and does not check the machine target we strip selectively.
-
-# We need a new-enough binutils/gcc to match upstream baseline.
-# Also we need to make sure our binutils/gcc supports TLS,
-# and that gcc already contains the hardened patches.
-# Lastly, let's avoid some openssh nastiness, bug 708224, as
-# convenience to our users.
-BDEPEND="
- ${PYTHON_DEPS}
- >=app-misc/pax-utils-0.1.10
- sys-devel/bison
- doc? ( sys-apps/texinfo )
-"
-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 )
- !<net-misc/openssh-8.1_p1-r2
-"
-DEPEND="${COMMON_DEPEND}
- test? ( >=net-dns/libidn2-2.3.0 )
-"
-RDEPEND="${COMMON_DEPEND}
- sys-apps/gentoo-functions
-"
-
-RESTRICT="!test? ( test )"
-
-if [[ ${CATEGORY} == cross-* ]] ; then
- BDEPEND+=" !headers-only? (
- >=${CATEGORY}/binutils-2.24
- >=${CATEGORY}/gcc-6
- )"
- [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
-else
- BDEPEND+="
- >=sys-devel/binutils-2.24
- >=sys-devel/gcc-6
- "
- 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=(
- # 9) Failures of unknown origin
- tst-latepthread
-
- # 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
-
- # Flaky test, known to fail occasionally:
- # https://sourceware.org/PR19329
- # https://bugs.gentoo.org/719674#c12
- tst-stack4
-)
-
-#
-# Small helper functions
-#
-
-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}"
-}
-
-# We need to be able to set alternative headers for compiling for non-native
-# platform. Will also become useful for testing kernel-headers without screwing
-# up the whole system.
-alt_headers() {
- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
-}
-
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS="$(host_eprefix)$(alt_headers)"
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- echo $(alt_prefix)/$(get_libdir)
-}
-alt_usrlibdir() {
- echo $(alt_prefix)/usr/$(get_libdir)
-}
-
-builddir() {
- echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
-}
-
-do_compile_test() {
- local ret save_cflags=${CFLAGS}
- CFLAGS+=" $1"
- shift
-
- pushd "${T}" >/dev/null
-
- rm -f glibc-test*
- printf '%b' "$*" > glibc-test.c
-
- # Most of the time CC is already set, but not in early sanity checks.
- nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}"
- ret=$?
-
- popd >/dev/null
-
- CFLAGS=${save_cflags}
- return ${ret}
-}
-
-do_run_test() {
- local ret
-
- if [[ ${MERGE_TYPE} == "binary" ]] ; then
- # ignore build failures when installing a binary package #324685
- do_compile_test "" "$@" 2>/dev/null || return 0
- else
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- return 0
- fi
- fi
-
- pushd "${T}" >/dev/null
-
- ./glibc-test
- ret=$?
- rm -f glibc-test*
-
- popd >/dev/null
-
- return ${ret}
-}
-
-setup_target_flags() {
- # This largely mucks with compiler flags. None of which should matter
- # when building up just the headers.
- just_headers && return 0
-
- case $(tc-arch) in
- x86)
- # -march needed for #185404 #199334
- # TODO: When creating the first glibc cross-compile, this test will
- # always fail as it does a full link which in turn requires glibc.
- # Probably also applies when changing multilib profile settings (e.g.
- # enabling x86 when the profile was amd64-only previously).
- # We could change main to _start and pass -nostdlib here so that we
- # only test the gcc code compilation. Or we could do a compile and
- # then look for the symbol via scanelf.
- if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- filter-flags '-march=*'
- export CFLAGS="-march=${t} ${CFLAGS}"
- einfo "Auto adding -march=${t} to CFLAGS #185404"
- fi
- ;;
- amd64)
- # -march needed for #185404 #199334
- # TODO: See cross-compile issues listed above for x86.
- [[ ${ABI} == x86 ]] &&
- if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- # Normally the target is x86_64-xxx, so turn that into the -march that
- # gcc actually accepts. #528708
- [[ ${t} == "x86_64" ]] && t="x86-64"
- filter-flags '-march=*'
- # ugly, ugly, ugly. ugly.
- CFLAGS_x86=$(CFLAGS=${CFLAGS_x86}; filter-flags '-march=*'; echo "${CFLAGS}")
- export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
- einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})"
- fi
- ;;
- mips)
- # The mips abi cannot support the GNU style hashes. #233233
- filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
- ;;
- ppc|ppc64)
- # Many arch-specific implementations do not work on ppc with
- # cache-block not equal to 128 bytes. This breaks memset:
- # https://sourceware.org/PR26522
- # https://bugs.gentoo.org/737996
- # Use default -mcpu=. For ppc it means non-multiarch setup.
- filter-flags '-mcpu=*'
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
-
- local cpu
- case ${CTARGET} in
- sparc64-*)
- cpu="sparc64"
- case $(get-flag mcpu) in
- v9)
- # We need to force at least v9a because the base build doesn't
- # work with just v9.
- # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
- append-flags "-Wa,-xarch=v9a"
- ;;
- esac
- ;;
- sparc-*)
- case $(get-flag mcpu) in
- v8|supersparc|hypersparc|leon|leon3)
- cpu="sparcv8"
- ;;
- *)
- cpu="sparcv9"
- ;;
- esac
- ;;
- esac
- [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
- ;;
- esac
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Allow users to explicitly avoid flag sanitization via
- # USE=custom-cflags.
- if ! use custom-cflags; then
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- # Lock glibc at -O2; we want to be conservative here.
- filter-flags '-O?'
- append-flags -O2
- fi
- strip-unsupported-flags
- filter-lto
- filter-flags -m32 -m64 '-mabi=*'
-
- # glibc aborts if rpath is set by LDFLAGS
- filter-ldflags '-Wl,-rpath=*'
-
- # 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'
-
- # #492892
- filter-flags -frecord-gcc-switches
-
- unset CBUILD_OPT CTARGET_OPT
- if use multilib ; then
- CTARGET_OPT=$(get_abi_CTARGET)
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
- fi
-
- setup_target_flags
-
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
- CBUILD_OPT=${CTARGET_OPT}
- fi
-
- # glibc's headers disallow -O0 and fail at build time:
- # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization"
- replace-flags -O0 -O1
-
- filter-flags '-fstack-protector*'
-}
-
-want_tls() {
- # Archs that can use TLS (Thread Local Storage)
- case $(tc-arch) in
- x86)
- # requires i486 or better #106556
- [[ ${CTARGET} == i[4567]86* ]] && return 0
- return 1
- ;;
- esac
- return 0
-}
-
-want__thread() {
- want_tls || return 1
-
- # For some reason --with-tls --with__thread is causing segfaults on sparc32.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
-
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
-
- # only test gcc -- can't test linking yet
- tc-has-tls -c ${CTARGET}
- WANT__THREAD=$?
-
- return ${WANT__THREAD}
-}
-
-use_multiarch() {
- # Allow user to disable runtime arch detection in multilib.
- use multiarch || return 1
- # Make sure binutils is new enough to support indirect functions,
- # #336792. This funky sed supports gold and bfd linkers.
- local bver nver
- bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}')
- case $(tc-arch ${CTARGET}) in
- amd64|x86) nver="2.20" ;;
- arm) nver="2.22" ;;
- hppa) nver="2.23" ;;
- ppc|ppc64) nver="2.20" ;;
- # ifunc support was added in 2.23, but glibc also needs
- # machinemode which is in 2.24.
- s390) nver="2.24" ;;
- sparc) nver="2.21" ;;
- *) return 1 ;;
- esac
- ver_test ${bver} -ge ${nver}
-}
-
-# Setup toolchain variables that had historically been defined in the
-# profiles for these archs.
-setup_env() {
- # silly users
- unset LD_RUN_PATH
- unset LD_ASSUME_KERNEL
-
- if is_crosscompile || tc-is-cross-compiler ; then
- multilib_env ${CTARGET_OPT:-${CTARGET}}
-
- if ! use multilib ; then
- MULTILIB_ABIS=${DEFAULT_ABI}
- else
- MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
- fi
-
- # If the user has CFLAGS_<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
- local VAR=CFLAGS_${ABI}
- # We need to export CFLAGS with abi information in them because glibc's
- # configure script checks CFLAGS for some targets (like mips). Keep
- # around the original clean value to avoid appending multiple ABIs on
- # top of each other.
- : ${__GLIBC_CC:=$(tc-getCC ${CTARGET})}
- export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}"
- einfo " $(printf '%15s' 'Manual CC:') ${CC}"
-}
-
-foreach_abi() {
- setup_env
-
- local ret=0
- local abilist=""
- if use multilib ; then
- abilist=$(get_install_abis)
- else
- abilist=${DEFAULT_ABI}
- fi
- local -x ABI
- for ABI in ${abilist:-default} ; do
- setup_env
- einfo "Running $1 for ABI ${ABI}"
- $1
- : $(( ret |= $? ))
- done
- return ${ret}
-}
-
-glibc_banner() {
- local b="Gentoo ${PVR}"
- [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}"
- echo "${b}"
-}
-
-# The following Kernel version handling functions are mostly copied from portage
-# source. It's better not to use linux-info.eclass here since a) it adds too
-# much magic, see bug 326693 for some of the arguments, and b) some of the
-# functions are just not provided.
-
-g_get_running_KV() {
- uname -r
- return $?
-}
-
-g_KV_major() {
- [[ -z $1 ]] && return 1
- local KV=$@
- echo "${KV%%.*}"
-}
-
-g_KV_minor() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.}
- echo "${KV%%.*}"
-}
-
-g_KV_micro() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.*.}
- echo "${KV%%[^[:digit:]]*}"
-}
-
-g_KV_to_int() {
- [[ -z $1 ]] && return 1
- local KV_MAJOR=$(g_KV_major "$1")
- local KV_MINOR=$(g_KV_minor "$1")
- local KV_MICRO=$(g_KV_micro "$1")
- local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
-
- # We make version 2.2.0 the minimum version we will handle as
- # a sanity check ... if its less, we fail ...
- if [[ ${KV_int} -ge 131584 ]] ; then
- echo "${KV_int}"
- return 0
- fi
- return 1
-}
-
-g_int_to_KV() {
- local version=$1 major minor micro
- major=$((version / 65536))
- minor=$(((version % 65536) / 256))
- micro=$((version % 256))
- echo ${major}.${minor}.${micro}
-}
-
-eend_KV() {
- [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]]
- eend $?
-}
-
-get_kheader_version() {
- printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
- $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \
- tail -n 1
-}
-
-# We collect all sanity checks here. Consistency is not guranteed between
-# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
-# src_unpack.
-sanity_prechecks() {
- # Prevent native builds from downgrading
- if [[ ${MERGE_TYPE} != "buildonly" ]] && \
- [[ -z ${ROOT} ]] && \
- [[ ${CBUILD} == ${CHOST} ]] && \
- [[ ${CHOST} == ${CTARGET} ]] ; then
-
- # The high rev # is to allow people to downgrade between -r#
- # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2
- # should be fine. Hopefully we never actually use a r# this
- # high.
- if has_version ">${CATEGORY}/${P}-r10000" ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
- fi
-
- if ! do_run_test '#include <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
-
- # Users have had a chance to phase themselves, time to give em the boot
- if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then
- eerror "You still haven't deleted ${EROOT}/etc/locales.build."
- eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher."
- die "Lazy upgrader detected"
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml"
- die "Please fix your CHOST"
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty when running with a 32bit"
- ewarn "hypervisor, which is probably not what you want."
- fi
-
- # Check for sanity of /etc/nsswitch.conf
- if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then
- local entry
- for entry in passwd group shadow; do
- if ! grep -E -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then
- eerror "Your ${EROOT}/etc/nsswitch.conf is out of date."
- eerror "Please make sure you have 'files' entries for"
- eerror "'passwd:', 'group:' and 'shadow:' databases."
- eerror "For more details see:"
- eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26"
- die "nsswitch.conf has no 'files' provider in '${entry}'."
- fi
- done
- fi
-
- # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
- # we test for...
- if ! is_crosscompile && ! tc-is-cross-compiler ; 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 ; then
- ebegin "Checking gcc for __thread support"
- if ! eend $(want__thread ; echo $?) ; then
- echo
- eerror "Could not find a gcc that supports the __thread directive!"
- eerror "Please update your binutils/gcc and try again."
- die "No __thread support in gcc!"
- fi
-
- if [[ ${CTARGET} == *-linux* ]] ; then
- local run_kv build_kv want_kv
-
- run_kv=$(g_get_running_KV)
- build_kv=$(g_int_to_KV $(get_kheader_version))
- want_kv=${MIN_KERN_VER}
-
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- # Building fails on an non-supporting kernel
- ebegin "Checking running kernel version (${run_kv} >= ${want_kv})"
- if ! eend_KV ${run_kv} ${want_kv} ; then
- echo
- eerror "You need a kernel of at least ${want_kv}!"
- die "Kernel version too low!"
- fi
- fi
-
- ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})"
- if ! eend_KV ${build_kv} ${want_kv} ; then
- echo
- eerror "You need linux-headers of at least ${want_kv}!"
- die "linux-headers version too low!"
- fi
- fi
- fi
-}
-
-#
-# the phases
-#
-
-# pkg_pretend
-
-pkg_pretend() {
- # All the checks...
- einfo "Checking general environment sanity."
- sanity_prechecks
-}
-
-pkg_setup() {
- # see bug 682570
- [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup
-}
-
-# src_unpack
-
-src_unpack() {
- # Consistency is not guaranteed between pkg_ and src_ ...
- sanity_prechecks
-
- use multilib && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
-
- setup_env
-
- if [[ ${PV} == 9999* ]] ; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git"
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
- git-r3_src_unpack
- mv patches-git/9999 patches || die
-
- EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
- EGIT_CHECKOUT_DIR=${S}
- git-r3_src_unpack
- else
- unpack ${P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
- fi
-
- cd "${WORKDIR}" || die
- unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
-}
-
-src_prepare() {
- local patchsetname
- if ! use vanilla ; then
- if [[ ${PV} == 9999* ]] ; then
- patchsetname="from git master"
- else
- patchsetname="${RELEASE_VER}-${PATCH_VER}"
- fi
- elog "Applying Gentoo Glibc Patchset ${patchsetname}"
- eapply "${WORKDIR}"/patches
- einfo "Done."
- fi
-
- default
-
- gnuconfig_update
-
- cd "${WORKDIR}"
- find . -name configure -exec touch {} +
-
- # move the external locale-gen to its old place
- mkdir extra || die
- mv locale-gen-${LOCALE_GEN_VER} extra/locale || die
-
- eprefixify extra/locale/locale-gen
-
- # Fix permissions on some of the scripts.
- chmod u+x "${S}"/scripts/*.sh
-
- cd "${S}"
-}
-
-glibc_do_configure() {
- # glibc does not work with non-bfd (for various reasons):
- # * gold (bug #269274)
- # * mold (bug #860900)
- tc-ld-force-bfd
-
- # CXX isnt handled by the multilib system, so if we dont unset here
- # we accumulate crap across abis
- unset CXX
-
- einfo "Configuring glibc for nptl"
-
- if use doc ; then
- export MAKEINFO=makeinfo
- else
- export MAKEINFO=/dev/null
- fi
-
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
-
- # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760
- # To build .S (assembly) files with the same ABI-specific flags
- # upstream currently recommends adding CFLAGS to CC/CXX:
- # https://sourceware.org/PR23273
- # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS
- # and breaks multiarch support. See 659030#c3 for an example.
- # The glibc configure script doesn't properly use LDFLAGS all the time.
- export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}"
- einfo " $(printf '%15s' 'Manual CC:') ${CC}"
-
- # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
- export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}"
-
- if is_crosscompile; then
- # Assume worst-case bootstrap: glibc is buil first time
- # when ${CTARGET}-g++ is not available yet. We avoid
- # building auxiliary programs that require C++: bug #683074
- # It should not affect final result.
- export libc_cv_cxx_link_ok=no
- # The line above has the same effect. We set CXX explicitly
- # to make build logs less confusing.
- export CXX=
- fi
- einfo " $(printf '%15s' 'Manual CXX:') ${CXX}"
-
- # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
- # can't detect them automatically due to ${CHOST} mismatch and fallbacks
- # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
- export NM="$(tc-getNM ${CTARGET})"
- export READELF="$(tc-getREADELF ${CTARGET})"
- einfo " $(printf '%15s' 'Manual NM:') ${NM}"
- einfo " $(printf '%15s' 'Manual READELF:') ${READELF}"
-
- echo
-
- local myconf=()
-
- case ${CTARGET} in
- m68k*)
- # setjmp() is not compatible with stack protection:
- # https://sourceware.org/PR24202
- myconf+=( --enable-stack-protector=no )
- ;;
- powerpc-*)
- # Currently gcc on powerpc32 generates invalid code for
- # __builtin_return_address(0) calls. Normally programs
- # don't do that but malloc hooks in glibc do:
- # https://gcc.gnu.org/PR81996
- # https://bugs.gentoo.org/629054
- myconf+=( --enable-stack-protector=no )
- ;;
- *)
- # Use '=strong' instead of '=all' to protect only functions
- # worth protecting from stack smashes.
- # '=all' is also known to have a problem in IFUNC resolution
- # tests: https://sourceware.org/PR25680, bug #712356.
- myconf+=( --enable-stack-protector=$(usex ssp strong no) )
- ;;
- esac
- myconf+=( --enable-stackguard-randomization )
-
- # Keep a whitelist of targets supporing IFUNC. glibc's ./configure
- # is not robust enough to detect proper support:
- # https://bugs.gentoo.org/641216
- # https://sourceware.org/PR22634#c0
- case $(tc-arch ${CTARGET}) in
- # Keep whitelist of targets where autodetection mostly works.
- amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;;
- # Blacklist everywhere else
- *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
- esac
-
- # Enable Intel Control-flow Enforcement Technology on amd64 if requested
- case ${CTARGET} in
- x86_64-*) myconf+=( $(use_enable cet) ) ;;
- *) ;;
- esac
-
- [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
-
- myconf+=( --enable-kernel=${MIN_KERN_VER} )
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. only for the primary ABI on multilib systems
- # 3. Not a crosscompile
- if ! is_crosscompile && use selinux ; then
- if use multilib ; then
- if is_final_abi ; then
- myconf+=( --with-selinux )
- else
- myconf+=( --without-selinux )
- fi
- else
- myconf+=( --with-selinux )
- fi
- else
- myconf+=( --without-selinux )
- fi
-
- # Force a few tests where we always know the answer but
- # configure is incapable of finding it.
- if is_crosscompile ; then
- export \
- libc_cv_c_cleanup=yes \
- libc_cv_forced_unwind=yes
- fi
-
- myconf+=(
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- $(use_with gd)
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- --sysconfdir="$(host_eprefix)/etc"
- --localstatedir="$(host_eprefix)/var"
- --libdir='$(prefix)'/$(get_libdir)
- --mandir='$(prefix)'/share/man
- --infodir='$(prefix)'/share/info
- --libexecdir='$(libdir)'/misc/glibc
- --with-bugurl=https://bugs.gentoo.org/
- --with-pkgversion="$(glibc_banner)"
- $(use_enable crypt)
- $(use_multiarch || echo --disable-multi-arch)
- $(use_enable static-pie)
- $(use_enable systemtap)
- $(use_enable nscd)
- ${EXTRA_ECONF}
- )
-
- # We rely on sys-libs/timezone-data for timezone tools normally.
- myconf+=( $(use_enable vanilla timezone-tools) )
-
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
- ac_cv_lib_cap_cap_init=$(usex caps || echo no)
-
- # There is no configure option for this and we need to export it
- # since the glibc build will re-run configure on itself
- export libc_cv_rootsbindir="$(host_eprefix)/sbin"
- export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)"
-
- # We take care of patching our binutils to use both hash styles,
- # and many people like to force gnu hash style only, so disable
- # this overriding check. #347761
- export libc_cv_hashstyle=no
-
- local builddir=$(builddir nptl)
- mkdir -p "${builddir}"
- cd "${builddir}"
- set -- "${S}"/configure "${myconf[@]}"
- echo "$@"
- "$@" || die "failed to configure glibc"
-
- # ia64 static cross-compilers are a pita in so much that they
- # can't produce static ELFs (as the libgcc.a is broken). so
- # disable building of the programs for those targets if it
- # doesn't work.
- # XXX: We could turn this into a compiler test, but ia64 is
- # the only one that matters, so this should be fine for now.
- if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
- sed -i '1i+link-static = touch $@' config.make
- fi
-
- # If we're trying to migrate between ABI sets, we need
- # to lie and use a local copy of gcc. Like if the system
- # is built with MULTILIB_ABIS="amd64 x86" but we want to
- # add x32 to it, gcc/glibc don't yet support x32.
- #
- if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then
- echo 'int main(){}' > "${T}"/test.c
- if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
- sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
- fi
- fi
-}
-
-glibc_headers_configure() {
- export ABI=default
-
- local builddir=$(builddir "headers")
- mkdir -p "${builddir}"
- cd "${builddir}"
-
- # if we don't have a compiler yet, we can't really test it now ...
- # hopefully they don't affect header generation, so let's hope for
- # the best here ...
- local v vars=(
- ac_cv_header_cpuid_h=yes
- libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
- libc_cv_asm_cfi_directives=yes
- libc_cv_broken_visibility_attribute=no
- libc_cv_c_cleanup=yes
- libc_cv_compiler_powerpc64le_binary128_ok=yes
- libc_cv_forced_unwind=yes
- libc_cv_gcc___thread=yes
- libc_cv_mlong_double_128=yes
- libc_cv_mlong_double_128ibm=yes
- libc_cv_ppc_machine=yes
- libc_cv_ppc_rel16=yes
- libc_cv_predef_fortify_source=no
- libc_cv_target_power8_ok=yes
- libc_cv_visibility_attribute=yes
- libc_cv_z_combreloc=yes
- libc_cv_z_execstack=yes
- libc_cv_z_initfirst=yes
- libc_cv_z_nodelete=yes
- libc_cv_z_nodlopen=yes
- libc_cv_z_relro=yes
- libc_mips_abi=${ABI}
- libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=no
- ac_cv_lib_cap_cap_init=no
- )
-
- einfo "Forcing cached settings:"
- for v in "${vars[@]}" ; do
- einfo " ${v}"
- export ${v}
- done
-
- local headers_only_arch_CPPFLAGS=()
-
- # Blow away some random CC settings that screw things up. #550192
- if [[ -d ${S}/sysdeps/mips ]]; then
- pushd "${S}"/sysdeps/mips >/dev/null
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
-
- # Force the mips ABI to the default. This is OK because the set of
- # installed headers in this phase is the same between the 3 ABIs.
- # If this ever changes, this hack will break, but that's unlikely
- # as glibc discourages that behavior.
- # https://crbug.com/647033
- sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
-
- popd >/dev/null
- fi
-
- case ${CTARGET} in
- riscv*)
- # RISC-V interrogates the compiler to determine which target to
- # build. If building the headers then we don't strictly need a
- # RISC-V compiler, so the built-in definitions that are provided
- # along with all RISC-V compiler might not exist. This causes
- # glibc's RISC-V preconfigure script to blow up. Since we're just
- # building the headers any value will actually work here, so just
- # pick the standard one (rv64g/lp64d) to make the build scripts
- # happy for now -- the headers are all the same anyway so it
- # doesn't matter.
- headers_only_arch_CPPFLAGS+=(
- -D__riscv_xlen=64
- -D__riscv_flen=64
- -D__riscv_float_abi_double=1
- -D__riscv_atomic=1
- ) ;;
- esac
-
- local myconf=()
- myconf+=(
- --disable-sanity-checks
- --enable-hacker-mode
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- ${EXTRA_ECONF}
- )
-
- # Nothing is compiled here which would affect the headers for the target.
- # So forcing CC/CFLAGS is sane.
- local headers_only_CC=$(tc-getBUILD_CC)
- local headers_only_CFLAGS="-O1 -pipe"
- local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}"
- local headers_only_LDFLAGS=""
- set -- "${S}"/configure "${myconf[@]}"
- echo \
- "CC=${headers_only_CC}" \
- "CFLAGS=${headers_only_CFLAGS}" \
- "CPPFLAGS=${headers_only_CPPFLAGS}" \
- "LDFLAGS=${headers_only_LDFLAGS}" \
- "$@"
- CC=${headers_only_CC} \
- CFLAGS=${headers_only_CFLAGS} \
- CPPFLAGS=${headers_only_CPPFLAGS} \
- LDFLAGS="" \
- "$@" || die "failed to configure glibc"
-}
-
-do_src_configure() {
- if just_headers ; then
- glibc_headers_configure
- else
- glibc_do_configure nptl
- fi
-}
-
-src_configure() {
- foreach_abi do_src_configure
-}
-
-do_src_compile() {
- emake -C "$(builddir nptl)"
-}
-
-src_compile() {
- if just_headers ; then
- return
- fi
-
- foreach_abi do_src_compile
-}
-
-glibc_src_test() {
- cd "$(builddir nptl)"
-
- local myxfailparams=""
- if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
- for myt in ${XFAIL_TEST_LIST[@]} ; do
- myxfailparams+="test-xfail-${myt}=yes "
- done
- fi
-
- # sandbox does not understand unshare() and prevents
- # writes to /proc/, which makes many tests fail
-
- SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check
-}
-
-do_src_test() {
- local ret=0
-
- glibc_src_test
- : $(( ret |= $? ))
-
- return ${ret}
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # Give tests more time to complete.
- export TIMEOUTFACTOR=5
-
- foreach_abi do_src_test || die "tests failed"
-}
-
-run_locale_gen() {
- local prefix=$1 user_config config
- local -a localegen_args
-
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
-
- localegen_args=( --config "${config}" --destdir "${prefix}" )
-
- # 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- locale-gen "${localegen_args[@]}"
-}
-
-glibc_do_src_install() {
- local builddir=$(builddir nptl)
- cd "${builddir}"
-
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
-
- # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
- # which come without headers etc. Only needed for binary packages since the
- # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
- find "${D}" -name "libnsl.a" -delete
- find "${D}" -name "libnsl.so" -delete
-
- # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
- # to infer upstream version:
- # '#define VERSION "2.26.90"' -> '2.26.90'
- local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
-
- # Avoid stripping binaries not targeted by ${CHOST}. Or else
- # ${CHOST}-strip would break binaries build for ${CTARGET}.
- is_crosscompile && dostrip -x /
- # gdb thread introspection relies on local libpthreas symbols. stripping breaks it
- # See Note [Disable automatic stripping]
- dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
-
- if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
- # Move versioned .a file out of libdir to evade portage QA checks
- # instead of using gen_usr_ldscript(). We fix ldscript as:
- # "GROUP ( /usr/lib64/libm-<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'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
- 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
-
- # With devpts under Linux mounted properly, we do not need the pt_chown
- # binary to be setuid. This is because the default owners/perms will be
- # exactly what we want.
- if ! use suid ; then
- find "${ED}" -name pt_chown -exec chmod -s {} +
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- # We need to make sure that /lib and /usr/lib always exists.
- # gcc likes to use relative paths to get to its multilibs like
- # /usr/lib/../lib64/. So while we don't install any files into
- # /usr/lib/, we do need it to exist.
- keepdir $(alt_prefix)/lib
- keepdir $(alt_prefix)/usr/lib
-
- dosym usr/include $(alt_prefix)/sys-include
- return 0
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen
- doman *.[0-8]
- insinto /etc
- doins locale.gen
-
- # Make sure all the ABI's can find the locales and so we only
- # have to generate one set
- local a
- keepdir /usr/$(get_libdir)/locale
- for a in $(get_install_abis) ; do
- if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then
- dosym ../$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale
- fi
- done
-
- # HACK: If we're building for riscv, we need to additionally make sure that
- # we can find the locale archive afterwards
- case ${CTARGET} in
- riscv*)
- if [[ ! -e ${ED}/usr/lib/locale ]] ; then
- dosym ../$(get_libdir)/locale /usr/lib/locale
- fi
- ;;
- *) ;;
- esac
-
- cd "${S}"
-
- # Install misc network config files
- insinto /etc
- doins posix/gai.conf nss/nsswitch.conf
-
- # Gentoo-specific
- newins "${FILESDIR}"/host.conf-1 host.conf
-
- if use nscd ; then
- doins nscd/nscd.conf
-
- newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd
-
- local nscd_args=(
- -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
- )
-
- sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
-
- systemd_dounit nscd/nscd.service
- newtmpfiles nscd/nscd.tmpfiles nscd.conf
- fi
-
- echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
- doenvd "${T}"/00glibc
-
- for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
- [[ -s ${d} ]] && dodoc ${d}
- done
- dodoc -r ChangeLog.old
-
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the
- # creation of the "factory" symlink in pkg_postinst().
- rm -f "${ED}"/etc/localtime
-
- # Generate all locales if this is a native build as locale generation
- if use compile-locales && ! is_crosscompile ; then
- if ! run_locale_gen "${ED%/}"; then
- die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
- fi
-}
-
-glibc_headers_install() {
- local builddir=$(builddir "headers")
- cd "${builddir}"
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
-
- insinto $(alt_headers)/gnu
- doins "${S}"/include/gnu/stubs.h
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include $(alt_prefix)/sys-include
-}
-
-src_install() {
- if just_headers ; then
- export ABI=default
- glibc_headers_install
- return
- fi
-
- foreach_abi glibc_do_src_install
-
- if ! use static-libs ; then
- elog "Not installing static glibc libraries"
- find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
- fi
-}
-
-# Simple test to make sure our new glibc isn't completely broken.
-# Make sure we don't test with statically built binaries since
-# they will fail. Also, skip if this glibc is a cross compiler.
-#
-# If coreutils is built with USE=multicall, some of these files
-# will just be wrapper scripts, not actual ELFs we can test.
-glibc_sanity_check() {
- cd / #228809
-
- # We enter ${ED} so to avoid trouble if the path contains
- # special characters; for instance if the path contains the
- # colon character (:), then the linker will try to split it
- # and look for the libraries in an unexpected place. This can
- # lead to unsafe code execution if the generated prefix is
- # within a world-writable directory.
- # (e.g. /var/tmp/portage:${HOSTNAME})
- pushd "${ED}"/$(get_libdir) >/dev/null
-
- local x striptest
- for x in cal date env free ls true uname uptime ; do
- x=$(type -p ${x})
- [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
- case ${striptest} in
- *"statically linked"*) continue;;
- *"ASCII text"*) continue;;
- esac
- # We need to clear the locale settings as the upgrade might want
- # incompatible locale data. This test is not for verifying that.
- LC_ALL=C \
- ./ld-*.so --library-path . ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-
- popd >/dev/null
-}
-
-pkg_preinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- # prepare /etc/ld.so.conf.d/ for files
- mkdir -p "${EROOT}"/etc/ld.so.conf.d
-
- # Default /etc/hosts.conf:multi to on for systems with small dbs.
- if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
- sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
- einfo "Defaulting /etc/host.conf:multi to on"
- fi
-
- [[ -n ${ROOT} ]] && return 0
- [[ -d ${ED}/$(get_libdir) ]] || return 0
- [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
-}
-
-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
- if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
- ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- fi
-
- # Check for sanity of /etc/nsswitch.conf, take 2
- if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
- local entry
- for entry in passwd group shadow; do
- if 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
-}
diff --git a/sys-libs/glibc/glibc-2.32-r8.ebuild b/sys-libs/glibc/glibc-2.32-r8.ebuild
deleted file mode 100644
index 7c9e30daab0f..000000000000
--- a/sys-libs/glibc/glibc-2.32-r8.ebuild
+++ /dev/null
@@ -1,1533 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{13..14} )
-TMPFILES_OPTIONAL=1
-
-inherit python-any-r1 prefix toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing tmpfiles
-
-DESCRIPTION="GNU libc C library"
-HOMEPAGE="https://www.gnu.org/software/libc/"
-LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
-SLOT="2.2"
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=8
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
- inherit git-r3
-else
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
- SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
- SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
- SRC_URI+=" riscv? ( https://dev.gentoo.org/~dilfridge/distfiles/backport-rv32.txz )"
-fi
-
-RELEASE_VER=${PV}
-
-GCC_BOOTSTRAP_VER=20201208
-
-LOCALE_GEN_VER=2.10
-
-SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
-SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
-
-IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla"
-
-# Minimum kernel version that glibc requires
-MIN_KERN_VER="3.2.0"
-
-# Here's how the cross-compile logic breaks down ...
-# CTARGET - machine that will target the binaries
-# CHOST - machine that will host the binaries
-# CBUILD - machine that will build the binaries
-# If CTARGET != CHOST, it means you want a libc for cross-compiling.
-# If CHOST != CBUILD, it means you want to cross-compile the libc.
-# CBUILD = CHOST = CTARGET - native build/install
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
-# For install paths:
-# CHOST = CTARGET - install into /
-# CHOST != CTARGET - install into /usr/CTARGET/
-#
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-# Note [Disable automatic stripping]
-# Disabling automatic stripping for a few reasons:
-# - portage's attempt to strip breaks non-native binaries at least on
-# arm: bug #697428
-# - portage's attempt to strip libpthread.so.0 breaks gdb thread
-# enumeration: bug #697910. This is quite subtle:
-# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
-# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
-# via 'ps_pglobal_lookup' symbol defined in gdb.
-# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
-# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
-# (unexported) is used to sanity check compatibility before enabling
-# debugging.
-# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
-# * normal 'strip' command trims '.symtab'
-# Thus our main goal here is to prevent 'libpthread.so.0' from
-# losing it's '.symtab' entries.
-# As Gentoo's strip does not allow us to pass less aggressive stripping
-# options and does not check the machine target we strip selectively.
-
-# We need a new-enough binutils/gcc to match upstream baseline.
-# Also we need to make sure our binutils/gcc supports TLS,
-# and that gcc already contains the hardened patches.
-# Lastly, let's avoid some openssh nastiness, bug 708224, as
-# convenience to our users.
-
-# gzip, grep, awk are needed by locale-gen, bug 740750
-
-BDEPEND="
- ${PYTHON_DEPS}
- >=app-misc/pax-utils-0.1.10
- sys-devel/bison
- doc? ( sys-apps/texinfo )
- !compile-locales? (
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- )
-"
-COMMON_DEPEND="
- gd? ( media-libs/gd:2= )
- nscd? ( selinux? (
- audit? ( sys-process/audit )
- caps? ( sys-libs/libcap )
- ) )
- suid? ( caps? ( sys-libs/libcap ) )
- selinux? ( sys-libs/libselinux )
- systemtap? ( dev-debug/systemtap )
- !<net-misc/openssh-8.1_p1-r2
-"
-DEPEND="${COMMON_DEPEND}
- compile-locales? (
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- )
- test? ( >=net-dns/libidn2-2.3.0 )
-"
-RDEPEND="${COMMON_DEPEND}
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- sys-apps/gentoo-functions
-"
-
-RESTRICT="!test? ( test )"
-
-if [[ ${CATEGORY} == cross-* ]] ; then
- BDEPEND+=" !headers-only? (
- >=${CATEGORY}/binutils-2.24
- >=${CATEGORY}/gcc-6
- )"
- [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
-else
- BDEPEND+="
- >=sys-devel/binutils-2.24
- >=sys-devel/gcc-6
- "
- 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=(
- # 9) Failures of unknown origin
- tst-latepthread
-
- # 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
-
- # Flaky test, known to fail occasionally:
- # https://sourceware.org/PR19329
- # https://bugs.gentoo.org/719674#c12
- tst-stack4
-)
-
-#
-# Small helper functions
-#
-
-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}"
-}
-
-# We need to be able to set alternative headers for compiling for non-native
-# platform. Will also become useful for testing kernel-headers without screwing
-# up the whole system.
-alt_headers() {
- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
-}
-
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS="$(host_eprefix)$(alt_headers)"
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- echo $(alt_prefix)/$(get_libdir)
-}
-alt_usrlibdir() {
- echo $(alt_prefix)/usr/$(get_libdir)
-}
-
-builddir() {
- echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
-}
-
-do_compile_test() {
- local ret save_cflags=${CFLAGS}
- CFLAGS+=" $1"
- shift
-
- pushd "${T}" >/dev/null
-
- rm -f glibc-test*
- printf '%b' "$*" > glibc-test.c
-
- # Most of the time CC is already set, but not in early sanity checks.
- nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}"
- ret=$?
-
- popd >/dev/null
-
- CFLAGS=${save_cflags}
- return ${ret}
-}
-
-do_run_test() {
- local ret
-
- if [[ ${MERGE_TYPE} == "binary" ]] ; then
- # ignore build failures when installing a binary package #324685
- do_compile_test "" "$@" 2>/dev/null || return 0
- else
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- return 0
- fi
- fi
-
- pushd "${T}" >/dev/null
-
- ./glibc-test
- ret=$?
- rm -f glibc-test*
-
- popd >/dev/null
-
- return ${ret}
-}
-
-setup_target_flags() {
- # This largely mucks with compiler flags. None of which should matter
- # when building up just the headers.
- just_headers && return 0
-
- case $(tc-arch) in
- x86)
- # -march needed for #185404 #199334
- # TODO: When creating the first glibc cross-compile, this test will
- # always fail as it does a full link which in turn requires glibc.
- # Probably also applies when changing multilib profile settings (e.g.
- # enabling x86 when the profile was amd64-only previously).
- # We could change main to _start and pass -nostdlib here so that we
- # only test the gcc code compilation. Or we could do a compile and
- # then look for the symbol via scanelf.
- if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- filter-flags '-march=*'
- export CFLAGS="-march=${t} ${CFLAGS}"
- einfo "Auto adding -march=${t} to CFLAGS #185404"
- fi
- ;;
- amd64)
- # -march needed for #185404 #199334
- # TODO: See cross-compile issues listed above for x86.
- [[ ${ABI} == x86 ]] &&
- if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- # Normally the target is x86_64-xxx, so turn that into the -march that
- # gcc actually accepts. #528708
- [[ ${t} == "x86_64" ]] && t="x86-64"
- filter-flags '-march=*'
- # ugly, ugly, ugly. ugly.
- CFLAGS_x86=$(CFLAGS=${CFLAGS_x86}; filter-flags '-march=*'; echo "${CFLAGS}")
- export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
- einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})"
- fi
- ;;
- mips)
- # The mips abi cannot support the GNU style hashes. #233233
- filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
- ;;
- ppc|ppc64)
- # Many arch-specific implementations do not work on ppc with
- # cache-block not equal to 128 bytes. This breaks memset:
- # https://sourceware.org/PR26522
- # https://bugs.gentoo.org/737996
- # Use default -mcpu=. For ppc it means non-multiarch setup.
- filter-flags '-mcpu=*'
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
-
- local cpu
- case ${CTARGET} in
- sparc64-*)
- cpu="sparc64"
- case $(get-flag mcpu) in
- v9)
- # We need to force at least v9a because the base build doesn't
- # work with just v9.
- # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
- append-flags "-Wa,-xarch=v9a"
- ;;
- esac
- ;;
- sparc-*)
- case $(get-flag mcpu) in
- v8|supersparc|hypersparc|leon|leon3)
- cpu="sparcv8"
- ;;
- *)
- cpu="sparcv9"
- ;;
- esac
- ;;
- esac
- [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
- ;;
- esac
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Allow users to explicitly avoid flag sanitization via
- # USE=custom-cflags.
- if ! use custom-cflags; then
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- # Lock glibc at -O2; we want to be conservative here.
- filter-flags '-O?'
- append-flags -O2
- fi
- strip-unsupported-flags
- filter-lto
- filter-flags -m32 -m64 '-mabi=*'
-
- # glibc aborts if rpath is set by LDFLAGS
- filter-ldflags '-Wl,-rpath=*'
-
- # 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'
-
- # #492892
- filter-flags -frecord-gcc-switches
-
- unset CBUILD_OPT CTARGET_OPT
- if use multilib ; then
- CTARGET_OPT=$(get_abi_CTARGET)
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
- fi
-
- setup_target_flags
-
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
- CBUILD_OPT=${CTARGET_OPT}
- fi
-
- # glibc's headers disallow -O0 and fail at build time:
- # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization"
- replace-flags -O0 -O1
-
- filter-flags '-fstack-protector*'
-}
-
-want_tls() {
- # Archs that can use TLS (Thread Local Storage)
- case $(tc-arch) in
- x86)
- # requires i486 or better #106556
- [[ ${CTARGET} == i[4567]86* ]] && return 0
- return 1
- ;;
- esac
- return 0
-}
-
-want__thread() {
- want_tls || return 1
-
- # For some reason --with-tls --with__thread is causing segfaults on sparc32.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
-
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
-
- # only test gcc -- can't test linking yet
- tc-has-tls -c ${CTARGET}
- WANT__THREAD=$?
-
- return ${WANT__THREAD}
-}
-
-use_multiarch() {
- # Allow user to disable runtime arch detection in multilib.
- use multiarch || return 1
- # Make sure binutils is new enough to support indirect functions,
- # #336792. This funky sed supports gold and bfd linkers.
- local bver nver
- bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}')
- case $(tc-arch ${CTARGET}) in
- amd64|x86) nver="2.20" ;;
- arm) nver="2.22" ;;
- hppa) nver="2.23" ;;
- ppc|ppc64) nver="2.20" ;;
- # ifunc support was added in 2.23, but glibc also needs
- # machinemode which is in 2.24.
- s390) nver="2.24" ;;
- sparc) nver="2.21" ;;
- *) return 1 ;;
- esac
- ver_test ${bver} -ge ${nver}
-}
-
-# Setup toolchain variables that had historically been defined in the
-# profiles for these archs.
-setup_env() {
- # silly users
- unset LD_RUN_PATH
- unset LD_ASSUME_KERNEL
-
- if is_crosscompile || tc-is-cross-compiler ; then
- multilib_env ${CTARGET_OPT:-${CTARGET}}
-
- if ! use multilib ; then
- MULTILIB_ABIS=${DEFAULT_ABI}
- else
- MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
- fi
-
- # If the user has CFLAGS_<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
- local VAR=CFLAGS_${ABI}
- # We need to export CFLAGS with abi information in them because glibc's
- # configure script checks CFLAGS for some targets (like mips). Keep
- # around the original clean value to avoid appending multiple ABIs on
- # top of each other.
- : ${__GLIBC_CC:=$(tc-getCC ${CTARGET})}
- export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}"
- einfo " $(printf '%15s' 'Manual CC:') ${CC}"
-}
-
-foreach_abi() {
- setup_env
-
- local ret=0
- local abilist=""
- if use multilib ; then
- abilist=$(get_install_abis)
- else
- abilist=${DEFAULT_ABI}
- fi
- local -x ABI
- for ABI in ${abilist:-default} ; do
- setup_env
- einfo "Running $1 for ABI ${ABI}"
- $1
- : $(( ret |= $? ))
- done
- return ${ret}
-}
-
-glibc_banner() {
- local b="Gentoo ${PVR}"
- [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}"
- echo "${b}"
-}
-
-# The following Kernel version handling functions are mostly copied from portage
-# source. It's better not to use linux-info.eclass here since a) it adds too
-# much magic, see bug 326693 for some of the arguments, and b) some of the
-# functions are just not provided.
-
-g_get_running_KV() {
- uname -r
- return $?
-}
-
-g_KV_major() {
- [[ -z $1 ]] && return 1
- local KV=$@
- echo "${KV%%.*}"
-}
-
-g_KV_minor() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.}
- echo "${KV%%.*}"
-}
-
-g_KV_micro() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.*.}
- echo "${KV%%[^[:digit:]]*}"
-}
-
-g_KV_to_int() {
- [[ -z $1 ]] && return 1
- local KV_MAJOR=$(g_KV_major "$1")
- local KV_MINOR=$(g_KV_minor "$1")
- local KV_MICRO=$(g_KV_micro "$1")
- local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
-
- # We make version 2.2.0 the minimum version we will handle as
- # a sanity check ... if its less, we fail ...
- if [[ ${KV_int} -ge 131584 ]] ; then
- echo "${KV_int}"
- return 0
- fi
- return 1
-}
-
-g_int_to_KV() {
- local version=$1 major minor micro
- major=$((version / 65536))
- minor=$(((version % 65536) / 256))
- micro=$((version % 256))
- echo ${major}.${minor}.${micro}
-}
-
-eend_KV() {
- [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]]
- eend $?
-}
-
-get_kheader_version() {
- printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
- $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \
- tail -n 1
-}
-
-# We collect all sanity checks here. Consistency is not guranteed between
-# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
-# src_unpack.
-sanity_prechecks() {
- # Prevent native builds from downgrading
- if [[ ${MERGE_TYPE} != "buildonly" ]] && \
- [[ -z ${ROOT} ]] && \
- [[ ${CBUILD} == ${CHOST} ]] && \
- [[ ${CHOST} == ${CTARGET} ]] ; then
-
- # The high rev # is to allow people to downgrade between -r#
- # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2
- # should be fine. Hopefully we never actually use a r# this
- # high.
- if has_version ">${CATEGORY}/${P}-r10000" ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
- fi
-
- if ! do_run_test '#include <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
-
- # Users have had a chance to phase themselves, time to give em the boot
- if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then
- eerror "You still haven't deleted ${EROOT}/etc/locales.build."
- eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher."
- die "Lazy upgrader detected"
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml"
- die "Please fix your CHOST"
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty when running with a 32bit"
- ewarn "hypervisor, which is probably not what you want."
- fi
-
- # Check for sanity of /etc/nsswitch.conf
- if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then
- local entry
- for entry in passwd group shadow; do
- if ! grep -E -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then
- eerror "Your ${EROOT}/etc/nsswitch.conf is out of date."
- eerror "Please make sure you have 'files' entries for"
- eerror "'passwd:', 'group:' and 'shadow:' databases."
- eerror "For more details see:"
- eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26"
- die "nsswitch.conf has no 'files' provider in '${entry}'."
- fi
- done
- fi
-
- # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
- # we test for...
- if ! is_crosscompile && ! tc-is-cross-compiler ; 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 ; then
- ebegin "Checking gcc for __thread support"
- if ! eend $(want__thread ; echo $?) ; then
- echo
- eerror "Could not find a gcc that supports the __thread directive!"
- eerror "Please update your binutils/gcc and try again."
- die "No __thread support in gcc!"
- fi
-
- if [[ ${CTARGET} == *-linux* ]] ; then
- local run_kv build_kv want_kv
-
- run_kv=$(g_get_running_KV)
- build_kv=$(g_int_to_KV $(get_kheader_version))
- want_kv=${MIN_KERN_VER}
-
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- # Building fails on an non-supporting kernel
- ebegin "Checking running kernel version (${run_kv} >= ${want_kv})"
- if ! eend_KV ${run_kv} ${want_kv} ; then
- echo
- eerror "You need a kernel of at least ${want_kv}!"
- die "Kernel version too low!"
- fi
- fi
-
- ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})"
- if ! eend_KV ${build_kv} ${want_kv} ; then
- echo
- eerror "You need linux-headers of at least ${want_kv}!"
- die "linux-headers version too low!"
- fi
- fi
- fi
-}
-
-#
-# the phases
-#
-
-# pkg_pretend
-
-pkg_pretend() {
- # All the checks...
- einfo "Checking general environment sanity."
- sanity_prechecks
-}
-
-pkg_setup() {
- # see bug 682570
- [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup
-}
-
-# src_unpack
-
-src_unpack() {
- # Consistency is not guaranteed between pkg_ and src_ ...
- sanity_prechecks
-
- use multilib && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
-
- setup_env
-
- if [[ ${PV} == 9999* ]] ; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git"
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
- git-r3_src_unpack
- mv patches-git/9999 patches || die
-
- EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
- EGIT_CHECKOUT_DIR=${S}
- git-r3_src_unpack
- else
- unpack ${P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
- fi
-
- cd "${WORKDIR}" || die
- unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
- use riscv && unpack backport-rv32.txz
-}
-
-src_prepare() {
- local patchsetname
- if ! use vanilla ; then
- if [[ ${PV} == 9999* ]] ; then
- patchsetname="from git master"
- else
- patchsetname="${RELEASE_VER}-${PATCH_VER}"
- fi
- elog "Applying Gentoo Glibc Patchset ${patchsetname}"
- eapply "${WORKDIR}"/patches
- einfo "Done."
-
- if use riscv ; then
- elog "Adding rv32 backport patchset for glibc-2.32 (experimental)"
- eapply "${WORKDIR}"/backport-rv32
- einfo "Done."
- fi
- fi
-
- default
-
- gnuconfig_update
-
- cd "${WORKDIR}"
- find . -name configure -exec touch {} +
-
- # move the external locale-gen to its old place
- mkdir extra || die
- mv locale-gen-${LOCALE_GEN_VER} extra/locale || die
-
- eprefixify extra/locale/locale-gen
-
- # Fix permissions on some of the scripts.
- chmod u+x "${S}"/scripts/*.sh
-
- cd "${S}"
-}
-
-glibc_do_configure() {
- # glibc does not work with non-bfd (for various reasons):
- # * gold (bug #269274)
- # * mold (bug #860900)
- tc-ld-force-bfd
-
- # CXX isnt handled by the multilib system, so if we dont unset here
- # we accumulate crap across abis
- unset CXX
-
- einfo "Configuring glibc for nptl"
-
- if use doc ; then
- export MAKEINFO=makeinfo
- else
- export MAKEINFO=/dev/null
- fi
-
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
-
- # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760
- # To build .S (assembly) files with the same ABI-specific flags
- # upstream currently recommends adding CFLAGS to CC/CXX:
- # https://sourceware.org/PR23273
- # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS
- # and breaks multiarch support. See 659030#c3 for an example.
- # The glibc configure script doesn't properly use LDFLAGS all the time.
- export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}"
- einfo " $(printf '%15s' 'Manual CC:') ${CC}"
-
- # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
- export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}"
-
- if is_crosscompile; then
- # Assume worst-case bootstrap: glibc is buil first time
- # when ${CTARGET}-g++ is not available yet. We avoid
- # building auxiliary programs that require C++: bug #683074
- # It should not affect final result.
- export libc_cv_cxx_link_ok=no
- # The line above has the same effect. We set CXX explicitly
- # to make build logs less confusing.
- export CXX=
- fi
- einfo " $(printf '%15s' 'Manual CXX:') ${CXX}"
-
- # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
- # can't detect them automatically due to ${CHOST} mismatch and fallbacks
- # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
- export NM="$(tc-getNM ${CTARGET})"
- export READELF="$(tc-getREADELF ${CTARGET})"
- einfo " $(printf '%15s' 'Manual NM:') ${NM}"
- einfo " $(printf '%15s' 'Manual READELF:') ${READELF}"
-
- echo
-
- local myconf=()
-
- case ${CTARGET} in
- m68k*)
- # setjmp() is not compatible with stack protection:
- # https://sourceware.org/PR24202
- myconf+=( --enable-stack-protector=no )
- ;;
- powerpc-*)
- # Currently gcc on powerpc32 generates invalid code for
- # __builtin_return_address(0) calls. Normally programs
- # don't do that but malloc hooks in glibc do:
- # https://gcc.gnu.org/PR81996
- # https://bugs.gentoo.org/629054
- myconf+=( --enable-stack-protector=no )
- ;;
- *)
- # Use '=strong' instead of '=all' to protect only functions
- # worth protecting from stack smashes.
- # '=all' is also known to have a problem in IFUNC resolution
- # tests: https://sourceware.org/PR25680, bug #712356.
- myconf+=( --enable-stack-protector=$(usex ssp strong no) )
- ;;
- esac
- myconf+=( --enable-stackguard-randomization )
-
- # Keep a whitelist of targets supporing IFUNC. glibc's ./configure
- # is not robust enough to detect proper support:
- # https://bugs.gentoo.org/641216
- # https://sourceware.org/PR22634#c0
- case $(tc-arch ${CTARGET}) in
- # Keep whitelist of targets where autodetection mostly works.
- amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;;
- # Blacklist everywhere else
- *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
- esac
-
- # Enable Intel Control-flow Enforcement Technology on amd64 if requested
- case ${CTARGET} in
- x86_64-*) myconf+=( $(use_enable cet) ) ;;
- *) ;;
- esac
-
- [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
-
- myconf+=( --enable-kernel=${MIN_KERN_VER} )
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. only for the primary ABI on multilib systems
- # 3. Not a crosscompile
- if ! is_crosscompile && use selinux ; then
- if use multilib ; then
- if is_final_abi ; then
- myconf+=( --with-selinux )
- else
- myconf+=( --without-selinux )
- fi
- else
- myconf+=( --with-selinux )
- fi
- else
- myconf+=( --without-selinux )
- fi
-
- # Force a few tests where we always know the answer but
- # configure is incapable of finding it.
- if is_crosscompile ; then
- export \
- libc_cv_c_cleanup=yes \
- libc_cv_forced_unwind=yes
- fi
-
- myconf+=(
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- $(use_with gd)
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- --sysconfdir="$(host_eprefix)/etc"
- --localstatedir="$(host_eprefix)/var"
- --libdir='$(prefix)'/$(get_libdir)
- --mandir='$(prefix)'/share/man
- --infodir='$(prefix)'/share/info
- --libexecdir='$(libdir)'/misc/glibc
- --with-bugurl=https://bugs.gentoo.org/
- --with-pkgversion="$(glibc_banner)"
- $(use_enable crypt)
- $(use_multiarch || echo --disable-multi-arch)
- $(use_enable static-pie)
- $(use_enable systemtap)
- $(use_enable nscd)
-
- # locale data is arch-independent
- # https://bugs.gentoo.org/753740
- libc_cv_complocaledir='${exec_prefix}/lib/locale'
-
- ${EXTRA_ECONF}
- )
-
- # We rely on sys-libs/timezone-data for timezone tools normally.
- myconf+=( $(use_enable vanilla timezone-tools) )
-
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
- ac_cv_lib_cap_cap_init=$(usex caps || echo no)
-
- # There is no configure option for this and we need to export it
- # since the glibc build will re-run configure on itself
- export libc_cv_rootsbindir="$(host_eprefix)/sbin"
- export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)"
-
- # We take care of patching our binutils to use both hash styles,
- # and many people like to force gnu hash style only, so disable
- # this overriding check. #347761
- export libc_cv_hashstyle=no
-
- local builddir=$(builddir nptl)
- mkdir -p "${builddir}"
- cd "${builddir}"
- set -- "${S}"/configure "${myconf[@]}"
- echo "$@"
- "$@" || die "failed to configure glibc"
-
- # ia64 static cross-compilers are a pita in so much that they
- # can't produce static ELFs (as the libgcc.a is broken). so
- # disable building of the programs for those targets if it
- # doesn't work.
- # XXX: We could turn this into a compiler test, but ia64 is
- # the only one that matters, so this should be fine for now.
- if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
- sed -i '1i+link-static = touch $@' config.make
- fi
-
- # If we're trying to migrate between ABI sets, we need
- # to lie and use a local copy of gcc. Like if the system
- # is built with MULTILIB_ABIS="amd64 x86" but we want to
- # add x32 to it, gcc/glibc don't yet support x32.
- #
- if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then
- echo 'int main(){}' > "${T}"/test.c
- if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
- sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
- fi
- fi
-}
-
-glibc_headers_configure() {
- export ABI=default
-
- local builddir=$(builddir "headers")
- mkdir -p "${builddir}"
- cd "${builddir}"
-
- # if we don't have a compiler yet, we can't really test it now ...
- # hopefully they don't affect header generation, so let's hope for
- # the best here ...
- local v vars=(
- ac_cv_header_cpuid_h=yes
- libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
- libc_cv_asm_cfi_directives=yes
- libc_cv_broken_visibility_attribute=no
- libc_cv_c_cleanup=yes
- libc_cv_compiler_powerpc64le_binary128_ok=yes
- libc_cv_forced_unwind=yes
- libc_cv_gcc___thread=yes
- libc_cv_mlong_double_128=yes
- libc_cv_mlong_double_128ibm=yes
- libc_cv_ppc_machine=yes
- libc_cv_ppc_rel16=yes
- libc_cv_predef_fortify_source=no
- libc_cv_target_power8_ok=yes
- libc_cv_visibility_attribute=yes
- libc_cv_z_combreloc=yes
- libc_cv_z_execstack=yes
- libc_cv_z_initfirst=yes
- libc_cv_z_nodelete=yes
- libc_cv_z_nodlopen=yes
- libc_cv_z_relro=yes
- libc_mips_abi=${ABI}
- libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=no
- ac_cv_lib_cap_cap_init=no
- )
-
- einfo "Forcing cached settings:"
- for v in "${vars[@]}" ; do
- einfo " ${v}"
- export ${v}
- done
-
- local headers_only_arch_CPPFLAGS=()
-
- # Blow away some random CC settings that screw things up. #550192
- if [[ -d ${S}/sysdeps/mips ]]; then
- pushd "${S}"/sysdeps/mips >/dev/null
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
-
- # Force the mips ABI to the default. This is OK because the set of
- # installed headers in this phase is the same between the 3 ABIs.
- # If this ever changes, this hack will break, but that's unlikely
- # as glibc discourages that behavior.
- # https://crbug.com/647033
- sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
-
- popd >/dev/null
- fi
-
- case ${CTARGET} in
- riscv*)
- # RISC-V interrogates the compiler to determine which target to
- # build. If building the headers then we don't strictly need a
- # RISC-V compiler, so the built-in definitions that are provided
- # along with all RISC-V compiler might not exist. This causes
- # glibc's RISC-V preconfigure script to blow up. Since we're just
- # building the headers any value will actually work here, so just
- # pick the standard one (rv64g/lp64d) to make the build scripts
- # happy for now -- the headers are all the same anyway so it
- # doesn't matter.
- headers_only_arch_CPPFLAGS+=(
- -D__riscv_xlen=64
- -D__riscv_flen=64
- -D__riscv_float_abi_double=1
- -D__riscv_atomic=1
- ) ;;
- esac
-
- local myconf=()
- myconf+=(
- --disable-sanity-checks
- --enable-hacker-mode
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- ${EXTRA_ECONF}
- )
-
- # Nothing is compiled here which would affect the headers for the target.
- # So forcing CC/CFLAGS is sane.
- local headers_only_CC=$(tc-getBUILD_CC)
- local headers_only_CFLAGS="-O1 -pipe"
- local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}"
- local headers_only_LDFLAGS=""
- set -- "${S}"/configure "${myconf[@]}"
- echo \
- "CC=${headers_only_CC}" \
- "CFLAGS=${headers_only_CFLAGS}" \
- "CPPFLAGS=${headers_only_CPPFLAGS}" \
- "LDFLAGS=${headers_only_LDFLAGS}" \
- "$@"
- CC=${headers_only_CC} \
- CFLAGS=${headers_only_CFLAGS} \
- CPPFLAGS=${headers_only_CPPFLAGS} \
- LDFLAGS="" \
- "$@" || die "failed to configure glibc"
-}
-
-do_src_configure() {
- if just_headers ; then
- glibc_headers_configure
- else
- glibc_do_configure nptl
- fi
-}
-
-src_configure() {
- foreach_abi do_src_configure
-}
-
-do_src_compile() {
- emake -C "$(builddir nptl)"
-}
-
-src_compile() {
- if just_headers ; then
- return
- fi
-
- foreach_abi do_src_compile
-}
-
-glibc_src_test() {
- cd "$(builddir nptl)"
-
- local myxfailparams=""
- if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
- for myt in ${XFAIL_TEST_LIST[@]} ; do
- myxfailparams+="test-xfail-${myt}=yes "
- done
- fi
-
- # sandbox does not understand unshare() and prevents
- # writes to /proc/, which makes many tests fail
-
- SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check
-}
-
-do_src_test() {
- local ret=0
-
- glibc_src_test
- : $(( ret |= $? ))
-
- return ${ret}
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # Give tests more time to complete.
- export TIMEOUTFACTOR=5
-
- foreach_abi do_src_test || die "tests failed"
-}
-
-run_locale_gen() {
- local prefix=$1 user_config config
- local -a localegen_args
-
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
-
- localegen_args=( --config "${config}" --destdir "${prefix}" )
-
- # 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- locale-gen "${localegen_args[@]}"
-}
-
-glibc_do_src_install() {
- local builddir=$(builddir nptl)
- cd "${builddir}"
-
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
-
- # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
- # which come without headers etc. Only needed for binary packages since the
- # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
- find "${D}" -name "libnsl.a" -delete
- find "${D}" -name "libnsl.so" -delete
-
- # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
- # to infer upstream version:
- # '#define VERSION "2.26.90"' -> '2.26.90'
- local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
-
- # Avoid stripping binaries not targeted by ${CHOST}. Or else
- # ${CHOST}-strip would break binaries build for ${CTARGET}.
- is_crosscompile && dostrip -x /
- # gdb thread introspection relies on local libpthreas symbols. stripping breaks it
- # See Note [Disable automatic stripping]
- dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
-
- if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
- # Move versioned .a file out of libdir to evade portage QA checks
- # instead of using gen_usr_ldscript(). We fix ldscript as:
- # "GROUP ( /usr/lib64/libm-<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'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
-
- # With devpts under Linux mounted properly, we do not need the pt_chown
- # binary to be setuid. This is because the default owners/perms will be
- # exactly what we want.
- if ! use suid ; then
- find "${ED}" -name pt_chown -exec chmod -s {} +
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- # We need to make sure that /lib and /usr/lib always exists.
- # gcc likes to use relative paths to get to its multilibs like
- # /usr/lib/../lib64/. So while we don't install any files into
- # /usr/lib/, we do need it to exist.
- keepdir $(alt_prefix)/lib
- keepdir $(alt_prefix)/usr/lib
-
- dosym usr/include $(alt_prefix)/sys-include
- return 0
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen
- doman *.[0-8]
- insinto /etc
- doins locale.gen
-
- keepdir /usr/lib/locale
-
- cd "${S}"
-
- # Install misc network config files
- insinto /etc
- doins posix/gai.conf nss/nsswitch.conf
-
- # Gentoo-specific
- newins "${FILESDIR}"/host.conf-1 host.conf
-
- if use nscd ; then
- doins nscd/nscd.conf
-
- newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd
-
- local nscd_args=(
- -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
- )
-
- sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
-
- systemd_dounit nscd/nscd.service
- newtmpfiles nscd/nscd.tmpfiles nscd.conf
- fi
-
- echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
- doenvd "${T}"/00glibc
-
- for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
- [[ -s ${d} ]] && dodoc ${d}
- done
- dodoc -r ChangeLog.old
-
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the
- # creation of the "factory" symlink in pkg_postinst().
- rm -f "${ED}"/etc/localtime
-
- # Generate all locales if this is a native build as locale generation
- if use compile-locales && ! is_crosscompile ; then
- if ! run_locale_gen "${ED%/}"; then
- die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
- fi
-}
-
-glibc_headers_install() {
- local builddir=$(builddir "headers")
- cd "${builddir}"
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
-
- insinto $(alt_headers)/gnu
- doins "${S}"/include/gnu/stubs.h
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include $(alt_prefix)/sys-include
-}
-
-src_install() {
- if just_headers ; then
- export ABI=default
- glibc_headers_install
- return
- fi
-
- foreach_abi glibc_do_src_install
-
- if ! use static-libs ; then
- elog "Not installing static glibc libraries"
- find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
- fi
-}
-
-# Simple test to make sure our new glibc isn't completely broken.
-# Make sure we don't test with statically built binaries since
-# they will fail. Also, skip if this glibc is a cross compiler.
-#
-# If coreutils is built with USE=multicall, some of these files
-# will just be wrapper scripts, not actual ELFs we can test.
-glibc_sanity_check() {
- cd / #228809
-
- # We enter ${ED} so to avoid trouble if the path contains
- # special characters; for instance if the path contains the
- # colon character (:), then the linker will try to split it
- # and look for the libraries in an unexpected place. This can
- # lead to unsafe code execution if the generated prefix is
- # within a world-writable directory.
- # (e.g. /var/tmp/portage:${HOSTNAME})
- pushd "${ED}"/$(get_libdir) >/dev/null
-
- local x striptest
- for x in cal date env free ls true uname uptime ; do
- x=$(type -p ${x})
- [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
- case ${striptest} in
- *"statically linked"*) continue;;
- *"ASCII text"*) continue;;
- esac
- # We need to clear the locale settings as the upgrade might want
- # incompatible locale data. This test is not for verifying that.
- LC_ALL=C \
- ./ld-*.so --library-path . ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-
- popd >/dev/null
-}
-
-pkg_preinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- # prepare /etc/ld.so.conf.d/ for files
- mkdir -p "${EROOT}"/etc/ld.so.conf.d
-
- # Default /etc/hosts.conf:multi to on for systems with small dbs.
- if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
- sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
- einfo "Defaulting /etc/host.conf:multi to on"
- fi
-
- [[ -n ${ROOT} ]] && return 0
- [[ -d ${ED}/$(get_libdir) ]] || return 0
- [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
-
- if [[ -L ${EROOT}/usr/lib/locale ]]; then
- # Help portage migrate this to a directory
- # https://bugs.gentoo.org/753740
- rm "${EROOT}"/usr/lib/locale || die
- fi
-}
-
-pkg_postinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/"
- fi
-
- if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
- if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
- ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- fi
-
- # Check for sanity of /etc/nsswitch.conf, take 2
- if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
- local entry
- for entry in passwd group shadow; do
- if 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
-}
diff --git a/sys-libs/glibc/glibc-2.33-r14.ebuild b/sys-libs/glibc/glibc-2.33-r14.ebuild
deleted file mode 100644
index 7359803209b2..000000000000
--- a/sys-libs/glibc/glibc-2.33-r14.ebuild
+++ /dev/null
@@ -1,1610 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
-# Please read & adapt the page as necessary if obsolete.
-
-PYTHON_COMPAT=( python3_{13..14} )
-TMPFILES_OPTIONAL=1
-
-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/"
-LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
-SLOT="2.2"
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=11
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
- inherit git-r3
-else
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
- SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
- SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
-fi
-
-RELEASE_VER=${PV}
-
-GCC_BOOTSTRAP_VER=20201208
-
-LOCALE_GEN_VER=2.22
-
-GLIBC_SYSTEMD_VER=20210814
-
-SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
-SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
-SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )"
-
-IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemd systemtap test vanilla"
-
-# Minimum kernel version that glibc requires
-MIN_KERN_VER="3.2.0"
-
-# Here's how the cross-compile logic breaks down ...
-# CTARGET - machine that will target the binaries
-# CHOST - machine that will host the binaries
-# CBUILD - machine that will build the binaries
-# If CTARGET != CHOST, it means you want a libc for cross-compiling.
-# If CHOST != CBUILD, it means you want to cross-compile the libc.
-# CBUILD = CHOST = CTARGET - native build/install
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
-# For install paths:
-# CHOST = CTARGET - install into /
-# CHOST != CTARGET - install into /usr/CTARGET/
-#
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-# Note [Disable automatic stripping]
-# Disabling automatic stripping for a few reasons:
-# - portage's attempt to strip breaks non-native binaries at least on
-# arm: bug #697428
-# - portage's attempt to strip libpthread.so.0 breaks gdb thread
-# enumeration: bug #697910. This is quite subtle:
-# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
-# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
-# via 'ps_pglobal_lookup' symbol defined in gdb.
-# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
-# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
-# (unexported) is used to sanity check compatibility before enabling
-# debugging.
-# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
-# * normal 'strip' command trims '.symtab'
-# Thus our main goal here is to prevent 'libpthread.so.0' from
-# losing it's '.symtab' entries.
-# As Gentoo's strip does not allow us to pass less aggressive stripping
-# options and does not check the machine target we strip selectively.
-
-# We need a new-enough binutils/gcc to match upstream baseline.
-# Also we need to make sure our binutils/gcc supports TLS,
-# and that gcc already contains the hardened patches.
-# Lastly, let's avoid some openssh nastiness, bug 708224, as
-# convenience to our users.
-
-# gzip, grep, awk are needed by locale-gen, bug 740750
-
-BDEPEND="
- ${PYTHON_DEPS}
- >=app-misc/pax-utils-1.3.1
- sys-devel/bison
- doc? ( sys-apps/texinfo )
- !compile-locales? (
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- )
-"
-COMMON_DEPEND="
- gd? ( media-libs/gd:2= )
- nscd? ( selinux? (
- audit? ( sys-process/audit )
- caps? ( sys-libs/libcap )
- ) )
- suid? ( caps? ( sys-libs/libcap ) )
- selinux? ( sys-libs/libselinux )
- systemtap? ( dev-debug/systemtap )
-"
-DEPEND="${COMMON_DEPEND}
- compile-locales? (
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- )
- test? ( >=net-dns/libidn2-2.3.0 )
-"
-RDEPEND="${COMMON_DEPEND}
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- sys-apps/gentoo-functions
- !<app-misc/pax-utils-1.3.1
- !<net-misc/openssh-8.1_p1-r2
-"
-
-RESTRICT="!test? ( test )"
-
-if [[ ${CATEGORY} == cross-* ]] ; then
- BDEPEND+=" !headers-only? (
- >=${CATEGORY}/binutils-2.27
- >=${CATEGORY}/gcc-6
- )"
- [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
-else
- BDEPEND+="
- >=sys-devel/binutils-2.27
- >=sys-devel/gcc-6
- "
- 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=(
- # 9) Failures of unknown origin
- tst-latepthread
-
- # 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
-
- # Flaky test, known to fail occasionally:
- # https://sourceware.org/PR19329
- # https://bugs.gentoo.org/719674#c12
- tst-stack4
-
- # The following tests fail only inside portage
- # https://bugs.gentoo.org/831267
- tst-system
- tst-strerror
- tst-strsignal
-)
-
-#
-# Small helper functions
-#
-
-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}"
-}
-
-# We need to be able to set alternative headers for compiling for non-native
-# platform. Will also become useful for testing kernel-headers without screwing
-# up the whole system.
-alt_headers() {
- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
-}
-
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS="$(host_eprefix)$(alt_headers)"
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- echo $(alt_prefix)/$(get_libdir)
-}
-alt_usrlibdir() {
- echo $(alt_prefix)/usr/$(get_libdir)
-}
-
-builddir() {
- echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
-}
-
-do_compile_test() {
- local ret save_cflags=${CFLAGS}
- CFLAGS+=" $1"
- shift
-
- pushd "${T}" >/dev/null
-
- rm -f glibc-test*
- printf '%b' "$*" > glibc-test.c
-
- # Most of the time CC is already set, but not in early sanity checks.
- nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}"
- ret=$?
-
- popd >/dev/null
-
- CFLAGS=${save_cflags}
- return ${ret}
-}
-
-do_run_test() {
- local ret
-
- if [[ ${MERGE_TYPE} == "binary" ]] ; then
- # ignore build failures when installing a binary package #324685
- do_compile_test "" "$@" 2>/dev/null || return 0
- else
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- return 0
- fi
- fi
-
- pushd "${T}" >/dev/null
-
- ./glibc-test
- ret=$?
- rm -f glibc-test*
-
- popd >/dev/null
-
- return ${ret}
-}
-
-setup_target_flags() {
- # This largely mucks with compiler flags. None of which should matter
- # when building up just the headers.
- just_headers && return 0
-
- case $(tc-arch) in
- x86)
- # -march needed for #185404 #199334
- # TODO: When creating the first glibc cross-compile, this test will
- # always fail as it does a full link which in turn requires glibc.
- # Probably also applies when changing multilib profile settings (e.g.
- # enabling x86 when the profile was amd64-only previously).
- # We could change main to _start and pass -nostdlib here so that we
- # only test the gcc code compilation. Or we could do a compile and
- # then look for the symbol via scanelf.
- if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- filter-flags '-march=*'
- export CFLAGS="-march=${t} ${CFLAGS}"
- einfo "Auto adding -march=${t} to CFLAGS #185404"
- fi
- ;;
- amd64)
- # -march needed for #185404 #199334
- # TODO: See cross-compile issues listed above for x86.
- [[ ${ABI} == x86 ]] &&
- if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- # Normally the target is x86_64-xxx, so turn that into the -march that
- # gcc actually accepts. #528708
- [[ ${t} == "x86_64" ]] && t="x86-64"
- filter-flags '-march=*'
- # ugly, ugly, ugly. ugly.
- CFLAGS_x86=$(CFLAGS=${CFLAGS_x86}; filter-flags '-march=*'; echo "${CFLAGS}")
- export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
- einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})"
- fi
- ;;
- mips)
- # The mips abi cannot support the GNU style hashes. #233233
- filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
- ;;
- ppc|ppc64)
- # Many arch-specific implementations do not work on ppc with
- # cache-block not equal to 128 bytes. This breaks memset:
- # https://sourceware.org/PR26522
- # https://bugs.gentoo.org/737996
- # Use default -mcpu=. For ppc it means non-multiarch setup.
- filter-flags '-mcpu=*'
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
-
- local cpu
- case ${CTARGET} in
- sparc64-*)
- cpu="sparc64"
- case $(get-flag mcpu) in
- v9)
- # We need to force at least v9a because the base build doesn't
- # work with just v9.
- # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
- append-flags "-Wa,-xarch=v9a"
- ;;
- esac
- ;;
- sparc-*)
- case $(get-flag mcpu) in
- v8|supersparc|hypersparc|leon|leon3)
- cpu="sparcv8"
- ;;
- *)
- cpu="sparcv9"
- ;;
- esac
- ;;
- esac
- [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
- ;;
- esac
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Allow users to explicitly avoid flag sanitization via
- # USE=custom-cflags.
- if ! use custom-cflags; then
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- # Lock glibc at -O2; we want to be conservative here.
- filter-flags '-O?'
- append-flags -O2
- fi
- strip-unsupported-flags
- filter-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'
-
- # 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'
-
- # #492892
- filter-flags -frecord-gcc-switches
-
- # #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"
- replace-flags -O0 -O1
-
- filter-flags '-fstack-protector*'
-}
-
-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=${__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}}
- export CXX=${__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}}
-
- # and make sure __ORIC_CC and __ORIG_CXX is defined now.
- export __ORIG_CC=${CC}
- export __ORIG_CXX=${CXX}
-
- if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; 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.
-
- local current_binutils_path=$(binutils-config -B)
- local current_gcc_path=$(gcc-config -B)
- einfo "Overriding clang configuration, since it won't work here"
-
- export CC="${current_gcc_path}/gcc"
- 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})"
-
- # 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_CC=${CC}
- export __GLIBC_CXX=${CXX}
-
- export __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_CC} ${__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_CXX} ${__abi_CFLAGS} ${CFLAGS}"
-
- if is_crosscompile; then
- # Assume worst-case bootstrap: glibc is buil first time
- # when ${CTARGET}-g++ is not available yet. We avoid
- # building auxiliary programs that require C++: bug #683074
- # It should not affect final result.
- export libc_cv_cxx_link_ok=no
- # The line above has the same effect. We set CXX explicitly
- # to make build logs less confusing.
- export CXX=
- fi
-}
-
-foreach_abi() {
- setup_env
-
- local ret=0
- local abilist=""
- if use multilib ; then
- abilist=$(get_install_abis)
- else
- abilist=${DEFAULT_ABI}
- fi
- local -x ABI
- for ABI in ${abilist:-default} ; do
- setup_env
- einfo "Running $1 for ABI ${ABI}"
- $1
- : $(( ret |= $? ))
- done
- return ${ret}
-}
-
-glibc_banner() {
- local b="Gentoo ${PVR}"
- [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}"
- echo "${b}"
-}
-
-# The following Kernel version handling functions are mostly copied from portage
-# source. It's better not to use linux-info.eclass here since a) it adds too
-# much magic, see bug 326693 for some of the arguments, and b) some of the
-# functions are just not provided.
-
-g_get_running_KV() {
- uname -r
- return $?
-}
-
-g_KV_major() {
- [[ -z $1 ]] && return 1
- local KV=$@
- echo "${KV%%.*}"
-}
-
-g_KV_minor() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.}
- echo "${KV%%.*}"
-}
-
-g_KV_micro() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.*.}
- echo "${KV%%[^[:digit:]]*}"
-}
-
-g_KV_to_int() {
- [[ -z $1 ]] && return 1
- local KV_MAJOR=$(g_KV_major "$1")
- local KV_MINOR=$(g_KV_minor "$1")
- local KV_MICRO=$(g_KV_micro "$1")
- local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
-
- # We make version 2.2.0 the minimum version we will handle as
- # a sanity check ... if its less, we fail ...
- if [[ ${KV_int} -ge 131584 ]] ; then
- echo "${KV_int}"
- return 0
- fi
- return 1
-}
-
-g_int_to_KV() {
- local version=$1 major minor micro
- major=$((version / 65536))
- minor=$(((version % 65536) / 256))
- micro=$((version % 256))
- echo ${major}.${minor}.${micro}
-}
-
-eend_KV() {
- [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]]
- eend $?
-}
-
-get_kheader_version() {
- printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
- $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \
- tail -n 1
-}
-
-# We collect all sanity checks here. Consistency is not guranteed between
-# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
-# src_unpack.
-sanity_prechecks() {
- # Prevent native builds from downgrading
- if [[ ${MERGE_TYPE} != "buildonly" ]] && \
- [[ -z ${ROOT} ]] && \
- [[ ${CBUILD} == ${CHOST} ]] && \
- [[ ${CHOST} == ${CTARGET} ]] ; then
-
- # The high rev # is to allow people to downgrade between -r#
- # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2
- # should be fine. Hopefully we never actually use a r# this
- # high.
- if has_version ">${CATEGORY}/${P}-r10000" ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
- fi
-
- if ! do_run_test '#include <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
-
- # Users have had a chance to phase themselves, time to give em the boot
- if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then
- eerror "You still haven't deleted ${EROOT}/etc/locales.build."
- eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher."
- die "Lazy upgrader detected"
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml"
- die "Please fix your CHOST"
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty when running with a 32bit"
- ewarn "hypervisor, which is probably not what you want."
- fi
-
- # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
- # we test for...
- if ! is_crosscompile && ! tc-is-cross-compiler ; 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 [[ ${CTARGET} == *-linux* ]] ; then
- local run_kv build_kv want_kv
-
- run_kv=$(g_get_running_KV)
- build_kv=$(g_int_to_KV $(get_kheader_version))
- want_kv=${MIN_KERN_VER}
-
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- # Building fails on an non-supporting kernel
- ebegin "Checking running kernel version (${run_kv} >= ${want_kv})"
- if ! eend_KV ${run_kv} ${want_kv} ; then
- echo
- eerror "You need a kernel of at least ${want_kv}!"
- die "Kernel version too low!"
- fi
- fi
-
- ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})"
- if ! eend_KV ${build_kv} ${want_kv} ; then
- echo
- eerror "You need linux-headers of at least ${want_kv}!"
- die "linux-headers version too low!"
- fi
- fi
- fi
-}
-
-upgrade_warning() {
- 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."
- break
- fi
- done
- fi
-}
-
-#
-# the phases
-#
-
-# pkg_pretend
-
-pkg_pretend() {
- # All the checks...
- einfo "Checking general environment sanity."
- sanity_prechecks
- upgrade_warning
-}
-
-pkg_setup() {
- # see bug 682570
- [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup
-}
-
-# src_unpack
-
-src_unpack() {
- # Consistency is not guaranteed between pkg_ and src_ ...
- sanity_prechecks
-
- use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
-
- setup_env
-
- if [[ ${PV} == 9999* ]] ; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git"
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
- git-r3_src_unpack
- mv patches-git/9999 patches || die
-
- EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
- EGIT_CHECKOUT_DIR=${S}
- git-r3_src_unpack
- else
- unpack ${P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
- fi
-
- cd "${WORKDIR}" || die
- unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
- use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz
-}
-
-src_prepare() {
- local patchsetname
- if ! use vanilla ; then
- if [[ ${PV} == 9999* ]] ; then
- patchsetname="from git master"
- else
- patchsetname="${RELEASE_VER}-${PATCH_VER}"
- fi
- einfo "Applying Gentoo Glibc Patchset ${patchsetname}"
- eapply "${WORKDIR}"/patches
- einfo "Done."
- fi
-
- default
-
- gnuconfig_update
-
- cd "${WORKDIR}"
- find . -name configure -exec touch {} +
-
- # move the external locale-gen to its old place
- mkdir extra || die
- mv locale-gen-${LOCALE_GEN_VER} extra/locale || die
-
- eprefixify extra/locale/locale-gen
-
- # Fix permissions on some of the scripts.
- chmod u+x "${S}"/scripts/*.sh
-
- cd "${S}"
-}
-
-glibc_do_configure() {
-
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM AR AS STRIP RANLIB OBJCOPY STRINGS OBJDUMP READELF; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
-
- echo
- local myconf=()
-
- case ${CTARGET} in
- m68k*)
- # setjmp() is not compatible with stack protection:
- # https://sourceware.org/PR24202
- myconf+=( --enable-stack-protector=no )
- ;;
- *)
- # Use '=strong' instead of '=all' to protect only functions
- # worth protecting from stack smashes.
- # '=all' is also known to have a problem in IFUNC resolution
- # tests: https://sourceware.org/PR25680, bug #712356.
- myconf+=( --enable-stack-protector=$(usex ssp strong no) )
- ;;
- esac
- myconf+=( --enable-stackguard-randomization )
-
- # Keep a whitelist of targets supporing IFUNC. glibc's ./configure
- # is not robust enough to detect proper support:
- # https://bugs.gentoo.org/641216
- # https://sourceware.org/PR22634#c0
- case $(tc-arch ${CTARGET}) in
- # Keep whitelist of targets where autodetection mostly works.
- amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;;
- # Blacklist everywhere else
- *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
- esac
-
- # Enable Intel Control-flow Enforcement Technology on amd64 if requested
- case ${CTARGET} in
- x86_64-*) myconf+=( $(use_enable cet) ) ;;
- *) ;;
- esac
-
- [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
-
- myconf+=( --enable-kernel=${MIN_KERN_VER} )
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. only for the primary ABI on multilib systems
- # 3. Not a crosscompile
- if ! is_crosscompile && use selinux ; then
- if use multilib ; then
- if is_final_abi ; then
- myconf+=( --with-selinux )
- else
- myconf+=( --without-selinux )
- fi
- else
- myconf+=( --with-selinux )
- fi
- else
- myconf+=( --without-selinux )
- fi
-
- # Force a few tests where we always know the answer but
- # configure is incapable of finding it.
- if is_crosscompile ; then
- export \
- libc_cv_c_cleanup=yes \
- libc_cv_forced_unwind=yes
- fi
-
- myconf+=(
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- $(use_with gd)
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- --sysconfdir="$(host_eprefix)/etc"
- --localstatedir="$(host_eprefix)/var"
- --libdir='$(prefix)'/$(get_libdir)
- --mandir='$(prefix)'/share/man
- --infodir='$(prefix)'/share/info
- --libexecdir='$(libdir)'/misc/glibc
- --with-bugurl=https://bugs.gentoo.org/
- --with-pkgversion="$(glibc_banner)"
- $(use_enable crypt)
- $(use_multiarch || echo --disable-multi-arch)
- $(use_enable static-pie)
- $(use_enable systemtap)
- $(use_enable nscd)
-
- # locale data is arch-independent
- # https://bugs.gentoo.org/753740
- libc_cv_complocaledir='${exec_prefix}/lib/locale'
-
- # -march= option tricks build system to infer too
- # high ISA level: https://sourceware.org/PR27318
- libc_cv_include_x86_isa_level=no
- # Explicit override of https://sourceware.org/PR27991
- # exposes a bug in glibc's configure:
- # https://sourceware.org/PR27991
- libc_cv_have_x86_lahf_sahf=no
- libc_cv_have_x86_movbe=no
-
- ${EXTRA_ECONF}
- )
-
- # We rely on sys-libs/timezone-data for timezone tools normally.
- myconf+=( $(use_enable vanilla timezone-tools) )
-
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
- ac_cv_lib_cap_cap_init=$(usex caps || echo no)
-
- # There is no configure option for this and we need to export it
- # since the glibc build will re-run configure on itself
- export libc_cv_rootsbindir="$(host_eprefix)/sbin"
- export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)"
-
- # We take care of patching our binutils to use both hash styles,
- # and many people like to force gnu hash style only, so disable
- # this overriding check. #347761
- export libc_cv_hashstyle=no
-
- local builddir=$(builddir nptl)
- mkdir -p "${builddir}"
- cd "${builddir}"
- set -- "${S}"/configure "${myconf[@]}"
- echo "$@"
- "$@" || die "failed to configure glibc"
-
- # ia64 static cross-compilers are a pita in so much that they
- # can't produce static ELFs (as the libgcc.a is broken). so
- # disable building of the programs for those targets if it
- # doesn't work.
- # XXX: We could turn this into a compiler test, but ia64 is
- # the only one that matters, so this should be fine for now.
- if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
- sed -i '1i+link-static = touch $@' config.make
- fi
-
- # If we're trying to migrate between ABI sets, we need
- # to lie and use a local copy of gcc. Like if the system
- # is built with MULTILIB_ABIS="amd64 x86" but we want to
- # add x32 to it, gcc/glibc don't yet support x32.
- #
- if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then
- echo 'int main(){}' > "${T}"/test.c
- if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
- sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
- fi
- fi
-}
-
-glibc_headers_configure() {
- export ABI=default
-
- local builddir=$(builddir "headers")
- mkdir -p "${builddir}"
- cd "${builddir}"
-
- # if we don't have a compiler yet, we can't really test it now ...
- # hopefully they don't affect header generation, so let's hope for
- # the best here ...
- local v vars=(
- ac_cv_header_cpuid_h=yes
- libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
- libc_cv_asm_cfi_directives=yes
- libc_cv_broken_visibility_attribute=no
- libc_cv_c_cleanup=yes
- libc_cv_compiler_powerpc64le_binary128_ok=yes
- libc_cv_forced_unwind=yes
- libc_cv_gcc___thread=yes
- libc_cv_mlong_double_128=yes
- libc_cv_mlong_double_128ibm=yes
- libc_cv_ppc_machine=yes
- libc_cv_ppc_rel16=yes
- libc_cv_predef_fortify_source=no
- libc_cv_target_power8_ok=yes
- libc_cv_visibility_attribute=yes
- libc_cv_z_combreloc=yes
- libc_cv_z_execstack=yes
- libc_cv_z_initfirst=yes
- libc_cv_z_nodelete=yes
- libc_cv_z_nodlopen=yes
- libc_cv_z_relro=yes
- libc_mips_abi=${ABI}
- libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=no
- ac_cv_lib_cap_cap_init=no
- )
-
- einfo "Forcing cached settings:"
- for v in "${vars[@]}" ; do
- einfo " ${v}"
- export ${v}
- done
-
- local headers_only_arch_CPPFLAGS=()
-
- # Blow away some random CC settings that screw things up. #550192
- if [[ -d ${S}/sysdeps/mips ]]; then
- pushd "${S}"/sysdeps/mips >/dev/null
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
-
- # Force the mips ABI to the default. This is OK because the set of
- # installed headers in this phase is the same between the 3 ABIs.
- # If this ever changes, this hack will break, but that's unlikely
- # as glibc discourages that behavior.
- # https://crbug.com/647033
- sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
-
- popd >/dev/null
- fi
-
- case ${CTARGET} in
- riscv*)
- # RISC-V interrogates the compiler to determine which target to
- # build. If building the headers then we don't strictly need a
- # RISC-V compiler, so the built-in definitions that are provided
- # along with all RISC-V compiler might not exist. This causes
- # glibc's RISC-V preconfigure script to blow up. Since we're just
- # building the headers any value will actually work here, so just
- # pick the standard one (rv64g/lp64d) to make the build scripts
- # happy for now -- the headers are all the same anyway so it
- # doesn't matter.
- headers_only_arch_CPPFLAGS+=(
- -D__riscv_xlen=64
- -D__riscv_flen=64
- -D__riscv_float_abi_double=1
- -D__riscv_atomic=1
- ) ;;
- esac
-
- local myconf=()
- myconf+=(
- --disable-sanity-checks
- --enable-hacker-mode
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- $(use_enable crypt)
- ${EXTRA_ECONF}
- )
-
- # Nothing is compiled here which would affect the headers for the target.
- # So forcing CC/CFLAGS is sane.
- local headers_only_CC=$(tc-getBUILD_CC)
- local headers_only_CFLAGS="-O1 -pipe"
- local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}"
- local headers_only_LDFLAGS=""
- set -- "${S}"/configure "${myconf[@]}"
- echo \
- "CC=${headers_only_CC}" \
- "CFLAGS=${headers_only_CFLAGS}" \
- "CPPFLAGS=${headers_only_CPPFLAGS}" \
- "LDFLAGS=${headers_only_LDFLAGS}" \
- "$@"
- CC=${headers_only_CC} \
- CFLAGS=${headers_only_CFLAGS} \
- CPPFLAGS=${headers_only_CPPFLAGS} \
- LDFLAGS="" \
- "$@" || die "failed to configure glibc"
-}
-
-do_src_configure() {
- if just_headers ; then
- glibc_headers_configure
- else
- glibc_do_configure nptl
- fi
-}
-
-src_configure() {
- foreach_abi do_src_configure
-}
-
-do_src_compile() {
- emake -C "$(builddir nptl)"
-}
-
-src_compile() {
- if just_headers ; then
- return
- fi
-
- foreach_abi do_src_compile
-}
-
-glibc_src_test() {
- cd "$(builddir nptl)"
-
- local myxfailparams=""
- if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
- for myt in ${XFAIL_TEST_LIST[@]} ; do
- myxfailparams+="test-xfail-${myt}=yes "
- done
- fi
-
- # sandbox does not understand unshare() and prevents
- # writes to /proc/, which makes many tests fail
-
- SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check
-}
-
-do_src_test() {
- local ret=0
-
- glibc_src_test
- : $(( ret |= $? ))
-
- return ${ret}
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # Give tests more time to complete.
- export TIMEOUTFACTOR=5
-
- foreach_abi do_src_test || die "tests failed"
-}
-
-run_locale_gen() {
- local prefix=$1 user_config config
- local -a localegen_args
-
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
-
- localegen_args=( --config "${config}" --destdir "${prefix}" )
-
- # 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- locale-gen "${localegen_args[@]}"
-}
-
-glibc_do_src_install() {
- local builddir=$(builddir nptl)
- cd "${builddir}"
-
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
-
- # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
- # which come without headers etc. Only needed for binary packages since the
- # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
- find "${D}" -name "libnsl.a" -delete
- find "${D}" -name "libnsl.so" -delete
-
- # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
- # to infer upstream version:
- # '#define VERSION "2.26.90"' -> '2.26.90'
- local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
-
- # Avoid stripping binaries not targeted by ${CHOST}. Or else
- # ${CHOST}-strip would break binaries build for ${CTARGET}.
- is_crosscompile && dostrip -x /
- # gdb thread introspection relies on local libpthreas symbols. stripping breaks it
- # See Note [Disable automatic stripping]
- dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
-
- if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
- # Move versioned .a file out of libdir to evade portage QA checks
- # instead of using gen_usr_ldscript(). We fix ldscript as:
- # "GROUP ( /usr/lib64/libm-<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'll take care of the cache ourselves
- rm -f "${ED}"/etc/ld.so.cache
-
- # Everything past this point just needs to be done once ...
- is_final_abi || return 0
-
- # Make sure the non-native interp can be found on multilib systems even
- # if the main library set isn't installed into the right place. Maybe
- # we should query the active gcc for info instead of hardcoding it ?
- local i ldso_abi ldso_name
- local ldso_abi_list=(
- # x86
- amd64 /lib64/ld-linux-x86-64.so.2
- x32 /libx32/ld-linux-x32.so.2
- x86 /lib/ld-linux.so.2
- # mips
- o32 /lib/ld.so.1
- n32 /lib32/ld.so.1
- n64 /lib64/ld.so.1
- # powerpc
- ppc /lib/ld.so.1
- # riscv
- ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
- ilp32 /lib/ld-linux-riscv32-ilp32.so.1
- lp64d /lib/ld-linux-riscv64-lp64d.so.1
- lp64 /lib/ld-linux-riscv64-lp64.so.1
- # s390
- s390 /lib/ld.so.1
- s390x /lib/ld64.so.1
- # sparc
- sparc32 /lib/ld-linux.so.2
- sparc64 /lib64/ld-linux.so.2
- )
- case $(tc-endian) in
- little)
- ldso_abi_list+=(
- # arm
- arm64 /lib/ld-linux-aarch64.so.1
- # ELFv2 (glibc does not support ELFv1 on LE)
- ppc64 /lib64/ld64.so.2
- )
- ;;
- big)
- ldso_abi_list+=(
- # arm
- arm64 /lib/ld-linux-aarch64_be.so.1
- # ELFv1 (glibc does not support ELFv2 on BE)
- ppc64 /lib64/ld64.so.1
- )
- ;;
- esac
- if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
- dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
- fi
- for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
- ldso_abi=${ldso_abi_list[i]}
- has ${ldso_abi} $(get_install_abis) || continue
-
- ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
- if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
- dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
- fi
- done
-
- # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
- # the runtime loader name, see also https://xkcd.com/927/
- # Normally, in Gentoo one should never come across executables that require this.
- # However, binary commercial packages are known to adhere to weird practices.
- # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
- local lsb_ldso_name native_ldso_name lsb_ldso_abi
- local lsb_ldso_abi_list=(
- # x86
- amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
- )
- for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
- lsb_ldso_abi=${lsb_ldso_abi_list[i]}
- native_ldso_name=${lsb_ldso_abi_list[i+1]}
- lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
- has ${lsb_ldso_abi} $(get_install_abis) || continue
-
- if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
- dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
- fi
- done
-
- # With devpts under Linux mounted properly, we do not need the pt_chown
- # binary to be setuid. This is because the default owners/perms will be
- # exactly what we want.
- if ! use suid ; then
- find "${ED}" -name pt_chown -exec chmod -s {} +
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- # We need to make sure that /lib and /usr/lib always exists.
- # gcc likes to use relative paths to get to its multilibs like
- # /usr/lib/../lib64/. So while we don't install any files into
- # /usr/lib/, we do need it to exist.
- keepdir $(alt_prefix)/lib
- keepdir $(alt_prefix)/usr/lib
-
- dosym usr/include $(alt_prefix)/sys-include
- return 0
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen
- doman *.[0-8]
- insinto /etc
- doins locale.gen
-
- keepdir /usr/lib/locale
-
- cd "${S}"
-
- # Install misc network config files
- insinto /etc
- doins posix/gai.conf
-
- 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
- if ! run_locale_gen "${ED%/}"; then
- die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
- fi
-}
-
-glibc_headers_install() {
- local builddir=$(builddir "headers")
- cd "${builddir}"
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
-
- insinto $(alt_headers)/gnu
- doins "${S}"/include/gnu/stubs.h
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include $(alt_prefix)/sys-include
-}
-
-src_install() {
- if just_headers ; then
- export ABI=default
- glibc_headers_install
- return
- fi
-
- foreach_abi glibc_do_src_install
-
- if ! use static-libs ; then
- einfo "Not installing static glibc libraries"
- find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
- fi
-}
-
-# Simple test to make sure our new glibc isn't completely broken.
-# Make sure we don't test with statically built binaries since
-# they will fail. Also, skip if this glibc is a cross compiler.
-#
-# If coreutils is built with USE=multicall, some of these files
-# will just be wrapper scripts, not actual ELFs we can test.
-glibc_sanity_check() {
- cd / #228809
-
- # We enter ${ED} so to avoid trouble if the path contains
- # special characters; for instance if the path contains the
- # colon character (:), then the linker will try to split it
- # and look for the libraries in an unexpected place. This can
- # lead to unsafe code execution if the generated prefix is
- # within a world-writable directory.
- # (e.g. /var/tmp/portage:${HOSTNAME})
- pushd "${ED}"/$(get_libdir) >/dev/null
-
- # 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
-
- # 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 ! use crypt && 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
-}
-
-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
- if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
- ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- 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/glibc/glibc-2.34-r14.ebuild b/sys-libs/glibc/glibc-2.34-r14.ebuild
deleted file mode 100644
index a4f0cb3f9b52..000000000000
--- a/sys-libs/glibc/glibc-2.34-r14.ebuild
+++ /dev/null
@@ -1,1631 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
-# Please read & adapt the page as necessary if obsolete.
-
-PYTHON_COMPAT=( python3_{13..14} )
-TMPFILES_OPTIONAL=1
-
-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/"
-LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
-SLOT="2.2"
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=17
-PATCH_DEV=dilfridge
-
-if [[ ${PV} == 9999* ]]; then
- inherit git-r3
-else
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
- SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
- SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
-fi
-
-RELEASE_VER=${PV}
-
-GCC_BOOTSTRAP_VER=20201208
-
-LOCALE_GEN_VER=2.22
-
-GLIBC_SYSTEMD_VER=20210729
-
-SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
-SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
-SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )"
-
-IUSE="audit caps cet +clone3 compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemd systemtap test vanilla"
-
-# 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"
-
-# Here's how the cross-compile logic breaks down ...
-# CTARGET - machine that will target the binaries
-# CHOST - machine that will host the binaries
-# CBUILD - machine that will build the binaries
-# If CTARGET != CHOST, it means you want a libc for cross-compiling.
-# If CHOST != CBUILD, it means you want to cross-compile the libc.
-# CBUILD = CHOST = CTARGET - native build/install
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
-# For install paths:
-# CHOST = CTARGET - install into /
-# CHOST != CTARGET - install into /usr/CTARGET/
-#
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-# Note [Disable automatic stripping]
-# Disabling automatic stripping for a few reasons:
-# - portage's attempt to strip breaks non-native binaries at least on
-# arm: bug #697428
-# - portage's attempt to strip libpthread.so.0 breaks gdb thread
-# enumeration: bug #697910. This is quite subtle:
-# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
-# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
-# via 'ps_pglobal_lookup' symbol defined in gdb.
-# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
-# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
-# (unexported) is used to sanity check compatibility before enabling
-# debugging.
-# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
-# * normal 'strip' command trims '.symtab'
-# Thus our main goal here is to prevent 'libpthread.so.0' from
-# losing it's '.symtab' entries.
-# As Gentoo's strip does not allow us to pass less aggressive stripping
-# options and does not check the machine target we strip selectively.
-
-# We need a new-enough binutils/gcc to match upstream baseline.
-# Also we need to make sure our binutils/gcc supports TLS,
-# and that gcc already contains the hardened patches.
-# Lastly, let's avoid some openssh nastiness, bug 708224, as
-# convenience to our users.
-
-# gzip, grep, awk are needed by locale-gen, bug 740750
-
-BDEPEND="
- ${PYTHON_DEPS}
- >=app-misc/pax-utils-${MIN_PAX_UTILS_VER}
- sys-devel/bison
- doc? ( sys-apps/texinfo )
- !compile-locales? (
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- )
-"
-COMMON_DEPEND="
- gd? ( media-libs/gd:2= )
- nscd? ( selinux? (
- audit? ( sys-process/audit )
- caps? ( sys-libs/libcap )
- ) )
- suid? ( caps? ( sys-libs/libcap ) )
- selinux? ( sys-libs/libselinux )
- systemtap? ( dev-debug/systemtap )
-"
-DEPEND="${COMMON_DEPEND}
- compile-locales? (
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- )
- test? ( >=net-dns/libidn2-2.3.0 )
-"
-RDEPEND="${COMMON_DEPEND}
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- sys-apps/gentoo-functions
- !<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
- !<net-misc/openssh-8.1_p1-r2
-"
-
-RESTRICT="!test? ( test )"
-
-if [[ ${CATEGORY} == cross-* ]] ; then
- BDEPEND+=" !headers-only? (
- >=${CATEGORY}/binutils-2.27
- >=${CATEGORY}/gcc-6
- )"
- [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
-else
- BDEPEND+="
- >=sys-devel/binutils-2.27
- >=sys-devel/gcc-6
- "
- 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
-)
-
-#
-# Small helper functions
-#
-
-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}"
-}
-
-# We need to be able to set alternative headers for compiling for non-native
-# platform. Will also become useful for testing kernel-headers without screwing
-# up the whole system.
-alt_headers() {
- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
-}
-
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS="$(host_eprefix)$(alt_headers)"
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- echo $(alt_prefix)/$(get_libdir)
-}
-alt_usrlibdir() {
- echo $(alt_prefix)/usr/$(get_libdir)
-}
-
-builddir() {
- echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
-}
-
-do_compile_test() {
- local ret save_cflags=${CFLAGS}
- CFLAGS+=" $1"
- shift
-
- pushd "${T}" >/dev/null
-
- rm -f glibc-test*
- printf '%b' "$*" > glibc-test.c
-
- # Most of the time CC is already set, but not in early sanity checks.
- nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}"
- ret=$?
-
- popd >/dev/null
-
- CFLAGS=${save_cflags}
- return ${ret}
-}
-
-do_run_test() {
- local ret
-
- if [[ ${MERGE_TYPE} == "binary" ]] ; then
- # ignore build failures when installing a binary package #324685
- do_compile_test "" "$@" 2>/dev/null || return 0
- else
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- return 0
- fi
- fi
-
- pushd "${T}" >/dev/null
-
- ./glibc-test
- ret=$?
- rm -f glibc-test*
-
- popd >/dev/null
-
- return ${ret}
-}
-
-setup_target_flags() {
- # This largely mucks with compiler flags. None of which should matter
- # when building up just the headers.
- just_headers && return 0
-
- case $(tc-arch) in
- x86)
- # -march needed for #185404 #199334
- # TODO: When creating the first glibc cross-compile, this test will
- # always fail as it does a full link which in turn requires glibc.
- # Probably also applies when changing multilib profile settings (e.g.
- # enabling x86 when the profile was amd64-only previously).
- # We could change main to _start and pass -nostdlib here so that we
- # only test the gcc code compilation. Or we could do a compile and
- # then look for the symbol via scanelf.
- if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- filter-flags '-march=*'
- export CFLAGS="-march=${t} ${CFLAGS}"
- einfo "Auto adding -march=${t} to CFLAGS #185404"
- fi
- ;;
- amd64)
- # -march needed for #185404 #199334
- # TODO: See cross-compile issues listed above for x86.
- [[ ${ABI} == x86 ]] &&
- if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- # Normally the target is x86_64-xxx, so turn that into the -march that
- # gcc actually accepts. #528708
- [[ ${t} == "x86_64" ]] && t="x86-64"
- filter-flags '-march=*'
- # ugly, ugly, ugly. ugly.
- CFLAGS_x86=$(CFLAGS=${CFLAGS_x86}; filter-flags '-march=*'; echo "${CFLAGS}")
- export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
- einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})"
- fi
-
- # Workaround for https://bugs.gentoo.org/823780. This really should
- # be removed when the upstream bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103275
- # is fixed in our tree, either via 11.3 or an 11.2p2 patch set.
- if [[ ${ABI} == x86 ]] && tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)); then
- export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f"
- einfo "Auto adding -mno-avx512f to CFLAGS_x86 (bug #823780) (ABI=${ABI})"
- fi
- ;;
- mips)
- # The mips abi cannot support the GNU style hashes. #233233
- filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
- ;;
- ppc|ppc64)
- # Many arch-specific implementations do not work on ppc with
- # cache-block not equal to 128 bytes. This breaks memset:
- # https://sourceware.org/PR26522
- # https://bugs.gentoo.org/737996
- # Use default -mcpu=. For ppc it means non-multiarch setup.
- filter-flags '-mcpu=*'
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
-
- local cpu
- case ${CTARGET} in
- sparc64-*)
- cpu="sparc64"
- case $(get-flag mcpu) in
- v9)
- # We need to force at least v9a because the base build doesn't
- # work with just v9.
- # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
- append-flags "-Wa,-xarch=v9a"
- ;;
- esac
- ;;
- sparc-*)
- case $(get-flag mcpu) in
- v8|supersparc|hypersparc|leon|leon3)
- cpu="sparcv8"
- ;;
- *)
- cpu="sparcv9"
- ;;
- esac
- ;;
- esac
- [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
- ;;
- esac
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Allow users to explicitly avoid flag sanitization via
- # USE=custom-cflags.
- if ! use custom-cflags; then
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- # Lock glibc at -O2; we want to be conservative here.
- filter-flags '-O?'
- append-flags -O2
- fi
-
- strip-unsupported-flags
- filter-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'
-
- # 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'
-
- # #492892
- filter-flags -frecord-gcc-switches
-
- # #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"
- replace-flags -O0 -O1
-
- filter-flags '-fstack-protector*'
-
- # See end of bug #830454; we handle this via USE=cet
- filter-flags '-fcf-protection='
-}
-
-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=${__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}}
- export CXX=${__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}}
-
- # and make sure __ORIC_CC and __ORIG_CXX is defined now.
- export __ORIG_CC=${CC}
- export __ORIG_CXX=${CXX}
-
- if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; 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 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})"
-
- # 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_CC=${CC}
- export __GLIBC_CXX=${CXX}
-
- export __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_CC} ${__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_CXX} ${__abi_CFLAGS} ${CFLAGS}"
-
- if is_crosscompile; then
- # Assume worst-case bootstrap: glibc is buil first time
- # when ${CTARGET}-g++ is not available yet. We avoid
- # building auxiliary programs that require C++: bug #683074
- # It should not affect final result.
- export libc_cv_cxx_link_ok=no
- # The line above has the same effect. We set CXX explicitly
- # to make build logs less confusing.
- export CXX=
- fi
-}
-
-foreach_abi() {
- setup_env
-
- local ret=0
- local abilist=""
- if use multilib ; then
- abilist=$(get_install_abis)
- else
- abilist=${DEFAULT_ABI}
- fi
- local -x ABI
- for ABI in ${abilist:-default} ; do
- setup_env
- einfo "Running $1 for ABI ${ABI}"
- $1
- : $(( ret |= $? ))
- done
- return ${ret}
-}
-
-glibc_banner() {
- local b="Gentoo ${PVR}"
- [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}"
- echo "${b}"
-}
-
-# The following Kernel version handling functions are mostly copied from portage
-# source. It's better not to use linux-info.eclass here since a) it adds too
-# much magic, see bug 326693 for some of the arguments, and b) some of the
-# functions are just not provided.
-
-g_get_running_KV() {
- uname -r
- return $?
-}
-
-g_KV_major() {
- [[ -z $1 ]] && return 1
- local KV=$@
- echo "${KV%%.*}"
-}
-
-g_KV_minor() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.}
- echo "${KV%%.*}"
-}
-
-g_KV_micro() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.*.}
- echo "${KV%%[^[:digit:]]*}"
-}
-
-g_KV_to_int() {
- [[ -z $1 ]] && return 1
- local KV_MAJOR=$(g_KV_major "$1")
- local KV_MINOR=$(g_KV_minor "$1")
- local KV_MICRO=$(g_KV_micro "$1")
- local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
-
- # We make version 2.2.0 the minimum version we will handle as
- # a sanity check ... if its less, we fail ...
- if [[ ${KV_int} -ge 131584 ]] ; then
- echo "${KV_int}"
- return 0
- fi
- return 1
-}
-
-g_int_to_KV() {
- local version=$1 major minor micro
- major=$((version / 65536))
- minor=$(((version % 65536) / 256))
- micro=$((version % 256))
- echo ${major}.${minor}.${micro}
-}
-
-eend_KV() {
- [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]]
- eend $?
-}
-
-get_kheader_version() {
- printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
- $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \
- tail -n 1
-}
-
-# We collect all sanity checks here. Consistency is not guranteed between
-# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
-# src_unpack.
-sanity_prechecks() {
- # Prevent native builds from downgrading
- if [[ ${MERGE_TYPE} != "buildonly" ]] && \
- [[ -z ${ROOT} ]] && \
- [[ ${CBUILD} == ${CHOST} ]] && \
- [[ ${CHOST} == ${CTARGET} ]] ; then
-
- # The high rev # is to allow people to downgrade between -r#
- # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2
- # should be fine. Hopefully we never actually use a r# this
- # high.
- if has_version ">${CATEGORY}/${P}-r10000" ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
- fi
-
- if ! do_run_test '#include <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
-
- # Users have had a chance to phase themselves, time to give em the boot
- if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then
- eerror "You still haven't deleted ${EROOT}/etc/locales.build."
- eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher."
- die "Lazy upgrader detected"
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml"
- die "Please fix your CHOST"
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty when running with a 32bit"
- ewarn "hypervisor, which is probably not what you want."
- fi
-
- # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
- # we test for...
- if ! is_crosscompile && ! tc-is-cross-compiler ; 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
-
- 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
-}
-
-upgrade_warning() {
- 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() {
- # All the checks...
- einfo "Checking general environment sanity."
- sanity_prechecks
- upgrade_warning
-}
-
-pkg_setup() {
- # see bug 682570
- [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup
-}
-
-# src_unpack
-
-src_unpack() {
- # Consistency is not guaranteed between pkg_ and src_ ...
- sanity_prechecks
-
- use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
-
- setup_env
-
- if [[ ${PV} == 9999* ]] ; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git"
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
- git-r3_src_unpack
- mv patches-git/9999 patches || die
-
- EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
- EGIT_CHECKOUT_DIR=${S}
- git-r3_src_unpack
- else
- unpack ${P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
- fi
-
- cd "${WORKDIR}" || die
- unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
- use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz
-}
-
-src_prepare() {
- local patchsetname
- if ! use vanilla ; then
- if [[ ${PV} == 9999* ]] ; then
- patchsetname="from git master"
- else
- patchsetname="${RELEASE_VER}-${PATCH_VER}"
- fi
- einfo "Applying Gentoo Glibc Patchset ${patchsetname}"
- eapply "${WORKDIR}"/patches
- einfo "Done."
- fi
-
- if use clone3 ; then
- append-cppflags -DGENTOO_USE_CLONE3
- else
- # See e.g. bug #827386, bug #819045.
- elog "Disabling the clone3 syscall for compatibility with older Electron apps."
- elog "Please re-enable this flag before filing bugs!"
- fi
-
- default
-
- gnuconfig_update
-
- cd "${WORKDIR}"
- find . -name configure -exec touch {} +
-
- # move the external locale-gen to its old place
- mkdir extra || die
- mv locale-gen-${LOCALE_GEN_VER} extra/locale || die
-
- eprefixify extra/locale/locale-gen
-
- # Fix permissions on some of the scripts.
- chmod u+x "${S}"/scripts/*.sh
-
- cd "${S}"
-}
-
-glibc_do_configure() {
-
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM AR AS STRIP RANLIB OBJCOPY STRINGS OBJDUMP READELF; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
-
- echo
- local myconf=()
-
- case ${CTARGET} in
- m68k*)
- # setjmp() is not compatible with stack protection:
- # https://sourceware.org/PR24202
- myconf+=( --enable-stack-protector=no )
- ;;
- *)
- # Use '=strong' instead of '=all' to protect only functions
- # worth protecting from stack smashes.
- # '=all' is also known to have a problem in IFUNC resolution
- # tests: https://sourceware.org/PR25680, bug #712356.
- myconf+=( --enable-stack-protector=$(usex ssp strong no) )
- ;;
- esac
- myconf+=( --enable-stackguard-randomization )
-
- # Keep a whitelist of targets supporing IFUNC. glibc's ./configure
- # is not robust enough to detect proper support:
- # https://bugs.gentoo.org/641216
- # https://sourceware.org/PR22634#c0
- case $(tc-arch ${CTARGET}) in
- # Keep whitelist of targets where autodetection mostly works.
- amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;;
- # Blacklist everywhere else
- *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
- esac
-
- # Enable Intel Control-flow Enforcement Technology on amd64 if requested
- case ${CTARGET} in
- x86_64-*) myconf+=( $(use_enable cet) ) ;;
- *) ;;
- esac
-
- [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
-
- myconf+=( --enable-kernel=${MIN_KERN_VER} )
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. only for the primary ABI on multilib systems
- # 3. Not a crosscompile
- if ! is_crosscompile && use selinux ; then
- if use multilib ; then
- if is_final_abi ; then
- myconf+=( --with-selinux )
- else
- myconf+=( --without-selinux )
- fi
- else
- myconf+=( --with-selinux )
- fi
- else
- myconf+=( --without-selinux )
- fi
-
- # Force a few tests where we always know the answer but
- # configure is incapable of finding it.
- if is_crosscompile ; then
- export \
- libc_cv_c_cleanup=yes \
- libc_cv_forced_unwind=yes
- fi
-
- myconf+=(
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- $(use_with gd)
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- --sysconfdir="$(host_eprefix)/etc"
- --localstatedir="$(host_eprefix)/var"
- --libdir='$(prefix)'/$(get_libdir)
- --mandir='$(prefix)'/share/man
- --infodir='$(prefix)'/share/info
- --libexecdir='$(libdir)'/misc/glibc
- --with-bugurl=https://bugs.gentoo.org/
- --with-pkgversion="$(glibc_banner)"
- $(use_enable crypt)
- $(use_multiarch || echo --disable-multi-arch)
- $(use_enable static-pie)
- $(use_enable systemtap)
- $(use_enable nscd)
-
- # locale data is arch-independent
- # https://bugs.gentoo.org/753740
- libc_cv_complocaledir='${exec_prefix}/lib/locale'
-
- # -march= option tricks build system to infer too
- # high ISA level: https://sourceware.org/PR27318
- libc_cv_include_x86_isa_level=no
- # Explicit override of https://sourceware.org/PR27991
- # exposes a bug in glibc's configure:
- # https://sourceware.org/PR27991
- libc_cv_have_x86_lahf_sahf=no
- libc_cv_have_x86_movbe=no
-
- ${EXTRA_ECONF}
- )
-
- # We rely on sys-libs/timezone-data for timezone tools normally.
- myconf+=( $(use_enable vanilla timezone-tools) )
-
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
- ac_cv_lib_cap_cap_init=$(usex caps || echo no)
-
- # There is no configure option for this and we need to export it
- # since the glibc build will re-run configure on itself
- export libc_cv_rootsbindir="$(host_eprefix)/sbin"
- export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)"
-
- local builddir=$(builddir nptl)
- mkdir -p "${builddir}"
- cd "${builddir}"
- set -- "${S}"/configure "${myconf[@]}"
- echo "$@"
- "$@" || die "failed to configure glibc"
-
- # ia64 static cross-compilers are a pita in so much that they
- # can't produce static ELFs (as the libgcc.a is broken). so
- # disable building of the programs for those targets if it
- # doesn't work.
- # XXX: We could turn this into a compiler test, but ia64 is
- # the only one that matters, so this should be fine for now.
- if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
- sed -i '1i+link-static = touch $@' config.make
- fi
-
- # If we're trying to migrate between ABI sets, we need
- # to lie and use a local copy of gcc. Like if the system
- # is built with MULTILIB_ABIS="amd64 x86" but we want to
- # add x32 to it, gcc/glibc don't yet support x32.
- #
- if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then
- echo 'int main(){}' > "${T}"/test.c
- if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
- sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
- fi
- fi
-}
-
-glibc_headers_configure() {
- export ABI=default
-
- local builddir=$(builddir "headers")
- mkdir -p "${builddir}"
- cd "${builddir}"
-
- # if we don't have a compiler yet, we can't really test it now ...
- # hopefully they don't affect header generation, so let's hope for
- # the best here ...
- local v vars=(
- ac_cv_header_cpuid_h=yes
- libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
- libc_cv_asm_cfi_directives=yes
- libc_cv_broken_visibility_attribute=no
- libc_cv_c_cleanup=yes
- libc_cv_compiler_powerpc64le_binary128_ok=yes
- libc_cv_forced_unwind=yes
- libc_cv_gcc___thread=yes
- libc_cv_mlong_double_128=yes
- libc_cv_mlong_double_128ibm=yes
- libc_cv_ppc_machine=yes
- libc_cv_ppc_rel16=yes
- libc_cv_predef_fortify_source=no
- libc_cv_target_power8_ok=yes
- libc_cv_visibility_attribute=yes
- libc_cv_z_combreloc=yes
- libc_cv_z_execstack=yes
- libc_cv_z_initfirst=yes
- libc_cv_z_nodelete=yes
- libc_cv_z_nodlopen=yes
- libc_cv_z_relro=yes
- libc_mips_abi=${ABI}
- libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=no
- ac_cv_lib_cap_cap_init=no
- )
-
- einfo "Forcing cached settings:"
- for v in "${vars[@]}" ; do
- einfo " ${v}"
- export ${v}
- done
-
- local headers_only_arch_CPPFLAGS=()
-
- # Blow away some random CC settings that screw things up. #550192
- if [[ -d ${S}/sysdeps/mips ]]; then
- pushd "${S}"/sysdeps/mips >/dev/null
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
-
- # Force the mips ABI to the default. This is OK because the set of
- # installed headers in this phase is the same between the 3 ABIs.
- # If this ever changes, this hack will break, but that's unlikely
- # as glibc discourages that behavior.
- # https://crbug.com/647033
- sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
-
- popd >/dev/null
- fi
-
- case ${CTARGET} in
- riscv*)
- # RISC-V interrogates the compiler to determine which target to
- # build. If building the headers then we don't strictly need a
- # RISC-V compiler, so the built-in definitions that are provided
- # along with all RISC-V compiler might not exist. This causes
- # glibc's RISC-V preconfigure script to blow up. Since we're just
- # building the headers any value will actually work here, so just
- # pick the standard one (rv64g/lp64d) to make the build scripts
- # happy for now -- the headers are all the same anyway so it
- # doesn't matter.
- headers_only_arch_CPPFLAGS+=(
- -D__riscv_xlen=64
- -D__riscv_flen=64
- -D__riscv_float_abi_double=1
- -D__riscv_atomic=1
- ) ;;
- esac
-
- local myconf=()
- myconf+=(
- --disable-sanity-checks
- --enable-hacker-mode
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- $(use_enable crypt)
- ${EXTRA_ECONF}
- )
-
- # Nothing is compiled here which would affect the headers for the target.
- # So forcing CC/CFLAGS is sane.
- local headers_only_CC=$(tc-getBUILD_CC)
- local headers_only_CFLAGS="-O1 -pipe"
- local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}"
- local headers_only_LDFLAGS=""
- set -- "${S}"/configure "${myconf[@]}"
- echo \
- "CC=${headers_only_CC}" \
- "CFLAGS=${headers_only_CFLAGS}" \
- "CPPFLAGS=${headers_only_CPPFLAGS}" \
- "LDFLAGS=${headers_only_LDFLAGS}" \
- "$@"
- CC=${headers_only_CC} \
- CFLAGS=${headers_only_CFLAGS} \
- CPPFLAGS=${headers_only_CPPFLAGS} \
- LDFLAGS="" \
- "$@" || die "failed to configure glibc"
-}
-
-do_src_configure() {
- if just_headers ; then
- glibc_headers_configure
- else
- glibc_do_configure nptl
- fi
-}
-
-src_configure() {
- foreach_abi do_src_configure
-}
-
-do_src_compile() {
- emake -C "$(builddir nptl)"
-}
-
-src_compile() {
- if just_headers ; then
- return
- fi
-
- foreach_abi do_src_compile
-}
-
-glibc_src_test() {
- cd "$(builddir nptl)"
-
- local myxfailparams=""
- if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
- for myt in ${XFAIL_TEST_LIST[@]} ; do
- myxfailparams+="test-xfail-${myt}=yes "
- done
- fi
-
- # sandbox does not understand unshare() and prevents
- # writes to /proc/, which makes many tests fail
-
- SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check
-}
-
-do_src_test() {
- local ret=0
-
- glibc_src_test
- : $(( ret |= $? ))
-
- return ${ret}
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # Give tests more time to complete.
- export TIMEOUTFACTOR=5
-
- foreach_abi do_src_test || die "tests failed"
-}
-
-run_locale_gen() {
- local prefix=$1 user_config config
- local -a localegen_args
-
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
-
- localegen_args=( --config "${config}" --destdir "${prefix}" )
-
- # 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- locale-gen "${localegen_args[@]}"
-}
-
-glibc_do_src_install() {
- local builddir=$(builddir nptl)
- cd "${builddir}"
-
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
-
- # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
- # which come without headers etc. Only needed for binary packages since the
- # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
- find "${D}" -name "libnsl.a" -delete
- find "${D}" -name "libnsl.so" -delete
-
- # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
- # to infer upstream version:
- # '#define VERSION "2.26.90"' -> '2.26.90'
- local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
-
- # Avoid stripping binaries not targeted by ${CHOST}. Or else
- # ${CHOST}-strip would break binaries build for ${CTARGET}.
- is_crosscompile && dostrip -x /
- # gdb thread introspection relies on local libpthreas symbols. stripping breaks it
- # See Note [Disable automatic stripping]
- dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
-
- if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
- # Move versioned .a file out of libdir to evade portage QA checks
- # instead of using gen_usr_ldscript(). We fix ldscript as:
- # "GROUP ( /usr/lib64/libm-<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'll take care of the cache ourselves
- rm -f "${ED}"/etc/ld.so.cache
-
- # Everything past this point just needs to be done once ...
- is_final_abi || return 0
-
- # Make sure the non-native interp can be found on multilib systems even
- # if the main library set isn't installed into the right place. Maybe
- # we should query the active gcc for info instead of hardcoding it ?
- local i ldso_abi ldso_name
- local ldso_abi_list=(
- # x86
- amd64 /lib64/ld-linux-x86-64.so.2
- x32 /libx32/ld-linux-x32.so.2
- x86 /lib/ld-linux.so.2
- # mips
- o32 /lib/ld.so.1
- n32 /lib32/ld.so.1
- n64 /lib64/ld.so.1
- # powerpc
- ppc /lib/ld.so.1
- # riscv
- ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
- ilp32 /lib/ld-linux-riscv32-ilp32.so.1
- lp64d /lib/ld-linux-riscv64-lp64d.so.1
- lp64 /lib/ld-linux-riscv64-lp64.so.1
- # s390
- s390 /lib/ld.so.1
- s390x /lib/ld64.so.1
- # sparc
- sparc32 /lib/ld-linux.so.2
- sparc64 /lib64/ld-linux.so.2
- )
- case $(tc-endian) in
- little)
- ldso_abi_list+=(
- # arm
- arm64 /lib/ld-linux-aarch64.so.1
- # ELFv2 (glibc does not support ELFv1 on LE)
- ppc64 /lib64/ld64.so.2
- )
- ;;
- big)
- ldso_abi_list+=(
- # arm
- arm64 /lib/ld-linux-aarch64_be.so.1
- # ELFv1 (glibc does not support ELFv2 on BE)
- ppc64 /lib64/ld64.so.1
- )
- ;;
- esac
- if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
- dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
- fi
- for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
- ldso_abi=${ldso_abi_list[i]}
- has ${ldso_abi} $(get_install_abis) || continue
-
- ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
- if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
- dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
- fi
- done
-
- # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
- # the runtime loader name, see also https://xkcd.com/927/
- # Normally, in Gentoo one should never come across executables that require this.
- # However, binary commercial packages are known to adhere to weird practices.
- # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
- local lsb_ldso_name native_ldso_name lsb_ldso_abi
- local lsb_ldso_abi_list=(
- # x86
- amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
- )
- for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
- lsb_ldso_abi=${lsb_ldso_abi_list[i]}
- native_ldso_name=${lsb_ldso_abi_list[i+1]}
- lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
- has ${lsb_ldso_abi} $(get_install_abis) || continue
-
- if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
- dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
- fi
- done
-
- # With devpts under Linux mounted properly, we do not need the pt_chown
- # binary to be setuid. This is because the default owners/perms will be
- # exactly what we want.
- if ! use suid ; then
- find "${ED}" -name pt_chown -exec chmod -s {} +
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- # We need to make sure that /lib and /usr/lib always exists.
- # gcc likes to use relative paths to get to its multilibs like
- # /usr/lib/../lib64/. So while we don't install any files into
- # /usr/lib/, we do need it to exist.
- keepdir $(alt_prefix)/lib
- keepdir $(alt_prefix)/usr/lib
-
- dosym usr/include $(alt_prefix)/sys-include
- return 0
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen
- doman *.[0-8]
- insinto /etc
- doins locale.gen
-
- keepdir /usr/lib/locale
-
- cd "${S}"
-
- # Install misc network config files
- insinto /etc
- doins posix/gai.conf
-
- 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
- if ! run_locale_gen "${ED%/}"; then
- die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
- fi
-}
-
-glibc_headers_install() {
- local builddir=$(builddir "headers")
- cd "${builddir}"
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
-
- insinto $(alt_headers)/gnu
- doins "${S}"/include/gnu/stubs.h
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include $(alt_prefix)/sys-include
-}
-
-src_install() {
- if just_headers ; then
- export ABI=default
- glibc_headers_install
- return
- fi
-
- foreach_abi glibc_do_src_install
-
- if ! use static-libs ; then
- einfo "Not installing static glibc libraries"
- find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
- fi
-}
-
-# Simple test to make sure our new glibc isn't completely broken.
-# Make sure we don't test with statically built binaries since
-# they will fail. Also, skip if this glibc is a cross compiler.
-#
-# If coreutils is built with USE=multicall, some of these files
-# will just be wrapper scripts, not actual ELFs we can test.
-glibc_sanity_check() {
- cd / #228809
-
- # We enter ${ED} so to avoid trouble if the path contains
- # special characters; for instance if the path contains the
- # colon character (:), then the linker will try to split it
- # and look for the libraries in an unexpected place. This can
- # lead to unsafe code execution if the generated prefix is
- # within a world-writable directory.
- # (e.g. /var/tmp/portage:${HOSTNAME})
- pushd "${ED}"/$(get_libdir) >/dev/null
-
- # 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
-
- # 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 ! use crypt && 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
-}
-
-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
- if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
- ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- 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/glibc/glibc-2.35-r11.ebuild b/sys-libs/glibc/glibc-2.35-r11.ebuild
deleted file mode 100644
index c1239db8ff1a..000000000000
--- a/sys-libs/glibc/glibc-2.35-r11.ebuild
+++ /dev/null
@@ -1,1639 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
-# Please read & adapt the page as necessary if obsolete.
-
-PYTHON_COMPAT=( python3_{13..14} )
-TMPFILES_OPTIONAL=1
-
-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/"
-LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
-SLOT="2.2"
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=12
-PATCH_DEV=dilfridge
-
-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"
- SRC_URI+=" experimental-loong? ( https://dev.gentoo.org/~xen0n/distfiles/glibc-2.35-loongarch-patches-20220522.tar.xz )"
-fi
-
-RELEASE_VER=${PV}
-
-GCC_BOOTSTRAP_VER=20201208
-
-LOCALE_GEN_VER=2.22
-
-GLIBC_SYSTEMD_VER=20210729
-
-SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
-SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
-SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )"
-
-IUSE="audit caps cet +clone3 compile-locales +crypt custom-cflags doc experimental-loong gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla"
-
-# 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"
-
-# Here's how the cross-compile logic breaks down ...
-# CTARGET - machine that will target the binaries
-# CHOST - machine that will host the binaries
-# CBUILD - machine that will build the binaries
-# If CTARGET != CHOST, it means you want a libc for cross-compiling.
-# If CHOST != CBUILD, it means you want to cross-compile the libc.
-# CBUILD = CHOST = CTARGET - native build/install
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
-# For install paths:
-# CHOST = CTARGET - install into /
-# CHOST != CTARGET - install into /usr/CTARGET/
-#
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-# Note [Disable automatic stripping]
-# Disabling automatic stripping for a few reasons:
-# - portage's attempt to strip breaks non-native binaries at least on
-# arm: bug #697428
-# - portage's attempt to strip libpthread.so.0 breaks gdb thread
-# enumeration: bug #697910. This is quite subtle:
-# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
-# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
-# via 'ps_pglobal_lookup' symbol defined in gdb.
-# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
-# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
-# (unexported) is used to sanity check compatibility before enabling
-# debugging.
-# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
-# * normal 'strip' command trims '.symtab'
-# Thus our main goal here is to prevent 'libpthread.so.0' from
-# losing it's '.symtab' entries.
-# As Gentoo's strip does not allow us to pass less aggressive stripping
-# options and does not check the machine target we strip selectively.
-
-# We need a new-enough binutils/gcc to match upstream baseline.
-# Also we need to make sure our binutils/gcc supports TLS,
-# and that gcc already contains the hardened patches.
-# Lastly, let's avoid some openssh nastiness, bug 708224, as
-# convenience to our users.
-
-# gzip, grep, awk are needed by locale-gen, bug 740750
-
-BDEPEND="
- ${PYTHON_DEPS}
- >=app-misc/pax-utils-${MIN_PAX_UTILS_VER}
- sys-devel/bison
- doc? ( sys-apps/texinfo )
- !compile-locales? (
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- )
-"
-COMMON_DEPEND="
- gd? ( media-libs/gd:2= )
- nscd? ( selinux? (
- audit? ( sys-process/audit )
- caps? ( sys-libs/libcap )
- ) )
- suid? ( caps? ( sys-libs/libcap ) )
- selinux? ( sys-libs/libselinux )
- systemtap? ( dev-debug/systemtap )
-"
-DEPEND="${COMMON_DEPEND}
- compile-locales? (
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- )
- test? ( >=net-dns/libidn2-2.3.0 )
-"
-RDEPEND="${COMMON_DEPEND}
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- sys-apps/gentoo-functions
- !<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
- !<net-misc/openssh-8.1_p1-r2
-"
-
-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
-)
-
-#
-# 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}"
-}
-
-# We need to be able to set alternative headers for compiling for non-native
-# platform. Will also become useful for testing kernel-headers without screwing
-# up the whole system.
-alt_headers() {
- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
-}
-
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS="$(host_eprefix)$(alt_headers)"
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- echo $(alt_prefix)/$(get_libdir)
-}
-alt_usrlibdir() {
- echo $(alt_prefix)/usr/$(get_libdir)
-}
-
-builddir() {
- echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
-}
-
-do_compile_test() {
- local ret save_cflags=${CFLAGS}
- CFLAGS+=" $1"
- shift
-
- pushd "${T}" >/dev/null
-
- rm -f glibc-test*
- printf '%b' "$*" > glibc-test.c
-
- # 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"
-
- # Workaround for bug #823780.
- if tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
- export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f"
- einfo "Auto adding -mno-avx512f to CFLAGS_x86 for buggy GCC version (bug #823780) (ABI=${ABI})"
- fi
- fi
- ;;
- mips)
- # The mips abi cannot support the GNU style hashes. #233233
- filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
- ;;
- ppc|ppc64)
- # Many arch-specific implementations do not work on ppc with
- # cache-block not equal to 128 bytes. This breaks memset:
- # https://sourceware.org/PR26522
- # https://bugs.gentoo.org/737996
- # Use default -mcpu=. For ppc it means non-multiarch setup.
- filter-flags '-mcpu=*'
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
-
- local cpu
- case ${CTARGET} in
- sparc64-*)
- cpu="sparc64"
- case $(get-flag mcpu) in
- v9)
- # We need to force at least v9a because the base build doesn't
- # work with just v9.
- # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
- append-flags "-Wa,-xarch=v9a"
- ;;
- esac
- ;;
- sparc-*)
- case $(get-flag mcpu) in
- v8|supersparc|hypersparc|leon|leon3)
- cpu="sparcv8"
- ;;
- *)
- cpu="sparcv9"
- ;;
- esac
- ;;
- esac
- [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
- ;;
- esac
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Allow users to explicitly avoid flag sanitization via
- # USE=custom-cflags.
- if ! use custom-cflags; then
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- # Lock glibc at -O2; we want to be conservative here.
- filter-flags '-O?'
- append-flags -O2
- fi
-
- strip-unsupported-flags
- filter-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'
-
- # 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'
-
- # #492892
- filter-flags -frecord-gcc-switches
-
- # #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"
- replace-flags -O0 -O1
-
- filter-flags '-fstack-protector*'
-
- # See end of bug #830454; we handle this via USE=cet
- filter-flags '-fcf-protection='
-}
-
-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=${__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}}
- export CXX=${__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}}
-
- # and make sure __ORIC_CC and __ORIG_CXX is defined now.
- export __ORIG_CC=${CC}
- export __ORIG_CXX=${CXX}
-
- 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})"
-
- # 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_CC=${CC}
- export __GLIBC_CXX=${CXX}
-
- export __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_CC} ${__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_CXX} ${__abi_CFLAGS} ${CFLAGS}"
-
- if is_crosscompile; then
- # Assume worst-case bootstrap: glibc is buil first time
- # when ${CTARGET}-g++ is not available yet. We avoid
- # building auxiliary programs that require C++: bug #683074
- # It should not affect final result.
- export libc_cv_cxx_link_ok=no
- # The line above has the same effect. We set CXX explicitly
- # to make build logs less confusing.
- export CXX=
- fi
-}
-
-foreach_abi() {
- setup_env
-
- local ret=0
- local abilist=""
- if use multilib ; then
- abilist=$(get_install_abis)
- else
- abilist=${DEFAULT_ABI}
- fi
- local -x ABI
- for ABI in ${abilist:-default} ; do
- setup_env
- einfo "Running $1 for ABI ${ABI}"
- $1
- : $(( ret |= $? ))
- done
- return ${ret}
-}
-
-glibc_banner() {
- local b="Gentoo ${PVR}"
- [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}"
- echo "${b}"
-}
-
-# The following Kernel version handling functions are mostly copied from portage
-# source. It's better not to use linux-info.eclass here since a) it adds too
-# much magic, see bug 326693 for some of the arguments, and b) some of the
-# functions are just not provided.
-
-g_get_running_KV() {
- uname -r
- return $?
-}
-
-g_KV_major() {
- [[ -z $1 ]] && return 1
- local KV=$@
- echo "${KV%%.*}"
-}
-
-g_KV_minor() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.}
- echo "${KV%%.*}"
-}
-
-g_KV_micro() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.*.}
- echo "${KV%%[^[:digit:]]*}"
-}
-
-g_KV_to_int() {
- [[ -z $1 ]] && return 1
- local KV_MAJOR=$(g_KV_major "$1")
- local KV_MINOR=$(g_KV_minor "$1")
- local KV_MICRO=$(g_KV_micro "$1")
- local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
-
- # We make version 2.2.0 the minimum version we will handle as
- # a sanity check ... if its less, we fail ...
- if [[ ${KV_int} -ge 131584 ]] ; then
- echo "${KV_int}"
- return 0
- fi
- return 1
-}
-
-g_int_to_KV() {
- local version=$1 major minor micro
- major=$((version / 65536))
- minor=$(((version % 65536) / 256))
- micro=$((version % 256))
- echo ${major}.${minor}.${micro}
-}
-
-eend_KV() {
- [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]]
- eend $?
-}
-
-get_kheader_version() {
- printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
- $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \
- tail -n 1
-}
-
-# We collect all sanity checks here. Consistency is not guranteed between
-# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
-# src_unpack.
-sanity_prechecks() {
- # Prevent native builds from downgrading
- if [[ ${MERGE_TYPE} != "buildonly" ]] && \
- [[ -z ${ROOT} ]] && \
- [[ ${CBUILD} == ${CHOST} ]] && \
- [[ ${CHOST} == ${CTARGET} ]] ; then
-
- # The high rev # is to allow people to downgrade between -r#
- # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2
- # should be fine. Hopefully we never actually use a r# this
- # high.
- if has_version ">${CATEGORY}/${P}-r10000" ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
- fi
-
- if ! do_run_test '#include <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
-
- # Users have had a chance to phase themselves, time to give em the boot
- if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then
- eerror "You still haven't deleted ${EROOT}/etc/locales.build."
- eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher."
- die "Lazy upgrader detected"
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml"
- die "Please fix your CHOST"
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty when running with a 32bit"
- ewarn "hypervisor, which is probably not what you want."
- fi
-
- # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
- # we test for...
- if ! is_crosscompile && ! tc-is-cross-compiler ; 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
-
- 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
-}
-
-upgrade_warning() {
- 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() {
- # 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-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
- use experimental-loong && unpack glibc-2.35-loongarch-patches-20220522.tar.xz
- fi
-
- cd "${WORKDIR}" || die
- unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
- use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz
-}
-
-src_prepare() {
- local patchsetname
- if ! use vanilla ; then
- if [[ ${PV} == 9999* ]] ; then
- patchsetname="from git master"
- else
- patchsetname="${RELEASE_VER}-${PATCH_VER}"
- fi
- einfo "Applying Gentoo Glibc Patchset ${patchsetname}"
- eapply "${WORKDIR}"/patches
- einfo "Done."
-
- if use experimental-loong ; then
- einfo "Applying experimental LoongArch patchset"
- eapply "${WORKDIR}"/loongarch-2.35
- einfo "Done."
- fi
- fi
-
- eapply "${FILESDIR}"/2.35/glibc-2.35-make-4.4-MAKEFLAGS.patch
-
- if use clone3 ; then
- append-cppflags -DGENTOO_USE_CLONE3
- else
- # See e.g. bug #827386, bug #819045.
- elog "Disabling the clone3 syscall for compatibility with older Electron apps."
- elog "Please re-enable this flag before filing bugs!"
- fi
-
- default
-
- gnuconfig_update
-
- cd "${WORKDIR}"
- find . -name configure -exec touch {} +
-
- # move the external locale-gen to its old place
- mkdir extra || die
- mv locale-gen-${LOCALE_GEN_VER} extra/locale || die
-
- eprefixify extra/locale/locale-gen
-
- # Fix permissions on some of the scripts.
- chmod u+x "${S}"/scripts/*.sh
-
- cd "${S}"
-}
-
-glibc_do_configure() {
- 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 supporing IFUNC. glibc's ./configure
- # is not robust enough to detect proper support:
- # https://bugs.gentoo.org/641216
- # https://sourceware.org/PR22634#c0
- case $(tc-arch ${CTARGET}) in
- # Keep whitelist of targets where autodetection mostly works.
- amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;;
- # Blacklist everywhere else
- *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
- esac
-
- # Enable Intel Control-flow Enforcement Technology on amd64 if requested
- case ${CTARGET} in
- x86_64-*) myconf+=( $(use_enable cet) ) ;;
- *) ;;
- esac
-
- [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
-
- myconf+=( --enable-kernel=${MIN_KERN_VER} )
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. only for the primary ABI on multilib systems
- # 3. Not a crosscompile
- if ! is_crosscompile && use selinux ; then
- if use multilib ; then
- if is_final_abi ; then
- myconf+=( --with-selinux )
- else
- myconf+=( --without-selinux )
- fi
- else
- myconf+=( --with-selinux )
- fi
- else
- myconf+=( --without-selinux )
- fi
-
- # Force a few tests where we always know the answer but
- # configure is incapable of finding it.
- if is_crosscompile ; then
- export \
- libc_cv_c_cleanup=yes \
- libc_cv_forced_unwind=yes
- fi
-
- myconf+=(
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- $(use_with gd)
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- --sysconfdir="$(host_eprefix)/etc"
- --localstatedir="$(host_eprefix)/var"
- --libdir='$(prefix)'/$(get_libdir)
- --mandir='$(prefix)'/share/man
- --infodir='$(prefix)'/share/info
- --libexecdir='$(libdir)'/misc/glibc
- --with-bugurl=https://bugs.gentoo.org/
- --with-pkgversion="$(glibc_banner)"
- $(use_enable crypt)
- $(use_multiarch || echo --disable-multi-arch)
- $(use_enable systemtap)
- $(use_enable nscd)
-
- # locale data is arch-independent
- # https://bugs.gentoo.org/753740
- libc_cv_complocaledir='${exec_prefix}/lib/locale'
-
- # -march= option tricks build system to infer too
- # high ISA level: https://sourceware.org/PR27318
- libc_cv_include_x86_isa_level=no
- # Explicit override of https://sourceware.org/PR27991
- # exposes a bug in glibc's configure:
- # https://sourceware.org/PR27991
- libc_cv_have_x86_lahf_sahf=no
- libc_cv_have_x86_movbe=no
-
- ${EXTRA_ECONF}
- )
-
- # We rely on sys-libs/timezone-data for timezone tools normally.
- myconf+=( $(use_enable vanilla timezone-tools) )
-
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
- ac_cv_lib_cap_cap_init=$(usex caps || echo no)
-
- # There is no configure option for this and we need to export it
- # since the glibc build will re-run configure on itself
- export libc_cv_rootsbindir="$(host_eprefix)/sbin"
- export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)"
-
- local builddir=$(builddir nptl)
- mkdir -p "${builddir}"
- cd "${builddir}"
- set -- "${S}"/configure "${myconf[@]}"
- echo "$@"
- "$@" || die "failed to configure glibc"
-
- # ia64 static cross-compilers are a pita in so much that they
- # can't produce static ELFs (as the libgcc.a is broken). so
- # disable building of the programs for those targets if it
- # doesn't work.
- # XXX: We could turn this into a compiler test, but ia64 is
- # the only one that matters, so this should be fine for now.
- if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
- sed -i '1i+link-static = touch $@' config.make
- fi
-
- # If we're trying to migrate between ABI sets, we need
- # to lie and use a local copy of gcc. Like if the system
- # is built with MULTILIB_ABIS="amd64 x86" but we want to
- # add x32 to it, gcc/glibc don't yet support x32.
- #
- if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then
- echo 'int main(){}' > "${T}"/test.c
- if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
- sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
- fi
- fi
-}
-
-glibc_headers_configure() {
- export ABI=default
-
- local builddir=$(builddir "headers")
- mkdir -p "${builddir}"
- cd "${builddir}"
-
- # if we don't have a compiler yet, we can't really test it now ...
- # hopefully they don't affect header generation, so let's hope for
- # the best here ...
- local v vars=(
- ac_cv_header_cpuid_h=yes
- libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
- libc_cv_asm_cfi_directives=yes
- libc_cv_broken_visibility_attribute=no
- libc_cv_c_cleanup=yes
- libc_cv_compiler_powerpc64le_binary128_ok=yes
- libc_cv_forced_unwind=yes
- libc_cv_gcc___thread=yes
- libc_cv_mlong_double_128=yes
- libc_cv_mlong_double_128ibm=yes
- libc_cv_ppc_machine=yes
- libc_cv_ppc_rel16=yes
- libc_cv_predef_fortify_source=no
- libc_cv_target_power8_ok=yes
- libc_cv_visibility_attribute=yes
- libc_cv_z_combreloc=yes
- libc_cv_z_execstack=yes
- libc_cv_z_initfirst=yes
- libc_cv_z_nodelete=yes
- libc_cv_z_nodlopen=yes
- libc_cv_z_relro=yes
- libc_mips_abi=${ABI}
- libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=no
- ac_cv_lib_cap_cap_init=no
- )
-
- einfo "Forcing cached settings:"
- for v in "${vars[@]}" ; do
- einfo " ${v}"
- export ${v}
- done
-
- local headers_only_arch_CPPFLAGS=()
-
- # Blow away some random CC settings that screw things up. #550192
- if [[ -d ${S}/sysdeps/mips ]]; then
- pushd "${S}"/sysdeps/mips >/dev/null
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
-
- # Force the mips ABI to the default. This is OK because the set of
- # installed headers in this phase is the same between the 3 ABIs.
- # If this ever changes, this hack will break, but that's unlikely
- # as glibc discourages that behavior.
- # https://crbug.com/647033
- sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
-
- popd >/dev/null
- fi
-
- case ${CTARGET} in
- riscv*)
- # RISC-V interrogates the compiler to determine which target to
- # build. If building the headers then we don't strictly need a
- # RISC-V compiler, so the built-in definitions that are provided
- # along with all RISC-V compiler might not exist. This causes
- # glibc's RISC-V preconfigure script to blow up. Since we're just
- # building the headers any value will actually work here, so just
- # pick the standard one (rv64g/lp64d) to make the build scripts
- # happy for now -- the headers are all the same anyway so it
- # doesn't matter.
- headers_only_arch_CPPFLAGS+=(
- -D__riscv_xlen=64
- -D__riscv_flen=64
- -D__riscv_float_abi_double=1
- -D__riscv_atomic=1
- ) ;;
- esac
-
- local myconf=()
- myconf+=(
- --disable-sanity-checks
- --enable-hacker-mode
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- $(use_enable crypt)
- ${EXTRA_ECONF}
- )
-
- # Nothing is compiled here which would affect the headers for the target.
- # So forcing CC/CFLAGS is sane.
- local headers_only_CC=$(tc-getBUILD_CC)
- local headers_only_CFLAGS="-O1 -pipe"
- local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}"
- local headers_only_LDFLAGS=""
- set -- "${S}"/configure "${myconf[@]}"
- echo \
- "CC=${headers_only_CC}" \
- "CFLAGS=${headers_only_CFLAGS}" \
- "CPPFLAGS=${headers_only_CPPFLAGS}" \
- "LDFLAGS=${headers_only_LDFLAGS}" \
- "$@"
- CC=${headers_only_CC} \
- CFLAGS=${headers_only_CFLAGS} \
- CPPFLAGS=${headers_only_CPPFLAGS} \
- LDFLAGS="" \
- "$@" || die "failed to configure glibc"
-}
-
-do_src_configure() {
- if just_headers ; then
- glibc_headers_configure
- else
- glibc_do_configure nptl
- fi
-}
-
-src_configure() {
- foreach_abi do_src_configure
-}
-
-do_src_compile() {
- emake -C "$(builddir nptl)"
-}
-
-src_compile() {
- if just_headers ; then
- return
- fi
-
- foreach_abi do_src_compile
-}
-
-glibc_src_test() {
- cd "$(builddir nptl)"
-
- local myxfailparams=""
- if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
- for myt in ${XFAIL_TEST_LIST[@]} ; do
- myxfailparams+="test-xfail-${myt}=yes "
- done
- fi
-
- # sandbox does not understand unshare() and prevents
- # writes to /proc/, which makes many tests fail
-
- # 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
-}
-
-do_src_test() {
- local ret=0
-
- glibc_src_test
- : $(( ret |= $? ))
-
- return ${ret}
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # Give tests more time to complete.
- export TIMEOUTFACTOR=5
-
- foreach_abi do_src_test || die "tests failed"
-}
-
-run_locale_gen() {
- local prefix=$1 user_config config
- local -a localegen_args
-
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
-
- localegen_args=( --config "${config}" --destdir "${prefix}" )
-
- # 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- locale-gen "${localegen_args[@]}"
-}
-
-glibc_do_src_install() {
- local builddir=$(builddir nptl)
- cd "${builddir}"
-
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
-
- # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
- # which come without headers etc. Only needed for binary packages since the
- # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
- find "${D}" -name "libnsl.a" -delete
- find "${D}" -name "libnsl.so" -delete
-
- # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
- # to infer upstream version:
- # '#define VERSION "2.26.90"' -> '2.26.90'
- local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
-
- # Avoid stripping binaries not targeted by ${CHOST}. Or else
- # ${CHOST}-strip would break binaries build for ${CTARGET}.
- is_crosscompile && dostrip -x /
- # gdb thread introspection relies on local libpthreas symbols. stripping breaks it
- # See Note [Disable automatic stripping]
- dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
-
- if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
- # Move versioned .a file out of libdir to evade portage QA checks
- # instead of using gen_usr_ldscript(). We fix ldscript as:
- # "GROUP ( /usr/lib64/libm-<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'll take care of the cache ourselves
- rm -f "${ED}"/etc/ld.so.cache
-
- # Everything past this point just needs to be done once ...
- is_final_abi || return 0
-
- # Make sure the non-native interp can be found on multilib systems even
- # if the main library set isn't installed into the right place. Maybe
- # we should query the active gcc for info instead of hardcoding it ?
- local i ldso_abi ldso_name
- local ldso_abi_list=(
- # x86
- amd64 /lib64/ld-linux-x86-64.so.2
- x32 /libx32/ld-linux-x32.so.2
- x86 /lib/ld-linux.so.2
- # mips
- o32 /lib/ld.so.1
- n32 /lib32/ld.so.1
- n64 /lib64/ld.so.1
- # powerpc
- ppc /lib/ld.so.1
- # riscv
- ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
- ilp32 /lib/ld-linux-riscv32-ilp32.so.1
- lp64d /lib/ld-linux-riscv64-lp64d.so.1
- lp64 /lib/ld-linux-riscv64-lp64.so.1
- # s390
- s390 /lib/ld.so.1
- s390x /lib/ld64.so.1
- # sparc
- sparc32 /lib/ld-linux.so.2
- sparc64 /lib64/ld-linux.so.2
- )
- case $(tc-endian) in
- little)
- ldso_abi_list+=(
- # arm
- arm64 /lib/ld-linux-aarch64.so.1
- # ELFv2 (glibc does not support ELFv1 on LE)
- ppc64 /lib64/ld64.so.2
- )
- ;;
- big)
- ldso_abi_list+=(
- # arm
- arm64 /lib/ld-linux-aarch64_be.so.1
- # ELFv1 (glibc does not support ELFv2 on BE)
- ppc64 /lib64/ld64.so.1
- )
- ;;
- esac
- if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
- dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
- fi
- for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
- ldso_abi=${ldso_abi_list[i]}
- has ${ldso_abi} $(get_install_abis) || continue
-
- ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
- if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
- dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
- fi
- done
-
- # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
- # the runtime loader name, see also https://xkcd.com/927/
- # Normally, in Gentoo one should never come across executables that require this.
- # However, binary commercial packages are known to adhere to weird practices.
- # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
- local lsb_ldso_name native_ldso_name lsb_ldso_abi
- local lsb_ldso_abi_list=(
- # x86
- amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
- )
- for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
- lsb_ldso_abi=${lsb_ldso_abi_list[i]}
- native_ldso_name=${lsb_ldso_abi_list[i+1]}
- lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
- has ${lsb_ldso_abi} $(get_install_abis) || continue
-
- if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
- dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
- fi
- done
-
- # With devpts under Linux mounted properly, we do not need the pt_chown
- # binary to be setuid. This is because the default owners/perms will be
- # exactly what we want.
- if ! use suid ; then
- find "${ED}" -name pt_chown -exec chmod -s {} +
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- # We need to make sure that /lib and /usr/lib always exists.
- # gcc likes to use relative paths to get to its multilibs like
- # /usr/lib/../lib64/. So while we don't install any files into
- # /usr/lib/, we do need it to exist.
- keepdir $(alt_prefix)/lib
- keepdir $(alt_prefix)/usr/lib
-
- dosym usr/include $(alt_prefix)/sys-include
- return 0
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen
- doman *.[0-8]
- insinto /etc
- doins locale.gen
-
- keepdir /usr/lib/locale
-
- cd "${S}"
-
- # Install misc network config files
- insinto /etc
- doins posix/gai.conf
-
- 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
- if ! run_locale_gen "${ED%/}"; then
- die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
- fi
-}
-
-glibc_headers_install() {
- local builddir=$(builddir "headers")
- cd "${builddir}"
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
-
- insinto $(alt_headers)/gnu
- doins "${S}"/include/gnu/stubs.h
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include $(alt_prefix)/sys-include
-}
-
-src_install() {
- if just_headers ; then
- export ABI=default
- glibc_headers_install
- return
- fi
-
- foreach_abi glibc_do_src_install
-
- if ! use static-libs ; then
- einfo "Not installing static glibc libraries"
- find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
- fi
-}
-
-# Simple test to make sure our new glibc isn't completely broken.
-# Make sure we don't test with statically built binaries since
-# they will fail. Also, skip if this glibc is a cross compiler.
-#
-# If coreutils is built with USE=multicall, some of these files
-# will just be wrapper scripts, not actual ELFs we can test.
-glibc_sanity_check() {
- cd / #228809
-
- # We enter ${ED} so to avoid trouble if the path contains
- # special characters; for instance if the path contains the
- # colon character (:), then the linker will try to split it
- # and look for the libraries in an unexpected place. This can
- # lead to unsafe code execution if the generated prefix is
- # within a world-writable directory.
- # (e.g. /var/tmp/portage:${HOSTNAME})
- pushd "${ED}"/$(get_libdir) >/dev/null
-
- # 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
-
- # 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 ! use crypt && 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
-}
-
-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
- if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
- ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- 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/glibc/glibc-2.36-r8.ebuild b/sys-libs/glibc/glibc-2.36-r8.ebuild
deleted file mode 100644
index c3d199c50aa6..000000000000
--- a/sys-libs/glibc/glibc-2.36-r8.ebuild
+++ /dev/null
@@ -1,1680 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
-# Please read & adapt the page as necessary if obsolete.
-
-PYTHON_COMPAT=( python3_{13..14} )
-TMPFILES_OPTIONAL=1
-
-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/"
-LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
-SLOT="2.2"
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=10
-PATCH_DEV=dilfridge
-
-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
-
-RELEASE_VER=${PV}
-
-GCC_BOOTSTRAP_VER=20201208
-
-LOCALE_GEN_VER=2.23
-
-GLIBC_SYSTEMD_VER=20210729
-
-SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
-SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
-SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )"
-
-IUSE="audit caps cet compile-locales +crypt 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"
-
-# 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"
-
-# Here's how the cross-compile logic breaks down ...
-# CTARGET - machine that will target the binaries
-# CHOST - machine that will host the binaries
-# CBUILD - machine that will build the binaries
-# If CTARGET != CHOST, it means you want a libc for cross-compiling.
-# If CHOST != CBUILD, it means you want to cross-compile the libc.
-# CBUILD = CHOST = CTARGET - native build/install
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
-# For install paths:
-# CHOST = CTARGET - install into /
-# CHOST != CTARGET - install into /usr/CTARGET/
-#
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-# Note [Disable automatic stripping]
-# Disabling automatic stripping for a few reasons:
-# - portage's attempt to strip breaks non-native binaries at least on
-# arm: bug #697428
-# - portage's attempt to strip libpthread.so.0 breaks gdb thread
-# enumeration: bug #697910. This is quite subtle:
-# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
-# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
-# via 'ps_pglobal_lookup' symbol defined in gdb.
-# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
-# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
-# (unexported) is used to sanity check compatibility before enabling
-# debugging.
-# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
-# * normal 'strip' command trims '.symtab'
-# Thus our main goal here is to prevent 'libpthread.so.0' from
-# losing it's '.symtab' entries.
-# As Gentoo's strip does not allow us to pass less aggressive stripping
-# options and does not check the machine target we strip selectively.
-
-# We need a new-enough binutils/gcc to match upstream baseline.
-# Also we need to make sure our binutils/gcc supports TLS,
-# and that gcc already contains the hardened patches.
-# Lastly, let's avoid some openssh nastiness, bug 708224, as
-# convenience to our users.
-
-# gzip, grep, awk are needed by locale-gen, bug 740750
-
-BDEPEND="
- ${PYTHON_DEPS}
- >=app-misc/pax-utils-${MIN_PAX_UTILS_VER}
- sys-devel/bison
- doc? ( sys-apps/texinfo )
- !compile-locales? (
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- )
- test? ( dev-lang/perl )
-"
-COMMON_DEPEND="
- gd? ( media-libs/gd:2= )
- nscd? ( selinux? (
- audit? ( sys-process/audit )
- caps? ( sys-libs/libcap )
- ) )
- perl? ( dev-lang/perl )
- test? ( dev-lang/perl )
- suid? ( caps? ( sys-libs/libcap ) )
- selinux? ( sys-libs/libselinux )
- systemtap? ( dev-debug/systemtap )
-"
-DEPEND="${COMMON_DEPEND}
- compile-locales? (
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- )
- test? ( >=net-dns/libidn2-2.3.0 )
-"
-RDEPEND="${COMMON_DEPEND}
- app-arch/gzip
- sys-apps/grep
- app-alternatives/awk
- sys-apps/gentoo-functions
- !<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
- !<net-misc/openssh-8.1_p1-r2
-"
-
-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
-)
-
-#
-# 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}"
-}
-
-# We need to be able to set alternative headers for compiling for non-native
-# platform. Will also become useful for testing kernel-headers without screwing
-# up the whole system.
-alt_headers() {
- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
-}
-
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS="$(host_eprefix)$(alt_headers)"
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- echo $(alt_prefix)/$(get_libdir)
-}
-alt_usrlibdir() {
- echo $(alt_prefix)/usr/$(get_libdir)
-}
-
-builddir() {
- echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
-}
-
-do_compile_test() {
- local ret save_cflags=${CFLAGS}
- CFLAGS+=" $1"
- shift
-
- pushd "${T}" >/dev/null
-
- rm -f glibc-test*
- printf '%b' "$*" > glibc-test.c
-
- # 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"
-
- # Workaround for bug #823780.
- # Need to save/restore CC because earlier on, we stuff it full of CFLAGS, and tc-getCPP doesn't like that.
- CC_mangled=${CC}
- CC=${glibc__GLIBC_CC}
- if tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
- export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f"
- einfo "Auto adding -mno-avx512f to CFLAGS_x86 for buggy GCC version (bug #823780) (ABI=${ABI})"
- fi
- CC=${CC_mangled}
- fi
- ;;
- mips)
- # The mips abi cannot support the GNU style hashes. #233233
- filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
- ;;
- ppc|ppc64)
- # Many arch-specific implementations do not work on ppc with
- # cache-block not equal to 128 bytes. This breaks memset:
- # https://sourceware.org/PR26522
- # https://bugs.gentoo.org/737996
- # Use default -mcpu=. For ppc it means non-multiarch setup.
- filter-flags '-mcpu=*'
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
-
- local cpu
- case ${CTARGET} in
- sparc64-*)
- cpu="sparc64"
- case $(get-flag mcpu) in
- v9)
- # We need to force at least v9a because the base build doesn't
- # work with just v9.
- # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
- append-flags "-Wa,-xarch=v9a"
- ;;
- esac
- ;;
- sparc-*)
- case $(get-flag mcpu) in
- v8|supersparc|hypersparc|leon|leon3)
- cpu="sparcv8"
- ;;
- *)
- cpu="sparcv9"
- ;;
- esac
- ;;
- esac
- [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
- ;;
- esac
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Allow users to explicitly avoid flag sanitization via
- # USE=custom-cflags.
- if ! use custom-cflags; then
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- # Lock glibc at -O2; we want to be conservative here.
- filter-flags '-O?'
- append-flags -O2
- fi
-
- strip-unsupported-flags
- filter-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'
-
- # 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
-
- # #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"
- 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 amd64 || use x86) && ! use cet; then
- append-flags '-fcf-protection=none'
- 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})}}
-
- # and make sure glibc__ORIG_CC and glibc__ORIG_CXX is defined now.
- export glibc__ORIG_CC=${CC}
- export glibc__ORIG_CXX=${CXX}
-
- 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})"
-
- # 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__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}"
-
- if is_crosscompile; then
- # Assume worst-case bootstrap: glibc is buil first time
- # when ${CTARGET}-g++ is not available yet. We avoid
- # building auxiliary programs that require C++: bug #683074
- # It should not affect final result.
- export libc_cv_cxx_link_ok=no
- # The line above has the same effect. We set CXX explicitly
- # to make build logs less confusing.
- export CXX=
- fi
-}
-
-foreach_abi() {
- setup_env
-
- local ret=0
- local abilist=""
- if use multilib ; then
- abilist=$(get_install_abis)
- else
- abilist=${DEFAULT_ABI}
- fi
- local -x ABI
- for ABI in ${abilist:-default} ; do
- setup_env
- einfo "Running $1 for ABI ${ABI}"
- $1
- : $(( ret |= $? ))
- done
- return ${ret}
-}
-
-glibc_banner() {
- local b="Gentoo ${PVR}"
- [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}"
- echo "${b}"
-}
-
-# The following Kernel version handling functions are mostly copied from portage
-# source. It's better not to use linux-info.eclass here since a) it adds too
-# much magic, see bug 326693 for some of the arguments, and b) some of the
-# functions are just not provided.
-
-g_get_running_KV() {
- uname -r
- return $?
-}
-
-g_KV_major() {
- [[ -z $1 ]] && return 1
- local KV=$@
- echo "${KV%%.*}"
-}
-
-g_KV_minor() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.}
- echo "${KV%%.*}"
-}
-
-g_KV_micro() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.*.}
- echo "${KV%%[^[:digit:]]*}"
-}
-
-g_KV_to_int() {
- [[ -z $1 ]] && return 1
- local KV_MAJOR=$(g_KV_major "$1")
- local KV_MINOR=$(g_KV_minor "$1")
- local KV_MICRO=$(g_KV_micro "$1")
- local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
-
- # We make version 2.2.0 the minimum version we will handle as
- # a sanity check ... if its less, we fail ...
- if [[ ${KV_int} -ge 131584 ]] ; then
- echo "${KV_int}"
- return 0
- fi
- return 1
-}
-
-g_int_to_KV() {
- local version=$1 major minor micro
- major=$((version / 65536))
- minor=$(((version % 65536) / 256))
- micro=$((version % 256))
- echo ${major}.${minor}.${micro}
-}
-
-eend_KV() {
- [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]]
- eend $?
-}
-
-get_kheader_version() {
- printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
- $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \
- tail -n 1
-}
-
-# We collect all sanity checks here. Consistency is not guranteed between
-# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
-# src_unpack.
-sanity_prechecks() {
- # Prevent native builds from downgrading
- if [[ ${MERGE_TYPE} != "buildonly" ]] && \
- [[ -z ${ROOT} ]] && \
- [[ ${CBUILD} == ${CHOST} ]] && \
- [[ ${CHOST} == ${CTARGET} ]] ; then
-
- # The high rev # is to allow people to downgrade between -r#
- # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2
- # should be fine. Hopefully we never actually use a r# this
- # high.
- if has_version ">${CATEGORY}/${P}-r10000" ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
- fi
-
- if ! do_run_test '#include <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
-
- # Users have had a chance to phase themselves, time to give em the boot
- if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then
- eerror "You still haven't deleted ${EROOT}/etc/locales.build."
- eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher."
- die "Lazy upgrader detected"
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml"
- die "Please fix your CHOST"
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty when running with a 32bit"
- ewarn "hypervisor, which is probably not what you want."
- fi
-
- # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
- # we test for...
- if ! is_crosscompile && ! tc-is-cross-compiler ; 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() {
- 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() {
- # 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-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
- fi
-
- cd "${WORKDIR}" || die
- unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
- use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz
-}
-
-src_prepare() {
- local patchsetname
- if ! use vanilla ; then
- if [[ ${PV} == 9999* ]] ; then
- patchsetname="from git master"
- else
- patchsetname="${RELEASE_VER}-${PATCH_VER}"
- fi
- einfo "Applying Gentoo Glibc Patchset ${patchsetname}"
- eapply "${WORKDIR}"/patches
- einfo "Done."
- fi
-
- default
-
- gnuconfig_update
-
- cd "${WORKDIR}"
- find . -name configure -exec touch {} +
-
- # move the external locale-gen to its old place
- mkdir extra || die
- mv locale-gen-${LOCALE_GEN_VER} extra/locale || die
-
- eprefixify extra/locale/locale-gen
-
- # Fix permissions on some of the scripts.
- chmod u+x "${S}"/scripts/*.sh
-
- cd "${S}"
-}
-
-glibc_do_configure() {
- 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 supporing IFUNC. glibc's ./configure
- # is not robust enough to detect proper support:
- # https://bugs.gentoo.org/641216
- # https://sourceware.org/PR22634#c0
- case $(tc-arch ${CTARGET}) in
- # Keep whitelist of targets where autodetection mostly works.
- amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;;
- # Blacklist everywhere else
- *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
- esac
-
- # Enable Intel Control-flow Enforcement Technology on amd64 if requested
- case ${CTARGET} in
- x86_64-*) myconf+=( $(use_enable cet) ) ;;
- *) ;;
- esac
-
- [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
-
- myconf+=( --enable-kernel=${MIN_KERN_VER} )
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. only for the primary ABI on multilib systems
- # 3. Not a crosscompile
- if ! is_crosscompile && use selinux ; then
- if use multilib ; then
- if is_final_abi ; then
- myconf+=( --with-selinux )
- else
- myconf+=( --without-selinux )
- fi
- else
- myconf+=( --with-selinux )
- fi
- else
- myconf+=( --without-selinux )
- fi
-
- # Force a few tests where we always know the answer but
- # configure is incapable of finding it.
- if is_crosscompile ; then
- export \
- libc_cv_c_cleanup=yes \
- libc_cv_forced_unwind=yes
- fi
-
- myconf+=(
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- $(use_with gd)
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- --sysconfdir="$(host_eprefix)/etc"
- --localstatedir="$(host_eprefix)/var"
- --libdir='$(prefix)'/$(get_libdir)
- --mandir='$(prefix)'/share/man
- --infodir='$(prefix)'/share/info
- --libexecdir='$(libdir)'/misc/glibc
- --with-bugurl=https://bugs.gentoo.org/
- --with-pkgversion="$(glibc_banner)"
- $(use_enable crypt)
- $(use_multiarch || echo --disable-multi-arch)
- $(use_enable 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 no))"
-
- # locale data is arch-independent
- # https://bugs.gentoo.org/753740
- libc_cv_complocaledir='${exec_prefix}/lib/locale'
-
- # -march= option tricks build system to infer too
- # high ISA level: https://sourceware.org/PR27318
- libc_cv_include_x86_isa_level=no
- # Explicit override of https://sourceware.org/PR27991
- # exposes a bug in glibc's configure:
- # https://sourceware.org/PR27991
- libc_cv_have_x86_lahf_sahf=no
- libc_cv_have_x86_movbe=no
-
- ${EXTRA_ECONF}
- )
-
- # We rely on sys-libs/timezone-data for timezone tools normally.
- myconf+=( $(use_enable vanilla timezone-tools) )
-
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
- ac_cv_lib_cap_cap_init=$(usex caps || echo no)
-
- # There is no configure option for this and we need to export it
- # since the glibc build will re-run configure on itself
- export libc_cv_rootsbindir="$(host_eprefix)/sbin"
- export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)"
-
- local builddir=$(builddir nptl)
- mkdir -p "${builddir}"
- cd "${builddir}"
- set -- "${S}"/configure "${myconf[@]}"
- echo "$@"
- "$@" || die "failed to configure glibc"
-
- # ia64 static cross-compilers are a pita in so much that they
- # can't produce static ELFs (as the libgcc.a is broken). so
- # disable building of the programs for those targets if it
- # doesn't work.
- # XXX: We could turn this into a compiler test, but ia64 is
- # the only one that matters, so this should be fine for now.
- if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
- sed -i '1i+link-static = touch $@' config.make
- fi
-
- # If we're trying to migrate between ABI sets, we need
- # to lie and use a local copy of gcc. Like if the system
- # is built with MULTILIB_ABIS="amd64 x86" but we want to
- # add x32 to it, gcc/glibc don't yet support x32.
- #
- if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then
- echo 'int main(){}' > "${T}"/test.c
- if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
- sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
- fi
- fi
-}
-
-glibc_headers_configure() {
- export ABI=default
-
- local builddir=$(builddir "headers")
- mkdir -p "${builddir}"
- cd "${builddir}"
-
- # if we don't have a compiler yet, we can't really test it now ...
- # hopefully they don't affect header generation, so let's hope for
- # the best here ...
- local v vars=(
- ac_cv_header_cpuid_h=yes
- libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
- libc_cv_asm_cfi_directives=yes
- libc_cv_broken_visibility_attribute=no
- libc_cv_c_cleanup=yes
- libc_cv_compiler_powerpc64le_binary128_ok=yes
- libc_cv_forced_unwind=yes
- libc_cv_gcc___thread=yes
- libc_cv_mlong_double_128=yes
- libc_cv_mlong_double_128ibm=yes
- libc_cv_ppc_machine=yes
- libc_cv_ppc_rel16=yes
- libc_cv_predef_fortify_source=no
- libc_cv_target_power8_ok=yes
- libc_cv_visibility_attribute=yes
- libc_cv_z_combreloc=yes
- libc_cv_z_execstack=yes
- libc_cv_z_initfirst=yes
- libc_cv_z_nodelete=yes
- libc_cv_z_nodlopen=yes
- libc_cv_z_relro=yes
- libc_mips_abi=${ABI}
- libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=no
- ac_cv_lib_cap_cap_init=no
- )
-
- einfo "Forcing cached settings:"
- for v in "${vars[@]}" ; do
- einfo " ${v}"
- export ${v}
- done
-
- local headers_only_arch_CPPFLAGS=()
-
- # Blow away some random CC settings that screw things up. #550192
- if [[ -d ${S}/sysdeps/mips ]]; then
- pushd "${S}"/sysdeps/mips >/dev/null
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
-
- # Force the mips ABI to the default. This is OK because the set of
- # installed headers in this phase is the same between the 3 ABIs.
- # If this ever changes, this hack will break, but that's unlikely
- # as glibc discourages that behavior.
- # https://crbug.com/647033
- sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
-
- popd >/dev/null
- fi
-
- case ${CTARGET} in
- riscv*)
- # RISC-V interrogates the compiler to determine which target to
- # build. If building the headers then we don't strictly need a
- # RISC-V compiler, so the built-in definitions that are provided
- # along with all RISC-V compiler might not exist. This causes
- # glibc's RISC-V preconfigure script to blow up. Since we're just
- # building the headers any value will actually work here, so just
- # pick the standard one (rv64g/lp64d) to make the build scripts
- # happy for now -- the headers are all the same anyway so it
- # doesn't matter.
- headers_only_arch_CPPFLAGS+=(
- -D__riscv_xlen=64
- -D__riscv_flen=64
- -D__riscv_float_abi_double=1
- -D__riscv_atomic=1
- ) ;;
- esac
-
- local myconf=()
- myconf+=(
- --disable-sanity-checks
- --enable-hacker-mode
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- $(use_enable crypt)
- ${EXTRA_ECONF}
- )
-
- # Nothing is compiled here which would affect the headers for the target.
- # So forcing CC/CFLAGS is sane.
- local headers_only_CC=$(tc-getBUILD_CC)
- local headers_only_CFLAGS="-O1 -pipe"
- local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}"
- local headers_only_LDFLAGS=""
- set -- "${S}"/configure "${myconf[@]}"
- echo \
- "CC=${headers_only_CC}" \
- "CFLAGS=${headers_only_CFLAGS}" \
- "CPPFLAGS=${headers_only_CPPFLAGS}" \
- "LDFLAGS=${headers_only_LDFLAGS}" \
- "$@"
- CC=${headers_only_CC} \
- CFLAGS=${headers_only_CFLAGS} \
- CPPFLAGS=${headers_only_CPPFLAGS} \
- LDFLAGS="" \
- "$@" || die "failed to configure glibc"
-}
-
-do_src_configure() {
- if just_headers ; then
- glibc_headers_configure
- else
- glibc_do_configure nptl
- fi
-}
-
-src_configure() {
- foreach_abi do_src_configure
-}
-
-do_src_compile() {
- emake -C "$(builddir nptl)"
-}
-
-src_compile() {
- if just_headers ; then
- return
- fi
-
- foreach_abi do_src_compile
-}
-
-glibc_src_test() {
- cd "$(builddir nptl)"
-
- local myxfailparams=""
- if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
- for myt in ${XFAIL_TEST_LIST[@]} ; do
- myxfailparams+="test-xfail-${myt}=yes "
- done
- fi
-
- # sandbox does not understand unshare() and prevents
- # writes to /proc/, which makes many tests fail
-
- # 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
-}
-
-do_src_test() {
- local ret=0
-
- glibc_src_test
- : $(( ret |= $? ))
-
- return ${ret}
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # Give tests more time to complete.
- export TIMEOUTFACTOR=5
-
- foreach_abi do_src_test || die "tests failed"
-}
-
-run_locale_gen() {
- local prefix=$1 user_config config
- local -a localegen_args
-
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
-
- localegen_args=( --config "${config}" --destdir "${prefix}" )
-
- # 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- locale-gen "${localegen_args[@]}"
-}
-
-glibc_do_src_install() {
- local builddir=$(builddir nptl)
- cd "${builddir}"
-
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
-
- # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
- # which come without headers etc. Only needed for binary packages since the
- # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
- find "${D}" -name "libnsl.a" -delete
- find "${D}" -name "libnsl.so" -delete
-
- # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
- # to infer upstream version:
- # '#define VERSION "2.26.90"' -> '2.26.90'
- local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
-
- # Avoid stripping binaries not targeted by ${CHOST}. Or else
- # ${CHOST}-strip would break binaries build for ${CTARGET}.
- is_crosscompile && dostrip -x /
- # gdb thread introspection relies on local libpthreas symbols. stripping breaks it
- # See Note [Disable automatic stripping]
- dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
-
- if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
- # Move versioned .a file out of libdir to evade portage QA checks
- # instead of using gen_usr_ldscript(). We fix ldscript as:
- # "GROUP ( /usr/lib64/libm-<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 "${WORKDIR}"/extra/locale
- dosbin locale-gen
- doman *.[0-8]
- insinto /etc
- doins locale.gen
-
- keepdir /usr/lib/locale
-
- cd "${S}"
-
- # Install misc network config files
- insinto /etc
- doins posix/gai.conf
-
- 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
- if ! run_locale_gen "${ED%/}"; then
- die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
- fi
-}
-
-glibc_headers_install() {
- local builddir=$(builddir "headers")
- cd "${builddir}"
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
-
- insinto $(alt_headers)/gnu
- doins "${S}"/include/gnu/stubs.h
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include $(alt_prefix)/sys-include
-}
-
-src_install() {
- if just_headers ; then
- export ABI=default
- glibc_headers_install
- return
- fi
-
- foreach_abi glibc_do_src_install
-
- if ! use static-libs ; then
- einfo "Not installing static glibc libraries"
- find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
- fi
-}
-
-# Simple test to make sure our new glibc isn't completely broken.
-# Make sure we don't test with statically built binaries since
-# they will fail. Also, skip if this glibc is a cross compiler.
-#
-# If coreutils is built with USE=multicall, some of these files
-# will just be wrapper scripts, not actual ELFs we can test.
-glibc_sanity_check() {
- cd / #228809
-
- # We enter ${ED} so to avoid trouble if the path contains
- # special characters; for instance if the path contains the
- # colon character (:), then the linker will try to split it
- # and look for the libraries in an unexpected place. This can
- # lead to unsafe code execution if the generated prefix is
- # within a world-writable directory.
- # (e.g. /var/tmp/portage:${HOSTNAME})
- pushd "${ED}"/$(get_libdir) >/dev/null
-
- # 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
-
- # 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 ! use crypt && 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
-}
-
-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
- if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
- ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- 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/glibc/glibc-2.37-r10.ebuild b/sys-libs/glibc/glibc-2.37-r10.ebuild
deleted file mode 100644
index 5434cdac6554..000000000000
--- a/sys-libs/glibc/glibc-2.37-r10.ebuild
+++ /dev/null
@@ -1,1695 +0,0 @@
-# Copyright 1999-2026 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_{13..14} )
-TMPFILES_OPTIONAL=1
-
-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/"
-LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
-SLOT="2.2"
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=12
-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"
-
-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 )"
-
-IUSE="audit caps cet compile-locales +crypt 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}
- 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
-)
-
-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
- tst-sched1
- 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}"
-}
-
-# We need to be able to set alternative headers for compiling for non-native
-# platform. Will also become useful for testing kernel-headers without screwing
-# up the whole system.
-alt_headers() {
- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
-}
-
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS="$(host_eprefix)$(alt_headers)"
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- echo $(alt_prefix)/$(get_libdir)
-}
-alt_usrlibdir() {
- echo $(alt_prefix)/usr/$(get_libdir)
-}
-
-builddir() {
- echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
-}
-
-do_compile_test() {
- local ret save_cflags=${CFLAGS}
- CFLAGS+=" $1"
- shift
-
- pushd "${T}" >/dev/null
-
- rm -f glibc-test*
- printf '%b' "$*" > glibc-test.c
-
- # 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"
-
- # Workaround for bug #823780.
- # Need to save/restore CC because earlier on, we stuff it full of CFLAGS, and tc-getCPP doesn't like that.
- CC_mangled=${CC}
- CC=${glibc__GLIBC_CC}
- if tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
- export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f"
- einfo "Auto adding -mno-avx512f to CFLAGS_x86 for buggy GCC version (bug #823780) (ABI=${ABI})"
- fi
- CC=${CC_mangled}
- fi
- ;;
- mips)
- # The mips abi cannot support the GNU style hashes. #233233
- filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
- ;;
- ppc|ppc64)
- # Many arch-specific implementations do not work on ppc with
- # cache-block not equal to 128 bytes. This breaks memset:
- # https://sourceware.org/PR26522
- # https://bugs.gentoo.org/737996
- # Use default -mcpu=. For ppc it means non-multiarch setup.
- filter-flags '-mcpu=*'
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
-
- local cpu
- case ${CTARGET} in
- sparc64-*)
- cpu="sparc64"
- case $(get-flag mcpu) in
- v9)
- # We need to force at least v9a because the base build doesn't
- # work with just v9.
- # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
- append-flags "-Wa,-xarch=v9a"
- ;;
- esac
- ;;
- sparc-*)
- case $(get-flag mcpu) in
- v8|supersparc|hypersparc|leon|leon3)
- cpu="sparcv8"
- ;;
- *)
- cpu="sparcv9"
- ;;
- esac
- ;;
- esac
- [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
- ;;
- esac
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Allow users to explicitly avoid flag sanitization via
- # USE=custom-cflags.
- if ! use custom-cflags; then
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- # Lock glibc at -O2; we want to be conservative here.
- filter-flags '-O?'
- append-flags -O2
- fi
-
- strip-unsupported-flags
- filter-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'
-
- # 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
-
- # #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 amd64 || use x86) && ! use cet; then
- append-flags '-fcf-protection=none'
- 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})}}
-
- # and make sure glibc__ORIG_CC and glibc__ORIG_CXX is defined now.
- export glibc__ORIG_CC=${CC}
- export glibc__ORIG_CXX=${CXX}
-
- 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})"
-
- # 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__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}"
-
- if is_crosscompile; then
- # Assume worst-case bootstrap: glibc is buil first time
- # when ${CTARGET}-g++ is not available yet. We avoid
- # building auxiliary programs that require C++: bug #683074
- # It should not affect final result.
- export libc_cv_cxx_link_ok=no
- # The line above has the same effect. We set CXX explicitly
- # to make build logs less confusing.
- export CXX=
- fi
-}
-
-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 "$(build_eprefix)$(alt_build_headers)" - | \
- tail -n 1
-}
-
-# We collect all sanity checks here. Consistency is not guranteed between
-# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
-# src_unpack.
-sanity_prechecks() {
- # Prevent native builds from downgrading
- if [[ ${MERGE_TYPE} != "buildonly" ]] && \
- [[ -z ${ROOT} ]] && \
- [[ ${CBUILD} == ${CHOST} ]] && \
- [[ ${CHOST} == ${CTARGET} ]] ; then
-
- # The high rev # is to allow people to downgrade between -r#
- # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2
- # should be fine. Hopefully we never actually use a r# this
- # high.
- if has_version ">${CATEGORY}/${P}-r10000" ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
- fi
-
- if ! do_run_test '#include <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 && ! tc-is-cross-compiler ; 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 supporing IFUNC. glibc's ./configure
- # is not robust enough to detect proper support:
- # https://bugs.gentoo.org/641216
- # https://sourceware.org/PR22634#c0
- case $(tc-arch ${CTARGET}) in
- # Keep whitelist of targets where autodetection mostly works.
- amd64|x86|sparc|ppc|ppc64|arm|arm64|s390|riscv|loong) ;;
- # Blacklist everywhere else
- *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
- esac
-
- # Enable Intel Control-flow Enforcement Technology on amd64 if requested
- case ${CTARGET} in
- x86_64-*) myconf+=( $(use_enable cet) ) ;;
- *) ;;
- esac
-
- [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
-
- myconf+=( --enable-kernel=${MIN_KERN_VER} )
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. only for the primary ABI on multilib systems
- # 3. Not a crosscompile
- if ! is_crosscompile && use selinux ; then
- if use multilib ; then
- if is_final_abi ; then
- myconf+=( --with-selinux )
- else
- myconf+=( --without-selinux )
- fi
- else
- myconf+=( --with-selinux )
- fi
- else
- myconf+=( --without-selinux )
- fi
-
- # Force a few tests where we always know the answer but
- # configure is incapable of finding it.
- if is_crosscompile ; then
- export \
- libc_cv_c_cleanup=yes \
- libc_cv_forced_unwind=yes
- fi
-
- myconf+=(
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- $(use_with gd)
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- --sysconfdir="$(host_eprefix)/etc"
- --localstatedir="$(host_eprefix)/var"
- --libdir='$(prefix)'/$(get_libdir)
- --mandir='$(prefix)'/share/man
- --infodir='$(prefix)'/share/info
- --libexecdir='$(libdir)'/misc/glibc
- --with-bugurl=https://bugs.gentoo.org/
- --with-pkgversion="$(glibc_banner)"
- $(use_enable crypt)
- $(use_multiarch || echo --disable-multi-arch)
- $(use_enable 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'
-
- # -march= option tricks build system to infer too
- # high ISA level: https://sourceware.org/PR27318
- libc_cv_include_x86_isa_level=no
-
- # Explicit override of https://sourceware.org/PR27991
- # exposes a bug in glibc's configure:
- # https://sourceware.org/PR27991
- libc_cv_have_x86_lahf_sahf=no
- libc_cv_have_x86_movbe=no
-
- ${EXTRA_ECONF}
- )
-
- # We rely on sys-libs/timezone-data for timezone tools normally.
- myconf+=( $(use_enable vanilla timezone-tools) )
-
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
- ac_cv_lib_cap_cap_init=$(usex caps || echo no)
-
- # There is no configure option for this and we need to export it
- # since the glibc build will re-run configure on itself
- export libc_cv_rootsbindir="$(host_eprefix)/sbin"
- export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)"
-
- local builddir=$(builddir nptl)
- mkdir -p "${builddir}"
- cd "${builddir}"
- set -- "${S}"/configure "${myconf[@]}"
- echo "$@"
- "$@" || die "failed to configure glibc"
-
- # ia64 static cross-compilers are a pita in so much that they
- # can't produce static ELFs (as the libgcc.a is broken). so
- # disable building of the programs for those targets if it
- # doesn't work.
- # XXX: We could turn this into a compiler test, but ia64 is
- # the only one that matters, so this should be fine for now.
- if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
- sed -i '1i+link-static = touch $@' config.make
- fi
-
- # If we're trying to migrate between ABI sets, we need
- # to lie and use a local copy of gcc. Like if the system
- # is built with MULTILIB_ABIS="amd64 x86" but we want to
- # add x32 to it, gcc/glibc don't yet support x32.
- #
- if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then
- echo 'int main(){}' > "${T}"/test.c
- if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
- sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
- fi
- fi
-}
-
-glibc_headers_configure() {
- export ABI=default
-
- local builddir=$(builddir "headers")
- mkdir -p "${builddir}"
- cd "${builddir}"
-
- # if we don't have a compiler yet, we can't really test it now ...
- # hopefully they don't affect header generation, so let's hope for
- # the best here ...
- local v vars=(
- ac_cv_header_cpuid_h=yes
- libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
- libc_cv_asm_cfi_directives=yes
- libc_cv_broken_visibility_attribute=no
- libc_cv_c_cleanup=yes
- libc_cv_compiler_powerpc64le_binary128_ok=yes
- libc_cv_forced_unwind=yes
- libc_cv_gcc___thread=yes
- libc_cv_mlong_double_128=yes
- libc_cv_mlong_double_128ibm=yes
- libc_cv_ppc_machine=yes
- libc_cv_ppc_rel16=yes
- libc_cv_predef_fortify_source=no
- libc_cv_target_power8_ok=yes
- libc_cv_visibility_attribute=yes
- libc_cv_z_combreloc=yes
- libc_cv_z_execstack=yes
- libc_cv_z_initfirst=yes
- libc_cv_z_nodelete=yes
- libc_cv_z_nodlopen=yes
- libc_cv_z_relro=yes
- libc_mips_abi=${ABI}
- libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=no
- ac_cv_lib_cap_cap_init=no
- )
-
- einfo "Forcing cached settings:"
- for v in "${vars[@]}" ; do
- einfo " ${v}"
- export ${v}
- done
-
- local headers_only_arch_CPPFLAGS=()
-
- # Blow away some random CC settings that screw things up. #550192
- if [[ -d ${S}/sysdeps/mips ]]; then
- pushd "${S}"/sysdeps/mips >/dev/null
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
-
- # Force the mips ABI to the default. This is OK because the set of
- # installed headers in this phase is the same between the 3 ABIs.
- # If this ever changes, this hack will break, but that's unlikely
- # as glibc discourages that behavior.
- # https://crbug.com/647033
- sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
-
- popd >/dev/null
- fi
-
- case ${CTARGET} in
- riscv*)
- # RISC-V interrogates the compiler to determine which target to
- # build. If building the headers then we don't strictly need a
- # RISC-V compiler, so the built-in definitions that are provided
- # along with all RISC-V compiler might not exist. This causes
- # glibc's RISC-V preconfigure script to blow up. Since we're just
- # building the headers any value will actually work here, so just
- # pick the standard one (rv64g/lp64d) to make the build scripts
- # happy for now -- the headers are all the same anyway so it
- # doesn't matter.
- headers_only_arch_CPPFLAGS+=(
- -D__riscv_xlen=64
- -D__riscv_flen=64
- -D__riscv_float_abi_double=1
- -D__riscv_atomic=1
- ) ;;
- esac
-
- local myconf=()
- myconf+=(
- --disable-sanity-checks
- --enable-hacker-mode
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- $(use_enable crypt)
- ${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
-
- 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() {
- local prefix=$1 user_config config
- local -a hasversion_opts localegen_args
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- hasversion_opts=( -b )
- fi
-
- if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
- localegen_args=( --prefix "${prefix}" )
- else
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
- localegen_args=( --config "${config}" --destdir "${prefix}" )
- 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- locale-gen "${localegen_args[@]}"
-}
-
-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 && ! run_locale_gen "${ED}"; then
- die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- 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 ! use crypt && 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
-}
-
-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
- if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
- ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- 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/glibc/glibc-2.38-r13.ebuild b/sys-libs/glibc/glibc-2.38-r13.ebuild
deleted file mode 100644
index 826ae8e6c242..000000000000
--- a/sys-libs/glibc/glibc-2.38-r13.ebuild
+++ /dev/null
@@ -1,1740 +0,0 @@
-# Copyright 1999-2026 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_{13..14} )
-TMPFILES_OPTIONAL=1
-
-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/"
-LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
-SLOT="2.2"
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=13
-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"
-
-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 )"
-
-IUSE="audit caps cet compile-locales +crypt 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}
- 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
-)
-
-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}"
-}
-
-# We need to be able to set alternative headers for compiling for non-native
-# platform. Will also become useful for testing kernel-headers without screwing
-# up the whole system.
-alt_headers() {
- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
-}
-
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS="$(host_eprefix)$(alt_headers)"
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- echo $(alt_prefix)/$(get_libdir)
-}
-alt_usrlibdir() {
- echo $(alt_prefix)/usr/$(get_libdir)
-}
-
-builddir() {
- echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
-}
-
-do_compile_test() {
- local ret save_cflags=${CFLAGS}
- CFLAGS+=" $1"
- shift
-
- pushd "${T}" >/dev/null
-
- rm -f glibc-test*
- printf '%b' "$*" > glibc-test.c
-
- # 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"
-
- # Workaround for bug #823780.
- # Need to save/restore CC because earlier on, we stuff it full of CFLAGS, and tc-getCPP doesn't like that.
- CC_mangled=${CC}
- CC=${glibc__GLIBC_CC}
- if tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
- export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f"
- einfo "Auto adding -mno-avx512f to CFLAGS_x86 for buggy GCC version (bug #823780) (ABI=${ABI})"
- fi
- CC=${CC_mangled}
- fi
- ;;
- mips)
- # The mips abi cannot support the GNU style hashes. #233233
- filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
- ;;
- ppc|ppc64)
- # Many arch-specific implementations do not work on ppc with
- # cache-block not equal to 128 bytes. This breaks memset:
- # https://sourceware.org/PR26522
- # https://bugs.gentoo.org/737996
- # Use default -mcpu=. For ppc it means non-multiarch setup.
- filter-flags '-mcpu=*'
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
-
- local cpu
- case ${CTARGET} in
- sparc64-*)
- cpu="sparc64"
- case $(get-flag mcpu) in
- v9)
- # We need to force at least v9a because the base build doesn't
- # work with just v9.
- # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
- append-flags "-Wa,-xarch=v9a"
- ;;
- esac
- ;;
- sparc-*)
- case $(get-flag mcpu) in
- v8|supersparc|hypersparc|leon|leon3)
- cpu="sparcv8"
- ;;
- *)
- cpu="sparcv9"
- ;;
- esac
- ;;
- esac
- [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
- ;;
- esac
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Allow users to explicitly avoid flag sanitization via
- # USE=custom-cflags.
- if ! use custom-cflags; then
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- # Lock glibc at -O2; we want to be conservative here.
- filter-flags '-O?'
- append-flags -O2
- fi
-
- strip-unsupported-flags
- filter-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
-
- # #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 amd64 || use x86) && ! use cet; then
- append-flags '-fcf-protection=none'
- 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 CPP="$(tc-getCPP ${CTARGET})"
- 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})"
-
- # 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 "$(build_eprefix)$(alt_build_headers)" - | \
- tail -n 1
-}
-
-# We collect all sanity checks here. Consistency is not guranteed between
-# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
-# src_unpack.
-sanity_prechecks() {
- # Prevent native builds from downgrading
- if [[ ${MERGE_TYPE} != "buildonly" ]] && \
- [[ -z ${ROOT} ]] && \
- [[ ${CBUILD} == ${CHOST} ]] && \
- [[ ${CHOST} == ${CTARGET} ]] ; then
-
- # The high rev # is to allow people to downgrade between -r#
- # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2
- # should be fine. Hopefully we never actually use a r# this
- # high.
- if has_version ">${CATEGORY}/${P}-r10000" ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
- fi
-
- if ! do_run_test '#include <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 && ! tc-is-cross-compiler ; 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 supporing IFUNC. glibc's ./configure
- # is not robust enough to detect proper support:
- # https://bugs.gentoo.org/641216
- # https://sourceware.org/PR22634#c0
- case $(tc-arch ${CTARGET}) in
- # Keep whitelist of targets where autodetection mostly works.
- amd64|x86|sparc|ppc|ppc64|arm|arm64|s390|riscv|loong) ;;
- # Blacklist everywhere else
- *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
- esac
-
- # Enable Intel Control-flow Enforcement Technology on amd64 if requested
- case ${CTARGET} in
- x86_64-*) myconf+=( $(use_enable cet) ) ;;
- *) ;;
- esac
-
- [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
-
- myconf+=( --enable-kernel=${MIN_KERN_VER} )
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. only for the primary ABI on multilib systems
- # 3. Not a crosscompile
- if ! is_crosscompile && use selinux ; then
- if use multilib ; then
- if is_final_abi ; then
- myconf+=( --with-selinux )
- else
- myconf+=( --without-selinux )
- fi
- else
- myconf+=( --with-selinux )
- fi
- else
- myconf+=( --without-selinux )
- fi
-
- # Force a few tests where we always know the answer but
- # configure is incapable of finding it.
- if is_crosscompile ; then
- export \
- libc_cv_c_cleanup=yes \
- libc_cv_forced_unwind=yes
- fi
-
- myconf+=(
- --disable-werror
- --enable-bind-now
- --enable-fortify-source
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- $(use_with gd)
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- --sysconfdir="$(host_eprefix)/etc"
- --localstatedir="$(host_eprefix)/var"
- --libdir='$(prefix)'/$(get_libdir)
- --mandir='$(prefix)'/share/man
- --infodir='$(prefix)'/share/info
- --libexecdir='$(libdir)'/misc/glibc
- --with-bugurl=https://bugs.gentoo.org/
- --with-pkgversion="$(glibc_banner)"
- $(use_enable crypt)
- $(use_multiarch || echo --disable-multi-arch)
- $(use_enable 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"
-
- # ia64 static cross-compilers are a pita in so much that they
- # can't produce static ELFs (as the libgcc.a is broken). so
- # disable building of the programs for those targets if it
- # doesn't work.
- # XXX: We could turn this into a compiler test, but ia64 is
- # the only one that matters, so this should be fine for now.
- if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
- sed -i '1i+link-static = touch $@' config.make
- fi
-
- # If we're trying to migrate between ABI sets, we need
- # to lie and use a local copy of gcc. Like if the system
- # is built with MULTILIB_ABIS="amd64 x86" but we want to
- # add x32 to it, gcc/glibc don't yet support x32.
- #
- if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then
- echo '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,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
- libc_cv_asm_cfi_directives=yes
- libc_cv_broken_visibility_attribute=no
- libc_cv_c_cleanup=yes
- libc_cv_compiler_powerpc64le_binary128_ok=yes
- libc_cv_forced_unwind=yes
- libc_cv_gcc___thread=yes
- libc_cv_mlong_double_128=yes
- libc_cv_mlong_double_128ibm=yes
- libc_cv_ppc_machine=yes
- libc_cv_ppc_rel16=yes
- libc_cv_predef_fortify_source=no
- libc_cv_target_power8_ok=yes
- libc_cv_visibility_attribute=yes
- libc_cv_z_combreloc=yes
- libc_cv_z_execstack=yes
- libc_cv_z_initfirst=yes
- libc_cv_z_nodelete=yes
- libc_cv_z_nodlopen=yes
- libc_cv_z_relro=yes
- libc_mips_abi=${ABI}
- libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=no
- ac_cv_lib_cap_cap_init=no
- )
-
- einfo "Forcing cached settings:"
- for v in "${vars[@]}" ; do
- einfo " ${v}"
- export ${v}
- done
-
- local headers_only_arch_CPPFLAGS=()
-
- # Blow away some random CC settings that screw things up. #550192
- if [[ -d ${S}/sysdeps/mips ]]; then
- pushd "${S}"/sysdeps/mips >/dev/null
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
-
- # Force the mips ABI to the default. This is OK because the set of
- # installed headers in this phase is the same between the 3 ABIs.
- # If this ever changes, this hack will break, but that's unlikely
- # as glibc discourages that behavior.
- # https://crbug.com/647033
- sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
-
- popd >/dev/null
- fi
-
- 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=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- $(use_enable crypt)
- ${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=32 emake ${myxfailparams} check
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- foreach_abi glibc_src_test || die "tests failed"
-}
-
-# src_install
-
-run_locale_gen() {
- local prefix=$1 user_config config
- local -a hasversion_opts localegen_args
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- hasversion_opts=( -b )
- fi
-
- if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
- localegen_args=( --prefix "${prefix}" )
- else
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
- localegen_args=( --config "${config}" --destdir "${prefix}" )
- 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- locale-gen "${localegen_args[@]}"
-}
-
-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 && ! run_locale_gen "${ED}"; then
- die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- 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 ! use crypt && 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
-
- if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
- ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- 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/glibc/glibc-2.39-r11.ebuild b/sys-libs/glibc/glibc-2.39-r11.ebuild
deleted file mode 100644
index 9b3d913852c6..000000000000
--- a/sys-libs/glibc/glibc-2.39-r11.ebuild
+++ /dev/null
@@ -1,1751 +0,0 @@
-# Copyright 1999-2026 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_{13..14} )
-TMPFILES_OPTIONAL=1
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=11
-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}"
-}
-
-# We need to be able to set alternative headers for compiling for non-native
-# platform. Will also become useful for testing kernel-headers without screwing
-# up the whole system.
-alt_headers() {
- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
-}
-
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS="$(host_eprefix)$(alt_headers)"
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' \
- | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 \
- | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- echo $(alt_prefix)/$(get_libdir)
-}
-alt_usrlibdir() {
- echo $(alt_prefix)/usr/$(get_libdir)
-}
-
-builddir() {
- echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
-}
-
-do_compile_test() {
- local ret save_cflags=${CFLAGS}
- CFLAGS+=" $1"
- shift
-
- pushd "${T}" >/dev/null
-
- rm -f glibc-test*
- printf '%b' "$*" > glibc-test.c
-
- # 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 "$(build_eprefix)$(alt_build_headers)" - | \
- tail -n 1
-}
-
-# We collect all sanity checks here. Consistency is not guranteed between
-# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
-# src_unpack.
-sanity_prechecks() {
- # Prevent native builds from downgrading
- if [[ ${MERGE_TYPE} != "buildonly" ]] && \
- [[ -z ${ROOT} ]] && \
- [[ ${CBUILD} == ${CHOST} ]] && \
- [[ ${CHOST} == ${CTARGET} ]] ; then
-
- # The high rev # is to allow people to downgrade between -r#
- # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2
- # should be fine. Hopefully we never actually use a r# this
- # high.
- if has_version ">${CATEGORY}/${P}-r10000" ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
- fi
-
- if ! do_run_test '#include <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 && ! tc-is-cross-compiler ; 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=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- --sysconfdir="$(host_eprefix)/etc"
- --localstatedir="$(host_eprefix)/var"
- --libdir='$(prefix)'/$(get_libdir)
- --mandir='$(prefix)'/share/man
- --infodir='$(prefix)'/share/info
- --libexecdir='$(libdir)'/misc/glibc
- --with-bugurl=https://bugs.gentoo.org/
- --with-pkgversion="$(glibc_banner)"
- $(use_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=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- ${EXTRA_ECONF}
- )
-
- # Nothing is compiled here which would affect the headers for the target.
- # So forcing CC/CFLAGS is sane.
- local headers_only_CC=$(tc-getBUILD_CC)
- local headers_only_CFLAGS="-O1 -pipe"
- local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}"
- local headers_only_LDFLAGS=""
- set -- "${S}"/configure "${myconf[@]}"
- echo \
- "CC=${headers_only_CC}" \
- "CFLAGS=${headers_only_CFLAGS}" \
- "CPPFLAGS=${headers_only_CPPFLAGS}" \
- "LDFLAGS=${headers_only_LDFLAGS}" \
- "$@"
- CC=${headers_only_CC} \
- CFLAGS=${headers_only_CFLAGS} \
- CPPFLAGS=${headers_only_CPPFLAGS} \
- LDFLAGS="" \
- "$@" || die "failed to configure glibc"
-}
-
-do_src_configure() {
- if just_headers ; then
- glibc_headers_configure
- else
- glibc_do_configure nptl
- fi
-}
-
-src_configure() {
- foreach_abi do_src_configure
-}
-
-# 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() {
- local prefix=$1 user_config config
- local -a hasversion_opts localegen_args
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- hasversion_opts=( -b )
- fi
-
- if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
- localegen_args=( --prefix "${prefix}" )
- else
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
- localegen_args=( --config "${config}" --destdir "${prefix}" )
- 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- locale-gen "${localegen_args[@]}"
-}
-
-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 && ! run_locale_gen "${ED}"; then
- die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- 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
-
- if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
- ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
- 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/glibc/glibc-2.40-r11.ebuild b/sys-libs/glibc/glibc-2.40-r11.ebuild
deleted file mode 100644
index 521c1beeead3..000000000000
--- a/sys-libs/glibc/glibc-2.40-r11.ebuild
+++ /dev/null
@@ -1,1754 +0,0 @@
-# Copyright 1999-2026 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_{13..14} )
-TMPFILES_OPTIONAL=1
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=11
-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 CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}")
- 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}/${CTARGET}-gcc"
- export CPP="${current_gcc_path}/${CTARGET}-cpp"
- export CXX="${current_gcc_path}/${CTARGET}-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 && ! tc-is-cross-compiler ; 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() {
- local prefix=$1 user_config config
- local -a hasversion_opts localegen_args
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- hasversion_opts=( -b )
- fi
-
- if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
- localegen_args=( --prefix "${prefix}" )
- else
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
- localegen_args=( --config "${config}" --destdir "${prefix}" )
- 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- locale-gen "${localegen_args[@]}"
-}
-
-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 && ! run_locale_gen "${ED}"; then
- die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- 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
-
- if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
- ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
-
- # 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 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/glibc/glibc-2.41-r10.ebuild b/sys-libs/glibc/glibc-2.41-r10.ebuild
deleted file mode 100644
index 59b3a5b0b3d0..000000000000
--- a/sys-libs/glibc/glibc-2.41-r10.ebuild
+++ /dev/null
@@ -1,1790 +0,0 @@
-# Copyright 1999-2026 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_{13..14} )
-TMPFILES_OPTIONAL=1
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=12
-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 eapi9-ver
-
-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
- sys-apps/gawk[mpfr]
- )
-"
-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
- tst-sched_setattr
-
- # 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-aarch64-pkey
- 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
- CC="${glibc__ORIG_CC}" CXX="${glibc__ORIG_CXX}" CPP="${glibc__ORIG_CPP}" \
- CFLAGS="-O2" LDFLAGS="" do_compile_test "" "$@" 2>/dev/null || return 0
- else
- ebegin "Performing simple compile test for ABI=${ABI}"
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- eend 1
- return 0
- else
- eend 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
-
- # 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 CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}")
- 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}/${CTARGET}-gcc"
- export CPP="${current_gcc_path}/${CTARGET}-cpp"
- export CXX="${current_gcc_path}/${CTARGET}-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."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || 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 && ! tc-is-cross-compiler ; 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
- if ver_replacing -lt $(ver_cut 1-2 ${PV}); 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)"
- fi
- 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
- https://github.com/gentoo/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
- https://git.sr.ht/~sourceware/glibc
- https://gitlab.com/x86-glibc/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
-
- case ${CTARGET} in
- m68*-aligned-*)
- einfo "Applying utmp format fix for m68k with -maligned-int"
- eapply "${FILESDIR}/glibc-2.41-m68k-malign.patch"
- ;;
- *)
- ;;
- esac
-
- 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() {
- local fatal=$1 prefix=$2
- local user_config action config stderr noun ret
- local -a hasversion_opts localegen_args
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- hasversion_opts=( -b )
- fi
-
- if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
- localegen_args=( --prefix "${prefix}" )
- else
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
- localegen_args=( --config "${config}" --destdir "${prefix}" )
- 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- { stderr=$(locale-gen "${localegen_args[@]}" 2>&1 >&3); } 3>&1
- ret=$?
- action="ewarn"
- if (( ret == 0 )); then
- noun="warning"
- else
- noun="error"
- if (( fatal )); then
- action="die"
- fi
- fi
- # Convey warnings/errors so that they can be reseen upon emerge exiting.
- if [[ ${stderr} ]]; then
- ewarn "locale-gen(8) issued the following ${noun}s:"
- while read -r; do
- ewarn "$REPLY"
- done <<<"${stderr}"
- fi
- if (( ret != 0 )); then
- "${action}" "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
-}
-
-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 1 "${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
-
- if ! use compile-locales; then
- run_locale_gen 0 "${EROOT}"
- fi
-
- # 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 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/glibc/glibc-2.42-r5.ebuild b/sys-libs/glibc/glibc-2.42-r5.ebuild
deleted file mode 100644
index 315a2b064bdd..000000000000
--- a/sys-libs/glibc/glibc-2.42-r5.ebuild
+++ /dev/null
@@ -1,1860 +0,0 @@
-# Copyright 1999-2026 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_{13..14} )
-TMPFILES_OPTIONAL=1
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=7
-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"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/glibc.asc
-
-inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing tmpfiles eapi9-ver verify-sig
-
-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+=" verify-sig? ( mirror://gnu/glibc/${P}.tar.xz.sig )"
- 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 sframe +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
- )
- sframe? ( >=sys-devel/binutils-2.45 )
- test? (
- dev-lang/perl
- >=net-dns/libidn2-2.3.0
- sys-apps/gawk[mpfr]
- )
- verify-sig? ( sec-keys/openpgp-keys-glibc )
-"
-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
- tst-sched_setattr
-
- # Fails regularly, unreliable
- tst-valgrind-smoke
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=31877 (bug #927973)
- tst-shstk-legacy-1g
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=33239
- test-double-compoundn
- test-float-compoundn
- test-float32-compoundn
- test-float32x-compoundn
- test-float64-compoundn
-
- # Fails only in portage. Needs investigation.
- tst-setvbuf2
-)
-
-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-aarch64-pkey
- 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} ]]
-}
-
-is_linux() {
- [[ ${CTARGET} == *-linux-* ]]
-}
-
-is_hurd() {
- # Let's hope this holds for a long time
- [[ ${CTARGET} != *-linux-* ]]
-}
-
-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
- CC="${glibc__ORIG_CC}" CXX="${glibc__ORIG_CXX}" CPP="${glibc__ORIG_CPP}" \
- CFLAGS="-O2" LDFLAGS="" do_compile_test "" "$@" 2>/dev/null || return 0
- else
- ebegin "Performing simple compile test for ABI=${ABI}"
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- eend 1
- return 0
- else
- eend 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
-
- # 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 CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}")
- 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}/${CTARGET}-gcc"
- export CPP="${current_gcc_path}/${CTARGET}-cpp"
- export CXX="${current_gcc_path}/${CTARGET}-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}
-}
-
-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."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || 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 && ! tc-is-cross-compiler ; 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 ! [[ $(g_KV_to_int ${run_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need a kernel of at least ${want_kv}!"
- die "Kernel version too low!"
- fi
- eend 0
- 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 ! [[ $(g_KV_to_int ${build_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need linux-headers of at least ${want_kv}!"
- die "linux-headers version too low!"
- fi
- eend 0
- fi
- fi
- fi
-}
-
-upgrade_warning() {
- is_crosscompile && return
-
- if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then
- if ver_replacing -lt $(ver_cut 1-2 ${PV}); 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)"
- fi
- 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
- https://github.com/gentoo/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
- https://git.sr.ht/~sourceware/glibc
- https://gitlab.com/x86-glibc/glibc.git
- "
- EGIT_CHECKOUT_DIR=${S}
- [[ ${PV} == *.*.9999 ]] && EGIT_BRANCH=release/${PV%.*}/master
- git-r3_src_unpack
- else
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}/${P}.tar.xz" "${DISTDIR}/${P}.tar.xz.sig"
- fi
- unpack ${P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack ${P}-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
-
- case ${CTARGET} in
- m68*-aligned-*)
- einfo "Applying utmp format fix for m68k with -maligned-int"
- eapply "${FILESDIR}/glibc-2.41-m68k-malign.patch"
- ;;
- *)
- ;;
- esac
-
- 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
-
- case ${ABI}-${CTARGET} in
- amd64-x86_64-*|arm64-aarch64-*) myconf+=( $(use_enable sframe) ) ;;
- *) ;;
- 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 nonfatal emake ${myxfailparams} check
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # glibc_src_test uses nonfatal so that we can run tests for all ABIs
- # and fail at the end instead.
- foreach_abi glibc_src_test || die "tests failed"
-}
-
-# src_install
-
-run_locale_gen() {
- local fatal=$1 prefix=$2
- local user_config action config stderr noun ret
- local -a hasversion_opts localegen_args
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- hasversion_opts=( -b )
- fi
-
- if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
- localegen_args=( --prefix "${prefix}" )
- else
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
- localegen_args=( --config "${config}" --destdir "${prefix}" )
- 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- { stderr=$(locale-gen "${localegen_args[@]}" 2>&1 >&3); } 3>&1
- ret=$?
- action="ewarn"
- if (( ret == 0 )); then
- noun="warning"
- else
- noun="error"
- if (( fatal )); then
- action="die"
- fi
- fi
- # Convey warnings/errors so that they can be reseen upon emerge exiting.
- if [[ ${stderr} ]]; then
- ewarn "locale-gen(8) issued the following ${noun}s:"
- while read -r; do
- ewarn "$REPLY"
- done <<<"${stderr}"
- fi
- if (( ret != 0 )); then
- "${action}" "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
-}
-
-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
- if is_linux ; then
- 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
- else
- # we must be using hurd then
- local ldso_abi_list=(
- # x86
- amd64 /lib64/ld-x86-64.so.1
- x86 /lib/ld.so.1
- )
- fi
- 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
-
- if is_linux ; then
- # 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
- fi
-
- # On Hurd, glibc and (unpatched) gcc tend to disagree about the proper location for
- # the dynamic loader. Which is maximally stupid since this one information is hardcoded
- # into every single binary, and even if we were to fix *our* gcc it could still prevent
- # us from running binaries prepared anywhere else...
-
- if is_hurd && has amd64 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "$(alt_prefix)/lib/ld-x86-64.so.1" ]] ; then
- die "Somehow your amd64 hurd glibc installed /lib/ld-x86-64.so.1 ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ../lib64/ld-x86-64.so.1 "$(alt_prefix)/lib/ld-x86-64.so.1"
- fi
-
- if is_hurd && has x86 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so" ]] ; then
- die "Somehow your x86 hurd glibc installed ld.so ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ld.so.1 "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so"
- fi
-
- # 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 1 "${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
-
- if ! use compile-locales; then
- run_locale_gen 0 "${EROOT}"
- fi
-
- # 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 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/glibc/glibc-2.42-r6.ebuild b/sys-libs/glibc/glibc-2.42-r6.ebuild
deleted file mode 100644
index 32a909187192..000000000000
--- a/sys-libs/glibc/glibc-2.42-r6.ebuild
+++ /dev/null
@@ -1,1860 +0,0 @@
-# Copyright 1999-2026 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_{13..14} )
-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"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/glibc.asc
-
-inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing tmpfiles eapi9-ver verify-sig
-
-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+=" verify-sig? ( mirror://gnu/glibc/${P}.tar.xz.sig )"
- 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 sframe +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
- )
- sframe? ( >=sys-devel/binutils-2.45 )
- test? (
- dev-lang/perl
- >=net-dns/libidn2-2.3.0
- sys-apps/gawk[mpfr]
- )
- verify-sig? ( sec-keys/openpgp-keys-glibc )
-"
-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
- tst-sched_setattr
-
- # Fails regularly, unreliable
- tst-valgrind-smoke
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=31877 (bug #927973)
- tst-shstk-legacy-1g
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=33239
- test-double-compoundn
- test-float-compoundn
- test-float32-compoundn
- test-float32x-compoundn
- test-float64-compoundn
-
- # Fails only in portage. Needs investigation.
- tst-setvbuf2
-)
-
-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-aarch64-pkey
- 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} ]]
-}
-
-is_linux() {
- [[ ${CTARGET} == *-linux-* ]]
-}
-
-is_hurd() {
- # Let's hope this holds for a long time
- [[ ${CTARGET} != *-linux-* ]]
-}
-
-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
- CC="${glibc__ORIG_CC}" CXX="${glibc__ORIG_CXX}" CPP="${glibc__ORIG_CPP}" \
- CFLAGS="-O2" LDFLAGS="" do_compile_test "" "$@" 2>/dev/null || return 0
- else
- ebegin "Performing simple compile test for ABI=${ABI}"
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- eend 1
- return 0
- else
- eend 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
-
- # 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 CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}")
- 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}/${CTARGET}-gcc"
- export CPP="${current_gcc_path}/${CTARGET}-cpp"
- export CXX="${current_gcc_path}/${CTARGET}-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}
-}
-
-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."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || 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 && ! tc-is-cross-compiler ; 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 ! [[ $(g_KV_to_int ${run_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need a kernel of at least ${want_kv}!"
- die "Kernel version too low!"
- fi
- eend 0
- 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 ! [[ $(g_KV_to_int ${build_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need linux-headers of at least ${want_kv}!"
- die "linux-headers version too low!"
- fi
- eend 0
- fi
- fi
- fi
-}
-
-upgrade_warning() {
- is_crosscompile && return
-
- if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then
- if ver_replacing -lt $(ver_cut 1-2 ${PV}); 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)"
- fi
- 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
- https://github.com/gentoo/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
- https://git.sr.ht/~sourceware/glibc
- https://gitlab.com/x86-glibc/glibc.git
- "
- EGIT_CHECKOUT_DIR=${S}
- [[ ${PV} == *.*.9999 ]] && EGIT_BRANCH=release/${PV%.*}/master
- git-r3_src_unpack
- else
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}/${P}.tar.xz" "${DISTDIR}/${P}.tar.xz.sig"
- fi
- unpack ${P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack ${P}-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
-
- case ${CTARGET} in
- m68*-aligned-*)
- einfo "Applying utmp format fix for m68k with -maligned-int"
- eapply "${FILESDIR}/glibc-2.41-m68k-malign.patch"
- ;;
- *)
- ;;
- esac
-
- 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
-
- case ${ABI}-${CTARGET} in
- amd64-x86_64-*|arm64-aarch64-*) myconf+=( $(use_enable sframe) ) ;;
- *) ;;
- 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 nonfatal emake ${myxfailparams} check
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # glibc_src_test uses nonfatal so that we can run tests for all ABIs
- # and fail at the end instead.
- foreach_abi glibc_src_test || die "tests failed"
-}
-
-# src_install
-
-run_locale_gen() {
- local fatal=$1 prefix=$2
- local user_config action config stderr noun ret
- local -a hasversion_opts localegen_args
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- hasversion_opts=( -b )
- fi
-
- if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
- localegen_args=( --prefix "${prefix}" )
- else
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
- localegen_args=( --config "${config}" --destdir "${prefix}" )
- 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- { stderr=$(locale-gen "${localegen_args[@]}" 2>&1 >&3); } 3>&1
- ret=$?
- action="ewarn"
- if (( ret == 0 )); then
- noun="warning"
- else
- noun="error"
- if (( fatal )); then
- action="die"
- fi
- fi
- # Convey warnings/errors so that they can be reseen upon emerge exiting.
- if [[ ${stderr} ]]; then
- ewarn "locale-gen(8) issued the following ${noun}s:"
- while read -r; do
- ewarn "$REPLY"
- done <<<"${stderr}"
- fi
- if (( ret != 0 )); then
- "${action}" "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
-}
-
-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
- if is_linux ; then
- 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
- else
- # we must be using hurd then
- local ldso_abi_list=(
- # x86
- amd64 /lib64/ld-x86-64.so.1
- x86 /lib/ld.so.1
- )
- fi
- 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
-
- if is_linux ; then
- # 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
- fi
-
- # On Hurd, glibc and (unpatched) gcc tend to disagree about the proper location for
- # the dynamic loader. Which is maximally stupid since this one information is hardcoded
- # into every single binary, and even if we were to fix *our* gcc it could still prevent
- # us from running binaries prepared anywhere else...
-
- if is_hurd && has amd64 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "${D}/$(alt_prefix)/lib/ld-x86-64.so.1" ]] ; then
- die "Somehow your amd64 hurd glibc installed /lib/ld-x86-64.so.1 ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ../lib64/ld-x86-64.so.1 "$(alt_prefix)/lib/ld-x86-64.so.1"
- fi
-
- if is_hurd && has x86 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "${D}/$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so" ]] ; then
- die "Somehow your x86 hurd glibc installed ld.so ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ld.so.1 "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so"
- fi
-
- # 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 1 "${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
-
- if ! use compile-locales; then
- run_locale_gen 0 "${EROOT}"
- fi
-
- # 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 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/glibc/glibc-2.42-r7.ebuild b/sys-libs/glibc/glibc-2.42-r7.ebuild
deleted file mode 100644
index 9c58b216a789..000000000000
--- a/sys-libs/glibc/glibc-2.42-r7.ebuild
+++ /dev/null
@@ -1,1865 +0,0 @@
-# Copyright 1999-2026 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_{13..14} )
-TMPFILES_OPTIONAL=1
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=9
-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"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/glibc.asc
-
-inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing tmpfiles eapi9-ver verify-sig
-
-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://distfiles.gentoo.org/pub/proj/toolchain/glibc/patches/${P}-patches-${PATCH_VER}.tar.xz"
- SRC_URI+=" verify-sig? ( mirror://gnu/glibc/${P}.tar.xz.sig )"
-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 sframe +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
- )
- sframe? ( >=sys-devel/binutils-2.45 )
- test? (
- dev-lang/perl
- >=net-dns/libidn2-2.3.0
- sys-apps/gawk[mpfr]
- )
- verify-sig? ( sec-keys/openpgp-keys-glibc )
-"
-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
- tst-sched_setattr
-
- # Fails regularly, unreliable
- tst-valgrind-smoke
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=31877 (bug #927973)
- tst-shstk-legacy-1g
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=33239
- test-double-compoundn
- test-float-compoundn
- test-float32-compoundn
- test-float32x-compoundn
- test-float64-compoundn
-
- # Fails only in portage. Needs investigation.
- tst-setvbuf2
-)
-
-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-aarch64-pkey
- 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} ]]
-}
-
-is_linux() {
- [[ ${CTARGET} == *-linux-* ]]
-}
-
-is_hurd() {
- # Let's hope this holds for a long time
- [[ ${CTARGET} != *-linux-* ]]
-}
-
-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
- CC="${glibc__ORIG_CC}" CXX="${glibc__ORIG_CXX}" CPP="${glibc__ORIG_CPP}" \
- CFLAGS="-O2" LDFLAGS="" do_compile_test "" "$@" 2>/dev/null || return 0
- else
- ebegin "Performing simple compile test for ABI=${ABI}"
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- eend 1
- return 0
- else
- eend 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=*'
- is-flagq '-mfpmath=sse' && append-cflags -msse
- 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
-
- # 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 CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}")
- 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}/${CTARGET}-gcc"
- export CPP="${current_gcc_path}/${CTARGET}-cpp"
- export CXX="${current_gcc_path}/${CTARGET}-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}
-}
-
-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."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || 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 && ! tc-is-cross-compiler ; 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 ! [[ $(g_KV_to_int ${run_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need a kernel of at least ${want_kv}!"
- die "Kernel version too low!"
- fi
- eend 0
- 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 ! [[ $(g_KV_to_int ${build_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need linux-headers of at least ${want_kv}!"
- die "linux-headers version too low!"
- fi
- eend 0
- fi
- fi
- fi
-}
-
-upgrade_warning() {
- is_crosscompile && return
-
- if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then
- if ver_replacing -lt $(ver_cut 1-2 ${PV}); 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)"
- fi
- 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
- https://github.com/gentoo/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
- https://git.sr.ht/~sourceware/glibc
- https://gitlab.com/x86-glibc/glibc.git
- "
- EGIT_CHECKOUT_DIR=${S}
- [[ ${PV} == *.*.9999 ]] && EGIT_BRANCH=release/${PV%.*}/master
- git-r3_src_unpack
- else
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}/${P}.tar.xz" "${DISTDIR}/${P}.tar.xz.sig"
- fi
- unpack ${P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack ${P}-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
-
- case ${CTARGET} in
- m68*-aligned-*)
- einfo "Applying utmp format fix for m68k with -maligned-int"
- eapply "${FILESDIR}/glibc-2.41-m68k-malign.patch"
- ;;
- *)
- ;;
- esac
-
- 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
-
- case ${ABI}-${CTARGET} in
- amd64-x86_64-*|arm64-aarch64-*) myconf+=( $(use_enable sframe) ) ;;
- *) ;;
- 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 nonfatal emake ${myxfailparams} check
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # glibc_src_test uses nonfatal so that we can run tests for all ABIs
- # and fail at the end instead.
- foreach_abi glibc_src_test || die "tests failed"
-}
-
-# src_install
-
-run_locale_gen() {
- local fatal=$1 prefix=$2
- local user_config action config stderr noun ret
- local -a hasversion_opts localegen_args
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- hasversion_opts=( -b )
- fi
-
- if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
- localegen_args=( --prefix "${prefix}" )
- else
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
- localegen_args=( --config "${config}" --destdir "${prefix}" )
- 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- { stderr=$(locale-gen "${localegen_args[@]}" 2>&1 >&3); } 3>&1
- ret=$?
- action="ewarn"
- if (( ret == 0 )); then
- noun="warning"
- else
- noun="error"
- if (( fatal )); then
- action="die"
- fi
- fi
- # Convey warnings/errors so that they can be reseen upon emerge exiting.
- if [[ ${stderr} ]]; then
- ewarn "locale-gen(8) issued the following ${noun}s:"
- while read -r; do
- ewarn "$REPLY"
- done <<<"${stderr}"
- fi
- if (( ret != 0 )); then
- "${action}" "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
-}
-
-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
- if is_linux ; then
- 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
- else
- # we must be using hurd then
- local ldso_abi_list=(
- # x86
- amd64 /lib64/ld-x86-64.so.1
- x86 /lib/ld.so.1
- )
- fi
- 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
-
- if is_linux ; then
- # 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
- fi
-
- # On Hurd, glibc and (unpatched) gcc tend to disagree about the proper location for
- # the dynamic loader. Which is maximally stupid since this one information is hardcoded
- # into every single binary, and even if we were to fix *our* gcc it could still prevent
- # us from running binaries prepared anywhere else...
-
- if is_hurd && has amd64 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "${D}/$(alt_prefix)/lib/ld-x86-64.so.1" ]] ; then
- die "Somehow your amd64 hurd glibc installed /lib/ld-x86-64.so.1 ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ../lib64/ld-x86-64.so.1 "$(alt_prefix)/lib/ld-x86-64.so.1"
- fi
-
- if is_hurd && has x86 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "${D}/$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so" ]] ; then
- die "Somehow your x86 hurd glibc installed ld.so ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ld.so.1 "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so"
- fi
-
- # 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 1 "${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
-
- if ! use compile-locales; then
- run_locale_gen 0 "${EROOT}"
- fi
-
- # 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 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/glibc/glibc-2.43-r1.ebuild b/sys-libs/glibc/glibc-2.43-r1.ebuild
deleted file mode 100644
index 147bbf270a85..000000000000
--- a/sys-libs/glibc/glibc-2.43-r1.ebuild
+++ /dev/null
@@ -1,1896 +0,0 @@
-# Copyright 1999-2026 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_{13..14} )
-TMPFILES_OPTIONAL=1
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=2
-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"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/glibc.asc
-
-inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing tmpfiles eapi9-ver verify-sig
-
-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+=" verify-sig? ( mirror://gnu/glibc/${P}.tar.xz.sig )"
- 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 clang compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux sframe +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
- )
- sframe? ( >=sys-devel/binutils-2.45 )
- test? (
- dev-lang/perl
- >=net-dns/libidn2-2.3.0
- sys-apps/gawk[mpfr]
- )
- verify-sig? ( sec-keys/openpgp-keys-glibc )
-"
-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
- )"
-
- case ${CATEGORY} in
- *-linux*)
- DEPEND+=" ${CATEGORY}/linux-headers"
- ;;
- *-gnu)
- DEPEND+=" ${CATEGORY}/gnumach[-headers-only]"
- ;;
- esac
-else
- BDEPEND+="
- >=sys-devel/binutils-2.27
- clang? ( || ( ( >=sys-devel/gcc-6.2 )
- ( >=sys-devel/gcc-6.2 >=llvm-core/clang-18 )
- ( >=llvm-core/clang-18 >=llvm-runtimes/libgcc-18 ) ) )
- !clang? ( >=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
- tst-sched_setattr
-
- # Fails regularly, unreliable
- tst-valgrind-smoke
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=31877 (bug #927973)
- tst-shstk-legacy-1g
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=33239
- test-double-compoundn
- test-float-compoundn
- test-float32-compoundn
- test-float32x-compoundn
- test-float64-compoundn
-
- # Fails only in portage. Needs investigation.
- tst-setvbuf2
-)
-
-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-aarch64-pkey
- 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} ]]
-}
-
-is_linux() {
- [[ ${CTARGET} == *-linux-* ]]
-}
-
-is_hurd() {
- # Let's hope this holds for a long time
- [[ ${CTARGET} != *-linux-* ]]
-}
-
-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
- CC="${glibc__ORIG_CC}" CXX="${glibc__ORIG_CXX}" CPP="${glibc__ORIG_CPP}" \
- CFLAGS="-O2" LDFLAGS="" do_compile_test "" "$@" 2>/dev/null || return 0
- else
- ebegin "Performing simple compile test for ABI=${ABI}"
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- eend 1
- return 0
- else
- eend 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
-
- if is_hurd ; then
- # doesnt build with -march=native and probably other values, debugging required
- filter-flags '-march=*'
- 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
-
- # clang warns about linker flags unused during compilation, but we don't
- # want that to turn into errors!
- # Let's turn the warning off entirely since it spams.
- append-flags -Wno-unused-command-line-argument
-
- # #492892
- filter-flags -frecord-gcc-switches
-
- # #898098
- filter-flags -fno-builtin
-
- # #798774
- filter-flags -fno-semantic-interposition
-
- # #829583
- filter-lfs-flags
-
- case ${CTARGET} in
- *-linux*)
- ;;
- *-gnu)
- # -g3 confuses MIG which relies on preprocessed input
- replace-flags -ggdb[3-9] -ggdb2
- replace-flags -g3 -g
- ;;
- esac
-
- 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
-
- # 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 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="clang" or USE="custom-cflags".
- # Also, if you are 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 CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}")
- 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}/${CTARGET}-gcc"
- export CPP="${current_gcc_path}/${CTARGET}-cpp"
- export CXX="${current_gcc_path}/${CTARGET}-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
-
- # 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 CC="$(tc-getCC ${CTARGET})"
- export CXX="$(tc-getCXX ${CTARGET})"
- export CPP="$(tc-getCPP ${CTARGET})"
- export NM="$(tc-getNM ${CTARGET})"
- export READELF="$(tc-getREADELF ${CTARGET})"
-
- fi
-
- # We need to move CFLAGS with abi information into CC etc per glibc upstream
- # requirement. Keep around the original clean value to avoid appending
- # multiple ABIs on top of each other.
- 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}
-}
-
-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 is_linux && ! 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."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || 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 && ! tc-is-cross-compiler ; 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 ! [[ $(g_KV_to_int ${run_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need a kernel of at least ${want_kv}!"
- die "Kernel version too low!"
- fi
- eend 0
- 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 ! [[ $(g_KV_to_int ${build_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need linux-headers of at least ${want_kv}!"
- die "linux-headers version too low!"
- fi
- eend 0
- fi
- fi
- fi
-}
-
-upgrade_warning() {
- is_crosscompile && return
-
- if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then
- if ver_replacing -lt $(ver_cut 1-2 ${PV}); 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)"
- fi
- 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
- https://github.com/gentoo/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
- https://git.sr.ht/~sourceware/glibc
- https://gitlab.com/x86-glibc/glibc.git
- "
- EGIT_CHECKOUT_DIR=${S}
- [[ ${PV} == *.*.9999 ]] && EGIT_BRANCH=release/${PV%.*}/master
- git-r3_src_unpack
- else
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}/${P}.tar.xz" "${DISTDIR}/${P}.tar.xz.sig"
- fi
- unpack ${P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack ${P}-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."
-
- # Patches we should apply only for Hurd to be conservative
- if is_hurd ; then
- eapply "${FILESDIR}"/glibc-2.43-hurd-CLOCK_MONOTONIC.patch
- fi
- fi
-
- case ${CTARGET} in
- m68*-aligned-*)
- einfo "Applying utmp format fix for m68k with -maligned-int"
- eapply "${FILESDIR}/glibc-2.41-m68k-malign.patch"
- ;;
- *)
- ;;
- esac
-
- 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
-
- case ${ABI}-${CTARGET} in
- amd64-x86_64-*|arm64-aarch64-*) myconf+=( $(use_enable sframe) ) ;;
- *) ;;
- 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 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) )
-
- if is_crosscompile ; then
- myconf+=( --disable-systemtap )
- else
- myconf+=( $(use_enable systemtap) )
- fi
-
- # 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 nonfatal emake ${myxfailparams} check
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # glibc_src_test uses nonfatal so that we can run tests for all ABIs
- # and fail at the end instead.
- foreach_abi glibc_src_test || die "tests failed"
-}
-
-# src_install
-
-run_locale_gen() {
- local fatal=$1 prefix=$2
- local user_config action config stderr noun ret
- local -a hasversion_opts localegen_args
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- hasversion_opts=( -b )
- fi
-
- if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
- localegen_args=( --prefix "${prefix}" )
- else
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
- localegen_args=( --config "${config}" --destdir "${prefix}" )
- 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- { stderr=$(locale-gen "${localegen_args[@]}" 2>&1 >&3); } 3>&1
- ret=$?
- action="ewarn"
- if (( ret == 0 )); then
- noun="warning"
- else
- noun="error"
- if (( fatal )); then
- action="die"
- fi
- fi
- # Convey warnings/errors so that they can be reseen upon emerge exiting.
- if [[ ${stderr} ]]; then
- ewarn "locale-gen(8) issued the following ${noun}s:"
- while read -r; do
- ewarn "$REPLY"
- done <<<"${stderr}"
- fi
- if (( ret != 0 )); then
- "${action}" "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
-}
-
-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
- if is_linux ; then
- 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
- else
- # we must be using hurd then
- local ldso_abi_list=(
- # x86
- amd64 /lib64/ld-x86-64.so.1
- x86 /lib/ld.so.1
- )
- fi
- 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
-
- if is_linux ; then
- # 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
- fi
-
- # On Hurd, glibc and (unpatched) gcc tend to disagree about the proper location for
- # the dynamic loader. Which is maximally stupid since this one information is hardcoded
- # into every single binary, and even if we were to fix *our* gcc it could still prevent
- # us from running binaries prepared anywhere else...
-
- if is_hurd && has amd64 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "${D}$(alt_prefix)/lib/ld-x86-64.so.1" ]] ; then
- die "Somehow your amd64 hurd glibc installed /lib/ld-x86-64.so.1 ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ../lib64/ld-x86-64.so.1 "$(alt_prefix)/lib/ld-x86-64.so.1"
- fi
-
- if is_hurd && has x86 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "${D}$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so" ]] ; then
- die "Somehow your x86 hurd glibc installed ld.so ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ld.so.1 "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so"
- fi
-
- # 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 1 "${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
-
- if ! use compile-locales; then
- run_locale_gen 0 "${EROOT}"
- fi
-
- # 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 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/glibc/glibc-2.43-r2.ebuild b/sys-libs/glibc/glibc-2.43-r2.ebuild
deleted file mode 100644
index a08268853056..000000000000
--- a/sys-libs/glibc/glibc-2.43-r2.ebuild
+++ /dev/null
@@ -1,1901 +0,0 @@
-# Copyright 1999-2026 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_{13..14} )
-TMPFILES_OPTIONAL=1
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=3
-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"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/glibc.asc
-
-inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing tmpfiles eapi9-ver verify-sig
-
-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://distfiles.gentoo.org/pub/proj/toolchain/glibc/patches/${P}-patches-${PATCH_VER}.tar.xz"
- SRC_URI+=" verify-sig? ( mirror://gnu/glibc/${P}.tar.xz.sig )"
-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 clang compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux sframe +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
- )
- sframe? ( >=sys-devel/binutils-2.45 )
- test? (
- dev-lang/perl
- >=net-dns/libidn2-2.3.0
- sys-apps/gawk[mpfr]
- )
- verify-sig? ( sec-keys/openpgp-keys-glibc )
-"
-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
- )"
-
- case ${CATEGORY} in
- *-linux*)
- DEPEND+=" ${CATEGORY}/linux-headers"
- ;;
- *-gnu)
- DEPEND+=" ${CATEGORY}/gnumach[-headers-only]"
- ;;
- esac
-else
- BDEPEND+="
- >=sys-devel/binutils-2.27
- clang? ( || ( ( >=sys-devel/gcc-6.2 )
- ( >=sys-devel/gcc-6.2 >=llvm-core/clang-18 )
- ( >=llvm-core/clang-18 >=llvm-runtimes/libgcc-18 ) ) )
- !clang? ( >=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
- tst-sched_setattr
-
- # Fails regularly, unreliable
- tst-valgrind-smoke
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=31877 (bug #927973)
- tst-shstk-legacy-1g
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=33239
- test-double-compoundn
- test-float-compoundn
- test-float32-compoundn
- test-float32x-compoundn
- test-float64-compoundn
-
- # Fails only in portage. Needs investigation.
- tst-setvbuf2
-)
-
-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-aarch64-pkey
- 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} ]]
-}
-
-is_linux() {
- [[ ${CTARGET} == *-linux-* ]]
-}
-
-is_hurd() {
- # Let's hope this holds for a long time
- [[ ${CTARGET} != *-linux-* ]]
-}
-
-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
- CC="${glibc__ORIG_CC}" CXX="${glibc__ORIG_CXX}" CPP="${glibc__ORIG_CPP}" \
- CFLAGS="-O2" LDFLAGS="" do_compile_test "" "$@" 2>/dev/null || return 0
- else
- ebegin "Performing simple compile test for ABI=${ABI}"
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- eend 1
- return 0
- else
- eend 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=*'
- is-flagq '-mfpmath=sse' && append-cflags -msse
- 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
-
- if is_hurd ; then
- # doesnt build with -march=native and probably other values, debugging required
- filter-flags '-march=*'
- 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
-
- # clang warns about linker flags unused during compilation, but we don't
- # want that to turn into errors!
- # Let's turn the warning off entirely since it spams.
- append-flags -Wno-unused-command-line-argument
-
- # #492892
- filter-flags -frecord-gcc-switches
-
- # #898098
- filter-flags -fno-builtin
-
- # #798774
- filter-flags -fno-semantic-interposition
-
- # #829583
- filter-lfs-flags
-
- case ${CTARGET} in
- *-linux*)
- ;;
- *-gnu)
- # -g3 confuses MIG which relies on preprocessed input
- replace-flags -ggdb[3-9] -ggdb2
- replace-flags -g3 -g
- ;;
- esac
-
- 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
-
- # 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 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="clang" or USE="custom-cflags".
- # Also, if you are 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 CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}")
- 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}/${CTARGET}-gcc"
- export CPP="${current_gcc_path}/${CTARGET}-cpp"
- export CXX="${current_gcc_path}/${CTARGET}-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
-
- # 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 CC="$(tc-getCC ${CTARGET})"
- export CXX="$(tc-getCXX ${CTARGET})"
- export CPP="$(tc-getCPP ${CTARGET})"
- export NM="$(tc-getNM ${CTARGET})"
- export READELF="$(tc-getREADELF ${CTARGET})"
-
- fi
-
- # We need to move CFLAGS with abi information into CC etc per glibc upstream
- # requirement. Keep around the original clean value to avoid appending
- # multiple ABIs on top of each other.
- 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}
-}
-
-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 is_linux && ! 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."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || 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 && ! tc-is-cross-compiler ; 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 ! [[ $(g_KV_to_int ${run_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need a kernel of at least ${want_kv}!"
- die "Kernel version too low!"
- fi
- eend 0
- 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 ! [[ $(g_KV_to_int ${build_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need linux-headers of at least ${want_kv}!"
- die "linux-headers version too low!"
- fi
- eend 0
- fi
- fi
- fi
-}
-
-upgrade_warning() {
- is_crosscompile && return
-
- if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then
- if ver_replacing -lt $(ver_cut 1-2 ${PV}); 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)"
- fi
- 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
- https://github.com/gentoo/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
- https://git.sr.ht/~sourceware/glibc
- https://gitlab.com/x86-glibc/glibc.git
- "
- EGIT_CHECKOUT_DIR=${S}
- [[ ${PV} == *.*.9999 ]] && EGIT_BRANCH=release/${PV%.*}/master
- git-r3_src_unpack
- else
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}/${P}.tar.xz" "${DISTDIR}/${P}.tar.xz.sig"
- fi
- unpack ${P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack ${P}-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."
-
- # Patches we should apply only for Hurd to be conservative
- if is_hurd ; then
- eapply "${FILESDIR}"/glibc-2.43-hurd-CLOCK_MONOTONIC.patch
- fi
- fi
-
- case ${CTARGET} in
- m68*-aligned-*)
- einfo "Applying utmp format fix for m68k with -maligned-int"
- eapply "${FILESDIR}/glibc-2.41-m68k-malign.patch"
- ;;
- *)
- ;;
- esac
-
- 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
-
- case ${ABI}-${CTARGET} in
- amd64-x86_64-*|arm64-aarch64-*) myconf+=( $(use_enable sframe) ) ;;
- *) ;;
- 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 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) )
-
- if is_crosscompile ; then
- myconf+=( --disable-systemtap )
- else
- myconf+=( $(use_enable systemtap) )
- fi
-
- # 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 nonfatal emake ${myxfailparams} check
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # glibc_src_test uses nonfatal so that we can run tests for all ABIs
- # and fail at the end instead.
- foreach_abi glibc_src_test || die "tests failed"
-}
-
-# src_install
-
-run_locale_gen() {
- local fatal=$1 prefix=$2
- local user_config action config stderr noun ret
- local -a hasversion_opts localegen_args
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- hasversion_opts=( -b )
- fi
-
- if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
- localegen_args=( --prefix "${prefix}" )
- else
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
- localegen_args=( --config "${config}" --destdir "${prefix}" )
- 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- { stderr=$(locale-gen "${localegen_args[@]}" 2>&1 >&3); } 3>&1
- ret=$?
- action="ewarn"
- if (( ret == 0 )); then
- noun="warning"
- else
- noun="error"
- if (( fatal )); then
- action="die"
- fi
- fi
- # Convey warnings/errors so that they can be reseen upon emerge exiting.
- if [[ ${stderr} ]]; then
- ewarn "locale-gen(8) issued the following ${noun}s:"
- while read -r; do
- ewarn "$REPLY"
- done <<<"${stderr}"
- fi
- if (( ret != 0 )); then
- "${action}" "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
-}
-
-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
- if is_linux ; then
- 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
- else
- # we must be using hurd then
- local ldso_abi_list=(
- # x86
- amd64 /lib64/ld-x86-64.so.1
- x86 /lib/ld.so.1
- )
- fi
- 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
-
- if is_linux ; then
- # 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
- fi
-
- # On Hurd, glibc and (unpatched) gcc tend to disagree about the proper location for
- # the dynamic loader. Which is maximally stupid since this one information is hardcoded
- # into every single binary, and even if we were to fix *our* gcc it could still prevent
- # us from running binaries prepared anywhere else...
-
- if is_hurd && has amd64 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "${D}$(alt_prefix)/lib/ld-x86-64.so.1" ]] ; then
- die "Somehow your amd64 hurd glibc installed /lib/ld-x86-64.so.1 ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ../lib64/ld-x86-64.so.1 "$(alt_prefix)/lib/ld-x86-64.so.1"
- fi
-
- if is_hurd && has x86 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "${D}$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so" ]] ; then
- die "Somehow your x86 hurd glibc installed ld.so ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ld.so.1 "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so"
- fi
-
- # 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 1 "${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
-
- if ! use compile-locales; then
- run_locale_gen 0 "${EROOT}"
- fi
-
- # 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 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/glibc/glibc-2.43.ebuild b/sys-libs/glibc/glibc-2.43.ebuild
deleted file mode 100644
index 1b961e92722a..000000000000
--- a/sys-libs/glibc/glibc-2.43.ebuild
+++ /dev/null
@@ -1,1898 +0,0 @@
-# Copyright 1999-2026 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_{13..14} )
-TMPFILES_OPTIONAL=1
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=1
-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"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/glibc.asc
-
-inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing tmpfiles eapi9-ver verify-sig
-
-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+=" verify-sig? ( mirror://gnu/glibc/${P}.tar.xz.sig )"
- 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 clang compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux sframe +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
- )
- sframe? ( >=sys-devel/binutils-2.45 )
- test? (
- dev-lang/perl
- >=net-dns/libidn2-2.3.0
- sys-apps/gawk[mpfr]
- )
- verify-sig? ( sec-keys/openpgp-keys-glibc )
-"
-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
- )"
-
- case ${CATEGORY} in
- *-linux*)
- DEPEND+=" ${CATEGORY}/linux-headers"
- ;;
- *-gnu)
- DEPEND+=" ${CATEGORY}/gnumach[-headers-only]"
- ;;
- esac
-else
- BDEPEND+="
- >=sys-devel/binutils-2.27
- clang? ( || ( ( >=sys-devel/gcc-6.2 )
- ( >=sys-devel/gcc-6.2 >=llvm-core/clang-18 )
- ( >=llvm-core/clang-18 >=llvm-runtimes/libgcc-18 ) ) )
- !clang? ( >=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
- tst-sched_setattr
-
- # Fails regularly, unreliable
- tst-valgrind-smoke
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=31877 (bug #927973)
- tst-shstk-legacy-1g
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=33239
- test-double-compoundn
- test-float-compoundn
- test-float32-compoundn
- test-float32x-compoundn
- test-float64-compoundn
-
- # Fails only in portage. Needs investigation.
- tst-setvbuf2
-)
-
-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-aarch64-pkey
- 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} ]]
-}
-
-is_linux() {
- [[ ${CTARGET} == *-linux-* ]]
-}
-
-is_hurd() {
- # Let's hope this holds for a long time
- [[ ${CTARGET} != *-linux-* ]]
-}
-
-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
- CC="${glibc__ORIG_CC}" CXX="${glibc__ORIG_CXX}" CPP="${glibc__ORIG_CPP}" \
- CFLAGS="-O2" LDFLAGS="" do_compile_test "" "$@" 2>/dev/null || return 0
- else
- ebegin "Performing simple compile test for ABI=${ABI}"
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- eend 1
- return 0
- else
- eend 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
-
- if is_hurd ; then
- # doesnt build with -march=native and probably other values, debugging required
- filter-flags '-march=*'
- 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
-
- # clang warns about linker flags unused during compilation, but we don't
- # want that to turn into errors!
- # Let's turn the warning off entirely since it spams.
- append-flags -Wno-unused-command-line-argument
-
- # #492892
- filter-flags -frecord-gcc-switches
-
- # #898098
- filter-flags -fno-builtin
-
- # #798774
- filter-flags -fno-semantic-interposition
-
- # #829583
- filter-lfs-flags
-
- case ${CTARGET} in
- *-linux*)
- ;;
- *-gnu)
- # -g3 confuses MIG which relies on preprocessed input
- replace-flags -ggdb[3-9] -ggdb2
- replace-flags -g3 -g
- ;;
- esac
-
- 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
-
- # 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 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="clang" or USE="custom-cflags".
- # Also, if you are 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 CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}")
- 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}/${CTARGET}-gcc"
- export CPP="${current_gcc_path}/${CTARGET}-cpp"
- export CXX="${current_gcc_path}/${CTARGET}-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
-
- # 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 CC="$(tc-getCC ${CTARGET})"
- export CXX="$(tc-getCXX ${CTARGET})"
- export CPP="$(tc-getCPP ${CTARGET})"
- export NM="$(tc-getNM ${CTARGET})"
- export READELF="$(tc-getREADELF ${CTARGET})"
-
- fi
-
- # We need to move CFLAGS with abi information into CC etc per glibc upstream
- # requirement. Keep around the original clean value to avoid appending
- # multiple ABIs on top of each other.
- 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}
-}
-
-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."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || 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 && ! tc-is-cross-compiler ; 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 ! [[ $(g_KV_to_int ${run_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need a kernel of at least ${want_kv}!"
- die "Kernel version too low!"
- fi
- eend 0
- 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 ! [[ $(g_KV_to_int ${build_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need linux-headers of at least ${want_kv}!"
- die "linux-headers version too low!"
- fi
- eend 0
- fi
- fi
- fi
-}
-
-upgrade_warning() {
- is_crosscompile && return
-
- if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then
- if ver_replacing -lt $(ver_cut 1-2 ${PV}); 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)"
- fi
- 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
- https://github.com/gentoo/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
- https://git.sr.ht/~sourceware/glibc
- https://gitlab.com/x86-glibc/glibc.git
- "
- EGIT_CHECKOUT_DIR=${S}
- [[ ${PV} == *.*.9999 ]] && EGIT_BRANCH=release/${PV%.*}/master
- git-r3_src_unpack
- else
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}/${P}.tar.xz" "${DISTDIR}/${P}.tar.xz.sig"
- fi
- unpack ${P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack ${P}-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."
-
- # Patches we should apply only for Hurd to be conservative
- if is_hurd ; then
- eapply "${FILESDIR}"/glibc-2.43-hurd-link-helpers.patch
- eapply "${FILESDIR}"/glibc-2.43-hurd-CLOCK_MONOTONIC.patch
- eapply "${FILESDIR}"/glibc-2.43-hurd-ldconfig.patch
- fi
- fi
-
- case ${CTARGET} in
- m68*-aligned-*)
- einfo "Applying utmp format fix for m68k with -maligned-int"
- eapply "${FILESDIR}/glibc-2.41-m68k-malign.patch"
- ;;
- *)
- ;;
- esac
-
- 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
-
- case ${ABI}-${CTARGET} in
- amd64-x86_64-*|arm64-aarch64-*) myconf+=( $(use_enable sframe) ) ;;
- *) ;;
- 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 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) )
-
- if is_crosscompile ; then
- myconf+=( --disable-systemtap )
- else
- myconf+=( $(use_enable systemtap) )
- fi
-
- # 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 nonfatal emake ${myxfailparams} check
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # glibc_src_test uses nonfatal so that we can run tests for all ABIs
- # and fail at the end instead.
- foreach_abi glibc_src_test || die "tests failed"
-}
-
-# src_install
-
-run_locale_gen() {
- local fatal=$1 prefix=$2
- local user_config action config stderr noun ret
- local -a hasversion_opts localegen_args
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- hasversion_opts=( -b )
- fi
-
- if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
- localegen_args=( --prefix "${prefix}" )
- else
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
- localegen_args=( --config "${config}" --destdir "${prefix}" )
- 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- { stderr=$(locale-gen "${localegen_args[@]}" 2>&1 >&3); } 3>&1
- ret=$?
- action="ewarn"
- if (( ret == 0 )); then
- noun="warning"
- else
- noun="error"
- if (( fatal )); then
- action="die"
- fi
- fi
- # Convey warnings/errors so that they can be reseen upon emerge exiting.
- if [[ ${stderr} ]]; then
- ewarn "locale-gen(8) issued the following ${noun}s:"
- while read -r; do
- ewarn "$REPLY"
- done <<<"${stderr}"
- fi
- if (( ret != 0 )); then
- "${action}" "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
-}
-
-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
- if is_linux ; then
- 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
- else
- # we must be using hurd then
- local ldso_abi_list=(
- # x86
- amd64 /lib64/ld-x86-64.so.1
- x86 /lib/ld.so.1
- )
- fi
- 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
-
- if is_linux ; then
- # 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
- fi
-
- # On Hurd, glibc and (unpatched) gcc tend to disagree about the proper location for
- # the dynamic loader. Which is maximally stupid since this one information is hardcoded
- # into every single binary, and even if we were to fix *our* gcc it could still prevent
- # us from running binaries prepared anywhere else...
-
- if is_hurd && has amd64 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "$(alt_prefix)/lib/ld-x86-64.so.1" ]] ; then
- die "Somehow your amd64 hurd glibc installed /lib/ld-x86-64.so.1 ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ../lib64/ld-x86-64.so.1 "$(alt_prefix)/lib/ld-x86-64.so.1"
- fi
-
- if is_hurd && has x86 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so" ]] ; then
- die "Somehow your x86 hurd glibc installed ld.so ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ld.so.1 "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so"
- fi
-
- # 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 1 "${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
-
- if ! use compile-locales; then
- run_locale_gen 0 "${EROOT}"
- fi
-
- # 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 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/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
deleted file mode 100644
index 9bc371233fbb..000000000000
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ /dev/null
@@ -1,1900 +0,0 @@
-# Copyright 1999-2026 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_{13..14} )
-TMPFILES_OPTIONAL=1
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=1
-
-# 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"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/glibc.asc
-
-inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing tmpfiles eapi9-ver verify-sig
-
-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://distfiles.gentoo.org/pub/proj/toolchain/glibc/patches/${P}-patches-${PATCH_VER}.tar.xz"
- SRC_URI+=" verify-sig? ( mirror://gnu/glibc/${P}.tar.xz.sig )"
-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 clang compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux sframe +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
- )
- sframe? ( >=sys-devel/binutils-2.45 )
- test? (
- dev-lang/perl
- >=net-dns/libidn2-2.3.0
- sys-apps/gawk[mpfr]
- )
- verify-sig? ( sec-keys/openpgp-keys-glibc )
-"
-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
- )"
-
- case ${CATEGORY} in
- *-linux*)
- DEPEND+=" ${CATEGORY}/linux-headers"
- ;;
- *-gnu)
- DEPEND+=" ${CATEGORY}/gnumach[-headers-only]"
- ;;
- esac
-else
- BDEPEND+="
- >=sys-devel/binutils-2.27
- clang? ( || ( ( >=sys-devel/gcc-6.2 )
- ( >=sys-devel/gcc-6.2 >=llvm-core/clang-18 )
- ( >=llvm-core/clang-18 >=llvm-runtimes/libgcc-18 ) ) )
- !clang? ( >=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
- tst-sched_setattr
-
- # Fails regularly, unreliable
- tst-valgrind-smoke
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=31877 (bug #927973)
- tst-shstk-legacy-1g
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=33239
- test-double-compoundn
- test-float-compoundn
- test-float32-compoundn
- test-float32x-compoundn
- test-float64-compoundn
-
- # Fails only in portage. Needs investigation.
- tst-setvbuf2
-)
-
-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-aarch64-pkey
- 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} ]]
-}
-
-is_linux() {
- [[ ${CTARGET} == *-linux-* ]]
-}
-
-is_hurd() {
- # Let's hope this holds for a long time
- [[ ${CTARGET} != *-linux-* ]]
-}
-
-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
- CC="${glibc__ORIG_CC}" CXX="${glibc__ORIG_CXX}" CPP="${glibc__ORIG_CPP}" \
- CFLAGS="-O2" LDFLAGS="" do_compile_test "" "$@" 2>/dev/null || return 0
- else
- ebegin "Performing simple compile test for ABI=${ABI}"
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- eend 1
- return 0
- else
- eend 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=*'
- is-flagq '-mfpmath=sse' && append-cflags -msse
- 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
-
- if is_hurd ; then
- # doesnt build with -march=native and probably other values, debugging required
- filter-flags '-march=*'
- 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
-
- # clang warns about linker flags unused during compilation, but we don't
- # want that to turn into errors!
- # Let's turn the warning off entirely since it spams.
- append-flags -Wno-unused-command-line-argument
-
- # #492892
- filter-flags -frecord-gcc-switches
-
- # #898098
- filter-flags -fno-builtin
-
- # #798774
- filter-flags -fno-semantic-interposition
-
- # #829583
- filter-lfs-flags
-
- case ${CTARGET} in
- *-linux*)
- ;;
- *-gnu)
- # -g3 confuses MIG which relies on preprocessed input
- replace-flags -ggdb[3-9] -ggdb2
- replace-flags -g3 -g
- ;;
- esac
-
- 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
-
- # 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 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="clang" or USE="custom-cflags".
- # Also, if you are 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 CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}")
- 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}/${CTARGET}-gcc"
- export CPP="${current_gcc_path}/${CTARGET}-cpp"
- export CXX="${current_gcc_path}/${CTARGET}-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
-
- # 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 CC="$(tc-getCC ${CTARGET})"
- export CXX="$(tc-getCXX ${CTARGET})"
- export CPP="$(tc-getCPP ${CTARGET})"
- export NM="$(tc-getNM ${CTARGET})"
- export READELF="$(tc-getREADELF ${CTARGET})"
-
- fi
-
- # We need to move CFLAGS with abi information into CC etc per glibc upstream
- # requirement. Keep around the original clean value to avoid appending
- # multiple ABIs on top of each other.
- 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}
-}
-
-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 is_linux && ! 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."
- [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || 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 && ! tc-is-cross-compiler ; 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 is_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 ! [[ $(g_KV_to_int ${run_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need a kernel of at least ${want_kv}!"
- die "Kernel version too low!"
- fi
- eend 0
- 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 ! [[ $(g_KV_to_int ${build_kv}) -ge $(g_KV_to_int ${want_kv}) ]] ; then
- eend 1
- echo
- eerror "You need linux-headers of at least ${want_kv}!"
- die "linux-headers version too low!"
- fi
- eend 0
- fi
- fi
- fi
-}
-
-upgrade_warning() {
- is_crosscompile && return
-
- if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then
- if ver_replacing -lt $(ver_cut 1-2 ${PV}); 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)"
- fi
- 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
- https://github.com/gentoo/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
- https://git.sr.ht/~sourceware/glibc
- https://gitlab.com/x86-glibc/glibc.git
- "
- EGIT_CHECKOUT_DIR=${S}
- [[ ${PV} == *.*.9999 ]] && EGIT_BRANCH=release/${PV%.*}/master
- git-r3_src_unpack
- else
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}/${P}.tar.xz" "${DISTDIR}/${P}.tar.xz.sig"
- fi
- unpack ${P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack ${P}-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."
-
- # Patches we should apply only for Hurd to be conservative
- if is_hurd ; then
- eapply "${FILESDIR}"/glibc-2.43-hurd-CLOCK_MONOTONIC.patch
- fi
- fi
-
- case ${CTARGET} in
- m68*-aligned-*)
- einfo "Applying utmp format fix for m68k with -maligned-int"
- eapply "${FILESDIR}/glibc-2.41-m68k-malign.patch"
- ;;
- *)
- ;;
- esac
-
- 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
-
- case ${ABI}-${CTARGET} in
- amd64-x86_64-*|arm64-aarch64-*) myconf+=( $(use_enable sframe) ) ;;
- *) ;;
- 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 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) )
-
- if is_crosscompile ; then
- myconf+=( --disable-systemtap )
- else
- myconf+=( $(use_enable systemtap) )
- fi
-
- # 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 nonfatal emake ${myxfailparams} check
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # glibc_src_test uses nonfatal so that we can run tests for all ABIs
- # and fail at the end instead.
- foreach_abi glibc_src_test || die "tests failed"
-}
-
-# src_install
-
-run_locale_gen() {
- local fatal=$1 prefix=$2
- local user_config action config stderr noun ret
- local -a hasversion_opts localegen_args
-
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- hasversion_opts=( -b )
- fi
-
- if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
- localegen_args=( --prefix "${prefix}" )
- else
- config="${prefix}/usr/share/i18n/SUPPORTED"
- user_config="${prefix}/etc/locale.gen"
- if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
- # For USE=compile-locales, all locales should be built.
- mkdir -p -- "${prefix}/usr/lib/locale" || die
- elif locale-gen --list --config "${user_config}" | read -r; then
- config=${user_config}
- fi
- localegen_args=( --config "${config}" --destdir "${prefix}" )
- 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
- if [[ ${EMERGE_FROM} != binary ]]; then
- localegen_args+=( --jobs "$(get_makeopts_jobs)" )
- fi
-
- printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
- { stderr=$(locale-gen "${localegen_args[@]}" 2>&1 >&3); } 3>&1
- ret=$?
- action="ewarn"
- if (( ret == 0 )); then
- noun="warning"
- else
- noun="error"
- if (( fatal )); then
- action="die"
- fi
- fi
- # Convey warnings/errors so that they can be reseen upon emerge exiting.
- if [[ ${stderr} ]]; then
- ewarn "locale-gen(8) issued the following ${noun}s:"
- while read -r; do
- ewarn "$REPLY"
- done <<<"${stderr}"
- fi
- if (( ret != 0 )); then
- "${action}" "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
- fi
-}
-
-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
- if is_linux ; then
- 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
- else
- # we must be using hurd then
- local ldso_abi_list=(
- # x86
- amd64 /lib64/ld-x86-64.so.1
- x86 /lib/ld.so.1
- )
- fi
- 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
-
- if is_linux ; then
- # 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
- fi
-
- # On Hurd, glibc and (unpatched) gcc tend to disagree about the proper location for
- # the dynamic loader. Which is maximally stupid since this one information is hardcoded
- # into every single binary, and even if we were to fix *our* gcc it could still prevent
- # us from running binaries prepared anywhere else...
-
- if is_hurd && has amd64 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "${D}/$(alt_prefix)/lib/ld-x86-64.so.1" ]] ; then
- die "Somehow your amd64 hurd glibc installed /lib/ld-x86-64.so.1 ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ../lib64/ld-x86-64.so.1 "$(alt_prefix)/lib/ld-x86-64.so.1"
- fi
-
- if is_hurd && has x86 $(get_install_abis) ; then
- # First, let's check for sanity
- if [[ -f "${D}/$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so" ]] ; then
- die "Somehow your x86 hurd glibc installed ld.so ... this should not happen."
- fi
-
- # Then make a compatibility symlink.
- dosym ld.so.1 "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so"
- fi
-
- # 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 1 "${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
-
- if ! use compile-locales; then
- run_locale_gen 0 "${EROOT}"
- fi
-
- # 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 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/glibc/metadata.xml b/sys-libs/glibc/metadata.xml
deleted file mode 100644
index 36b6c9573227..000000000000
--- a/sys-libs/glibc/metadata.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
- </maintainer>
- <use>
- <flag name="cet">Enable Intel Control-flow Enforcement Technology (needs binutils 2.29 and gcc 8)</flag>
- <flag name="clang">Allow building with clang (if proper environment is set). Highly experimental. Disable to auto-force gcc usage.</flag>
- <flag name="clone3">Enable the new clone3 syscall within glibc. Can be disabled to allow compatibility with older Electron applications.</flag>
- <flag name="compile-locales">build *all* locales in src_install; this is generally meant for stage building only as it ignores /etc/locale.gen file and can be pretty slow</flag>
- <flag name="crypt">build and install libcrypt and crypt.h</flag>
- <flag name="debug">When USE=hardened, allow fortify/stack violations to dump core (SIGABRT) and not kill self (SIGKILL)</flag>
- <flag name="experimental-loong">Add experimental LoongArch patchset</flag>
- <flag name="gd">build memusage and memusagestat tools</flag>
- <flag name="hash-sysv-compat">enable sysv linker hashes in glibc for compatibility with binary software (EAC via wine/proton)</flag>
- <flag name="multiarch">enable optimizations for multiple CPU architectures (detected at runtime)</flag>
- <flag name="multilib-bootstrap">Provide prebuilt libgcc.a and crt files if missing. Only needed for ABI switch.</flag>
- <flag name="nscd">Build, and enable support for, the Name Service Cache Daemon</flag>
- <flag name="perl">Install additional scripts written in Perl</flag>
- <flag name="sframe">enable building with sframe backtrace support</flag>
- <flag name="ssp">protect stack of glibc internals</flag>
- <flag name="stack-realign">Realign the stack in the 32-bit build for compatibility with older binaries at some performance cost</flag>
- <flag name="static-pie">Enable static PIE support (runtime files for -static-pie gcc option).</flag>
- <flag name="suid">Make internal pt_chown helper setuid -- not needed if using Linux and have /dev/pts mounted with gid=5</flag>
- <flag name="systemtap">
- Enable enhanced debugging hooks/interface via SystemTap static probe points.
-
- Note that this isn't exclusive to SystemTap, despite the name. This provides
- an interface which <pkg>dev-debug/gdb</pkg> optionally uses, see
- https://sourceware.org/gdb/wiki/LinkerInterface.
- </flag>
- </use>
- <upstream>
- <remote-id type="cpe">cpe:/a:gnu:glibc</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/gpm/Manifest b/sys-libs/gpm/Manifest
deleted file mode 100644
index 15d43ff8c682..000000000000
--- a/sys-libs/gpm/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST gpm-1.20.7-docs.patch.xz 41668 BLAKE2B cab4649d0eda83c37474b68ac141fab84cbfaac4e18f0f42ad7c0a90d14bc39697b17c450e8a8dc8b1c960f6d9e7ff344ec15791df240f61a27ccfcd7d0a9171 SHA512 6cdcad70d0a77a56cb507330ff8409155de11255b5e61fb92ee439c1e117932c346df475f4187abb0e348ee4c28fa235a9693883b1c36913e91404662df272f4
-DIST gpm-1.20.7.tar.lzma 789691 BLAKE2B 5dbceedaa330d5f1ead8b2267fb5844cfd284627e085edd784a72365830a700f9a6a97f96afb4aa00a44ddbae735ef23be7eafc97a65f6250d72e15b359486c7 SHA512 a502741e2f457b47e41c6d155b1f7ef7c95384fd394503f82ddacf80cde9cdc286c906c77be12b6af8565ef1c3ab24d226379c1dcebcfcd15d64bcf3e94b63b9
diff --git a/sys-libs/gpm/files/gpm-1.20.7-gcc-10.patch b/sys-libs/gpm/files/gpm-1.20.7-gcc-10.patch
deleted file mode 100644
index a55c44fae556..000000000000
--- a/sys-libs/gpm/files/gpm-1.20.7-gcc-10.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-https://bugs.gentoo.org/705878
-https://github.com/telmich/gpm/pull/37
-
---- a/src/headers/daemon.h
-+++ b/src/headers/daemon.h
-@@ -180,7 +180,7 @@ extern struct mouse_features mouse_table[3],
- extern Gpm_Type mice[];
- extern Gpm_Type *repeated_type;
-
--time_t last_selection_time;
-+extern time_t last_selection_time;
-
-
-
diff --git a/sys-libs/gpm/files/gpm-1.20.7-gcc-include.patch b/sys-libs/gpm/files/gpm-1.20.7-gcc-include.patch
deleted file mode 100644
index 51d047c465cc..000000000000
--- a/sys-libs/gpm/files/gpm-1.20.7-gcc-include.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-https://github.com/telmich/gpm/commit/80cac2a2bd7eed7e80626559f792f37319030729
-
-From: "Desmond O. Chang" <dochang@gmail.com>
-Date: Wed, 13 Apr 2016 21:17:48 +0800
-Subject: [PATCH] Add gcc include path
-
-Close #13
---- a/src/Makefile.in
-+++ b/src/Makefile.in
-@@ -96,7 +96,7 @@ $(DEPFILE) dep: prog/gpm-root.c
-
- # create dependencies
- for DEPS in `echo *.c */*.c`; do \
-- $(CC) -I. -I $(srcdir) -M @CPPFLAGS@ $(CPPFLAGS) $$DEPS | \
-+ $(CC) -I. -I $(srcdir) -I $(srcdir)/headers -M @CPPFLAGS@ $(CPPFLAGS) $$DEPS | \
- $(SED) 's/^\(.*\)\.o\([ :]+\)/\1.o \1.lo\2/g' >> $(DEPFILE) ; done
-
- ### INSTALL
diff --git a/sys-libs/gpm/files/gpm-1.20.7-glibc-2.26.patch b/sys-libs/gpm/files/gpm-1.20.7-glibc-2.26.patch
deleted file mode 100644
index ef2de01a6d63..000000000000
--- a/sys-libs/gpm/files/gpm-1.20.7-glibc-2.26.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-https://bugs.gentoo.org/629774
---- a/src/prog/gpm-root.y 2012-10-26 17:21:38.000000000 -0400
-+++ b/src/prog/gpm-root.y 2017-09-07 20:39:51.933264063 -0400
-@@ -1197,7 +1197,7 @@
- /* reap your zombies */
- childaction.sa_handler=reap_children;
- #if defined(__GLIBC__)
-- __sigemptyset(&childaction.sa_mask);
-+ sigemptyset(&childaction.sa_mask);
- #else /* __GLIBC__ */
- childaction.sa_mask=0;
- #endif /* __GLIBC__ */
diff --git a/sys-libs/gpm/files/gpm-1.20.7-musl.patch b/sys-libs/gpm/files/gpm-1.20.7-musl.patch
deleted file mode 100644
index 37f8542a87aa..000000000000
--- a/sys-libs/gpm/files/gpm-1.20.7-musl.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-https://github.com/telmich/gpm/commit/d88fb1de5803c366ab62f7de9ee5d83207fb2afe
-https://github.com/telmich/gpm/commit/4a938233fbe6de7af05aabc74891b68d4bae40f8
-https://bugs.gentoo.org/829581
-
-From: Dima Krasner <dima@dimakrasner.com>
-Date: Wed, 12 Nov 2014 23:06:46 +0200
-Subject: [PATCH] Added musl support to libgpm and the daemon.
-
---- a/src/daemon/open_console.c
-+++ b/src/daemon/open_console.c
-@@ -21,6 +21,7 @@
-
- #include <fcntl.h> /* open and co. */
- #include <sys/stat.h> /* stat() */
-+#include <sys/types.h> /* major() */
- #include <sys/ioctl.h> /* ioctl */
-
- /* Linux specific (to be outsourced in gpm2 */
---- a/src/prog/display-buttons.c
-+++ b/src/prog/display-buttons.c
-@@ -36,6 +36,7 @@
- #include <stdio.h> /* printf() */
- #include <time.h> /* time() */
- #include <errno.h> /* errno */
-+#include <sys/select.h> /* fd_set and FD_* */
- #include <gpm.h> /* gpm information */
-
- /* display resulting data */
---- a/src/prog/display-coords.c
-+++ b/src/prog/display-coords.c
-@@ -38,6 +38,7 @@
- #include <stdio.h> /* printf() */
- #include <time.h> /* time() */
- #include <errno.h> /* errno */
-+#include <sys/select.h> /* fd_set and FD_* */
- #include <gpm.h> /* gpm information */
-
- /* display resulting data */
---- a/src/prog/gpm-root.y
-+++ b/src/prog/gpm-root.y
-@@ -1199,9 +1199,9 @@ int main(int argc, char **argv)
- #if defined(__GLIBC__)
- __sigemptyset(&childaction.sa_mask);
- #else /* __GLIBC__ */
-- childaction.sa_mask=0;
-+ sigemptyset(&childaction.sa_mask);
- #endif /* __GLIBC__ */
-- childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */
-+ childaction.sa_flags=0;
- sigaction(SIGCHLD,&childaction,NULL);
-
- /*....................................... Connect and get your buffer */
-
-From: Kurt Nalty <46026992+kurtnalty@users.noreply.github.com>
-Date: Sat, 29 Dec 2018 23:44:24 -0600
-Subject: [PATCH 1/4] Update gpm.c
-
---- a/src/daemon/gpm.c
-+++ b/src/daemon/gpm.c
-@@ -29,7 +29,7 @@
- #include <signal.h> /* SIGPIPE */
- #include <time.h> /* time() */
- #include <sys/param.h>
--#include <sys/fcntl.h> /* O_RDONLY */
-+#include <fcntl.h> /* O_RDONLY */
- #include <sys/wait.h> /* wait() */
- #include <sys/stat.h> /* mkdir() */
- #include <sys/time.h> /* timeval */
-
-From: Kurt Nalty <46026992+kurtnalty@users.noreply.github.com>
-Date: Sat, 29 Dec 2018 23:47:17 -0600
-Subject: [PATCH 2/4] Add include <string.h>
-
-Added
- line 28, #include <string.h> /* strcpy, bzero */
-for musl compilation
---- a/src/daemon/old_main.c
-+++ b/src/daemon/old_main.c
-@@ -25,6 +25,7 @@
- #include <signal.h> /* guess again */
- #include <errno.h> /* guess again */
- #include <unistd.h> /* unlink */
-+#include <string.h> /* strcpy, bzero */
- #include <sys/stat.h> /* chmod */
-
- #include <linux/kd.h> /* linux hd* */
-
-From: Kurt Nalty <46026992+kurtnalty@users.noreply.github.com>
-Date: Sat, 29 Dec 2018 23:52:58 -0600
-Subject: [PATCH 3/4] Update liblow.c for musl compatible
-
-Changed #include <sys/fcntl.h> to #include <fcntl.h>
-Changed SA_NOMASK to SA_NODEFER on lines 176, 367
---- a/src/lib/liblow.c
-+++ b/src/lib/liblow.c
-@@ -33,7 +33,7 @@
- #include <sys/types.h> /* socket() */
- #include <sys/socket.h> /* socket() */
- #include <sys/un.h> /* struct sockaddr_un */
--#include <sys/fcntl.h> /* O_RDONLY */
-+#include <fcntl.h> /* O_RDONLY */
- #include <sys/stat.h> /* stat() */
-
- #ifdef SIGTSTP /* true if BSD system */
-@@ -173,7 +173,7 @@ static void gpm_suspend_hook (int signum)
- /* Reincarnation. Prepare for another death early. */
- sigemptyset(&sa.sa_mask);
- sa.sa_handler = gpm_suspend_hook;
-- sa.sa_flags = SA_NOMASK;
-+ sa.sa_flags = SA_NODEFER;
- sigaction (SIGTSTP, &sa, 0);
-
- /* Pop the gpm stack by closing the useless connection */
-@@ -364,7 +364,7 @@ int Gpm_Open(Gpm_Connect *conn, int flag)
-
- /* if signal was originally ignored, job control is not supported */
- if (gpm_saved_suspend_hook.sa_handler != SIG_IGN) {
-- sa.sa_flags = SA_NOMASK;
-+ sa.sa_flags = SA_NODEFER;
- sa.sa_handler = gpm_suspend_hook;
- sigaction(SIGTSTP, &sa, 0);
- }
-
-From: Kurt Nalty <46026992+kurtnalty@users.noreply.github.com>
-Date: Mon, 31 Dec 2018 18:41:19 -0600
-Subject: [PATCH 4/4] Aligned comments
-
---- a/src/lib/liblow.c
-+++ b/src/lib/liblow.c
-@@ -29,11 +29,12 @@
- #include <string.h> /* strncmp */
- #include <unistd.h> /* select(); */
- #include <errno.h>
-+#include <fcntl.h> /* O_RDONLY */
-+
- #include <sys/time.h> /* timeval */
- #include <sys/types.h> /* socket() */
- #include <sys/socket.h> /* socket() */
- #include <sys/un.h> /* struct sockaddr_un */
--#include <fcntl.h> /* O_RDONLY */
- #include <sys/stat.h> /* stat() */
-
- #ifdef SIGTSTP /* true if BSD system */
diff --git a/sys-libs/gpm/files/gpm-1.20.7-signedness.patch b/sys-libs/gpm/files/gpm-1.20.7-signedness.patch
deleted file mode 100644
index 3904bfd6cca3..000000000000
--- a/sys-libs/gpm/files/gpm-1.20.7-signedness.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-https://github.com/telmich/gpm/commit/4337fd9fc2d2ea83654f2ca69245503730231ac3
-
-From: iljavs <ivansprundel@ioactive.com>
-Date: Mon, 27 Jun 2016 01:17:57 -0700
-Subject: [PATCH] fix signedness issue
-
-This commit fixes a signedness issue, where a negative vc coming from a malicious client could possibly cause memory corruption.
---- a/src/daemon/processconn.c
-+++ b/src/daemon/processconn.c
-@@ -67,7 +67,8 @@ int processConn(int fd)
- return -1;
- }
-
-- if((vc = request->vc) > MAX_VC) {
-+ vc = request->vc;
-+ if(vc > MAX_VC || vc < 0) {
- gpm_report(GPM_PR_DEBUG, GPM_MESS_REQUEST_ON, vc, MAX_VC);
- free(info);
- close(newfd);
-
diff --git a/sys-libs/gpm/files/gpm-1.20.7-sysmacros.patch b/sys-libs/gpm/files/gpm-1.20.7-sysmacros.patch
deleted file mode 100644
index d8ab2d191f7c..000000000000
--- a/sys-libs/gpm/files/gpm-1.20.7-sysmacros.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From b350aee4ea5785a75cb6ad770f6b768c506ebb70 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Mon, 14 Mar 2016 15:39:54 -0400
-Subject: [PATCH] fix building w/newer glibc
-
-Linux C libraries are looking to disentangle sysmacros.h from the
-sys/types.h include, so make sure we pull in the header when it is
-found.
----
- src/daemon/open_console.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/daemon/open_console.c b/src/daemon/open_console.c
-index 4d6c0af..6dd43e6 100644
---- a/src/daemon/open_console.c
-+++ b/src/daemon/open_console.c
-@@ -24,6 +24,10 @@
- #include <sys/types.h> /* major() */
- #include <sys/ioctl.h> /* ioctl */
-
-+#ifdef HAVE_SYS_SYSMACROS_H
-+#include <sys/sysmacros.h> /* major() w/newer glibc */
-+#endif
-+
- /* Linux specific (to be outsourced in gpm2 */
- #include <linux/serial.h> /* for serial console check */
- #include <asm/ioctls.h> /* for serial console check */
---
-2.6.2
-
diff --git a/sys-libs/gpm/files/gpm-1.20.7-warnings.patch b/sys-libs/gpm/files/gpm-1.20.7-warnings.patch
deleted file mode 100644
index 21838ee24bf5..000000000000
--- a/sys-libs/gpm/files/gpm-1.20.7-warnings.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-https://github.com/telmich/gpm/commit/dbd2e04665da885805a2c3e7dc2ee4b733d3c7cd
-https://github.com/telmich/gpm/pull/10
-https://bugs.gentoo.org/539320
-
-From 7d21d7f469d90c2d55b23926c866bba635aa7e6f Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sun, 14 Feb 2016 18:05:49 -0500
-Subject: [PATCH 1/5] report/oops: constify format strings
-
---- a/src/headers/gpm.h
-+++ b/src/headers/gpm.h
-@@ -280,10 +280,10 @@ int Gpm_GetSnapshot(Gpm_Event *ePtr);
- char *Gpm_get_console( void );
- int Gpm_x_high_y(int base, int pot_y);
- int Gpm_cnt_digits(int number);
--void gpm_oops(int line, char *file, char *text, ... );
-+void gpm_oops(int line, const char *file, const char *text, ... );
-
- /* report.c / report-lib.c */
--void gpm_report(int line, char *file, int stat, char *text, ... );
-+void gpm_report(int line, const char *file, int stat, const char *text, ... );
-
- #ifdef __cplusplus
- };
---- a/src/headers/message.h
-+++ b/src/headers/message.h
-@@ -226,7 +226,7 @@
- /* #define GPM_MESS_ "" */
-
- /* functions */
--void gpm_report(int line, char *file, int stat, char *text, ... );
-+void gpm_report(int line, const char *file, int stat, const char *text, ... );
-
- /* rest of wd.h */
- #ifdef HAVE_SYSLOG_H
---- a/src/lib/report-lib.c
-+++ b/src/lib/report-lib.c
-@@ -24,9 +24,9 @@
-
- #include "headers/message.h"
-
--void gpm_report(int line, char *file, int stat, char *text, ... )
-+void gpm_report(int line, const char *file, int stat, const char *text, ... )
- {
-- char *string = NULL;
-+ const char *string = NULL;
- int log_level;
- va_list ap;
-
---- a/src/prog/mouse-test.c
-+++ b/src/prog/mouse-test.c
-@@ -182,7 +182,7 @@ Gpm_Type *(*I_serial)(int fd, unsigned short flags, struct Gpm_Type *type,
- /*-----------------------------------------------------------------------------
- Place the description here.
- -----------------------------------------------------------------------------*/
--int mousereopen(int oldfd, char *name, Gpm_Type *type)
-+int mousereopen(int oldfd, const char *name, Gpm_Type *type)
- {
- int fd;
- if (!type) type=mice+1; /* ms */
---- a/src/report.c
-+++ b/src/report.c
-@@ -69,7 +69,7 @@
- *
- */
-
--void gpm_report(int line, char *file, int stat, char *text, ... )
-+void gpm_report(int line, const char *file, int stat, const char *text, ...)
- {
- FILE *console = NULL;
- va_list ap, ap3;
-
-From 7ba518ff8b5e5c06d0a74b1fecf3b682f14c631c Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sun, 14 Feb 2016 18:07:46 -0500
-Subject: [PATCH 2/5] report: avoid -Wformat-security warnings
-
-Some functions warn when you pass a string to a printf style function
-that is a dynamic buffer as its contents cannot be verified. Since we
-don't want to support that here, just use %s.
---- a/src/lib/report-lib.c
-+++ b/src/lib/report-lib.c
-@@ -47,7 +47,7 @@ void gpm_report(int line, const char *file, int stat, const char *text, ... )
- log_level = LOG_CRIT; break;
- }
- #ifdef HAVE_VSYSLOG
-- syslog(log_level, string);
-+ syslog(log_level, "%s", string);
- vsyslog(log_level, text, ap);
- #else
- fprintf(stderr,"%s[%s(%d)]:\n",string,file,line);
---- a/src/prog/mouse-test.c
-+++ b/src/prog/mouse-test.c
-@@ -189,7 +189,7 @@ int mousereopen(int oldfd, const char *name, Gpm_Type *type)
- close(oldfd);
- usleep(100000);
- fd=open(name,O_RDWR);
-- if (fd < 0) gpm_report(GPM_PR_OOPS,name);
-+ if (fd < 0) gpm_report(GPM_PR_OOPS, "%s", name);
- (*I_serial)(fd,type->flags,type,1,&type->name); /* ms initialization */
- return fd;
- }
-
-From c3717d54b67133fd14ce4f2166f61e529a1dcfe4 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sun, 14 Feb 2016 18:08:54 -0500
-Subject: [PATCH 3/5] update ignored file list
-
---- a/.gitignore
-+++ b/.gitignore
-@@ -11,6 +11,7 @@ Makefile
- Makefile.include
- /aclocal.m4
- /autom4te.cache
-+/config.cache
- /config.log
- /config.status
- /configure
-@@ -29,7 +30,7 @@ Makefile.include
- /src/gpm
- /src/gpm2/tmp
- /src/gpm2/out
--/src/lib/libgpm.so.*
-+/src/lib/libgpm.so*
- /src/prog/disable-paste
- /src/prog/display-buttons
- /src/prog/display-coords
-
-From 01265c7ac5f86a02a7cec323f34a3b54e5973872 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sun, 14 Feb 2016 21:02:48 -0500
-Subject: [PATCH 4/5] report/oops: add attributes to mark as printf functions
-
-This allows gcc to do printf checking on calls to these funcs to make
-sure they're being called correctly.
---- a/src/headers/gpm.h
-+++ b/src/headers/gpm.h
-@@ -280,9 +280,15 @@ int Gpm_GetSnapshot(Gpm_Event *ePtr);
- char *Gpm_get_console( void );
- int Gpm_x_high_y(int base, int pot_y);
- int Gpm_cnt_digits(int number);
-+#ifdef __GNUC__
-+__attribute__((__format__(printf, 3, 4)))
-+#endif
- void gpm_oops(int line, const char *file, const char *text, ... );
-
- /* report.c / report-lib.c */
-+#ifdef __GNUC__
-+__attribute__((__format__(printf, 4, 5)))
-+#endif
- void gpm_report(int line, const char *file, int stat, const char *text, ... );
-
- #ifdef __cplusplus
---- a/src/headers/message.h
-+++ b/src/headers/message.h
-@@ -226,6 +226,9 @@
- /* #define GPM_MESS_ "" */
-
- /* functions */
-+#ifdef __GNUC__
-+__attribute__((__format__(printf, 4, 5)))
-+#endif
- void gpm_report(int line, const char *file, int stat, const char *text, ... );
-
- /* rest of wd.h */
-
-From 85b451a188cfc8aa6233df55ec0c5dfcd203786f Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sun, 14 Feb 2016 21:08:28 -0500
-Subject: [PATCH 5/5] clean up a few unused funcs/vars
-
---- a/src/prog/gpm-root.y
-+++ b/src/prog/gpm-root.y
-@@ -443,6 +443,7 @@ void f__fix(struct passwd *pass)
- }
-
- /*---------------------------------------------------------------------*/
-+#if 0
- static int f_debug_one(FILE *f, Draw *draw)
- {
- DrawItem *ip;
-@@ -465,6 +466,7 @@ static int f_debug_one(FILE *f, Draw *draw)
- #undef LINE
- return 0;
- }
-+#endif
-
- int f_debug(int mode, DrawItem *self, int uid)
- {
-@@ -960,10 +962,8 @@ static inline void scr_dump(int fd, FILE *f, unsigned char *buffer, int vc)
- /*------------*/
- static inline void scr_restore(int fd, FILE *f, unsigned char *buffer, int vc)
- {
-- int x,y, dumpfd;
-+ int dumpfd;
- char dumpname[20];
--
-- x=buffer[2]; y=buffer[3];
-
- /* WILL NOT WORK WITH DEVFS! FIXME! */
- sprintf(dumpname,"/dev/vcsa%i",vc);
-
diff --git a/sys-libs/gpm/files/gpm.conf.d b/sys-libs/gpm/files/gpm.conf.d
deleted file mode 100644
index f21c25755b4a..000000000000
--- a/sys-libs/gpm/files/gpm.conf.d
+++ /dev/null
@@ -1,23 +0,0 @@
-# /etc/init.d/gpm
-
-# Please uncomment the type of mouse you have and the appropriate MOUSEDEV entry
-
-MOUSE=ps2
-#MOUSE=imps2
-#MOUSEDEV=/dev/psaux
-MOUSEDEV=/dev/input/mice
-
-# Extra settings
-
-#RESPONSIVENESS=
-#REPEAT_TYPE=raw
-
-# Please uncomment this line if you want gpm to understand charsets used
-# in URLs and names with ~ or : in them, etc. This is a good idea to turn on!
-
-#APPEND="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\""
-
-# Various other options, see gpm(8) manpage for more.
-
-#APPEND="-g 1 -A60"
-#APPEND="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\" -g 1 -A60"
diff --git a/sys-libs/gpm/files/gpm.rc6-2 b/sys-libs/gpm/files/gpm.rc6-2
deleted file mode 100644
index abc1323acaa9..000000000000
--- a/sys-libs/gpm/files/gpm.rc6-2
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-#NB: Config is in /etc/conf.d/gpm
-
-command=/usr/sbin/gpm
-command_args="
- -m ${MOUSEDEV}
- -t ${MOUSE}
- ${RESPONSIVENESS:+ -r ${RESPONSIVENESS}}
- ${REPEAT_TYPE:+ -R${REPEAT_TYPE}}
- ${APPEND}
-"
-
-pidfile=/var/run/gpm.pid
-
-depend() {
- need localmount
- use hotplug logger
-}
-
-start_pre() {
- if [ -z "${MOUSEDEV}" ] || [ -z "${MOUSE}" ] ; then
- eerror "You need to setup MOUSEDEV and MOUSE in /etc/conf.d/gpm first"
- return 1
- fi
-}
diff --git a/sys-libs/gpm/files/gpm.service b/sys-libs/gpm/files/gpm.service
deleted file mode 100644
index b241b2e14cdd..000000000000
--- a/sys-libs/gpm/files/gpm.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Console Mouse manager
-After=syslog.target
-
-[Service]
-ExecStart=/usr/sbin/gpm -m /dev/input/mice -t exps2
-StandardOutput=syslog
-Type=forking
-PIDFile=/run/gpm.pid
-
-[Install]
-WantedBy=multi-user.target
diff --git a/sys-libs/gpm/files/gpm.service-r1 b/sys-libs/gpm/files/gpm.service-r1
deleted file mode 100644
index 105649870aa0..000000000000
--- a/sys-libs/gpm/files/gpm.service-r1
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Console Mouse manager
-After=syslog.target
-
-[Service]
-ExecStart=/usr/sbin/gpm -m /dev/input/mice -t exps2
-Type=forking
-PIDFile=/run/gpm.pid
-
-[Install]
-WantedBy=multi-user.target
diff --git a/sys-libs/gpm/gpm-1.20.7-r6.ebuild b/sys-libs/gpm/gpm-1.20.7-r6.ebuild
deleted file mode 100644
index b2502441847b..000000000000
--- a/sys-libs/gpm/gpm-1.20.7-r6.ebuild
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools flag-o-matic linux-info systemd multilib-minimal
-
-DESCRIPTION="Console-based mouse driver"
-HOMEPAGE="https://www.nico.schottelius.org/software/gpm/"
-SRC_URI="
- https://www.nico.schottelius.org/software/${PN}/archives/${P}.tar.lzma
- https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-docs.patch.xz
-"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="selinux"
-
-RDEPEND="
- sys-libs/ncurses:=[${MULTILIB_USEDEP}]
- selinux? ( sec-policy/selinux-gpm )"
-DEPEND="${RDEPEND}"
-BDEPEND="
- app-arch/xz-utils
- sys-apps/texinfo
- app-alternatives/yacc"
-
-CONFIG_CHECK="~INPUT_MOUSEDEV"
-ERROR_INPUT_MOUSEDEV="CONFIG_INPUT_MOUSEDEV:\tis not set (required to expose mice for GPM)"
-
-pkg_pretend() {
- check_extra_config
-}
-
-src_prepare() {
- eapply "${FILESDIR}"/${P}-sysmacros.patch
-
- # Hack up the docs until we get this sorted upstream.
- # https://github.com/telmich/gpm/issues/8
- eapply "${WORKDIR}"/${P}-docs.patch
- touch -r . doc/* || die
-
- # bug #629774
- eapply "${FILESDIR}"/${P}-glibc-2.26.patch
- # bug #705878
- eapply "${FILESDIR}"/${P}-gcc-10.patch
- # bug #829581
- eapply "${FILESDIR}"/${P}-musl.patch
- #
- eapply "${FILESDIR}"/${P}-gcc-include.patch
- eapply "${FILESDIR}"/${P}-signedness.patch
- eapply "${FILESDIR}"/${P}-warnings.patch
-
- eapply_user
-
- # Fix ABI values
- sed -i \
- -e '/^abi_lev=/s:=.*:=1:' \
- -e '/^abi_age=/s:=.*:=20:' \
- configure.ac.footer || die
- # Rebuild autotools since release doesn't include them.
- # Should be fixed with the next release though.
- # https://github.com/telmich/gpm/pull/15
- sed -i -e '/ACLOCAL/,$d' autogen.sh || die
- ./autogen.sh
- eautoreconf
-
- # Out-of-tree builds are broken.
- # https://github.com/telmich/gpm/issues/16
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- # https://github.com/telmich/gpm/issues/48
- append-cflags $(test-flags-CC -std=gnu17)
-
- # bug #885323
- # src/headers/daemon.h:175:25: error: type of 'cinfo' does not match original declaration [-Werror=lto-type-mismatch]
- filter-lto
-
- # emacs support disabled due to bug #99533, bug #335900
- econf \
- --disable-static \
- --sysconfdir="${EPREFIX}"/etc/gpm \
- emacs="${BROOT}"/bin/false
-}
-
-_emake() {
- emake \
- EMACS=: ELISP="" \
- $(multilib_is_native_abi || echo "PROG= ") \
- "$@"
-}
-
-multilib_src_compile() {
- _emake
-}
-
-multilib_src_test() {
- _emake check
-}
-
-multilib_src_install() {
- _emake DESTDIR="${D}" install
-
- dosym libgpm.so.1 /usr/$(get_libdir)/libgpm.so
-}
-
-multilib_src_install_all() {
- insinto /etc/gpm
- doins conf/gpm-*.conf
-
- dodoc README TODO doc/Announce doc/FAQ doc/README*
-
- newinitd "${FILESDIR}"/gpm.rc6-2 gpm
- newconfd "${FILESDIR}"/gpm.conf.d gpm
- systemd_newunit "${FILESDIR}"/gpm.service-r1 gpm.service
-}
diff --git a/sys-libs/gpm/metadata.xml b/sys-libs/gpm/metadata.xml
deleted file mode 100644
index 938b813536bf..000000000000
--- a/sys-libs/gpm/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <upstream>
- <remote-id type="github">telmich/gpm</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/gwenhywfar/Manifest b/sys-libs/gwenhywfar/Manifest
deleted file mode 100644
index 5c15655f2825..000000000000
--- a/sys-libs/gwenhywfar/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST gwenhywfar-5.13.0.tar.gz 2748050 BLAKE2B 2fcec39a259625a1fe5e24b6d3a6d89faa7f6bfee7bdb869aba15eb31fe4298bb1af92a03cfc258f2927aeb88a86cd47a7f063f3d78f3b14f34aeda3e4e82a64 SHA512 0784a6db169d118fd95f579db6083776997a4ab79bb3aee4a08206524fc6ba9004e036ebe36685fccc65af212344f9bddaa52fea234f9916e4c2bfea7f85866c
-DIST gwenhywfar-5.14.1.tar.gz 2752957 BLAKE2B 9bea5f80099f0a3ad964e81a48f5d56ea535dbefdb57355965337251c539466704d0f0b7af1f57a691142ba79e72e6301dbdde4242d30803b4af72323d7207c8 SHA512 770a9f3aba84440526229375000b02cb938d2ccd4c75c25503e322ee717f3b738d2bdf17a1dff7f0486b37a60b0038406d336a3167c932a6336abc14d1bea6f0
diff --git a/sys-libs/gwenhywfar/gwenhywfar-5.13.0.ebuild b/sys-libs/gwenhywfar/gwenhywfar-5.13.0.ebuild
deleted file mode 100644
index 90a15e820119..000000000000
--- a/sys-libs/gwenhywfar/gwenhywfar-5.13.0.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 2021-2025 Liguros Authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=8
-
-inherit qmake-utils
-
-DESCRIPTION="Multi-platform helper library for other libraries"
-HOMEPAGE="https://www.aquamaniac.de/rdm/"
-SRC_URI="https://www.aquamaniac.de/rdm/attachments/download/550/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0/79" # correspond with libgwenhywfar.so version
-KEYWORDS="amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc x86"
-IUSE="debug gtk qt6 test"
-
-BDEPEND="
- sys-devel/gettext
- virtual/pkgconfig
-"
-DEPEND="
- dev-libs/libgcrypt:0=
- dev-libs/libgpg-error
- dev-libs/libxml2:2
-
- dev-libs/openssl:0=
- net-libs/gnutls:=
- virtual/libiconv
- virtual/libintl
- virtual/opengl
- gtk? ( x11-libs/gtk+:3 )
- qt6? (
- dev-qt/qtbase:6[concurrent,dbus,gui,network,opengl,sql,widgets,xml]
- virtual/opengl
- )
-"
-RDEPEND="${DEPEND}
- gtk? ( !<app-office/gnucash-3.7[aqbanking] )
-"
-
-# broken upstream, reported but got no reply
-RESTRICT+=" test"
-
-src_configure() {
- local myeconfargs=(
- --with-docpath="${EPREFIX}/usr/share/doc/${PF}/apidoc"
- --with-libxml2-code=yes
- $(use_enable debug)
- )
-
- local guis=()
- use gtk && guis+=( gtk3 )
- use qt6 && guis+=( qt5 ) # yes. qt5.
- QTPATHS="$(qt6_get_bindir)/qtpaths" \
- econf "${myeconfargs[@]}" "--with-guis=${guis[*]}"
-}
-
-src_compile() {
- emake
-}
-
-src_install() {
- default
- find "${D}" -name '*.la' -type f -delete || die
-}
diff --git a/sys-libs/gwenhywfar/gwenhywfar-5.14.1.ebuild b/sys-libs/gwenhywfar/gwenhywfar-5.14.1.ebuild
deleted file mode 100644
index 1f8498a2b349..000000000000
--- a/sys-libs/gwenhywfar/gwenhywfar-5.14.1.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 2021-2025 Liguros Authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=8
-
-inherit qmake-utils
-
-DESCRIPTION="Multi-platform helper library for other libraries"
-HOMEPAGE="https://www.aquamaniac.de/rdm/"
-SRC_URI="https://www.aquamaniac.de/rdm/attachments/download/630/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0/79" # correspond with libgwenhywfar.so version
-KEYWORDS="amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc x86"
-IUSE="debug gtk qt6 test"
-
-BDEPEND="
- sys-devel/gettext
- virtual/pkgconfig
-"
-DEPEND="
- dev-libs/libgcrypt:0=
- dev-libs/libgpg-error
- dev-libs/libxml2:2
-
- dev-libs/openssl:0=
- net-libs/gnutls:=
- virtual/libiconv
- virtual/libintl
- virtual/opengl
- gtk? ( x11-libs/gtk+:3 )
- qt6? (
- dev-qt/qtbase:6[concurrent,dbus,gui,network,opengl,sql,widgets,xml]
- virtual/opengl
- )
-"
-RDEPEND="${DEPEND}
- gtk? ( !<app-office/gnucash-3.7[aqbanking] )
-"
-
-# broken upstream, reported but got no reply
-RESTRICT+=" test"
-
-src_configure() {
- local myeconfargs=(
- --with-docpath="${EPREFIX}/usr/share/doc/${PF}/apidoc"
- --with-libxml2-code=yes
- $(use_enable debug)
- )
-
- local guis=()
- use gtk && guis+=( gtk3 )
- use qt6 && guis+=( qt5 ) # yes. qt5.
- QTPATHS="$(qt6_get_bindir)/qtpaths" \
- econf "${myeconfargs[@]}" "--with-guis=${guis[*]}"
-}
-
-src_compile() {
- emake
-}
-
-src_install() {
- default
- find "${D}" -name '*.la' -type f -delete || die
-}
diff --git a/sys-libs/gwenhywfar/metadata.xml b/sys-libs/gwenhywfar/metadata.xml
deleted file mode 100644
index 36acccda7221..000000000000
--- a/sys-libs/gwenhywfar/metadata.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>dev@liguros.net</email>
- <name>Development</name>
- </maintainer>
-
- <origin>ports</origin>
-</pkgmetadata> \ No newline at end of file
diff --git a/sys-libs/iceoryx/Manifest b/sys-libs/iceoryx/Manifest
deleted file mode 100644
index a103129dfec3..000000000000
--- a/sys-libs/iceoryx/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST iceoryx-2.0.3.tar.gz 1544045 BLAKE2B ce352c035fe89691425b5dcd763eb848a21f9eda6885c9bbd452d8aa9089fbb0a453557f9b40c97f1819d5c1ee8ec0fcdc5dc93f228974c7169576f090ccd83a SHA512 b860452373dc41d6b0dd0042d1fc4c97621f143d20e9354a1572126ab815ee0cec6548ddfab9fa276943ed33d9ffd8810243e67eb5fae1d11f18ef0b2b074650
diff --git a/sys-libs/iceoryx/iceoryx-2.0.3.ebuild b/sys-libs/iceoryx/iceoryx-2.0.3.ebuild
deleted file mode 100644
index b3d047620b65..000000000000
--- a/sys-libs/iceoryx/iceoryx-2.0.3.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/eclipse-iceoryx/iceoryx"
- inherit git-r3
-else
- SRC_URI="https://github.com/eclipse-iceoryx/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="Eclipse Iceoryx zero copy IPC"
-HOMEPAGE="https://iceoryx.io"
-
-LICENSE="Apache-2.0"
-SLOT="0/$(ver_cut 1-2)"
-IUSE="test doc examples ccache"
-
-# restricted because itt violates network sandbox
-# In next version wee can use GTest_DIR to skip downloading gtest from github
-RESTRICT="test"
-
-RDEPEND=(
- "doc? ( app-text/doxygen )"
- "dev-cpp/cpptoml"
- "ccache? ( dev-util/ccache )"
- )
-
-DEPEND="${RDEPEND[@]}"
-
-src_prepare() {
- CMAKE_USE_DIR=${S}/${PN}_meta
- BUILD_DIR="${S}_build"
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DBUILD_DOC= $(usex doc)
- -DBUILD_ALL=OFF
- -DBINDING_C=ON
- -DEXAMPLES=$(usex examples)
- -DBUILD_TEST=OFF
- -DCLANG_TIDY=OFF
- -DDOWNLOAD_TOML_LIB=OFF
- -DCMAKE_MODULE_PATH="/usr/lib/cmake/cpptoml"
- -DCCACHE=$(usex ccache)
- )
-
- cmake_src_configure
-}
diff --git a/sys-libs/iceoryx/iceoryx-9999.ebuild b/sys-libs/iceoryx/iceoryx-9999.ebuild
deleted file mode 100644
index baabcff6d56c..000000000000
--- a/sys-libs/iceoryx/iceoryx-9999.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/eclipse-iceoryx/iceoryx"
- inherit git-r3
-else
- SRC_URI="https://github.com/eclipse-iceoryx/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="Eclipse Iceoryx zero copy IPC"
-HOMEPAGE="https://iceoryx.io"
-
-LICENSE="Apache-2.0"
-SLOT="0/$(ver_cut 1-2)"
-IUSE="test doc examples ccache"
-RESTRICT="!test? ( test )"
-
-RDEPEND=(
- "doc? ( app-text/doxygen )"
- "dev-cpp/cpptoml"
- "ccache? ( dev-util/ccache )"
- )
-
-DEPEND="${RDEPEND[@]}"
-
-src_prepare() {
- CMAKE_USE_DIR=${S}/${PN}_meta
- BUILD_DIR="${S}_build"
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DBUILD_DOC= $(usex doc)
- -DBUILD_ALL=OFF
- -DBINDING_C=ON
- -DEXAMPLES=$(usex examples)
- -DBUILD_TEST=$(usex test)
- -DCLANG_TIDY=OFF
- -DDOWNLOAD_TOML_LIB=OFF
- -DCMAKE_MODULE_PATH="/usr/lib/cmake/cpptoml"
- -DCCACHE=$(usex ccache)
- )
-
- cmake_src_configure
-}
diff --git a/sys-libs/iceoryx/metadata.xml b/sys-libs/iceoryx/metadata.xml
deleted file mode 100644
index 1b9eff5a1990..000000000000
--- a/sys-libs/iceoryx/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="github">eclipse-iceoryx/iceoryx</remote-id>
- </upstream>
- <use>
- <flag name='ccache'>Enable ccache support</flag>
- </use>
-</pkgmetadata>
diff --git a/sys-libs/kpmcore/Manifest b/sys-libs/kpmcore/Manifest
deleted file mode 100644
index 924a5302dfb6..000000000000
--- a/sys-libs/kpmcore/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST kpmcore-25.12.3.tar.xz 670600 BLAKE2B 4b562580cd6dd39a8fab174e207fd26fbd71876038263a02a930ef0979df055cd22a42fd3b89f3cd30c98f348dfbc3ee59d2bf873a68132cc2aaebcc300d0f6e SHA512 b84d24076b4cb86aea46a89fdaaf1260916ffd56d820cc5c90f93e5bd468dd58d613ff0181ce50f90d6e8a8d69d1c741faea1b12a13402b26ce0be92a356d824
-DIST kpmcore-26.04.1.tar.xz 670968 BLAKE2B d27ddd99dcb7528729643da9883614c61e58237f8bbb34491db4be04ec795b825e68fe7d39e6bd379e23c880d182f36b06e574f38ad19846a9702621dd0ad890 SHA512 545c08843d53f2ad41e9e84a3b41b51f61caf617fb343f64b99a84881b1f83d2fa7d65b985031570072558f807f0d389bab60629e6ad715c2c2896af933ff011
diff --git a/sys-libs/kpmcore/kpmcore-25.12.3.ebuild b/sys-libs/kpmcore/kpmcore-25.12.3.ebuild
deleted file mode 100644
index 41ae12becdc4..000000000000
--- a/sys-libs/kpmcore/kpmcore-25.12.3.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-ECM_NONGUI="true"
-KFMIN=6.19.0
-QTMIN=6.10.1
-inherit ecm gear.kde.org
-
-DESCRIPTION="Library for managing partitions"
-HOMEPAGE="https://apps.kde.org/partitionmanager/"
-
-LICENSE="GPL-3"
-SLOT="6/10"
-KEYWORDS="amd64 arm64 ~loong ~ppc64 ~x86"
-IUSE=""
-
-# bug 689468, tests need polkit etc.
-RESTRICT="test"
-
-DEPEND="
- >=dev-qt/qtbase-${QTMIN}:6[dbus,gui,widgets]
- >=kde-frameworks/kcoreaddons-${KFMIN}:6
- >=kde-frameworks/ki18n-${KFMIN}:6
- >=kde-frameworks/kwidgetsaddons-${KFMIN}:6
- >=sys-apps/util-linux-2.33.2
- >=sys-auth/polkit-qt-0.175.0[qt6(+)]
-"
-RDEPEND="${DEPEND}"
-BDEPEND="virtual/pkgconfig"
diff --git a/sys-libs/kpmcore/kpmcore-26.04.1.ebuild b/sys-libs/kpmcore/kpmcore-26.04.1.ebuild
deleted file mode 100644
index 6334f780840b..000000000000
--- a/sys-libs/kpmcore/kpmcore-26.04.1.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-ECM_NONGUI="true"
-KFMIN=6.22.0
-QTMIN=6.10.1
-inherit ecm gear.kde.org
-
-DESCRIPTION="Library for managing partitions"
-HOMEPAGE="https://apps.kde.org/partitionmanager/"
-
-LICENSE="GPL-3"
-SLOT="6/10"
-KEYWORDS="amd64 arm64 ~loong ~ppc64 ~x86"
-IUSE=""
-
-# bug 689468, tests need polkit etc.
-RESTRICT="test"
-
-DEPEND="
- >=dev-qt/qtbase-${QTMIN}:6[dbus,gui,widgets]
- >=kde-frameworks/kcoreaddons-${KFMIN}:6
- >=kde-frameworks/ki18n-${KFMIN}:6
- >=kde-frameworks/kwidgetsaddons-${KFMIN}:6
- >=sys-apps/util-linux-2.33.2
- >=sys-auth/polkit-qt-0.175.0[qt6(+)]
-"
-RDEPEND="${DEPEND}"
-BDEPEND="virtual/pkgconfig"
diff --git a/sys-libs/kpmcore/metadata.xml b/sys-libs/kpmcore/metadata.xml
deleted file mode 100644
index d925f2439758..000000000000
--- a/sys-libs/kpmcore/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>kde@gentoo.org</email>
- <name>Gentoo KDE Project</name>
- </maintainer>
- <upstream>
- <bugs-to>https://bugs.kde.org/</bugs-to>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/ldb/Manifest b/sys-libs/ldb/Manifest
deleted file mode 100644
index 9466b0a011ad..000000000000
--- a/sys-libs/ldb/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST ldb-2.9.2.tar.gz 1752608 BLAKE2B c5a1e2f8ade531986ff9405dbaaa12d564f48b1839fc288b531cbfc0c832cee0d4e7c1018512cc64404d979e0c8a79d31ecde0007966f965cc17e6e2086111e6 SHA512 05f66fc32b1d7a310d7cd5f4ea9aa45902411d8f0b7cd80b00fe27d8b942fd5f60fa97b86001fc2b45937a317a95d6a7279385557b87f70fdc28d6eb010be6a4
diff --git a/sys-libs/ldb/files/ldb-1.1.31-fix_PKGCONFIGDIR-when-python-disabled.patch b/sys-libs/ldb/files/ldb-1.1.31-fix_PKGCONFIGDIR-when-python-disabled.patch
deleted file mode 100644
index c45b13feba99..000000000000
--- a/sys-libs/ldb/files/ldb-1.1.31-fix_PKGCONFIGDIR-when-python-disabled.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/wscript 2017-07-05 15:35:52.178964698 -0400
-+++ b/wscript 2017-07-05 15:49:20.137977649 -0400
-@@ -208,6 +208,14 @@
- ldb_headers = ('include/ldb.h include/ldb_errors.h '
- 'include/ldb_module.h include/ldb_handlers.h')
-
-+ # we're not currently linking against the ldap libs, but ldb.pc.in
-+ # has @LDAP_LIBS@
-+ bld.env.LDAP_LIBS = ''
-+
-+ if not 'PACKAGE_VERSION' in bld.env:
-+ bld.env.PACKAGE_VERSION = VERSION
-+ bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
-+
- bld.SAMBA_LIBRARY('ldb',
- COMMON_SRC + ' ' + LDB_MAP_SRC,
- deps='tevent LIBLDB_MAIN replace',
diff --git a/sys-libs/ldb/files/ldb-2.4.2-skip-32bit-time_t-tests.patch b/sys-libs/ldb/files/ldb-2.4.2-skip-32bit-time_t-tests.patch
deleted file mode 100644
index 70f34c5f1a58..000000000000
--- a/sys-libs/ldb/files/ldb-2.4.2-skip-32bit-time_t-tests.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 38f5e8e09a7ae641b3669068b10c6bd966e46632 Mon Sep 17 00:00:00 2001
-From: Mathieu Parent <math.parent@gmail.com>
-Date: Thu, 4 Nov 2021 22:46:15 +0100
-Subject: [PATCH] Skip failing tests (on 32-bit architectures)
-
-See https://bugzilla.samba.org/show_bug.cgi?id=14558#c17
----
- tests/python/api.py | 4 ++++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/tests/python/api.py b/tests/python/api.py
-index 8d154aa..e1de40c 100755
---- a/tests/python/api.py
-+++ b/tests/python/api.py
-@@ -44,6 +44,8 @@ class NoContextTests(TestCase):
- self.assertEqual("19700101000000.0Z", ldb.timestring(0))
- self.assertEqual("20071119191012.0Z", ldb.timestring(1195499412))
-
-+ self.skipTest('Test failing on 32-bit')
-+
- self.assertEqual("00000101000000.0Z", ldb.timestring(-62167219200))
- self.assertEqual("99991231235959.0Z", ldb.timestring(253402300799))
-
-@@ -62,6 +64,8 @@ class NoContextTests(TestCase):
- self.assertEqual(0, ldb.string_to_time("19700101000000.0Z"))
- self.assertEqual(1195499412, ldb.string_to_time("20071119191012.0Z"))
-
-+ self.skipTest('Test failing on 32-bit')
-+
- self.assertEqual(-62167219200, ldb.string_to_time("00000101000000.0Z"))
- self.assertEqual(253402300799, ldb.string_to_time("99991231235959.0Z"))
-
---
-2.30.2
-
diff --git a/sys-libs/ldb/files/ldb-2.5.2-skip-waf-tevent-check.patch b/sys-libs/ldb/files/ldb-2.5.2-skip-waf-tevent-check.patch
deleted file mode 100644
index 4578435064b0..000000000000
--- a/sys-libs/ldb/files/ldb-2.5.2-skip-waf-tevent-check.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- ldb-1.3.6/lib/tevent/wscript
-+++ ldb-1.3.6/lib/tevent/wscript
-@@ -34,8 +34,7 @@
- if conf.CHECK_BUNDLED_SYSTEM_PKG('tevent', minversion=VERSION,
- onlyif='talloc', implied_deps='replace talloc'):
- conf.define('USING_SYSTEM_TEVENT', 1)
-- if not conf.env.disable_python and \
-- conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytevent', 'tevent', minversion=VERSION):
-+ if not conf.env.disable_python:
- conf.define('USING_SYSTEM_PYTEVENT', 1)
-
- if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):
diff --git a/sys-libs/ldb/files/ldb-2.9.0-optional_packages.patch b/sys-libs/ldb/files/ldb-2.9.0-optional_packages.patch
deleted file mode 100644
index 791f49c8de6c..000000000000
--- a/sys-libs/ldb/files/ldb-2.9.0-optional_packages.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-diff -ur ldb-2.9.0/wscript ldb-2.9.0.new/wscript
---- ldb-2.9.0/wscript 2024-01-29 10:20:28.452400700 -0600
-+++ ldb-2.9.0.new/wscript 2024-04-17 10:49:58.934921251 -0500
-@@ -34,6 +34,10 @@
- opt.RECURSE('lib/tevent')
- opt.RECURSE('lib/replace')
- opt.load('python') # options for disabling pyc or pyo compilation
-+ if opt.IN_LAUNCH_DIR():
-+ opt.add_option('--disable-ldap',
-+ help=("disable ldap support"),
-+ action="store_true", dest='disable_ldap', default=False)
-
- opt.add_option('--without-ldb-lmdb',
- help='disable new LMDB backend for LDB',
-@@ -41,6 +45,10 @@
-
-
- def configure(conf):
-+ conf.env.standalone_ldb = conf.IN_LAUNCH_DIR()
-+
-+ conf.env.disable_ldap = getattr(Options.options, 'disable_ldap', False)
-+
- conf.RECURSE('lib/tdb')
- conf.RECURSE('lib/tevent')
-
-@@ -145,9 +153,12 @@
- if conf.env.standalone_ldb:
- conf.CHECK_XSLTPROC_MANPAGES()
-
-- # we need this for the ldap backend
-- if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
-- conf.env.ENABLE_LDAP_BACKEND = True
-+ if not conf.env.disable_ldap:
-+ # we need this for the ldap backend
-+ if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
-+ conf.env.ENABLE_LDAP_BACKEND = True
-+ else:
-+ conf.env.ENABLE_LDAP_BACKEND = False
-
- # we don't want any libraries or modules to rely on runtime
- # resolution of symbols
diff --git a/sys-libs/ldb/ldb-2.9.2.ebuild b/sys-libs/ldb/ldb-2.9.2.ebuild
deleted file mode 100644
index 70bf48c961a7..000000000000
--- a/sys-libs/ldb/ldb-2.9.2.ebuild
+++ /dev/null
@@ -1,175 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="threads(+)"
-inherit python-single-r1 waf-utils multilib-minimal flag-o-matic
-
-DESCRIPTION="LDAP-like embedded database"
-HOMEPAGE="https://ldb.samba.org"
-SRC_URI="https://download.samba.org/pub/${PN}/${P}.tar.gz"
-
-LICENSE="LGPL-3"
-SLOT="0/${PV}"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="doc ldap +lmdb python test"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- test? ( lmdb )"
-
-RESTRICT="!test? ( test )"
-
-TALLOC_VERSION="2.4.2"
-TDB_VERSION="1.4.10"
-TEVENT_VERSION="0.16.1"
-
-RDEPEND="
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- dev-libs/popt[${MULTILIB_USEDEP}]
- >=sys-libs/talloc-${TALLOC_VERSION}[${MULTILIB_USEDEP}]
- >=sys-libs/tdb-${TDB_VERSION}[${MULTILIB_USEDEP}]
- >=sys-libs/tevent-${TEVENT_VERSION}[${MULTILIB_USEDEP}]
- ldap? ( net-nds/openldap:= )
- lmdb? ( >=dev-db/lmdb-0.9.16:=[${MULTILIB_USEDEP}] )
- python? (
- ${PYTHON_DEPS}
- sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
- sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
- sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
- )
-"
-DEPEND="
- ${RDEPEND}
- virtual/libcrypt
- test? ( >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] )
-"
-BDEPEND="${PYTHON_DEPS}
- dev-libs/libxslt
- virtual/pkgconfig
- doc? ( app-text/doxygen )
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h )
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.9.0-optional_packages.patch
- "${FILESDIR}"/${PN}-1.1.31-fix_PKGCONFIGDIR-when-python-disabled.patch
- "${FILESDIR}"/${PN}-2.4.2-skip-32bit-time_t-tests.patch
- "${FILESDIR}"/${PN}-2.5.2-skip-waf-tevent-check.patch
-)
-
-pkg_setup() {
- # Package fails to build with distcc
- export DISTCC_DISABLE=1
- export PYTHONHASHSEED=1
-
- # waf requires a python interpreter
- python-single-r1_pkg_setup
-}
-
-check_samba_dep_versions() {
- actual_talloc_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/talloc/wscript || die)
- if [[ ${actual_talloc_version} != ${TALLOC_VERSION} ]] ; then
- eerror "Source talloc version: ${TALLOC_VERSION}"
- eerror "Ebuild talloc version: ${actual_talloc_version}"
- die "Ebuild needs to fix TALLOC_VERSION!"
- fi
-
- actual_tdb_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tdb/wscript || die)
- if [[ ${actual_tdb_version} != ${TDB_VERSION} ]] ; then
- eerror "Source tdb version: ${TDB_VERSION}"
- eerror "Ebuild tdb version: ${actual_tdb_version}"
- die "Ebuild needs to fix TDB_VERSION!"
- fi
-
- actual_tevent_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tevent/wscript || die)
- if [[ ${actual_tevent_version} != ${TEVENT_VERSION} ]] ; then
- eerror "Source tevent version: ${TEVENT_VERSION}"
- eerror "Ebuild tevent version: ${actual_tevent_version}"
- die "Ebuild needs to fix TEVENT_VERSION!"
- fi
-}
-
-src_prepare() {
- default
-
- check_samba_dep_versions
-
- if use test && ! use python ; then
- # We want to be able to run tests w/o Python as it makes
- # automated testing much easier (as USE=python isn't default-enabled).
- truncate -s0 tests/python/{repack,index,api,crash}.py || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- # When specifying libs for samba build you must append NONE to the end to
- # stop it automatically including things
- local bundled_libs="NONE"
-
- # We "use" bundled cmocka when we're not running tests as we're
- # not using it anyway. Means we avoid making users install it for
- # no reason. bug #802531
- if ! use test; then
- bundled_libs="cmocka,${bundled_libs}"
- fi
-
- local myconf=(
- $(usex ldap '' --disable-ldap)
- $(usex lmdb '' --without-ldb-lmdb)
- --disable-rpath
- --disable-rpath-install
- --with-modulesdir="${EPREFIX}"/usr/$(get_libdir)/samba
- --bundled-libraries="${bundled_libs}"
- --builtin-libraries=NONE
- )
-
- if ! use python || ! multilib_is_native_abi; then
- myconf+=( --disable-python )
- fi
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version) # bug 915199
-
- waf-utils_src_configure "${myconf[@]}"
-}
-
-multilib_src_compile() {
- waf-utils_src_compile
- multilib_is_native_abi && use doc && doxygen Doxyfile
-}
-
-multilib_src_test() {
- if multilib_is_native_abi; then
- WAF_MAKE=1 \
- PATH=buildtools/bin:../../../buildtools/bin:${PATH}:"${BUILD_DIR}"/bin/shared/private/ \
- LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"${BUILD_DIR}"/bin/shared/private/:"${BUILD_DIR}"/bin/shared \
- waf test || die
- fi
-}
-
-multilib_src_install() {
- waf-utils_src_install
-
- if multilib_is_native_abi && use doc; then
- doman apidocs/man/man3/*.3
- docinto html
- dodoc -r apidocs/html/.
- fi
-
- # bug #726454
- use python && python_optimize
-}
-
-pkg_postinst() {
- if has_version sys-auth/sssd; then
- ewarn "You have sssd installed. It is known to break after ldb upgrades,"
- ewarn "so please try to rebuild it before reporting bugs."
- ewarn "See https://bugs.gentoo.org/404281"
- fi
-}
diff --git a/sys-libs/ldb/metadata.xml b/sys-libs/ldb/metadata.xml
deleted file mode 100644
index 02e87ace94c2..000000000000
--- a/sys-libs/ldb/metadata.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>samba@gentoo.org</email>
- <name>Samba</name>
- </maintainer>
- <use>
- <flag name="doc">Builds documentation</flag>
- <flag name="ldap">Enable LDAP support</flag>
- <flag name="lmdb">Enable LMDB backend</flag>
- <flag name="python">Enable Python support</flag>
- </use>
-</pkgmetadata>
diff --git a/sys-libs/libapparmor/Manifest b/sys-libs/libapparmor/Manifest
deleted file mode 100644
index 1c541ebf7181..000000000000
--- a/sys-libs/libapparmor/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST libapparmor-v4.1.7.tar.gz 7156510 BLAKE2B a5af6b2826b6d2c7c44cf3396df089702f9b1222cc533d0027d448676dd21974020668a7fb044554ffd642aaa0baf3bf085832003bd52aeb473781cea823f399 SHA512 e33eee3390022893337c1806db92e652adda9b44150223123280a6f5cf6a1822089b796c064d490966b2cf44cd77bcd4a33945c7f677c135cf3b721b0a3bd1db
-DIST libapparmor-v5.0.0.tar.gz 7597730 BLAKE2B 406e3e81070822e2d16185c137f18ea1e7d32965c2d05efdb4199b157f596d0d978d3785c5a2cccf93436a314c3aac3d9fd2be3bb57e07411822f0985ff42987 SHA512 7963fe04cf274bf33432ec8e59c954a9509aa2e30d2735a61324defe41c7dd64a3f2d0fcec677507160ff3d4e1ab97d1316a6777f15656ffa77f8e9d42368c25
diff --git a/sys-libs/libapparmor/libapparmor-4.1.7.ebuild b/sys-libs/libapparmor/libapparmor-4.1.7.ebuild
deleted file mode 100644
index b94361d71543..000000000000
--- a/sys-libs/libapparmor/libapparmor-4.1.7.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2022-2026 Liguros Authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=8
-
-DISTUTILS_OPTIONAL=1
-GENTOO_DEPEND_ON_PERL="no"
-
-inherit autotools perl-functions
-
-MY_PV="$(ver_cut 1-2)"
-
-DESCRIPTION="Library to support AppArmor userspace utilities"
-HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home"
-SRC_URI="https://gitlab.com/apparmor/apparmor/-/archive/v${PV}/${PN}-v${PV}.tar.gz"
-
-LICENSE="GPL-2 LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
-IUSE="doc +perl static-libs"
-
-RDEPEND="perl? ( dev-lang/perl:= )"
-DEPEND="${RDEPEND}"
-BDEPEND="
- dev-build/autoconf-archive
- sys-devel/bison
- sys-devel/flex
- doc? ( dev-lang/perl )
- perl? ( dev-lang/swig )
-"
-S=${WORKDIR}/apparmor-v${PV}-9676b7aa934408748de2aaebad8680e69d7c3912/libraries/${PN}
-
-# depends on the package already being installed
-RESTRICT="test"
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable static-libs static) \
- $(use_with perl)
-}
-
-src_compile() {
- emake -C src
- emake -C include
- use doc && emake -C doc
- use perl && emake -C swig/perl
-}
-
-src_install() {
- emake DESTDIR="${D}" -C src install
- emake DESTDIR="${D}" -C include install
- use doc && emake DESTDIR="${D}" -C doc install
-
- if use perl ; then
- emake DESTDIR="${D}" -C swig/perl install
- perl_set_version
- insinto "${VENDOR_ARCH}"
- doins swig/perl/LibAppArmor.pm
-
- # bug 620886
- perl_delete_localpod
- perl_fix_packlist
- fi
-
- dodoc AUTHORS ChangeLog NEWS README
-
- find "${D}" -name '*.la' -delete || die
-}
diff --git a/sys-libs/libapparmor/libapparmor-5.0.0.ebuild b/sys-libs/libapparmor/libapparmor-5.0.0.ebuild
deleted file mode 100644
index 6583ccd7e3b6..000000000000
--- a/sys-libs/libapparmor/libapparmor-5.0.0.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2022-2026 Liguros Authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=8
-
-DISTUTILS_OPTIONAL=1
-GENTOO_DEPEND_ON_PERL="no"
-
-inherit autotools perl-functions
-
-MY_PV="$(ver_cut 1-2)"
-
-DESCRIPTION="Library to support AppArmor userspace utilities"
-HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home"
-SRC_URI="https://gitlab.com/apparmor/apparmor/-/archive/v${PV}/${PN}-v${PV}.tar.gz"
-
-LICENSE="GPL-2 LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
-IUSE="doc +perl static-libs"
-
-RDEPEND="perl? ( dev-lang/perl:= )"
-DEPEND="${RDEPEND}"
-BDEPEND="
- dev-build/autoconf-archive
- sys-devel/bison
- sys-devel/flex
- doc? ( dev-lang/perl )
- perl? ( dev-lang/swig )
-"
-S=${WORKDIR}/apparmor-v${PV}-f83432c9ffe90d81f0e52ea25089d272b4aa6db1/libraries/${PN}
-
-# depends on the package already being installed
-RESTRICT="test"
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable static-libs static) \
- $(use_with perl)
-}
-
-src_compile() {
- emake -C src
- emake -C include
- use doc && emake -C doc
- use perl && emake -C swig/perl
-}
-
-src_install() {
- emake DESTDIR="${D}" -C src install
- emake DESTDIR="${D}" -C include install
- use doc && emake DESTDIR="${D}" -C doc install
-
- if use perl ; then
- emake DESTDIR="${D}" -C swig/perl install
- perl_set_version
- insinto "${VENDOR_ARCH}"
- doins swig/perl/LibAppArmor.pm
-
- # bug 620886
- perl_delete_localpod
- perl_fix_packlist
- fi
-
- dodoc AUTHORS ChangeLog NEWS README
-
- find "${D}" -name '*.la' -delete || die
-}
diff --git a/sys-libs/libapparmor/metadata.xml b/sys-libs/libapparmor/metadata.xml
deleted file mode 100644
index a335453efda5..000000000000
--- a/sys-libs/libapparmor/metadata.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>dev@liguros.net</email>
- <name>Development</name>
- </maintainer>
- <maintainer type="person">
- <email>kensington@gentoo.org</email>
- <name>Michael Palimaka</name>
- </maintainer>
- <maintainer type="project">
- <email>hardened@gentoo.org</email>
- <name>Gentoo Hardened</name>
- </maintainer>
- <upstream>
- <remote-id type="launchpad">apparmor</remote-id>
- </upstream>
- <origin>ports</origin>
-</pkgmetadata> \ No newline at end of file
diff --git a/sys-libs/libavc1394/Manifest b/sys-libs/libavc1394/Manifest
deleted file mode 100644
index f8ff1c38869a..000000000000
--- a/sys-libs/libavc1394/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libavc1394-0.5.4.tar.gz 341679 BLAKE2B c27cf10b8769c1602488fa1a9a2536dee169e0e07185090e719946ca1da4b210aa61b37d816fb5b019d8b199b1c9285e2b212545f4332c8aad48af39c2dadf20 SHA512 ef07631cd2de9b79dec9d81247d705be318101e8f8a1fe007b946ffab3dfe7b97f392144614d867ef6b2315b6c0e82d53e915f07855d4e21401645293e18842a
diff --git a/sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild b/sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild
deleted file mode 100644
index c925d8cd5405..000000000000
--- a/sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic multilib-minimal
-
-DESCRIPTION="Library for the 1394 AV/C (Audio/Video Control) Digital Interface Command Set"
-HOMEPAGE="https://sourceforge.net/projects/libavc1394/"
-SRC_URI="https://downloads.sourceforge.net/libavc1394/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
-
-BDEPEND="virtual/pkgconfig"
-DEPEND=">=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
- elibc_musl? ( sys-libs/argp-standalone )"
-RDEPEND="${DEPEND}"
-
-multilib_src_configure() {
- # bug #713174
- use elibc_musl && append-libs -largp
-
- ECONF_SOURCE="${S}" econf --disable-static
-}
-
-multilib_src_install_all() {
- einstalldocs
- find "${D}" -name '*.la' -type f -delete || die
-}
diff --git a/sys-libs/libavc1394/metadata.xml b/sys-libs/libavc1394/metadata.xml
deleted file mode 100644
index e981a0214faa..000000000000
--- a/sys-libs/libavc1394/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<upstream>
- <remote-id type="sourceforge">libavc1394</remote-id>
-</upstream>
-</pkgmetadata>
diff --git a/sys-libs/libblockdev/Manifest b/sys-libs/libblockdev/Manifest
deleted file mode 100644
index 0ea8f6658c31..000000000000
--- a/sys-libs/libblockdev/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST libblockdev-3.3.1.tar.gz 1160139 BLAKE2B 4baf4f980df4a71faf085f9e94cd18b0eb64f3f8f0fd68c3bd20b54109709c7cd3aca26cedfa1a8ec9ae4fd44df55a5d4237c3d3fc61a58dbd5288da6f0c0189 SHA512 f9cc15bf19120a8bb77efe82889b15c9435f4c94a1ed677839a1bcfe5bd242719f40221ba2685f4376cc52ec1e8a044f93840cb504fd7574fff1a8dd5e85d477
-DIST libblockdev-3.4.0.tar.gz 1161068 BLAKE2B 330efc4792465b7fd74a6028cd90274b95333c2e3b449e0ed965eb663e59ac2e77e5fcda755a74f7a775fc217a21344440b9d18bed08bd2e6726da93187ea811 SHA512 d722ee1f41b76158b41f57ea4062adaba274c5ffdd88fa40b0b605a8557e68ba095e6a6649b8f6efeff9ad814532b5b19aa541a1688ef4b34ea23078d946c1d3
diff --git a/sys-libs/libblockdev/files/libblockdev-3.0.4-add-non-systemd-method-for-distro-info.patch b/sys-libs/libblockdev/files/libblockdev-3.0.4-add-non-systemd-method-for-distro-info.patch
deleted file mode 100644
index 0595c32b3e54..000000000000
--- a/sys-libs/libblockdev/files/libblockdev-3.0.4-add-non-systemd-method-for-distro-info.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From c05c95ac6d79544ef51b8049f6baa067060706d6 Mon Sep 17 00:00:00 2001
-From: Alfred Wingate <parona@protonmail.com>
-Date: Mon, 13 Nov 2023 16:21:44 +0200
-Subject: [PATCH] Add non-systemd method to get distro name and version
-
---- a/tests/utils.py
-+++ b/tests/utils.py
-@@ -597,11 +597,16 @@ def get_version():
- """ Try to get distro and version
- """
-
-- bus = dbus.SystemBus()
--
-- # get information about the distribution from systemd (hostname1)
-- sys_info = bus.get_object("org.freedesktop.hostname1", "/org/freedesktop/hostname1")
-- cpe = str(sys_info.Get("org.freedesktop.hostname1", "OperatingSystemCPEName", dbus_interface=dbus.PROPERTIES_IFACE))
-+ try:
-+ bus = dbus.SystemBus()
-+
-+ # get information about the distribution from systemd (hostname1)
-+ sys_info = bus.get_object("org.freedesktop.hostname1", "/org/freedesktop/hostname1")
-+ cpe = str(sys_info.Get("org.freedesktop.hostname1", "OperatingSystemCPEName", dbus_interface=dbus.PROPERTIES_IFACE))
-+ except dbus.exceptions.DBusException:
-+ import platform
-+ info = platform.freedesktop_os_release()
-+ return (info["NAME"], info["VERSION_ID"])
-
- if cpe:
- # 2nd to 4th fields from e.g. "cpe:/o:fedoraproject:fedora:25" or "cpe:/o:redhat:enterprise_linux:7.3:GA:server"
---
-2.53.0
-
diff --git a/sys-libs/libblockdev/files/libblockdev-3.3.0-fix-bashism.patch b/sys-libs/libblockdev/files/libblockdev-3.3.0-fix-bashism.patch
deleted file mode 100644
index 4157c5ba3ca4..000000000000
--- a/sys-libs/libblockdev/files/libblockdev-3.3.0-fix-bashism.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-https://github.com/storaged-project/libblockdev/pull/1111
-
-From bc1fa125aed4ba6e12a19bd00bb75be21b96f44a Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Wed, 18 Jun 2025 04:27:30 +0100
-Subject: [PATCH] configure.ac: fix bashism
-
-configure scripts run with a #!/bin/sh shebang which means they should work
-with a POSIX shell, so avoid using '+=' which is a bashism.
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -310,7 +310,7 @@ AS_IF([test "x$with_smart" != "xno"],
-
- AS_IF([test "x$with_smart" != "xno"],
- [SAVED_CFLAGS=$CFLAGS
-- CFLAGS+=" -I$drivedb_path"
-+ CFLAGS="${CFLAGS} -I$drivedb_path"
- AC_MSG_CHECKING([for drivedb.h presence])
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([
diff --git a/sys-libs/libblockdev/files/libblockdev-3.3.0-tests-nvme.patch b/sys-libs/libblockdev/files/libblockdev-3.3.0-tests-nvme.patch
deleted file mode 100644
index 19408ee943ea..000000000000
--- a/sys-libs/libblockdev/files/libblockdev-3.3.0-tests-nvme.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-https://github.com/storaged-project/libblockdev/commit/96e69ff1d60d343e64731e37c36fa5630f19295c
-
-From 96e69ff1d60d343e64731e37c36fa5630f19295c Mon Sep 17 00:00:00 2001
-From: Tomas Bzatek <tbzatek@redhat.com>
-Date: Mon, 7 Apr 2025 18:26:42 +0200
-Subject: [PATCH] tests: Fix NVMe sanitize log return codes
-
-When calling nvme_get_log_sanitize() on a namespace device through
-io_uring codepath, return codes may differ slightly. This is perfectly
-fine, subject to the kernel implementation. In this case the errno 22
-comes directly from io_uring_wait_cqe().
----
- tests/nvme_test.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/nvme_test.py b/tests/nvme_test.py
-index 2ce844c0..72dfcf4e 100644
---- a/tests/nvme_test.py
-+++ b/tests/nvme_test.py
-@@ -283,7 +283,7 @@ def test_sanitize_log(self):
- with self.assertRaisesRegex(GLib.GError, r".*Failed to open device .*': No such file or directory"):
- BlockDev.nvme_get_sanitize_log("/dev/nonexistent")
-
-- message = r"NVMe Get Log Page - Sanitize Status Log command error: Invalid Field in Command: A reserved coded value or an unsupported value in a defined field|NVMe Get Log Page - Sanitize Status Log command error: unrecognized"
-+ message = r"NVMe Get Log Page - Sanitize Status Log command error: (Invalid Field in Command: A reserved coded value or an unsupported value in a defined field|unrecognized|No such file or directory)"
- with self.assertRaisesRegex(GLib.GError, message):
- # Cannot retrieve sanitize log on a nvme target loop devices
- BlockDev.nvme_get_sanitize_log(self.nvme_dev)
-
diff --git a/sys-libs/libblockdev/files/libblockdev-3.3.0-tests-skip-vdo.patch b/sys-libs/libblockdev/files/libblockdev-3.3.0-tests-skip-vdo.patch
deleted file mode 100644
index d6a3ae77bd7b..000000000000
--- a/sys-libs/libblockdev/files/libblockdev-3.3.0-tests-skip-vdo.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-https://github.com/storaged-project/libblockdev/commit/08a78e8bb33963f0221af08cb115ecf83ecba74e
-
-From 08a78e8bb33963f0221af08cb115ecf83ecba74e Mon Sep 17 00:00:00 2001
-From: Vojtech Trefny <vtrefny@redhat.com>
-Date: Thu, 27 Feb 2025 07:42:40 +0100
-Subject: [PATCH] tests: Skip LVM VDO tests if 'vdoformat' is not available
-
-LVM VDO still uses the vdoformat binary which might not be
-available everywhere.
-
-Related: https://github.com/storaged-project/udisks/issues/1353
----
- tests/lvm_dbus_tests.py | 3 +++
- tests/lvm_test.py | 3 +++
- 2 files changed, 6 insertions(+)
-
-diff --git a/tests/lvm_dbus_tests.py b/tests/lvm_dbus_tests.py
-index 644d3587..f28e0a79 100644
---- a/tests/lvm_dbus_tests.py
-+++ b/tests/lvm_dbus_tests.py
-@@ -2116,6 +2116,9 @@ def setUpClass(cls):
- if lvm_version < Version("2.3.07"):
- raise unittest.SkipTest("LVM version 2.3.07 or newer needed for LVM VDO.")
-
-+ if not shutil.which("vdoformat"):
-+ raise unittest.SkipTest("vdoformat executable not found in $PATH, skipping.")
-+
- super().setUpClass()
-
- def setUp(self):
-diff --git a/tests/lvm_test.py b/tests/lvm_test.py
-index 038e580d..0d7fe56f 100644
---- a/tests/lvm_test.py
-+++ b/tests/lvm_test.py
-@@ -1986,6 +1986,9 @@ def setUpClass(cls):
- if lvm_version < Version("2.3.07"):
- raise unittest.SkipTest("LVM version 2.3.07 or newer needed for LVM VDO.")
-
-+ if not shutil.which("vdoformat"):
-+ raise unittest.SkipTest("vdoformat executable not found in $PATH, skipping.")
-+
- super().setUpClass()
-
- def setUp(self):
diff --git a/sys-libs/libblockdev/libblockdev-3.3.1.ebuild b/sys-libs/libblockdev/libblockdev-3.3.1.ebuild
deleted file mode 100644
index a2e033fd0127..000000000000
--- a/sys-libs/libblockdev/libblockdev-3.3.1.ebuild
+++ /dev/null
@@ -1,165 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-inherit autotools python-single-r1 xdg-utils
-
-DESCRIPTION="Library for manipulating block devices"
-HOMEPAGE="https://github.com/storaged-project/libblockdev"
-
-if [[ ${PV} == *9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/storaged-project/libblockdev.git"
- BDEPEND="
- dev-build/autoconf-archive
- "
-else
- SRC_URI="https://github.com/storaged-project/${PN}/releases/download/${PV}/${P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
-fi
-
-LICENSE="LGPL-2+"
-SLOT="0/3" # subslot is SOVERSION
-IUSE="+cryptsetup device-mapper escrow gtk-doc introspection lvm +nvme python smart test +tools"
-RESTRICT="!test? ( test )"
-
-# sys-fs/e2fsprogs: required by --with-fs
-# virtual/libudev: required at top-level
-RDEPEND="
- >=dev-libs/glib-2.42.2
- >=dev-libs/libbytesize-0.1
- sys-apps/gptfdisk
- >=sys-apps/kmod-19
- >=sys-apps/util-linux-2.30
- sys-fs/e2fsprogs:=
- virtual/libudev:=
- cryptsetup? (
- >=sys-apps/keyutils-1.5.0:=
- >=sys-fs/cryptsetup-2.7.0:=
- escrow? (
- >=dev-libs/nss-3.18.0
- dev-libs/volume_key
- )
- )
- device-mapper? ( sys-fs/lvm2 )
- lvm? (
- dev-libs/libyaml
- sys-fs/lvm2
- virtual/udev
- )
- nvme? ( >=sys-libs/libnvme-1.3:= )
- python? (
- ${PYTHON_DEPS}
- $(python_gen_cond_dep '
- dev-python/pygobject:3[${PYTHON_USEDEP}]
- ')
- )
- smart? (
- >=dev-libs/json-glib-1.0
- sys-apps/smartmontools
- )
- tools? (
- >=sys-block/parted-3.2
- )
-"
-DEPEND="${RDEPEND}"
-BDEPEND+="
- dev-build/gtk-doc-am
- gtk-doc? ( dev-util/gtk-doc )
- introspection? ( >=dev-libs/gobject-introspection-1.82.0-r2 )
- test? (
- ${PYTHON_DEPS}
- $(python_gen_cond_dep '
- dev-libs/libbytesize[python,${PYTHON_USEDEP}]
- dev-python/dbus-python[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- ')
- sys-apps/lsb-release
- sys-block/targetcli-fb
- )
-"
-
-REQUIRED_USE="
- python? ( ${PYTHON_REQUIRED_USE} )
- test? ( ${PYTHON_REQUIRED_USE} )
- escrow? ( cryptsetup )
- test? ( introspection lvm )
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.0.4-add-non-systemd-method-for-distro-info.patch"
- "${FILESDIR}/${PN}-3.3.0-fix-bashism.patch"
- "${FILESDIR}/${PN}-3.3.0-tests-skip-vdo.patch"
- "${FILESDIR}/${PN}-3.3.0-tests-nvme.patch"
-)
-
-pkg_setup() {
- if use python || use test ; then
- python-single-r1_pkg_setup
- fi
-}
-
-src_prepare() {
- default
-
- xdg_environment_reset # bug #623992
-
- # bug #744289
- find -type f \( -name "Makefile.am" -o -name "configure.ac" \) -print0 \
- | xargs --null sed "s@ -Werror@@" -i || die
-
- eautoreconf
-}
-
-src_configure() {
- local myeconfargs=(
- --with-btrfs
- --with-fs
- --with-part
- --without-mpath
- --without-nvdimm
- # dev-libs/libatasmart is inactive upstream, so we just
- # have USE=smart control sys-apps/smartmontools use.
- --without-smart
-
- $(use_enable introspection)
- $(use_enable test tests)
- $(use_with cryptsetup crypto)
- $(use_with device-mapper dm)
- $(use_with escrow)
- $(use_with gtk-doc)
- $(use_with lvm lvm)
- $(use_with lvm lvm-dbus)
- $(use_with nvme)
- $(use_with python python3)
- $(use_with smart smartmontools)
- $(use_with tools)
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_test() {
- # See http://storaged.org/libblockdev/ch03.html
- # Largest subset which doesn't require root privileges
- "${EPYTHON}" tests/run_tests.py --include-tags extradeps sourceonly || die
-}
-
-src_install() {
- default
-
- find "${ED}" -type f -name "*.la" -delete || die
-
- # This is installed even with USE=-lvm, but libbd_lvm are omitted so it
- # doesn't work at all.
- if ! use lvm ; then
- rm -f "${ED}"/usr/bin/lvm-cache-stats || die
- fi
-
- # bug #718576
- if use python ; then
- python_optimize
- fi
-}
diff --git a/sys-libs/libblockdev/libblockdev-3.4.0.ebuild b/sys-libs/libblockdev/libblockdev-3.4.0.ebuild
deleted file mode 100644
index 1cd12d6ae253..000000000000
--- a/sys-libs/libblockdev/libblockdev-3.4.0.ebuild
+++ /dev/null
@@ -1,162 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-inherit autotools python-single-r1 xdg-utils
-
-DESCRIPTION="Library for manipulating block devices"
-HOMEPAGE="https://github.com/storaged-project/libblockdev"
-
-if [[ ${PV} == *9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/storaged-project/libblockdev.git"
- BDEPEND="
- dev-build/autoconf-archive
- "
-else
- SRC_URI="https://github.com/storaged-project/${PN}/releases/download/${PV}/${P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
-fi
-
-LICENSE="LGPL-2+"
-SLOT="0/3" # subslot is SOVERSION
-IUSE="+cryptsetup device-mapper escrow gtk-doc introspection lvm +nvme python smart test +tools"
-RESTRICT="!test? ( test )"
-
-# sys-fs/e2fsprogs: required by --with-fs
-# virtual/libudev: required at top-level
-RDEPEND="
- >=dev-libs/glib-2.42.2
- >=dev-libs/libbytesize-0.1
- sys-apps/gptfdisk
- >=sys-apps/kmod-19
- >=sys-apps/util-linux-2.30
- sys-fs/e2fsprogs:=
- virtual/libudev:=
- cryptsetup? (
- >=sys-apps/keyutils-1.5.0:=
- >=sys-fs/cryptsetup-2.8.0:=
- escrow? (
- >=dev-libs/nss-3.18.0
- dev-libs/volume_key
- )
- )
- device-mapper? ( sys-fs/lvm2 )
- lvm? (
- dev-libs/libyaml
- sys-fs/lvm2
- virtual/udev
- )
- nvme? ( >=sys-libs/libnvme-1.3:= )
- python? (
- ${PYTHON_DEPS}
- $(python_gen_cond_dep '
- dev-python/pygobject:3[${PYTHON_USEDEP}]
- ')
- )
- smart? (
- >=dev-libs/json-glib-1.0
- sys-apps/smartmontools
- )
- tools? (
- >=sys-block/parted-3.2
- )
-"
-DEPEND="${RDEPEND}"
-BDEPEND+="
- dev-build/gtk-doc-am
- gtk-doc? ( dev-util/gtk-doc )
- introspection? ( >=dev-libs/gobject-introspection-1.82.0-r2 )
- test? (
- ${PYTHON_DEPS}
- $(python_gen_cond_dep '
- dev-libs/libbytesize[python,${PYTHON_USEDEP}]
- dev-python/dbus-python[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- ')
- sys-apps/lsb-release
- sys-block/targetcli-fb
- )
-"
-
-REQUIRED_USE="
- python? ( ${PYTHON_REQUIRED_USE} )
- test? ( ${PYTHON_REQUIRED_USE} )
- escrow? ( cryptsetup )
- test? ( introspection lvm )
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.0.4-add-non-systemd-method-for-distro-info.patch"
-)
-
-pkg_setup() {
- if use python || use test ; then
- python-single-r1_pkg_setup
- fi
-}
-
-src_prepare() {
- default
-
- xdg_environment_reset # bug #623992
-
- # bug #744289
- find -type f \( -name "Makefile.am" -o -name "configure.ac" \) -print0 \
- | xargs --null sed "s@ -Werror@@" -i || die
-
- eautoreconf
-}
-
-src_configure() {
- local myeconfargs=(
- --with-btrfs
- --with-fs
- --with-part
- --without-mpath
- --without-nvdimm
- # dev-libs/libatasmart is inactive upstream, so we just
- # have USE=smart control sys-apps/smartmontools use.
- --without-smart
-
- $(use_enable introspection)
- $(use_enable test tests)
- $(use_with cryptsetup crypto)
- $(use_with device-mapper dm)
- $(use_with escrow)
- $(use_with gtk-doc)
- $(use_with lvm lvm)
- $(use_with lvm lvm-dbus)
- $(use_with nvme)
- $(use_with python python3)
- $(use_with smart smartmontools)
- $(use_with tools)
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_test() {
- # See http://storaged.org/libblockdev/ch03.html
- # Largest subset which doesn't require root privileges
- "${EPYTHON}" tests/run_tests.py --include-tags extradeps sourceonly || die
-}
-
-src_install() {
- default
-
- find "${ED}" -type f -name "*.la" -delete || die
-
- # This is installed even with USE=-lvm, but libbd_lvm are omitted so it
- # doesn't work at all.
- if ! use lvm ; then
- rm -f "${ED}"/usr/bin/lvm-cache-stats || die
- fi
-
- # bug #718576
- if use python ; then
- python_optimize
- fi
-}
diff --git a/sys-libs/libblockdev/metadata.xml b/sys-libs/libblockdev/metadata.xml
deleted file mode 100644
index 487b0fb60f49..000000000000
--- a/sys-libs/libblockdev/metadata.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <use>
- <flag name="cryptsetup">Enable <pkg>sys-fs/cryptsetup</pkg> support</flag>
- <flag name="device-mapper">Enable support for device-mapper from <pkg>sys-fs/lvm2</pkg></flag>
- <flag name="escrow">Support for building crypto plugin with escrow device support</flag>
- <flag name="lvm">Enable support for Logical Volume Management via <pkg>sys-fs/lvm2</pkg>.</flag>
- <flag name="nvme">Add nvme support via <pkg>sys-libs/libnvme</pkg></flag>
- <flag name="smart">Add SMART support via <pkg>sys-apps/smartmontools</pkg></flag>
- <flag name="tools">Build tools</flag>
- </use>
- <upstream>
- <remote-id type="github">storaged-project/libblockdev</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libcap-ng/Manifest b/sys-libs/libcap-ng/Manifest
deleted file mode 100644
index 9ca1185fb6c8..000000000000
--- a/sys-libs/libcap-ng/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST libcap-ng-0.8.5.tar.gz 460149 BLAKE2B ce0fc4ebceaa66d6f888f8b752e501bed7513d45231425054340016a6215ce52f0cd81b3a4a54c7c9ec0b623965002d66316c6c37844f0bd132b186ff7c6a41f SHA512 89fb86454847f354c012411ecdc7e17f07bb40d7e9719ca0b93ea81c436113685bbbb5c1b9cb1b7ac92d216c105c687285304135beb156aedd55ab1c61e4f269
-DIST libcap-ng-0.9.3.tar.gz 126257 BLAKE2B 8050f69c91a8c5214d718d3ad750cf50db25690b9b8d59f37db32d33d5a0fe864afe8064ca4261f27f49f65064926c816a627a9c1c7a28e268a1a459409c59d8 SHA512 cbe6e322a6349dcd2b23833c4f66a173d5d8d36ccded782e79fa8b83a1a700da293e0a79a31408814f19cf788fd56726beb587f51314a92c135e05eb2e5a47e2
diff --git a/sys-libs/libcap-ng/files/libcap-ng-0.8.5-python.patch b/sys-libs/libcap-ng/files/libcap-ng-0.8.5-python.patch
deleted file mode 100644
index ddad5ff49d7a..000000000000
--- a/sys-libs/libcap-ng/files/libcap-ng-0.8.5-python.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-https://github.com/stevegrubb/libcap-ng/commit/1fe7c1cfeea00ba4eb903fbb39b74361594d4835
-
-From 1fe7c1cfeea00ba4eb903fbb39b74361594d4835 Mon Sep 17 00:00:00 2001
-From: Jan Palus <jpalus@fastmail.com>
-Date: Wed, 10 Apr 2024 21:30:51 +0200
-Subject: [PATCH] Fix python path when invoking py-compile (#54)
-
-48eebb2 replaced custom PYTHON3 variable with PYTHON by using standard
-AM_PATH_PYTHON macro. Makefile however still referred to old one.
-There's no need to set PYTHON explicitly anymore so drop it.
-
-Fixes #53
---- a/bindings/python3/Makefile.am
-+++ b/bindings/python3/Makefile.am
-@@ -27,7 +27,6 @@ AM_CPPFLAGS = -I. -I$(top_builddir) $(PYTHON3_INCLUDES)
- LIBS = ${top_builddir}/src/libcap-ng.la
- SWIG_FLAGS = -python
- SWIG_INCLUDES = ${AM_CPPFLAGS}
--PYTHON = $(PYTHON3)
- pyexec_PYTHON = capng.py
- pyexec_LTLIBRARIES = _capng.la
- pyexec_SOLIBRARIES = _capng.so
-
diff --git a/sys-libs/libcap-ng/files/libcap-ng-0.9.3-audit-out-of-source-build.patch b/sys-libs/libcap-ng/files/libcap-ng-0.9.3-audit-out-of-source-build.patch
deleted file mode 100644
index a5eb90d31055..000000000000
--- a/sys-libs/libcap-ng/files/libcap-ng-0.9.3-audit-out-of-source-build.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://github.com/stevegrubb/libcap-ng/pull/73
-
-From 704a4d311ccc8e34446e25bcb6afbd1541879d2c Mon Sep 17 00:00:00 2001
-Message-ID: <704a4d311ccc8e34446e25bcb6afbd1541879d2c.1775906446.git.sam@gentoo.org>
-From: Sam James <sam@gentoo.org>
-Date: Sat, 11 Apr 2026 12:18:39 +0100
-Subject: [PATCH] cap-audit: fix out-of-source builds
-
-With an out-of-source build, bpftool puts the generated vmlinux.h in
-the build directory, not the source directory, so we need to tell
-Clang where to find it.
----
- utils/cap-audit/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/utils/cap-audit/Makefile.am b/utils/cap-audit/Makefile.am
-index dd2e403..3c04493 100644
---- a/utils/cap-audit/Makefile.am
-+++ b/utils/cap-audit/Makefile.am
-@@ -20,7 +20,7 @@
- SUBDIRS = test
- DIST_SUBDIRS = test
-
--AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/src ${LIBBPF_CFLAGS} ${LIBAUDIT_CFLAGS}
-+AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/src -I$(top_builddir)/utils/cap-audit ${LIBBPF_CFLAGS} ${LIBAUDIT_CFLAGS}
- AM_CFLAGS = -W -Wall -Wshadow ${WFLAGS} -Wundef -D_GNU_SOURCE
-
- if BUILD_CAP_AUDIT
---
-2.53.0
-
diff --git a/sys-libs/libcap-ng/libcap-ng-0.8.5.ebuild b/sys-libs/libcap-ng/libcap-ng-0.8.5.ebuild
deleted file mode 100644
index 522195e3cc1f..000000000000
--- a/sys-libs/libcap-ng/libcap-ng-0.8.5.ebuild
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Keep an eye on Fedora's packaging (https://src.fedoraproject.org/rpms/libcap-ng/tree/rawhide) for patches
-# Same maintainer in Fedora as upstream
-PYTHON_COMPAT=( python3_{13..14} )
-inherit autotools dot-a flag-o-matic out-of-source-utils python-r1
-
-DESCRIPTION="POSIX 1003.1e capabilities"
-HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/"
-SRC_URI="https://people.redhat.com/sgrubb/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2+ LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="python static-libs"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="python? ( ${PYTHON_DEPS} )"
-DEPEND="
- ${RDEPEND}
- sys-kernel/linux-headers
-"
-BDEPEND="python? ( >=dev-lang/swig-2 )"
-
-PATCHES=(
- "${FILESDIR}"/${P}-python.patch
-)
-
-src_prepare() {
- default
-
- eautoreconf
-}
-
-src_configure() {
- use sparc && replace-flags -O? -O0
-
- # bug #960469
- use static-libs && lto-guarantee-fat
-
- local ECONF_SOURCE="${S}"
-
- local myconf=(
- $(use_enable static-libs static)
- --with-capability_header="${ESYSROOT}"/usr/include/linux/capability.h
- )
-
- local pythonconf=(
- --without-python3
- )
-
- # Set up python bindings build(s)
- if use python ; then
- setup_python_flags_configure() {
- pythonconf=(
- --with-python3
- )
-
- run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}"
- }
-
- python_foreach_impl setup_python_flags_configure
- else
- local BUILD_DIR="${WORKDIR}"/build
- run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}"
- fi
-}
-
-src_compile() {
- if use python ; then
- python_foreach_impl run_in_build_dir emake
- else
- local BUILD_DIR="${WORKDIR}"/build
- emake -C "${BUILD_DIR}"
- fi
-}
-
-src_test() {
- if [[ "${EUID}" -eq 0 ]] ; then
- ewarn "Skipping tests due to root permissions."
- return
- fi
-
- if use python ; then
- python_foreach_impl run_in_build_dir emake check
- else
- local BUILD_DIR="${WORKDIR}"/build
- emake -C "${BUILD_DIR}" check
- fi
-}
-
-src_install() {
- if use python ; then
- python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
- else
- local BUILD_DIR="${WORKDIR}"/build
- emake -C "${BUILD_DIR}" DESTDIR="${D}" install
- fi
-
- # bug #960469
- use static-libs && strip-lto-bytecode
-
- find "${ED}" -name '*.la' -delete || die
-}
diff --git a/sys-libs/libcap-ng/libcap-ng-0.9.3.ebuild b/sys-libs/libcap-ng/libcap-ng-0.9.3.ebuild
deleted file mode 100644
index fb4e213d53e4..000000000000
--- a/sys-libs/libcap-ng/libcap-ng-0.9.3.ebuild
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Keep an eye on Fedora's packaging (https://src.fedoraproject.org/rpms/libcap-ng/tree/rawhide) for patches
-# Same maintainer in Fedora as upstream
-PYTHON_COMPAT=( python3_{13..14} )
-inherit autotools dot-a flag-o-matic linux-info out-of-source-utils python-r1
-
-DESCRIPTION="POSIX 1003.1e capabilities"
-HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/"
-SRC_URI="https://github.com/stevegrubb/libcap-ng/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2+ LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="bpf deprecated python static-libs"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- bpf? (
- dev-libs/libbpf:=
- sys-process/audit
- )
- python? ( ${PYTHON_DEPS} )
-"
-DEPEND="
- ${RDEPEND}
- sys-kernel/linux-headers
- bpf? ( dev-util/bpftool )
-"
-BDEPEND="
- bpf? (
- llvm-core/clang[llvm_targets_BPF(-)]
- virtual/pkgconfig
- )
- python? ( >=dev-lang/swig-2 )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-0.9.3-audit-out-of-source-build.patch
-)
-
-pkg_pretend() {
- # bug 972898
- if use bpf && [[ ${MERGE_TYPE} != binary ]] ; then
- if [[ ! -f /sys/kernel/btf/vmlinux ]] ; then
- local err="Cannot read /sys/kernel/btf/vmlinux, which is required by bpftool.\n"
- err+=" Typically this means that your kernel is missing the DEBUG_INFO_BTF option,\n"
- err+=" without which BPF cannot work. Please build with USE=-bpf or reconfigure your kernel."
- die "${err}"
- fi
-
- # check required kernel flags as documented at:
- # https://github.com/stevegrubb/libcap-ng/blob/master/README.md
- local CONFIG_CHECK="
- ~BPF
- ~BPF_SYSCALL
- ~BPF_EVENTS
- ~DEBUG_INFO_BTF
- ~FTRACE_SYSCALLS
- ~KPROBES
- ~KRETPROBES
- ~KPROBE_EVENTS
- ~PERF_EVENTS
- ~STACKTRACE
- ~TRACEPOINTS
- ~TRACING
- "
-
- linux-info_pkg_setup
- fi
-}
-
-src_prepare() {
- default
-
- eautoreconf
-}
-
-src_configure() {
- use sparc && replace-flags -O? -O0
-
- # bug #960469
- use static-libs && lto-guarantee-fat
-
- local ECONF_SOURCE="${S}"
-
- local myconf=(
- $(use_enable bpf cap-audit)
- $(use_enable deprecated)
- $(use_enable static-libs static)
- --with-capability_header="${ESYSROOT}"/usr/include/linux/capability.h
- )
-
- local pythonconf=(
- --without-python3
- )
-
- # Set up python bindings build(s)
- if use python ; then
- setup_python_flags_configure() {
- pythonconf=(
- --with-python3
- )
-
- run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}"
- }
-
- python_foreach_impl setup_python_flags_configure
- else
- local BUILD_DIR="${WORKDIR}"/build
- run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}"
- fi
-}
-
-src_compile() {
- if use python ; then
- python_foreach_impl run_in_build_dir emake
- else
- local BUILD_DIR="${WORKDIR}"/build
- emake -C "${BUILD_DIR}"
- fi
-}
-
-src_test() {
- if [[ "${EUID}" -eq 0 ]] ; then
- ewarn "Skipping tests due to root permissions."
- return
- fi
-
- if use python ; then
- python_foreach_impl run_in_build_dir emake check
- else
- local BUILD_DIR="${WORKDIR}"/build
- emake -C "${BUILD_DIR}" check
- fi
-}
-
-src_install() {
- if use python ; then
- python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
- else
- local BUILD_DIR="${WORKDIR}"/build
- emake -C "${BUILD_DIR}" DESTDIR="${D}" install
- fi
-
- # bug #960469
- use static-libs && strip-lto-bytecode
-
- find "${ED}" -name '*.la' -delete || die
-}
diff --git a/sys-libs/libcap-ng/metadata.xml b/sys-libs/libcap-ng/metadata.xml
deleted file mode 100644
index 872220c1010f..000000000000
--- a/sys-libs/libcap-ng/metadata.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <longdescription>
- The libcap-ng library is intended to make programming with POSIX
- capabilities much easier than the traditional libcap library. It includes
- utilities that can analyse all currently running applications and print
- out any capabilities and whether or not it has an open ended bounding set.
- </longdescription>
- <use>
- <flag name="bpf">
- Install cap-audit utility which uses the extended Berkeley
- Packet Filter (eBPF).
- </flag>
- <flag name="deprecated">
- Install deprecated captest utility.
- </flag>
- </use>
- <upstream>
- <remote-id type="cpe">cpe:/a:libcap-ng_project:libcap-ng</remote-id>
- <remote-id type="github">stevegrubb/libcap-ng</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest
deleted file mode 100644
index c003059c3c65..000000000000
--- a/sys-libs/libcap/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libcap-2.78.tar.xz 201040 BLAKE2B 60b1afed4df471e9bbb631deca850920408710fb166335d5640feadf5e2feced0bccae10ba4010eca0dfb0cbb5cd41e255c2e4ac232dc3d18b7d269df9f1e72a SHA512 a156a8708dd59f13400f701f4e1ddc81f915fe4e7b32f93a328f7d6f030b7a004fb985fa9ac60812dfffeb8ad860d2e1f59895485497350250efd9378682626b
diff --git a/sys-libs/libcap/files/libcap-2.62-ignore-RAISE_SETFCAP-install-failures.patch b/sys-libs/libcap/files/libcap-2.62-ignore-RAISE_SETFCAP-install-failures.patch
deleted file mode 100644
index bd1c22fcad5a..000000000000
--- a/sys-libs/libcap/files/libcap-2.62-ignore-RAISE_SETFCAP-install-failures.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From 8dfcdcfdcb9c462a05566aa8d3c6eca871f0ddbf Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Wed, 10 Feb 2016 09:52:45 +0100
-Subject: [PATCH] ignore RAISE_SETFCAP install failures
-
-While the new RAISE_SETFCAP feature is nifty, its failure to run (often
-due to the fs not supporting it) shouldn't impair the default install.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-
---- a/progs/Makefile
-+++ b/progs/Makefile
-@@ -39,7 +39,7 @@ install: all
- install -m 0755 $$p $(FAKEROOT)$(SBINDIR) ; \
- done
- ifeq ($(RAISE_SETFCAP),yes)
-- $(FAKEROOT)$(SBINDIR)/setcap cap_setfcap=i $(FAKEROOT)$(SBINDIR)/setcap
-+ -$(FAKEROOT)$(SBINDIR)/setcap cap_setfcap=i $(FAKEROOT)$(SBINDIR)/setcap
- endif
-
- test:
diff --git a/sys-libs/libcap/libcap-2.78.ebuild b/sys-libs/libcap/libcap-2.78.ebuild
deleted file mode 100644
index a318175acba4..000000000000
--- a/sys-libs/libcap/libcap-2.78.ebuild
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit dot-a multilib-minimal toolchain-funcs pam
-
-if [[ ${PV} == *9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/libcap/libcap.git"
-else
- SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
-
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-fi
-
-DESCRIPTION="POSIX 1003.1e capabilities"
-HOMEPAGE="https://sites.google.com/site/fullycapable/"
-
-LICENSE="|| ( GPL-2 BSD ) pam? ( || ( LGPL-2+ BSD ) )"
-SLOT="0"
-IUSE="pam static-libs tools"
-
-# While the build system optionally uses gperf, we don't DEPEND on it because
-# the build automatically falls back when it's unavailable. #604802
-PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
-DEPEND="${PDEPEND}
- sys-kernel/linux-headers"
-BDEPEND="
- sys-apps/diffutils
- tools? ( dev-lang/go )"
-
-QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.62-ignore-RAISE_SETFCAP-install-failures.patch
-)
-
-src_prepare() {
- default
- multilib_copy_sources
-}
-
-run_emake() {
- local args=(
- AR="$(tc-getAR)"
- CC="$(tc-getCC)"
- OBJCOPY="$(tc-getOBJCOPY)"
- RANLIB="$(tc-getRANLIB)"
- exec_prefix="${EPREFIX}"
- lib_prefix="${EPREFIX}/usr"
- lib="$(get_libdir)"
- prefix="${EPREFIX}/usr"
- PAM_CAP="$(usex pam yes no)"
- DYNAMIC=yes
- GOLANG="$(multilib_native_usex tools yes no)"
- )
- emake "${args[@]}" "$@"
-}
-
-src_configure() {
- use static-libs && lto-guarantee-fat
- tc-export_build_env BUILD_CC
- multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
- run_emake
-}
-
-multilib_src_test() {
- run_emake test
-}
-
-multilib_src_install() {
- # no configure, needs explicit install line #444724#c3
- run_emake DESTDIR="${D}" install
-
- if use static-libs ; then
- strip-lto-bytecode
- else
- rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die
- fi
-
- # install pam plugins ourselves
- rm -rf "${ED}"/usr/$(get_libdir)/security || die
-
- if use pam ; then
- dopammod pam_cap/pam_cap.so
- dopamsecurity '' pam_cap/capability.conf
- fi
-}
-
-multilib_src_install_all() {
- dodoc CHANGELOG README doc/capability.md
-}
diff --git a/sys-libs/libcap/libcap-9999.ebuild b/sys-libs/libcap/libcap-9999.ebuild
deleted file mode 100644
index 48a39fe2e5cc..000000000000
--- a/sys-libs/libcap/libcap-9999.ebuild
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit dot-a multilib-minimal toolchain-funcs pam
-
-if [[ ${PV} == *9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/libcap/libcap.git"
-else
- SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
-
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-DESCRIPTION="POSIX 1003.1e capabilities"
-HOMEPAGE="https://sites.google.com/site/fullycapable/"
-
-LICENSE="|| ( GPL-2 BSD ) pam? ( || ( LGPL-2+ BSD ) )"
-SLOT="0"
-IUSE="pam static-libs tools"
-
-# While the build system optionally uses gperf, we don't DEPEND on it because
-# the build automatically falls back when it's unavailable. #604802
-PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
-DEPEND="${PDEPEND}
- sys-kernel/linux-headers"
-BDEPEND="
- sys-apps/diffutils
- tools? ( dev-lang/go )"
-
-QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.62-ignore-RAISE_SETFCAP-install-failures.patch
-)
-
-src_prepare() {
- default
- multilib_copy_sources
-}
-
-run_emake() {
- local args=(
- AR="$(tc-getAR)"
- CC="$(tc-getCC)"
- OBJCOPY="$(tc-getOBJCOPY)"
- RANLIB="$(tc-getRANLIB)"
- exec_prefix="${EPREFIX}"
- lib_prefix="${EPREFIX}/usr"
- lib="$(get_libdir)"
- prefix="${EPREFIX}/usr"
- PAM_CAP="$(usex pam yes no)"
- DYNAMIC=yes
- GOLANG="$(multilib_native_usex tools yes no)"
- )
- emake "${args[@]}" "$@"
-}
-
-src_configure() {
- use static-libs && lto-guarantee-fat
- tc-export_build_env BUILD_CC
- multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
- run_emake
-}
-
-multilib_src_test() {
- run_emake test
-}
-
-multilib_src_install() {
- # no configure, needs explicit install line #444724#c3
- run_emake DESTDIR="${D}" install
-
- if use static-libs ; then
- strip-lto-bytecode
- else
- rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die
- fi
-
- # install pam plugins ourselves
- rm -rf "${ED}"/usr/$(get_libdir)/security || die
-
- if use pam ; then
- dopammod pam_cap/pam_cap.so
- dopamsecurity '' pam_cap/capability.conf
- fi
-}
-
-multilib_src_install_all() {
- dodoc CHANGELOG README doc/capability.md
-}
diff --git a/sys-libs/libcap/metadata.xml b/sys-libs/libcap/metadata.xml
deleted file mode 100644
index c71f3d49faae..000000000000
--- a/sys-libs/libcap/metadata.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <use>
- <flag name="tools">Install captree, which requires <pkg>dev-lang/go</pkg></flag>
- </use>
- <upstream>
- <remote-id type="cpe">cpe:/a:libcap:libcap</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libchipcard/Manifest b/sys-libs/libchipcard/Manifest
deleted file mode 100644
index 4db37d054fe4..000000000000
--- a/sys-libs/libchipcard/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libchipcard-5.1.6.tar.gz 874865 BLAKE2B 995dec0ce1dd9a5c4eb1173c114a19292d5c9a96f44c0ad969390ab489a6ac4e9001596995eb06db98a4bee2fa8b2310b844efd2e1b18fe1138be00398e60bd3 SHA512 a6e22f2a92203529a8b35387b6d8a3de0ce16a8d845b6ebee53bc151fcaa7626a61f63e71480cd85c01c9c5975a17632be8ba2d71a604f7ec2eab9d40b9ddfd5
diff --git a/sys-libs/libchipcard/files/libchipcard-5.1.6-clang16-build-fix.patch b/sys-libs/libchipcard/files/libchipcard-5.1.6-clang16-build-fix.patch
deleted file mode 100644
index 45f44665beba..000000000000
--- a/sys-libs/libchipcard/files/libchipcard-5.1.6-clang16-build-fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Bug: https://bugs.gentoo.org/742428
---- a/src/tools/cardcommander/cardcommander.cpp
-+++ b/src/tools/cardcommander/cardcommander.cpp
-@@ -45,7 +45,7 @@
- using namespace std;
-
- #define k_PRG_VERSION_INFO \
-- "cardcommander v0.4 (part of libchipcard v"k_CHIPCARD_VERSION_STRING")\n"\
-+ "cardcommander v0.4 (part of libchipcard v" k_CHIPCARD_VERSION_STRING ")\n"\
- "(c) 2006 Martin Preuss<martin@libchipcard.de>\n" \
- "This program is free software licensed under GPL.\n"\
- "See COPYING for details.\n"
diff --git a/sys-libs/libchipcard/libchipcard-5.1.6-r1.ebuild b/sys-libs/libchipcard/libchipcard-5.1.6-r1.ebuild
deleted file mode 100644
index a356789e7ceb..000000000000
--- a/sys-libs/libchipcard/libchipcard-5.1.6-r1.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DESCRIPTION="Library for accessing chip cards via chip card readers (terminals)"
-HOMEPAGE="https://www.aquamaniac.de/rdm/projects/libchipcard"
-SRC_URI="https://www.aquamaniac.de/rdm/attachments/download/382/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc x86"
-IUSE="doc examples"
-
-BDEPEND="
- sys-devel/gettext
- doc? ( app-text/doxygen )
-"
-DEPEND="
- >=sys-apps/pcsc-lite-1.6.2
- >=sys-libs/gwenhywfar-4.99.22_rc6:=
- virtual/zlib:=
- virtual/libintl
-"
-RDEPEND="${DEPEND}"
-
-DOCS=( AUTHORS ChangeLog NEWS README TODO doc/{CERTIFICATES,CONFIG,IPCCOMMANDS} )
-
-PATCHES=(
- "${FILESDIR}"/${P}-clang16-build-fix.patch
-)
-
-src_configure() {
- local myeconfargs=(
- --disable-static
- --with-docpath=/usr/share/doc/"${PF}"/apidoc
- $(use_enable doc full-doc)
- )
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- emake DESTDIR="${D}" install
-
- einstalldocs
-
- if use examples; then
- docinto tutorials
- dodoc tutorials/*.{c,h,xml} tutorials/README
- fi
-
- find "${D}" -name '*.la' -type f -delete || die
-}
diff --git a/sys-libs/libchipcard/metadata.xml b/sys-libs/libchipcard/metadata.xml
deleted file mode 100644
index 947e0178918b..000000000000
--- a/sys-libs/libchipcard/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="github">aqbanking/libchipcard</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libfaketime/Manifest b/sys-libs/libfaketime/Manifest
deleted file mode 100644
index 407cfefe2ce5..000000000000
--- a/sys-libs/libfaketime/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libfaketime-0.9.12.tar.gz 94913 BLAKE2B fc7acd0891a93552bc31b581f8d00c01c38c8f667a7233cd9eb8a74d52d8ccaced935678c35e34a84f2b756b1dc9a68d753acb9346678af4087f4b55427f5b81 SHA512 c08325b2acd6a0ea3e3af5443f506714901c0be2be1acff5db9b9234b751f6cf653c69ae3ae86219ecb548e3c514adb8cc392af5cc9e2b354722f9d18bee4750
diff --git a/sys-libs/libfaketime/libfaketime-0.9.12.ebuild b/sys-libs/libfaketime/libfaketime-0.9.12.ebuild
deleted file mode 100644
index 7690d01c550d..000000000000
--- a/sys-libs/libfaketime/libfaketime-0.9.12.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic toolchain-funcs multilib-minimal
-
-DESCRIPTION="Report faked system time to programs"
-HOMEPAGE="http://www.code-wizards.com/projects/libfaketime/ https://github.com/wolfcw/libfaketime"
-SRC_URI="https://github.com/wolfcw/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~mips ~ppc ppc64 ~riscv ~sparc x86"
-
-src_prepare() {
- default
-
- sed -i -e 's/-Werror //' {src,test}/Makefile || die
-
- # bug #863911
- filter-lto
-
- # We used to always set this, but see:
- # 1. https://github.com/wolfcw/libfaketime/commit/40edcc7ca087a8118fe5a2d27152617fa233e0e2
- # i.e. we should report cases which end up needing it, rather than always setting it.
- #
- # 2. As of 0.9.10, libfaketime tries to detect at runtime if it's needed.
- #append-cflags -DFORCE_MONOTONIC_FIX
-
- # bug #844958
- use riscv && append-cflags -DFORCE_PTHREAD_NONVER
-
- multilib_copy_sources
-}
-
-multilib_src_compile() {
- local target=all
-
- pushd src > /dev/null || die
- multilib_is_native_abi || target="${PN}.so.1 ${PN}MT.so.1"
- # ${target} is intentionally not quoted
- emake CC="$(tc-getCC)" LIBDIRNAME="/$(get_libdir)" PREFIX=/usr ${target}
- popd > /dev/null || die
-}
-
-multilib_src_test() {
- multilib_is_native_abi && emake CC="$(tc-getCC)" test
-}
-
-multilib_src_install() {
- multilib_is_native_abi && dobin src/faketime
-
- exeinto /usr/$(get_libdir)
- doexe src/${PN}*.so.*
-
- dosym ${PN}.so.1 /usr/$(get_libdir)/${PN}.so
- dosym ${PN}MT.so.1 /usr/$(get_libdir)/${PN}MT.so
-}
-
-multilib_src_install_all() {
- doman man/faketime.1
- dodoc NEWS README TODO
-}
diff --git a/sys-libs/libfaketime/metadata.xml b/sys-libs/libfaketime/metadata.xml
deleted file mode 100644
index 9dbf15865d46..000000000000
--- a/sys-libs/libfaketime/metadata.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>sam@gentoo.org</email>
- <name>Sam James</name>
- </maintainer>
- <longdescription lang="en">
- The Fake Time Preload Library (FTPL, a.k.a. libfaketime) intercepts
- various system calls which programs use to retrieve the current date and time.
- It can then report faked dates and times (as specified by you, the user) to
- these programs. This means you can modify the system time a program sees
- without having to change the time system-wide. FTPL allows you to specify both
- absolute dates (e.g., 2004-01-01) and relative dates (e.g., 10 days ago).
- </longdescription>
- <upstream>
- <remote-id type="github">wolfcw/libfaketime</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libfixposix/Manifest b/sys-libs/libfixposix/Manifest
deleted file mode 100644
index b8b4a895a508..000000000000
--- a/sys-libs/libfixposix/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST libfixposix-0.4.3.tar.gz 40370 BLAKE2B 16be34b15f891d05f4935ad3b9ed734164e63b5fdc660a35c18a7f10d45efd60e747160853a2f2c125aa039769cae0476c1975a348f04e2b302bcc5cad59db1d SHA512 cd1ef4d51a885a0994475563472f0e9d03b8223a69d2f9b30666c2f7eb8716421434a829e710832ae58607944a09410efc693a51f76cb854ccc7278bf619702a
-DIST libfixposix-0.5.1.tar.gz 41296 BLAKE2B 7b7b06c8cbbd54fc252a3ca8d765b0947d357d0efcac684f757d0e0b4f35bc043b588e7b603cb9875b5efbc45e6bc562c61040a436b3b5f30f3b8d324a859dfe SHA512 7749f560e779d4dc5712f9871fcca6b6143c482cef90c1785616c2520d75a82b22831ab5e6b76e703dccd1f5344baddf847623ccb91b0552feae6aa7054ac859
diff --git a/sys-libs/libfixposix/libfixposix-0.4.3.ebuild b/sys-libs/libfixposix/libfixposix-0.4.3.ebuild
deleted file mode 100644
index f36997221e38..000000000000
--- a/sys-libs/libfixposix/libfixposix-0.4.3.ebuild
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# inherit autotools
-
-DESCRIPTION="Thin wrapper over POSIX syscalls"
-HOMEPAGE="https://github.com/sionescu/libfixposix"
-SRC_URI="https://github.com/sionescu/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Boost-1.0"
-SLOT="0"
-KEYWORDS="~amd64"
-
-DEPEND="${RDEPEND}"
-
-src_prepare(){
- einfo "Generating autotools files..."
- autoreconf -i -f
- default
-}
diff --git a/sys-libs/libfixposix/libfixposix-0.5.1.ebuild b/sys-libs/libfixposix/libfixposix-0.5.1.ebuild
deleted file mode 100644
index 10d65d0a5e36..000000000000
--- a/sys-libs/libfixposix/libfixposix-0.5.1.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools
-
-DESCRIPTION="Thin wrapper over POSIX syscalls"
-HOMEPAGE="https://github.com/sionescu/libfixposix"
-SRC_URI="https://github.com/sionescu/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Boost-1.0"
-SLOT="0"
-KEYWORDS="~amd64"
-
-DEPEND="${RDEPEND}"
-
-src_prepare() {
- einfo "Generating autotools files..."
- default
- eautoreconf -i -f
-}
-
-src_install() {
- default
- find "${ED}" -name "*.la" -delete || die
-}
diff --git a/sys-libs/libfixposix/metadata.xml b/sys-libs/libfixposix/metadata.xml
deleted file mode 100644
index 9b3af9e1e0f0..000000000000
--- a/sys-libs/libfixposix/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="github">sionescu/libfixposix</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libhx/Manifest b/sys-libs/libhx/Manifest
deleted file mode 100644
index f4cf78213980..000000000000
--- a/sys-libs/libhx/Manifest
+++ /dev/null
@@ -1,6 +0,0 @@
-DIST libHX-4.27.tar.xz 366304 BLAKE2B 9f02379630f37a8c4297bee08e8053cfb9774bacbbf62007812e92475c9866236f3059664d4fbdf5a36aee8e02c7b831417410f4097db99602d09e2fb9371731 SHA512 291f92b16548b066e80c90dd16c7359373b3650a1673e142cf18331093f021a54ef2fc69fc42e00f1abab31e25a8cee18ee91226f447bf0ba75ee31ad49ac0a6
-DIST libHX-5.0.tar.zst 380941 BLAKE2B 4e26deaa027bedc0cda2edde3f8f18cba47641ec7f62387142dc3280eb585af8eb425694ba3e907e3da086b6f737d2f740909b22f067c5c90fc956ab6cb28e50 SHA512 4398daf2f6788d73b36d571d49d4b564d249d108efed37c026db76a057d597bbac4359bbf231ed74fe3e4e38826f34d706236bf2a2d3c29b214fe216768909b2
-DIST libHX-5.1.tar.zst 381151 BLAKE2B a9572852cbd17c7d8fdadb28d6e5aaa56b04fa9ba8bb966d2fe9f18d40cd55cb50d5cd049089b97e514ef489c15bdad94ef3bd8662db8b5e0173c6b60676e752 SHA512 872a386c80de70782a73b540272f28e611e7aeeea401f0f0dbdbe26f23a4eea4b9c16a02a67dd5669ac35b02767f4512037fc259d685434100a9f220bee7e7dc
-DIST libHX-5.2.tar.zst 381261 BLAKE2B eed1bffeb2922a07e3a004ef3460456c28d41ebb102452fabc6b9476f022d6f2171bd95091104f3ad085233f2d92cae1915822143dd6bfd5423c6250bdf202c6 SHA512 e845f99dd7fb8cc5f21a7b5b7deca547a1192587fa09372169ca8d944122b3085b0b8e95507fb8c07354d7aa4d88ec9812f82103f153cbb11f1e88f03f04b143
-DIST libHX-5.3.tar.zst 382078 BLAKE2B 8b206fd2e70ddb28ecd1c970f20db1ba10831951ec6a264498d889b42b854a1c406db152460e2bb4c92c9dfad8fa0e65497b1b59a2dd98baae901a04de59232a SHA512 c70538e4892d549dd4a595fc7a4e6742392c46563970300a0d4494847d409d4f53b4ba92f61dc0d2b1aa8d0443a81a75e217315ce506ac22642967ddfce5172b
-DIST libHX-5.4.tar.zst 382462 BLAKE2B 1d9c6eddeacb42c36494ba87e49ca663eb018bd1d1e64dd084dca2840f62f675fc842e4c7949dccfb385771f92c0680cb694f0ef5d923b2acf196869e19f7c23 SHA512 d76004b647e7675cc476c896335e54a994300dee41cd004646c4a7a77a5ce9a8b768b35938a386c7b243fcd297b297aff17b3463c1d38a0dbdefc746dd1af20a
diff --git a/sys-libs/libhx/libhx-4.27.ebuild b/sys-libs/libhx/libhx-4.27.ebuild
deleted file mode 100644
index f01b06097c8e..000000000000
--- a/sys-libs/libhx/libhx-4.27.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DESCRIPTION="Platform independent library providing basic system functions"
-HOMEPAGE="https://inai.de/projects/libhx/"
-SRC_URI="https://inai.de/files/${PN}/libHX-${PV}.tar.xz"
-
-S="${WORKDIR}/libHX-${PV}"
-LICENSE="GPL-3"
-SLOT="0/32" # soname version
-KEYWORDS="amd64 ppc x86"
-IUSE="doc"
-
-BDEPEND="app-arch/xz-utils"
-
-src_install() {
- default
-
- if use doc; then
- dodoc doc/*.txt doc/*.rst
- fi
-
- find "${ED}" -name "*.la" -delete || die
-}
diff --git a/sys-libs/libhx/libhx-5.0.ebuild b/sys-libs/libhx/libhx-5.0.ebuild
deleted file mode 100644
index cb009c5e0667..000000000000
--- a/sys-libs/libhx/libhx-5.0.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit unpacker
-
-DESCRIPTION="Platform independent library providing basic system functions"
-HOMEPAGE="https://inai.de/projects/libhx/"
-SRC_URI="https://inai.de/files/${PN}/libHX-${PV}.tar.zst"
-
-S="${WORKDIR}/libHX-${PV}"
-LICENSE="GPL-3"
-SLOT="0/43" # soname version
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE="doc"
-
-BDEPEND="$(unpacker_src_uri_depends)"
-
-src_install() {
- default
-
- if use doc; then
- dodoc doc/*.txt doc/*.rst
- fi
-
- find "${ED}" -name "*.la" -delete || die
-}
diff --git a/sys-libs/libhx/libhx-5.1.ebuild b/sys-libs/libhx/libhx-5.1.ebuild
deleted file mode 100644
index cb009c5e0667..000000000000
--- a/sys-libs/libhx/libhx-5.1.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit unpacker
-
-DESCRIPTION="Platform independent library providing basic system functions"
-HOMEPAGE="https://inai.de/projects/libhx/"
-SRC_URI="https://inai.de/files/${PN}/libHX-${PV}.tar.zst"
-
-S="${WORKDIR}/libHX-${PV}"
-LICENSE="GPL-3"
-SLOT="0/43" # soname version
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE="doc"
-
-BDEPEND="$(unpacker_src_uri_depends)"
-
-src_install() {
- default
-
- if use doc; then
- dodoc doc/*.txt doc/*.rst
- fi
-
- find "${ED}" -name "*.la" -delete || die
-}
diff --git a/sys-libs/libhx/libhx-5.2.ebuild b/sys-libs/libhx/libhx-5.2.ebuild
deleted file mode 100644
index cb009c5e0667..000000000000
--- a/sys-libs/libhx/libhx-5.2.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit unpacker
-
-DESCRIPTION="Platform independent library providing basic system functions"
-HOMEPAGE="https://inai.de/projects/libhx/"
-SRC_URI="https://inai.de/files/${PN}/libHX-${PV}.tar.zst"
-
-S="${WORKDIR}/libHX-${PV}"
-LICENSE="GPL-3"
-SLOT="0/43" # soname version
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE="doc"
-
-BDEPEND="$(unpacker_src_uri_depends)"
-
-src_install() {
- default
-
- if use doc; then
- dodoc doc/*.txt doc/*.rst
- fi
-
- find "${ED}" -name "*.la" -delete || die
-}
diff --git a/sys-libs/libhx/libhx-5.3.ebuild b/sys-libs/libhx/libhx-5.3.ebuild
deleted file mode 100644
index f7c3ad500153..000000000000
--- a/sys-libs/libhx/libhx-5.3.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit unpacker
-
-DESCRIPTION="Platform independent library providing basic system functions"
-HOMEPAGE="https://inai.de/projects/libhx/"
-SRC_URI="https://inai.de/files/${PN}/libHX-${PV}.tar.zst"
-
-S="${WORKDIR}/libHX-${PV}"
-LICENSE="GPL-3"
-SLOT="0/43" # soname version
-KEYWORDS="amd64 ppc x86"
-IUSE="doc"
-
-BDEPEND="$(unpacker_src_uri_depends)"
-
-src_install() {
- default
-
- if use doc; then
- dodoc doc/*.txt doc/*.rst
- fi
-
- find "${ED}" -name "*.la" -delete || die
-}
diff --git a/sys-libs/libhx/libhx-5.4.ebuild b/sys-libs/libhx/libhx-5.4.ebuild
deleted file mode 100644
index 07551d5793ce..000000000000
--- a/sys-libs/libhx/libhx-5.4.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit unpacker
-
-DESCRIPTION="Platform independent library providing basic system functions"
-HOMEPAGE="https://inai.de/projects/libhx/"
-SRC_URI="https://inai.de/files/${PN}/libHX-${PV}.tar.zst"
-
-S="${WORKDIR}/libHX-${PV}"
-LICENSE="GPL-3"
-SLOT="0/43" # soname version
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE="doc"
-
-BDEPEND="$(unpacker_src_uri_depends)"
-
-src_install() {
- default
-
- if use doc; then
- dodoc doc/*.txt doc/*.rst
- fi
-
- find "${ED}" -name "*.la" -delete || die
-}
diff --git a/sys-libs/libhx/metadata.xml b/sys-libs/libhx/metadata.xml
deleted file mode 100644
index acc9cafab27d..000000000000
--- a/sys-libs/libhx/metadata.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>hanno@gentoo.org</email>
- </maintainer>
- <upstream>
- <remote-id type="codeberg">jengelh/libhx</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libieee1284/Manifest b/sys-libs/libieee1284/Manifest
deleted file mode 100644
index 9863d134c22d..000000000000
--- a/sys-libs/libieee1284/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libieee1284-0.2.11.tar.bz2 278804 BLAKE2B 6bdc7051c91c7d1b7e601eb17823c4dbd17ca1f049a2af8487518649ec33fd5948d184b97764934371ea11d3871e82059cb0a5bd5501e1881e191791992e9d7b SHA512 06cc3049ce15613d34e39dc71bc572843c61ab64077c29ef9a6257edb0849c98565ff612a4cf787bc9642a39f1c89b7c47a20fb27f2318105be82aad8d472bb9
diff --git a/sys-libs/libieee1284/files/libieee1284-0.2.11-don-t-blindly-assume-outb_p-to-be-available.patch b/sys-libs/libieee1284/files/libieee1284-0.2.11-don-t-blindly-assume-outb_p-to-be-available.patch
deleted file mode 100644
index 0eb7d1bf217b..000000000000
--- a/sys-libs/libieee1284/files/libieee1284-0.2.11-don-t-blindly-assume-outb_p-to-be-available.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Bug: https://bugs.gentoo.org/898080
-Also refer: https://bugs.gentoo.org/590094
-From: Brahmajit Das <brahmajit.xyz@gmail.com>
-Date: Thu, 15 Jun 2023 17:39:11 +0000
-Subject: [PATCH 1/1] access_io.c: don't blindly assume outb_p to be available
-
-outb_p is not available in musl libc, the condition using the fuction
-was if __i386__ or __x86_64__ was defined. This is not enough, for
-example when using musl libc both the conditions are meet but the
-function is not available. Hence the addtional check for __GLIBC__ being
-defined is added.
-
-Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
---- a/src/access_io.c
-+++ b/src/access_io.c
-@@ -147,7 +147,7 @@ raw_outb (struct parport_internal *port, unsigned char val, unsigned long addr)
- {
- #if (defined(HAVE_LINUX) && defined(HAVE_SYS_IO_H)) || defined(HAVE_CYGWIN_9X) \
- || defined(HAVE_OBSD_I386) || defined(HAVE_FBSD_I386)
--#if defined(__i386__) || defined(__x86_64__) || defined(_MSC_VER)
-+#if (defined(__i386__) || defined(__x86_64__)) && defined(__GLIBC__) || defined(_MSC_VER)
- outb_p (val, (unsigned short)addr);
- #else
- outb (val, addr);
---
-2.41.0
-
diff --git a/sys-libs/libieee1284/libieee1284-0.2.11-r9.ebuild b/sys-libs/libieee1284/libieee1284-0.2.11-r9.ebuild
deleted file mode 100644
index 35ef225f2cea..000000000000
--- a/sys-libs/libieee1284/libieee1284-0.2.11-r9.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools multilib-minimal
-
-DESCRIPTION="Library to query devices using IEEE1284"
-HOMEPAGE="http://cyberelk.net/tim/software/libieee1284/"
-SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ppc ~ppc64 ~riscv x86"
-IUSE="doc static-libs"
-
-BDEPEND="doc? (
- app-text/docbook-sgml-utils
- >=app-text/docbook-sgml-dtd-4.1
- app-text/docbook-dsssl-stylesheets
- dev-perl/XML-RegExp
- )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-0.2.11-don-t-blindly-assume-outb_p-to-be-available.patch
-)
-
-src_prepare() {
- default
-
- mv configure.{in,ac} || die
-
- eautoreconf
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- --enable-shared
- --without-python
- $(use_enable static-libs static)
- )
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install_all() {
- einstalldocs
- dodoc doc/interface*
-
- if ! use static-libs; then
- find "${ED}" -name '*.la' -delete || die
- fi
-}
diff --git a/sys-libs/libieee1284/metadata.xml b/sys-libs/libieee1284/metadata.xml
deleted file mode 100644
index df6feef3e509..000000000000
--- a/sys-libs/libieee1284/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<upstream>
- <remote-id type="sourceforge">libieee1284</remote-id>
-</upstream>
-</pkgmetadata>
diff --git a/sys-libs/libixp/Manifest b/sys-libs/libixp/Manifest
deleted file mode 100644
index 1061ca91082f..000000000000
--- a/sys-libs/libixp/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libixp-0.5_p20110208.tar.xz 655956 BLAKE2B 0c2195a3f793dab19bd08acd3758105f9bd4a57a8e1bcbac1f8fcdbba8e2ecd25280468019ef069810267246995e53a078835515effeb8a4f523c834ac0ef020 SHA512 c5cf13b54ab2fca66b6c0ace0f3067e46a461d62727e93235e60382d3665edd40751d404f3f590c9d7692a5b8cb7d1fefb05adb2c36d7941bf04e37d13a4a48a
diff --git a/sys-libs/libixp/files/libixp-0.5_p20110208-gentoo.patch b/sys-libs/libixp/files/libixp-0.5_p20110208-gentoo.patch
deleted file mode 100644
index dbe101acef89..000000000000
--- a/sys-libs/libixp/files/libixp-0.5_p20110208-gentoo.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- a/cmd/ixpc.c
-+++ b/cmd/ixpc.c
-@@ -10,6 +10,8 @@
- #include <unistd.h>
- #include <ixp_local.h>
-
-+char *argv0;
-+
- /* Temporary */
- #define fatal(...) ixp_eprint("ixpc: fatal: " __VA_ARGS__); \
-
---- a/include/ixp.h
-+++ b/include/ixp.h
-@@ -66,13 +66,13 @@
-
- typedef unsigned char uchar;
- typedef uint16_t ushort;
--typedef uint32_t ulong;
-+typedef unsigned long ulong;
- typedef uint64_t uvlong;
-
- typedef int64_t vlong;
-
- # define respond ixp_respond
--# define serve_9pcon ixp_serve9pconn
-+# define serve_9pcon ixp_serve9conn
- #endif
-
- #undef uint
---- a/include/ixp_local.h
-+++ b/include/ixp_local.h
-@@ -12,7 +12,7 @@
- typedef char* va_list;
- #endif
-
--char *argv0;
-+extern char *argv0;
- #define ARGBEGIN \
- int _argtmp=0, _inargv=0; char *_argv=nil; \
- if(!argv0) {argv0=*argv; argv++, argc--;} \
diff --git a/sys-libs/libixp/libixp-0.5_p20110208-r3.ebuild b/sys-libs/libixp/libixp-0.5_p20110208-r3.ebuild
deleted file mode 100644
index bd8a54c6e054..000000000000
--- a/sys-libs/libixp/libixp-0.5_p20110208-r3.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs
-
-DESCRIPTION="A stand-alone client/server 9P library including ixpc client"
-HOMEPAGE="https://libs.suckless.org/deprecated/libixp"
-SRC_URI="mirror://gentoo/${P}.tar.xz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
-
-PATCHES=(
- # https://code.google.com/p/libixp/issues/detail?id=2
- # https://code.google.com/p/wmii/issues/detail?id=247
- # https://bugs.gentoo.org/393299
- "${FILESDIR}"/${P}-gentoo.patch
-)
-
-src_configure() {
- myixpconf=(
- PREFIX="${EPREFIX}"/usr
- LIBDIR="${EPREFIX}"/usr/$(get_libdir)
- LIBS=
- CC="$(tc-getCC) -c"
- LD="$(tc-getCC) ${LDFLAGS}"
- AR="$(tc-getAR) crs"
- MAKESO=1
- SOLDFLAGS="-shared"
- )
-}
-
-src_compile() {
- emake "${myixpconf[@]}"
-}
-
-src_install() {
- emake "${myixpconf[@]}" DESTDIR="${D}" install
- dolib.so lib/libixp{,_pthread}.so
- einstalldocs
-}
diff --git a/sys-libs/libixp/metadata.xml b/sys-libs/libixp/metadata.xml
deleted file mode 100644
index 85e4ed814fa2..000000000000
--- a/sys-libs/libixp/metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<!-- maintainer-needed -->
-</pkgmetadata>
diff --git a/sys-libs/libmodulemd/Manifest b/sys-libs/libmodulemd/Manifest
deleted file mode 100644
index c4a270c8da5f..000000000000
--- a/sys-libs/libmodulemd/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST libmodulemd-2.15.0.tar.gz 572396 BLAKE2B 39e9240deb4e1a3278bf323e111b137b980ac5a3069598b7306390d27623730ac1bc826c91ed049257c0d5de8c6a05c3bbc22ac8e9435b5c38c147f0f077ec41 SHA512 6e890952bf6b6fe3ee5790ff71866938627134eaa2d6c6e3bf1940dcf21203dc0101f487801d62f3698e5a50402eb089665c99723aeffd831e5f0b341a63aace
-DIST libmodulemd-2.15.2-glib-2.87.patch 71905 BLAKE2B f3f7425294bb5594c26feebe53bb453d02ecd30d3d5056954d12df34defc387f2653e0446f338690c32d4749af855c5fbb7bf33b891bdaa5b51b0ec4362ec530 SHA512 eb66a03459065b233ba26f97cac29f5e4e76b7db2b44ace9658c996664d7e5973b45ef14e9de4ebfb24a9b8b2346d872111ef255c0611be4f8baea9b093fb51b
-DIST libmodulemd-2.15.2-pygobject-3.55.patch 6929 BLAKE2B d5d323833443559b01212d32dfc49fba785152d38dd2cbc61fed7974fd2273f48f74a35fd35df139ec986ab57f2713e7e53d0732efcbcc5a1861eac97802af00 SHA512 9f4d9094ce5013761f0112e95f71315da44ceb0ff14a8d0d99f0e33dd9c3f487fa7f44fac76643d165763761517c831984ed7ad75f197b54d6e3c788cef699a5
-DIST libmodulemd-2.15.2.tar.gz 574516 BLAKE2B d6409ea70ef5ef642e6daed76c73fbf3a87e0388b33425f3fbfa80ba9369616be1bc235a7892d870b852a25bb86ccd10002212663ac07fd7476d391fb131eaf0 SHA512 885d453bbca00c75c8a77fee4a27003230d2411536ccf87f12d9df00b108c8998cdf1f8d7d09a49d27fbe9b64f711b2b0dc037252c5bc821b43242d342ca3c8b
diff --git a/sys-libs/libmodulemd/files/libmodulemd-2.15.0-glib-docs.patch b/sys-libs/libmodulemd/files/libmodulemd-2.15.0-glib-docs.patch
deleted file mode 100644
index 7ab46652ed9d..000000000000
--- a/sys-libs/libmodulemd/files/libmodulemd-2.15.0-glib-docs.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-https://github.com/fedora-modularity/libmodulemd/commit/29c339a31b1c753dcdef041e5c2e0e600e48b59d
-https://github.com/fedora-modularity/libmodulemd/commit/9d2809090cc0cccd7bab67453dc00cf43a289082
-https://github.com/fedora-modularity/libmodulemd/commit/f3336199b4e69af3305f156abc7533bed9e9a762
-
-The commits above are required for USE=doc. For some reason upstream cross-reference glib html
-docs?
-
---- a/meson.build
-+++ b/meson.build
-@@ -67,23 +67,34 @@ sed = find_program('sed')
- test = find_program('test')
-
- with_docs = get_option('with_docs')
-+gtk_doc_referred_paths = []
- if with_docs
- gtkdoc = dependency('gtk-doc')
-- glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
-
-- glib_index_path = join_paths(glib_docpath, 'glib/index.html')
-- ret = run_command ([test, '-e', glib_index_path],
-- check: false)
-- if ret.returncode() != 0
-- error('Missing documentation for GLib: @0@'.format(glib_index_path))
-+ if glib.version().version_compare('<2.79.0')
-+ glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
-+ glib_modules = ['glib', 'gobject' ]
-+ else
-+ warning('glib >= 2.79.0 documention might not be properly referred from libmodulemd documentation.')
-+ if glib.version().version_compare('<2.80.1')
-+ glib_docpath = join_paths(glib_prefix, 'share', 'doc', 'glib-2.0')
-+ glib_modules = ['glib', 'gobject' ]
-+ else
-+ glib_docpath = join_paths(glib_prefix, 'share', 'doc')
-+ glib_modules = ['glib-2.0', 'gobject-2.0' ]
-+ endif
- endif
-
-- gobject_index_path = join_paths(glib_docpath, 'gobject/index.html')
-- ret = run_command ([test, '-e', gobject_index_path],
-- check: false)
-- if ret.returncode() != 0
-- error('Missing documentation for GObject: @0@'.format(gobject_index_path))
-- endif
-+ foreach referred_module : glib_modules
-+ doc_module_path = join_paths(glib_docpath, referred_module)
-+ doc_index_file = join_paths(doc_module_path, 'index.html')
-+ ret = run_command ([test, '-e', doc_index_file],
-+ check: false)
-+ if ret.returncode() != 0
-+ error('Missing GTK documentation for @0@: @1@'.format(referred_module, doc_index_file))
-+ endif
-+ gtk_doc_referred_paths += [ doc_module_path ]
-+ endforeach
- endif
-
- # Keep with_manpages option a tristate feature for backward compatibility.
-@@ -198,6 +209,7 @@ summary({'prefix': get_option('prefix'),
- 'datadir': get_option('datadir'),
- 'Python 2 GObject Overrides': gobject_overrides_dir_py2,
- 'Python 3 GObject Overrides': gobject_overrides_dir_py3,
-+ 'GTK-Doc Referred Paths': gtk_doc_referred_paths,
- }, section: 'Directories')
-
- summary({'Custom Python': get_option('python_name'),
---- a/modulemd/meson.build
-+++ b/modulemd/meson.build
-@@ -256,6 +256,10 @@ configure_file(
- # --- Documenatation --- #
-
- if with_docs
-+ fixxref_args = []
-+ foreach path : gtk_doc_referred_paths
-+ fixxref_args += [ '--extra-dir=@0@'.format(path) ]
-+ endforeach
- gnome.gtkdoc(
- 'modulemd-2.0',
- install_dir: 'modulemd-2.0',
-@@ -265,10 +269,7 @@ if with_docs
- dependencies : [
- modulemd_dep,
- ],
-- fixxref_args: [
-- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
-- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
-- ],
-+ fixxref_args: [ fixxref_args ],
- install : true,
- )
- endif
diff --git a/sys-libs/libmodulemd/libmodulemd-2.15.0-r1.ebuild b/sys-libs/libmodulemd/libmodulemd-2.15.0-r1.ebuild
deleted file mode 100644
index 4cfba7f394c8..000000000000
--- a/sys-libs/libmodulemd/libmodulemd-2.15.0-r1.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2023-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit meson python-single-r1
-
-DESCRIPTION="C Library for manipulating Fedora Modularity metadata files"
-HOMEPAGE="https://github.com/fedora-modularity/libmodulemd"
-if [[ ${PV} = 9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/fedora-modularity/libmodulemd.git"
-else
- SRC_URI="https://github.com/fedora-modularity/libmodulemd/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-
-IUSE="doc test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-DEPEND="
- ${PYTHON_DEPS}
- app-arch/rpm
- sys-apps/file
- dev-libs/glib:2
- dev-libs/libyaml
- $(python_gen_cond_dep '
- dev-python/pygobject:3[${PYTHON_USEDEP}]
- ')
-"
-RDEPEND="${DEPEND}"
-BDEPEND="
- ${PYTHON_DEPS}
- >=dev-libs/gobject-introspection-1.82.0-r2
- dev-util/glib-utils
- doc? (
- dev-libs/glib[gtk-doc(+),doc(+)]
- dev-util/gtk-doc
- )
- test? (
- sys-libs/libmodulemd
- )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.15.0-glib-docs.patch
-)
-
-src_configure() {
- local emesonargs=(
- $(meson_use doc with_docs)
- )
- meson_src_configure
-}
-
-src_test() {
- meson_src_test --no-suite ci_valgrind
-}
-
-src_install() {
- meson_src_install
- # We need to compile the gobject introspection overrides to prevent QA warnings
- local PYTHON_GI_OVERRIDESDIR=$("${EPYTHON}" -c 'import gi;print(gi._overridesdir)' || die)
- python_optimize "${D}${PYTHON_GI_OVERRIDESDIR}/"
-
-}
diff --git a/sys-libs/libmodulemd/libmodulemd-2.15.2.ebuild b/sys-libs/libmodulemd/libmodulemd-2.15.2.ebuild
deleted file mode 100644
index 3671aa325010..000000000000
--- a/sys-libs/libmodulemd/libmodulemd-2.15.2.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 2023-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit meson python-single-r1
-
-DESCRIPTION="C Library for manipulating Fedora Modularity metadata files"
-HOMEPAGE="https://github.com/fedora-modularity/libmodulemd"
-if [[ ${PV} = 9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/fedora-modularity/libmodulemd.git"
-else
- SRC_URI="https://github.com/fedora-modularity/libmodulemd/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="amd64 ~arm64 x86"
-
- # Backports for tests
- SRC_URI+="
- https://github.com/fedora-modularity/libmodulemd/commit/89d4afb3d018250427d4d87840ae57aab3903361.patch
- -> ${PN}-2.15.2-glib-2.87.patch
- https://github.com/fedora-modularity/libmodulemd/commit/e33ecf1cc15383b9563bc4cd9a6908277bf8039d.patch
- -> ${PN}-2.15.2-pygobject-3.55.patch
- "
-fi
-
-LICENSE="MIT"
-SLOT="0"
-
-IUSE="doc test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-DEPEND="
- ${PYTHON_DEPS}
- app-arch/rpm
- sys-apps/file
- dev-libs/glib:2
- dev-libs/libyaml
- $(python_gen_cond_dep '
- dev-python/pygobject:3[${PYTHON_USEDEP}]
- ')
-"
-RDEPEND="${DEPEND}"
-BDEPEND="
- ${PYTHON_DEPS}
- >=dev-libs/gobject-introspection-1.82.0-r2
- dev-util/glib-utils
- doc? (
- dev-libs/glib[gtk-doc(+),doc(+)]
- dev-util/gtk-doc
- )
- test? (
- sys-libs/libmodulemd
- )
-"
-
-PATCHES=(
- "${DISTDIR}"/libmodulemd-2.15.2-glib-2.87.patch
- "${DISTDIR}"/libmodulemd-2.15.2-pygobject-3.55.patch
-)
-
-src_configure() {
- local emesonargs=(
- $(meson_use doc with_docs)
- )
- meson_src_configure
-}
-
-src_test() {
- meson_src_test --no-suite ci_valgrind
-}
-
-src_install() {
- meson_src_install
- # We need to compile the gobject introspection overrides to prevent QA warnings
- local PYTHON_GI_OVERRIDESDIR=$("${EPYTHON}" -c 'import gi;print(gi._overridesdir)' || die)
- python_optimize "${D}${PYTHON_GI_OVERRIDESDIR}/"
-
-}
diff --git a/sys-libs/libmodulemd/libmodulemd-9999.ebuild b/sys-libs/libmodulemd/libmodulemd-9999.ebuild
deleted file mode 100644
index 8ec7b2534104..000000000000
--- a/sys-libs/libmodulemd/libmodulemd-9999.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 2023-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit meson python-single-r1
-
-DESCRIPTION="C Library for manipulating Fedora Modularity metadata files"
-HOMEPAGE="https://github.com/fedora-modularity/libmodulemd"
-if [[ ${PV} = 9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/fedora-modularity/libmodulemd.git"
-else
- SRC_URI="https://github.com/fedora-modularity/libmodulemd/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~arm64 ~x86"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-
-IUSE="doc test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-DEPEND="
- ${PYTHON_DEPS}
- app-arch/rpm
- sys-apps/file
- dev-libs/glib:2
- dev-libs/libyaml
- $(python_gen_cond_dep '
- dev-python/pygobject:3[${PYTHON_USEDEP}]
- ')
-"
-RDEPEND="${DEPEND}"
-BDEPEND="
- ${PYTHON_DEPS}
- >=dev-libs/gobject-introspection-1.82.0-r2
- dev-util/glib-utils
- doc? (
- dev-libs/glib[gtk-doc(+),doc(+)]
- dev-util/gtk-doc
- )
- test? (
- sys-libs/libmodulemd
- )
-"
-
-src_configure() {
- local emesonargs=(
- $(meson_use doc with_docs)
- )
- meson_src_configure
-}
-
-src_test() {
- meson_src_test --no-suite ci_valgrind
-}
-
-src_install() {
- meson_src_install
- # We need to compile the gobject introspection overrides to prevent QA warnings
- local PYTHON_GI_OVERRIDESDIR=$("${EPYTHON}" -c 'import gi;print(gi._overridesdir)' || die)
- python_optimize "${D}${PYTHON_GI_OVERRIDESDIR}/"
-
-}
diff --git a/sys-libs/libmodulemd/metadata.xml b/sys-libs/libmodulemd/metadata.xml
deleted file mode 100644
index 8b31faedb4d6..000000000000
--- a/sys-libs/libmodulemd/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>kangie@gentoo.org</email>
- <name>Matt Jolly</name>
- </maintainer>
- <upstream>
- <remote-id type="github">fedora-modularity/libmodulemd</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libnbd/Manifest b/sys-libs/libnbd/Manifest
deleted file mode 100644
index 49eec71ae706..000000000000
--- a/sys-libs/libnbd/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST libnbd-1.18.1.tar.gz 1482736 BLAKE2B d3f0b2993fa1392df93b0bbc5d63805489ad1a82cf5bcc5eb5c3b5b7e7e6c40095471ab8fc964cc0e5c7a99affa7150f7be38cc16c42f27fc4cdc16bd0ca0359 SHA512 f4262666be55d580550e053355f14f80d352bf869ae7241e9fa032a9b5cd9e027eb89a536871c1206422413fc7ed745da7d612b3e1413f76ec17168705fbf12c
-DIST libnbd-1.22.5.tar.gz 1574844 BLAKE2B ab3bdea1774c9aadd2613ac56ada0d8797c75186ec0f84980231f0ad4bf3f71cf4a0f909f160b33b8719c3eee993cf6e7151dddb6a427eeedfa0e605f5e93804 SHA512 5440f1755a4724265336d59af37aaba9e8426821689d045ce307316772ceb3e8d7840838b2a2f378db014e6927f4627fc3f33a58b24519e515af6474d0669bf2
-DIST libnbd-1.23.9.tar.gz 1594098 BLAKE2B af1448d4e071600d3c2e74b77131c00f79a30ac279be2782dc94da91bab16cdd47657cf53522d1ffb022075a0da0b54fd19a4ec86a44e87bfc73fffd0d2a5b1b SHA512 0ff4fa3aea2e841fe22990055e073afa7262781d764c05830a14cec64142d5c859411d6cf593f95c12a0a47eb38b1cd6f4bf969af0e229ccc6dc7b44641ede49
-DIST libnbd-1.24.0.tar.gz 1621956 BLAKE2B c44ff4147a1166a3b165afdd6af85ab415e3d8d27dc27514f5a4cb814b8f6bd60d27a38e445bb4b2050338476daf2a1e691c02c93067c45383b45cfef4a8381f SHA512 db05b606a19b3efb6a53c05b5b7ea96571892b7540fff1f4df0c53d0f82e3817f724fd0aa665597b58a4613545b03d7df6e1ac8f3fa64c7f85e824ca2221f3ae
diff --git a/sys-libs/libnbd/files/libnbd-1.22.2-Makefile.am-Conditionally-compile-some-SUBDIRS.patch b/sys-libs/libnbd/files/libnbd-1.22.2-Makefile.am-Conditionally-compile-some-SUBDIRS.patch
deleted file mode 100644
index ef4988c62641..000000000000
--- a/sys-libs/libnbd/files/libnbd-1.22.2-Makefile.am-Conditionally-compile-some-SUBDIRS.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 2934e26841b88604ed1bf23e3728d7b69d018c72 Mon Sep 17 00:00:00 2001
-From: Christopher Byrne <salah.coronya@gmail.com>
-Date: Sat, 14 Jun 2025 21:26:24 -0500
-Subject: [PATCH 2/2] Makefile.am: Conditionally compile some SUBDIRS
-
-Otherwise, the Makefile will try to compile them. The correct machinery
-is in configure.ac, so just add the conditions to Makefile.am
----
- Makefile.am | 41 ++++++++++++++++++++++++++++++-----------
- 1 file changed, 30 insertions(+), 11 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index f31e067..1d00ebd 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -42,30 +42,49 @@ SUBDIRS = \
- common/utils \
- lib \
- docs \
-- examples \
- valgrind \
- . \
- tests \
-- python \
-- sh \
- info \
- copy \
- dump \
-- fuse \
-- ublk \
-- ocaml \
-- ocaml/examples \
-- ocaml/tests \
-- golang \
-- golang/examples \
-- rust \
- interop \
- fuzzing \
- bash-completion \
- $(NULL)
-
-+if HAVE_FUSE
-+SUBDIRS += fuse
-+endif
-+
-+if HAVE_UBLK
-+SUBDIRS += ublk
-+endif
-+
-+if HAVE_GOLANG
-+SUBDIRS += golang
-+endif
-+
-+if HAVE_OCAML
-+SUBDIRS += ocaml ocaml/tests
-+endif
-+
-+if HAVE_PYTHON
-+SUBDIRS += python sh
-+endif
-+
-+if HAVE_RUST
-+SUBDIRS += rust
-+endif
-+
- if BUILD_EXAMPLES
- SUBDIRS += examples
-+if HAVE_OCAML
-+SUBDIRS += ocaml/examples
-+endif
-+if HAVE_GOLANG
-+SUBDIRS += golang/examples
-+endif
- endif
-
- noinst_SCRIPTS = run
---
-2.49.0
-
diff --git a/sys-libs/libnbd/files/libnbd-1.22.2-build-Remove-automagic-compiling-of-examples.patch b/sys-libs/libnbd/files/libnbd-1.22.2-build-Remove-automagic-compiling-of-examples.patch
deleted file mode 100644
index 6bd9cd09fea5..000000000000
--- a/sys-libs/libnbd/files/libnbd-1.22.2-build-Remove-automagic-compiling-of-examples.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-From 53e0ade7f46525e048cea7bd321cdf370800e18a Mon Sep 17 00:00:00 2001
-From: Christopher Byrne <salah.coronya@gmail.com>
-Date: Sat, 14 Jun 2025 21:01:17 -0500
-Subject: [PATCH 1/2] build: Remove automagic compiling of examples
-
----
- Makefile.am | 4 +++
- configure.ac | 93 +++++++++++++++++++++++++++++-----------------------
- 2 files changed, 56 insertions(+), 41 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 129e393..f31e067 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -64,6 +64,10 @@ SUBDIRS = \
- bash-completion \
- $(NULL)
-
-+if BUILD_EXAMPLES
-+SUBDIRS += examples
-+endif
-+
- noinst_SCRIPTS = run
-
- # Check no files are missing from EXTRA_DIST rules, and that all
-diff --git a/configure.ac b/configure.ac
-index 84ec09d..d27a605 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -308,57 +308,67 @@ AS_IF([test "$with_libxml2" != "no"],[
- ])
- AM_CONDITIONAL([HAVE_LIBXML2], [test "x$LIBXML2_LIBS" != "x"])
-
-+dnl Examples
-+AC_ARG_ENABLE([examples],
-+ [AS_HELP_STRING([--disable-examples],
-+ [disable building of glib and libev examples @<:@default=check@:>@])],
-+ [],
-+ [with_examples=check])
-+
-+AS_IF([test "$enable_examples" != "no"],[
- dnl glib2 main loop for examples that interoperate with the glib main loop.
--PKG_CHECK_MODULES([GLIB], [glib-2.0], [
-- printf "glib2 version is "; $PKG_CONFIG --modversion glib-2.0
-- AC_SUBST([GLIB_CFLAGS])
-- AC_SUBST([GLIB_LIBS])
--],[
-- AC_MSG_WARN([glib2 not found, some examples will not be compiled])
--])
--AM_CONDITIONAL([HAVE_GLIB], [test "x$GLIB_LIBS" != "x"])
-+ PKG_CHECK_MODULES([GLIB], [glib-2.0], [
-+ printf "glib2 version is "; $PKG_CONFIG --modversion glib-2.0
-+ AC_SUBST([GLIB_CFLAGS])
-+ AC_SUBST([GLIB_LIBS])
-+ ], [
-+ AC_MSG_WARN([glib2 not found, some examples will not be compiled])
-+ ])
-
- dnl libev support for examples that interoperate with libev event loop.
--PKG_CHECK_MODULES([LIBEV], [libev], [
-- printf "libev version is "; $PKG_CONFIG --modversion libev
-- AC_SUBST([LIBEV_CFLAGS])
-- AC_SUBST([LIBEV_LIBS])
--],[
-- dnl no pkg-config for libev, searching manually:
-- AC_CHECK_HEADERS([ev.h], [
-- AC_CHECK_LIB([ev], [ev_time], [
-- AC_SUBST([LIBEV_LIBS], ["-lev"])
-- ],
-- [
-- AC_MSG_WARN([libev not found, some examples will not be compiled])
-- ])
-- ],[
-- AC_MSG_WARN([ev.h not found, some examples will not be compiled])
-+ PKG_CHECK_MODULES([LIBEV], [libev], [
-+ printf "libev version is "; $PKG_CONFIG --modversion libev
-+ AC_SUBST([LIBEV_CFLAGS])
-+ AC_SUBST([LIBEV_LIBS])
-+ ],[
-+dnl no pkg-config for libev, searching manually:
-+ AC_CHECK_HEADERS([ev.h], [
-+ AC_CHECK_LIB([ev], [ev_time], [
-+ AC_SUBST([LIBEV_LIBS], ["-lev"])
-+ ],
-+ [
-+ AC_MSG_WARN([libev not found, some examples will not be compiled])
-+ ])
-+ ],[
-+ AC_MSG_WARN([ev.h not found, some examples will not be compiled])
-+ ])
- ])
--])
-
--AS_IF([test "x$LIBEV_LIBS" != "x"], [
-- old_CFLAGS="$CFLAGS"
-- CFLAGS="$CFLAGS $LIBEV_CFLAGS -Werror=strict-aliasing -O2"
-- AC_MSG_CHECKING([if the compiler is new enough for good aliasing rules])
-- AC_COMPILE_IFELSE([
-- AC_LANG_PROGRAM([
-- #include <ev.h>
--
-- static void cb (struct ev_loop *l, ev_timer *t, int e) { }
-- static ev_timer timer;
-+ AS_IF([test "x$LIBEV_LIBS" != "x"], [
-+ old_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $LIBEV_CFLAGS -Werror=strict-aliasing -O2"
-+ AC_MSG_CHECKING([if the compiler is new enough for good aliasing rules])
-+ AC_COMPILE_IFELSE([
-+ AC_LANG_PROGRAM([
-+ #include <ev.h>
-+
-+ static void cb (struct ev_loop *l, ev_timer *t, int e) { }
-+ static ev_timer timer;
-+ ], [
-+ ev_timer_init (&timer, cb, 0, .1);
-+ ])
- ], [
-- ev_timer_init (&timer, cb, 0, .1);
-+ AC_MSG_RESULT([yes])
-+ ], [
-+ AC_MSG_RESULT([no])
-+ LIBEV_CFLAGS="$LIBEV_CFLAGS -Wno-strict-aliasing"
- ])
-- ], [
-- AC_MSG_RESULT([yes])
-- ], [
-- AC_MSG_RESULT([no])
-- LIBEV_CFLAGS="$LIBEV_CFLAGS -Wno-strict-aliasing"
-+ CFLAGS="$old_CFLAGS"
- ])
-- CFLAGS="$old_CFLAGS"
- ])
-+AM_CONDITIONAL([HAVE_GLIB], [test "x$GLIB_LIBS" != "x"])
- AM_CONDITIONAL([HAVE_LIBEV], [test "x$LIBEV_LIBS" != "x"])
-+AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$enable_examples" != "xno" ])
-
- dnl FUSE 3 is optional to build the nbdfuse program.
- AC_ARG_ENABLE([fuse],
-@@ -378,6 +388,7 @@ AS_IF([test "x$enable_fuse" != "xno"],[
- ])
- AM_CONDITIONAL([HAVE_FUSE],[test "x$enable_fuse" != "xno"])
-
-+
- dnl libublksrv is optional to build the nbdublk program.
- AC_ARG_ENABLE([ublk],
- AS_HELP_STRING([--disable-ublk], [disable ublk (nbdublk) support]),
---
-2.49.0
-
diff --git a/sys-libs/libnbd/files/libnbd-1.22.5-which-hunt.patch b/sys-libs/libnbd/files/libnbd-1.22.5-which-hunt.patch
deleted file mode 100644
index e4f53b1d3b93..000000000000
--- a/sys-libs/libnbd/files/libnbd-1.22.5-which-hunt.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index 6c7cae8a..d938f140 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -432,7 +432,7 @@ HEADING([Checking for bash])
- dnl Bash must be at least version 4. If it is too old, fail hard
- dnl with a good diagnostic. Note macOS ships an ancient version
- dnl of bash (https://gitlab.com/nbdkit/nbdkit/-/issues/21)
--bash=`which bash`
-+bash=$(command -v bash)
- AC_MSG_CHECKING([for the major version of $bash])
- bash_major=`bash -c 'echo ${BASH_VERSINFO:-0}'`
- AC_MSG_RESULT([$bash_major])
diff --git a/sys-libs/libnbd/files/libnbd-1.24.0-Makefile.am-Conditionally-compile-some-SUBDIRS.patch b/sys-libs/libnbd/files/libnbd-1.24.0-Makefile.am-Conditionally-compile-some-SUBDIRS.patch
deleted file mode 100644
index 52ff73660406..000000000000
--- a/sys-libs/libnbd/files/libnbd-1.24.0-Makefile.am-Conditionally-compile-some-SUBDIRS.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index d587a092..18df2ad1 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -42,31 +42,50 @@ SUBDIRS = \
- common/utils \
- lib \
- docs \
-- examples \
- valgrind \
- . \
- tests \
-- python \
-- sh \
- info \
- copy \
- dump \
-- fuse \
- misc \
-- ublk \
-- ocaml \
-- ocaml/examples \
-- ocaml/tests \
-- golang \
-- golang/examples \
-- rust \
- interop \
- fuzzing \
- bash-completion \
- $(NULL)
-
-+if HAVE_FUSE
-+SUBDIRS += fuse
-+endif
-+
-+if HAVE_UBLK
-+SUBDIRS += ublk
-+endif
-+
-+if HAVE_GOLANG
-+SUBDIRS += golang
-+endif
-+
-+if HAVE_OCAML
-+SUBDIRS += ocaml ocaml/tests
-+endif
-+
-+if HAVE_PYTHON
-+SUBDIRS += python sh
-+endif
-+
-+if HAVE_RUST
-+SUBDIRS += rust
-+endif
-+
- if BUILD_EXAMPLES
- SUBDIRS += examples
-+if HAVE_OCAML
-+SUBDIRS += ocaml/examples
-+endif
-+if HAVE_GOLANG
-+SUBDIRS += golang/examples
-+endif
- endif
-
- noinst_SCRIPTS = run
diff --git a/sys-libs/libnbd/files/libnbd-1.24.0-build-Remove-automagic-compiling-of-examples.patch b/sys-libs/libnbd/files/libnbd-1.24.0-build-Remove-automagic-compiling-of-examples.patch
deleted file mode 100644
index 05f1cdfe52b5..000000000000
--- a/sys-libs/libnbd/files/libnbd-1.24.0-build-Remove-automagic-compiling-of-examples.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index 32213efa..d587a092 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -65,6 +65,10 @@ SUBDIRS = \
- bash-completion \
- $(NULL)
-
-+if BUILD_EXAMPLES
-+SUBDIRS += examples
-+endif
-+
- noinst_SCRIPTS = run
-
- # Check no files are missing from EXTRA_DIST rules, and that all
-diff --git a/configure.ac b/configure.ac
-index 6c7cae8a..920625d6 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -327,57 +327,67 @@ AS_IF([test "$with_libxml2" != "no"],[
- ])
- AM_CONDITIONAL([HAVE_LIBXML2], [test "x$LIBXML2_LIBS" != "x"])
-
-+dnl Examples
-+AC_ARG_ENABLE([examples],
-+ [AS_HELP_STRING([--disable-examples],
-+ [disable building of glib and libev examples @<:@default=check@:>@])],
-+ [],
-+ [with_examples=check])
-+
-+AS_IF([test "$enable_examples" != "no"],[
- dnl glib2 main loop for examples that interoperate with the glib main loop.
--PKG_CHECK_MODULES([GLIB], [glib-2.0], [
-- PRINT_PKG_VERSION([glib-2.0])
-- AC_SUBST([GLIB_CFLAGS])
-- AC_SUBST([GLIB_LIBS])
--],[
-- AC_MSG_WARN([glib2 not found, some examples will not be compiled])
--])
--AM_CONDITIONAL([HAVE_GLIB], [test "x$GLIB_LIBS" != "x"])
-+ PKG_CHECK_MODULES([GLIB], [glib-2.0], [
-+ PRINT_PKG_VERSION([glib-2.0])
-+ AC_SUBST([GLIB_CFLAGS])
-+ AC_SUBST([GLIB_LIBS])
-+ ], [
-+ AC_MSG_WARN([glib2 not found, some examples will not be compiled])
-+ ])
-
- dnl libev support for examples that interoperate with libev event loop.
--PKG_CHECK_MODULES([LIBEV], [libev], [
-- PRINT_PKG_VERSION(libev)
-- AC_SUBST([LIBEV_CFLAGS])
-- AC_SUBST([LIBEV_LIBS])
--],[
-- dnl no pkg-config for libev, searching manually:
-- AC_CHECK_HEADERS([ev.h], [
-- AC_CHECK_LIB([ev], [ev_time], [
-- AC_SUBST([LIBEV_LIBS], ["-lev"])
-- ],
-- [
-- AC_MSG_WARN([libev not found, some examples will not be compiled])
-- ])
-- ],[
-- AC_MSG_WARN([ev.h not found, some examples will not be compiled])
-+ PKG_CHECK_MODULES([LIBEV], [libev], [
-+ PRINT_PKG_VERSION(libev)
-+ AC_SUBST([LIBEV_CFLAGS])
-+ AC_SUBST([LIBEV_LIBS])
-+ ],[
-+dnl no pkg-config for libev, searching manually:
-+ AC_CHECK_HEADERS([ev.h], [
-+ AC_CHECK_LIB([ev], [ev_time], [
-+ AC_SUBST([LIBEV_LIBS], ["-lev"])
-+ ],
-+ [
-+ AC_MSG_WARN([libev not found, some examples will not be compiled])
-+ ])
-+ ],[
-+ AC_MSG_WARN([ev.h not found, some examples will not be compiled])
-+ ])
- ])
--])
-
--AS_IF([test "x$LIBEV_LIBS" != "x"], [
-- old_CFLAGS="$CFLAGS"
-- CFLAGS="$CFLAGS $LIBEV_CFLAGS -Werror=strict-aliasing -O2"
-- AC_MSG_CHECKING([if the compiler is new enough for good aliasing rules])
-- AC_COMPILE_IFELSE([
-- AC_LANG_PROGRAM([
-- #include <ev.h>
--
-- static void cb (struct ev_loop *l, ev_timer *t, int e) { }
-- static ev_timer timer;
-+ AS_IF([test "x$LIBEV_LIBS" != "x"], [
-+ old_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $LIBEV_CFLAGS -Werror=strict-aliasing -O2"
-+ AC_MSG_CHECKING([if the compiler is new enough for good aliasing rules])
-+ AC_COMPILE_IFELSE([
-+ AC_LANG_PROGRAM([
-+ #include <ev.h>
-+
-+ static void cb (struct ev_loop *l, ev_timer *t, int e) { }
-+ static ev_timer timer;
-+ ], [
-+ ev_timer_init (&timer, cb, 0, .1);
-+ ])
- ], [
-- ev_timer_init (&timer, cb, 0, .1);
-+ AC_MSG_RESULT([yes])
-+ ], [
-+ AC_MSG_RESULT([no])
-+ LIBEV_CFLAGS="$LIBEV_CFLAGS -Wno-strict-aliasing"
- ])
-- ], [
-- AC_MSG_RESULT([yes])
-- ], [
-- AC_MSG_RESULT([no])
-- LIBEV_CFLAGS="$LIBEV_CFLAGS -Wno-strict-aliasing"
-+ CFLAGS="$old_CFLAGS"
- ])
-- CFLAGS="$old_CFLAGS"
- ])
-+AM_CONDITIONAL([HAVE_GLIB], [test "x$GLIB_LIBS" != "x"])
- AM_CONDITIONAL([HAVE_LIBEV], [test "x$LIBEV_LIBS" != "x"])
-+AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$enable_examples" != "xno" ])
-
- dnl FUSE 3 is optional to build the nbdfuse program.
- AC_ARG_ENABLE([fuse],
-@@ -397,6 +407,7 @@ AS_IF([test "x$enable_fuse" != "xno"],[
- ])
- AM_CONDITIONAL([HAVE_FUSE],[test "x$enable_fuse" != "xno"])
-
-+
- dnl libublksrv is optional to build the nbdublk program.
- AC_ARG_ENABLE([ublk],
- AS_HELP_STRING([--disable-ublk], [disable ublk (nbdublk) support]),
diff --git a/sys-libs/libnbd/files/libnbd-1.24.0-build-define-TLS_PRIORITY-unconditionally.patch b/sys-libs/libnbd/files/libnbd-1.24.0-build-define-TLS_PRIORITY-unconditionally.patch
deleted file mode 100644
index 817d099b1764..000000000000
--- a/sys-libs/libnbd/files/libnbd-1.24.0-build-define-TLS_PRIORITY-unconditionally.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index 6c7cae8a..dafcf606 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -275,8 +275,6 @@ AS_IF([test "$GNUTLS_LIBS" != ""],[
- [tls_priority=$withval],
- [tls_priority=NORMAL])
- AC_MSG_RESULT([$tls_priority])
-- AC_DEFINE_UNQUOTED([TLS_PRIORITY],["$tls_priority"],
-- [Default TLS session priority string])
-
- # Check for working <gnutls/socket.h>. This is only needed for
- # gnutls 3.7.9 and no other version (unfortunately used by Debian
-@@ -299,6 +297,11 @@ AS_IF([test "$GNUTLS_LIBS" != ""],[
- LIBS="$old_LIBS"
- ])
-
-+dnl Define unconditionally because TLS_PRIORITY must be defined to
-+dnl compile, even if GNUTLS support isn't enabled
-+AC_DEFINE_UNQUOTED([TLS_PRIORITY],["$tls_priority"],
-+ [Default TLS session priority string])
-+
- dnl certtool (part of GnuTLS) for testing TLS with certificates.
- dnl macOS has its own program called certtool and packages the
- dnl GnuTLS tool as "gnutls-certtool".
diff --git a/sys-libs/libnbd/libnbd-1.18.1-r3.ebuild b/sys-libs/libnbd/libnbd-1.18.1-r3.ebuild
deleted file mode 100644
index 4179d5348ff8..000000000000
--- a/sys-libs/libnbd/libnbd-1.18.1-r3.ebuild
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-inherit bash-completion-r1 python-single-r1
-
-DESCRIPTION="NBD client library in userspace"
-HOMEPAGE="https://gitlab.com/nbdkit/libnbd"
-SRC_URI="https://download.libguestfs.org/libnbd/$(ver_cut 1-2)-stable/${P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS="amd64 ~ppc64 ~sparc ~x86"
-IUSE="fuse gnutls go ocaml python test"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
-
-# libxml2 - URI support
-RDEPEND="
- dev-libs/libxml2:=
- fuse? ( sys-fs/fuse:3= )
- gnutls? ( net-libs/gnutls:= )
- python? ( ${PYTHON_DEPS} )
- go? ( dev-lang/go )
- ocaml? ( >=dev-lang/ocaml-4.03:=[ocamlopt] )
-"
-DEPEND="
- ${RDEPEND}
- test? (
- sys-block/nbd[gnutls?]
- sys-block/nbdkit[gnutls?]
- )
-"
-BDEPEND="dev-lang/perl"
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # Some tests require impossible to provide features, such as fuse.
- # These are marked by requires_... in the functions.sh shell
- # library. Rather than listing these tests, let's list out the
- # impossible to support features and make them skip.
- cat <<-EOF >> tests/functions.sh.in || die
- requires_fuse ()
- {
- requires false
- }
- EOF
-
- # Broken under sandbox.
- cat <<-EOF > lib/test-fork-safe-execvpe.sh || die
- #!/bin/sh
- :
- EOF
-}
-
-src_configure() {
- local myeconfargs=(
- $(use_enable fuse)
- $(use_enable go golang)
- $(use_enable ocaml)
- $(use_enable python)
- $(use_with gnutls)
- --disable-rust # TODO(arsen): security bump takes priority
- --with-libxml2
- )
-
- export bashcompdir="$(get_bashcompdir)"
-
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- find "${ED}" -name '*.la' -delete || die
- use python && python_optimize
-}
diff --git a/sys-libs/libnbd/libnbd-1.22.5-r1.ebuild b/sys-libs/libnbd/libnbd-1.22.5-r1.ebuild
deleted file mode 100644
index f14ca40be95c..000000000000
--- a/sys-libs/libnbd/libnbd-1.22.5-r1.ebuild
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit autotools bash-completion-r1 dot-a python-single-r1
-
-MY_PV_1="$(ver_cut 1-2)"
-MY_PV_2="$(ver_cut 2)"
-[[ $(( ${MY_PV_2} % 2 )) -eq 0 ]] && SD="stable" || SD="development"
-
-DESCRIPTION="NBD client library in userspace"
-HOMEPAGE="https://gitlab.com/nbdkit/libnbd"
-SRC_URI="https://download.libguestfs.org/libnbd/${MY_PV_1}-${SD}/${P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc64 ~sparc ~x86"
-IUSE="examples fuse gnutls go ocaml python test"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
-
-# libxml2 - URI support
-RDEPEND="
- dev-libs/libxml2:=
- examples? ( dev-libs/glib
- dev-libs/libev )
- fuse? ( sys-fs/fuse:3 )
- gnutls? ( net-libs/gnutls:= )
- go? ( dev-lang/go )
- ocaml? ( >=dev-lang/ocaml-4.03:=[ocamlopt] )
- python? ( ${PYTHON_DEPS} )
-"
-DEPEND="
- ${RDEPEND}
- ocaml? ( dev-ml/findlib )
- test? ( sys-block/nbdkit[gnutls?]
- net-libs/gnutls:=[tools]
- ocaml? ( dev-ml/findlib[ocamlopt] )
-)
-"
-BDEPEND="dev-lang/perl"
-
-PATCHES=(
- "${FILESDIR}/${PN}-1.22.2-build-Remove-automagic-compiling-of-examples.patch"
- "${FILESDIR}/${PN}-1.22.2-Makefile.am-Conditionally-compile-some-SUBDIRS.patch"
- "${FILESDIR}/${PN}-1.22.5-which-hunt.patch"
-)
-
-pkg_setup() {
- if use python; then
- python_setup
- fi
-}
-
-src_prepare() {
- default
-
- # Some tests require impossible to provide features, such as fuse.
- # These are marked by requires_... in the functions.sh shell
- # library. Rather than listing these tests, let's list out the
- # impossible to support features and make them skip.
- cat <<-EOF >> tests/functions.sh.in || die
- requires_fuse ()
- {
- requires false
- }
- EOF
-
- # Broken under sandbox.
- cat <<-EOF > lib/test-fork-safe-execvpe.sh || die
- #!/bin/sh
- :
- EOF
-
- eautoreconf
-}
-
-src_configure() {
- # /usr/lib64/ocaml/nbd/libmlnbd.a
- # /usr/lib64/ocaml/stublibs/dllmlnbd.so
- use ocaml && lto-guarantee-fat
-
- local myeconfargs=(
- $(use_enable examples)
- $(use_enable fuse)
- $(use_enable go golang)
- $(use_enable ocaml)
- $(use_enable python)
- $(use_with gnutls)
- --disable-rust
- --disable-ublk # Not in portage
- --with-libxml2
- )
-
- export bashcompdir="$(get_bashcompdir)"
-
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- use fuse || bashcomp_alias nbdsh nbdfuse
- bashcomp_alias nbdsh nbdublk
-
- use ocaml && strip-lto-bytecode
-
- find "${ED}" -name '*.la' -delete || die
- use python && python_optimize
-}
diff --git a/sys-libs/libnbd/libnbd-1.23.9-r1.ebuild b/sys-libs/libnbd/libnbd-1.23.9-r1.ebuild
deleted file mode 100644
index 3ba76c14ef85..000000000000
--- a/sys-libs/libnbd/libnbd-1.23.9-r1.ebuild
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit autotools bash-completion-r1 dot-a python-single-r1
-
-MY_PV_1="$(ver_cut 1-2)"
-MY_PV_2="$(ver_cut 2)"
-[[ $(( ${MY_PV_2} % 2 )) -eq 0 ]] && SD="stable" || SD="development"
-
-DESCRIPTION="NBD client library in userspace"
-HOMEPAGE="https://gitlab.com/nbdkit/libnbd"
-SRC_URI="https://download.libguestfs.org/libnbd/${MY_PV_1}-${SD}/${P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS="amd64 ~loong ppc64 ~sparc ~x86"
-IUSE="examples fuse gnutls go ocaml python test"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
-
-# libxml2 - URI support
-RDEPEND="
- dev-libs/libxml2:=
- examples? ( dev-libs/glib
- dev-libs/libev )
- fuse? ( sys-fs/fuse:3 )
- gnutls? ( net-libs/gnutls:= )
- go? ( dev-lang/go )
- ocaml? ( >=dev-lang/ocaml-4.03:=[ocamlopt] )
- python? ( ${PYTHON_DEPS} )
-"
-DEPEND="
- ${RDEPEND}
- ocaml? ( dev-ml/findlib )
- test? ( sys-block/nbdkit[gnutls?]
- net-libs/gnutls:=[tools]
- ocaml? ( dev-ml/findlib[ocamlopt] )
-)
-"
-BDEPEND="dev-lang/perl"
-
-PATCHES=(
- "${FILESDIR}/${PN}-1.22.2-build-Remove-automagic-compiling-of-examples.patch"
- "${FILESDIR}/${PN}-1.22.2-Makefile.am-Conditionally-compile-some-SUBDIRS.patch"
- "${FILESDIR}/${PN}-1.22.5-which-hunt.patch"
-)
-
-pkg_setup() {
- if use python; then
- python_setup
- fi
-}
-
-src_prepare() {
- default
-
- # Some tests require impossible to provide features, such as fuse.
- # These are marked by requires_... in the functions.sh shell
- # library. Rather than listing these tests, let's list out the
- # impossible to support features and make them skip.
- cat <<-EOF >> tests/functions.sh.in || die
- requires_fuse ()
- {
- requires false
- }
- EOF
-
- # Broken under sandbox.
- cat <<-EOF > lib/test-fork-safe-execvpe.sh || die
- #!/bin/sh
- :
- EOF
-
- eautoreconf
-}
-
-src_configure() {
- # /usr/lib64/ocaml/nbd/libmlnbd.a
- # /usr/lib64/ocaml/stublibs/dllmlnbd.so
- use ocaml && lto-guarantee-fat
-
- local myeconfargs=(
- $(use_enable examples)
- $(use_enable fuse)
- $(use_enable go golang)
- $(use_enable ocaml)
- $(use_enable python)
- $(use_with gnutls)
- --disable-rust
- --disable-ublk # Not in portage
- --with-libxml2
- )
-
- export bashcompdir="$(get_bashcompdir)"
-
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- use fuse || bashcomp_alias nbdsh nbdfuse
- bashcomp_alias nbdsh nbdublk
-
- use ocaml && strip-lto-bytecode
-
- find "${ED}" -name '*.la' -delete || die
- use python && python_optimize
-}
diff --git a/sys-libs/libnbd/libnbd-1.24.0-r1.ebuild b/sys-libs/libnbd/libnbd-1.24.0-r1.ebuild
deleted file mode 100644
index 3c2ace600c8a..000000000000
--- a/sys-libs/libnbd/libnbd-1.24.0-r1.ebuild
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit autotools bash-completion-r1 dot-a python-single-r1
-
-MY_PV_1="$(ver_cut 1-2)"
-MY_PV_2="$(ver_cut 2)"
-[[ $(( ${MY_PV_2} % 2 )) -eq 0 ]] && SD="stable" || SD="development"
-
-DESCRIPTION="NBD client library in userspace"
-HOMEPAGE="https://gitlab.com/nbdkit/libnbd"
-SRC_URI="https://download.libguestfs.org/libnbd/${MY_PV_1}-${SD}/${P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~sparc ~x86"
-IUSE="examples fuse gnutls go ocaml python test"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
-
-# libxml2 - URI support
-RDEPEND="
- dev-libs/libxml2:=
- examples? ( dev-libs/glib
- dev-libs/libev )
- fuse? ( sys-fs/fuse:3 )
- gnutls? ( net-libs/gnutls:= )
- go? ( dev-lang/go )
- ocaml? ( >=dev-lang/ocaml-4.03:=[ocamlopt] )
- python? ( ${PYTHON_DEPS} )
-"
-DEPEND="
- ${RDEPEND}
- ocaml? ( dev-ml/findlib )
- test? ( sys-block/nbdkit[gnutls?]
- net-libs/gnutls:=[tools]
- ocaml? ( dev-ml/findlib[ocamlopt] )
-)
-"
-BDEPEND="dev-lang/perl"
-
-PATCHES=(
- "${FILESDIR}/${PN}-1.24.0-build-Remove-automagic-compiling-of-examples.patch"
- "${FILESDIR}/${PN}-1.24.0-Makefile.am-Conditionally-compile-some-SUBDIRS.patch"
- "${FILESDIR}/${PN}-1.24.0-build-define-TLS_PRIORITY-unconditionally.patch"
- "${FILESDIR}/${PN}-1.22.5-which-hunt.patch"
-)
-
-pkg_setup() {
- if use python; then
- python_setup
- fi
-}
-
-src_prepare() {
- default
-
- # Some tests require impossible to provide features, such as fuse.
- # These are marked by requires_... in the functions.sh shell
- # library. Rather than listing these tests, let's list out the
- # impossible to support features and make them skip.
- cat <<-EOF >> tests/functions.sh.in || die
- requires_fuse ()
- {
- requires false
- }
- EOF
-
- # Broken under sandbox.
- cat <<-EOF > lib/test-fork-safe-execvpe.sh || die
- #!/bin/sh
- :
- EOF
-
- eautoreconf
-}
-
-src_configure() {
- # /usr/lib64/ocaml/nbd/libmlnbd.a
- # /usr/lib64/ocaml/stublibs/dllmlnbd.so
- use ocaml && lto-guarantee-fat
-
- local myeconfargs=(
- $(use_enable examples)
- $(use_enable fuse)
- $(use_enable go golang)
- $(use_enable ocaml)
- $(use_enable python)
- $(use_with gnutls)
- --with-bash-completions
- --disable-rust
- --disable-ublk # Not in portage
- --with-libxml2
- )
-
- export bashcompdir="$(get_bashcompdir)"
-
- BASH_COMPLETION_CFLAGS=" " BASH_COMPLETION_LIBS=" "\
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- use fuse || bashcomp_alias nbdsh nbdfuse
- bashcomp_alias nbdsh nbdublk
- use python || bashcomp_alias nbdsh nbddiscard nbdzero
-
- use ocaml && strip-lto-bytecode
-
- find "${ED}" -name '*.la' -delete || die
- use python && python_optimize
-}
diff --git a/sys-libs/libnbd/metadata.xml b/sys-libs/libnbd/metadata.xml
deleted file mode 100644
index 67433ebdc158..000000000000
--- a/sys-libs/libnbd/metadata.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>arsen@gentoo.org</email>
- <name>Arsen Arsenović</name>
- </maintainer>
- <upstream>
- <remote-id type="gitlab">nbdkit/libnbd</remote-id>
- </upstream>
- <use>
- <flag name="fuse">
- Install the <pkg>sys-fs/fuse</pkg> powered nbdfuse.
- </flag>
- <flag name="go">
- Build bindings for <pkg>dev-lang/go</pkg>
- </flag>
- </use>
-</pkgmetadata>
diff --git a/sys-libs/libnvidia-container/Manifest b/sys-libs/libnvidia-container/Manifest
deleted file mode 100644
index fa27fc8088e8..000000000000
--- a/sys-libs/libnvidia-container/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST libnvidia-container-1.18.0.tar.gz 1616152 BLAKE2B 86316e79209733be795b16570460fe2bd90f16b8279c990ae7c562495cc163ab2220f731205efd467884580aa04446a3ed266a2bd4a08bb5fa7ce09cf110f37c SHA512 230b6d3b0a29a54796cebdc212b4cb4b2249d8bb370e97778be88093b6d36153d1325a5755ef69d5b856cfc6b9a904e30d39466d86efd3369b2c838fa57cd7e9
-DIST libnvidia-container-1.19.0.tar.gz 1617812 BLAKE2B 159074dc894c83f5fd9b23ece2c6c40eb1e540f1ed8a4af4c51400ae2745dbca49d5874a40a2abf24cb3dd61b60c83fcf0f63843145aaa42f47020e36513c89c SHA512 ca90b60cb7cc2762d95308276fa9e3ec5fb03970ea9bb51553854a9bc232feb69e31f23bbf7c2784c3d67d27f24d8de4f4157f762f8448c6f1d0545b4c1d938e
-DIST libnvidia-container-nvidia-modprobe-550.54.14.tar.gz 47147 BLAKE2B 7b334877d98d0c75d5750192dea868436938852443ced14e74e59076ed4d8be9e361cdefbe48295d87bb91ac4565152ec3f3233479b3da19bb8baf8e7ef53cd6 SHA512 279228aa315ff5fd1a23df23527aff58b2319f11f9fc7d939fa285ea933b4cc6d223451e20ecf7f50baba9f6c9c100e57cb77675d0d17fa77f19d3fea2ccc193
diff --git a/sys-libs/libnvidia-container/files/libnvidia-container-1.17.0-fix-makefile-r1.patch b/sys-libs/libnvidia-container/files/libnvidia-container-1.17.0-fix-makefile-r1.patch
deleted file mode 100644
index d68aa9e84e60..000000000000
--- a/sys-libs/libnvidia-container/files/libnvidia-container-1.17.0-fix-makefile-r1.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-Base on The patch from Arch[1] but better suited to Gentoo needs.
-
-[1]: https://gitlab.archlinux.org/archlinux/packaging/packages/libnvidia-container/-/raw/a642a3cc488862a8483075ee63f8a8c470860149/fix-makefile.patch
-diff --git a/Makefile b/Makefile
-index 6fb6976..c6f26d3 100644
---- a/Makefile
-+++ b/Makefile
-@@ -18,18 +18,16 @@
- ##### Global variables #####
-
- WITH_NVCGO ?= yes
--WITH_LIBELF ?= no
--WITH_TIRPC ?= no
-+WITH_TIRPC ?= yes
- WITH_SECCOMP ?= yes
-
- ##### Global definitions #####
-
--export prefix = /usr/local
-+export prefix ?= /usr
- export exec_prefix = $(prefix)
- export bindir = $(exec_prefix)/bin
--export libdir = $(exec_prefix)/lib
-+export libdir ?= $(exec_prefix)/lib64
- export docdir = $(prefix)/share/doc
--export libdbgdir = $(prefix)/lib/debug$(libdir)
- export includedir = $(prefix)/include
- export pkgconfdir = $(libdir)/pkgconfig
-
-@@ -158,20 +156,17 @@ ifeq ($(WITH_NVCGO), yes)
- LIB_CPPFLAGS += -DWITH_NVCGO
- LIB_LDLIBS_SHARED += -lpthread
- endif
--ifeq ($(WITH_LIBELF), yes)
-+# Build with system libelf unconditionally
- LIB_CPPFLAGS += -DWITH_LIBELF
- LIB_LDLIBS_SHARED += -lelf
--else
--LIB_LDLIBS_STATIC += -l:libelf.a
--endif
- ifeq ($(WITH_TIRPC), yes)
--LIB_CPPFLAGS += -isystem $(DEPS_DIR)$(includedir)/tirpc -DWITH_TIRPC
--LIB_LDLIBS_STATIC += -l:libtirpc.a
--LIB_LDLIBS_SHARED += -lpthread
-+LIB_CPPFLAGS += -isystem $(includedir)/tirpc -DWITH_TIRPC
-+# dynamically link with system tirpc
-+LIB_LDLIBS_SHARED += -lpthread -ltirpc
- endif
- ifeq ($(WITH_SECCOMP), yes)
--LIB_CPPFLAGS += -DWITH_SECCOMP $(shell pkg-config --cflags libseccomp)
--LIB_LDLIBS_SHARED += $(shell pkg-config --libs libseccomp)
-+LIB_CPPFLAGS += -DWITH_SECCOMP $(shell $(PKG_CONFIG) --cflags libseccomp)
-+LIB_LDLIBS_SHARED += $(shell $(PKG_CONFIG) --libs libseccomp)
- endif
- LIB_CPPFLAGS += $(CPPFLAGS)
- LIB_CFLAGS += $(CFLAGS)
-@@ -222,22 +217,14 @@ $(BIN_OBJS): %.o: %.c | shared
- -include $(DEPENDENCIES)
-
- $(LIB_SHARED): $(LIB_OBJS)
-- $(MKDIR) -p $(DEBUG_DIR)
- $(CC) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(LIB_LDFLAGS) $(OUTPUT_OPTION) $^ $(LIB_SCRIPT) $(LIB_LDLIBS)
-- $(OBJCPY) --only-keep-debug $@ $(LIB_SONAME)
-- $(OBJCPY) --add-gnu-debuglink=$(LIB_SONAME) $@
-- $(MV) $(LIB_SONAME) $(DEBUG_DIR)
-- $(STRIP) --strip-unneeded -R .comment $@
-
- $(LIB_STATIC_OBJ): $(LIB_OBJS)
- # FIXME Handle user-defined LDFLAGS and LDLIBS
- $(LD) -d -r --exclude-libs ALL -L$(DEPS_DIR)$(libdir) $(OUTPUT_OPTION) $^ $(LIB_LDLIBS_STATIC)
-- $(OBJCPY) --localize-hidden $@
-- $(STRIP) --strip-unneeded -R .comment $@
-
- $(BIN_NAME): $(BIN_OBJS)
- $(CC) $(BIN_CFLAGS) $(BIN_CPPFLAGS) $(BIN_LDFLAGS) $(OUTPUT_OPTION) $^ $(BIN_SCRIPT) $(BIN_LDLIBS)
-- $(STRIP) --strip-unneeded -R .comment $@
-
- ##### Public rules #####
-
-@@ -262,15 +249,9 @@ deps: $(LIB_RPC_SRCS) $(BUILD_DEFS)
- ifeq ($(WITH_NVCGO), yes)
- $(MAKE) -f $(MAKE_DIR)/nvcgo.mk DESTDIR=$(DEPS_DIR) MAJOR=$(MAJOR) VERSION=$(VERSION) LIB_NAME=$(LIBGO_NAME) install
- endif
--ifeq ($(WITH_LIBELF), no)
-- $(MAKE) -f $(MAKE_DIR)/elftoolchain.mk DESTDIR=$(DEPS_DIR) install
--endif
--ifeq ($(WITH_TIRPC), yes)
-- $(MAKE) -f $(MAKE_DIR)/libtirpc.mk DESTDIR=$(DEPS_DIR) install
--endif
-
- install: all
-- $(INSTALL) -d -m 755 $(addprefix $(DESTDIR),$(includedir) $(bindir) $(libdir) $(docdir) $(libdbgdir) $(pkgconfdir))
-+ $(INSTALL) -d -m 755 $(addprefix $(DESTDIR),$(includedir) $(bindir) $(libdir) $(pkgconfdir))
- # Install header files
- $(INSTALL) -m 644 $(LIB_INCS) $(DESTDIR)$(includedir)
- # Install library files
-@@ -279,18 +260,18 @@ install: all
- $(LN) -sf $(LIB_SONAME) $(DESTDIR)$(libdir)/$(LIB_SYMLINK)
- ifeq ($(WITH_NVCGO), yes)
- $(INSTALL) -m 755 $(DEPS_DIR)$(libdir)/$(LIBGO_SHARED) $(DESTDIR)$(libdir)
-+ # FIXME: for some reason ldconfig stopped creating this symlink after applying Arch Linux LDFLAGS
-+ $(LN) -sf $(LIBGO_SHARED) $(DESTDIR)$(libdir)/$(LIBGO_SONAME)
- $(LN) -sf $(LIBGO_SONAME) $(DESTDIR)$(libdir)/$(LIBGO_SYMLINK)
- endif
- $(LDCONFIG) -n $(DESTDIR)$(libdir)
-- # Install debugging symbols
-- $(INSTALL) -m 644 $(DEBUG_DIR)/$(LIB_SONAME) $(DESTDIR)$(libdbgdir)
- # Install configuration files
- $(MAKE_DIR)/$(LIB_PKGCFG).in "$(strip $(VERSION))" "$(strip $(LIB_LDLIBS_SHARED))" > $(DESTDIR)$(pkgconfdir)/$(LIB_PKGCFG)
- # Install binary files
- $(INSTALL) -m 755 $(BIN_NAME) $(DESTDIR)$(bindir)
- # Install documentation files
-- $(INSTALL) -d -m 755 $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION)
-- $(INSTALL) -m 644 $(DOC_FILES) $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION)
-+ # $(INSTALL) -d -m 755 $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION)
-+ # $(INSTALL) -m 644 $(DOC_FILES) $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION)
-
- uninstall:
- # Uninstall header files
-@@ -300,14 +281,12 @@ uninstall:
- ifeq ($(WITH_NVCGO), yes)
- $(RM) $(addprefix $(DESTDIR)$(libdir)/,$(LIBGO_SHARED) $(LIBGO_SONAME) $(LIBGO_SYMLINK))
- endif
-- # Uninstall debugging symbols
-- $(RM) $(DESTDIR)$(libdbgdir)/$(LIB_SONAME)
- # Uninstall configuration files
- $(RM) $(DESTDIR)$(pkgconfdir)/$(LIB_PKGCFG)
- # Uninstall binary files
- $(RM) $(DESTDIR)$(bindir)/$(BIN_NAME)
- # Uninstall documentation files
-- $(RM) -r $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION)
-+ # $(RM) -r $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION)
-
- dist: DESTDIR:=$(DIST_DIR)/$(LIB_NAME)_$(VERSION)$(addprefix -,$(TAG))
- dist: install
-@@ -320,12 +299,6 @@ depsclean:
- ifeq ($(WITH_NVCGO), yes)
- -$(MAKE) -f $(MAKE_DIR)/nvcgo.mk clean
- endif
--ifeq ($(WITH_LIBELF), no)
-- -$(MAKE) -f $(MAKE_DIR)/elftoolchain.mk clean
--endif
--ifeq ($(WITH_TIRPC), yes)
-- -$(MAKE) -f $(MAKE_DIR)/libtirpc.mk clean
--endif
-
- mostlyclean:
- $(RM) $(LIB_OBJS) $(LIB_STATIC_OBJ) $(BIN_OBJS) $(DEPENDENCIES)
-diff --git a/mk/common.mk b/mk/common.mk
-index f6d5fbf..594ec08 100644
---- a/mk/common.mk
-+++ b/mk/common.mk
-@@ -19,6 +19,7 @@ RPCGEN ?= rpcgen
- BMAKE ?= MAKEFLAGS= bmake
- DOCKER ?= docker
- PATCH ?= patch
-+PKG_CONFIG ?= pkg-config
-
- UID := $(shell id -u)
- GID := $(shell id -g)
-diff --git a/mk/nvcgo.mk b/mk/nvcgo.mk
-index 0060f0e..877a72b 100644
---- a/mk/nvcgo.mk
-+++ b/mk/nvcgo.mk
-@@ -17,7 +17,7 @@ include $(MAKE_DIR)/common.mk
- ##### Source definitions #####
-
- PREFIX := nvcgo
--SRCS_DIR := $(DEPS_DIR)/src/$(PREFIX)
-+SRCS_DIR := $(CURDIR)/src/$(PREFIX)
- VERSION := $(VERSION)
-
- ##### Public rules #####
-@@ -25,9 +25,6 @@ VERSION := $(VERSION)
- .PHONY: all install clean
-
- build:
-- $(RM) -rf $(SRCS_DIR)
-- $(CP) -R $(CURDIR)/src/$(PREFIX) $(SRCS_DIR)
-- $(MAKE) -C $(SRCS_DIR) VERSION=$(VERSION) clean
- $(MAKE) -C $(SRCS_DIR) VERSION=$(VERSION) build
-
- install: build
-diff --git a/mk/nvidia-modprobe.mk b/mk/nvidia-modprobe.mk
-index 3406222..339275f 100644
---- a/mk/nvidia-modprobe.mk
-+++ b/mk/nvidia-modprobe.mk
-@@ -25,7 +25,7 @@ PATCH_FILE := $(MAKE_DIR)/nvidia-modprobe.patch
-
- ARFLAGS := -rU
- CPPFLAGS := -D_FORTIFY_SOURCE=2 -DNV_LINUX
--CFLAGS := -O2 -g -fdata-sections -ffunction-sections -fstack-protector -fno-strict-aliasing -fPIC
-+CFLAGS := -fdata-sections -ffunction-sections -fstack-protector -fno-strict-aliasing -fPIC $(CFLAGS)
-
- ##### Private rules #####
-
-diff --git a/src/nvcgo/Makefile b/src/nvcgo/Makefile
-index eaee95a..7d5bd74 100644
---- a/src/nvcgo/Makefile
-+++ b/src/nvcgo/Makefile
-@@ -31,15 +31,15 @@ OBJ_NAME := $(LIB_NAME).so
- HDR_NAME := $(LIB_NAME).h
- CTYPES_H := ctypes.h
-
--CGO_CFLAGS := -std=gnu11 -O2
--CGO_LDFLAGS := -Wl,--gc-sections -Wl,-s -Wl,-soname,$(LIB_SONAME)
-+CGO_CFLAGS := -std=gnu11 $(CGO_CFLAGS)
-+CGO_LDFLAGS := -Wl,--gc-sections -Wl,-soname,$(LIB_SONAME) $(CGO_LDFLAGS)
-
- build: $(OBJ_NAME)
-
- $(OBJ_NAME): $(wildcard $(CURDIR)/*.go) $(wildcard */*.go)
- export CGO_CFLAGS="$(CGO_CFLAGS)"; \
-- export CGO_LDFLAGS="$(CGO_LDFLAGS)"; \
-- $(GO) build -o $(@) -ldflags "-s -w" -buildmode=c-shared .
-+ export CGO_LDFLAGS="-Wl,--gc-sections -Wl,-soname,$(LIB_SONAME) $(CGO_LDFLAGS)"; \
-+ $(GO) build -o $(@) -ldflags "$(GO_LDFLAGS)" -buildmode=c-shared .
-
- install: $(OBJ_NAME)
- $(INSTALL) -d -m 755 $(addprefix $(DESTDIR),$(libdir) $(includedir)/$(PKG_NAME))
diff --git a/sys-libs/libnvidia-container/files/libnvidia-container-1.17.4-go-1.24.patch b/sys-libs/libnvidia-container/files/libnvidia-container-1.17.4-go-1.24.patch
deleted file mode 100644
index e2439651dd04..000000000000
--- a/sys-libs/libnvidia-container/files/libnvidia-container-1.17.4-go-1.24.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-https://patch-diff.githubusercontent.com/raw/NVIDIA/libnvidia-container/pull/297.patch
-
-From 1c680195fdc85948d635286b72a6ad9f823b5987 Mon Sep 17 00:00:00 2001
-From: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
-Date: Thu, 13 Feb 2025 10:18:59 +0100
-Subject: [PATCH] Fix building with Go 1.24
-
-Go 1.24 does not allow defining methods on C types anymore, so make convert a function, not a method.
-
-Fixes the following error when building with Go 1.24:
-`./main.go:35:10: cannot define new methods on non-local type CDeviceRule`
-
-Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
----
- src/nvcgo/main.go | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/nvcgo/main.go b/src/nvcgo/main.go
-index 1523a06d..ed43be8e 100644
---- a/src/nvcgo/main.go
-+++ b/src/nvcgo/main.go
-@@ -32,7 +32,7 @@ func main() {}
- type CDeviceRule = C.struct_device_rule
-
- // Convert a C-based DeviceRule to a Go-based cgroup.DeviceRule
--func (r *CDeviceRule) convert() cgroup.DeviceRule {
-+func convert(r *CDeviceRule) cgroup.DeviceRule {
- return cgroup.DeviceRule{
- Allow: bool(r.allow),
- Type: C.GoString(r._type),
-@@ -67,7 +67,7 @@ func GetDeviceCGroupMountPath(version C.int, procRootPath *C.char, pid C.pid_t,
- return -1
- }
- *cgroupMountPath = C.CString(p)
-- *cgroupRootPrefix= C.CString(r)
-+ *cgroupRootPrefix = C.CString(r)
-
- return 0
- }
-@@ -100,7 +100,7 @@ func AddDeviceRules(version C.int, cgroupPath *C.char, crules []CDeviceRule, rer
-
- rules := make([]cgroup.DeviceRule, len(crules))
- for i, cr := range crules {
-- rules[i] = cr.convert()
-+ rules[i] = convert(&cr)
- }
-
- err = api.AddDeviceRules(C.GoString(cgroupPath), rules)
diff --git a/sys-libs/libnvidia-container/files/libnvidia-container-1.19.0-fix-makefile.patch b/sys-libs/libnvidia-container/files/libnvidia-container-1.19.0-fix-makefile.patch
deleted file mode 100644
index 4d4f43397da9..000000000000
--- a/sys-libs/libnvidia-container/files/libnvidia-container-1.19.0-fix-makefile.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-Base on The patch from Arch[1] but better suited to Gentoo needs.
-
-[1]: https://gitlab.archlinux.org/archlinux/packaging/packages/libnvidia-container/-/raw/84d2e8ae006a724744f664e6b40000569eab3b06/fix-makefile.patch
-diff --git a/Makefile b/Makefile
-index 1a5115c..5744615 100644
---- a/Makefile
-+++ b/Makefile
-@@ -18,18 +18,16 @@
- ##### Global variables #####
-
- WITH_NVCGO ?= yes
--WITH_LIBELF ?= no
--WITH_TIRPC ?= no
-+WITH_TIRPC ?= yes
- WITH_SECCOMP ?= yes
-
- ##### Global definitions #####
-
--export prefix = /usr/local
-+export prefix ?= /usr
- export exec_prefix = $(prefix)
- export bindir = $(exec_prefix)/bin
--export libdir = $(exec_prefix)/lib
-+export libdir ?= $(exec_prefix)/lib64
- export docdir = $(prefix)/share/doc
--export libdbgdir = $(prefix)/lib/debug$(libdir)
- export includedir = $(prefix)/include
- export pkgconfdir = $(libdir)/pkgconfig
-
-@@ -156,20 +154,17 @@ ifeq ($(WITH_NVCGO), yes)
- LIB_CPPFLAGS += -DWITH_NVCGO
- LIB_LDLIBS_SHARED += -lpthread
- endif
--ifeq ($(WITH_LIBELF), yes)
-+# Build with system libelf unconditionally
- LIB_CPPFLAGS += -DWITH_LIBELF
- LIB_LDLIBS_SHARED += -lelf
--else
--LIB_LDLIBS_STATIC += -l:libelf.a
--endif
- ifeq ($(WITH_TIRPC), yes)
--LIB_CPPFLAGS += -isystem $(DEPS_DIR)$(includedir)/tirpc -DWITH_TIRPC
--LIB_LDLIBS_STATIC += -l:libtirpc.a
--LIB_LDLIBS_SHARED += -lpthread
-+LIB_CPPFLAGS += -isystem $(includedir)/tirpc -DWITH_TIRPC
-+# dynamically link with system tirpc
-+LIB_LDLIBS_SHARED += -lpthread -ltirpc
- endif
- ifeq ($(WITH_SECCOMP), yes)
--LIB_CPPFLAGS += -DWITH_SECCOMP $(shell pkg-config --cflags libseccomp)
--LIB_LDLIBS_SHARED += $(shell pkg-config --libs libseccomp)
-+LIB_CPPFLAGS += -DWITH_SECCOMP $(shell $(PKG_CONFIG) --cflags libseccomp)
-+LIB_LDLIBS_SHARED += $(shell $(PKG_CONFIG) --libs libseccomp)
- endif
- LIB_CPPFLAGS += $(CPPFLAGS)
- LIB_CFLAGS += $(CFLAGS)
-@@ -220,22 +215,14 @@ $(BIN_OBJS): %.o: %.c | shared
- -include $(DEPENDENCIES)
-
- $(LIB_SHARED): $(LIB_OBJS)
-- $(MKDIR) -p $(DEBUG_DIR)
- $(CC) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(LIB_LDFLAGS) $(OUTPUT_OPTION) $^ $(LIB_SCRIPT) $(LIB_LDLIBS)
-- $(OBJCPY) --only-keep-debug $@ $(LIB_SONAME)
-- $(OBJCPY) --add-gnu-debuglink=$(LIB_SONAME) $@
-- $(MV) $(LIB_SONAME) $(DEBUG_DIR)
-- $(STRIP) --strip-unneeded -R .comment $@
-
- $(LIB_STATIC_OBJ): $(LIB_OBJS)
- # FIXME Handle user-defined LDFLAGS and LDLIBS
- $(LD) -d -r --exclude-libs ALL -L$(DEPS_DIR)$(libdir) $(OUTPUT_OPTION) $^ $(LIB_LDLIBS_STATIC)
-- $(OBJCPY) --localize-hidden $@
-- $(STRIP) --strip-unneeded -R .comment $@
-
- $(BIN_NAME): $(BIN_OBJS)
- $(CC) $(BIN_CFLAGS) $(BIN_CPPFLAGS) $(BIN_LDFLAGS) $(OUTPUT_OPTION) $^ $(BIN_SCRIPT) $(BIN_LDLIBS)
-- $(STRIP) --strip-unneeded -R .comment $@
-
- ##### Public rules #####
-
-@@ -260,15 +247,9 @@ deps: $(LIB_RPC_SRCS) $(BUILD_DEFS)
- ifeq ($(WITH_NVCGO), yes)
- $(MAKE) -f $(MAKE_DIR)/nvcgo.mk DESTDIR=$(DEPS_DIR) VERSION_MAJOR=$(VERSION_MAJOR) VERSION=$(VERSION) LIB_NAME=$(LIBGO_NAME) install
- endif
--ifeq ($(WITH_LIBELF), no)
-- $(MAKE) -f $(MAKE_DIR)/elftoolchain.mk DESTDIR=$(DEPS_DIR) install
--endif
--ifeq ($(WITH_TIRPC), yes)
-- $(MAKE) -f $(MAKE_DIR)/libtirpc.mk DESTDIR=$(DEPS_DIR) install
--endif
-
- install: all
-- $(INSTALL) -d -m 755 $(addprefix $(DESTDIR),$(includedir) $(bindir) $(libdir) $(docdir) $(libdbgdir) $(pkgconfdir))
-+ $(INSTALL) -d -m 755 $(addprefix $(DESTDIR),$(includedir) $(bindir) $(libdir) $(pkgconfdir))
- # Install header files
- $(INSTALL) -m 644 $(LIB_INCS) $(DESTDIR)$(includedir)
- # Install library files
-@@ -277,18 +258,18 @@ install: all
- $(LN) -sf $(LIB_SONAME) $(DESTDIR)$(libdir)/$(LIB_SYMLINK)
- ifeq ($(WITH_NVCGO), yes)
- $(INSTALL) -m 755 $(DEPS_DIR)$(libdir)/$(LIBGO_SHARED) $(DESTDIR)$(libdir)
-+ # FIXME: for some reason ldconfig stopped creating this symlink after applying Arch Linux LDFLAGS
-+ $(LN) -sf $(LIBGO_SHARED) $(DESTDIR)$(libdir)/$(LIBGO_SONAME)
- $(LN) -sf $(LIBGO_SONAME) $(DESTDIR)$(libdir)/$(LIBGO_SYMLINK)
- endif
- $(LDCONFIG) -n $(DESTDIR)$(libdir)
-- # Install debugging symbols
-- $(INSTALL) -m 644 $(DEBUG_DIR)/$(LIB_SONAME) $(DESTDIR)$(libdbgdir)
- # Install configuration files
- $(MAKE_DIR)/$(LIB_PKGCFG).in "$(strip $(VERSION))" "$(strip $(LIB_LDLIBS_SHARED))" > $(DESTDIR)$(pkgconfdir)/$(LIB_PKGCFG)
- # Install binary files
- $(INSTALL) -m 755 $(BIN_NAME) $(DESTDIR)$(bindir)
- # Install documentation files
-- $(INSTALL) -d -m 755 $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION)
-- $(INSTALL) -m 644 $(DOC_FILES) $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION)
-+ # $(INSTALL) -d -m 755 $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION)
-+ # $(INSTALL) -m 644 $(DOC_FILES) $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION)
-
- uninstall:
- # Uninstall header files
-@@ -298,14 +279,12 @@ uninstall:
- ifeq ($(WITH_NVCGO), yes)
- $(RM) $(addprefix $(DESTDIR)$(libdir)/,$(LIBGO_SHARED) $(LIBGO_SONAME) $(LIBGO_SYMLINK))
- endif
-- # Uninstall debugging symbols
-- $(RM) $(DESTDIR)$(libdbgdir)/$(LIB_SONAME)
- # Uninstall configuration files
- $(RM) $(DESTDIR)$(pkgconfdir)/$(LIB_PKGCFG)
- # Uninstall binary files
- $(RM) $(DESTDIR)$(bindir)/$(BIN_NAME)
- # Uninstall documentation files
-- $(RM) -r $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION)
-+ # $(RM) -r $(DESTDIR)$(docdir)/$(LIB_NAME)-$(VERSION)
-
- dist: DESTDIR:=$(DIST_DIR)/$(LIB_NAME)_$(VERSION)$(addprefix -,$(TAG))
- dist: install
-@@ -318,12 +297,6 @@ depsclean:
- ifeq ($(WITH_NVCGO), yes)
- -$(MAKE) -f $(MAKE_DIR)/nvcgo.mk clean
- endif
--ifeq ($(WITH_LIBELF), no)
-- -$(MAKE) -f $(MAKE_DIR)/elftoolchain.mk clean
--endif
--ifeq ($(WITH_TIRPC), yes)
-- -$(MAKE) -f $(MAKE_DIR)/libtirpc.mk clean
--endif
-
- mostlyclean:
- $(RM) $(LIB_OBJS) $(LIB_STATIC_OBJ) $(BIN_OBJS) $(DEPENDENCIES)
-diff --git a/mk/common.mk b/mk/common.mk
-index f6d5fbf..594ec08 100644
---- a/mk/common.mk
-+++ b/mk/common.mk
-@@ -19,6 +19,7 @@ RPCGEN ?= rpcgen
- BMAKE ?= MAKEFLAGS= bmake
- DOCKER ?= docker
- PATCH ?= patch
-+PKG_CONFIG ?= pkg-config
-
- UID := $(shell id -u)
- GID := $(shell id -g)
-diff --git a/mk/nvcgo.mk b/mk/nvcgo.mk
-index 0060f0e..877a72b 100644
---- a/mk/nvcgo.mk
-+++ b/mk/nvcgo.mk
-@@ -17,7 +17,7 @@ include $(MAKE_DIR)/common.mk
- ##### Source definitions #####
-
- PREFIX := nvcgo
--SRCS_DIR := $(DEPS_DIR)/src/$(PREFIX)
-+SRCS_DIR := $(CURDIR)/src/$(PREFIX)
- VERSION := $(VERSION)
-
- ##### Public rules #####
-@@ -25,9 +25,6 @@ VERSION := $(VERSION)
- .PHONY: all install clean
-
- build:
-- $(RM) -rf $(SRCS_DIR)
-- $(CP) -R $(CURDIR)/src/$(PREFIX) $(SRCS_DIR)
-- $(MAKE) -C $(SRCS_DIR) VERSION=$(VERSION) clean
- $(MAKE) -C $(SRCS_DIR) VERSION=$(VERSION) build
-
- install: build
-diff --git a/mk/nvidia-modprobe.mk b/mk/nvidia-modprobe.mk
-index 1633e0c..2dd519a 100644
---- a/mk/nvidia-modprobe.mk
-+++ b/mk/nvidia-modprobe.mk
-@@ -25,7 +25,7 @@ PATCH_FILE := $(MAKE_DIR)/nvidia-modprobe.patch
-
- ARFLAGS := -rU
- CPPFLAGS := -D_FORTIFY_SOURCE=2 -DNV_LINUX
--CFLAGS := -O2 -g -fdata-sections -ffunction-sections -fstack-protector -fno-strict-aliasing -fPIC
-+CFLAGS := -fdata-sections -ffunction-sections -fstack-protector -fno-strict-aliasing -fPIC $(CFLAGS)
-
- ##### Private rules #####
-
-diff --git a/src/nvcgo/Makefile b/src/nvcgo/Makefile
-index d2e3667..a8c6bf5 100644
---- a/src/nvcgo/Makefile
-+++ b/src/nvcgo/Makefile
-@@ -31,15 +31,15 @@ OBJ_NAME := $(LIB_NAME).so
- HDR_NAME := $(LIB_NAME).h
- CTYPES_H := ctypes.h
-
--CGO_CFLAGS := -std=gnu11 -O2
--CGO_LDFLAGS := -Wl,--gc-sections -Wl,-s -Wl,-soname,$(LIB_SONAME)
-+CGO_CFLAGS := -std=gnu11 $(CGO_CFLAGS)
-+CGO_LDFLAGS := -Wl,--gc-sections -Wl,-soname,$(LIB_SONAME) $(CGO_LDFLAGS)
-
- build: $(OBJ_NAME)
-
- $(OBJ_NAME): $(wildcard $(CURDIR)/*.go) $(wildcard */*.go)
- export CGO_CFLAGS="$(CGO_CFLAGS)"; \
-- export CGO_LDFLAGS="$(CGO_LDFLAGS)"; \
-- $(GO) build -buildvcs=false -o $(@) -ldflags "-s -w" -buildmode=c-shared .
-+ export CGO_LDFLAGS="-Wl,--gc-sections -Wl,-soname,$(LIB_SONAME) $(CGO_LDFLAGS)"; \
-+ $(GO) build -buildvcs=false -o $(@) -ldflags "$(GO_LDFLAGS)" -buildmode=c-shared .
-
- install: $(OBJ_NAME)
- $(INSTALL) -d -m 755 $(addprefix $(DESTDIR),$(libdir) $(includedir)/$(PKG_NAME))
diff --git a/sys-libs/libnvidia-container/libnvidia-container-1.18.0.ebuild b/sys-libs/libnvidia-container/libnvidia-container-1.18.0.ebuild
deleted file mode 100644
index 7647f0aac501..000000000000
--- a/sys-libs/libnvidia-container/libnvidia-container-1.18.0.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-# check the VERSION in libnvidia-container/mk/nvidia-modprobe.mk
-NVMODV="550.54.14"
-
-DESCRIPTION="NVIDIA container runtime library"
-HOMEPAGE="https://github.com/NVIDIA/libnvidia-container"
-
-if [[ "${PV}" == "9999" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/NVIDIA/${PN}.git"
-else
- SRC_URI="
- https://github.com/NVIDIA/${PN}/archive/v${PV/_rc/-rc.}.tar.gz -> ${P}.tar.gz
- "
- S="${WORKDIR}/${PN}-${PV/_rc/-rc.}"
- KEYWORDS="amd64"
-fi
-NVMODS="${WORKDIR}/nvidia-modprobe-${NVMODV}"
-SRC_URI+="
- https://github.com/NVIDIA/nvidia-modprobe/archive/${NVMODV}.tar.gz -> ${PN}-nvidia-modprobe-${NVMODV}.tar.gz
-"
-
-LICENSE="Apache-2.0"
-SLOT="0/${PV}"
-IUSE="+seccomp static-libs"
-
-# libtirpc
-# NOTE It seams that library also has optional support for net-libs/libtirpc, but I didn't
-# manage to build without it, probably the support for that build-roted away.
-DEPEND="
- net-libs/libtirpc:=
- sys-libs/libcap
- virtual/libelf:=
- seccomp? ( sys-libs/libseccomp )
-"
-
-RDEPEND="${DEPEND}
- elibc_glibc? ( x11-drivers/nvidia-drivers )
-"
-
-BDEPEND="
- dev-lang/go
- net-libs/rpcsvc-proto
- sys-apps/lsb-release
- virtual/pkgconfig
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-1.17.0-fix-makefile-r1.patch"
-)
-
-DOCS=( NOTICE README.md )
-
-src_unpack() {
- default_src_unpack
- if [[ "${PV}" == "9999" ]] ; then
- git-r3_src_unpack
- fi
-}
-
-src_prepare() {
- # nvidia-modprobe patching based on libnvidia-container/mk/nvidia-modprobe.mk
- mkdir -p "${S}"/deps/src/nvidia-modprobe-"${NVMODV}" || die
- cp -r "${NVMODS}"/modprobe-utils/ "${S}"/deps/src/nvidia-modprobe-"${NVMODV}"/ || die
- touch "${S}/deps/src/nvidia-modprobe-${NVMODV}/.download_stamp" || die
- pushd "${S}/deps/src/nvidia-modprobe-${NVMODV}" || die
- eapply -p1 "${S}"/mk/nvidia-modprobe.patch
- popd || die
-
- if ! tc-is-gcc; then
- ewarn "libnvidia-container must be built with gcc because of option \"-fplan9-extensions\"!"
- ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc"
- export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar
- tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}"
- fi
-
- default
-}
-
-src_configure() {
- export GOPATH="${S}"
- export GOFLAGS="-mod=vendor"
- export CFLAGS="${CFLAGS}"
- export LDFLAGS="${LDFLAGS}"
- export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}"
- export CGO_LDFLAGS="${CGO_LDFLAGS:-$LDFLAGS}"
-
- tc-export LD OBJCOPY PKG_CONFIG
-
- # we could also set GO compiller, but it currently defaults to gccgo, but as for now I believe
- # most users will prefer dev-lang/go and they usually don't define GO="go" their make.conf either.
- # tc-export GO
-
- my_makeopts=(
- prefix="${EPREFIX}/usr"
- libdir="${EPREFIX}/usr/$(get_libdir)"
- GO_LDFLAGS="-compressdwarf=false -linkmode=external"
- WITH_SECCOMP="$(usex seccomp)"
- )
- # WITH_TIRPC="$(usex libtirpc)"
-
- if [[ "${PV}" != "9999" ]] ; then
- IFS='_' read -r MY_LIB_VERSION MY_LIB_TAG <<< "${PV}"
-
- my_makeopts=( "${my_makeopts[@]}"
- REVISION="${PV}"
- LIB_VERSION="${MY_LIB_VERSION}"
- LIB_TAG="${MY_LIB_TAG}"
- )
- fi
-}
-
-src_compile() {
- emake "${my_makeopts[@]}"
-}
-
-src_install() {
- emake "${my_makeopts[@]}" DESTDIR="${D}" install
- # Install docs
- einstalldocs # Bug 831705
- # Cleanup static libraries
- if ! use static-libs ; then
- find "${ED}" -name '*.a' -delete || die # Bug 783984
- fi
-}
diff --git a/sys-libs/libnvidia-container/libnvidia-container-1.19.0.ebuild b/sys-libs/libnvidia-container/libnvidia-container-1.19.0.ebuild
deleted file mode 100644
index 4fdd37fd298c..000000000000
--- a/sys-libs/libnvidia-container/libnvidia-container-1.19.0.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-# check the VERSION in libnvidia-container/mk/nvidia-modprobe.mk
-NVMODV="550.54.14"
-
-DESCRIPTION="NVIDIA container runtime library"
-HOMEPAGE="https://github.com/NVIDIA/libnvidia-container"
-
-if [[ "${PV}" == "9999" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/NVIDIA/${PN}.git"
-else
- SRC_URI="
- https://github.com/NVIDIA/${PN}/archive/v${PV/_rc/-rc.}.tar.gz -> ${P}.tar.gz
- "
- S="${WORKDIR}/${PN}-${PV/_rc/-rc.}"
- KEYWORDS="~amd64"
-fi
-NVMODS="${WORKDIR}/nvidia-modprobe-${NVMODV}"
-SRC_URI+="
- https://github.com/NVIDIA/nvidia-modprobe/archive/${NVMODV}.tar.gz -> ${PN}-nvidia-modprobe-${NVMODV}.tar.gz
-"
-
-LICENSE="Apache-2.0"
-SLOT="0/${PV}"
-IUSE="+seccomp static-libs"
-
-# libtirpc
-# NOTE It seams that library also has optional support for net-libs/libtirpc, but I didn't
-# manage to build without it, probably the support for that build-roted away.
-DEPEND="
- net-libs/libtirpc:=
- sys-libs/libcap
- virtual/libelf:=
- seccomp? ( sys-libs/libseccomp )
-"
-
-RDEPEND="${DEPEND}
- elibc_glibc? ( x11-drivers/nvidia-drivers )
-"
-
-BDEPEND="
- dev-lang/go
- net-libs/rpcsvc-proto
- sys-apps/lsb-release
- virtual/pkgconfig
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-1.19.0-fix-makefile.patch"
-)
-
-DOCS=( NOTICE README.md )
-
-src_unpack() {
- default_src_unpack
- if [[ "${PV}" == "9999" ]] ; then
- git-r3_src_unpack
- fi
-}
-
-src_prepare() {
- # nvidia-modprobe patching based on libnvidia-container/mk/nvidia-modprobe.mk
- mkdir -p "${S}"/deps/src/nvidia-modprobe-"${NVMODV}" || die
- cp -r "${NVMODS}"/modprobe-utils/ "${S}"/deps/src/nvidia-modprobe-"${NVMODV}"/ || die
- touch "${S}/deps/src/nvidia-modprobe-${NVMODV}/.download_stamp" || die
- pushd "${S}/deps/src/nvidia-modprobe-${NVMODV}" || die
- eapply -p1 "${S}"/mk/nvidia-modprobe.patch
- popd || die
-
- if ! tc-is-gcc; then
- ewarn "libnvidia-container must be built with gcc because of option \"-fplan9-extensions\"!"
- ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc"
- export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar
- tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}"
- fi
-
- default
-}
-
-src_configure() {
- export GOPATH="${S}"
- export GOFLAGS="-mod=vendor"
- export CFLAGS="${CFLAGS}"
- export LDFLAGS="${LDFLAGS}"
- export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}"
- export CGO_LDFLAGS="${CGO_LDFLAGS:-$LDFLAGS}"
-
- tc-export LD OBJCOPY PKG_CONFIG
-
- # we could also set GO compiller, but it currently defaults to gccgo, but as for now I believe
- # most users will prefer dev-lang/go and they usually don't define GO="go" their make.conf either.
- # tc-export GO
-
- my_makeopts=(
- prefix="${EPREFIX}/usr"
- libdir="${EPREFIX}/usr/$(get_libdir)"
- GO_LDFLAGS="-compressdwarf=false -linkmode=external"
- WITH_SECCOMP="$(usex seccomp)"
- )
- # WITH_TIRPC="$(usex libtirpc)"
-
- if [[ "${PV}" != "9999" ]] ; then
- IFS='_' read -r MY_LIB_VERSION MY_LIB_TAG <<< "${PV}"
-
- my_makeopts=( "${my_makeopts[@]}"
- REVISION="${PV}"
- LIB_VERSION="${MY_LIB_VERSION}"
- LIB_TAG="${MY_LIB_TAG}"
- )
- fi
-}
-
-src_compile() {
- emake "${my_makeopts[@]}"
-}
-
-src_install() {
- emake "${my_makeopts[@]}" DESTDIR="${D}" install
- # Install docs
- einstalldocs # Bug 831705
- # Cleanup static libraries
- if ! use static-libs ; then
- find "${ED}" -name '*.a' -delete || die # Bug 783984
- fi
-}
diff --git a/sys-libs/libnvidia-container/libnvidia-container-9999.ebuild b/sys-libs/libnvidia-container/libnvidia-container-9999.ebuild
deleted file mode 100644
index b1e9266e9b98..000000000000
--- a/sys-libs/libnvidia-container/libnvidia-container-9999.ebuild
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-# check the VERSION in libnvidia-container/mk/nvidia-modprobe.mk
-NVMODV="550.54.14"
-
-DESCRIPTION="NVIDIA container runtime library"
-HOMEPAGE="https://github.com/NVIDIA/libnvidia-container"
-
-if [[ "${PV}" == "9999" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/NVIDIA/${PN}.git"
-else
- SRC_URI="
- https://github.com/NVIDIA/${PN}/archive/v${PV/_rc/-rc.}.tar.gz -> ${P}.tar.gz
- "
- S="${WORKDIR}/${PN}-${PV/_rc/-rc.}"
- KEYWORDS="~amd64"
-fi
-NVMODS="${WORKDIR}/nvidia-modprobe-${NVMODV}"
-SRC_URI+="
- https://github.com/NVIDIA/nvidia-modprobe/archive/${NVMODV}.tar.gz -> ${PN}-nvidia-modprobe-${NVMODV}.tar.gz
-"
-
-LICENSE="Apache-2.0"
-SLOT="0/${PV}"
-IUSE="+seccomp static-libs"
-
-# libtirpc
-# NOTE It seams that library also has optional support for net-libs/libtirpc, but I didn't
-# manage to build without it, probably the support for that build-roted away.
-DEPEND="
- net-libs/libtirpc:=
- sys-libs/libcap
- virtual/libelf:=
- seccomp? ( sys-libs/libseccomp )
-"
-
-RDEPEND="${DEPEND}
- elibc_glibc? ( x11-drivers/nvidia-drivers )
-"
-
-BDEPEND="
- dev-lang/go
- net-libs/rpcsvc-proto
- sys-apps/lsb-release
- virtual/pkgconfig
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-1.17.0-fix-makefile-r1.patch"
- "${FILESDIR}/${PN}-1.17.4-go-1.24.patch"
-)
-
-DOCS=( NOTICE README.md )
-
-src_unpack() {
- default_src_unpack
- if [[ "${PV}" == "9999" ]] ; then
- git-r3_src_unpack
- fi
-}
-
-src_prepare() {
- # nvidia-modprobe patching based on libnvidia-container/mk/nvidia-modprobe.mk
- mkdir -p "${S}"/deps/src/nvidia-modprobe-"${NVMODV}" || die
- cp -r "${NVMODS}"/modprobe-utils/ "${S}"/deps/src/nvidia-modprobe-"${NVMODV}"/ || die
- touch "${S}/deps/src/nvidia-modprobe-${NVMODV}/.download_stamp" || die
- pushd "${S}/deps/src/nvidia-modprobe-${NVMODV}" || die
- eapply -p1 "${S}"/mk/nvidia-modprobe.patch
- popd || die
-
- if ! tc-is-gcc; then
- ewarn "libnvidia-container must be built with gcc because of option \"-fplan9-extensions\"!"
- ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc"
- export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar
- tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}"
- fi
-
- default
-}
-
-src_configure() {
- export GOPATH="${S}"
- export GOFLAGS="-mod=vendor"
- export CFLAGS="${CFLAGS}"
- export LDFLAGS="${LDFLAGS}"
- export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}"
- export CGO_LDFLAGS="${CGO_LDFLAGS:-$LDFLAGS}"
-
- tc-export LD OBJCOPY PKG_CONFIG
-
- # we could also set GO compiller, but it currently defaults to gccgo, but as for now I believe
- # most users will prefer dev-lang/go and they usually don't define GO="go" their make.conf either.
- # tc-export GO
-
- my_makeopts=(
- prefix="${EPREFIX}/usr"
- libdir="${EPREFIX}/usr/$(get_libdir)"
- GO_LDFLAGS="-compressdwarf=false -linkmode=external"
- WITH_SECCOMP="$(usex seccomp)"
- )
- # WITH_TIRPC="$(usex libtirpc)"
-
- if [[ "${PV}" != "9999" ]] ; then
- IFS='_' read -r MY_LIB_VERSION MY_LIB_TAG <<< "${PV}"
-
- my_makeopts=( "${my_makeopts[@]}"
- REVISION="${PV}"
- LIB_VERSION="${MY_LIB_VERSION}"
- LIB_TAG="${MY_LIB_TAG}"
- )
- fi
-}
-
-src_compile() {
- emake "${my_makeopts[@]}"
-}
-
-src_install() {
- emake "${my_makeopts[@]}" DESTDIR="${D}" install
- # Install docs
- einstalldocs # Bug 831705
- # Cleanup static libraries
- if ! use static-libs ; then
- find "${ED}" -name '*.a' -delete || die # Bug 783984
- fi
-}
diff --git a/sys-libs/libnvidia-container/metadata.xml b/sys-libs/libnvidia-container/metadata.xml
deleted file mode 100644
index 006fc2ab915a..000000000000
--- a/sys-libs/libnvidia-container/metadata.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person" proxied="yes">
- <email>vowstar@gmail.com</email>
- <name>Huang Rui</name>
- </maintainer>
- <maintainer type="person" proxied="yes">
- <email>zhixu.liu@gmail.com</email>
- <name>Z. Liu</name>
- </maintainer>
- <maintainer type="project" proxied="proxy">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
- <upstream>
- <remote-id type="github">NVIDIA/libnvidia-container</remote-id>
- </upstream>
- <longdescription lang="en">
- NVIDIA container runtime library, this repository provides a library and
- a simple CLI utility to automatically configure GNU/Linux containers
- leveraging NVIDIA hardware.
- The implementation relies on kernel primitives and is designed to be
- agnostic of the container runtime.
- </longdescription>
- <longdescription lang="zh">
- NVIDIA容器运行时库,这个仓库提供了一个库和一个简单的命令行工具,用于自动
- 配置利用NVIDIA硬件的GNU/Linux容器。这个实现依赖于内核原语,并旨在与容器
- 运行时无关。
- </longdescription>
-</pkgmetadata>
diff --git a/sys-libs/libnvme/Manifest b/sys-libs/libnvme/Manifest
deleted file mode 100644
index de58f3a6dcb7..000000000000
--- a/sys-libs/libnvme/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST libnvme-1.16.1.tar.gz 838564 BLAKE2B 0dd86188f5165e86fda84b76c7e197b7ea558ab1ed57ff106435af81cfcfc2d1af0cb3fa4e199e7dc147cf4af3d4ee72502cf7df87746a60d8e9d28ad25f224e SHA512 92113cd62af53366fb63f2f385c2059dede171fef4d9a240fa941382e338d2941e90aeb40ae2d202311d7b531e41181839f45f8ab4da1b3a79ce4b597fcd4993
-DIST libnvme-1.16.tar.gz 838607 BLAKE2B 3c96ac8cfe16f554f806f312406333ac9ed1be743ccdee44abefe26b2381100ab56d608f1e009004d76099cd84e6dc35aabbbae82407f9b60cbe931aeb6b4c5b SHA512 a8af7579f0d2f3e0fe9df9197bdcad4625f674af8ba0e41ffad2cbe7495b5f6cad89039dd9c03d35b99991b85aeec2134bbb67eb712df3a77be979ef660b1470
diff --git a/sys-libs/libnvme/libnvme-1.16.1.ebuild b/sys-libs/libnvme/libnvme-1.16.1.ebuild
deleted file mode 100644
index c33ad452a1bb..000000000000
--- a/sys-libs/libnvme/libnvme-1.16.1.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 2023-2025 Liguros Authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-inherit python-r1 meson
-
-DESCRIPTION="C Library for NVM Express on Linux"
-HOMEPAGE="https://github.com/linux-nvme/libnvme"
-SRC_URI="https://github.com/linux-nvme/libnvme/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0/1"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-IUSE="dbus +json keyutils python ssl test +uuid"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
- python? ( ${PYTHON_REQUIRED_USE} )
-"
-
-DEPEND="
- json? ( dev-libs/json-c:= )
- keyutils? ( sys-apps/keyutils:= )
- dbus? ( sys-apps/dbus:= )
- python? ( ${PYTHON_DEPS} )
- ssl? (
- >=dev-libs/openssl-1.1:=
-
- )
- uuid? ( sys-apps/util-linux:= )
-"
-RDEPEND="${DEPEND}"
-
-BDEPEND="
- dev-lang/swig
-"
-
-src_configure() {
- local emesonargs=(
- -Dpython=disabled
- $(meson_use test tests)
- $(meson_feature json json-c)
- $(meson_feature dbus libdbus)
- $(meson_feature keyutils)
- $(meson_feature ssl openssl)
- )
- meson_src_configure
-}
-
-python_compile() {
- local emesonargs=(
- -Dpython=enabled
- )
- meson_src_configure --reconfigure
- meson_src_compile
-}
-
-src_compile() {
- meson_src_compile
-
- if use python; then
- python_copy_sources
- python_foreach_impl python_compile
- fi
-}
-
-python_install() {
- meson_src_install
- use python && python_optimize
-}
-
-src_install() {
- use python && python_foreach_impl python_install
-
- meson_src_install
-}
diff --git a/sys-libs/libnvme/libnvme-1.16.ebuild b/sys-libs/libnvme/libnvme-1.16.ebuild
deleted file mode 100644
index c33ad452a1bb..000000000000
--- a/sys-libs/libnvme/libnvme-1.16.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 2023-2025 Liguros Authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-inherit python-r1 meson
-
-DESCRIPTION="C Library for NVM Express on Linux"
-HOMEPAGE="https://github.com/linux-nvme/libnvme"
-SRC_URI="https://github.com/linux-nvme/libnvme/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0/1"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-IUSE="dbus +json keyutils python ssl test +uuid"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
- python? ( ${PYTHON_REQUIRED_USE} )
-"
-
-DEPEND="
- json? ( dev-libs/json-c:= )
- keyutils? ( sys-apps/keyutils:= )
- dbus? ( sys-apps/dbus:= )
- python? ( ${PYTHON_DEPS} )
- ssl? (
- >=dev-libs/openssl-1.1:=
-
- )
- uuid? ( sys-apps/util-linux:= )
-"
-RDEPEND="${DEPEND}"
-
-BDEPEND="
- dev-lang/swig
-"
-
-src_configure() {
- local emesonargs=(
- -Dpython=disabled
- $(meson_use test tests)
- $(meson_feature json json-c)
- $(meson_feature dbus libdbus)
- $(meson_feature keyutils)
- $(meson_feature ssl openssl)
- )
- meson_src_configure
-}
-
-python_compile() {
- local emesonargs=(
- -Dpython=enabled
- )
- meson_src_configure --reconfigure
- meson_src_compile
-}
-
-src_compile() {
- meson_src_compile
-
- if use python; then
- python_copy_sources
- python_foreach_impl python_compile
- fi
-}
-
-python_install() {
- meson_src_install
- use python && python_optimize
-}
-
-src_install() {
- use python && python_foreach_impl python_install
-
- meson_src_install
-}
diff --git a/sys-libs/libnvme/metadata.xml b/sys-libs/libnvme/metadata.xml
deleted file mode 100644
index 9a02d36dfc4e..000000000000
--- a/sys-libs/libnvme/metadata.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>dev@liguros.net</email>
- <name>Development</name>
- </maintainer>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
-
- <use>
- <flag name="json">Support JSON output via <pkg>dev-libs/json-c</pkg></flag>
- <flag name="keyutils">Add support for <pkg>sys-apps/keyutils</pkg></flag>
- <flag name="uuid">UUID support via <pkg>sys-apps/util-linux</pkg></flag>
- </use>
- <origin>ports</origin>
-</pkgmetadata> \ No newline at end of file
diff --git a/sys-libs/libosinfo/Manifest b/sys-libs/libosinfo/Manifest
deleted file mode 100644
index c8ff6e4365c4..000000000000
--- a/sys-libs/libosinfo/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST libosinfo-1.11.0.tar.xz 303944 BLAKE2B 3d61d66c6ef7a9e2706a1a5dd17d8ceff4538a8ff5988eb81509cbd81673dd193b3685092842d7dbb37e6f92c7ed1f915fcf71cf5db5cad8482f230b3ce066ac SHA512 d1b527cc50eaa92e143f068d9a484a1e591dafb77e65e0172e43d6d6440970c5c3b4e2d65050fd0d64f39d1163d49b339ae6d75943306917b4b367c26a938fb6
-DIST libosinfo-1.12.0.tar.xz 307984 BLAKE2B 6fe16be19e165c172148df736955546360cfce3f25e6e5f19d691a4242e12e7ae596dd8f7543e05758d5563c9b656b5bb72db74e8c15645446e6918320683f97 SHA512 13647b6df14443f7e39bc09bd47be93fcd9f367ecfd7b13f3dac15e2614ad8a812d6077e070b2dc0f49f68f022881ad2fa59bac92f7731032358658a522e6572
diff --git a/sys-libs/libosinfo/files/1.11.0-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch b/sys-libs/libosinfo/files/1.11.0-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch
deleted file mode 100644
index ea05c46a03b0..000000000000
--- a/sys-libs/libosinfo/files/1.11.0-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 5bbdd06503456784c5ffa22409e8bab50470d673 Mon Sep 17 00:00:00 2001
-Message-ID: <5bbdd06503456784c5ffa22409e8bab50470d673.1701161424.git.mprivozn@redhat.com>
-From: Michal Privoznik <mprivozn@redhat.com>
-Date: Mon, 27 Nov 2023 15:11:45 +0100
-Subject: [PATCH] osinfo: Make xmlError struct constant in
- propagate_libxml_error()
-
-In libxml2 commit v2.12.0~14 the API changed so that
-xmlGetLastError() returns pointer to a constant xmlError struct.
-Reflect this change in our code.
-
-Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
----
- osinfo/osinfo_install_script.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c
-index 5800f37..303245a 100644
---- a/osinfo/osinfo_install_script.c
-+++ b/osinfo/osinfo_install_script.c
-@@ -769,7 +769,7 @@ static void propagate_libxml_error(GError **error, const char *format, ...) G_GN
-
- static void propagate_libxml_error(GError **error, const char *format, ...)
- {
-- xmlErrorPtr err = xmlGetLastError();
-+ const xmlError *err = xmlGetLastError();
- char *prefix;
- va_list ap;
-
---
-2.41.0
-
diff --git a/sys-libs/libosinfo/files/libosinfo-1.12.0-libxml2-2.14.patch b/sys-libs/libosinfo/files/libosinfo-1.12.0-libxml2-2.14.patch
deleted file mode 100644
index 6506a178643d..000000000000
--- a/sys-libs/libosinfo/files/libosinfo-1.12.0-libxml2-2.14.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-https://bugs.gentoo.org/955816
-https://gitlab.com/libosinfo/libosinfo/-/issues/58
-https://gitlab.com/libosinfo/libosinfo/-/merge_requests/162
-
-From 0adf38535637ec668e658d43f04f60f11f51574f Mon Sep 17 00:00:00 2001
-From: Roman Bogorodskiy <bogorodskiy@gmail.com>
-Date: Thu, 10 Apr 2025 13:54:02 +0200
-Subject: [PATCH] loader: don't use libxml2 deprecated APIs
-
-Address the following items:
-
- - Deprecated direct access to buf's content
- - Mismatching error function signature
- - Deprecated direct access to ctxt's lastError
-
-Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
---- a/osinfo/osinfo_loader.c
-+++ b/osinfo/osinfo_loader.c
-@@ -354,7 +354,7 @@ osinfo_loader_doc(const char *xpath,
- xmlXPathFreeObject(obj);
- OSINFO_LOADER_SET_ERROR(err, "Cannot format stylesheet");
- }
-- ret = g_strdup((char *)buf->content);
-+ ret = g_strdup((char *)xmlBufferContent(buf));
-
- xmlBufferFree(buf);
- xmlXPathFreeObject(obj);
-@@ -1902,28 +1902,32 @@ static void osinfo_loader_root(OsinfoLoader *loader,
- }
-
- static void
--catchXMLError(void *ctx, const char *msg ATTRIBUTE_UNUSED, ...)
-+catchXMLError(void *ctx, const char *msg, ...)
- {
- xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
-+ const xmlError *xmlErr = NULL;
-+ g_autofree gchar *xmlmsg = NULL;
-
-- if (ctxt && ctxt->_private) {
-- GError **err = ctxt->_private;
-- if (!error_is_set(err)) {
-- gchar *xmlmsg;
-- if (ctxt->lastError.file) {
-- xmlmsg = g_strdup_printf("%s:%d: %s",
-- ctxt->lastError.file,
-- ctxt->lastError.line,
-- ctxt->lastError.message);
-- } else {
-- xmlmsg = g_strdup_printf("at line %d: %s",
-- ctxt->lastError.line,
-- ctxt->lastError.message);
-- }
-- OSINFO_LOADER_SET_ERROR(ctxt->_private, xmlmsg);
-- g_free(xmlmsg);
-- }
-+ if (!ctxt || !ctxt->_private)
-+ return;
-+
-+ if (error_is_set(ctxt->_private))
-+ return;
-+
-+ if (!(xmlErr = xmlCtxtGetLastError(ctx)))
-+ return;
-+
-+ if (xmlErr->file) {
-+ xmlmsg = g_strdup_printf("%s:%d: %s",
-+ xmlErr->file,
-+ xmlErr->line,
-+ xmlErr->message);
-+ } else {
-+ xmlmsg = g_strdup_printf("at line %d: %s",
-+ xmlErr->line,
-+ xmlErr->message);
- }
-+ OSINFO_LOADER_SET_ERROR(ctxt->_private, xmlmsg);
- }
-
- static void osinfo_loader_process_xml(OsinfoLoader *loader,
---
-GitLab
-
diff --git a/sys-libs/libosinfo/libosinfo-1.11.0-r1.ebuild b/sys-libs/libosinfo/libosinfo-1.11.0-r1.ebuild
deleted file mode 100644
index 116553064f1c..000000000000
--- a/sys-libs/libosinfo/libosinfo-1.11.0-r1.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit meson vala xdg
-
-DESCRIPTION="GObject library for managing information about real and virtual OSes"
-HOMEPAGE="https://libosinfo.org/"
-SRC_URI="https://releases.pagure.org/libosinfo/${P}.tar.xz"
-
-LICENSE="GPL-2+ LGPL-2.1+"
-SLOT="0"
-
-IUSE="gtk-doc +introspection +vala test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="vala? ( introspection )"
-
-KEYWORDS="~alpha amd64 ~arm arm64 ~loong ~ppc ppc64 ~riscv ~sparc x86"
-
-# Unsure about osinfo-db-tools rdep, but at least fedora does it too
-RDEPEND="
- >=dev-libs/glib-2.44:2
- net-libs/libsoup:3.0
- >=dev-libs/libxml2-2.6.0:=
- >=dev-libs/libxslt-1.0.0
- sys-apps/hwdata
- sys-apps/osinfo-db-tools
- sys-apps/osinfo-db
- introspection? ( >=dev-libs/gobject-introspection-1.82.0-r2:= )
-"
-DEPEND="${RDEPEND}"
-# perl dep is for pod2man for automagic manpage building
-BDEPEND="
- dev-lang/perl
- dev-util/glib-utils
- gtk-doc? (
- >=dev-util/gtk-doc-1.10
- app-text/docbook-xml-dtd:4.3
- )
- >=sys-devel/gettext-0.19.8
- virtual/pkgconfig
- vala? ( $(vala_depend) )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PV}-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch
-)
-
-src_prepare() {
- default
- use vala && vala_setup
- xdg_environment_reset
-}
-
-src_configure() {
- local emesonargs=(
- $(meson_use gtk-doc enable-gtk-doc)
- $(meson_feature introspection enable-introspection)
- $(meson_use test enable-tests)
- $(meson_feature vala enable-vala)
- -Dlibsoup-abi=3.0
- -Dwith-pci-ids-path="${EPREFIX}"/usr/share/hwdata/pci.ids
- -Dwith-usb-ids-path="${EPREFIX}"/usr/share/hwdata/usb.ids
- )
- meson_src_configure
-}
diff --git a/sys-libs/libosinfo/libosinfo-1.12.0-r1.ebuild b/sys-libs/libosinfo/libosinfo-1.12.0-r1.ebuild
deleted file mode 100644
index 81a359c691b1..000000000000
--- a/sys-libs/libosinfo/libosinfo-1.12.0-r1.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit meson vala xdg
-
-DESCRIPTION="GObject library for managing information about real and virtual OSes"
-HOMEPAGE="https://libosinfo.org/"
-SRC_URI="https://releases.pagure.org/libosinfo/${P}.tar.xz"
-
-LICENSE="GPL-2+ LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~alpha amd64 ~arm arm64 ~loong ~ppc ppc64 ~riscv ~sparc x86"
-
-IUSE="gtk-doc +introspection +vala test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="vala? ( introspection )"
-
-# Unsure about osinfo-db-tools rdep, but at least fedora does it too
-RDEPEND="
- >=dev-libs/glib-2.44:2
- net-libs/libsoup:3.0
- >=dev-libs/libxml2-2.6.0:=
- >=dev-libs/libxslt-1.0.0
- sys-apps/hwdata
- sys-apps/osinfo-db-tools
- sys-apps/osinfo-db
- introspection? ( >=dev-libs/gobject-introspection-1.82.0-r2:= )
-"
-DEPEND="${RDEPEND}"
-# perl dep is for pod2man for automagic manpage building
-BDEPEND="
- dev-lang/perl
- dev-util/glib-utils
- gtk-doc? (
- >=dev-util/gtk-doc-1.10
- app-text/docbook-xml-dtd:4.3
- )
- >=sys-devel/gettext-0.19.8
- virtual/pkgconfig
- vala? ( $(vala_depend) )
-"
-
-PATCHES=(
- "${FILESDIR}"/libosinfo-1.12.0-libxml2-2.14.patch
-)
-
-src_prepare() {
- default
- use vala && vala_setup
- xdg_environment_reset
-}
-
-src_configure() {
- local emesonargs=(
- $(meson_use gtk-doc enable-gtk-doc)
- $(meson_feature introspection enable-introspection)
- $(meson_use test enable-tests)
- $(meson_feature vala enable-vala)
- -Dlibsoup-abi=3.0
- -Dwith-pci-ids-path="${EPREFIX}"/usr/share/hwdata/pci.ids
- -Dwith-usb-ids-path="${EPREFIX}"/usr/share/hwdata/usb.ids
- )
- meson_src_configure
-}
diff --git a/sys-libs/libosinfo/metadata.xml b/sys-libs/libosinfo/metadata.xml
deleted file mode 100644
index 10983b30d1b7..000000000000
--- a/sys-libs/libosinfo/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>gnome@gentoo.org</email>
- <name>Gentoo GNOME Desktop</name>
- </maintainer>
- <upstream>
- <remote-id type="gitlab">libosinfo/libosinfo</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libraw1394/Manifest b/sys-libs/libraw1394/Manifest
deleted file mode 100644
index fa38179e5d1b..000000000000
--- a/sys-libs/libraw1394/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libraw1394-2.1.2.tar.xz 313120 BLAKE2B 73addee88d2463ecebc4a0bca14d8f4c285c8e7060e3ded49bacbb818049e436bdaf98bde26469ec03e1baf196f67fec59e90201347f34a5810b8704108c8d7f SHA512 1ef38961b747c4ebb18d823a4c38d5bf019f8bd0ac55547838d153b1899b91ae0ff56f5b6732e309d6975b55725d1ce989917ffcf605cf64f7d33624f54f0567
diff --git a/sys-libs/libraw1394/libraw1394-2.1.2-r1.ebuild b/sys-libs/libraw1394/libraw1394-2.1.2-r1.ebuild
deleted file mode 100644
index 3a71295b2166..000000000000
--- a/sys-libs/libraw1394/libraw1394-2.1.2-r1.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-minimal
-
-DESCRIPTION="Library that provides direct access to the IEEE 1394 bus"
-HOMEPAGE="https://ieee1394.wiki.kernel.org/"
-SRC_URI="https://www.kernel.org/pub/linux/libs/ieee1394/${P}.tar.xz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
-IUSE="valgrind"
-
-DEPEND="valgrind? ( dev-debug/valgrind )"
-
-multilib_src_configure() {
- ECONF_SOURCE="${S}" econf \
- --disable-static \
- $(use_with valgrind)
-}
-
-multilib_src_install_all() {
- einstalldocs
- find "${D}" -name '*.la' -type f -delete || die
-}
diff --git a/sys-libs/libraw1394/metadata.xml b/sys-libs/libraw1394/metadata.xml
deleted file mode 100644
index 73dda144f9ac..000000000000
--- a/sys-libs/libraw1394/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-</pkgmetadata>
diff --git a/sys-libs/librtas/Manifest b/sys-libs/librtas/Manifest
deleted file mode 100644
index 42c0be0c3127..000000000000
--- a/sys-libs/librtas/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST librtas-2.0.3.tar.gz 95483 BLAKE2B 38ce5c3924dfdb18f3a9a6e309a0ba093468b12e05b38dd81525b59ddd5afda65da3c46b7b48c1e8aaa1dc0afc6cb1eaf7d930e6e27bb1a06005a7f24620a9cd SHA512 3ff59007ad6fc893d226ae9413b57b8b478a214a824f60c2af58a65c0a3cefecc0d19bb4c791b677a0d5c1d7da9646d66f48d0e0446768092ef7afd6e4baff34
-DIST librtas-2.0.6.tar.gz 152699 BLAKE2B cb23776f87127c36dd99e3505fa2a7af98b8b6fd04d50d78e7a34127c57102c63be6fae692e82dac1f4ddef772417417c4b754bfdc22be8a75440550aa8259f9 SHA512 ad2e8b4c8e32bae708e5243625eaa63023f93d23eaa4d6675c46eb68766abcaa90f9555d6a3c79d2a564fad132d35a8afc4035d44c76a63c64dcb3b25e15a0c4
diff --git a/sys-libs/librtas/librtas-2.0.3.ebuild b/sys-libs/librtas/librtas-2.0.3.ebuild
deleted file mode 100644
index a938fa58d045..000000000000
--- a/sys-libs/librtas/librtas-2.0.3.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools flag-o-matic
-
-DESCRIPTION="A set of libraries for userspace access to RTAS on the PowerPC platform(s)"
-HOMEPAGE="https://github.com/ibm-power-utilities/librtas"
-SRC_URI="https://github.com/ibm-power-utilities/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS="ppc ppc64"
-IUSE="static-libs"
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- # bug #955091
- append-cflags -std=gnu17
- econf $(use_enable static-libs static)
-}
-
-src_install() {
- emake DESTDIR="${D}" install docdir="${EPREFIX}"/usr/share/doc/${PF}
- find "${D}" -name '*.la' -delete || die
- # librtas_src/syscall_rmo.c: static const char *lockfile_path = "/var/lock/LCK..librtas";
- # this way we prevent sandbox violations in lscpu linked to rtas
- dodir /etc/sandbox.d
- echo 'SANDBOX_PREDICT="/run/lock/LCK..librtas"' > "${ED}"/etc/sandbox.d/50librtas || die
-}
diff --git a/sys-libs/librtas/librtas-2.0.6.ebuild b/sys-libs/librtas/librtas-2.0.6.ebuild
deleted file mode 100644
index 0a0bf7ea145c..000000000000
--- a/sys-libs/librtas/librtas-2.0.6.ebuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools
-
-DESCRIPTION="A set of libraries for userspace access to RTAS on the PowerPC platform(s)"
-HOMEPAGE="https://github.com/ibm-power-utilities/librtas"
-SRC_URI="https://github.com/ibm-power-utilities/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~ppc ~ppc64"
-IUSE="static-libs test"
-RESTRICT="!test? ( test )"
-
-DEPEND="test? ( >=dev-util/cmocka-1.1.7 )"
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- local myeconfargs=(
- $(use_enable static-libs static)
- $(use_enable test tests)
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- emake DESTDIR="${D}" install docdir="${EPREFIX}"/usr/share/doc/${PF}
- find "${D}" -name '*.la' -delete || die
- # librtas_src/syscall_rmo.c: static const char *lockfile_path = "/var/lock/LCK..librtas";
- # this way we prevent sandbox violations in lscpu linked to rtas
- dodir /etc/sandbox.d
- echo 'SANDBOX_PREDICT="/run/lock/LCK..librtas"' > "${ED}"/etc/sandbox.d/50librtas || die
-}
diff --git a/sys-libs/librtas/metadata.xml b/sys-libs/librtas/metadata.xml
deleted file mode 100644
index b93ca6387bf1..000000000000
--- a/sys-libs/librtas/metadata.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>ppc@gentoo.org</email>
- <name>PowerPC architecture team</name>
- </maintainer>
- <upstream>
- <bugs-to>https://github.com/ibm-power-utilities/librtas/issues</bugs-to>
- <changelog>https://github.com/ibm-power-utilities/librtas/blob/master/Changelog</changelog>
- <remote-id type="github">ibm-power-utilities/librtas</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libseccomp/Manifest b/sys-libs/libseccomp/Manifest
deleted file mode 100644
index cb80334dbe3c..000000000000
--- a/sys-libs/libseccomp/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST libseccomp-2.6.0.tar.gz 685655 BLAKE2B 45c4f4dd67db5848bb536613e8929633f95cfbeb8738525381a76631187e7b0fc2c02f1a103579cd0f4135e9c175250fe2d784b85cc85424ec3125b4dafcf11c SHA512 9039478656d9b670af2ff4cb67b6b1fa315821e59d2f82ba6247e988859ddc7e3d15fea159eccca161bf2890828bb62aa6ab4d6b7ff55f27a9d6bd9532eeee1b
-DIST libseccomp-2.6.0.tar.gz.asc 833 BLAKE2B 3bec3fc850bcd631018f152ee8a81d89ad3e7b15d91a559048400a07efe1b1787d1cdc1b056dca62bbf8134ad81ad1b4bf53f3230e24bf94a39296b2b1562e64 SHA512 973b69c58085a1567f860e621e3a197be02c0ca71dad664234418cf5c00c39767efd37a7c4016f1be5bd588262617b6603855262db2ee6f31bc16061bc130e0f
diff --git a/sys-libs/libseccomp/files/libseccomp-2.5.3-skip-valgrind.patch b/sys-libs/libseccomp/files/libseccomp-2.5.3-skip-valgrind.patch
deleted file mode 100644
index baf3ed971fc9..000000000000
--- a/sys-libs/libseccomp/files/libseccomp-2.5.3-skip-valgrind.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Valgrind isn't supported on all arches (and indeed profiles for older types
-of some arches) so let's just skip the automagic Valgrind dependency entirely.
---- a/tests/regression
-+++ b/tests/regression
-@@ -876,7 +876,7 @@ function run_test() {
- run_test_bpf_sim_fuzz "$1" $2 "$3"
- elif [[ "$4" == "bpf-valgrind" ]]; then
- # only run this test if valgrind is installed
-- if check_deps valgrind; then
-+ if false; then
- run_test_bpf_valgrind "$testnumstr" "$3"
- else
- print_result $testnumstr "SKIPPED" \
diff --git a/sys-libs/libseccomp/files/libseccomp-2.6.0-aliasing.patch b/sys-libs/libseccomp/files/libseccomp-2.6.0-aliasing.patch
deleted file mode 100644
index f1f13454c890..000000000000
--- a/sys-libs/libseccomp/files/libseccomp-2.6.0-aliasing.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-https://github.com/seccomp/libseccomp/commit/84005ecc603fd0186188c4113452fd8e8a0c9bb3
-
-From 84005ecc603fd0186188c4113452fd8e8a0c9bb3 Mon Sep 17 00:00:00 2001
-From: Romain Geissler <romain.geissler@amadeus.com>
-Date: Tue, 18 Feb 2025 22:29:05 +0000
-Subject: [PATCH] hash: fix strict aliasing UB in MurMur hash implementation
-
-This was spotted when trying to upgrade the libseccomp fedora package to
-version 2.6.0 in fedora rawhide. It comes with gcc 15 and LTO enabled by
-default. When running the test 61-sim-transactions we get plenty of such
-errors in valgrind:
-
-==265507== Use of uninitialised value of size 8
-==265507== at 0x4096AD: _hsh_add (gen_bpf.c:599)
-==265507== by 0x40A557: UnknownInlinedFun (gen_bpf.c:2016)
-==265507== by 0x40A557: gen_bpf_generate (gen_bpf.c:2341)
-==265507== by 0x400CDE: UnknownInlinedFun (db.c:2685)
-==265507== by 0x400CDE: UnknownInlinedFun (db.c:2682)
-==265507== by 0x400CDE: UnknownInlinedFun (api.c:756)
-==265507== by 0x400CDE: UnknownInlinedFun (util.c:162)
-==265507== by 0x400CDE: UnknownInlinedFun (util.c:153)
-==265507== by 0x400CDE: main (61-sim-transactions.c:128)
-==265507== Uninitialised value was created by a stack allocation
-==265507== at 0x409590: _hsh_add (gen_bpf.c:573)
-
-Investigating this a bit, it seems that because of LTO the MurMur hash
-implementation is being inlined in _hsh_add. The two buffers data and
-blocks to point at the same underlying data, but via incompatible type,
-which is a strict aliasing violation. Instead, remove the getblock32
-function and inline the copy with memcpy.
-
-This is reproducible on a "fedora:rawhide" container (gcc 15) and using:
-export CFLAGS='-O2 -flto=auto -ffat-lto-objects -g'
-
-Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
-Reviewed-by: Sam James <sam@gentoo.org>
-Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
-[PM: subject line tweak]
-Signed-off-by: Paul Moore <paul@paul-moore.com>
-(imported from commit 614530bc8b3c9f49aa59d7eaef4863b746504c23)
----
- src/hash.c | 12 +++---------
- 1 file changed, 3 insertions(+), 9 deletions(-)
-
-diff --git a/src/hash.c b/src/hash.c
-index 4435900f..01ff9399 100644
---- a/src/hash.c
-+++ b/src/hash.c
-@@ -12,15 +12,11 @@
- */
-
- #include <stdlib.h>
-+#include <string.h>
- #include <inttypes.h>
-
- #include "hash.h"
-
--static inline uint32_t getblock32(const uint32_t *p, int i)
--{
-- return p[i];
--}
--
- static inline uint32_t rotl32(uint32_t x, int8_t r)
- {
- return (x << r) | (x >> (32 - r));
-@@ -41,7 +37,6 @@ static inline uint32_t fmix32(uint32_t h)
- uint32_t hash(const void *key, size_t length)
- {
- const uint8_t *data = (const uint8_t *)key;
-- const uint32_t *blocks;
- const uint8_t *tail;
- const int nblocks = length / 4;
- const uint32_t c1 = 0xcc9e2d51;
-@@ -54,9 +49,8 @@ uint32_t hash(const void *key, size_t length)
- uint32_t h1 = 0;
-
- /* body */
-- blocks = (const uint32_t *)(data + nblocks * 4);
- for(i = -nblocks; i; i++) {
-- k1 = getblock32(blocks, i);
-+ memcpy(&k1, data + (nblocks + i) * sizeof(uint32_t), sizeof(uint32_t));
-
- k1 *= c1;
- k1 = rotl32(k1, 15);
-@@ -68,7 +62,7 @@ uint32_t hash(const void *key, size_t length)
- }
-
- /* tail */
-- tail = (const uint8_t *)(data + nblocks * 4);
-+ tail = data + nblocks * sizeof(uint32_t);
- switch(length & 3) {
- case 3:
- k2 ^= tail[2] << 16;
diff --git a/sys-libs/libseccomp/files/libseccomp-2.6.0-bounds.patch b/sys-libs/libseccomp/files/libseccomp-2.6.0-bounds.patch
deleted file mode 100644
index 3f53cd7b1f28..000000000000
--- a/sys-libs/libseccomp/files/libseccomp-2.6.0-bounds.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-https://github.com/seccomp/libseccomp/commit/dd759e8c4f5685b526638fba9ec4fc24c37c9aec
-
-From dd759e8c4f5685b526638fba9ec4fc24c37c9aec Mon Sep 17 00:00:00 2001
-From: Alyssa Ross <hi@alyssa.is>
-Date: Thu, 13 Feb 2025 12:05:17 +0100
-Subject: [PATCH] api: fix seccomp_export_bpf_mem out-of-bounds read
-
-*len is the length of the destination buffer, but program->blks is
-probably not anywhere near that long. It's already been checked above
-that BPF_PGM_SIZE(program) is less than or equal to *len, so that's
-the correct value to use here to avoid either reading or writing too
-much.
-
-I noticed this because tests/11-basic-basic_errors started failing on
-musl after e797591 ("all: add seccomp_precompute() functionality").
-
-Signed-off-by: Alyssa Ross <hi@alyssa.is>
-Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
-Signed-off-by: Paul Moore <paul@paul-moore.com>
-(imported from commit e8dbc6b555fb936bdfb8ab86f9a45fda96a8b7a2)
----
- src/api.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/api.c b/src/api.c
-index adccef32..65a277a4 100644
---- a/src/api.c
-+++ b/src/api.c
-@@ -786,7 +786,7 @@ API int seccomp_export_bpf_mem(const scmp_filter_ctx ctx, void *buf,
- if (BPF_PGM_SIZE(program) > *len)
- rc = _rc_filter(-ERANGE);
- else
-- memcpy(buf, program->blks, *len);
-+ memcpy(buf, program->blks, BPF_PGM_SIZE(program));
- }
- *len = BPF_PGM_SIZE(program);
-
-
diff --git a/sys-libs/libseccomp/files/libseccomp-2.6.0-drop-bogus-test.patch b/sys-libs/libseccomp/files/libseccomp-2.6.0-drop-bogus-test.patch
deleted file mode 100644
index b2466e5e8c01..000000000000
--- a/sys-libs/libseccomp/files/libseccomp-2.6.0-drop-bogus-test.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://github.com/seccomp/libseccomp/commit/2f0f3b0e9121720108431c5d054164016f476230
-
-From 2f0f3b0e9121720108431c5d054164016f476230 Mon Sep 17 00:00:00 2001
-From: Paul Moore <paul@paul-moore.com>
-Date: Sat, 25 Jan 2025 11:12:55 -0500
-Subject: [PATCH] tests: remove the fuzzer from test 62-sim-arch_transactions
-
-We can't reliably run the bpf-sim-fuzz tests on tests which manipulate
-the filters arch/ABIs unless the filter is safe to run on all arch/ABIs,
-which is more or less impossible. Remove the bpf-sim-fuzz test section
-in test #62 to work around this, just as we do with the other similar
-tests.
-
-Signed-off-by: Paul Moore <paul@paul-moore.com>
-Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
-(cherry picked from commit 7db46d72f13c172b290818f624c2966bd0db5677)
---- a/tests/62-sim-arch_transactions.tests
-+++ b/tests/62-sim-arch_transactions.tests
-@@ -14,11 +14,6 @@ test type: bpf-sim
- 62-sim-arch_transactions +x86_64 open N N N N N N KILL
- 62-sim-arch_transactions +x86_64 close N N N N N N ALLOW
-
--test type: bpf-sim-fuzz
--
--# Testname StressCount
--62-sim-arch_transactions 5
--
- test type: bpf-valgrind
-
- # Testname
-
diff --git a/sys-libs/libseccomp/files/libseccomp-2.6.0-python-shared.patch b/sys-libs/libseccomp/files/libseccomp-2.6.0-python-shared.patch
deleted file mode 100644
index 34b12db22112..000000000000
--- a/sys-libs/libseccomp/files/libseccomp-2.6.0-python-shared.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 594fecb16833c693ac0cff8f857aec0edd097077 Mon Sep 17 00:00:00 2001
-Message-Id: <594fecb16833c693ac0cff8f857aec0edd097077.1666701554.git.mprivozn@redhat.com>
-From: Michal Privoznik <mprivozn@redhat.com>
-Date: Tue, 25 Oct 2022 14:39:07 +0200
-Subject: [PATCH] Link python module against shared library
-
----
- src/python/setup.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/python/setup.py b/src/python/setup.py
-index 46f9a73..85deb03 100755
---- a/src/python/setup.py
-+++ b/src/python/setup.py
-@@ -40,6 +40,6 @@ setup(
- ext_modules = cythonize([
- Extension("seccomp", ["seccomp.pyx"],
- # unable to handle libtool libraries directly
-- extra_objects=["../.libs/libseccomp.a"]),
-+ extra_objects=["../.libs/libseccomp.so"]),
- ])
- )
---
-2.37.4
-
diff --git a/sys-libs/libseccomp/libseccomp-2.6.0-r3.ebuild b/sys-libs/libseccomp/libseccomp-2.6.0-r3.ebuild
deleted file mode 100644
index 9823423ec9fb..000000000000
--- a/sys-libs/libseccomp/libseccomp-2.6.0-r3.ebuild
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_OPTIONAL=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit distutils-r1 multilib-minimal multiprocessing
-
-DESCRIPTION="High level interface to Linux seccomp filter"
-HOMEPAGE="https://github.com/seccomp/libseccomp"
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/seccomp/libseccomp.git"
- PRERELEASE="2.6.0"
- inherit autotools git-r3
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libseccomp.asc
- inherit verify-sig
-
- SRC_URI="
- https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz
- verify-sig? ( https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz.asc )
- "
- KEYWORDS="-* amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 x86"
-
- BDEPEND="verify-sig? ( sec-keys/openpgp-keys-libseccomp )"
-fi
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-IUSE="python static-libs test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- python? ( ${PYTHON_DEPS} )
-"
-# We need newer kernel headers; we don't keep strict control of the exact
-# version here, just be safe and pull in the latest stable ones. bug #551248
-DEPEND="
- ${RDEPEND}
- >=sys-kernel/linux-headers-5.15
-"
-BDEPEND+="
- ${DEPEND}
- dev-util/gperf
- python? (
- ${DISTUTILS_DEPS}
- dev-python/cython[${PYTHON_USEDEP}]
- )
-"
-
-PATCHES=(
- "${FILESDIR}"/libseccomp-2.6.0-python-shared.patch
- "${FILESDIR}"/libseccomp-2.5.3-skip-valgrind.patch
- "${FILESDIR}"/${P}-drop-bogus-test.patch
- "${FILESDIR}"/${P}-aliasing.patch
- "${FILESDIR}"/${P}-bounds.patch
-)
-
-src_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
- return
- fi
-
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- if [[ ${PV} == *9999 ]] ; then
- sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac || die
-
- eautoreconf
- fi
-
- # Silence noise when running Python tests
- sed -i -e 's:$(pwd)/../src/python/build/lib\.\*:$(pwd):' tests/regression || die
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- $(use_enable static-libs static)
- --disable-python
- )
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- emake
-
- if multilib_is_native_abi && use python ; then
- # setup.py expects libseccomp.so to live in "../.libs"
- # Copy the python files to the right place for this.
- rm -r "${BUILD_DIR}"/src/python || die
- cp -r "${S}"/src/python "${BUILD_DIR}"/src/python || die
- local -x CPPFLAGS="-I\"${BUILD_DIR}/include\" -I\"${S}/include\" ${CPPFLAGS}"
-
- # setup.py reads VERSION_RELEASE from the environment
- local -x VERSION_RELEASE=${PRERELEASE-${PV}}
-
- pushd "${BUILD_DIR}/src/python" >/dev/null || die
- distutils-r1_src_compile
- popd >/dev/null || die
- fi
-}
-
-multilib_src_test() {
- local -x LIBSECCOMP_TSTCFG_JOBS="$(get_makeopts_jobs)"
- emake -Onone check
-
- if multilib_is_native_abi && use python ; then
- distutils-r1_src_test
- fi
-}
-
-python_test() {
- local -x LIBSECCOMP_TSTCFG_MODE_LIST="python"
-
- emake -Onone check
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- if multilib_is_native_abi && use python ; then
- distutils-r1_src_install
- fi
-}
-
-multilib_src_install_all() {
- find "${ED}" -type f -name "${PN}.la" -delete || die
-
- einstalldocs
-}
diff --git a/sys-libs/libseccomp/libseccomp-9999.ebuild b/sys-libs/libseccomp/libseccomp-9999.ebuild
deleted file mode 100644
index d6f36b6ccd0e..000000000000
--- a/sys-libs/libseccomp/libseccomp-9999.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_OPTIONAL=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit distutils-r1 multilib-minimal multiprocessing
-
-DESCRIPTION="High level interface to Linux seccomp filter"
-HOMEPAGE="https://github.com/seccomp/libseccomp"
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/seccomp/libseccomp.git"
- PRERELEASE="2.6.0"
- inherit autotools git-r3
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libseccomp.asc
- inherit verify-sig
-
- SRC_URI="
- https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz
- verify-sig? ( https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz.asc )
- "
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86"
-
- BDEPEND="verify-sig? ( sec-keys/openpgp-keys-libseccomp )"
-fi
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-IUSE="python static-libs test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- python? ( ${PYTHON_DEPS} )
-"
-# We need newer kernel headers; we don't keep strict control of the exact
-# version here, just be safe and pull in the latest stable ones. bug #551248
-DEPEND="
- ${RDEPEND}
- >=sys-kernel/linux-headers-5.15
-"
-BDEPEND+="
- ${DEPEND}
- dev-util/gperf
- python? (
- ${DISTUTILS_DEPS}
- dev-python/cython[${PYTHON_USEDEP}]
- )
-"
-
-PATCHES=(
- "${FILESDIR}"/libseccomp-2.6.0-python-shared.patch
- "${FILESDIR}"/libseccomp-2.5.3-skip-valgrind.patch
-)
-
-src_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
- return
- fi
-
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- if [[ ${PV} == *9999 ]] ; then
- sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac || die
-
- eautoreconf
- fi
-
- # Silence noise when running Python tests
- sed -i -e 's:$(pwd)/../src/python/build/lib\.\*:$(pwd):' tests/regression || die
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- $(use_enable static-libs static)
- --disable-python
- )
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- emake
-
- if multilib_is_native_abi && use python ; then
- # setup.py expects libseccomp.so to live in "../.libs"
- # Copy the python files to the right place for this.
- rm -r "${BUILD_DIR}"/src/python || die
- cp -r "${S}"/src/python "${BUILD_DIR}"/src/python || die
- local -x CPPFLAGS="-I\"${BUILD_DIR}/include\" -I\"${S}/include\" ${CPPFLAGS}"
-
- # setup.py reads VERSION_RELEASE from the environment
- local -x VERSION_RELEASE=${PRERELEASE-${PV}}
-
- pushd "${BUILD_DIR}/src/python" >/dev/null || die
- distutils-r1_src_compile
- popd >/dev/null || die
- fi
-}
-
-multilib_src_test() {
- local -x LIBSECCOMP_TSTCFG_JOBS="$(get_makeopts_jobs)"
- emake -Onone check
-
- if multilib_is_native_abi && use python ; then
- distutils-r1_src_test
- fi
-}
-
-python_test() {
- local -x LIBSECCOMP_TSTCFG_MODE_LIST="python"
-
- emake -Onone check
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- if multilib_is_native_abi && use python ; then
- distutils-r1_src_install
- fi
-}
-
-multilib_src_install_all() {
- find "${ED}" -type f -name "${PN}.la" -delete || die
-
- einstalldocs
-}
diff --git a/sys-libs/libseccomp/metadata.xml b/sys-libs/libseccomp/metadata.xml
deleted file mode 100644
index 9b5a2293506c..000000000000
--- a/sys-libs/libseccomp/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <upstream>
- <remote-id type="github">seccomp/libseccomp</remote-id>
- <remote-id type="cpe">cpe:/a:libseccomp_project:libseccomp</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libselinux/Manifest b/sys-libs/libselinux/Manifest
deleted file mode 100644
index 566ca4d76476..000000000000
--- a/sys-libs/libselinux/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST libselinux-3.10.tar.gz 205800 BLAKE2B 81cba6d7266141719021c3bc9fc4a6f76c304c7b175430a208c4b3cffacf6131ddeea821263410478160146433ea9438b4c321e3c3e3e4c06afaa66cb4e8d589 SHA512 5783f737675eb94e0bdff082013589e5bddfa0669a357df185eb89f4f88cec8b90779e86c4b17b58f5c248175da0208c80cc2642046e348c7384dd799f1ba4c1
-DIST libselinux-3.8.1.tar.gz 204411 BLAKE2B f0508b3cf9c0fa2c315cab7b8048980a5a40188411ffd7790c5272e643742de073f0a8da44086e558c1b65ccb55e65cd559aad95e8da3cbfefd6adc9a5e09214 SHA512 646a31dff3b670a530adb9fc2fdc3ca9fe34a58e67e0fac52cc33bc7a01fa63c175987ef254c6c3bc7299cef137bc6f258dc378f4d70ae5c0fa0ece3bef42ab4
-DIST libselinux-3.9.tar.gz 205334 BLAKE2B 01ed24734ce72f7c1bbe866ef0482ca05d7ef6c7702764706c12ea76ca2eef575f4d7cab11c91f7a5ec9c56bc563edc7c5a171f3ae7ff8e5091b3697bcf82bf4 SHA512 a91942e7d16673396610d969f2471173989995a048edacf6076f6df3200a0d541a1c9932a7632d70aa7c728de7e7d3c62712e5aab6c0b763826e7ffef808cadb
diff --git a/sys-libs/libselinux/libselinux-3.10-r1.ebuild b/sys-libs/libselinux/libselinux-3.10-r1.ebuild
deleted file mode 100644
index 53529737c426..000000000000
--- a/sys-libs/libselinux/libselinux-3.10-r1.ebuild
+++ /dev/null
@@ -1,208 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-DISTUTILS_EXT=1
-DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{13..14} )
-USE_RUBY="ruby32 ruby33"
-
-# No, I am not calling ruby-ng
-inherit distutils-r1 dot-a flag-o-matic toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux userland library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="amd64 arm arm64 ~mips ~riscv x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="python ruby static-libs ruby_targets_ruby32 ruby_targets_ruby33"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}]
- >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP},static-libs(+)]
- python? ( ${PYTHON_DEPS} )
- ruby? (
- ruby_targets_ruby32? ( dev-lang/ruby:3.2 )
- ruby_targets_ruby33? ( dev-lang/ruby:3.3 )
- )
- elibc_musl? ( sys-libs/fts-standalone )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig
- python? (
- >=dev-lang/swig-2.0.9
- dev-python/pip[${PYTHON_USEDEP}]
- ${PYTHON_DEPS}
- ${DISTUTILS_DEPS}
- )
- ruby? ( >=dev-lang/swig-2.0.9 )"
-
-src_prepare() {
- eapply_user
-
- if use python; then
- distutils-r1_src_prepare
- fi
-
- multilib_copy_sources
-}
-
-src_configure() {
- # bug #926520
- # https://github.com/SELinuxProject/selinux/issues/461
- # https://github.com/SELinuxProject/selinux/issues/512
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- use static-libs && lto-guarantee-fat
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- default
- if multilib_is_native_abi; then
- if use python; then
- distutils-r1_src_configure
- fi
- fi
-}
-
-multilib_src_compile() {
- tc-export AR CC PKG_CONFIG RANLIB
-
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- emake \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
- USE_PCRE2=y \
- USE_LFS=y \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- all
-
- if multilib_is_native_abi; then
- if use python; then
- pushd src >/dev/null || die
- distutils-r1_src_compile
- popd >/dev/null || die
- fi
- if use ruby; then
- building() {
- einfo "Calling rubywrap for ${1}"
- # Clean up .lo file to force rebuild
- rm -f src/selinuxswig_ruby_wrap.lo || die
- emake \
- RUBY=${1} \
- LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_LFS=y \
- USE_PCRE2=y \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- building ${RUBYTARGET}
- done
- fi
- fi
-}
-
-multilib_src_test() {
- default
-
- if multilib_is_native_abi; then
- if use python; then
- distutils-r1_src_test
- fi
- fi
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_LFS=y \
- USE_PCRE2=y \
- install
-
- if multilib_is_native_abi; then
- if use python; then
- pushd src >/dev/null || die
- mv selinux.py __init__.py || die
- distutils-r1_src_install
- popd >/dev/null || die
- fi
- if use ruby; then
- installation() {
- einfo "Calling install-rubywrap for ${1}"
- # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
- rm src/selinuxswig_ruby_wrap.lo
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- RUBY=${1} \
- USE_LFS=y \
- USE_PCRE2=y \
- install-rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- installation ${RUBYTARGET}
- done
- fi
- fi
-
- if use static-libs; then
- strip-lto-bytecode
- else
- rm "${ED}"/usr/$(get_libdir)/*.a || die
- fi
-}
-
-python_install() {
- # this installs the C extensions only
- distutils-r1_python_install
-
- # now explicitly install the python package
- python_moduleinto selinux
- python_domodule __init__.py
-
- # install the C extension symlink
- local pycext="$(python -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES[0])' || die)"
- dosym -r "$(python_get_sitedir)/selinux/_selinux${pycext}" "$(python_get_sitedir)/_selinux${pycext}"
-}
-
-pkg_postinst() {
- # Fix bug 473502
- for POLTYPE in ${POLICY_TYPES};
- do
- mkdir -p "${ROOT}/etc/selinux/${POLTYPE}/contexts/files" || die
- touch "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/file_contexts.local" || die
- # Fix bug 516608
- for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
- if [[ -f "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
- sefcontext_compile "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" \
- || die "Failed to recompile contexts"
- fi
- done
- done
-}
diff --git a/sys-libs/libselinux/libselinux-3.10.ebuild b/sys-libs/libselinux/libselinux-3.10.ebuild
deleted file mode 100644
index 11c1dc3cbaeb..000000000000
--- a/sys-libs/libselinux/libselinux-3.10.ebuild
+++ /dev/null
@@ -1,176 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-DISTUTILS_EXT=1
-PYTHON_COMPAT=( python3_{13..14} )
-USE_RUBY="ruby32 ruby33"
-
-# No, I am not calling ruby-ng
-inherit distutils-r1 flag-o-matic toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux userland library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~mips ~riscv ~x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="python ruby static-libs ruby_targets_ruby32 ruby_targets_ruby33"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}]
- >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP},static-libs(+)]
- python? ( ${PYTHON_DEPS} )
- ruby? (
- ruby_targets_ruby32? ( dev-lang/ruby:3.2 )
- ruby_targets_ruby33? ( dev-lang/ruby:3.3 )
- )
- elibc_musl? ( sys-libs/fts-standalone )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig
- python? (
- >=dev-lang/swig-2.0.9
- dev-python/pip[${PYTHON_USEDEP}]
-)
- ruby? ( >=dev-lang/swig-2.0.9 )"
-
-src_prepare() {
- eapply_user
-
- multilib_copy_sources
-}
-
-src_configure() {
- # bug #926520
- # https://github.com/SELinuxProject/selinux/issues/461
- # https://github.com/SELinuxProject/selinux/issues/512
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
- tc-export AR CC PKG_CONFIG RANLIB
-
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- emake \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
- USE_PCRE2=y \
- USE_LFS=y \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- all
-
- if multilib_is_native_abi; then
- if use python; then
- pushd src >/dev/null || die
- distutils-r1_src_compile
- popd >/dev/null || die
- fi
- if use ruby; then
- building() {
- einfo "Calling rubywrap for ${1}"
- # Clean up .lo file to force rebuild
- rm -f src/selinuxswig_ruby_wrap.lo || die
- emake \
- RUBY=${1} \
- LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_LFS=y \
- USE_PCRE2=y \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- building ${RUBYTARGET}
- done
- fi
- fi
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_LFS=y \
- USE_PCRE2=y \
- install
-
- if multilib_is_native_abi; then
- if use python; then
- pushd src >/dev/null || die
- mv selinux.py __init__.py || die
- distutils-r1_src_install
- popd >/dev/null || die
- fi
- if use ruby; then
- installation() {
- einfo "Calling install-rubywrap for ${1}"
- # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
- rm src/selinuxswig_ruby_wrap.lo
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- RUBY=${1} \
- USE_LFS=y \
- USE_PCRE2=y \
- install-rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- installation ${RUBYTARGET}
- done
- fi
- fi
-
- use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a || die
-}
-
-python_install() {
- # this installs the C extensions only
- distutils-r1_python_install
-
- # now explicitly install the python package
- python_moduleinto selinux
- python_domodule __init__.py
-
- # install the C extension symlink
- local pycext="$(python -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES[0])' || die)"
- dosym -r "$(python_get_sitedir)/selinux/_selinux${pycext}" "$(python_get_sitedir)/_selinux${pycext}"
-}
-
-pkg_postinst() {
- # Fix bug 473502
- for POLTYPE in ${POLICY_TYPES};
- do
- mkdir -p "${ROOT}/etc/selinux/${POLTYPE}/contexts/files" || die
- touch "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/file_contexts.local" || die
- # Fix bug 516608
- for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
- if [[ -f "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
- sefcontext_compile "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" \
- || die "Failed to recompile contexts"
- fi
- done
- done
-}
diff --git a/sys-libs/libselinux/libselinux-3.8.1-r2.ebuild b/sys-libs/libselinux/libselinux-3.8.1-r2.ebuild
deleted file mode 100644
index 6b95b2e7d06f..000000000000
--- a/sys-libs/libselinux/libselinux-3.8.1-r2.ebuild
+++ /dev/null
@@ -1,167 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-DISTUTILS_EXT=1
-PYTHON_COMPAT=( python3_{13..14} )
-USE_RUBY="ruby32 ruby33"
-
-# No, I am not calling ruby-ng
-inherit distutils-r1 toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux userland library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="amd64 arm arm64 ~mips ~riscv x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="python ruby static-libs ruby_targets_ruby32 ruby_targets_ruby33"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}]
- >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP},static-libs(+)]
- python? ( ${PYTHON_DEPS} )
- ruby? (
- ruby_targets_ruby32? ( dev-lang/ruby:3.2 )
- ruby_targets_ruby33? ( dev-lang/ruby:3.3 )
- )
- elibc_musl? ( sys-libs/fts-standalone )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig
- python? (
- >=dev-lang/swig-2.0.9
- dev-python/pip[${PYTHON_USEDEP}]
-)
- ruby? ( >=dev-lang/swig-2.0.9 )"
-
-src_prepare() {
- eapply_user
-
- multilib_copy_sources
-}
-
-multilib_src_compile() {
- tc-export AR CC PKG_CONFIG RANLIB
-
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- emake \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
- USE_PCRE2=y \
- USE_LFS=y \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- all
-
- if multilib_is_native_abi; then
- if use python; then
- pushd src >/dev/null || die
- distutils-r1_src_compile
- popd >/dev/null || die
- fi
- if use ruby; then
- building() {
- einfo "Calling rubywrap for ${1}"
- # Clean up .lo file to force rebuild
- rm -f src/selinuxswig_ruby_wrap.lo || die
- emake \
- RUBY=${1} \
- LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_LFS=y \
- USE_PCRE2=y \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- building ${RUBYTARGET}
- done
- fi
- fi
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_LFS=y \
- USE_PCRE2=y \
- install
-
- if multilib_is_native_abi; then
- if use python; then
- pushd src >/dev/null || die
- mv selinux.py __init__.py || die
- distutils-r1_src_install
- popd >/dev/null || die
- fi
- if use ruby; then
- installation() {
- einfo "Calling install-rubywrap for ${1}"
- # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
- rm src/selinuxswig_ruby_wrap.lo
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- RUBY=${1} \
- USE_LFS=y \
- USE_PCRE2=y \
- install-rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- installation ${RUBYTARGET}
- done
- fi
- fi
-
- use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a || die
-}
-
-python_install() {
- # this installs the C extensions only
- distutils-r1_python_install
-
- # now explicitly install the python package
- python_moduleinto selinux
- python_domodule __init__.py
-
- # install the C extension symlink
- local pycext="$(python -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES[0])' || die)"
- dosym -r "$(python_get_sitedir)/selinux/_selinux${pycext}" "$(python_get_sitedir)/_selinux${pycext}"
-}
-
-pkg_postinst() {
- # Fix bug 473502
- for POLTYPE in ${POLICY_TYPES};
- do
- mkdir -p "${ROOT}/etc/selinux/${POLTYPE}/contexts/files" || die
- touch "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/file_contexts.local" || die
- # Fix bug 516608
- for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
- if [[ -f "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
- sefcontext_compile "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" \
- || die "Failed to recompile contexts"
- fi
- done
- done
-}
diff --git a/sys-libs/libselinux/libselinux-3.8.1-r3.ebuild b/sys-libs/libselinux/libselinux-3.8.1-r3.ebuild
deleted file mode 100644
index 5be83c6963d3..000000000000
--- a/sys-libs/libselinux/libselinux-3.8.1-r3.ebuild
+++ /dev/null
@@ -1,192 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-DISTUTILS_EXT=1
-DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{13..14} )
-USE_RUBY="ruby32 ruby33"
-
-# No, I am not calling ruby-ng
-inherit distutils-r1 toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux userland library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~mips ~riscv ~x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="python ruby static-libs ruby_targets_ruby32 ruby_targets_ruby33"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}]
- >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP},static-libs(+)]
- python? ( ${PYTHON_DEPS} )
- ruby? (
- ruby_targets_ruby32? ( dev-lang/ruby:3.2 )
- ruby_targets_ruby33? ( dev-lang/ruby:3.3 )
- )
- elibc_musl? ( sys-libs/fts-standalone )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig
- python? (
- >=dev-lang/swig-2.0.9
- dev-python/pip[${PYTHON_USEDEP}]
- ${PYTHON_DEPS}
- ${DISTUTILS_DEPS}
- )
- ruby? ( >=dev-lang/swig-2.0.9 )"
-
-src_prepare() {
- eapply_user
-
- if use python; then
- distutils-r1_src_prepare
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- default
- if multilib_is_native_abi; then
- if use python; then
- distutils-r1_src_configure
- fi
- fi
-}
-
-multilib_src_compile() {
- tc-export AR CC PKG_CONFIG RANLIB
-
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- emake \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
- USE_PCRE2=y \
- USE_LFS=y \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- all
-
- if multilib_is_native_abi; then
- if use python; then
- pushd src >/dev/null || die
- distutils-r1_src_compile
- popd >/dev/null || die
- fi
- if use ruby; then
- building() {
- einfo "Calling rubywrap for ${1}"
- # Clean up .lo file to force rebuild
- rm -f src/selinuxswig_ruby_wrap.lo || die
- emake \
- RUBY=${1} \
- LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_LFS=y \
- USE_PCRE2=y \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- building ${RUBYTARGET}
- done
- fi
- fi
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_LFS=y \
- USE_PCRE2=y \
- install
-
- if multilib_is_native_abi; then
- if use python; then
- pushd src >/dev/null || die
- mv selinux.py __init__.py || die
- distutils-r1_src_install
- popd >/dev/null || die
- fi
- if use ruby; then
- installation() {
- einfo "Calling install-rubywrap for ${1}"
- # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
- rm src/selinuxswig_ruby_wrap.lo
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- RUBY=${1} \
- USE_LFS=y \
- USE_PCRE2=y \
- install-rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- installation ${RUBYTARGET}
- done
- fi
- fi
-
- use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a || die
-}
-
-python_install() {
- # this installs the C extensions only
- distutils-r1_python_install
-
- # now explicitly install the python package
- python_moduleinto selinux
- python_domodule __init__.py
-
- # install the C extension symlink
- local pycext="$(python -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES[0])' || die)"
- dosym -r "$(python_get_sitedir)/selinux/_selinux${pycext}" "$(python_get_sitedir)/_selinux${pycext}"
-}
-
-multilib_src_test() {
- default
- if multilib_is_native_abi; then
- if use python; then
- distutils-r1_src_test
- fi
- fi
-}
-
-pkg_postinst() {
- # Fix bug 473502
- for POLTYPE in ${POLICY_TYPES};
- do
- mkdir -p "${ROOT}/etc/selinux/${POLTYPE}/contexts/files" || die
- touch "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/file_contexts.local" || die
- # Fix bug 516608
- for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
- if [[ -f "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
- sefcontext_compile "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" \
- || die "Failed to recompile contexts"
- fi
- done
- done
-}
diff --git a/sys-libs/libselinux/libselinux-3.9.ebuild b/sys-libs/libselinux/libselinux-3.9.ebuild
deleted file mode 100644
index 2cfda2f11e05..000000000000
--- a/sys-libs/libselinux/libselinux-3.9.ebuild
+++ /dev/null
@@ -1,176 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-DISTUTILS_EXT=1
-PYTHON_COMPAT=( python3_{13..14} )
-USE_RUBY="ruby32 ruby33"
-
-# No, I am not calling ruby-ng
-inherit distutils-r1 flag-o-matic toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux userland library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="amd64 arm arm64 ~mips ~riscv x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="python ruby static-libs ruby_targets_ruby32 ruby_targets_ruby33"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}]
- >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP},static-libs(+)]
- python? ( ${PYTHON_DEPS} )
- ruby? (
- ruby_targets_ruby32? ( dev-lang/ruby:3.2 )
- ruby_targets_ruby33? ( dev-lang/ruby:3.3 )
- )
- elibc_musl? ( sys-libs/fts-standalone )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig
- python? (
- >=dev-lang/swig-2.0.9
- dev-python/pip[${PYTHON_USEDEP}]
-)
- ruby? ( >=dev-lang/swig-2.0.9 )"
-
-src_prepare() {
- eapply_user
-
- multilib_copy_sources
-}
-
-src_configure() {
- # bug #926520
- # https://github.com/SELinuxProject/selinux/issues/461
- # https://github.com/SELinuxProject/selinux/issues/512
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
- tc-export AR CC PKG_CONFIG RANLIB
-
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- emake \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
- USE_PCRE2=y \
- USE_LFS=y \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- all
-
- if multilib_is_native_abi; then
- if use python; then
- pushd src >/dev/null || die
- distutils-r1_src_compile
- popd >/dev/null || die
- fi
- if use ruby; then
- building() {
- einfo "Calling rubywrap for ${1}"
- # Clean up .lo file to force rebuild
- rm -f src/selinuxswig_ruby_wrap.lo || die
- emake \
- RUBY=${1} \
- LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_LFS=y \
- USE_PCRE2=y \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- building ${RUBYTARGET}
- done
- fi
- fi
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_LFS=y \
- USE_PCRE2=y \
- install
-
- if multilib_is_native_abi; then
- if use python; then
- pushd src >/dev/null || die
- mv selinux.py __init__.py || die
- distutils-r1_src_install
- popd >/dev/null || die
- fi
- if use ruby; then
- installation() {
- einfo "Calling install-rubywrap for ${1}"
- # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
- rm src/selinuxswig_ruby_wrap.lo
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- RUBY=${1} \
- USE_LFS=y \
- USE_PCRE2=y \
- install-rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- installation ${RUBYTARGET}
- done
- fi
- fi
-
- use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a || die
-}
-
-python_install() {
- # this installs the C extensions only
- distutils-r1_python_install
-
- # now explicitly install the python package
- python_moduleinto selinux
- python_domodule __init__.py
-
- # install the C extension symlink
- local pycext="$(python -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES[0])' || die)"
- dosym -r "$(python_get_sitedir)/selinux/_selinux${pycext}" "$(python_get_sitedir)/_selinux${pycext}"
-}
-
-pkg_postinst() {
- # Fix bug 473502
- for POLTYPE in ${POLICY_TYPES};
- do
- mkdir -p "${ROOT}/etc/selinux/${POLTYPE}/contexts/files" || die
- touch "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/file_contexts.local" || die
- # Fix bug 516608
- for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
- if [[ -f "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
- sefcontext_compile "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" \
- || die "Failed to recompile contexts"
- fi
- done
- done
-}
diff --git a/sys-libs/libselinux/libselinux-9999.ebuild b/sys-libs/libselinux/libselinux-9999.ebuild
deleted file mode 100644
index 1f4306f11aed..000000000000
--- a/sys-libs/libselinux/libselinux-9999.ebuild
+++ /dev/null
@@ -1,208 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-DISTUTILS_EXT=1
-DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{13..14} )
-USE_RUBY="ruby32 ruby33"
-
-# No, I am not calling ruby-ng
-inherit distutils-r1 dot-a flag-o-matic toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux userland library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~mips ~riscv ~x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="python ruby static-libs ruby_targets_ruby32 ruby_targets_ruby33"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}]
- >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP},static-libs(+)]
- python? ( ${PYTHON_DEPS} )
- ruby? (
- ruby_targets_ruby32? ( dev-lang/ruby:3.2 )
- ruby_targets_ruby33? ( dev-lang/ruby:3.3 )
- )
- elibc_musl? ( sys-libs/fts-standalone )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig
- python? (
- >=dev-lang/swig-2.0.9
- dev-python/pip[${PYTHON_USEDEP}]
- ${PYTHON_DEPS}
- ${DISTUTILS_DEPS}
- )
- ruby? ( >=dev-lang/swig-2.0.9 )"
-
-src_prepare() {
- eapply_user
-
- if use python; then
- distutils-r1_src_prepare
- fi
-
- multilib_copy_sources
-}
-
-src_configure() {
- # bug #926520
- # https://github.com/SELinuxProject/selinux/issues/461
- # https://github.com/SELinuxProject/selinux/issues/512
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- use static-libs && lto-guarantee-fat
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- default
- if multilib_is_native_abi; then
- if use python; then
- distutils-r1_src_configure
- fi
- fi
-}
-
-multilib_src_compile() {
- tc-export AR CC PKG_CONFIG RANLIB
-
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- emake \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
- USE_PCRE2=y \
- USE_LFS=y \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- all
-
- if multilib_is_native_abi; then
- if use python; then
- pushd src >/dev/null || die
- distutils-r1_src_compile
- popd >/dev/null || die
- fi
- if use ruby; then
- building() {
- einfo "Calling rubywrap for ${1}"
- # Clean up .lo file to force rebuild
- rm -f src/selinuxswig_ruby_wrap.lo || die
- emake \
- RUBY=${1} \
- LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_LFS=y \
- USE_PCRE2=y \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- building ${RUBYTARGET}
- done
- fi
- fi
-}
-
-multilib_src_test() {
- default
-
- if multilib_is_native_abi; then
- if use python; then
- distutils-r1_src_test
- fi
- fi
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_LFS=y \
- USE_PCRE2=y \
- install
-
- if multilib_is_native_abi; then
- if use python; then
- pushd src >/dev/null || die
- mv selinux.py __init__.py || die
- distutils-r1_src_install
- popd >/dev/null || die
- fi
- if use ruby; then
- installation() {
- einfo "Calling install-rubywrap for ${1}"
- # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
- rm src/selinuxswig_ruby_wrap.lo
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- RUBY=${1} \
- USE_LFS=y \
- USE_PCRE2=y \
- install-rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- installation ${RUBYTARGET}
- done
- fi
- fi
-
- if use static-libs; then
- strip-lto-bytecode
- else
- rm "${ED}"/usr/$(get_libdir)/*.a || die
- fi
-}
-
-python_install() {
- # this installs the C extensions only
- distutils-r1_python_install
-
- # now explicitly install the python package
- python_moduleinto selinux
- python_domodule __init__.py
-
- # install the C extension symlink
- local pycext="$(python -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES[0])' || die)"
- dosym -r "$(python_get_sitedir)/selinux/_selinux${pycext}" "$(python_get_sitedir)/_selinux${pycext}"
-}
-
-pkg_postinst() {
- # Fix bug 473502
- for POLTYPE in ${POLICY_TYPES};
- do
- mkdir -p "${ROOT}/etc/selinux/${POLTYPE}/contexts/files" || die
- touch "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/file_contexts.local" || die
- # Fix bug 516608
- for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
- if [[ -f "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
- sefcontext_compile "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" \
- || die "Failed to recompile contexts"
- fi
- done
- done
-}
diff --git a/sys-libs/libselinux/metadata.xml b/sys-libs/libselinux/metadata.xml
deleted file mode 100644
index dfd7bb04e0a4..000000000000
--- a/sys-libs/libselinux/metadata.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>selinux@gentoo.org</email>
- <name>SELinux Team</name>
- </maintainer>
- <longdescription>
- Libselinux provides an API for SELinux applications to get and set
- process and file security contexts and to obtain security policy
- decisions. Required for any applications that use the SELinux API.
- </longdescription>
- <upstream>
- <remote-id type="cpe">cpe:/a:selinuxproject:libselinux</remote-id>
- <remote-id type="github">SELinuxProject/selinux</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libsemanage/Manifest b/sys-libs/libsemanage/Manifest
deleted file mode 100644
index fc53ccc05cd4..000000000000
--- a/sys-libs/libsemanage/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST libsemanage-3.10.tar.gz 185969 BLAKE2B f075e06969b403702dbc00776a62d9362b7ec9d4d5cf561a7067162fa4cbd1dbd019b841df1d4de56ffb115db92a3ebc8303e4a607ba5811c465033ef8c8bb6c SHA512 e07cb1d7e145b3baa2fb857c043c8ede7581d29fbb6a59709ebbee73097c12768e8b77eab35b4394efc0a655f3d266cdf7b08ac69759d6989d41e4213fe8aafd
-DIST libsemanage-3.8.1.tar.gz 184618 BLAKE2B 25816a0dccc9cb4fe2033e548e0e840b5ffbde3771a8a4f6d81223c7c29e3622eb0152050d8f1ba41bd6b9afb0ad9819e9a1fabd9722e01cad57d7fd7a135d5d SHA512 ac3729ba4934a48a33e082af35baa9e25e6806855afb0f0e4e22aa67be201518c3d4933b8cf4dec83e5acbe178301276f51850bb1b16bc13e027a470ac7f1eb5
-DIST libsemanage-3.9.tar.gz 185278 BLAKE2B 8ba8771ec28b12aa9641b2f7d653c48941f52a245c0784c0f87836948babc308ffe882df5154dfeba3c267f91b916165d4fd0b83de302da572c7dea02e819009 SHA512 a859e8d9313c922942a9be0477b387775b19c41bd108f80992112dcd2696701f40a890f5e6fc3087e7bfe69b382a1bcffa3e02c8996a719e763fbe2f6787c61c
diff --git a/sys-libs/libsemanage/libsemanage-3.10.ebuild b/sys-libs/libsemanage/libsemanage-3.10.ebuild
deleted file mode 100644
index 0b737f008ba8..000000000000
--- a/sys-libs/libsemanage/libsemanage-3.10.ebuild
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit dot-a python-r1 toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux kernel and policy management library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="amd64 arm arm64 ~mips ~riscv x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/2"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="app-arch/bzip2[${MULTILIB_USEDEP}]
- >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
- >=sys-libs/libselinux-${PV}:=[${MULTILIB_USEDEP}]
- >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}]
- ${PYTHON_DEPS}"
-DEPEND="${RDEPEND}"
-BDEPEND=">=dev-lang/swig-2.0.4-r1
- app-alternatives/yacc
- app-alternatives/lex
- virtual/pkgconfig"
-
-# tests are not meant to be run outside of the
-# full SELinux userland repo
-RESTRICT="test"
-
-src_prepare() {
- eapply_user
-
- cat <<-EOF >> "${S}/src/semanage.conf" || die
- # Set this to true to save the linked policy.
- # This is normally only useful for analysis
- # or debugging of policy.
- save-linked=false
-
- # Set this to 0 to disable assertion checking.
- # This should speed up building the kernel policy
- # from policy modules, but may leave you open to
- # dangerous rules which assertion checking
- # would catch.
- expand-check=1
-
- # Modules in the module store can be compressed
- # with bzip2. Set this to the bzip2 blocksize
- # 1-9 when compressing. The higher the number,
- # the more memory is traded off for disk space.
- # Set to 0 to disable bzip2 compression.
- bzip-blocksize=0
-
- # Reduce memory usage for bzip2 compression and
- # decompression of modules in the module store.
- bzip-small=true
- EOF
-
- multilib_copy_sources
-}
-
-src_configure() {
- lto-guarantee-fat
- multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- emake \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- all
-
- if multilib_is_native_abi; then
- building_py() {
- emake \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- "$@"
- }
- python_foreach_impl building_py swigify
- python_foreach_impl building_py pywrap
- fi
-}
-
-multilib_src_install() {
- emake \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- DESTDIR="${ED}" install
-
- strip-lto-bytecode
-
- if multilib_is_native_abi; then
- installation_py() {
- emake DESTDIR="${ED}" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \
- install-pywrap
- python_optimize # bug 531638
- }
- python_foreach_impl installation_py
- fi
-}
-
-multiib_src_install_all() {
- python_setup
- python_fix_shebang "${ED}"/usr/libexec/selinux/semanage_migrate_store
-}
diff --git a/sys-libs/libsemanage/libsemanage-3.8.1.ebuild b/sys-libs/libsemanage/libsemanage-3.8.1.ebuild
deleted file mode 100644
index 4c6e0c168317..000000000000
--- a/sys-libs/libsemanage/libsemanage-3.8.1.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit python-r1 toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux kernel and policy management library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="amd64 arm arm64 ~mips ~riscv x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/2"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="app-arch/bzip2[${MULTILIB_USEDEP}]
- >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
- >=sys-libs/libselinux-${PV}:=[${MULTILIB_USEDEP}]
- >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}]
- ${PYTHON_DEPS}"
-DEPEND="${RDEPEND}"
-BDEPEND=">=dev-lang/swig-2.0.4-r1
- app-alternatives/yacc
- app-alternatives/lex
- virtual/pkgconfig"
-
-# tests are not meant to be run outside of the
-# full SELinux userland repo
-RESTRICT="test"
-
-src_prepare() {
- eapply_user
-
- echo >> "${S}/src/semanage.conf"
- echo "# Set this to true to save the linked policy." >> "${S}/src/semanage.conf"
- echo "# This is normally only useful for analysis" >> "${S}/src/semanage.conf"
- echo "# or debugging of policy." >> "${S}/src/semanage.conf"
- echo "save-linked=false" >> "${S}/src/semanage.conf"
- echo >> "${S}/src/semanage.conf"
- echo "# Set this to 0 to disable assertion checking." >> "${S}/src/semanage.conf"
- echo "# This should speed up building the kernel policy" >> "${S}/src/semanage.conf"
- echo "# from policy modules, but may leave you open to" >> "${S}/src/semanage.conf"
- echo "# dangerous rules which assertion checking" >> "${S}/src/semanage.conf"
- echo "# would catch." >> "${S}/src/semanage.conf"
- echo "expand-check=1" >> "${S}/src/semanage.conf"
- echo >> "${S}/src/semanage.conf"
- echo "# Modules in the module store can be compressed" >> "${S}/src/semanage.conf"
- echo "# with bzip2. Set this to the bzip2 blocksize" >> "${S}/src/semanage.conf"
- echo "# 1-9 when compressing. The higher the number," >> "${S}/src/semanage.conf"
- echo "# the more memory is traded off for disk space." >> "${S}/src/semanage.conf"
- echo "# Set to 0 to disable bzip2 compression." >> "${S}/src/semanage.conf"
- echo "bzip-blocksize=0" >> "${S}/src/semanage.conf"
- echo >> "${S}/src/semanage.conf"
- echo "# Reduce memory usage for bzip2 compression and" >> "${S}/src/semanage.conf"
- echo "# decompression of modules in the module store." >> "${S}/src/semanage.conf"
- echo "bzip-small=true" >> "${S}/src/semanage.conf"
-
- multilib_copy_sources
-}
-
-multilib_src_compile() {
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- emake \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- all
-
- if multilib_is_native_abi; then
- building_py() {
- emake \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- "$@"
- }
- python_foreach_impl building_py swigify
- python_foreach_impl building_py pywrap
- fi
-}
-
-multilib_src_install() {
- emake \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- DESTDIR="${ED}" install
-
- if multilib_is_native_abi; then
- installation_py() {
- emake DESTDIR="${ED}" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \
- install-pywrap
- python_optimize # bug 531638
- }
- python_foreach_impl installation_py
- fi
-}
-
-multiib_src_install_all() {
- python_setup
- python_fix_shebang "${ED}"/usr/libexec/selinux/semanage_migrate_store
-}
diff --git a/sys-libs/libsemanage/libsemanage-3.9.ebuild b/sys-libs/libsemanage/libsemanage-3.9.ebuild
deleted file mode 100644
index e8796ff56677..000000000000
--- a/sys-libs/libsemanage/libsemanage-3.9.ebuild
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit python-r1 toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux kernel and policy management library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="amd64 arm arm64 ~mips ~riscv x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/2"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="app-arch/bzip2[${MULTILIB_USEDEP}]
- >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
- >=sys-libs/libselinux-${PV}:=[${MULTILIB_USEDEP}]
- >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}]
- ${PYTHON_DEPS}"
-DEPEND="${RDEPEND}"
-BDEPEND=">=dev-lang/swig-2.0.4-r1
- app-alternatives/yacc
- app-alternatives/lex
- virtual/pkgconfig"
-
-# tests are not meant to be run outside of the
-# full SELinux userland repo
-RESTRICT="test"
-
-src_prepare() {
- eapply_user
-
- cat <<-EOF >> "${S}/src/semanage.conf" || die
- # Set this to true to save the linked policy.
- # This is normally only useful for analysis
- # or debugging of policy.
- save-linked=false
-
- # Set this to 0 to disable assertion checking.
- # This should speed up building the kernel policy
- # from policy modules, but may leave you open to
- # dangerous rules which assertion checking
- # would catch.
- expand-check=1
-
- # Modules in the module store can be compressed
- # with bzip2. Set this to the bzip2 blocksize
- # 1-9 when compressing. The higher the number,
- # the more memory is traded off for disk space.
- # Set to 0 to disable bzip2 compression.
- bzip-blocksize=0
-
- # Reduce memory usage for bzip2 compression and
- # decompression of modules in the module store.
- bzip-small=true
- EOF
-
- multilib_copy_sources
-}
-
-multilib_src_compile() {
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- emake \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- all
-
- if multilib_is_native_abi; then
- building_py() {
- emake \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- "$@"
- }
- python_foreach_impl building_py swigify
- python_foreach_impl building_py pywrap
- fi
-}
-
-multilib_src_install() {
- emake \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- DESTDIR="${ED}" install
-
- if multilib_is_native_abi; then
- installation_py() {
- emake DESTDIR="${ED}" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \
- install-pywrap
- python_optimize # bug 531638
- }
- python_foreach_impl installation_py
- fi
-}
-
-multiib_src_install_all() {
- python_setup
- python_fix_shebang "${ED}"/usr/libexec/selinux/semanage_migrate_store
-}
diff --git a/sys-libs/libsemanage/libsemanage-9999.ebuild b/sys-libs/libsemanage/libsemanage-9999.ebuild
deleted file mode 100644
index 35f998f377ee..000000000000
--- a/sys-libs/libsemanage/libsemanage-9999.ebuild
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit dot-a python-r1 toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux kernel and policy management library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~mips ~riscv ~x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/2"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="app-arch/bzip2[${MULTILIB_USEDEP}]
- >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
- >=sys-libs/libselinux-${PV}:=[${MULTILIB_USEDEP}]
- >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}]
- ${PYTHON_DEPS}"
-DEPEND="${RDEPEND}"
-BDEPEND=">=dev-lang/swig-2.0.4-r1
- app-alternatives/yacc
- app-alternatives/lex
- virtual/pkgconfig"
-
-# tests are not meant to be run outside of the
-# full SELinux userland repo
-RESTRICT="test"
-
-src_prepare() {
- eapply_user
-
- cat <<-EOF >> "${S}/src/semanage.conf" || die
- # Set this to true to save the linked policy.
- # This is normally only useful for analysis
- # or debugging of policy.
- save-linked=false
-
- # Set this to 0 to disable assertion checking.
- # This should speed up building the kernel policy
- # from policy modules, but may leave you open to
- # dangerous rules which assertion checking
- # would catch.
- expand-check=1
-
- # Modules in the module store can be compressed
- # with bzip2. Set this to the bzip2 blocksize
- # 1-9 when compressing. The higher the number,
- # the more memory is traded off for disk space.
- # Set to 0 to disable bzip2 compression.
- bzip-blocksize=0
-
- # Reduce memory usage for bzip2 compression and
- # decompression of modules in the module store.
- bzip-small=true
- EOF
-
- multilib_copy_sources
-}
-
-src_configure() {
- lto-guarantee-fat
- multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- emake \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- all
-
- if multilib_is_native_abi; then
- building_py() {
- emake \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- "$@"
- }
- python_foreach_impl building_py swigify
- python_foreach_impl building_py pywrap
- fi
-}
-
-multilib_src_install() {
- emake \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- DESTDIR="${ED}" install
-
- strip-lto-bytecode
-
- if multilib_is_native_abi; then
- installation_py() {
- emake DESTDIR="${ED}" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \
- install-pywrap
- python_optimize # bug 531638
- }
- python_foreach_impl installation_py
- fi
-}
-
-multiib_src_install_all() {
- python_setup
- python_fix_shebang "${ED}"/usr/libexec/selinux/semanage_migrate_store
-}
diff --git a/sys-libs/libsemanage/metadata.xml b/sys-libs/libsemanage/metadata.xml
deleted file mode 100644
index 6de2a0cea852..000000000000
--- a/sys-libs/libsemanage/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>selinux@gentoo.org</email>
- <name>SELinux Team</name>
- </maintainer>
- <upstream>
- <remote-id type="github">SELinuxProject/selinux</remote-id>
- <remote-id type="cpe">cpe:/a:selinuxproject:libsemanage</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libsepol/Manifest b/sys-libs/libsepol/Manifest
deleted file mode 100644
index 3372e501915d..000000000000
--- a/sys-libs/libsepol/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST libsepol-3.10.tar.gz 514545 BLAKE2B 4c9b416a1cb0fcadc831b517444c2d60bc647d5f19c15d33885ce70653c274d51d6d31d504d23e5f75e367da9cb58e916078e142599c1a83d8cdec5e9da0f97e SHA512 95a12779a41577d02a13922d1a484954a6b041b3be9a76836e179ab3a4e4b83b90df63e3a3f32b0862466ed8748280fa9b820f8dc96a3887bcdde081947e7450
-DIST libsepol-3.8.1.tar.gz 513830 BLAKE2B f1877499a31289af941e36b80c1c25ca2b32205684d958c4a8b04e05006346138046e3f263e73db3889f918e2ff93818f4d6176de5d17669b863c853d04928e0 SHA512 6a66fbbc25f4ca5f58b07d19a70f3f6c233594ea5bc5a9f5d9f008eb03a83cea84ae0f03329f340b95e4f7135981d06cb9e66a7b3ca2f1494a71bbdcb5a01665
-DIST libsepol-3.9.tar.gz 515726 BLAKE2B 646bdb23fa249660208201c1a286eb42da0877cf38c3422afe7dab60d48b05a4db806bc54eb8a5c7f3a5f23eb75b448bac16a76a3c0c9d6368ec1fbcc1e5118b SHA512 9a198fb0b7f4981939e6556ba690892bda77446785c2015cdf4178fa303095186f255dfbebe04e6749a139379718a012349aa7a70fac94a860a3745c0536afe9
diff --git a/sys-libs/libsepol/libsepol-3.10.ebuild b/sys-libs/libsepol/libsepol-3.10.ebuild
deleted file mode 100644
index 67fb105623ff..000000000000
--- a/sys-libs/libsepol/libsepol-3.10.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-inherit dot-a toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux binary policy representation library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="amd64 arm arm64 ~mips ~riscv x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/2"
-IUSE="+static-libs"
-
-BDEPEND="sys-devel/flex"
-
-# tests are not meant to be run outside of the full SELinux userland repo
-RESTRICT="test"
-
-src_prepare() {
- eapply_user
- multilib_copy_sources
-}
-
-my_make() {
- use static-libs && lto-guarantee-fat
- emake \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="${EPREFIX}/$(get_libdir)" \
- "${@}"
-}
-
-multilib_src_compile() {
- tc-export CC AR RANLIB
-
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- my_make
-}
-
-multilib_src_install() {
- my_make DESTDIR="${D}" install
- if use static-libs; then
- strip-lto-bytecode
- else
- rm "${ED}"/usr/$(get_libdir)/*.a || die
- fi
-}
diff --git a/sys-libs/libsepol/libsepol-3.8.1.ebuild b/sys-libs/libsepol/libsepol-3.8.1.ebuild
deleted file mode 100644
index 06dc7151a40d..000000000000
--- a/sys-libs/libsepol/libsepol-3.8.1.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-inherit dot-a toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux binary policy representation library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="amd64 arm arm64 ~mips ~riscv x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/2"
-IUSE="+static-libs"
-
-# tests are not meant to be run outside of the full SELinux userland repo
-RESTRICT="test"
-
-src_prepare() {
- eapply_user
- multilib_copy_sources
-}
-
-my_make() {
- use static-libs && lto-guarantee-fat
- emake \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="${EPREFIX}/$(get_libdir)" \
- "${@}"
-}
-
-multilib_src_compile() {
- tc-export CC AR RANLIB
-
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- my_make
-}
-
-multilib_src_install() {
- my_make DESTDIR="${D}" install
- if use static-libs; then
- strip-lto-bytecode
- else
- rm "${ED}"/usr/$(get_libdir)/*.a || die
- fi
-}
diff --git a/sys-libs/libsepol/libsepol-3.9.ebuild b/sys-libs/libsepol/libsepol-3.9.ebuild
deleted file mode 100644
index f6ecda156ad2..000000000000
--- a/sys-libs/libsepol/libsepol-3.9.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-inherit dot-a toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux binary policy representation library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="amd64 arm arm64 ~mips ~riscv x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/2"
-IUSE="+static-libs"
-
-# tests are not meant to be run outside of the full SELinux userland repo
-RESTRICT="test"
-
-src_prepare() {
- eapply_user
- multilib_copy_sources
-}
-
-my_make() {
- use static-libs && lto-guarantee-fat
- emake \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="${EPREFIX}/$(get_libdir)" \
- "${@}"
-}
-
-multilib_src_compile() {
- tc-export CC AR RANLIB
-
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- my_make
-}
-
-multilib_src_install() {
- my_make DESTDIR="${D}" install
- if use static-libs; then
- strip-lto-bytecode
- else
- rm "${ED}"/usr/$(get_libdir)/*.a || die
- fi
-}
diff --git a/sys-libs/libsepol/libsepol-9999.ebuild b/sys-libs/libsepol/libsepol-9999.ebuild
deleted file mode 100644
index 182d088894f4..000000000000
--- a/sys-libs/libsepol/libsepol-9999.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-inherit dot-a toolchain-funcs multilib-minimal
-
-MY_PV="${PV//_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="SELinux binary policy representation library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~mips ~riscv ~x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/2"
-IUSE="+static-libs"
-
-BDEPEND="sys-devel/flex"
-
-# tests are not meant to be run outside of the full SELinux userland repo
-RESTRICT="test"
-
-src_prepare() {
- eapply_user
- multilib_copy_sources
-}
-
-my_make() {
- use static-libs && lto-guarantee-fat
- emake \
- PREFIX="${EPREFIX}/usr" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="${EPREFIX}/$(get_libdir)" \
- "${@}"
-}
-
-multilib_src_compile() {
- tc-export CC AR RANLIB
-
- local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
-
- my_make
-}
-
-multilib_src_install() {
- my_make DESTDIR="${D}" install
- if use static-libs; then
- strip-lto-bytecode
- else
- rm "${ED}"/usr/$(get_libdir)/*.a || die
- fi
-}
diff --git a/sys-libs/libsepol/metadata.xml b/sys-libs/libsepol/metadata.xml
deleted file mode 100644
index 6a8cf19d6762..000000000000
--- a/sys-libs/libsepol/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>selinux@gentoo.org</email>
- <name>SELinux Team</name>
- </maintainer>
- <upstream>
- <remote-id type="cpe">cpe:/a:selinuxproject:libsepol</remote-id>
- <remote-id type="github">SELinuxProject/selinux</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libservicelog/Manifest b/sys-libs/libservicelog/Manifest
deleted file mode 100644
index 3ce6c32fafe5..000000000000
--- a/sys-libs/libservicelog/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libservicelog-1.1.19.tar.gz 90198 BLAKE2B 1abeb831fe2103c19e8e7d2969c9749d7aa7f77ee87b2423b11ca13c717c9d026df60a9cd9c7067e484b4b6cf890ab1d3db1aba6c1071c0dc2583d350dad61e2 SHA512 71ecd7ef59a30fff6336621d279d33520d2d772445af0382609cbe4f311dbe31f35b4e03b3cfe918a9793b065400e0004188f5a5635a0ff71e62cd4d2e78ad66
diff --git a/sys-libs/libservicelog/libservicelog-1.1.19.ebuild b/sys-libs/libservicelog/libservicelog-1.1.19.ebuild
deleted file mode 100644
index fdd28e765503..000000000000
--- a/sys-libs/libservicelog/libservicelog-1.1.19.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools
-
-DESCRIPTION="Provides a library for logging service-related events"
-SRC_URI="https://github.com/power-ras/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
-HOMEPAGE="https://github.com/power-ras/libservicelog"
-
-SLOT="0"
-LICENSE="GPL-2+"
-KEYWORDS="ppc ppc64"
-IUSE="static-libs"
-RESTRICT="test" # bug 801235
-
-DEPEND="
- dev-db/sqlite:=
- sys-libs/librtas
-"
-RDEPEND="
- ${DEPEND}
- virtual/logger
-"
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- econf --disable-static
-}
-
-src_install() {
- local DOCS=( ChangeLog README )
- default
- find "${D}" -name '*.la' -delete || die
-}
diff --git a/sys-libs/libservicelog/metadata.xml b/sys-libs/libservicelog/metadata.xml
deleted file mode 100644
index 31d9727cfc8e..000000000000
--- a/sys-libs/libservicelog/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>ppc@gentoo.org</email>
- <name>PowerPC architecture team</name>
- </maintainer>
- <upstream>
- <remote-id type="github">power-ras/libservicelog</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libsmbios/Manifest b/sys-libs/libsmbios/Manifest
deleted file mode 100644
index 073360b7c6e0..000000000000
--- a/sys-libs/libsmbios/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libsmbios-2.4.3.tar.gz 644140 BLAKE2B 684bff4f6cf755796f785e9a93d4ddbe2a1af52082cdebc27d203772a6a2a0259edb4b9d19921f90fc78b48d54700223fbc2628665b963ebcb601010ff4340ab SHA512 7f6fb36fa9653e123b416b275953fb5652025e76dac3b4ec5600168e193ea56f8ac3ea1a3b5db29d2770e73d88152d712a35bf77a9b3fc5596570fae885585ad
diff --git a/sys-libs/libsmbios/files/libsmbios-2.2.28-cppunit-tests.patch b/sys-libs/libsmbios/files/libsmbios-2.2.28-cppunit-tests.patch
deleted file mode 100644
index ed8599ecff9c..000000000000
--- a/sys-libs/libsmbios/files/libsmbios-2.2.28-cppunit-tests.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- libsmbios-2.2.28/src/libsmbios_c/smi/smi_linux.c
-+++ libsmbios-2.2.28/src/libsmbios_c/smi/smi_linux.c
-@@ -48,6 +48,7 @@
- #define bufsize 256
-
- // not in header file. for private use by unit tests.
-+LIBSMBIOS_C_DLL_SPEC void set_basedir(const char *); // needed to link tests
- void set_basedir(const char *newdir)
- {
- sysfs_basedir = newdir;
diff --git a/sys-libs/libsmbios/files/libsmbios-2.4.3-avoid_bashisms.patch b/sys-libs/libsmbios/files/libsmbios-2.4.3-avoid_bashisms.patch
deleted file mode 100644
index eb26ba8dca43..000000000000
--- a/sys-libs/libsmbios/files/libsmbios-2.4.3-avoid_bashisms.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 97b4bdc042c48001132200828fe32c08cf9265e7 Mon Sep 17 00:00:00 2001
-From: Joe Dight <17280110+joedight@users.noreply.github.com>
-Date: Fri, 27 Nov 2020 20:14:24 +0000
-Subject: [PATCH 1/2] Fix configure.ac bashism
-
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index e14ec4a..6db254f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -116,7 +116,7 @@ AC_PROG_INSTALL
-
- dnl Check for python support
- AM_CONDITIONAL([HAVE_PYTHON], [false])
--if test x$wantpython == xyes ; then
-+if test x$wantpython = xyes ; then
- AM_PATH_PYTHON([3.0],,[:])
- AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
- fi
---
-2.30.0
-
-
-From fb7585222503c48f35270ee148ad3fef762a7502 Mon Sep 17 00:00:00 2001
-From: Kerin Millar <kfm@plushkava.net>
-Date: Mon, 4 Jan 2021 00:57:29 +0100
-Subject: [PATCH 2/2] Don't rely on support for indirect expansion in the shell
-
-POSIX does not define the indirect expansion syntax. Moreover, if going
-to the trouble of executing Perl, one may as well take full advantage of
-it. Address the issue by first having the shell export the variable.
-Next, have Perl perform the replacement without utilising any form of
-code injection. Instead, export 'var' into Perl's environment. That
-way, Perl can reference the variable name as $ENV{var} and its value as
-$ENV{$ENV{var}}.
-
-Signed-off-by: Kerin Millar <kfm@plushkava.net>
-Closes: https://bugs.gentoo.org/715202
-Closes: https://github.com/dell/libsmbios/issues/89
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- Makefile-std | 4 ++--
- src/python/Makefile.am | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile-std b/Makefile-std
-index 7ac6fa2..dd30d68 100644
---- a/Makefile-std
-+++ b/Makefile-std
-@@ -38,7 +38,7 @@ install-data-hook:
- file=$(DESTDIR)/$$i ;\
- for var in $(REPLACE_VARS) ;\
- do \
-- perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $$file;\
-+ var="$$var" perl -p -i -e 's|^\Q$$ENV{var}\E\s*=.*|$$ENV{var}="$$ENV{$$ENV{var}}"|' $$file;\
- done ;\
- done
-
-@@ -48,7 +48,7 @@ install-exec-hook:
- file=$(DESTDIR)/$$i ;\
- for var in $(REPLACE_VARS) ;\
- do \
-- perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $$file;\
-+ var="$$var" perl -p -i -e 's|^\Q$$ENV{var}\E\s*=.*|$$ENV{var}="$$ENV{$$ENV{var}}"|' $$file;\
- done ;\
- done
-
-diff --git a/src/python/Makefile.am b/src/python/Makefile.am
-index 693b6d9..6aca968 100644
---- a/src/python/Makefile.am
-+++ b/src/python/Makefile.am
-@@ -29,5 +29,5 @@ src/python/_vars.py: src/python/libsmbios_c/_vars.py configure Makefile config.
- cp $< $@
- for var in $(REPLACE_VARS) ;\
- do \
-- perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $@;\
-+ var="$$var" perl -p -i -e 's|^\Q$$ENV{var}\E\s*=.*|$$ENV{var}="$$ENV{$$ENV{var}}"|' $@;\
- done
---
-2.30.0
-
diff --git a/sys-libs/libsmbios/files/libsmbios-2.4.3-insecure_rpaths.patch b/sys-libs/libsmbios/files/libsmbios-2.4.3-insecure_rpaths.patch
deleted file mode 100644
index e1390cb64770..000000000000
--- a/sys-libs/libsmbios/files/libsmbios-2.4.3-insecure_rpaths.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Instead of producing a static binary, this causes libtool to inject one
-of the build directories into RPATH.
-
---- a/src/bin/Makefile.am
-+++ b/src/bin/Makefile.am
-@@ -65,7 +65,6 @@
- sbin_PROGRAMS += out/smbios-sys-info-lite
- out_smbios_sys_info_lite_SOURCES = src/bin/smbios-sys-info-lite.c
- out_smbios_sys_info_lite_LDADD = out/libsmbios_c.la out/libgetopt.la $(AM_LDADD)
--out_smbios_sys_info_lite_LDFLAGS = $(AM_LDFLAGS) -static
-
- sbin_PROGRAMS += out/smbios-get-ut-data
- out_smbios_get_ut_data_SOURCES = src/bin/smbios-get-ut-data.c
diff --git a/sys-libs/libsmbios/files/libsmbios-2.4.3-python-3.13.patch b/sys-libs/libsmbios/files/libsmbios-2.4.3-python-3.13.patch
deleted file mode 100644
index 5dc84cacd3af..000000000000
--- a/sys-libs/libsmbios/files/libsmbios-2.4.3-python-3.13.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-https://github.com/dell/libsmbios/pull/149
-
-From 2c29293ed6a713254192c6f6c762a0ed82391ed5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Mark=C3=A9ta?= <meggy.calabkova@gmail.com>
-Date: Thu, 30 Jan 2025 12:19:49 +0100
-Subject: [PATCH] drop unittest.makeSuite (dropped in python 3.13)
-
----
- src/pyunit/TestLib.py | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/src/pyunit/TestLib.py b/src/pyunit/TestLib.py
-index 561453b2..e420990a 100755
---- a/src/pyunit/TestLib.py
-+++ b/src/pyunit/TestLib.py
-@@ -21,12 +21,10 @@ def parseOptions(*args):
- pass
-
- def runTests( testCase ):
-- testToRun = 'test'
--
- myTestSuite = unittest.TestSuite()
- for i in testCase:
- try:
-- temp = unittest.makeSuite( i, testToRun )
-+ temp = unittest.defaultTestLoader.loadTestsFromTestCase( i )
- myTestSuite.addTest(temp)
- except ValueError:
- pass
-
diff --git a/sys-libs/libsmbios/files/libsmbios-2.4.3-python-deprecations.patch b/sys-libs/libsmbios/files/libsmbios-2.4.3-python-deprecations.patch
deleted file mode 100644
index c67df620e85f..000000000000
--- a/sys-libs/libsmbios/files/libsmbios-2.4.3-python-deprecations.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 99e0ac359d55d7a66d944e038ad63a7f6ef6698d Mon Sep 17 00:00:00 2001
-From: troy <70726977+troygraben@users.noreply.github.com>
-Date: Mon, 26 Jul 2021 17:05:35 -0400
-Subject: [PATCH] Fix the TokenTable generator implementation
-
-This change supports PEP 479 by changing the generator to use return
-instead of raising StopIteration.
-
-This fixes the RuntimeError exception being raised with Python 3.7 and
-newer when the iterator reaches the end of the collection. This could be
-encountered when calling smbios-token-ctl --dump-tokens
---- a/src/bin/smbios-token-ctl
-+++ b/src/bin/smbios-token-ctl
-@@ -427,8 +427,6 @@ def main():
- verboseLog.info( _("The token library returned this error:") )
- verboseLog.info( str(e) )
- moduleLog.info( cli.standardFailMessage )
-- except StopIteration:
-- pass
-
- return exit_code
-
---- a/src/python/libsmbios_c/smbios_token.py
-+++ b/src/python/libsmbios_c/smbios_token.py
-@@ -131,7 +131,7 @@ def __iter__(self):
- if bool(cur):
- yield cur.contents
- else:
-- raise StopIteration
-+ return
-
- @traceLog()
- def __getitem__(self, id):
diff --git a/sys-libs/libsmbios/libsmbios-2.4.3-r3.ebuild b/sys-libs/libsmbios/libsmbios-2.4.3-r3.ebuild
deleted file mode 100644
index 55429a44275b..000000000000
--- a/sys-libs/libsmbios/libsmbios-2.4.3-r3.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit autotools python-single-r1
-
-DESCRIPTION="Provide access to (SM)BIOS information"
-HOMEPAGE="https://github.com/dell/libsmbios"
-SRC_URI="https://github.com/dell/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="|| ( GPL-2+ OSL-2.1 ) BSD Boost-1.0"
-SLOT="0"
-KEYWORDS="-* amd64 x86"
-IUSE="doc graphviz nls +python static-libs test"
-REQUIRED_USE="
- python? ( ${PYTHON_REQUIRED_USE} )
- test? ( ${PYTHON_REQUIRED_USE} )
-"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- dev-libs/libxml2:=
- virtual/zlib:=
- nls? ( virtual/libintl )
- python? ( ${PYTHON_DEPS} )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- virtual/pkgconfig
- doc? ( app-text/doxygen )
- graphviz? ( media-gfx/graphviz )
- nls? ( sys-devel/gettext )
- test? (
- ${PYTHON_DEPS}
- >=dev-util/cppunit-1.9.6
- )
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-2.2.28-cppunit-tests.patch"
- "${FILESDIR}/${PN}-2.4.3-avoid_bashisms.patch" # bug #715202
- "${FILESDIR}/${PN}-2.4.3-insecure_rpaths.patch"
- "${FILESDIR}/${PN}-2.4.3-python-deprecations.patch"
- "${FILESDIR}/${PN}-2.4.3-python-3.13.patch"
-)
-
-pkg_setup() {
- if use python || use test; then
- python-single-r1_pkg_setup
- fi
-}
-
-src_prepare() {
- default
-
- # Don't build yum-plugin - we don't need it
- sed '/yum-plugin/d' -i Makefile.am || die
-
- if use test; then
- python_fix_shebang src/pyunit/test*.py
- fi
-
- eautoreconf
-}
-
-src_configure() {
- local myeconfargs=(
- $(use_enable doc doxygen)
- $(use_enable graphviz)
- $(use_enable nls)
- $(use_enable python)
- $(use_enable static-libs static)
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- emake install DESTDIR="${D}"
-
- if use python; then
- python_scriptinto /usr/sbin
- python_doscript "${ED}"/usr/sbin/smbios-{{battery,keyboard,thermal,token,wakeup,wireless}-ctl,lcd-brightness,passwd,sys-info}
- fi
-
- insinto /usr/include/
- doins -r src/include/smbios_c
-
- einstalldocs
-
- if ! use static-libs; then
- find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
- fi
-}
diff --git a/sys-libs/libsmbios/metadata.xml b/sys-libs/libsmbios/metadata.xml
deleted file mode 100644
index b5e43b4cb1ac..000000000000
--- a/sys-libs/libsmbios/metadata.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <longdescription>
- The libsmbios project aims towards providing access to as much
- BIOS information as possible. It does this by providing a library of functions
- that can be used as well as sample binaries.
- </longdescription>
- <upstream>
- <remote-id type="github">dell/libsmbios</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libstatgrab/Manifest b/sys-libs/libstatgrab/Manifest
deleted file mode 100644
index 39ef01fe9d7f..000000000000
--- a/sys-libs/libstatgrab/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libstatgrab-0.92.1.tar.gz 817531 BLAKE2B 5315772da07a9229f7f5d85dc7563333892e2a7293d7b331bd65edbebc08841103e6cf695d8faf25b83135545dda767bfc358517afa866981657dc8205d319be SHA512 e1f14df8abbb044d02b0ecebc23fbe9effaa0bac6738686e661de015564df5a4d872edef6d07fd150db25764b449d47ef54beecbe12c51987a679b07edc53c97
diff --git a/sys-libs/libstatgrab/libstatgrab-0.92.1.ebuild b/sys-libs/libstatgrab/libstatgrab-0.92.1.ebuild
deleted file mode 100644
index ccff04645e8b..000000000000
--- a/sys-libs/libstatgrab/libstatgrab-0.92.1.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DESCRIPTION="A tool to provide access to statistics about the system on which it's run"
-HOMEPAGE="https://libstatgrab.org/"
-SRC_URI="https://www.mirrorservice.org/sites/ftp.i-scream.org/pub/i-scream/libstatgrab/${P}.tar.gz"
-
-LICENSE="|| ( GPL-2 LGPL-2.1 )"
-SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ~loong ppc ~riscv x86"
-IUSE="examples test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="sys-libs/ncurses:="
-DEPEND="${RDEPEND}"
-
-DOCS=( ChangeLog PLATFORMS NEWS AUTHORS README )
-
-src_configure() {
- local myeconfargs=(
- --disable-setgid-binaries
- --disable-setuid-binaries
- --with-ncurses
- --disable-static
- $(use_enable test tests)
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- if use examples; then
- docompress -x /usr/share/doc/${PF}/examples
- docinto examples
- dodoc -r examples/*
- fi
-
- find "${ED}" -name '*.la' -delete || die
-}
diff --git a/sys-libs/libstatgrab/metadata.xml b/sys-libs/libstatgrab/metadata.xml
deleted file mode 100644
index ca431a12697b..000000000000
--- a/sys-libs/libstatgrab/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="github">libstatgrab/libstatgrab</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libstdc++-v3/Manifest b/sys-libs/libstdc++-v3/Manifest
deleted file mode 100644
index 614374a5e9d0..000000000000
--- a/sys-libs/libstdc++-v3/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST gcc-3.3.6-patches-4.tar.bz2 53437 BLAKE2B 372ff1fcfcfacca43b420d2cda7fccb2ede4917408e1fcceb6c094694de8ae21148fa9c5ab8663cf6fb9ad858e3d0cbb3f20c91020db7b627828403444c2fd66 SHA512 1ff4563956d2f3af1240a14cd1ec126ff75dcf24e1cec39d32a17d6be92b94aeb081605ceb04b138ba905cea8ccbe204dce4b42a02ef55383fcfa91643f73faf
-DIST gcc-3.3.6.tar.bz2 23972413 BLAKE2B e7b33edcdbbb13b0be41a41156bf6fb6dcfe4f5ad75c41de86cb37f854be6b7a6a8dda0e65d331461469848cd912e25920e8aa2dcb142cb661731ba571cb5de1 SHA512 576b88e2fa675314a79a85f180684fe5af370c596476a0bf02e33e8ae0e2be838417ea80675ce4194a8213792cf7ada50cae5131149e4b890ab61e0b8d50d0ed
diff --git a/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r4.ebuild b/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r4.ebuild
deleted file mode 100644
index cb61ded13058..000000000000
--- a/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r4.ebuild
+++ /dev/null
@@ -1,202 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic libtool multilib toolchain-funcs
-
-PATCH_VER="4"
-
-DESCRIPTION="Compatibility package for binaries linked against a pre gcc 3.4 libstdc++"
-HOMEPAGE="https://gcc.gnu.org/libstdc++/"
-SRC_URI="
- https://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2
- https://dev.gentoo.org/~sam/distfiles/gcc-${PV}-patches-${PATCH_VER}.tar.bz2
-"
-
-LICENSE="GPL-2 LGPL-2.1"
-SLOT="5"
-KEYWORDS="~amd64 ~x86"
-IUSE="multilib nls"
-
-RDEPEND="virtual/zlib:="
-DEPEND="
- ${RDEPEND}
- app-alternatives/yacc"
-
-transform_known_flags() {
- declare setting
-
- # and on x86, we just need to filter the 3.4 specific amd64 -marchs
- replace-cpu-flags k8 athlon64 opteron x86-64
-
- # gcc 3.3 doesn't support -march=pentium-m
- replace-cpu-flags pentium-m pentium3m pentium3
-
- #GCC 3.3 does not understand G3, G4, G5 on ppc
- replace-cpu-flags G3 750
- replace-cpu-flags G4 7400
- replace-cpu-flags G5 7400
-
- filter-flags -fdiagnostics-show-option
-}
-
-is_arch_allowed() {
- i386_processor_table="i386 i486 i586 pentium pentium-mmx winchip-c6 \
- winchip2 c3 i686 pentiumpro pentium2 pentium3 pentium4 prescott \
- nocona k6 k6-2 k6-3 athlon athlon-tbird x86-64 athlon-4 athlon-xp \
- athlon-mp"
-
- for proc in ${i386_processor_table} ; do
- [[ "${proc}" == "${1}" ]] && return 0
- done
-
- mips_processor_table="mips1 mips2 mips3 mips4 mips32 mips64 r3000 r2000 \
- r3900 r6000 r4000 vr4100 vr4111 vr4120 vr4300 r4400 r4600 orion \
- r4650 r8000 vr5000 vr5400 vr5500 4kc 4kp 5kc 20kc sr71000 sb1"
-
- for proc in ${mips_processor_table} ; do
- [[ "${proc}" == "${1}" ]] && return 0
- done
-
- rs6000_processor_table="common power power2 power3 power4 powerpc \
- powerpc64 rios rios1 rsc rsc1 rios2 rs64a 401 403 405 505 601 602 \
- 603 603e ec603e 604 604e 620 630 740 750 7400 7450 8540 801 821 823 \
- 860"
-
- for proc in ${rs6000_processor_table} ; do
- [[ "${proc}" == "${1}" ]] && return 0
- done
-
- return 1
-}
-
-do_filter_flags() {
- declare setting newflags
-
- # In general gcc does not like optimization, and add -O2 where
- # it is safe. This is especially true for gcc 3.3 + 3.4
- if is-flagq -O?; then
- newflags+=" -O2"
- fi
-
- # gcc 3.3 doesn't support -mtune on numerous archs, so xgcc will fail
- setting="`get-flag mtune`"
- [[ ! -z "${setting}" ]] && filter-flags -mtune="${setting}"
-
- # in gcc 3.3 there is a bug on ppc64 where if -mcpu is used
- # the compiler incorrectly assumes the code you are about to build
- # is 32 bit
- use ppc64 && setting="`get-flag mcpu`"
- [[ ! -z "${setting}" ]] && filter-flags -mcpu="${setting}"
-
- # only allow the flags that we -know- are supported
- transform_known_flags
- setting="`get-flag march`"
- if [[ ! -z "${setting}" ]] ; then
- is_arch_allowed "${setting}" && newflags+=" -march=${setting}"
- fi
- setting="`get-flag mcpu`"
- if [[ ! -z "${setting}" ]] ; then
- is_arch_allowed "${setting}" && newflags+=" -mcpu=${setting}"
- fi
-
- # There is lots of brittle old code that violates the aliasing rules. GCC
- # 3.3 supports disabling this optimization.
- newflags+=" -fno-strict-aliasing"
-
- # xgcc wont understand gcc 3.4 flags... in fact it won't understand most
- # things or have most patches, regardless of what the real GCC understands.
- # A random collection of bugs:
- # #269433 #290202 #442784 #610064 #879775 #919184 #832016
- #
- # There's some extensive discussion at bug #923112, ultimately the only
- # practical approach is to simply reject *all* flags unless we handpicked
- # them to allow them. Check in "${S}"/gcc/doc/gcc.1 before proceeding.
- export CFLAGS="${newflags}"
- export CXXFLAGS="${newflags}"
- unset LDFLAGS
-}
-
-S=${WORKDIR}/gcc-${PV}
-
-src_prepare() {
- eapply "${WORKDIR}"/patch/*.patch
-
- default
-
- elibtoolize --portage --shallow
- ./contrib/gcc_update --touch
-
- if use multilib && [[ ${SYMLINK_LIB} == "yes" ]] ; then
- # ugh, this shit has to match the way we've hacked gcc else
- # the build falls apart #259215
- sed -i \
- -e 's:\(MULTILIB_OSDIRNAMES = \).*:\1../lib64 ../lib32:' \
- "${S}"/gcc/config/i386/t-linux64 \
- || die "sed failed!"
- fi
-
- tc-export AR CC RANLIB NM
-
- # newer versions of GCC add default werrors that we need to disable for
- # this very old and brittle code. But adding it to CFLAGS doesn't work,
- # since GCC creates xgcc and uses that to compile libstdc++, and the
- # ancient xgcc doesn't understand the flags we need.
- mkdir "${T}/conservative-compiler" || die
- export PATH="${$}/conservative-compiler:${PATH}"
-
- local realcc=$(type -P "${CC}") || die
- export CC="${T}/conservative-compiler/${CC##*/}"
- cat > "${CC}" <<- __EOF__ || die
- #!/bin/sh
- "${realcc}" -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=int-conversion -Wno-error=incompatible-pointer-types "\$@"
- __EOF__
-
- chmod +x "${CC}" || die
-}
-
-src_configure() {
- mkdir -p "${WORKDIR}"/build
- cd "${WORKDIR}"/build
- do_filter_flags
- ECONF_SOURCE=${S} \
- econf \
- --enable-shared \
- --with-system-zlib \
- --enable-languages=c++ \
- --enable-threads=posix \
- --enable-long-long \
- --disable-checking \
- --enable-cstdio=stdio \
- --enable-__cxa_atexit \
- $(use_enable multilib) \
- $(use_enable nls) \
- $(use_with !nls included-gettext)
-
- touch "${S}"/gcc/c-gperf.h
-}
-
-src_compile() {
- emake \
- -C "${WORKDIR}"/build all-target-libstdc++-v3 \
- AR="$(tc-getAR)" \
- NM="$(tc-getNM)"
-}
-
-src_install() {
- emake -j1 \
- -C "${WORKDIR}"/build \
- AR="$(tc-getAR)" \
- NM="$(tc-getNM)" \
- DESTDIR="${D}" \
- install-target-libstdc++-v3
-
- # scrub everything but the library we care about
- pushd "${D}" >/dev/null
- mv usr/lib* . || die
- rm -rf usr
- rm -f lib*/*.{a,la,so} || die
- dodir /usr
- mv lib* usr/ || die
-}
diff --git a/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r5.ebuild b/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r5.ebuild
deleted file mode 100644
index ff65a54f9620..000000000000
--- a/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r5.ebuild
+++ /dev/null
@@ -1,206 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic libtool multilib toolchain-funcs
-
-PATCH_VER="4"
-
-DESCRIPTION="Compatibility package for binaries linked against a pre gcc 3.4 libstdc++"
-HOMEPAGE="https://gcc.gnu.org/libstdc++/"
-SRC_URI="
- https://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2
- https://dev.gentoo.org/~sam/distfiles/gcc-${PV}-patches-${PATCH_VER}.tar.bz2
-"
-
-LICENSE="GPL-2 LGPL-2.1"
-SLOT="5"
-KEYWORDS="~amd64 ~x86"
-IUSE="multilib nls"
-
-RDEPEND="virtual/zlib:="
-DEPEND="
- ${RDEPEND}
- app-alternatives/yacc"
-
-transform_known_flags() {
- declare setting
-
- # and on x86, we just need to filter the 3.4 specific amd64 -marchs
- replace-cpu-flags k8 athlon64 opteron x86-64
-
- # gcc 3.3 doesn't support -march=pentium-m
- replace-cpu-flags pentium-m pentium3m pentium3
-
- #GCC 3.3 does not understand G3, G4, G5 on ppc
- replace-cpu-flags G3 750
- replace-cpu-flags G4 7400
- replace-cpu-flags G5 7400
-
- filter-flags -fdiagnostics-show-option
-}
-
-is_arch_allowed() {
- i386_processor_table="i386 i486 i586 pentium pentium-mmx winchip-c6 \
- winchip2 c3 i686 pentiumpro pentium2 pentium3 pentium4 prescott \
- nocona k6 k6-2 k6-3 athlon athlon-tbird x86-64 athlon-4 athlon-xp \
- athlon-mp"
-
- for proc in ${i386_processor_table} ; do
- [[ "${proc}" == "${1}" ]] && return 0
- done
-
- mips_processor_table="mips1 mips2 mips3 mips4 mips32 mips64 r3000 r2000 \
- r3900 r6000 r4000 vr4100 vr4111 vr4120 vr4300 r4400 r4600 orion \
- r4650 r8000 vr5000 vr5400 vr5500 4kc 4kp 5kc 20kc sr71000 sb1"
-
- for proc in ${mips_processor_table} ; do
- [[ "${proc}" == "${1}" ]] && return 0
- done
-
- rs6000_processor_table="common power power2 power3 power4 powerpc \
- powerpc64 rios rios1 rsc rsc1 rios2 rs64a 401 403 405 505 601 602 \
- 603 603e ec603e 604 604e 620 630 740 750 7400 7450 8540 801 821 823 \
- 860"
-
- for proc in ${rs6000_processor_table} ; do
- [[ "${proc}" == "${1}" ]] && return 0
- done
-
- return 1
-}
-
-do_filter_flags() {
- declare setting newflags
-
- # In general gcc does not like optimization, and add -O1 where
- # it is safe. This is especially true for gcc 3.3 + 3.4
- # Compiler crash with -O2, bug #940229
- if is-flagq -O?; then
- newflags+=" -O1"
- fi
-
- # gcc 3.3 doesn't support -mtune on numerous archs, so xgcc will fail
- setting="`get-flag mtune`"
- [[ ! -z "${setting}" ]] && filter-flags -mtune="${setting}"
-
- # in gcc 3.3 there is a bug on ppc64 where if -mcpu is used
- # the compiler incorrectly assumes the code you are about to build
- # is 32 bit
- use ppc64 && setting="`get-flag mcpu`"
- [[ ! -z "${setting}" ]] && filter-flags -mcpu="${setting}"
-
- # only allow the flags that we -know- are supported
- transform_known_flags
- setting="`get-flag march`"
- if [[ ! -z "${setting}" ]] ; then
- is_arch_allowed "${setting}" && newflags+=" -march=${setting}"
- fi
- setting="`get-flag mcpu`"
- if [[ ! -z "${setting}" ]] ; then
- is_arch_allowed "${setting}" && newflags+=" -mcpu=${setting}"
- fi
-
- # There is lots of brittle old code that violates the aliasing rules. GCC
- # 3.3 supports disabling this optimization.
- newflags+=" -fno-strict-aliasing"
-
- # Force older c standard due to incompatibilities, bug #944234
- newflags+=" -std=gnu99"
-
- # xgcc wont understand gcc 3.4 flags... in fact it won't understand most
- # things or have most patches, regardless of what the real GCC understands.
- # A random collection of bugs:
- # #269433 #290202 #442784 #610064 #879775 #919184 #832016
- #
- # There's some extensive discussion at bug #923112, ultimately the only
- # practical approach is to simply reject *all* flags unless we handpicked
- # them to allow them. Check in "${S}"/gcc/doc/gcc.1 before proceeding.
- export CFLAGS="${newflags}"
- export CXXFLAGS="${newflags}"
- unset LDFLAGS
-}
-
-S=${WORKDIR}/gcc-${PV}
-
-src_prepare() {
- eapply "${WORKDIR}"/patch/*.patch
-
- default
-
- elibtoolize --portage --shallow
- ./contrib/gcc_update --touch
-
- if use multilib && [[ ${SYMLINK_LIB} == "yes" ]] ; then
- # ugh, this shit has to match the way we've hacked gcc else
- # the build falls apart #259215
- sed -i \
- -e 's:\(MULTILIB_OSDIRNAMES = \).*:\1../lib64 ../lib32:' \
- "${S}"/gcc/config/i386/t-linux64 \
- || die "sed failed!"
- fi
-
- tc-export AR CC RANLIB NM
-
- # newer versions of GCC add default werrors that we need to disable for
- # this very old and brittle code. But adding it to CFLAGS doesn't work,
- # since GCC creates xgcc and uses that to compile libstdc++, and the
- # ancient xgcc doesn't understand the flags we need.
- mkdir "${T}/conservative-compiler" || die
- export PATH="${$}/conservative-compiler:${PATH}"
-
- local realcc=$(type -P "${CC}") || die
- export CC="${T}/conservative-compiler/${CC##*/}"
- cat > "${CC}" <<- __EOF__ || die
- #!/bin/sh
- "${realcc}" -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=int-conversion -Wno-error=incompatible-pointer-types "\$@"
- __EOF__
-
- chmod +x "${CC}" || die
-}
-
-src_configure() {
- mkdir -p "${WORKDIR}"/build
- cd "${WORKDIR}"/build
- do_filter_flags
- ECONF_SOURCE=${S} \
- econf \
- --enable-shared \
- --with-system-zlib \
- --enable-languages=c++ \
- --enable-threads=posix \
- --enable-long-long \
- --disable-checking \
- --enable-cstdio=stdio \
- --enable-__cxa_atexit \
- $(use_enable multilib) \
- $(use_enable nls) \
- $(use_with !nls included-gettext)
-
- touch "${S}"/gcc/c-gperf.h
-}
-
-src_compile() {
- emake \
- -C "${WORKDIR}"/build all-target-libstdc++-v3 \
- AR="$(tc-getAR)" \
- NM="$(tc-getNM)"
-}
-
-src_install() {
- emake -j1 \
- -C "${WORKDIR}"/build \
- AR="$(tc-getAR)" \
- NM="$(tc-getNM)" \
- DESTDIR="${D}" \
- install-target-libstdc++-v3
-
- # scrub everything but the library we care about
- pushd "${D}" >/dev/null
- mv usr/lib* . || die
- rm -rf usr
- rm -f lib*/*.{a,la,so} || die
- dodir /usr
- mv lib* usr/ || die
-}
diff --git a/sys-libs/libstdc++-v3/metadata.xml b/sys-libs/libstdc++-v3/metadata.xml
deleted file mode 100644
index 5a1e1dee65db..000000000000
--- a/sys-libs/libstdc++-v3/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
-</maintainer>
-</pkgmetadata>
diff --git a/sys-libs/libtermcap-compat/Manifest b/sys-libs/libtermcap-compat/Manifest
deleted file mode 100644
index 915bc120cea3..000000000000
--- a/sys-libs/libtermcap-compat/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST termcap-2.0.8-patches-2.tar.xz 11116 BLAKE2B 537342e45333f0373754eb5390ef1c37369531f32e2ecc4004809c800c172d370690a232b3cbd0c3ef90f977a456d97ac306e55a42e13244a0c47f4973ad94a1 SHA512 0261a9c21385578507e5c8e8f7064879904ba2b0d1ff9dce90d77ed2ad5e0c7fc49880ddc4fbc77df70f425a3fe4765bbac827824d4b59e99d77374ab4183d0f
-DIST termcap-2.0.8.tar.bz2 211523 BLAKE2B 4ea7c4cdc26be4e1262a8e75e125b4349c75976c297c2389e034635d2d5324275486525fe93fd8628e8a5cd0980c7e97eba55f5a05d6b3b537337b2fb55cf2cd SHA512 1aca52f5bcda60933229143085416296fed1aa981bae4440f30424f1e2bd9d90e9836f05c5a5a53af77d20dbb1d2425bf2b7c5fa2952258e2b4a2a5babaddaad
-DIST termtypes.tc.gz 228329 BLAKE2B 988b91c6c3c624963e078b424f24b26eb37fe32ca34b0ece0ca4ddf734ee1513f399a4f584f41a92c6ef2edb64144c13820677b419e58b4bfaf0e0fa2c5686a7 SHA512 13a2ee2cd0bc349d69af7efb8e8122f655b67f4bcbe0dc5cbf8a9ba22649548086a097de8bc148fb71ceba1640434a6b94763410beb3b915e03c3a6b46e8a678
diff --git a/sys-libs/libtermcap-compat/libtermcap-compat-2.0.8-r4.ebuild b/sys-libs/libtermcap-compat/libtermcap-compat-2.0.8-r4.ebuild
deleted file mode 100644
index 3bcc29bde79e..000000000000
--- a/sys-libs/libtermcap-compat/libtermcap-compat-2.0.8-r4.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# We only want this for binary-only packages, so we will only be installing
-# the lib used at runtime; no headers and no files to link against
-
-EAPI=7
-
-inherit flag-o-matic toolchain-funcs multilib-minimal
-
-PATCHVER="2"
-
-MY_P="termcap-${PV}"
-DESCRIPTION="Compatibility package for old termcap-based programs"
-HOMEPAGE="http://www.catb.org/~esr/terminfo/"
-SRC_URI="http://www.catb.org/~esr/terminfo/termtypes.tc.gz
- mirror://gentoo/${MY_P}.tar.bz2
- https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_P}-patches-${PATCHVER}.tar.xz"
-S="${WORKDIR}"/${MY_P}
-
-LICENSE="GPL-2 LGPL-2 BSD"
-SLOT="0"
-KEYWORDS="~alpha amd64 ~arm ~hppa ppc ~sparc x86"
-
-PATCHES=(
- # Gentoo patchset
- "${WORKDIR}"/patch/002_all_termcap-setuid.patch
- "${WORKDIR}"/patch/003_all_termcap-inst-no-root.patch
- "${WORKDIR}"/patch/004_all_termcap-compat-glibc21.patch
- "${WORKDIR}"/patch/005_all_termcap-xref.patch
- "${WORKDIR}"/patch/006_all_termcap-fix-tc.patch
- "${WORKDIR}"/patch/007_all_termcap-ignore-p.patch
- "${WORKDIR}"/patch/008_all_termcap-buffer.patch
- "${WORKDIR}"/patch/009_all_termcap-bufsize--needs-011.patch
- "${WORKDIR}"/patch/010_all_termcap-colon.patch
- "${WORKDIR}"/patch/011_all_termcap-AAARGH.patch
- "${WORKDIR}"/patch/012_all_libtermcap-compat-2.0.8-fPIC.patch
- "${WORKDIR}"/patch/013_all_libtermcap-compat_bcopy_fix.patch
- "${WORKDIR}"/patch/014_all_libtermcap-build-settings.patch
- "${WORKDIR}"/patch/015_all_libtermcap-only-shared-lib.patch
- # termcap
- "${WORKDIR}"/patch/tc.file/001_all_termcap-linuxlat.patch
- "${WORKDIR}"/patch/tc.file/002_all_termcap-xtermchanges.patch
- "${WORKDIR}"/patch/tc.file/003_all_termcap-utf8.patch
- "${WORKDIR}"/patch/tc.file/004_all_termcap-xterm-X11R6.patch
- "${WORKDIR}"/patch/tc.file/005_all_termcap-Eterm.patch
-)
-
-src_prepare() {
- mv "${WORKDIR}"/termtypes.tc "${S}"/termcap || die
-
- default
-
- multilib_copy_sources
-}
-
-src_configure() {
- tc-export CC
- # bug #943733
- append-flags -std=gnu17
-}
-
-multilib_src_install() {
- dolib.so libtermcap.so.${PV}
- dosym libtermcap.so.${PV} /usr/$(get_libdir)/libtermcap.so.2
-}
-
-multilib_src_install_all() {
- insinto /etc
- doins "${S}"/termcap
-
- dodoc ChangeLog README
-}
diff --git a/sys-libs/libtermcap-compat/metadata.xml b/sys-libs/libtermcap-compat/metadata.xml
deleted file mode 100644
index 73dda144f9ac..000000000000
--- a/sys-libs/libtermcap-compat/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-</pkgmetadata>
diff --git a/sys-libs/libucontext/Manifest b/sys-libs/libucontext/Manifest
deleted file mode 100644
index 1c8fc5b4ff9f..000000000000
--- a/sys-libs/libucontext/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST libucontext-1.3.1.tar.xz 24688 BLAKE2B d6a15644abda73ea3e1dd45d6bcbf42627ad4a17fe90ebe8067383f9abfa7c9f87fbb1ab7f21b8b57b88fbe496b57524370d7cbb0fcde5c6e42408c025c271f9 SHA512 9b3c7fc04aedbbed6f35fc18037b75472f8fa44d3c89f261ef923f46874251a10f49894f7a549b0b47d3ffdee1b6678929bdda95822d8043d76b5a1f34e4dc8a
-DIST libucontext-1.3.2.tar.xz 24480 BLAKE2B 8db3c3e7277c459d23d7f7d608f64515ae11be041cc113cb0902c8eb50eabd8bcb77c2f3c1aa9b8f9ba2c3d2cc623a80a28971c27ab714eedc075c0f7494b36f SHA512 3911a9a772832dad68dc4dbb78ca646cba92170d4e192948e0a6e78295f6ee27f20b637986d39450edae805c96b08f7e1716fa7904fc84258acab8691d87c4f5
-DIST libucontext-1.3.3.tar.xz 24580 BLAKE2B edafeac9817064872c90bbc75bf77a2e911a48667fe3ebb59d759d86878bb05515f66d42eea77b5bf52d60a9600c9f23b2f848589250b4db5f8529228911713c SHA512 dbfe17bcd4efacf3cc688fbf96862a104b50fd66ab793644b1608f1abd65e56fab9cb005396e758cb4b9a3838981c6e68a6e04866d016dbb89e987d8e241e0c5
-DIST libucontext-1.5.1.tar.xz 26960 BLAKE2B 7dbc06598a95242448161f1c1aa85ee99881490ca37f9c8c4b6e8f1375d9c65391e2012ea7869b22b3bafa0a6e370324a0085f70471b94a6d04c98094e8ec128 SHA512 3bd82845fb41adaeee4a57e24e816ba9c22e207a59da8591f9c84dbecc2a258f3ac5ec3361186ae552045dffd15495c56590799fa2fd6163fdd281b61614f8d8
diff --git a/sys-libs/libucontext/libucontext-1.3.1.ebuild b/sys-libs/libucontext/libucontext-1.3.1.ebuild
deleted file mode 100644
index 4b91409a2b75..000000000000
--- a/sys-libs/libucontext/libucontext-1.3.1.ebuild
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-DESCRIPTION="ucontext implementation featuring glibc-compatible ABI"
-HOMEPAGE="https://github.com/kaniini/libucontext"
-SRC_URI="https://distfiles.ariadne.space/libucontext/${P}.tar.xz"
-
-LICENSE="ISC"
-SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ~mips ~ppc ppc64 x86"
-IUSE="+man"
-
-BDEPEND="man? ( app-text/scdoc )"
-
-src_compile() {
- tc-export AR CC
-
- arch=
-
- # Override arch detection
- # https://github.com/kaniini/libucontext/blob/master/Makefile#L3
- if use x86 ; then
- arch="x86"
- elif use arm ; then
- arch="arm"
- elif use arm64 ; then
- arch="aarch64"
- elif use ppc64 ; then
- arch="ppc64"
- else
- arch="$(uname -m)"
- fi
-
- emake \
- ARCH="${arch}" \
- LDFLAGS="${LDFLAGS}" \
- libdir="/usr/$(get_libdir)" \
- pkgconfigdir="/usr/$(get_libdir)/pkgconfig" \
- all $(usev man 'docs')
-}
-
-src_test() {
- emake \
- ARCH="${arch}" \
- LDFLAGS="${LDFLAGS}" \
- libdir="/usr/$(get_libdir)" \
- pkgconfigdir="/usr/$(get_libdir)/pkgconfig" \
- check
-}
-
-src_install() {
- emake \
- ARCH="${arch}" \
- DESTDIR="${D}" \
- prefix="${EPREFIX}/usr" \
- libdir="${EPREFIX}/usr/$(get_libdir)" \
- pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig" \
- install $(usev man 'install_docs')
-
- find "${ED}" -name '*.a' -delete || die
-}
diff --git a/sys-libs/libucontext/libucontext-1.3.2.ebuild b/sys-libs/libucontext/libucontext-1.3.2.ebuild
deleted file mode 100644
index fa47447a355a..000000000000
--- a/sys-libs/libucontext/libucontext-1.3.2.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# TODO: meson
-inherit toolchain-funcs
-
-DESCRIPTION="ucontext implementation featuring glibc-compatible ABI"
-HOMEPAGE="https://github.com/kaniini/libucontext"
-SRC_URI="https://distfiles.ariadne.space/libucontext/${P}.tar.xz"
-
-LICENSE="ISC"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
-IUSE="+man"
-
-BDEPEND="man? ( app-text/scdoc )"
-
-src_compile() {
- tc-export AR CC
-
- arch=
-
- # Override arch detection
- # https://github.com/kaniini/libucontext/blob/master/Makefile#L3
- if use x86 ; then
- arch="x86"
- elif use arm ; then
- arch="arm"
- elif use arm64 ; then
- arch="aarch64"
- elif use loong ; then
- arch="loongarch64"
- elif use ppc64 ; then
- arch="ppc64"
- else
- arch="$(uname -m)"
- fi
-
- emake \
- ARCH="${arch}" \
- LDFLAGS="${LDFLAGS}" \
- libdir="/usr/$(get_libdir)" \
- pkgconfigdir="/usr/$(get_libdir)/pkgconfig" \
- all $(usev man 'docs')
-}
-
-src_test() {
- emake \
- ARCH="${arch}" \
- LDFLAGS="${LDFLAGS}" \
- libdir="/usr/$(get_libdir)" \
- pkgconfigdir="/usr/$(get_libdir)/pkgconfig" \
- check
-}
-
-src_install() {
- emake \
- ARCH="${arch}" \
- DESTDIR="${D}" \
- prefix="${EPREFIX}/usr" \
- libdir="${EPREFIX}/usr/$(get_libdir)" \
- pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig" \
- install $(usev man 'install_docs')
-
- find "${ED}" -name '*.a' -delete || die
-}
diff --git a/sys-libs/libucontext/libucontext-1.3.3.ebuild b/sys-libs/libucontext/libucontext-1.3.3.ebuild
deleted file mode 100644
index fa47447a355a..000000000000
--- a/sys-libs/libucontext/libucontext-1.3.3.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# TODO: meson
-inherit toolchain-funcs
-
-DESCRIPTION="ucontext implementation featuring glibc-compatible ABI"
-HOMEPAGE="https://github.com/kaniini/libucontext"
-SRC_URI="https://distfiles.ariadne.space/libucontext/${P}.tar.xz"
-
-LICENSE="ISC"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
-IUSE="+man"
-
-BDEPEND="man? ( app-text/scdoc )"
-
-src_compile() {
- tc-export AR CC
-
- arch=
-
- # Override arch detection
- # https://github.com/kaniini/libucontext/blob/master/Makefile#L3
- if use x86 ; then
- arch="x86"
- elif use arm ; then
- arch="arm"
- elif use arm64 ; then
- arch="aarch64"
- elif use loong ; then
- arch="loongarch64"
- elif use ppc64 ; then
- arch="ppc64"
- else
- arch="$(uname -m)"
- fi
-
- emake \
- ARCH="${arch}" \
- LDFLAGS="${LDFLAGS}" \
- libdir="/usr/$(get_libdir)" \
- pkgconfigdir="/usr/$(get_libdir)/pkgconfig" \
- all $(usev man 'docs')
-}
-
-src_test() {
- emake \
- ARCH="${arch}" \
- LDFLAGS="${LDFLAGS}" \
- libdir="/usr/$(get_libdir)" \
- pkgconfigdir="/usr/$(get_libdir)/pkgconfig" \
- check
-}
-
-src_install() {
- emake \
- ARCH="${arch}" \
- DESTDIR="${D}" \
- prefix="${EPREFIX}/usr" \
- libdir="${EPREFIX}/usr/$(get_libdir)" \
- pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig" \
- install $(usev man 'install_docs')
-
- find "${ED}" -name '*.a' -delete || die
-}
diff --git a/sys-libs/libucontext/libucontext-1.5.1.ebuild b/sys-libs/libucontext/libucontext-1.5.1.ebuild
deleted file mode 100644
index cfa29e41b19d..000000000000
--- a/sys-libs/libucontext/libucontext-1.5.1.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# TODO: meson
-inherit toolchain-funcs
-
-DESCRIPTION="ucontext implementation featuring glibc-compatible ABI"
-HOMEPAGE="https://github.com/kaniini/libucontext"
-SRC_URI="https://distfiles.ariadne.space/libucontext/${P}.tar.xz"
-
-LICENSE="ISC"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
-IUSE="+man"
-
-BDEPEND="man? ( app-text/scdoc )"
-
-src_compile() {
- tc-export AR CC
-
- arch=
-
- # Override arch detection
- # https://github.com/kaniini/libucontext/blob/master/Makefile#L3
- if use x86 ; then
- arch="x86"
- elif use arm ; then
- arch="arm"
- elif use arm64 ; then
- arch="aarch64"
- elif use loong ; then
- arch="loongarch64"
- elif use ppc64 ; then
- arch="ppc64"
- else
- arch="$(uname -m)"
- fi
-
- emake \
- ARCH="${arch}" \
- LDFLAGS="${LDFLAGS}" \
- prefix="${EPREFIX}/usr" \
- libdir="/usr/$(get_libdir)" \
- pkgconfigdir="/usr/$(get_libdir)/pkgconfig" \
- all $(usev man 'docs')
-}
-
-src_test() {
- emake \
- ARCH="${arch}" \
- LDFLAGS="${LDFLAGS}" \
- prefix="${EPREFIX}/usr" \
- libdir="/usr/$(get_libdir)" \
- pkgconfigdir="/usr/$(get_libdir)/pkgconfig" \
- check
-}
-
-src_install() {
- emake \
- ARCH="${arch}" \
- DESTDIR="${D}" \
- prefix="${EPREFIX}/usr" \
- libdir="${EPREFIX}/usr/$(get_libdir)" \
- pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig" \
- install $(usev man 'install_docs')
-
- find "${ED}" -name '*.a' -delete || die
-}
diff --git a/sys-libs/libucontext/metadata.xml b/sys-libs/libucontext/metadata.xml
deleted file mode 100644
index 6d14eb740806..000000000000
--- a/sys-libs/libucontext/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>musl@gentoo.org</email>
- <name>Musl project</name>
- </maintainer>
- <upstream>
- <remote-id type="github">kaniini/libucontext</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libudev-compat/files/udev_old.c b/sys-libs/libudev-compat/files/udev_old.c
deleted file mode 100644
index 584644ad0064..000000000000
--- a/sys-libs/libudev-compat/files/udev_old.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2015 Jonathan Callen <jcallen@gentoo.org>
- * Copyright (C) 2008-2010 Kay Sievers <kay.sievers@vrfy.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- */
-
-#include <errno.h>
-#include <stddef.h>
-
-void *udev_monitor_new_from_socket(void *udev, const void *path) {
- errno = ENOSYS;
- return NULL;
-}
-
-void *udev_queue_get_failed_list_entry(void *udev_queue) {
- errno = ENOSYS;
- return NULL;
-}
-
-const char *udev_get_sys_path(void *udev) {
- if (!udev) return NULL;
- return "/sys";
-}
-
-const char *udev_get_dev_path(void *udev) {
- if (!udev) return NULL;
- return "/dev";
-}
-
-const char *udev_get_run_path(void *udev) {
- if (!udev) return NULL;
- return "/run/udev";
-}
diff --git a/sys-libs/libudev-compat/libudev-compat-186-r1.ebuild b/sys-libs/libudev-compat/libudev-compat-186-r1.ebuild
deleted file mode 100644
index 1ffc9eead847..000000000000
--- a/sys-libs/libudev-compat/libudev-compat-186-r1.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-minimal toolchain-funcs
-
-DESCRIPTION="Wrapper around libudev.so.1 for packages needing the old libudev.so.0"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-DEPEND="virtual/libudev:0/1[${MULTILIB_USEDEP}]"
-RDEPEND="${DEPEND}"
-
-src_unpack() {
- mkdir "${S}" || die
- cp "${FILESDIR}"/udev_old.c "${S}" || die
-}
-
-multilib_src_configure() { :; }
-
-echo_and_run() {
- echo "$@"
- "$@"
-}
-
-multilib_src_compile() {
- # Note: --no-as-needed is used explictly here to ensure that libudev.so.1
- # is pulled in, even though nothing in udev_old.c otherwise requires it
- echo_and_run $(tc-getCC) \
- ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} \
- -fpic -shared \
- -Wl,-soname,libudev.so.0 \
- -o libudev.so.0 \
- "${S}"/udev_old.c \
- -Wl,--no-as-needed \
- -ludev || die
-}
-
-multilib_src_install() {
- dolib.so libudev.so.0
-}
diff --git a/sys-libs/libudev-compat/metadata.xml b/sys-libs/libudev-compat/metadata.xml
deleted file mode 100644
index 374cd4dedb33..000000000000
--- a/sys-libs/libudev-compat/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>chewi@gentoo.org</email>
- <name>James Le Cuirot</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/libudev-zero/Manifest b/sys-libs/libudev-zero/Manifest
deleted file mode 100644
index a9811540329a..000000000000
--- a/sys-libs/libudev-zero/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST libudev-zero-1.0.3.tar.gz 12433 BLAKE2B 654eeea8fccc1ea842e2c171bd77a659784e8fab479d60fbbff1bfe93177097da29220f2ca15937d9a51000266514b40031d92ae3a336c4d48cae11c5572f90a SHA512 0fc83f5b87c822da5c4b38373b597db32fee265b1e121bbafee83ae9941d381e0a54d93f0ff74931b126da97bdc559fe83b5178b1e7604371e4263e97da67904
-DIST libudev-zero-1.0.4.tar.gz 15308 BLAKE2B 5c08fd971be2bceac13cfcfa01bf545dd3650bd969b94717c1787113a954a984e262fb88f26a640a4689a3cb3ff4dd734a172711f491bcaeea1bf80a37ed4aaa SHA512 1c8289ce404a5d0f0596303297f596481e8f319ab69cda4c97cf51baf1b2d0efc54c7156a67eb56e0b1bb7ed33191d2a85a44ab4718d8595955e3c3b38c3b922
diff --git a/sys-libs/libudev-zero/libudev-zero-1.0.3.ebuild b/sys-libs/libudev-zero/libudev-zero-1.0.3.ebuild
deleted file mode 100644
index 9c24153143d8..000000000000
--- a/sys-libs/libudev-zero/libudev-zero-1.0.3.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 2024-2026 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-DESCRIPTION="Daemonless replacement for libudev"
-HOMEPAGE="https://github.com/illiliti/libudev-zero"
-SRC_URI="https://github.com/illiliti/libudev-zero/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-LICENSE="ISC"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64"
-
-IUSE="static-libs"
-
-RDEPEND="!sys-apps/systemd-utils[udev]"
-
-src_compile() {
- tc-export CC
- emake libudev.so.1
- use static-libs && emake AR="$(tc-getAR)" libudev.a
-}
-
-src_install() {
- local makeflags=(
- DESTDIR="${D}" PREFIX=/usr LIBDIR=/usr/"$(get_libdir)"
- )
-
- emake "${makeflags[@]}" install-shared
- use static-libs && emake "${makeflags[@]}" install-static
-}
diff --git a/sys-libs/libudev-zero/libudev-zero-1.0.4.ebuild b/sys-libs/libudev-zero/libudev-zero-1.0.4.ebuild
deleted file mode 100644
index f24ec57a7a2a..000000000000
--- a/sys-libs/libudev-zero/libudev-zero-1.0.4.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 2024-2026 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-DESCRIPTION="Daemonless replacement for libudev"
-HOMEPAGE="https://github.com/illiliti/libudev-zero"
-SRC_URI="https://github.com/illiliti/libudev-zero/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-LICENSE="ISC"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64"
-
-IUSE="static-libs"
-
-RDEPEND="
- !sys-apps/systemd-utils[udev]
- sys-apps/hwdata
-"
-
-src_compile() {
- tc-export CC
- emake libudev.so.1
- use static-libs && emake AR="$(tc-getAR)" libudev.a
-}
-
-src_install() {
- local makeflags=(
- DESTDIR="${D}" PREFIX=/usr LIBDIR=/usr/"$(get_libdir)"
- )
-
- emake "${makeflags[@]}" install-shared
- use static-libs && emake "${makeflags[@]}" install-static
-}
diff --git a/sys-libs/libudev-zero/metadata.xml b/sys-libs/libudev-zero/metadata.xml
deleted file mode 100644
index 39fbe91d8801..000000000000
--- a/sys-libs/libudev-zero/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>contact@hacktivis.me</email>
- <name>Haelwenn (lanodan) Monnier</name>
- </maintainer>
- <upstream>
- <remote-id type="github">illility/libudev-zero</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libunwind/Manifest b/sys-libs/libunwind/Manifest
deleted file mode 100644
index 10a3c777ad7f..000000000000
--- a/sys-libs/libunwind/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST libunwind-1.8.0-docs.tar.xz 29280 BLAKE2B 260c5011cf23422ec04449126259c9960b5549b94def8ffa3821ccc67809b5da06be22fb0b465fcee2f0ec89faebab71d2bf3316dc68315a27e0913856513b0a SHA512 6969c8426dc5d79a78a9dae366a9e7b6f1d9a7ce307357913d4f5b8867a540ab8225b5342ee0e06e77b832ef76336fba41dadf12effa5236a076e6bfe72ec548
-DIST libunwind-1.8.2.tar.gz 979922 BLAKE2B b198b186c616adf1302d153a12949ceab07608f8133e42454e6b10bdf9518a514ef15d5ba52ef75b11e5f73fa330205accd415cfc30e6fa3ddd9724cbb088737 SHA512 f1ff26763c1b2e68948413c4aec22303b6c886425a8264eb65fbd58fc202f79c7b04bd4784bd8499850d08933f0e363cfa3a7d177efdadc223ed0254bc381345
-DIST libunwind-1.8.3.tar.gz 981017 BLAKE2B 13ac888e72c080b9e2588024578740971f721497864c5f2eb930227cbc5bb040551db6280048b0b6f2dde193d5d1719f546088618ebd2e19f96524c2b767fda1 SHA512 732c9b74635cf4e65bc90fd5b9a4b90fe5968c7fcce6cc704295038f0d41b848f78a59d725e813072e78df72ff8fc77001096abdfb9ef1c73e3bd82433987679
diff --git a/sys-libs/libunwind/files/libunwind-1.8.2-x32.patch b/sys-libs/libunwind/files/libunwind-1.8.2-x32.patch
deleted file mode 100644
index c9c08ce5a7fe..000000000000
--- a/sys-libs/libunwind/files/libunwind-1.8.2-x32.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-https://bugs.gentoo.org/961995
-https://github.com/libunwind/libunwind/commit/244a713c37b5fd5963334888b63def0c401aa391
-
-From 244a713c37b5fd5963334888b63def0c401aa391 Mon Sep 17 00:00:00 2001
-From: aokblast <aokblast@FreeBSD.org>
-Date: Tue, 30 Jul 2024 12:17:20 +0800
-Subject: [PATCH] add Fix of ELFW in find_build_id_path
-
---- a/src/elfxx.c
-+++ b/src/elfxx.c
-@@ -819,10 +819,10 @@ elf_w (find_build_id_path) (const struct elf_image *ei, char *path, unsigned pat
- const char prefix[] = "/usr/lib/debug/.build-id/";
-
- /* See "man 5 elf" for notes about alignment in Nhdr */
-- const Elf_W(Nhdr) *nhdr = (const ElfW(Nhdr) *) notes;
-- const ElfW(Word) namesz = nhdr->n_namesz;
-- const ElfW(Word) descsz = nhdr->n_descsz;
-- const ElfW(Word) nameasz = UNW_ALIGN(namesz, 4); /* Aligned size */
-+ const Elf_W(Nhdr) *nhdr = (const Elf_W(Nhdr) *) notes;
-+ const Elf_W(Word) namesz = nhdr->n_namesz;
-+ const Elf_W(Word) descsz = nhdr->n_descsz;
-+ const Elf_W(Word) nameasz = UNW_ALIGN(namesz, 4); /* Aligned size */
- const char *name = (const char *) (nhdr + 1);
- const uint8_t *desc = (const uint8_t *) name + nameasz;
- unsigned j;
-
diff --git a/sys-libs/libunwind/files/libunwind-1.8.3-typo.patch b/sys-libs/libunwind/files/libunwind-1.8.3-typo.patch
deleted file mode 100644
index bcb0713ab8fb..000000000000
--- a/sys-libs/libunwind/files/libunwind-1.8.3-typo.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-https://github.com/libunwind/libunwind/commit/bfc0d618f72ba4b725c3735188e0a6d8c710411c
-
-From bfc0d618f72ba4b725c3735188e0a6d8c710411c Mon Sep 17 00:00:00 2001
-From: Stephen Webb <stephen.webb@bregmasoft.ca>
-Date: Tue, 9 Sep 2025 10:18:21 -0400
-Subject: [PATCH] Fix stray `-lc` in configure
-
-When configure is run with --enable-cxx-exceptions a stray `-lc` has
-wandered into the execution path. While it doesn't hurt anything if
-gives a disturbing error message.
----
- configure.ac | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 63d12ac02..9e79558ca 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -306,10 +306,12 @@ AM_CONDITIONAL([SUPPORT_CXX_EXCEPTIONS], [test x$enable_cxx_exceptions = xyes])
- AM_COND_IF([SUPPORT_CXX_EXCEPTIONS],
- [save_LDFLAGS="$LDFLAGS"
- LDFLAGS="${LDFLAGS} -nostdlib"
-- AC_SEARCH_LIBS([_Unwind_Resume], [gcc_s gcc],
-+ AC_SEARCH_LIBS([_Unwind_Resume],
-+ [gcc_s gcc],
- [AS_IF([test "$ac_cv_search__Unwind_Resume" != "none required"],
- [AC_SUBST([UNW_CRT_LIBADD], ["-lc $ac_cv_search__Unwind_Resume"])
-- AC_SUBST([UNW_CRT_LDFLAGS], ["-WCClinker -nostdlib"])])]
-+ AC_SUBST([UNW_CRT_LDFLAGS], ["-WCClinker -nostdlib"])])
-+ ],,
- [-lc])
- LDFLAGS="$save_LDFLAGS"]
- )
-
diff --git a/sys-libs/libunwind/libunwind-1.8.2-r1.ebuild b/sys-libs/libunwind/libunwind-1.8.2-r1.ebuild
deleted file mode 100644
index deafe9ddaa68..000000000000
--- a/sys-libs/libunwind/libunwind-1.8.2-r1.ebuild
+++ /dev/null
@@ -1,138 +0,0 @@
-# Copyright 2005-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-libunwind-docs
-# Set to 1 if prebuilt, 0 if not
-# (the construct below is to allow overriding from env for script)
-: ${LIBUNWIND_DOCS_PREBUILT:=1}
-
-LIBUNWIND_DOCS_PREBUILT_DEV=sam
-LIBUNWIND_DOCS_VERSION=1.8.0
-# Default to generating docs (inc. man pages) if no prebuilt; overridden later
-LIBUNWIND_DOCS_USEFLAG="+doc"
-
-inherit libtool multilib-minimal
-
-DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
-HOMEPAGE="https://savannah.nongnu.org/projects/libunwind"
-
-if [[ ${PV} == 9999 ]] ; then
- LIBUNWIND_DOCS_PREBUILT=0
-
- EGIT_REPO_URI="https://github.com/libunwind/libunwind"
- inherit autotools git-r3
-else
- SRC_URI="https://github.com/libunwind/libunwind/releases/download/v${PV/_rc/-rc}/${P/_rc/-rc}.tar.gz"
- if [[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] ; then
- SRC_URI+=" !doc? ( https://dev.gentoo.org/~${LIBUNWIND_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${LIBUNWIND_DOCS_VERSION}-docs.tar.xz )"
- fi
- S="${WORKDIR}"/${P/_rc/-rc}
-
- if [[ ${PV} != *_rc* ]] ; then
- KEYWORDS="amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 -sparc x86"
- fi
-fi
-
-[[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] && LIBUNWIND_DOCS_USEFLAG="doc"
-
-LICENSE="MIT"
-SLOT="0/8" # libunwind.so.8
-IUSE="debug debug-frame ${LIBUNWIND_DOCS_USEFLAG} libatomic lzma static-libs test zlib"
-# XXX: if enabling tests again, make sure to arrange for deleting them so they don't get installed
-# https://github.com/libunwind/libunwind/pull/722
-RESTRICT="test !test? ( test )" # some tests are broken (toolchain version dependent, rely on external binaries)
-
-BDEPEND="
- doc? ( app-text/texlive-core )
-"
-RDEPEND="
- lzma? ( app-arch/xz-utils[static-libs?,${MULTILIB_USEDEP}] )
- zlib? ( virtual/zlib:=[static-libs?,${MULTILIB_USEDEP}] )
-"
-# We just use the header from libatomic.
-DEPEND="
- ${RDEPEND}
- libatomic? ( dev-libs/libatomic_ops[${MULTILIB_USEDEP}] )
-"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/libunwind.h
-
- # see libunwind.h for the full list of arch-specific headers
- /usr/include/libunwind-aarch64.h
- /usr/include/libunwind-arm.h
- /usr/include/libunwind-hppa.h
- /usr/include/libunwind-ia64.h
- /usr/include/libunwind-mips.h
- /usr/include/libunwind-ppc32.h
- /usr/include/libunwind-ppc64.h
- /usr/include/libunwind-riscv.h
- /usr/include/libunwind-sh.h
- /usr/include/libunwind-tilegx.h
- /usr/include/libunwind-x86.h
- /usr/include/libunwind-x86_64.h
-)
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.8.2-x32.patch
-)
-
-src_prepare() {
- default
-
- chmod +x src/ia64/mk_cursor_i || die
-
- if [[ ${PV} == 9999 ]] ; then
- eautoreconf
- else
- elibtoolize
- fi
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- # --enable-cxx-exceptions: always enable it, headers provide the interface
- # and on some archs it is disabled by default causing a mismatch between the
- # API and the ABI, bug #418253
- --enable-cxx-exceptions
- --enable-coredump
- --enable-ptrace
- --enable-setjmp
- $(use_enable debug-frame)
- $(multilib_native_use_enable doc documentation)
- $(use_enable lzma minidebuginfo)
- $(use_enable static-libs static)
- $(use_enable zlib zlibdebuginfo)
- # conservative-checks: validate memory addresses before use; as of 1.0.1,
- # only x86_64 supports this, yet may be useful for debugging, couple it with
- # debug useflag.
- $(use_enable debug conservative_checks)
- $(use_enable debug)
- $(use_enable test tests)
- )
-
- export ac_cv_header_atomic_ops_h=$(usex libatomic)
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- # bug #586208
- CCACHE_NODIRECT=1 default
-}
-
-multilib_src_test() {
- # Sandbox causes some tests to freak out.
- SANDBOX_ON=0 emake check
-}
-
-multilib_src_install_all() {
- find "${ED}" -name "*.la" -type f -delete || die
-
- # If USE=doc, there'll be newly generated docs which we install instead.
- if ! use doc && [[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] ; then
- doman "${WORKDIR}"/${PN}-${LIBUNWIND_DOCS_VERSION}-docs/man*/*.[0-8]
- fi
-}
diff --git a/sys-libs/libunwind/libunwind-1.8.2.ebuild b/sys-libs/libunwind/libunwind-1.8.2.ebuild
deleted file mode 100644
index 4971ad884a06..000000000000
--- a/sys-libs/libunwind/libunwind-1.8.2.ebuild
+++ /dev/null
@@ -1,134 +0,0 @@
-# Copyright 2005-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-libunwind-docs
-# Set to 1 if prebuilt, 0 if not
-# (the construct below is to allow overriding from env for script)
-: ${LIBUNWIND_DOCS_PREBUILT:=1}
-
-LIBUNWIND_DOCS_PREBUILT_DEV=sam
-LIBUNWIND_DOCS_VERSION=1.8.0
-# Default to generating docs (inc. man pages) if no prebuilt; overridden later
-LIBUNWIND_DOCS_USEFLAG="+doc"
-
-inherit libtool multilib-minimal
-
-DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
-HOMEPAGE="https://savannah.nongnu.org/projects/libunwind"
-
-if [[ ${PV} == 9999 ]] ; then
- LIBUNWIND_DOCS_PREBUILT=0
-
- EGIT_REPO_URI="https://github.com/libunwind/libunwind"
- inherit autotools git-r3
-else
- SRC_URI="https://github.com/libunwind/libunwind/releases/download/v${PV/_rc/-rc}/${P/_rc/-rc}.tar.gz"
- if [[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] ; then
- SRC_URI+=" !doc? ( https://dev.gentoo.org/~${LIBUNWIND_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${LIBUNWIND_DOCS_VERSION}-docs.tar.xz )"
- fi
- S="${WORKDIR}"/${P/_rc/-rc}
-
- if [[ ${PV} != *_rc* ]] ; then
- KEYWORDS="amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 -sparc x86"
- fi
-fi
-
-[[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] && LIBUNWIND_DOCS_USEFLAG="doc"
-
-LICENSE="MIT"
-SLOT="0/8" # libunwind.so.8
-IUSE="debug debug-frame ${LIBUNWIND_DOCS_USEFLAG} libatomic lzma static-libs test zlib"
-# XXX: if enabling tests again, make sure to arrange for deleting them so they don't get installed
-# https://github.com/libunwind/libunwind/pull/722
-RESTRICT="test !test? ( test )" # some tests are broken (toolchain version dependent, rely on external binaries)
-
-BDEPEND="
- doc? ( app-text/texlive-core )
-"
-RDEPEND="
- lzma? ( app-arch/xz-utils[static-libs?,${MULTILIB_USEDEP}] )
- zlib? ( virtual/zlib:=[static-libs?,${MULTILIB_USEDEP}] )
-"
-# We just use the header from libatomic.
-DEPEND="
- ${RDEPEND}
- libatomic? ( dev-libs/libatomic_ops[${MULTILIB_USEDEP}] )
-"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/libunwind.h
-
- # see libunwind.h for the full list of arch-specific headers
- /usr/include/libunwind-aarch64.h
- /usr/include/libunwind-arm.h
- /usr/include/libunwind-hppa.h
- /usr/include/libunwind-ia64.h
- /usr/include/libunwind-mips.h
- /usr/include/libunwind-ppc32.h
- /usr/include/libunwind-ppc64.h
- /usr/include/libunwind-riscv.h
- /usr/include/libunwind-sh.h
- /usr/include/libunwind-tilegx.h
- /usr/include/libunwind-x86.h
- /usr/include/libunwind-x86_64.h
-)
-
-src_prepare() {
- default
-
- chmod +x src/ia64/mk_cursor_i || die
-
- if [[ ${PV} == 9999 ]] ; then
- eautoreconf
- else
- elibtoolize
- fi
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- # --enable-cxx-exceptions: always enable it, headers provide the interface
- # and on some archs it is disabled by default causing a mismatch between the
- # API and the ABI, bug #418253
- --enable-cxx-exceptions
- --enable-coredump
- --enable-ptrace
- --enable-setjmp
- $(use_enable debug-frame)
- $(multilib_native_use_enable doc documentation)
- $(use_enable lzma minidebuginfo)
- $(use_enable static-libs static)
- $(use_enable zlib zlibdebuginfo)
- # conservative-checks: validate memory addresses before use; as of 1.0.1,
- # only x86_64 supports this, yet may be useful for debugging, couple it with
- # debug useflag.
- $(use_enable debug conservative_checks)
- $(use_enable debug)
- $(use_enable test tests)
- )
-
- export ac_cv_header_atomic_ops_h=$(usex libatomic)
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- # bug #586208
- CCACHE_NODIRECT=1 default
-}
-
-multilib_src_test() {
- # Sandbox causes some tests to freak out.
- SANDBOX_ON=0 emake check
-}
-
-multilib_src_install_all() {
- find "${ED}" -name "*.la" -type f -delete || die
-
- # If USE=doc, there'll be newly generated docs which we install instead.
- if ! use doc && [[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] ; then
- doman "${WORKDIR}"/${PN}-${LIBUNWIND_DOCS_VERSION}-docs/man*/*.[0-8]
- fi
-}
diff --git a/sys-libs/libunwind/libunwind-1.8.3.ebuild b/sys-libs/libunwind/libunwind-1.8.3.ebuild
deleted file mode 100644
index e867a578c739..000000000000
--- a/sys-libs/libunwind/libunwind-1.8.3.ebuild
+++ /dev/null
@@ -1,141 +0,0 @@
-# Copyright 2005-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-libunwind-docs
-# Set to 1 if prebuilt, 0 if not
-# (the construct below is to allow overriding from env for script)
-: ${LIBUNWIND_DOCS_PREBUILT:=1}
-
-LIBUNWIND_DOCS_PREBUILT_DEV=sam
-LIBUNWIND_DOCS_VERSION=1.8.0
-# Default to generating docs (inc. man pages) if no prebuilt; overridden later
-LIBUNWIND_DOCS_USEFLAG="+doc"
-
-inherit autotools libtool multilib-minimal
-
-DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
-HOMEPAGE="https://savannah.nongnu.org/projects/libunwind"
-
-if [[ ${PV} == 9999 ]] ; then
- LIBUNWIND_DOCS_PREBUILT=0
-
- EGIT_REPO_URI="https://github.com/libunwind/libunwind"
- inherit autotools git-r3
-else
- SRC_URI="https://github.com/libunwind/libunwind/releases/download/v${PV/_rc/-rc}/${P/_rc/-rc}.tar.gz"
- if [[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] ; then
- SRC_URI+=" !doc? ( https://dev.gentoo.org/~${LIBUNWIND_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${LIBUNWIND_DOCS_VERSION}-docs.tar.xz )"
- fi
- S="${WORKDIR}"/${P/_rc/-rc}
-
- if [[ ${PV} != *_rc* ]] ; then
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ppc ~ppc64 ~riscv ~s390 -sparc ~x86"
- fi
-fi
-
-[[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] && LIBUNWIND_DOCS_USEFLAG="doc"
-
-LICENSE="MIT"
-SLOT="0/8" # libunwind.so.8
-IUSE="debug debug-frame ${LIBUNWIND_DOCS_USEFLAG} libatomic lzma static-libs test zlib"
-# XXX: if enabling tests again, make sure to arrange for deleting them so they don't get installed
-# https://github.com/libunwind/libunwind/pull/722
-RESTRICT="test !test? ( test )" # some tests are broken (toolchain version dependent, rely on external binaries)
-
-BDEPEND="
- doc? ( app-text/texlive-core )
-"
-RDEPEND="
- lzma? ( app-arch/xz-utils[static-libs?,${MULTILIB_USEDEP}] )
- zlib? ( virtual/zlib:=[static-libs?,${MULTILIB_USEDEP}] )
-"
-# We just use the header from libatomic.
-DEPEND="
- ${RDEPEND}
- libatomic? ( dev-libs/libatomic_ops[${MULTILIB_USEDEP}] )
-"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/libunwind.h
-
- # see libunwind.h for the full list of arch-specific headers
- /usr/include/libunwind-aarch64.h
- /usr/include/libunwind-arm.h
- /usr/include/libunwind-hppa.h
- /usr/include/libunwind-ia64.h
- /usr/include/libunwind-mips.h
- /usr/include/libunwind-ppc32.h
- /usr/include/libunwind-ppc64.h
- /usr/include/libunwind-riscv.h
- /usr/include/libunwind-sh.h
- /usr/include/libunwind-tilegx.h
- /usr/include/libunwind-x86.h
- /usr/include/libunwind-x86_64.h
-)
-
-PATCHES=(
- "${FILESDIR}"/${P}-typo.patch
-)
-
-src_prepare() {
- default
-
- chmod +x src/ia64/mk_cursor_i || die
-
- #if [[ ${PV} == 9999 ]] ; then
- # eautoreconf
- #else
- # elibtoolize
- #fi
-
- # For typo.patch
- eautoreconf
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- # --enable-cxx-exceptions: always enable it, headers provide the interface
- # and on some archs it is disabled by default causing a mismatch between the
- # API and the ABI, bug #418253
- --enable-cxx-exceptions
- --enable-coredump
- --enable-ptrace
- --enable-setjmp
- $(use_enable debug-frame)
- $(multilib_native_use_enable doc documentation)
- $(use_enable lzma minidebuginfo)
- $(use_enable static-libs static)
- $(use_enable zlib zlibdebuginfo)
- # conservative-checks: validate memory addresses before use; as of 1.0.1,
- # only x86_64 supports this, yet may be useful for debugging, couple it with
- # debug useflag.
- $(use_enable debug conservative_checks)
- $(use_enable debug)
- $(use_enable test tests)
- )
-
- export ac_cv_header_atomic_ops_h=$(usex libatomic)
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- # bug #586208
- CCACHE_NODIRECT=1 default
-}
-
-multilib_src_test() {
- # Sandbox causes some tests to freak out.
- SANDBOX_ON=0 emake check
-}
-
-multilib_src_install_all() {
- find "${ED}" -name "*.la" -type f -delete || die
-
- # If USE=doc, there'll be newly generated docs which we install instead.
- if ! use doc && [[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] ; then
- doman "${WORKDIR}"/${PN}-${LIBUNWIND_DOCS_VERSION}-docs/man*/*.[0-8]
- fi
-}
diff --git a/sys-libs/libunwind/libunwind-9999.ebuild b/sys-libs/libunwind/libunwind-9999.ebuild
deleted file mode 100644
index dd021de94a4f..000000000000
--- a/sys-libs/libunwind/libunwind-9999.ebuild
+++ /dev/null
@@ -1,134 +0,0 @@
-# Copyright 2005-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-libunwind-docs
-# Set to 1 if prebuilt, 0 if not
-# (the construct below is to allow overriding from env for script)
-: ${LIBUNWIND_DOCS_PREBUILT:=1}
-
-LIBUNWIND_DOCS_PREBUILT_DEV=sam
-LIBUNWIND_DOCS_VERSION=1.8.0
-# Default to generating docs (inc. man pages) if no prebuilt; overridden later
-LIBUNWIND_DOCS_USEFLAG="+doc"
-
-inherit libtool multilib-minimal
-
-DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
-HOMEPAGE="https://savannah.nongnu.org/projects/libunwind"
-
-if [[ ${PV} == 9999 ]] ; then
- LIBUNWIND_DOCS_PREBUILT=0
-
- EGIT_REPO_URI="https://github.com/libunwind/libunwind"
- inherit autotools git-r3
-else
- SRC_URI="https://github.com/libunwind/libunwind/releases/download/v${PV/_rc/-rc}/${P/_rc/-rc}.tar.gz"
- if [[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] ; then
- SRC_URI+=" !doc? ( https://dev.gentoo.org/~${LIBUNWIND_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${LIBUNWIND_DOCS_VERSION}-docs.tar.xz )"
- fi
- S="${WORKDIR}"/${P/_rc/-rc}
-
- if [[ ${PV} != *_rc* ]] ; then
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 -sparc ~x86"
- fi
-fi
-
-[[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] && LIBUNWIND_DOCS_USEFLAG="doc"
-
-LICENSE="MIT"
-SLOT="0/8" # libunwind.so.8
-IUSE="debug debug-frame ${LIBUNWIND_DOCS_USEFLAG} libatomic lzma static-libs test zlib"
-# XXX: if enabling tests again, make sure to arrange for deleting them so they don't get installed
-# https://github.com/libunwind/libunwind/pull/722
-RESTRICT="test !test? ( test )" # some tests are broken (toolchain version dependent, rely on external binaries)
-
-BDEPEND="
- doc? ( app-text/texlive-core )
-"
-RDEPEND="
- lzma? ( app-arch/xz-utils[static-libs?,${MULTILIB_USEDEP}] )
- zlib? ( virtual/zlib:=[static-libs?,${MULTILIB_USEDEP}] )
-"
-# We just use the header from libatomic.
-DEPEND="
- ${RDEPEND}
- libatomic? ( dev-libs/libatomic_ops[${MULTILIB_USEDEP}] )
-"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/libunwind.h
-
- # see libunwind.h for the full list of arch-specific headers
- /usr/include/libunwind-aarch64.h
- /usr/include/libunwind-arm.h
- /usr/include/libunwind-hppa.h
- /usr/include/libunwind-ia64.h
- /usr/include/libunwind-mips.h
- /usr/include/libunwind-ppc32.h
- /usr/include/libunwind-ppc64.h
- /usr/include/libunwind-riscv.h
- /usr/include/libunwind-sh.h
- /usr/include/libunwind-tilegx.h
- /usr/include/libunwind-x86.h
- /usr/include/libunwind-x86_64.h
-)
-
-src_prepare() {
- default
-
- chmod +x src/ia64/mk_cursor_i || die
-
- if [[ ${PV} == 9999 ]] ; then
- eautoreconf
- else
- elibtoolize
- fi
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- # --enable-cxx-exceptions: always enable it, headers provide the interface
- # and on some archs it is disabled by default causing a mismatch between the
- # API and the ABI, bug #418253
- --enable-cxx-exceptions
- --enable-coredump
- --enable-ptrace
- --enable-setjmp
- $(use_enable debug-frame)
- $(multilib_native_use_enable doc documentation)
- $(use_enable lzma minidebuginfo)
- $(use_enable static-libs static)
- $(use_enable zlib zlibdebuginfo)
- # conservative-checks: validate memory addresses before use; as of 1.0.1,
- # only x86_64 supports this, yet may be useful for debugging, couple it with
- # debug useflag.
- $(use_enable debug conservative_checks)
- $(use_enable debug)
- $(use_enable test tests)
- )
-
- export ac_cv_header_atomic_ops_h=$(usex libatomic)
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- # bug #586208
- CCACHE_NODIRECT=1 default
-}
-
-multilib_src_test() {
- # Sandbox causes some tests to freak out.
- SANDBOX_ON=0 emake check
-}
-
-multilib_src_install_all() {
- find "${ED}" -name "*.la" -type f -delete || die
-
- # If USE=doc, there'll be newly generated docs which we install instead.
- if ! use doc && [[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] ; then
- doman "${WORKDIR}"/${PN}-${LIBUNWIND_DOCS_VERSION}-docs/man*/*.[0-8]
- fi
-}
diff --git a/sys-libs/libunwind/metadata.xml b/sys-libs/libunwind/metadata.xml
deleted file mode 100644
index 2861d2a86f04..000000000000
--- a/sys-libs/libunwind/metadata.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
- </maintainer>
- <use>
- <flag name="debug-frame">Adds support for DWARF .debug_frame section: Use the information from this section if available</flag>
- <flag name="libatomic">Use libatomic instead of builtin atomic operations</flag>
- </use>
- <upstream>
- <remote-id type="savannah-nongnu">libunwind</remote-id>
- <remote-id type="github">libunwind/libunwind</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/liburing/Manifest b/sys-libs/liburing/Manifest
deleted file mode 100644
index e7e620b148af..000000000000
--- a/sys-libs/liburing/Manifest
+++ /dev/null
@@ -1,7 +0,0 @@
-DIST liburing-2.10-fix-compilation-error-io_uring_for_each_cqe.patch 2593 BLAKE2B cf34ff93859c489a524c9587a1868df27ce4f0b9f19aa8cb0b94c48a5addad5afa3d9469894962652dffcf2228830d4b8547f03220e9c7aa6b20d2a1ca7e9159 SHA512 93d68779cb10b4552306f715a723be92b2acbd9559acef75156b072460b72ccb94e2b06988f1b00745cf7247e886e242d6ebe39a31bff9fad67af80d95ab8fe0
-DIST liburing-2.10.tar.gz 428315 BLAKE2B f5477f7a1a30202feea3e97f236f6a8a2db59923a0ba9c13dda2cd8de0831bb0979dc6acdef4a2f1797ce2637125def54b9f3d50f14ef01affeed43b089228df SHA512 6fb6e7ce66917d9438095e05916f90d834034ac3f6d6d8b6ee1eadf48ab9e499efa4af489dc72f8acc4a0b018f917ffcb8af4af682b47512566205519dd1f5db
-DIST liburing-2.11.tar.gz 429859 BLAKE2B 9a649132e28569c7de30f284da13fb7318f406f123358833e5a252693e724bd99056c3966f061732ad9d6db6a327265b5a9f580ada74d8cef762ccfafadac251 SHA512 151d01416eeca6b9d18cb7bbd96f4f8099f1aa377f0ff808b51fa7e2c990413fe8aa7b40712c806d6a800296a58e262fe551c358ee7d23153c3bfa10aeb67eb0
-DIST liburing-2.12.tar.gz 441865 BLAKE2B 9229974bcebd6d117fb686ed998dfc76a3dd68c1d1da0d18a895b55cc6ba01f1656756f95987f1a18495306d038ebc4c7090c2eb0dea455b596c5e639d413b29 SHA512 ccd40be43d4ea046c63d949cfddd9adb0fda531e3ae4ee17d4639b82a11eda966d8a2afd280b4e6b45f907ea1d53bbd432bfd8ae7a015609e86555a766fc850f
-DIST liburing-2.13.tar.gz 454243 BLAKE2B e9032e48622ee87ddbd9dd25d4e0264f0a648f9540acaca69a3a9bea05e64c5a8bdf2da37787ea72a298074f01bc0ab8baf934da5ece792443ee4417245d75fd SHA512 ada60d8c0bf5b546e45fe2e9e58b2cb4e342665d260648210218e5802dbc7bf650bc8bbcf0620dee27bc4310089dd5c509451a4f451368eccf1e1c5b3a4db0a7
-DIST liburing-2.14.tar.gz 487718 BLAKE2B 9e2e7b6c3a7a4fa2d285bb8cb1bea65bef7d56aac7992b912feaf67c2b99590912fd195213a04c320f3ef615ee4f45b8c4b808ca78442d74cbbdd93bda13c700 SHA512 3eb8419cd6c9ae4909b9697b188f5c6a27e107694eefe9747822524c8710e0798476aa43acada578fcbcf6e46b63ebdfb59350e4ba8f928dfe7cac3614e32a48
-DIST liburing-2.9.tar.gz 407191 BLAKE2B 7081f9430e9532cad659e24de7ba998ad40f15a3fc3bf08fbe2b30df2bb335d4b06affb98d5667d4f8e6c8bc6e7a98c25caddd57ec5c98940562eb0e7977e54d SHA512 f27233e6128444175b18cd1d45647acdd27b906a8cd561029508710e443b44416b916cad1b2c1217e23d9a5ffb5ba68b119e9c812eae406650fbd10bf26c2fa5
diff --git a/sys-libs/liburing/liburing-2.10-r1.ebuild b/sys-libs/liburing/liburing-2.10-r1.ebuild
deleted file mode 100644
index b64277e20260..000000000000
--- a/sys-libs/liburing/liburing-2.10-r1.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib-minimal toolchain-funcs
-
-DESCRIPTION="Efficient I/O with io_uring"
-HOMEPAGE="https://github.com/axboe/liburing"
-if [[ "${PV}" == *9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/axboe/liburing.git"
-else
- SRC_URI="
- https://github.com/axboe/liburing/archive/refs/tags/${P}.tar.gz
- https://github.com/axboe/liburing/commit/6836160ae6ae9fdc20d703de55162bfc97169542.patch
- -> ${PN}-2.10-fix-compilation-error-io_uring_for_each_cqe.patch
- "
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- QA_PKGCONFIG_VERSION=${PV}
-fi
-
-S="${WORKDIR}"/liburing-${P}
-LICENSE="MIT"
-SLOT="0/2" # liburing.so major version
-
-IUSE="examples static-libs test"
-# fsync test hangs forever
-RESTRICT="!test? ( test )"
-
-# At least installed headers need <linux/*>, bug #802516
-DEPEND=">=sys-kernel/linux-headers-5.1"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
- "${DISTDIR}"/${PN}-2.10-fix-compilation-error-io_uring_for_each_cqe.patch
-)
-
-src_prepare() {
- default
-
- if ! use examples; then
- sed -e '/examples/d' Makefile -i || die
- fi
- if ! use test; then
- sed -e '/test/d' Makefile -i || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local myconf=(
- --prefix="${EPREFIX}/usr"
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --libdevdir="${EPREFIX}/usr/$(get_libdir)"
- --mandir="${EPREFIX}/usr/share/man"
- --cc="$(tc-getCC)"
- --cxx="$(tc-getCXX)"
- --use-libc
- )
- # No autotools configure! "econf" will fail.
- TMPDIR="${T}" ./configure "${myconf[@]}" || die
-}
-
-multilib_src_compile() {
- emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -type f -name "*.a" -delete || die
- fi
-}
-
-multilib_src_test() {
- local disabled_tests=(
- accept.c
- fpos.c
- io_uring_register.c
- link-timeout.c
- read-before-exit.c
- recv-msgall-stream.c
- )
- local disabled_test
- for disabled_test in "${disabled_tests[@]}"; do
- sed -i "/\s*${disabled_test}/d" test/Makefile \
- || die "Failed to remove ${disabled_test}"
- done
-
- emake -C test V=1 runtests
-}
diff --git a/sys-libs/liburing/liburing-2.11.ebuild b/sys-libs/liburing/liburing-2.11.ebuild
deleted file mode 100644
index 94dacec36689..000000000000
--- a/sys-libs/liburing/liburing-2.11.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib-minimal toolchain-funcs
-
-DESCRIPTION="Efficient I/O with io_uring"
-HOMEPAGE="https://github.com/axboe/liburing"
-if [[ "${PV}" == *9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/axboe/liburing.git"
-else
- SRC_URI="
- https://github.com/axboe/liburing/archive/refs/tags/${P}.tar.gz
- "
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- QA_PKGCONFIG_VERSION=${PV}
-fi
-
-S="${WORKDIR}"/liburing-${P}
-LICENSE="MIT"
-SLOT="0/2" # liburing.so major version
-
-IUSE="examples static-libs test"
-# fsync test hangs forever
-RESTRICT="!test? ( test )"
-
-# At least installed headers need <linux/*>, bug #802516
-DEPEND=">=sys-kernel/linux-headers-5.1"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- default
-
- if ! use examples; then
- sed -e '/examples/d' Makefile -i || die
- fi
- if ! use test; then
- sed -e '/test/d' Makefile -i || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local myconf=(
- --prefix="${EPREFIX}/usr"
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --libdevdir="${EPREFIX}/usr/$(get_libdir)"
- --mandir="${EPREFIX}/usr/share/man"
- --cc="$(tc-getCC)"
- --cxx="$(tc-getCXX)"
- --use-libc
- )
- # No autotools configure! "econf" will fail.
- TMPDIR="${T}" ./configure "${myconf[@]}" || die
-}
-
-multilib_src_compile() {
- emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -type f -name "*.a" -delete || die
- fi
-}
-
-multilib_src_test() {
- local disabled_tests=(
- accept.c
- fpos.c
- io_uring_register.c
- link-timeout.c
- read-before-exit.c
- recv-msgall-stream.c
- )
- local disabled_test
- for disabled_test in "${disabled_tests[@]}"; do
- sed -i "/\s*${disabled_test}/d" test/Makefile \
- || die "Failed to remove ${disabled_test}"
- done
-
- emake -C test V=1 runtests
-}
diff --git a/sys-libs/liburing/liburing-2.12.ebuild b/sys-libs/liburing/liburing-2.12.ebuild
deleted file mode 100644
index 5dd4c11e0742..000000000000
--- a/sys-libs/liburing/liburing-2.12.ebuild
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib-minimal toolchain-funcs
-
-DESCRIPTION="Efficient I/O with io_uring"
-HOMEPAGE="https://github.com/axboe/liburing"
-if [[ "${PV}" == *9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/axboe/liburing.git"
- S="${WORKDIR}"/liburing-${PV}
-else
- SRC_URI="
- https://github.com/axboe/liburing/archive/refs/tags/${P}.tar.gz
- "
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- QA_PKGCONFIG_VERSION=${PV}
- S="${WORKDIR}"/liburing-${P}
-fi
-
-LICENSE="MIT"
-SLOT="0/2" # liburing.so major version
-
-IUSE="examples static-libs test"
-# fsync test hangs forever
-RESTRICT="!test? ( test )"
-
-# At least installed headers need <linux/*>, bug #802516
-DEPEND=">=sys-kernel/linux-headers-5.1"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- default
-
- if ! use examples; then
- sed -e '/examples/d' Makefile -i || die
- fi
- if ! use test; then
- sed -e '/test/d' Makefile -i || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local myconf=(
- --prefix="${EPREFIX}/usr"
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --libdevdir="${EPREFIX}/usr/$(get_libdir)"
- --mandir="${EPREFIX}/usr/share/man"
- --cc="$(tc-getCC)"
- --cxx="$(tc-getCXX)"
- --use-libc
- )
- # No autotools configure! "econf" will fail.
- TMPDIR="${T}" ./configure "${myconf[@]}" || die
-}
-
-multilib_src_compile() {
- emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -type f -name "*.a" -delete || die
- fi
-}
-
-multilib_src_test() {
- local disabled_tests=(
- accept.c
- conn-unreach.t
- fpos.c
- io_uring_register.c
- link-timeout.c
- read-before-exit.c
- recv-msgall-stream.c
- msg-ring.c
- wait-timeout.t
- )
- local disabled_test
- for disabled_test in "${disabled_tests[@]}"; do
- sed -i "/\s*${disabled_test}/d" test/Makefile \
- || die "Failed to remove ${disabled_test}"
- done
-
- emake -C test V=1 runtests
-}
diff --git a/sys-libs/liburing/liburing-2.13.ebuild b/sys-libs/liburing/liburing-2.13.ebuild
deleted file mode 100644
index d49bf312622c..000000000000
--- a/sys-libs/liburing/liburing-2.13.ebuild
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib-minimal toolchain-funcs
-
-DESCRIPTION="Efficient I/O with io_uring"
-HOMEPAGE="https://github.com/axboe/liburing"
-if [[ "${PV}" == *9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/axboe/liburing.git"
- S="${WORKDIR}"/liburing-${PV}
-else
- SRC_URI="
- https://github.com/axboe/liburing/archive/refs/tags/${P}.tar.gz
- "
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- QA_PKGCONFIG_VERSION=${PV}
- S="${WORKDIR}"/liburing-${P}
-fi
-
-LICENSE="MIT"
-SLOT="0/2" # liburing.so major version
-
-IUSE="examples static-libs test"
-# fsync test hangs forever
-RESTRICT="!test? ( test )"
-
-# At least installed headers need <linux/*>, bug #802516
-DEPEND=">=sys-kernel/linux-headers-5.1"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- default
-
- if ! use examples; then
- sed -e '/examples/d' Makefile -i || die
- fi
- if ! use test; then
- sed -e '/test/d' Makefile -i || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local myconf=(
- --prefix="${EPREFIX}/usr"
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --libdevdir="${EPREFIX}/usr/$(get_libdir)"
- --mandir="${EPREFIX}/usr/share/man"
- --cc="$(tc-getCC)"
- --cxx="$(tc-getCXX)"
- --use-libc
- )
- # No autotools configure! "econf" will fail.
- TMPDIR="${T}" ./configure "${myconf[@]}" || die
-}
-
-multilib_src_compile() {
- emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -type f -name "*.a" -delete || die
- fi
-}
-
-multilib_src_test() {
- local disabled_tests=(
- accept.c
- conn-unreach.t
- fpos.c
- io_uring_register.c
- link-timeout.c
- read-before-exit.c
- recv-msgall-stream.c
- msg-ring.c
- wait-timeout.t
- )
- local disabled_test
- for disabled_test in "${disabled_tests[@]}"; do
- sed -i "/\s*${disabled_test}/d" test/Makefile \
- || die "Failed to remove ${disabled_test}"
- done
-
- emake -C test V=1 runtests
-}
diff --git a/sys-libs/liburing/liburing-2.14.ebuild b/sys-libs/liburing/liburing-2.14.ebuild
deleted file mode 100644
index 1713d3a5211e..000000000000
--- a/sys-libs/liburing/liburing-2.14.ebuild
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib-minimal toolchain-funcs
-
-DESCRIPTION="Efficient I/O with io_uring"
-HOMEPAGE="https://github.com/axboe/liburing"
-if [[ "${PV}" == *9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/axboe/liburing.git"
- S="${WORKDIR}"/liburing-${PV}
-else
- SRC_URI="
- https://github.com/axboe/liburing/archive/refs/tags/${P}.tar.gz
- "
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- QA_PKGCONFIG_VERSION=${PV}
- S="${WORKDIR}"/liburing-${P}
-fi
-
-LICENSE="MIT"
-SLOT="0/2" # liburing.so major version
-
-IUSE="examples static-libs test"
-RESTRICT="!test? ( test )"
-
-# At least installed headers need <linux/*>, bug #802516
-DEPEND=">=sys-kernel/linux-headers-5.1"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- default
-
- if ! use examples; then
- sed -e '/examples/d' Makefile -i || die
- fi
-
- if ! use test; then
- sed -e '/test/d' Makefile -i || die
- else
- local disabled_tests=(
- accept.c
- fpos.c
- io_uring_register.c
- recv-msgall-stream.c
- msg-ring.c
- wait-timeout.c # early wake up, 10192
- conn-unreach.c # Unexpected shutdown: -107
- io-wq-unused-exit.c # timeout waiting for iou-wrk threads (want_any=0, nr=1)
- send-zerocopy.c # submit failed, got 1 expected 1
- )
- local disabled_test
- for disabled_test in "${disabled_tests[@]}"; do
- sed -i "/\s*${disabled_test}/d" test/Makefile \
- || die "Failed to remove ${disabled_test}"
- done
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local myconf=(
- --prefix="${EPREFIX}/usr"
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --libdevdir="${EPREFIX}/usr/$(get_libdir)"
- --mandir="${EPREFIX}/usr/share/man"
- --cc="$(tc-getCC)"
- --cxx="$(tc-getCXX)"
- --use-libc
- )
- # No autotools configure! "econf" will fail.
- TMPDIR="${T}" ./configure "${myconf[@]}" || die
-}
-
-multilib_src_compile() {
- emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -type f -name "*.a" -delete || die
- fi
-}
-
-multilib_src_test() {
- emake -C test V=1 runtests
-}
diff --git a/sys-libs/liburing/liburing-2.9.ebuild b/sys-libs/liburing/liburing-2.9.ebuild
deleted file mode 100644
index 75b52b644127..000000000000
--- a/sys-libs/liburing/liburing-2.9.ebuild
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib-minimal toolchain-funcs
-
-DESCRIPTION="Efficient I/O with io_uring"
-HOMEPAGE="https://github.com/axboe/liburing"
-if [[ "${PV}" == *9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/axboe/liburing.git"
-else
- SRC_URI="https://github.com/axboe/liburing/archive/refs/tags/${P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
- QA_PKGCONFIG_VERSION=${PV}
-fi
-
-S="${WORKDIR}"/liburing-${P}
-LICENSE="MIT"
-SLOT="0/2" # liburing.so major version
-
-IUSE="examples static-libs test"
-# fsync test hangs forever
-RESTRICT="!test? ( test )"
-
-# At least installed headers need <linux/*>, bug #802516
-DEPEND=">=sys-kernel/linux-headers-5.1"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- default
-
- if ! use examples; then
- sed -e '/examples/d' Makefile -i || die
- fi
- if ! use test; then
- sed -e '/test/d' Makefile -i || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local myconf=(
- --prefix="${EPREFIX}/usr"
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --libdevdir="${EPREFIX}/usr/$(get_libdir)"
- --mandir="${EPREFIX}/usr/share/man"
- --cc="$(tc-getCC)"
- --cxx="$(tc-getCXX)"
- --use-libc
- )
- # No autotools configure! "econf" will fail.
- TMPDIR="${T}" ./configure "${myconf[@]}" || die
-}
-
-multilib_src_compile() {
- emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -type f -name "*.a" -delete || die
- fi
-}
-
-multilib_src_test() {
- local disabled_tests=(
- accept.c
- fpos.c
- io_uring_register.c
- link-timeout.c
- read-before-exit.c
- recv-msgall-stream.c
- )
- local disabled_test
- for disabled_test in "${disabled_tests[@]}"; do
- sed -i "/\s*${disabled_test}/d" test/Makefile \
- || die "Failed to remove ${disabled_test}"
- done
-
- emake -C test V=1 runtests
-}
diff --git a/sys-libs/liburing/liburing-9999.ebuild b/sys-libs/liburing/liburing-9999.ebuild
deleted file mode 100644
index e4b4d0bd2e13..000000000000
--- a/sys-libs/liburing/liburing-9999.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib-minimal toolchain-funcs
-
-DESCRIPTION="Efficient I/O with io_uring"
-HOMEPAGE="https://github.com/axboe/liburing"
-if [[ "${PV}" == *9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="
- https://git.kernel.org/pub/scm/linux/kernel/git/axboe/liburing.git
- https://github.com/axboe/liburing.git
- "
- S="${WORKDIR}"/liburing-${PV}
-else
- SRC_URI="
- https://github.com/axboe/liburing/archive/refs/tags/${P}.tar.gz
- "
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- QA_PKGCONFIG_VERSION=${PV}
- S="${WORKDIR}"/liburing-${P}
-fi
-
-LICENSE="MIT"
-SLOT="0/2" # liburing.so major version
-
-IUSE="examples static-libs test"
-# fsync test hangs forever
-RESTRICT="!test? ( test )"
-
-# At least installed headers need <linux/*>, bug #802516
-DEPEND=">=sys-kernel/linux-headers-5.1"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- default
-
- if ! use examples; then
- sed -e '/examples/d' Makefile -i || die
- fi
- if ! use test; then
- sed -e '/test/d' Makefile -i || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local myconf=(
- --prefix="${EPREFIX}/usr"
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --libdevdir="${EPREFIX}/usr/$(get_libdir)"
- --mandir="${EPREFIX}/usr/share/man"
- --cc="$(tc-getCC)"
- --cxx="$(tc-getCXX)"
- --use-libc
- )
- # No autotools configure! "econf" will fail.
- TMPDIR="${T}" ./configure "${myconf[@]}" || die
-}
-
-multilib_src_compile() {
- emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -type f -name "*.a" -delete || die
- fi
-}
-
-multilib_src_test() {
- local disabled_tests=(
- accept.c
- conn-unreach.t
- fpos.c
- io_uring_register.c
- link-timeout.c
- read-before-exit.c
- recv-msgall-stream.c
- msg-ring.c
- wait-timeout.t
- )
- local disabled_test
- for disabled_test in "${disabled_tests[@]}"; do
- sed -i "/\s*${disabled_test}/d" test/Makefile \
- || die "Failed to remove ${disabled_test}"
- done
-
- emake -C test V=1 runtests
-}
diff --git a/sys-libs/liburing/metadata.xml b/sys-libs/liburing/metadata.xml
deleted file mode 100644
index 6107bab3f5fa..000000000000
--- a/sys-libs/liburing/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <name>Florian Schmaus</name>
- <email>flow@gentoo.org</email>
- </maintainer>
- <upstream>
- <remote-id type="github">axboe/liburing</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libutempter/Manifest b/sys-libs/libutempter/Manifest
deleted file mode 100644
index 837a2bf977ca..000000000000
--- a/sys-libs/libutempter/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libutempter-1.2.1.tar.gz 17429 BLAKE2B 88ae0a03a8a614b960082ce4d4006ec4e3eb8148b319ae964ac3ba3f684f08f5dd670e693f25d52d04a280f7b2aed6d2894cbbc0e2db3f71ab68e6910ffb58d1 SHA512 d3a3bab7d2c2a68534c5ad41dd02bde849eb08df5dbb895a79b50b74d269c48c4cfcd12c4654941ccb7cdd43f486cfdc19148fa470870562f5cd324ce9782429
diff --git a/sys-libs/libutempter/libutempter-1.2.1.ebuild b/sys-libs/libutempter/libutempter-1.2.1.ebuild
deleted file mode 100644
index e4a403adf198..000000000000
--- a/sys-libs/libutempter/libutempter-1.2.1.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs
-
-DESCRIPTION="Library that allows non-privileged apps to write utmp (login) info"
-HOMEPAGE="https://git.altlinux.org/people/ldv/packages/?p=libutempter.git https://github.com/altlinux/libutempter"
-SRC_URI="ftp://ftp.altlinux.org/pub/people/ldv/${PN}/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="static-libs"
-
-RDEPEND="
- !sys-apps/utempter
- acct-group/utmp
-"
-
-src_prepare() {
- default
-
- local args=(
- -e "/^libdir /s:/usr/lib:${EPREFIX}/usr/$(get_libdir):"
- -e '/^libexecdir /s:=.*:= $(libdir)/misc:'
- -e '/^CFLAGS = $(RPM_OPT_FLAGS)/d'
- -e 's:-Wl,-stats::'
- -e "/^includedir /s:/usr/include:${EPREFIX}/usr/include:"
- -e "/^mandir /s:=.*:= ${EPREFIX}/usr/share/man:"
- )
-
- if ! use static-libs ; then
- args+=(
- -e '/^STATICLIB/d'
- -e '/INSTALL.*STATICLIB/d'
- )
- fi
-
- sed -i "${args[@]}" Makefile || die
-}
-
-src_configure() {
- tc-export AR CC
-}
-
-src_compile() {
- emake LDLIBS="${LIBS}"
-}
-
-src_install() {
- default
-
- if ! use prefix ; then
- fowners root:utmp /usr/$(get_libdir)/misc/utempter/utempter
- fperms 2755 /usr/$(get_libdir)/misc/utempter/utempter
- fi
-
- dodir /usr/sbin
- dosym ../$(get_libdir)/misc/utempter/utempter /usr/sbin/utempter
-}
-
-pkg_postinst() {
- local path
- for path in "${EROOT}"/var/log/{w,u}tmp; do
- chown root:utmp "${path}"
- chmod 664 "${path}"
- done
-}
diff --git a/sys-libs/libutempter/metadata.xml b/sys-libs/libutempter/metadata.xml
deleted file mode 100644
index 3d9deb2a1ba7..000000000000
--- a/sys-libs/libutempter/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<upstream>
- <remote-id type="github">altlinux/libutempter</remote-id>
-</upstream>
-</pkgmetadata>
diff --git a/sys-libs/libuuid/Manifest b/sys-libs/libuuid/Manifest
deleted file mode 100644
index c716f7b37cdd..000000000000
--- a/sys-libs/libuuid/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libuuid-1.0.3.tar.gz 318256 BLAKE2B 31318e5de019d73b87221f3fff3e3cc8598d02adbdcfd2065fbae6fd2373ab0e3e01241476124e0c80210aa45b4796927dcbb7d5ba0804315eb0e0610d995ec4 SHA512 77488caccc66503f6f2ded7bdfc4d3bc2c20b24a8dc95b2051633c695e99ec27876ffbafe38269b939826e1fdb06eea328f07b796c9e0aaca12331a787175507
diff --git a/sys-libs/libuuid/libuuid-1.0.3-r1.ebuild b/sys-libs/libuuid/libuuid-1.0.3-r1.ebuild
deleted file mode 100644
index b1761a81eb31..000000000000
--- a/sys-libs/libuuid/libuuid-1.0.3-r1.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit libtool
-
-DESCRIPTION="Portable uuid C library"
-HOMEPAGE="https://libuuid.sourceforge.io/"
-SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~x64-solaris"
-
-DEPEND="!!sys-apps/util-linux
- !!sys-libs/native-uuid"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- eapply_user
- elibtoolize
-}
-
-src_configure() {
- econf --disable-static
-}
-
-src_install() {
- default
- find "${ED}" -name "*.la" -delete || die
-}
diff --git a/sys-libs/libuuid/metadata.xml b/sys-libs/libuuid/metadata.xml
deleted file mode 100644
index 4fbbc004bde5..000000000000
--- a/sys-libs/libuuid/metadata.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>grobian@gentoo.org</email>
- <name>Fabian Groffen</name>
- </maintainer>
- <maintainer type="project">
- <email>prefix@gentoo.org</email>
- <name>Gentoo Prefix</name>
- </maintainer>
- <upstream>
- <remote-id type="sourceforge">libuuid</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libvpd/Manifest b/sys-libs/libvpd/Manifest
deleted file mode 100644
index 3e825ef8afde..000000000000
--- a/sys-libs/libvpd/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libvpd-2.2.9.tar.gz 53747 BLAKE2B c8898e2f604431b74bf5e10fc99e7a9b5540b825f2a996776109a2b2b636f732ff8d9f7956ffea1231e5b023e285eee641a873a68fcd8a2d6a6d9e64c5ab3b18 SHA512 e32a80e0f3aaedbaaac64dbdedfee7eeb2e7a7b6d2d737bca4678d26caadab77032a7c26211a5fc3caed3724488bc8fa99620ceac05f8d156ca90f4452cfaf0a
diff --git a/sys-libs/libvpd/libvpd-2.2.9.ebuild b/sys-libs/libvpd/libvpd-2.2.9.ebuild
deleted file mode 100644
index 305245b5abfa..000000000000
--- a/sys-libs/libvpd/libvpd-2.2.9.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-inherit autotools udev
-
-DESCRIPTION="Library implementation for listing Vital Product Data"
-HOMEPAGE="https://github.com/power-ras/libvpd"
-SRC_URI="https://github.com/power-ras/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0/3"
-KEYWORDS="ppc ppc64"
-
-DEPEND="
- dev-db/sqlite:3
- virtual/zlib:=
-"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- # sysconfdir is used only to establish where the udev rules file should go
- # unfortunately it also adds the subdirs on its own so we strip it down to
- # dirname
- local myconf=(
- --disable-static
- --localstatedir="${EPREFIX}/var"
- --sysconfdir="$( dirname $(get_udevdir) )"
- )
-
- econf "${myconf[@]}"
-}
-
-src_install() {
- default
- keepdir /var/lib/lsvpd
- find "${D}" -name '*.la' -delete || die
-}
diff --git a/sys-libs/libvpd/metadata.xml b/sys-libs/libvpd/metadata.xml
deleted file mode 100644
index 079cdb9aa6f0..000000000000
--- a/sys-libs/libvpd/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>ppc@gentoo.org</email>
- <name>PowerPC architecture team</name>
- </maintainer>
- <upstream>
- <remote-id type="github">power-ras/libvpd</remote-id>
- <changelog>https://github.com/power-ras/libvpd/blob/master/ChangeLog</changelog>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libxcrypt/Manifest b/sys-libs/libxcrypt/Manifest
deleted file mode 100644
index 259a3cce265b..000000000000
--- a/sys-libs/libxcrypt/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libxcrypt-4.4.38-autotools.tar.xz 630696 BLAKE2B 471066e83495fbaf3ef8dee066b4a7bff36dbc36d6ae1c09f2510d79b041b8517d6cc345e678d92508f5d044dc25fd7b1d36e0243aa46314bbbe7e3201838a5c SHA512 9b1d53119e0d808f6bc30e39cbe85710e3abb774109df28e05b90adebb828f47db3f7126de4ffdea2e63073905648ad941985d1a2167ba7282c01e132ef4e2b2
diff --git a/sys-libs/libxcrypt/files/libxcrypt-4.4.19-multibuild.patch b/sys-libs/libxcrypt/files/libxcrypt-4.4.19-multibuild.patch
deleted file mode 100644
index 5b3958e091d0..000000000000
--- a/sys-libs/libxcrypt/files/libxcrypt-4.4.19-multibuild.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index d0cca1d..4a5d4a1 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -86,9 +86,7 @@ noinst_HEADERS = \
- test/des-cases.h \
- test/ka-table.inc
-
--if ENABLE_XCRYPT_COMPAT_FILES
- nodist_include_HEADERS += xcrypt.h
--endif
-
- noinst_PROGRAMS = \
- lib/gen-des-tables
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.38-r1.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.38-r1.ebuild
deleted file mode 100644
index 60db2d62c239..000000000000
--- a/sys-libs/libxcrypt/libxcrypt-4.4.38-r1.ebuild
+++ /dev/null
@@ -1,254 +0,0 @@
-# Copyright 2004-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-# NEED_BOOTSTRAP is for developers to quickly generate a tarball
-# for publishing to the tree.
-NEED_BOOTSTRAP="no"
-inherit crossdev 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 static-libs +system test headers-only"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- system? (
- elibc_glibc? (
- ${CATEGORY}/glibc[-crypt(-)]
- !${CATEGORY}/glibc[crypt(-)]
- )
- elibc_musl? (
- ${CATEGORY}/musl[-crypt(+)]
- !${CATEGORY}/musl[crypt(+)]
- )
- )
-"
-RDEPEND="${DEPEND}
- !<sys-apps/man-pages-6.16-r1
-"
-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() {
- :
-}
-
-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() {
- MULTIBUILD_VARIANTS=(
- $(usev compat 'xcrypt_compat')
- xcrypt_nocompat
- )
-
- MYPREFIX=${EPREFIX}
- MYSYSROOT=${ESYSROOT}
-
- if target_is_not_host; then
- # Hack to work around missing TARGET_CC support.
- # See bug 949976.
- if tc-is-clang; then
- export CC="${CTARGET}-clang"
- else
- export CC="${CTARGET}-gcc"
- fi
-
- local CHOST=${CTARGET}
-
- MYPREFIX=
- MYSYSROOT=${ESYSROOT}/usr/${CTARGET}
-
- # Ensure we get compatible libdir
- unset DEFAULT_ABI MULTILIB_ABIS
- multilib_env
- ABI=${DEFAULT_ABI}
-
- strip-unsupported-flags
- fi
-
- if use headers-only; then
- # Nothing is compiled which would affect the headers, so we set
- # CC and PKG_CONFIG to ensure configure passes without defaulting
- # to the unprefixed host variants e.g. "pkg-config"
- local -x CC="$(tc-getBUILD_CC)"
- local -x PKG_CONFIG="false"
- fi
-
- # Doesn't work with LTO: bug #852917.
- # https://github.com/besser82/libxcrypt/issues/24
- filter-lto
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- if use test; then
- python_setup
- fi
-
- multibuild_foreach_variant multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- --disable-werror
- --prefix="${MYPREFIX}/usr"
- --libdir="${MYPREFIX}/usr/$(get_libdir)$(usev !system /xcrypt)"
- --includedir="${MYPREFIX}/usr/include$(usev !system /xcrypt)"
- --with-pkgconfigdir="${MYPREFIX}/usr/$(get_libdir)/pkgconfig"
- --with-sysroot="${MYSYSROOT}"
- )
-
- tc-export PKG_CONFIG
-
- 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
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-}
-
-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() {
- local DESTDIR=${D}
- if target_is_not_host; then
- DESTDIR=${ED}/usr/${CTARGET}
- fi
-
- multibuild_foreach_variant multilib-minimal_src_install
-
- find "${ED}" -name '*.la' -delete || die
-
- if target_is_not_host; then
- insinto /usr/${CTARGET}/usr/share
- doins -r "${ED}/usr/share/doc"
- rm -r "${ED}/usr/share/doc" || die
- rmdir "${ED}/usr/share" || die
- fi
-}
-
-multilib_src_install() {
- if use headers-only; then
- emake DESTDIR="${DESTDIR}" install-nodist_includeHEADERS
- else
- emake DESTDIR="${DESTDIR}" install
- fi
-}
-
-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/libxcrypt/libxcrypt-4.4.38.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.38.ebuild
deleted file mode 100644
index c98598388c89..000000000000
--- a/sys-libs/libxcrypt/libxcrypt-4.4.38.ebuild
+++ /dev/null
@@ -1,254 +0,0 @@
-# Copyright 2004-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-# NEED_BOOTSTRAP is for developers to quickly generate a tarball
-# for publishing to the tree.
-NEED_BOOTSTRAP="no"
-inherit crossdev 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 static-libs +system test headers-only"
-RESTRICT="!test? ( test )"
-
-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() {
- :
-}
-
-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() {
- MULTIBUILD_VARIANTS=(
- $(usev compat 'xcrypt_compat')
- xcrypt_nocompat
- )
-
- MYPREFIX=${EPREFIX}
- MYSYSROOT=${ESYSROOT}
-
- if target_is_not_host; then
- # Hack to work around missing TARGET_CC support.
- # See bug 949976.
- if tc-is-clang; then
- export CC="${CTARGET}-clang"
- else
- export CC="${CTARGET}-gcc"
- fi
-
- local CHOST=${CTARGET}
-
- MYPREFIX=
- MYSYSROOT=${ESYSROOT}/usr/${CTARGET}
-
- # Ensure we get compatible libdir
- unset DEFAULT_ABI MULTILIB_ABIS
- multilib_env
- ABI=${DEFAULT_ABI}
-
- strip-unsupported-flags
- fi
-
- if use headers-only; then
- # Nothing is compiled which would affect the headers, so we set
- # CC and PKG_CONFIG to ensure configure passes without defaulting
- # to the unprefixed host variants e.g. "pkg-config"
- local -x CC="$(tc-getBUILD_CC)"
- local -x PKG_CONFIG="false"
- fi
-
- # Doesn't work with LTO: bug #852917.
- # https://github.com/besser82/libxcrypt/issues/24
- filter-lto
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- if use test; then
- python_setup
- fi
-
- multibuild_foreach_variant multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myconf=(
- --disable-werror
- --prefix="${MYPREFIX}/usr"
- --libdir="${MYPREFIX}/usr/$(get_libdir)$(usev !system /xcrypt)"
- --includedir="${MYPREFIX}/usr/include$(usev !system /xcrypt)"
- --with-pkgconfigdir="${MYPREFIX}/usr/$(get_libdir)/pkgconfig"
- --with-sysroot="${MYSYSROOT}"
- )
-
- tc-export PKG_CONFIG
-
- 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
-
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
-}
-
-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() {
- local DESTDIR=${D}
- if target_is_not_host; then
- DESTDIR=${ED}/usr/${CTARGET}
- fi
-
- multibuild_foreach_variant multilib-minimal_src_install
-
- find "${ED}" -name '*.la' -delete || die
-
- if target_is_not_host; then
- insinto /usr/${CTARGET}/usr/share
- doins -r "${ED}/usr/share/doc"
- rm -r "${ED}/usr/share/doc" || die
- rmdir "${ED}/usr/share" || die
- fi
-}
-
-multilib_src_install() {
- if use headers-only; then
- emake DESTDIR="${DESTDIR}" install-nodist_includeHEADERS
- else
- emake DESTDIR="${DESTDIR}" install
- # Conflicts with sys-apps/man-pages
- rm "${DESTDIR}${MYPREFIX}"/usr/share/man/man3/crypt{,_r}.3 || die
- fi
-}
-
-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/libxcrypt/metadata.xml b/sys-libs/libxcrypt/metadata.xml
deleted file mode 100644
index ff23f0d0be02..000000000000
--- a/sys-libs/libxcrypt/metadata.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
- </maintainer>
- <longdescription>
- Crypt library for DES, MD5, and blowfish. Libxcrypt is a replacement for
- libcrypt, which comes with the GNU C Library. It supports DES crypt,
- MD5, and passwords with blowfish encryption.
- </longdescription>
- <use>
- <flag name="compat">Build with compatibility interfaces for other crypt implementations</flag>
- <flag name="system">Install as system libcrypt.so rather than to an alternate directory (will collide with <pkg>sys-libs/glibc</pkg>'s version)</flag>
- <flag name="headers-only">Build and install only the headers. This is mostly useful for toolchain bootstrapping, to avoid circular deps.</flag>
- </use>
- <upstream>
- <remote-id type="github">besser82/libxcrypt</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/lwp/Manifest b/sys-libs/lwp/Manifest
deleted file mode 100644
index 61b56cb6b273..000000000000
--- a/sys-libs/lwp/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST lwp-2.8.tar.xz 270008 BLAKE2B 67107f880d5052d42166fe429cda14b4d733bcc3e5905cf48b23898e0da590854ca935ea0350c77be75c3f27d2624134c17159e5f2981ac8806bd78906d7de41 SHA512 c56f3b350e888b5bcb2bffb41086f8926e975aafae236be7f1d2153bb178a37564b77d7598db1aa915714ce8e2ed1904663ce2113f5d0853173cf5e189958bf0
diff --git a/sys-libs/lwp/files/lwp-2.8-bool.patch b/sys-libs/lwp/files/lwp-2.8-bool.patch
deleted file mode 100644
index 6b5e6d4ed26b..000000000000
--- a/sys-libs/lwp/files/lwp-2.8-bool.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Used for declaration of private function only, so change
-causes no visible effects
-https://bugs.gentoo.org/943734
---- a/src/timer.c
-+++ b/src/timer.c
-@@ -48,7 +48,7 @@
- #include <lwp/timer.h>
- #include "lwp.private.h"
-
--typedef unsigned char bool;
-+#include <stdbool.h>
-
- #define expiration TotalTime
-
diff --git a/sys-libs/lwp/files/lwp-2.8-ia64.patch b/sys-libs/lwp/files/lwp-2.8-ia64.patch
deleted file mode 100644
index bb5abe65cc34..000000000000
--- a/sys-libs/lwp/files/lwp-2.8-ia64.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/src/lwp_ucontext.h b/src/lwp_ucontext.h
-index dfb5465..adc58e5 100644
---- a/src/lwp_ucontext.h
-+++ b/src/lwp_ucontext.h
-@@ -25,6 +25,13 @@ Coda are listed in the file CREDITS.
- #include <signal.h>
- #include "lwp_stacktrace.h"
-
-+// ia64 defines uc_link define as:
-+// /usr/include/sys/ucontext.h:#define uc_link _u._uc._link
-+// undo namespace pollution
-+#undef uc_link
-+#undef uc_stack
-+#undef uc_mcontext
-+
- #ifdef SAVE_SIGMASK
- #define JMP_BUF sigjmp_buf
- #define SETJMP(x,y) sigsetjmp(x, y)
diff --git a/sys-libs/lwp/lwp-2.8-r1.ebuild b/sys-libs/lwp/lwp-2.8-r1.ebuild
deleted file mode 100644
index 49c196153a13..000000000000
--- a/sys-libs/lwp/lwp-2.8-r1.ebuild
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DESCRIPTION="Light-weight process library (used by Coda)"
-HOMEPAGE="http://www.coda.cs.cmu.edu/"
-SRC_URI="http://www.coda.cs.cmu.edu/pub/lwp/src/${P}.tar.xz"
-
-LICENSE="LGPL-2.1"
-SLOT="1"
-KEYWORDS="~alpha amd64 ~hppa ~mips ppc ppc64 ~sparc x86"
-
-PATCHES=(
- "${FILESDIR}"/"${P}"-ia64.patch
- "${FILESDIR}"/"${P}"-bool.patch
-)
-
-src_install() {
- default
- find "${ED}" -name '*.la' -delete || die
-}
diff --git a/sys-libs/lwp/metadata.xml b/sys-libs/lwp/metadata.xml
deleted file mode 100644
index 85e4ed814fa2..000000000000
--- a/sys-libs/lwp/metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<!-- maintainer-needed -->
-</pkgmetadata>
diff --git a/sys-libs/metadata.xml b/sys-libs/metadata.xml
deleted file mode 100644
index a80e992f1722..000000000000
--- a/sys-libs/metadata.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE catmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<catmetadata>
- <longdescription lang="en">
- The sys-libs category contains various system-level libraries.
- </longdescription>
- <longdescription lang="es">
- La categoría sys-libs contiene varias librerías del sistema.
- </longdescription>
- <longdescription lang="de">
- Die Kategorie sys-libs enthält verschiedene Systembibliotheken.
- </longdescription>
- <longdescription lang="ja">
- sys-libsカテゴリには様々なシステムレベルライブラリが含まれます。
- </longdescription>
- <longdescription lang="nl">
- De sys-libs categorie bevat verschillende systeembibliotheken.
- </longdescription>
- <longdescription lang="vi">
- Nhóm sys-libs chứa các thư viện cấp hệ thống.
- </longdescription>
- <longdescription lang="it">
- La categoria sys-libs contiene varie librerie di sistema.
- </longdescription>
- <longdescription lang="pt">
- A categoria sys-libs contém várias bibliotecas de sistema.
- </longdescription>
- <longdescription lang="pl">
- Kategoria sys-libs zawiera biblioteki systemowe.
- </longdescription>
-</catmetadata>
diff --git a/sys-libs/minizip-ng/Manifest b/sys-libs/minizip-ng/Manifest
deleted file mode 100644
index 4e7f5d29f6ba..000000000000
--- a/sys-libs/minizip-ng/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST minizip-ng-4.0.10.tar.gz 773269 BLAKE2B fee6121e1db66edc951bdd15215190047d6294b894a8edcfe400938b7cf175beb723e0546e165a0fcef04123cb2f807c9a8270fdf9ec05a273fda11a7795372d SHA512 a74386e2cf89f63d7fc9bf53527c8203ac78c46f2511e4883d17d949ec4e7d1b6c3707bcb13c3fc7cc4db8255b5f50ddb61bedba10e683acb18d112470676f62
diff --git a/sys-libs/minizip-ng/files/minizip-ng-4.0.4-libbsd-overlay.patch b/sys-libs/minizip-ng/files/minizip-ng-4.0.4-libbsd-overlay.patch
deleted file mode 100644
index 2a62f96f1413..000000000000
--- a/sys-libs/minizip-ng/files/minizip-ng-4.0.4-libbsd-overlay.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-https://bugs.gentoo.org/889266
-https://gitlab.freedesktop.org/libbsd/libbsd/-/issues/15
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -538,10 +538,10 @@ else()
-
- if(HAVE_LIBBSD_ARC4RANDOM_BUF)
- list(APPEND MINIZIP_DEF -DHAVE_LIBBSD -DHAVE_ARC4RANDOM_BUF)
-- list(APPEND MINIZIP_INC ${LIBBSD_INCLUDE_DIRS})
- list(APPEND MINIZIP_LIB ${LIBBSD_LIBRARIES})
- list(APPEND MINIZIP_LBD ${LIBBSD_LIBRARY_DIRS})
-
-+ add_compile_options(${LIBBSD_CFLAGS})
- link_directories(${LIBBSD_LIBRARY_DIRS})
- endif()
- else()
diff --git a/sys-libs/minizip-ng/metadata.xml b/sys-libs/minizip-ng/metadata.xml
deleted file mode 100644
index 249187482a6d..000000000000
--- a/sys-libs/minizip-ng/metadata.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <use>
- <flag name="compat">
- Enable compatibility with <pkg>sys-libs/zlib</pkg>'s USE=minizip, allowing minizip-ng
- to replace it. Only enable if you want to replace reference minizip with minizip-ng.
- </flag>
- <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> for further encryption capabilities</flag>
- </use>
- <upstream>
- <remote-id type="github">zlib-ng/minizip-ng</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/minizip-ng/minizip-ng-4.0.10-r1.ebuild b/sys-libs/minizip-ng/minizip-ng-4.0.10-r1.ebuild
deleted file mode 100644
index 91ee45b47977..000000000000
--- a/sys-libs/minizip-ng/minizip-ng-4.0.10-r1.ebuild
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright 1999-2025 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,
-# as they copied this practice from sys-libs/zlib upstream.
-
-inherit cmake-multilib multibuild
-
-DESCRIPTION="Fork of the popular zip manipulation library found in the zlib distribution"
-HOMEPAGE="https://github.com/zlib-ng/minizip-ng"
-SRC_URI="https://github.com/zlib-ng/minizip-ng/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0/4"
-KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc64 ~riscv x86"
-IUSE="compat lzma openssl test zstd"
-RESTRICT="!test? ( test )"
-
-# Automagically prefers sys-libs/zlib-ng if installed, so let's
-# just depend on it as presumably it's better tested anyway.
-RDEPEND="
- app-arch/bzip2[${MULTILIB_USEDEP}]
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- sys-libs/zlib-ng[${MULTILIB_USEDEP}]
- virtual/libiconv
- compat? ( !sys-libs/zlib[minizip] )
- lzma? ( app-arch/xz-utils )
- openssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
- zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-DEPEND="
- ${RDEPEND}
- test? ( dev-cpp/gtest )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-4.0.4-libbsd-overlay.patch
-)
-
-run_both() {
- local MULTIBUILD_VARIANTS=( base )
- use compat && MULTIBUILD_VARIANTS+=( compat )
-
- multibuild_foreach_variant "${@}"
-}
-
-my_src_configure() {
- local compat=OFF
- [[ ${MULTIBUILD_VARIANT} == compat ]] && compat=ON
- local mycmakeargs=(
- "${mycmakeargs[@]}"
- -DMZ_COMPAT="${compat}"
- )
-
- cmake_src_configure
-}
-
-multilib_src_configure() {
- local mycmakeargs=(
- # Controls installing "minizip" and "minigzip" tools. Install
- # them unconditionally to avoid divergence with USE=test.
- -DMZ_BUILD_TESTS=ON
- -DMZ_BUILD_UNIT_TESTS=$(usex test)
-
- -DMZ_FETCH_LIBS=OFF
- -DMZ_FORCE_FETCH_LIBS=OFF
-
- # Compression library options
- -DMZ_ZLIB=ON
- -DMZ_BZIP2=ON
- -DMZ_LZMA=$(usex lzma)
- -DMZ_ZSTD=$(usex zstd)
- -DMZ_LIBCOMP=OFF
-
- # Encryption support options
- -DMZ_PKCRYPT=ON
- -DMZ_WZAES=ON
- -DMZ_OPENSSL=$(usex openssl)
- -DMZ_LIBBSD=ON
-
- # Character conversion options
- -DMZ_ICONV=ON
- )
-
- run_both my_src_configure
-}
-
-multilib_src_compile() { run_both cmake_src_compile; }
-
-multilib_src_test() {
- # TODO: A bunch of tests end up looping and writing over each other's files
- # It gets better with a patch applied (see https://github.com/zlib-ng/minizip-ng/issues/623#issuecomment-1264518994)
- # but still hangs.
- local CTEST_JOBS=1
- run_both cmake_src_test
-}
-
-multilib_src_install() { run_both cmake_src_install; }
-
-pkg_postinst() {
- if use compat ; then
- ewarn "minizip-ng is experimental and replacing the system zlib[minizip] is dangerous"
- ewarn "Please be careful!"
- fi
-}
diff --git a/sys-libs/minizip-ng/minizip-ng-4.0.10.ebuild b/sys-libs/minizip-ng/minizip-ng-4.0.10.ebuild
deleted file mode 100644
index 535e953e5c1b..000000000000
--- a/sys-libs/minizip-ng/minizip-ng-4.0.10.ebuild
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 1999-2025 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,
-# as they copied this practice from sys-libs/zlib upstream.
-
-inherit cmake-multilib
-
-DESCRIPTION="Fork of the popular zip manipulation library found in the zlib distribution"
-HOMEPAGE="https://github.com/zlib-ng/minizip-ng"
-SRC_URI="https://github.com/zlib-ng/minizip-ng/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0/4"
-KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc64 ~riscv x86"
-IUSE="compat lzma openssl test zstd"
-RESTRICT="!test? ( test )"
-
-# Automagically prefers sys-libs/zlib-ng if installed, so let's
-# just depend on it as presumably it's better tested anyway.
-RDEPEND="
- app-arch/bzip2[${MULTILIB_USEDEP}]
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- sys-libs/zlib-ng[${MULTILIB_USEDEP}]
- virtual/libiconv
- compat? ( !sys-libs/zlib[minizip] )
- lzma? ( app-arch/xz-utils )
- openssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
- zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-DEPEND="
- ${RDEPEND}
- test? ( dev-cpp/gtest )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-4.0.4-libbsd-overlay.patch
-)
-
-multilib_src_configure() {
- local mycmakeargs=(
- -DMZ_COMPAT=$(usex compat)
-
- -DMZ_BUILD_TESTS=$(usex test)
- -DMZ_BUILD_UNIT_TESTS=$(usex test)
-
- -DMZ_FETCH_LIBS=OFF
- -DMZ_FORCE_FETCH_LIBS=OFF
-
- # Compression library options
- -DMZ_ZLIB=ON
- -DMZ_BZIP2=ON
- -DMZ_LZMA=$(usex lzma)
- -DMZ_ZSTD=$(usex zstd)
- -DMZ_LIBCOMP=OFF
-
- # Encryption support options
- -DMZ_PKCRYPT=ON
- -DMZ_WZAES=ON
- -DMZ_OPENSSL=$(usex openssl)
- -DMZ_LIBBSD=ON
-
- # Character conversion options
- -DMZ_ICONV=ON
- )
-
- cmake_src_configure
-}
-
-multilib_src_test() {
- local myctestargs=(
- # TODO: investigate
- -E "(raw-unzip-pkcrypt|raw-append-unzip-pkcrypt|raw-erase-unzip-pkcrypt|deflate-unzip-pkcrypt|deflate-append-unzip-pkcrypt|deflate-erase-unzip-pkcrypt|bzip2-unzip-pkcrypt|bzip2-append-unzip-pkcrypt|bzip2-erase-unzip-pkcrypt|lzma-unzip-pkcrypt|lzma-append-unzip-pkcrypt|lzma-erase-unzip-pkcrypt|xz-unzip-pkcrypt|xz-append-unzip-pkcrypt|xz-erase-unzip-pkcrypt|zstd-unzip-pkcrypt|zstd-append-unzip-pkcrypt|zstd-erase-unzip-pkcrypt)"
- )
-
- # TODO: A bunch of tests end up looping and writing over each other's files
- # It gets better with a patch applied (see https://github.com/zlib-ng/minizip-ng/issues/623#issuecomment-1264518994)
- # but still hangs.
- cmake_src_test -j1
-}
-
-pkg_postinst() {
- if use compat ; then
- ewarn "minizip-ng is experimental and replacing the system zlib[minizip] is dangerous"
- ewarn "Please be careful!"
- fi
-}
diff --git a/sys-libs/mtdev/Manifest b/sys-libs/mtdev/Manifest
deleted file mode 100644
index d13df95b89b6..000000000000
--- a/sys-libs/mtdev/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST mtdev-1.1.7.tar.bz2 301994 BLAKE2B 1da2c7231301ebb407fa8e58331fd080bfb026d5e32eb19af125abf36391eff26379040634d4ede995aedb78c7dba3396e9753628f5dfe0f939a8b77fc459423 SHA512 e6174a38cf67a7f12a3b91e4e27bf74a18d6b40a956950ebb748b0ff87092333daa07e647b26038a5a533f8c48e845d649848e6ba99ea009ab87fd96ed188152
diff --git a/sys-libs/mtdev/metadata.xml b/sys-libs/mtdev/metadata.xml
deleted file mode 100644
index 6bbd73893d34..000000000000
--- a/sys-libs/mtdev/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>x11@gentoo.org</email>
- <name>X11</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/mtdev/mtdev-1.1.7.ebuild b/sys-libs/mtdev/mtdev-1.1.7.ebuild
deleted file mode 100644
index 8b8da3f95156..000000000000
--- a/sys-libs/mtdev/mtdev-1.1.7.ebuild
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DESCRIPTION="Multitouch Protocol Translation Library"
-HOMEPAGE="https://bitmath.org/code/mtdev/"
-SRC_URI="https://bitmath.org/code/mtdev/${P}.tar.bz2"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-
-DEPEND=">=sys-kernel/linux-headers-2.6.31"
-
-src_configure() {
- econf --disable-static
-}
-
-src_install() {
- default
- find "${ED}" -name '*.la' -delete
-}
diff --git a/sys-libs/musl-nscd/Manifest b/sys-libs/musl-nscd/Manifest
deleted file mode 100644
index 88436bb5a431..000000000000
--- a/sys-libs/musl-nscd/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST musl-nscd-1.1.1.tar.gz 51598 BLAKE2B 0c14cfed06f766e174154cdedf046eee8206822d21ce6ac0f1d2c253224a9c8be2fabe6a7d9c0e7c63d1811e3ccf06ca7b2c9dcb728cde445108039723e486c2 SHA512 f067b1491c6c46c3070aa2f61328b874eb6ad390c2efc928e2fee591ef5997b40400e29495546a861e803460efa46024c7a01c53ddae5b763ef63c2f274fceea
diff --git a/sys-libs/musl-nscd/files/nscd.initd b/sys-libs/musl-nscd/files/nscd.initd
deleted file mode 100644
index 1bf83e7808af..000000000000
--- a/sys-libs/musl-nscd/files/nscd.initd
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
- use dns ldap net slapd
-}
-
-checkconfig() {
- if [ ! -d /var/run/nscd ] ; then
- mkdir -p /var/run/nscd
- chmod 755 /var/run/nscd
- fi
- if [ -z "${NSCD_PERMS_OK}" ] && [ "$(stat -c %a /var/run/nscd)" != "755" ] ; then
- echo ""
- ewarn "nscd run dir is not world readable, you should reset the perms:"
- ewarn "chmod 755 /var/run/nscd"
- ewarn "chmod a+rw /var/run/nscd/socket"
- echo ""
- ewarn "To disable this warning, set 'NSCD_PERMS_OK' in /etc/conf.d/nscd"
- echo ""
- fi
-}
-
-start() {
- checkconfig
-
- ebegin "Starting Name Service Cache Daemon"
- local secure=`while read curline ; do
- table=${curline%:*}
- entries=${curline##$table:}
- table=${table%%[^a-z]*}
- case $table in
- passwd*|group*|hosts)
- for entry in $entries ; do
- case $entry in
- nisplus*)
- /usr/sbin/nscd_nischeck $table || \
- /echo "-S $table,yes"
- ;;
- esac
- done
- ;;
- esac
- done < /etc/nsswitch.conf`
- mkdir -p "$(dirname ${PIDFILE:-/var/run/nscd/nscd.pid})"
- start-stop-daemon --start --quiet \
- --exec /usr/sbin/nscd --pidfile "${PIDFILE:-/var/run/nscd/nscd.pid}" \
- -- $secure
- eend $?
-}
-
-stop() {
- ebegin "Shutting down Name Service Cache Daemon"
- start-stop-daemon --stop --quiet --exec /usr/sbin/nscd --pidfile "${PIDFILE:-/var/run/nscd/nscd.pid}"
- eend $?
-}
-
-# vim:ts=4
diff --git a/sys-libs/musl-nscd/files/nscd.service b/sys-libs/musl-nscd/files/nscd.service
deleted file mode 100644
index 25a3b1d9be0a..000000000000
--- a/sys-libs/musl-nscd/files/nscd.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Name Service Cache Daemon
-After=network.target
-
-[Service]
-ExecStart=/usr/sbin/nscd -F
-ExecStop=/usr/sbin/nscd --shutdown
-ExecReload=/usr/sbin/nscd -i passwd
-ExecReload=/usr/sbin/nscd -i group
-ExecReload=/usr/sbin/nscd -i hosts
-ExecReload=/usr/sbin/nscd -i services
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
diff --git a/sys-libs/musl-nscd/files/nscd.tmpfilesd b/sys-libs/musl-nscd/files/nscd.tmpfilesd
deleted file mode 100644
index 52edbba673cf..000000000000
--- a/sys-libs/musl-nscd/files/nscd.tmpfilesd
+++ /dev/null
@@ -1,4 +0,0 @@
-# Configuration to create /run/nscd directory
-# Used as part of systemd's tmpfiles
-
-d /run/nscd 0755 root root
diff --git a/sys-libs/musl-nscd/metadata.xml b/sys-libs/musl-nscd/metadata.xml
deleted file mode 100644
index 05898e0c25df..000000000000
--- a/sys-libs/musl-nscd/metadata.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>blueness@gentoo.org</email>
- <name>Anthony G. Basile</name>
- </maintainer>
- <use>
- <flag name="minimal">Only installs the header files</flag>
- </use>
- <upstream>
- <remote-id type="github">pikhq/musl-nscd</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/musl-nscd/musl-nscd-1.1.1-r1.ebuild b/sys-libs/musl-nscd/musl-nscd-1.1.1-r1.ebuild
deleted file mode 100644
index 775e2a99b755..000000000000
--- a/sys-libs/musl-nscd/musl-nscd-1.1.1-r1.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit systemd tmpfiles
-
-DESCRIPTION="musl-nscd is an implementation of the NSCD protocol for the musl libc"
-HOMEPAGE="https://github.com/pikhq/musl-nscd"
-
-if [[ ${PV} == "9999" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/pikhq/musl-nscd"
- EGIT_BRANCH=master
-else
- SRC_URI="https://github.com/pikhq/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-IUSE="minimal"
-
-DEPEND="
- !sys-libs/glibc"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- eapply_user
-
- sed -i '/LDFLAGS_AUTO=-s/d' configure || die 'Cannot patch configure file'
-}
-
-src_install() {
- if use minimal; then
- emake DESTDIR="${D}" install-headers
- else
- emake DESTDIR="${D}" install
-
- newinitd "${FILESDIR}"/nscd.initd nscd
- systemd_dounit "${FILESDIR}"/nscd.service
- newtmpfiles "${FILESDIR}"/nscd.tmpfilesd nscd.conf
-
- dodoc README
- fi
-}
-
-pkg_postinst() {
- if ! use minimal; then
- tmpfiles_process nscd.conf
- fi
-}
diff --git a/sys-libs/musl-nscd/musl-nscd-9999.ebuild b/sys-libs/musl-nscd/musl-nscd-9999.ebuild
deleted file mode 100644
index 775e2a99b755..000000000000
--- a/sys-libs/musl-nscd/musl-nscd-9999.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit systemd tmpfiles
-
-DESCRIPTION="musl-nscd is an implementation of the NSCD protocol for the musl libc"
-HOMEPAGE="https://github.com/pikhq/musl-nscd"
-
-if [[ ${PV} == "9999" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/pikhq/musl-nscd"
- EGIT_BRANCH=master
-else
- SRC_URI="https://github.com/pikhq/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-IUSE="minimal"
-
-DEPEND="
- !sys-libs/glibc"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- eapply_user
-
- sed -i '/LDFLAGS_AUTO=-s/d' configure || die 'Cannot patch configure file'
-}
-
-src_install() {
- if use minimal; then
- emake DESTDIR="${D}" install-headers
- else
- emake DESTDIR="${D}" install
-
- newinitd "${FILESDIR}"/nscd.initd nscd
- systemd_dounit "${FILESDIR}"/nscd.service
- newtmpfiles "${FILESDIR}"/nscd.tmpfilesd nscd.conf
-
- dodoc README
- fi
-}
-
-pkg_postinst() {
- if ! use minimal; then
- tmpfiles_process nscd.conf
- fi
-}
diff --git a/sys-libs/musl/Manifest b/sys-libs/musl/Manifest
deleted file mode 100644
index de76cae63051..000000000000
--- a/sys-libs/musl/Manifest
+++ /dev/null
@@ -1,8 +0,0 @@
-DIST getconf.c 11614 BLAKE2B ba49a573fc16d51780a0b0b81fbf7b64a1142f1dbad203c9609a59b6b07e7404f676c415383ae88c0aede95694821f6ee381bffd93cc3330501e17dc07d122bd SHA512 0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d
-DIST iconv.c 2577 BLAKE2B 070ca87b30c90ab98c27d5faf7a2fcb64ff7c67ca212ee6072165b2146979c551f714954dbd465462a171837c59b6ea027e0206458a2df0f977e45f01be3ce48 SHA512 9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf
-DIST musl-1.2.5.tar.gz 1080786 BLAKE2B 6065dc1e01874d1b96abe714147dcc0b41ca702ca9e9c44e85864185dab0b6d085a692745db0822c94a79325e1a91dad60c52f467717d9323b2b3c6ad0a17545 SHA512 7bb7f7833923cd69c7a1a9b8a5f1784bfd5289663eb6061dcd43d583e45987df8a68a1be05d75cc1c88a3f5b610653d1a70f4a9cff4d8f7fd41ae73ee058c17c
-DIST musl-1.2.5.tar.gz.asc 490 BLAKE2B f0d91b20aa7729449bd02a60adf17e8287904ed5971851a34b15f500011137ddc3f338d24712ff0481f1d6f9a749d87014a82b26a3bd9de660ddbf29678a8777 SHA512 c8aebf05b14abbd33ff568ca17ddd8b29e6f53cbb1cb85e00b64f15516ffc46a7a064c996a7bb1c9681a361a4921204ac58e4a1cfd7bd3ad60d7f2b0151d9229
-DIST musl-1.2.6-patches.tar.xz 7128 BLAKE2B 5e71184b5ab6b119105c897d811f52ea4169408fe6d91f77675b5378daef6aacb10650ca2dbdaeddc03c8aff3f774d02721b35d8fab9b7036e8fe68f969c132a SHA512 a4a37acc82874ce4f0e2aa512887c4d7cae3b9a895d06dce9ebb746ffe062f31d1ace0b815123563fdcdfcc2d6cedf3283911b8ec0eac62f8cd27877fea5ef7f
-DIST musl-1.2.6.tar.gz 1082499 BLAKE2B b13a95bacd1557ac3044bff63cb09bcc7f3b606a81eada2506461a34691502d25b54f0157e9c320b936d896496bd0c3bc4efbd91e8dab803e000e8c90d328800 SHA512 1adad96eddb3a2eb0cacb3e363b0046568925fcdd75cf8b0503f2139df1f693d64730779ca0ce8131b7624ab2d37f4247bb1d3393c523de6e30d2b1d7732555c
-DIST musl-1.2.6.tar.gz.asc 490 BLAKE2B c4270fd7e3f1e6a5a0ea39d386549c257329ede5f32e7823588b7b8c0703faa02d278c8a926d27821ae15a8c497b5eca2eb62633428a1b65ea4ed07c4154ebd9 SHA512 59f15ffb206bd25b99cccc49a9dfe8fcd0f8ad78b9f769cc650c113f6fff35f9c5b6a431e5a9952f2fab5da20ce1586f1429d40947cf68164712ebbfc2b637fe
-DIST musl-getent-93a08815f8598db442d8b766b463d0150ed8e2ab.c 11656 BLAKE2B 1b7bf7102a1eb91a8cb881ed8ca65eb8eed911dd50238e97dc2952d89d4c6ebed6bfd046a2b38776c550b2872ab54ced8cb452fcc2ad56e5616f722debda761f SHA512 7f5b9d934d82deb5f8b23e16169a5d9b99ccab3a4708df06a95d685e1b24a3a3e69b3dcf4942f2f66c12a3d4bf0c5827e2ee2e8c4d7b1997359fccc2ac212dee
diff --git a/sys-libs/musl/files/ldconfig.in-r3 b/sys-libs/musl/files/ldconfig.in-r3
deleted file mode 100644
index 60f6cc9e1130..000000000000
--- a/sys-libs/musl/files/ldconfig.in-r3
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/bin/bash -e
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-ROOT="/"
-EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
-LDSO_CONF_FILE="/etc/ld.so.conf"
-
-VERBOSE=0
-
-UPDATE_LINKS=1
-
-get_options() {
- LDSO_CONF=""
- while getopts "vnNXf:C:r:p" opt "$@"; do
- case $opt in
- v)
- echo "ldconfig for musl in Gentoo"
- VERBOSE=1
- ;;
- r)
- ROOT=${OPTARG}
- ;;
- f)
- LDSO_CONF=${OPTARG}
- ;;
- X)
- UPDATE_LINKS=0
- ;;
- \?)
- echo "Invalid option: -${opt}" >&2
- exit 1
- ;;
- n|N|C|p)
- echo "Unimplemented option: -${opt}" >&2
- exit 1
- ;;
- esac
- done
- if [[ -z ${LDSO_CONF} ]]; then
- LDSO_CONF=${ROOT}${EPREFIX}${LDSO_CONF_FILE}
- fi
-
- if [[ ${UPDATE_LINKS} == 1 ]]; then
- echo "Updating links is not implemented."
- fi
-}
-
-
-repeated() {
- local l=${1}
- local drs="${@:2}"
- for m in ${drs}; do
- [[ ${m} == ${l} ]] && return 0
- done
- return 1
-}
-
-expand() {
- # We are assuming the ld.so.conf's 'include' is not recursive
- local f line l
- local glob="${LDSO_CONF_DIR}/${1}"
- local drs="${@:2} "
-
- for f in ${glob}; do
- [[ ! -f ${f} ]] && continue
- while read line; do
- line=${line%%#*}
- line=${line//:/ }
- line=${line//,/ }
- for l in ${line}; do
- # We must add this whether or not the directory exists
- repeated ${l} ${drs} && continue
- drs+=" ${l} "
- done
- done < ${f}
- done
-
- echo ${drs}
-}
-
-read_ldso_conf() {
- local drs=" "
-
- while read line; do
- # Sanitize the line - see ldconfig(8) for delimiters
- # Note: bash read turns tabs into spaces and read already
- # delimits on newlines with the default $IFS
- line=${line%%#*} # Remove comments
- line=${line//:/ } # Change colon delimiter to space
- line=${line//,/ } # Change comma delimiter to space
-
- next=0
- for l in ${line}; do
- if [[ ${next} == 1 ]]; then
- next=0
- drs=$(expand ${l} ${drs})
- elif [[ ${l} == "include" ]]; then
- next=1
- else
- # glibc's ldconfig silently skips non directories
- if [[ -d ${l} ]]; then
- repeated ${l} ${drs} && continue
- drs+=" ${l} "
- fi
- fi
- done
- done < ${1}
-
- echo ${drs}
-}
-
-sanitize() {
- local drs=$@
-
- repeated "${EPREFIX}/lib" ${drs} || drs="${EPREFIX}/lib ${drs}"
- repeated "${EPREFIX}/usr/lib" ${drs} || drs="${EPREFIX}/usr/lib ${drs}"
-
- echo ${drs}
-}
-
-changed() {
- [[ -f ${ETC_LDSO_PATH} ]] || return 0
- local current=$(<${ETC_LDSO_PATH})
- current=${current//$'\n'/ }
- [[ ${current} != ${drs} ]] || return 1
-}
-
-get_options "$@"
-
-if [[ ! -e ${LDSO_CONF} ]]; then
- echo "${LDSO_CONF} not found" >&2
- exit 1
-fi
-
-LDSO_CONF_DIR=$(dirname ${LDSO_CONF})
-
-drs=$(read_ldso_conf "${LDSO_CONF}")
-drs=$(sanitize ${drs})
-
-ARCH=@@ARCH@@
-LDSO_PATH="${ROOT}${EPREFIX}/lib/ld-musl-${ARCH}.so.1"
-if [[ ! -e ${LDSO_PATH} ]]; then
- echo "${LDSO_PATH} not found" >&2
- exit 1
-fi
-
-LDSO_ARCH=$(basename ${LDSO_PATH})
-LDSO_NAME=${LDSO_ARCH%.so.1}
-ETC_LDSO_PATH="${ROOT}${EPREFIX}/etc/${LDSO_NAME}.path"
-
-changed || exit 0
-X=$(mktemp -p /tmp ${LDSO_NAME}.XXXXXX)
-for d in ${drs}; do
- echo ${d} >> ${X}
-done
-chmod 644 ${X}
-# busybox doesn't support mz -Z
-cp ${X} ${ETC_LDSO_PATH}
-rm ${X}
diff --git a/sys-libs/musl/files/musl-1.2.4-arm64-crti-alignment.patch b/sys-libs/musl/files/musl-1.2.4-arm64-crti-alignment.patch
deleted file mode 100644
index 8b548bdb255f..000000000000
--- a/sys-libs/musl/files/musl-1.2.4-arm64-crti-alignment.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-https://git.musl-libc.org/cgit/musl/commit/?id=cbf59dd662cea8786c2f3a5ea21f8da64f002b30
-https://github.com/rui314/mold/issues/1255
-https://bugs.gentoo.org/931782
-
-From cbf59dd662cea8786c2f3a5ea21f8da64f002b30 Mon Sep 17 00:00:00 2001
-From: mojyack <mojyack@gmail.com>
-Date: Sun, 12 May 2024 12:13:06 -0400
-Subject: aarch64 crti.o: fix alignment of _init/_fini
-
-without explicit alignment directives, whether they end up at the
-necessary alignment depends on linker/linking conditions. initially
-reported as mold issue 1255.
---- a/crt/aarch64/crti.s
-+++ b/crt/aarch64/crti.s
-@@ -1,6 +1,7 @@
- .section .init
- .global _init
- .type _init,%function
-+.align 2
- _init:
- stp x29,x30,[sp,-16]!
- mov x29,sp
-@@ -8,6 +9,7 @@ _init:
- .section .fini
- .global _fini
- .type _fini,%function
-+.align 2
- _fini:
- stp x29,x30,[sp,-16]!
- mov x29,sp
---
-cgit v1.2.1
diff --git a/sys-libs/musl/files/musl-arm-crti-alignment.patch b/sys-libs/musl/files/musl-arm-crti-alignment.patch
deleted file mode 100644
index ce7279c82f69..000000000000
--- a/sys-libs/musl/files/musl-arm-crti-alignment.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://bugs.gentoo.org/931782
-https://git.musl-libc.org/cgit/musl/commit/?id=9929a571b5b662c2ce106f1c08a9faf02af58d8a
-
-From 9929a571b5b662c2ce106f1c08a9faf02af58d8a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= <alex@alexrp.com>
-Date: Thu, 10 Oct 2024 22:50:46 +0200
-Subject: arm: fix _init/_fini alignment in crti.o
-
-This is just cbf59dd6 applied to arm.
----
- crt/arm/crti.s | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/crt/arm/crti.s b/crt/arm/crti.s
-index 18dc1e41..cccda3ea 100644
---- a/crt/arm/crti.s
-+++ b/crt/arm/crti.s
-@@ -3,11 +3,13 @@
- .section .init
- .global _init
- .type _init,%function
-+.align 2
- _init:
- push {r0,lr}
-
- .section .fini
- .global _fini
- .type _fini,%function
-+.align 2
- _fini:
- push {r0,lr}
---
-cgit v1.2.1
diff --git a/sys-libs/musl/files/musl-dns-union.patch b/sys-libs/musl/files/musl-dns-union.patch
deleted file mode 100644
index 7b6affe43b3b..000000000000
--- a/sys-libs/musl/files/musl-dns-union.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://git.musl-libc.org/cgit/musl/commit/?id=6915b34860459a963fb1ba468a4d5389dd65c67b
-
-From 6915b34860459a963fb1ba468a4d5389dd65c67b Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Mon, 5 May 2025 09:23:32 -0400
-Subject: dns resolver: reorder sockaddr union to make initialization safe
-
-some recent compilers have adopted a dubious interpretation of the C
-specification for union initializers, that when the initialized member
-is smaller than the size of the union, the remaining padding does not
-have to be zero-initialized. in the interests of not depending on any
-particular interpretation, place the larger member first so it's
-initialized and ensures the whole object is zero-filled.
----
- src/network/res_msend.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/network/res_msend.c b/src/network/res_msend.c
-index 86c2fcf4..fcb52513 100644
---- a/src/network/res_msend.c
-+++ b/src/network/res_msend.c
-@@ -83,8 +83,8 @@ int __res_msend_rc(int nqueries, const unsigned char *const *queries,
- int fd;
- int timeout, attempts, retry_interval, servfail_retry;
- union {
-- struct sockaddr_in sin;
- struct sockaddr_in6 sin6;
-+ struct sockaddr_in sin;
- } sa = {0}, ns[MAXNS] = {{0}};
- socklen_t sl = sizeof sa.sin;
- int nns = 0;
---
-cgit v1.2.1
diff --git a/sys-libs/musl/files/musl-getauxval.patch b/sys-libs/musl/files/musl-getauxval.patch
deleted file mode 100644
index 4bf46fe081c5..000000000000
--- a/sys-libs/musl/files/musl-getauxval.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://bugs.gentoo.org/949724
-https://git.musl-libc.org/cgit/musl/patch/?id=ab4635fba6769e19fb411a1ab3c8aa7407e11188
-
-From ab4635fba6769e19fb411a1ab3c8aa7407e11188 Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Thu, 12 Oct 2023 20:31:48 +0200
-Subject: make __getauxval a public ABI symbol
-
-This is needed so that libgcc can access AT_HWCAP without violating
-link namespace rules.
-
-Internally musl already used __getauxval symbol for the same reason,
-we just remove the hidden marking.
----
- src/include/sys/auxv.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/include/sys/auxv.h b/src/include/sys/auxv.h
-index 9358a4a5..63c5bfe9 100644
---- a/src/include/sys/auxv.h
-+++ b/src/include/sys/auxv.h
-@@ -5,6 +5,6 @@
-
- #include <features.h>
-
--hidden unsigned long __getauxval(unsigned long);
-+unsigned long __getauxval(unsigned long);
-
- #endif
---
-cgit v1.2.1
diff --git a/sys-libs/musl/files/musl-getifaddrs-qemu-workaround.patch b/sys-libs/musl/files/musl-getifaddrs-qemu-workaround.patch
deleted file mode 100644
index 110b40995891..000000000000
--- a/sys-libs/musl/files/musl-getifaddrs-qemu-workaround.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-https://www.openwall.com/lists/musl/2018/06/02/4
-https://gitlab.com/qemu-project/qemu/-/issues/2485
-https://bugs.gentoo.org/914256
---- a/src/network/netlink.h
-+++ b/src/network/netlink.h
-@@ -80,13 +80,17 @@ struct ifaddrmsg {
- #define NLMSG_DATALEN(nlh) ((nlh)->nlmsg_len-sizeof(struct nlmsghdr))
- #define NLMSG_DATAEND(nlh) ((char*)(nlh)+(nlh)->nlmsg_len)
- #define NLMSG_NEXT(nlh) (struct nlmsghdr*)((char*)(nlh)+NETLINK_ALIGN((nlh)->nlmsg_len))
--#define NLMSG_OK(nlh,end) ((char*)(end)-(char*)(nlh) >= sizeof(struct nlmsghdr))
-+#define NLMSG_OK(nlh,end) ((char*)(end)-(char*)(nlh) >= sizeof(struct nlmsghdr) && \
-+ (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
-+ (nlh)->nlmsg_len <= ((char*)(end)-(char*)(nlh)))
-
- #define RTA_DATA(rta) ((void*)((char*)(rta)+sizeof(struct rtattr)))
- #define RTA_DATALEN(rta) ((rta)->rta_len-sizeof(struct rtattr))
- #define RTA_DATAEND(rta) ((char*)(rta)+(rta)->rta_len)
- #define RTA_NEXT(rta) (struct rtattr*)((char*)(rta)+NETLINK_ALIGN((rta)->rta_len))
--#define RTA_OK(rta,end) ((char*)(end)-(char*)(rta) >= sizeof(struct rtattr))
-+#define RTA_OK(rta,end) ((char*)(end)-(char*)(rta) >= sizeof(struct rtattr) && \
-+ (rta)->rta_len >= sizeof(struct rtattr) && \
-+ (rta)->rta_len <= ((char*)(end)-(char*)(rta)))
-
- #define NLMSG_RTA(nlh,len) ((void*)((char*)(nlh)+sizeof(struct nlmsghdr)+NETLINK_ALIGN(len)))
- #define NLMSG_RTAOK(rta,nlh) RTA_OK(rta,NLMSG_DATAEND(nlh))
diff --git a/sys-libs/musl/files/musl-iconv-out-of-bound-fix.patch b/sys-libs/musl/files/musl-iconv-out-of-bound-fix.patch
deleted file mode 100644
index 762b4e34c160..000000000000
--- a/sys-libs/musl/files/musl-iconv-out-of-bound-fix.patch
+++ /dev/null
@@ -1,76 +0,0 @@
->From e5adcd97b5196e29991b524237381a0202a60659 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Sun, 9 Feb 2025 10:07:19 -0500
-Subject: [PATCH] iconv: fix erroneous input validation in EUC-KR decoder
-
-as a result of incorrect bounds checking on the lead byte being
-decoded, certain invalid inputs which should produce an encoding
-error, such as "\xc8\x41", instead produced out-of-bounds loads from
-the ksc table.
-
-in a worst case, the loaded value may not be a valid unicode scalar
-value, in which case, if the output encoding was UTF-8, wctomb would
-return (size_t)-1, causing an overflow in the output pointer and
-remaining buffer size which could clobber memory outside of the output
-buffer.
-
-bug report was submitted in private by Nick Wellnhofer on account of
-potential security implications.
----
- src/locale/iconv.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/locale/iconv.c b/src/locale/iconv.c
-index 9605c8e9..008c93f0 100644
---- a/src/locale/iconv.c
-+++ b/src/locale/iconv.c
-@@ -502,7 +502,7 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri
- if (c >= 93 || d >= 94) {
- c += (0xa1-0x81);
- d += 0xa1;
-- if (c >= 93 || c>=0xc6-0x81 && d>0x52)
-+ if (c > 0xc6-0x81 || c==0xc6-0x81 && d>0x52)
- goto ilseq;
- if (d-'A'<26) d = d-'A';
- else if (d-'a'<26) d = d-'a'+26;
---
-2.21.0
-
->From c47ad25ea3b484e10326f933e927c0bc8cded3da Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Wed, 12 Feb 2025 17:06:30 -0500
-Subject: [PATCH] iconv: harden UTF-8 output code path against input decoder
- bugs
-
-the UTF-8 output code was written assuming an invariant that iconv's
-decoders only emit valid Unicode Scalar Values which wctomb can encode
-successfully, thereby always returning a value between 1 and 4.
-
-if this invariant is not satisfied, wctomb returns (size_t)-1, and the
-subsequent adjustments to the output buffer pointer and remaining
-output byte count overflow, moving the output position backwards,
-potentially past the beginning of the buffer, without storing any
-bytes.
----
- src/locale/iconv.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/locale/iconv.c b/src/locale/iconv.c
-index 008c93f0..52178950 100644
---- a/src/locale/iconv.c
-+++ b/src/locale/iconv.c
-@@ -545,6 +545,10 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri
- if (*outb < k) goto toobig;
- memcpy(*out, tmp, k);
- } else k = wctomb_utf8(*out, c);
-+ /* This failure condition should be unreachable, but
-+ * is included to prevent decoder bugs from translating
-+ * into advancement outside the output buffer range. */
-+ if (k>4) goto ilseq;
- *out += k;
- *outb -= k;
- break;
---
-2.21.0
-
-
diff --git a/sys-libs/musl/files/musl-isatty.patch b/sys-libs/musl/files/musl-isatty.patch
deleted file mode 100644
index df57e5a01e53..000000000000
--- a/sys-libs/musl/files/musl-isatty.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-https://git.musl-libc.org/cgit/musl/commit/?id=c94a0c16f08894ce3be6dafb0fe80baa77a6ff2a
-
-From c94a0c16f08894ce3be6dafb0fe80baa77a6ff2a Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Tue, 20 Aug 2024 12:34:50 -0400
-Subject: isatty: don't collapse all non-EBADF errors to ENOTTY
-
-linux puts hung-up ttys in a state where ioctls produce EIO, and may
-do the same for other types of devices in error or shutdown states.
-such an error clearly does not mean the device is not a tty, but it
-also can't reliably establish that the device is a tty, so the only
-safe thing to do seems to be reporting the error. programs that don't
-check errno will conclude that the device is not a tty, which is no
-different from what happens now, but at least they gain the option to
-differentiate between the cases.
-
-commit c84971995b3a6d5118f9357c040572f4c78bcd55 introduced the errno
-collapsing behavior, but prior to that, errno was not set at all by
-isatty.
----
- src/unistd/isatty.c | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/src/unistd/isatty.c b/src/unistd/isatty.c
-index 75a9c186..21222eda 100644
---- a/src/unistd/isatty.c
-+++ b/src/unistd/isatty.c
-@@ -6,8 +6,6 @@
- int isatty(int fd)
- {
- struct winsize wsz;
-- unsigned long r = syscall(SYS_ioctl, fd, TIOCGWINSZ, &wsz);
-- if (r == 0) return 1;
-- if (errno != EBADF) errno = ENOTTY;
-- return 0;
-+ /* +1 converts from error status (0/-1) to boolean (1/0) */
-+ return syscall(SYS_ioctl, fd, TIOCGWINSZ, &wsz) + 1;
- }
---
-cgit v1.2.1
diff --git a/sys-libs/musl/files/musl-page-size.patch b/sys-libs/musl/files/musl-page-size.patch
deleted file mode 100644
index 830500c25340..000000000000
--- a/sys-libs/musl/files/musl-page-size.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-https://git.musl-libc.org/cgit/musl/commit/?id=6f666231bf51703fadbef10460d462fb573548a1
-
-From 6f666231bf51703fadbef10460d462fb573548a1 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Tue, 7 May 2024 08:18:49 -0400
-Subject: ldso: fix non-functional fix to early dynamic PAGE_SIZE access
-
-commit f47a8cdd250d9163fcfb39bf4e9d813957c0b187 introduced an
-alternate mechanism for access to runtime page size for compatibility
-with early stages of dynamic linking, but because pthread_impl.h
-indirectly includes libc.h, the condition #ifndef PAGE_SIZE was never
-satisfied.
-
-rather than depend on order of inclusion, use the (baseline POSIX)
-macro PAGESIZE, not the (XSI) macro PAGE_SIZE, to determine whether
-page size is dynamic. our internal libc.h only provides a dynamic
-definition for PAGE_SIZE, not for PAGESIZE.
----
- ldso/dynlink.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/ldso/dynlink.c b/ldso/dynlink.c
-index 324aa859..42687da2 100644
---- a/ldso/dynlink.c
-+++ b/ldso/dynlink.c
-@@ -21,15 +21,17 @@
- #include <sys/membarrier.h>
- #include "pthread_impl.h"
- #include "fork_impl.h"
-+#include "libc.h"
- #include "dynlink.h"
-
- static size_t ldso_page_size;
--#ifndef PAGE_SIZE
-+/* libc.h may have defined a macro for dynamic PAGE_SIZE already, but
-+ * PAGESIZE is only defined if it's constant for the arch. */
-+#ifndef PAGESIZE
-+#undef PAGE_SIZE
- #define PAGE_SIZE ldso_page_size
- #endif
-
--#include "libc.h"
--
- #define malloc __libc_malloc
- #define calloc __libc_calloc
- #define realloc __libc_realloc
---
-cgit v1.2.1
diff --git a/sys-libs/musl/files/musl-ppc-clobber.patch b/sys-libs/musl/files/musl-ppc-clobber.patch
deleted file mode 100644
index 8094d541a8a3..000000000000
--- a/sys-libs/musl/files/musl-ppc-clobber.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-https://bugs.gentoo.org/956676
-https://git.musl-libc.org/cgit/musl/patch/?id=f6944eb3c4ce1c97dc39dc36d32390dc9f70b67b
-
-From f6944eb3c4ce1c97dc39dc36d32390dc9f70b67b Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Thu, 7 Aug 2025 15:35:14 -0400
-Subject: powerpc[64]: fix missing ctr and xer regs in syscall asm clobberlists
-
-the ctr and xer special registers are call-clobbered and
-syscall-clobbered. failure to include them in the clobber list may
-result in wrong code that attempts to use a value which is no longer
-present in the register after the syscall. this has been reported to
-manifest newly with gcc 15.
----
- arch/powerpc/syscall_arch.h | 14 +++++++-------
- arch/powerpc64/syscall_arch.h | 14 +++++++-------
- 2 files changed, 14 insertions(+), 14 deletions(-)
-
-diff --git a/arch/powerpc/syscall_arch.h b/arch/powerpc/syscall_arch.h
-index 54c885cb..fe893af4 100644
---- a/arch/powerpc/syscall_arch.h
-+++ b/arch/powerpc/syscall_arch.h
-@@ -9,7 +9,7 @@ static inline long __syscall0(long n)
- register long r3 __asm__("r3");
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "=r"(r3)
-- :: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
-@@ -19,7 +19,7 @@ static inline long __syscall1(long n, long a)
- register long r3 __asm__("r3") = a;
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "+r"(r3)
-- :: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
-@@ -30,7 +30,7 @@ static inline long __syscall2(long n, long a, long b)
- register long r4 __asm__("r4") = b;
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "+r"(r3), "+r"(r4)
-- :: "memory", "cr0", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
-@@ -42,7 +42,7 @@ static inline long __syscall3(long n, long a, long b, long c)
- register long r5 __asm__("r5") = c;
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5)
-- :: "memory", "cr0", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
-@@ -55,7 +55,7 @@ static inline long __syscall4(long n, long a, long b, long c, long d)
- register long r6 __asm__("r6") = d;
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6)
-- :: "memory", "cr0", "r7", "r8", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r7", "r8", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
-@@ -69,7 +69,7 @@ static inline long __syscall5(long n, long a, long b, long c, long d, long e)
- register long r7 __asm__("r7") = e;
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6), "+r"(r7)
-- :: "memory", "cr0", "r8", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r8", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
-@@ -84,7 +84,7 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
- register long r8 __asm__("r8") = f;
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6), "+r"(r7), "+r"(r8)
-- :: "memory", "cr0", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
-diff --git a/arch/powerpc64/syscall_arch.h b/arch/powerpc64/syscall_arch.h
-index 7d34fbe4..4c5d3ae9 100644
---- a/arch/powerpc64/syscall_arch.h
-+++ b/arch/powerpc64/syscall_arch.h
-@@ -7,7 +7,7 @@ static inline long __syscall0(long n)
- register long r3 __asm__("r3");
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "=r"(r3)
-- :: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
-@@ -17,7 +17,7 @@ static inline long __syscall1(long n, long a)
- register long r3 __asm__("r3") = a;
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "+r"(r3)
-- :: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
-@@ -28,7 +28,7 @@ static inline long __syscall2(long n, long a, long b)
- register long r4 __asm__("r4") = b;
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "+r"(r3), "+r"(r4)
-- :: "memory", "cr0", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
-@@ -40,7 +40,7 @@ static inline long __syscall3(long n, long a, long b, long c)
- register long r5 __asm__("r5") = c;
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5)
-- :: "memory", "cr0", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
-@@ -53,7 +53,7 @@ static inline long __syscall4(long n, long a, long b, long c, long d)
- register long r6 __asm__("r6") = d;
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6)
-- :: "memory", "cr0", "r7", "r8", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r7", "r8", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
-@@ -67,7 +67,7 @@ static inline long __syscall5(long n, long a, long b, long c, long d, long e)
- register long r7 __asm__("r7") = e;
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6), "+r"(r7)
-- :: "memory", "cr0", "r8", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r8", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
-@@ -82,7 +82,7 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
- register long r8 __asm__("r8") = f;
- __asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
- : "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6), "+r"(r7), "+r"(r8)
-- :: "memory", "cr0", "r9", "r10", "r11", "r12");
-+ :: "memory", "cr0", "r9", "r10", "r11", "r12", "ctr", "xer");
- return r3;
- }
-
---
-cgit v1.2.1
diff --git a/sys-libs/musl/files/musl-printf-empty-iovec.patch b/sys-libs/musl/files/musl-printf-empty-iovec.patch
deleted file mode 100644
index 8cfd52c8a034..000000000000
--- a/sys-libs/musl/files/musl-printf-empty-iovec.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://github.com/systemd/systemd/pull/38825#issue-3386123778
-https://git.musl-libc.org/cgit/musl/commit/?id=fde29c04adbab9d5b081bf6717b5458188647f1c
-
-From fde29c04adbab9d5b081bf6717b5458188647f1c Mon Sep 17 00:00:00 2001
-From: Casey Connolly <kcxt@postmarketos.org>
-Date: Wed, 23 Apr 2025 15:06:48 +0200
-Subject: stdio: skip empty iovec when buffering is disabled
-
-When buffering on a FILE is disabled we still send both iovecs, even
-though the first one is always empty. Clean things up by skipping the
-empty iovec instead.
----
- src/stdio/__stdio_write.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/stdio/__stdio_write.c b/src/stdio/__stdio_write.c
-index d2d89475..5356553d 100644
---- a/src/stdio/__stdio_write.c
-+++ b/src/stdio/__stdio_write.c
-@@ -11,6 +11,11 @@ size_t __stdio_write(FILE *f, const unsigned char *buf, size_t len)
- size_t rem = iov[0].iov_len + iov[1].iov_len;
- int iovcnt = 2;
- ssize_t cnt;
-+
-+ if (!iov->iov_len) {
-+ iov++;
-+ iovcnt--;
-+ }
- for (;;) {
- cnt = syscall(SYS_writev, f->fd, iov, iovcnt);
- if (cnt == rem) {
---
-cgit v1.2.1
diff --git a/sys-libs/musl/files/musl-sched.h-reduce-namespace-conflicts.patch b/sys-libs/musl/files/musl-sched.h-reduce-namespace-conflicts.patch
deleted file mode 100644
index d2d3b9343842..000000000000
--- a/sys-libs/musl/files/musl-sched.h-reduce-namespace-conflicts.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-commit 1a98576401ff604ff06a030a3644e2780b2a837d
-Author: Rich Felker <dalias@aerifal.cx>
-Date: Mon Jan 13 08:31:02 2025 -0500
-
- sched.h: reduce namespace conflicts in _GNU_SOURCE profile
-
- we have the cpuset macros call calloc/free/memset/memcmp directly so
- that they don't depend on any further ABI surface. this is not
- namespace-clean, but only affects the _GNU_SOURCE feature profile,
- which is not intended to be namespace-clean. nonetheless, reports come
- up now and then of things which are gratuitously broken, usually when
- an application has wrapped malloc with macros.
-
- this patch parenthesizes the function names so that function-like
- macros will not be expanded, and removes the unused declaration of
- memcpy. this is not a complete solution, but it should improve things
- for affected applications, particularly ones which are not even trying
- to use the cpuset interfaces which got them just because g++ always
- defines _GNU_SOURCE.
-
-diff --git a/include/sched.h b/include/sched.h
-index 204c34f5..8c3b53f0 100644
---- a/include/sched.h
-+++ b/include/sched.h
-@@ -78,11 +78,10 @@ int clone (int (*)(void *), void *, int, void *, ...);
- int unshare(int);
- int setns(int, int);
-
--void *memcpy(void *__restrict, const void *__restrict, size_t);
--int memcmp(const void *, const void *, size_t);
--void *memset (void *, int, size_t);
--void *calloc(size_t, size_t);
--void free(void *);
-+int (memcmp)(const void *, const void *, size_t);
-+void *(memset)(void *, int, size_t);
-+void *(calloc)(size_t, size_t);
-+void (free)(void *);
-
- typedef struct cpu_set_t { unsigned long __bits[128/sizeof(long)]; } cpu_set_t;
- int __sched_cpucount(size_t, const cpu_set_t *);
-@@ -116,13 +115,13 @@ __CPU_op_func_S(XOR, ^)
- #define CPU_XOR_S(a,b,c,d) __CPU_XOR_S(a,b,c,d)
-
- #define CPU_COUNT_S(size,set) __sched_cpucount(size,set)
--#define CPU_ZERO_S(size,set) memset(set,0,size)
--#define CPU_EQUAL_S(size,set1,set2) (!memcmp(set1,set2,size))
-+#define CPU_ZERO_S(size,set) (memset)(set,0,size)
-+#define CPU_EQUAL_S(size,set1,set2) (!(memcmp)(set1,set2,size))
-
- #define CPU_ALLOC_SIZE(n) (sizeof(long) * ( (n)/(8*sizeof(long)) \
- + ((n)%(8*sizeof(long)) + 8*sizeof(long)-1)/(8*sizeof(long)) ) )
--#define CPU_ALLOC(n) ((cpu_set_t *)calloc(1,CPU_ALLOC_SIZE(n)))
--#define CPU_FREE(set) free(set)
-+#define CPU_ALLOC(n) ((cpu_set_t *)(calloc)(1,CPU_ALLOC_SIZE(n)))
-+#define CPU_FREE(set) (free)(set)
-
- #define CPU_SETSIZE 1024
-
diff --git a/sys-libs/musl/files/stack_chk_fail_local.c b/sys-libs/musl/files/stack_chk_fail_local.c
deleted file mode 100644
index e1c903a3b635..000000000000
--- a/sys-libs/musl/files/stack_chk_fail_local.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Stack protector support.
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 3, or (at your option) any later
-version.
-
-In addition to the permissions in the GNU General Public License, the
-Free Software Foundation gives you unlimited permission to link the
-compiled version of this file into combinations with other programs,
-and to distribute those combinations without any restriction coming
-from the use of this file. (The General Public License restrictions
-do apply in other respects; for example, they cover modification of
-the file, and distribution when not linked into a combine
-executable.)
-
-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-<http://www.gnu.org/licenses/>. */
-
-extern void __stack_chk_fail (void);
-
-/* Some targets can avoid loading a GP for calls to hidden functions.
- Using this entry point may avoid the load of a GP entirely for the
- function, making the overall code smaller. */
-
-void
-__attribute__((visibility ("hidden")))
-__stack_chk_fail_local (void)
-{
- __stack_chk_fail ();
-}
diff --git a/sys-libs/musl/metadata.xml b/sys-libs/musl/metadata.xml
deleted file mode 100644
index e3dfac351e2a..000000000000
--- a/sys-libs/musl/metadata.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>blueness@gentoo.org</email>
- <name>Anthony G. Basile</name>
- </maintainer>
- <maintainer type="person">
- <email>lu_zero@gentoo.org</email>
- </maintainer>
- <maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
- </maintainer>
- <maintainer type="project">
- <email>musl@gentoo.org</email>
- <name>Musl project</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/musl/musl-1.2.5-r8.ebuild b/sys-libs/musl/musl-1.2.5-r8.ebuild
deleted file mode 100644
index e6078b3311a0..000000000000
--- a/sys-libs/musl/musl-1.2.5-r8.ebuild
+++ /dev/null
@@ -1,267 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit crossdev flag-o-matic toolchain-funcs prefix
-
-DESCRIPTION="Light, fast and, simple C library focused on standards-conformance and safety"
-HOMEPAGE="https://musl.libc.org"
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.musl-libc.org/git/musl"
- inherit git-r3
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/musl.asc
- inherit verify-sig
-
- SRC_URI="https://musl.libc.org/releases/${P}.tar.gz"
- SRC_URI+=" verify-sig? ( https://musl.libc.org/releases/${P}.tar.gz.asc )"
- KEYWORDS="-* amd64 arm arm64 ~m68k ~mips ppc ppc64 ~riscv x86"
-
- BDEPEND="verify-sig? ( sec-keys/openpgp-keys-musl )"
-fi
-
-GETENT_COMMIT="93a08815f8598db442d8b766b463d0150ed8e2ab"
-GETENT_FILE="musl-getent-${GETENT_COMMIT}.c"
-SRC_URI+="
- https://dev.gentoo.org/~blueness/musl-misc/getconf.c
- https://gitlab.alpinelinux.org/alpine/aports/-/raw/${GETENT_COMMIT}/main/musl/getent.c -> ${GETENT_FILE}
- https://dev.gentoo.org/~blueness/musl-misc/iconv.c
-"
-
-LICENSE="MIT LGPL-2 GPL-2"
-SLOT="0"
-IUSE="crypt headers-only split-usr"
-
-QA_SONAME="usr/lib/libc.so"
-QA_DT_NEEDED="usr/lib/libc.so"
-# bug #830213
-QA_PRESTRIPPED="usr/lib/crtn.o"
-
-# We want crypt on by default for this as sys-libs/libxcrypt isn't (yet?)
-# built as part as crossdev. Also, elide the blockers when in cross-*,
-# as it doesn't make sense to block the normal CBUILD libxcrypt at all
-# there when we're installing into /usr/${CHOST} anyway.
-if is_crosspkg ; then
- IUSE="${IUSE/crypt/+crypt}"
-else
- RDEPEND="crypt? ( !sys-libs/libxcrypt[system] )"
- PDEPEND="!crypt? ( sys-libs/libxcrypt[system] )"
-fi
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.2.4-arm64-crti-alignment.patch
- "${FILESDIR}"/${PN}-sched.h-reduce-namespace-conflicts.patch
- "${FILESDIR}"/${PN}-iconv-out-of-bound-fix.patch
- "${FILESDIR}"/${PN}-arm-crti-alignment.patch
- "${FILESDIR}"/${PN}-ppc-clobber.patch
- "${FILESDIR}"/${PN}-dns-union.patch
- "${FILESDIR}"/${PN}-getauxval.patch
- "${FILESDIR}"/${PN}-getifaddrs-qemu-workaround.patch
- "${FILESDIR}"/${PN}-page-size.patch
- "${FILESDIR}"/${PN}-isatty.patch
- "${FILESDIR}"/${PN}-printf-empty-iovec.patch
-)
-
-just_headers() {
- use headers-only && target_is_not_host
-}
-
-pkg_setup() {
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- case ${CHOST} in
- *-musl*) ;;
- *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
- esac
- fi
-
- # Fix for bug #667126, copied from glibc ebuild:
- # make sure host make.conf doesn't pollute us
- if target_is_not_host || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-}
-
-src_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
- elif use verify-sig ; then
- # We only verify the release; not the additional (fixed, safe) files
- # we download.
- # (Seem to get IPC error on verifying in cross?)
- ! target_is_not_host && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- mkdir "${WORKDIR}"/misc || die
- cp "${DISTDIR}"/getconf.c "${WORKDIR}"/misc/getconf.c || die
- cp "${DISTDIR}/${GETENT_FILE}" "${WORKDIR}"/misc/getent.c || die
- cp "${DISTDIR}"/iconv.c "${WORKDIR}"/misc/iconv.c || die
-}
-
-src_configure() {
- strip-flags && filter-lto # Prevent issues caused by aggressive optimizations & bug #877343
- tc-getCC ${CTARGET}
-
- just_headers && export CC=true
-
- local sysroot
- target_is_not_host && sysroot=/usr/${CTARGET}
- ./configure \
- --target=${CTARGET} \
- --prefix="${EPREFIX}${sysroot}/usr" \
- --syslibdir="${EPREFIX}${sysroot}/lib" \
- --disable-gcc-wrapper || die
-}
-
-src_compile() {
- emake obj/include/bits/alltypes.h
- just_headers && return 0
-
- emake
- if ! is_crosspkg ; then
- emake -C "${T}" getconf getent iconv \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}" \
- CPPFLAGS="${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- VPATH="${WORKDIR}/misc"
- fi
-
- $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -c -o libssp_nonshared.o "${FILESDIR}"/stack_chk_fail_local.c || die
- $(tc-getAR) -rcs libssp_nonshared.a libssp_nonshared.o || die
-}
-
-src_install() {
- local target="install"
- just_headers && target="install-headers"
- emake DESTDIR="${D}" ${target}
- just_headers && return 0
-
- # musl provides ldd via a sym link to its ld.so
- local sysroot=
- target_is_not_host && sysroot=/usr/${CTARGET}
- local ldso=$(basename "${ED}${sysroot}"/lib/ld-musl-*)
- dosym -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd"
-
- if ! use crypt ; then
- # Allow sys-libs/libxcrypt[system] to provide it instead
- rm "${ED}${sysroot}/usr/include/crypt.h" || die
- rm "${ED}${sysroot}"/usr/*/libcrypt.a || die
- fi
-
- if ! is_crosspkg ; then
- # Fish out of config:
- # ARCH = ...
- # SUBARCH = ...
- # and print $(ARCH)$(SUBARCH).
- local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak)
-
- # The musl build system seems to create a symlink:
- # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute)
- # During cross or within prefix, there's no guarantee that the host is
- # using musl so that file may not exist. Use a relative symlink within
- # ${D} instead.
- rm "${ED}"/lib/ld-musl-${arch}.so.1 || die
- if use split-usr; then
- dosym ../usr/lib/libc.so /lib/ld-musl-${arch}.so.1
- # If it's still a dead symlink, OK, we really do need to abort.
- [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die
- else
- dosym libc.so /usr/lib/ld-musl-${arch}.so.1
- [[ -e "${ED}"/usr/lib/ld-musl-${arch}.so.1 ]] || die
- fi
-
- cp "${FILESDIR}"/ldconfig.in-r3 "${T}"/ldconfig.in || die
- sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
- eprefixify "${T}"/ldconfig
- into /
- dosbin "${T}"/ldconfig
- into /usr
- dobin "${T}"/getconf
- dobin "${T}"/getent
- dobin "${T}"/iconv
- newenvd - "00musl" <<-EOF
- # 00musl autogenerated by sys-libs/musl ebuild; DO NOT EDIT.
- LDPATH="include ld.so.conf.d/*.conf"
- EOF
- fi
-
- if target_is_not_host ; then
- into /usr/${CTARGET}
- dolib.a libssp_nonshared.a
- else
- dolib.a libssp_nonshared.a
- fi
-}
-
-# Simple test to make sure our new musl isn't completely broken.
-# Make sure we don't test with statically built binaries since
-# they will fail. Also, skip if this musl 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.
-musl_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}"/usr/$(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 'libc.so' -type f -print -quit)
-
- einfo Last-minute run tests with ${newldso} in /usr/$(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;;
- *"static-pie 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
-
- # Prepare /etc/ld.so.conf.d/ for files
- mkdir -p "${EROOT}"/etc/ld.so.conf.d
-
- [[ -n ${ROOT} ]] && return 0
- [[ -d ${ED}/usr/$(get_libdir) ]] || return 0
- target_is_not_host && return 0
- musl_sanity_check
-}
-
-pkg_postinst() {
- target_is_not_host && return 0
-
- [[ -n "${ROOT}" ]] && return 0
-
- ldconfig || die
-}
diff --git a/sys-libs/musl/musl-1.2.6-r1.ebuild b/sys-libs/musl/musl-1.2.6-r1.ebuild
deleted file mode 100644
index 777ce3610e03..000000000000
--- a/sys-libs/musl/musl-1.2.6-r1.ebuild
+++ /dev/null
@@ -1,261 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit crossdev flag-o-matic toolchain-funcs prefix
-
-DESCRIPTION="Light, fast and, simple C library focused on standards-conformance and safety"
-HOMEPAGE="https://musl.libc.org"
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.musl-libc.org/git/musl"
- inherit git-r3
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/musl.asc
- inherit verify-sig
-
- SRC_URI="
- https://musl.libc.org/releases/${P}.tar.gz
- https://distfiles.gentoo.org/pub/proj/musl/${P}-patches.tar.xz
- verify-sig? ( https://musl.libc.org/releases/${P}.tar.gz.asc )
- "
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~x86"
-
- BDEPEND="verify-sig? ( sec-keys/openpgp-keys-musl )"
-fi
-
-GETENT_COMMIT="93a08815f8598db442d8b766b463d0150ed8e2ab"
-GETENT_FILE="musl-getent-${GETENT_COMMIT}.c"
-SRC_URI+="
- https://dev.gentoo.org/~blueness/musl-misc/getconf.c
- https://gitlab.alpinelinux.org/alpine/aports/-/raw/${GETENT_COMMIT}/main/musl/getent.c -> ${GETENT_FILE}
- https://dev.gentoo.org/~blueness/musl-misc/iconv.c
-"
-
-LICENSE="MIT LGPL-2 GPL-2"
-SLOT="0"
-IUSE="crypt headers-only split-usr"
-
-QA_SONAME="usr/lib/libc.so"
-QA_DT_NEEDED="usr/lib/libc.so"
-# bug #830213
-QA_PRESTRIPPED="usr/lib/crtn.o"
-
-# We want crypt on by default for this as sys-libs/libxcrypt isn't (yet?)
-# built as part as crossdev. Also, elide the blockers when in cross-*,
-# as it doesn't make sense to block the normal CBUILD libxcrypt at all
-# there when we're installing into /usr/${CHOST} anyway.
-if is_crosspkg ; then
- IUSE="${IUSE/crypt/+crypt}"
-else
- RDEPEND="crypt? ( !sys-libs/libxcrypt[system] )"
- PDEPEND="!crypt? ( sys-libs/libxcrypt[system] )"
-fi
-
-PATCHES=(
- "${FILESDIR}"/${PN}-getifaddrs-qemu-workaround.patch
- "${WORKDIR}"/${P}-patches
-)
-
-just_headers() {
- use headers-only && target_is_not_host
-}
-
-pkg_setup() {
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- case ${CHOST} in
- *-musl*) ;;
- *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
- esac
- fi
-
- # Fix for bug #667126, copied from glibc ebuild:
- # make sure host make.conf doesn't pollute us
- if target_is_not_host || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-}
-
-src_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
- elif use verify-sig ; then
- # We only verify the release; not the additional (fixed, safe) files
- # we download.
- # (Seem to get IPC error on verifying in cross?)
- ! target_is_not_host && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- mkdir "${WORKDIR}"/misc || die
- cp "${DISTDIR}"/getconf.c "${WORKDIR}"/misc/getconf.c || die
- cp "${DISTDIR}/${GETENT_FILE}" "${WORKDIR}"/misc/getent.c || die
- cp "${DISTDIR}"/iconv.c "${WORKDIR}"/misc/iconv.c || die
-}
-
-src_configure() {
- strip-flags && filter-lto # Prevent issues caused by aggressive optimizations & bug #877343
- tc-getCC ${CTARGET}
-
- just_headers && export CC=true
-
- local sysroot
- target_is_not_host && sysroot=/usr/${CTARGET}
- ./configure \
- --target=${CTARGET} \
- --prefix="${EPREFIX}${sysroot}/usr" \
- --syslibdir="${EPREFIX}${sysroot}/lib" \
- --disable-gcc-wrapper || die
-}
-
-src_compile() {
- emake obj/include/bits/alltypes.h
- just_headers && return 0
-
- emake
- if ! is_crosspkg ; then
- emake -C "${T}" getconf getent iconv \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}" \
- CPPFLAGS="${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- VPATH="${WORKDIR}/misc"
- fi
-
- $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -c -o libssp_nonshared.o "${FILESDIR}"/stack_chk_fail_local.c || die
- $(tc-getAR) -rcs libssp_nonshared.a libssp_nonshared.o || die
-}
-
-src_install() {
- local target="install"
- just_headers && target="install-headers"
- emake DESTDIR="${D}" ${target}
- just_headers && return 0
-
- # musl provides ldd via a sym link to its ld.so
- local sysroot=
- target_is_not_host && sysroot=/usr/${CTARGET}
- local ldso=$(basename "${ED}${sysroot}"/lib/ld-musl-*)
- dosym -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd"
-
- if ! use crypt ; then
- # Allow sys-libs/libxcrypt[system] to provide it instead
- rm "${ED}${sysroot}/usr/include/crypt.h" || die
- rm "${ED}${sysroot}"/usr/*/libcrypt.a || die
- fi
-
- if ! is_crosspkg ; then
- # Fish out of config:
- # ARCH = ...
- # SUBARCH = ...
- # and print $(ARCH)$(SUBARCH).
- local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak)
-
- # The musl build system seems to create a symlink:
- # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute)
- # During cross or within prefix, there's no guarantee that the host is
- # using musl so that file may not exist. Use a relative symlink within
- # ${D} instead.
- rm "${ED}"/lib/ld-musl-${arch}.so.1 || die
- if use split-usr; then
- dosym ../usr/lib/libc.so /lib/ld-musl-${arch}.so.1
- # If it's still a dead symlink, OK, we really do need to abort.
- [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die
- else
- dosym libc.so /usr/lib/ld-musl-${arch}.so.1
- [[ -e "${ED}"/usr/lib/ld-musl-${arch}.so.1 ]] || die
- fi
-
- cp "${FILESDIR}"/ldconfig.in-r3 "${T}"/ldconfig.in || die
- sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
- eprefixify "${T}"/ldconfig
- into /
- dosbin "${T}"/ldconfig
- into /usr
- dobin "${T}"/getconf
- dobin "${T}"/getent
- dobin "${T}"/iconv
- newenvd - "00musl" <<-EOF
- # 00musl autogenerated by sys-libs/musl ebuild; DO NOT EDIT.
- LDPATH="include ld.so.conf.d/*.conf"
- EOF
- fi
-
- if target_is_not_host ; then
- into /usr/${CTARGET}
- dolib.a libssp_nonshared.a
- else
- dolib.a libssp_nonshared.a
- fi
-}
-
-# Simple test to make sure our new musl isn't completely broken.
-# Make sure we don't test with statically built binaries since
-# they will fail. Also, skip if this musl 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.
-musl_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}"/usr/$(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 'libc.so' -type f -print -quit)
-
- einfo Last-minute run tests with ${newldso} in /usr/$(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;;
- *"static-pie 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
-
- # Prepare /etc/ld.so.conf.d/ for files
- mkdir -p "${EROOT}"/etc/ld.so.conf.d
-
- [[ -n ${ROOT} ]] && return 0
- [[ -d ${ED}/usr/$(get_libdir) ]] || return 0
- target_is_not_host && return 0
- musl_sanity_check
-}
-
-pkg_postinst() {
- target_is_not_host && return 0
-
- [[ -n "${ROOT}" ]] && return 0
-
- ldconfig || die
-}
diff --git a/sys-libs/musl/musl-1.2.6.ebuild b/sys-libs/musl/musl-1.2.6.ebuild
deleted file mode 100644
index f65525902c45..000000000000
--- a/sys-libs/musl/musl-1.2.6.ebuild
+++ /dev/null
@@ -1,257 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit crossdev flag-o-matic toolchain-funcs prefix
-
-DESCRIPTION="Light, fast and, simple C library focused on standards-conformance and safety"
-HOMEPAGE="https://musl.libc.org"
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.musl-libc.org/git/musl"
- inherit git-r3
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/musl.asc
- inherit verify-sig
-
- SRC_URI="https://musl.libc.org/releases/${P}.tar.gz"
- SRC_URI+=" verify-sig? ( https://musl.libc.org/releases/${P}.tar.gz.asc )"
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~x86"
-
- BDEPEND="verify-sig? ( sec-keys/openpgp-keys-musl )"
-fi
-
-GETENT_COMMIT="93a08815f8598db442d8b766b463d0150ed8e2ab"
-GETENT_FILE="musl-getent-${GETENT_COMMIT}.c"
-SRC_URI+="
- https://dev.gentoo.org/~blueness/musl-misc/getconf.c
- https://gitlab.alpinelinux.org/alpine/aports/-/raw/${GETENT_COMMIT}/main/musl/getent.c -> ${GETENT_FILE}
- https://dev.gentoo.org/~blueness/musl-misc/iconv.c
-"
-
-LICENSE="MIT LGPL-2 GPL-2"
-SLOT="0"
-IUSE="crypt headers-only split-usr"
-
-QA_SONAME="usr/lib/libc.so"
-QA_DT_NEEDED="usr/lib/libc.so"
-# bug #830213
-QA_PRESTRIPPED="usr/lib/crtn.o"
-
-# We want crypt on by default for this as sys-libs/libxcrypt isn't (yet?)
-# built as part as crossdev. Also, elide the blockers when in cross-*,
-# as it doesn't make sense to block the normal CBUILD libxcrypt at all
-# there when we're installing into /usr/${CHOST} anyway.
-if is_crosspkg ; then
- IUSE="${IUSE/crypt/+crypt}"
-else
- RDEPEND="crypt? ( !sys-libs/libxcrypt[system] )"
- PDEPEND="!crypt? ( sys-libs/libxcrypt[system] )"
-fi
-
-PATCHES=(
- "${FILESDIR}"/${PN}-getifaddrs-qemu-workaround.patch
-)
-
-just_headers() {
- use headers-only && target_is_not_host
-}
-
-pkg_setup() {
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- case ${CHOST} in
- *-musl*) ;;
- *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
- esac
- fi
-
- # Fix for bug #667126, copied from glibc ebuild:
- # make sure host make.conf doesn't pollute us
- if target_is_not_host || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-}
-
-src_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
- elif use verify-sig ; then
- # We only verify the release; not the additional (fixed, safe) files
- # we download.
- # (Seem to get IPC error on verifying in cross?)
- ! target_is_not_host && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- mkdir "${WORKDIR}"/misc || die
- cp "${DISTDIR}"/getconf.c "${WORKDIR}"/misc/getconf.c || die
- cp "${DISTDIR}/${GETENT_FILE}" "${WORKDIR}"/misc/getent.c || die
- cp "${DISTDIR}"/iconv.c "${WORKDIR}"/misc/iconv.c || die
-}
-
-src_configure() {
- strip-flags && filter-lto # Prevent issues caused by aggressive optimizations & bug #877343
- tc-getCC ${CTARGET}
-
- just_headers && export CC=true
-
- local sysroot
- target_is_not_host && sysroot=/usr/${CTARGET}
- ./configure \
- --target=${CTARGET} \
- --prefix="${EPREFIX}${sysroot}/usr" \
- --syslibdir="${EPREFIX}${sysroot}/lib" \
- --disable-gcc-wrapper || die
-}
-
-src_compile() {
- emake obj/include/bits/alltypes.h
- just_headers && return 0
-
- emake
- if ! is_crosspkg ; then
- emake -C "${T}" getconf getent iconv \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}" \
- CPPFLAGS="${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- VPATH="${WORKDIR}/misc"
- fi
-
- $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -c -o libssp_nonshared.o "${FILESDIR}"/stack_chk_fail_local.c || die
- $(tc-getAR) -rcs libssp_nonshared.a libssp_nonshared.o || die
-}
-
-src_install() {
- local target="install"
- just_headers && target="install-headers"
- emake DESTDIR="${D}" ${target}
- just_headers && return 0
-
- # musl provides ldd via a sym link to its ld.so
- local sysroot=
- target_is_not_host && sysroot=/usr/${CTARGET}
- local ldso=$(basename "${ED}${sysroot}"/lib/ld-musl-*)
- dosym -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd"
-
- if ! use crypt ; then
- # Allow sys-libs/libxcrypt[system] to provide it instead
- rm "${ED}${sysroot}/usr/include/crypt.h" || die
- rm "${ED}${sysroot}"/usr/*/libcrypt.a || die
- fi
-
- if ! is_crosspkg ; then
- # Fish out of config:
- # ARCH = ...
- # SUBARCH = ...
- # and print $(ARCH)$(SUBARCH).
- local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak)
-
- # The musl build system seems to create a symlink:
- # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute)
- # During cross or within prefix, there's no guarantee that the host is
- # using musl so that file may not exist. Use a relative symlink within
- # ${D} instead.
- rm "${ED}"/lib/ld-musl-${arch}.so.1 || die
- if use split-usr; then
- dosym ../usr/lib/libc.so /lib/ld-musl-${arch}.so.1
- # If it's still a dead symlink, OK, we really do need to abort.
- [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die
- else
- dosym libc.so /usr/lib/ld-musl-${arch}.so.1
- [[ -e "${ED}"/usr/lib/ld-musl-${arch}.so.1 ]] || die
- fi
-
- cp "${FILESDIR}"/ldconfig.in-r3 "${T}"/ldconfig.in || die
- sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
- eprefixify "${T}"/ldconfig
- into /
- dosbin "${T}"/ldconfig
- into /usr
- dobin "${T}"/getconf
- dobin "${T}"/getent
- dobin "${T}"/iconv
- newenvd - "00musl" <<-EOF
- # 00musl autogenerated by sys-libs/musl ebuild; DO NOT EDIT.
- LDPATH="include ld.so.conf.d/*.conf"
- EOF
- fi
-
- if target_is_not_host ; then
- into /usr/${CTARGET}
- dolib.a libssp_nonshared.a
- else
- dolib.a libssp_nonshared.a
- fi
-}
-
-# Simple test to make sure our new musl isn't completely broken.
-# Make sure we don't test with statically built binaries since
-# they will fail. Also, skip if this musl 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.
-musl_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}"/usr/$(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 'libc.so' -type f -print -quit)
-
- einfo Last-minute run tests with ${newldso} in /usr/$(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;;
- *"static-pie 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
-
- # Prepare /etc/ld.so.conf.d/ for files
- mkdir -p "${EROOT}"/etc/ld.so.conf.d
-
- [[ -n ${ROOT} ]] && return 0
- [[ -d ${ED}/usr/$(get_libdir) ]] || return 0
- target_is_not_host && return 0
- musl_sanity_check
-}
-
-pkg_postinst() {
- target_is_not_host && return 0
-
- [[ -n "${ROOT}" ]] && return 0
-
- ldconfig || die
-}
diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild
deleted file mode 100644
index 13b2a4f893dd..000000000000
--- a/sys-libs/musl/musl-9999.ebuild
+++ /dev/null
@@ -1,257 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit crossdev flag-o-matic toolchain-funcs prefix
-
-DESCRIPTION="Light, fast and, simple C library focused on standards-conformance and safety"
-HOMEPAGE="https://musl.libc.org"
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.musl-libc.org/git/musl"
- inherit git-r3
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/musl.asc
- inherit verify-sig
-
- SRC_URI="https://musl.libc.org/releases/${P}.tar.gz"
- SRC_URI+=" verify-sig? ( https://musl.libc.org/releases/${P}.tar.gz.asc )"
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~x86"
-
- BDEPEND="verify-sig? ( sec-keys/openpgp-keys-musl )"
-fi
-
-GETENT_COMMIT="93a08815f8598db442d8b766b463d0150ed8e2ab"
-GETENT_FILE="musl-getent-${GETENT_COMMIT}.c"
-SRC_URI+="
- https://dev.gentoo.org/~blueness/musl-misc/getconf.c
- https://gitlab.alpinelinux.org/alpine/aports/-/raw/${GETENT_COMMIT}/main/musl/getent.c -> ${GETENT_FILE}
- https://dev.gentoo.org/~blueness/musl-misc/iconv.c
-"
-
-LICENSE="MIT LGPL-2 GPL-2"
-SLOT="0"
-IUSE="crypt headers-only split-usr"
-
-QA_SONAME="usr/lib/libc.so"
-QA_DT_NEEDED="usr/lib/libc.so"
-# bug #830213
-QA_PRESTRIPPED="usr/lib/crtn.o"
-
-# We want crypt on by default for this as sys-libs/libxcrypt isn't (yet?)
-# built as part as crossdev. Also, elide the blockers when in cross-*,
-# as it doesn't make sense to block the normal CBUILD libxcrypt at all
-# there when we're installing into /usr/${CHOST} anyway.
-if is_crosspkg ; then
- IUSE="${IUSE/crypt/+crypt}"
-else
- RDEPEND="crypt? ( !sys-libs/libxcrypt[system] )"
- PDEPEND="!crypt? ( sys-libs/libxcrypt[system] )"
-fi
-
-PATCHES=(
- "${FILESDIR}"/${PN}-getifaddrs-qemu-workaround.patch
-)
-
-just_headers() {
- use headers-only && target_is_not_host
-}
-
-pkg_setup() {
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- case ${CHOST} in
- *-musl*) ;;
- *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
- esac
- fi
-
- # Fix for bug #667126, copied from glibc ebuild:
- # make sure host make.conf doesn't pollute us
- if target_is_not_host || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-}
-
-src_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
- elif use verify-sig ; then
- # We only verify the release; not the additional (fixed, safe) files
- # we download.
- # (Seem to get IPC error on verifying in cross?)
- ! target_is_not_host && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- mkdir "${WORKDIR}"/misc || die
- cp "${DISTDIR}"/getconf.c "${WORKDIR}"/misc/getconf.c || die
- cp "${DISTDIR}/${GETENT_FILE}" "${WORKDIR}"/misc/getent.c || die
- cp "${DISTDIR}"/iconv.c "${WORKDIR}"/misc/iconv.c || die
-}
-
-src_configure() {
- strip-flags && filter-lto # Prevent issues caused by aggressive optimizations & bug #877343
- tc-getCC ${CTARGET}
-
- just_headers && export CC=true
-
- local sysroot
- target_is_not_host && sysroot=/usr/${CTARGET}
- ./configure \
- --target=${CTARGET} \
- --prefix="${EPREFIX}${sysroot}/usr" \
- --syslibdir="${EPREFIX}${sysroot}/lib" \
- --disable-gcc-wrapper || die
-}
-
-src_compile() {
- emake obj/include/bits/alltypes.h
- just_headers && return 0
-
- emake
- if ! is_crosspkg ; then
- emake -C "${T}" getconf getent iconv \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}" \
- CPPFLAGS="${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- VPATH="${WORKDIR}/misc"
- fi
-
- $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -c -o libssp_nonshared.o "${FILESDIR}"/stack_chk_fail_local.c || die
- $(tc-getAR) -rcs libssp_nonshared.a libssp_nonshared.o || die
-}
-
-src_install() {
- local target="install"
- just_headers && target="install-headers"
- emake DESTDIR="${D}" ${target}
- just_headers && return 0
-
- # musl provides ldd via a sym link to its ld.so
- local sysroot=
- target_is_not_host && sysroot=/usr/${CTARGET}
- local ldso=$(basename "${ED}${sysroot}"/lib/ld-musl-*)
- dosym -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd"
-
- if ! use crypt ; then
- # Allow sys-libs/libxcrypt[system] to provide it instead
- rm "${ED}${sysroot}/usr/include/crypt.h" || die
- rm "${ED}${sysroot}"/usr/*/libcrypt.a || die
- fi
-
- if ! is_crosspkg ; then
- # Fish out of config:
- # ARCH = ...
- # SUBARCH = ...
- # and print $(ARCH)$(SUBARCH).
- local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak)
-
- # The musl build system seems to create a symlink:
- # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute)
- # During cross or within prefix, there's no guarantee that the host is
- # using musl so that file may not exist. Use a relative symlink within
- # ${D} instead.
- rm "${ED}"/lib/ld-musl-${arch}.so.1 || die
- if use split-usr; then
- dosym ../usr/lib/libc.so /lib/ld-musl-${arch}.so.1
- # If it's still a dead symlink, OK, we really do need to abort.
- [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die
- else
- dosym libc.so /usr/lib/ld-musl-${arch}.so.1
- [[ -e "${ED}"/usr/lib/ld-musl-${arch}.so.1 ]] || die
- fi
-
- cp "${FILESDIR}"/ldconfig.in-r3 "${T}"/ldconfig.in || die
- sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
- eprefixify "${T}"/ldconfig
- into /
- dosbin "${T}"/ldconfig
- into /usr
- dobin "${T}"/getconf
- dobin "${T}"/getent
- dobin "${T}"/iconv
- newenvd - "00musl" <<-EOF
- # 00musl autogenerated by sys-libs/musl ebuild; DO NOT EDIT.
- LDPATH="include ld.so.conf.d/*.conf"
- EOF
- fi
-
- if target_is_not_host ; then
- into /usr/${CTARGET}
- dolib.a libssp_nonshared.a
- else
- dolib.a libssp_nonshared.a
- fi
-}
-
-# Simple test to make sure our new musl isn't completely broken.
-# Make sure we don't test with statically built binaries since
-# they will fail. Also, skip if this musl 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.
-musl_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}"/usr/$(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 'libc.so' -type f -print -quit)
-
- einfo Last-minute run tests with ${newldso} in /usr/$(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;;
- *"static-pie 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
-
- # Prepare /etc/ld.so.conf.d/ for files
- mkdir -p "${EROOT}"/etc/ld.so.conf.d
-
- [[ -n ${ROOT} ]] && return 0
- [[ -d ${ED}/usr/$(get_libdir) ]] || return 0
- target_is_not_host && return 0
- musl_sanity_check
-}
-
-pkg_postinst() {
- target_is_not_host && return 0
-
- [[ -n "${ROOT}" ]] && return 0
-
- ldconfig || die
-}
diff --git a/sys-libs/native-uuid/metadata.xml b/sys-libs/native-uuid/metadata.xml
deleted file mode 100644
index 7cb96120e236..000000000000
--- a/sys-libs/native-uuid/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>grobian@gentoo.org</email>
- <name>Fabian Groffen</name>
- </maintainer>
- <maintainer type="project">
- <email>prefix@gentoo.org</email>
- <name>Gentoo Prefix</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/native-uuid/native-uuid-1.0-r1.ebuild b/sys-libs/native-uuid/native-uuid-1.0-r1.ebuild
deleted file mode 100644
index 1907198b23ae..000000000000
--- a/sys-libs/native-uuid/native-uuid-1.0-r1.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DESCRIPTION=".pc file for uuid"
-HOMEPAGE="https://prefix.gentoo.org/"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~arm64-macos ~x64-macos"
-
-DEPEND="!!sys-libs/libuuid
- !!sys-apps/util-linux"
-RDEPEND="${DEPEND}"
-
-src_unpack() {
- mkdir -p "${S}" || die
-}
-
-src_install() {
- mkdir -p "${ED}"/usr/lib/pkgconfig || die
- cat > "${ED}"/usr/lib/pkgconfig/uuid.pc <<- EOPC
- prefix=${EPREFIX}/usr
- exec_prefix=\${prefix}
- libdir=${EPREFIX}/usr/lib
- includedir=\${prefix}/include
-
- Name: uuid
- Description: Universally unique id library
- Version: ${PV}
- Requires:
- Cflags:
- Libs:
- EOPC
-}
diff --git a/sys-libs/ncurses-compat/Manifest b/sys-libs/ncurses-compat/Manifest
deleted file mode 100644
index 222317787901..000000000000
--- a/sys-libs/ncurses-compat/Manifest
+++ /dev/null
@@ -1,141 +0,0 @@
-DIST ncurses-6.4-20230107.patch.gz 196232 BLAKE2B 8751142f825a4b79413986e45bc160d49cc9ccef23ae542c59a74435e251de82bdc8f450df14db0867b8679b5ecb81f0fb9abda662a82fb033a7eb5e079ee308 SHA512 970670d8eee50d44b8c7f29daf4c6a575beff3b4fafe12fff786cbd7ac03edeb1e7dae99c8064de99c166e9b3d7811f035ecf75c0eaffb382127cc9df5388d9b
-DIST ncurses-6.4-20230107.patch.gz.asc 729 BLAKE2B 483156747c88de46d131cf1f4e460972f95f689baaec0fb4c7c9966bec6e53d41285261761af17cbd8a9543108095587e598e3fe2fe21d76dc4fedde85a3eb0a SHA512 e14d0a27dae59e95f503bf1a569b0cc3115755043eb0cb4fa481e90bf24d097fae675e08c1247c0746fbb5c03c363dc88e6a60c0e9d6abb278df4e8d581749b1
-DIST ncurses-6.4-20230114.patch.gz 179019 BLAKE2B 8e7290f41133177275249c084c93a5fe6cb1dcd75e4deea0e44dbdd79774a364705bcd20b30b735996e19e861b5cde2216b5ce7c8d89066095d7c06ce38e5454 SHA512 202c02b09bf21d5c8341fc0e8a30a2c906f0e260a4d536f1332f978ebbe4d93250b832c6449a81ffdc9e030802f064237f39fd0f473e75e61cc77e15232c9a01
-DIST ncurses-6.4-20230114.patch.gz.asc 729 BLAKE2B dbb676160938bf5a65780a446bdffc8521410d216609d38817ea8977ea0f244dc221ec33a0475e05542fba4be7349f0948e9fa32be7fd439e57721b6a6e08fe3 SHA512 bfa1b6856fdf503aa17bac83ba0170009242ac950d46bb8789fb0e0f68c406fed364104565351df70ab58b12bbf8aedd4e587df3bd7ee69a6a0c287f67fd0c3b
-DIST ncurses-6.4-20230121.patch.gz 44888 BLAKE2B 355b2f283b978a2aadee0f4e1bc1694eb8d4ef559014d86b1ef05ab818a8852192b09976336ecd73f2610e87a8a3ccd4f799e6e0585ec4a2a8e85abbbae2f467 SHA512 7bee1b23afff48b5319a60f9e90cfd7593c0a107bcd5606da8e765b4d38904a6f732fe8077ecfac45ee2daceed301026ef3fb67435cae1d94ef5fec01440c100
-DIST ncurses-6.4-20230121.patch.gz.asc 729 BLAKE2B ddd69de4d17066b79ed9c99dfafcd051ebfb32cc31b5ea88fe013b991ca91e3bf4d00fbb36bd73b5d2ff0d4fdf33525b14bbe6ccb5216af5459e276e161a716b SHA512 f0a6eb2c81782c2d2da6d15b82a3167e4209887b868efe2e36708ffba93c987f358828d353a4b211f5fe6c1abce90b42e7d6dd2cb6ad322de78bbe2ceb04e1ad
-DIST ncurses-6.4-20230128.patch.gz 119721 BLAKE2B e91942151653415ba09e384c683a2d13854c6a751fbb4b60ee74245e71207f98d7a89b000e93cc3555f302dba2c5ca55d8313cab2197dc4074251044ef7b4eae SHA512 fffc86e953213ddc9bbe5c6a51bd60725ef75655452d03a53a38bfd5ca318d4801bb9ae4244e7e14ca8c77a9aa6fba298f45a01ae26a964cfc3300268f87c479
-DIST ncurses-6.4-20230128.patch.gz.asc 729 BLAKE2B 0faa8eb037867b99e7ea6f23c99d487426986cf9e5bc5a89179bd1ad4f363c5621d7c81214f4e38eed4ddbce9cd2cb569ff700325585e56ba706c7f1b56cabd6 SHA512 9cc84a4e32b7a67965106e8f414f87a160b632d49a5489880cd4f3f43daa7043d33894b22a16efdef5cd04914cf69019a1abefc8b9234ba2a92d1dc7c46f72fa
-DIST ncurses-6.4-20230211.patch.gz 13004 BLAKE2B 1935bee908c20f065f93100745755177012a49709bca3b14edb0414aa1493dbd6c52313a16ed04b58dff635fb6e853c39e3e3fe2b47ac5662fc274d59976ae94 SHA512 f70ad2605dfe867d8cdcbd6516c759bbf5422bf297d1ee0fb20b2b4262177cb018b7612c735efeccf8794a6fde55e388e4c9ef0bed41e9c467902835c6bf678e
-DIST ncurses-6.4-20230211.patch.gz.asc 729 BLAKE2B 42a64222042021f85a70d88555cdb6854abcc0202fd3580fff0984aee1d6154bb995d6357ed45cbb90ba92c17c32d8fd573ba0c59d37e9add2d7ece68044ac52 SHA512 27930c85a4ff2cb83c54def0fdf8f1765c4d1ca36935b26022bfe48ab6e87f39c6e45b8d1427d448e0a7b2bae864b00811ac9f1f1ab9f97d4c8f4b001dc2cb01
-DIST ncurses-6.4-20230218.patch.gz 146502 BLAKE2B 571cf7f5df5eeef21ab719ea2e941a431751ffd973de11783b96bea1ff6162f9fbbd3c3616d4c63906135cb4a6f16f8ee1a566743760c20bf026c2f378d57ce6 SHA512 7c8cec6437bef737235cf0a684646d3b6bf38c66314c14d5f07ec5dc2ca20e3036ffbd9900bb5c45e48929b1454711de412b77e527a7df643dd4403a5abfc787
-DIST ncurses-6.4-20230218.patch.gz.asc 729 BLAKE2B ca55b37bf6e647c5e39eaba1174c9c9699ffa77fc7ec1b53771586303184cf4b64cf5def844fc87d563a847109d7b00beac17e758a9803350831ebe14d36b0d9 SHA512 5471a2c8389742c0c8b74f1c27e9b97012c5d5eb0256fbd4bb904daab685614fe2506b5a204d958273eb66b56c5ff4b5e5aba8e28f59e2fe0cba392dde59b473
-DIST ncurses-6.4-20230225.patch.gz 68561 BLAKE2B ab80ea189f975e6fc0c2a1dd22898e2d4dde6bf2767ed47000c534430af09948266188cf54a527aabdfa6f4b5df4946c8bc3afdd7869bcccc75429b3e828b48a SHA512 fed222bbdb5d3c472ec7283f5612e12d6b1806c49ca5d1dc7dde68bbf72e8b1fe9c31a4737b6bbcf721d97babc9156a524d127f9e3d6c41547813bef70fb247d
-DIST ncurses-6.4-20230225.patch.gz.asc 729 BLAKE2B f7b4ff7fe78a69ec20c79225cce7bee628476663600129e5eee0c0f1ef2f0783e46485f57a774847851e6e192231610405ff923dcafd68c1dcc3d2ec622f0b78 SHA512 937a4bb33acf0c86b201145f2abe65e5b7defe63c064aeb2b7cb8869494c02a5d50af3f048dd758ea39b828b8cdd0dac54004dc41cd609afcf3de71454195135
-DIST ncurses-6.4-20230311.patch.gz 15262 BLAKE2B b3ca38dc63d64dd59af08b4c642c5b081eb137db6d7590a92f29c55be7148b26032553e1b72b0977394608ac144a12dfa0f919d943d41fd6ff419f8e568c655d SHA512 17662557194e81668dac748bce1240276d48e09df2416934da9660861154137024aee989287e9aac17b884e9707cf1c86c438cbcc583902af8a5ecc5a5e08140
-DIST ncurses-6.4-20230311.patch.gz.asc 729 BLAKE2B c5f513390bae7cbd5cf9d6a6f67c00161cb7c1712ebfa7ee9b27b391dbdb8f9386fc55daaa25b34c55955cc0362191256a2288b85d2d1dd9ff945561a2850449 SHA512 2b0f9ec58e011bb969397018258519b09a5af42ac49b7609677f983c1d69543aaeb052fb762d358b3fcfba7a3d40c01f61f3a680102d10f76958750b531a89d2
-DIST ncurses-6.4-20230401.patch.gz 5172 BLAKE2B bf4a9d9bcecc2fa91191139a4f1aa39aa4f08346986fe14f43b7dc4cbdaed767d198f426c8517024c5d4fe481a45c6d7e0a0b62d35cd72250e08da47edcbe86e SHA512 dd3d89cabec528c95c4b065a32d3496210571b0baaab079c2b381563f374072630aab0ec919c26e10ea476b7aebf1eab45ea25f8b4dfcd8172f44270d03c9cc9
-DIST ncurses-6.4-20230401.patch.gz.asc 729 BLAKE2B 18588b7cc4e3f256a4e9aa9e6221e54b1a29711df01784397b1055d9fea8ae5f1bb544a8acfd660ef1b7d72ccae1ab94b61f38ba19159e4efc7563a79e93fbb3 SHA512 bf9da77a0da1640d883e0a6ac7f807995f3678eaa054255e8591dbe9a2c4cebb43d8d2781b8ddf7c7432a38f63eb72d519445edcc2721a01d7a785964adee8a1
-DIST ncurses-6.4-20230408.patch.gz 15680 BLAKE2B 7d1fa16a79e317be3c2746f7117559a9cc65b7ca20aca86a314591d376db59f8a151d739bfbc502691808f16130b89a9d5b4ee8bcd357a01ef033ac2ad7277d1 SHA512 036d4b08c0d17656c75f89625d5b5a253e70458bc9f2303269b4c72349ad62c719951b9ebd65385d6d8ad4be9e89a36090fa842fbb62713d9b8fa6a359170a88
-DIST ncurses-6.4-20230408.patch.gz.asc 729 BLAKE2B 7648e24297dc66dc4d5f08bf592b2db628a5962b0d6d34c1f0725257c3a04d2430897edd99d741ba837196e9a6f2c138e4826f40f80ea88e9d5dc04a41c11986 SHA512 eabe6e49b94969fbba7bf8de3bef803a8151e6d3bb0e9d1f0d4b11d27c7156be37f623e6785a205b7b8acaef2a2d646099aef8c410a6addb7592a9af2ec930c4
-DIST ncurses-6.4-20230415.patch.gz 23979 BLAKE2B d89402d39bd71e23021d1ad28a27965239409b8d29397a9a9f3172178dd060cc42f736224b6438e7048cd05f38c24e4d229f83fc87fc207d5d2cb3b9577e1bcc SHA512 63a6368745c2c418fa263cec4da69a06e981fb8cb466f0694163fd324ef328251acb38ca3ace02f18b8b6b44dcaf414f74335a2239ae7af2b0c8ed916ca6644d
-DIST ncurses-6.4-20230415.patch.gz.asc 729 BLAKE2B c7ad19d4ae544c64eed538e7c6fd03959988e80140cbc185c6eebb932d026fa316df1d53f9e049e82fec811860e3a0a32b6af76f980fe1603684ce2678dd4fd9 SHA512 4637e09e4620da328d163bdd100756760b0f5469304ef7963a93346d263039ea608fd510fba0079feb094a37fa857b7fcdcb938d2ff5d93aa809cb9c74cf4d5b
-DIST ncurses-6.4-20230418.patch.gz 32130 BLAKE2B 912efedd3a615ce383b09218031ffc49f87e0bfc7fe8aec37330394b9235fd61337fa707898c308cbfd7426fc6f06b3639e533138ca390d42139583c58ac06c0 SHA512 4952d56a3fd54be512dcfabe48d967af43c7c51b9e49fbdf575301861940f00fd5e88b994a2088baf4a0e551338b978e47c6ac232bc9ae4e8ee417bd17405288
-DIST ncurses-6.4-20230418.patch.gz.asc 729 BLAKE2B 59d8ca3ab665e1bbfa7a1602b2856de79289c42eda33f8f517f419e41f7eebd57dbcfd73c292d6a2debd08f02cb39a6b6b47b389a15b1ab845a5fd4b4f73432f SHA512 d8be7ff7c1ba083f1c7e10dcb9fd88d7be661201534922d1a136e24081767702b6cac897a3cf5b7d96bc65687690998e4a9a3c57ed39a146df5d6be95080704f
-DIST ncurses-6.4-20230423.patch.gz 115574 BLAKE2B 72a98086f00f02cf0ea018392373f7ce0a741674e61835e66b2a211c63047716c2aa41fec937ccda13cd01f2f3943c7670f4f8d5be4ab3bf6902c92c2ee95a26 SHA512 a5ebe239b9a6a4a99a1afe0b1a6f7a09058402927077c4c2ca537f3a9f13606573af4ebbe4e0aa5715bd4e71d5bd67d9c95fb4e9d700ac1e7edd809c71667a3a
-DIST ncurses-6.4-20230423.patch.gz.asc 729 BLAKE2B 74a5e9cdc519788bb3c501a37061fe5f9ebbed531d274f252f21d293d4687b5767f7935f4bf1cf209980d9c2690959bac1ceb883bcb17d49ba012afe9bcda139 SHA512 3f840f5f8dcf2d901077d7b717431c3f6146e7ad895102b2af46d8b329e428baf15225d905f46027c7e9c4796be40d95b7322e764cc8d56afc357657e019f1cf
-DIST ncurses-6.4-20230424.patch.gz 4488 BLAKE2B faebd76ba1f868b8637b4a72b427123c08b33871fc366b989fccb107898702f089c2014c453fecbb12dc260816e5acf97212f3fa2b9a7ace9fa384c31b6ba1f2 SHA512 bdaa63e0494b981443f07e9ce134785b2420dff3d561eef7a8041e7df5d04e9c9242cdd1cd9e4592fa0724f073b829bff36e74e480235f4eacf37bb639d914ef
-DIST ncurses-6.4-20230424.patch.gz.asc 729 BLAKE2B 6eab548bea6fb01f6845ec03a41bb0ab3969b5982baed9458910d207542a480e911d53e3bfd968f485aaf754f94fb166b910bf8965646c3de035b255489dcb1f SHA512 91645fb4997f0e276468aca9a702d79b487d7018b56665e0fda8e37e8fadb6cda7f8b1e653eb3c1cd0ad563360b410d8143102d2ba3bb6d1c7b18ba1657a86dc
-DIST ncurses-6.4-20230429.patch.gz 9195 BLAKE2B 6ed8c3cac11d3c3e52b7dce20be5b7695967622aa517c364d0f1af7f4a813befe5cfe200eb3097fba610e63e22092100066968f55eba499c9fc21a95bced7524 SHA512 f37164116ed9f09c51a62d90e28dbef68b19a4444c4aa7e2ccdafa3cfa2c7530bcac65b421910a273d0e34b91382bf4f7957f0116af30e13856710199dd266e3
-DIST ncurses-6.4-20230429.patch.gz.asc 729 BLAKE2B 2e063a7818ac443182ec4f4d8da13884accd563ab66e04297ca0bd4b9610f974efd3ca29dfcf13939cd9ee369c5e5799eb13a55050249036ebbc375e6ef8d6d1 SHA512 55167510e21aa3ad6d4a57fa37ae82308424ae9141e6e4756b4b335d30136675add5c00ee102d74ed93eccfc2d752eff5045d88e708928df3cecde3c0be77c79
-DIST ncurses-6.4-20230506.patch.gz 52834 BLAKE2B 55d2351a507a60aa5baeb9e7e392fbbf714a6bffcf4729e9b195aabc2dc81372336d0dc3501f95abda04491013220060983d2186531471694f40b35d4ef3196d SHA512 04967b96d9723b2939fe64eff4388ceee0adf478f659b58cac8601770dd7763fa192d673e78b33c267e00f4ecbfc2863bc49b12fcdeaa8ce24df39126f20b4e1
-DIST ncurses-6.4-20230506.patch.gz.asc 729 BLAKE2B 5ccb09f5b48a4a9c98ad4224cde68df659a365aca12210ec14a6519216e32b10531b1dfc4184bd12e62e1f0fdd9f06974b59866bba6115407d52712f5adff6f8 SHA512 2f63a62e37a15aa6a276a5d9a2c4b86a4e50af037ee5b1c339bccb02200d3e477b5b93ce5833a4d3933a952970caec3b38639412281c1df7c30d7b241bc3a2ab
-DIST ncurses-6.4-20230514.patch.gz 42963 BLAKE2B c2d27883884ebb2f14c523b5558d575b84fe8aa6b110a4f246f529d29288118d8393a955d8401aee675a764d52e76495d47487f52c3edb8548dc3419371def49 SHA512 0346fae238637c6a69024982485672e6b1447f5902d9cc6b9deff8296220a381b5b41b23b30d053881b09242a4e8ad728618342300c1dee63770286b81e362df
-DIST ncurses-6.4-20230514.patch.gz.asc 729 BLAKE2B 10ee649be87b46a03d1cb1c31a57ec9cb20da425604900540d04f806cc2c9e9a1e73009f62a96fafdbd81d66c7d47878e256d02cf5b9de9ee6f26621b73a4705 SHA512 57875d11844efbb23052e5cee32aa41a0bddb290069e33504e57613e4ab131efddc9c85f92af82b1d6bfa00182bcb9f1e86812538f5f209096b3ee84c67de280
-DIST ncurses-6.4-20230520.patch.gz 3090 BLAKE2B 93e376bc6250509c1a83e799efc2d4766354451931115d300b74c14af93dda4f3aefdd59f97467eb88e6ea29804595e84cb62c62733022b255d5368a74a38729 SHA512 bf854e4d6f8ed643b8841c9265057f06186699a083edb489e970d1cc8e752fdf49ecaa36518340a2b00a5c6ebf548b7651361b1bd2abb80467d2ce3f9861d28d
-DIST ncurses-6.4-20230520.patch.gz.asc 729 BLAKE2B 08db3a1a8152c4cc29fcc11b24ec3d1a6d3c425eed9a54f33bc370b86f26a13a9cdd273652c448e6e4dd179f5ca41ae653f7ef44902a10eaa18828e2be3a6247 SHA512 7bf2aa9442bc5041ce316af7edc2ff5c5da2ab1bf941c26c6592c8785dc0e47539da3bc2c1e570daafb6a293812f55b8b3b327f90ff9908984eba37e89d5eb7d
-DIST ncurses-6.4-20230527.patch.gz 9787 BLAKE2B 951a53b87056f2b3b530f03d0bab5a06ecf6bae0bf2fb580af8c0d96ae169e4813ed2063bf1696fd0fcc1cb0f7da03348904818de7ce454cbcb9a42bb939b6b8 SHA512 f600d7bdbde1f0752d3d530ceb98e9ba51a246a3bd898cc0d0d65bb8b51dab68fa5668789f5f86473c28eb890ec62cecf8e4dc901ac96fccf162c1a5f161f897
-DIST ncurses-6.4-20230527.patch.gz.asc 729 BLAKE2B 472421bd7c9093a293e99ec0f343ed471a77e7aa7f705cd99bb61f907c7059b134158c176fb232c542842ba042a1a88ca8e192df81d2d760a70f26a4d76ae624 SHA512 74a0ae5123b339c00f786d4d15a6c100d5d323731b7534e495dd396c9fd03b7ebc61d3fdf6eb71f2fa106160e15da5d093af6e4d53b4a6cfc53c436045a5a614
-DIST ncurses-6.4-20230603.patch.gz 95019 BLAKE2B b6523f5218b819fd53af288e9adc54001a86bfb683f3b956b2e2237ed233b12607116a10c2dcbf4c627dfc52bf0c915ab506fe9693e8695908110524ac4ae216 SHA512 c71863e458a312dd37205d2087e4bce4d3a6abb2c07b15ec90796953c3f422fc30d3094e3ffd176befd1de9eef1067153f8c5be682475cdacdb5b7c83c99363a
-DIST ncurses-6.4-20230603.patch.gz.asc 729 BLAKE2B ed072a6a00031bd4814f195913030ab597c5547f240309cb0fe95460e4c5d6d45477dfb054b2f09cbfc34c4eb583499902146fc498e58811417ca61e7a4787f9 SHA512 95bc59ecdce1bd7499c819e692a2d44f90c9734b20b3903034f94c7ee5efeb7b9f3f31ec1327ea00907c99c6783702af91d648d61b362e56abed5e60e7e11b97
-DIST ncurses-6.4-20230610.patch.gz 22125 BLAKE2B 2004558a329c8a6827818b782f4c7b68bb8c24cb93b22e1259363432c6cc5ebfeb716d81b4f14fd82ca22f70e4591877c9836b3a0dba58099f9fc6bbe5190947 SHA512 b11e7638ae237e0f9e8ebb9c7657759be8d9504775757ff71d2efafe589e4a81969b5e6229c171b5008a5788cdf16e19fa544f2d4b2fd24f122f8cd66ed25d61
-DIST ncurses-6.4-20230610.patch.gz.asc 729 BLAKE2B 2f7159fdac2a3d946ab787ce294704bde8da6cb7482c527edcde91ac9369b349c16b7d267e05d785acdc9447d3aa3e1f231ebfc616aed4cf452fd4c31a2e66f8 SHA512 3e2b6bf42e3b2f82eb51213b58d962ed7d11cb582fad5f710bd3067b2ccb52e1d4a27aff24cecf68a01b2bbe88f0e85c43e2edc6c57353926f60152a9b4095b3
-DIST ncurses-6.4-20230615.patch.gz 3562 BLAKE2B e20de7ca077ce7ce37c59beb731408be16beff9656ab115b23c46d94f95b2b6a92bc8d0ccef253403dd3d7e493b0cb067054b93e06e5cfbb73bdf1485484b89b SHA512 22779515ac54e19cfc9e84ef851dc15bbb8d818cae8e0fd2b866ee1ba20caf4168c30a72c7cb206434cf4db6a9bb09c016210a2fdcc2dcdcf9892f7a6e0bf3da
-DIST ncurses-6.4-20230615.patch.gz.asc 729 BLAKE2B a1fb16d1483ca895ea7db7ffd4992cd1939e9f2e682508dbb0af38d78edaec11f2fe10b547d801783e2c61a33252f24be94c9eb4a2367a19ef73a65f926dadbc SHA512 71055081b458dc285856c9916124025023b59005a2568d252ecc93ba21c7fe8edb8bbe933ae1675a0d3f606602bc19b2fbbbfb5df42fe40c84227547183d2b20
-DIST ncurses-6.4-20230617.patch.gz 29168 BLAKE2B e15a2a1fadfc64ddb64f26b4b267f4ed58ea5fa9b43e8664315caa6858787af61501710ba273ff12a914327b451a0aa329459d48487f9edb882ff9b218f8fc9f SHA512 29e5d387382d38a2297fe3f642441019bf829ff6e94d938eba85067ab455863283a50bd8856e4cba406c840a5ecfa381eeae2d6406b548927320ac2e99b89adc
-DIST ncurses-6.4-20230617.patch.gz.asc 729 BLAKE2B 3338b8020f37c6c19cb1819db9e2b9f9257702603757e7e107b74ab0e7bf1696c0a91e79fde1aa404dc706ba3bbd0e6014ae753147838d5bfc917df302daf408 SHA512 db5ec7182b070db9079978c05130f53659b3bd5108ad246b7f7d6696d1c739149508d1c5f3b9091bf4862d8bfa43bec29f5ecd7787d5840625e99437fe7dcbe7
-DIST ncurses-6.4-20230624.patch.gz 8748 BLAKE2B f61800ebdaa4f982694d38f51ad0478207b928f81b87db3d837bbfc53ba265a89f10add92f5f27a03c54e829a490a8c39a4bf3cd84a0c43bb2cf70ee7795e0ec SHA512 9592247f9eec8d5ce7cffb3e4f7f3a39e4c3c83c96d11db7bd8cdcff54a8fec936651a7c2aece559d0573ac244b59d1ef0b4d2e46368605b9f8e8b4a436e9baf
-DIST ncurses-6.4-20230624.patch.gz.asc 729 BLAKE2B 6f522f12c45de2824cdf6014edf6bc3f377d97a784d3344eae2dc66c4adf1a4043c1982224fdb6a4eea7a582b80c60f8556e8ae645338078638f14a6080864eb SHA512 fbb70541f028813a6815a37c258d7accc6711faef19e41c36b7953880bac645188e101a34109e3db2f263e9ec736fdf91f035431b6e2b84f6e591198f1fd6e1f
-DIST ncurses-6.4-20230625.patch.gz 3517 BLAKE2B d287c8ffb5f6314b9deb9c3954d833167eeaf32560dac674bfaa5c5230179e929dfffeb8d3d2a4310be7821a26a677886139e549b5d4376992eec9db9a0e8ae7 SHA512 bf71c7a5368d6eb4e676d57c720314f01b25d4a51108ba2018b3e1d4fbab736e18a7a39e2a662b611ee272a2a2afc0c267e05807255ab7f07d8b557b7895fc9a
-DIST ncurses-6.4-20230625.patch.gz.asc 729 BLAKE2B 58d5d4415cb61ca15de15f79d6f5ae16e28a372676ed26754e27d7cfc70b9aac1a23696b174ce9069beea0263fab9ca565879b2e9cdf6a150f7c0ca4448e1439 SHA512 9512bdb1eabe4bee0910969c2219748a4f88b9ed1338ce1709d61e3cd0173dfa583c050fea18a69f8b3fb504b4915ef40a5f0b9c61fd3acc96512c262dfabd2a
-DIST ncurses-6.4-20230701.patch.gz 62047 BLAKE2B ac4719825504f20195ef4ba229b1ee29649eaff66d63ffb226553050a1727f7b08f9e7d93bb5a7f042218afa2834c1663943cf3a64b6da6a10348f5637b8cc21 SHA512 e027eee228ab3473fcbae0786c0cf6b6f8533e861c5475acce3af2162f55b8ba6612e292d046864857a600ac3f59d2d6001a3a30a3d1b1a4239936f147eb5083
-DIST ncurses-6.4-20230701.patch.gz.asc 729 BLAKE2B 1ee18e5ff3782c2f271dbe857da94fd6ee4c994b1faa81b9b218b665e1e4e61d9b62d41c5439cc681da1b2a7b6fb3f3ea284387748680b483db473553b46e4eb SHA512 a53699f5c5d34464616e11d8c21f5d5e5b0f567fc145a4ad6abdf397807cc1215b9cb769deab9533873dc9779e267522fa6403ba1b56ef7fc058befb2a37e19d
-DIST ncurses-6.4-20230708.patch.gz 6669 BLAKE2B 4c662af33d9ee679abeedd275835ec786e2099de7e87d447539655147bafd08fb28eda64bc6f7d3daca2200abd6e351e5bad18a7592c1bbd7eb15fb8cbed194f SHA512 551ae4c5a0edb9d0e830b3c87c8ffcfb45c35537d60971bff72ab4d479cffcd7b5fb1db4dfdaec4b5eb2a06b0a4ec17074fe4007f2cec441be28dde02805174c
-DIST ncurses-6.4-20230708.patch.gz.asc 729 BLAKE2B fb54428fb1f43ce3505f1a6c719aea357471e5a488497ac15595d97201ebd6fbc109630e5927e1bfc53635f40c4cf2a8305c89d60cc8c570e1e4849e50a2512d SHA512 dd62ed66b315a350a12dff03175eb7a61ff1f86aa9b66683cb0c940a27cd30542492005338a7c099d81bfcdc0c6b0139b139f2e12f194b655caa6e985658343a
-DIST ncurses-6.4-20230715.patch.gz 53780 BLAKE2B 71216e305cb55efc55ce18b40bfb2390d3d23211192450f22a06bd35b8dd3460a0cd6bfbffa012f08632d34d4d5030b70446cd1466b717196949db345724bcf4 SHA512 c145dd5f5dd59e8cdf80b37cff427ff6f0af1597c4d550f8fe2a09a395b57cc5d37968d0cd84868539215d1750537a7f5e554410abba600e26bbde51f9fb6c15
-DIST ncurses-6.4-20230715.patch.gz.asc 729 BLAKE2B af309534f6ed38596cca07d278a6e40addb6198f26bedbec5e3a17d5225be7be5efde3a6b1aa9e32d085edec347686c9771677b6b37633b45f4492598c24f881 SHA512 2610bd6b77d68cee82f5a295200d3d2459805e101e91a28a42b3a8badb230ee29963736a4320060ce59b4c9ed40a69cc9111a49ebf24e12114d03bf5a836ad01
-DIST ncurses-6.4-20230722.patch.gz 59087 BLAKE2B 16e94b44300010930a55ea3cf0a9950aa74e9937acc09246b3943addac07dcb98c0a0bf59eff0bd6ab2347670ea0f25dba3a19504c00a5b4a0fa988026080911 SHA512 63f067d289c807830b1dd327491a43669563710f6f5b1d631c62d75d654cfa9cd5767e0bfe0bdec65777e4c92e045177ea864d370007c9f4cbff4b73e3a0a0ec
-DIST ncurses-6.4-20230722.patch.gz.asc 729 BLAKE2B 8f915ff9d447bb2b68bee18fa40bc7aa08fb695aa873f983bac4f162c7ab355bf59a8cfdd03a377ce55e1128b4215c1265fe572674f420fc410d07ee1b4e3d98 SHA512 3c45f818e6bff4c6e9aecc57d4a236bdcdeffda6e8d342cf0bbd523cbff3af61bb27f8249789208540df4702bfbf6c7473b165c00ba770408b0f2d2547c39ed3
-DIST ncurses-6.4-20230729.patch.gz 54267 BLAKE2B 3c3b6fc5e24bf39b4c0308254f86a53cc470fd79d42c0b4377346642633fb04329ea4e7ed167bee4b590e9ea66f6e59fd73663ef83e4a711ec6fc4ebf8ab1427 SHA512 84ec8e0429364a25d0b284a19d8cca2d14e6308f0a3ff07d1a214e4cdc93430bf3d249471518c675bd040cf113da3b760337d7f268a776318b94b56c10264856
-DIST ncurses-6.4-20230729.patch.gz.asc 729 BLAKE2B 0aeab7b90c4919d97df1fd7c717a8b27a0d506a4d04d4b73023089298f0975cb1905c9f6ea0884bd83fa63769d9b27d84b6b26ecb46a84b3cae87a5b3fb8c4cd SHA512 eadac56f03b8630a21971dc37e5a9c9afeb0402d9f784cf1886d7a5f737ff4fdd5d4caf37f7bc96d2ea13e517809b71324c850ab21854ce918f81cae061d78cf
-DIST ncurses-6.4-20230805.patch.gz 7681 BLAKE2B 1eba96968b7835555c22299c59f678dc912f03c0a3c55dca87f796e590f37e96442664174ad609005e2d6affa011654a4729f1489d0bbda6188216e83c500d82 SHA512 604a098bb5888209213254d195da8bee6b16ecadf5cc843cd50cf504c9e9dd4b8e0115a4ed512dc64e57567270fc35cc10aab3dbb81f1d033e928ada8a4d3610
-DIST ncurses-6.4-20230805.patch.gz.asc 729 BLAKE2B dd8fa046eb07fef7b60b6854fc0c8ae5917abc9ad1793ad3dfb699f1d0537cd17ed3196af7a795525d85fa5164156e4dd33af4c13934909eb9dd11d3c37dc097 SHA512 59db184440e47d1a702cfc5ee1eaffc1c54664015f727f31fa5eb5a1cf6f86b15592c7918401b69b633bcdb6534be6f29dd20c823fc98a934dd857628f6e0b53
-DIST ncurses-6.4-20230812.patch.gz 21242 BLAKE2B 0ad1068e92016726fc56c51843897bf2eeb85ef19236c149265feaeb7a2bc512b1f897695e1675d58d8866fe75f7bed3b9731c079587a6c02c3a5d420b6e76f3 SHA512 e5f2ff264afa44f632a45e050bbeab59d2f7e27885f9afa72db32cfd7a672f95de998906df3687dffab5ab3a09b50e24bdd3f546e7c81a6d521ebccf3a868749
-DIST ncurses-6.4-20230812.patch.gz.asc 729 BLAKE2B c2551ef9da2fb12a9c4a8acbb253dba7d5a026c295ce43164e892dc0149438a5c67313fb8f18ea3702bf250dbc296a658557ca14d4357e7ca44b64a6e008d05f SHA512 61f81ad20584a20e2c15ed2609406f31017102bcf692d3cb05af4de1bf48be7f68b0880c249f33b0480dd64307b0ea97ba1774f321edec10fc0692c1e8372094
-DIST ncurses-6.4-20230819.patch.gz 24761 BLAKE2B d7b8b3a375d7168f83c904e0ab350455ba51add882bdd916dbe5fd65a1e51a1603df79349474cc86245a15fd3e2b3831e093b271c9db4d5629bffb793b9ff5b7 SHA512 30c1a98a46dbede109f741dbecd379d9bedd42a365be4d8b935ef745f03add48dbb44defb2ed7c102ed45a68853183d0e38a08cf355cc4f4bb82aa29203a339f
-DIST ncurses-6.4-20230819.patch.gz.asc 729 BLAKE2B bf5eb879b781b8373d3f9dab69b3c6c027217af5e67734de01e292ffba58ab386b7b9f939ad5253fd330918b3d799e9c054ddcf9b454d2e84e4cff4262e62ecf SHA512 0e4ae793efff9c019858d9a0821402025510a4ec3716ff394258758665022b639cfff6e9c5fba698acc7b3bb74c039475a41511f62141e570da3f19aec045eaa
-DIST ncurses-6.4-20230826.patch.gz 6017 BLAKE2B e20ae640651f24b71c720a71538e8bf89b61fc63ca2ddea04725f66b83587d2c6d26c70ba25489d9e268793678a8599eeb7f0865ce47d9a89a46d8e9ef57f784 SHA512 1af5953e241606b9cb2d3b12f45da9f2348a3bb40c1839850e3364639ea5067bdb083f6b9518669aa42b8a624d87b2546947a2aa8e74ad2c6c8f1c3fd15db5f3
-DIST ncurses-6.4-20230826.patch.gz.asc 729 BLAKE2B 147e368afe357716a70c520e0a2e92dc134f8d6d5f387e8f00ed3d3e9b416b5e3ba15ee6a02e91abebc41c8798df3258f44a561f79d8b19837bca5f9e23f6050 SHA512 84184f7b0e30dc44b01f4556aef488100e2bee730d19531a918b5de536414e814820bcca59c25b79c14befc5049d76fdc0f8048889ba16590d96edb7e902420e
-DIST ncurses-6.4-20230902.patch.gz 51844 BLAKE2B bbb6d896e2717feaf30ef4f3945441b9fd80cadd96e0319b27dd17c0de845f50721380f0b5d054aef0413b42e596778306fd9590b6552839888cd7dce94fd197 SHA512 1d849f4447066e180bc5f0c3c62f6694a32b4b254d732e4304fc7b8eeed276f790b6e87846eff625d8a739c77fd38304a33e1b3dc8c16824adeed9c51c6357ac
-DIST ncurses-6.4-20230902.patch.gz.asc 729 BLAKE2B 3a20532b223263dae2c7a6c657983c113b465d74d8b690946c46e70187d17c4ab743bf837fcab5aa6bed7f2ea9d604c7a3b8cb37ebdfc19b66683d12f839020b SHA512 aa3de6f6bc15d76fe867bcf0d8b8e307863ea5fa935659f0e2a5e7925acc1eed6e02b70f072e6d3250f549879d41d29038814b3a5483425af5e4c4eca524a443
-DIST ncurses-6.4-20230909.patch.gz 19653 BLAKE2B ca11d7df796d2f1a294309db49cfb9f8c158f2d3db2ee6e632e8f171a737d5948ee239f4d2f5fc7fd88d68871f70bbd3589cf53d677eda2420235f475d6d96a3 SHA512 340f685e1d7a495ea07c7c492b2dae4e91005ba6596d4590e28eb3067a3485aab4d4b390856837577730a0a3ce7cc7523fe19ede50d5d6906c407a576b2bf401
-DIST ncurses-6.4-20230909.patch.gz.asc 729 BLAKE2B 213018592dd38ab9b8493cf45a2253be44ad2497412af19c5e93aa6d940896fbae4cccd0ea49a8efae36ac72b592a371c1b517fbf3bf6f07563dcfb9d0a857e4 SHA512 a0fb4b1f9c2df404a792e71f29f2397de0f14a695adbc38e379278e9a1c4ee50ece3fe3f18ac85217fe6ac5ec6daf06738548f8af6d8db2a1fc3db54244c3500
-DIST ncurses-6.4-20230917.patch.gz 153988 BLAKE2B 6df37b08266c350de4dcfa28cdf67a546a64675414d133899c48181aa8aec5ae8f73dbe7932733a406cdc1a3fc7933f4bc7884c744087f057c923f3f3d7224ea SHA512 75b4363c1ecdeebd20aae2a2289e0834ba7ce2e0ac104f7b47179ef651efc0d9255174a0bc2a374d3e03255098715c97b84d917d0268801288ae5e1d9df59ed4
-DIST ncurses-6.4-20230917.patch.gz.asc 729 BLAKE2B ecb3c166924454271a49f17d8f1f84f181cf490bf486b0618b1d7b2c7bf0d4aaea4da5cc648e4965e5f8f3c12d9cae0f88fcde8958b7b7c7854e19196c3ff6e2 SHA512 f6d81df216d2cb8e2e741ca0bfebe164c96fc8bbd88d17bab79629a74965b416ded77067dfe6beb751e6b9ea0f2807d7b345aa093b1e0f2c352a439c3d34f621
-DIST ncurses-6.4-20230918.patch.gz 1772 BLAKE2B 2c5b08699b1171c51940693c253d40580fcf34fd3053ee0146acc82da575c2b08b0a43b794b8425c08edffcf3cca37dd6826b1d20d4bcf8109e1a675b405ec22 SHA512 e8f9d325278ec87b3971b954968a061d5fb2345d2c1035348a07834bc1135c6480bd90c9d0111925729c7000c44c2b45853faa1db784f230ce99c156779487f9
-DIST ncurses-6.4-20230918.patch.gz.asc 729 BLAKE2B b590981a91a23b98273b8e4c1d0d12f6eadfda00e4a8f77d7031de10a21bacd049de9c440bebfbb29be9eb5d99b2dd43f2068a1af6dd7d50c9389173aab5fd8e SHA512 bb1a800a7a5eacdab7e95816c035ebac8dc190c55ceb41351b1a0169d5a63a2fb7d26c93738367ff7ca95c9769e06d26c67a0f2df04c6b3a93c924c35181253a
-DIST ncurses-6.4-20230923.patch.gz 61673 BLAKE2B 5501e262a9495f30ac79c327fc95d0f5e54e8e246db7c3acb329ff08e17a2e7502f35f8b8496386b13054471927d52494dd8e6b534ddbaf555c11b312b520ae9 SHA512 3892a8e3fcc3c048b20676931b6be02158537db3afba87d63262cfcb2871eea978bb84879bf5f8fbc20ec52f411a397de50bc83a35de8ba5bfbd22f247dca5c3
-DIST ncurses-6.4-20230923.patch.gz.asc 729 BLAKE2B 327687ccfe242f4bd82631c5b92e0146181b2ce795394b44119eb64a7b88739362502f61fffaad780c031cd9f98da7406f3d2bc1818f6fe779b25bfe1bd63a05 SHA512 2671b781ae1fdb5d6573ef14d5113c656c7125be1745d2d94487e44031d39438aef56c992fa2d59cbd3a0e20265e552eb3b0a9b25fd8ee37af2de5d9189a3768
-DIST ncurses-6.4-20231001.patch.gz 101411 BLAKE2B 25d644b708901027f443c6d93e30860bdc2af2d41995034871fa9a33931bc7ef9c6d62ceaaa96c139bd46a4198e7b727e7c0fc1c130cd495fa8501d45fac993f SHA512 901f391634fed7bf7e46db8a2242d9c4f7503e84ad31d9068e9bb7fffaeb0380eeffb60992686bd8442a033205ac9f27688612be1d26c1ceb30708c62ac551c3
-DIST ncurses-6.4-20231001.patch.gz.asc 729 BLAKE2B 92e50014775ef7b096983c2375884464b299c56aa49622ee095ee13b5cac598c77540319644f9c04e5a57adb57d9d01d38f5e8122e027030855789b06b766024 SHA512 051b62b3550d2a78799214f08e3e61b0d3bcd964d4df5cf320c44861a812033805fb9a5e5f079cd9ab6e75c5552c7a4b3a3a64211f05b94d602c5d8a8ef041d3
-DIST ncurses-6.4-20231007.patch.gz 67626 BLAKE2B 81cacf8b01215844ceac5d5e8e4b8b7c8df9b4d8fcf07646745b6d8f97af6261f4999261afcbf9d7ec4ebd333853350cdc7dfeef84a33eeea2b0729977a2724f SHA512 f3ecf1592fc72906e3a2f9586061a9d7c6dce31d604e5da9bf83c9d90147fa747c2bffe006121d14e318eafa0701c2f834f9a24968244cd86aaf65b3bf863ff6
-DIST ncurses-6.4-20231007.patch.gz.asc 729 BLAKE2B fdfe7216e44b1b5dc4bc10d495a575ebdfbd611a85540b3be3aff4be8580d10b7a5b335d854d8e0d85d5c811e9360de6ed35437cd8977091d847014d03bd20b0 SHA512 d73163070853034a23d893619fed151757dd153da7aa579421a48deb4f82179e69f2ad0e090a7c6facb43709fb07ed5cf515436a201ee40400d16e9bbd131dc0
-DIST ncurses-6.4-20231014.patch.gz 189356 BLAKE2B b974507e8f5f873c57dc8d9a2a008cc577b47717d7a1f472e52ed06c5c4c182fdb9baa3a86f023dec3d63b3e00102d6b0d1ce2a0df6ab97140dae93f76e8c12f SHA512 195e220f76d227b7233551ca05d5368f8bb3ca58b0a3dc26774831ced6b4c69cba8051bbcb9099f474d7a86e12bedafb913aae285441fc51e760edd0550a8697
-DIST ncurses-6.4-20231014.patch.gz.asc 729 BLAKE2B ce6b6da4fa06d6b6f9e0674f4b64221f88c5477ed59fa57c5065934cec388d91b8b3a90e0259b477c4eb5b2fdc946207916cd3a566180faa35b169c53ca48db5 SHA512 70f36abf69221bdaadd36797a2c846dfa623a4eb7c27fee1079a1fa4c95e6c5ebc1ff7a3ac6c0d2e4761b96967c1c6afc736f593d93a0388c09c3c3b94f33af0
-DIST ncurses-6.4-20231016.patch.gz 91957 BLAKE2B 31564200abebea4d904a428fb6ea5e1bf9d100f67e2cd5db7683c4cbf9ed2aa0aeaccd390f4c0871da5a5a60911e4ed4e97a08149244bea0a2910a0248f4bca8 SHA512 c09407f16263f2dcb49cd70ef05adc039f28da7124e46a09241f9be03b729a80352afe693ad8f9013d18b0bd78698ba588582aaa0759b7ca74f445312ebb9879
-DIST ncurses-6.4-20231016.patch.gz.asc 729 BLAKE2B b659353515fc77d04e0aef074e243362041907fb96ed15fccd819205edb12760004c2e434f98c014bc996455da608942b29cffcf090802da44da2fb9cb466652 SHA512 9a50d06b351ace9893fc9a5d08c14968cc79e6eec99c5914a545e6912d1e518db6cc33a725f5a6839261bfd03bd2d4c27403b7cbe53101115e11189ba8225899
-DIST ncurses-6.4-20231021.patch.gz 104022 BLAKE2B 84985c8b1bb3b3cf0181fff3ddc50a378e144aed5a3896e44d0fa56fd8807ec8c37a381a22d87d0aa7e693a0a0363e3e32614a0ccc3519f89aba6fac755f2c55 SHA512 0435ada2640ec65894b47a3f07d4efa1c5a15d46927cee3f57458e0d440b94d81a2869dfc34f1a271b6b0a0b9556e9860dd67806159e75265d875bfd96d58064
-DIST ncurses-6.4-20231021.patch.gz.asc 729 BLAKE2B 4a1a2ce1b8b237c8e67f4a98f604a390917c87e9ec96ecdb990413f631cc5bb62af1e4ff8677c51f32ad6a5d8358321c33958f4d6cbcb8d56c58b1d609802992 SHA512 7ddf107ba2b2f59daa639e5f763ccef97a066dc5e19f5014f1b295db2627c300d2b4a528f1cb3621796944fd63ad11dd3aaacc234addb794d6a494978bb32b1b
-DIST ncurses-6.4-20231028.patch.gz 113875 BLAKE2B 16ce1507ed43830840068ce5fbc0777af46a71a14fa547bc73d0e42e6de5062e83475b432f8e849121d56371a7150f223a37b9d76c85d932e60bc33e4131d7c8 SHA512 9b91df0d75315a7aae8c5189ad91dea1d9d45864694494c3cf9644ac341caba8217b931d4082ba89090ff0f2ce9f06d75cef7c3fd9e45db49f708ea88ae4f947
-DIST ncurses-6.4-20231028.patch.gz.asc 729 BLAKE2B 5d500540a1e108f6a56d24fe3e9ab6843a6cf9f5dc330f4b0146d53c9e5cfb64c647f21031bec31353bf989050a4b7ec835eb928a34ff6a75b8e26ed4f40b606 SHA512 732222068452d3caea4e67edd459dedcc5bed7ac35a8db98ec319278dd0b8a65c05729c8a095d0756579b90a80f9f2580f6c71d2dd4804445f7a54b5872e192f
-DIST ncurses-6.4-20231104.patch.gz 6145 BLAKE2B 458fedf34df29affda1970efdb9d8acef28d5f469335d78b62e6ce25da7cd05e21905ae3a7de8ffd067b64d07ed8e76f53f6f7aeb94926165e1b94191d441874 SHA512 35ef3056d168db5e031a18c497ee8d5a9f71b760ad517aded3319829e722804d62685dc49f74063551663e11e0a400584ea455fdc3f0a7bc06bf5a24515fb0f5
-DIST ncurses-6.4-20231104.patch.gz.asc 729 BLAKE2B e7858261fe5de878d37a2c052723b7889e14be6ef5c6efe75859beb89b68ba96eed3c0691bc9465273aa277d17927ff7dea60d81c0b2f96053742733fdb64d0f SHA512 900bb9fd5ba729f76788fa273f4b9d04747a8c7fd627d358621222f9965864b59c1d989f55775b766d099a1a0081a6e195ea6a16216faa77c892154304da58d5
-DIST ncurses-6.4-20231111.patch.gz 31095 BLAKE2B 12ec2d5a693a9ba34abeb1b5863f9549594734138b01a698ff9a55c9cc0519fa9777045e22f3623171724ff4ed841f8ee373cc2eca540aea19a325e0c63d24d0 SHA512 3170ac79bea59a1de9f91b647ac41a7f2df3c93943bad1573322cc3911337c16db2e55563198f6dd5c963c31800636fef98ea7c02316f049071b2a41b6b15c14
-DIST ncurses-6.4-20231111.patch.gz.asc 729 BLAKE2B 2b3e510d826905afe5cf23c4737874cb2a569bc6fd3f081a0eb16777d2791d7fad46d7620f1f229dd5ba9652095199c684e5e5d6e8f38947226664021746c24e SHA512 bfb5d15779ed7088bedd7ffc26d16af69fe8b83706088a5171daa955425e1f0697429f3e29a5d286055790bd2e8512d6507e85e2b541564f349f8c3dcf274221
-DIST ncurses-6.4-20231118.patch.gz 15202 BLAKE2B a8cd152e11da3eb4b7687e1ce05afb86c11d519f0a798099c459bd50a7e019353c71ba55ba7872b57131948e945786d3821f431a3a0d5279ca0bc111f080a5e5 SHA512 d3ecbbf17b9ce8d899fe2a77fe884ebd95ed091d0f194ad6fed98aa9897a59642242b2a3a04b0fda786251d7f584b3ee2fc402d88f3c1a4ff8ba600cb8e20d01
-DIST ncurses-6.4-20231118.patch.gz.asc 729 BLAKE2B 76767bba1425ea00cb06415c1011bd235e95ee8b360138d237224972802800a90c582506e121c2da63f6ccd90ff98193229522672f6c66bd68af9cba3988a271 SHA512 fa3e4fdef23e2ea258ce1068fd18afbf68b5406aff6bc37d78556f2337f9e0341290641dc106c862596e8fb62606ed13e2013afc66c5fb90c13618ad561e21be
-DIST ncurses-6.4-20231121.patch.gz 2725 BLAKE2B 8acdf10bbc3db2236e6088591c19a4c4996e8ce337b7155828d82474b2dc1f00bac68bdd530356e7e30c44c8aa0b9eb5a0504848b58b2406bfd5371e42c28dfb SHA512 673b445f4393d3705cb497232ae58f7a5dd07143a10973a319f40411b946bc0b2b22ba8ae979ce3380fe104077dc63823562349163c266799b777e7f3ba9f716
-DIST ncurses-6.4-20231121.patch.gz.asc 729 BLAKE2B f91437a508906e28bdc9b0b897150db6144280b965bd2c669656a84dc4cf180a04b0711b8025f536bded39ea3af02487d5067fe8b1add76a7695778c58ec590e SHA512 1c52a1d935ca7ec367e0229face73c522d232ab1ae0d3ac33b7d2d5398823fb6b7dd232c7d3d3bc08026b9454367a9e9fa86e8a2a0a2de754bf638e594dabe83
-DIST ncurses-6.4-20231125.patch.gz 221965 BLAKE2B a02689cb8f5ff85cac11a31559c261573221f64e55e25ac55ce17d648cc56e3db55abd8742fd08de8c9192c51fcc83bd95c877cce8cf5d18493e7f3567cbe581 SHA512 c838aa74fd81463dcc99bc2ef50bfc382b0bd0e277f46ef996a1d7bbbec2ca9588b4dde626965170b083cd385b7c34ee1e7bfd25fb0af1abdb83da0da9d05d7b
-DIST ncurses-6.4-20231125.patch.gz.asc 729 BLAKE2B ea13453856f8b4c1565a3b708253ec7a35d921e6a6f162022370cee17b261a7fdda861655bbee87aac09f481f3b36c8b6181654d5c5d7e8468ee9a0d87399973 SHA512 e7174e87d338d35e487dd1f9af22fdc71d48f2ab2ac1f8e8158f08994b35395f6f5a36b75d0a803af40e59d91fc47e1c064851c2cf1ec02bc8f64a8f5a0f4f96
-DIST ncurses-6.4-20231202.patch.gz 50653 BLAKE2B 20d9973db850d0d19003204308c052806af6a44d1c2a03f233b0a8c25a3668b1fa650de91ee2f6083eef15bfb711bbb792f410feb918afa94d75e612f52678c8 SHA512 08ae960c00fe1137986bb5f19e3ba2ec96fdbf6203fc37636c95bc8aee3ec204158a8b28119c9476df41999ecd77aed5f45df25c9bcf1e681f0404329f14afa0
-DIST ncurses-6.4-20231202.patch.gz.asc 729 BLAKE2B 25f07e646f17b6083c0cf6d57fd9bf1cd8a68e00f310c3ab68659cc0412bead62dd1428223b7390dd5dda0695f2803b15456462d2c275da84ec79742662a7208 SHA512 a28fd17268c12dd1b395523bd307aad98ad91ac6aca0e6557d74b56256dc673d1dfe10665dd465d96ff0b44eb891565ff3003e7f7bbf7d72b52c09c8adab5f8b
-DIST ncurses-6.4-20231209.patch.gz 81338 BLAKE2B cc8bbef3e8ae839f67625e2e7c69f853a838e1be7642db36b0768c37980b069d5b5a685756251b6a74fd07e44ea94644b745e1f4fbf2195d9a7c132797d84ebf SHA512 40057fbf43fe26debc139f47fb39474843e296fac120a9a8a17e2da7a7957b15cd73ef7a97d553ebac901cac3f8de2f3b31d7d14503ffc2c61c9b9b4049800ff
-DIST ncurses-6.4-20231209.patch.gz.asc 729 BLAKE2B 8738944f8138139d701de123253d63d1f61c1c8f92c63e6d6e5c28516d338db693151aa295700128cd56e53f0c28a2ad08006473d4e164290b1340663d35bda5 SHA512 647589e2d820ae9ede81e7119b08e9215de63f145cf51c24c337bd86983a7b2029c6d51f53cef6fe97962f5a507f3b64f4512c15af8bbf041796bf5beaab275b
-DIST ncurses-6.4-20231217.patch.gz 189513 BLAKE2B 26c0158ae6b82576f2c7f79f881417655551ed208cb1af18fe54cf0939d2a9f5c3f109b07d0eeed0791c6b332bc7b3dd4a5bbd07f59f4ba83389b3800c0c78b9 SHA512 cc59856be71ae35c8c297c19d1f4ea39484258089c95b72b2a41b150edfc54fcf59dc5c4e6b155c1d09f556263af56e3d0cc9678515081a5608c8d9289051a58
-DIST ncurses-6.4-20231217.patch.gz.asc 729 BLAKE2B 70a4d98a71d5346b311e8b5a3fc3c30520e0c5d244f42b219eb0eeaee7dc51fd7282c650058c2145af6603cd25f3e24346a6c21dc5fb4e15d0e0fdd863e9f4fe SHA512 b4e18ebf39f4591a22228da60d9ba95d108c087d7744daa4b33c65ca702b6723e44c240e2e8d508606da6a11f1c94fa70f23a9aa2066ca38c1ddfbff2a0141b7
-DIST ncurses-6.4-20231223.patch.gz 107172 BLAKE2B caf812ee111a6de68a4958748bb78c1ac640c94ed975527ba682578951d75d10004dd50ec0cfdab5eeb76bce2207083abc04842fa26db9395064f72304b2856c SHA512 c6de7bd56566ca3bd5b789bfcaa1188573400110ae35ce5ca9d4ea230671a13296360fe3a4862a097d436b9e5e422f115867a8879745d5486393a9bb829889ec
-DIST ncurses-6.4-20231223.patch.gz.asc 729 BLAKE2B bd4d83e2c102cdb899854ab203a675f02a82ab21501e7dfcf656bbec19d813c0fc2f1a8d0cc126b20703bda9b7a057200ebf813444b5dd18e35beb50e80f87c2 SHA512 374c56304eadc88eec577741e884c0313e3419e9179a128bb92d5e622f4ead3dc3e78ec25421f6ce813b38598a699a8bf7527933c95cad1f2ca181911b0c39b2
-DIST ncurses-6.4-20231230.patch.gz 75387 BLAKE2B 730aebf19c91cf02ba7f28672271734e266913e49ea83c36aca10ba7c7932c335898c8ef294d881f5ae7f263a29886083eb90ebc5f2b9f9e1e60471b0d97a9bb SHA512 6ff39e65fa674dde1aa377db47d66d6143b107199a41e6497c8633125d3713d063ac699435f9bbbf2c7f8a40a5b06433d5083b0069337ccce51ebccf5e54bfcc
-DIST ncurses-6.4-20231230.patch.gz.asc 729 BLAKE2B 490fc8f5673f2efed7e62bfd89d1d8ce7a7bc11d3fa7a59f68720a694a19bb5bb44d8eac86695c5173044c1128f95dd1d1ce341554e498e6fe429cbc4857c968 SHA512 abc3f3dff374067ab5c2ca26e752bff8148b658efb3507f59ada10143714b8b70710f691afbdc7b231bca0b4ab4db2fc74c7c9cffac8e758a8d22d0f696d5a4e
-DIST ncurses-6.4-20240106.patch.gz 77283 BLAKE2B 50234e8452ac53212271f2a17d1dbb2308fa2c9b68ebb51c272b018dd5c6a4b9769adcca9b718b28fc7289698c01f15f60497bf99a9102e855cc1d8fc44c0412 SHA512 66ae87b463d9239c6953305b4bfb69434d50c89fc0ce3877f1e9dea54fda427e0c8ebbda85275726c7ee1c07b97d9163c73d351fa8fc7c6adf30361c89780b88
-DIST ncurses-6.4-20240106.patch.gz.asc 729 BLAKE2B ad5867bee1ff817718a9540624eda20b6ef62a63b7a19728c5ff0b988b65ae64fc412e196badf29b7c27b629a756f2899c88e29b9f5cb15b90a424ea65a0ca59 SHA512 805a3d86cea8b099d3d45be5d794de73c01e533427bedbf8ad86d965bd3c84e23e9937c1c0ca9898c3b2a97ddb063e53d88481d36d288c6aa554d85c5db697f2
-DIST ncurses-6.4-20240113.patch.gz 212108 BLAKE2B 8cff40c4612e0633e1938cfa82e255b99efdd4c6383928c59cc0a46922b76ed758881b7ec280ec6984336ef2bcb6ac0bedf85fd1844add9337c9a6905e06d3d6 SHA512 38a59a574d53008cc3b298a45b08b86cb873dbc130dbeb8842f3fefbfab6a280e291bde187cd2e50b7b221afdafa087889a6b5faf305fefcc5444402bcd0b0fe
-DIST ncurses-6.4-20240113.patch.gz.asc 729 BLAKE2B a62a912a0b4d4d08a6b319e3beb0ba17c5359875376e920a0a31c8697c82b7a9e2bc2547ccf95fffe1def3f299c1d1379ea14a34ff86b3fff91adb9c2317d53f SHA512 473a9aabe87dcabd19677b8da1dd060212757fa50dd06008bbb188c76a53ad147c15c7796df5a643d26621bb2dc440dc8d69554198fd1e3478394cc15d55af76
-DIST ncurses-6.4-20240120.patch.gz 150509 BLAKE2B 89bdc8a958582269b48116a2484015087fbf53bdf2e52bd80cc2fe9be01dcd317f83c1c5dd9e6a9e6ac9f06717f7900ab1828bd2d69db891361c5fde8ea44592 SHA512 5c1fbe8fbcf375d6392afa53904a747e7bea1976fab63fda35db92411a4770ca4f71f3d4020fb51494d543a1a33ea743a590a473107e38b92202882bb17e4903
-DIST ncurses-6.4-20240120.patch.gz.asc 729 BLAKE2B 5c8a59cff6de9a00ce82d05be7462a9baa5c01cad6cd3173fd10224ca3081c0f7eed9b6b451bf3921b1ad4a7c94379848f8dcc3e676a0f6071516f64150c374d SHA512 def46080c3511258d6ea4df09dde6b4588d9c59298f938afd0f48507c4b12b75140c8801eb6e937f265328613174d0237f02871a52af68b57dd8b13f85620767
-DIST ncurses-6.4-20240127.patch.gz 24225 BLAKE2B 571acc6b1f0c194f88f76b4fbc0f76a03db4ffdb41acf813a847770c3642e3ccdddc21ef2c26a40de347ee3752749f3d8f9834c4418b96268cd69c0d3d780aff SHA512 0d97e7e4837804b2daad92240300bb4267ba7a845271adbee9c8e2173a973086180101365fc77fd21f61aae1ab7549764cb37b5bd8edaabfdc6deea2baa11379
-DIST ncurses-6.4-20240127.patch.gz.asc 729 BLAKE2B 0378d7c11395fd27ce4366668c69dbef84a0399cb3bb43673bd16334b04fa4b5dce321ff2543b1c79d67c2bda6cdbf795eeda994a03c02060bacbbd0ab4107b6 SHA512 293371e914b5577e66a9efa775a6409ea19a65ccb3086b277a7ec083ae26c00154c7fd15e1d30b86c5bdf04c72245c7f21da463a5d29f109f4c7e4f6b7945e97
-DIST ncurses-6.4-20240203.patch.gz 3868 BLAKE2B 3859b1e5ea907a0340ab4c1f0f211c4264d6efa8a04f7ec21cfb4b4a8e8f956822fef926f24bfa25ad6c8c1b0467a05a96d5316dd7e06bf71ce894b6e897d21a SHA512 729ff4a076c5285deb8ef2a187ae4116826ac2f50aea6cab19271119035d13f93b6ff0fdd134e1066b1075eac5ffa3289cd3e20a32e0d07ec533e34818496885
-DIST ncurses-6.4-20240203.patch.gz.asc 729 BLAKE2B 9de1398c7ebe91a10b98364f12811daec8d1b9178514146704810202d8acc2aa30cb7f5b4ddf62c47794298fdd2832a4faab644d63cd07f6b60c7767d6cfd5ce SHA512 ded529f2f917f9b34db3fbdd221b91138b14fccf123e2a2a89115ec3159f3d2085a9f639604a9df085848837f41c437819e74cbdccb92c238c301f75f6308205
-DIST ncurses-6.4-20240210.patch.gz 3820 BLAKE2B c200bc74b5703093beb85e4ecbb49c8a7fe0e8377a28b01af5929ffbf44583d1d68add001de6e565010724d5a66c5a0e1735117753f7b8eb31050ffe2bc17de0 SHA512 8ac1b766fec97d1aa6bd61b02ed176acb70e59a7833f8ecfbb4c8b8d80529609a58f6f7ec6d410b7fcbae32f818af3f613ff571de7e4ae53e2f1ce7b0f93739e
-DIST ncurses-6.4-20240210.patch.gz.asc 729 BLAKE2B dd58d7dd963773b80b497b5fad439889922011dc293a9c09b43f40edff5abe5884e05691349e0991a348bd531920f1c5bbe6a0f5f7306b86a4eeb8234b187244 SHA512 7ace2db56b71e21d8c5ac5786cf5e3aefb97a767f08fcedf90e76d26bd5f3770200f89cf7321a9876870bfefa9cbf0f2ad344140131f5a2d3542f57de289b9ed
-DIST ncurses-6.4-20240217.patch.gz 13442 BLAKE2B 946d39849c815a3924aed7ba5ef96321b79310bc4822cf44426d340d2156c0977eb8ded858adbcb7bb6fdc08931d868b021572a5b28ed871493cd11967b302eb SHA512 cd486f12bb11d0e6a4d575902d22276be3bffeb66ca5e83d0eef05ea7474ef91fd174d6929e8e4b05625eee9bbcd06618ade71509c98d208f84bea031e372f77
-DIST ncurses-6.4-20240217.patch.gz.asc 729 BLAKE2B 69a3ce2018acd626babd44fd0b286d29d927baaa7b381b8feb2961b3c5a731905ddc0f0fe62252101497de7a49adb150fd8e0feb04db2d5c2f78ef768d9cf593 SHA512 81f4f4c9315ef1605459041d2a523c8751a926f72e93a513bd922ddc27c91a999a11ecffa79a21577739dc6a46f23317d8867a2a5b8ecd372c5c820211da71c3
-DIST ncurses-6.4-20240224.patch.gz 11576 BLAKE2B 0ba4a7d7d38fbb2a0a985f7114935f4effe7c12a138af1a9aab974f5a38beb7986f9f9e4cdb1ab5563de68d7a99b762338afab30b5ad0aef299e4c677719e317 SHA512 58eec6d77026d58488711d8805334f17474bf30f3cacc10abffbd5bc38c0dbb287a586af9c0fc918f9f98ff124532c95e4d92e0850117982ca5afe0dbe9dec2c
-DIST ncurses-6.4-20240224.patch.gz.asc 729 BLAKE2B 18ef11d2ed0f94199fe28e732ebf2460dec8a42705ae89fc339e76870c343b849a311d7915cfd042c761465ce5cb4f42acdc9a2bc57312138e4e6f51546fed23 SHA512 b8e096066947aa2a567a6374afe41fb4f96c869eb3fed179a24d1f3a51af24a0bce135a9a0cb2680218224812b1ff2762470c15292d4555bf9f4231571b573d2
-DIST ncurses-6.4-20240302.patch.gz 37371 BLAKE2B 5d4d5af8fc10cab3e7b6b14751406737396fb5c63b361186d5881ed08cf61cffff64df5a326e1114e4b423f575799bcd0b10fa2c29ed61d4c123a373087d185a SHA512 4eaf59d3ded356f21c891e0ca9dd323e869597489da7322f3ea7ade14a01b2b205b7cbdc9d9beb38abe6f76f2a287a1715f3006599dcb4cbe5e7eb6ca1430e3c
-DIST ncurses-6.4-20240302.patch.gz.asc 729 BLAKE2B 6650fcea22bbb9fa619a9796f29ab63c0622f0be27b093ff8e7ae582fb4072ded5797f2f06064f3f1b594d037d8e74a84a156f9f213580da208b1c896be9c911 SHA512 08030171f2eb9208805f55c0da741883472e31b0443ee1e9c2758780e29ee3da3bc88fc91db1015464c473a98e2bc7556080fb20e69a07678320a5116d0c4a33
-DIST ncurses-6.4-20240309.patch.gz 2631 BLAKE2B 4f101f8f263c378b3c76e2da1399b286a71d70a67d0b639a58d914e61a292b99d5d51d27fab16efc26ab6269bc3718ff89db357f351603d9ca931916675cbe9c SHA512 a0c8e90015f933169329796cf247cdee19a7e1a8b263cfdeba1376d4042dc02f33878eaf56860deebfd55888ccbedcf9b76db4adf70ee6fa92ea7c4f823fdb07
-DIST ncurses-6.4-20240309.patch.gz.asc 729 BLAKE2B fd1c4b7c9b208427be6280f2ea899d970250ff8e4251c437e6e6ec0d3f5f9c6539f68bb4735da2d968769660d6f81aa40c922cde97fe26c2b0bf3630fdba3e75 SHA512 d49ecd327d1bbcd566990a43b54e554ac7c73142ff21fa58d3402b2cc2e8eba3b45780835c58c7f9a8e1a596ffb9cef5e669487d6f56b873d03a91e16ba303f8
-DIST ncurses-6.4-20240323.patch.gz 143301 BLAKE2B f51c229985025950ebe0b35e1e9cb17d36c5277aac966a10c77bb6e60831a6a017431b83ca06a07a660ca42066bf2e5792a37dd39c4e32e55423fe4b66333732 SHA512 a8977192912666dee7e6e1ba4766db352691b647feca169d447b484e5975a40429a2390c2a99136c2f96166973433a0a8d569381560e9ab47f161c85da273de5
-DIST ncurses-6.4-20240323.patch.gz.asc 729 BLAKE2B 380eaa8b0f3faa3e2ff21a3847c6f2ba59019adec68391134bb68bdecfd13cb56589ad4ec062dd391ae3d7bd96a306d85e78ef0827300de594723d188272e7c4 SHA512 380675d04ad1db69a039001b109bea6e7ef3f9fa0059ebe8b17ad12d0b59b20dd18b90abedb63f95db2ed6ad770de77aacc85c24d70bb883b1851c72c5dada88
-DIST ncurses-6.4-20240330.patch.gz 63526 BLAKE2B 593823a358017e5f98e897ebd6e1a2f945b0329c51a76b0ea65458751d2486dc51a71c1d0fdfbc1741167c47ed0b8aedc52b1a923c4788f23293d7e7729885c7 SHA512 666c8f7a37bc2b93b9b0ff76f2a5fe412f1d5c0c9260b64a26665e7c3ba74a9f05ae3883a512425d901ab943948509792759297ea85b9642cd02b7b64455326e
-DIST ncurses-6.4-20240330.patch.gz.asc 729 BLAKE2B 159c110254d81b1c83d7cdb3250fce7ac12d1b4773e6c1a4a347bc7a5d96893504b1a7066d6a8997c3db467ba7d3705e043714000142fd2ebac6e9a008a62ae8 SHA512 1a0dcc56e79da6e0d615bd0a6571869e42aa6e31233e6cb01fe85c8816c82858c23e93a47650e1a4fd8cee2461e4900f7b78a4f9aa3149a0aec6cda704f9c163
-DIST ncurses-6.4-20240413.patch.gz 113122 BLAKE2B d8e5d011a8ab61dd30624c51d7917ecc66f388c8b0edcba25f35179031a16b5a41379d8c5f2c40a2b6af5e485b25ca8a3cb1c97301450b00c14e2640187f0054 SHA512 45c14df0fc4229667ae173cd4eb37fad2a3dbcb8906763a4d472fad7b563dbe72dbc0bc12e6070e6e7f2e64fc2f3a254bffe5d1e904dce9f5636fccdd2761750
-DIST ncurses-6.4-20240413.patch.gz.asc 729 BLAKE2B 3786f815cddf3f6ebbf89da47e3151c01d50f26c2fa713cb982c61b7190ca25a807b6f7264688a296d5d252c78f4737372f2c6f26d7713bc448c5228676e922f SHA512 c172fe7f308a01474d04b06919b43710abcdb9fe3961396cbc7731f619093ed18bc7deb9bb62075e3bd0bb88d345059c9bf485a4f9ef614dc1109d4549c95a34
-DIST ncurses-6.4-20240414.patch.gz 3007 BLAKE2B a4db0635df3b2669ae1ba0057c21f717db2512aa51545ea5157dbaf33c3db334cf8315ecd60a4c8a6406e6e7ba417e23f00f575af72c56b18046e3c4a34dab87 SHA512 348ffdbeb2b7350493957562a0af1a217590dd35cd9f8f27ff46adfb969018224e170b63581f5b3ad268293441db59878898bd23d1d1a4add77fc681344df526
-DIST ncurses-6.4-20240414.patch.gz.asc 729 BLAKE2B 8d579b2724245756947200a3e704c1ae534ba64e6986ad009a5ca9d33145fff82ddae9003a7c6ffe5b64b68f813661440afcac0a1321e5b80113d3ec94e1ea5a SHA512 0976a253d11fb10d52fee1cd2ad38e80b0b531f89efe94a62b9a0e2d69206bd1574140785776c7f6bd19775f6ca446c582da31cd9f51a8b0f12039d1e9695600
-DIST ncurses-6.4.tar.gz 3612591 BLAKE2B 47fd9c2d27f44fa9942552881a471e5067465dbace40bf68b28998dded0556127a1d8662b96de4de4fd76c1c8b98bdae796036553ab4b05ca9f160839d841ba3 SHA512 1c2efff87a82a57e57b0c60023c87bae93f6718114c8f9dc010d4c21119a2f7576d0225dab5f0a227c2cfc6fb6bdbd62728e407f35fce5bf351bb50cf9e0fd34
-DIST ncurses-6.4.tar.gz.sig 438 BLAKE2B e6a78b8d0cbce1577205b49b0260394094632cefd95294813c7e4e51a2908e8599a9f24b3b648e42ba16c015fb9424b2a82236f58aac3bf96f5400a50482e44e SHA512 f2a7859725b4d5d62f68006338d56598ac6b38a1448983108906e192f0ec922be287cc89bcc79c1ae49ebc80c967af3dd077427f35ae579b00d445c882414fed
-DIST ncurses-6.4_p20240413-patches.tar.xz 63760 BLAKE2B 6a91d453cca3705ca54b3a6f2ef00250d655168c1697726db4b581a1597cbc143479b8794e176d5e4154c794f99ea33c3fe1eb26605789930fc82649a2da3c93 SHA512 59239503a9400e054641428528799aa9c13b12669b31f32b2ff18cb60882698801e04dcdf75ece8357c7a4c3b899a729aa973090ec12a20de72cb80a916878b8
diff --git a/sys-libs/ncurses-compat/metadata.xml b/sys-libs/ncurses-compat/metadata.xml
deleted file mode 100644
index b1102f235f24..000000000000
--- a/sys-libs/ncurses-compat/metadata.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <use>
- <flag name="stack-realign">
- Realign the stack in the 32-bit build for compatibility with older binaries at some performance cost.
- Avoids crashes in older 32-bit binaries. Only affects x86/32-bit multilib builds on amd64.
- </flag>
- <flag name="tinfo">
- Build curses library (libncurses) sep from the low-level terminfo
- library (libtinfo) -- usually needed only for binary packages -- but
- it is binary compatible in either mode
- </flag>
- </use>
- <upstream>
- <changelog>https://invisible-island.net/ncurses/NEWS.html</changelog>
- <remote-id type="cpe">cpe:/a:gnu:ncurses</remote-id>
- <remote-id type="github">ThomasDickey/ncurses-snapshots</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/ncurses-compat/ncurses-compat-6.4_p20240414.ebuild b/sys-libs/ncurses-compat/ncurses-compat-6.4_p20240414.ebuild
deleted file mode 100644
index 29509f5ffef2..000000000000
--- a/sys-libs/ncurses-compat/ncurses-compat-6.4_p20240414.ebuild
+++ /dev/null
@@ -1,384 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# This version is just for the ABI .5 library.
-# sys-libs/ncurses-compat can be bumped with sys-libs/ncurses as upstream
-# provide a configure option (which we use here) for the ABI version.
-
-EAPI=8
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/thomasdickey.asc
-inherit flag-o-matic toolchain-funcs multilib multilib-minimal verify-sig
-
-MY_PV="${PV:0:3}"
-MY_P="${PN/-compat}-${MY_PV}"
-MY_PN="${PN/-compat}"
-
-DESCRIPTION="Console display library (ABI version 5)"
-HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/"
-
-# Keep invisible-mirror.net here as some users reported 403 forbidden with invisible-island.net
-SRC_URI="
- mirror://gnu/ncurses/${MY_P}.tar.gz
- https://invisible-island.net/archives/${MY_PN}/${MY_P}.tar.gz
- https://invisible-mirror.net/archives/${MY_PN}/${MY_P}.tar.gz
- verify-sig? ( mirror://gnu/ncurses/${MY_P}.tar.gz.sig )
-"
-
-GENTOO_PATCH_DEV=sam
-GENTOO_PATCH_PV=6.4_p20240413
-GENTOO_PATCH_NAME=${MY_PN}-${GENTOO_PATCH_PV}-patches
-
-# Populated below in a loop. Do not add patches manually here.
-UPSTREAM_PATCHES=()
-
-if [[ ${PV} == *_p* ]] ; then
- # Sometimes, after releases, there's no megapatch available yet.
- #
- # From upstream README at e.g. https://invisible-island.net/archives/ncurses/6.3/:
- #
- # "At times (generally to mark a relatively stable point), I create a rollup
- # patch, which consists of all changes from the release through the current date."
- #
- # Also, from https://lists.gnu.org/archive/html/bug-ncurses/2019-08/msg00039.html,
- # the patches are considered to be acceptable to use after some testing. They
- # are both for development but also bug fixes.
- #
- # This array should contain a list of all the snapshots since the last
- # release if there's no megapatch available yet.
- PATCH_DATES=(
- 20230107
- 20230114
- 20230121
- 20230128
- 20230211
- 20230218
- 20230225
- 20230311
- 20230401
- 20230408
- 20230415
- 20230418
- 20230423
- 20230424
- 20230429
- 20230506
- 20230514
- 20230520
- 20230527
- 20230603
- 20230610
- 20230615
- 20230617
- 20230624
- 20230625
- 20230701
- 20230708
- 20230715
- 20230722
- 20230729
- 20230805
- 20230812
- 20230819
- 20230826
- 20230902
- 20230909
- 20230917
- 20230918
- 20230923
- 20231001
- 20231007
- 20231014
- 20231016
- 20231021
- 20231028
- 20231104
- 20231111
- 20231118
- 20231121
- 20231125
- 20231202
- 20231209
- 20231217
- 20231223
- 20231230
- 20240106
- 20240113
- 20240120
- 20240127
- 20240203
- 20240210
- 20240217
- 20240224
- 20240302
- 20240309
- 20240323
- 20240330
- 20240413
-
- # Latest patch is just _pN = $(ver_cut 4)
- $(ver_cut 4)
- )
-
- if [[ -z ${PATCH_DATES[@]} ]] ; then
- SRC_URI+=" https://invisible-island.net/archives/${MY_PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz"
- SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${MY_PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz.asc"
-
- # If we have a rollup patch, use that instead of the individual ones.
- UPSTREAM_PATCHES+=( patch.sh )
- else
- # We use a mirror as well because we've had reports of 403 forbidden for some users.
- upstream_url_base="https://invisible-island.net/archives/${MY_PN}/${PV/_p*}/${MY_P}-"
- upstream_m_url_base="https://invisible-mirror.net/archives/${MY_PN}/${PV/_p*}/${MY_P}-"
-
- # Prefix each date with the upstream location (https://invisible-island.net/archives/${MY_PN}/${PV/_p*}/${MY_P})
- mangled_patches=( "${PATCH_DATES[@]/#/${upstream_url_base}}" )
- # Suffix each with .patch.gz
- mangled_patches=( "${mangled_patches[@]/%/.patch.gz}" )
- mangled_patches_sig=( "${mangled_patches[@]/%/.asc}" )
- # Repeat for .patch.gz.asc for verify-sig
- SRC_URI+=" ${mangled_patches[@]}"
- SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]} )"
-
- # For all of the URLs, chuck in invisible-island.net too:
- SRC_URI+=" ${mangled_patches[@]/${upstream_url_base}/${upstream_m_url_base}}"
- SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]/${upstream_url_base}/${upstream_m_url_base}} )"
-
- UPSTREAM_PATCHES=( "${PATCH_DATES[@]/%/.patch}" )
-
- unset upstream_url_base upstream_m_url_base mangled_patches mangled_patches_sig
- fi
-fi
-
-SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${MY_PN}/${GENTOO_PATCH_NAME}.tar.xz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="MIT"
-# The subslot reflects the SONAME.
-SLOT="5/5"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="gpm +stack-realign tinfo unicode"
-
-DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
-# Block the ncurses-5 that installs the same lib, bug #557472
-RDEPEND="
- ${DEPEND}
- !<sys-libs/ncurses-6:0
- !sys-libs/ncurses:5
-"
-BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )"
-
-PATCHES=(
- "${UPSTREAM_PATCHES[@]/#/${WORKDIR}/${MY_P}-}"
-
- # When rebasing Gentoo's patchset, please use git from a clean
- # src_prepare with upstream patches already applied. git am --reject
- # the existing patchset and rebase as required. This makes it easier
- # to manage future rebasing & adding new patches.
- #
- # For the same reasons, please include the original configure.in changes,
- # NOT just the generated results!
- "${WORKDIR}"/${GENTOO_PATCH_NAME}
-)
-
-src_unpack() {
- # Avoid trying to verify our own patchset tarball, there's no point
- if use verify-sig ; then
- local file
- for file in ${A} ; do
- if [[ ${file} == ${MY_P}.tar.gz ]] ; then
- verify-sig_verify_detached "${DISTDIR}"/${file} "${DISTDIR}"/${file}.sig
- else
- [[ ${file} == @(*${GENTOO_PATCH_NAME}.tar.xz|*.asc|*.sig) ]] && continue
-
- verify-sig_verify_detached "${DISTDIR}"/${file} "${DISTDIR}"/${file}.asc
- fi
- done
- fi
-
- default
-}
-
-src_configure() {
- # bug #115036
- unset TERMINFO
-
- tc-export_build_env BUILD_{CC,CXX,CPP}
-
- # bug #214642
- BUILD_CPPFLAGS+=" -D_GNU_SOURCE"
-
- # Build the various variants of ncurses -- narrow, wide, and threaded. #510440
- # Order matters here -- we want unicode/thread versions to come last so that the
- # binaries in /usr/bin support both wide and narrow.
- # The naming is also important as we use these directly with filenames and when
- # checking configure flags.
- NCURSES_TARGETS=(
- ncurses
- $(usev unicode 'ncursesw')
- )
-
- # When installing ncurses, we have to use a compatible version of tic.
- # This comes up when cross-compiling, doing multilib builds, upgrading,
- # or installing for the first time. Build a local copy of tic whenever
- # the host version isn't available. bug #249363, bug #557598
- if ! has_version -b "~sys-libs/${P}:0" ; then
- local lbuildflags="-static"
-
- # some toolchains don't quite support static linking
- local dbuildflags="-Wl,-rpath,${WORKDIR}/lib"
- case ${CHOST} in
- *-darwin*) dbuildflags= ;;
- esac
- echo "int main() {}" | \
- $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \
- || lbuildflags="${dbuildflags}"
-
- # We can't re-use the multilib BUILD_DIR because we run outside of it.
- BUILD_DIR="${WORKDIR}" \
- CC=${BUILD_CC} \
- CXX=${BUILD_CXX} \
- CPP=${BUILD_CPP} \
- CHOST=${CBUILD} \
- CFLAGS=${BUILD_CFLAGS} \
- CXXFLAGS=${BUILD_CXXFLAGS} \
- CPPFLAGS=${BUILD_CPPFLAGS} \
- LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
- do_configure cross --without-shared --with-normal
- fi
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- if [[ ${ABI} == x86 ]] ; then
- # For compatibility with older binaries at slight performance cost.
- # bug #616402
- use stack-realign && append-flags -mstackrealign
- fi
-
- local t
- for t in "${NCURSES_TARGETS[@]}" ; do
- do_configure "${t}"
- done
-}
-
-do_configure() {
- local target=$1
- shift
-
- mkdir "${BUILD_DIR}/${target}" || die
- cd "${BUILD_DIR}/${target}" || die
-
- local conf=(
- # We need the basic terminfo files in /etc, bug #37026. We will
- # add '--with-terminfo-dirs' and then populate /etc/terminfo in
- # src_install() ...
- ##--with-rel-version=5.9 ??
- --with-abi-version=5
- --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo"
-
- # Now the rest of the various standard flags.
- --without-hashed-db
- --disable-pc-files
- --with-shared
- --without-hashed-db
- --without-ada
- --without-cxx
- --without-cxx-binding
- --without-debug
- --without-profile
- # The configure script uses ldd to parse the linked output which
- # is flaky for cross-compiling/multilib/ldd versions/etc...
- $(use_with gpm gpm libgpm.so.1)
- --disable-termcap
- --enable-symlinks
- --with-manpage-format=normal
- --enable-const
- --enable-colorfgbg
- --enable-echo
- --disable-warnings
- --without-assertions
- --enable-leaks
- --without-expanded
- --with-macros
- --without-progs
- --without-tests
- --without-trace
- $(use_with tinfo termlib)
-
- # The chtype/mmask-t settings below are to retain ABI compat
- # with ncurses-5.4 so dont change em !
- --with-chtype=long
- --with-mmask-t=long
- --disable-ext-colors
- --disable-ext-mouse
- --without-{pthread,reentrant}
- )
-
- if [[ ${target} == ncurses*w ]] ; then
- conf+=( --enable-widec )
- else
- conf+=( --disable-widec )
- fi
-
- # Make sure each variant goes in a unique location.
- if [[ ${target} != "ncurses" ]] ; then
- conf+=( --includedir="${EPREFIX}"/usr/include/${target} )
- fi
- # See comments in src_configure.
- if [[ ${target} != "cross" ]] ; then
- local cross_path="${WORKDIR}/cross"
- [[ -d ${cross_path} ]] && export TIC_PATH="${cross_path}/progs/tic"
- else
- conf+=( --with-progs )
- fi
-
- ECONF_SOURCE="${S}" econf "${conf[@]}" "$@"
-}
-
-src_compile() {
- # See comments in src_configure.
- if ! has_version -b "~sys-libs/${P}:0" ; then
- BUILD_DIR="${WORKDIR}" do_compile cross -C progs tic$(get_exeext)
- fi
-
- multilib-minimal_src_compile
-}
-
-multilib_src_compile() {
- local t
- for t in "${NCURSES_TARGETS[@]}" ; do
- do_compile "${t}"
- done
-}
-
-do_compile() {
- local target=$1
- shift
-
- cd "${BUILD_DIR}/${target}" || die
-
- # A little hack to fix parallel builds ... they break when
- # generating sources so if we generate the sources first (in
- # non-parallel), we can then build the rest of the package
- # in parallel. This is not really a perf hit since the source
- # generation is quite small.
- emake -j1 sources
-
- # For some reason, sources depends on pc-files which depends on
- # compiled libraries which depends on sources which ...
- # Manually delete the pc-files file so the install step will
- # create the .pc files we want.
- rm -f misc/pc-files || die
- emake "$@"
-}
-
-multilib_src_install() {
- local target lib
- for target in "${NCURSES_TARGETS[@]}" ; do
- cd "${BUILD_DIR}/${target}/lib" || die
- for lib in *5.9 ; do
- newlib.so "${lib}" "${lib%%.9}"
- done
- done
-}
diff --git a/sys-libs/ncurses/Manifest b/sys-libs/ncurses/Manifest
deleted file mode 100644
index 6254367ad561..000000000000
--- a/sys-libs/ncurses/Manifest
+++ /dev/null
@@ -1,200 +0,0 @@
-DIST ncurses-6.5-20240504.patch.gz 16541 BLAKE2B 1b698b61fb738252eb8839f659b8670c743808058da9eaf39e6d288f5c00b3d1fbc4318daee8744fef37cdc42fa176fc41bbc5d4890295ad53a633207cd129a2 SHA512 6d72b5950dd55a2eb36f4c615c851a0879dcee5f97f9aa46eef68fc0f3c6996c7bf06d4646a05c455888a563ca673be3159e89db2266e81f0e72434cf4d3df29
-DIST ncurses-6.5-20240504.patch.gz.asc 729 BLAKE2B 6a9ff6b524bb8ade98d6259514b7d467aee38d12b915c7eb030f025f244a44cc0c2dac524bd2645c5f315f54ef47fe6791dffc1728320e0e4790032a838cbbcd SHA512 4f8a2c6be0471df7c25fc67f596753df48a2a4660c848263d10126bba96010c185d31208b2424c495f29bbed6c93cc9cc88b37b4cc252e00bb971364fe68d2d8
-DIST ncurses-6.5-20240511.patch.gz 85486 BLAKE2B 94a00b7013531509def2e17ec75421897f321763fba970a73813278826071e99dd9ddde815c3b4a6cad7c6a3f16eada3afb030f31ee72123dcf0de710c9bcc03 SHA512 c529f1bac7af6c774447027449ac59e41dee3fc30004f7c82113936cc3aed9b5536466d2ca91d99d13d1e1e0e9d7357b87ceb9cc6dc54b212c730d088835288c
-DIST ncurses-6.5-20240511.patch.gz.asc 729 BLAKE2B 8b38ff421f7b9cb9115f40cad4e9002083103b4509a346ddf4af39e8a34a8b6fff38546eed0a41c439d2fb80b691adb171216c527cdda352322639ca357c951d SHA512 dbbecf02d46fa97918437a2e9e4e563062c7a8b0d0dd556c22d07d4b186e3c6d13f8f40e1e25a575ba0f4740751db007ad936db275685e253eb3c3fa9cecb6ce
-DIST ncurses-6.5-20240518.patch.gz 182827 BLAKE2B 25bfb9822f24dad7ee01314d592c923dd1ac0f21ec6c3bd9c8cc0d858b776cf0441fab4cc3dabb04bd03eee6855062e51a3ac29bccc7116fbdc28a4f9aed4dd5 SHA512 1948cdfc5eb7c1be224a148714e8a482ca6545bbce6230f493fa7e722d3fc776c9b56563b59b60008058e54916ff298443f2e482012f47fa1037f4983b8cd333
-DIST ncurses-6.5-20240518.patch.gz.asc 729 BLAKE2B 25162fbcabe332acc337dfc84b8dccf89c255dfd76ecf150ed658257ab770498ae2ffd9e6a66fe591848456a9a910905ef66daec827b3af05b4dc8620e92ea40 SHA512 e10486194cad17dda2f96399eadc8addfa8d41e09372610df902ff5fb305282432906a6a8c1d4499d860b9eafa56cd26fa64f15c539e3ef6064ea1f450029b3f
-DIST ncurses-6.5-20240519.patch.gz 11069 BLAKE2B 8cead0924705fb6e3a0f154f336a26922e4f0e50f1a47e8df0f4f4c8d6ecc76f8b4b9d6dc818f34d72063f7e5e2ef1c3068f4e2c11d317a27d6d129904ff6f2f SHA512 b2b92a6ec97c598ec0ffbcddfca4e68322836744a225e458b7cd92690a931d1c1fbade2d1a3753a799593c72940c557f6495dd979bad5d78d0cbd03f860f9bd4
-DIST ncurses-6.5-20240519.patch.gz.asc 729 BLAKE2B 75e61ea2c8a86a2849bca0650fe8b466abafe35a8c12b90e0039e11fc649ca95daa75f85a2c27979172cd45cef1bc20967bffa24191314f23056ab3fbbce4f75 SHA512 8543b2a8e56905e106f76dce1e3b50172051d0cbccd21b630305330d572f6cf99eaf23535fad225643c053244a47374971d762a39d393c5205e360399c61d334
-DIST ncurses-6.5-20240525.patch.gz 119175 BLAKE2B 61a3fa6854238886ab107f62a2266a27d6b8c4aa47868f2a4b36acc1cfa439ffb2649da451f4df744a27eb0d823ec531441216011778485a5d9a3402c8483bf3 SHA512 2a3254943e9e1351004d32cdcb83c135084b4116c70d36cf07f5f072a37a329d5dbb4044f7237c1c47a7959e3b7497372ec93e283d1a79f7ead0be86a71c44bd
-DIST ncurses-6.5-20240525.patch.gz.asc 729 BLAKE2B 41c0516cde5a3e289686dd6e0c34a2dee6ddd1fd554cafdaea964d312c366a66a259e5f8357fccbab16243a89dd3468705d56d7da1b95eb43a02633f2ec76bf1 SHA512 cc25f91547c02202a4b030a94e142a05e28854fb1330d25b13f8e20e351a3b8562399fce0b6f185f71c616f88059151af003c817642cb3353b177c815a18081a
-DIST ncurses-6.5-20240601.patch.gz 62426 BLAKE2B 1794aa064fd32974aa90bd2f71a52db6ccf117a032fb3e234f6390e1e98c932f3d3894e3019ba54a65990b36c9864cc7ad631566760f22b5ebc071d61bc31919 SHA512 2a4e4c91e27b72ee4c578daaac1dc160426b53c6e1947a6782fda39bc320081baad6f91f8bb54e443920fba17852614fbf7621d601e94d0f4c96a78f449fb361
-DIST ncurses-6.5-20240601.patch.gz.asc 729 BLAKE2B 5b2ffb8ce5c17902271d8dc4f4d92c0eb2f59bbb9a7e494113cae157ed7e90721e755424c4e0956441e552fe52256c45e6e77ff0dbb3c09974c439d1fb0725bc SHA512 a037bc544f6a57468b667e91fbc72ac078c312fef165807e2af5c6add0ade29552a68df723ceb1b019238873368e7d63c2d9f45948ea0453ce97c1fcd4b55272
-DIST ncurses-6.5-20240608.patch.gz 51416 BLAKE2B 8bb8141fe13e770837d1f2fee3902e402743c2a06cb08f9981635937dea238c090c474446bba1e227de867be07d7be00c70061c4d3254b9a8b779115382cb4ad SHA512 d7db7404bd16bbeb5340ad964062634f5a7f66180ee8c6fdee356b5386a8c87d5f5e0c76159923d220ff024d6a43c55220f8ea837a06f4ac5d76d2bcf42c9e0f
-DIST ncurses-6.5-20240608.patch.gz.asc 729 BLAKE2B 2788a5172f7ee437be0aa61fadf04a62c459777e33f150500c32bc29c80c0dee83cb267f3e8174a316363a196bd415401c5e8f56049487855eff814f8047e88c SHA512 ab2162f9cb7e587ff2d049dd1c50b36cfb4cc4914b9c53067dbbca8cbbb63dfe47a690385ae72c2feb5a73dee965e844b4d76ce31463ee0e0f052e4706d4f4ed
-DIST ncurses-6.5-20240615.patch.gz 10195 BLAKE2B 0bfb266ebeb1c92b48ce2c2d2e193671dccb26e90d4bb61a4394360b8b3029087eb65be05e3ab20c665da82a8619354fa5c2b99ce6e3bab6e27b4029e8e5919a SHA512 d72e9334b58ff800ee189a20713c7be65a78aad05aae16f537355e5e48495f1658291552569454c744b9c5d9af3199d892ecf8d41a9917bd83b81238c87c5564
-DIST ncurses-6.5-20240615.patch.gz.asc 729 BLAKE2B 1e7179beb1908ae8c9733c0f55e5e027d2e6bab5265603f3d61063bd5a746a395c75e6f134bc2314277735e881a828790901e735e17bdef54b7cbd54e4d2d72d SHA512 ecc1adb886abb8364c93c0155412198e4e64955643de38ebbc3bff77c6675d537b135a138f68b6c216f6b50df8ccca0b63b83f32cad7c20a5d552305f103c0f8
-DIST ncurses-6.5-20240622.patch.gz 39926 BLAKE2B e4e9cb212e0e5544475e0c9a775772af599370f52b2c1b5af96129c978e5976c78f126694db5ae740cb2dd1c58447658df6b161498c2968280be7ef44bfcf8fd SHA512 1b62e19d6dd5bab3f9e4194262faa8bcb4c09bd013dfe4fc2828471481c835b89b1036c5c72d3051ac989f90db8c7de931b61132535242bea0a5d4946df168e2
-DIST ncurses-6.5-20240622.patch.gz.asc 729 BLAKE2B 1e19a9b7e6454d038a3544e1ad3789a5838d88dd648b1150ad8e76ac918a24fee4bc3cc837aa86a20af01b555521041b2fc1b886cfe72502c658ffff64141419 SHA512 588d791f6e10b83d4b3e5d2c48328654931e6b29309e428a34e3bd8fb4748113800ac08cff88901e30699f30cfdbc495226d33bb826145daa2512564d0e99b58
-DIST ncurses-6.5-20240629.patch.gz 5900 BLAKE2B 72467fe7281f4feb8fa2b680c13fbd65423cd8f901aaf4083e43d5f151108c661280b810f1a52a653c8f50908df8e4a7fae37a7534b37319a1e8fdde48db7308 SHA512 d732b90822e4fe12db0e1137c7bb4aa3e4413d3c1567314d9197151f936b89fb03492e5d2b1eac39d1a59cc74a753f5600b937d3a9e4c25d697f877a323e162b
-DIST ncurses-6.5-20240629.patch.gz.asc 729 BLAKE2B 7698deeae21ce812400eab55b8297d49195d9e327cc9a6c0879b18f9af2a93500b71dc58795e42784c658eeaee34c4345257b669eefe912986b83ca443cad943 SHA512 094732e2ef0fbbc2f50b772d188f3d91a7a881ead8357acfb435005750db150af70c9373ab858711ec1484f836e496518de8fd0a0bab42d0922c6007ff326f49
-DIST ncurses-6.5-20240706.patch.gz 207005 BLAKE2B 48adb97d3b239659caab53b6fd3218f5792292eb883164ae9de1216c9e0240cd4f7d659627e236800d75a27a0352bf8cc276497828c868c286b70b433b6b5f3a SHA512 3c5509279fd7462b34044bd88bac025319d920f1191e1359ad67f3c393d0ac2c96ebb0b1cbf4152f17a5283ffc35ce5621114bf988a41e7422eb95b2699c7c31
-DIST ncurses-6.5-20240706.patch.gz.asc 729 BLAKE2B b41d5f1c2c657dd24fdf6a40dc21a1857b0084ae36e64ae85707489240281d7d3141ff39742dafe40cbdc3f370cd148eb1477831a412d9e95e67c7e969d53abe SHA512 d8061bbb0478329c8939315fb4c1fa370abfb3cfb04286143d7bdfb49d5070e867ce4841d196179d2ed24c53ec463b88900ac2a75a161a5f074d1a47b034e019
-DIST ncurses-6.5-20240713.patch.gz 2449 BLAKE2B 9ffa48394997717af01c6c51f5c1fe5ecb6b160c839811432eba31961bc6b1403f91fe37357c710a4092693dd097088da8d5a8bdb8139e1e78fe4f62f3f1869f SHA512 61f2bbdc2cd2d577ccff6f6df32fc8b75f8a88e1fa83af187ac1d34a0b05fca814a7697a94ef2abc45c4ed548431ecfde14c88542b3f51e21ab862137d1a4978
-DIST ncurses-6.5-20240713.patch.gz.asc 729 BLAKE2B eeaa43f32112e05968090ef4aac7891310be6ca10c290407d2bff0cc4cd503f369a9cf5ae26b9deb1dfd70d86dae0398a964c789e122c00a9df65f976e7485de SHA512 208fa796bbb99444050206c756714602cf205b7224d3ed0ed1f98633b9e8eb713cfa9bfdaf3f7d5793139fac3451518605e00b339619fdfb71bc51fce7248f23
-DIST ncurses-6.5-20240720.patch.gz 39097 BLAKE2B 21f740519d43f63a3ae81d17fa3aab983adfecb02bd29e86386f396f62f0471ea6492b460164fd7c1dbadacd923e6a46db5493cc6bc2a6e99c1965796a6f54d5 SHA512 7c853907bcbdf4f40e4840eea9a23169e483a4ae745cda96d13f59a13e3a00d2014420304a7fc9248eda78fbc2a737136ec68122e1d7b8c306efe2414c74cfb9
-DIST ncurses-6.5-20240720.patch.gz.asc 729 BLAKE2B f11bd9c44bb3a83ebeae3e23c20952fe2ae22f02d5e4e633320f6e3bd954ae34dbd1647e86f5a8cbc7eb5f68c3192019e73865490edf81d9b5f1415bb77bc3dd SHA512 b2e767124a5f6fe0f2236463129e846f9732da26453daf744ff8fd7d03cee5a99b482beb24c400142053a7a157b68b5979dffbd1976a7dcf93f247ac24f96c47
-DIST ncurses-6.5-20240727.patch.gz 63193 BLAKE2B 1f4cf97a2cf72fc2701faed1992cdd819c7eb9953fd29d20ddb73fd4ec9096e86ee4213dee72b4670c283acd258a362d2ac7338224bb848a5e2f0d41b3eea8aa SHA512 a334877ad690f115cb4e713227886cbdbbb53be0a36144879f3de379ed914d5eba0e0da3f23a229ef9ae7e34fbc067df58cab6ed3d7021c011001cb8c1735229
-DIST ncurses-6.5-20240727.patch.gz.asc 729 BLAKE2B 40ad3e1ced4cc3295a8d2c3106afd61ca70016336fbd5f87f93dcab881850760299288b1a7efa900dc09bca927da02e2cf28dfd3369effef319dae0bc43cbc2e SHA512 ac813066599989a014aea3d969aa494be518f8703d9a7d42be665c584dd1896bae974f4b16d3a19974422768c37a1215e33e429f2079a05a40df03c9ab432e1e
-DIST ncurses-6.5-20240810.patch.gz 201729 BLAKE2B b201c1d45fcf5624588fbf527447383b2df4cb63db25eb790b32c6d48fd713897a0945a3c01367e8b4447d94766fdad05f7075b140bbf134d3dd25841dc9624c SHA512 d92c644e32102cd07aa3017f8a8834eb0ff22b74ee69f8c883b693dda5437b83cd2696796656fb42b9ca89e17750b7ba3aeacdcdb4ac8f8d9cfbbc64c7a5c5b0
-DIST ncurses-6.5-20240810.patch.gz.asc 729 BLAKE2B 6a100e4869acdac426de92f70a0417c0a36400bfee70ac9be827b72168ca2bd8b83dc161be718738b919af2110ed2666e5480792afc854546130f2e6efc90557 SHA512 3f53f9223de96d996c6dd34392223cba9e0f092eb1d77cefc605a6c98d44cf3c01f372a0665aa04d405be65adc3c4af5e89adb085bd1e6447b71e01d47a1c910
-DIST ncurses-6.5-20240817.patch.gz 216360 BLAKE2B 605e180fef6d63d4a6264f31889817f0572201ab682be5e52f6b28f6769ab3b5895ef81fd5a3cb65350a7402b9310358846bcc8b7bd02d38c619007922c47bf1 SHA512 8bb65c7559052e95e69ab02ba741634a3c4a35a38f3486369be98ffdf11f592d5db911c74804ae6b63f82c2084b02fa2ba19cf9b0268d03eeb6ae74d9787549e
-DIST ncurses-6.5-20240817.patch.gz.asc 729 BLAKE2B 958af03dd5a4fe9d55424375955779b863f60bfe447b658e308725a2a028f328904ee23410462d1cf77bda62a7b1878355f0d5311149a9141677a59b69b0078e SHA512 2d22b140f3014856f9bc2334532c90feff9badcbb26d2e6a938614e41a3c389dffd19634ca3d995120fbf531d2bece1d3a82e20cc10d24b544559559d928165a
-DIST ncurses-6.5-20240824.patch.gz 3629 BLAKE2B ac6048c076f71b094eedf5362b7aa07f20e042785411ebb571f49ea23f42f251b0787d8a34436939b350afde7120f60ce106ff0b27339db62be53ca2272a7d6f SHA512 f3cd9052a956149df24629e9279912ba628a9905921aae6b6c9ad5f75069dc9feddbcb415dd15df083c42f846b79456f4dc5cebbb45cdcb0c4eb45bdc205705c
-DIST ncurses-6.5-20240824.patch.gz.asc 729 BLAKE2B 99102e7aae310f0384ba6355871697d01e75e5d24558aa5246196931ab66d507a8e3edabe0961f12f6be4f78b7572a672cff5f258eb0bda1926ac2156f55a5f8 SHA512 58b0322baddae5525b5ab6841598101b6b01324070f6b14998eb985c9ba177df7ada4319581e8f9a826607fc70a2ec2262320d01be8d5b5f0088e4dde74d129d
-DIST ncurses-6.5-20240831.patch.gz 7435 BLAKE2B 3fddad4a06fc417808c9a870c137ac3d1bb9ed9b267e73f5b8aea0fac84a83c574ae631a0b9406fbda069b94308d345a4db12b4ec357254c0128fd93983937c6 SHA512 b7461a6a882835886a8125dfa3c1668520684dbb0476000f9a55f7d60a05508d773efa398094be0f0e5beaa229467acc817450c7989d659ace8b74a658534908
-DIST ncurses-6.5-20240831.patch.gz.asc 729 BLAKE2B 364956498e80789288fc95630e5dacd388de6c052a3995fdb2d266183b77749ebd237489ba0130196e332fd6ec1d73e6118f82ae02a3378d7cc26e5a7059c487 SHA512 fc2b71715ab33556a22d26c9e6eac35c156dc86dddf42be6f5f60393100b5373eda482f5ae4519deb1e0acbf4e5ac21880350904948aab533355d8d1e89356a5
-DIST ncurses-6.5-20240914.patch.gz 95552 BLAKE2B a03862fa2fb6ba9a64f46b67c2e1d03ec2efc93a10d7c696587a1b8af8c4b1c8af1584fdac7513978fe2214e89d99c3de14f4344b76491d1224e4bf25290f685 SHA512 5656865e0355e79217f0936240bfa3ad0537f2ec4d02f36e188069e5404d33b8794654f9116d86cea0f997dfcfbfb54a326d8548d572911e3543a91605166db4
-DIST ncurses-6.5-20240914.patch.gz.asc 729 BLAKE2B 2343a2a2a56d5fe34a2b30f40902c67e2ca146071f6a76a6f42e0194b38b922b1f06df12268504e1a3eaa06fb003ea67e9cdd9996a6734029488f6c8bdce8cf1 SHA512 18193febd93325293aa79f2edf526e52ec6b40bbde06f5daa4cbcfccc031168c1975b751cdc468a1dfbc890e47bdb090d050002f56c389fc95dc21cd97520943
-DIST ncurses-6.5-20240922.patch.gz 42088 BLAKE2B 8fb47aad3f778c47cab3ed7252dc57d3c22db803975a6a9f123147a4fea82fb18484dde032d0683364160ee3ca4367b4ae190842a399464d0330783b4ae214dc SHA512 955c25cec3177a576d3f4e252a6b95e712e768c38d527ec4e4a4ea2fe1900f4426c6f3fdab8b6d82eca9ca1cab10264ff46494e3d025d82c2f86c830a48a846e
-DIST ncurses-6.5-20240922.patch.gz.asc 729 BLAKE2B dc90e464d8662898f6db1216777c7bb79494d9c55eec718ee193214fa6313e483526cd6fc7189f89f5d92affc234e75ce67dc10bdd63c9233bbc65684a118192 SHA512 81f97e331b1aa49582b6a1a099ead2e64dbad9ab81bb981be8bd27deb3f30157afef9b3db18b808932ad1b3bb22dcf6ede1db0121a356272892ccff0c74c0b81
-DIST ncurses-6.5-20240928.patch.gz 4544 BLAKE2B 73cbd50198382a626c496ea038a4d2a286d79430f18abb8b0cef31e531ae88811af101b9d92de05a7425a88208dbda4c79358effe3fb9b5a60832908b18ee1a4 SHA512 6f00a3e30928c2b9fca3eae90a4f86bafece113e412bdae6fcdaaa331f672df1d6fe93ada2ecda65880a79027b27e091a3cadc2dd2d109dc87dca6deda104348
-DIST ncurses-6.5-20240928.patch.gz.asc 729 BLAKE2B 32ac76684b17a7d74e6cd00c6f3ceb033db5ef83a30994153260ceeeba2fb406ca88b9a1dbad33194eea91dafe2bff3aed9ca8f681016354f2b30ad832c68df3 SHA512 91510d055c955682b4de7fc7e829a4c81ae81b01bee476d37d49214eb5ad01866adec7160da3f582c7ed24b96bd87376217fa89ca2f3cfb06accf1aaf16bf487
-DIST ncurses-6.5-20241006.patch.gz 23396 BLAKE2B 30e00d9bd8efdc383ec99b30250d15ab4af04232243228206290331efae604cfc6710cdd27d734d542c4ba8266deabfe8d69875a00c396511e31485ef9c4677e SHA512 2be071ecee521965921d3682524e898c8e15f088e153143652a5dc6bb46cefc9dbca9d152ec47a4bd49b63cf42f0fdd805bc6f152a1238a924f35c4958396023
-DIST ncurses-6.5-20241006.patch.gz.asc 729 BLAKE2B e47af5f28189144c4cd66577980810ecd9232040e9eae109f601f39fa7633dd3a3c0a9b009dc99c9ad64a035d79333c4051036f29d0f7fcc8517792abf70be70 SHA512 9cce0638adff94016839fc7cbc83d95f547f486eb84da0b058e22171a2d288c76b4e616e3a4eba78cbdb84d510917202131a95372fe6176c1aa097f526172924
-DIST ncurses-6.5-20241019.patch.gz 10461 BLAKE2B ed95e8a0f01c6461d15f85e226fdc8f84daea3b7f6bd2fedfcd598e70319a433f2ba0d83594ee7d826d242894d32877dc56f6ac49757b13d08b8c132ab56015b SHA512 07906b9ac767ee5430850b0bdb57f33c0f33289a4c76d5695b4fc59dbcd359763213696ffad4ca8a04985496116048d2480db5cbfa7e38a172cd4df2642e649b
-DIST ncurses-6.5-20241019.patch.gz.asc 729 BLAKE2B c3f173103e50dde5e3afdae1b6bc9665eb6dc02707a943bfed7839f350e87967be80e4375c9c8b71304e63abfe950b18a82f5de7684511307f791a16cfa08fa9 SHA512 b208f2ff067f47f3ee223fcc9aa520fdcf5074a40e563b92ba350582b63fe4768e1cdcc675586f9223c73c7afae2d0d40b75bc7dceb1f8078bf05bec44cf22ef
-DIST ncurses-6.5-20241026.patch.gz 3835 BLAKE2B 1c7ce989eb4d8ea41ee793041fa461fbd69d619b07557694098a1a8030e839c91982f1e2f78128e7cec15f210aac2c0cd1b626888b22046d23611ec061d4a34b SHA512 665eb70d79a85f65dbaf69ab188c3ceba10b2ba58e13cca374c058443c1a770cb867d6172e45438222a77b16afc26c1c770bf950b06bf20b2c792ab6d031977f
-DIST ncurses-6.5-20241026.patch.gz.asc 729 BLAKE2B ec732d87e533340958e46a23646b1cebe549c8bace59e11cefc93c5e67a69af014338842de00bb34522b422688f6e01c03bc3b4ac3a01e2abdb6f664e692f7d1 SHA512 531eeaf46de000d20f24f5761bfccd8b5cf75cd8d5935fe6e70db09289b656606ccd9b7af7f30fd5b29014d758e2fef5250879d7bb36b255c6736fae5ea71af0
-DIST ncurses-6.5-20241102.patch.gz 3571 BLAKE2B 265fabae05675a01039569dab957e8cae7f705cb1cb3d8098bffaa4c9b971adb31ac129f8ca0eacb6571b6eb202e0ceb430c03801e0e3d3b35db168ce48ee0c0 SHA512 f62a348827db9dc0114cd040e94c607627707c3e3047e718f396f7a5ed63049b0fa782bf05f7bbd339bd8b0efe3dd10554a9d37e4e434f92e3496ce0f5dca4e0
-DIST ncurses-6.5-20241102.patch.gz.asc 729 BLAKE2B a35bc58064361f8e7527d3af3ef08dcaf8b3e70442d280797b6260458dd8d258d42214c25cb5f329851a88ea8cb32a293a3abd93f64d971a0d3b0ade7e04228d SHA512 9695c1a4cdb66cd8f64880b937dbbe7caa5746b754056359e48118b75deb9d6338f270bb5f252b9e52d6de14278a8435e2d4799e0fbda9ef5b76d5569ea8c6bd
-DIST ncurses-6.5-20241109.patch.gz 121789 BLAKE2B 3626c3fb1332d12558e53545bb0aec0ad315ffbfb0f64514f30fb15ce21b80b73228feec4569a9545c6115ca59db70f85d99830733ede3958f220627416cfebf SHA512 a15b6ee70ea10bb8a10a70ab9c74f437eceb60a7313a688ad04e0c3a9e097824b642f259c728fc7831d60322b1a0957d19a5fe73cbf68fd21a623ddf9d9c0ef4
-DIST ncurses-6.5-20241109.patch.gz.asc 729 BLAKE2B af2c1bd38031bff8e5465340fbd5dbff875939ff62fa4e805d2fdd869a15a25e135aaaca98510ddb308e532f3b58209b4ad0d8e75bc792149972470809a42df4 SHA512 8946e1e84baf9c48129460a83a5ef679b427c0147ca7fd4701aca3fa23b260c8ed8fb08fd2996676f149ffeec4ca960358d7df6a0b7774c4b49b2bb66800237f
-DIST ncurses-6.5-20241123.patch.gz 17657 BLAKE2B dac07cc85c7ce3637e20c6a81d7f69943ffb62313080fe607a9e7a972c0c0fc557ec99b3c6a47ce053e6e814e6340c3ee0d8f598b7c33ab3c64fa745470cadac SHA512 aee0de1d2d9216fec03a78260b5c0a973a8191777db383b6a09dfad20a4f8ecf735e14d4129f59b0a9da0bcfb59691ff6c395a55edf3303e2af57f80a1901232
-DIST ncurses-6.5-20241123.patch.gz.asc 729 BLAKE2B 367529435f5e0efc24e34818d59e75a8c41cb10c52d8b8d0679b49e7070bb63ed096076f0f0a951f4f58cf57a6cdb41874991f4913aea1583de9a385a3d8fb5d SHA512 4d751650011e648aea4a1a0c5ab6984021ff8ee305f0beaffc452804b4de8722954069cab08f5f6e46a3164e3b863226d7e745528f742a874b3b086b83251f85
-DIST ncurses-6.5-20241130.patch.gz 142324 BLAKE2B e7f7ba18550db745c9252c8a3b74f77ee0eb93d3bd509f18a5833a4e8b544abb3067558a1c815d12384505c62435c9cbba8e1128ae09587ec91256932fb0b965 SHA512 6a5ce47d47ff5fbed9612c3127056e9302ed340583d23a90b5fb5ca905d98a7d48d61d29698396a66cb5b120423d3bf5ace40c68d029f5ffd24d33ade39f2402
-DIST ncurses-6.5-20241130.patch.gz.asc 729 BLAKE2B 0bbc5c9e6bc6eb37c7c1bcde44abbf7e45d16f287599c2b7dffad37cd751572d3adbd50413c0568942ceb0fb874237fa179c4e2df170f73512f43e598e4bd711 SHA512 ba2c08cd08839c8e5754293165343a7fed537770dd5a7e1712e371d8495c83573ea9e016589c886e080405ac999460abf83c8fa1bd91194a585afb7739c7d8a6
-DIST ncurses-6.5-20241207.patch.gz 115869 BLAKE2B c9016f627ae48e44afcc449308d4abd288067a9bda4a5bcf1d847cf91be9a0f22c376fef964ff5e69291bd46b90f32201d05127d1d7c150f62e75a244a5ee1dc SHA512 f37dcdb95a2698d32e25c840d98c2dae3fd5b734717f753be4ae7ab325b3263b7b84dccf8423a4338b8fed7071fb083f4a74afb68616dde390c37fe8b6251552
-DIST ncurses-6.5-20241207.patch.gz.asc 729 BLAKE2B 3f9345290997bbe68764017651d50493e7cb1d64a33b7ea4d335b7f95ae33586b841496f01746e19fced605ec3cf129dc8b02a20a7e89dc9447296ad0804d6a0 SHA512 c090a8369f12421894c99bd1d72bab1abd18f86c58acfc5341ac1aa6ccc07f9c83425696f54c32bec3d6ec17a2ab2df932fb12dd6c6a5fce4820d3ecd1c71aef
-DIST ncurses-6.5-20241214.patch.gz 79375 BLAKE2B 96114d3d195209aa630a61ab6f3e3c071ee4bd04c929f072937c9d7c377974a01c5c45be1540e4f9f37035b8fd68c3c554416513969474ecb5f3d60abc14bdf7 SHA512 bfb873e081ca1aefe5b02d259d679afcb14299dd633c5933a53d3e6e4102dff388209a5d2a09d5d390df08fcfdac79b1eb32d03c3aec461fa78c1f6d0a743243
-DIST ncurses-6.5-20241214.patch.gz.asc 729 BLAKE2B af6a83a690c31b18e3b8a89bfd8adc620397ce5026d8573430a69538ff38e341e82f5f34fd639668f3651e9b0229a2b3af246dd025ca2be85621b9015dbf69e6 SHA512 ceff0eae372a792cbce83151b915fddc4f82c979eddad9dd88df28c87f5ebd6e4bbef6c6e32924dac38e58a3a12da86521f72bd438132c5cb4a9dc157c686787
-DIST ncurses-6.5-20241221.patch.gz 7787 BLAKE2B 7dce1a2770ba3dd7b9f5bc5eb49ad0009cf57db9107b9d19300d532d35dc42894c7952c72ca7a21a31be6378b201d16cbcd2668ce0cbb07c073da9bcf04061b9 SHA512 26d8bdcd4d1d496b3a90668660ddda118ba0ec3571bcadffce65bc6097a9663338f3b026a390d9420c1d844f0b8cef43c717a1542cb1bf91f3e5eb4e332a2edb
-DIST ncurses-6.5-20241221.patch.gz.asc 729 BLAKE2B 8bca0aa7b6b6f78518d33602b13b2e0dc83e151c62891abbfbc00aa324b82e9981d2f1d4ebcf2cca7cd7a2c474e33d7cbdc749e5a6e0b8005dac15086547203b SHA512 3ca0cb7f799fa2c9efc9f1ed2c350904a99e085e3d250e55d5198cb40eb2ae58640ba6226a6263996289d3122204a83e681f38e7195de2203cafb68f66a12272
-DIST ncurses-6.5-20241228.patch.gz 129948 BLAKE2B 9366438db329bfef3db29c572171abea3fb5b56a430c9ff09c51b0738429b437fee760be3812e0f93120ae9896bba61f28fdbe29b5cd2d30f2cca19ad29b287f SHA512 292eeaa4ee41eebb2c64129d77b1baf3e64e5c5960008093c9b11a33295bd5ef04bea7b11bd02d38f5f819e7ac8ca5d69a6a114213c849a0e5f0bb94852cce9e
-DIST ncurses-6.5-20241228.patch.gz.asc 729 BLAKE2B a32ed7189f0557da6fcdcf4b8cab88f0462906166b71db82cfb14ae137cad9c86a85cf3cb5fb9e6bc1b7d7ecbb24a34d96527b76a466fbea96e4be458a72add4 SHA512 015fee99356fb2bdadb546e67d3773196a442a53ee2abd7dc839b0e6afd569438031249ed4c33920e716b14d928c2198969199eb0270a18cae66411658934bfb
-DIST ncurses-6.5-20250104.patch.gz 22099 BLAKE2B 176b9ed65414b55cc2f2bcdcc68c7bbe84dbbe6dd5dbd3071e6a69187932f973e45cfb2aa5714752a1cc66b1317807548fd3d8075ab97d7a648e6527381bdbe7 SHA512 9667b9995eefeb6d6d59b11ca37fa57b5407a36a5e29dade672787645e851f5e0f30f7838ecb368b247e50ab54b1f2ed1fe70ef6df86609fc72e27d259907733
-DIST ncurses-6.5-20250104.patch.gz.asc 729 BLAKE2B a224636d20cddeb11e1c8dfd6fe0908cd53b1d045e9bbeccf9fe29cb59092fbc3f25b7d80106a8a7c8a21d71175f8e01431d04ede5dd10a0a42a13cf58ec6e4a SHA512 aad743612aff3720bcf210539c69d41e7c5a196af79b3129957ddf5eb1201941bd6e1efe41a9a5a0e75c92fe89c12cf43ab78cf5748313b8ed41ba62317c57d5
-DIST ncurses-6.5-20250111.patch.gz 11034 BLAKE2B b9b9b39035e6f5730a39e358faf7b53bf0728e5a6de5e5f9285d72239c0b3e9dc029d5aa6528b60f729aa30d4d76959fc091570382d5e43bdb4738e6b906e29b SHA512 d6c90512348a7b5e5d5d82acef95973539bcf49203481087454cd9cc75f08051697ef2011f96a902f97d5f6eb3f69cee2802bc5dcec8cb58ec97f56b510fdf0c
-DIST ncurses-6.5-20250111.patch.gz.asc 729 BLAKE2B d1fdefb370d3f1a0d698e1bc8f4d6d4b2f333f8f4440e61a3d32a5d4dd1667729776330f178399ecb726013cbfa71f8b1fd78ceaf61942c0b97f41f4196146c4 SHA512 ea5d82e01cc95a7141da52400e00da37b36762acb113258151a179d70b08cc58342e9d23cb0fe057fba88bf110f18c500f4b5c769684c57c2be7c5c83d6b01f5
-DIST ncurses-6.5-20250118.patch.gz 405753 BLAKE2B 6aa666a85bf7d1526984ac46cbbeb6103635c4f0fb93426ae06a05a4fa12e345dd052030ec639e23d377fe0a78e0e411d2343755a378ba4b18a3af9e42e5c438 SHA512 e82630a447fb759f1ee1f9b698094e1b18d83f235c970d1c910419de873cf7643b3f58fc279c42b17c2fd34c8ac090b703f735700fcce33c3ec68fee9544f99a
-DIST ncurses-6.5-20250118.patch.gz.asc 729 BLAKE2B 22cea1147c6b30e24b2eab79e0f00b9901b45193f391a270799661eb4f45a943d2e0afba4f94f69b6a21a5ed7155636d9f775d29bac7aa4b0248fc2ba90d19d9 SHA512 fba7ea75945879f97294e75bee34e58ff4dbb0d10bf549a8928dbf308fdbdb978b377231a618be444e3a4426acc63a6d5f0f588fca82fda7585ef6af78b602e1
-DIST ncurses-6.5-20250125.patch.gz 11864 BLAKE2B f4fa5b4a9a0c87b11f5d3cc84961a19d3948658481255b65eba1041d3ff9952c4941e6879bdd9b3237087353800398eacf47fd44de114f9c57046a0a3b200da8 SHA512 7e8571cf264dad27136a00d7601b2bbe90c497f2caa8e7379b72547c9c1cf07c4b32e54773c22695c183d4444d2816ec020bafc3cec55ff3fb5d191e956a77c8
-DIST ncurses-6.5-20250125.patch.gz.asc 729 BLAKE2B 53fde87fdfa46107addc6ee523bfbc7db0b12d288882ae9bf85c1e5ffbcb26562809faa3f284cfe1c68665cf666ab50c52abffd42b03d9f82ca98c7fd8e2895e SHA512 6e3b6c009b0b429238dee41639fd2f1535374c7f84c9b432756fe5e22eba38171f2ced867bc28b924ac2d338938bfa840a560ace54d4ffd329e986a0080749b8
-DIST ncurses-6.5-20250201.patch.gz 77337 BLAKE2B 1bf6c54f1aee6bd06ce712d51185aa8e6efb9b623f233efbfa5cdf320c9798460e1f7efe608984403245548ddafa91960c94d8cd38919baaf72aa19f06d64e9b SHA512 8e934563f2f962c278703c78df7c4ebb6f9d4d6730818b3a993dfb5485c628144c524e8f96105ee51abf6991397e8d2f4636b6fcfe62dd483d49f13a6a62db6d
-DIST ncurses-6.5-20250201.patch.gz.asc 729 BLAKE2B 4e2b779d57e72f3ae4f66f3e86a4d6387e99c547daa455566c8023cab15b1b4e02eed0670a927915837d7bcdedeffd097bac05ab5cf782b16f1950f2e411d994 SHA512 2be95ab0d67512ff6bf36247f2d34d0da3b159c81525fdd31b68d46ae0647c8f17c63e98974a64718429d9bc89097de926ba2e5cea7f063930310faf3a80c8f5
-DIST ncurses-6.5-20250208.patch.gz 9350 BLAKE2B 098ab1dfbd7ffd811f8620d4b135e3f6ee2dba4b3262e257a08db87aeded388957a1ac28a86f556238e81b4280462a570fc35de4f83fc754fc869f4304350558 SHA512 227404aa59cf4d91f7ccc18d6fc671bba609976a79f04b36bb8945839a272c180112c2dfcfde09608357c33755aaa46d5701c9e8d014407acf1957fee8c95b81
-DIST ncurses-6.5-20250208.patch.gz.asc 729 BLAKE2B 758e2d76a482ce04a15f480386b09582625175c3bc335af78e16f26ac9130d9b47803290ec5baebfaa408426b506f58d8724379b45f12ee51afb071fb5f2c95f SHA512 e4cf7e188c919d289b01c17b9b3c83a1e43aef88a2a5ac65d5bb393c4b4fd59239f75898d818b6fa437a68934bce8ab03b5ead76ae2f1b07a34e81687cd99422
-DIST ncurses-6.5-20250215.patch.gz 86483 BLAKE2B 368f92979c030d7d997e6abe5727f54fba5c9f7792138a1ef57e45663cb401979c50249618c9ec3a6b1977cdc4848336872b285d93c1ea682a558b04a331c002 SHA512 de4ab7035bac1e430aac49f1d62d2758684a46e25f86bf35db0a13d83cce253b0bca8c9ffcc551d4ed6ec5813c7ec214e6a93e6c57f19e7b3406c968fe89169b
-DIST ncurses-6.5-20250215.patch.gz.asc 729 BLAKE2B 1eeab408601e398dc926e9dc527d6ef238c96836bb09d34c71c2816bfe3a70d6c5376f890678828781cfaa92c384ba0a886947fd536cc053612613da8075b1f5 SHA512 ac716540c1ae3c5f19076eef85f91cd0608a61439974a66076d6f63a86ba12db117e11304c2d84aa04f9e1ed5574e775af9d1e067be742c5923e7aa644a2483d
-DIST ncurses-6.5-20250216.patch.gz 2939 BLAKE2B 1cd97eed7ae44d7f792a8c1997805044bf8cc58b90e83c0226f3927744cc229b7659f4ebbd1b455b2cbf874c0fa7c0f1bbf1adca254de40f8d5a481653a95a0d SHA512 ca9dcf5a0fe1c46db8d810cd509ee8c824f72f22b110cf6e7958e320fb5d077d92dbe47e94bd10d0c470493d36d8c79ab5f2fcbeef5742c5a7c4b7816f26f4db
-DIST ncurses-6.5-20250216.patch.gz.asc 729 BLAKE2B 61c52abe6721bc9328ee1b80e49577d23233c831142c746167428eccb432edc845b1dbee5050cfc339df8fde17fdd0a5dbd47066f8ef734fa8a4688f7a650a05 SHA512 d3411ca77e41b5e560faf28969121b7cd3aa3755ec1920a3e48d955b2d723fac26704ce0b2288d68d180a19ebc5c97624c65c73a04081499dc9a40b11287647f
-DIST ncurses-6.5-20250222.patch.gz 11376 BLAKE2B 9c204115b5c9e863b31fe5d995e16c42ff74149e7cb46bffa2eeda652cbb295f4cea76456044884bcbe0c5be09a4fa15cb6badd47a7ce924d4c114e2be9565ac SHA512 bd4bbcefe8038641c758d2a7e7d36db5f737c08b264cf752d9fdfcc7a6283c8e23de4184bfd9e133ec3b8b3c8c1d9ebaeed5acbfd93df9abedc750502c11bf60
-DIST ncurses-6.5-20250222.patch.gz.asc 729 BLAKE2B a02c80b18a4f8e4ba32e206c9c82a1b86b2c3a684c467eaa16f671a1febd4608733714193eca9bb9aef2d7ebfde0a9db42c748682076830158059cd4e8de39ae SHA512 d52a9b4cd6aa77aa9fcf234e5d5284fd737faeda770687ee1ad472b5d2f933aa95491e41c3ed4dd21ccbcef0c6626ae1745059e2410404d903566db1ddd9a76f
-DIST ncurses-6.5-20250301.patch.gz 68821 BLAKE2B 5425c87b29bd21109d725f84d9dd32d597a11b87866dc58936f7a4d7a542691278c15ba4e0136cb2802959234a8b89e9183b7433efd9c06f38d8384ddc556c04 SHA512 90243c324ad01a3fc0ca6f00275b1444c0d93b29205070e0b964319e9a11b92ff41bd7f8a995141bc59b722ea858f7616308998e30529b997a77dace9199f8ff
-DIST ncurses-6.5-20250301.patch.gz.asc 729 BLAKE2B dc98383dff539f29e095b7815e4809352f717c0096bb006ac4b05065e947b16350cda03f2cbfadf13d9915c049e5b5b6b7c43ef369231525a5fa346d915a6cba SHA512 7290322560a9443b2259f4711d3349cafea3a67a04e80537f0d3f35b4d68c0dff217b004739fbba92e41e290deb866ba00520fd14a6d420a2052cad80eeff31b
-DIST ncurses-6.5-20250308.patch.gz 25507 BLAKE2B ce846a29f11a6026f3c2f470a591b364b98bf39b34ffdf45922234d4e5c3402519ee569fc76bb529afd816b26cb33f518a69dd590dab736719ddbc06f19cab9a SHA512 1ac6c11e364efc09769cc4742b3fe6315c882e17d4b7c5aba81cd10d9fe62d103003b60ed1edd3fc3ed3b003c8bb198b47d25506302bdec493c7dc115ccf1d54
-DIST ncurses-6.5-20250308.patch.gz.asc 729 BLAKE2B de715c834df717cd24a5c76a62ae64f8fdbad7ec456b1d8b0c80e404194fb9b5a098889d73e1509527062b82336d8e1c8c9c377c9c30830804918b1ce7c5db51 SHA512 41c3932f3fa6c1fa00213ff384bbb073119ecd3f7e16094d9b98b949e04c6444c5a96e7b747cc250e905a9f45cb2d484824401e0beb29ee65cc3874501216455
-DIST ncurses-6.5-20250315.patch.gz 24256 BLAKE2B 1cc1d49aa7fa6de72e3c29224e0c2b3cc52ac822a37ac6536cc0cebbeec58756957d30f14834c7db290bfc771bb1f5b904fbd23f4022d9d152f6a852101d95cc SHA512 6c25a2318f89bb462177d22b3718b251a0aa8253e4de386ba329ee6ad6d6096ed700373899ffb3789d6332f3fb5658b98f058904ac8ccc0880a6cec32304b876
-DIST ncurses-6.5-20250315.patch.gz.asc 729 BLAKE2B 9c5db62891ed844ea039ad0db6ec6bfabeb4955e2133ff09097dcdbde8bb27f973ca76440ad784d231331b421d3e40237ca84211d812c98924d4dc764d557ef8 SHA512 61327a0ff14c9af35aa89aeaf38280920cb0d53da7b764e956baf8d8f4ed34d517b93be6e64080ab43ffd4d375f75a0c5e2a379ea2530cb7b091f43c567c7dd4
-DIST ncurses-6.5-20250322.patch.gz 4987 BLAKE2B 708811bca043891e8c09ef137e0e2cff9a09b2a7d2e9ddcce5b0a1c8822e7e4d34c87d9963f8795b73394cc25b0b7681384d0cd9b8de8efc48e3017965e942b8 SHA512 5342d1571c82a492fc4ed9448c72303871709d37840a96d44be4b4a16254051b44cfb89272e29c1f0b283073ae82ff73e7ee9e2d75ade226957d1da838854456
-DIST ncurses-6.5-20250322.patch.gz.asc 729 BLAKE2B bd38bf5ed3c387f5b5726363e3ff58d7f0654a7fab6fa590a7965fd169ca0280832130a338d42692dee72da97afd63b5e738670df37a28f170339de6097e040c SHA512 649b46cbe129f48ac030e79d4f8ddeb3ee1da46af634022f4bf059e3ce31ce02a633f53eda776ac8c49d9ce0c4fdf8d8eabc1e1b22d9205c582d9b9485198e9a
-DIST ncurses-6.5-20250329.patch.gz 5288 BLAKE2B 2cb8cbff061fd22badf488db087855287f86fef50c79ca94bb81cf0152bbe266f2406ad62a1eba99ab7c090dd3b01df8964f2b5ae952c0c715da7947687ec00e SHA512 42e88dfe5c862ebb6effd6cf9e3bc79d5ad797b544a0f8891d165e97a4e1ab840efc3782e8fe78327cd030d3c1c9de3ba20a7c68b32ef9910b4530500f605694
-DIST ncurses-6.5-20250329.patch.gz.asc 729 BLAKE2B 96517ad803d2b91849119c890b6cf7e42f401c660e992f9b4564d5c6c4e2eab585c2dea85a41e4bd0d54b4434932cbd885d2a393063934e092712b043391c700 SHA512 24afa71c892737b4e0a557e6efa37f3ee65bd341c47ed2015322d8d0575efac0eaa9518e967a2c40e91a3f560d58ea553ed3d089d729dd53671db1abe271bd4d
-DIST ncurses-6.5-20250405.patch.gz 89875 BLAKE2B ef06de623a5940dc5648392765f280d6e8b47693cbc7c41df269ed3df62031675e5f0b53dcca005d00591fcad9ce46d162051a2c8397eb8b1909db3d9ac3fc2b SHA512 bc540cf6e6b58253900733c9362a1662c77369b79a0553a6a56edb2aa63b72815bd9e083944b6f8b84228c81f2ee0647c2d5cafba6cb12fb6486371320a60d87
-DIST ncurses-6.5-20250405.patch.gz.asc 729 BLAKE2B 1612dda4524e1764ad7d6d28399e3b968c1e6c00b1b49179ed560382bf97e8570011719bdcaba284dd7d3a4952badb64216a2bf6e7128ac78d3eb156de9bf445 SHA512 3634ea82cdd716ac59da52743af551ca0720bf0c07b2a237f7eec010628b5cff636cc96eff167402097e8eb5aac11bceeaecccf270ae44081b7c85982d82d895
-DIST ncurses-6.5-20250412.patch.gz 19036 BLAKE2B ab471f5d9f3a8d7cc05104ad0d40036b1e38440092787e79b7fb705d576a954d11bbd5acbc279d550ceb6e220f51ac2cde1075f31dfe71633e4c73ab8ae04697 SHA512 ae240b24977f78876f9fdfcecfccafd22d3561200fa4a751b870a0c467d693080c854b62750bfd63bd0809967f62b300aedb8ec7f6d24f0cbb299442e2ddd39e
-DIST ncurses-6.5-20250412.patch.gz.asc 729 BLAKE2B 36a5ec7490b3f25a2696052d59292bdf4588db3d73b73fdfb47f0f199844e6ece26a8fad0af499b9b53ac6fb9a37085d2146a0f490275aa27fa255912af6b5e2 SHA512 baf8c20988a620eee8eb4dc4399ae635523fe644578ecf73605f4c736fdfff281d0cc4a6d7df591bee5ef344d3ea2d0d3e0615962f0d78a6194a91f48ef7a7eb
-DIST ncurses-6.5-20250419.patch.gz 14283 BLAKE2B 395988f7f2f5622954d98296976e77889e3a9d5fe82d745c83afbf95b13618ba9fa07d1e28cb80ba51be00f28beb29f20ef4aab0f3f8d1c29627c1fa8853203a SHA512 59120b8a53277a134946aaf367935656ebe31c2cd955a0dc403b799cf9e56db692d76c66c6274d4a32fea567ef8ab3bdddf20667ba9a909d8d856597b24ae4dd
-DIST ncurses-6.5-20250419.patch.gz.asc 729 BLAKE2B 47043488c3595f8ac519c4ec71ab0054640f14d28b74a7bd335bc1af18d592ec92cedd4a2e18c88ed67f6d1bdb9b0aa8b0a842222de0533e1f0f01ada56bb93e SHA512 0ba92af7ded7ecccf49f7cb2ede7a49b964dea1df094a8c821f1b198fe09c23c4ef01002894a448aedc82baec4d3af3d020c7fbca9d108a31452430392400d2a
-DIST ncurses-6.5-20250426.patch.gz 9888 BLAKE2B 2442d328642ff0361d60468e726bdef62496be1d95ee715ced4c9ee5469b8ff1b0b092743a9487dae3e154c3d5a476d58af27853b7e7a0bc7db6685006a23dcc SHA512 ccb28a0e0003efa6acb7e678ecd6c8ffb35437db869ee0feb2d7f9ecdac0e89720ed09fe37d85bfc83ba4eeefe8db80765e80995f63420d789975adf4a2cf494
-DIST ncurses-6.5-20250426.patch.gz.asc 729 BLAKE2B 917622a82bba7a18af851d487b3d0969820e485bc2695b1a543d467ab899360e9502149ba32ff731b6a9c8050104f8024a9589ec29fe7d8be644d92e0ed8fe74 SHA512 00ea24c7564c594ea43b29b6ff9cb763b5bc69c1f3b4be60505150db8487533bbfe9b93cf702f0ea6bfba5a1fe203c91c8e0b1c93e22e1b973178377ef4cc970
-DIST ncurses-6.5-20250503.patch.gz 51443 BLAKE2B a45f007e24843b6c2a73c5f15652d38f992aa88a2543189e5c210977e2962be269637d89362acfd5b17d4e2da8342cd99a8695746cd3501cccc9c026c3318b6b SHA512 402075f35583917b2a2ec27a3a2f30052685cf4657b37b1032c970dbb929ef26318ec537d52cde8715c3dc937732a7c603a08c889e38c5cab46c9010e817d991
-DIST ncurses-6.5-20250503.patch.gz.asc 729 BLAKE2B c0efd97a3ca71396f3e33c263c3c0129c957f195fa8ac319924c860742e917dde17f88c27706ebf7481d6518cc1f86b086dfdf0b637a05357f9826d3a0cbd20e SHA512 b8a30ae8ece99fadc3beba610ea7f404070fcf59dc314029dc2bc6345bc79c9420ca3c631da7af7d60aa4d2dfcda2fb1b042acadcae1534add5befaa24fdec76
-DIST ncurses-6.5-20250510.patch.gz 5373 BLAKE2B 81cb9afe5b73c8daf7781891d3adbe4e3c0d52dc15f053f4a53faf3c7ced4f30c4a0d7351a6225fc7c9c3d0485534664523ee77ebe9ecdbb853cb1f33336ca1a SHA512 83ca80ae6f52f87956fcd9e87c21db923ced3251f81d781bfc9de25619546edda79c2324a9cb3ea1735c6fc993ba0aa67f1fe6f57c40f800ea810fda0eaa15b4
-DIST ncurses-6.5-20250510.patch.gz.asc 729 BLAKE2B 52ceb3917a9151cd3d1d02232e7a109697305627bac43ff0c548c6cbbf58b79268f13e85c55c47a8d7a6a889e2c63fe09596fd50b2fd7967eb28ccce0699b26b SHA512 65685481dbc730cdce750965cc9384c8390752d942855bee9e2536b50d0b14098836eb8290f3aa7f9f47b271bb756b250b399e36ab229da9148b14edd3d88dee
-DIST ncurses-6.5-20250517.patch.gz 98030 BLAKE2B 164ab687c773b184ae33e1970e11bfc895200311f85a3547d7ec501f9addcce0e064ece9a5d4d29db699c9c73c7c82e502e07275fc5962dc98bd07e69d183ac8 SHA512 fe111fa7e32100c953ba8e1c2ecda7a7cddae5b2e929793e2ed353696d5cf64a7ac69c170fb253f4f1666f47cec3003649e3c9fdc9460842994e35d82591360f
-DIST ncurses-6.5-20250517.patch.gz.asc 729 BLAKE2B a392c600c4fe676b092154082256c01147adf71c1789cab1d95bb886bd1b869ad9d163f4b3c12ae8382ed729269ea43f8112abfd4cf36ead2c930f1bf6623825 SHA512 695dfb27ffa68175113fac3ccde8cb456cb78b6797fe6fd3aa7a8e08ffc48bd273b68a35741ba356b935545314e3e9669fa02e3dc6caf11fa20960e6011e4b67
-DIST ncurses-6.5-20250524.patch.gz 3599 BLAKE2B 5e1da13964f10d846afb26f8759590fd8ac921b386cef77922a509b50ece7f35867d1dbfaaa37c67186cfb718be12eb782bc2dae8ea9ec1cf5291341b24af612 SHA512 b900f9b6f507130da2129d3399540a7c1462cbe64c8d44319b28768521269b0ac823b6b0ebb3a51d0ba68aafc7e05b9699ff7f08ec2213550e9d80a9b2c6bc2e
-DIST ncurses-6.5-20250524.patch.gz.asc 729 BLAKE2B ba0c26a977da6874fa9f005dd094527739357384626b86f40edb73f9e41b63f5f43953ef9ec67dcb0d82404f822f6599c38ef8b5d4bb0e3b20e6c8f04115cc27 SHA512 6fafad6288c3fd87efded4faed2f2a4de705bf207cdecb5759f13be9bc6e2f866a1eb7d47719388f974954e78ab8c70e9be8b558e8f2662a2c042d16662ea281
-DIST ncurses-6.5-20250531.patch.gz 3172 BLAKE2B 225875dcf8adaf785efc0137ee0cdd7affb378ad266aab0ec2dffd4197cd74daafcda5638f0e3c09720a41ba9506ce46ff7bbdfd51d13cda4096d6b7be1fadb5 SHA512 763a3ce3e26445f4b978a7305b135e2cf94f7973db22b7228ff1fe9eee93ffe82ed32aa0012c9b2916599ab3980e455140f5150af420d85b75f33a426542acf8
-DIST ncurses-6.5-20250531.patch.gz.asc 729 BLAKE2B 94e72ea10c99afecc97c39854522dab0e95d970e77c36b558003717cf4f8a9f32783a994c88f6e5f657310929c518a7b80e46fbaeaf51f48811b7980458b6621 SHA512 5b7e4b98e2127e914aa997b63b59b4e3e5281f7a453d456ea4a29e5ec84da8ab4c8c74a3723e61613e04e85a412f37488a5cd6f4ff5536a05e3d91033035ecc4
-DIST ncurses-6.5-20250614.patch.gz 43730 BLAKE2B e8f42867dcb03a70024dedd0a635c96b0c913f390cce719c6c0e0adab2c05c24c9aeddfafa5bc7c5b752c45a814ae216d89555485f2e3d9bd49353c4faaf4f8e SHA512 96e91602881c041ecd1d71728114d74066569c9b97908f7e04696f3106c95fa21dc67fed58577f013264aa01c24b647fa47fcf7bf76e734029fa68f99054710e
-DIST ncurses-6.5-20250614.patch.gz.asc 729 BLAKE2B bbda791fa23caa08c25df5eacb100c40bafae51921a757f010412c88b8c28e152fed414cc21079a70c0faf6cbd972bfbfba75dc1cdd8d5d9b43215248a428884 SHA512 7774c6b8215967ef6e9df4d89b16fa969941cd1330951c03b6026b919b90469dd4e801971bc45378239cfb44a3e82b8003ef3c8dbb483a1fef02da49f2a7a315
-DIST ncurses-6.5-20250621.patch.gz 12198 BLAKE2B b342b10304c4e3df42a0d4823b5b9a8c2174569e7e6ea3e34aef7dd15c5af623af05ba9ed2efc5cf38493a7e18f71f15627a1596660d086e5f9ffdf1c5a36cd6 SHA512 e3bfe7b6dbaf02455ccb53f6f178d4b409d26d47b5bb26fcbeffef078696d124aaee04faa8d8a291c8a9e10ccd9184c5177c8a5ecd60b26eb49f0d1ea43e3130
-DIST ncurses-6.5-20250621.patch.gz.asc 729 BLAKE2B 110a2190ca7f2fd902bbcd16d5d499d2cc8a6ed6c2246d36e2766627c66d1e0283fed9eff1152febdebf50d327bd3e3ec598fa4fcf25ebd2a78c559a3ab6d7ee SHA512 adeb65f38a698413451a0d5e626da09e5824ec2c44197ddfd607bb888167ccf239134774c1c363938761ffcd49047b999603aa76681262e73b11f9f1e3d52520
-DIST ncurses-6.5-20250628.patch.gz 3861 BLAKE2B 8707b14c4e9e309f414f8f2d70619f631dd531d3377050d2c331405cd350c28c2ba5579c328a6112f2c4e199f6a13c3c266e985ab33d977f538672798dc01526 SHA512 927838ddd0784ae192f2f43602715bb89f88b05b33f8bbf72275d9920bc4f50e060b1fc49f36b08025487d9cd2d2f7d4b3c38188029d33dd64a31efff38a6bcc
-DIST ncurses-6.5-20250628.patch.gz.asc 729 BLAKE2B e33aacfbdf9e41dc8b457ab213e26523fb11dfc2c9df8db6c128387798a7e18813e352c275aba8524d9d4d4be2c71db56973e725952ca361b418d1bb448e1513 SHA512 2fcccee11626df82508a01eaeb8bc9cb124333705adad7265ea8825aac384bbd774527efc6462184fb2b60fdb10f36cc2a81c4c484ee3239070385ece50e6887
-DIST ncurses-6.5-20250705.patch.gz 180212 BLAKE2B c41b7be224247e63ebb030924c2e5e54409e31713e307bbbfa7f97e10b368ae651dc0e2deb16833c5f2c58891f9558946231db40eabd5ad5e6a91111fdf3afbb SHA512 eeefc5d4247b3bf647d79b83eff7b36c51b543c8240d902afa005842be2322f526a67c9aa8a2acd877a0f41edbeb00018c31e879acde7e67d7a946285936f5f6
-DIST ncurses-6.5-20250705.patch.gz.asc 729 BLAKE2B 8fddbe23e3eac1fc9ef4b9857aaf514c82d5351c48de0fae90a2e16c138e50c69b77863bb66b076f20aa08ca1e8e222db6c8ac302fdb60aba604eb2aa414d53b SHA512 1bcedc2da8eb74bd6737ac1ed05fcb1bea363874d7780ae3b0d2fcf5a9c243bf49cea305ea7316995c5eecb41bb2adac0f25cc8be7ff7f85950403c64da7459f
-DIST ncurses-6.5-20250712.patch.gz 8310 BLAKE2B 20a8696895afe29d4a2c10a425315a87ca33005d629d8f87801dd9562963396b0230f87b6c62e7ba4af487cf9f9e1687cb346ef090a60623533ebd35838a261e SHA512 e49a3d807859be4c7842bdc91eccc393ec39fe04044b077203e978e68168bb251cd60d93176e32c49273e533f694dc858520baf3ae115b33bcb344fe9e0a2277
-DIST ncurses-6.5-20250712.patch.gz.asc 729 BLAKE2B 43bd707944676c871a5a5253b5898e3188d1301fb8ccf5e2fd81787476ba2947b93882996ee1e23f3c68dcd68ebf360e6d6372bf38212e06a2eadcf50bd604c6 SHA512 5c1a4c3a6fb615d8a8eaef30f7f25d996e8907ae23e23d288f9fc5d64827477dbfef36512fb123a2fe3baa13592978a2473621f62ca2e338eb9120ad4b505b5e
-DIST ncurses-6.5-20250720.patch.gz 126004 BLAKE2B 3898a4cadd1d7f903ef5437363208db8412b9de5c718315c73398cdb28daa7d90423aa9c4ba7e1c921b1e3cca9f9980f15d675b6a14ec114835b0766024ec465 SHA512 90a912748ac7cec005172929a9432c8b9f5338d690a863516c09b74e96a38c1390fd2ec4e60616feb0aeeec0d9e5bdf71bf525ed8872b116e309a87701a45a35
-DIST ncurses-6.5-20250720.patch.gz.asc 729 BLAKE2B 27cbd419eaa27199787dbbea8f2049f40d83633760f57520f2dde93f55a5d5fc3b7559d3767e32cfdcd930b2c5b018d5e13b301daef0c733d9ca6acaec7dc4f7 SHA512 d41ed183e64fef73621f7a9e9561a5b44ecaae452fc3bcb4e258099f1f7fb06283c6f7a0674c6c40ecca6a07bd3c10782e22ba3618b6153428265a5003d4def5
-DIST ncurses-6.5-20250726.patch.gz 47760 BLAKE2B 316109ff7e38c6ecdec115e7980d307d7e16f4f88eee096c620b5750158c288505c8f41de1ec9d9da49ff4e56839166ab994393075d2f5fadcbdfb3c7af2d9c9 SHA512 1c47b7db0fbf77c78b53fac1aeb09d75297c1f46fb9a26a50f7c350b70d1e18fd3995ca4856d67fa9664806d9d64759ad13894924ec7d583973791ac127e8b55
-DIST ncurses-6.5-20250726.patch.gz.asc 729 BLAKE2B 0317fe9d4251514a01848b804e1c0d89cbadf6645127bcdb5b854a4a60346de1ffc5464454ac9cb4e930eed566e65e3c5b9624b2e7b76b264f4bd9cbb6f5e70d SHA512 847d6de3cf0ba49ed6cafeae269966d1687e061eb546b0e05ab155af20309ab7fbe0eed6e4d226bc3859a8aa7c526d2781233bf06e9862120c57f2791c2e52f0
-DIST ncurses-6.5-20250802.patch.gz 4000 BLAKE2B 18c7855d0a16ad24947b8f9099729dde3d4bf5509d310ec6fe48e52436a8e9c151b963020c798484184989c9816266ef21f5545d73e5d931a8c07da318612e2d SHA512 ef29aeb611f7362343356b50f602298e52727df62dea661dd9b831f440dd9b3ca3b4e0a57011222db9e8016fa06413ef97b83936445353dbb11993f08936d95f
-DIST ncurses-6.5-20250802.patch.gz.asc 729 BLAKE2B 20bdd09573b76d1f37964f3af89e96fa481a8c3cd3872de5b8c1fdffc718c4777ef7a5a99046b17f06a92a9266f46ac29df5e21c473ed3fbaf1e03fc557157f3 SHA512 e2398af3d20db4fff9d724a8c7d6da32c094b95dc8156c46f6f5f3aaa3f53b9b0eb739bb6be8afab54863180ab56e16168056b0852ff3aefce0875a32f2770b8
-DIST ncurses-6.5-20250809.patch.gz 46897 BLAKE2B 42c023edabcfcd3fc83941b9f250d930b69a1ee1b328b68512bbd0499f47f7ef7e0f7cd292fd5a263fc35a25d25a51893cacfe3d7efd741209d8745afb2cec53 SHA512 b4186a62aa987f6d258322ef2288d3e4742915263baddcb7c1d9ca31b8097abb93d53cfc96ce205d9aeb6793d207630a34420541f47cd9eb328701fe83ec8757
-DIST ncurses-6.5-20250809.patch.gz.asc 729 BLAKE2B 480600e7cb9032b38aa004a1dd22a917b31c19b7a530c1264e52ffbb775033b656db4a00bad6477b71507ffa355c6e950d0a4bd42fdecceba3756905e44d0421 SHA512 0fde10847f267bb2856ce4bcfff5a7c06d59a6d626e94cdcc575f95a97a1b4adf8b89859a01970451ff1613242d9cf757c64e0d4ef55428db49eb970a8da271f
-DIST ncurses-6.5-20250816.patch.gz 119512 BLAKE2B 57ea32c56c3d7aa5dcf46c4432974b0b252e6a30e9166a14873f0621746366f6273161c640b98181ebed59604ecfa975740e509f56d3bc31a7186d5e61364226 SHA512 7723c14dc469612c0b5d0eeb02117f46c2ce06e2b303d0411b0ffe92f1149adc90b92fc8d66dd877f11d6df3ad019ef2d36d50564c531b8ebccec82083dca9d5
-DIST ncurses-6.5-20250816.patch.gz.asc 729 BLAKE2B 8f799e324cc3f7fd02bffa481101fe447c544b41ff0839c737101731945331c9a4275a53d99d08cc8d7d27635b5d8431d3e620ed346124463817ea676beb3dc7 SHA512 94b3bf84f172c28eb01fb341d4f578c80e3aacfc218e0288cd9846981cbd205af6302432acf9d2616dc51cd6acfd7c45942366c6b1de2f3882896becb064a7ab
-DIST ncurses-6.5-20250823.patch.gz 44210 BLAKE2B 26dac2ceb0818800e82e13fa5cff5df8cedff4c70f6326b2d3c946131099e37868eecaf1f14f3e11d548f392061a0fa2a395c9737c557a504393167687528a67 SHA512 d8ca6b886a4dd07d77cee10dfd63529580a2b7951c730f30c56c29d1451aed8d90f0a7ce0de9476c96efebdfcc341e1180c3076383da10bf9cb643ac4a4ba93b
-DIST ncurses-6.5-20250823.patch.gz.asc 729 BLAKE2B c9892e424bcf8737019876d4929e383bc95a047b5af20955700f8d88be57453f1b78aae4d88370529a22cbec12ccdb8a5bb3f4c81c3f0a983d81aecb5b438c91 SHA512 eeea41aa72b1c9006dff584dfe559e766330d4715518c2356362dbc024d468b16430a6c6dd46823e0c25b9f664e090f5eb464e929cc2c15e725253e1702f7e6d
-DIST ncurses-6.5-20250830.patch.gz 13319 BLAKE2B aa47b1f01985f56e5e2b5cfca44e3381140fac516dd93ba4b6872fa87a3d25d702c25836746e98e991759ffdd5e52daa22905de2648de93ea28c1a0b5634a2aa SHA512 1905c1c6ddc3df31e51c828c48fe81af7b93991195853d5d04031b10198e1c5eb2653e3552ec894867600a23c7e5570ec104e711406b1a7f47579a272ed38147
-DIST ncurses-6.5-20250830.patch.gz.asc 729 BLAKE2B 565e7a6150554603b27a005c0dc3c56599ee39efcf40959aba962fdec638b2affc4824d8156d8c70b0c305e126b1ebb2d325a211168ec19aa17dbef2c68a5197 SHA512 126d67074b46c1f529a632a55ffabf33f850322be57f7a03f7c4c5c4a69dca89a773cea64b943217af6eb2fbb9ed2341545fd7bf6c7452b6a23e250296bd5717
-DIST ncurses-6.5-20250913.patch.gz 80129 BLAKE2B f42227602fcf1651306904ef60f43ee783c9f1e01600b6083809e82a05a9c70fed773c9eca163234a0381f4a6885906cbcff8672ad418a79384f8fdc765678ef SHA512 8ebc583e6f7454f05210b1d31d5f369facb918c6ec01faa649160ea60458dc89a15ae675b4b6a91ef80d728730d78be21ec2c7afa8d30b4bb7f1b572e9713e8d
-DIST ncurses-6.5-20250913.patch.gz.asc 729 BLAKE2B 82f637fd79d8ddfa7ee9c69a39511fe91e4bb0e83399ac51bd9f662b10a1d76e511c72e1856b3aedaa2a2958a26f339e526c27b5bc5d30d3b79b1a716c101893 SHA512 4a0dfce56ce8d594b8295437ca7325da41f4907090663d5fa43a9d8e41a30b4c746463bd980988f15c9ea474090370b378fec52eac371aa2a4ae1b5c75ccf5da
-DIST ncurses-6.5-20250920.patch.gz 37175 BLAKE2B 207cc906673fad63c664dd1f31cff7e2a417e90f395d475d1d934eb61921691d84ea12d415ac746d9708384118ad0835598316b55ad8e79cc887690ce5656839 SHA512 cc21a8f3cdb512a6742aa9760e223114a5fbfafdc05e4bc4413f0b3ec32ede1c43d48dc1dd98bbe572db4fa39a6e1c92de356f6d7d79654b5b9377eb6cba5cf9
-DIST ncurses-6.5-20250920.patch.gz.asc 729 BLAKE2B d2294d67deffb414a52f7bd1e2ad63eb00342873c3474a4a8f3c1388a3c3b6fcd681318bcd9fac809d2ed003ae3149278a384e7089a4da8980b63f5e5115e169 SHA512 21ed7b930ac4e3024a1576e5da19220d45b3d27de93846c29e686e7052af97cefb3d167f87a00f7f176234ab238864d05a55bf14c1c18fb08eab824d4d99c97a
-DIST ncurses-6.5-20250927.patch.gz 8267 BLAKE2B 728d22b33733e5da996898ca55555e47ade97928d1077ec13dd92a44291d222eecf75174fb142bba0806b9ee7fddde85ba700b91f96aa12a7dbf214785683634 SHA512 bd3029306b024301b2500fe2871d6bf7e0e92ff83ec78080825e5fc5bed0ed63736a798d32c4a9955e30559a2fbf095a7ba5374b1aa04fed8b46b64fd9cdd245
-DIST ncurses-6.5-20250927.patch.gz.asc 729 BLAKE2B 925cfcb07449925e4c3bbe1fb25416cba78756c326c98ba58f1155d4317900465ca9b03ca51eadd60c8653a2e6967da204c6fb73a777665d0edfc77b55226271 SHA512 cfc2ec9a1228600cac21fcc206f3d5b72da4f4d9f70cf1315f927463c87f1090d79e875594adad93cbe01f9e59873546eb352832cf49039132ef280621e4617f
-DIST ncurses-6.5-20251004.patch.gz 203325 BLAKE2B 4c171114cc9cb567cb2246b83a8c32ecb1addb22a70ab4c7637fdd6da5e3b198cb5ac73776bde3b38c98a7334f405c7bb1df492b05864cc04ea82a9dac21b79f SHA512 b0d28be367d00ea1c6151b57dcc98767831ee3c5f9823b3cd0f1d8b099b0a0bb95c3d08d02ac766988a064dc83e2a264cf8ae91ed1fbd8f3555bd943e86b62a4
-DIST ncurses-6.5-20251004.patch.gz.asc 729 BLAKE2B 25024c8a8f1dcc03383052df5566955835869b1f1082e7fc294bece49fb2b6e523d9611a3f160fed69a63e1eaa8dd5cf40a670351c4aa302e8841ffed4d740ce SHA512 556230f44629b5d01b9b67e0a71b607b5d822330dcf046a2a99e6b2abb61fd60b201323b6e148a66157c3dc667b78fd1943d6787163fc7293fac7df5a151dad6
-DIST ncurses-6.5-20251010.patch.gz 206836 BLAKE2B 86661e45894bf896ef0f3157571f948d0291db5c7a2018a66bc92ecb9a54504efd0cc142582bcd557da7a48920f30702238f6682fe3f72b2002bcaf72211d7a1 SHA512 410818b46b50b640a95ff4946ddc3a7911c27a702c80edf4c14d24116c033fac4431e195bf71ac4a4be19db4d8e486e2710e89be3e6cfe15739ec1c9bb305788
-DIST ncurses-6.5-20251010.patch.gz.asc 729 BLAKE2B 8f96014a3aed043d3ef9b298d5478b4d539976a315c4e94587c15d94d54582a5c0b47124b5516cd6c74cb29111b6a24e62e1a9849c7258434f79f946a4be31a4 SHA512 256148ddcac8a5bcc7f7e6f8cab527d8a1e14fa59bc5e5f05225f385be414b80d2defdb3e7929393417e128961de12d7c5a91e1482c1234f20530d469a44a91f
-DIST ncurses-6.5-20251018.patch.gz 161296 BLAKE2B 03ae4709f8ba67039b0b3926b29aa5c591d86cb1de723c0b0b6d8feec8ac48e926c111ba74e3b5f2c84b2d70d69c4c6741f1d74074f29ddfab8f55c18d4c7476 SHA512 e2f53a6104313dc395ad8093faac3af14703363cdfd4d9ead90afd051ab2670ead40ad07405ad9a502cd5f186f7f34c07e6cb20ed28c3ffc374beb2931260d4d
-DIST ncurses-6.5-20251018.patch.gz.asc 729 BLAKE2B 86e874f0d74f9b00a2ee1f66bcecc531681428e0dc98de125aec67de32ce84b1aa44bb398495df273c9ec18061349f87184d0c59cb6518a02c409fabef8e1bb3 SHA512 71eaf0969e90c875b8d301a162b665bc0a0a7091b747133ab443e0851d034fecdc6e3000b29ca18007d390039fad95e7d2cc046b04831c759767617fb3b139e8
-DIST ncurses-6.5-20251025.patch.gz 14491 BLAKE2B 6cd6c3f3ee34b2819d3525723e0ed4755f61fb24daab2113543ed4295cfa83f79473a0ec78ccd7e8fda1c9ccce4cfb01d0199beea8c3773a9028ae618c6c90ef SHA512 405c3599e93895f432dcb3c9be4fbadb61f24ae2c16a6a3e3e4f57c8eb24a679d7233d13380a49f5d1e8adc3bee891582ff9eb512e15799d3a6cb39d3d4d7593
-DIST ncurses-6.5-20251025.patch.gz.asc 729 BLAKE2B 3dd848d6d54262142878ed3e069d022ce78f26a6cd4bd6e6865ac40fb0c8a9da00ceabbca63a6d8f3fa329aed149dfef1e6650274e1eee7669c3d151a975ef4f SHA512 acfbed338e670f5762bc0f8e1b68caa76104cef05ac5e5522510ef3b90554f7806526be0bcf4e59a44b119af935c713dd6d43e0bbba9869fc30fcf2be21287a8
-DIST ncurses-6.5-20251101.patch.gz 17400 BLAKE2B a58218161188f14bc3d21a7c19189630bf364e3abc5a1dabe70e6f986371e23430996c5037f7f668d9cb452532c744cba5e895571d44aee79ac2e14ca5cb72d6 SHA512 eb65a8789a4946ef8630fd93ac60fc690a32b2b4b8ca336f07a86404e5f677e7d85e475a57642959e5c6c7affc3fc2a559bcecd90756261c90221c02489886c2
-DIST ncurses-6.5-20251101.patch.gz.asc 729 BLAKE2B c64b32815ced635c41f39f0309d7305b82c6ae00d5bd7f23ab77c56cf0bc265901ac05bbf1768e6645305894c5200cc08b6d88056e10b736b6409eaecff5f31f SHA512 7c77f189c81c68fcaa685163ed4b58cb1141c72864d8bf74e40c6e2d02a14de4e158537de1259010126893ba543403f99b4768bb06934ba21c825e76ee81250f
-DIST ncurses-6.5-20251115.patch.gz 42799 BLAKE2B 26fecf92c968b85867edbae4728f467693793cce601548d5c043a369ea1e8c03f601bfa6fa972f21732eee9a0e3a96dcc88c6dd01e9cbffa16f8b91d20aa10ec SHA512 4b18e92526b69a8ee5c98814bc8de8c52ddbd7acd8b6e41786244b3f2f37cb436c93dbb398fe02d5af6d8bfac476aa04e9e94e27166b4f143cdd42809a30c932
-DIST ncurses-6.5-20251115.patch.gz.asc 729 BLAKE2B 739bbcd9acc1153b0bd09e9ab1528ed2c5b1d3a6fa15f03b1a5bbf4efa177f631bb4348485e908c184722a8810af7e763b7e37a3dab53cdb7f7a09963c5f64da SHA512 f03991a5069f490fbb79230c47388219adbd9d0df8134ecf33e3072df049055967d29e8dd4ee047d752c1286d4f99bd7706c63d63c8c946ebcf926cd7c7d6100
-DIST ncurses-6.5-20251122.patch.gz 4970 BLAKE2B 9b80805baf3c29bea66434b553c126958ca157f7e5f9008173f31616af447b086c01db9fd16027aa253fd890dee78540426b6faceda265dfe0acbfb40dde816e SHA512 17199617592baa5349554308a50f469078ec97b64659bf6064f7e2247dced030c85409341d97767518a57e3b0dad90306d472c8ac4bb42258448fcf4b9ce8981
-DIST ncurses-6.5-20251122.patch.gz.asc 729 BLAKE2B 1e2fc221870490d02857ad8182b750d3704ca31fc16250e7febee25ccc8a9f33f2c8e2242fac577f21a2ab1d0c70ad0fb68823e932f9fc5dee7fd6f094921196 SHA512 c94a7543bf9d20be4761e651613f7f3ee2fe10153c0a7dc792c35b74f8e78b0e53c0303e754a3a3d6c17ba7439be5d4f0bea0f9686886c853815b293dbb54176
-DIST ncurses-6.5-20251123.patch.gz 3595 BLAKE2B de3f5e9943322f3517eaec91e7b66eb6d5cde63da7208ce330ceec3b7bdba1be999d622029eeff0bea153f6f075bfbcb7f1aceeb36cb774e148162fc77c2b807 SHA512 50ea77cc1f050fd15f9c72bf22ed511e13ed37a44364fbd4d90625f6ae8dd2368f128c6070f137cf4570b8595c77713c05f24459aab9b5a0e67500b79649c650
-DIST ncurses-6.5-20251123.patch.gz.asc 729 BLAKE2B 26de469564d95dad59c933cd3b4a75ceb16a0ecb186a85a6ebcfff3e910887ec476ddf854b676558fa40f0e4b9d4b1508c6f2d33b2c65f32af42f33ad0aae0c9 SHA512 f1f5eecf1d0dc579a62e7c5cba3a38522282cfb608bdaadea5e39cfa8ab2d3f093a28c05ea657ef13a81265fdd4e7e00ab8aed4c158a6ef63b8dfc0e174b2f72
-DIST ncurses-6.5-20251129.patch.gz 3455 BLAKE2B dfd89cd780e415f3a62a3b8819d8f114da76b8fb05113fa71a3748d85e5692be02fc062f3fb943d3289ee6a3eb1287ac15e2241ccb15851e642e881e14de72b0 SHA512 60b0f7feb418a0074e04c812280470bcb9547ecf037f3e8cef93991cfe37e6bcbbd04494de5e669c242f1ab8d01ea38378e079f8fe712f7f2ccf47f44aa8cb21
-DIST ncurses-6.5-20251129.patch.gz.asc 729 BLAKE2B 35455c3155739005c4e019013483144c4db597bb32e822c81c7491fb8246d6c3eac060a43187c97f49121c78a31e3e6142181b04f9fa8018e8284586818711b9 SHA512 21262705f09b945ce7dc0deba62c265779d03bad75c1307198f7454e17bd8a147a0c3145460a4d4fd0073d4024508a4fab8b53c68e930bbcb942ff193e8a4185
-DIST ncurses-6.5-20251206.patch.gz 19900 BLAKE2B 6207671b1cac347a3eaf17ed5b6f831299503f9d2bb85eecea0f4bb1e79674dfe8ea513d96b80fa4e1e1d608e1fc3b670b99fe9126662b94e8abe197b7631fac SHA512 a9b9338f5bd185d281b8659ae56fed6ba7d3d94c8d22274f55de28fe1345e9bfc16e50457e2069d5c15bb7211cdc69a875ca9ef7eaac9ffd831719a074bb8005
-DIST ncurses-6.5-20251206.patch.gz.asc 729 BLAKE2B ddfffd8da860a3551c3e3cbd4ed4248fb5490b5102392c3ed122bebc334f545b3bb0881cdcf77ae754b03d0f502ba6ed22f8c477ec806ef650c16bc4fb7fadb7 SHA512 b1206bfc8965b5e649409508c68a8c7db74f4afb51960b9f043ae77d2ac4570ecc0a333d991bf7a94d324288365a4923fc0154207679a4439f77d9bde95c8e95
-DIST ncurses-6.5-20251213.patch.gz 3444 BLAKE2B 6bd6f2ec52b0388388e238abfbe63b1d8f7eec7b07cd00e9c1bd4f30b72810a6bc65080e644f7a2c8ac20548f74a110bf858ba7d6a0385d1f2735965c3c315f9 SHA512 fdef9635e4de7001309a428efcccbb6ab5c6be532e5fad74456a733bf5a56a3be8c03c71f2c8add1dffa4cdd42d4373a65ad19afcb40e641802d1f458ae7d13b
-DIST ncurses-6.5-20251213.patch.gz.asc 729 BLAKE2B f9b41ea4a29d06b21561284b398874b5e145557a6119516a35bcee27a3652af3c1f289b78b0438f65243aaca63a0e84fd7f20bee61fd2c942b7118c60aca164e SHA512 cc14b5d519405f6d784fdf27db14c9099717263ebc7fad0a04dceb68c39d5cee7c4a6f2b80eb69e1e223b75d30f4b4b075af5831f1bd7e440f93e7b56c9e8c0b
-DIST ncurses-6.5-20251220.patch.gz 46642 BLAKE2B 4b0f3edd124ffbaba3d20fb1594ecc20ad10ef96a4d403579ccf9bf3f20eebbac57be973a08ef0b343213e0e2f594d2fef188d208dd3364ee1f7a48294a3914f SHA512 7d5b00f20f48617806867d319a8a19cd2d3e17e9391d537c8dec1aab53e0e7838a163226f83f60a00f4cc407029ce13250da9a60a68561a4e6cc3ad5cf2bb3db
-DIST ncurses-6.5-20251220.patch.gz.asc 729 BLAKE2B d208a0969f99afd55454fbcaca2d8cb6e784008b0c1b10a4272d3ebb16128245774d88341c9ec8f08d5f64280cae89978b9ba215a4168ebb96ecb768b0ff1c03 SHA512 fb8714e858c60fbc7b33b162d681f6f261daeeb6bd6e376c058c12624e976db520dbd0b7a0a87394e81b9b6ef46cd9a127b51a15c334f0da4239e2a49405295f
-DIST ncurses-6.5.tar.gz 3688489 BLAKE2B d0a05c218b5f320ba9abe2f322787baef1d15d764e503c81d49772b54b2927d28ecbeb500c8e514996226b41f69445b4de44ff423cec25b61847307fe61682ec SHA512 fc5a13409d2a530a1325776dcce3a99127ddc2c03999cfeb0065d0eee2d68456274fb1c7b3cc99c1937bc657d0e7fca97016e147f93c7821b5a4a6837db821e8
-DIST ncurses-6.5.tar.gz.sig 438 BLAKE2B 5789b47932ec97d3863c7a65306369f0a36cb5b1a35c1e009b5174f50941edceafc22e6f07db3843a096773663a0ca602c0ecb9465e6042d9a78d76ae5008215 SHA512 96ce61a3d529e48e249acecbf4bb9eae2d9f2f67506e92ffa3182f5e98040c38babf0c2c15d92fc5d96e1181e72be1b29fdbff7bee859dfe2ae387f9b8883092
-DIST ncurses-6.5_p20251220-patches.tar.xz 64532 BLAKE2B 2e15dcdff309cdfae21bb122a57a34088bed9c85658de938e50fee1fd28b73549eff0bf8f1656a0e86a0a53bf1539cc369ef9a0c9daef8d8cf4e8874dac7eb5d SHA512 394323278b59cac96fec01f2b2cf81f134b644e0887f187e9a6b0b3411a18f17252430bbcd7bab08ab578a69d7217a31e482b498e96ff991d4d9da4ec37c8a7a
-DIST ncurses-6.6-20251231.patch.gz 3999 BLAKE2B 54e6e9bf63bcac51d657535b6bd30a92267d3d1dc23ebb490aa1aee257b7dbcdf73c486c1f275f7d1b4024a20291b1ebf83473062366a7ecb39010ef2c3a4628 SHA512 f3fa46fd0666aeb238069a37f5d9d7a6236cbd2a07a9f20829346212d1933b318bfd84bdfda8a1d1dffa676bc10d9efdea6358d452ad2ebd77665e57d7bc2ade
-DIST ncurses-6.6-20251231.patch.gz.asc 729 BLAKE2B 37e472c5318f28d858a7138df8da6728c167a7654e24f0e0667b463880b6854f44509e233230ca07201becb8ed93f868bf721a5809e49316b9d6b8b44892985f SHA512 edd14b41c2d18e240b94f4e4a2b8bd4e49ba36c01afc9327fb54b890975cb89c641158cc34d26d74e3114e719ab9195f61a574e78f49a81d22e8c2ca50812bb1
-DIST ncurses-6.6-20260103.patch.gz 15365 BLAKE2B 2ad88b6d8089310aca9fc9c7bb0f5a66b526f3b8788d5ae5ef49e7f33ab782f1692bc9a57bc770b2582491e17fb83ac4add6b3d947b447ea48b99ce4f63a5a7f SHA512 0d2bbab30a412ded339bffed89208530bf4f2be410f866ec7a93dc9e9a6e3b5e3c88e1ff8583188daa4331f1cd34ff79eed23fe4753ae3221f439f899f1bd1d4
-DIST ncurses-6.6-20260103.patch.gz.asc 729 BLAKE2B 841eb4d74e49ce4c626c33b40407792c53256f316e3af5c0b6fa13bd1c13abdaa9e05a4a99825e42d01f5e219efc618dae9b8b59a2114de0ca3ca2f0856fd9e0 SHA512 9e1055c7eceee0fa3b8aef0a578731901d8dcd9f33a9e943f974130463a0f459cc3e392e4db6e0976ff2a45cfc57dc9c9cfa40ddf0971d6f84f4efb758be1aea
-DIST ncurses-6.6-20260117.patch.gz 20569 BLAKE2B 9534579a348694e394e188ddb80608121a4530f0e887c3cab3b6dd5c8143f0ce0ff7b04f459a681f2ff2658a82a9ec575e8bb83de5921f6da4d57be86c5e7325 SHA512 75473fa4281d6d3e0d4c8473ec37fa7a5163117785d0f7099ff7c744988903705d9378702b26e51e835a41325a33e8ba0cfa788602e243c2cc79d0a7308452ba
-DIST ncurses-6.6-20260117.patch.gz.asc 729 BLAKE2B 79d83208232bc11dd13909b92f2a581a53d945d23535b0e046d08c0c0e14fe4fc3917fed083416870c8b1f89808c10b1503aceb17db47fe4d0cde2869cb11549 SHA512 7f8881b2fd071d304737ecc0d9f5fc2cbcfaa47cd69d1943566538ba2508d33cdb0e26cfbff88f590e461476f2440e2453bd0d2854d8fb07c6b136fb39cd30af
-DIST ncurses-6.6-20260124.patch.gz 13387 BLAKE2B 70b5888f109550fb77286d2e0a0c54fa445cc4c9eb89f7b1dc2e11f81203a3c11f43febe55b78b714486b5a7c3a153290b7c81303f01c3d129f453ba945a2e37 SHA512 2bbe858498afacfd20fb8b2c03f13ab3de66ab8e02c241e03ea11352b560745c7383b0cae3881cafc38ea5604a2c262eab8d8e36731f55aa4e21adb3218fc8a3
-DIST ncurses-6.6-20260124.patch.gz.asc 729 BLAKE2B d812b7ea5466ffedbf80c24087e475fc066ae0c5135a0d3232b3799fc846dc1110681e94ae84365f01fdc159426d5614b571024810264d7c8cbbdf767addccc7 SHA512 6360de6e7088f8ece6a708ae85474e1a157f43a6d52aa8f743641b3b15311947581125ce86b20a57125a776f0bc32ca5f5f0e514b76102afc8a495b00359c9d4
-DIST ncurses-6.6-20260131.patch.gz 5027 BLAKE2B 8d790996694170bfb754c8a5331b3ecbe234cde61fb35b7fd067cea04c3e6a115ba3a47654f06b3b662dd5ddd59b5cb551443f75047caea598253ea465110174 SHA512 d49c24b98a0e1dca3ffd63a2450561f4a1bbf96baa661b06fa36c0e03c330f0298cdc5e19ea1a38b94ad6348df990468a56c3125678b67da4afc0bbbef7d7515
-DIST ncurses-6.6-20260131.patch.gz.asc 729 BLAKE2B 0defcdf8190ce4b2b814ac7845b1af128ad36d580bf0a2026d801ef9b31a578fc5868bda7af6ce9f7f07120ac855461fe4eb2d323b8f5a6913e21c196888a15a SHA512 e4589ffc61225937541cb65ffe5b1fbe2ae373c951d7b1648ce7ce093dada61b318d6eca10e5a383ff9b22892278e74e5efab2473d62968df2fe86306b281985
-DIST ncurses-6.6-20260207.patch.gz 14538 BLAKE2B 98b007beceb6d27224e50fb16e0eae5145a52595f12f3286dbe185ff84df098af516e236e7784faad082e55fb0d026256e6effc9729f5901dcdf4b12729e5cde SHA512 35eb68d1f518ec2fb023d94bb0cf77f7070b0d366695f51b3d049d47aa593ba43fdac6eea47798c9de411c3af2eef9bca3ac54710da1a86fe337e62de743bdbf
-DIST ncurses-6.6-20260207.patch.gz.asc 729 BLAKE2B 7d31ccc8ad8efe3f6b5e48932636774f0af2bd5a534beed03dd8a7c29fce2db113627b4a55fded42546838e7a342bdcd92ff92ade356d133862b23327469fb07 SHA512 f7e4b8b6892ebe362762b5090ce9a55a4f597e15e623fc46c7104c206e3672e91c211f1d7b46a77c2fdece883e7d6162ab3d49e789baa3e19bd55b6b9e81549a
-DIST ncurses-6.6-20260214.patch.gz 3687 BLAKE2B 967a2bae990db34b2faec9b94511a567a17f18ff5bfed9932b2eebbe815a1ec21355ff871457a25d2c7401da9813a49d3608f1a4f0bc63f4ca052fde81ff89b0 SHA512 56f775a9aa429ac42bee04f7014a9c636edebc6c31cfdf674b050b193eeda0a9aa1016442304ed04154bad11d0a827109875a347dbb6a89adfc6b19096bd9557
-DIST ncurses-6.6-20260214.patch.gz.asc 729 BLAKE2B 1bef7638085c14e24c284d791be6bcada99f31c721129525dad0811cd102c5227a7f737164928a5fb164bad49dc534c76d59f9c904a0d854f04a8e10def348a9 SHA512 ff391e5fc228eef564d45d18d6cd372a09a04d9d8563a468e410445b292e47ee8f2f8c1e57f34d698ddd548b99214592693ef37ffd922d11ee41dc62ecb99e42
-DIST ncurses-6.6-20260221.patch.gz 72474 BLAKE2B 43a10f3af30538697206d97300dafa2dabd5001e2a33b82445a958576318e6f278dbb75717f4a6d58b1a23493ac0407f989347953a66d563fa71a5414870ecbc SHA512 5eb4dadbd174bf7480a9e1d1048c306fd6b00e54cedf04aeb46a8706d1e4a5cec2e61d5fd51c29ac0f08412070ef1e8b22ed40d0ddc3e8858cf4f0e66a4d405a
-DIST ncurses-6.6-20260221.patch.gz.asc 729 BLAKE2B c22ce89472c5e159984de2ef503e4e7c4a4d00a9a98b71e1e6e2b89fd609e10b156e8b7d7233ea4771c7cc19f5ee784260215ed16ca1b8cb13c7ee0061be62e2 SHA512 609ab532d0df9484fc89bdeec4cf55ff74ba225d901240d22d900ec5c11af75f8cc74c772ff3a8efc3fac9f26d6a3977b432e38faee62c8665beed7f6d7596e1
-DIST ncurses-6.6-20260301.patch.gz 4802 BLAKE2B 671012ecb3be634099427ed959c41790096885fe727d18f635842575aa8a28ab3fce2eb442dffc899a3a74f09f54aefa39f40ae054735ae773d4a31164beb0df SHA512 b450deff0e689c211b12108f96275013238ddf32554af3d39c51d1301d0ace50bfdb405249e61db46eb28b4fdfa05501ddd0bc31d05dededf2f3af963be5c1ca
-DIST ncurses-6.6-20260301.patch.gz.asc 729 BLAKE2B 33407b9d70cd295faa1457fa7518f06331a508e946ef94e044984a15c0f7ee6239e31e73b453b19d5274367b6795d3402a8eac0ace522abd586e7fca268f3553 SHA512 d051dcf06716fbeaf2da9f3819d3fef064ed56de32bf380aa216d55796359a30e6109f59678003dc2491c560e62a2b885a1ee5e1e556aa663b2045c723fbefba
-DIST ncurses-6.6-20260307.patch.gz 6274 BLAKE2B d356f55711e057d9f95e461635a9ee05c0a1b4561ea83555dd53ea34d60cf5f4dcc02d748c7046a48acf05ba8b841362bc9fdb47f792072bf423c9c9aaa46601 SHA512 1dfbd57726898f874b4561638e5be5bce229ff27ebf20756d235aad076c3835d48e388daefa61d01653fae068c3e86a8cc80485f1ce2e70d5b67e065a8ae5b40
-DIST ncurses-6.6-20260307.patch.gz.asc 729 BLAKE2B b3671e9a9c111d08c552c78dd209777afbda5cf2b0cb05b383140e08ce21abd114e9899897f2205328ac3873802425e9ecd32869479b99456daa5d3a47d04c02 SHA512 014809a87c1297484795fb5e70c85bd543249a11295e3f4e640df13053f9242aa8cdc4972a19f11504d3951fcb3d77f37d290c7eb6cdadd3eefc9c00e1b6d58e
-DIST ncurses-6.6-20260314.patch.gz 99661 BLAKE2B 5c0a6c893a0713a66b10582bfbabb50d162d3567ebb4e78482da2c7eef7f04f7d0188dfdf8b5272596cf6fe21302d24ae642bd7efcd574fa629b78a0c4ea3657 SHA512 c46addc2b5006cc4f2d1681a50ac3ee6a275091d654a5fe27015714c9c5a0f04005a0fcddea25f01163815125a4e979681cd32f58a7189aadceb78251dcd19b3
-DIST ncurses-6.6-20260314.patch.gz.asc 729 BLAKE2B ff6a9f38d5b9e68d499f36645a47db1ac9aafbdd4a87d21569b06a5dd1f94a8c1e24e64af1ce060f7256f46ff6692fe26f6bc4b02261f35b8a1b4d72a0c029dc SHA512 c00ec69c3a4177d7ab8538ab13db48b6e659058e410a59f9240b074e7edd548bee77584797f1f3da7a30b0048843c8ca12a91933898a07a6e34fd5d64fcd0428
-DIST ncurses-6.6-20260321.patch.gz 74370 BLAKE2B c4520faabdfd42e82d3acf2e89e98ce2c8cfb298bc4df5c4574cd279f292cb6a523f50916b9e900aa9c99dfd25f7e540fe865eb805db6d94a374ef68ea709a43 SHA512 7d8a9bcaba1abb12fc020a485369cdffca69f2a4e4939b4b79f4da13185cb48afa181f20e3db042e664d8bd5d7bf0fc9268dfaf28260ea5e46d1f33ce6cc20ac
-DIST ncurses-6.6-20260321.patch.gz.asc 729 BLAKE2B 9be85a6acba6bb3241476e21d1e5d7ed9241193a72732f024742ec507929b773dfac1f9318ed3edecba6f46b020335a2571a1fe3577340b358a87bb9eb9c4032 SHA512 0c53e5dcab15a53764a13d807157173824e266f9f24511670670d4519fd290eeb09cc8649271bb1dbc76f99519bab5b29afdce7eccbe9e52ebca8e5e2b7f9d7c
-DIST ncurses-6.6-20260328.patch.gz 7345 BLAKE2B 6bf25718bd9db23ad115d5619b3e4a2fb78bc606d2c88859d9259707438f682cc55d578375a7cbede7c3d04ccb91c096edc6407be2fd45f2bc7a23f15ee77df2 SHA512 7dc0cce7c2204601796c7897b4401b8a9fa47c456aae9f76a18a0bd0120cfd22e16107711f81a1d20c4bab893a19b42b01355106c83530490faa8586b6078105
-DIST ncurses-6.6-20260328.patch.gz.asc 729 BLAKE2B 32681aceb16a416dbf7d165db4df60f536f6fb4b1faa0f01509879b45162ef59324ffbed95273f0e0db790ed88d1462007f454bb24249012a8582f0633f5f184 SHA512 60aa7cb5eb4b49c714b7d31f2bae9a41c12691354fdf249414c179173d5fda2797cd7b1ebd21b1e30d23e21fd46920b6021104194ee7df218526277aa8e5c9d4
-DIST ncurses-6.6-20260404.patch.gz 5546 BLAKE2B 30b4c0973e9cea1296cc3f60c4140225c76d3afbc14c9ef42870319d8c4112eb55ca92c2b43c3ae704334dabfbd3a2f8221da359211c25fcfd23acf766e04c66 SHA512 0088f8b24041ba8072fdd8c29291eb815fec7cb9de41df5a81903d8d8f29ab859468181430ce5b1224a05e4ee174b0b709f83f08e0128c8a86fbce44f5dda602
-DIST ncurses-6.6-20260404.patch.gz.asc 729 BLAKE2B 353528c751e141cc78c1fe281ad6629280efdaa0e8faecd409681b91bd5e53db6321bf4030d1f8f53b35c1647fc7005da9a12e9c47c9ca066d9878a9f7ec4273 SHA512 01d0f8709d592b6d979c670627dddc2ea4120d0ad1bf679932199cbec322d6d83dd029a365b8df9cfd0a75a446a44015231cdf64d7b0aed3c578437861e2ae81
-DIST ncurses-6.6-20260411.patch.gz 3662 BLAKE2B 9e2ca4d0c1222a14461d9a01e5d67dfe6c8281d084413dda50c06935cb7b41bcff1d9d74a40b2d47b003475ccceda4417c193553e34d5c8d845694bbca1536a5 SHA512 dc4fa7682ad91056e8bbad942991344216a418a88505e468a38b60d06fd25abcc5d9b047474ea43d4e097e97ad2b4e8cf91c5e28f5b716a0a8a651548f7eba94
-DIST ncurses-6.6-20260411.patch.gz.asc 729 BLAKE2B 45bacf4a9ac503271c25c39e6f74f536f1dd2e6464b194a3525ef6134acb8543c6a4e1a4e293d5617c2c0680e86ee6a7c9151710c68244f3278fdc81a314d2be SHA512 b5d7a0e245d98943cada86996268817cf9722bfc1c2addfbf20dc63da3de5d4cbd92aaa6609f79f862ac5ecc2c86c55b139e00f3a5820e27adddb1695e954ebd
-DIST ncurses-6.6.tar.gz 3791150 BLAKE2B 8863ce3091fc72f23d12fe5913ea07c783e907cd8454b1c2b782f3e6bb91110cbfc4c52b8f0404eabd0d2041211183614e9d7f125ef8deeb23237b031f61fca0 SHA512 02647baae53abc844fbadee5b0a2187ad073125c4e8950df6d1c4feb781cb74ba64fb838cedfee2c246c39932187f6775b1df124f18b99a4233f0d98c72191de
-DIST ncurses-6.6.tar.gz.sig 438 BLAKE2B 0c687ae08bc40642479eeefc3f40f6993646566bd6fc2c6ff8f0f5c5bb930a3c9dfa4d85916eb9ce42ca17cec4ecccbbb532ac3bc6fdf16f5fc406171706c4b8 SHA512 73c6ca454e15d20d544e1220c62dcc265f69b42a76f29cd2068f06d874ed05d7567fdce8afe342fa5bb62d0f1c650927a88255f71b1b386a5d54d41738167eed
-DIST ncurses-6.6_p20260411-patches.tar.xz 81820 BLAKE2B 1f5496b2a77a876b96d8b1b9ffc3d6a0d7452d3b7f3f8e5e96643756b9a5c97b7aff5758f1e9e5e574875c5dc6cd9d517556c96e5d967ef6f7e2c2fc3668d543 SHA512 11bb25b97d7377ac06d78e5c1026077ba1f1a45521473d2173532e9dbb4f938cc400faf140e3ed28963c49a3561b4bc4ab45c21c24ca223d41e43ee69ba33723
diff --git a/sys-libs/ncurses/metadata.xml b/sys-libs/ncurses/metadata.xml
deleted file mode 100644
index d31f2adbfc11..000000000000
--- a/sys-libs/ncurses/metadata.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <use>
- <flag name="ada">Add bindings for the Ada programming language</flag>
- <flag name="tinfo">
- Build curses library (libncurses) sep from the low-level terminfo
- library (libtinfo) -- usually needed only for binary packages -- but
- it is binary compatible in either mode
- </flag>
- <flag name="stack-realign">
- Realign the stack in the 32-bit build for compatibility with older binaries at some performance cost.
- Avoids crashes in older 32-bit binaries. Only affects x86/32-bit multilib builds on amd64.
- </flag>
- <flag name="trace">Enable test trace() support in ncurses calls</flag>
- </use>
- <upstream>
- <changelog>https://invisible-island.net/ncurses/NEWS.html</changelog>
- <remote-id type="cpe">cpe:/a:gnu:ncurses</remote-id>
- <remote-id type="github">ThomasDickey/ncurses-snapshots</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/ncurses/ncurses-6.5_p20251220.ebuild b/sys-libs/ncurses/ncurses-6.5_p20251220.ebuild
deleted file mode 100644
index 1ed1962ff721..000000000000
--- a/sys-libs/ncurses/ncurses-6.5_p20251220.ebuild
+++ /dev/null
@@ -1,517 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# sys-libs/ncurses-compat can be bumped with sys-libs/ncurses as upstream
-# provide a configure option for the ABI version.
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/thomasdickey.asc
-inherit flag-o-matic toolchain-funcs multilib multilib-minimal preserve-libs usr-ldscript verify-sig
-
-MY_PV="${PV:0:3}"
-MY_P="${PN}-${MY_PV}"
-DESCRIPTION="Console display library"
-HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/"
-# Keep invisible-mirror.net here as some users reported 403 forbidden with invisible-island.net
-SRC_URI="
- mirror://gnu/ncurses/${MY_P}.tar.gz
- https://invisible-island.net/archives/${PN}/${MY_P}.tar.gz
- https://invisible-mirror.net/archives/${PN}/${MY_P}.tar.gz
- verify-sig? ( mirror://gnu/ncurses/${MY_P}.tar.gz.sig )
-"
-
-GENTOO_PATCH_DEV=sam
-GENTOO_PATCH_PV=6.5_p20251220
-GENTOO_PATCH_NAME=${PN}-${GENTOO_PATCH_PV}-patches
-
-# Populated below in a loop. Do not add patches manually here.
-UPSTREAM_PATCHES=()
-
-if [[ ${PV} == *_p* ]] ; then
- # Sometimes, after releases, there's no megapatch available yet.
- #
- # From upstream README at e.g. https://invisible-island.net/archives/ncurses/6.3/:
- #
- # "At times (generally to mark a relatively stable point), I create a rollup
- # patch, which consists of all changes from the release through the current date."
- #
- # Also, from https://lists.gnu.org/archive/html/bug-ncurses/2019-08/msg00039.html,
- # the patches are considered to be acceptable to use after some testing. They
- # are both for development but also bug fixes.
- #
- # This array should contain a list of all the snapshots since the last
- # release if there's no megapatch available yet.
- PATCH_DATES=(
- 20240504
- 20240511
- 20240518
- 20240519
- 20240525
- 20240601
- 20240608
- 20240615
- 20240622
- 20240629
- 20240706
- 20240713
- 20240720
- 20240727
- 20240810
- 20240817
- 20240824
- 20240831
- 20240914
- 20240922
- 20240928
- 20241006
- 20241019
- 20241026
- 20241102
- 20241109
- 20241123
- 20241130
- 20241207
- 20241214
- 20241221
- 20241228
- 20250104
- 20250111
- 20250118
- 20250125
- 20250201
- 20250208
- 20250215
- 20250216
- 20250222
- 20250301
- 20250308
- 20250315
- 20250322
- 20250329
- 20250405
- 20250412
- 20250419
- 20250426
- 20250503
- 20250510
- 20250517
- 20250524
- 20250531
- 20250614
- 20250621
- 20250628
- 20250705
- 20250712
- 20250720
- 20250726
- 20250802
- 20250809
- 20250816
- 20250823
- 20250830
- 20250913
- 20250920
- 20250927
- 20251004
- 20251010
- 20251018
- 20251025
- 20251101
- 20251115
- 20251122
- 20251123
- 20251129
- 20251206
- 20251213
-
- # Latest patch is just _pN = $(ver_cut 4)
- $(ver_cut 4)
- )
-
- if [[ -z ${PATCH_DATES[@]} ]] ; then
- SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz"
- SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz.asc"
-
- # If we have a rollup patch, use that instead of the individual ones.
- UPSTREAM_PATCHES+=( patch.sh )
- else
- # We use a mirror as well because we've had reports of 403 forbidden for some users.
- upstream_url_base="https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-"
- upstream_m_url_base="https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-"
-
- # Prefix each date with the upstream location (https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P})
- mangled_patches=( "${PATCH_DATES[@]/#/${upstream_url_base}}" )
- # Suffix each with .patch.gz
- mangled_patches=( "${mangled_patches[@]/%/.patch.gz}" )
- mangled_patches_sig=( "${mangled_patches[@]/%/.asc}" )
- # Repeat for .patch.gz.asc for verify-sig
- SRC_URI+=" ${mangled_patches[@]}"
- SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]} )"
-
- # For all of the URLs, chuck in invisible-island.net too:
- SRC_URI+=" ${mangled_patches[@]/${upstream_url_base}/${upstream_m_url_base}}"
- SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]/${upstream_url_base}/${upstream_m_url_base}} )"
-
- UPSTREAM_PATCHES=( "${PATCH_DATES[@]/%/.patch}" )
-
- unset upstream_url_base upstream_m_url_base mangled_patches mangled_patches_sig
- fi
-fi
-
-SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${GENTOO_PATCH_NAME}.tar.xz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="MIT"
-# The subslot reflects the SONAME.
-SLOT="0/6"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-IUSE="ada +cxx debug doc gpm minimal profile split-usr +stack-realign static-libs test tinfo trace"
-# In 6.5_p20250118, the C++ examples fail to link, but there's no automated
-# testsuite anyway. Controlling building examples isn't really what USE=test
-# is for. Just restrict them.
-RESTRICT="!test? ( test ) test"
-
-# TODO: ncurses allows (and we take advantage of this, even) passing
-# the SONAME for dlopen() use, so only the header is needed at build time.
-# Maybe we should bundle a copy of gpm.h so we can move gpm to PDEPEND
-# which would be far nicer UX-wise.
-DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
-# Block the older ncurses that installed all files w/SLOT=5, bug #557472
-RDEPEND="
- ${DEPEND}
- !<=sys-libs/ncurses-5.9-r4:5
- !<sys-libs/slang-2.3.2_pre23
- !<x11-terms/rxvt-unicode-9.06-r3
- !<x11-terms/st-0.6-r1
- !minimal? ( !<x11-terms/ghostty-1.1.0 )
-"
-BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )"
-
-PATCHES=(
- "${UPSTREAM_PATCHES[@]/#/${WORKDIR}/${MY_P}-}"
-
- # When rebasing Gentoo's patchset, please use git from a clean
- # src_prepare with upstream patches already applied. git am --reject
- # the existing patchset and rebase as required. This makes it easier
- # to manage future rebasing & adding new patches.
- #
- # For the same reasons, please include the original configure.in changes,
- # NOT just the generated results!
- "${WORKDIR}"/${GENTOO_PATCH_NAME}
-)
-
-src_unpack() {
- # Avoid trying to verify our own patchset tarball, there's no point
- if use verify-sig ; then
- local file
- for file in ${A} ; do
- if [[ ${file} == ${MY_P}.tar.gz ]] ; then
- verify-sig_verify_detached "${DISTDIR}"/${file} "${DISTDIR}"/${file}.sig
- else
- [[ ${file} == @(*${GENTOO_PATCH_NAME}.tar.xz|*.asc|*.sig) ]] && continue
-
- verify-sig_verify_detached "${DISTDIR}"/${file} "${DISTDIR}"/${file}.asc
- fi
- done
- fi
-
- default
-}
-
-src_configure() {
- # bug #115036
- unset TERMINFO
-
- tc-export_build_env BUILD_{CC,CXX,CPP}
-
- # bug #214642
- BUILD_CPPFLAGS+=" -D_GNU_SOURCE"
-
- # Build the various variants of ncurses -- narrow, wide, and threaded. #510440
- # Order matters here -- we want unicode/thread versions to come last so that the
- # binaries in /usr/bin support both wide and narrow.
- # The naming is also important as we use these directly with filenames and when
- # checking configure flags.
- NCURSES_TARGETS=(
- ncurses
- ncursesw
- ncursest
- ncursestw
- )
-
- # When installing ncurses, we have to use a compatible version of tic.
- # This comes up when cross-compiling, doing multilib builds, upgrading,
- # or installing for the first time. Build a local copy of tic whenever
- # the host version isn't available. bug #249363, bug #557598
- if ! has_version -b "~sys-libs/${P}:0" ; then
- local lbuildflags="-static"
-
- # some toolchains don't quite support static linking
- local dbuildflags="-Wl,-rpath,${WORKDIR}/lib"
- case ${CHOST} in
- *-darwin*) dbuildflags= ;;
- *-solaris*) dbuildflags="-Wl,-R,${WORKDIR}/lib" ;;
- esac
- echo "int main() {}" | \
- $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \
- || lbuildflags="${dbuildflags}"
-
- # We can't re-use the multilib BUILD_DIR because we run outside of it.
- BUILD_DIR="${WORKDIR}" \
- CC=${BUILD_CC} \
- CXX=${BUILD_CXX} \
- CPP=${BUILD_CPP} \
- CHOST=${CBUILD} \
- CFLAGS=${BUILD_CFLAGS} \
- CXXFLAGS=${BUILD_CXXFLAGS} \
- CPPFLAGS=${BUILD_CPPFLAGS} \
- LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
- do_configure cross --without-shared --with-normal --with-progs --without-ada
- fi
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- if [[ ${ABI} == x86 ]] ; then
- # For compatibility with older binaries at slight performance cost.
- # bug #616402
- use stack-realign && append-flags -mstackrealign
- fi
-
- local t
- for t in "${NCURSES_TARGETS[@]}" ; do
- do_configure "${t}"
- done
-}
-
-do_configure() {
- local target=$1
- shift
-
- mkdir "${BUILD_DIR}/${target}" || die
- cd "${BUILD_DIR}/${target}" || die
-
- local conf=(
- # We need the basic terminfo files in /etc, bug #37026. We will
- # add '--with-terminfo-dirs' and then populate /etc/terminfo in
- # src_install() ...
- --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo"
-
- # Enable installation of .pc files.
- --enable-pc-files
- # This path is used to control where the .pc files are installed.
- --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
-
- # Now the rest of the various standard flags.
- --with-shared
- --enable-fvisibility
- # (Originally disabled until bug #245417 is sorted out, but now
- # just keeping it off for good, given nobody needed it until now
- # (2022) and we're trying to phase out bdb.)
- --without-hashed-db
- $(use_with ada)
- $(use_with cxx)
- $(use_with cxx cxx-binding)
- --with-cxx-shared
- $(use_with debug)
- $(use_with profile)
- # The configure script uses ldd to parse the linked output which
- # is flaky for cross-compiling/multilib/ldd versions/etc...
- $(use_with gpm gpm libgpm.so.1)
-
- # bug #930806
- --disable-setuid-environ
- # TODO: Maybe do these for USE=hardened
- #--disable-root-access
- #--disable-root-environ
-
- --disable-termcap
- --enable-symlinks
- --with-manpage-format=normal
- --enable-const
- --enable-colorfgbg
- --enable-hard-tabs
- --enable-echo
- $(use_enable !ada warnings)
- $(use_enable debug assertions)
- $(use_enable !debug leaks)
- $(use_enable debug expanded)
- $(use_enable !debug macros)
- $(multilib_native_with progs)
- $(use_with test tests)
- $(use_with trace)
- $(use_with tinfo termlib)
- --disable-stripping
- --disable-pkg-ldflags
- )
-
- case ${CHOST} in
- *-mingw32*)
- conf+=( --enable-term-driver )
- ;;
- *)
- conf+=( --disable-term-driver )
- ;;
- esac
-
- if [[ ${target} == ncurses*w ]] ; then
- conf+=( --enable-widec )
- else
- conf+=( --disable-widec )
- fi
- if [[ ${target} == ncursest* ]] ; then
- conf+=( --with-{pthread,reentrant} )
- else
- conf+=( --without-{pthread,reentrant} )
- fi
-
- # Make sure each variant goes in a unique location.
- if [[ ${target} == "ncurses" ]] ; then
- # "ncurses" variant goes into "${EPREFIX}"/usr/include
- # It is needed on Prefix because the configure script appends
- # "ncurses" to "${prefix}/include" if "${prefix}" is not /usr.
- conf+=( --enable-overwrite )
- else
- conf+=( --includedir="${EPREFIX}"/usr/include/${target} )
- fi
- # See comments in src_configure.
- if [[ ${target} != "cross" ]] ; then
- local cross_path="${WORKDIR}/cross"
- [[ -d ${cross_path} ]] && export TIC="${cross_path}/progs/tic"
- fi
-
- ECONF_SOURCE="${S}" econf "${conf[@]}" "$@"
-}
-
-src_compile() {
- # See comments in src_configure.
- if ! has_version -b "~sys-libs/${P}:0" ; then
- BUILD_DIR="${WORKDIR}" do_compile cross -C progs tic$(get_exeext)
- fi
-
- multilib-minimal_src_compile
-}
-
-multilib_src_compile() {
- local t
- for t in "${NCURSES_TARGETS[@]}" ; do
- do_compile "${t}"
- done
-}
-
-do_compile() {
- local target=$1
- shift
-
- cd "${BUILD_DIR}/${target}" || die
-
- # A little hack to fix parallel builds ... they break when
- # generating sources so if we generate the sources first (in
- # non-parallel), we can then build the rest of the package
- # in parallel. This is not really a perf hit since the source
- # generation is quite small.
- emake -j1 sources
-
- # For some reason, sources depends on pc-files which depends on
- # compiled libraries which depends on sources which ...
- # Manually delete the pc-files file so the install step will
- # create the .pc files we want.
- rm -f misc/pc-files || die
- emake "$@"
-}
-
-multilib_src_install() {
- local target
- for target in "${NCURSES_TARGETS[@]}" ; do
- emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install
- done
-
- # Move main libraries into /.
- if multilib_is_native_abi ; then
- gen_usr_ldscript -a \
- "${NCURSES_TARGETS[@]}" \
- $(usex tinfo 'tinfow tinfo' '')
- fi
-
- # Don't delete '*.dll.a', needed for linking, bug #631468
- if ! use static-libs; then
- find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die
- fi
-
- # Build fails to create this ...
- # -FIXME-
- # Ugly hackaround for riscv having two parts libdir (bug #689240)
- # Replace this hack with an official solution once we have one...
- # -FIXME-
- dosym $(sed 's@[^/]\+@..@g' <<< $(get_libdir))/share/terminfo \
- /usr/$(get_libdir)/terminfo
-
- # Remove obsolete libcurses symlink that is created by the build
- # system. Technically, this could be also achieved
- # via --disable-overwrite but it also moves headers implicitly,
- # and we do not want to do this yet.
- # bug #836696
- rm "${ED}"/usr/$(get_libdir)/libcurses* || die
-}
-
-multilib_src_install_all() {
- local terms=(
- # Dumb/simple values that show up when using the in-kernel VT.
- ansi console dumb linux
- vt{52,100,102,200,220}
- # [u]rxvt users used to be pretty common. Probably should drop this
- # since upstream is dead and people are moving away from it.
- rxvt{,-unicode}{,-256color}
- # xterm users are common, as is terminals re-using/spoofing it.
- xterm xterm-{,256}color
- # screen is common (and reused by tmux).
- screen{,-256color}
- screen.xterm-256color
- )
- if use split-usr ; then
- local x
- # We need the basic terminfo files in /etc for embedded/recovery, bug #37026
- einfo "Installing basic terminfo files in /etc..."
- for x in "${terms[@]}"; do
- local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
- local basedir=$(basename "$(dirname "${termfile}")")
-
- if [[ -n ${termfile} ]] ; then
- dodir "/etc/terminfo/${basedir}"
- mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die
- dosym "../../../../etc/terminfo/${basedir}/${x}" \
- "/usr/share/terminfo/${basedir}/${x}"
- fi
- done
-
- echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses
-
- use minimal && rm -r "${ED}"/usr/share/terminfo*
- # Because ncurses5-config --terminfo returns the directory we keep it
- # bug #245374
- keepdir /usr/share/terminfo
- elif use minimal ; then
- # Keep only the basic terminfo files
- find "${ED}"/usr/share/terminfo/ \
- \( -type f -o -type l \) ${terms[*]/#/! -name } -delete , \
- -type d -empty -delete || die
- fi
-
- cd "${S}" || die
- dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc
- if use doc ; then
- docinto html
- dodoc -r doc/html/
- fi
-}
-
-pkg_preinst() {
- preserve_old_lib /$(get_libdir)/libncurses.so.5
- preserve_old_lib /$(get_libdir)/libncursesw.so.5
-}
-
-pkg_postinst() {
- preserve_old_lib_notify /$(get_libdir)/libncurses.so.5
- preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5
-}
diff --git a/sys-libs/ncurses/ncurses-6.6_p20260411.ebuild b/sys-libs/ncurses/ncurses-6.6_p20260411.ebuild
deleted file mode 100644
index a5b83840c446..000000000000
--- a/sys-libs/ncurses/ncurses-6.6_p20260411.ebuild
+++ /dev/null
@@ -1,451 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# sys-libs/ncurses-compat can be bumped with sys-libs/ncurses as upstream
-# provide a configure option for the ABI version.
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/thomasdickey.asc
-inherit flag-o-matic toolchain-funcs multilib multilib-minimal preserve-libs usr-ldscript verify-sig
-
-MY_PV="${PV:0:3}"
-MY_P="${PN}-${MY_PV}"
-DESCRIPTION="Console display library"
-HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/"
-# Keep invisible-mirror.net here as some users reported 403 forbidden with invisible-island.net
-SRC_URI="
- mirror://gnu/ncurses/${MY_P}.tar.gz
- https://invisible-island.net/archives/${PN}/${MY_P}.tar.gz
- https://invisible-mirror.net/archives/${PN}/${MY_P}.tar.gz
- verify-sig? ( mirror://gnu/ncurses/${MY_P}.tar.gz.sig )
-"
-
-GENTOO_PATCH_DEV=sam
-GENTOO_PATCH_PV=6.6_p20260411
-GENTOO_PATCH_NAME=${PN}-${GENTOO_PATCH_PV}-patches
-
-# Populated below in a loop. Do not add patches manually here.
-UPSTREAM_PATCHES=()
-
-if [[ ${PV} == *_p* ]] ; then
- # Sometimes, after releases, there's no megapatch available yet.
- #
- # From upstream README at e.g. https://invisible-island.net/archives/ncurses/6.3/:
- #
- # "At times (generally to mark a relatively stable point), I create a rollup
- # patch, which consists of all changes from the release through the current date."
- #
- # Also, from https://lists.gnu.org/archive/html/bug-ncurses/2019-08/msg00039.html,
- # the patches are considered to be acceptable to use after some testing. They
- # are both for development but also bug fixes.
- #
- # This array should contain a list of all the snapshots since the last
- # release if there's no megapatch available yet.
- PATCH_DATES=(
- 20251231
- 20260103
- 20260117
- 20260124
- 20260131
- 20260207
- 20260214
- 20260221
- 20260301
- 20260307
- 20260314
- 20260321
- 20260328
- 20260404
-
- # Latest patch is just _pN = $(ver_cut 4)
- $(ver_cut 4)
- )
-
- if [[ -z ${PATCH_DATES[@]} ]] ; then
- SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz"
- SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz.asc"
-
- # If we have a rollup patch, use that instead of the individual ones.
- UPSTREAM_PATCHES+=( patch.sh )
- else
- # We use a mirror as well because we've had reports of 403 forbidden for some users.
- upstream_url_base="https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-"
- upstream_m_url_base="https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-"
-
- # Prefix each date with the upstream location (https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P})
- mangled_patches=( "${PATCH_DATES[@]/#/${upstream_url_base}}" )
- # Suffix each with .patch.gz
- mangled_patches=( "${mangled_patches[@]/%/.patch.gz}" )
- mangled_patches_sig=( "${mangled_patches[@]/%/.asc}" )
- # Repeat for .patch.gz.asc for verify-sig
- SRC_URI+=" ${mangled_patches[@]}"
- SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]} )"
-
- # For all of the URLs, chuck in invisible-island.net too:
- SRC_URI+=" ${mangled_patches[@]/${upstream_url_base}/${upstream_m_url_base}}"
- SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]/${upstream_url_base}/${upstream_m_url_base}} )"
-
- UPSTREAM_PATCHES=( "${PATCH_DATES[@]/%/.patch}" )
-
- unset upstream_url_base upstream_m_url_base mangled_patches mangled_patches_sig
- fi
-fi
-
-SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${GENTOO_PATCH_NAME}.tar.xz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="MIT"
-# The subslot reflects the SONAME.
-SLOT="0/6"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
-IUSE="ada +cxx debug doc gpm minimal profile split-usr +stack-realign static-libs test tinfo trace"
-# In 6.5_p20250118, the C++ examples fail to link, but there's no automated
-# testsuite anyway. Controlling building examples isn't really what USE=test
-# is for. Just restrict them. Still seems to fail after
-# https://lists.gnu.org/archive/html/bug-ncurses/2026-03/msg00013.html too.
-RESTRICT="!test? ( test ) test"
-
-# TODO: ncurses allows (and we take advantage of this, even) passing
-# the SONAME for dlopen() use, so only the header is needed at build time.
-# Maybe we should bundle a copy of gpm.h so we can move gpm to PDEPEND
-# which would be far nicer UX-wise.
-DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
-# Block the older ncurses that installed all files w/SLOT=5, bug #557472
-RDEPEND="
- ${DEPEND}
- !<=sys-libs/ncurses-5.9-r4:5
- !<sys-libs/slang-2.3.2_pre23
- !<x11-terms/rxvt-unicode-9.06-r3
- !<x11-terms/st-0.6-r1
- !minimal? ( !<x11-terms/ghostty-1.1.0 )
-"
-BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )"
-
-PATCHES=(
- "${UPSTREAM_PATCHES[@]/#/${WORKDIR}/${MY_P}-}"
-
- # When rebasing Gentoo's patchset, please use git from a clean
- # src_prepare with upstream patches already applied. git am --reject
- # the existing patchset and rebase as required. This makes it easier
- # to manage future rebasing & adding new patches.
- #
- # For the same reasons, please include the original configure.in changes,
- # NOT just the generated results!
- "${WORKDIR}"/${GENTOO_PATCH_NAME}
-)
-
-src_unpack() {
- # Avoid trying to verify our own patchset tarball, there's no point
- if use verify-sig ; then
- local file
- for file in ${A} ; do
- if [[ ${file} == ${MY_P}.tar.gz ]] ; then
- verify-sig_verify_detached "${DISTDIR}"/${file} "${DISTDIR}"/${file}.sig
- else
- [[ ${file} == @(*${GENTOO_PATCH_NAME}.tar.xz|*.asc|*.sig) ]] && continue
-
- verify-sig_verify_detached "${DISTDIR}"/${file} "${DISTDIR}"/${file}.asc
- fi
- done
- fi
-
- default
-}
-
-src_configure() {
- # bug #115036
- unset TERMINFO
-
- tc-export_build_env BUILD_{CC,CXX,CPP}
-
- # bug #214642
- BUILD_CPPFLAGS+=" -D_GNU_SOURCE"
-
- # Build the various variants of ncurses -- narrow, wide, and threaded. #510440
- # Order matters here -- we want unicode/thread versions to come last so that the
- # binaries in /usr/bin support both wide and narrow.
- # The naming is also important as we use these directly with filenames and when
- # checking configure flags.
- NCURSES_TARGETS=(
- ncurses
- ncursesw
- ncursest
- ncursestw
- )
-
- # When installing ncurses, we have to use a compatible version of tic.
- # This comes up when cross-compiling, doing multilib builds, upgrading,
- # or installing for the first time. Build a local copy of tic whenever
- # the host version isn't available. bug #249363, bug #557598
- if ! has_version -b "~sys-libs/${P}:0" ; then
- local lbuildflags="-static"
-
- # some toolchains don't quite support static linking
- local dbuildflags="-Wl,-rpath,${WORKDIR}/lib"
- case ${CHOST} in
- *-darwin*) dbuildflags= ;;
- *-solaris*) dbuildflags="-Wl,-R,${WORKDIR}/lib" ;;
- esac
- echo "int main() {}" | \
- $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \
- || lbuildflags="${dbuildflags}"
-
- # We can't re-use the multilib BUILD_DIR because we run outside of it.
- BUILD_DIR="${WORKDIR}" \
- CC=${BUILD_CC} \
- CXX=${BUILD_CXX} \
- CPP=${BUILD_CPP} \
- CHOST=${CBUILD} \
- CFLAGS=${BUILD_CFLAGS} \
- CXXFLAGS=${BUILD_CXXFLAGS} \
- CPPFLAGS=${BUILD_CPPFLAGS} \
- LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
- do_configure cross --without-shared --with-normal --with-progs --without-ada
- fi
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- if [[ ${ABI} == x86 ]] ; then
- # For compatibility with older binaries at slight performance cost.
- # bug #616402
- use stack-realign && append-flags -mstackrealign
- fi
-
- local t
- for t in "${NCURSES_TARGETS[@]}" ; do
- do_configure "${t}"
- done
-}
-
-do_configure() {
- local target=$1
- shift
-
- mkdir "${BUILD_DIR}/${target}" || die
- cd "${BUILD_DIR}/${target}" || die
-
- local conf=(
- # We need the basic terminfo files in /etc, bug #37026. We will
- # add '--with-terminfo-dirs' and then populate /etc/terminfo in
- # src_install() ...
- --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo"
-
- # Enable installation of .pc files.
- --enable-pc-files
- # This path is used to control where the .pc files are installed.
- --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
-
- # Now the rest of the various standard flags.
- --with-shared
- --enable-fvisibility
- # (Originally disabled until bug #245417 is sorted out, but now
- # just keeping it off for good, given nobody needed it until now
- # (2022) and we're trying to phase out bdb.)
- --without-hashed-db
- $(use_with ada)
- $(use_with cxx)
- $(use_with cxx cxx-binding)
- --with-cxx-shared
- $(use_with debug)
- $(use_with profile)
- # The configure script uses ldd to parse the linked output which
- # is flaky for cross-compiling/multilib/ldd versions/etc...
- $(use_with gpm gpm libgpm.so.1)
-
- # bug #930806
- --disable-setuid-environ
- # TODO: Maybe do these for USE=hardened
- #--disable-root-access
- #--disable-root-environ
-
- --disable-termcap
- --enable-symlinks
- --with-manpage-format=normal
- --enable-const
- --enable-colorfgbg
- --enable-hard-tabs
- --enable-echo
- $(use_enable !ada warnings)
- $(use_enable debug assertions)
- $(use_enable !debug leaks)
- $(use_enable debug expanded)
- $(use_enable !debug macros)
- $(multilib_native_with progs)
- $(use_with test tests)
- $(use_with trace)
- $(use_with tinfo termlib)
- --disable-stripping
- --disable-pkg-ldflags
- )
-
- case ${CHOST} in
- *-mingw32*)
- conf+=( --enable-term-driver )
- ;;
- *)
- conf+=( --disable-term-driver )
- ;;
- esac
-
- if [[ ${target} == ncurses*w ]] ; then
- conf+=( --enable-widec )
- else
- conf+=( --disable-widec )
- fi
- if [[ ${target} == ncursest* ]] ; then
- conf+=( --with-{pthread,reentrant} )
- else
- conf+=( --without-{pthread,reentrant} )
- fi
-
- # Make sure each variant goes in a unique location.
- if [[ ${target} == "ncurses" ]] ; then
- # "ncurses" variant goes into "${EPREFIX}"/usr/include
- # It is needed on Prefix because the configure script appends
- # "ncurses" to "${prefix}/include" if "${prefix}" is not /usr.
- conf+=( --enable-overwrite )
- else
- conf+=( --includedir="${EPREFIX}"/usr/include/${target} )
- fi
- # See comments in src_configure.
- if [[ ${target} != "cross" ]] ; then
- local cross_path="${WORKDIR}/cross"
- [[ -d ${cross_path} ]] && export TIC="${cross_path}/progs/tic"
- fi
-
- ECONF_SOURCE="${S}" econf "${conf[@]}" "$@"
-}
-
-src_compile() {
- # See comments in src_configure.
- if ! has_version -b "~sys-libs/${P}:0" ; then
- BUILD_DIR="${WORKDIR}" do_compile cross -C progs tic$(get_exeext)
- fi
-
- multilib-minimal_src_compile
-}
-
-multilib_src_compile() {
- local t
- for t in "${NCURSES_TARGETS[@]}" ; do
- do_compile "${t}"
- done
-}
-
-do_compile() {
- local target=$1
- shift
-
- cd "${BUILD_DIR}/${target}" || die
-
- # A little hack to fix parallel builds ... they break when
- # generating sources so if we generate the sources first (in
- # non-parallel), we can then build the rest of the package
- # in parallel. This is not really a perf hit since the source
- # generation is quite small.
- emake -j1 sources
-
- # For some reason, sources depends on pc-files which depends on
- # compiled libraries which depends on sources which ...
- # Manually delete the pc-files file so the install step will
- # create the .pc files we want.
- rm -f misc/pc-files || die
- emake "$@"
-}
-
-multilib_src_install() {
- local target
- for target in "${NCURSES_TARGETS[@]}" ; do
- emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install
- done
-
- # Move main libraries into /.
- if multilib_is_native_abi ; then
- gen_usr_ldscript -a \
- "${NCURSES_TARGETS[@]}" \
- $(usex tinfo 'tinfow tinfo' '')
- fi
-
- # Don't delete '*.dll.a', needed for linking, bug #631468
- if ! use static-libs; then
- find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die
- fi
-
- # Build fails to create this ...
- # -FIXME-
- # Ugly hackaround for riscv having two parts libdir (bug #689240)
- # Replace this hack with an official solution once we have one...
- # -FIXME-
- dosym $(sed 's@[^/]\+@..@g' <<< $(get_libdir))/share/terminfo \
- /usr/$(get_libdir)/terminfo
-
- # Remove obsolete libcurses symlink that is created by the build
- # system. Technically, this could be also achieved
- # via --disable-overwrite but it also moves headers implicitly,
- # and we do not want to do this yet.
- # bug #836696
- rm "${ED}"/usr/$(get_libdir)/libcurses* || die
-}
-
-multilib_src_install_all() {
- local terms=(
- # Dumb/simple values that show up when using the in-kernel VT.
- ansi console dumb linux
- vt{52,100,102,200,220}
- # [u]rxvt users used to be pretty common. Probably should drop this
- # since upstream is dead and people are moving away from it.
- rxvt{,-unicode}{,-256color}
- # xterm users are common, as is terminals re-using/spoofing it.
- xterm xterm-{,256}color
- # screen is common (and reused by tmux).
- screen{,-256color}
- screen.xterm-256color
- )
- if use split-usr ; then
- local x
- # We need the basic terminfo files in /etc for embedded/recovery, bug #37026
- einfo "Installing basic terminfo files in /etc..."
- for x in "${terms[@]}"; do
- local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
- local basedir=$(basename "$(dirname "${termfile}")")
-
- if [[ -n ${termfile} ]] ; then
- dodir "/etc/terminfo/${basedir}"
- mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die
- dosym "../../../../etc/terminfo/${basedir}/${x}" \
- "/usr/share/terminfo/${basedir}/${x}"
- fi
- done
-
- echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses
-
- use minimal && rm -r "${ED}"/usr/share/terminfo*
- # Because ncurses5-config --terminfo returns the directory we keep it
- # bug #245374
- keepdir /usr/share/terminfo
- elif use minimal ; then
- # Keep only the basic terminfo files
- find "${ED}"/usr/share/terminfo/ \
- \( -type f -o -type l \) ${terms[*]/#/! -name } -delete , \
- -type d -empty -delete || die
- fi
-
- cd "${S}" || die
- dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc
- if use doc ; then
- docinto html
- dodoc -r doc/html/
- fi
-}
-
-pkg_preinst() {
- preserve_old_lib /$(get_libdir)/libncurses.so.5
- preserve_old_lib /$(get_libdir)/libncursesw.so.5
-}
-
-pkg_postinst() {
- preserve_old_lib_notify /$(get_libdir)/libncurses.so.5
- preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5
-}
diff --git a/sys-libs/newlib/Manifest b/sys-libs/newlib/Manifest
deleted file mode 100644
index 5d080996dcb8..000000000000
--- a/sys-libs/newlib/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST newlib-4.5.0.20241231.tar.gz 9081514 BLAKE2B 8b019d50ef30e736eaf5de8a6ad2f9aee25757162cfc38fca4ad33496b98394292c013d1e3de3309cd81514b3738472405a0841b965b92ec092d2e7f618021fe SHA512 d391ea3ac68ddb722909ef790f81ba4d6c35d9b2e0fcdb029f91a6c47db9ee94a686a2bdff211fb84025e1a317e257acfa59abda3fd2bc6609966798e1c604dc
-DIST newlib-4.6.0.20260123.tar.gz 9208322 BLAKE2B 025c002701c8b2bdf19a84ba32dcd193216b7e0376915b172bb60047646c675228c9abb058d45518c09ccf9f948c1e84aacabe02053587e45902a995d2c6fb6d SHA512 ffa16d6465c0b429264c46395fa760fbcf072d3ff86e87330ba1f483efcfe66393ef83b03932759444a0ebeaef94d3ca58a59e91ab7b97b2a6ac6be2e7589657
diff --git a/sys-libs/newlib/files/newlib-3.3.0-no-nano-cxx.patch b/sys-libs/newlib/files/newlib-3.3.0-no-nano-cxx.patch
deleted file mode 100644
index 58068ad2d22f..000000000000
--- a/sys-libs/newlib/files/newlib-3.3.0-no-nano-cxx.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Gentoo's and upstream gccs don't install _nano variants of stdc++ and supc++.
-
-Let's not refer to them in nano specs of newlib until we do
-(or better yet upstream does) have these libraries.
-
-Reported-by: David Flogeras
-Bug: https://bugs.gentoo.org/723756
---- a/libgloss/arc/nano.specs
-+++ b/libgloss/arc/nano.specs
-@@ -11,7 +11,7 @@
- %(nano_link_gcc_c_sequence) --start-group %G %(nano_libc) %(nano_libgloss) --end-group
-
- *link:
--%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) %:replace-outfile(-lstdc++ -lstdc++_nano) %:replace-outfile(-lsupc++ -lsupc++_nano)
-+%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano)
-
- *lib:
- %{!shared:%{g*:-lg_nano} %{!p:%{!pg:-lc_nano}}%{p:-lc_p}%{pg:-lc_p}}
---- a/libgloss/arm/elf-nano.specs
-+++ b/libgloss/arm/elf-nano.specs
-@@ -15,7 +15,7 @@
- %(nano_link_gcc_c_sequence) --start-group %G %(nano_libc) %(nano_libgloss) --end-group
-
- *link:
--%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) %:replace-outfile(-lrdimon -lrdimon_nano) %:replace-outfile(-lstdc++ -lstdc++_nano) %:replace-outfile(-lsupc++ -lsupc++_nano)
-+%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) %:replace-outfile(-lrdimon -lrdimon_nano)
-
- *lib:
- %{!shared:%{g*:-lg_nano} %{!p:%{!pg:-lc_nano}}%{p:-lc_p}%{pg:-lc_p}}
diff --git a/sys-libs/newlib/metadata.xml b/sys-libs/newlib/metadata.xml
deleted file mode 100644
index 0efee71c01f4..000000000000
--- a/sys-libs/newlib/metadata.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="person">
- <email>lu_zero@gentoo.org</email>
-</maintainer>
-<maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
-</maintainer>
-<use>
- <flag name="nano">Build additional newlib-nano library</flag>
-</use>
-<upstream>
- <remote-id type="cpe">cpe:/a:newlib_project:newlib</remote-id>
-</upstream>
-</pkgmetadata>
diff --git a/sys-libs/newlib/newlib-4.5.0.20241231-r1.ebuild b/sys-libs/newlib/newlib-4.5.0.20241231-r1.ebuild
deleted file mode 100644
index 0415314423fa..000000000000
--- a/sys-libs/newlib/newlib-4.5.0.20241231-r1.ebuild
+++ /dev/null
@@ -1,181 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-inherit dot-a flag-o-matic toolchain-funcs
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="https://sourceware.org/git/newlib-cygwin.git"
- inherit git-r3
-else
- SRC_URI="https://sourceware.org/pub/newlib/${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-DESCRIPTION="Newlib is a C library intended for use on embedded systems"
-HOMEPAGE="https://sourceware.org/newlib/"
-
-LICENSE="NEWLIB LIBGLOSS GPL-2"
-SLOT="0"
-IUSE="nls threads unicode headers-only nano"
-RESTRICT="strip"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.3.0-no-nano-cxx.patch
-)
-
-NEWLIBBUILD="${WORKDIR}/build"
-NEWLIBNANOBUILD="${WORKDIR}/build.nano"
-NEWLIBNANOTMPINSTALL="${WORKDIR}/nano_tmp_install"
-
-CFLAGS_FULL="-ffunction-sections -fdata-sections"
-CFLAGS_NANO="-Os -ffunction-sections -fdata-sections"
-
-pkg_setup() {
- # Reject newlib-on-glibc type installs
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- case ${CHOST} in
- *-newlib|*-elf) ;;
- *) die "Use sys-devel/crossdev to build a newlib toolchain" ;;
- esac
- fi
-
- case ${CTARGET} in
- msp430*)
- if ver_test $(gcc-version ${CTARGET}) -lt 10.1; then
- # bug #717610
- die "gcc for ${CTARGET} has to be 10.1 or above"
- fi
- ;;
- esac
-}
-
-src_configure() {
- lto-guarantee-fat
- # TODO: we should fix this
- unset LDFLAGS
- CHOST=${CTARGET} strip-unsupported-flags
- CCASFLAGS_ORIG="${CCASFLAGS}"
- CFLAGS_ORIG="${CFLAGS}"
-
- local myconf=(
- # The top-level configure doesn't utilize this flag, but subdirs do,
- # so autodetection for econf doesn't work. Add ourselves.
- --disable-dependency-tracking
- --disable-silent-rules
- # Disable legacy syscall stub code in newlib. These have been
- # moved to libgloss for a long time now, so the code in newlib
- # itself just gets in the way.
- --disable-newlib-supplied-syscalls
- )
- [[ ${CTARGET} == "spu" ]] \
- && myconf+=( --disable-newlib-multithread ) \
- || myconf+=( $(use_enable threads newlib-multithread) )
-
- mkdir -p "${NEWLIBBUILD}"
- cd "${NEWLIBBUILD}"
-
- export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}"
- export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}"
-
- [[ ${CTARGET} == nvptx* ]] && {
- CFLAGS_FOR_TARGET+=" -Wa,--no-verify"
- CCASFLAGS+=" -Wa,--no-verify"
- }
-
- ECONF_SOURCE=${S} \
- econf \
- $(use_enable unicode newlib-mb) \
- $(use_enable nls) \
- "${myconf[@]}"
-
- # Build newlib-nano beside newlib (original)
- # Based on https://tracker.debian.org/media/packages/n/newlib/rules-2.1.0%2Bgit20140818.1a8323b-2
- if use nano ; then
- mkdir -p "${NEWLIBNANOBUILD}" || die
- cd "${NEWLIBNANOBUILD}" || die
- export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}"
- export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}"
-
- [[ ${CTARGET} == nvptx* ]] && {
- CFLAGS_FOR_TARGET+=" -Wa,--no-verify"
- CCASFLAGS+=" -Wa,--no-verify"
- }
-
- ECONF_SOURCE=${S} \
- econf \
- $(use_enable unicode newlib-mb) \
- $(use_enable nls) \
- --enable-newlib-reent-small \
- --disable-newlib-fvwrite-in-streamio \
- --disable-newlib-fseek-optimization \
- --disable-newlib-wide-orient \
- --enable-newlib-nano-malloc \
- --disable-newlib-unbuf-stream-opt \
- --enable-lite-exit \
- --enable-newlib-global-atexit \
- --enable-newlib-nano-formatted-io \
- "${myconf[@]}"
- fi
-}
-
-src_compile() {
- export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}"
- export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}"
-
- [[ ${CTARGET} == nvptx* ]] && {
- CFLAGS_FOR_TARGET+=" -Wa,--no-verify"
- CCASFLAGS+=" -Wa,--no-verify"
- }
-
- emake -C "${NEWLIBBUILD}"
-
- if use nano ; then
- export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}"
- export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}"
-
- [[ ${CTARGET} == nvptx* ]] && {
- CFLAGS_FOR_TARGET+=" -Wa,--no-verify"
- CCASFLAGS+=" -Wa,--no-verify"
- }
-
- emake -C "${NEWLIBNANOBUILD}"
- fi
-}
-
-src_install() {
- cd "${NEWLIBBUILD}" || die
- emake DESTDIR="${D}" install
-
- if use nano ; then
- cd "${NEWLIBNANOBUILD}" || die
- emake DESTDIR="${NEWLIBNANOTMPINSTALL}" install
- # Rename nano lib* files to lib*_nano and move to the real ${D}
- local nanolibfiles=""
- nanolibfiles=$(find "${NEWLIBNANOTMPINSTALL}" -regex ".*/lib\(c\|g\|m\|rdimon\|gloss\)\.a" -print)
- for f in ${nanolibfiles}; do
- local l="${f##${NEWLIBNANOTMPINSTALL}}"
- mv -v "${f}" "${D}/${l%%\.a}_nano.a" || die
- done
-
- # Move newlib-nano's version of newlib.h to newlib-nano/newlib.h
- mkdir -p "${ED}/usr/${CTARGET}/include/newlib-nano" || die
- mv "${NEWLIBNANOTMPINSTALL}/${EPREFIX}/usr/${CTARGET}/include/newlib.h" \
- "${ED}/usr/${CTARGET}/include/newlib-nano/newlib.h" || die
- fi
-
- CHOST=${CTARGET} strip-lto-bytecode
-
- # minor hack to keep things clean
- rm -rf "${D}"/usr/share/info || die
- rm -rf "${D}"/usr/info || die
-}
diff --git a/sys-libs/newlib/newlib-4.6.0.20260123.ebuild b/sys-libs/newlib/newlib-4.6.0.20260123.ebuild
deleted file mode 100644
index 6c38d442d612..000000000000
--- a/sys-libs/newlib/newlib-4.6.0.20260123.ebuild
+++ /dev/null
@@ -1,181 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-inherit dot-a flag-o-matic toolchain-funcs
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="https://sourceware.org/git/newlib-cygwin.git"
- inherit git-r3
-else
- SRC_URI="https://sourceware.org/pub/newlib/${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-DESCRIPTION="Newlib is a C library intended for use on embedded systems"
-HOMEPAGE="https://sourceware.org/newlib/"
-
-LICENSE="NEWLIB LIBGLOSS GPL-2"
-SLOT="0"
-IUSE="nls threads unicode headers-only nano"
-RESTRICT="strip"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.3.0-no-nano-cxx.patch
-)
-
-NEWLIBBUILD="${WORKDIR}/build"
-NEWLIBNANOBUILD="${WORKDIR}/build.nano"
-NEWLIBNANOTMPINSTALL="${WORKDIR}/nano_tmp_install"
-
-CFLAGS_FULL="-ffunction-sections -fdata-sections"
-CFLAGS_NANO="-Os -ffunction-sections -fdata-sections"
-
-pkg_setup() {
- # Reject newlib-on-glibc type installs
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- case ${CHOST} in
- *-newlib|*-elf) ;;
- *) die "Use sys-devel/crossdev to build a newlib toolchain" ;;
- esac
- fi
-
- case ${CTARGET} in
- msp430*)
- if ver_test $(gcc-version ${CTARGET}) -lt 10.1; then
- # bug #717610
- die "gcc for ${CTARGET} has to be 10.1 or above"
- fi
- ;;
- esac
-}
-
-src_configure() {
- lto-guarantee-fat
- # TODO: we should fix this
- unset LDFLAGS
- CHOST=${CTARGET} strip-unsupported-flags
- CCASFLAGS_ORIG="${CCASFLAGS}"
- CFLAGS_ORIG="${CFLAGS}"
-
- local myconf=(
- # The top-level configure doesn't utilize this flag, but subdirs do,
- # so autodetection for econf doesn't work. Add ourselves.
- --disable-dependency-tracking
- --disable-silent-rules
- # Disable legacy syscall stub code in newlib. These have been
- # moved to libgloss for a long time now, so the code in newlib
- # itself just gets in the way.
- --disable-newlib-supplied-syscalls
- )
- [[ ${CTARGET} == "spu" ]] \
- && myconf+=( --disable-newlib-multithread ) \
- || myconf+=( $(use_enable threads newlib-multithread) )
-
- mkdir -p "${NEWLIBBUILD}"
- cd "${NEWLIBBUILD}"
-
- export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}"
- export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}"
-
- [[ ${CTARGET} == nvptx* ]] && {
- CFLAGS_FOR_TARGET+=" -Wa,--no-verify"
- CCASFLAGS+=" -Wa,--no-verify"
- }
-
- ECONF_SOURCE=${S} \
- econf \
- $(use_enable unicode newlib-mb) \
- $(use_enable nls) \
- "${myconf[@]}"
-
- # Build newlib-nano beside newlib (original)
- # Based on https://tracker.debian.org/media/packages/n/newlib/rules-2.1.0%2Bgit20140818.1a8323b-2
- if use nano ; then
- mkdir -p "${NEWLIBNANOBUILD}" || die
- cd "${NEWLIBNANOBUILD}" || die
- export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}"
- export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}"
-
- [[ ${CTARGET} == nvptx* ]] && {
- CFLAGS_FOR_TARGET+=" -Wa,--no-verify"
- CCASFLAGS+=" -Wa,--no-verify"
- }
-
- ECONF_SOURCE=${S} \
- econf \
- $(use_enable unicode newlib-mb) \
- $(use_enable nls) \
- --enable-newlib-reent-small \
- --disable-newlib-fvwrite-in-streamio \
- --disable-newlib-fseek-optimization \
- --disable-newlib-wide-orient \
- --enable-newlib-nano-malloc \
- --disable-newlib-unbuf-stream-opt \
- --enable-lite-exit \
- --enable-newlib-global-atexit \
- --enable-newlib-nano-formatted-io \
- "${myconf[@]}"
- fi
-}
-
-src_compile() {
- export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}"
- export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}"
-
- [[ ${CTARGET} == nvptx* ]] && {
- CFLAGS_FOR_TARGET+=" -Wa,--no-verify"
- CCASFLAGS+=" -Wa,--no-verify"
- }
-
- emake -C "${NEWLIBBUILD}"
-
- if use nano ; then
- export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}"
- export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}"
-
- [[ ${CTARGET} == nvptx* ]] && {
- CFLAGS_FOR_TARGET+=" -Wa,--no-verify"
- CCASFLAGS+=" -Wa,--no-verify"
- }
-
- emake -C "${NEWLIBNANOBUILD}"
- fi
-}
-
-src_install() {
- cd "${NEWLIBBUILD}" || die
- emake DESTDIR="${D}" install
-
- if use nano ; then
- cd "${NEWLIBNANOBUILD}" || die
- emake DESTDIR="${NEWLIBNANOTMPINSTALL}" install
- # Rename nano lib* files to lib*_nano and move to the real ${D}
- local nanolibfiles=""
- nanolibfiles=$(find "${NEWLIBNANOTMPINSTALL}" -regex ".*/lib\(c\|g\|m\|rdimon\|gloss\)\.a" -print)
- for f in ${nanolibfiles}; do
- local l="${f##${NEWLIBNANOTMPINSTALL}}"
- mv -v "${f}" "${D}/${l%%\.a}_nano.a" || die
- done
-
- # Move newlib-nano's version of newlib.h to newlib-nano/newlib.h
- mkdir -p "${ED}/usr/${CTARGET}/include/newlib-nano" || die
- mv "${NEWLIBNANOTMPINSTALL}/${EPREFIX}/usr/${CTARGET}/include/newlib.h" \
- "${ED}/usr/${CTARGET}/include/newlib-nano/newlib.h" || die
- fi
-
- CHOST=${CTARGET} strip-lto-bytecode
-
- # minor hack to keep things clean
- rm -rf "${D}"/usr/share/info || die
- rm -rf "${D}"/usr/info || die
-}
diff --git a/sys-libs/newlib/newlib-9999.ebuild b/sys-libs/newlib/newlib-9999.ebuild
deleted file mode 100644
index 0415314423fa..000000000000
--- a/sys-libs/newlib/newlib-9999.ebuild
+++ /dev/null
@@ -1,181 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-inherit dot-a flag-o-matic toolchain-funcs
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="https://sourceware.org/git/newlib-cygwin.git"
- inherit git-r3
-else
- SRC_URI="https://sourceware.org/pub/newlib/${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-DESCRIPTION="Newlib is a C library intended for use on embedded systems"
-HOMEPAGE="https://sourceware.org/newlib/"
-
-LICENSE="NEWLIB LIBGLOSS GPL-2"
-SLOT="0"
-IUSE="nls threads unicode headers-only nano"
-RESTRICT="strip"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.3.0-no-nano-cxx.patch
-)
-
-NEWLIBBUILD="${WORKDIR}/build"
-NEWLIBNANOBUILD="${WORKDIR}/build.nano"
-NEWLIBNANOTMPINSTALL="${WORKDIR}/nano_tmp_install"
-
-CFLAGS_FULL="-ffunction-sections -fdata-sections"
-CFLAGS_NANO="-Os -ffunction-sections -fdata-sections"
-
-pkg_setup() {
- # Reject newlib-on-glibc type installs
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- case ${CHOST} in
- *-newlib|*-elf) ;;
- *) die "Use sys-devel/crossdev to build a newlib toolchain" ;;
- esac
- fi
-
- case ${CTARGET} in
- msp430*)
- if ver_test $(gcc-version ${CTARGET}) -lt 10.1; then
- # bug #717610
- die "gcc for ${CTARGET} has to be 10.1 or above"
- fi
- ;;
- esac
-}
-
-src_configure() {
- lto-guarantee-fat
- # TODO: we should fix this
- unset LDFLAGS
- CHOST=${CTARGET} strip-unsupported-flags
- CCASFLAGS_ORIG="${CCASFLAGS}"
- CFLAGS_ORIG="${CFLAGS}"
-
- local myconf=(
- # The top-level configure doesn't utilize this flag, but subdirs do,
- # so autodetection for econf doesn't work. Add ourselves.
- --disable-dependency-tracking
- --disable-silent-rules
- # Disable legacy syscall stub code in newlib. These have been
- # moved to libgloss for a long time now, so the code in newlib
- # itself just gets in the way.
- --disable-newlib-supplied-syscalls
- )
- [[ ${CTARGET} == "spu" ]] \
- && myconf+=( --disable-newlib-multithread ) \
- || myconf+=( $(use_enable threads newlib-multithread) )
-
- mkdir -p "${NEWLIBBUILD}"
- cd "${NEWLIBBUILD}"
-
- export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}"
- export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}"
-
- [[ ${CTARGET} == nvptx* ]] && {
- CFLAGS_FOR_TARGET+=" -Wa,--no-verify"
- CCASFLAGS+=" -Wa,--no-verify"
- }
-
- ECONF_SOURCE=${S} \
- econf \
- $(use_enable unicode newlib-mb) \
- $(use_enable nls) \
- "${myconf[@]}"
-
- # Build newlib-nano beside newlib (original)
- # Based on https://tracker.debian.org/media/packages/n/newlib/rules-2.1.0%2Bgit20140818.1a8323b-2
- if use nano ; then
- mkdir -p "${NEWLIBNANOBUILD}" || die
- cd "${NEWLIBNANOBUILD}" || die
- export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}"
- export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}"
-
- [[ ${CTARGET} == nvptx* ]] && {
- CFLAGS_FOR_TARGET+=" -Wa,--no-verify"
- CCASFLAGS+=" -Wa,--no-verify"
- }
-
- ECONF_SOURCE=${S} \
- econf \
- $(use_enable unicode newlib-mb) \
- $(use_enable nls) \
- --enable-newlib-reent-small \
- --disable-newlib-fvwrite-in-streamio \
- --disable-newlib-fseek-optimization \
- --disable-newlib-wide-orient \
- --enable-newlib-nano-malloc \
- --disable-newlib-unbuf-stream-opt \
- --enable-lite-exit \
- --enable-newlib-global-atexit \
- --enable-newlib-nano-formatted-io \
- "${myconf[@]}"
- fi
-}
-
-src_compile() {
- export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}"
- export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}"
-
- [[ ${CTARGET} == nvptx* ]] && {
- CFLAGS_FOR_TARGET+=" -Wa,--no-verify"
- CCASFLAGS+=" -Wa,--no-verify"
- }
-
- emake -C "${NEWLIBBUILD}"
-
- if use nano ; then
- export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}"
- export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}"
-
- [[ ${CTARGET} == nvptx* ]] && {
- CFLAGS_FOR_TARGET+=" -Wa,--no-verify"
- CCASFLAGS+=" -Wa,--no-verify"
- }
-
- emake -C "${NEWLIBNANOBUILD}"
- fi
-}
-
-src_install() {
- cd "${NEWLIBBUILD}" || die
- emake DESTDIR="${D}" install
-
- if use nano ; then
- cd "${NEWLIBNANOBUILD}" || die
- emake DESTDIR="${NEWLIBNANOTMPINSTALL}" install
- # Rename nano lib* files to lib*_nano and move to the real ${D}
- local nanolibfiles=""
- nanolibfiles=$(find "${NEWLIBNANOTMPINSTALL}" -regex ".*/lib\(c\|g\|m\|rdimon\|gloss\)\.a" -print)
- for f in ${nanolibfiles}; do
- local l="${f##${NEWLIBNANOTMPINSTALL}}"
- mv -v "${f}" "${D}/${l%%\.a}_nano.a" || die
- done
-
- # Move newlib-nano's version of newlib.h to newlib-nano/newlib.h
- mkdir -p "${ED}/usr/${CTARGET}/include/newlib-nano" || die
- mv "${NEWLIBNANOTMPINSTALL}/${EPREFIX}/usr/${CTARGET}/include/newlib.h" \
- "${ED}/usr/${CTARGET}/include/newlib-nano/newlib.h" || die
- fi
-
- CHOST=${CTARGET} strip-lto-bytecode
-
- # minor hack to keep things clean
- rm -rf "${D}"/usr/share/info || die
- rm -rf "${D}"/usr/info || die
-}
diff --git a/sys-libs/nss-tls/Manifest b/sys-libs/nss-tls/Manifest
deleted file mode 100644
index 27b79d2be167..000000000000
--- a/sys-libs/nss-tls/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST nss-tls-1.0.tar.gz 28528 BLAKE2B 0755cd98e80185be6bbcde142c5555114637c1bf056f2ef78a31c5318a93efc767e16067249db045e126d217aabc44658b2a4fa7158370737ce4fafd48d6b555 SHA512 882fb8594cdf0ce03be518e23a5dd693eb344504dafcaf017bc8a6e67708b2d4bfbdd38fa46c41822d17149f62f5cc4632b318e8298aba270d945951078cd6c0
-DIST nss-tls-1.1.tar.gz 30370 BLAKE2B a948eaf021677182082a7f1b09cac7c74abb61dd39fda781d57615cbaf37e9a6db4a54adbccaddd73b3ee4c810e4dbe0bc2630ac25d8d4ee70e001668deb3baf SHA512 85e640ff9566f2b07248b1e11eb6eb7e5e7dd2fda5d479f097dbe8fc58c92df705b887e1e418497690340bd838ae99d8d7a713329fb70456a4a7d31a5127b416
diff --git a/sys-libs/nss-tls/files/nss-tlsd b/sys-libs/nss-tls/files/nss-tlsd
deleted file mode 100644
index 2a2d7d8533f5..000000000000
--- a/sys-libs/nss-tls/files/nss-tlsd
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-description="NSS TLS Daemon"
-
-
-depend() {
- use dns ldap net slapd logger
-}
-
-checkconfig() {
- if [ ! -d /run/nss-tlsd ] ; then
- checkpath -d -m 755 /run/nss-tlsd
- fi
-
-}
-
-start_pre() {
- checkconfig
-}
-
-start() {
- ebegin "Starting NSS-TLSD"
- start-stop-daemon --start --background --exec /usr/sbin/nss-tlsd --pidfile /var/run/nss-tlsd.pid
- eend $?
-}
-
-stop() {
- ebegin "Stopping NSS-TLSD"
- start-stop-daemon --stop --exec /usr/sbin/nss-tlsd --pidfile /var/run/nss-tlsd.pid
- eend $?
-}
diff --git a/sys-libs/nss-tls/metadata.xml b/sys-libs/nss-tls/metadata.xml
deleted file mode 100644
index 67f16b3cca49..000000000000
--- a/sys-libs/nss-tls/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>andrea.postiglione@gmail.com</email>
- <name>Andrea Postiglione</name>
- </maintainer>
- <upstream>
- <remote-id type="github">dimkr/nss-tls</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/nss-tls/nss-tls-1.0.ebuild b/sys-libs/nss-tls/nss-tls-1.0.ebuild
deleted file mode 100644
index ab641fd2d609..000000000000
--- a/sys-libs/nss-tls/nss-tls-1.0.ebuild
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit meson systemd
-
-DESCRIPTION="A DNS over HTTPS resolver for glibc"
-HOMEPAGE="https://github.com/dimkr/nss-tls"
-SRC_URI="https://github.com/dimkr/nss-tls/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="systemd"
-
-RDEPEND="dev-libs/glib
- net-libs/libsoup"
-DEPEND="${RDEPEND}
- sys-libs/glibc[nscd(+)]"
-BDEPEND="
- ${DEPEND}
- app-alternatives/ninja
- dev-build/meson
-"
-
-src_prepare() {
- default
- sed -e "s/@0@\/run\/nss-tls/\/var\/run\/nss-tls/" -i "${S}"/meson.build || die
-}
-
-src_configure() {
- local emesonargs=(
- --buildtype=release
- )
- meson_src_configure
-}
-
-src_compile() {
- meson_src_compile
-}
-
-src_install() {
- if use systemd ; then
- systemd_newunit "${S}"/nss-tlsd.service.in nss-tlsd.service
- else
- doinitd "${FILESDIR}"/nss-tlsd
- fi
- meson_src_install
-}
-
-pkg_postinst() {
- ewarn "Do Not put ip address of the server in nss-tls.conf"
- ewarn "use the dns name and add record of dns server in /etc/hosts"
- ewarn "echo "8.8.8.8 dns.google" >> /etc/hosts"
-
-}
diff --git a/sys-libs/nss-tls/nss-tls-1.1-r1.ebuild b/sys-libs/nss-tls/nss-tls-1.1-r1.ebuild
deleted file mode 100644
index caebc7f7be63..000000000000
--- a/sys-libs/nss-tls/nss-tls-1.1-r1.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DESCRIPTION="A DNS over HTTPS resolver for glibc"
-HOMEPAGE="https://github.com/dimkr/nss-tls"
-SRC_URI="https://github.com/dimkr/nss-tls/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-inherit meson
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="systemd"
-
-RDEPEND="
- dev-libs/glib
- net-libs/libsoup:2.4
-"
-DEPEND="
- ${RDEPEND}
- sys-libs/glibc[nscd(+)]"
-
-src_prepare() {
- default
- sed -e "s/@0@\/run\/nss-tls/\/var\/run\/nss-tls/" -i "${S}"/meson.build || die
-
- if use systemd; then
- sed -i -e "s/systemd = .*/systemd = dependency('systemd')/" meson.build || die
- else
- sed -i -e "s/systemd = .*/systemd = disabler()/" meson.build || die
- fi
-}
-
-src_install() {
- meson_src_install
-
- doinitd "${FILESDIR}"/nss-tlsd
-}
-
-post_install() {
- ewarn "Do Not put ip address of the server in nss-tls.conf"
- ewarn "use the dns name and add record of dns server in /etc/hosts"
- ewarn "echo "8.8.8.8 dns.google" >> /etc/hosts"
-}
diff --git a/sys-libs/nss-tls/nss-tls-9999.ebuild b/sys-libs/nss-tls/nss-tls-9999.ebuild
deleted file mode 100644
index 10fdecdadc4b..000000000000
--- a/sys-libs/nss-tls/nss-tls-9999.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit git-r3 meson systemd
-
-DESCRIPTION="A DNS over HTTPS resolver for glibc"
-HOMEPAGE="https://github.com/dimkr/nss-tls"
-EGIT_REPO_URI="https://github.com/dimkr/nss-tls.git"
-EGIT_BRANCH="master"
-
-S="${WORKDIR}/${PN}-9999"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-IUSE="systemd"
-
-RDEPEND="dev-libs/glib
- net-libs/libsoup"
-DEPEND="${RDEPEND}
- sys-libs/glibc[nscd(+)]"
-BDEPEND="
- ${DEPEND}
- app-alternatives/ninja
- dev-build/meson
-"
-
-src_prepare() {
- default
- sed -e "s/@0@\/run\/nss-tls/\/var\/run\/nss-tls/" -i "${S}"/meson.build || die
-}
-
-src_configure() {
- local emesonargs=(
- --buildtype=release
- )
- meson_src_configure
-}
-
-src_compile() {
- meson_src_compile
-}
-
-src_install() {
- if use systemd ; then
- systemd_newunit "${S}"/nss-tlsd.service.in nss-tlsd.service
- else
- doinitd "${FILESDIR}"/nss-tlsd
- fi
- meson_src_install
-}
-
-pkg_postinst() {
- ewarn "Do Not put ip address of the server in nss-tls.conf"
- ewarn "use the dns name and add record of dns server in /etc/hosts"
- ewarn "echo "8.8.8.8 dns.google" >> /etc/hosts"
-
-}
diff --git a/sys-libs/nss-usrfiles/Manifest b/sys-libs/nss-usrfiles/Manifest
deleted file mode 100644
index a66cb5b21735..000000000000
--- a/sys-libs/nss-usrfiles/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST nss-altfiles-2.18.1.tar.gz 26046 BLAKE2B bb60a37c2f9aeffca058a977e782298f5357ce736a9b46abe7c685381bb58260965c3feab32cb9eb64db111a2edace1580a8d083f17b03e68bb15c107d339bed SHA512 21c8d782e12657b07878f2869c79acca09692efe4caf2f5102557e1ecdbd97c0b1245009dccf56642fd827e742531c134e5f53ebe531e458ddd8a21a1aab6377
diff --git a/sys-libs/nss-usrfiles/metadata.xml b/sys-libs/nss-usrfiles/metadata.xml
deleted file mode 100644
index 6a08262191ea..000000000000
--- a/sys-libs/nss-usrfiles/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!--maintainer-needed-->
- <upstream>
- <remote-id type="github">coreos/nss-altfiles</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/nss-usrfiles/nss-usrfiles-2.18.1.ebuild b/sys-libs/nss-usrfiles/nss-usrfiles-2.18.1.ebuild
deleted file mode 100644
index 4c5e1d9fd7af..000000000000
--- a/sys-libs/nss-usrfiles/nss-usrfiles-2.18.1.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs
-
-MY_PN="nss-altfiles"
-MY_P="${MY_PN}-${PV}"
-DESCRIPTION="NSS module to read passwd/group files from CoreOS /usr location"
-HOMEPAGE="https://github.com/coreos/nss-altfiles"
-SRC_URI="https://github.com/coreos/${MY_PN}/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS=""
-
-src_configure() {
- : # Don't bother with the custom configure script.
-}
-
-src_compile() {
- tc-export CC
- emake DATADIR=/usr/share/baselayout MODULE_NAME=usrfiles
-}
-
-src_install() {
- dolib.so libnss_usrfiles.so.2
-}
diff --git a/sys-libs/nss_wrapper/Manifest b/sys-libs/nss_wrapper/Manifest
deleted file mode 100644
index 694a183e3124..000000000000
--- a/sys-libs/nss_wrapper/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST nss_wrapper-1.1.16.tar.gz 190469 BLAKE2B f349d05bc951ba6294c883c4ca2ffb9decbc2da5c2c6778d83547e5e6d770f6f475daa1c6b6a3257d29c74bac1d96014aebb5c5ff7441562b3b4a6989c2122ea SHA512 684845c25dd7ff48c07f25908d6eef9fa77a098d8d02eb1e8d6f0f6f103a3b4bdfbe4504605015f104fc7092b1224b26fe7096cb9e72e3d8bfc635c276efd036
diff --git a/sys-libs/nss_wrapper/files/nss_wrapper-1.1.16-stdint.patch b/sys-libs/nss_wrapper/files/nss_wrapper-1.1.16-stdint.patch
deleted file mode 100644
index b308702dea12..000000000000
--- a/sys-libs/nss_wrapper/files/nss_wrapper-1.1.16-stdint.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-https://git.samba.org/?p=nss_wrapper.git;a=commit;h=e660ca85fbd23fa40272942e014bb90356175149
-
-From e660ca85fbd23fa40272942e014bb90356175149 Mon Sep 17 00:00:00 2001
-From: Andreas Schneider <asn@samba.org>
-Date: Thu, 17 Jul 2025 15:17:52 +0200
-Subject: [PATCH] tests: Add missing include for stdint.h
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Andreas Schneider <asn@samba.org>
-Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
----
- tests/test_getaddrinfo.c | 1 +
- tests/test_gethostby_name_addr.c | 1 +
- tests/test_gethostent.c | 3 ++-
- tests/test_getpwuid_module.c | 1 +
- tests/test_initgroups.c | 1 +
- tests/test_nwrap_disabled.c | 1 +
- tests/testsuite.c | 1 +
- 7 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/tests/test_getaddrinfo.c b/tests/test_getaddrinfo.c
-index 6de0323..63dc21f 100644
---- a/tests/test_getaddrinfo.c
-+++ b/tests/test_getaddrinfo.c
-@@ -2,6 +2,7 @@
-
- #include <stdarg.h>
- #include <stddef.h>
-+#include <stdint.h>
- #include <setjmp.h>
- #include <cmocka.h>
-
-diff --git a/tests/test_gethostby_name_addr.c b/tests/test_gethostby_name_addr.c
-index e8939f6..9aae9ae 100644
---- a/tests/test_gethostby_name_addr.c
-+++ b/tests/test_gethostby_name_addr.c
-@@ -4,6 +4,7 @@
-
- #include <stdarg.h>
- #include <stddef.h>
-+#include <stdint.h>
- #include <setjmp.h>
- #include <cmocka.h>
-
-diff --git a/tests/test_gethostent.c b/tests/test_gethostent.c
-index aa61696..ad8a89c 100644
---- a/tests/test_gethostent.c
-+++ b/tests/test_gethostent.c
-@@ -2,6 +2,7 @@
-
- #include <stdarg.h>
- #include <stddef.h>
-+#include <stdint.h>
- #include <setjmp.h>
- #include <cmocka.h>
-
-@@ -31,7 +32,7 @@ static void test_nwrap_gethostent(void **state)
- char buf[INET6_ADDRSTRLEN];
- uint32_t j;
- const char *ip;
--
-+
- ip = inet_ntop(he->h_addrtype,
- he->h_addr_list[i],
- buf,
-diff --git a/tests/test_getpwuid_module.c b/tests/test_getpwuid_module.c
-index a06a49d..3718ebb 100644
---- a/tests/test_getpwuid_module.c
-+++ b/tests/test_getpwuid_module.c
-@@ -2,6 +2,7 @@
-
- #include <stdarg.h>
- #include <stddef.h>
-+#include <stdint.h>
- #include <setjmp.h>
- #include <cmocka.h>
- #include <unistd.h>
-diff --git a/tests/test_initgroups.c b/tests/test_initgroups.c
-index 1ec2220..f5ccba7 100644
---- a/tests/test_initgroups.c
-+++ b/tests/test_initgroups.c
-@@ -1,5 +1,6 @@
- #include <stdarg.h>
- #include <stddef.h>
-+#include <stdint.h>
- #include <setjmp.h>
- #include <cmocka.h>
- #include <unistd.h>
-diff --git a/tests/test_nwrap_disabled.c b/tests/test_nwrap_disabled.c
-index f00294b..090377d 100644
---- a/tests/test_nwrap_disabled.c
-+++ b/tests/test_nwrap_disabled.c
-@@ -2,6 +2,7 @@
-
- #include <stdarg.h>
- #include <stddef.h>
-+#include <stdint.h>
- #include <setjmp.h>
- #include <cmocka.h>
-
-diff --git a/tests/testsuite.c b/tests/testsuite.c
-index bf678fd..41082f9 100644
---- a/tests/testsuite.c
-+++ b/tests/testsuite.c
-@@ -2,6 +2,7 @@
-
- #include <stdarg.h>
- #include <stddef.h>
-+#include <stdint.h>
- #include <setjmp.h>
- #include <cmocka.h>
-
---
-2.34.1
diff --git a/sys-libs/nss_wrapper/metadata.xml b/sys-libs/nss_wrapper/metadata.xml
deleted file mode 100644
index 74c488b2dd6e..000000000000
--- a/sys-libs/nss_wrapper/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>samba@gentoo.org</email>
- <name>Samba Team</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/nss_wrapper/nss_wrapper-1.1.16.ebuild b/sys-libs/nss_wrapper/nss_wrapper-1.1.16.ebuild
deleted file mode 100644
index ba6bd1a171a9..000000000000
--- a/sys-libs/nss_wrapper/nss_wrapper-1.1.16.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake-multilib
-
-DESCRIPTION="Wrapper for the user, group and hosts NSS API"
-HOMEPAGE="https://cwrap.org/nss_wrapper.html"
-SRC_URI="https://ftp.samba.org/pub/cwrap/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-# sys-libs/uid_wrapper is used to "better test initgroups()" optionally
-BDEPEND="
- test? (
- dev-util/cmocka
- sys-libs/uid_wrapper
- )
-"
-
-PATCHES=(
- "${FILESDIR}"/${P}-stdint.patch
-)
-
-src_configure() {
- local mycmakeargs=(
- -DUNIT_TESTING=$(usex test)
- )
-
- cmake-multilib_src_configure
-}
diff --git a/sys-libs/obstack-standalone/Manifest b/sys-libs/obstack-standalone/Manifest
deleted file mode 100644
index d851231c5fa9..000000000000
--- a/sys-libs/obstack-standalone/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST obstack-standalone-1.2.3.tar.gz 11483 BLAKE2B fa8322c680fed9f876c90e3182271ec0cf45319ae46c5139613ed1c2f1f268c3361654b55a7a28c2043a7365ea89cefcf3eab2190dadbc1f36c20c203fe97945 SHA512 b2bbed19c4ab2714ca794bdcb1a84fad1af964e884d4f3bbe91c9937ca089d92b8472cb05ebe998a9f5c85cb922b9b458db91eff29077bd099942e1ce18e16cc
diff --git a/sys-libs/obstack-standalone/metadata.xml b/sys-libs/obstack-standalone/metadata.xml
deleted file mode 100644
index 600618884128..000000000000
--- a/sys-libs/obstack-standalone/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>blueness@gentoo.org</email>
- <name>Anthony G. Basile</name>
- </maintainer>
- <upstream>
- <remote-id type="github">pullmoll/musl-obstack</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/obstack-standalone/obstack-standalone-1.2.3.ebuild b/sys-libs/obstack-standalone/obstack-standalone-1.2.3.ebuild
deleted file mode 100644
index 37b4aaf57c0a..000000000000
--- a/sys-libs/obstack-standalone/obstack-standalone-1.2.3.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools
-
-DESCRIPTION="A standalone library to implement GNU libc's obstack"
-HOMEPAGE="https://github.com/void-linux/musl-obstack"
-SRC_URI="https://github.com/void-linux/musl-obstack/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
-S="${WORKDIR}"/musl-obstack-${PV}
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~m68k ~mips ppc ppc64 ~riscv x86"
-IUSE="static-libs"
-
-DEPEND="!sys-libs/glibc"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- default
-
- eautoreconf
-}
-
-src_configure() {
- econf $(use_enable static-libs static)
-}
-
-src_install() {
- default
-
- find "${ED}" -name '*.la' -delete || die
- mv "${ED}"/usr/$(get_libdir)/pkgconfig/{musl-obstack,obstack-standalone}.pc || die
-}
diff --git a/sys-libs/openipmi/Manifest b/sys-libs/openipmi/Manifest
deleted file mode 100644
index ad8435464da1..000000000000
--- a/sys-libs/openipmi/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST OpenIPMI-2.0.36.tar.gz 3149501 BLAKE2B 9ed690a5824caa5d1f588f65625e1db9b79b3d03c8e828e9ffb549396264530ab28f3ec86705053446a6f91669a03165e9de7b2764c1f38733d33a0327c26e1c SHA512 a47725308336f200e88a1eb8641ed5ef03fc8bb43ee47f7a99e39df68640ff912b6842c1710d7e767aeb724fc41fa4ed3b244685812ee985e5200003a45f4015
-DIST OpenIPMI-2.0.37.tar.gz 2929014 BLAKE2B 0bb102be0d89ec0ad4dfd80408e9e1d766c43adb0ce573286d7b3c23076c8465208cbe10ec07516b35a10c6f87397c6d36b911f032b2442954b3463f2484a7f0 SHA512 ef959ece52f073c108a84911f0aeff421c9408f70b7dacf286ec5fdb023e281d3e97b425ac2c3c70bdfebfafda61ba923c8c052da52448d26d5fcf5e4d1c764a
diff --git a/sys-libs/openipmi/files/openipmi-2.0.26-tinfo.patch b/sys-libs/openipmi/files/openipmi-2.0.26-tinfo.patch
deleted file mode 100644
index ed0436a26c00..000000000000
--- a/sys-libs/openipmi/files/openipmi-2.0.26-tinfo.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- OpenIPMI-2.0.26/configure.ac
-+++ OpenIPMI-2.0.26/configure.ac
-@@ -763,10 +763,12 @@
- [epoll_pwait], [This platform supports epoll(7) with epoll_pwait(2)],
- [HAVE_EPOLL_PWAIT], [This platform supports epoll(7) with epoll_pwait(2).])
-
--AC_CHECK_LIB(curses, tgetent, TERM_LIBS=-lcurses,
-+PKG_CHECK_MODULES(ncurses, ncurses, TERM_LIBS=$ncurses_LIBS,
-+ [AC_CHECK_LIB(tinfo, tgetent, TERM_LIBS=-ltinfo,
-+ [AC_CHECK_LIB(curses, tgetent, TERM_LIBS=-lcurses,
- [AC_CHECK_LIB(ncursesw, tgetent, TERM_LIBS=-lncursesw,
- [AC_CHECK_LIB(ncurses, tgetent, TERM_LIBS=-lncurses,
-- [AC_MSG_ERROR([libtermcap, libcurses or libncurses are required!])])] )] )
-+ [AC_MSG_ERROR([libtinfo, libtermcap, libcurses or libncurses are required!])])] )] )] )] )
- AC_SUBST(TERM_LIBS)
-
- AC_CHECK_FUNCS(cfmakeraw)
diff --git a/sys-libs/openipmi/metadata.xml b/sys-libs/openipmi/metadata.xml
deleted file mode 100644
index 4d0f157f33c9..000000000000
--- a/sys-libs/openipmi/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>sysadmin@gentoo.org</email>
- <name>Gentoo Sysadmin Project</name>
- </maintainer>
- <upstream>
- <remote-id type="sourceforge">openipmi</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/openipmi/openipmi-2.0.36-r1.ebuild b/sys-libs/openipmi/openipmi-2.0.36-r1.ebuild
deleted file mode 100644
index 14ebceedf48a..000000000000
--- a/sys-libs/openipmi/openipmi-2.0.36-r1.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit autotools python-single-r1
-
-MY_PN="OpenIPMI"
-MY_P="${MY_PN}-${PV/_/-}"
-DESCRIPTION="Library interface to IPMI"
-HOMEPAGE="https://sourceforge.net/projects/openipmi/"
-SRC_URI="https://downloads.sourceforge.net/${PN}/${MY_P}.tar.gz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="LGPL-2.1 GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ~hppa ~loong ppc ppc64 ~riscv x86"
-IUSE="crypt snmp perl python static-libs tcl"
-
-RDEPEND="
- dev-libs/glib:2
- dev-libs/popt
- sys-libs/gdbm:=
- sys-libs/ncurses:=
- sys-libs/readline:=
- crypt? ( dev-libs/openssl:= )
- snmp? ( net-analyzer/net-snmp:= )
- perl? ( dev-lang/perl:= )
- python? ( ${PYTHON_DEPS} )
- tcl? ( dev-lang/tcl:= )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- >=dev-lang/swig-1.3.21
- virtual/pkgconfig
-"
-
-# Gui is broken!
-# python? ( tcl? ( tk? ( dev-lang/tk dev-tcltk/tix ) ) )"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-2.0.26-tinfo.patch" # bug #501510
-)
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # For tinfo patch
- eautoreconf
-}
-
-src_configure() {
- local myconf=(
- # These binaries are for root!
- --bindir="${EPREFIX}"/usr/sbin
- --with-glib
- --with-glibver=2.0
- --with-swig
- --without-tkinter
- $(use_with snmp ucdsnmp yes)
- $(use_with crypt openssl yes)
- $(use_with perl perl yes)
- $(use_with tcl tcl yes)
- $(use_with python python yes)
- )
-
- # GUI is broken
- #use tk && use python && use !tcl && \
- # ewarn "Not building Tk GUI because it needs both Python AND Tcl"
- #if use python && use tcl; then
- # myconf+=( $(use_with tk tkinter) )
- #else
- # myconf+=( --without-tkinter )
- #fi
-
- econf "${myconf[@]}"
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- dodoc README* FAQ ChangeLog TODO doc/IPMI.pdf lanserv/README.vm
- newdoc cmdlang/README README.cmdlang
-
- use python && python_optimize
-
- find "${ED}" -name "*.la" -delete || die
-
- if ! use static-libs ; then
- find "${ED}" -name "*.a" -delete || die
- fi
-}
diff --git a/sys-libs/openipmi/openipmi-2.0.37-r1.ebuild b/sys-libs/openipmi/openipmi-2.0.37-r1.ebuild
deleted file mode 100644
index 14ebceedf48a..000000000000
--- a/sys-libs/openipmi/openipmi-2.0.37-r1.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit autotools python-single-r1
-
-MY_PN="OpenIPMI"
-MY_P="${MY_PN}-${PV/_/-}"
-DESCRIPTION="Library interface to IPMI"
-HOMEPAGE="https://sourceforge.net/projects/openipmi/"
-SRC_URI="https://downloads.sourceforge.net/${PN}/${MY_P}.tar.gz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="LGPL-2.1 GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ~hppa ~loong ppc ppc64 ~riscv x86"
-IUSE="crypt snmp perl python static-libs tcl"
-
-RDEPEND="
- dev-libs/glib:2
- dev-libs/popt
- sys-libs/gdbm:=
- sys-libs/ncurses:=
- sys-libs/readline:=
- crypt? ( dev-libs/openssl:= )
- snmp? ( net-analyzer/net-snmp:= )
- perl? ( dev-lang/perl:= )
- python? ( ${PYTHON_DEPS} )
- tcl? ( dev-lang/tcl:= )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- >=dev-lang/swig-1.3.21
- virtual/pkgconfig
-"
-
-# Gui is broken!
-# python? ( tcl? ( tk? ( dev-lang/tk dev-tcltk/tix ) ) )"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-2.0.26-tinfo.patch" # bug #501510
-)
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # For tinfo patch
- eautoreconf
-}
-
-src_configure() {
- local myconf=(
- # These binaries are for root!
- --bindir="${EPREFIX}"/usr/sbin
- --with-glib
- --with-glibver=2.0
- --with-swig
- --without-tkinter
- $(use_with snmp ucdsnmp yes)
- $(use_with crypt openssl yes)
- $(use_with perl perl yes)
- $(use_with tcl tcl yes)
- $(use_with python python yes)
- )
-
- # GUI is broken
- #use tk && use python && use !tcl && \
- # ewarn "Not building Tk GUI because it needs both Python AND Tcl"
- #if use python && use tcl; then
- # myconf+=( $(use_with tk tkinter) )
- #else
- # myconf+=( --without-tkinter )
- #fi
-
- econf "${myconf[@]}"
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- dodoc README* FAQ ChangeLog TODO doc/IPMI.pdf lanserv/README.vm
- newdoc cmdlang/README README.cmdlang
-
- use python && python_optimize
-
- find "${ED}" -name "*.la" -delete || die
-
- if ! use static-libs ; then
- find "${ED}" -name "*.a" -delete || die
- fi
-}
diff --git a/sys-libs/pam/Manifest b/sys-libs/pam/Manifest
deleted file mode 100644
index 453c007b5f9e..000000000000
--- a/sys-libs/pam/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST Linux-PAM-1.7.2.tar.xz 511724 BLAKE2B d7ebfac4393af3f889fef973946f1e6d60f118f2e048448708c5fdf0ef7fa7780945cda3b0abf6e0e2e15bbc2dd23be52389efabd00647381b3bc971f1aadcd8 SHA512 b035c0abeb5afb6b3067341767ace6d68ded4c061870afff2ab9494713b1dc9d2ff0995a5d1f0852a49b6e8b2123a7cc2f40342e16c7863a58df3c102b9010c5
-DIST Linux-PAM-1.7.2.tar.xz.asc 833 BLAKE2B 86c4eb129af7afe8348eddf78d764c0658dd9597b62ed0657ea23cca80dd29a052cdef8f588abe3615a2a40062c210fe0c04cca29309dfb3dcb70d13be4ab8db SHA512 01f6e770e8a0eb60f76d95581f66c4eece6436ec8f2e5766e57a4240014ab43e5ad991fa7f77cfc4c57809a0e0c47ccf60118cb49dee790413cf824ebd80b879
diff --git a/sys-libs/pam/metadata.xml b/sys-libs/pam/metadata.xml
deleted file mode 100644
index 1abda7583cda..000000000000
--- a/sys-libs/pam/metadata.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- </maintainer>
- <maintainer type="person">
- <email>sam@gentoo.org</email>
- <name>Sam James</name>
- </maintainer>
- <use>
- <flag name="berkdb">
- Build the pam_userdb module, that allows to authenticate users
- against a Berkeley DB file. Please note that enabling this USE
- flag will create a PAM module that links to the Berkeley DB (as
- provided by <pkg>sys-libs/db</pkg>) installed in /usr/lib and
- will thus not work for boot-critical services authentication.
- </flag>
- </use>
- <upstream>
- <remote-id type="github">linux-pam/linux-pam</remote-id>
- <remote-id type="cpe">cpe:/a:kernel:linux-pam</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/pam/pam-1.7.2.ebuild b/sys-libs/pam/pam-1.7.2.ebuild
deleted file mode 100644
index 4a2172e1b408..000000000000
--- a/sys-libs/pam/pam-1.7.2.ebuild
+++ /dev/null
@@ -1,198 +0,0 @@
-# Copyright 1999-2026 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 flag-o-matic meson-multilib user-info
-
-DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
-HOMEPAGE="https://github.com/linux-pam/linux-pam"
-
-if [[ ${PV} == *_p* ]] ; then
- PAM_COMMIT="e634a3a9be9484ada6e93970dfaf0f055ca17332"
- SRC_URI="
- https://github.com/linux-pam/linux-pam/archive/${PAM_COMMIT}.tar.gz -> ${P}.gh.tar.gz
- "
- S="${WORKDIR}"/linux-${PN}-${PAM_COMMIT}
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/pam.asc
- inherit verify-sig
-
- SRC_URI="
- https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}.tar.xz
- verify-sig? ( https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}.tar.xz.asc )
- "
- S="${WORKDIR}/${MY_P}"
-
- BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-pam-20260122 )"
-fi
-
-LICENSE="|| ( BSD GPL-2 )"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="audit berkdb elogind examples debug nis nls selinux systemd"
-REQUIRED_USE="?? ( elogind systemd )"
-
-# meson.build specifically checks for bison and then byacc
-# also requires xsltproc
-BDEPEND+="
- acct-group/shadow
- || ( sys-devel/bison dev-util/byacc )
- app-text/docbook-xsl-ns-stylesheets
- dev-libs/libxslt
- sys-devel/flex
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
-"
-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}] )
- !berkdb? ( sys-libs/gdbm:=[${MULTILIB_USEDEP}] )
- elogind? ( >=sys-auth/elogind-254 )
- selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- systemd? ( >=sys-apps/systemd-254:= )
- nis? (
- net-libs/libnsl:=[${MULTILIB_USEDEP}]
- >=net-libs/libtirpc-0.2.4-r2:=[${MULTILIB_USEDEP}]
- )
-"
-RDEPEND="${DEPEND}
- acct-group/shadow
-"
-PDEPEND=">=sys-auth/pambase-20200616"
-
-src_configure() {
- # meson.build sets -Wl,--fatal-warnings and with e.g. mold, we get:
- # cannot assign version `global` to symbol `pam_sm_open_session`: symbol not found
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- # Do not let user's BROWSER setting mess us up, bug #549684
- unset BROWSER
-
- meson-multilib_src_configure
-}
-
-multilib_src_configure() {
- local machine_file="${T}/meson.${CHOST}.${ABI}.ini.local"
- # Workaround for docbook5 not being packaged (bug #913087#c4)
- # It's only used for validation of output, so stub it out.
- # Also, stub out elinks+w3m which are only used for an index.
- cat >> "${machine_file}" <<-EOF || die
- [binaries]
- xmlcatalog='true'
- xmllint='true'
- elinks='true'
- w3m='true'
- EOF
-
- local emesonargs=(
- --native-file "${machine_file}"
-
- $(meson_feature audit)
- $(meson_native_use_bool examples)
- $(meson_use debug pam-debug)
- $(meson_feature nis)
- $(meson_feature nls i18n)
- $(meson_feature selinux)
-
- -Disadir='.'
- -Dxml-catalog="${BROOT}"/etc/xml/catalog
- -Dsbindir="${EPREFIX}"/sbin
- -Dsecuredir="${EPREFIX}"/$(get_libdir)/security
- -Ddocdir="${EPREFIX}"/usr/share/doc/${PF}
- -Dhtmldir="${EPREFIX}"/usr/share/doc/${PF}/html
- -Dpdfdir="${EPREFIX}"/usr/share/doc/${PF}/pdf
- -Dvendordir="${EPREFIX}"/usr/share/pam
-
- $(meson_native_enabled docs)
-
- -Dpam_unix=enabled
-
- # TODO: wire this up now it's more useful as of 1.5.3 (bug #931117)
- -Deconf=disabled
-
- # TODO: lastlog is enabled again for now by us as elogind support
- # wasn't available at first. Even then, disabling lastlog will
- # probably need a news item.
- $(meson_native_use_feature systemd logind)
- $(meson_native_use_feature elogind)
- $(meson_feature !elibc_musl pam_lastlog)
- )
-
- if use berkdb; then
- local dbver
- dbver="$(db_findver sys-libs/db)" || die "could not find db version"
- local -x CPPFLAGS="${CPPFLAGS} -I$(db_includedir "${dbver}")"
- emesonargs+=(
- -Ddb=db
- -Ddb-uniquename="-${dbver}"
- )
- else
- emesonargs+=(
- -Ddb=gdbm
- )
- fi
-
- # 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
-
- meson_src_configure
-}
-
-multilib_src_install_all() {
- find "${ED}" -type f -name '*.la' -delete || die
-
- fowners :shadow /sbin/unix_chkpwd
- fperms g+s /sbin/unix_chkpwd
-
- # tmpfiles.eclass is impossible to use because
- # there is the pam -> tmpfiles -> systemd -> pam dependency loop
- dodir /usr/lib/tmpfiles.d
-
- cat ->> "${ED}"/usr/lib/tmpfiles.d/${CATEGORY}-${PN}.conf <<-_EOF_
- d /run/faillock 0755 root root
- _EOF_
- use selinux && cat ->> "${ED}"/usr/lib/tmpfiles.d/${CATEGORY}-${PN}-selinux.conf <<-_EOF_
- d /run/sepermit 0755 root root
- _EOF_
-}
-
-pkg_postinst() {
- if [[ -n ${ROOT} ]]; then
- # Portage does not currently update the gid on installed files
- # based on ${EROOT}/etc/group.
- local gid=$(egetent group shadow | cut -d: -f3)
- if [[ -n ${gid} ]]; then
- chgrp "${gid}" "${EROOT}/sbin/unix_chkpwd" &&
- chmod g+s "${EROOT}/sbin/unix_chkpwd"
- fi
- fi
- 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."
-}
diff --git a/sys-libs/pam_wrapper/Manifest b/sys-libs/pam_wrapper/Manifest
deleted file mode 100644
index cfcad057c314..000000000000
--- a/sys-libs/pam_wrapper/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST pam_wrapper-1.1.8.tar.gz 93569 BLAKE2B 52fd3f25bc2426e3b66a0b1a85598c1fd6e1bff67858eed524fb4531f300bc4828e2471c595457a907cf595506dc49545c9256d96219d2869433fb3e44f4ff3b SHA512 f79362f451b1fc6562cf06b35522502c4055474f33a24262c83df8bc598ab8672cfe410ebc8f6713050db84aa5ce5aeca28a81092928e6fbb51f51e29583feb5
diff --git a/sys-libs/pam_wrapper/files/pam_wrapper-1.1.5-tests-import.patch b/sys-libs/pam_wrapper/files/pam_wrapper-1.1.5-tests-import.patch
deleted file mode 100644
index 884583c098b4..000000000000
--- a/sys-libs/pam_wrapper/files/pam_wrapper-1.1.5-tests-import.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/tests/pypamtest_test.py
-+++ b/tests/pypamtest_test.py
-@@ -15,19 +15,6 @@ class PyPamTestCase(unittest.TestCase):
- self.assertSequenceEqual(test_result.errors, info_list)
-
- class PyPamTestImport(unittest.TestCase):
-- def setUp(self):
-- " Make sure we load the in-tree module "
-- if sys.hexversion >= 0x3000000:
-- self.modpath = os.path.join(os.getcwd(), "../src/python/python3")
-- else:
-- self.assertTrue(False)
-- self.system_path = sys.path[:]
-- sys.path = [ self.modpath ]
--
-- def tearDown(self):
-- " Restore the system path "
-- sys.path = self.system_path
--
- def testImport(self):
- " Import the module "
- try:
diff --git a/sys-libs/pam_wrapper/metadata.xml b/sys-libs/pam_wrapper/metadata.xml
deleted file mode 100644
index 74c488b2dd6e..000000000000
--- a/sys-libs/pam_wrapper/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>samba@gentoo.org</email>
- <name>Samba Team</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/pam_wrapper/pam_wrapper-1.1.8.ebuild b/sys-libs/pam_wrapper/pam_wrapper-1.1.8.ebuild
deleted file mode 100644
index 3750780ce969..000000000000
--- a/sys-libs/pam_wrapper/pam_wrapper-1.1.8.ebuild
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-inherit cmake-multilib python-r1
-
-DESCRIPTION="A tool to test PAM applications and PAM modules"
-HOMEPAGE="https://cwrap.org/pam_wrapper.html"
-SRC_URI="
- https://www.samba.org/ftp/pub/cwrap/${P}.tar.gz
- https://ftp.samba.org/pub/cwrap/${P}.tar.gz
-"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-# Require newer PAM so we know where it's located, bug #825078
-RDEPEND="
- ${PYTHON_DEPS}
- >=sys-libs/pam-1.5.3-r1:=[${MULTILIB_USEDEP}]
-"
-DEPEND="
- ${RDEPEND}
- test? ( dev-util/cmocka[${MULTILIB_USEDEP}] )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.1.5-tests-import.patch
-)
-
-multilib_src_configure() {
- configure_for_python() {
- # TODO: -DRUN_PYTHON_TESTS?
- local mycmakeargs=( -DUNIT_TESTING=OFF )
- cmake_src_configure
- }
-
- if multilib_is_native_abi ; then
- # Build the Pythons for each version (but only for the native ABI)
- # bug #737468
- python_foreach_impl configure_for_python
- fi
-
- # Do the regular build now
- local mycmakeargs=(
- -DUNIT_TESTING=$(usex test)
- -DCMAKE_DISABLE_FIND_PACKAGE_Python=ON
- )
- cmake_src_configure
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi ; then
- python_foreach_impl cmake_src_compile
- fi
-
- # Compile the "proper" version without Python last
- cmake_src_compile
-}
-
-multilib_src_test() {
- cmake_src_test
-
- # Fails b/c of sandbox?
- #python_test() {
- # local -x PYTHONPATH="${BUILD_DIR}/src/python/python3:${PYTHONPATH}"
- # elog "${PYTHONPATH}"
- # ${EPYTHON} "${S}"/tests/pypamtest_test.py || die "Tests failed with ${EPYTHON}"
- #}
-
- #if multilib_is_native_abi ; then
- # python_foreach_impl python_test
- #fi
-}
-
-multilib_src_install() {
- if multilib_is_native_abi ; then
- python_foreach_impl cmake_src_install
- fi
-
- # Install the "proper" version without Python last
- cmake_src_install
-}
diff --git a/sys-libs/pkgcraft/Manifest b/sys-libs/pkgcraft/Manifest
deleted file mode 100644
index 37d7ca367269..000000000000
--- a/sys-libs/pkgcraft/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST pkgcraft-c-0.0.16.tar.xz 20787816 BLAKE2B 085ee23fce8e03fa82fcec210e31f032cbe51354a14de2f2261329f432c0f6460363898d735dc7ed1c4115a184d6b7a3ff9a7c4d1697b12e34729cda54f6c234 SHA512 a805919375c8791b73a803a61c10df9ba0db87381f7fdec976428cf07b287bd10f02a6c97d1b7bb4d483b37a4ec6e027ae397067b658e4a4b422102e42d814e3
diff --git a/sys-libs/pkgcraft/metadata.xml b/sys-libs/pkgcraft/metadata.xml
deleted file mode 100644
index 33c1ad3bdca7..000000000000
--- a/sys-libs/pkgcraft/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>sam@gentoo.org</email>
- <name>Sam James</name>
- </maintainer>
- <upstream>
- <remote-id type="github">pkgcraft/pkgcraft</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/pkgcraft/pkgcraft-0.0.16-r1.ebuild b/sys-libs/pkgcraft/pkgcraft-0.0.16-r1.ebuild
deleted file mode 100644
index 038e5f986a44..000000000000
--- a/sys-libs/pkgcraft/pkgcraft-0.0.16-r1.ebuild
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright 2023-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-CRATES=" "
-
-RUST_MIN_VER="1.77.1"
-
-inherit edo cargo flag-o-matic multiprocessing toolchain-funcs
-
-DESCRIPTION="C library for pkgcraft"
-HOMEPAGE="https://pkgcraft.github.io/"
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://github.com/pkgcraft/pkgcraft"
- inherit git-r3
-
- S="${WORKDIR}"/${P}/crates/pkgcraft-c
-
- BDEPEND="test? ( dev-util/cargo-nextest )"
-else
- MY_P=${PN}-c-${PV}
- SRC_URI="https://github.com/pkgcraft/pkgcraft/releases/download/${MY_P}/${MY_P}.tar.xz"
- S="${WORKDIR}"/${MY_P}
-
- KEYWORDS="amd64 ~arm64"
-fi
-
-LICENSE="MIT"
-# Dependent crate licenses
-LICENSE+=" Apache-2.0 BSD ISC MIT MPL-2.0 Unicode-DFS-2016"
-SLOT="0/${PV}"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-# clang needed for bindgen
-BDEPEND+="
- dev-util/cargo-c
- llvm-core/clang
-"
-
-QA_FLAGS_IGNORED="usr/lib.*/libpkgcraft.so.*"
-
-src_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
- cargo_live_src_unpack
- else
- cargo_src_unpack
- fi
-}
-
-src_compile() {
- local cargoargs=(
- --library-type=cdylib
- --prefix=/usr
- --libdir="/usr/$(get_libdir)"
- $(usev !debug '--release')
- )
-
- # For scallop building bash
- tc-export AR CC
-
- # scallop uses modified bash-5.2 which relies on unprotoyped functions
- append-cflags -std=gnu17
-
- # Can pass -vv if need more output from e.g. scallop configure
- edo cargo cbuild "${cargoargs[@]}"
-}
-
-src_test() {
- if [[ ${PV} == 9999 ]] ; then
- # It's interesting to test the whole thing rather than just
- # pkgcraft-c.
- cd "${WORKDIR}"/${P} || die
-
- local -x NEXTEST_TEST_THREADS="$(makeopts_jobs)"
-
- # Need nextest per README (separate processes required)
- # Invocation from https://github.com/pkgcraft/pkgcraft/blob/main/.github/workflows/ci.yml#L56
- edo cargo nextest run $(usev !debug '--release') --color always --all-features --tests
- else
- # There are no tests for pkgcraft-c. Test via e.g. dev-python/pkgcraft.
- :;
- fi
-}
-
-src_install() {
- local cargoargs=(
- --library-type=cdylib
- --prefix=/usr
- --libdir="/usr/$(get_libdir)"
- --destdir="${ED}"
- $(usev !debug '--release')
- )
-
- edo cargo cinstall "${cargoargs[@]}"
-}
diff --git a/sys-libs/pkgcraft/pkgcraft-9999.ebuild b/sys-libs/pkgcraft/pkgcraft-9999.ebuild
deleted file mode 100644
index 1f0b66192358..000000000000
--- a/sys-libs/pkgcraft/pkgcraft-9999.ebuild
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 2023-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-RUST_MIN_VER="1.90.0"
-
-inherit cargo edo
-
-DESCRIPTION="C library for pkgcraft"
-HOMEPAGE="https://pkgcraft.github.io/"
-
-MY_PN=${PN}-c
-MY_P=${MY_PN}-${PV}
-
-if [[ ${PV} == 9999 ]] ; then
- SCALLOP_VERSION="9999"
- EGIT_REPO_URI="https://github.com/pkgcraft/pkgcraft"
- inherit git-r3
- S="${WORKDIR}"/${P}/crates/${MY_PN}
-else
- # For releases, SCALLOP_VERSION must match the value of PACKAGE_VERSION in
- # the vendored library's configure script.
- #
- # To get the value from the repo use the following command:
- # sed -rn "/^PACKAGE_VERSION=/ s/^.*='(.*)'/\1/p" **/scallop/bash/configure
- SCALLOP_VERSION="5.3.9.20251212"
- SRC_URI="https://github.com/pkgcraft/pkgcraft/releases/download/${MY_P}/${MY_P}.tar.xz"
- S="${WORKDIR}"/${MY_P}
- KEYWORDS="~amd64"
-fi
-
-LICENSE="MIT"
-# dependent crate licenses
-LICENSE+=" Apache-2.0 BSD ISC MIT MPL-2.0 Unicode-DFS-2016"
-SLOT="0/${PV}"
-
-# Strict dependency versioning is required since the system library must match
-# the vendored copy as scallop exports many parts of bash that aren't meant to
-# be a public interface and compatibility is not guaranteed between releases.
-RDEPEND="~sys-libs/scallop-${SCALLOP_VERSION}"
-DEPEND="${RDEPEND}"
-# clang needed by bindgen to generate bash bindings
-BDEPEND="
- dev-util/cargo-c
- llvm-core/clang
- virtual/pkgconfig
-"
-
-QA_FLAGS_IGNORED="usr/lib.*/libpkgcraft.so.*"
-
-src_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
- cargo_live_src_unpack
- else
- cargo_src_unpack
- fi
-}
-
-src_compile() {
- # use system scallop library
- export SCALLOP_NO_VENDOR=1
-
- local cargoargs=(
- --library-type=cdylib
- --prefix=/usr
- --libdir="/usr/$(get_libdir)"
- $(usev !debug '--release')
- )
-
- edo cargo cbuild "${cargoargs[@]}"
-}
-
-src_install() {
- local cargoargs=(
- --library-type=cdylib
- --prefix=/usr
- --libdir="/usr/$(get_libdir)"
- --destdir="${ED}"
- $(usev !debug '--release')
- )
-
- edo cargo cinstall "${cargoargs[@]}"
-}
diff --git a/sys-libs/pwdb/Manifest b/sys-libs/pwdb/Manifest
deleted file mode 100644
index aa903d108c3e..000000000000
--- a/sys-libs/pwdb/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST pwdb-0.62.tar.gz 133183 BLAKE2B f9b75e9875c8de1050d8eafa8b0c0c58b8c415c9b67683d1928100ce4f192f1b1cea3033264b6c31edd0709094c034ae3790ceaf0143d6b52ce2647a3ad62992 SHA512 baba1f42125a4773f2e645129be79e0e5fbd0b0da7c6624f4b1d13e59cb65f5807bd22997aa1ba360c7627f2aff93c9949b2bb5fbd27d74b516853bcbca96ef4
diff --git a/sys-libs/pwdb/files/pwdb-0.62-build.patch b/sys-libs/pwdb/files/pwdb-0.62-build.patch
deleted file mode 100644
index 92c77c28d101..000000000000
--- a/sys-libs/pwdb/files/pwdb-0.62-build.patch
+++ /dev/null
@@ -1,114 +0,0 @@
- - drop ldconfig junk
- - fix types used in socket functions (socklen_t, not int)
-
-http://bugs.gentoo.org/126977
- - respect user LDFLAGS
-
-http://bugs.gentoo.org/126695
- - add missing headers
- - add missing comma to supp_entry
-
-http://bugs.gentoo.org/137134
- - don't show traditional warnings
-
---- a/Makefile
-+++ b/Makefile
-@@ -71,7 +71,7 @@
-
- WARNINGS += -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
- -Wcast-qual -Wcast-align \
-- -Wtraditional -Wstrict-prototypes -Wmissing-prototypes \
-+ -Wstrict-prototypes -Wmissing-prototypes \
- -Wnested-externs -Winline -Wshadow
- INCLUDEDIR=-I$(CRTDIR)/include
-
---- a/libpwdb/Makefile
-+++ b/libpwdb/Makefile
-@@ -50,7 +50,7 @@
-
-
- $(LIBDYNAME): $(LIBOBJ)
-- $(LD) -soname $(LIBSONAME) -x -shared -o $(LIBFILENAME) $(LIBOBJ) -lcrypt -lnsl -lc
-+ $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,$(LIBSONAME) -Wl,-x -o $(LIBFILENAME) $(LIBOBJ) -lcrypt -lnsl $(LDLIBS)
- @ln -sf $(LIBFILENAME) $@
-
- $(LIBSTATIC): $(LIBOBJ)
-@@ -68,7 +68,7 @@
- $(INSTALL) -m 644 radius.h $(INCLUDED)/radius.h
- $(INSTALL) -m 644 _pwdb_macros.h $(INCLUDED)/_pwdb_macros.h
- $(INSTALL) -m 755 $(LIBFILENAME) $(LIBDIR)
-- $(LDCONFIG)
-+ ln -sf $(LIBFILENAME) $(LIBDIR)/$(LIBSONAME)
- ln -sf $(LIBFILENAME) $(LIBDIR)/$(LIBDYNAME)
- $(INSTALL) -m 644 $(LIBSTATIC) $(LIBDIR)
-
---- a/libpwdb/posix/pwd.c
-+++ b/libpwdb/posix/pwd.c
-@@ -7,6 +7,7 @@
- */
-
- #include <stdio.h>
-+#include <string.h>
-
- #define PWDB_HARD_CORE 1
- #include <pwdb/pwdb_public.h>
---- a/libpwdb/posix/undefined.c
-+++ b/libpwdb/posix/undefined.c
-@@ -5,6 +5,7 @@
- */
-
- #include <stdio.h>
-+#include <stdlib.h>
-
- #define PWDB_HARD_CORE 1
- #include <pwdb/pwdb_public.h>
---- a/libpwdb/pwdb/pwdb_helper.c
-+++ b/libpwdb/pwdb/pwdb_helper.c
-@@ -18,6 +18,7 @@
- *
- */
-
-+#include <string.h>
- #include "pwdb_public.h"
- #include "pwdb_module.h"
-
---- a/libpwdb/pwdb/interface/shadow/group.c
-+++ b/libpwdb/pwdb/interface/shadow/group.c
-@@ -533,7 +533,7 @@
-
- static const char *supp_entry[] = {
- "group", "passwd",
-- "users", "admins" /* these are from /etc/group */
-+ "users", "admins", /* these are from /etc/group */
- "groups", /* these are serviced by requests */
- NULL
- };
---- a/libpwdb/radius/radius.c
-+++ b/libpwdb/radius/radius.c
-@@ -145,7 +145,7 @@
- const char* password,
- RADIUS_RESULT *rad_result)
- {
-- int salen;
-+ socklen_t salen;
- int sockfd;
- struct sockaddr saremote;
- struct sockaddr_in *s_in;
-@@ -333,7 +333,7 @@
- const char* new_password,
- RADIUS_RESULT *rad_result)
- {
-- int salen;
-+ socklen_t salen;
- int sockfd;
- struct sockaddr saremote;
- struct sockaddr_in *s_in;
-@@ -535,7 +535,7 @@
- int sense,
- int session_time)
- {
-- int salen;
-+ socklen_t salen;
- int sockfd;
- struct sockaddr saremote;
- struct sockaddr_in *s_in;
diff --git a/sys-libs/pwdb/files/pwdb-0.62-disable-static.patch b/sys-libs/pwdb/files/pwdb-0.62-disable-static.patch
deleted file mode 100644
index a3395e169079..000000000000
--- a/sys-libs/pwdb/files/pwdb-0.62-disable-static.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/libpwdb/Makefile
-+++ b/libpwdb/Makefile
-@@ -46,7 +46,7 @@
- %.o : %.c $(HEADERS)
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
--all: $(LIBSTATIC) $(LIBDYNAME)
-+all: $(LIBDYNAME)
-
-
- $(LIBDYNAME): $(LIBOBJ)
-@@ -70,7 +70,6 @@
- $(INSTALL) -m 755 $(LIBFILENAME) $(LIBDIR)
- ln -sf $(LIBFILENAME) $(LIBDIR)/$(LIBSONAME)
- ln -sf $(LIBFILENAME) $(LIBDIR)/$(LIBDYNAME)
-- $(INSTALL) -m 644 $(LIBSTATIC) $(LIBDIR)
-
- clean:
- @rm -f *.so *.a core a.out `find . -name "*.o" -print` `find . -name "*~" -print`
diff --git a/sys-libs/pwdb/files/pwdb-0.62-selinux.patch b/sys-libs/pwdb/files/pwdb-0.62-selinux.patch
deleted file mode 100644
index 02ba3c50c38c..000000000000
--- a/sys-libs/pwdb/files/pwdb-0.62-selinux.patch
+++ /dev/null
@@ -1,443 +0,0 @@
---- a/examples/Makefile
-+++ b/examples/Makefile
-@@ -4,6 +4,8 @@ PROGS = posix gentest tpwdb radtest grou
- SRCS = $(addsuffix .c,$(PROGS))
- OBJS = $(addsuffix .o,$(PROGS))
-
-+SELINUXLIBS = -lselinux
-+
- # rules
- junk:
- @echo "this is not a top-level Makefile"
-@@ -14,20 +16,20 @@ junk:
-
- all: ${PROGS} ../libpwdb/libpwdb.a
-
--posix: posix.o ../libpwdb/libpwdb.a
-- $(CC) -o $@ $< ../libpwdb/libpwdb.a -lnsl
-+posix: posix.o ../libpwdb/libpwdb.a
-+ $(CC) -o $@ $< ../libpwdb/libpwdb.a -lnsl ${SELINUXLIBS}
-
- tpwdb: tpwdb.o ../libpwdb/libpwdb.a
-- ${CC} -g -o $@ $< ../libpwdb/libpwdb.a -lnsl
-+ ${CC} -g -o $@ $< ../libpwdb/libpwdb.a -lnsl ${SELINUXLIBS}
-
- radtest: radtest.o ../libpwdb/libpwdb.a
-- ${CC} -g -o $@ $< ../libpwdb/libpwdb.a -lnsl
-+ ${CC} -g -o $@ $< ../libpwdb/libpwdb.a -lnsl ${SELINUXLIBS}
-
- gentest: gentest.o ../libpwdb/libpwdb.a
-- ${CC} -g -o $@ $< ../libpwdb/libpwdb.a -lnsl
-+ ${CC} -g -o $@ $< ../libpwdb/libpwdb.a -lnsl ${SELINUXLIBS}
-
- grouptest: grouptest.o ../libpwdb/libpwdb.a
-- ${CC} -g -o $@ $< ../libpwdb/libpwdb.a -lnsl
-+ ${CC} -g -o $@ $< ../libpwdb/libpwdb.a -lnsl ${SELINUXLIBS}
-
- clean:
- rm -f ${PROGS} *.o *~
---- a/libpwdb/shadow/shadowio.c
-+++ b/libpwdb/shadow/shadowio.c
-@@ -16,6 +16,12 @@
-
- #include "../_pwdb_internal.h"
-
-+#ifdef WITH_SELINUX
-+#include <selinux/selinux.h>
-+static int selinux_enabled=0;
-+static security_context_t prev_context=NULL;
-+#endif
-+
- struct spw_file_entry {
- char *spwf_line;
- int spwf_changed;
-@@ -259,8 +265,28 @@ int __pwdb_spw_close (void)
- if (fstat (fileno (spwfp), &sb))
- return 0;
-
-- if (create_backup_file(spwfp, backup, &sb))
-- return 0;
-+#ifdef WITH_SELINUX
-+ if (selinux_enabled=is_selinux_enabled()) {
-+ security_context_t passwd_context=NULL;
-+ if (fgetfilecon(fileno (spwfp),&passwd_context)<0) {
-+ return 0;
-+ };
-+ if (getfscreatecon(&prev_context)<0) {
-+ freecon(passwd_context);
-+ return 0;
-+ }
-+ if (setfscreatecon(passwd_context)) {
-+ freecon(passwd_context);
-+ freecon(prev_context);
-+ return 0;
-+ }
-+ freecon(passwd_context);
-+ }
-+#endif
-+ if (create_backup_file(spwfp, backup, &sb)){
-+ errors++;
-+ goto errorexit;
-+ }
-
- isopen = 0;
- (void) fclose (spwfp);
-@@ -278,11 +304,15 @@ int __pwdb_spw_close (void)
- */
-
- spwfp = fopen_with_umask(newfile, "w", 0777);
-- if (!spwfp)
-- return 0;
-+ if (!spwfp){
-+ errors++;
-+ goto errorexit;
-+ }
- if (chown(newfile, sb.st_uid, sb.st_gid) ||
-- chmod(newfile, sb.st_mode))
-- return 0;
-+ chmod(newfile, sb.st_mode)){
-+ errors++;
-+ goto errorexit;
-+ }
-
- /*
- * Check each member in the list and write out any elements
-@@ -308,7 +338,7 @@ int __pwdb_spw_close (void)
-
- if (errors) {
- unlink (newfile);
-- return 0;
-+ goto errorexit;
- }
-
- /*
-@@ -352,7 +382,20 @@ int __pwdb_spw_close (void)
- }
- spwf_tail = 0;
- isopen = 0;
-- return 1;
-+
-+ errorexit:
-+#ifdef WITH_SELINUX
-+ if (selinux_enabled) {
-+ if (setfscreatecon(prev_context)) {
-+ errors++;
-+ }
-+ if (prev_context != NULL) {
-+ freecon(prev_context);
-+ prev_context=NULL;
-+ }
-+ }
-+#endif
-+ return errors==0;
- }
-
- int __pwdb_spw_update (const struct __pwdb_spwd *spwd)
---- a/libpwdb/shadow/sgroupio.c
-+++ b/libpwdb/shadow/sgroupio.c
-@@ -16,6 +16,12 @@
-
- #include "../_pwdb_internal.h"
-
-+#ifdef WITH_SELINUX
-+#include <selinux/selinux.h>
-+static int selinux_enabled=0;
-+static security_context_t prev_context=NULL;
-+#endif
-+
- static int islocked;
- static int isopen;
- static int open_modes;
-@@ -278,8 +284,28 @@ int __pwdb_sgr_close (void)
- if (fstat (fileno (sgrfp), &sb))
- return 0;
-
-- if (create_backup_file(sgrfp, backup, &sb))
-- return 0;
-+#ifdef WITH_SELINUX
-+ if (selinux_enabled=is_selinux_enabled()) {
-+ security_context_t passwd_context=NULL;
-+ if (fgetfilecon(fileno (sgrfp),&passwd_context)<0) {
-+ return 0;
-+ };
-+ if (getfscreatecon(&prev_context)<0) {
-+ freecon(passwd_context);
-+ return 0;
-+ }
-+ if (setfscreatecon(passwd_context)) {
-+ freecon(passwd_context);
-+ freecon(prev_context);
-+ return 0;
-+ }
-+ freecon(passwd_context);
-+ }
-+#endif
-+ if (create_backup_file(sgrfp, backup, &sb)){
-+ errors++;
-+ goto errorexit;
-+ }
-
- isopen = 0;
- (void) fclose (sgrfp);
-@@ -296,11 +322,15 @@ int __pwdb_sgr_close (void)
- */
-
- sgrfp = fopen_with_umask(newfile, "w", 0777);
-- if (!sgrfp)
-- return 0;
-+ if (!sgrfp){
-+ errors++;
-+ goto errorexit;
-+ }
- if (chown(newfile, sb.st_uid, sb.st_gid) ||
-- chmod(newfile, sb.st_mode))
-- return 0;
-+ chmod(newfile, sb.st_mode)){
-+ errors++;
-+ goto errorexit;
-+ }
-
- /*
- * Check each member in the list and write out any elements
-@@ -326,7 +356,7 @@ int __pwdb_sgr_close (void)
-
- if (errors) {
- unlink (newfile);
-- return 0;
-+ goto errorexit;
- }
-
- /*
-@@ -370,7 +400,20 @@ int __pwdb_sgr_close (void)
- }
- sgr_tail = 0;
- isopen = 0;
-- return 1;
-+
-+ errorexit:
-+#ifdef WITH_SELINUX
-+ if (selinux_enabled) {
-+ if (setfscreatecon(prev_context)) {
-+ errors++;
-+ }
-+ if (prev_context != NULL) {
-+ freecon(prev_context);
-+ prev_context=NULL;
-+ }
-+ }
-+#endif
-+ return errors==0;
- }
-
- int __pwdb_sgr_update (const struct __pwdb_sgrp *sgrent)
---- a/libpwdb/unix/pwio.c
-+++ b/libpwdb/unix/pwio.c
-@@ -16,6 +16,11 @@
-
- #include "../_pwdb_internal.h"
-
-+#ifdef WITH_SELINUX
-+#include <selinux/selinux.h>
-+static int selinux_enabled=0;
-+static security_context_t prev_context=NULL;
-+#endif
- struct pw_file_entry {
- char *pwf_line;
- int pwf_changed;
-@@ -204,8 +209,28 @@ int __pwdb_pw_close (void)
- if (fstat (fileno (pwfp), &sb))
- return 0;
-
-- if (create_backup_file(pwfp, backup, &sb))
-- return 0;
-+#ifdef WITH_SELINUX
-+ if (selinux_enabled=is_selinux_enabled()) {
-+ security_context_t passwd_context=NULL;
-+ if (fgetfilecon(fileno (pwfp),&passwd_context)<0) {
-+ return 0;
-+ };
-+ if (getfscreatecon(&prev_context)<0) {
-+ freecon(passwd_context);
-+ return 0;
-+ }
-+ if (setfscreatecon(passwd_context)) {
-+ freecon(passwd_context);
-+ freecon(prev_context);
-+ return 0;
-+ }
-+ freecon(passwd_context);
-+ }
-+#endif
-+ if (create_backup_file(pwfp, backup, &sb)) {
-+ errors++;
-+ goto errorexit;
-+ }
-
- isopen = 0;
- (void) fclose (pwfp);
-@@ -222,11 +247,15 @@ int __pwdb_pw_close (void)
- */
-
- pwfp = fopen_with_umask(newfile, "w", 0777);
-- if (!pwfp)
-- return 0;
-+ if (!pwfp) {
-+ errors++;
-+ goto errorexit;
-+ }
- if (chown(newfile, sb.st_uid, sb.st_gid) ||
-- chmod(newfile, sb.st_mode))
-- return 0;
-+ chmod(newfile, sb.st_mode)) {
-+ errors++;
-+ goto errorexit;
-+ }
-
- /*
- * Check each member in the list and write out any elements
-@@ -251,7 +280,7 @@ int __pwdb_pw_close (void)
-
- if (errors) {
- unlink (newfile);
-- return 0;
-+ goto errorexit;
- }
-
- /*
-@@ -294,7 +323,20 @@ int __pwdb_pw_close (void)
- }
- pwf_tail = 0;
- isopen = 0;
-- return 1;
-+
-+ errorexit:
-+#ifdef WITH_SELINUX
-+ if (selinux_enabled) {
-+ if (setfscreatecon(prev_context)) {
-+ errors++;
-+ }
-+ if (prev_context != NULL) {
-+ freecon(prev_context);
-+ prev_context=NULL;
-+ }
-+ }
-+#endif
-+ return errors==0;
- }
-
- /*
---- a/libpwdb/unix/groupio.c
-+++ b/libpwdb/unix/groupio.c
-@@ -11,6 +11,12 @@
- #include "../_pwdb_internal.h"
-
-
-+#ifdef WITH_SELINUX
-+#include <selinux/selinux.h>
-+int selinux_enabled=0;
-+static security_context_t prev_context=NULL;
-+#endif
-+
- static int islocked;
- static int isopen;
- static int open_modes;
-@@ -259,8 +265,28 @@ int __pwdb_gr_close (void)
- if (fstat (fileno (grfp), &sb))
- return 0;
-
-- if (create_backup_file(grfp, backup, &sb))
-- return 0;
-+#ifdef WITH_SELINUX
-+ if (selinux_enabled=is_selinux_enabled()) {
-+ security_context_t group_context=NULL;
-+ if (fgetfilecon(fileno (grfp),&group_context)<0) {
-+ return 0;
-+ };
-+ if (getfscreatecon(&prev_context)<0) {
-+ freecon(group_context);
-+ return 0;
-+ }
-+ if (setfscreatecon(group_context)) {
-+ freecon(group_context);
-+ freecon(prev_context);
-+ return 0;
-+ }
-+ freecon(group_context);
-+ }
-+#endif
-+ if (create_backup_file(grfp, backup, &sb)) {
-+ errors++;
-+ goto errorexit;
-+ }
-
- isopen = 0;
- (void) fclose (grfp);
-@@ -278,11 +304,15 @@ int __pwdb_gr_close (void)
- */
-
- grfp = fopen_with_umask(newfile, "w", 0777);
-- if (!grfp)
-- return 0;
-+ if (!grfp) {
-+ errors++;
-+ goto errorexit;
-+ }
- if (chown(newfile, sb.st_uid, sb.st_gid) ||
-- chmod(newfile, sb.st_mode))
-- return 0;
-+ chmod(newfile, sb.st_mode)) {
-+ errors++;
-+ goto errorexit;
-+ }
-
- /*
- * Check each member in the list and write out any elements
-@@ -308,7 +338,7 @@ int __pwdb_gr_close (void)
-
- if (errors) {
- unlink (newfile);
-- return 0;
-+ goto errorexit;
- }
-
- /*
-@@ -351,7 +381,19 @@ int __pwdb_gr_close (void)
- }
- grf_tail = 0;
- isopen = 0;
-- return 1;
-+ errorexit:
-+#ifdef WITH_SELINUX
-+ if (selinux_enabled) {
-+ if (setfscreatecon(prev_context)) {
-+ errors++;
-+ }
-+ if (prev_context != NULL) {
-+ freecon(prev_context);
-+ prev_context=NULL;
-+ }
-+ }
-+#endif
-+ return errors==0;
- }
-
- /* update an entry */
---- a/libpwdb/Makefile
-+++ b/libpwdb/Makefile
-@@ -22,7 +22,7 @@ HEADERS = pwdb/pwdb_public.h pwdb/pwdb_c
-
- # needed for generic interface compilation
- # if header files are not installed (CG)
--CFLAGS+=-I.
-+CFLAGS+=-I. -DWITH_SELINUX
-
- CFLAGS+=# -DDEBUG
-
-@@ -50,6 +50,7 @@
-
- all: $(LIBSTATIC) $(LIBDYNAME)
-
-+$(LIBDYNAME): LDLIBS += -lselinux
-
- $(LIBDYNAME): $(LIBOBJ)
- $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,$(LIBSONAME) -Wl,-x -o $(LIBFILENAME) $(LIBOBJ) -lcrypt -lnsl $(LDLIBS)
diff --git a/sys-libs/pwdb/metadata.xml b/sys-libs/pwdb/metadata.xml
deleted file mode 100644
index 73dda144f9ac..000000000000
--- a/sys-libs/pwdb/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-</pkgmetadata>
diff --git a/sys-libs/pwdb/pwdb-0.62-r2.ebuild b/sys-libs/pwdb/pwdb-0.62-r2.ebuild
deleted file mode 100644
index 65ad37678bb6..000000000000
--- a/sys-libs/pwdb/pwdb-0.62-r2.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs flag-o-matic usr-ldscript
-
-DESCRIPTION="Password database"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-SRC_URI="mirror://gentoo/${P}.tar.gz"
-
-LICENSE="|| ( BSD GPL-2 )"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm ~hppa ~m68k ~mips ppc ppc64 ~s390 ~sparc x86"
-IUSE="selinux"
-RESTRICT="test" #122603
-
-# Note: NIS could probably be made conditional if anyone cared ...
-RDEPEND="
- net-libs/libnsl:0=
- net-libs/libtirpc
- selinux? ( sys-libs/libselinux )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-DOCS=( CHANGES CREDITS README doc/pwdb.txt )
-HTML_DOCS=( doc/html/. )
-
-PATCHES=(
- "${FILESDIR}"/${P}-build.patch
- "${FILESDIR}"/${P}-disable-static.patch # bug 725972
-)
-
-src_prepare() {
- default
-
- use selinux && eapply "${FILESDIR}"/${P}-selinux.patch
-
- append-cppflags $($(tc-getPKG_CONFIG) --cflags libtirpc)
- export LDLIBS=$($(tc-getPKG_CONFIG) --libs libtirpc)
-
- sed -i \
- -e "s/^DIRS = .*/DIRS = libpwdb/" \
- -e "s;EXTRAS += ;EXTRAS += ${CFLAGS} ;" \
- Makefile || die
- sed -i \
- -e "s:=gcc:=$(tc-getCC):g" \
- -e "s:=ar:=$(tc-getAR):g" \
- -e "s:=ranlib:=$(tc-getRANLIB):g" \
- default.defs || die
-}
-
-src_install() {
- dodir /usr/$(get_libdir) /usr/include/pwdb
- emake \
- INCLUDED="${D}"/usr/include/pwdb \
- LIBDIR="${D}"/usr/$(get_libdir) \
- LDCONFIG="echo" \
- install
-
- gen_usr_ldscript -a pwdb
-
- insinto /etc
- doins conf/pwdb.conf
-
- einstalldocs
-}
diff --git a/sys-libs/queue-standalone/files/queue.h b/sys-libs/queue-standalone/files/queue.h
deleted file mode 100644
index daf4553d33e9..000000000000
--- a/sys-libs/queue-standalone/files/queue.h
+++ /dev/null
@@ -1,574 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)queue.h 8.5 (Berkeley) 8/20/94
- */
-
-#ifndef _SYS_QUEUE_H_
-#define _SYS_QUEUE_H_
-
-/*
- * This file defines five types of data structures: singly-linked lists,
- * lists, simple queues, tail queues, and circular queues.
- *
- * A singly-linked list is headed by a single forward pointer. The
- * elements are singly linked for minimum space and pointer manipulation
- * overhead at the expense of O(n) removal for arbitrary elements. New
- * elements can be added to the list after an existing element or at the
- * head of the list. Elements being removed from the head of the list
- * should use the explicit macro for this purpose for optimum
- * efficiency. A singly-linked list may only be traversed in the forward
- * direction. Singly-linked lists are ideal for applications with large
- * datasets and few or no removals or for implementing a LIFO queue.
- *
- * A list is headed by a single forward pointer (or an array of forward
- * pointers for a hash table header). The elements are doubly linked
- * so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before
- * or after an existing element or at the head of the list. A list
- * may only be traversed in the forward direction.
- *
- * A simple queue is headed by a pair of pointers, one the head of the
- * list and the other to the tail of the list. The elements are singly
- * linked to save space, so elements can only be removed from the
- * head of the list. New elements can be added to the list after
- * an existing element, at the head of the list, or at the end of the
- * list. A simple queue may only be traversed in the forward direction.
- *
- * A tail queue is headed by a pair of pointers, one to the head of the
- * list and the other to the tail of the list. The elements are doubly
- * linked so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before or
- * after an existing element, at the head of the list, or at the end of
- * the list. A tail queue may be traversed in either direction.
- *
- * A circle queue is headed by a pair of pointers, one to the head of the
- * list and the other to the tail of the list. The elements are doubly
- * linked so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before or after
- * an existing element, at the head of the list, or at the end of the list.
- * A circle queue may be traversed in either direction, but has a more
- * complex end of list detection.
- *
- * For details on the use of these macros, see the queue(3) manual page.
- */
-
-/*
- * List definitions.
- */
-#define LIST_HEAD(name, type) \
-struct name { \
- struct type *lh_first; /* first element */ \
-}
-
-#define LIST_HEAD_INITIALIZER(head) \
- { NULL }
-
-#define LIST_ENTRY(type) \
-struct { \
- struct type *le_next; /* next element */ \
- struct type **le_prev; /* address of previous next element */ \
-}
-
-/*
- * List functions.
- */
-#define LIST_INIT(head) do { \
- (head)->lh_first = NULL; \
-} while (/*CONSTCOND*/0)
-
-#define LIST_INSERT_AFTER(listelm, elm, field) do { \
- if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
- (listelm)->field.le_next->field.le_prev = \
- &(elm)->field.le_next; \
- (listelm)->field.le_next = (elm); \
- (elm)->field.le_prev = &(listelm)->field.le_next; \
-} while (/*CONSTCOND*/0)
-
-#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
- (elm)->field.le_prev = (listelm)->field.le_prev; \
- (elm)->field.le_next = (listelm); \
- *(listelm)->field.le_prev = (elm); \
- (listelm)->field.le_prev = &(elm)->field.le_next; \
-} while (/*CONSTCOND*/0)
-
-#define LIST_INSERT_HEAD(head, elm, field) do { \
- if (((elm)->field.le_next = (head)->lh_first) != NULL) \
- (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
- (head)->lh_first = (elm); \
- (elm)->field.le_prev = &(head)->lh_first; \
-} while (/*CONSTCOND*/0)
-
-#define LIST_REMOVE(elm, field) do { \
- if ((elm)->field.le_next != NULL) \
- (elm)->field.le_next->field.le_prev = \
- (elm)->field.le_prev; \
- *(elm)->field.le_prev = (elm)->field.le_next; \
-} while (/*CONSTCOND*/0)
-
-#define LIST_FOREACH(var, head, field) \
- for ((var) = ((head)->lh_first); \
- (var); \
- (var) = ((var)->field.le_next))
-
-/*
- * List access methods.
- */
-#define LIST_EMPTY(head) ((head)->lh_first == NULL)
-#define LIST_FIRST(head) ((head)->lh_first)
-#define LIST_NEXT(elm, field) ((elm)->field.le_next)
-
-
-/*
- * Singly-linked List definitions.
- */
-#define SLIST_HEAD(name, type) \
-struct name { \
- struct type *slh_first; /* first element */ \
-}
-
-#define SLIST_HEAD_INITIALIZER(head) \
- { NULL }
-
-#define SLIST_ENTRY(type) \
-struct { \
- struct type *sle_next; /* next element */ \
-}
-
-/*
- * Singly-linked List functions.
- */
-#define SLIST_INIT(head) do { \
- (head)->slh_first = NULL; \
-} while (/*CONSTCOND*/0)
-
-#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
- (elm)->field.sle_next = (slistelm)->field.sle_next; \
- (slistelm)->field.sle_next = (elm); \
-} while (/*CONSTCOND*/0)
-
-#define SLIST_INSERT_HEAD(head, elm, field) do { \
- (elm)->field.sle_next = (head)->slh_first; \
- (head)->slh_first = (elm); \
-} while (/*CONSTCOND*/0)
-
-#define SLIST_REMOVE_HEAD(head, field) do { \
- (head)->slh_first = (head)->slh_first->field.sle_next; \
-} while (/*CONSTCOND*/0)
-
-#define SLIST_REMOVE(head, elm, type, field) do { \
- if ((head)->slh_first == (elm)) { \
- SLIST_REMOVE_HEAD((head), field); \
- } \
- else { \
- struct type *curelm = (head)->slh_first; \
- while(curelm->field.sle_next != (elm)) \
- curelm = curelm->field.sle_next; \
- curelm->field.sle_next = \
- curelm->field.sle_next->field.sle_next; \
- } \
-} while (/*CONSTCOND*/0)
-
-#define SLIST_FOREACH(var, head, field) \
- for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
-
-/*
- * Singly-linked List access methods.
- */
-#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
-#define SLIST_FIRST(head) ((head)->slh_first)
-#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
-
-
-/*
- * Singly-linked Tail queue declarations.
- */
-#define STAILQ_HEAD(name, type) \
-struct name { \
- struct type *stqh_first; /* first element */ \
- struct type **stqh_last; /* addr of last next element */ \
-}
-
-#define STAILQ_HEAD_INITIALIZER(head) \
- { NULL, &(head).stqh_first }
-
-#define STAILQ_ENTRY(type) \
-struct { \
- struct type *stqe_next; /* next element */ \
-}
-
-/*
- * Singly-linked Tail queue functions.
- */
-#define STAILQ_INIT(head) do { \
- (head)->stqh_first = NULL; \
- (head)->stqh_last = &(head)->stqh_first; \
-} while (/*CONSTCOND*/0)
-
-#define STAILQ_INSERT_HEAD(head, elm, field) do { \
- if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
- (head)->stqh_last = &(elm)->field.stqe_next; \
- (head)->stqh_first = (elm); \
-} while (/*CONSTCOND*/0)
-
-#define STAILQ_INSERT_TAIL(head, elm, field) do { \
- (elm)->field.stqe_next = NULL; \
- *(head)->stqh_last = (elm); \
- (head)->stqh_last = &(elm)->field.stqe_next; \
-} while (/*CONSTCOND*/0)
-
-#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
- if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
- (head)->stqh_last = &(elm)->field.stqe_next; \
- (listelm)->field.stqe_next = (elm); \
-} while (/*CONSTCOND*/0)
-
-#define STAILQ_REMOVE_HEAD(head, field) do { \
- if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
- (head)->stqh_last = &(head)->stqh_first; \
-} while (/*CONSTCOND*/0)
-
-#define STAILQ_REMOVE(head, elm, type, field) do { \
- if ((head)->stqh_first == (elm)) { \
- STAILQ_REMOVE_HEAD((head), field); \
- } else { \
- struct type *curelm = (head)->stqh_first; \
- while (curelm->field.stqe_next != (elm)) \
- curelm = curelm->field.stqe_next; \
- if ((curelm->field.stqe_next = \
- curelm->field.stqe_next->field.stqe_next) == NULL) \
- (head)->stqh_last = &(curelm)->field.stqe_next; \
- } \
-} while (/*CONSTCOND*/0)
-
-#define STAILQ_FOREACH(var, head, field) \
- for ((var) = ((head)->stqh_first); \
- (var); \
- (var) = ((var)->field.stqe_next))
-
-#define STAILQ_CONCAT(head1, head2) do { \
- if (!STAILQ_EMPTY((head2))) { \
- *(head1)->stqh_last = (head2)->stqh_first; \
- (head1)->stqh_last = (head2)->stqh_last; \
- STAILQ_INIT((head2)); \
- } \
-} while (/*CONSTCOND*/0)
-
-/*
- * Singly-linked Tail queue access methods.
- */
-#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL)
-#define STAILQ_FIRST(head) ((head)->stqh_first)
-#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
-
-
-/*
- * Simple queue definitions.
- */
-#define SIMPLEQ_HEAD(name, type) \
-struct name { \
- struct type *sqh_first; /* first element */ \
- struct type **sqh_last; /* addr of last next element */ \
-}
-
-#define SIMPLEQ_HEAD_INITIALIZER(head) \
- { NULL, &(head).sqh_first }
-
-#define SIMPLEQ_ENTRY(type) \
-struct { \
- struct type *sqe_next; /* next element */ \
-}
-
-/*
- * Simple queue functions.
- */
-#define SIMPLEQ_INIT(head) do { \
- (head)->sqh_first = NULL; \
- (head)->sqh_last = &(head)->sqh_first; \
-} while (/*CONSTCOND*/0)
-
-#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
- if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
- (head)->sqh_last = &(elm)->field.sqe_next; \
- (head)->sqh_first = (elm); \
-} while (/*CONSTCOND*/0)
-
-#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
- (elm)->field.sqe_next = NULL; \
- *(head)->sqh_last = (elm); \
- (head)->sqh_last = &(elm)->field.sqe_next; \
-} while (/*CONSTCOND*/0)
-
-#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
- if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
- (head)->sqh_last = &(elm)->field.sqe_next; \
- (listelm)->field.sqe_next = (elm); \
-} while (/*CONSTCOND*/0)
-
-#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
- if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
- (head)->sqh_last = &(head)->sqh_first; \
-} while (/*CONSTCOND*/0)
-
-#define SIMPLEQ_REMOVE(head, elm, type, field) do { \
- if ((head)->sqh_first == (elm)) { \
- SIMPLEQ_REMOVE_HEAD((head), field); \
- } else { \
- struct type *curelm = (head)->sqh_first; \
- while (curelm->field.sqe_next != (elm)) \
- curelm = curelm->field.sqe_next; \
- if ((curelm->field.sqe_next = \
- curelm->field.sqe_next->field.sqe_next) == NULL) \
- (head)->sqh_last = &(curelm)->field.sqe_next; \
- } \
-} while (/*CONSTCOND*/0)
-
-#define SIMPLEQ_FOREACH(var, head, field) \
- for ((var) = ((head)->sqh_first); \
- (var); \
- (var) = ((var)->field.sqe_next))
-
-/*
- * Simple queue access methods.
- */
-#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL)
-#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
-#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
-
-
-/*
- * Tail queue definitions.
- */
-#define _TAILQ_HEAD(name, type, qual) \
-struct name { \
- qual type *tqh_first; /* first element */ \
- qual type *qual *tqh_last; /* addr of last next element */ \
-}
-#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,)
-
-#define TAILQ_HEAD_INITIALIZER(head) \
- { NULL, &(head).tqh_first }
-
-#define _TAILQ_ENTRY(type, qual) \
-struct { \
- qual type *tqe_next; /* next element */ \
- qual type *qual *tqe_prev; /* address of previous next element */\
-}
-#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,)
-
-/*
- * Tail queue functions.
- */
-#define TAILQ_INIT(head) do { \
- (head)->tqh_first = NULL; \
- (head)->tqh_last = &(head)->tqh_first; \
-} while (/*CONSTCOND*/0)
-
-#define TAILQ_INSERT_HEAD(head, elm, field) do { \
- if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
- (head)->tqh_first->field.tqe_prev = \
- &(elm)->field.tqe_next; \
- else \
- (head)->tqh_last = &(elm)->field.tqe_next; \
- (head)->tqh_first = (elm); \
- (elm)->field.tqe_prev = &(head)->tqh_first; \
-} while (/*CONSTCOND*/0)
-
-#define TAILQ_INSERT_TAIL(head, elm, field) do { \
- (elm)->field.tqe_next = NULL; \
- (elm)->field.tqe_prev = (head)->tqh_last; \
- *(head)->tqh_last = (elm); \
- (head)->tqh_last = &(elm)->field.tqe_next; \
-} while (/*CONSTCOND*/0)
-
-#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
- if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
- (elm)->field.tqe_next->field.tqe_prev = \
- &(elm)->field.tqe_next; \
- else \
- (head)->tqh_last = &(elm)->field.tqe_next; \
- (listelm)->field.tqe_next = (elm); \
- (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
-} while (/*CONSTCOND*/0)
-
-#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
- (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
- (elm)->field.tqe_next = (listelm); \
- *(listelm)->field.tqe_prev = (elm); \
- (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
-} while (/*CONSTCOND*/0)
-
-#define TAILQ_REMOVE(head, elm, field) do { \
- if (((elm)->field.tqe_next) != NULL) \
- (elm)->field.tqe_next->field.tqe_prev = \
- (elm)->field.tqe_prev; \
- else \
- (head)->tqh_last = (elm)->field.tqe_prev; \
- *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
-} while (/*CONSTCOND*/0)
-
-#define TAILQ_FOREACH(var, head, field) \
- for ((var) = ((head)->tqh_first); \
- (var); \
- (var) = ((var)->field.tqe_next))
-
-#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
- for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
- (var); \
- (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
-
-#define TAILQ_CONCAT(head1, head2, field) do { \
- if (!TAILQ_EMPTY(head2)) { \
- *(head1)->tqh_last = (head2)->tqh_first; \
- (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
- (head1)->tqh_last = (head2)->tqh_last; \
- TAILQ_INIT((head2)); \
- } \
-} while (/*CONSTCOND*/0)
-
-/*
- * Tail queue access methods.
- */
-#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
-#define TAILQ_FIRST(head) ((head)->tqh_first)
-#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
-
-#define TAILQ_LAST(head, headname) \
- (*(((struct headname *)((head)->tqh_last))->tqh_last))
-#define TAILQ_PREV(elm, headname, field) \
- (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
-
-
-/*
- * Circular queue definitions.
- */
-#define CIRCLEQ_HEAD(name, type) \
-struct name { \
- struct type *cqh_first; /* first element */ \
- struct type *cqh_last; /* last element */ \
-}
-
-#define CIRCLEQ_HEAD_INITIALIZER(head) \
- { (void *)&head, (void *)&head }
-
-#define CIRCLEQ_ENTRY(type) \
-struct { \
- struct type *cqe_next; /* next element */ \
- struct type *cqe_prev; /* previous element */ \
-}
-
-/*
- * Circular queue functions.
- */
-#define CIRCLEQ_INIT(head) do { \
- (head)->cqh_first = (void *)(head); \
- (head)->cqh_last = (void *)(head); \
-} while (/*CONSTCOND*/0)
-
-#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
- (elm)->field.cqe_next = (listelm)->field.cqe_next; \
- (elm)->field.cqe_prev = (listelm); \
- if ((listelm)->field.cqe_next == (void *)(head)) \
- (head)->cqh_last = (elm); \
- else \
- (listelm)->field.cqe_next->field.cqe_prev = (elm); \
- (listelm)->field.cqe_next = (elm); \
-} while (/*CONSTCOND*/0)
-
-#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
- (elm)->field.cqe_next = (listelm); \
- (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
- if ((listelm)->field.cqe_prev == (void *)(head)) \
- (head)->cqh_first = (elm); \
- else \
- (listelm)->field.cqe_prev->field.cqe_next = (elm); \
- (listelm)->field.cqe_prev = (elm); \
-} while (/*CONSTCOND*/0)
-
-#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
- (elm)->field.cqe_next = (head)->cqh_first; \
- (elm)->field.cqe_prev = (void *)(head); \
- if ((head)->cqh_last == (void *)(head)) \
- (head)->cqh_last = (elm); \
- else \
- (head)->cqh_first->field.cqe_prev = (elm); \
- (head)->cqh_first = (elm); \
-} while (/*CONSTCOND*/0)
-
-#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
- (elm)->field.cqe_next = (void *)(head); \
- (elm)->field.cqe_prev = (head)->cqh_last; \
- if ((head)->cqh_first == (void *)(head)) \
- (head)->cqh_first = (elm); \
- else \
- (head)->cqh_last->field.cqe_next = (elm); \
- (head)->cqh_last = (elm); \
-} while (/*CONSTCOND*/0)
-
-#define CIRCLEQ_REMOVE(head, elm, field) do { \
- if ((elm)->field.cqe_next == (void *)(head)) \
- (head)->cqh_last = (elm)->field.cqe_prev; \
- else \
- (elm)->field.cqe_next->field.cqe_prev = \
- (elm)->field.cqe_prev; \
- if ((elm)->field.cqe_prev == (void *)(head)) \
- (head)->cqh_first = (elm)->field.cqe_next; \
- else \
- (elm)->field.cqe_prev->field.cqe_next = \
- (elm)->field.cqe_next; \
-} while (/*CONSTCOND*/0)
-
-#define CIRCLEQ_FOREACH(var, head, field) \
- for ((var) = ((head)->cqh_first); \
- (var) != (const void *)(head); \
- (var) = ((var)->field.cqe_next))
-
-#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
- for ((var) = ((head)->cqh_last); \
- (var) != (const void *)(head); \
- (var) = ((var)->field.cqe_prev))
-
-/*
- * Circular queue access methods.
- */
-#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head))
-#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
-#define CIRCLEQ_LAST(head) ((head)->cqh_last)
-#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
-#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
-
-#define CIRCLEQ_LOOP_NEXT(head, elm, field) \
- (((elm)->field.cqe_next == (void *)(head)) \
- ? ((head)->cqh_first) \
- : (elm->field.cqe_next))
-#define CIRCLEQ_LOOP_PREV(head, elm, field) \
- (((elm)->field.cqe_prev == (void *)(head)) \
- ? ((head)->cqh_last) \
- : (elm->field.cqe_prev))
-
-#endif /* sys/queue.h */
diff --git a/sys-libs/queue-standalone/metadata.xml b/sys-libs/queue-standalone/metadata.xml
deleted file mode 100644
index 489e730c1c90..000000000000
--- a/sys-libs/queue-standalone/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>blueness@gentoo.org</email>
- <name>Anthony G. Basile</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/queue-standalone/queue-standalone-0.1-r1.ebuild b/sys-libs/queue-standalone/queue-standalone-0.1-r1.ebuild
deleted file mode 100644
index 709080527b31..000000000000
--- a/sys-libs/queue-standalone/queue-standalone-0.1-r1.ebuild
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="Install <sys/queue.h> from glibc"
-HOMEPAGE="https://www.gnu.org/software/libc/libc.html"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv x86"
-
-DEPEND="
- !sys-libs/glibc"
-
-S="${WORKDIR}"
-
-src_install() {
- insinto /usr/include/sys
- doins "${FILESDIR}"/queue.h
-}
diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest
deleted file mode 100644
index e5b374c9d95e..000000000000
--- a/sys-libs/readline/Manifest
+++ /dev/null
@@ -1,38 +0,0 @@
-DIST readline-8.1-rlfe-c99.patch.xz 5756 BLAKE2B fb2df42d2c16bef68a3716c55374da7a9d95c8f4c5645da9a60aa72624d5baa50c70da78292adcb20e5fb11f28d6320d627522bc4c8faf0f7c4c782fd75664e8 SHA512 1bad39eff82212ed2cd5ae4ff574a4cdbe20ee56ecac1bae469c90304573d10ed82fdab75bc09725e400dbb5568a34345f3241a409b7ede5645a3c02c0101018
-DIST readline-8.2.tar.gz 3043952 BLAKE2B 7974322b9c092a756a79e537df08e8532f8e0fcb598f77732e28287c33ebec9e9837ed88b43334c310892d56a871b423903f0f564def2fbe700a1004f2ae7b18 SHA512 0a451d459146bfdeecc9cdd94bda6a6416d3e93abd80885a40b334312f16eb890f8618a27ca26868cebbddf1224983e631b1cbc002c1a4d1cd0d65fba9fea49a
-DIST readline-8.2.tar.gz.sig 95 BLAKE2B dc510459c0c47782ca87364a6677b4d8f0b68a984143122c08bd15aef08a71bff59ac92d3c3ada518dad09f189c144748e840175041eb619f679e2d8b95dc2aa SHA512 0effd273689e5f7fe7e049c8f2c5f3c97149f198a90d053231ee4de34901560a465ab0d4fd71fd07c7d7e233caed7f42e5b668bffaf1e23a7eb373c8f9e150fe
-DIST readline-8.3.tar.gz 3419642 BLAKE2B 45d6fe7e34c56d309102a94aa776a7f5284201e844450e14ff818df9fa84a72154bdca70f11828c94954b080cbbe4666fa0b00ffa8460118ec8f3ea551b73dad SHA512 513002753dcf5db9213dbbb61d51217245f6a40d33b1dd45238e8062dfa8eef0c890b87a5548e11db959e842724fb572c4d3d7fb433773762a63c30efe808344
-DIST readline-8.3.tar.gz.sig 95 BLAKE2B 088be0a0dbcafc6e9643daac987bf09e37b919b28c87ffbd7d47ee798f71d5e2eb48a07ae040e7290465c95c32385b10b3a0c1285861d4c663e6e1fd28b091b6 SHA512 8f9d4adeb068016e61f76052fb38552db447fc461c7d48811d8af5f0436abce20277e08c475a1c48c99fa37f2b20ca549a94eb5cee0fe6f0d4c854699cc0988c
-DIST readline-8.4_alpha_pre20251007-a0ceb95d8c5d730ac9461e4abaea402e862ac907.tar.gz 3484547 BLAKE2B 159cd4ab7e335121d1ffcb0ebc803ebe79df1432a1fba3ac3c24c96d3b3648d386f5eed0305ecc0a3a057c30b4cd2a1a0c13cb00beaae88c9ed93fac3da3a981 SHA512 729b85255791ba757a09c59c04cc7f6bfd0daa8adacc7243fbd7216045e1b0a225cb98487f23d540a3037146f11bc6e014f81c63968a9a1edcd6a2558c579eeb
-DIST readline82-001 1198 BLAKE2B 2e8f3d2aa14c4c4c4f9621f80f4ffae9bbd6f46c3561e87aaf684c759ffd82e3c46843cf4c4224533b28a847d83f7b8b254813f8a306d438e9f7cb457516c4e0 SHA512 ea3800a62e992b3e594d78e77b6c4b662fb8c501b81010277e478656bb3b56db7747ba40c6c3d68c3ec5ab8e9e41be104788ec52268135d7e642ff40dea421a8
-DIST readline82-001.sig 94 BLAKE2B 542ac331a7da3702b47f4828b3264bc7bf996f473807d675044beeb9688c4ca3645bcba0898d3ea9447c1cde540eb8a6b1934008b0a11baef33235e43f44c6c7 SHA512 01ad9769fee42dc601b511c87bd39e15c74226e1747c4ae8914e303213706005780135add180dbfe538fe847533dc56cfe8f51a3ad9ec55d1fde2cb2e096bfb5
-DIST readline82-002 1134 BLAKE2B 799f089105be9931ba13d562d4579b4d1dbdd5440b625b8fe0f1cec6438a1623bf473944cb278b937ca5ab2b98eac2f5993d6e047b96368b5fcd5649fb536d96 SHA512 2d4058c5c886498486d8514c238c0a05c0a97409011a7da40745e842977f0a29754e8b678f7e6e7a47c00df7e2e4c522d34d473118a24524af3824eed912e74a
-DIST readline82-002.sig 95 BLAKE2B 400f0aea97b10fff5c9d7fbc5a75914f3c15e602f13eb1f1a3efede3010ee0c723637b6bd91eef0c0337a80d4e91d429041929dc06e29453b0990e2f644b8b0f SHA512 c0f87f9675e7ed9a5280451c7f0e7cb7e84575574987e9a4b4e29fe32f582ba01f77555b9c6db3b9b10a09014e2dbcc7c9e8ba9a201ec596ff74b6cebb6405a1
-DIST readline82-003 1201 BLAKE2B eee048069c7e11c9d2571adde31a61a8558b3b047403225039304621464c3469eaa3bcc6a4476b8530a1e9bbac3dea9a46724b6cce135b9f1aa189065737726e SHA512 796df5a5bc4fc4077158621ac5359a7ccf81261e55880e6e70577ba24b50bd4fce4f2c70521d69a776f6ae8890d14d4f5c95cb9ba7c10f1065978c70626faeab
-DIST readline82-003.sig 95 BLAKE2B 206ce766001eeff03fef46263deefcac1b0145527540e7255a4a815167983cd6cddd5aceb58c92ff443de84d69fcd2037d5172e01183477592e4b78bb7786437 SHA512 367ab70037b689ef6b3b5ee62758df69b80dae9c625dd6e9db0f6fac5fc3b8722ea20ac19549171659a78a2d46fd475d94245ac7c1f0ed1a062612bd9a3c5b21
-DIST readline82-004 1708 BLAKE2B 1c72743e33bc0d1ffab3af4b3658e212889e3be1f65e952883e1c95ed00eda6a828022955a20cca1762b0d300c0b8f578ae22d498a4017c9658d7e3a5eb2ec92 SHA512 dc5e4cb6b7a058f433c9c6a587772a4c63e0aeef9c59f45f3f859a007cdbaa46dfd560c43cfe51b9c5c0a3a4d662c100540afc6026b2f8544984867ea3b52661
-DIST readline82-004.sig 95 BLAKE2B c9dad67b296e7e63d0e1dc58d6bc0c60cca556e8f535e25e4d85fa708e001e3d864b40e97b538a032e4f99667c6f07a62fced96bb669fc704c9919a5148afd3f SHA512 e08210259dfe7c4fdd0cb82cf88e6f28b2e10b46e0c159e359853cd154eb1b2322a67ca226ebb1307ec82279370d50a1e34df49c25348a23bac7c41fc8f52e74
-DIST readline82-005 1501 BLAKE2B e8b2ac303802b3a70e36714b465f6651b433bc6dcb3ba2f39a753183370114fd68f3bbe206657b3ca0288184eb3973a1f005ea50a131efcccf74167c772a156e SHA512 f20bcea5ce592edd0e41e0d725611ce536ceffc9ab176511ba6786ae802160b277c412ccbb2ce175da656bdfe5f0fd3f3ace11752cf1a152abff64c90f67a53a
-DIST readline82-005.sig 95 BLAKE2B 49fee598d3bb9211bec230eaca992c66850060b4f5d178a46dcc50bcab07cb490fad44b943bacec30844cc0e1dc0f4a538bc84b859a4c7041348994cbd00743c SHA512 b0e16ffb41b211bc1497888c12a44100802c7140bbc33cab16233e0a13027f7d1ff6d9c2dbbef7bfd649b6725d09b325e7df8a83f9b5ed947972f11be75e9c14
-DIST readline82-006 3031 BLAKE2B 1a78e7344e2983486bea6fd398b4922ca671016a07f18334697b5c8db2216de966e9b295fc694fc619a002acc714b7da8030b95726761b0afaa6142ff82516c3 SHA512 0a2737b2e566fafd60da8c0c7abcbaef24139165fb62a422d257b4cf38835b1e9b7a639c9e64228bbaac432d6a9ce62363b134284e55f3473df788f6433fbe63
-DIST readline82-006.sig 95 BLAKE2B 48a0cf75019d44929eec32bf710438dc58629e41c5074c03e723b7102d23f45c78d726ded242654026e71a16eaf62dde4012ad9642181bade09d69159bc79900 SHA512 3b6da081737670e21a5acaa0be34d4196e576be823ec8f2d2c88b9dd5a7dc53da596731563e35601f0b180a818850d0ad27b120ec0ee48ade9c8487e958626be
-DIST readline82-007 1422 BLAKE2B 5fbdfea7080a67e197305849f25390634c266a8e2363116ec5dcdc20e6cbce5af787ffdb500edb9d8111388eb6560c6749c4004eb362039813abcbe17cc3bd4e SHA512 e96dafe28f20b1092af08422b9be99965e3a973a0c19f7c57669a6a7fbf74ad4cc3490fa2ad50a1845644a65b0a0e001cfc7ad29528b3b36827a1b9a2c9a96e7
-DIST readline82-007.sig 95 BLAKE2B ea73f53d61291193937f28fcbdd09bd0dc46edefdb213db9aef485629d0df7541de4fcb89b0b6c06279c05bacea702a414021a239208515d4ab9050a4aab6984 SHA512 0f60a44eafe181c46331de9154f5d2c56a17e406e424ea8b644ef343e13315f1a363c07c374d5a1d34a4d0bb6048bf991b2c24c488b961ae038652f85161ff2a
-DIST readline82-008 1697 BLAKE2B 2752ece47a63ccd3b94b59db36509fff1e3ec60edae079231b57e0352e38953ebf1e16c6b8020ad07259da8a1a56fea283228caa54973be0031afd5e86932b31 SHA512 a92a00a6b6fefc576ef26cf7522525ac99c1a05de510ca8bd5a72a6db40fb4dc5c277931efa1f4a91e7cf72c9da5287bb14bfa8f0668d36bec40e3ccd7cbe418
-DIST readline82-008.sig 95 BLAKE2B 135071c06eb32d8d87b0f2fb3e4235260f5fae4b23f926501d413fa685d9b98557d506284baae23dd700790aa099367ab90c353542235b96df4e0f8d855497be SHA512 d7a290433efb1302fd37c423a622f6be1c16234c209e306ef319259b79ce05d8e788fa471355e2a0155f642632fe2821eb6a7736214997a5bfde2ed8a154d052
-DIST readline82-009 2270 BLAKE2B ecfa4f3f445b0c90d4ba1cf4116c9a773a3e5ee737966d9d9be7a7ca98f8baa852cf800e571de59cfb27b6af77e93653824f20ff2c73d4629154d9ec8010e644 SHA512 57c084c6186befac58a3432c483c9f879cd199d6947ad7dd29f0d60e67ae4ddf5ee8d861b0231b41582868dd6556ae2dda95a849caf11cbd3692fcd2f8663452
-DIST readline82-009.sig 95 BLAKE2B 5484f3df25e550a717915ecf70e8410f747ff6d192a873e5449a4fb664bd3557d21a3cf40c5c9e0097dfaf2cee205243cd1cf6af34200f89e79f9d73626c49c1 SHA512 383cc954f8324588c699968d7cdf9a4f3c0e461917c8a16f5599cd0ffb59ff9539207478195a7d77c1842c11bd912cc17d3b3b56e6a9463db1991fb5c24d5409
-DIST readline82-010 2653 BLAKE2B 44ebbf93b6449d848b2dda49716b494596d207bef08cdea0d01808b5291d68714e01ef914e97652bb73e81808a91fff829c8035a097db5b3649be1e0735e3eab SHA512 b611b42e31601ea5fcd7de59e6c1cdd3fece7cc8287e0e495ddfc4d5e8f765b3c6567b728fe0a317d6cb00240b772fa4c26f374c8bf361355a9d262bc5133874
-DIST readline82-010.sig 95 BLAKE2B a5a6ccaace88a79c4e28f3c9d3a9ffad186ab772ada7668653b729190d5a598cbe46c769861a72acd08b5fb36f84537bd2018a98fbd0602565660411810447f7 SHA512 0c781417f0cf63daa8532f54b71c9fda69bb2206ca41f7f75fceb7f44781ec949f932881d82fd55d69038208aed45692e30a1e6013d698c7d13f8c9984e331bc
-DIST readline82-011 1865 BLAKE2B c0c083021ef8d3b482013846719ddbbee8e0d0dcdb694e138d193937ec1ccbf26b10cf55c84646db1b63c1ba9f6e7e47b815ab11a49a2466fa1907389e61ba4f SHA512 13694129f388364bea8009e1d2156c2a27e4b63bf780be2bc18129134e9f0454cad82106b6aeed03fab5ffe1f1fa630b80b77d1bc8b824a3d2280a71bf5d2ea6
-DIST readline82-011.sig 95 BLAKE2B f391e3f83b8f574a6ccb28e1064e5b2451e4342b8b64d09f19e61ec6b380fc2d6a1ae7d384ef43c4291c1cd4cbe370de30f436abaedd0437c997fa2bbbb77ce6 SHA512 5c013a02edca92963bd2bc08b8b897cdf92c4e27d763bc3702f0f405d8409bb30a1d096a84e61c35c3bd1a7678a34f815939a0fd12d30103996ac544d8a325a4
-DIST readline82-012 2824 BLAKE2B 02f5351cdeaf818d809a3d40596ef7c7d83ab397e28486aa3ec1f25b1efe8c6ca1569d0c7e7a85170d38a37a5681cf53eb8a3b435b7c010e70ebd3d346bc25ca SHA512 8921328ed899702a4e0f5c924efee7955d70909cc6ccd2722c87127891e0639376ef5a642ca4b27f92e0ee06d4fad7297fe5f2d2db425e1b6a9b1eaf5c1e4b63
-DIST readline82-012.sig 95 BLAKE2B c9d69070ebff6b1996cfb5d1559dfdaa56d2e34770f142f9771cf8b99a68dfd55933cbcbadf589f490db4c7bdc57e43cd657d43ce72c185a46b802e61175470e SHA512 d9c0cedd012fe5a1e2236f072aefca3b1c9c66c6eedef1842f22d80c860d1e48a4f0a10711f52316e6c57d221ee32e00172002f53a3931574a03891873c0ed1e
-DIST readline82-013 5757 BLAKE2B 5af309dc331cdc2fc9c47f8a53c78731885cf70ba22c135929a30c3ab0c6c0a786d1a58b607a7aca9a6522e70aa0e9dc182ad21854d87299e48bf207ee9b02e2 SHA512 9a768946c91e4af31e872fb856b017662cdd5a12ed432d84ba13013fbac327673b655a034dbcfab52da2ff9e45eb1fdb562c3e26c224a5f4e86bff23df25175e
-DIST readline82-013.sig 95 BLAKE2B 388b707e863c6047fdc92bb29e2c172292b497f53926f6e2534016e5cdb621fd7feb9418c6edd4a693869ea61c16cb64815bf2159d6af0bb3eec5d5dc666e525 SHA512 85bd30dc816d62a2e339c95bf9f243a60a960264e14bc396b34f586afdded2cc43ecc307a7f1a2c03c7eba2d11d2f3a0028107a59c4b2bc8d6dbe77fe9fb81cd
-DIST readline83-001 1846 BLAKE2B b0953458a18b8b06b0086567abd3c9ca3efceb5e4c38271e62137e126c106b938945d956394de0e955ecea5d48f8b261a4f2f3db2ee1d2cbc3b4cfdcf213ca46 SHA512 ced50af353ed527f6ec0eac5f65261f2ed208825ec72fe2acf5f0217f34f84f33dcbf01b895325f6b33664b5a426bac99506193e2ddb6eea8c79ccad37364b89
-DIST readline83-001.sig 95 BLAKE2B 7fbf8bf9974239872fd14d8484e7425ad7f86c934183cb26aa4bbfec18f8888c07fb9ec510441258e3b89aecacbf4dff1b18e45b0972a1a667721f0053d8466b SHA512 aea02ce216da1a47035207a67d8eaa5fd07c41b74d9809bce0fd50114abd201ff78d33c74df101c70fb49fdbf4f8651252b520d2e4071f4a1423a557fd0046a0
-DIST readline83-002 1613 BLAKE2B bb07c3e1663b36988e59721d8e8054022726f6adc2160cbb1fe30bcb5fe96d70fc38980a84c05a0518b9916975ffa1c4c97542fc9c82845736c6f6d03ca60229 SHA512 e45ad6443bd4e271ec8e8ab883de561b6420aec362b0b7f0256086cb5a023d946df55994ed99c76ceb191e8a25e8059ae9b553ef1d546626d671b80af292f04d
-DIST readline83-002.sig 95 BLAKE2B 8d5294bf74b4a6aff7408b827a12607da2b824295e4b9d4827825d053701f796580fe38029a62188aec9529a2801183ea4b10e40913e1039ee501f95a3a38a07 SHA512 4dbed1ad56a3be4f750544694164a1fdfbc8795cb0efb991cd0e84c8f4f97d8a69b239de90060aac5957fccf177c897bdd55667173bfd812261844d01d2c50b3
-DIST readline83-003 2284 BLAKE2B 39f48eefef1840460aa418a070813dd284893e74dddad5fb44230498a7991148e9681be89b30e98fe805a67b3093360c883a16a26a7f103548f36c899f9359da SHA512 6b3ebffe994d0cd4d3466b15e3aee9a73613109283a4442f3bf10e28edcd1204df824c71356d66d01ac21014a806023a101fedf94526a19f6f590d9ffdc864cd
-DIST readline83-003.sig 95 BLAKE2B 1735f682249205cb0e1b0d81ef603d0f87fa3604f65634e66d851da747111abc36d82895480f283c93ef757483f85bba1f081f69c0d200a8d908dfd2d49974a4 SHA512 2e90acc5820fc2a6f5f63520dc66301c64a1636f6134d684d62560c235ba7a0a8fd4c0caad054d09021084fe201a171f3b776cc4814f212f8165aa6f67d007de
diff --git a/sys-libs/readline/files/readline-5.0-no_rpath.patch b/sys-libs/readline/files/readline-5.0-no_rpath.patch
deleted file mode 100644
index befad63e4253..000000000000
--- a/sys-libs/readline/files/readline-5.0-no_rpath.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-ripped from Fedora
-
---- a/support/shobj-conf
-+++ b/support/shobj-conf
-@@ -102,7 +102,7 @@
- SHOBJ_LD='${CC}'
- SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
-
-- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
-+ SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
- SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
- ;;
-
diff --git a/sys-libs/readline/files/readline-7.0-headers.patch b/sys-libs/readline/files/readline-7.0-headers.patch
deleted file mode 100644
index 892ec21f51e5..000000000000
--- a/sys-libs/readline/files/readline-7.0-headers.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 4bc0aa68aff12a59628dd3c99a53360a9aa1ce93 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Thu, 11 Aug 2016 17:49:27 +0800
-Subject: [PATCH] include ctype.h for isdigit usage
-
----
- lib/readline/histexpand.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/lib/readline/histexpand.c b/lib/readline/histexpand.c
-index 46a99aa62e30..13248db83048 100644
---- a/histexpand.c
-+++ b/histexpand.c
-@@ -26,6 +26,7 @@
- #endif
-
- #include <stdio.h>
-+#include <ctype.h>
-
- #if defined (HAVE_STDLIB_H)
- # include <stdlib.h>
---
-2.9.0
-
diff --git a/sys-libs/readline/files/readline-8.0-headers.patch b/sys-libs/readline/files/readline-8.0-headers.patch
deleted file mode 100644
index f19a3b136ebc..000000000000
--- a/sys-libs/readline/files/readline-8.0-headers.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Required by bash-5.0 or else compilation fails:
-
- bashline.c:69:10: fatal error: readline/rlmbutil.h: No such file or directory
- #include <readline/rlmbutil.h>
- ^~~~~~~~~~~~~~~~~~~~~
-
---- readline-8.0/Makefile.in
-+++ readline-8.0/Makefile.in
-@@ -153,7 +153,7 @@
- CREATED_TAGS = TAGS tags
-
- INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
-- rlstdc.h rlconf.h rltypedefs.h
-+ rlstdc.h rlconf.h rltypedefs.h rlmbutil.h
-
- OTHER_DOCS = $(srcdir)/CHANGES $(srcdir)/INSTALL $(srcdir)/README
- OTHER_INSTALLED_DOCS = CHANGES INSTALL README
diff --git a/sys-libs/readline/files/readline-8.2-c23.patch b/sys-libs/readline/files/readline-8.2-c23.patch
deleted file mode 100644
index c6dd84aa0b33..000000000000
--- a/sys-libs/readline/files/readline-8.2-c23.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-HAVE_STDARG_H isn't defined for readline consumers externally so we always
-end up using the ancient non-prototypes. Fix that as all compilers we care
-about since forever in Gentoo will support this path.
-
-This in particular shows up with rl_message in consumers:
-https://bugs.gentoo.org/943820
-https://bugs.gentoo.org/944059
-https://bugs.gentoo.org/944300
-https://bugs.gentoo.org/944344
-[later: https://lists.gnu.org/archive/html/bug-readline/2025-03/msg00000.html]
---- a/rlstdc.h
-+++ b/rlstdc.h
-@@ -44,7 +44,7 @@
-
- /* Moved from config.h.in because readline.h:rl_message depends on these
- defines. */
--#if defined (__STDC__) && defined (HAVE_STDARG_H)
-+#if defined (__STDC__)
- # define PREFER_STDARG
- # define USE_VARARGS
- #else
diff --git a/sys-libs/readline/metadata.xml b/sys-libs/readline/metadata.xml
deleted file mode 100644
index d1f832b0672f..000000000000
--- a/sys-libs/readline/metadata.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <use>
- <flag name="utils">Install rlfe (ReadLine Front-End) helper tool -- a wrapper program for making any stdin use readline</flag>
- </use>
- <upstream>
- <remote-id type="cpe">cpe:/a:gnu:readline</remote-id>
- <remote-id type="savannah">readline</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/readline/readline-8.2_p13-r1.ebuild b/sys-libs/readline/readline-8.2_p13-r1.ebuild
deleted file mode 100644
index 29f55a7d24fb..000000000000
--- a/sys-libs/readline/readline-8.2_p13-r1.ebuild
+++ /dev/null
@@ -1,261 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# There's no standard way of versioning the point releases upstream
-# make anyway, so while this was added for RC versions, it's fine
-# in general.
-QA_PKGCONFIG_VERSION=$(ver_cut 1-2)
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
-inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs verify-sig
-
-# Official patches
-# See ftp://ftp.cwru.edu/pub/bash/readline-8.1-patches/
-PLEVEL="${PV##*_p}"
-MY_PV="${PV/_p*}"
-MY_PV="${MY_PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-MY_PATCHES=()
-
-is_release() {
- case ${PV} in
- 9999|*_alpha*|*_beta*|*_rc*)
- return 1
- ;;
- *)
- return 0
- ;;
- esac
-}
-
-[[ ${PV} != *_p* ]] && PLEVEL=0
-
-DESCRIPTION="Another cute console display library"
-HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html https://git.savannah.gnu.org/cgit/readline.git"
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/readline.git"
- EGIT_BRANCH=devel
- inherit git-r3
-elif is_release ; then
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
- SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/readline-8.1-rlfe-c99.patch.xz"
- SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )"
-
- if [[ ${PLEVEL} -gt 0 ]] ; then
- # bash-5.1 -> bash51
- my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2))
-
- patch_url=
- my_patch_index=
-
- upstream_url_base="mirror://gnu/readline"
-
- for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do
- printf -v mangled_patch_ver ${my_p}-%03d ${my_patch_index}
- patch_url="${upstream_url_base}/${MY_P}-patches/${mangled_patch_ver}"
-
- SRC_URI+=" ${patch_url}"
- SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
-
- MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
- done
-
- unset my_p patch_url my_patch_index upstream_url_base
- fi
-else
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
- SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )"
-fi
-
-S="${WORKDIR}/${MY_P}"
-
-if ! is_release ; then
- inherit autotools
-fi
-
-LICENSE="GPL-3+"
-SLOT="0/8" # subslot matches SONAME major
-if is_release ; then
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-fi
-IUSE="static-libs +unicode utils"
-
-RDEPEND=">=sys-libs/ncurses-5.9-r3:=[static-libs?,unicode(+)?,${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig
- verify-sig? ( sec-keys/openpgp-keys-chetramey )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-5.0-no_rpath.patch
- "${FILESDIR}"/${PN}-7.0-headers.patch
- "${FILESDIR}"/${PN}-8.0-headers.patch
- "${WORKDIR}"/${PN}-8.1-rlfe-c99.patch
- # Not needed with 8.3 which drops < C89 compat
- "${FILESDIR}"/${PN}-8.2-c23.patch
-)
-
-src_unpack() {
- local patch
-
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- else
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
-
- for patch in "${MY_PATCHES[@]}"; do
- verify-sig_verify_detached "${patch}"{,.sig}
- done
- fi
-
- unpack "${MY_P}.tar.gz"
- unpack readline-8.1-rlfe-c99.patch.xz
-
- #if [[ ${GENTOO_PATCH_VER} ]]; then
- # unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
- #fi
- fi
-}
-
-src_prepare() {
- [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}"
-
- default
-
- is_release || eautoreconf
-
- if use prefix && [[ -n ${STAGE} ]] ; then
- # If we're bootstrapping, make a guess. We don't have pkg-config
- # around yet. bug #818103.
- # Incorrectly populating this leads to underlinked libreadline.
- local ncurses_libs
- local ncurses_libs_suffix=$(usex unicode w '')
-
- ncurses_libs="-lncurses${ncurses_libs_suffix}"
-
- if has_version "sys-libs/ncurses[tinfo(+)]" ; then
- ncurses_libs+=" -ltinfo${ncurses_libs_suffix}"
- fi
- else
- # Force ncurses linking, bug #71420.
- # Use pkg-config to get the right values, bug #457558.
- local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs || die)
- fi
-
- sed -i \
- -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \
- support/shobj-conf || die
- sed -i \
- -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \
- examples/rlfe/configure || die
-
- # Fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
- # objformat for years, so we don't want to rely on that.
- sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
-
- # For local readline headers
- ln -s ../.. examples/rlfe/readline || die
-}
-
-src_configure() {
- # readline-8.3 drops unprototyped functions, earlier versions are
- # incompatible with C23.
- append-cflags $(test-flags-CC -std=gnu17)
-
- # Fix implicit decls with widechar funcs
- append-cppflags -D_GNU_SOURCE
- # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
- append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
-
- # Make sure configure picks a better ar than `ar`, bug #484866
- export ac_cv_prog_AR="$(tc-getAR)"
-
- # Force the test since we used sed above to force it.
- export bash_cv_termcap_lib=ncurses
-
- # Control cross-compiling cases when we know the right answer.
- # In cases where the C library doesn't support wide characters, readline
- # itself won't work correctly, so forcing the answer below should be OK.
- if tc-is-cross-compiler ; then
- export bash_cv_func_sigsetjmp="present"
- export bash_cv_func_ctype_nonascii="yes"
- # bug #503312
- export bash_cv_wcwidth_broken="no"
- fi
-
- # This is for rlfe, but we need to make sure LDFLAGS doesn't change
- # so we can re-use the config cache file between the two.
- append-ldflags -L.
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- --cache-file="${BUILD_DIR}"/config.cache
- --with-curses
- $(use_enable static-libs static)
- )
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-
- if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
- # Code is full of AC_TRY_RUN()
- mkdir -p examples/rlfe || die
- cd examples/rlfe || die
-
- ECONF_SOURCE="${S}"/examples/rlfe econf --cache-file="${BUILD_DIR}"/config.cache
- fi
-}
-
-multilib_src_compile() {
- emake
-
- if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
- # Code is full of AC_TRY_RUN()
- cd examples/rlfe || die
- local l
- for l in readline history ; do
- ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die
- ln -s ../../lib${l}.a lib${l}.a || die
- done
- emake
- fi
-}
-
-multilib_src_install() {
- default
-
- if multilib_is_native_abi ; then
- if use utils && ! tc-is-cross-compiler; then
- dobin examples/rlfe/rlfe
- fi
- fi
-}
-
-multilib_src_install_all() {
- HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs
-
- dodoc USAGE
- docinto ps
- dodoc doc/*.ps
-}
-pkg_preinst() {
- # bug #29865
- # Reappeared in bug #595324 with paludis so keeping this for now...
- preserve_old_lib \
- /$(get_libdir)/lib{history,readline}$(get_libname 4) \
- /$(get_libdir)/lib{history,readline}$(get_libname 5) \
- /$(get_libdir)/lib{history,readline}$(get_libname 6) \
- /$(get_libdir)/lib{history,readline}$(get_libname 7)
-}
-
-pkg_postinst() {
- preserve_old_lib_notify \
- /$(get_libdir)/lib{history,readline}$(get_libname 4) \
- /$(get_libdir)/lib{history,readline}$(get_libname 5) \
- /$(get_libdir)/lib{history,readline}$(get_libname 6) \
- /$(get_libdir)/lib{history,readline}$(get_libname 7)
-}
diff --git a/sys-libs/readline/readline-8.3_p3.ebuild b/sys-libs/readline/readline-8.3_p3.ebuild
deleted file mode 100644
index 3fddcda05254..000000000000
--- a/sys-libs/readline/readline-8.3_p3.ebuild
+++ /dev/null
@@ -1,257 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# There's no standard way of versioning the point releases upstream
-# make anyway, so while this was added for RC versions, it's fine
-# in general.
-QA_PKGCONFIG_VERSION=$(ver_cut 1-2)
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
-inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs verify-sig
-
-# Official patches
-# See ftp://ftp.cwru.edu/pub/bash/readline-8.1-patches/
-PLEVEL="${PV##*_p}"
-MY_PV="${PV/_p*}"
-MY_PV="${MY_PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-MY_PATCHES=()
-
-# Determine the patchlevel.
-case ${PV} in
- 9999|*_alpha*|*_beta*|*_rc*)
- # Set a negative patchlevel to indicate that it's a pre-release.
- PLEVEL=-1
- ;;
- *_p*)
- PLEVEL=${PV##*_p}
- ;;
- *)
- PLEVEL=0
-esac
-
-DESCRIPTION="Another cute console display library"
-HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html https://git.savannah.gnu.org/cgit/readline.git"
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/readline.git"
- EGIT_BRANCH=devel
- inherit git-r3
-elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
- # It can be useful to have snapshots in the pre-release period once
- # the first alpha is out, as various bugs get reported and fixed from
- # the alpha, and the next pre-release is usually quite far away.
- #
- # i.e. if it's worth packaging the alpha, it's worth packaging a followup.
- READLINE_COMMIT="7cf2d923617659d216db3210f6247740f7dde1d8"
- SRC_URI="https://git.savannah.gnu.org/cgit/readline.git/snapshot/readline-${READLINE_COMMIT}.tar.gz -> ${P}-${READLINE_COMMIT}.tar.gz"
- S=${WORKDIR}/${PN}-${READLINE_COMMIT}
-else
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
- SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )"
- S="${WORKDIR}/${MY_P}"
-
- if [[ ${PLEVEL} -gt 0 ]] ; then
- # bash-5.1 -> bash51
- my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2))
-
- patch_url=
- my_patch_index=
-
- upstream_url_base="mirror://gnu/readline"
-
- for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do
- printf -v mangled_patch_ver ${my_p}-%03d ${my_patch_index}
- patch_url="${upstream_url_base}/${MY_P}-patches/${mangled_patch_ver}"
-
- SRC_URI+=" ${patch_url}"
- SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
-
- MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
- done
-
- unset my_p patch_url my_patch_index upstream_url_base
- fi
-fi
-
-LICENSE="GPL-3+"
-SLOT="0/8" # subslot matches SONAME major
-if (( PLEVEL >= 0 )); then
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
-fi
-IUSE="static-libs +unicode utils"
-
-RDEPEND=">=sys-libs/ncurses-5.9-r3:=[static-libs?,unicode(+)?,${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}"
-BDEPEND="
- virtual/pkgconfig
- verify-sig? ( sec-keys/openpgp-keys-chetramey )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-5.0-no_rpath.patch
- "${FILESDIR}"/${PN}-7.0-headers.patch
- "${FILESDIR}"/${PN}-8.0-headers.patch
-)
-
-src_unpack() {
- local patch
-
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
- default
- else
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
-
- for patch in "${MY_PATCHES[@]}"; do
- verify-sig_verify_detached "${patch}"{,.sig}
- done
- fi
-
- unpack "${MY_P}.tar.gz"
-
- if [[ ${GENTOO_PATCH_VER} ]]; then
- unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
- fi
- fi
-}
-
-src_prepare() {
- (( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}"
-
- default
-
- #(( PLEVEL < 0 )) && eautoreconf
-
- if use prefix && [[ -n ${STAGE} ]] ; then
- # If we're bootstrapping, make a guess. We don't have pkg-config
- # around yet. bug #818103.
- # Incorrectly populating this leads to underlinked libreadline.
- local ncurses_libs
- local ncurses_libs_suffix=$(usex unicode w '')
-
- ncurses_libs="-lncurses${ncurses_libs_suffix}"
-
- if has_version "sys-libs/ncurses[tinfo(+)]" ; then
- ncurses_libs+=" -ltinfo${ncurses_libs_suffix}"
- fi
- else
- # Force ncurses linking, bug #71420.
- # Use pkg-config to get the right values, bug #457558.
- local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs || die)
- fi
-
- sed -i \
- -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \
- support/shobj-conf || die
- sed -i \
- -e "/[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \
- examples/rlfe/configure || die
-
- # Fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
- # objformat for years, so we don't want to rely on that.
- sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
-
- # For local readline headers
- ln -s ../.. examples/rlfe/readline || die
-}
-
-src_configure() {
- # Fix implicit decls with widechar funcs
- append-cppflags -D_GNU_SOURCE
- # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
- append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
-
- # Make sure configure picks a better ar than `ar`, bug #484866
- export ac_cv_prog_AR="$(tc-getAR)"
-
- # Force the test since we used sed above to force it.
- export bash_cv_termcap_lib=ncurses
-
- # Control cross-compiling cases when we know the right answer.
- # In cases where the C library doesn't support wide characters, readline
- # itself won't work correctly, so forcing the answer below should be OK.
- if tc-is-cross-compiler ; then
- export bash_cv_func_sigsetjmp="present"
- export bash_cv_func_ctype_nonascii="yes"
- # bug #503312
- export bash_cv_wcwidth_broken="no"
- fi
-
- # This is for rlfe, but we need to make sure LDFLAGS doesn't change
- # so we can re-use the config cache file between the two.
- append-ldflags -L.
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- --cache-file="${BUILD_DIR}"/config.cache
- --with-curses
- $(use_enable static-libs static)
- )
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-
- if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
- # Code is full of AC_TRY_RUN()
- mkdir -p examples/rlfe || die
- cd examples/rlfe || die
-
- ECONF_SOURCE="${S}"/examples/rlfe econf --cache-file="${BUILD_DIR}"/config.cache
- fi
-}
-
-multilib_src_compile() {
- emake
-
- if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
- # Code is full of AC_TRY_RUN()
- cd examples/rlfe || die
- local l
- for l in readline history ; do
- ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die
- ln -s ../../lib${l}.a lib${l}.a || die
- done
- emake
- fi
-}
-
-multilib_src_install() {
- default
-
- if multilib_is_native_abi ; then
- if use utils && ! tc-is-cross-compiler; then
- dobin examples/rlfe/rlfe
- fi
- fi
-}
-
-multilib_src_install_all() {
- HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs
-
- dodoc USAGE
- docinto ps
- dodoc doc/*.ps
-}
-pkg_preinst() {
- # bug #29865
- # Reappeared in bug #595324 with paludis so keeping this for now...
- preserve_old_lib \
- /$(get_libdir)/lib{history,readline}$(get_libname 4) \
- /$(get_libdir)/lib{history,readline}$(get_libname 5) \
- /$(get_libdir)/lib{history,readline}$(get_libname 6) \
- /$(get_libdir)/lib{history,readline}$(get_libname 7)
-}
-
-pkg_postinst() {
- preserve_old_lib_notify \
- /$(get_libdir)/lib{history,readline}$(get_libname 4) \
- /$(get_libdir)/lib{history,readline}$(get_libname 5) \
- /$(get_libdir)/lib{history,readline}$(get_libname 6) \
- /$(get_libdir)/lib{history,readline}$(get_libname 7)
-}
diff --git a/sys-libs/readline/readline-8.4_alpha_pre20251007.ebuild b/sys-libs/readline/readline-8.4_alpha_pre20251007.ebuild
deleted file mode 100644
index b6cfe4de3649..000000000000
--- a/sys-libs/readline/readline-8.4_alpha_pre20251007.ebuild
+++ /dev/null
@@ -1,257 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# There's no standard way of versioning the point releases upstream
-# make anyway, so while this was added for RC versions, it's fine
-# in general.
-QA_PKGCONFIG_VERSION=$(ver_cut 1-2)
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
-inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs verify-sig
-
-# Official patches
-# See ftp://ftp.cwru.edu/pub/bash/readline-8.1-patches/
-PLEVEL="${PV##*_p}"
-MY_PV="${PV/_p*}"
-MY_PV="${MY_PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-MY_PATCHES=()
-
-# Determine the patchlevel.
-case ${PV} in
- 9999|*_alpha*|*_beta*|*_rc*)
- # Set a negative patchlevel to indicate that it's a pre-release.
- PLEVEL=-1
- ;;
- *_p*)
- PLEVEL=${PV##*_p}
- ;;
- *)
- PLEVEL=0
-esac
-
-DESCRIPTION="Another cute console display library"
-HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html https://git.savannah.gnu.org/cgit/readline.git"
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/readline.git"
- EGIT_BRANCH=devel
- inherit git-r3
-elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
- # It can be useful to have snapshots in the pre-release period once
- # the first alpha is out, as various bugs get reported and fixed from
- # the alpha, and the next pre-release is usually quite far away.
- #
- # i.e. if it's worth packaging the alpha, it's worth packaging a followup.
- READLINE_COMMIT="a0ceb95d8c5d730ac9461e4abaea402e862ac907"
- SRC_URI="https://git.savannah.gnu.org/cgit/readline.git/snapshot/readline-${READLINE_COMMIT}.tar.gz -> ${P}-${READLINE_COMMIT}.tar.gz"
- S=${WORKDIR}/${PN}-${READLINE_COMMIT}
-else
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
- SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )"
- S="${WORKDIR}/${MY_P}"
-
- if [[ ${PLEVEL} -gt 0 ]] ; then
- # bash-5.1 -> bash51
- my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2))
-
- patch_url=
- my_patch_index=
-
- upstream_url_base="mirror://gnu/readline"
-
- for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do
- printf -v mangled_patch_ver ${my_p}-%03d ${my_patch_index}
- patch_url="${upstream_url_base}/${MY_P}-patches/${mangled_patch_ver}"
-
- SRC_URI+=" ${patch_url}"
- SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
-
- MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
- done
-
- unset my_p patch_url my_patch_index upstream_url_base
- fi
-fi
-
-LICENSE="GPL-3+"
-SLOT="0/8" # subslot matches SONAME major
-if (( PLEVEL >= 0 )); then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
-fi
-IUSE="static-libs +unicode utils"
-
-RDEPEND=">=sys-libs/ncurses-5.9-r3:=[static-libs?,unicode(+)?,${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}"
-BDEPEND="
- virtual/pkgconfig
- verify-sig? ( sec-keys/openpgp-keys-chetramey )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-5.0-no_rpath.patch
- "${FILESDIR}"/${PN}-7.0-headers.patch
- "${FILESDIR}"/${PN}-8.0-headers.patch
-)
-
-src_unpack() {
- local patch
-
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
- default
- else
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
-
- for patch in "${MY_PATCHES[@]}"; do
- verify-sig_verify_detached "${patch}"{,.sig}
- done
- fi
-
- unpack "${MY_P}.tar.gz"
-
- if [[ ${GENTOO_PATCH_VER} ]]; then
- unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
- fi
- fi
-}
-
-src_prepare() {
- (( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}"
-
- default
-
- #(( PLEVEL < 0 )) && eautoreconf
-
- if use prefix && [[ -n ${STAGE} ]] ; then
- # If we're bootstrapping, make a guess. We don't have pkg-config
- # around yet. bug #818103.
- # Incorrectly populating this leads to underlinked libreadline.
- local ncurses_libs
- local ncurses_libs_suffix=$(usex unicode w '')
-
- ncurses_libs="-lncurses${ncurses_libs_suffix}"
-
- if has_version "sys-libs/ncurses[tinfo(+)]" ; then
- ncurses_libs+=" -ltinfo${ncurses_libs_suffix}"
- fi
- else
- # Force ncurses linking, bug #71420.
- # Use pkg-config to get the right values, bug #457558.
- local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs || die)
- fi
-
- sed -i \
- -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \
- support/shobj-conf || die
- sed -i \
- -e "/[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \
- examples/rlfe/configure || die
-
- # Fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
- # objformat for years, so we don't want to rely on that.
- sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
-
- # For local readline headers
- ln -s ../.. examples/rlfe/readline || die
-}
-
-src_configure() {
- # Fix implicit decls with widechar funcs
- append-cppflags -D_GNU_SOURCE
- # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
- append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
-
- # Make sure configure picks a better ar than `ar`, bug #484866
- export ac_cv_prog_AR="$(tc-getAR)"
-
- # Force the test since we used sed above to force it.
- export bash_cv_termcap_lib=ncurses
-
- # Control cross-compiling cases when we know the right answer.
- # In cases where the C library doesn't support wide characters, readline
- # itself won't work correctly, so forcing the answer below should be OK.
- if tc-is-cross-compiler ; then
- export bash_cv_func_sigsetjmp="present"
- export bash_cv_func_ctype_nonascii="yes"
- # bug #503312
- export bash_cv_wcwidth_broken="no"
- fi
-
- # This is for rlfe, but we need to make sure LDFLAGS doesn't change
- # so we can re-use the config cache file between the two.
- append-ldflags -L.
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- --cache-file="${BUILD_DIR}"/config.cache
- --with-curses
- $(use_enable static-libs static)
- )
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-
- if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
- # Code is full of AC_TRY_RUN()
- mkdir -p examples/rlfe || die
- cd examples/rlfe || die
-
- ECONF_SOURCE="${S}"/examples/rlfe econf --cache-file="${BUILD_DIR}"/config.cache
- fi
-}
-
-multilib_src_compile() {
- emake
-
- if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
- # Code is full of AC_TRY_RUN()
- cd examples/rlfe || die
- local l
- for l in readline history ; do
- ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die
- ln -s ../../lib${l}.a lib${l}.a || die
- done
- emake
- fi
-}
-
-multilib_src_install() {
- default
-
- if multilib_is_native_abi ; then
- if use utils && ! tc-is-cross-compiler; then
- dobin examples/rlfe/rlfe
- fi
- fi
-}
-
-multilib_src_install_all() {
- HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs
-
- dodoc USAGE
- docinto ps
- dodoc doc/*.ps
-}
-pkg_preinst() {
- # bug #29865
- # Reappeared in bug #595324 with paludis so keeping this for now...
- preserve_old_lib \
- /$(get_libdir)/lib{history,readline}$(get_libname 4) \
- /$(get_libdir)/lib{history,readline}$(get_libname 5) \
- /$(get_libdir)/lib{history,readline}$(get_libname 6) \
- /$(get_libdir)/lib{history,readline}$(get_libname 7)
-}
-
-pkg_postinst() {
- preserve_old_lib_notify \
- /$(get_libdir)/lib{history,readline}$(get_libname 4) \
- /$(get_libdir)/lib{history,readline}$(get_libname 5) \
- /$(get_libdir)/lib{history,readline}$(get_libname 6) \
- /$(get_libdir)/lib{history,readline}$(get_libname 7)
-}
diff --git a/sys-libs/readline/readline-9999.ebuild b/sys-libs/readline/readline-9999.ebuild
deleted file mode 100644
index 236229ef6d73..000000000000
--- a/sys-libs/readline/readline-9999.ebuild
+++ /dev/null
@@ -1,257 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# There's no standard way of versioning the point releases upstream
-# make anyway, so while this was added for RC versions, it's fine
-# in general.
-QA_PKGCONFIG_VERSION=$(ver_cut 1-2)
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
-inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs verify-sig
-
-# Official patches
-# See ftp://ftp.cwru.edu/pub/bash/readline-8.1-patches/
-PLEVEL="${PV##*_p}"
-MY_PV="${PV/_p*}"
-MY_PV="${MY_PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-MY_PATCHES=()
-
-# Determine the patchlevel.
-case ${PV} in
- 9999|*_alpha*|*_beta*|*_rc*)
- # Set a negative patchlevel to indicate that it's a pre-release.
- PLEVEL=-1
- ;;
- *_p*)
- PLEVEL=${PV##*_p}
- ;;
- *)
- PLEVEL=0
-esac
-
-DESCRIPTION="Another cute console display library"
-HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html https://git.savannah.gnu.org/cgit/readline.git"
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/readline.git"
- EGIT_BRANCH=devel
- inherit git-r3
-elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
- # It can be useful to have snapshots in the pre-release period once
- # the first alpha is out, as various bugs get reported and fixed from
- # the alpha, and the next pre-release is usually quite far away.
- #
- # i.e. if it's worth packaging the alpha, it's worth packaging a followup.
- READLINE_COMMIT="7cf2d923617659d216db3210f6247740f7dde1d8"
- SRC_URI="https://git.savannah.gnu.org/cgit/readline.git/snapshot/readline-${READLINE_COMMIT}.tar.gz -> ${P}-${READLINE_COMMIT}.tar.gz"
- S=${WORKDIR}/${PN}-${READLINE_COMMIT}
-else
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
- SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )"
- S="${WORKDIR}/${MY_P}"
-
- if [[ ${PLEVEL} -gt 0 ]] ; then
- # bash-5.1 -> bash51
- my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2))
-
- patch_url=
- my_patch_index=
-
- upstream_url_base="mirror://gnu/readline"
-
- for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do
- printf -v mangled_patch_ver ${my_p}-%03d ${my_patch_index}
- patch_url="${upstream_url_base}/${MY_P}-patches/${mangled_patch_ver}"
-
- SRC_URI+=" ${patch_url}"
- SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
-
- MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
- done
-
- unset my_p patch_url my_patch_index upstream_url_base
- fi
-fi
-
-LICENSE="GPL-3+"
-SLOT="0/8" # subslot matches SONAME major
-if (( PLEVEL >= 0 )); then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
-fi
-IUSE="static-libs +unicode utils"
-
-RDEPEND=">=sys-libs/ncurses-5.9-r3:=[static-libs?,unicode(+)?,${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}"
-BDEPEND="
- virtual/pkgconfig
- verify-sig? ( sec-keys/openpgp-keys-chetramey )
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-5.0-no_rpath.patch
- "${FILESDIR}"/${PN}-7.0-headers.patch
- "${FILESDIR}"/${PN}-8.0-headers.patch
-)
-
-src_unpack() {
- local patch
-
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
- default
- else
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
-
- for patch in "${MY_PATCHES[@]}"; do
- verify-sig_verify_detached "${patch}"{,.sig}
- done
- fi
-
- unpack "${MY_P}.tar.gz"
-
- if [[ ${GENTOO_PATCH_VER} ]]; then
- unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
- fi
- fi
-}
-
-src_prepare() {
- (( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}"
-
- default
-
- #(( PLEVEL < 0 )) && eautoreconf
-
- if use prefix && [[ -n ${STAGE} ]] ; then
- # If we're bootstrapping, make a guess. We don't have pkg-config
- # around yet. bug #818103.
- # Incorrectly populating this leads to underlinked libreadline.
- local ncurses_libs
- local ncurses_libs_suffix=$(usex unicode w '')
-
- ncurses_libs="-lncurses${ncurses_libs_suffix}"
-
- if has_version "sys-libs/ncurses[tinfo(+)]" ; then
- ncurses_libs+=" -ltinfo${ncurses_libs_suffix}"
- fi
- else
- # Force ncurses linking, bug #71420.
- # Use pkg-config to get the right values, bug #457558.
- local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs || die)
- fi
-
- sed -i \
- -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \
- support/shobj-conf || die
- sed -i \
- -e "/[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \
- examples/rlfe/configure || die
-
- # Fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
- # objformat for years, so we don't want to rely on that.
- sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
-
- # For local readline headers
- ln -s ../.. examples/rlfe/readline || die
-}
-
-src_configure() {
- # Fix implicit decls with widechar funcs
- append-cppflags -D_GNU_SOURCE
- # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
- append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
-
- # Make sure configure picks a better ar than `ar`, bug #484866
- export ac_cv_prog_AR="$(tc-getAR)"
-
- # Force the test since we used sed above to force it.
- export bash_cv_termcap_lib=ncurses
-
- # Control cross-compiling cases when we know the right answer.
- # In cases where the C library doesn't support wide characters, readline
- # itself won't work correctly, so forcing the answer below should be OK.
- if tc-is-cross-compiler ; then
- export bash_cv_func_sigsetjmp="present"
- export bash_cv_func_ctype_nonascii="yes"
- # bug #503312
- export bash_cv_wcwidth_broken="no"
- fi
-
- # This is for rlfe, but we need to make sure LDFLAGS doesn't change
- # so we can re-use the config cache file between the two.
- append-ldflags -L.
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- --cache-file="${BUILD_DIR}"/config.cache
- --with-curses
- $(use_enable static-libs static)
- )
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-
- if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
- # Code is full of AC_TRY_RUN()
- mkdir -p examples/rlfe || die
- cd examples/rlfe || die
-
- ECONF_SOURCE="${S}"/examples/rlfe econf --cache-file="${BUILD_DIR}"/config.cache
- fi
-}
-
-multilib_src_compile() {
- emake
-
- if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
- # Code is full of AC_TRY_RUN()
- cd examples/rlfe || die
- local l
- for l in readline history ; do
- ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die
- ln -s ../../lib${l}.a lib${l}.a || die
- done
- emake
- fi
-}
-
-multilib_src_install() {
- default
-
- if multilib_is_native_abi ; then
- if use utils && ! tc-is-cross-compiler; then
- dobin examples/rlfe/rlfe
- fi
- fi
-}
-
-multilib_src_install_all() {
- HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs
-
- dodoc USAGE
- docinto ps
- dodoc doc/*.ps
-}
-pkg_preinst() {
- # bug #29865
- # Reappeared in bug #595324 with paludis so keeping this for now...
- preserve_old_lib \
- /$(get_libdir)/lib{history,readline}$(get_libname 4) \
- /$(get_libdir)/lib{history,readline}$(get_libname 5) \
- /$(get_libdir)/lib{history,readline}$(get_libname 6) \
- /$(get_libdir)/lib{history,readline}$(get_libname 7)
-}
-
-pkg_postinst() {
- preserve_old_lib_notify \
- /$(get_libdir)/lib{history,readline}$(get_libname 4) \
- /$(get_libdir)/lib{history,readline}$(get_libname 5) \
- /$(get_libdir)/lib{history,readline}$(get_libname 6) \
- /$(get_libdir)/lib{history,readline}$(get_libname 7)
-}
diff --git a/sys-libs/rpmatch-standalone/Manifest b/sys-libs/rpmatch-standalone/Manifest
deleted file mode 100644
index 0f7f82cf3b04..000000000000
--- a/sys-libs/rpmatch-standalone/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST rpmatch-standalone-1.0.tar.gz 3151 BLAKE2B e396d18bfb092aa59c70e81028ba889c1095c97b5f13bffbb4ae7b97a1ce63a6c536663304e4fdefaa06a22854dd5b986ff7238f0091b23bcd336cc6db0fca75 SHA512 9d8fc3be66f23b57793eccf62998d1c0ff8df24d8781d37ee99faf618cdceeda778132df2c75ace2ecd8aa6392bcdf15eaa9ce0acd657401af049ccf61fd5b14
diff --git a/sys-libs/rpmatch-standalone/metadata.xml b/sys-libs/rpmatch-standalone/metadata.xml
deleted file mode 100644
index 4f03b2908d47..000000000000
--- a/sys-libs/rpmatch-standalone/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>blueness@gentoo.org</email>
- <name>Anthony G. Basile</name>
- </maintainer>
- <upstream>
- <remote-id type="github">pullmoll/musl-rpmatch</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/rpmatch-standalone/rpmatch-standalone-1.0-r1.ebuild b/sys-libs/rpmatch-standalone/rpmatch-standalone-1.0-r1.ebuild
deleted file mode 100644
index 2f8ee77c2482..000000000000
--- a/sys-libs/rpmatch-standalone/rpmatch-standalone-1.0-r1.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools
-
-DESCRIPTION="Standalone rpmatch library for use with musl"
-HOMEPAGE="https://github.com/pullmoll/musl-rpmatch"
-SRC_URI="https://github.com/pullmoll/musl-rpmatch/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-S="${WORKDIR}/musl-rpmatch-${PV}"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 ~riscv x86"
-IUSE="static-libs"
-
-RDEPEND="!sys-libs/glibc"
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable static-libs static)
-}
-
-src_install() {
- default
- find "${D}" -name '*.la' -delete || die
-
- insinto /usr/$(get_libdir)/pkgconfig/
- newins musl-rpmatch.pc ${PN}.pc
-}
diff --git a/sys-libs/scallop/Manifest b/sys-libs/scallop/Manifest
deleted file mode 100644
index a4753d991ff2..000000000000
--- a/sys-libs/scallop/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST scallop-5.3.9.20251212.tar.xz 1617500 BLAKE2B 5acc1b8f4a6b140c5504fb7df572d6e00e6fd5161102125ed1f692ba8a12c9a7dcea1b3fd1e17c9da25c5b9faebf5b01999e38b3308cb64e4679ca7c8b4f78b5 SHA512 e2a2c1a1efbb0f090f159417d5d04fbc98749cfe9246c55b3ef82da7020ee9d55cd7d475cf67ba3f1c4716879ce34c6c2d7952cc5a48c99b98bcc8476e82ad78
diff --git a/sys-libs/scallop/files/bash-5.3_p9-general-workaround-aliasing-violation-in-REVERSE_LIS.patch b/sys-libs/scallop/files/bash-5.3_p9-general-workaround-aliasing-violation-in-REVERSE_LIS.patch
deleted file mode 100644
index d844f6463221..000000000000
--- a/sys-libs/scallop/files/bash-5.3_p9-general-workaround-aliasing-violation-in-REVERSE_LIS.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-https://lists.gnu.org/archive/html/bug-bash/2026-03/msg00069.html
-
-From 7309ee9f263dfcaf11eeca679cfec5cf5c8f9455 Mon Sep 17 00:00:00 2001
-Message-ID: <7309ee9f263dfcaf11eeca679cfec5cf5c8f9455.1774896688.git.sam@gentoo.org>
-From: Sam James <sam@gentoo.org>
-Date: Mon, 30 Mar 2026 19:19:33 +0100
-Subject: [PATCH] general: workaround aliasing violation in REVERSE_LIST macro
-
-In jobs.c, say, we have:
-```
- p->next = (PROCESS *)NULL;
- newjob->pipe = REVERSE_LIST (the_pipeline, PROCESS *);
- for (p = newjob->pipe; p->next; p = p->next)
-```
-
-REVERSE_LIST (-> list_reverse) reverses the linked list `the_pipeline`
-while doing accesses as GENERIC_LIST*, but the original elements are PROCESS*.
-
-I think GCC has an exemption for doing this with void* but even that isn't
-required to work by the standard. I think it either needs to be done with char*
-or with GENERIC_LIST marked with __attribute__((may_alias))
-(though that isn't portable).
-
-For Gentoo, the alias approach is fine until this gets fixed upstream,
-so do that.
-
-This fixes bash being miscompiled by GCC 16 with -O2 -flto and USE=-plugins
-(for -rdynamic to be dropped).
-
-Bug: https://bugs.gentoo.org/971782
-Signed-off-by: Sam James <sam@gentoo.org>
----
- general.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/general.h b/general.h
-index 5b1eac08..883939a7 100644
---- general.h
-+++ general.h
-@@ -122,7 +122,7 @@ extern char *strcpy (char *, const char *);
- can be written to handle the general case for linked lists. */
- typedef struct g_list {
- struct g_list *next;
--} GENERIC_LIST;
-+} __attribute__((may_alias)) GENERIC_LIST;
-
- /* Here is a generic structure for associating character strings
- with integers. It is used in the parser for shell tokenization. */
-
-base-commit: 637f5c8696a6adc9b4519f1cd74aa78492266b7f
---
-2.53.0
-
diff --git a/sys-libs/scallop/metadata.xml b/sys-libs/scallop/metadata.xml
deleted file mode 100644
index 33c1ad3bdca7..000000000000
--- a/sys-libs/scallop/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>sam@gentoo.org</email>
- <name>Sam James</name>
- </maintainer>
- <upstream>
- <remote-id type="github">pkgcraft/pkgcraft</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/scallop/scallop-5.3.9.20251212-r1.ebuild b/sys-libs/scallop/scallop-5.3.9.20251212-r1.ebuild
deleted file mode 100644
index 6e84e584cfab..000000000000
--- a/sys-libs/scallop/scallop-5.3.9.20251212-r1.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2025-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DESCRIPTION="Fork of bash enabling integration into pkgcraft"
-HOMEPAGE="https://github.com/pkgcraft/bash"
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://github.com/pkgcraft/bash.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/pkgcraft/bash/releases/download/${P}/${P}.tar.xz"
- KEYWORDS="amd64 arm64"
-fi
-
-LICENSE="GPL-3+"
-SLOT="0"
-
-PATCHES=(
- # bug #971782
- "${FILESDIR}"/bash-5.3_p9-general-workaround-aliasing-violation-in-REVERSE_LIS.patch
-)
-
-src_unpack() {
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- else
- default
- fi
-}
-
-src_configure() {
- # load required configure options
- local -a myconf
- while IFS= read -r line; do
- [[ -z ${line} || ${line} =~ ^# ]] && continue
- myconf+=( ${line} )
- done < configure-scallop-options
-
- econf "${myconf[@]}"
-}
-
-src_compile() {
- emake libscallop.so
-}
-
-# tests rely on functionality that scallop alters
-src_test() { :; }
-
-src_install() {
- emake DESTDIR="${D}" install-library install-headers
-}
diff --git a/sys-libs/scallop/scallop-9999.ebuild b/sys-libs/scallop/scallop-9999.ebuild
deleted file mode 100644
index 68ad75ab8368..000000000000
--- a/sys-libs/scallop/scallop-9999.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2025-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DESCRIPTION="Fork of bash enabling integration into pkgcraft"
-HOMEPAGE="https://github.com/pkgcraft/bash"
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://github.com/pkgcraft/bash.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/pkgcraft/bash/releases/download/${P}/${P}.tar.xz"
- KEYWORDS="~amd64 ~arm64"
-fi
-
-LICENSE="GPL-3+"
-SLOT="0"
-
-PATCHES=(
- # bug #971782
- "${FILESDIR}"/bash-5.3_p9-general-workaround-aliasing-violation-in-REVERSE_LIS.patch
-)
-
-src_unpack() {
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- else
- default
- fi
-}
-
-src_configure() {
- # load required configure options
- local -a myconf
- while IFS= read -r line; do
- [[ -z ${line} || ${line} =~ ^# ]] && continue
- myconf+=( ${line} )
- done < configure-scallop-options
-
- econf "${myconf[@]}"
-}
-
-src_compile() {
- emake libscallop.so
-}
-
-# tests rely on functionality that scallop alters
-src_test() { :; }
-
-src_install() {
- emake DESTDIR="${D}" install-library install-headers
-}
diff --git a/sys-libs/slang/Manifest b/sys-libs/slang/Manifest
deleted file mode 100644
index 602539baa6f0..000000000000
--- a/sys-libs/slang/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST slang-2.3.3.tar.bz2 1646311 BLAKE2B 2f304b25e807fe38b544479f4a6e98723816d08cda576177a270df736d7db8992a478f980333afc10a7bc0b5dc5508e49b33a13de02f0466f065efdfa3b7b351 SHA512 f882f09e3fcd53427de0f233c9fc3ab15497f2323007be9a084696c8cf810ffe2726cd003149e757df26198b390b9f8c1ff411dc6473513457bd0f94722f8490
diff --git a/sys-libs/slang/files/slang-2.3.3-ld-typo.patch b/sys-libs/slang/files/slang-2.3.3-ld-typo.patch
deleted file mode 100644
index 9f2a67c0ac2c..000000000000
--- a/sys-libs/slang/files/slang-2.3.3-ld-typo.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Sent upstream by email.
-
-Subject: [PATCH] Fix -Wl,--export-dynamic typo
-Date: Sun, 14 Sep 2025 08:24:48 +0100
-Message-ID: <743ab0056b4284bca1415fffe8cba323efeb8084.1757834688.git.sam@gentoo.org>
---- a/autoconf/aclocal.m4
-+++ b/autoconf/aclocal.m4
-@@ -617,7 +617,7 @@ M_LIB="-lm"
-
- case "$host_os" in
- *linux*|*gnu*|k*bsd*-gnu )
-- DYNAMIC_LINK_FLAGS="-Wl,-export-dynamic"
-+ DYNAMIC_LINK_FLAGS="-Wl,--export-dynamic"
- ELF_CC="\$(CC)"
- ELF_CFLAGS="\$(CFLAGS) \$(CPPFLAGS) -fPIC"
- ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSION_SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR)"
-@@ -739,7 +739,7 @@ case "$host_os" in
- ;;
- *haiku* )
- M_LIB=""
-- DYNAMIC_LINK_FLAGS="-Wl,-export-dynamic"
-+ DYNAMIC_LINK_FLAGS="-Wl,--export-dynamic"
- ELF_CC="\$(CC)"
- ELF_CFLAGS="\$(CFLAGS) \$(CPPFLAGS) -fPIC"
- ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSION_SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR)"
---- a/configure
-+++ b/configure
-@@ -6060,7 +6060,7 @@ M_LIB="-lm"
-
- case "$host_os" in
- *linux*|*gnu*|k*bsd*-gnu )
-- DYNAMIC_LINK_FLAGS="-Wl,-export-dynamic"
-+ DYNAMIC_LINK_FLAGS="-Wl,--export-dynamic"
- ELF_CC="\$(CC)"
- ELF_CFLAGS="\$(CFLAGS) \$(CPPFLAGS) -fPIC"
- ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSION_SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR)"
-@@ -6181,7 +6181,7 @@ case "$host_os" in
- ;;
- *haiku* )
- M_LIB=""
-- DYNAMIC_LINK_FLAGS="-Wl,-export-dynamic"
-+ DYNAMIC_LINK_FLAGS="-Wl,--export-dynamic"
- ELF_CC="\$(CC)"
- ELF_CFLAGS="\$(CFLAGS) \$(CPPFLAGS) -fPIC"
- ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSION_SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR)"
diff --git a/sys-libs/slang/files/slang-2.3.3-remove-undefined-symbol-from-version-script.patch b/sys-libs/slang/files/slang-2.3.3-remove-undefined-symbol-from-version-script.patch
deleted file mode 100644
index d3085797d1f8..000000000000
--- a/sys-libs/slang/files/slang-2.3.3-remove-undefined-symbol-from-version-script.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From f0d959a496cf47482904c62c91312aba5153f423 Mon Sep 17 00:00:00 2001
-From: Michal Rostecki <vadorovsky@gmail.com>
-Date: Thu, 1 Feb 2024 08:02:44 +0100
-Subject: [PATCH] Remove the undefined SLang_Rline_Quit symbol from the version
- script
-
-This symbol is not defined and not used anywhere, it was present only
-in the version file, which triggered the following error when linking
-with LLD 17:
-
- ld.lld: error: version script assignment of 'SLANG2' to symbol 'SLang_Rline_Quit' failed: symbol not defined
----
- src/slang.ver | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/slang.ver b/src/slang.ver
-index aa030c9..4b01f9f 100644
---- a/src/slang.ver
-+++ b/src/slang.ver
-@@ -70,7 +70,6 @@ SLANG2 {
- SLang_Last_Key_Char;
- SLang_Load_File_Hook;
- SLang_Num_Function_Args;
-- SLang_Rline_Quit;
- SLang_TT_Baud_Rate;
- SLang_TT_Read_FD;
- SLang_TT_Write_FD;
---
-2.43.0
-
diff --git a/sys-libs/slang/files/slang-2.3.3-slsh-libs.patch b/sys-libs/slang/files/slang-2.3.3-slsh-libs.patch
deleted file mode 100644
index 15062ee7d420..000000000000
--- a/sys-libs/slang/files/slang-2.3.3-slsh-libs.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Fix build issue:
-```
-make -j32 -j1 -C slsh slsh
-make: Entering directory '/var/tmp/portage/sys-libs/slang-2.3.3/work/slang-2.3.3-abi_x86_32.x86/slsh'
-x86_64-pc-linux-gnu-gcc -m32 amd64objs/slsh.o amd64objs/readline.o -o amd64objs/slsh -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-z,pack-relative-relocs -fuse-ld=bfd -Wl,-O1 -Wl,--as-needed -Wl,-export-dynamic -L/usr/lib -Wl,-R/usr/lib -L/usr/lib -lslang -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-z,pack-relative-relocs -fuse-ld=bfd -Wl,-O1 -Wl,--as-needed -lreadline -ldl -lm
-/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: cannot find -lslang: No such file or directory
-collect2: error: ld returned 1 exit status
-make: *** [Makefile:95: amd64objs/slsh] Error 1
-make: Leaving directory '/var/tmp/portage/sys-libs/slang-2.3.3/work/slang-2.3.3-abi_x86_32.x86/slsh'
-```
---- a/slsh/Makefile.in
-+++ b/slsh/Makefile.in
-@@ -92,7 +92,7 @@ slsh: $(OBJDIR)/slsh
- $(OBJDIR)/slsh_exe: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o
- $(CC) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh_exe $(LDFLAGS) $(DLINK_FLAGS) $(SRC_LIBS)
- $(OBJDIR)/slsh: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o
-- $(CC) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh $(LDFLAGS) $(DLINK_FLAGS) $(INST_LIBS)
-+ $(CC) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh $(LDFLAGS) $(DLINK_FLAGS) $(SRC_LIBS)
- $(OBJDIR)/slsh.o: $(OBJDIR_TSTAMP) slsh.c slsh.h config.h Makefile
- cd $(OBJDIR) && $(CC) $(SLANG_SRCINC) $(CFLAGS) -c $(DEFS) $(SRCDIR)/slsh.c
- $(OBJDIR)/readline.o: $(OBJDIR_TSTAMP) readline.c slsh.h config.h Makefile
diff --git a/sys-libs/slang/metadata.xml b/sys-libs/slang/metadata.xml
deleted file mode 100644
index a94766977fa6..000000000000
--- a/sys-libs/slang/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>cjk@gentoo.org</email>
- <name>Cjk</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/slang/slang-2.3.3-r1.ebuild b/sys-libs/slang/slang-2.3.3-r1.ebuild
deleted file mode 100644
index fe03dd29ecbf..000000000000
--- a/sys-libs/slang/slang-2.3.3-r1.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic multilib-minimal
-
-DESCRIPTION="Multi-platform library designed to allow a developer to create robust software"
-HOMEPAGE="https://www.jedsoft.org/slang/"
-
-if [[ ${PV} == *_pre* ]] ; then
- MY_P="${PN}-pre${PV/_pre/-}"
- SRC_URI="https://www.jedsoft.org/snapshots/${MY_P}.tar.gz"
- S="${WORKDIR}/${MY_P}"
-else
- SRC_URI="
- https://www.jedsoft.org/releases/${PN}/${P}.tar.bz2
- https://www.jedsoft.org/releases/${PN}/old/${P}.tar.bz2
- "
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="cjk pcre png readline static-libs zlib"
-
-# ncurses for ncurses5-config to get terminfo directory
-RDEPEND="
- sys-libs/ncurses:=
- cjk? ( >=dev-libs/oniguruma-5.9.5:=[${MULTILIB_USEDEP}] )
- pcre? ( >=dev-libs/libpcre-8.33-r1[${MULTILIB_USEDEP}] )
- png? ( >=media-libs/libpng-1.6.10:=[${MULTILIB_USEDEP}] )
- readline? ( >=sys-libs/readline-6.2_p5-r1:=[${MULTILIB_USEDEP}] )
- zlib? ( >=virtual/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.3.3-slsh-libs.patch
- "${FILESDIR}"/${PN}-2.3.3-remove-undefined-symbol-from-version-script.patch
-)
-
-src_prepare() {
- default
-
- # Avoid linking to -ltermcap race with some systems
- sed -i -e '/^TERMCAP=/s:=.*:=:' configure || die
- # We use the GNU linker also on Solaris
- sed -i -e 's/-G -fPIC/-shared -fPIC/g' \
- -e 's/-Wl,-h,/-Wl,-soname,/g' configure || die
-
- # Loads of blatant aliasing violations, bug #880589
- append-flags -fno-strict-aliasing
- filter-lto
-
- # slang does not support configuration from another dir
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- --with-readline=$(usex readline gnu slang)
- $(use_with pcre)
- $(use_with cjk onig)
- $(use_with png)
- $(use_with zlib z)
- )
-
- econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- emake -j1 elf $(usev static-libs static)
- emake -j1 -C slsh slsh
-}
-
-multilib_src_install() {
- emake -j1 DESTDIR="${D}" install $(usev static-libs install-static)
-}
-
-multilib_src_install_all() {
- rm -r "${ED}"/usr/share/doc/{slang,slsh} || die
-
- local -a DOCS=( NEWS README *.txt doc/{,internal,text}/*.txt )
- local -a HTML_DOCS=( doc/slangdoc.html slsh/doc/html/*.html )
-
- einstalldocs
-}
diff --git a/sys-libs/slang/slang-2.3.3-r2.ebuild b/sys-libs/slang/slang-2.3.3-r2.ebuild
deleted file mode 100644
index 5d4d21587950..000000000000
--- a/sys-libs/slang/slang-2.3.3-r2.ebuild
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic multilib-minimal
-
-DESCRIPTION="Multi-platform library designed to allow a developer to create robust software"
-HOMEPAGE="https://www.jedsoft.org/slang/"
-
-if [[ ${PV} == *_pre* ]] ; then
- MY_P="${PN}-pre${PV/_pre/-}"
- SRC_URI="https://www.jedsoft.org/snapshots/${MY_P}.tar.gz"
- S="${WORKDIR}/${MY_P}"
-else
- SRC_URI="
- https://www.jedsoft.org/releases/${PN}/${P}.tar.bz2
- https://www.jedsoft.org/releases/${PN}/old/${P}.tar.bz2
- "
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="cjk pcre png readline static-libs zlib"
-
-# ncurses for ncurses5-config to get terminfo directory
-RDEPEND="
- sys-libs/ncurses:=
- cjk? ( >=dev-libs/oniguruma-5.9.5:=[${MULTILIB_USEDEP}] )
- pcre? ( >=dev-libs/libpcre-8.33-r1[${MULTILIB_USEDEP}] )
- png? ( >=media-libs/libpng-1.6.10:=[${MULTILIB_USEDEP}] )
- readline? ( >=sys-libs/readline-6.2_p5-r1:=[${MULTILIB_USEDEP}] )
- zlib? ( >=virtual/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.3.3-slsh-libs.patch
- "${FILESDIR}"/${PN}-2.3.3-remove-undefined-symbol-from-version-script.patch
- "${FILESDIR}"/${PN}-2.3.3-ld-typo.patch
-)
-
-src_prepare() {
- default
-
- # Avoid linking to -ltermcap race with some systems
- sed -i -e '/^TERMCAP=/s:=.*:=:' configure || die
- # We use the GNU linker also on Solaris
- sed -i -e 's/-G -fPIC/-shared -fPIC/g' \
- -e 's/-Wl,-h,/-Wl,-soname,/g' configure || die
-
- # Loads of blatant aliasing violations, bug #880589
- append-flags -fno-strict-aliasing
- filter-lto
-
- # slang does not support configuration from another dir
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- --with-readline=$(usex readline gnu slang)
- $(use_with pcre)
- $(use_with cjk onig)
- $(use_with png)
- $(use_with zlib z)
- )
-
- econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- emake -j1 elf $(usev static-libs static)
- emake -j1 -C slsh slsh
-}
-
-multilib_src_install() {
- emake -j1 DESTDIR="${D}" install $(usev static-libs install-static)
-}
-
-multilib_src_install_all() {
- rm -r "${ED}"/usr/share/doc/{slang,slsh} || die
-
- local -a DOCS=( NEWS README *.txt doc/{,internal,text}/*.txt )
- local -a HTML_DOCS=( doc/slangdoc.html slsh/doc/html/*.html )
-
- einstalldocs
-}
diff --git a/sys-libs/snapd-glib/Manifest b/sys-libs/snapd-glib/Manifest
deleted file mode 100644
index 58953438b0b5..000000000000
--- a/sys-libs/snapd-glib/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST snapd-glib-1.67.tar.gz 294573 BLAKE2B 997a3ea1be213f674c91ad94eb7f8ba2b4675d80c2cc362e584607d81278936dfe3902531e98cb177d0225cdf4d0ad2cb715f1ba24a63a22dd7b64b51cbeab85 SHA512 c21c22157f2601f6cf3cc13127a8a3d0ab03609613bbe585da4397093cd9264ab6109fdebf92c7ef3adc9bcb21e6a6f0dbb4d1a5a71dd04470823c723fb5cdcb
-DIST snapd-glib-1.70.tar.gz 299401 BLAKE2B 46d307ee6b837ac73eb45c6462888cf9b4183de6c47f6b8b32987af3f7106de6d5415cbb6ef323c704c7e19ef8085e9f00748558e9cba003178480062eb9b774 SHA512 a2bd1ab52e45a6a38096727d0badabfdbd017a521230f76cdee540bade60df1be80b88b185576e5c82f0f8572fb367f6678dc6a537cc897b5c845f73c2a5c513
-DIST snapd-glib-1.72.tar.gz 302214 BLAKE2B 9e1651166c2a04ebf3f4ff9b081d0cdd64c85a9ccacafb2648fe13727e0cafa496a4240c56bcaa74d5a8b598f43731204021dac2bc0481f541f08f06c5cc7edb SHA512 349cd732d6f8a9863f42c8ae6230222a5e7783d67a19220b5a1f1963370799e814b05c1a9d44ac594b2d4cdf0177bd79ee4cf2fbd59f6534152f67642bef952a
diff --git a/sys-libs/snapd-glib/files/snapd-glib-1.67-install-missing-header.patch b/sys-libs/snapd-glib/files/snapd-glib-1.67-install-missing-header.patch
deleted file mode 100644
index 673f17c2fe82..000000000000
--- a/sys-libs/snapd-glib/files/snapd-glib-1.67-install-missing-header.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-6620406c7280a1f56b53151131350050df8d24af
---- a/snapd-qt/meson.build
-+++ b/snapd-qt/meson.build
-@@ -113,6 +113,7 @@ source_h = [
- 'Snapd/task-data.h',
- 'Snapd/user-information.h',
- 'Snapd/wrapped-object.h',
-+ 'Snapd/snapdqt_global.h',
- ]
-
- source_alias_h = [
diff --git a/sys-libs/snapd-glib/metadata.xml b/sys-libs/snapd-glib/metadata.xml
deleted file mode 100644
index c61751143033..000000000000
--- a/sys-libs/snapd-glib/metadata.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>nowa@gentoo.org</email>
- <name>Nowa Ammerlaan</name>
- </maintainer>
- <upstream>
- <remote-id type="github">snapcore/snapd-glib</remote-id>
- </upstream>
- <use>
- <flag name="qml">Build the QML bindings</flag>
- </use>
-</pkgmetadata>
diff --git a/sys-libs/snapd-glib/snapd-glib-1.67-r1.ebuild b/sys-libs/snapd-glib/snapd-glib-1.67-r1.ebuild
deleted file mode 100644
index 95b65f24091d..000000000000
--- a/sys-libs/snapd-glib/snapd-glib-1.67-r1.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 2019-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit meson vala
-
-DESCRIPTION="glib library for communicating with snapd"
-HOMEPAGE="https://snapcraft.io/"
-SRC_URI="https://github.com/canonical/snapd-glib/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="LGPL-3"
-SLOT="0/1"
-KEYWORDS="amd64"
-
-IUSE="doc introspection qml qt6 vala"
-REQUIRED_USE="
- qml? ( qt6 )
- vala? ( introspection )
-"
-
-BDEPEND="
- virtual/pkgconfig
- sys-devel/gettext
- qt6? ( dev-qt/qttools:6[linguist] )
-"
-
-DEPEND="
- dev-libs/json-glib
- dev-libs/glib:2
- dev-util/glib-utils
- net-libs/libsoup:3.0
- doc? (
- dev-build/gtk-doc-am
- dev-util/gi-docgen
- dev-util/gtk-doc
- )
- introspection? ( >=dev-libs/gobject-introspection-1.82.0-r2 )
- qml? (
- qt6? ( dev-qt/qtdeclarative:6 )
- )
- qt6? (
- dev-qt/qtbase:6[network,widgets]
- )
- vala? ( $(vala_depend) )
-"
-
-RDEPEND="${DEPEND}
- app-containers/snapd
-"
-
-PATCHES=(
- # https://github.com/canonical/snapd-glib/commit/6620406c7280a1f56b53151131350050df8d24af
- "${FILESDIR}/${P}-install-missing-header.patch"
-)
-
-pkg_setup() {
- vala_setup
-}
-
-src_configure() {
- local emesonargs=(
- "$(meson_use doc docs)"
- "$(meson_use introspection)"
- "$(meson_use qml qml-bindings)"
- "$(meson_use qt6)"
- "$(meson_use vala vala-bindings)"
- -Dsoup2=false
- -Dqt5=false
- )
-
- meson_src_configure
-}
-
-src_install() {
- meson_src_install
- if use doc; then
- dodir /usr/share/gtk-doc/html/
- mv "${ED}/usr/share/doc/${PN}" "${ED}/usr/share/gtk-doc/html/${PF}" || die
- fi
-}
diff --git a/sys-libs/snapd-glib/snapd-glib-1.70.ebuild b/sys-libs/snapd-glib/snapd-glib-1.70.ebuild
deleted file mode 100644
index 3e1a2e3e0280..000000000000
--- a/sys-libs/snapd-glib/snapd-glib-1.70.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 2019-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit meson vala
-
-DESCRIPTION="glib library for communicating with snapd"
-HOMEPAGE="https://snapcraft.io/"
-SRC_URI="https://github.com/canonical/snapd-glib/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="LGPL-3"
-SLOT="0/1"
-KEYWORDS="amd64"
-
-IUSE="doc introspection qml qt6 vala"
-REQUIRED_USE="
- qml? ( qt6 )
- vala? ( introspection )
-"
-
-BDEPEND="
- virtual/pkgconfig
- sys-devel/gettext
- qt6? ( dev-qt/qttools:6[linguist] )
-"
-
-DEPEND="
- dev-libs/json-glib
- dev-libs/glib:2
- dev-util/glib-utils
- net-libs/libsoup:3.0
- doc? (
- dev-build/gtk-doc-am
- dev-util/gi-docgen
- dev-util/gtk-doc
- )
- introspection? ( >=dev-libs/gobject-introspection-1.82.0-r2 )
- qml? (
- qt6? ( dev-qt/qtdeclarative:6 )
- )
- qt6? (
- dev-qt/qtbase:6[network,widgets]
- )
- vala? ( $(vala_depend) )
-"
-
-RDEPEND="${DEPEND}
- app-containers/snapd
-"
-
-pkg_setup() {
- vala_setup
-}
-
-src_configure() {
- local emesonargs=(
- "$(meson_use doc docs)"
- "$(meson_use introspection)"
- "$(meson_use qml qml-bindings)"
- "$(meson_use qt6)"
- "$(meson_use vala vala-bindings)"
- -Dsoup2=false
- -Dqt5=false
- )
-
- meson_src_configure
-}
-
-src_install() {
- meson_src_install
- if use doc; then
- dodir /usr/share/gtk-doc/html/
- mv "${ED}/usr/share/doc/${PN}" "${ED}/usr/share/gtk-doc/html/${PF}" || die
- fi
-}
diff --git a/sys-libs/snapd-glib/snapd-glib-1.72.ebuild b/sys-libs/snapd-glib/snapd-glib-1.72.ebuild
deleted file mode 100644
index b929a819dd92..000000000000
--- a/sys-libs/snapd-glib/snapd-glib-1.72.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 2019-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit meson vala
-
-DESCRIPTION="glib library for communicating with snapd"
-HOMEPAGE="https://snapcraft.io/"
-SRC_URI="https://github.com/canonical/snapd-glib/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="LGPL-3"
-SLOT="0/1"
-KEYWORDS="~amd64"
-
-IUSE="doc introspection qml qt6 vala"
-REQUIRED_USE="
- qml? ( qt6 )
- vala? ( introspection )
-"
-
-BDEPEND="
- virtual/pkgconfig
- sys-devel/gettext
- qt6? ( dev-qt/qttools:6[linguist] )
-"
-
-DEPEND="
- dev-libs/json-glib
- dev-libs/glib:2
- dev-util/glib-utils
- net-libs/libsoup:3.0
- doc? (
- dev-build/gtk-doc-am
- dev-util/gi-docgen
- dev-util/gtk-doc
- )
- introspection? ( >=dev-libs/gobject-introspection-1.82.0-r2 )
- qml? (
- qt6? ( dev-qt/qtdeclarative:6 )
- )
- qt6? (
- dev-qt/qtbase:6[network,widgets]
- )
- vala? ( $(vala_depend) )
-"
-
-RDEPEND="${DEPEND}
- app-containers/snapd
-"
-
-pkg_setup() {
- vala_setup
-}
-
-src_configure() {
- local emesonargs=(
- "$(meson_use doc docs)"
- "$(meson_use introspection)"
- "$(meson_use qml qml-bindings)"
- "$(meson_use qt6)"
- "$(meson_use vala vala-bindings)"
- -Dsoup2=false
- -Dqt5=false
- )
-
- meson_src_configure
-}
-
-src_install() {
- meson_src_install
- if use doc; then
- dodir /usr/share/gtk-doc/html/
- mv "${ED}/usr/share/doc/${PN}" "${ED}/usr/share/gtk-doc/html/${PF}" || die
- fi
-}
diff --git a/sys-libs/solo-udev-rules/Manifest b/sys-libs/solo-udev-rules/Manifest
deleted file mode 100644
index 51c6a757385a..000000000000
--- a/sys-libs/solo-udev-rules/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST solo1-4.1.5.tar.gz 1179783 BLAKE2B 9a76bc48b1f404dbd5d919ca8794ab20e7e8474bfe77430e7c60008306c51213535814fd873d04fd4182e704566d0bb545ab354fdf35e2236cffad13727468d7 SHA512 3e6196e37d4e9ab90dda59f2cc323ac47d0bad4e281f1de013449365ba7d8687daf96187b41ec01acc9843b69b5108e0192caa9846e75ede73fffeac36b308e3
diff --git a/sys-libs/solo-udev-rules/metadata.xml b/sys-libs/solo-udev-rules/metadata.xml
deleted file mode 100644
index 9794498334a1..000000000000
--- a/sys-libs/solo-udev-rules/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>tea+gentoo@cuddleslut.fr</email>
- <name>tea</name>
- </maintainer>
- <upstream>
- <remote-id type="github">solokeys/solo1</remote-id>
- <bugs-to>https://github.com/solokeys/solo1/issues</bugs-to>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/solo-udev-rules/solo-udev-rules-4.1.5.ebuild b/sys-libs/solo-udev-rules/solo-udev-rules-4.1.5.ebuild
deleted file mode 100644
index ae63e3e8d0d4..000000000000
--- a/sys-libs/solo-udev-rules/solo-udev-rules-4.1.5.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 2020, 2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit udev
-
-MY_P="solo1-${PV}"
-DESCRIPTION="udev rules for the Solo FIDO2 & U2F USB+NFC security key"
-HOMEPAGE="
- https://solokeys.com/
- https://github.com/solokeys/solo1
-"
-SRC_URI="https://github.com/solokeys/solo1/archive/${PV}.tar.gz -> ${MY_P}.tar.gz"
-
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="|| ( Apache-2.0 MIT )"
-SLOT="0"
-KEYWORDS="~amd64"
-
-RDEPEND="virtual/udev"
-DEPEND="${RDEPEND}"
-
-src_compile() {
- # Omitting src_compile() would invoke make, leaving it empty is not allowed.
- :
-}
-
-src_install() {
- udev_dorules udev/70-solokeys-access.rules
-}
-
-pkg_postinst() {
- udev_reload
-}
-
-pkg_postrm() {
- udev_reload
-}
diff --git a/sys-libs/spiral/Manifest b/sys-libs/spiral/Manifest
deleted file mode 100644
index 9346c1775db3..000000000000
--- a/sys-libs/spiral/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST spiral-0.3.0.tar.gz 599235 BLAKE2B 7f538ad7feffa17116080c65ed1093944903a878f6a44144c5c1196a654c4fcebc3d1497fbda35699c7c5057a39807546140934503d8d53ad8f9a31ee0c22d02 SHA512 92c59a1a9290563418ecc03235f7a38d70174e281ff1c4fd0e0d3c5ec4cc3426faad935a074bc4111b3ee4449061f3653e6a1d07c68ed65d0473b4b8a0200e66
-DIST zg-0.14.1-oGqU3IAHtAJCxWhVUNS_qBzp2TacF4nUJ-v2-gDt66OQ.tar.gz 10568294 BLAKE2B 60a75ed6a303fba55f0285f04486911da75bdfa22bcbed204d988acf4dc2994204edb21dbf76cd7dd4e4f67ebc22893c65e70f40d5bba8c11da2ae62b40613b0 SHA512 67b9fdb5321a8458a6e358208358fec4a9bc6a6cf0c7a78407cefea9cbbff6130dc5fdb5a05b1cf627356465257ef3102c147ecc2c228d19d3c1bcbcd7bcb7e6
diff --git a/sys-libs/spiral/metadata.xml b/sys-libs/spiral/metadata.xml
deleted file mode 100644
index a6a01630ebfa..000000000000
--- a/sys-libs/spiral/metadata.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>author@lch361.net</email>
- <name>Lich</name>
- </maintainer>
- <longdescription>
- A minimalistic, composable, no-system-dependency command line editing
- library. Provides support for keybindings, selection of text, modal editing,
- history, syntax highlighting and more. Has an API composed of reading input,
- editing line and rendering the user interface. Available as a Zig module and
- C header file.
- </longdescription>
- <use>
- <flag name="term">Compile spiral_term* functions</flag>
- <flag name="editor">Compile spiral_editor* functions</flag>
- <flag name="screen">Compile spiral_screen* functions</flag>
- </use>
- <upstream>
- <remote-id type="codeberg">lch361/spiral</remote-id>
- <maintainer>
- <email>author@lch361.net</email>
- <name>Lich</name>
- </maintainer>
- <bugs-to>https://codeberg.org/lch361/spiral/issues</bugs-to>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/spiral/spiral-0.3.0.ebuild b/sys-libs/spiral/spiral-0.3.0.ebuild
deleted file mode 100644
index ad76069e859f..000000000000
--- a/sys-libs/spiral/spiral-0.3.0.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# Generated by zig-ebuilder 0.3.0
-
-EAPI=8
-
-DESCRIPTION="A Helix and Readline inspired line editor"
-HOMEPAGE="https://codeberg.org/lch361/spiral"
-
-declare -g -r -A ZBS_DEPENDENCIES=(
- [zg-0.14.1-oGqU3IAHtAJCxWhVUNS_qBzp2TacF4nUJ-v2-gDt66OQ.tar.gz]='https://codeberg.org/lch361/zg/archive/d49c679a66fbac3516798ac7db6050d42ad4280e.tar.gz'
-)
-
-ZIG_SLOT="0.14"
-inherit zig
-
-SRC_URI="
- https://codeberg.org/lch361/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
- ${ZBS_DEPENDENCIES_SRC_URI}
-"
-S="${WORKDIR}/${PN}"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64"
-DOCS=("README.md" "LICENSE.txt")
-
-IUSE="+term +editor +screen static-libs"
-
-src_configure() {
- local my_zbs_args=(
- -Dinstall-h
- )
- for feature in term editor screen; do
- if use $feature; then
- my_zbs_args+=(-Dfeatures=$feature)
- fi
- done
-
- zig_src_configure
-}
-
-src_compile() {
- zig_src_compile
- if use static-libs; then
- zig_src_compile -Dlinkage=static
- fi
-}
-
-src_install() {
- zig_src_install
- if use static-libs; then
- zig_src_install -Dlinkage=static
- fi
-}
diff --git a/sys-libs/talloc/Manifest b/sys-libs/talloc/Manifest
deleted file mode 100644
index 742c16d85485..000000000000
--- a/sys-libs/talloc/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST talloc-2.4.2.tar.gz 679750 BLAKE2B 1f836d6b11e096e399ad7b99ad4abd3c140e75ee307695659c35b89eca600de247e5432bce523a299334f20ca2dad4c726b783a94c546b67fe25b2b7199b2915 SHA512 fb91665ffbe0cce96b1359940ff3ed21330c81c5331140788a26aa94f82b50492176e6000ff54b31d1a434bb1cb53a6a2c7894153545252a1fd91bda7c05a213
-DIST talloc-2.4.3.tar.gz 684092 BLAKE2B 5299ea4f19afd6b623f0c98514bdf4ae80121af3f4b38963cf2d39a8a9fdac3bd4a3119a606bc04f2a48a991bb98e7a66643e26e4f68427c64d3675b838ccc2d SHA512 7174a069dd3d4ebf8c04fee3434fd50269015bb8f039839e7e7723f431d089b66fb0167e8893bff2d1c392de1ac33665e5b278168246da30d528d522b0e1d5bd
-DIST talloc-2.4.4.tar.gz 684541 BLAKE2B 6d30a6d81e516a3361a9bb7bd9d0a039b65dc774828a836fda0a9a2f9efa2006a136a8ccff0103b28c12daa9cf75bd4d8ee8b065f9559a93dd1d3cb1132f716a SHA512 3273ef4f2de463293a515df8269cd585c46a1cae1889455d7c3438399541769cb5c55944ad77257ae6498cecbcc0c65bc81843b70d1f98b5e7fd107f67eec867
diff --git a/sys-libs/talloc/metadata.xml b/sys-libs/talloc/metadata.xml
deleted file mode 100644
index 74582fbea828..000000000000
--- a/sys-libs/talloc/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>samba@gentoo.org</email>
- <name>Samba</name>
- </maintainer>
- <use>
- <flag name="compat">Enable extra compatibility stuff</flag>
- </use>
-</pkgmetadata>
diff --git a/sys-libs/talloc/talloc-2.4.2.ebuild b/sys-libs/talloc/talloc-2.4.2.ebuild
deleted file mode 100644
index d67ca7c46d21..000000000000
--- a/sys-libs/talloc/talloc-2.4.2.ebuild
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="threads(+)"
-inherit waf-utils python-single-r1 multilib-minimal flag-o-matic
-
-DESCRIPTION="Samba talloc library"
-HOMEPAGE="https://talloc.samba.org/"
-SRC_URI="https://www.samba.org/ftp/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-3 LGPL-3+ LGPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
-IUSE="compat +python test valgrind"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- !elibc_SunOS? (
- !elibc_Darwin? (
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- )
- )
- python? ( ${PYTHON_DEPS} )
-"
-# Valgrind is automagic here but it's a build-only dep so it's not so bad.
-DEPEND="
- ${RDEPEND}
- valgrind? ( dev-debug/valgrind )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- dev-libs/libxslt
- sys-devel/gettext
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-MULTILIB_WRAPPED_HEADERS=(
- # python goes only for native
- /usr/include/pytalloc.h
-)
-
-pkg_setup() {
- # Try to turn off distcc and ccache for people that have a problem with it
- export DISTCC_DISABLE=1
- export CCACHE_DISABLE=1
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # Drop irritating ABI names (e.g. cpython-37m)
- # We're only installing one implementation anyway
- sed -i "s/+ conf.all_envs\['default'\]\['PYTHON_SO_ABI_FLAG'\]//" wscript || die
- sed -i "s/name = bld.pyembed_libname('pytalloc-util')/name = 'pytalloc-util'/" wscript || die
- fi
-
- if use test ; then
- # TODO: Fix python tests to run w/ USE=python.
- truncate -s0 test_pytalloc.py || die
- fi
-
- # WAF
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local extra_opts=(
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --disable-dependency-tracking
- --disable-warnings-as-errors
-
- $(usev compat --enable-talloc-compat1)
- $(multilib_native_usex python '' --disable-python)
- $([[ ${CHOST} == *-solaris* ]] && echo '--disable-symbol-versions')
- )
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version) # bug 914712
-
- waf-utils_src_configure "${extra_opts[@]}"
-}
-
-multilib_src_compile() {
- waf-utils_src_compile
-}
-
-multilib_src_install() {
- waf-utils_src_install
-
- # waf is stupid, and no, we can't fix the build-system, since it's provided
- # as a brilliant binary blob thats decompressed on the fly
- if [[ ${CHOST} == *-darwin* ]] ; then
- install_name_tool \
- -id "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${ED}"/usr/$(get_libdir)/libtalloc.${PV}.dylib || die
-
- if use python ; then
- install_name_tool \
- -id "${EPREFIX}"/usr/$(get_libdir)/libpytalloc-util.2.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.${PV}.dylib || die
- install_name_tool \
- -change "${BUILD_DIR}/bin/default/libtalloc.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.${PV}.dylib || die
-
- install_name_tool \
- -id "${EPREFIX}"/usr/$(get_libdir)/libpytalloc-util.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.dylib || die
- install_name_tool \
- -change "${BUILD_DIR}/bin/default/libtalloc.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.dylib || die
-
- install_name_tool \
- -change "${BUILD_DIR}/bin/default/libpytalloc-util.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libpytalloc-util.dylib \
- "${D}"$(python_get_sitedir)/talloc*.bundle || die
- install_name_tool \
- -change "${BUILD_DIR}/bin/default/libtalloc.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${D}"$(python_get_sitedir)/talloc*.bundle || die
- fi
- fi
-}
diff --git a/sys-libs/talloc/talloc-2.4.3.ebuild b/sys-libs/talloc/talloc-2.4.3.ebuild
deleted file mode 100644
index d67ca7c46d21..000000000000
--- a/sys-libs/talloc/talloc-2.4.3.ebuild
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="threads(+)"
-inherit waf-utils python-single-r1 multilib-minimal flag-o-matic
-
-DESCRIPTION="Samba talloc library"
-HOMEPAGE="https://talloc.samba.org/"
-SRC_URI="https://www.samba.org/ftp/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-3 LGPL-3+ LGPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
-IUSE="compat +python test valgrind"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- !elibc_SunOS? (
- !elibc_Darwin? (
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- )
- )
- python? ( ${PYTHON_DEPS} )
-"
-# Valgrind is automagic here but it's a build-only dep so it's not so bad.
-DEPEND="
- ${RDEPEND}
- valgrind? ( dev-debug/valgrind )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- dev-libs/libxslt
- sys-devel/gettext
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-MULTILIB_WRAPPED_HEADERS=(
- # python goes only for native
- /usr/include/pytalloc.h
-)
-
-pkg_setup() {
- # Try to turn off distcc and ccache for people that have a problem with it
- export DISTCC_DISABLE=1
- export CCACHE_DISABLE=1
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # Drop irritating ABI names (e.g. cpython-37m)
- # We're only installing one implementation anyway
- sed -i "s/+ conf.all_envs\['default'\]\['PYTHON_SO_ABI_FLAG'\]//" wscript || die
- sed -i "s/name = bld.pyembed_libname('pytalloc-util')/name = 'pytalloc-util'/" wscript || die
- fi
-
- if use test ; then
- # TODO: Fix python tests to run w/ USE=python.
- truncate -s0 test_pytalloc.py || die
- fi
-
- # WAF
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local extra_opts=(
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --disable-dependency-tracking
- --disable-warnings-as-errors
-
- $(usev compat --enable-talloc-compat1)
- $(multilib_native_usex python '' --disable-python)
- $([[ ${CHOST} == *-solaris* ]] && echo '--disable-symbol-versions')
- )
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version) # bug 914712
-
- waf-utils_src_configure "${extra_opts[@]}"
-}
-
-multilib_src_compile() {
- waf-utils_src_compile
-}
-
-multilib_src_install() {
- waf-utils_src_install
-
- # waf is stupid, and no, we can't fix the build-system, since it's provided
- # as a brilliant binary blob thats decompressed on the fly
- if [[ ${CHOST} == *-darwin* ]] ; then
- install_name_tool \
- -id "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${ED}"/usr/$(get_libdir)/libtalloc.${PV}.dylib || die
-
- if use python ; then
- install_name_tool \
- -id "${EPREFIX}"/usr/$(get_libdir)/libpytalloc-util.2.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.${PV}.dylib || die
- install_name_tool \
- -change "${BUILD_DIR}/bin/default/libtalloc.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.${PV}.dylib || die
-
- install_name_tool \
- -id "${EPREFIX}"/usr/$(get_libdir)/libpytalloc-util.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.dylib || die
- install_name_tool \
- -change "${BUILD_DIR}/bin/default/libtalloc.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.dylib || die
-
- install_name_tool \
- -change "${BUILD_DIR}/bin/default/libpytalloc-util.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libpytalloc-util.dylib \
- "${D}"$(python_get_sitedir)/talloc*.bundle || die
- install_name_tool \
- -change "${BUILD_DIR}/bin/default/libtalloc.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${D}"$(python_get_sitedir)/talloc*.bundle || die
- fi
- fi
-}
diff --git a/sys-libs/talloc/talloc-2.4.4.ebuild b/sys-libs/talloc/talloc-2.4.4.ebuild
deleted file mode 100644
index c8cf8128828b..000000000000
--- a/sys-libs/talloc/talloc-2.4.4.ebuild
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="threads(+)"
-inherit waf-utils python-single-r1 multilib-minimal flag-o-matic
-
-DESCRIPTION="Samba talloc library"
-HOMEPAGE="https://talloc.samba.org/"
-SRC_URI="https://www.samba.org/ftp/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-3 LGPL-3+ LGPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
-IUSE="compat +python test valgrind"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- !elibc_SunOS? (
- !elibc_Darwin? (
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- )
- )
- python? ( ${PYTHON_DEPS} )
-"
-# Valgrind is automagic here but it's a build-only dep so it's not so bad.
-DEPEND="
- ${RDEPEND}
- valgrind? ( dev-debug/valgrind )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- dev-libs/libxslt
- sys-devel/gettext
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-MULTILIB_WRAPPED_HEADERS=(
- # python goes only for native
- /usr/include/pytalloc.h
-)
-
-pkg_setup() {
- # Try to turn off distcc and ccache for people that have a problem with it
- export DISTCC_DISABLE=1
- export CCACHE_DISABLE=1
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # Drop irritating ABI names (e.g. cpython-37m)
- # We're only installing one implementation anyway
- sed -i "s/+ conf.all_envs\['default'\]\['PYTHON_SO_ABI_FLAG'\]//" wscript || die
- sed -i "s/name = bld.pyembed_libname('pytalloc-util')/name = 'pytalloc-util'/" wscript || die
- fi
-
- if use test ; then
- # TODO: Fix python tests to run w/ USE=python.
- truncate -s0 test_pytalloc.py || die
- fi
-
- # WAF
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local extra_opts=(
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --disable-dependency-tracking
- --disable-warnings-as-errors
-
- $(usev compat --enable-talloc-compat1)
- $(multilib_native_usex python '' --disable-python)
- $([[ ${CHOST} == *-solaris* ]] && echo '--disable-symbol-versions')
- )
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version) # bug 914712
-
- waf-utils_src_configure "${extra_opts[@]}"
-}
-
-multilib_src_compile() {
- waf-utils_src_compile
-}
-
-multilib_src_install() {
- waf-utils_src_install
-
- # waf is stupid, and no, we can't fix the build-system, since it's provided
- # as a brilliant binary blob thats decompressed on the fly
- if [[ ${CHOST} == *-darwin* ]] ; then
- install_name_tool \
- -id "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${ED}"/usr/$(get_libdir)/libtalloc.${PV}.dylib || die
-
- if use python ; then
- install_name_tool \
- -id "${EPREFIX}"/usr/$(get_libdir)/libpytalloc-util.2.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.${PV}.dylib || die
- install_name_tool \
- -change "${BUILD_DIR}/bin/default/libtalloc.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.${PV}.dylib || die
-
- install_name_tool \
- -id "${EPREFIX}"/usr/$(get_libdir)/libpytalloc-util.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.dylib || die
- install_name_tool \
- -change "${BUILD_DIR}/bin/default/libtalloc.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.dylib || die
-
- install_name_tool \
- -change "${BUILD_DIR}/bin/default/libpytalloc-util.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libpytalloc-util.dylib \
- "${D}"$(python_get_sitedir)/talloc*.bundle || die
- install_name_tool \
- -change "${BUILD_DIR}/bin/default/libtalloc.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${D}"$(python_get_sitedir)/talloc*.bundle || die
- fi
- fi
-}
diff --git a/sys-libs/tdb/Manifest b/sys-libs/tdb/Manifest
deleted file mode 100644
index 3ebd4a53c577..000000000000
--- a/sys-libs/tdb/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST tdb-1.4.12.tar.gz 748827 BLAKE2B a21d4d6335306ed43d099629960856b1f4e94be046d43b4c3d1cb7a1d929dcb7146f385d4a1c2e8ef3a22af73f7e4db9d2a6f032a7501946dd7fdcbead377661 SHA512 f41644ae29da7fed26959e4f2e3664e58ec65681b0b7115fbb296a7a8c5642c8190dac6e16e5704b322469466dd5aa15c1f7f72df8226ac9c695b5b10ac85b66
-DIST tdb-1.4.13.tar.gz 751677 BLAKE2B 25b8b3246dd0f19c8522a14b70df32b08f6cff9c61dc643e84f3c3d65be55acae5963b19bb271cff96f226c494f790c6763bcacd8513fe64c5e4f8c89e2d4754 SHA512 23cbabaf272947d65ab6ba22481ecbf2b86889f860b223ae650101fbf3c6a19acd179d8da15013502076172876acbf3ee3695e9cdeeaa721ed30920b1bd4937d
-DIST tdb-1.4.14.tar.gz 755817 BLAKE2B 479e0ee3d6d37b2ff9b9b0a84652b7b0b757b80eeb33954020860284d79d2ec5658f63e06b0966de2985bb3d495db9e65f0035caec38b887af337c8d2e7925fb SHA512 6bc9fe158ff6229d63338e83a6538b6370d82e68039756a8e43fa1afca76cfbfbf182b7cbbf7a3cfab51226b8de15a9fde94af2bb231ba265a83c27a660032eb
-DIST tdb-1.4.15.tar.gz 753485 BLAKE2B e867c8f4e9712c1a0ed10dd2d35e9cd51819ff722e4e710efde8b1ed8e20575e752d020fb0b6bc8658a720ea17491c07e30fa0b88c515bfb830f83bf128e6ee4 SHA512 1d2aeffaa4192dbd05b6f6356e7ceed50c4c18ed7080f6ecc9b7731cd7875e9822feafe1c1b281fc369fcd01c972441b5aed4104a421f0f985925815bfa4ed09
diff --git a/sys-libs/tdb/metadata.xml b/sys-libs/tdb/metadata.xml
deleted file mode 100644
index c05a3de2dcc7..000000000000
--- a/sys-libs/tdb/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>samba@gentoo.org</email>
- <name>Samba</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/tdb/tdb-1.4.12.ebuild b/sys-libs/tdb/tdb-1.4.12.ebuild
deleted file mode 100644
index 45d79c3c0402..000000000000
--- a/sys-libs/tdb/tdb-1.4.12.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="threads(+)"
-inherit waf-utils multilib-minimal python-single-r1 flag-o-matic
-
-DESCRIPTION="Simple database API"
-HOMEPAGE="https://tdb.samba.org/"
-SRC_URI="https://samba.org/ftp/tdb/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="python test"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- python? ( ${PYTHON_DEPS} )
-"
-DEPEND="
- ${RDEPEND}
- virtual/libcrypt
-"
-BDEPEND="
- ${PYTHON_DEPS}
- app-text/docbook-xml-dtd:4.2
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-src_prepare() {
- default
-
- python_fix_shebang .
-
- if use test ; then
- # TODO: Fix python tests to run w/ USE=python.
- truncate -s0 python/tests/simple.py || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- #MAKEOPTS+=" -j1"
-
- local extra_opts=(
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --disable-dependency-tracking
- --disable-warnings-as-errors
- )
-
- if ! multilib_is_native_abi || ! use python ; then
- extra_opts+=( --disable-python )
- fi
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version) # bug 914857
-
- waf-utils_src_configure "${extra_opts[@]}"
-}
-
-multilib_src_compile() {
- waf-utils_src_compile
-}
-
-multilib_src_test() {
- # the default src_test runs 'make test' and 'make check', letting
- # the tests fail occasionally (reason: unknown)
- emake check WAF_BIN="${WAF_BINARY}"
-}
-
-multilib_src_install() {
- waf-utils_src_install
- use python && python_optimize
-}
diff --git a/sys-libs/tdb/tdb-1.4.13.ebuild b/sys-libs/tdb/tdb-1.4.13.ebuild
deleted file mode 100644
index 45d79c3c0402..000000000000
--- a/sys-libs/tdb/tdb-1.4.13.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="threads(+)"
-inherit waf-utils multilib-minimal python-single-r1 flag-o-matic
-
-DESCRIPTION="Simple database API"
-HOMEPAGE="https://tdb.samba.org/"
-SRC_URI="https://samba.org/ftp/tdb/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="python test"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- python? ( ${PYTHON_DEPS} )
-"
-DEPEND="
- ${RDEPEND}
- virtual/libcrypt
-"
-BDEPEND="
- ${PYTHON_DEPS}
- app-text/docbook-xml-dtd:4.2
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-src_prepare() {
- default
-
- python_fix_shebang .
-
- if use test ; then
- # TODO: Fix python tests to run w/ USE=python.
- truncate -s0 python/tests/simple.py || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- #MAKEOPTS+=" -j1"
-
- local extra_opts=(
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --disable-dependency-tracking
- --disable-warnings-as-errors
- )
-
- if ! multilib_is_native_abi || ! use python ; then
- extra_opts+=( --disable-python )
- fi
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version) # bug 914857
-
- waf-utils_src_configure "${extra_opts[@]}"
-}
-
-multilib_src_compile() {
- waf-utils_src_compile
-}
-
-multilib_src_test() {
- # the default src_test runs 'make test' and 'make check', letting
- # the tests fail occasionally (reason: unknown)
- emake check WAF_BIN="${WAF_BINARY}"
-}
-
-multilib_src_install() {
- waf-utils_src_install
- use python && python_optimize
-}
diff --git a/sys-libs/tdb/tdb-1.4.14.ebuild b/sys-libs/tdb/tdb-1.4.14.ebuild
deleted file mode 100644
index a55b1db4022b..000000000000
--- a/sys-libs/tdb/tdb-1.4.14.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="threads(+)"
-inherit flag-o-matic waf-utils multilib-minimal python-single-r1
-
-DESCRIPTION="Simple database API"
-HOMEPAGE="https://tdb.samba.org/"
-SRC_URI="https://samba.org/ftp/tdb/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="python test"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- python? ( ${PYTHON_DEPS} )
-"
-DEPEND="
- ${RDEPEND}
- virtual/libcrypt
-"
-BDEPEND="
- ${PYTHON_DEPS}
- app-text/docbook-xml-dtd:4.2
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-src_prepare() {
- default
-
- python_fix_shebang .
-
- if use test ; then
- # TODO: Fix python tests to run w/ USE=python.
- truncate -s0 python/tests/simple.py || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- #MAKEOPTS+=" -j1"
-
- local extra_opts=(
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --disable-dependency-tracking
- --disable-warnings-as-errors
- )
-
- if ! multilib_is_native_abi || ! use python ; then
- extra_opts+=( --disable-python )
- fi
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version) # bug 914857
-
- waf-utils_src_configure "${extra_opts[@]}"
-}
-
-multilib_src_compile() {
- waf-utils_src_compile
-}
-
-multilib_src_test() {
- # the default src_test runs 'make test' and 'make check', letting
- # the tests fail occasionally (reason: unknown)
- emake check WAF_BIN="${WAF_BINARY}"
-}
-
-multilib_src_install() {
- waf-utils_src_install
- use python && python_optimize
-}
diff --git a/sys-libs/tdb/tdb-1.4.15.ebuild b/sys-libs/tdb/tdb-1.4.15.ebuild
deleted file mode 100644
index a55b1db4022b..000000000000
--- a/sys-libs/tdb/tdb-1.4.15.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="threads(+)"
-inherit flag-o-matic waf-utils multilib-minimal python-single-r1
-
-DESCRIPTION="Simple database API"
-HOMEPAGE="https://tdb.samba.org/"
-SRC_URI="https://samba.org/ftp/tdb/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="python test"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- python? ( ${PYTHON_DEPS} )
-"
-DEPEND="
- ${RDEPEND}
- virtual/libcrypt
-"
-BDEPEND="
- ${PYTHON_DEPS}
- app-text/docbook-xml-dtd:4.2
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-src_prepare() {
- default
-
- python_fix_shebang .
-
- if use test ; then
- # TODO: Fix python tests to run w/ USE=python.
- truncate -s0 python/tests/simple.py || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- #MAKEOPTS+=" -j1"
-
- local extra_opts=(
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- --disable-dependency-tracking
- --disable-warnings-as-errors
- )
-
- if ! multilib_is_native_abi || ! use python ; then
- extra_opts+=( --disable-python )
- fi
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version) # bug 914857
-
- waf-utils_src_configure "${extra_opts[@]}"
-}
-
-multilib_src_compile() {
- waf-utils_src_compile
-}
-
-multilib_src_test() {
- # the default src_test runs 'make test' and 'make check', letting
- # the tests fail occasionally (reason: unknown)
- emake check WAF_BIN="${WAF_BINARY}"
-}
-
-multilib_src_install() {
- waf-utils_src_install
- use python && python_optimize
-}
diff --git a/sys-libs/tevent/Manifest b/sys-libs/tevent/Manifest
deleted file mode 100644
index 38a1b9550225..000000000000
--- a/sys-libs/tevent/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST tevent-0.16.1.tar.gz 890010 BLAKE2B 34639cf0e63193eebdb9c3f845390685d66916c6a687f22fbe25dbe175d3279752dfea1e3567fdb2eed3bea17108b9b226039cb1218c0536fc1eb7f4e0a025ab SHA512 cda001d91728b2f28dd081e9c5f6d8ede345dcd9ce1dca04394860cd83090c15aa8dfef1c53b73e120bd17f0d95551fa9301eb4927963314556d016fe5420a39
-DIST tevent-0.16.2.tar.gz 897447 BLAKE2B d23d60f5e5478899daab248c6a2b8d9b67d19a881bf1cfec2803e4fa538f2f59333b3e28c729a1072b3ec3b528961faf63ccd60fdc92f229a73e358fdcdb080e SHA512 c644771227fd1ee9f221e8cac1be9db97043953670a29415a20f3f8933d4fa93c7421b991a4ecaac0b9b29e922d1ec2f436160f2d2eaf77c6d392f1dec212417
-DIST tevent-0.17.1.tar.gz 902444 BLAKE2B 20a6b205a58c982105462dbf49678e8dd8601d7f39af7e09e7cbb190a963901800ddaff9d5b09dbebe590dadea8c09d61946c0c398563cf7eb6eda1f473bc6ae SHA512 781f8aced9ad135e64ce3953a013434feb84a6945ccfbce58a6ff21cb3da48af1e32324a5a950a55256a02545c2e1808a4cd8b209a3f970375347c8b390df258
diff --git a/sys-libs/tevent/metadata.xml b/sys-libs/tevent/metadata.xml
deleted file mode 100644
index 09a9748a01cd..000000000000
--- a/sys-libs/tevent/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>samba@gentoo.org</email>
- <name>Samba</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/tevent/tevent-0.16.1.ebuild b/sys-libs/tevent/tevent-0.16.1.ebuild
deleted file mode 100644
index 179556e4f2a8..000000000000
--- a/sys-libs/tevent/tevent-0.16.1.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="threads(+)"
-inherit waf-utils multilib-minimal python-single-r1 flag-o-matic
-
-DESCRIPTION="Samba tevent library"
-HOMEPAGE="https://tevent.samba.org/"
-SRC_URI="https://samba.org/ftp/tevent/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="python test"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-TALLOC_VERSION="2.4.2"
-
-RDEPEND="
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- >=sys-libs/talloc-${TALLOC_VERSION}[${MULTILIB_USEDEP}]
- python? (
- ${PYTHON_DEPS}
- >=sys-libs/talloc-${TALLOC_VERSION}[python,${PYTHON_SINGLE_USEDEP}]
- )
-"
-DEPEND="
- ${RDEPEND}
- elibc_glibc? (
- net-libs/libtirpc[${MULTILIB_USEDEP}]
- net-libs/rpcsvc-proto
- )
- test? ( >=dev-util/cmocka-1.1.3 )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- virtual/pkgconfig
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-check_samba_dep_versions() {
- actual_talloc_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/talloc/wscript || die)
- if [[ ${actual_talloc_version} != ${TALLOC_VERSION} ]] ; then
- eerror "Source talloc version: ${TALLOC_VERSION}"
- eerror "Ebuild talloc version: ${actual_talloc_version}"
- die "Ebuild needs to fix TALLOC_VERSION!"
- fi
-}
-
-src_prepare() {
- default
-
- check_samba_dep_versions
-
- if use test ; then
- # TODO: Fix python tests to run w/ USE=python.
- # (depsite the name. bindings.py is just for Python tests.)
- truncate -s0 bindings.py || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- # When specifying libs for samba build you must append NONE to the end to
- # stop it automatically including things
- local bundled_libs="NONE"
-
- # We "use" bundled cmocka when we're not running tests as we're
- # not using it anyway. Means we avoid making users install it for
- # no reason. bug #802531
- if ! use test ; then
- bundled_libs="cmocka,${bundled_libs}"
- fi
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version) # bug 915198
-
- waf-utils_src_configure \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --disable-dependency-tracking \
- --disable-warnings-as-errors \
- --bundled-libraries="${bundled_libs}" \
- --builtin-libraries=NONE \
- $(multilib_native_usex python '' '--disable-python')
-}
-
-multilib_src_compile() {
- waf-utils_src_compile
-}
-
-multilib_src_install() {
- waf-utils_src_install
-
- multilib_is_native_abi && use python && python_domodule tevent.py
-}
-
-multilib_src_install_all() {
- insinto /usr/include
- doins tevent_internal.h
-}
diff --git a/sys-libs/tevent/tevent-0.16.2.ebuild b/sys-libs/tevent/tevent-0.16.2.ebuild
deleted file mode 100644
index 48a031b0a868..000000000000
--- a/sys-libs/tevent/tevent-0.16.2.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="threads(+)"
-inherit waf-utils multilib-minimal python-single-r1 flag-o-matic
-
-DESCRIPTION="Samba tevent library"
-HOMEPAGE="https://tevent.samba.org/"
-SRC_URI="https://samba.org/ftp/tevent/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="python test"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-TALLOC_VERSION="2.4.3"
-
-RDEPEND="
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- >=sys-libs/talloc-${TALLOC_VERSION}[${MULTILIB_USEDEP}]
- python? (
- ${PYTHON_DEPS}
- >=sys-libs/talloc-${TALLOC_VERSION}[python,${PYTHON_SINGLE_USEDEP}]
- )
-"
-DEPEND="
- ${RDEPEND}
- elibc_glibc? (
- net-libs/libtirpc[${MULTILIB_USEDEP}]
- net-libs/rpcsvc-proto
- )
- test? ( >=dev-util/cmocka-1.1.3 )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- virtual/pkgconfig
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-check_samba_dep_versions() {
- actual_talloc_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/talloc/wscript || die)
- if [[ ${actual_talloc_version} != ${TALLOC_VERSION} ]] ; then
- eerror "Source talloc version: ${TALLOC_VERSION}"
- eerror "Ebuild talloc version: ${actual_talloc_version}"
- die "Ebuild needs to fix TALLOC_VERSION!"
- fi
-}
-
-src_prepare() {
- default
-
- check_samba_dep_versions
-
- if use test ; then
- # TODO: Fix python tests to run w/ USE=python.
- # (depsite the name. bindings.py is just for Python tests.)
- truncate -s0 bindings.py || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- # When specifying libs for samba build you must append NONE to the end to
- # stop it automatically including things
- local bundled_libs="NONE"
-
- # We "use" bundled cmocka when we're not running tests as we're
- # not using it anyway. Means we avoid making users install it for
- # no reason. bug #802531
- if ! use test ; then
- bundled_libs="cmocka,${bundled_libs}"
- fi
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version) # bug 915198
-
- waf-utils_src_configure \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --disable-dependency-tracking \
- --disable-warnings-as-errors \
- --bundled-libraries="${bundled_libs}" \
- --builtin-libraries=NONE \
- $(multilib_native_usex python '' '--disable-python')
-}
-
-multilib_src_compile() {
- waf-utils_src_compile
-}
-
-multilib_src_install() {
- waf-utils_src_install
-
- multilib_is_native_abi && use python && python_domodule tevent.py
-}
-
-multilib_src_install_all() {
- insinto /usr/include
- doins tevent_internal.h
-}
diff --git a/sys-libs/tevent/tevent-0.17.1.ebuild b/sys-libs/tevent/tevent-0.17.1.ebuild
deleted file mode 100644
index e83a1aa4e866..000000000000
--- a/sys-libs/tevent/tevent-0.17.1.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-PYTHON_REQ_USE="threads(+)"
-inherit flag-o-matic waf-utils multilib-minimal python-single-r1
-
-DESCRIPTION="Samba tevent library"
-HOMEPAGE="https://tevent.samba.org/"
-SRC_URI="https://samba.org/ftp/tevent/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="python test"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-TALLOC_VERSION="2.4.3"
-
-RDEPEND="
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- >=sys-libs/talloc-${TALLOC_VERSION}[${MULTILIB_USEDEP}]
- python? (
- ${PYTHON_DEPS}
- >=sys-libs/talloc-${TALLOC_VERSION}[python,${PYTHON_SINGLE_USEDEP}]
- )
-"
-DEPEND="
- ${RDEPEND}
- elibc_glibc? (
- net-libs/libtirpc[${MULTILIB_USEDEP}]
- net-libs/rpcsvc-proto
- )
- test? ( >=dev-util/cmocka-1.1.3 )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- virtual/pkgconfig
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-check_samba_dep_versions() {
- actual_talloc_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/talloc/wscript || die)
- if [[ ${actual_talloc_version} != ${TALLOC_VERSION} ]] ; then
- eerror "Source talloc version: ${TALLOC_VERSION}"
- eerror "Ebuild talloc version: ${actual_talloc_version}"
- die "Ebuild needs to fix TALLOC_VERSION!"
- fi
-}
-
-src_prepare() {
- default
-
- check_samba_dep_versions
-
- if use test ; then
- # TODO: Fix python tests to run w/ USE=python.
- # (depsite the name. bindings.py is just for Python tests.)
- truncate -s0 bindings.py || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- # When specifying libs for samba build you must append NONE to the end to
- # stop it automatically including things
- local bundled_libs="NONE"
-
- # We "use" bundled cmocka when we're not running tests as we're
- # not using it anyway. Means we avoid making users install it for
- # no reason. bug #802531
- if ! use test ; then
- bundled_libs="cmocka,${bundled_libs}"
- fi
-
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version) # bug 915198
-
- waf-utils_src_configure \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --disable-dependency-tracking \
- --disable-warnings-as-errors \
- --bundled-libraries="${bundled_libs}" \
- --builtin-libraries=NONE \
- $(multilib_native_usex python '' '--disable-python')
-}
-
-multilib_src_compile() {
- waf-utils_src_compile
-}
-
-multilib_src_install() {
- waf-utils_src_install
-
- multilib_is_native_abi && use python && python_domodule tevent.py
-}
-
-multilib_src_install_all() {
- insinto /usr/include
- doins tevent_internal.h
-}
diff --git a/sys-libs/timezone-data/Manifest b/sys-libs/timezone-data/Manifest
deleted file mode 100644
index c44605ec910b..000000000000
--- a/sys-libs/timezone-data/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST tzdb-2026a.tar.lz 559308 BLAKE2B aaa57fb5301dc661d39d3614493d156f9da2066bb6544c0c58e3e267d21658fdcb70412fe10bf14c3d92bdf01deee490fb2a86b6aaf902f7fec9690f863e0860 SHA512 1824fc2e198a449ebaa41e6c679a494c486b848f13fe8f18f948fde0533e99f5f01e7e7298e257c565838d24ec743e824f402887abdf525d1ce578a714c71414
-DIST tzdb-2026b.tar.lz 561562 BLAKE2B d349cf4978a4b027556e6061c51f2120c2e08d31c68418b675bc973ad86a4c6b1ff885784aad6067bbc22b676f489d620f24e6abf8daf68ffa553be271bf6e85 SHA512 5ec7f74f14cd2c70a0730e3690e82bd0ba889ac26c96397c16aa08005473c2c86feb47958b52e0301810c8eb908e6d8faf998ffae75b2337a912cc9e52c0f9e9
diff --git a/sys-libs/timezone-data/metadata.xml b/sys-libs/timezone-data/metadata.xml
deleted file mode 100644
index 3ff1474e992a..000000000000
--- a/sys-libs/timezone-data/metadata.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
- </maintainer>
- <use>
- <flag name="leaps-timezone">
- Install the set of "right" timezones; these timezones include leap seconds
- when counting seconds since the epoch (while POSIX does not) as they are
- based on the TAI (International Atomic Time) clock
- </flag>
- <flag name="zic-slim">
- Default to 'slim' file format for /usr/share/zoneinfo. Otherwise 'fat' format
- is used. Not all programs can handle 'slim' format'.
- </flag>
- </use>
- <upstream>
- <remote-id type="github">eggert/tz</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/timezone-data/timezone-data-2026a.ebuild b/sys-libs/timezone-data/timezone-data-2026a.ebuild
deleted file mode 100644
index 92ec75a9da5e..000000000000
--- a/sys-libs/timezone-data/timezone-data-2026a.ebuild
+++ /dev/null
@@ -1,169 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs flag-o-matic unpacker
-
-DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
-HOMEPAGE="https://www.iana.org/time-zones"
-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 ~arm64-macos ~x64-macos ~x64-solaris"
-IUSE="nls leaps-timezone zic-slim"
-
-DEPEND="nls? ( virtual/libintl )"
-RDEPEND="
- ${DEPEND}
- !sys-libs/glibc[vanilla(+)]
-"
-BDEPEND="$(unpacker_src_uri_depends)"
-
-src_prepare() {
- default
-
- if tc-is-cross-compiler ; then
- cp -pR "${S}" "${S}"-native || die
- fi
-}
-
-src_configure() {
- tc-export CC
-
- # bug #471102
- append-lfs-flags
-
- if use elibc_Darwin ; then
- # bug #138251
- append-cppflags -DSTD_INSPIRED
- fi
-
- append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"'
-
- # Upstream default is 'slim', but it breaks quite a few programs,
- # that parse /etc/localtime directly: bug #747538.
- append-cppflags -DZIC_BLOAT_DEFAULT='\"'$(usex zic-slim slim fat)'\"'
-
- LDLIBS=""
- if use nls ; then
- # See if an external libintl is available. bug #154181, bug #578424
- local c="${T}/test"
- echo 'int main(){}' > "${c}.c" || die
- if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
- LDLIBS+=" -lintl"
- fi
- fi
-}
-
-_emake() {
- emake \
- REDO=$(usex leaps-timezone posix_right posix_only) \
- TOPDIR="${EPREFIX}" \
- ZICDIR='$(TOPDIR)/usr/bin' \
- "$@"
-}
-
-src_compile() {
- tc-export AR CC RANLIB
-
- _emake \
- CFLAGS="${CFLAGS} -std=gnu99 ${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- LDLIBS="${LDLIBS}"
-
- if tc-is-cross-compiler ; then
- _emake -C "${S}"-native \
- AR="$(tc-getBUILD_AR)" \
- CC="$(tc-getBUILD_CC)" \
- RANLIB="$(tc-getBUILD_RANLIB)" \
- CFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}" \
- LDFLAGS="${BUILD_LDFLAGS}" \
- LDLIBS="${LDLIBS}" \
- zic
- fi
-}
-
-src_test() {
- # CURL is used for extended/web based tests. Punt on them.
- emake check CURL=:
-}
-
-src_install() {
- local zic=""
- tc-is-cross-compiler && zic="zic=${S}-native/zic"
- _emake install ${zic} DESTDIR="${D}" LIBDIR="/nukeit"
- rm -rf "${D}/nukeit" "${ED}/etc" || die
-
- insinto /usr/share/zoneinfo
- doins "${S}"/leap-seconds.list
-
- # Delete man pages installed by man-pages package.
- rm "${ED}"/usr/share/man/man5/tzfile.5* "${ED}"/usr/share/man/man8/{tzselect,zdump,zic}.8 || die
- dodoc CONTRIBUTING README NEWS *.html
-}
-
-configure_tz_data() {
- # Make sure the /etc/localtime file does not get stale, bug #127899
- local tz src="${EROOT}/etc/timezone" etc_lt="${EROOT}/etc/localtime"
-
- # If it's a symlink, assume the user knows what they're doing and
- # they're managing it themselves, bug #511474
- if [[ -L "${etc_lt}" ]] ; then
- einfo "Skipping update: ${etc_lt} is a symlink."
- if [[ -e ${src} ]]; then
- einfo "Removing ${src}."
- rm "${src}"
- fi
- return 0
- fi
-
- if [[ ! -e ${src} ]] ; then
- einfo "Skipping update: ${src} does not exist."
- return 0
- fi
-
- tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
-
- if [[ -z ${tz} ]]; then
- einfo "Skipping update: ${src} is empty."
- return 0
- fi
-
- local tzpath="${EROOT}/usr/share/zoneinfo/${tz}"
-
- if [[ ! -e ${tzpath} ]]; then
- ewarn "The timezone specified in ${src} is not valid!"
- return 1
- fi
-
- if [[ -f ${etc_lt} ]]; then
- # If a regular file already exists, copy over it.
- ewarn "Found a regular file at ${etc_lt}."
- ewarn "Some software may expect a symlink instead."
- ewarn "Convert it to a symlink by removing the file and running:"
- ewarn " emerge --config sys-libs/timezone-data"
- einfo "Copying ${tzpath} to ${etc_lt}."
- cp -f "${tzpath}" "${etc_lt}"
- else
- # Otherwise, create a symlink and remove the timezone file.
- tzpath="../usr/share/zoneinfo/${tz}"
- einfo "Linking ${tzpath} at ${etc_lt}."
- if ln -snf "${tzpath}" "${etc_lt}"; then
- einfo "Removing ${src}."
- rm -f "${src}"
- fi
- fi
-}
-
-pkg_config() {
- configure_tz_data
-}
-
-pkg_postinst() {
- configure_tz_data
-}
diff --git a/sys-libs/timezone-data/timezone-data-2026b.ebuild b/sys-libs/timezone-data/timezone-data-2026b.ebuild
deleted file mode 100644
index 782a7c56448d..000000000000
--- a/sys-libs/timezone-data/timezone-data-2026b.ebuild
+++ /dev/null
@@ -1,169 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs flag-o-matic unpacker
-
-DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
-HOMEPAGE="https://www.iana.org/time-zones"
-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 ~arm64-macos ~x64-macos ~x64-solaris"
-IUSE="nls leaps-timezone zic-slim"
-
-DEPEND="nls? ( virtual/libintl )"
-RDEPEND="
- ${DEPEND}
- !sys-libs/glibc[vanilla(+)]
-"
-BDEPEND="$(unpacker_src_uri_depends)"
-
-src_prepare() {
- default
-
- if tc-is-cross-compiler ; then
- cp -pR "${S}" "${S}"-native || die
- fi
-}
-
-src_configure() {
- tc-export CC
-
- # bug #471102
- append-lfs-flags
-
- if use elibc_Darwin ; then
- # bug #138251
- append-cppflags -DSTD_INSPIRED
- fi
-
- append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"'
-
- # Upstream default is 'slim', but it breaks quite a few programs,
- # that parse /etc/localtime directly: bug #747538.
- append-cppflags -DZIC_BLOAT_DEFAULT='\"'$(usex zic-slim slim fat)'\"'
-
- LDLIBS=""
- if use nls ; then
- # See if an external libintl is available. bug #154181, bug #578424
- local c="${T}/test"
- echo 'int main(){}' > "${c}.c" || die
- if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
- LDLIBS+=" -lintl"
- fi
- fi
-}
-
-_emake() {
- emake \
- REDO=$(usex leaps-timezone posix_right posix_only) \
- TOPDIR="${EPREFIX}" \
- ZICDIR='$(TOPDIR)/usr/bin' \
- "$@"
-}
-
-src_compile() {
- tc-export AR CC RANLIB
-
- _emake \
- CFLAGS="${CFLAGS} -std=gnu99 ${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- LDLIBS="${LDLIBS}"
-
- if tc-is-cross-compiler ; then
- _emake -C "${S}"-native \
- AR="$(tc-getBUILD_AR)" \
- CC="$(tc-getBUILD_CC)" \
- RANLIB="$(tc-getBUILD_RANLIB)" \
- CFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}" \
- LDFLAGS="${BUILD_LDFLAGS}" \
- LDLIBS="${LDLIBS}" \
- zic
- fi
-}
-
-src_test() {
- # CURL is used for extended/web based tests. Punt on them.
- emake check CURL=:
-}
-
-src_install() {
- local zic=""
- tc-is-cross-compiler && zic="zic=${S}-native/zic"
- _emake install ${zic} DESTDIR="${D}" LIBDIR="/nukeit"
- rm -rf "${D}/nukeit" "${ED}/etc" || die
-
- insinto /usr/share/zoneinfo
- doins "${S}"/leap-seconds.list
-
- # Delete man pages installed by man-pages package.
- rm "${ED}"/usr/share/man/man5/tzfile.5* "${ED}"/usr/share/man/man8/{tzselect,zdump,zic}.8 || die
- dodoc CONTRIBUTING README NEWS *.html
-}
-
-configure_tz_data() {
- # Make sure the /etc/localtime file does not get stale, bug #127899
- local tz src="${EROOT}/etc/timezone" etc_lt="${EROOT}/etc/localtime"
-
- # If it's a symlink, assume the user knows what they're doing and
- # they're managing it themselves, bug #511474
- if [[ -L "${etc_lt}" ]] ; then
- einfo "Skipping update: ${etc_lt} is a symlink."
- if [[ -e ${src} ]]; then
- einfo "Removing ${src}."
- rm "${src}"
- fi
- return 0
- fi
-
- if [[ ! -e ${src} ]] ; then
- einfo "Skipping update: ${src} does not exist."
- return 0
- fi
-
- tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
-
- if [[ -z ${tz} ]]; then
- einfo "Skipping update: ${src} is empty."
- return 0
- fi
-
- local tzpath="${EROOT}/usr/share/zoneinfo/${tz}"
-
- if [[ ! -e ${tzpath} ]]; then
- ewarn "The timezone specified in ${src} is not valid!"
- return 1
- fi
-
- if [[ -f ${etc_lt} ]]; then
- # If a regular file already exists, copy over it.
- ewarn "Found a regular file at ${etc_lt}."
- ewarn "Some software may expect a symlink instead."
- ewarn "Convert it to a symlink by removing the file and running:"
- ewarn " emerge --config sys-libs/timezone-data"
- einfo "Copying ${tzpath} to ${etc_lt}."
- cp -f "${tzpath}" "${etc_lt}"
- else
- # Otherwise, create a symlink and remove the timezone file.
- tzpath="../usr/share/zoneinfo/${tz}"
- einfo "Linking ${tzpath} at ${etc_lt}."
- if ln -snf "${tzpath}" "${etc_lt}"; then
- einfo "Removing ${src}."
- rm -f "${src}"
- fi
- fi
-}
-
-pkg_config() {
- configure_tz_data
-}
-
-pkg_postinst() {
- configure_tz_data
-}
diff --git a/sys-libs/uid_wrapper/Manifest b/sys-libs/uid_wrapper/Manifest
deleted file mode 100644
index b0baa3cfc28b..000000000000
--- a/sys-libs/uid_wrapper/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST uid_wrapper-1.3.2.tar.gz 50805 BLAKE2B 68f1abbf78a10355652f77cbcc6183743fa7e9cccfacc5fcd3613ab6129e04409e305463fdb9a57aad2189a230b19e79c0ffddafa3dea595ab55d255d4675412 SHA512 a248494c445b8186e3fc9e3eb8b21149a08dc504871ffaf339d5f61e13f7291973d07d467d81e253d165792dd15f5df69db8a7e1e3424093a5b051f9a562d6fb
diff --git a/sys-libs/uid_wrapper/files/uid_wrapper-1.3.2-tests-x32.patch b/sys-libs/uid_wrapper/files/uid_wrapper-1.3.2-tests-x32.patch
deleted file mode 100644
index 080ef7323460..000000000000
--- a/sys-libs/uid_wrapper/files/uid_wrapper-1.3.2-tests-x32.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-https://git.samba.org/?p=uid_wrapper.git;a=commit;h=ea8abbaaeb793438824c44bb2a5ea490054232ad
-
-From ea8abbaaeb793438824c44bb2a5ea490054232ad Mon Sep 17 00:00:00 2001
-From: Helge Deller <deller@gmx.de>
-Date: Fri, 8 Nov 2024 08:36:17 +0100
-Subject: [PATCH] Fix x32 syscall
-
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1086769
-
-Signed-off-by: Simon Josefsson <simon@josefsson.org>
-Reviewed-by: Andreas Schneider <asn@samba.org>
----
- tests/uwrap_fake_socket_wrapper.h | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/tests/uwrap_fake_socket_wrapper.h b/tests/uwrap_fake_socket_wrapper.h
-index 63e423a..f86e543 100644
---- a/tests/uwrap_fake_socket_wrapper.h
-+++ b/tests/uwrap_fake_socket_wrapper.h
-@@ -1,7 +1,9 @@
- #include <stdbool.h>
-
- /* simulate socket_wrapper hooks */
--#define __FAKE_SOCKET_WRAPPER_SYSCALL_NO 123456789
-+/* Use fake number higher than x32 architecture syscalls which
-+ * start at __X32_SYSCALL_BIT (0x40000000) */
-+#define __FAKE_SOCKET_WRAPPER_SYSCALL_NO 0x4f000000
- #define __FAKE_SOCKET_WRAPPER_SYSCALL_RC 987654321
- bool socket_wrapper_syscall_valid(long int sysno);
- long int socket_wrapper_syscall_va(long int sysno, va_list va);
---
-2.34.1
diff --git a/sys-libs/uid_wrapper/metadata.xml b/sys-libs/uid_wrapper/metadata.xml
deleted file mode 100644
index 74c488b2dd6e..000000000000
--- a/sys-libs/uid_wrapper/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>samba@gentoo.org</email>
- <name>Samba Team</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/uid_wrapper/uid_wrapper-1.3.2.ebuild b/sys-libs/uid_wrapper/uid_wrapper-1.3.2.ebuild
deleted file mode 100644
index 16ff90936889..000000000000
--- a/sys-libs/uid_wrapper/uid_wrapper-1.3.2.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake-multilib
-
-DESCRIPTION="Wrapper to fake privilege separation"
-HOMEPAGE="https://cwrap.org/uid_wrapper.html"
-SRC_URI="
- https://www.samba.org/ftp/cwrap/${P}.tar.gz
- https://ftp.samba.org/pub/cwrap/${P}.tar.gz
-"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-BDEPEND="test? ( dev-util/cmocka )"
-
-PATCHES=(
- "${FILESDIR}"/${P}-tests-x32.patch
-)
-
-src_configure() {
- local mycmakeargs=(
- -DUNIT_TESTING=$(usex test)
- )
-
- cmake-multilib_src_configure
-}
diff --git a/sys-libs/zlib-ng/Manifest b/sys-libs/zlib-ng/Manifest
deleted file mode 100644
index 97cd5a1c2cf9..000000000000
--- a/sys-libs/zlib-ng/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST zlib-ng-2.2.5.tar.gz 2417402 BLAKE2B 7d2907595b6e57f2739f4acea11cb317a35c4f63208d3f44b65cca0ea1ffbef89311bc839327e037b3aea78de1407d3ff025567f6768013277d0fd61e0a40210 SHA512 b599ea24375d08fa098ed7c3b14548e0d9731a155a024a0904b0ae4a6d3491a69f0c0574d66b6e4af1e40f10e38b6b555d4c4b1fe3589ca83a5f97fbd92f635f
-DIST zlib-ng-2.3.2.tar.gz 2446623 BLAKE2B f7df4ee71ba956994f515b6b250e38beba8c3f1643ac0b2e613b03cdaf49dc477aac7060b7912801d2c603492b482cd8fda9e3a988bb38489ca93d61eca47a2e SHA512 8781ee4bfda7cb8c8c5150c2e6a067d699580616b61af2ea4cf03cbe14c6715b31a29a20b7c3dd97254a9e487c72c5228c9cfa817ff71aa765fe7043ab136f04
-DIST zlib-ng-2.3.3.tar.gz 2447397 BLAKE2B 36fed55807a98bb17edbb53b5b9456c3023dcf5aea9208b453d1cd187c56bba56a6818c3a14a39bf271a7f6bcee5203cc1e4f7e8d1961e965661a232afd0778f SHA512 e2057c764f1d5aaee738edee7e977182c5b097e3c95489dcd8de813f237d92a05daaa86d68d44b331d9fec5d1802586a8f6cfb658ba849874aaa14e72a8107f5
diff --git a/sys-libs/zlib-ng/metadata.xml b/sys-libs/zlib-ng/metadata.xml
deleted file mode 100644
index 8ff9c2f6926c..000000000000
--- a/sys-libs/zlib-ng/metadata.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <use>
- <flag name="compat">Enable compatibility to <pkg>sys-libs/zlib</pkg></flag>
- </use>
- <upstream>
- <remote-id type="github">zlib-ng/zlib-ng</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/zlib-ng/zlib-ng-2.2.5-r1.ebuild b/sys-libs/zlib-ng/zlib-ng-2.2.5-r1.ebuild
deleted file mode 100644
index c7210ea2664f..000000000000
--- a/sys-libs/zlib-ng/zlib-ng-2.2.5-r1.ebuild
+++ /dev/null
@@ -1,113 +0,0 @@
-# Copyright 1999-2025 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,
-# as they copied this practice from sys-libs/zlib upstream.
-
-inherit cmake-multilib multibuild
-
-DESCRIPTION="Fork of the zlib data compression library"
-HOMEPAGE="https://github.com/zlib-ng/zlib-ng"
-SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-
-CPU_USE=(
- x86_{avx2,avx512f,avx512_vnni,sse2,ssse3,sse4_2,pclmul,vpclmulqdq}
- arm_{crc32,neon}
- ppc_{altivec,vsx2,vsx3}
-)
-IUSE="compat ${CPU_USE[@]/#/cpu_flags_} static-libs test"
-
-RESTRICT="!test? ( test )"
-
-DEPEND="
- test? ( dev-cpp/gtest )
-"
-RDEPEND="
- compat? ( !sys-libs/zlib )
-"
-
-run_both() {
- local MULTIBUILD_VARIANTS=( base )
- use compat && MULTIBUILD_VARIANTS+=( compat )
-
- multibuild_foreach_variant "${@}"
-}
-
-my_src_configure() {
- local compat=OFF
- [[ ${MULTIBUILD_VARIANT} == compat ]] && compat=ON
- local mycmakeargs=(
- "${mycmakeargs[@]}"
- -DZLIB_COMPAT="${compat}"
- )
-
- cmake_src_configure
-}
-
-multilib_src_configure() {
- local mycmakeargs=(
- -DZLIB_ENABLE_TESTS=$(usex test)
- -DWITH_GTEST=$(usex test)
- )
- if use static-libs; then
- mycmakeargs+=(
- # upstream build system builds both if BUILD_SHARED_LIBS is unset
- -UBUILD_SHARED_LIBS
- )
- fi
-
- # The intrinsics options are all defined conditionally, so we need
- # to enable them on/off per-arch here for now.
- # TODO: There's no s390x USE_EXPAND yet
- if use amd64 || use x86 ; then
- mycmakeargs+=(
- -DWITH_AVX2=$(usex cpu_flags_x86_avx2)
- -DWITH_AVX512=$(usex cpu_flags_x86_avx512f)
- -DWITH_AVX512VNNI=$(usex cpu_flags_x86_avx512_vnni)
- -DWITH_SSE2=$(usex cpu_flags_x86_sse2)
- -DWITH_SSSE3=$(usex cpu_flags_x86_ssse3)
- -DWITH_SSE42=$(usex cpu_flags_x86_sse4_2)
- -DWITH_PCLMULQDQ=$(usex cpu_flags_x86_pclmul)
- -DWITH_VPCLMULQDQ=$(usex cpu_flags_x86_vpclmulqdq)
- )
- fi
-
- if use arm || use arm64 ; then
- mycmakeargs+=(
- -DWITH_ACLE=$(usex cpu_flags_arm_crc32)
- -DWITH_NEON=$(usex cpu_flags_arm_neon)
- )
- fi
-
- if use ppc || use ppc64 ; then
- # The POWER8 support is VSX which was introduced
- # VSX2 was introduced with POWER8, so use that as a proxy for it
- mycmakeargs+=(
- -DWITH_ALTIVEC=$(usex cpu_flags_ppc_altivec)
- -DWITH_POWER8=$(usex cpu_flags_ppc_vsx2)
- -DWITH_POWER9=$(usex cpu_flags_ppc_vsx3)
- )
- fi
-
- run_both my_src_configure
-}
-
-multilib_src_compile() { run_both cmake_src_compile; }
-multilib_src_test() { run_both cmake_src_test; }
-multilib_src_install() { run_both cmake_src_install; }
-
-pkg_postinst() {
- if use compat ; then
- ewarn "zlib-ng is experimental and replacing the system zlib is dangerous"
- ewarn "Please be careful!"
- ewarn
- ewarn "The following link explains the guarantees (and what is NOT guaranteed):"
- ewarn "https://github.com/zlib-ng/zlib-ng/blob/2.0.x/PORTING.md"
- fi
-}
diff --git a/sys-libs/zlib-ng/zlib-ng-2.2.5.ebuild b/sys-libs/zlib-ng/zlib-ng-2.2.5.ebuild
deleted file mode 100644
index b3d97b229b5c..000000000000
--- a/sys-libs/zlib-ng/zlib-ng-2.2.5.ebuild
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright 1999-2025 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,
-# as they copied this practice from sys-libs/zlib upstream.
-
-inherit cmake-multilib
-
-DESCRIPTION="Fork of the zlib data compression library"
-HOMEPAGE="https://github.com/zlib-ng/zlib-ng"
-SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-
-CPU_USE=(
- x86_{avx2,avx512f,avx512_vnni,sse2,ssse3,sse4_2,pclmul,vpclmulqdq}
- arm_{crc32,neon}
- ppc_{altivec,vsx2,vsx3}
-)
-IUSE="compat ${CPU_USE[@]/#/cpu_flags_} test"
-
-RESTRICT="!test? ( test )"
-
-DEPEND="
- test? ( dev-cpp/gtest )
-"
-RDEPEND="
- compat? ( !sys-libs/zlib )
-"
-
-multilib_src_configure() {
- local mycmakeargs=(
- -DZLIB_COMPAT=$(usex compat)
- -DZLIB_ENABLE_TESTS=$(usex test)
- -DWITH_GTEST=$(usex test)
- )
-
- # The intrinsics options are all defined conditionally, so we need
- # to enable them on/off per-arch here for now.
- # TODO: There's no s390x USE_EXPAND yet
- if use amd64 || use x86 ; then
- mycmakeargs+=(
- -DWITH_AVX2=$(usex cpu_flags_x86_avx2)
- -DWITH_AVX512=$(usex cpu_flags_x86_avx512f)
- -DWITH_AVX512VNNI=$(usex cpu_flags_x86_avx512_vnni)
- -DWITH_SSE2=$(usex cpu_flags_x86_sse2)
- -DWITH_SSSE3=$(usex cpu_flags_x86_ssse3)
- -DWITH_SSE42=$(usex cpu_flags_x86_sse4_2)
- -DWITH_PCLMULQDQ=$(usex cpu_flags_x86_pclmul)
- -DWITH_VPCLMULQDQ=$(usex cpu_flags_x86_vpclmulqdq)
- )
- fi
-
- if use arm || use arm64 ; then
- mycmakeargs+=(
- -DWITH_ACLE=$(usex cpu_flags_arm_crc32)
- -DWITH_NEON=$(usex cpu_flags_arm_neon)
- )
- fi
-
- if use ppc || use ppc64 ; then
- # The POWER8 support is VSX which was introduced
- # VSX2 was introduced with POWER8, so use that as a proxy for it
- mycmakeargs+=(
- -DWITH_ALTIVEC=$(usex cpu_flags_ppc_altivec)
- -DWITH_POWER8=$(usex cpu_flags_ppc_vsx2)
- -DWITH_POWER9=$(usex cpu_flags_ppc_vsx3)
- )
- fi
-
- cmake_src_configure
-}
-
-pkg_postinst() {
- if use compat ; then
- ewarn "zlib-ng is experimental and replacing the system zlib is dangerous"
- ewarn "Please be careful!"
- ewarn
- ewarn "The following link explains the guarantees (and what is NOT guaranteed):"
- ewarn "https://github.com/zlib-ng/zlib-ng/blob/2.0.x/PORTING.md"
- fi
-}
diff --git a/sys-libs/zlib-ng/zlib-ng-2.3.2.ebuild b/sys-libs/zlib-ng/zlib-ng-2.3.2.ebuild
deleted file mode 100644
index c7a37498bde0..000000000000
--- a/sys-libs/zlib-ng/zlib-ng-2.3.2.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 1999-2026 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,
-# as they copied this practice from sys-libs/zlib upstream.
-
-inherit cmake-multilib multibuild
-
-DESCRIPTION="Fork of the zlib data compression library"
-HOMEPAGE="https://github.com/zlib-ng/zlib-ng"
-SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-
-CPU_USE=(
- x86_{avx2,avx512f,avx512_vnni,sse2,ssse3,sse4_1,sse4_2,pclmul,vpclmulqdq}
- arm_{crc32,neon}
- ppc_{altivec,vsx2,vsx3}
-)
-IUSE="compat ${CPU_USE[@]/#/cpu_flags_} static-libs test"
-
-RESTRICT="!test? ( test )"
-
-DEPEND="
- test? ( dev-cpp/gtest )
-"
-RDEPEND="
- compat? ( !sys-libs/zlib )
-"
-
-run_both() {
- local MULTIBUILD_VARIANTS=( base )
- use compat && MULTIBUILD_VARIANTS+=( compat )
-
- multibuild_foreach_variant "${@}"
-}
-
-my_src_configure() {
- local compat=OFF
- [[ ${MULTIBUILD_VARIANT} == compat ]] && compat=ON
- local mycmakeargs=(
- "${mycmakeargs[@]}"
- -DZLIB_COMPAT="${compat}"
- )
-
- cmake_src_configure
-}
-
-multilib_src_configure() {
- local mycmakeargs=(
- -DBUILD_TESTING=$(usex test)
- -DWITH_BENCHMARKS=OFF
- -DWITH_BENCHMARK_APPS=OFF
- -DWITH_FUZZERS=OFF
- -DWITH_GTEST=$(usex test)
- )
- if use static-libs; then
- mycmakeargs+=(
- # upstream build system builds both if BUILD_SHARED_LIBS is unset
- -UBUILD_SHARED_LIBS
- )
- fi
-
- # The intrinsics options are all defined conditionally, so we need
- # to enable them on/off per-arch here for now.
- # TODO: There's no s390x USE_EXPAND yet
- if use amd64 || use x86 ; then
- mycmakeargs+=(
- -DWITH_AVX2=$(usex cpu_flags_x86_avx2)
- -DWITH_AVX512=$(usex cpu_flags_x86_avx512f)
- -DWITH_AVX512VNNI=$(usex cpu_flags_x86_avx512_vnni)
- -DWITH_SSE2=$(usex cpu_flags_x86_sse2)
- -DWITH_SSSE3=$(usex cpu_flags_x86_ssse3)
- -DWITH_SSE41=$(usex cpu_flags_x86_sse4_1)
- -DWITH_SSE42=$(usex cpu_flags_x86_sse4_2)
- -DWITH_PCLMULQDQ=$(usex cpu_flags_x86_pclmul)
- -DWITH_VPCLMULQDQ=$(usex cpu_flags_x86_vpclmulqdq)
- )
- fi
-
- if use arm || use arm64 ; then
- mycmakeargs+=(
- -DWITH_ARMV8=$(usex cpu_flags_arm_crc32)
- -DWITH_NEON=$(usex cpu_flags_arm_neon)
- )
- fi
-
- if use ppc || use ppc64 ; then
- # The POWER8 support is VSX which was introduced
- # VSX2 was introduced with POWER8, so use that as a proxy for it
- mycmakeargs+=(
- -DWITH_ALTIVEC=$(usex cpu_flags_ppc_altivec)
- -DWITH_POWER8=$(usex cpu_flags_ppc_vsx2)
- -DWITH_POWER9=$(usex cpu_flags_ppc_vsx3)
- )
- fi
-
- run_both my_src_configure
-}
-
-multilib_src_compile() { run_both cmake_src_compile; }
-multilib_src_test() { run_both cmake_src_test; }
-multilib_src_install() { run_both cmake_src_install; }
-
-pkg_postinst() {
- if use compat ; then
- ewarn "zlib-ng is experimental and replacing the system zlib is dangerous"
- ewarn "Please be careful!"
- ewarn
- ewarn "The following link explains the guarantees (and what is NOT guaranteed):"
- ewarn "https://github.com/zlib-ng/zlib-ng/blob/2.0.x/PORTING.md"
- fi
-}
diff --git a/sys-libs/zlib-ng/zlib-ng-2.3.3.ebuild b/sys-libs/zlib-ng/zlib-ng-2.3.3.ebuild
deleted file mode 100644
index c7a37498bde0..000000000000
--- a/sys-libs/zlib-ng/zlib-ng-2.3.3.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 1999-2026 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,
-# as they copied this practice from sys-libs/zlib upstream.
-
-inherit cmake-multilib multibuild
-
-DESCRIPTION="Fork of the zlib data compression library"
-HOMEPAGE="https://github.com/zlib-ng/zlib-ng"
-SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-
-CPU_USE=(
- x86_{avx2,avx512f,avx512_vnni,sse2,ssse3,sse4_1,sse4_2,pclmul,vpclmulqdq}
- arm_{crc32,neon}
- ppc_{altivec,vsx2,vsx3}
-)
-IUSE="compat ${CPU_USE[@]/#/cpu_flags_} static-libs test"
-
-RESTRICT="!test? ( test )"
-
-DEPEND="
- test? ( dev-cpp/gtest )
-"
-RDEPEND="
- compat? ( !sys-libs/zlib )
-"
-
-run_both() {
- local MULTIBUILD_VARIANTS=( base )
- use compat && MULTIBUILD_VARIANTS+=( compat )
-
- multibuild_foreach_variant "${@}"
-}
-
-my_src_configure() {
- local compat=OFF
- [[ ${MULTIBUILD_VARIANT} == compat ]] && compat=ON
- local mycmakeargs=(
- "${mycmakeargs[@]}"
- -DZLIB_COMPAT="${compat}"
- )
-
- cmake_src_configure
-}
-
-multilib_src_configure() {
- local mycmakeargs=(
- -DBUILD_TESTING=$(usex test)
- -DWITH_BENCHMARKS=OFF
- -DWITH_BENCHMARK_APPS=OFF
- -DWITH_FUZZERS=OFF
- -DWITH_GTEST=$(usex test)
- )
- if use static-libs; then
- mycmakeargs+=(
- # upstream build system builds both if BUILD_SHARED_LIBS is unset
- -UBUILD_SHARED_LIBS
- )
- fi
-
- # The intrinsics options are all defined conditionally, so we need
- # to enable them on/off per-arch here for now.
- # TODO: There's no s390x USE_EXPAND yet
- if use amd64 || use x86 ; then
- mycmakeargs+=(
- -DWITH_AVX2=$(usex cpu_flags_x86_avx2)
- -DWITH_AVX512=$(usex cpu_flags_x86_avx512f)
- -DWITH_AVX512VNNI=$(usex cpu_flags_x86_avx512_vnni)
- -DWITH_SSE2=$(usex cpu_flags_x86_sse2)
- -DWITH_SSSE3=$(usex cpu_flags_x86_ssse3)
- -DWITH_SSE41=$(usex cpu_flags_x86_sse4_1)
- -DWITH_SSE42=$(usex cpu_flags_x86_sse4_2)
- -DWITH_PCLMULQDQ=$(usex cpu_flags_x86_pclmul)
- -DWITH_VPCLMULQDQ=$(usex cpu_flags_x86_vpclmulqdq)
- )
- fi
-
- if use arm || use arm64 ; then
- mycmakeargs+=(
- -DWITH_ARMV8=$(usex cpu_flags_arm_crc32)
- -DWITH_NEON=$(usex cpu_flags_arm_neon)
- )
- fi
-
- if use ppc || use ppc64 ; then
- # The POWER8 support is VSX which was introduced
- # VSX2 was introduced with POWER8, so use that as a proxy for it
- mycmakeargs+=(
- -DWITH_ALTIVEC=$(usex cpu_flags_ppc_altivec)
- -DWITH_POWER8=$(usex cpu_flags_ppc_vsx2)
- -DWITH_POWER9=$(usex cpu_flags_ppc_vsx3)
- )
- fi
-
- run_both my_src_configure
-}
-
-multilib_src_compile() { run_both cmake_src_compile; }
-multilib_src_test() { run_both cmake_src_test; }
-multilib_src_install() { run_both cmake_src_install; }
-
-pkg_postinst() {
- if use compat ; then
- ewarn "zlib-ng is experimental and replacing the system zlib is dangerous"
- ewarn "Please be careful!"
- ewarn
- ewarn "The following link explains the guarantees (and what is NOT guaranteed):"
- ewarn "https://github.com/zlib-ng/zlib-ng/blob/2.0.x/PORTING.md"
- fi
-}
diff --git a/sys-libs/zlib/Manifest b/sys-libs/zlib/Manifest
deleted file mode 100644
index 0de9a5ea4923..000000000000
--- a/sys-libs/zlib/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-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.2.tar.xz 1320064 BLAKE2B fd3a6e4c275a925f4814de487075c136e28421ea34ca7f93141781e7a414b392cd849fbf96cfcb24e825441df5f3c64be54276c0f617dc2d5c865d4ab260e83c SHA512 cf3d49fbabddc57cca99858feeca8f910e9de42a16014cddd406814d2d24ee33fee2af3805d7efbb1b04b05f55818092b000daf82502b675df65f2512c353f73
-DIST zlib-1.3.2.tar.xz.asc 235 BLAKE2B 3d25ad364ecaf8ad235990e5072d4d8d4f7fe4c1daa91717e275b59655a724ccecdabdbeeda4f573ee87b05b6f9583d0f7fff813f6d0b1c596efc18767a5f798 SHA512 d6d608074cd15509b1f4a5465e4ae75e56e2cabba9ad1ed4e1276d2207c53429a080099b53581d4fc7be9c476eda1a5e300450db0022b75b3429de97e8df4a85
diff --git a/sys-libs/zlib/files/zlib-1.2.11-minizip-drop-crypt-header.patch b/sys-libs/zlib/files/zlib-1.2.11-minizip-drop-crypt-header.patch
deleted file mode 100644
index 2e0a93e91944..000000000000
--- a/sys-libs/zlib/files/zlib-1.2.11-minizip-drop-crypt-header.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-https://bugs.gentoo.org/658536
-https://github.com/madler/zlib/pull/229
-
-From e490ddad3091574a0c2e3b5a66a8fee9a7ab212f Mon Sep 17 00:00:00 2001
-From: Pavel Raiskup <praiskup@redhat.com>
-Date: Sun, 19 Feb 2017 16:42:12 +0100
-Subject: [PATCH] minizip: don't install crypt.h
-
-People did mistakenly or unintentionally include crypt.h before,
-don't install this internal header from now.
----
- contrib/minizip/Makefile.am | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/contrib/minizip/Makefile.am b/contrib/minizip/Makefile.am
-index d343011ebc3b..4f46610238d2 100644
---- a/contrib/minizip/Makefile.am
-+++ b/contrib/minizip/Makefile.am
-@@ -26,13 +26,15 @@ libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz
-
- minizip_includedir = $(includedir)/minizip
- minizip_include_HEADERS = \
-- crypt.h \
- ioapi.h \
- mztools.h \
- unzip.h \
- zip.h \
- ${iowin32_h}
-
-+noinst_HEADERS = \
-+ crypt.h
-+
- pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = minizip.pc
-
---
-2.17.1
-
diff --git a/sys-libs/zlib/files/zlib-1.3.1-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch b/sys-libs/zlib/files/zlib-1.3.1-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
deleted file mode 100644
index 5bfb8006c4bb..000000000000
--- a/sys-libs/zlib/files/zlib-1.3.1-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-https://bugs.gentoo.org/879883
-https://github.com/madler/zlib/issues/751
-
-This breaks building on sparc with older binutils.
---- a/configure
-+++ b/configure
-@@ -234,10 +234,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.3.1-configure-fix-AR-RANLIB-NM-detection.patch b/sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-RANLIB-NM-detection.patch
deleted file mode 100644
index e1e5cf4b9196..000000000000
--- a/sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-RANLIB-NM-detection.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 7d7c0b3ede7d5c30e3cdc7c6fbb33c9d4499516a 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] 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>
----
- configure | 38 ++++++++++++++++++++++----------------
- 1 file changed, 22 insertions(+), 16 deletions(-)
-
-diff --git a/configure b/configure
-index c55098a..2535e04 100755
---- a/configure
-+++ b/configure
-@@ -48,25 +48,31 @@ VER3=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\(\\.[0-9]\{1,\}\)\{1,2\}\).*/\1/p'`
- VER1=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\)\\..*/\1/p'`
-
- # 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.43.0
-
diff --git a/sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-libtool-on-darwin.patch b/sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-libtool-on-darwin.patch
deleted file mode 100644
index 4506e753ca2e..000000000000
--- a/sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-libtool-on-darwin.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --color -ur zlib-1.3.1/configure zlib-1.3.1.new/configure
---- zlib-1.3.1/configure 2024-01-21 02:29:31.000000000 +0000
-+++ zlib-1.3.1.new/configure 2024-02-17 19:37:10.614600000 +0000
-@@ -265,14 +265,16 @@
- SHAREDLIBV=libz.$VER$shared_ext
- SHAREDLIBM=libz.$VER1$shared_ext
- LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"}
-+ if test -z ${AR}; then
- if "${CROSS_PREFIX}libtool" -V 2>&1 | grep Apple > /dev/null; then
- AR="${CROSS_PREFIX}libtool"
- elif libtool -V 2>&1 | grep Apple > /dev/null; then
- AR="libtool"
- else
- AR="/usr/bin/libtool"
- fi
-- ARFLAGS="-o" ;;
-+ ARFLAGS="-o"
-+ fi ;;
- *)
- LDSHARED=${LDSHARED-"$cc -shared"} ;;
- esac
-
diff --git a/sys-libs/zlib/files/zlib-1.3.1-use-LDFLAGS-in-configure.patch b/sys-libs/zlib/files/zlib-1.3.1-use-LDFLAGS-in-configure.patch
deleted file mode 100644
index 2b1d70f7b6f6..000000000000
--- a/sys-libs/zlib/files/zlib-1.3.1-use-LDFLAGS-in-configure.patch
+++ /dev/null
@@ -1,74 +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>k
---- a/configure
-+++ b/configure
-@@ -448,8 +448,8 @@ EOF
- 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 -c $SFLAGS $test.c &&
-- try $LDSHARED $SFLAGS -o $test$shared_ext $test.o; then
-+ if try $CC -c $SFLAGS $LDFLAGS $test.c &&
-+ 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
-@@ -511,7 +511,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}"
-@@ -545,7 +545,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"
-@@ -562,7 +562,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"
-@@ -669,7 +669,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
-@@ -759,7 +759,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/files/zlib-1.3.2-minizip-install.patch b/sys-libs/zlib/files/zlib-1.3.2-minizip-install.patch
deleted file mode 100644
index 6622b80a9453..000000000000
--- a/sys-libs/zlib/files/zlib-1.3.2-minizip-install.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-https://github.com/madler/zlib/issues/1164
-https://github.com/madler/zlib/pull/1165
-
-From 36ff1be48ef696cc67b0855f7c8537ce0276210d Mon Sep 17 00:00:00 2001
-From: Rui Chen <rui@chenrui.dev>
-Date: Tue, 17 Feb 2026 10:48:39 -0500
-Subject: [PATCH] contrib/minizip: install ints.h
-
-Signed-off-by: Rui Chen <rui@chenrui.dev>
----
- contrib/minizip/Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/contrib/minizip/Makefile.am b/contrib/minizip/Makefile.am
-index d343011eb..b7dea4f7e 100644
---- a/contrib/minizip/Makefile.am
-+++ b/contrib/minizip/Makefile.am
-@@ -27,5 +27,6 @@ libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz
- minizip_includedir = $(includedir)/minizip
- minizip_include_HEADERS = \
-+ ints.h \
- ioapi.h \
- mztools.h \
- unzip.h \
-
diff --git a/sys-libs/zlib/files/zlib-1.3.2-s390.patch b/sys-libs/zlib/files/zlib-1.3.2-s390.patch
deleted file mode 100644
index a33af41e0405..000000000000
--- a/sys-libs/zlib/files/zlib-1.3.2-s390.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 3625bc4c8e2015bbd0d902c75d9ef8bb5a8a3c17 Mon Sep 17 00:00:00 2001
-From: Robert Wolke <rwolke@users.noreply.github.com>
-Date: Wed, 18 Feb 2026 14:33:27 +0100
-Subject: [PATCH] fix: Add missing replacment of VGFMAFLAG
-
----
- configure | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/configure b/configure
-index bc723443e..4e6c8d85b 100755
---- a/configure
-+++ b/configure
-@@ -1024,6 +1024,7 @@ sed < ${SRCDIR}Makefile.in "
- /^LDFLAGS *=/s#=.*#=$LDFLAGS#
- /^LDSHARED *=/s#=.*#=$LDSHARED#
- /^CPP *=/s#=.*#=$CPP#
-+/^VGFMAFLAG *=/s#=.*#=$VGFMAFLAG#
- /^STATICLIB *=/s#=.*#=$STATICLIB#
- /^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
- /^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
-@@ -1054,6 +1055,7 @@ sed < ${SRCDIR}zlib.pc.in "
- /^CC *=/s#=.*#=$CC#
- /^CFLAGS *=/s#=.*#=$CFLAGS#
- /^CPP *=/s#=.*#=$CPP#
-+/^VGFMAFLAG *=/s#=.*#=$VGFMAFLAG#
- /^LDSHARED *=/s#=.*#=$LDSHARED#
- /^STATICLIB *=/s#=.*#=$STATICLIB#
- /^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
diff --git a/sys-libs/zlib/metadata.xml b/sys-libs/zlib/metadata.xml
deleted file mode 100644
index 4d41ee8a0c0b..000000000000
--- a/sys-libs/zlib/metadata.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <use>
- <flag name="minizip">include the minizip library for quick and dirty zip extraction</flag>
- </use>
- <upstream>
- <remote-id type="github">madler/zlib</remote-id>
- <remote-id type="cpe">cpe:/a:gnu:zlib</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/zlib/zlib-1.3.1-r1.ebuild b/sys-libs/zlib/zlib-1.3.1-r1.ebuild
deleted file mode 100644
index 07d24102c367..000000000000
--- a/sys-libs/zlib/zlib-1.3.1-r1.ebuild
+++ /dev/null
@@ -1,185 +0,0 @@
-# Copyright 1999-2026 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 dot-a 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 ~arm64-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.3.1-configure-fix-AR-RANLIB-NM-detection.patch
-
- # Respect LDFLAGS during configure tests. Pending upstream
- "${FILESDIR}"/${PN}-1.3.1-use-LDFLAGS-in-configure.patch
-
- # Fix building on sparc with older binutils, we pass it in ebuild instead
- "${FILESDIR}"/${PN}-1.3.1-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
-
- # On Darwin, don't force /usr/bin/libtool as AR. bug #924839
- "${FILESDIR}"/${PN}-1.3.1-configure-fix-AR-libtool-on-darwin.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
-}
-
-src_configure() {
- use static-libs && lto-guarantee-fat
- multilib-minimal_src_configure
-}
-
-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)
-
- # for GNU Hurd
- if [[ ${uname} == gnu ]] ; then
- uname=GNU
- fi
-
- 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() {
- strip-lto-bytecode
-
- dodoc FAQ README ChangeLog doc/*.txt
-
- if use minizip ; then
- dodoc contrib/minizip/*.txt
- doman contrib/minizip/*.1
- fi
-}
diff --git a/sys-libs/zlib/zlib-1.3.2-r1.ebuild b/sys-libs/zlib/zlib-1.3.2-r1.ebuild
deleted file mode 100644
index 28ae16f2d6f1..000000000000
--- a/sys-libs/zlib/zlib-1.3.2-r1.ebuild
+++ /dev/null
@@ -1,180 +0,0 @@
-# Copyright 1999-2026 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 dot-a 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 ~arm64-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.3.1-configure-fix-AR-RANLIB-NM-detection.patch
-
- # On Darwin, don't force /usr/bin/libtool as AR. bug #924839
- "${FILESDIR}"/${PN}-1.3.1-configure-fix-AR-libtool-on-darwin.patch
-
- "${FILESDIR}"/${PN}-1.3.2-minizip-install.patch
-
- # https://github.com/madler/zlib/issues/1200
- "${FILESDIR}"/${PN}-1.3.2-s390.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
-}
-
-src_configure() {
- use static-libs && lto-guarantee-fat
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- 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)
-
- # for GNU Hurd
- if [[ ${uname} == gnu ]] ; then
- uname=GNU
- fi
-
- 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() {
- strip-lto-bytecode
-
- dodoc FAQ README ChangeLog doc/*.txt
-
- if use minizip ; then
- dodoc contrib/minizip/*.txt
- doman contrib/minizip/*.1
- fi
-}