summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/argp-standalone/Manifest3
-rw-r--r--sys-libs/argp-standalone/argp-standalone-1.3-r2.ebuild40
-rw-r--r--sys-libs/argp-standalone/argp-standalone-1.5.0.ebuild (renamed from sys-libs/argp-standalone/argp-standalone-1.4.1-r1.ebuild)12
-rw-r--r--sys-libs/argp-standalone/files/argp-standalone-1.3-throw-in-funcdef.patch79
-rw-r--r--sys-libs/argp-standalone/files/argp-standalone-1.5.0-shared.patch (renamed from sys-libs/argp-standalone/files/argp-standalone-1.3-shared.patch)17
-rw-r--r--sys-libs/basu/Manifest1
-rw-r--r--sys-libs/basu/basu-0.2.0-r1.ebuild43
-rw-r--r--sys-libs/basu/basu-0.2.0.ebuild4
-rw-r--r--sys-libs/basu/basu-0.2.1.ebuild36
-rw-r--r--sys-libs/basu/files/0001-basu-0.2.0-LLD-13-and-GNU-ld-2.37-support-z-start-stop-gc-which.patch51
-rw-r--r--sys-libs/basu/files/0002-basu-0.2.0-meson-fix-linking-on-LLD-13-LD-2.37-and-older-CCs.patch44
-rw-r--r--sys-libs/basu/metadata.xml9
-rw-r--r--sys-libs/binutils-libs/Manifest14
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild8
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild8
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild8
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.37_p1-r2.ebuild8
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild (renamed from sys-libs/binutils-libs/binutils-libs-2.37_p1-r1.ebuild)34
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.39-r5.ebuild (renamed from sys-libs/binutils-libs/binutils-libs-2.37_p1.ebuild)36
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.40-r7.ebuild165
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.41-r2.ebuild168
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.41-r3.ebuild168
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.41-r5.ebuild168
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.42-r1.ebuild168
-rw-r--r--sys-libs/blocksruntime/blocksruntime-0_pre20171027-r2.ebuild (renamed from sys-libs/blocksruntime/blocksruntime-0_pre20171027-r1.ebuild)6
-rw-r--r--sys-libs/compiler-rt-sanitizers/Manifest21
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0-r1.ebuild204
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.1.ebuild201
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.7.ebuild (renamed from sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.ebuild)89
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-16.0.6.ebuild225
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.6.ebuild (renamed from sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0-r1.ebuild)93
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.4.ebuild218
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0.9999.ebuild (renamed from sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1.9999.ebuild)84
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0_pre20240410.ebuild (renamed from sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1_rc3.ebuild)84
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0_pre20240420.ebuild (renamed from sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0.9999.ebuild)84
-rw-r--r--sys-libs/compiler-rt-sanitizers/metadata.xml3
-rw-r--r--sys-libs/compiler-rt/Manifest22
-rw-r--r--sys-libs/compiler-rt/compiler-rt-11.1.0.ebuild123
-rw-r--r--sys-libs/compiler-rt/compiler-rt-12.0.1.ebuild124
-rw-r--r--sys-libs/compiler-rt/compiler-rt-13.0.0.ebuild130
-rw-r--r--sys-libs/compiler-rt/compiler-rt-15.0.7.ebuild (renamed from sys-libs/compiler-rt/compiler-rt-13.0.1_rc3.ebuild)62
-rw-r--r--sys-libs/compiler-rt/compiler-rt-16.0.6-r4.ebuild177
-rw-r--r--sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild (renamed from sys-libs/compiler-rt/compiler-rt-14.0.0.9999.ebuild)97
-rw-r--r--sys-libs/compiler-rt/compiler-rt-17.0.6.ebuild (renamed from sys-libs/compiler-rt/compiler-rt-13.0.1.9999.ebuild)98
-rw-r--r--sys-libs/compiler-rt/compiler-rt-18.1.4.ebuild172
-rw-r--r--sys-libs/compiler-rt/compiler-rt-19.0.0.9999.ebuild171
-rw-r--r--sys-libs/compiler-rt/compiler-rt-19.0.0_pre20240410.ebuild171
-rw-r--r--sys-libs/compiler-rt/compiler-rt-19.0.0_pre20240420.ebuild171
-rw-r--r--sys-libs/compiler-rt/metadata.xml3
-rw-r--r--sys-libs/cracklib/Manifest2
-rw-r--r--sys-libs/cracklib/cracklib-2.9.11.ebuild (renamed from sys-libs/cracklib/cracklib-2.9.7.ebuild)90
-rw-r--r--sys-libs/cygwin-crypt/Manifest1
-rw-r--r--sys-libs/cygwin-crypt/cygwin-crypt-1.4-r1.ebuild37
-rw-r--r--sys-libs/cygwin-crypt/metadata.xml10
-rw-r--r--sys-libs/db/Manifest4
-rw-r--r--sys-libs/db/db-18.1.40-r1.ebuild243
-rw-r--r--sys-libs/db/db-4.8.30-r8.ebuild (renamed from sys-libs/db/db-4.8.30-r6.ebuild)74
-rw-r--r--sys-libs/db/db-4.8.30-r9.ebuild171
-rw-r--r--sys-libs/db/db-5.3.28-r10.ebuild (renamed from sys-libs/db/db-5.3.28-r8.ebuild)64
-rw-r--r--sys-libs/db/db-5.3.28-r9.ebuild (renamed from sys-libs/db/db-18.1.32-r1.ebuild)176
-rw-r--r--sys-libs/db/db-6.0.35-r4.ebuild59
-rw-r--r--sys-libs/db/db-6.0.35-r5.ebuild (renamed from sys-libs/db/db-6.1.38-r1.ebuild)158
-rw-r--r--sys-libs/db/db-6.2.38-r1.ebuild249
-rw-r--r--sys-libs/db/files/db-18.1.25-test-link.patch38
-rw-r--r--sys-libs/db/files/db-18.1.40-fix-docs.patch19
-rw-r--r--sys-libs/db/files/db-4.2-listen-to-java-options.patch10
-rw-r--r--sys-libs/db/files/db-4.6-jni-check-prefix-first.patch30
-rw-r--r--sys-libs/db/files/db-4.8-wformat-security.patch43
-rw-r--r--sys-libs/db/files/db-4.8.24-java-manifest-location.patch12
-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.patch2
-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.patch2
-rw-r--r--sys-libs/db/files/db-5.2.28-sqlite-configure-path.patch5
-rw-r--r--sys-libs/db/files/db-5.3.28-clang16.patch325
-rw-r--r--sys-libs/db/files/db-6.0.20-test-link.patch5
-rw-r--r--sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch4
-rw-r--r--sys-libs/db/files/db-6.1.19-sqlite-configure-path.patch10
-rw-r--r--sys-libs/db/files/db-6.2-jni-check-prefix-first.patch38
-rw-r--r--sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch44
-rw-r--r--sys-libs/e2fsprogs-libs/Manifest1
-rw-r--r--sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.46.4-r1.ebuild91
-rw-r--r--sys-libs/e2fsprogs-libs/files/e2fsprogs-libs-1.42.13-fix-build-cflags.patch13
-rw-r--r--sys-libs/efivar/Manifest1
-rw-r--r--sys-libs/efivar/efivar-37.ebuild42
-rw-r--r--sys-libs/efivar/efivar-38.ebuild19
-rw-r--r--sys-libs/efivar/files/efivar-37-ia64-relro.patch37
-rw-r--r--sys-libs/efivar/files/efivar-38-64bit-off_t.patch46
-rw-r--r--sys-libs/efivar/files/efivar-38-efisecdb-musl.patch179
-rw-r--r--sys-libs/efivar/files/efivar-38-efisecdb-optarg.patch51
-rw-r--r--sys-libs/efivar/files/efivar-38-glibc-2.36.patch46
-rw-r--r--sys-libs/efivar/files/efivar-38-ia64-relro.patch19
-rw-r--r--sys-libs/efivar/files/efivar-38-ld-locale.patch30
-rw-r--r--sys-libs/efivar/files/efivar-38-lld-fixes.patch345
-rw-r--r--sys-libs/fortify-headers/Manifest1
-rw-r--r--sys-libs/fortify-headers/fortify-headers-0.7.ebuild29
-rw-r--r--sys-libs/fortify-headers/fortify-headers-9999.ebuild22
-rw-r--r--sys-libs/fortify-headers/metadata.xml3
-rw-r--r--sys-libs/freeipmi/Manifest4
-rw-r--r--sys-libs/freeipmi/files/freeipmi-1.6.10-0001-configure.ac-Fix-Wimplicit-function-declaration-for-.patch27
-rw-r--r--sys-libs/freeipmi/files/freeipmi-1.6.10-0002-configure.ac-Fix-detecting-sighandler_t-on-glibc.patch27
-rw-r--r--sys-libs/freeipmi/files/freeipmi-1.6.10-0003-configure.ac-Use-AC_USE_SYSTEM_EXTENSIONS-instead-of.patch331
-rw-r--r--sys-libs/freeipmi/files/freeipmi-1.6.10-header-fixes.patch118
-rw-r--r--sys-libs/freeipmi/freeipmi-1.6.10-r1.ebuild (renamed from sys-libs/freeipmi/freeipmi-1.6.8.ebuild)28
-rw-r--r--sys-libs/freeipmi/freeipmi-1.6.11.ebuild (renamed from sys-libs/freeipmi/freeipmi-1.6.9.ebuild)35
-rw-r--r--sys-libs/freeipmi/metadata.xml7
-rw-r--r--sys-libs/fts-standalone/fts-standalone-1.2.7.ebuild4
-rw-r--r--sys-libs/gdbm/Manifest3
-rw-r--r--sys-libs/gdbm/gdbm-1.23.ebuild (renamed from sys-libs/gdbm/gdbm-1.22.ebuild)29
-rw-r--r--sys-libs/gdbm/metadata.xml17
-rw-r--r--sys-libs/glibc/Manifest22
-rw-r--r--sys-libs/glibc/files/2.34/glibc-2.34-hppa-asm-getcontext-fixes.patch214
-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.34-make-clone3-syscall-optional.patch48
-rw-r--r--sys-libs/glibc/glibc-2.19-r3.ebuild (renamed from sys-libs/glibc/glibc-2.19-r2.ebuild)15
-rw-r--r--sys-libs/glibc/glibc-2.30-r9.ebuild1471
-rw-r--r--sys-libs/glibc/glibc-2.31-r7.ebuild11
-rw-r--r--sys-libs/glibc/glibc-2.32-r8.ebuild17
-rw-r--r--sys-libs/glibc/glibc-2.33-r14.ebuild (renamed from sys-libs/glibc/glibc-2.33-r8.ebuild)60
-rw-r--r--sys-libs/glibc/glibc-2.34-r14.ebuild (renamed from sys-libs/glibc/glibc-2.34-r6.ebuild)83
-rw-r--r--sys-libs/glibc/glibc-2.35-r11.ebuild (renamed from sys-libs/glibc/glibc-2.34-r4.ebuild)207
-rw-r--r--sys-libs/glibc/glibc-2.36-r8.ebuild (renamed from sys-libs/glibc/glibc-2.33-r7.ebuild)452
-rw-r--r--sys-libs/glibc/glibc-2.37-r10.ebuild1684
-rw-r--r--sys-libs/glibc/glibc-2.38-r10.ebuild1718
-rw-r--r--sys-libs/glibc/glibc-2.38-r11.ebuild1724
-rw-r--r--sys-libs/glibc/glibc-2.38-r12.ebuild1724
-rw-r--r--sys-libs/glibc/glibc-2.39-r3.ebuild1724
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild550
-rw-r--r--sys-libs/glibc/metadata.xml48
-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-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-warnings.patch202
-rw-r--r--sys-libs/gpm/files/gpm.service-r111
-rw-r--r--sys-libs/gpm/gpm-1.20.7-r5.ebuild116
-rw-r--r--sys-libs/gpm/gpm-1.20.7-r6.ebuild (renamed from sys-libs/gpm/gpm-1.20.7-r3.ebuild)29
-rw-r--r--sys-libs/gpm/metadata.xml11
-rw-r--r--sys-libs/gwenhywfar/Manifest2
-rw-r--r--sys-libs/gwenhywfar/gwenhywfar-5.10.1.ebuild (renamed from sys-libs/gwenhywfar/gwenhywfar-5.4.1-r1.ebuild)16
-rw-r--r--sys-libs/kpmcore/Manifest4
-rw-r--r--sys-libs/kpmcore/files/kpmcore-21.08.3-dont-destroy-zfs-pool.patch46
-rw-r--r--sys-libs/kpmcore/files/kpmcore-21.08.3-fix-seek-error-when-shred-partition.patch27
-rw-r--r--sys-libs/kpmcore/kpmcore-21.08.3-r1.ebuild39
-rw-r--r--sys-libs/kpmcore/kpmcore-23.08.5.ebuild (renamed from sys-libs/kpmcore/kpmcore-21.12.1.ebuild)13
-rw-r--r--sys-libs/kpmcore/kpmcore-24.02.2.ebuild31
-rw-r--r--sys-libs/ldb/Manifest11
-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.3.1.ebuild120
-rw-r--r--sys-libs/ldb/ldb-2.4.4.ebuild (renamed from sys-libs/ldb/ldb-2.4.1.ebuild)16
-rw-r--r--sys-libs/ldb/ldb-2.5.2.ebuild (renamed from sys-libs/ldb/ldb-2.4.0-r1.ebuild)18
-rw-r--r--sys-libs/ldb/ldb-2.5.3.ebuild (renamed from sys-libs/ldb/ldb-2.3.2.ebuild)29
-rw-r--r--sys-libs/ldb/ldb-2.6.2.ebuild173
-rw-r--r--sys-libs/ldb/ldb-2.7.2.ebuild173
-rw-r--r--sys-libs/ldb/ldb-2.8.0.ebuild173
-rw-r--r--sys-libs/ldb/ldb-2.9.0.ebuild173
-rw-r--r--sys-libs/ldb/metadata.xml3
-rw-r--r--sys-libs/libaal/libaal-1.0.7-r2.ebuild4
-rw-r--r--sys-libs/libapparmor/Manifest5
-rw-r--r--sys-libs/libapparmor/files/libapparmor-3.1.4-clang-flto-partition.patch33
-rw-r--r--sys-libs/libapparmor/libapparmor-3.0.10.ebuild (renamed from sys-libs/libapparmor/libapparmor-3.0.3.ebuild)38
-rw-r--r--sys-libs/libapparmor/libapparmor-3.0.8.ebuild (renamed from sys-libs/libapparmor/libapparmor-3.0.1.ebuild)40
-rw-r--r--sys-libs/libapparmor/libapparmor-3.1.4-r1.ebuild124
-rw-r--r--sys-libs/libapparmor/libapparmor-3.1.4.ebuild116
-rw-r--r--sys-libs/libapparmor/metadata.xml4
-rw-r--r--sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild4
-rw-r--r--sys-libs/libblockdev/Manifest7
-rw-r--r--sys-libs/libblockdev/files/libblockdev-2.28-sh_tests.patch23
-rw-r--r--sys-libs/libblockdev/files/libblockdev-3.0.4-add-non-systemd-method-for-distro-info.patch30
-rw-r--r--sys-libs/libblockdev/libblockdev-2.28-r1.ebuild (renamed from sys-libs/libblockdev/libblockdev-2.26.ebuild)34
-rw-r--r--sys-libs/libblockdev/libblockdev-2.29.ebuild (renamed from sys-libs/libblockdev/libblockdev-9999.ebuild)33
-rw-r--r--sys-libs/libblockdev/libblockdev-3.0.3.ebuild (renamed from sys-libs/libblockdev/libblockdev-2.25.ebuild)70
-rw-r--r--sys-libs/libblockdev/libblockdev-3.0.4.ebuild132
-rw-r--r--sys-libs/libblockdev/libblockdev-3.1.1.ebuild132
-rw-r--r--sys-libs/libblockdev/metadata.xml37
-rw-r--r--sys-libs/libcap-ng/Manifest3
-rw-r--r--sys-libs/libcap-ng/files/libcap-ng-0.8.4-slibtool.patch32
-rw-r--r--sys-libs/libcap-ng/files/libcap-ng-0.8.4-swig.patch31
-rw-r--r--sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild (renamed from sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild)50
-rw-r--r--sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild103
-rw-r--r--sys-libs/libcap-ng/libcap-ng-0.8.4.ebuild100
-rw-r--r--sys-libs/libcap-ng/metadata.xml19
-rw-r--r--sys-libs/libcap/Manifest2
-rw-r--r--sys-libs/libcap/files/libcap-2.62-ignore-RAISE_SETFCAP-install-failures.patch5
-rw-r--r--sys-libs/libcap/libcap-2.69-r1.ebuild94
-rw-r--r--sys-libs/libcap/libcap-2.69.ebuild (renamed from sys-libs/libcap/libcap-2.62.ebuild)8
-rw-r--r--sys-libs/libcap/libcap-9999.ebuild16
-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.5_rc2.ebuild6
-rw-r--r--sys-libs/libchipcard/libchipcard-5.1.6-r1.ebuild53
-rw-r--r--sys-libs/libchipcard/libchipcard-5.1.6.ebuild49
-rw-r--r--sys-libs/libcxx/Manifest21
-rw-r--r--sys-libs/libcxx/libcxx-11.1.0.ebuild211
-rw-r--r--sys-libs/libcxx/libcxx-12.0.1.ebuild212
-rw-r--r--sys-libs/libcxx/libcxx-13.0.0.ebuild214
-rw-r--r--sys-libs/libcxx/libcxx-13.0.1.9999.ebuild214
-rw-r--r--sys-libs/libcxx/libcxx-13.0.1_rc3.ebuild214
-rw-r--r--sys-libs/libcxx/libcxx-14.0.0.9999.ebuild214
-rw-r--r--sys-libs/libcxx/libcxx-15.0.7-r1.ebuild204
-rw-r--r--sys-libs/libcxx/libcxx-16.0.6.ebuild204
-rw-r--r--sys-libs/libcxx/libcxx-17.0.6.ebuild203
-rw-r--r--sys-libs/libcxx/libcxx-18.1.4.ebuild210
-rw-r--r--sys-libs/libcxx/libcxx-19.0.0.9999.ebuild210
-rw-r--r--sys-libs/libcxx/libcxx-19.0.0_pre20240410.ebuild210
-rw-r--r--sys-libs/libcxx/libcxx-19.0.0_pre20240420.ebuild210
-rw-r--r--sys-libs/libcxx/metadata.xml10
-rw-r--r--sys-libs/libcxxabi/Manifest14
-rw-r--r--sys-libs/libcxxabi/libcxxabi-11.1.0.ebuild123
-rw-r--r--sys-libs/libcxxabi/libcxxabi-12.0.1.ebuild122
-rw-r--r--sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild125
-rw-r--r--sys-libs/libcxxabi/libcxxabi-13.0.1.9999.ebuild125
-rw-r--r--sys-libs/libcxxabi/libcxxabi-13.0.1_rc3.ebuild125
-rw-r--r--sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild124
-rw-r--r--sys-libs/libcxxabi/libcxxabi-15.0.7.ebuild116
-rw-r--r--sys-libs/libcxxabi/libcxxabi-16.0.6.ebuild116
-rw-r--r--sys-libs/libcxxabi/libcxxabi-17.0.6.ebuild116
-rw-r--r--sys-libs/libcxxabi/libcxxabi-18.1.4.ebuild111
-rw-r--r--sys-libs/libcxxabi/libcxxabi-19.0.0.9999.ebuild110
-rw-r--r--sys-libs/libcxxabi/libcxxabi-19.0.0_pre20240410.ebuild110
-rw-r--r--sys-libs/libcxxabi/libcxxabi-19.0.0_pre20240420.ebuild110
-rw-r--r--sys-libs/libcxxabi/metadata.xml6
-rw-r--r--sys-libs/libfaketime/Manifest1
-rw-r--r--sys-libs/libfaketime/libfaketime-0.9.10.ebuild70
-rw-r--r--sys-libs/libfaketime/libfaketime-0.9.9.ebuild7
-rw-r--r--sys-libs/libfaketime/metadata.xml4
-rw-r--r--sys-libs/libhugetlbfs/Manifest1
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch258
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-uncompressed-man-pages.patch34
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-fixup-testsuite.patch31
-rw-r--r--sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild171
-rw-r--r--sys-libs/libhugetlbfs/metadata.xml12
-rw-r--r--sys-libs/libhx/Manifest2
-rw-r--r--sys-libs/libhx/libhx-4.21.ebuild27
-rw-r--r--sys-libs/libhx/libhx-4.23.ebuild27
-rw-r--r--sys-libs/libieee1284/libieee1284-0.2.11-r8.ebuild4
-rw-r--r--sys-libs/libmodulemd/Manifest1
-rw-r--r--sys-libs/libmodulemd/libmodulemd-2.15.0.ebuild68
-rw-r--r--sys-libs/libmodulemd/libmodulemd-9999.ebuild68
-rw-r--r--sys-libs/libmodulemd/metadata.xml11
-rw-r--r--sys-libs/libnbd/Manifest3
-rw-r--r--sys-libs/libnbd/libnbd-1.14.1.ebuild64
-rw-r--r--sys-libs/libnbd/libnbd-1.16.1-r1.ebuild80
-rw-r--r--sys-libs/libnbd/libnbd-1.18.1.ebuild81
-rw-r--r--sys-libs/libnbd/metadata.xml23
-rw-r--r--sys-libs/libnvme/Manifest2
-rw-r--r--sys-libs/libnvme/libnvme-1.7.1-r1.ebuild76
-rw-r--r--sys-libs/libnvme/libnvme-1.8.ebuild76
-rw-r--r--sys-libs/libnvme/metadata.xml16
-rw-r--r--sys-libs/libomp/Manifest18
-rw-r--r--sys-libs/libomp/libomp-11.1.0.ebuild105
-rw-r--r--sys-libs/libomp/libomp-12.0.1.ebuild107
-rw-r--r--sys-libs/libomp/libomp-15.0.7-r6.ebuild (renamed from sys-libs/libomp/libomp-13.0.1.9999.ebuild)79
-rw-r--r--sys-libs/libomp/libomp-16.0.6.ebuild (renamed from sys-libs/libomp/libomp-13.0.1_rc3.ebuild)110
-rw-r--r--sys-libs/libomp/libomp-17.0.6.ebuild (renamed from sys-libs/libomp/libomp-14.0.0.9999.ebuild)111
-rw-r--r--sys-libs/libomp/libomp-18.1.4.ebuild161
-rw-r--r--sys-libs/libomp/libomp-19.0.0.9999.ebuild (renamed from sys-libs/libomp/libomp-13.0.0-r2.ebuild)115
-rw-r--r--sys-libs/libomp/libomp-19.0.0_pre20240410.ebuild160
-rw-r--r--sys-libs/libomp/libomp-19.0.0_pre20240420.ebuild160
-rw-r--r--sys-libs/libomp/metadata.xml5
-rw-r--r--sys-libs/libosinfo/Manifest3
-rw-r--r--sys-libs/libosinfo/files/1.10.0-build-Add-option-to-disable-libsoup3.patch50
-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/libosinfo-1.10.0-r1.ebuild68
-rw-r--r--sys-libs/libosinfo/libosinfo-1.11.0.ebuild (renamed from sys-libs/libosinfo/libosinfo-1.9.0-r1.ebuild)27
-rw-r--r--sys-libs/libosinfo/metadata.xml11
-rw-r--r--sys-libs/libraw1394/libraw1394-2.1.2-r1.ebuild12
-rw-r--r--sys-libs/librtas/Manifest1
-rw-r--r--sys-libs/librtas/librtas-2.0.3.ebuild32
-rw-r--r--sys-libs/librtas/metadata.xml6
-rw-r--r--sys-libs/libseccomp/Manifest6
-rw-r--r--sys-libs/libseccomp/files/libseccomp-2.5.5-arch-syscall-check.patch45
-rw-r--r--sys-libs/libseccomp/files/libseccomp-2.5.5-which-hunt.patch69
-rw-r--r--sys-libs/libseccomp/files/libseccomp-2.6.0-python-shared.patch25
-rw-r--r--sys-libs/libseccomp/libseccomp-2.5.1-r1.ebuild90
-rw-r--r--sys-libs/libseccomp/libseccomp-2.5.1.ebuild84
-rw-r--r--sys-libs/libseccomp/libseccomp-2.5.2.ebuild90
-rw-r--r--sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild124
-rw-r--r--sys-libs/libseccomp/libseccomp-2.5.5.ebuild (renamed from sys-libs/libseccomp/libseccomp-2.5.3.ebuild)48
-rw-r--r--sys-libs/libseccomp/libseccomp-9999.ebuild65
-rw-r--r--sys-libs/libseccomp/metadata.xml4
-rw-r--r--sys-libs/libselinux/Manifest5
-rw-r--r--sys-libs/libselinux/libselinux-3.1-r1.ebuild155
-rw-r--r--sys-libs/libselinux/libselinux-3.5-r1.ebuild (renamed from sys-libs/libselinux/libselinux-3.2.ebuild)49
-rw-r--r--sys-libs/libselinux/libselinux-3.6-r1.ebuild (renamed from sys-libs/libselinux/libselinux-3.3.ebuild)49
-rw-r--r--sys-libs/libselinux/libselinux-9999.ebuild51
-rw-r--r--sys-libs/libselinux/metadata.xml3
-rw-r--r--sys-libs/libsemanage/Manifest6
-rw-r--r--sys-libs/libsemanage/libsemanage-3.4-r1.ebuild (renamed from sys-libs/libsemanage/libsemanage-3.2.ebuild)13
-rw-r--r--sys-libs/libsemanage/libsemanage-3.5.ebuild (renamed from sys-libs/libsemanage/libsemanage-3.3.ebuild)13
-rw-r--r--sys-libs/libsemanage/libsemanage-3.6.ebuild (renamed from sys-libs/libsemanage/libsemanage-3.1-r1.ebuild)32
-rw-r--r--sys-libs/libsemanage/libsemanage-9999.ebuild15
-rw-r--r--sys-libs/libsemanage/metadata.xml1
-rw-r--r--sys-libs/libsepol/Manifest5
-rw-r--r--sys-libs/libsepol/libsepol-3.1.ebuild51
-rw-r--r--sys-libs/libsepol/libsepol-3.5.ebuild (renamed from sys-libs/libsepol/libsepol-3.3.ebuild)2
-rw-r--r--sys-libs/libsepol/libsepol-3.6.ebuild (renamed from sys-libs/libsepol/libsepol-3.2.ebuild)2
-rw-r--r--sys-libs/libsepol/libsepol-9999.ebuild4
-rw-r--r--sys-libs/libservicelog/metadata.xml4
-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-deprecations.patch33
-rw-r--r--sys-libs/libsmbios/libsmbios-2.4.3-r1.ebuild (renamed from sys-libs/libsmbios/libsmbios-2.4.3.ebuild)36
-rw-r--r--sys-libs/libsmbios/metadata.xml26
-rw-r--r--sys-libs/libstatgrab/Manifest1
-rw-r--r--sys-libs/libstatgrab/libstatgrab-0.92.1.ebuild43
-rw-r--r--sys-libs/libstatgrab/libstatgrab-0.92.ebuild10
-rw-r--r--sys-libs/libstdc++-v3/Manifest1
-rw-r--r--sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r3.ebuild201
-rw-r--r--sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r4.ebuild4
-rw-r--r--sys-libs/libucontext/Manifest1
-rw-r--r--sys-libs/libucontext/files/libucontext-1.1-respect-CFLAGS.patch13
-rw-r--r--sys-libs/libucontext/libucontext-1.1-r1.ebuild (renamed from sys-libs/libucontext/libucontext-1.1.ebuild)26
-rw-r--r--sys-libs/libucontext/libucontext-1.2.ebuild69
-rw-r--r--sys-libs/libunwind/Manifest6
-rw-r--r--sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch16
-rw-r--r--sys-libs/libunwind/files/libunwind-1.2-ia64-missing.patch93
-rw-r--r--sys-libs/libunwind/files/libunwind-1.2-ia64-ptrace-coredump.patch34
-rw-r--r--sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch53
-rw-r--r--sys-libs/libunwind/files/libunwind-1.5.0-x32.patch17
-rw-r--r--sys-libs/libunwind/files/libunwind-1.7.2-backport-pr521.patch31
-rw-r--r--sys-libs/libunwind/libunwind-1.5.0-r1.ebuild108
-rw-r--r--sys-libs/libunwind/libunwind-1.7.2.ebuild (renamed from sys-libs/libunwind/libunwind-1.6.2.ebuild)63
-rw-r--r--sys-libs/libunwind/libunwind-1.8.1.ebuild134
-rw-r--r--sys-libs/libunwind/libunwind-9999.ebuild134
-rw-r--r--sys-libs/libunwind/metadata.xml1
-rw-r--r--sys-libs/liburing/Manifest4
-rw-r--r--sys-libs/liburing/files/liburing-2.1-gnu_source-musl-cpuset.patch42
-rw-r--r--sys-libs/liburing/files/liburing-2.3-liburing.map-Export-io_uring_-enable_rings-register_.patch35
-rw-r--r--sys-libs/liburing/files/liburing-2.3-remove-error-from-error_h-for-portability.patch150
-rw-r--r--sys-libs/liburing/files/liburing-2.5-lld-17.patch26
-rw-r--r--sys-libs/liburing/files/liburing-2.5-print-libgcc-file-name.patch43
-rw-r--r--sys-libs/liburing/liburing-2.1-r2.ebuild74
-rw-r--r--sys-libs/liburing/liburing-2.2.ebuild (renamed from sys-libs/liburing/liburing-2.1.ebuild)23
-rw-r--r--sys-libs/liburing/liburing-2.3-r4.ebuild90
-rw-r--r--sys-libs/liburing/liburing-2.4.ebuild83
-rw-r--r--sys-libs/liburing/liburing-2.5-r1.ebuild87
-rw-r--r--sys-libs/liburing/liburing-2.5-r2.ebuild88
-rw-r--r--sys-libs/liburing/liburing-2.5.ebuild83
-rw-r--r--sys-libs/liburing/liburing-9999.ebuild40
-rw-r--r--sys-libs/liburing/metadata.xml4
-rw-r--r--sys-libs/libutempter/libutempter-1.2.1.ebuild2
-rw-r--r--sys-libs/libuuid/libuuid-1.0.3-r1.ebuild (renamed from sys-libs/libuuid/libuuid-1.0.3.ebuild)11
-rw-r--r--sys-libs/libvpd/Manifest2
-rw-r--r--sys-libs/libvpd/files/2.2.8-gcc11.patch84
-rw-r--r--sys-libs/libvpd/files/2.2.8-warnings.patch52
-rw-r--r--sys-libs/libvpd/libvpd-2.2.9.ebuild (renamed from sys-libs/libvpd/libvpd-2.2.8-r1.ebuild)11
-rw-r--r--sys-libs/libvpd/metadata.xml5
-rw-r--r--sys-libs/libxcrypt/Manifest5
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.20.ebuild206
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild (renamed from sys-libs/libxcrypt/libxcrypt-4.4.25-r1.ebuild)166
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.36-r3.ebuild (renamed from sys-libs/libxcrypt/libxcrypt-4.4.27.ebuild)201
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.36.ebuild (renamed from sys-libs/libxcrypt/libxcrypt-4.4.26-r1.ebuild)171
-rw-r--r--sys-libs/libxcrypt/metadata.xml3
-rw-r--r--sys-libs/llvm-libunwind/Manifest14
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-11.1.0.ebuild124
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-12.0.1.ebuild138
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.ebuild142
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-13.0.1.9999.ebuild142
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-13.0.1_rc3.ebuild142
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-14.0.0.9999.ebuild141
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-15.0.7.ebuild123
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-16.0.6-r1.ebuild132
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-17.0.6.ebuild132
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-18.1.4.ebuild129
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-19.0.0.9999.ebuild128
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-19.0.0_pre20240410.ebuild128
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-19.0.0_pre20240420.ebuild128
-rw-r--r--sys-libs/llvm-libunwind/metadata.xml6
-rw-r--r--sys-libs/minizip-ng/Manifest2
-rw-r--r--sys-libs/minizip-ng/files/minizip-ng-4.0.4-libbsd-overlay.patch16
-rw-r--r--sys-libs/minizip-ng/metadata.xml (renamed from sys-libs/e2fsprogs-libs/metadata.xml)8
-rw-r--r--sys-libs/minizip-ng/minizip-ng-4.0.4.ebuild97
-rw-r--r--sys-libs/minizip-ng/minizip-ng-4.0.5.ebuild97
-rw-r--r--sys-libs/mtdev/Manifest1
-rw-r--r--sys-libs/mtdev/metadata.xml15
-rw-r--r--sys-libs/mtdev/mtdev-1.1.6.ebuild2
-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/musl-nscd-1.0.2-fno-common.patch36
-rw-r--r--sys-libs/musl-nscd/musl-nscd-1.0.3-r1.ebuild54
-rw-r--r--sys-libs/musl/Manifest7
-rw-r--r--sys-libs/musl/files/ldconfig.in144
-rw-r--r--sys-libs/musl/files/ldconfig.in-r1155
-rw-r--r--sys-libs/musl/files/ldconfig.in-r3 (renamed from sys-libs/musl/files/ldconfig.in-r2)19
-rw-r--r--sys-libs/musl/files/musl-1.2.2-gethostid.patch43
-rw-r--r--sys-libs/musl/files/musl-1.2.4-elfutils-0.190-relr.patch73
-rw-r--r--sys-libs/musl/musl-1.2.2-r3.ebuild151
-rw-r--r--sys-libs/musl/musl-1.2.2-r4.ebuild167
-rw-r--r--sys-libs/musl/musl-1.2.2-r6.ebuild167
-rw-r--r--sys-libs/musl/musl-1.2.2-r7.ebuild167
-rw-r--r--sys-libs/musl/musl-1.2.3-r8.ebuild212
-rw-r--r--sys-libs/musl/musl-1.2.4-r1.ebuild204
-rw-r--r--sys-libs/musl/musl-1.2.5.ebuild202
-rw-r--r--sys-libs/musl/musl-9999.ebuild168
-rw-r--r--sys-libs/native-uuid/native-uuid-1.0-r1.ebuild (renamed from sys-libs/native-uuid/native-uuid-1.0.ebuild)6
-rw-r--r--sys-libs/ncurses-compat/Manifest139
-rw-r--r--sys-libs/ncurses-compat/files/ncurses-5.7-nongnu.patch11
-rw-r--r--sys-libs/ncurses-compat/files/ncurses-5.9-gcc-5.patch46
-rw-r--r--sys-libs/ncurses-compat/files/ncurses-6.0-cppflags-cross.patch35
-rw-r--r--sys-libs/ncurses-compat/files/ncurses-6.0-pkg-config.patch14
-rw-r--r--sys-libs/ncurses-compat/files/ncurses-6.0-rxvt-unicode-9.15.patch191
-rw-r--r--sys-libs/ncurses-compat/files/ncurses-6.0-ticlib.patch15
-rw-r--r--sys-libs/ncurses-compat/metadata.xml34
-rw-r--r--sys-libs/ncurses-compat/ncurses-compat-6.2.ebuild227
-rw-r--r--sys-libs/ncurses-compat/ncurses-compat-6.4_p20230401.ebuild325
-rw-r--r--sys-libs/ncurses-compat/ncurses-compat-6.4_p20240330.ebuild382
-rw-r--r--sys-libs/ncurses/Manifest150
-rw-r--r--sys-libs/ncurses/files/ncurses-5.7-nongnu.patch11
-rw-r--r--sys-libs/ncurses/files/ncurses-6.0-pkg-config.patch14
-rw-r--r--sys-libs/ncurses/files/ncurses-6.0-rxvt-unicode-9.15.patch191
-rw-r--r--sys-libs/ncurses/files/ncurses-6.0-ticlib.patch15
-rw-r--r--sys-libs/ncurses/files/ncurses-6.2_p20210123-cppflags-cross.patch35
-rw-r--r--sys-libs/ncurses/metadata.xml5
-rw-r--r--sys-libs/ncurses/ncurses-6.2_p20210619.ebuild326
-rw-r--r--sys-libs/ncurses/ncurses-6.3.ebuild328
-rw-r--r--sys-libs/ncurses/ncurses-6.4_p20230401.ebuild (renamed from sys-libs/ncurses/ncurses-6.3_p20211106.ebuild)244
-rw-r--r--sys-libs/ncurses/ncurses-6.4_p20230527.ebuild431
-rw-r--r--sys-libs/ncurses/ncurses-6.4_p20240330.ebuild478
-rw-r--r--sys-libs/ncurses/ncurses-6.4_p20240414.ebuild488
-rw-r--r--sys-libs/newlib/Manifest2
-rw-r--r--sys-libs/newlib/files/newlib-4.3.0.20230120-libc-arm-setjmp-gcc-backwards-compat.patch57
-rw-r--r--sys-libs/newlib/metadata.xml3
-rw-r--r--sys-libs/newlib/newlib-4.1.0-r2.ebuild (renamed from sys-libs/newlib/newlib-4.1.0-r1.ebuild)4
-rw-r--r--sys-libs/newlib/newlib-4.2.0.20211231-r1.ebuild (renamed from sys-libs/newlib/newlib-4.2.0.20211231.ebuild)12
-rw-r--r--sys-libs/newlib/newlib-4.3.0.20230120-r1.ebuild153
-rw-r--r--sys-libs/newlib/newlib-4.3.0.20230120-r2.ebuild155
-rw-r--r--sys-libs/newlib/newlib-4.4.0.20231231.ebuild154
-rw-r--r--sys-libs/newlib/newlib-9999.ebuild32
-rw-r--r--sys-libs/nss_wrapper/Manifest3
-rw-r--r--sys-libs/nss_wrapper/files/nss_wrapper-1.1.15-cmocka-cmake.patch26
-rw-r--r--sys-libs/nss_wrapper/nss_wrapper-1.1.10.ebuild15
-rw-r--r--sys-libs/nss_wrapper/nss_wrapper-1.1.15.ebuild36
-rw-r--r--sys-libs/nss_wrapper/nss_wrapper-1.1.6.ebuild15
-rw-r--r--sys-libs/obstack-standalone/Manifest2
-rw-r--r--sys-libs/obstack-standalone/obstack-standalone-1.1.ebuild36
-rw-r--r--sys-libs/obstack-standalone/obstack-standalone-1.2.3.ebuild36
-rw-r--r--sys-libs/openipmi/Manifest4
-rw-r--r--sys-libs/openipmi/files/openipmi-2.0.33-c99.patch56
-rw-r--r--sys-libs/openipmi/openipmi-2.0.31.ebuild101
-rw-r--r--sys-libs/openipmi/openipmi-2.0.33-r1.ebuild (renamed from sys-libs/openipmi/openipmi-2.0.29.ebuild)49
-rw-r--r--sys-libs/openipmi/openipmi-2.0.33.ebuild (renamed from sys-libs/openipmi/openipmi-2.0.32.ebuild)42
-rw-r--r--sys-libs/pam/Manifest6
-rw-r--r--sys-libs/pam/files/pam-1.5.3-termios.patch34
-rw-r--r--sys-libs/pam/metadata.xml35
-rw-r--r--sys-libs/pam/pam-1.5.3-r1.ebuild (renamed from sys-libs/pam/pam-1.5.2-r1.ebuild)75
-rw-r--r--sys-libs/pam/pam-1.5.3.ebuild (renamed from sys-libs/pam/pam-1.5.1_p20210622-r1.ebuild)82
-rw-r--r--sys-libs/pam_wrapper/Manifest2
-rw-r--r--sys-libs/pam_wrapper/files/pam_wrapper-1.1.4-tests-import.patch22
-rw-r--r--sys-libs/pam_wrapper/files/pam_wrapper-1.1.5-env-var-typo.patch25
-rw-r--r--sys-libs/pam_wrapper/files/pam_wrapper-1.1.5-mkdir-race.patch40
-rw-r--r--sys-libs/pam_wrapper/files/pam_wrapper-1.1.5-tests-import.patch22
-rw-r--r--sys-libs/pam_wrapper/pam_wrapper-1.1.3.ebuild40
-rw-r--r--sys-libs/pam_wrapper/pam_wrapper-1.1.4-r2.ebuild (renamed from sys-libs/pam_wrapper/pam_wrapper-1.1.3-r3.ebuild)38
-rw-r--r--sys-libs/pam_wrapper/pam_wrapper-1.1.4-r3.ebuild (renamed from sys-libs/pam_wrapper/pam_wrapper-1.1.4.ebuild)32
-rw-r--r--sys-libs/pam_wrapper/pam_wrapper-1.1.5.ebuild90
-rw-r--r--sys-libs/pkgcraft/Manifest1
-rw-r--r--sys-libs/pkgcraft/metadata.xml11
-rw-r--r--sys-libs/pkgcraft/pkgcraft-0.0.14.ebuild92
-rw-r--r--sys-libs/pkgcraft/pkgcraft-9999.ebuild92
-rw-r--r--sys-libs/pwdb/pwdb-0.62-r2.ebuild4
-rw-r--r--sys-libs/queue-standalone/queue-standalone-0.1-r1.ebuild4
-rw-r--r--sys-libs/readline/Manifest28
-rw-r--r--sys-libs/readline/metadata.xml21
-rw-r--r--sys-libs/readline/readline-8.1_p2-r1.ebuild (renamed from sys-libs/readline/readline-8.1_p2.ebuild)75
-rw-r--r--sys-libs/readline/readline-8.1_p2-r2.ebuild (renamed from sys-libs/readline/readline-8.1_p1-r1.ebuild)75
-rw-r--r--sys-libs/readline/readline-8.2_p10.ebuild250
-rw-r--r--sys-libs/readline/readline-8.3_alpha.ebuild (renamed from sys-libs/readline/readline-8.2_alpha.ebuild)159
-rw-r--r--sys-libs/readline/readline-9999.ebuild251
-rw-r--r--sys-libs/rpmatch-standalone/rpmatch-standalone-1.0-r1.ebuild36
-rw-r--r--sys-libs/rpmatch-standalone/rpmatch-standalone-1.0.ebuild5
-rw-r--r--sys-libs/slang/Manifest1
-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/slang-2.3.2.ebuild4
-rw-r--r--sys-libs/slang/slang-2.3.3-r1.ebuild88
-rw-r--r--sys-libs/slang/slang-2.3.3.ebuild84
-rw-r--r--sys-libs/snapd-glib/Manifest2
-rw-r--r--sys-libs/snapd-glib/files/snapd-glib-1.64-qt6.patch286
-rw-r--r--sys-libs/snapd-glib/metadata.xml14
-rw-r--r--sys-libs/snapd-glib/snapd-glib-1.63.ebuild63
-rw-r--r--sys-libs/snapd-glib/snapd-glib-1.64-r100.ebuild65
-rw-r--r--sys-libs/snapd-glib/snapd-glib-1.64.ebuild63
-rw-r--r--sys-libs/talloc/Manifest5
-rw-r--r--sys-libs/talloc/talloc-2.4.0.ebuild (renamed from sys-libs/talloc/talloc-2.3.2.ebuild)26
-rw-r--r--sys-libs/talloc/talloc-2.4.1.ebuild (renamed from sys-libs/talloc/talloc-2.3.3.ebuild)37
-rw-r--r--sys-libs/talloc/talloc-2.4.2.ebuild130
-rw-r--r--sys-libs/tapi/Manifest5
-rw-r--r--sys-libs/tapi/files/objcmetadata-800.0.42.1-standalone.patch130
-rw-r--r--sys-libs/tapi/files/tapi-1.30-allow-all-clients.patch17
-rw-r--r--sys-libs/tapi/files/tapi-1.30-llvm-config.patch11
-rw-r--r--sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch65
-rw-r--r--sys-libs/tapi/files/tapi-1.30-llvm-out-of-tree.patch10
-rw-r--r--sys-libs/tapi/files/tapi-2.0.0-standalone.patch141
-rw-r--r--sys-libs/tapi/metadata.xml8
-rw-r--r--sys-libs/tapi/tapi-1.30.ebuild37
-rw-r--r--sys-libs/tapi/tapi-2.0.0.ebuild174
-rw-r--r--sys-libs/tdb/Manifest4
-rw-r--r--sys-libs/tdb/tdb-1.4.10.ebuild79
-rw-r--r--sys-libs/tdb/tdb-1.4.8.ebuild (renamed from sys-libs/tdb/tdb-1.4.5.ebuild)37
-rw-r--r--sys-libs/tdb/tdb-1.4.9.ebuild79
-rw-r--r--sys-libs/tevent/Manifest8
-rw-r--r--sys-libs/tevent/tevent-0.10.2.ebuild76
-rw-r--r--sys-libs/tevent/tevent-0.12.1.ebuild (renamed from sys-libs/tevent/tevent-0.11.0.ebuild)9
-rw-r--r--sys-libs/tevent/tevent-0.13.0.ebuild103
-rw-r--r--sys-libs/tevent/tevent-0.14.0.ebuild98
-rw-r--r--sys-libs/tevent/tevent-0.14.1.ebuild97
-rw-r--r--sys-libs/tevent/tevent-0.15.0.ebuild103
-rw-r--r--sys-libs/tevent/tevent-0.16.1.ebuild103
-rw-r--r--sys-libs/timezone-data/Manifest8
-rw-r--r--sys-libs/timezone-data/files/timezone-data-2024a-AsiaAlmaty.patch34
-rw-r--r--sys-libs/timezone-data/metadata.xml3
-rw-r--r--sys-libs/timezone-data/timezone-data-2023d.ebuild (renamed from sys-libs/timezone-data/timezone-data-2021a-r1.ebuild)62
-rw-r--r--sys-libs/timezone-data/timezone-data-2024a-r1.ebuild (renamed from sys-libs/timezone-data/timezone-data-2021e.ebuild)68
-rw-r--r--sys-libs/uid_wrapper/Manifest3
-rw-r--r--sys-libs/uid_wrapper/files/uid_wrapper-1.3.0-cmocka-cmake.patch26
-rw-r--r--sys-libs/uid_wrapper/uid_wrapper-1.2.7.ebuild16
-rw-r--r--sys-libs/uid_wrapper/uid_wrapper-1.2.8.ebuild16
-rw-r--r--sys-libs/uid_wrapper/uid_wrapper-1.3.0.ebuild31
-rw-r--r--sys-libs/zlib-ng/Manifest3
-rw-r--r--sys-libs/zlib-ng/zlib-ng-2.0.6.ebuild75
-rw-r--r--sys-libs/zlib-ng/zlib-ng-2.1.6-r1.ebuild (renamed from sys-libs/zlib-ng/zlib-ng-2.0.5.ebuild)50
-rw-r--r--sys-libs/zlib/Manifest7
-rw-r--r--sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch88
-rw-r--r--sys-libs/zlib/files/zlib-1.2.11-fix-deflateParams-usage.patch67
-rw-r--r--sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch40
-rw-r--r--sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch59
-rw-r--r--sys-libs/zlib/files/zlib-1.2.13-use-LDFLAGS-in-configure.patch72
-rw-r--r--sys-libs/zlib/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/zlib-1.2.11-r4.ebuild167
-rw-r--r--sys-libs/zlib/zlib-1.3-r4.ebuild173
-rw-r--r--sys-libs/zlib/zlib-1.3.1-r1.ebuild173
535 files changed, 33272 insertions, 15204 deletions
diff --git a/sys-libs/argp-standalone/Manifest b/sys-libs/argp-standalone/Manifest
index 1579c67dee13..59fdf7b532b7 100644
--- a/sys-libs/argp-standalone/Manifest
+++ b/sys-libs/argp-standalone/Manifest
@@ -1,2 +1 @@
-DIST argp-standalone-1.3.tar.gz 130255 BLAKE2B 0848a0e7a98cfa09de52fa152eb9a793a9bf25c1edfc7401851ef134b62c051ad6ef2134d6f528e167046be582be23f311e74614c5511d659060addc14de6b2f SHA512 58c3feb8852b90248fff39e49b5019bd0dcf646790c3eaf70c3262eb81dda31a61dc0a45963c7b4a010e80fc14b37288dcb3b3ef48d02f2d33dd72c1c62e62d9
-DIST argp-standalone-1.4.1.tar.gz 58158 BLAKE2B aa55965d6c4a9d61e82a5f3af7a62bf1a35b82ad91c87b4b31a6fa314ba0bcf30667137b420ccae5fbe24301c994971ef48c8dfa4db48620e56edc4300fbd961 SHA512 c5f07e88434589a13a2e88e66d1142b581f19aa82da28507f3c31ea782e080a13a4504d8108c003b5d3c8a3aa20f52ea5e81f337c11a4b1342b16361d4877c1c
+DIST argp-standalone-1.5.0.tar.gz 65889 BLAKE2B 01f4ceb3ad18be534605db09db708f17ab5df6bfd8fc0259451a70163c8e9bda92c4f9445e98d6b6cc0bc19bc61b8b122eddacf96bd026fc2ed0db00dda318f3 SHA512 fa2eb61ea00f7a13385e5c1e579dd88471d6ba3a13b6353e924fe71914b90b40688b42a9f1789bc246e03417fee1788b1990753cda8c8d4a544e85f26b63f9e2
diff --git a/sys-libs/argp-standalone/argp-standalone-1.3-r2.ebuild b/sys-libs/argp-standalone/argp-standalone-1.3-r2.ebuild
deleted file mode 100644
index 142f2d8054fb..000000000000
--- a/sys-libs/argp-standalone/argp-standalone-1.3-r2.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools flag-o-matic
-
-DESCRIPTION="Standalone argp library for use with uclibc"
-HOMEPAGE="http://www.lysator.liu.se/~nisse/misc/"
-SRC_URI="http://www.lysator.liu.se/~nisse/misc/${P}.tar.gz"
-
-LICENSE="public-domain GPL-2 GPL-3 XC"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~m68k ~mips ppc ppc64 ~s390 x86"
-IUSE="static-libs"
-
-DEPEND="!sys-libs/glibc"
-
-PATCHES=(
- "${FILESDIR}/${P}-throw-in-funcdef.patch"
- "${FILESDIR}/${P}-shared.patch"
-)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- append-cflags "-fgnu89-inline"
- econf \
- $(use_enable static-libs static)
-}
-
-src_install() {
- default
- find "${D}" -name '*.la' -delete || die
- insinto /usr/include
- doins argp.h
-}
diff --git a/sys-libs/argp-standalone/argp-standalone-1.4.1-r1.ebuild b/sys-libs/argp-standalone/argp-standalone-1.5.0.ebuild
index c665f174dc20..7f5b17768a74 100644
--- a/sys-libs/argp-standalone/argp-standalone-1.4.1-r1.ebuild
+++ b/sys-libs/argp-standalone/argp-standalone-1.5.0.ebuild
@@ -1,23 +1,23 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit autotools flag-o-matic
DESCRIPTION="Standalone argp library for use with musl"
-HOMEPAGE="https://github.com/ericonr/argp-standalone"
-SRC_URI="https://github.com/ericonr/argp-standalone/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+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 ~s390 ~x86"
+KEYWORDS="amd64 arm arm64 ~m68k ~mips ppc ppc64 ~riscv ~s390 x86"
IUSE="static-libs"
DEPEND="!sys-libs/glibc"
PATCHES=(
- "${FILESDIR}"/argp-standalone-1.3-shared.patch
+ "${FILESDIR}"/${P}-shared.patch
)
src_prepare() {
diff --git a/sys-libs/argp-standalone/files/argp-standalone-1.3-throw-in-funcdef.patch b/sys-libs/argp-standalone/files/argp-standalone-1.3-throw-in-funcdef.patch
deleted file mode 100644
index 4a90751e1e62..000000000000
--- a/sys-libs/argp-standalone/files/argp-standalone-1.3-throw-in-funcdef.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-# --- T2-COPYRIGHT-NOTE-BEGIN ---
-# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
-#
-# T2 SDE: package/.../rng-tools/throw-in-funcdef.patch.argp-standalone
-# Copyright (C) 2006 The T2 SDE Project
-#
-# More information can be found in the files COPYING and README.
-#
-# This patch file is dual-licensed. It is available under the license the
-# patched project is licensed under, as long as it is an OpenSource license
-# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
-# of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-# --- T2-COPYRIGHT-NOTE-END ---
-
-
-No __THROW in function implementation.
- --jsaw
-
---- argp-standalone-1.4-test2/argp.h.orig 2006-01-06 02:29:59.000000000 +0100
-+++ argp-standalone-1.4-test2/argp.h 2006-01-06 02:41:10.000000000 +0100
-@@ -560,17 +560,17 @@
- # endif
-
- # ifndef ARGP_EI
--# define ARGP_EI extern __inline__
-+# define ARGP_EI extern inline
- # endif
-
- ARGP_EI void
--__argp_usage (__const struct argp_state *__state) __THROW
-+__argp_usage (__const struct argp_state *__state)
- {
- __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
- }
-
- ARGP_EI int
--__option_is_short (__const struct argp_option *__opt) __THROW
-+__option_is_short (__const struct argp_option *__opt)
- {
- if (__opt->flags & OPTION_DOC)
- return 0;
-@@ -582,7 +582,7 @@
- }
-
- ARGP_EI int
--__option_is_end (__const struct argp_option *__opt) __THROW
-+__option_is_end (__const struct argp_option *__opt)
- {
- return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
- }
---- argp-standalone-1.4-test2/argp-parse.c.orig 2006-01-06 02:47:48.000000000 +0100
-+++ argp-standalone-1.4-test2/argp-parse.c 2006-01-06 02:48:16.000000000 +0100
-@@ -1290,13 +1290,13 @@
- /* Defined here, in case a user is not inlining the definitions in
- * argp.h */
- void
--__argp_usage (__const struct argp_state *__state) __THROW
-+__argp_usage (__const struct argp_state *__state)
- {
- __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
- }
-
- int
--__option_is_short (__const struct argp_option *__opt) __THROW
-+__option_is_short (__const struct argp_option *__opt)
- {
- if (__opt->flags & OPTION_DOC)
- return 0;
-@@ -1310,7 +1310,7 @@
- }
-
- int
--__option_is_end (__const struct argp_option *__opt) __THROW
-+__option_is_end (__const struct argp_option *__opt)
- {
- return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
- }
diff --git a/sys-libs/argp-standalone/files/argp-standalone-1.3-shared.patch b/sys-libs/argp-standalone/files/argp-standalone-1.5.0-shared.patch
index eea801c4ee98..1c6c599942c8 100644
--- a/sys-libs/argp-standalone/files/argp-standalone-1.3-shared.patch
+++ b/sys-libs/argp-standalone/files/argp-standalone-1.5.0-shared.patch
@@ -3,9 +3,9 @@ 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 2009-05-28 15:19:50.000000000 +0200
-+++ b/Makefile.am 2009-05-28 15:30:57.000000000 +0200
-@@ -21,20 +21,20 @@
+--- 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
@@ -19,7 +19,7 @@ accommodates (easier than forcing includes?).
EXTRA_DIST = mempcpy.c strchrnul.c strndup.c Versions
- # Leaves out argp-fs-xinl.c and argp-xinl.c
+ # 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 \
@@ -30,9 +30,8 @@ accommodates (easier than forcing includes?).
-argp_test_LDADD = libargp.a
+argp_test_LDADD = libargp.la
-
---- a/configure.ac 2009-05-28 15:20:01.000000000 +0200
-+++ b/configure.ac 2009-05-28 15:21:06.000000000 +0200
+--- 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
@@ -41,8 +40,8 @@ accommodates (easier than forcing includes?).
if test "x$am_cv_prog_cc_stdc" = xno ; then
AC_ERROR([the C compiler doesn't handle ANSI-C])
---- a/testsuite/Makefile.am 2009-05-28 15:21:33.000000000 +0200
-+++ b/testsuite/Makefile.am 2009-05-28 15:21:41.000000000 +0200
+--- 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
diff --git a/sys-libs/basu/Manifest b/sys-libs/basu/Manifest
index bdca280686aa..37853bd6ebb5 100644
--- a/sys-libs/basu/Manifest
+++ b/sys-libs/basu/Manifest
@@ -1 +1,2 @@
DIST basu-0.2.0.tar.gz 238861 BLAKE2B 4fcc664d031477c2ae82e535711561d1a7cb60503fb31fa80101c2046e3fe11f7886851649d38f3d5868a3266f45e651085d99ec95f6788baddbf78e893b1528 SHA512 dbc2f72b6e1a880fa41fe6067a38a301f456e4305dae6eb4d465089d7d9c2f629677ba23752b3e1a1fd476cb440db01ef3a218c1c976f38d0058eed584c80165
+DIST basu-0.2.1.tar.gz 239178 BLAKE2B 8b8d5023b6816939a89acc9bdf6a49a464ad1d60dfafb80e9dd8485b743db9b497aef14cfa9f0bbab4aedcc07a20cac0e93b4b5071b2731f4762f9f514739aaf SHA512 b8017bbfdb5b408bd380e3b1cb1443321863ed8c9487ab0c8c80860c2ffb0c0403c81daf7e87f815027e9a826d08aa82a54c496bc87527209933e0d007b0c9ea
diff --git a/sys-libs/basu/basu-0.2.0-r1.ebuild b/sys-libs/basu/basu-0.2.0-r1.ebuild
new file mode 100644
index 000000000000..b319be74040f
--- /dev/null
+++ b/sys-libs/basu/basu-0.2.0-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..10} )
+inherit meson python-any-r1
+
+DESCRIPTION="The sd-bus library, extracted from systemd"
+HOMEPAGE="https://sr.ht/~emersion/basu/"
+LICENSE="LGPL-2.1+"
+SLOT="0"
+
+SRC_URI="https://git.sr.ht/~emersion/basu/refs/download/v${PV}/basu-${PV}.tar.gz"
+KEYWORDS="amd64"
+
+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}"/0001-"${PN}"-0.2.0-meson-add-libcap-option.patch
+ "${FILESDIR}"/0002-"${PN}"-0.2.0-meson-convert-audit-option-to-feature-object.patch
+ "${FILESDIR}"/0001-"${PN}"-0.2.0-LLD-13-and-GNU-ld-2.37-support-z-start-stop-gc-which.patch
+ "${FILESDIR}"/0002-"${PN}"-0.2.0-meson-fix-linking-on-LLD-13-LD-2.37-and-older-CCs.patch
+)
+
+src_configure() {
+ local emesonargs=(
+ $(meson_feature audit)
+ $(meson_feature caps libcap)
+ )
+ meson_src_configure
+}
diff --git a/sys-libs/basu/basu-0.2.0.ebuild b/sys-libs/basu/basu-0.2.0.ebuild
index 46c936a536d0..2a5e288ae73b 100644
--- a/sys-libs/basu/basu-0.2.0.ebuild
+++ b/sys-libs/basu/basu-0.2.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{9..10} )
inherit meson python-any-r1
DESCRIPTION="The sd-bus library, extracted from systemd"
diff --git a/sys-libs/basu/basu-0.2.1.ebuild b/sys-libs/basu/basu-0.2.1.ebuild
new file mode 100644
index 000000000000..624ab35ea61e
--- /dev/null
+++ b/sys-libs/basu/basu-0.2.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit meson python-any-r1
+
+DESCRIPTION="The sd-bus library, extracted from systemd"
+HOMEPAGE="https://sr.ht/~emersion/basu/"
+LICENSE="LGPL-2.1+"
+SLOT="0"
+
+SRC_URI="https://git.sr.ht/~emersion/basu/refs/download/v${PV}/basu-${PV}.tar.gz"
+KEYWORDS="amd64"
+
+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
+"
+
+src_configure() {
+ local emesonargs=(
+ $(meson_feature audit)
+ $(meson_feature caps libcap)
+ )
+ meson_src_configure
+}
diff --git a/sys-libs/basu/files/0001-basu-0.2.0-LLD-13-and-GNU-ld-2.37-support-z-start-stop-gc-which.patch b/sys-libs/basu/files/0001-basu-0.2.0-LLD-13-and-GNU-ld-2.37-support-z-start-stop-gc-which.patch
new file mode 100644
index 000000000000..efc4add79542
--- /dev/null
+++ b/sys-libs/basu/files/0001-basu-0.2.0-LLD-13-and-GNU-ld-2.37-support-z-start-stop-gc-which.patch
@@ -0,0 +1,51 @@
+From baa3a54e019b8ba6161fe20943c897490f4bcde8 Mon Sep 17 00:00:00 2001
+From: Fangrui Song <i@maskray.me>
+Date: Sat, 27 Nov 2021 18:19:46 +0100
+Subject: [PATCH basu] LLD 13 and GNU ld 2.37 support -z start-stop-gc which
+ allows garbage collection of C identifier name sections despite the
+ __start_/__stop_ references. Simply set the retain attribute so that GCC 11
+ (if configure-time binutils is 2.36 or newer)/Clang 13 will set the
+ SHF_GNU_RETAIN section attribute to prevent garbage collection.
+
+Without the patch, there are linker errors like the following with -z
+start-stop-gc.
+
+```
+ld: error: undefined symbol: __start_SYSTEMD_BUS_ERROR_MAP
+>>> referenced by bus-error.c:93 (../src/libsystemd/sd-bus/bus-error.c:93)
+>>> sd-bus_bus-error.c.o:(bus_error_name_to_errno) in archive src/libsystemd/libsystemd_static.a
+```
+
+Co-authored-by: Evgeniy Khramtsov <evgeniy@khramtsov.org>
+---
+Upstream: https://git.sr.ht/~emersion/basu/commit/5fa970e868f25ebc79ccca9b1d9df4c030d97661
+Gentoo bug: https://bugs.gentoo.org/832045
+
+ src/libsystemd/sd-bus/bus-error.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/libsystemd/sd-bus/bus-error.h b/src/libsystemd/sd-bus/bus-error.h
+index 06c478a..883213f 100644
+--- a/src/libsystemd/sd-bus/bus-error.h
++++ b/src/libsystemd/sd-bus/bus-error.h
+@@ -28,11 +28,17 @@ int bus_error_set_errnofv(sd_bus_error *e, int error, const char *format, va_lis
+ * the bus error table, and BUS_ERROR_MAP_ELF_USE has to be used at
+ * least once per compilation unit (i.e. per library), to ensure that
+ * the error map is really added to the final binary.
++ *
++ * In addition, set the retain attribute so that the section cannot be
++ * discarded by ld --gc-sections -z start-stop-gc. Older compilers would
++ * warn for the unknown attribute, so just disable -Wattributes.
+ */
+
+ #define BUS_ERROR_MAP_ELF_REGISTER \
++ _Pragma("GCC diagnostic ignored \"-Wattributes\"") \
+ __attribute__ ((__section__("BUS_ERROR_MAP"))) \
+ __attribute__ ((__used__)) \
++ __attribute__ ((retain)) \
+ __attribute__ ((aligned(8)))
+
+ #define BUS_ERROR_MAP_ELF_USE(errors) \
+--
+2.34.1
+
diff --git a/sys-libs/basu/files/0002-basu-0.2.0-meson-fix-linking-on-LLD-13-LD-2.37-and-older-CCs.patch b/sys-libs/basu/files/0002-basu-0.2.0-meson-fix-linking-on-LLD-13-LD-2.37-and-older-CCs.patch
new file mode 100644
index 000000000000..c0a9399ecf77
--- /dev/null
+++ b/sys-libs/basu/files/0002-basu-0.2.0-meson-fix-linking-on-LLD-13-LD-2.37-and-older-CCs.patch
@@ -0,0 +1,44 @@
+From c4d9f5aac80d02b7e7447d2eda698e17a245071e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
+Date: Tue, 25 Jan 2022 18:36:36 +0100
+Subject: [PATCH basu] meson: fix linking on LLD 13/LD 2.37 and older CCs
+
+For compilers that do not support __attribute((retain)),
+-z no-start-stop-gc is a requirement.
+---
+Submitted at: https://lists.sr.ht/~emersion/public-inbox/patches/28722#%3C20220125192953.1781959-1-arsen@aarsen.me%3E
+Gentoo bug: https://bugs.gentoo.org/832045
+
+ meson.build | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 1f29690..74e9934 100644
+--- a/meson.build
++++ b/meson.build
+@@ -101,6 +101,22 @@ if get_option('buildtype') != 'debug'
+ possible_link_flags += '-Wl,--gc-sections'
+ endif
+
++if cc.get_id() in ['gcc', 'clang']
++# XXX(arsen): remember to update with a future meson release
++ has_retain_attr = cc.compiles(
++ '__attribute__((retain)) int x;',
++ args : ['-Werror=attributes'],
++ name : 'compiler supports __attribute__((retain))'
++ )
++
++ if not has_retain_attr and cc.has_link_argument('-Wl,-z,start-stop-gc')
++ possible_link_flags += [
++ '-Wl,-z,nostart-stop-gc'
++ ]
++ endif
++endif
++
++
+ add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c')
+ add_project_link_arguments(cc.get_supported_link_arguments(possible_link_flags), language : 'c')
+
+--
+2.34.1
+
diff --git a/sys-libs/basu/metadata.xml b/sys-libs/basu/metadata.xml
index e97261f56145..5e504c9ac08a 100644
--- a/sys-libs/basu/metadata.xml
+++ b/sys-libs/basu/metadata.xml
@@ -2,13 +2,9 @@
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>arsen@aarsen.me</email>
+ <email>arsen@gentoo.org</email>
<name>Arsen Arsenović</name>
</maintainer>
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
<longdescription>
The sd-bus library, extracted from systemd.
@@ -16,4 +12,7 @@
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
index 0dc838b6d385..232225df13df 100644
--- a/sys-libs/binutils-libs/Manifest
+++ b/sys-libs/binutils-libs/Manifest
@@ -4,7 +4,17 @@ DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7e
DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
-DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24
-DIST binutils-2.37_p1-patches-1.tar.xz 28956 BLAKE2B 3bc14fcc52a6d11992ad9ed88fa3347ca3d5facd59de094a178a5f720d0eed6297dadf9a8fea7189076eb81274612c0b71c01f15a8f58deeaed8c8f6135ef50d SHA512 f6b2a09bfc692cf90f6cd56be81f424a68831db48054dc150eb6ec28bfa18d35933203c2d3b502f0c80e38771353c373446aec2488469fe2df20d8066033f59e
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-2.tar.xz 20288 BLAKE2B 1cc29e868ded12845856c5da567f23798fe3017961ce079325c20f456b837cab11560d896065f70953b0bab55bf565288541579e9c3e0991a87083edf2a85fa5 SHA512 75619a5e17b75d72f9bdd9d5e5ee3b566c94de64410bfc074f1a9bfb9f08db9ecf8be216efa1053263468aa8ec99b8aa3b2b095e63cb95f3566500ac0c3b9432
+DIST binutils-2.41-patches-4.tar.xz 86580 BLAKE2B 32748fd0e81a7e323e9f56f0864f2a1755b8fe1b09c777075e31a292297e365c47b47003f8f1bffacc254ed8dccf1c655b7b13f61da751c9db090e56d819fbb2 SHA512 90dcf38c1ed2ae015eb9de922e946e2be62355bd51276075e7f1c0a06cd52408057c4151a2d2d4c07e33c1d2c5998001cba5509819e5722cce45f70172465ea5
+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-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d
+DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6
diff --git a/sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild b/sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild
index 7e32691cabaa..c3286ec1f61b 100644
--- a/sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild
+++ b/sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,7 +6,7 @@ EAPI=7
PATCH_VER=6
PATCH_DEV=dilfridge
-inherit libtool toolchain-funcs multilib-minimal
+inherit flag-o-matic libtool toolchain-funcs multilib-minimal
MY_PN="binutils"
MY_P="${MY_PN}-${PV}"
@@ -21,7 +21,7 @@ SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
LICENSE="|| ( GPL-3 LGPL-3 )"
SLOT="0/${PV}"
IUSE="64-bit-bfd multitarget nls static-libs"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~x64-solaris"
BDEPEND="nls? ( sys-devel/gettext )"
DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
@@ -54,6 +54,8 @@ pkgversion() {
}
multilib_src_configure() {
+ filter-lto
+
local myconf=(
--enable-obsolete
--enable-shared
diff --git a/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild b/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild
index 49b5b73255c0..f395c82f84ec 100644
--- a/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild
+++ b/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,7 +6,7 @@ EAPI=7
PATCH_VER=1
PATCH_DEV=dilfridge
-inherit libtool toolchain-funcs multilib-minimal
+inherit flag-o-matic libtool toolchain-funcs multilib-minimal
MY_PN="binutils"
MY_P="${MY_PN}-${PV}"
@@ -21,7 +21,7 @@ SRC_URI="mirror://gnu/binutils/${MY_P}.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 ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~x64-solaris"
BDEPEND="nls? ( sys-devel/gettext )"
DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
@@ -56,6 +56,8 @@ pkgversion() {
}
multilib_src_configure() {
+ filter-lto
+
local myconf=(
--enable-obsolete
--enable-shared
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
index 14ef733b104a..d6b6b8e25bba 100644
--- a/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild
+++ b/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,7 +6,7 @@ EAPI=7
PATCH_VER=5
PATCH_DEV=dilfridge
-inherit libtool toolchain-funcs multilib-minimal
+inherit flag-o-matic libtool toolchain-funcs multilib-minimal
MY_PN="binutils"
MY_P="${MY_PN}-${PV}"
@@ -21,7 +21,7 @@ SRC_URI="mirror://gnu/binutils/${MY_P}.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 ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~x64-solaris"
BDEPEND="nls? ( sys-devel/gettext )"
DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
@@ -54,6 +54,8 @@ pkgversion() {
}
multilib_src_configure() {
+ filter-lto
+
local myconf=(
--enable-obsolete
--enable-shared
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
index b3acfd3410a1..b22a084a83e7 100644
--- a/sys-libs/binutils-libs/binutils-libs-2.37_p1-r2.ebuild
+++ b/sys-libs/binutils-libs/binutils-libs-2.37_p1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,7 +6,7 @@ EAPI=7
PATCH_VER=2
PATCH_DEV=dilfridge
-inherit libtool toolchain-funcs multilib-minimal
+inherit flag-o-matic libtool toolchain-funcs multilib-minimal
MY_PN="binutils"
MY_P="${MY_PN}-${PV}"
@@ -22,7 +22,7 @@ SRC_URI="mirror://gnu/binutils/${MY_P}.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 ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~x64-solaris"
BDEPEND="nls? ( sys-devel/gettext )"
DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
@@ -55,6 +55,8 @@ pkgversion() {
}
multilib_src_configure() {
+ filter-lto
+
local myconf=(
--enable-obsolete
--enable-shared
diff --git a/sys-libs/binutils-libs/binutils-libs-2.37_p1-r1.ebuild b/sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild
index c12ce21427b7..0cbb1f3a402b 100644
--- a/sys-libs/binutils-libs/binutils-libs-2.37_p1-r1.ebuild
+++ b/sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PATCH_VER=1
+PATCH_VER=4
PATCH_DEV=dilfridge
-inherit libtool toolchain-funcs multilib-minimal
+inherit flag-o-matic libtool toolchain-funcs multilib-minimal
MY_PN="binutils"
MY_P="${MY_PN}-${PV}"
@@ -22,7 +22,7 @@ SRC_URI="mirror://gnu/binutils/${MY_P}.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 ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~x64-solaris"
BDEPEND="nls? ( sys-devel/gettext )"
DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
@@ -46,6 +46,20 @@ src_prepare() {
# 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
}
@@ -55,6 +69,8 @@ pkgversion() {
}
multilib_src_configure() {
+ filter-lto
+
local myconf=(
--enable-obsolete
--enable-shared
@@ -114,8 +130,7 @@ multilib_src_configure() {
"${S}"/opcodes/Makefile.in || die
fi
- ECONF_SOURCE=${S} \
- econf "${myconf[@]}"
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
# Prevent makeinfo from running as we don't build docs here.
# bug #622652
@@ -124,8 +139,13 @@ multilib_src_configure() {
Makefile || die
}
+multilib_src_compile() {
+ emake V=1
+}
+
multilib_src_install() {
- default
+ emake V=1 DESTDIR="${D}" install
+
# Provide libiberty.h directly.
dosym libiberty/libiberty.h /usr/include/libiberty.h
}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.37_p1.ebuild b/sys-libs/binutils-libs/binutils-libs-2.39-r5.ebuild
index e49b2f9fb7ea..78844f553070 100644
--- a/sys-libs/binutils-libs/binutils-libs-2.37_p1.ebuild
+++ b/sys-libs/binutils-libs/binutils-libs-2.39-r5.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PATCH_VER=0
+PATCH_VER=6
PATCH_DEV=dilfridge
-inherit libtool toolchain-funcs multilib-minimal
+inherit flag-o-matic libtool toolchain-funcs multilib-minimal
MY_PN="binutils"
MY_P="${MY_PN}-${PV}"
@@ -22,7 +22,7 @@ SRC_URI="mirror://gnu/binutils/${MY_P}.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 ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~x64-solaris"
BDEPEND="nls? ( sys-devel/gettext )"
DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
@@ -46,6 +46,20 @@ src_prepare() {
# 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
}
@@ -55,6 +69,8 @@ pkgversion() {
}
multilib_src_configure() {
+ filter-lto
+
local myconf=(
--enable-obsolete
--enable-shared
@@ -75,7 +91,7 @@ multilib_src_configure() {
--without-zlib
--with-system-zlib
# We only care about the libs, so disable programs. #528088
- --disable-{binutils,etc,ld,gas,gold,gprof}
+ --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.
@@ -114,8 +130,7 @@ multilib_src_configure() {
"${S}"/opcodes/Makefile.in || die
fi
- ECONF_SOURCE=${S} \
- econf "${myconf[@]}"
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
# Prevent makeinfo from running as we don't build docs here.
# bug #622652
@@ -124,8 +139,13 @@ multilib_src_configure() {
Makefile || die
}
+multilib_src_compile() {
+ emake V=1
+}
+
multilib_src_install() {
- default
+ emake V=1 DESTDIR="${D}" install
+
# Provide libiberty.h directly.
dosym libiberty/libiberty.h /usr/include/libiberty.h
}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.40-r7.ebuild b/sys-libs/binutils-libs/binutils-libs-2.40-r7.ebuild
new file mode 100644
index 000000000000..386c34fc4626
--- /dev/null
+++ b/sys-libs/binutils-libs/binutils-libs-2.40-r7.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2024 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 ~ia64 ~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="sys-libs/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() {
+ 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-r2.ebuild b/sys-libs/binutils-libs/binutils-libs-2.41-r2.ebuild
new file mode 100644
index 000000000000..ed71ba8af71b
--- /dev/null
+++ b/sys-libs/binutils-libs/binutils-libs-2.41-r2.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2024 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?}.0"
+
+IUSE="64-bit-bfd cet multitarget nls static-libs test"
+KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~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="sys-libs/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() {
+ 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.41-r3.ebuild b/sys-libs/binutils-libs/binutils-libs-2.41-r3.ebuild
new file mode 100644
index 000000000000..f8bd5c0eac84
--- /dev/null
+++ b/sys-libs/binutils-libs/binutils-libs-2.41-r3.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2024 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?}.0"
+
+IUSE="64-bit-bfd cet multitarget nls static-libs test"
+KEYWORDS="~alpha amd64 ~arm arm64 hppa ~ia64 ~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="sys-libs/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() {
+ 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.41-r5.ebuild b/sys-libs/binutils-libs/binutils-libs-2.41-r5.ebuild
new file mode 100644
index 000000000000..9e0b7178e0ae
--- /dev/null
+++ b/sys-libs/binutils-libs/binutils-libs-2.41-r5.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2024 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 ~ia64 ~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="sys-libs/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() {
+ 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-r1.ebuild b/sys-libs/binutils-libs/binutils-libs-2.42-r1.ebuild
new file mode 100644
index 000000000000..ab160f032db0
--- /dev/null
+++ b/sys-libs/binutils-libs/binutils-libs-2.42-r1.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2024 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 )"
+
+SLOT="0/${PV%_p?}.0"
+
+IUSE="64-bit-bfd cet multitarget nls static-libs test"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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="sys-libs/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() {
+ 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/blocksruntime/blocksruntime-0_pre20171027-r1.ebuild b/sys-libs/blocksruntime/blocksruntime-0_pre20171027-r2.ebuild
index bcafbfff5a34..0cf458f8f8be 100644
--- a/sys-libs/blocksruntime/blocksruntime-0_pre20171027-r1.ebuild
+++ b/sys-libs/blocksruntime/blocksruntime-0_pre20171027-r2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit toolchain-funcs vcs-snapshot
@@ -16,7 +16,7 @@ SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86"
IUSE="static-libs"
-RDEPEND=""
+RDEPEND="!dev-libs/libdispatch"
DEPEND="${RDEPEND}"
PATCHES=(
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest
index 017ab72fa6d1..08f33eef70b1 100644
--- a/sys-libs/compiler-rt-sanitizers/Manifest
+++ b/sys-libs/compiler-rt-sanitizers/Manifest
@@ -1,10 +1,11 @@
-DIST llvm-gentoo-patchset-11.1.0-3.tar.xz 5984 BLAKE2B 89056fb8e82c7a29ae76c643ac631876d51391ffb579324aaf13c7f79e03f6fd8bbcb27d46e57e0f04a702602ebf51c116e82cb092452a1dbc97fb0eb7518f11 SHA512 08aabe8836b62ecfde4e264d567169ba495d5b5915b56aba35ae86992387e534bba6d512fde94056e641abe909b478e47edcbdaa3ee0b94182ecd68c98201441
-DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249
-DIST llvm-gentoo-patchset-13.0.0-r3.tar.xz 10176 BLAKE2B fc5825a4bd3b85bd9c970901e5e036cc4c928373495a8a6f63c7f4531c7f52575d06f80dfbd80671d9f0fcd32d5c48d96f5961602b024c7a936362aeba8a612a SHA512 2289eef3f6301ade2e1110ebc4b66ad3db91ed10868ca7296a29c55667007e06739b01f38c0783bb2c56deadfb8a04605c370df9c5a4c6bc9aea9382e6ed52a5
-DIST llvm-gentoo-patchset-13.0.0.tar.xz 5012 BLAKE2B 6760c78c086aaf6629143fd920b0a2c68cad9278628fbea8164dfeb59db95984a5b5d6b3505b510c697e8c95bf8d2be782c6b73c01622d52f2da9b07ecff39e0 SHA512 7764d49343b795b6bebae64f646ba27e3e6cc2a20b8a1aee645ce0d8474633c34acfbb73c08546fee415755dd4ea5a98c1d84db5e394cf5f4fc802eb61148ab6
-DIST llvm-gentoo-patchset-13.0.1-rc3.tar.xz 4808 BLAKE2B d8ed3ae424914437413e2e8c029880072e93d79ca79b842ad59451df46594c9b0d73ee5d49d3b65c4c7a40c86b2e0d43501ef106aea7c481f22425a5245a3411 SHA512 10430a720b120a340a681fa435a7f050741c75270607e3f5214bf829313d274c11f019f1ac072857dc5d7f868e6eb013932d1c94446e8cb2e151ac818a081914
-DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc
-DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
-DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
-DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
-DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1
+DIST llvm-gentoo-patchset-15.0.7.tar.xz 19300 BLAKE2B b70e81d744c2eba5cd851e7b690ce8979b3064973f522be7c93bfb541860000a4bc8b17219f8788dfc8a527217dd13946cf7836640698ddd3d4b3fde493dfbf8 SHA512 daffff6ae4a0874aff1a423b4bb36701ecb5a35a36ae91d4ed7fda58b83e50ffcdc30498c84be4711fd3e1f227bf312dbe930019203e0a131944439af2aa94f7
+DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
+DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
+DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
+DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
+DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
+DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29
+DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386
+DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1
+DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0-r1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0-r1.ebuild
deleted file mode 100644
index c56dd239fbd5..000000000000
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0-r1.ebuild
+++ /dev/null
@@ -1,204 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+clang test"
-# base targets
-IUSE+=" +libfuzzer +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
- asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
- shadowcallstack gwp-asan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
- || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray )
- test? (
- cfi? ( ubsan )
- gwp-asan? ( scudo )
- )"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6
- virtual/libcrypt"
-BDEPEND="
- >=dev-util/cmake-3.16
- clang? ( sys-devel/clang )
- elibc_glibc? ( net-libs/libtirpc )
- test? (
- !<sys-apps/sandbox-2.13
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
- sys-libs/compiler-rt:${SLOT}
- )
- ${PYTHON_DEPS}"
-
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-LLVM_PATCHSET=11.1.0-3
-llvm.org_set_globals
-
-python_check_deps() {
- use test || return 0
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-check_space() {
- if use test; then
- local CHECKREQS_DISK_BUILD=11G
- check-reqs_pkg_pretend
- fi
-}
-
-pkg_pretend() {
- check_space
-}
-
-pkg_setup() {
- check_space
- llvm_pkg_setup
- python-any-r1_pkg_setup
-}
-
-src_prepare() {
- sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
- local flag
- for flag in "${SANITIZER_FLAGS[@]}"; do
- if ! use "${flag}"; then
- local cmake_flag=${flag/-/_}
- sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
- cmake/config-ix.cmake || die
- fi
- done
-
- # TODO: fix these tests to be skipped upstream
- if use asan && ! use profile; then
- rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
- fi
- if use ubsan && ! use cfi; then
- > test/cfi/CMakeLists.txt || die
- fi
-
- # broken with new glibc
- sed -i -e '/EXPECT_EQ.*ThreadDescriptorSize/d' \
- lib/sanitizer_common/tests/sanitizer_linux_test.cpp || die
-
- llvm.org_src_prepare
-}
-
-src_configure() {
- # pre-set since we need to pass it to cmake
- BUILD_DIR=${WORKDIR}/compiler-rt_build
-
- if use clang; then
- local -x CC=${CHOST}-clang
- local -x CXX=${CHOST}-clang++
- strip-unsupported-flags
- fi
-
- local flag want_sanitizer=OFF
- for flag in "${SANITIZER_FLAGS[@]}"; do
- if use "${flag}"; then
- want_sanitizer=ON
- break
- fi
- done
-
- local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
- # use a build dir structure consistent with install
- # this makes it possible to easily deploy test-friendly clang
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
-
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
- # builtins & crt installed by sys-libs/compiler-rt
- -DCOMPILER_RT_BUILD_BUILTINS=OFF
- -DCOMPILER_RT_BUILD_CRT=OFF
- -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
- -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
- -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- if use test; then
- mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
-
- # they are created during src_test()
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
- )
-
- # same flags are passed for build & tests, so we need to strip
- # them down to a subset supported by clang
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
- strip-unsupported-flags
- fi
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
- # this allows adding arm64 support using SDK in EPREFIX
- -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
- # Set version based on the SDK in EPREFIX
- # This disables i386 for SDK >= 10.15
- # Will error if has_use tsan and SDK < 10.12
- -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
- # Use our libtool instead of looking it up with xcrun
- -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
- )
- fi
-
- cmake_src_configure
-
- if use test; then
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
- [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
- # copy clang over since resource_dir is located relatively to binary
- # therefore, we can put our new libraries in it
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
- cp "${sys_dir}"/*builtins*.a \
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
- # we also need LLVMgold.so for gold-based tests
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
- fi
- fi
-}
-
-src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- # disable sandbox to have it stop clobbering LD_PRELOAD
- local -x SANDBOX_ON=0
- # wipe LD_PRELOAD to make ASAN happy
- local -x LD_PRELOAD=
-
- cmake_build check-all
-}
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.1.ebuild
deleted file mode 100644
index 8e473f55140e..000000000000
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.1.ebuild
+++ /dev/null
@@ -1,201 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+clang test"
-# base targets
-IUSE+=" +libfuzzer +memprof +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
- asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
- shadowcallstack gwp-asan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
- || ( ${SANITIZER_FLAGS[*]} libfuzzer profile xray )
- test? (
- cfi? ( ubsan )
- gwp-asan? ( scudo )
- )"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6
- virtual/libcrypt"
-BDEPEND="
- >=dev-util/cmake-3.16
- clang? ( sys-devel/clang )
- elibc_glibc? ( net-libs/libtirpc )
- test? (
- !<sys-apps/sandbox-2.13
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
- sys-libs/compiler-rt:${SLOT}
- )
- ${PYTHON_DEPS}"
-
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-LLVM_PATCHSET=12.0.1
-llvm.org_set_globals
-
-python_check_deps() {
- use test || return 0
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-check_space() {
- if use test; then
- local CHECKREQS_DISK_BUILD=11G
- check-reqs_pkg_pretend
- fi
-}
-
-pkg_pretend() {
- check_space
-}
-
-pkg_setup() {
- check_space
- llvm_pkg_setup
- python-any-r1_pkg_setup
-}
-
-src_prepare() {
- sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
- local flag
- for flag in "${SANITIZER_FLAGS[@]}"; do
- if ! use "${flag}"; then
- local cmake_flag=${flag/-/_}
- sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
- cmake/config-ix.cmake || die
- fi
- done
-
- # TODO: fix these tests to be skipped upstream
- if use asan && ! use profile; then
- rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
- fi
- if use ubsan && ! use cfi; then
- > test/cfi/CMakeLists.txt || die
- fi
-
- llvm.org_src_prepare
-}
-
-src_configure() {
- # pre-set since we need to pass it to cmake
- BUILD_DIR=${WORKDIR}/compiler-rt_build
-
- if use clang; then
- local -x CC=${CHOST}-clang
- local -x CXX=${CHOST}-clang++
- strip-unsupported-flags
- fi
-
- local flag want_sanitizer=OFF
- for flag in "${SANITIZER_FLAGS[@]}"; do
- if use "${flag}"; then
- want_sanitizer=ON
- break
- fi
- done
-
- local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
- # use a build dir structure consistent with install
- # this makes it possible to easily deploy test-friendly clang
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
-
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
- # builtins & crt installed by sys-libs/compiler-rt
- -DCOMPILER_RT_BUILD_BUILTINS=OFF
- -DCOMPILER_RT_BUILD_CRT=OFF
- -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
- -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
- -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
- -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- if use test; then
- mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
-
- # they are created during src_test()
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
- )
-
- # same flags are passed for build & tests, so we need to strip
- # them down to a subset supported by clang
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
- strip-unsupported-flags
- fi
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
- # this allows adding arm64 support using SDK in EPREFIX
- -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
- # Set version based on the SDK in EPREFIX
- # This disables i386 for SDK >= 10.15
- # Will error if has_use tsan and SDK < 10.12
- -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
- # Use our libtool instead of looking it up with xcrun
- -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
- )
- fi
-
- cmake_src_configure
-
- if use test; then
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
- [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
- # copy clang over since resource_dir is located relatively to binary
- # therefore, we can put our new libraries in it
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
- cp "${sys_dir}"/*builtins*.a \
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
- # we also need LLVMgold.so for gold-based tests
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
- fi
- fi
-}
-
-src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- # disable sandbox to have it stop clobbering LD_PRELOAD
- local -x SANDBOX_ON=0
- # wipe LD_PRELOAD to make ASAN happy
- local -x LD_PRELOAD=
-
- cmake_build check-all
-}
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.7.ebuild
index 0e4e81fde951..0ecd27c9f4f2 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.7.ebuild
@@ -1,18 +1,18 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{10..11} )
inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
+SLOT="${LLVM_VERSION}"
KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+clang debug test"
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
# base targets
IUSE+=" +libfuzzer +memprof +orc +profile +xray"
# sanitizer targets, keep in sync with config-ix.cmake
@@ -27,36 +27,39 @@ REQUIRED_USE="
test? (
cfi? ( ubsan )
gwp-asan? ( scudo )
- )"
-RESTRICT="!test? ( test ) !clang? ( test )"
+ )
+"
+RESTRICT="
+ !clang? ( test )
+ !test? ( test )
+"
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6
- virtual/libcrypt"
+ sys-devel/llvm:${LLVM_MAJOR}
+ virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
BDEPEND="
- >=dev-util/cmake-3.16
clang? ( sys-devel/clang )
elibc_glibc? ( net-libs/libtirpc )
test? (
- !<sys-apps/sandbox-2.13
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
- sys-libs/compiler-rt:${SLOT}
+ !!<sys-apps/sandbox-2.13
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ sys-libs/compiler-rt:${LLVM_VERSION}
)
!test? (
${PYTHON_DEPS}
- )"
+ )
+"
-LLVM_COMPONENTS=( compiler-rt )
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
LLVM_PATCHSET=${PV/_/-}
llvm.org_set_globals
python_check_deps() {
use test || return 0
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
}
check_space() {
@@ -72,7 +75,7 @@ pkg_pretend() {
pkg_setup() {
check_space
- llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
python-any-r1_pkg_setup
}
@@ -88,6 +91,9 @@ src_prepare() {
fi
done
+ # bug #926330
+ sed -i -e '/-Wthread-safety/d' CMakeLists.txt cmake/config-ix.cmake || die
+
# TODO: fix these tests to be skipped upstream
if use asan && ! use profile; then
rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
@@ -121,10 +127,10 @@ src_configure() {
done
local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_VERSION}"
# use a build dir structure consistent with install
# this makes it possible to easily deploy test-friendly clang
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_VERSION}"
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
# builtins & crt installed by sys-libs/compiler-rt
@@ -139,6 +145,14 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if use amd64; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
if use test; then
mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
@@ -146,14 +160,14 @@ src_configure() {
-DLLVM_LIT_ARGS="$(get_lit_flags)"
# they are created during src_test()
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
)
# same flags are passed for build & tests, so we need to strip
# them down to a subset supported by clang
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
+ CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+ CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
strip-unsupported-flags
fi
@@ -174,23 +188,23 @@ src_configure() {
cmake_src_configure
if use test; then
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_VERSION}/lib/* )
[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
# copy clang over since resource_dir is located relatively to binary
# therefore, we can put our new libraries in it
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_VERSION}/include} || die
+ cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+ cp "${EPREFIX}"/usr/lib/clang/${LLVM_VERSION}/include/*.h \
+ "${BUILD_DIR}"/lib/clang/${LLVM_VERSION}/include/ || die
cp "${sys_dir}"/*builtins*.a \
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
+ "${BUILD_DIR}/lib/clang/${LLVM_VERSION}/lib/${sys_dir##*/}/" || die
# we also need LLVMgold.so for gold-based tests
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+ ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
fi
fi
}
@@ -202,6 +216,9 @@ src_test() {
local -x SANDBOX_ON=0
# wipe LD_PRELOAD to make ASAN happy
local -x LD_PRELOAD=
+ # avoid confusing with hardening, upstreamed for >= 16
+ # https://github.com/llvm/llvm-project/issues/60394
+ local -x CLANG_NO_DEFAULT_CONFIG=1
cmake_build check-all
}
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-16.0.6.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-16.0.6.ebuild
new file mode 100644
index 000000000000..58a7a57b942a
--- /dev/null
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-16.0.6.ebuild
@@ -0,0 +1,225 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+# base targets
+IUSE+=" +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+ asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+ shadowcallstack gwp-asan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+ || ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+ test? (
+ cfi? ( ubsan )
+ gwp-asan? ( scudo )
+ )
+"
+RESTRICT="
+ !clang? ( test )
+ !test? ( test )
+"
+
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+ virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+ clang? ( sys-devel/clang )
+ elibc_glibc? ( net-libs/libtirpc )
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ sys-libs/compiler-rt:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+ if use test; then
+ local CHECKREQS_DISK_BUILD=11G
+ check-reqs_pkg_pretend
+ fi
+}
+
+pkg_pretend() {
+ check_space
+}
+
+pkg_setup() {
+ check_space
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+ local flag
+ for flag in "${SANITIZER_FLAGS[@]}"; do
+ if ! use "${flag}"; then
+ local cmake_flag=${flag/-/_}
+ sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+ cmake/config-ix.cmake || die
+ fi
+ done
+
+ # bug #926330
+ sed -i -e '/-Wthread-safety/d' CMakeLists.txt cmake/config-ix.cmake || die
+
+ # TODO: fix these tests to be skipped upstream
+ if use asan && ! use profile; then
+ rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+ fi
+ if use ubsan && ! use cfi; then
+ > test/cfi/CMakeLists.txt || die
+ fi
+
+ if has_version -b ">=sys-libs/glibc-2.37"; then
+ # known failures with glibc-2.37
+ # https://github.com/llvm/llvm-project/issues/60678
+ rm test/dfsan/custom.cpp || die
+ rm test/dfsan/release_shadow_space.c || die
+ fi
+
+ llvm.org_src_prepare
+}
+
+src_configure() {
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ # pre-set since we need to pass it to cmake
+ BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ local flag want_sanitizer=OFF
+ for flag in "${SANITIZER_FLAGS[@]}"; do
+ if use "${flag}"; then
+ want_sanitizer=ON
+ break
+ fi
+ done
+
+ local mycmakeargs=(
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+ # use a build dir structure consistent with install
+ # this makes it possible to easily deploy test-friendly clang
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+ # builtins & crt installed by sys-libs/compiler-rt
+ -DCOMPILER_RT_BUILD_BUILTINS=OFF
+ -DCOMPILER_RT_BUILD_CRT=OFF
+ -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+ -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+ -DCOMPILER_RT_BUILD_ORC=$(usex orc)
+ -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+ -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+ -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ if use amd64; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+ # they are created during src_test()
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+ )
+
+ # same flags are passed for build & tests, so we need to strip
+ # them down to a subset supported by clang
+ CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+ CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+ strip-unsupported-flags
+ fi
+
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+ mycmakeargs+=(
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX
+ # This disables i386 for SDK >= 10.15
+ # Will error if has_use tsan and SDK < 10.12
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
+ fi
+
+ cmake_src_configure
+
+ if use test; then
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+ [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+ [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+ # copy clang over since resource_dir is located relatively to binary
+ # therefore, we can put our new libraries in it
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+ cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+ cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+ "${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+ cp "${sys_dir}"/*builtins*.a \
+ "${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+ # we also need LLVMgold.so for gold-based tests
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+ ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+ fi
+ fi
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ # disable sandbox to have it stop clobbering LD_PRELOAD
+ local -x SANDBOX_ON=0
+ # wipe LD_PRELOAD to make ASAN happy
+ local -x LD_PRELOAD=
+
+ cmake_build check-all
+}
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0-r1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.6.ebuild
index 942810e86916..204f3d0d371a 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0-r1.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.6.ebuild
@@ -1,18 +1,18 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+clang debug test"
+SLOT="${LLVM_MAJOR}"
+KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
# base targets
IUSE+=" +libfuzzer +memprof +orc +profile +xray"
# sanitizer targets, keep in sync with config-ix.cmake
@@ -27,36 +27,37 @@ REQUIRED_USE="
test? (
cfi? ( ubsan )
gwp-asan? ( scudo )
- )"
-RESTRICT="!test? ( test ) !clang? ( test )"
+ )
+"
+RESTRICT="
+ !clang? ( test )
+ !test? ( test )
+"
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6
- virtual/libcrypt"
+ sys-devel/llvm:${LLVM_MAJOR}
+ virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
BDEPEND="
- >=dev-util/cmake-3.16
clang? ( sys-devel/clang )
elibc_glibc? ( net-libs/libtirpc )
test? (
- !<sys-apps/sandbox-2.13
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
- sys-libs/compiler-rt:${SLOT}
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ sys-libs/compiler-rt:${LLVM_MAJOR}
)
!test? (
${PYTHON_DEPS}
- )"
+ )
+"
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-LLVM_PATCHSET=${PV/_/-}-r3
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
llvm.org_set_globals
python_check_deps() {
use test || return 0
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
}
check_space() {
@@ -72,7 +73,7 @@ pkg_pretend() {
pkg_setup() {
check_space
- llvm_pkg_setup
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
python-any-r1_pkg_setup
}
@@ -88,6 +89,9 @@ src_prepare() {
fi
done
+ # bug #926330
+ sed -i -e '/-Wthread-safety/d' CMakeLists.txt cmake/config-ix.cmake || die
+
# TODO: fix these tests to be skipped upstream
if use asan && ! use profile; then
rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
@@ -95,6 +99,8 @@ src_prepare() {
if use ubsan && ! use cfi; then
> test/cfi/CMakeLists.txt || die
fi
+ # hangs, sigh
+ rm test/tsan/getline_nohang.cpp || die
llvm.org_src_prepare
}
@@ -121,10 +127,10 @@ src_configure() {
done
local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
# use a build dir structure consistent with install
# this makes it possible to easily deploy test-friendly clang
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
# builtins & crt installed by sys-libs/compiler-rt
@@ -139,21 +145,28 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if use amd64; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
if use test; then
mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
# they are created during src_test()
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
)
# same flags are passed for build & tests, so we need to strip
# them down to a subset supported by clang
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
+ CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+ CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
strip-unsupported-flags
fi
@@ -174,23 +187,23 @@ src_configure() {
cmake_src_configure
if use test; then
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
# copy clang over since resource_dir is located relatively to binary
# therefore, we can put our new libraries in it
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+ cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+ cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+ "${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
cp "${sys_dir}"/*builtins*.a \
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
+ "${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
# we also need LLVMgold.so for gold-based tests
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+ ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
fi
fi
}
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.4.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.4.ebuild
new file mode 100644
index 000000000000..192ead8311f8
--- /dev/null
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.4.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+# base targets
+IUSE+=" +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+ asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+ shadowcallstack gwp-asan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+ || ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+ test? (
+ cfi? ( ubsan )
+ gwp-asan? ( scudo )
+ )
+"
+RESTRICT="
+ !clang? ( test )
+ !test? ( test )
+"
+
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+ virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+ clang? ( sys-devel/clang )
+ elibc_glibc? ( net-libs/libtirpc )
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ sys-libs/compiler-rt:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+ if use test; then
+ local CHECKREQS_DISK_BUILD=11G
+ check-reqs_pkg_pretend
+ fi
+}
+
+pkg_pretend() {
+ check_space
+}
+
+pkg_setup() {
+ check_space
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+ local flag
+ for flag in "${SANITIZER_FLAGS[@]}"; do
+ if ! use "${flag}"; then
+ local cmake_flag=${flag/-/_}
+ sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+ cmake/config-ix.cmake || die
+ fi
+ done
+
+ # TODO: fix these tests to be skipped upstream
+ if use asan && ! use profile; then
+ rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+ fi
+ if use ubsan && ! use cfi; then
+ > test/cfi/CMakeLists.txt || die
+ fi
+ # hangs, sigh
+ rm test/tsan/getline_nohang.cpp || die
+
+ llvm.org_src_prepare
+}
+
+src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ # pre-set since we need to pass it to cmake
+ BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ local flag want_sanitizer=OFF
+ for flag in "${SANITIZER_FLAGS[@]}"; do
+ if use "${flag}"; then
+ want_sanitizer=ON
+ break
+ fi
+ done
+
+ local mycmakeargs=(
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+ # use a build dir structure consistent with install
+ # this makes it possible to easily deploy test-friendly clang
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+ # builtins & crt installed by sys-libs/compiler-rt
+ -DCOMPILER_RT_BUILD_BUILTINS=OFF
+ -DCOMPILER_RT_BUILD_CRT=OFF
+ -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+ -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+ -DCOMPILER_RT_BUILD_ORC=$(usex orc)
+ -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+ -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+ -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ if use amd64; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+ # they are created during src_test()
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+ )
+
+ # same flags are passed for build & tests, so we need to strip
+ # them down to a subset supported by clang
+ CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+ CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+ strip-unsupported-flags
+ fi
+
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+ mycmakeargs+=(
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX
+ # This disables i386 for SDK >= 10.15
+ # Will error if has_use tsan and SDK < 10.12
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
+ fi
+
+ cmake_src_configure
+
+ if use test; then
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+ [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+ [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+ # copy clang over since resource_dir is located relatively to binary
+ # therefore, we can put our new libraries in it
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+ cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+ cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+ "${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+ cp "${sys_dir}"/*builtins*.a \
+ "${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+ # we also need LLVMgold.so for gold-based tests
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+ ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+ fi
+ fi
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ # disable sandbox to have it stop clobbering LD_PRELOAD
+ local -x SANDBOX_ON=0
+ # wipe LD_PRELOAD to make ASAN happy
+ local -x LD_PRELOAD=
+
+ cmake_build check-all
+}
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0.9999.ebuild
index 6a19654cbc0a..57f868d54be6 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1.9999.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0.9999.ebuild
@@ -1,18 +1,17 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{10..12} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
-IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
# base targets
IUSE+=" +libfuzzer +memprof +orc +profile +xray"
# sanitizer targets, keep in sync with config-ix.cmake
@@ -27,36 +26,37 @@ REQUIRED_USE="
test? (
cfi? ( ubsan )
gwp-asan? ( scudo )
- )"
-RESTRICT="!test? ( test ) !clang? ( test )"
+ )
+"
+RESTRICT="
+ !clang? ( test )
+ !test? ( test )
+"
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6
- virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]"
+ sys-devel/llvm:${LLVM_MAJOR}
+ virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
BDEPEND="
- >=dev-util/cmake-3.16
clang? ( sys-devel/clang )
elibc_glibc? ( net-libs/libtirpc )
test? (
- !<sys-apps/sandbox-2.13
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
- sys-libs/compiler-rt:${SLOT}
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ sys-libs/compiler-rt:${LLVM_MAJOR}
)
!test? (
${PYTHON_DEPS}
- )"
+ )
+"
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-LLVM_PATCHSET=9999-1
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
llvm.org_set_globals
python_check_deps() {
use test || return 0
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
}
check_space() {
@@ -72,7 +72,6 @@ pkg_pretend() {
pkg_setup() {
check_space
- llvm_pkg_setup
python-any-r1_pkg_setup
}
@@ -95,11 +94,15 @@ src_prepare() {
if use ubsan && ! use cfi; then
> test/cfi/CMakeLists.txt || die
fi
+ # hangs, sigh
+ rm test/tsan/getline_nohang.cpp || die
llvm.org_src_prepare
}
src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
@@ -121,10 +124,10 @@ src_configure() {
done
local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
# use a build dir structure consistent with install
# this makes it possible to easily deploy test-friendly clang
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
# builtins & crt installed by sys-libs/compiler-rt
@@ -149,19 +152,18 @@ src_configure() {
if use test; then
mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
# they are created during src_test()
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
)
# same flags are passed for build & tests, so we need to strip
# them down to a subset supported by clang
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
+ CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+ CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
strip-unsupported-flags
fi
@@ -182,23 +184,23 @@ src_configure() {
cmake_src_configure
if use test; then
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
# copy clang over since resource_dir is located relatively to binary
# therefore, we can put our new libraries in it
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+ cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+ cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+ "${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
cp "${sys_dir}"/*builtins*.a \
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
+ "${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
# we also need LLVMgold.so for gold-based tests
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+ ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
fi
fi
}
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1_rc3.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0_pre20240410.ebuild
index 203bcf1a2488..57f868d54be6 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1_rc3.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0_pre20240410.ebuild
@@ -1,18 +1,17 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{10..12} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
-IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
# base targets
IUSE+=" +libfuzzer +memprof +orc +profile +xray"
# sanitizer targets, keep in sync with config-ix.cmake
@@ -27,36 +26,37 @@ REQUIRED_USE="
test? (
cfi? ( ubsan )
gwp-asan? ( scudo )
- )"
-RESTRICT="!test? ( test ) !clang? ( test )"
+ )
+"
+RESTRICT="
+ !clang? ( test )
+ !test? ( test )
+"
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6
- virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]"
+ sys-devel/llvm:${LLVM_MAJOR}
+ virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
BDEPEND="
- >=dev-util/cmake-3.16
clang? ( sys-devel/clang )
elibc_glibc? ( net-libs/libtirpc )
test? (
- !<sys-apps/sandbox-2.13
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
- sys-libs/compiler-rt:${SLOT}
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ sys-libs/compiler-rt:${LLVM_MAJOR}
)
!test? (
${PYTHON_DEPS}
- )"
+ )
+"
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-LLVM_PATCHSET=${PV/_/-}
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
llvm.org_set_globals
python_check_deps() {
use test || return 0
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
}
check_space() {
@@ -72,7 +72,6 @@ pkg_pretend() {
pkg_setup() {
check_space
- llvm_pkg_setup
python-any-r1_pkg_setup
}
@@ -95,11 +94,15 @@ src_prepare() {
if use ubsan && ! use cfi; then
> test/cfi/CMakeLists.txt || die
fi
+ # hangs, sigh
+ rm test/tsan/getline_nohang.cpp || die
llvm.org_src_prepare
}
src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
@@ -121,10 +124,10 @@ src_configure() {
done
local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
# use a build dir structure consistent with install
# this makes it possible to easily deploy test-friendly clang
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
# builtins & crt installed by sys-libs/compiler-rt
@@ -149,19 +152,18 @@ src_configure() {
if use test; then
mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
# they are created during src_test()
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
)
# same flags are passed for build & tests, so we need to strip
# them down to a subset supported by clang
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
+ CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+ CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
strip-unsupported-flags
fi
@@ -182,23 +184,23 @@ src_configure() {
cmake_src_configure
if use test; then
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
# copy clang over since resource_dir is located relatively to binary
# therefore, we can put our new libraries in it
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+ cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+ cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+ "${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
cp "${sys_dir}"/*builtins*.a \
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
+ "${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
# we also need LLVMgold.so for gold-based tests
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+ ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
fi
fi
}
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0_pre20240420.ebuild
index 12e5eb2d01e7..57f868d54be6 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0_pre20240420.ebuild
@@ -1,18 +1,17 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{10..12} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
-IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
# base targets
IUSE+=" +libfuzzer +memprof +orc +profile +xray"
# sanitizer targets, keep in sync with config-ix.cmake
@@ -27,36 +26,37 @@ REQUIRED_USE="
test? (
cfi? ( ubsan )
gwp-asan? ( scudo )
- )"
-RESTRICT="!test? ( test ) !clang? ( test )"
+ )
+"
+RESTRICT="
+ !clang? ( test )
+ !test? ( test )
+"
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6
- virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]"
+ sys-devel/llvm:${LLVM_MAJOR}
+ virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
BDEPEND="
- >=dev-util/cmake-3.16
clang? ( sys-devel/clang )
elibc_glibc? ( net-libs/libtirpc )
test? (
- !<sys-apps/sandbox-2.13
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
- sys-libs/compiler-rt:${SLOT}
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ sys-libs/compiler-rt:${LLVM_MAJOR}
)
!test? (
${PYTHON_DEPS}
- )"
+ )
+"
-LLVM_COMPONENTS=( compiler-rt cmake )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-LLVM_PATCHSET=9999-1
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
llvm.org_set_globals
python_check_deps() {
use test || return 0
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
}
check_space() {
@@ -72,7 +72,6 @@ pkg_pretend() {
pkg_setup() {
check_space
- llvm_pkg_setup
python-any-r1_pkg_setup
}
@@ -95,11 +94,15 @@ src_prepare() {
if use ubsan && ! use cfi; then
> test/cfi/CMakeLists.txt || die
fi
+ # hangs, sigh
+ rm test/tsan/getline_nohang.cpp || die
llvm.org_src_prepare
}
src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
@@ -121,10 +124,10 @@ src_configure() {
done
local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
# use a build dir structure consistent with install
# this makes it possible to easily deploy test-friendly clang
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
# builtins & crt installed by sys-libs/compiler-rt
@@ -149,19 +152,18 @@ src_configure() {
if use test; then
mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
# they are created during src_test()
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
)
# same flags are passed for build & tests, so we need to strip
# them down to a subset supported by clang
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
+ CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+ CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
strip-unsupported-flags
fi
@@ -182,23 +184,23 @@ src_configure() {
cmake_src_configure
if use test; then
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
# copy clang over since resource_dir is located relatively to binary
# therefore, we can put our new libraries in it
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+ cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+ cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+ "${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
cp "${sys_dir}"/*builtins*.a \
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
+ "${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
# we also need LLVMgold.so for gold-based tests
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+ ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
fi
fi
}
diff --git a/sys-libs/compiler-rt-sanitizers/metadata.xml b/sys-libs/compiler-rt-sanitizers/metadata.xml
index 87fa65781b5e..16744cf2f873 100644
--- a/sys-libs/compiler-rt-sanitizers/metadata.xml
+++ b/sys-libs/compiler-rt-sanitizers/metadata.xml
@@ -28,4 +28,7 @@
<flag name="shadowcallstack">Build ShadowCallStack.</flag>
<flag name="gwp-asan">Build GWP-ASAN runtime.</flag>
</use>
+ <upstream>
+ <remote-id type="github">llvm/llvm-project</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
index 45e9d7a057c0..07adb451589b 100644
--- a/sys-libs/compiler-rt/Manifest
+++ b/sys-libs/compiler-rt/Manifest
@@ -1,9 +1,13 @@
-DIST llvm-gentoo-patchset-11.1.0-1.tar.xz 4032 BLAKE2B e69138a422e315b31a3d9c11faa4ae1ddf1bf9092cee2db0de4d2adef81fd802973488293aab48b764402b51996893b17ca03249ef4620848a576d1f6cdb9698 SHA512 e1c5504dab6c5db9fdf4addfeb12316f22d0258717ba551a9b7b3ba37919491fb6011ac5cca1e793b7509d5c1c186bc6bc4213f7d6155d190612492b216f979b
-DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249
-DIST llvm-gentoo-patchset-13.0.0.tar.xz 5012 BLAKE2B 6760c78c086aaf6629143fd920b0a2c68cad9278628fbea8164dfeb59db95984a5b5d6b3505b510c697e8c95bf8d2be782c6b73c01622d52f2da9b07ecff39e0 SHA512 7764d49343b795b6bebae64f646ba27e3e6cc2a20b8a1aee645ce0d8474633c34acfbb73c08546fee415755dd4ea5a98c1d84db5e394cf5f4fc802eb61148ab6
-DIST llvm-gentoo-patchset-13.0.1-rc3.tar.xz 4808 BLAKE2B d8ed3ae424914437413e2e8c029880072e93d79ca79b842ad59451df46594c9b0d73ee5d49d3b65c4c7a40c86b2e0d43501ef106aea7c481f22425a5245a3411 SHA512 10430a720b120a340a681fa435a7f050741c75270607e3f5214bf829313d274c11f019f1ac072857dc5d7f868e6eb013932d1c94446e8cb2e151ac818a081914
-DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc
-DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
-DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
-DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
-DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1
+DIST llvm-gentoo-patchset-15.0.7.tar.xz 19300 BLAKE2B b70e81d744c2eba5cd851e7b690ce8979b3064973f522be7c93bfb541860000a4bc8b17219f8788dfc8a527217dd13946cf7836640698ddd3d4b3fde493dfbf8 SHA512 daffff6ae4a0874aff1a423b4bb36701ecb5a35a36ae91d4ed7fda58b83e50ffcdc30498c84be4711fd3e1f227bf312dbe930019203e0a131944439af2aa94f7
+DIST llvm-gentoo-patchset-16.0.6-r4.tar.xz 18732 BLAKE2B 2f00135700b5e4f0d0e049e13c1da06fd37017b7f455419157ac441bb7d4de12e3e25f4d8480431c1074cfa6a5d66a38ae63d95faefaa4e9c8cd5810c082a596 SHA512 f61c82a195307dc6cb42e09b3c82af2b37827583884ff2de0ef300290fb8f92e90a08895d12e5dec9b29a232c2e942a2d5951dab431e02722fcafbcd1e2b7976
+DIST llvm-gentoo-patchset-17.0.6.tar.xz 1792 BLAKE2B 21b34b436333c0b37522d4340cccc84a572701f6e267cf7c6adfa9be419913f5a6c9ee40a6be5c62d12fbd868912801d30381573c4459c05676e05785cccaefe SHA512 2d90b5e7fcbb950249ef7133fac1ed3dcb758a4d92732119049526cea0b291bd4e9738c4c0d806d70e7d769e1906f8ef3930066c206c00b6ec7d3509ed0fed19
+DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
+DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
+DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
+DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
+DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
+DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29
+DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386
+DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1
+DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50
diff --git a/sys-libs/compiler-rt/compiler-rt-11.1.0.ebuild b/sys-libs/compiler-rt/compiler-rt-11.1.0.ebuild
deleted file mode 100644
index 46345babf318..000000000000
--- a/sys-libs/compiler-rt/compiler-rt-11.1.0.ebuild
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="Compiler runtime library for clang (built-in part)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+clang test"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- >=dev-util/cmake-3.16
- clang? ( sys-devel/clang )
- test? (
- $(python_gen_any_dep ">=dev-python/lit-9.0.1[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
- )
- ${PYTHON_DEPS}"
-
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_PATCHSET=11.1.0-1
-llvm.org_set_globals
-
-python_check_deps() {
- use test || return 0
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_pretend() {
- if ! use clang && ! tc-is-clang; then
- ewarn "Building using a compiler other than clang may result in broken atomics"
- ewarn "library. Enable USE=clang unless you have a very good reason not to."
- fi
-}
-
-pkg_setup() {
- # Darwin Prefix builds do not have llvm installed yet, so rely on
- # bootstrap-prefix to set the appropriate path vars to LLVM instead
- # of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- python-any-r1_pkg_setup
-}
-
-test_compiler() {
- $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
- <<<'int main() { return 0; }' &>/dev/null
-}
-
-src_configure() {
- # pre-set since we need to pass it to cmake
- BUILD_DIR=${WORKDIR}/${P}_build
-
- local nolib_flags=( -nodefaultlibs -lc )
- if use clang; then
- local -x CC=${CHOST}-clang
- local -x CXX=${CHOST}-clang++
- strip-unsupported-flags
- # ensure we can use clang before installing compiler-rt
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- elif ! test_compiler; then
- if test_compiler "${nolib_flags[@]}"; then
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
- fi
- fi
-
- local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
-
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
- -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
- -DCOMPILER_RT_BUILD_PROFILE=OFF
- -DCOMPILER_RT_BUILD_SANITIZERS=OFF
- -DCOMPILER_RT_BUILD_XRAY=OFF
-
- -DPython3_EXECUTABLE="${PYTHON}"
- )
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
- # this allows adding arm64 support using SDK in EPREFIX
- -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
- # Set version based on the SDK in EPREFIX.
- # This disables i386 for SDK >= 10.15
- -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
- # Use our libtool instead of looking it up with xcrun
- -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
- )
- fi
-
- if use test; then
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
-
- -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++"
- )
- fi
-
- cmake_src_configure
-}
-
-src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
-
- cmake_build check-builtins
-}
diff --git a/sys-libs/compiler-rt/compiler-rt-12.0.1.ebuild b/sys-libs/compiler-rt/compiler-rt-12.0.1.ebuild
deleted file mode 100644
index 9f0caf6a3eec..000000000000
--- a/sys-libs/compiler-rt/compiler-rt-12.0.1.ebuild
+++ /dev/null
@@ -1,124 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="Compiler runtime library for clang (built-in part)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+clang test"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- >=dev-util/cmake-3.16
- clang? ( sys-devel/clang )
- test? (
- $(python_gen_any_dep ">=dev-python/lit-9.0.1[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
- )
- ${PYTHON_DEPS}"
-
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_PATCHSET=12.0.1
-llvm.org_set_globals
-
-python_check_deps() {
- use test || return 0
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_pretend() {
- if ! use clang && ! tc-is-clang; then
- ewarn "Building using a compiler other than clang may result in broken atomics"
- ewarn "library. Enable USE=clang unless you have a very good reason not to."
- fi
-}
-
-pkg_setup() {
- # Darwin Prefix builds do not have llvm installed yet, so rely on
- # bootstrap-prefix to set the appropriate path vars to LLVM instead
- # of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- python-any-r1_pkg_setup
-}
-
-test_compiler() {
- $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
- <<<'int main() { return 0; }' &>/dev/null
-}
-
-src_configure() {
- # pre-set since we need to pass it to cmake
- BUILD_DIR=${WORKDIR}/${P}_build
-
- local nolib_flags=( -nodefaultlibs -lc )
- if use clang; then
- local -x CC=${CHOST}-clang
- local -x CXX=${CHOST}-clang++
- strip-unsupported-flags
- # ensure we can use clang before installing compiler-rt
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- elif ! test_compiler; then
- if test_compiler "${nolib_flags[@]}"; then
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
- fi
- fi
-
- local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
-
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
- -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
- -DCOMPILER_RT_BUILD_MEMPROF=OFF
- -DCOMPILER_RT_BUILD_PROFILE=OFF
- -DCOMPILER_RT_BUILD_SANITIZERS=OFF
- -DCOMPILER_RT_BUILD_XRAY=OFF
-
- -DPython3_EXECUTABLE="${PYTHON}"
- )
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
- # this allows adding arm64 support using SDK in EPREFIX
- -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
- # Set version based on the SDK in EPREFIX.
- # This disables i386 for SDK >= 10.15
- -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
- # Use our libtool instead of looking it up with xcrun
- -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
- )
- fi
-
- if use test; then
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
-
- -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++"
- )
- fi
-
- cmake_src_configure
-}
-
-src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
-
- cmake_build check-builtins
-}
diff --git a/sys-libs/compiler-rt/compiler-rt-13.0.0.ebuild b/sys-libs/compiler-rt/compiler-rt-13.0.0.ebuild
deleted file mode 100644
index a2d62590de11..000000000000
--- a/sys-libs/compiler-rt/compiler-rt-13.0.0.ebuild
+++ /dev/null
@@ -1,130 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="Compiler runtime library for clang (built-in part)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+clang debug test"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- >=dev-util/cmake-3.16
- clang? ( sys-devel/clang )
- test? (
- $(python_gen_any_dep ">=dev-python/lit-9.0.1[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
- )
- !test? (
- ${PYTHON_DEPS}
- )"
-
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_PATCHSET=${PV/_/-}
-llvm.org_set_globals
-
-python_check_deps() {
- use test || return 0
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_pretend() {
- if ! use clang && ! tc-is-clang; then
- ewarn "Building using a compiler other than clang may result in broken atomics"
- ewarn "library. Enable USE=clang unless you have a very good reason not to."
- fi
-}
-
-pkg_setup() {
- # Darwin Prefix builds do not have llvm installed yet, so rely on
- # bootstrap-prefix to set the appropriate path vars to LLVM instead
- # of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- python-any-r1_pkg_setup
-}
-
-test_compiler() {
- $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
- <<<'int main() { return 0; }' &>/dev/null
-}
-
-src_configure() {
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
- # pre-set since we need to pass it to cmake
- BUILD_DIR=${WORKDIR}/${P}_build
-
- local nolib_flags=( -nodefaultlibs -lc )
- if use clang; then
- local -x CC=${CHOST}-clang
- local -x CXX=${CHOST}-clang++
- strip-unsupported-flags
- # ensure we can use clang before installing compiler-rt
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- elif ! test_compiler; then
- if test_compiler "${nolib_flags[@]}"; then
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
- fi
- fi
-
- local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
-
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
- -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
- -DCOMPILER_RT_BUILD_MEMPROF=OFF
- -DCOMPILER_RT_BUILD_ORC=OFF
- -DCOMPILER_RT_BUILD_PROFILE=OFF
- -DCOMPILER_RT_BUILD_SANITIZERS=OFF
- -DCOMPILER_RT_BUILD_XRAY=OFF
-
- -DPython3_EXECUTABLE="${PYTHON}"
- )
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
- # this allows adding arm64 support using SDK in EPREFIX
- -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
- # Set version based on the SDK in EPREFIX.
- # This disables i386 for SDK >= 10.15
- -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
- # Use our libtool instead of looking it up with xcrun
- -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
- )
- fi
-
- if use test; then
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
-
- -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++"
- )
- fi
-
- cmake_src_configure
-}
-
-src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
-
- cmake_build check-builtins
-}
diff --git a/sys-libs/compiler-rt/compiler-rt-13.0.1_rc3.ebuild b/sys-libs/compiler-rt/compiler-rt-15.0.7.ebuild
index 9b23dfc62570..c979daaf6e68 100644
--- a/sys-libs/compiler-rt/compiler-rt-13.0.1_rc3.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-15.0.7.ebuild
@@ -1,42 +1,41 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{10..11} )
inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
+SLOT="${LLVM_VERSION}"
+KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
RESTRICT="!test? ( test ) !clang? ( test )"
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6"
+ sys-devel/llvm:${LLVM_MAJOR}
+"
BDEPEND="
- >=dev-util/cmake-3.16
clang? ( sys-devel/clang )
test? (
- $(python_gen_any_dep ">=dev-python/lit-9.0.1[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
)
!test? (
${PYTHON_DEPS}
- )"
+ )
+"
-LLVM_COMPONENTS=( compiler-rt )
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
LLVM_PATCHSET=${PV/_/-}
llvm.org_set_globals
python_check_deps() {
use test || return 0
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
}
pkg_pretend() {
@@ -50,8 +49,8 @@ pkg_setup() {
# Darwin Prefix builds do not have llvm installed yet, so rely on
# bootstrap-prefix to set the appropriate path vars to LLVM instead
# of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
+ if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
python-any-r1_pkg_setup
}
@@ -68,22 +67,35 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- local nolib_flags=( -nodefaultlibs -lc )
if use clang; then
- local -x CC=${CHOST}-clang
- local -x CXX=${CHOST}-clang++
+ # Only do this conditionally to allow overriding with
+ # e.g. CC=clang-13 in case of breakage
+ if ! tc-is-clang ; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ fi
+
strip-unsupported-flags
- # ensure we can use clang before installing compiler-rt
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- elif ! test_compiler; then
+ fi
+
+ if ! test_compiler; then
+ local nolib_flags=( -nodefaultlibs -lc )
+
if test_compiler "${nolib_flags[@]}"; then
local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
+ # Avoiding -nostartfiles earlier on for bug #862540,
+ # and set available entry symbol for bug #862798.
+ nolib_flags+=( -nostartfiles -emain )
+
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
fi
fi
local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_VERSION}"
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
@@ -121,8 +133,8 @@ src_configure() {
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
- -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++"
+ -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
)
fi
diff --git a/sys-libs/compiler-rt/compiler-rt-16.0.6-r4.ebuild b/sys-libs/compiler-rt/compiler-rt-16.0.6-r4.ebuild
new file mode 100644
index 000000000000..6ac04f68fce4
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-16.0.6-r4.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+
+DESCRIPTION="Compiler runtime library for clang (built-in part)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+RESTRICT="!test? ( test ) !clang? ( test )"
+
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? ( sys-devel/clang )
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_PATCHSET=${PV}-r4
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if ! use clang && ! tc-is-clang; then
+ ewarn "Building using a compiler other than clang may result in broken atomics"
+ ewarn "library. Enable USE=clang unless you have a very good reason not to."
+ fi
+}
+
+pkg_setup() {
+ # Darwin Prefix builds do not have llvm installed yet, so rely on
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead
+ # of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
+ python-any-r1_pkg_setup
+}
+
+test_compiler() {
+ target_is_not_host && return
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ # pre-set since we need to pass it to cmake
+ BUILD_DIR=${WORKDIR}/${P}_build
+
+ if use clang && ! is_crosspkg; then
+ # Only do this conditionally to allow overriding with
+ # e.g. CC=clang-13 in case of breakage
+ if ! tc-is-clang ; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ fi
+
+ strip-unsupported-flags
+ fi
+
+ if ! is_crosspkg && ! test_compiler ; then
+ local nolib_flags=( -nodefaultlibs -lc )
+
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
+ # Avoiding -nostartfiles earlier on for bug #862540,
+ # and set available entry symbol for bug #862798.
+ nolib_flags+=( -nostartfiles -emain )
+
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local mycmakeargs=(
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+ -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
+ -DCOMPILER_RT_BUILD_MEMPROF=OFF
+ -DCOMPILER_RT_BUILD_ORC=OFF
+ -DCOMPILER_RT_BUILD_PROFILE=OFF
+ -DCOMPILER_RT_BUILD_SANITIZERS=OFF
+ -DCOMPILER_RT_BUILD_XRAY=OFF
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ if use amd64 && ! target_is_not_host; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+ mycmakeargs+=(
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX.
+ # This disables i386 for SDK >= 10.15
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
+ fi
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+ -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+ )
+ fi
+
+ cmake_src_configure
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake_build check-builtins
+}
diff --git a/sys-libs/compiler-rt/compiler-rt-14.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild
index 98c8fe855cfe..4c27d82506bb 100644
--- a/sys-libs/compiler-rt/compiler-rt-14.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild
@@ -1,42 +1,40 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
+SLOT="${LLVM_MAJOR}"
+KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
RESTRICT="!test? ( test ) !clang? ( test )"
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6"
+ sys-devel/llvm:${LLVM_MAJOR}
+"
BDEPEND="
- >=dev-util/cmake-3.16
clang? ( sys-devel/clang )
test? (
- $(python_gen_any_dep ">=dev-python/lit-9.0.1[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
)
!test? (
${PYTHON_DEPS}
- )"
+ )
+"
-LLVM_COMPONENTS=( compiler-rt cmake )
-LLVM_PATCHSET=9999-1
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
llvm.org_set_globals
python_check_deps() {
use test || return 0
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
}
pkg_pretend() {
@@ -50,13 +48,21 @@ pkg_setup() {
# Darwin Prefix builds do not have llvm installed yet, so rely on
# bootstrap-prefix to set the appropriate path vars to LLVM instead
# of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
+ if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -68,22 +74,35 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- local nolib_flags=( -nodefaultlibs -lc )
- if use clang; then
- local -x CC=${CHOST}-clang
- local -x CXX=${CHOST}-clang++
+ if use clang && ! is_crosspkg; then
+ # Only do this conditionally to allow overriding with
+ # e.g. CC=clang-13 in case of breakage
+ if ! tc-is-clang ; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ fi
+
strip-unsupported-flags
- # ensure we can use clang before installing compiler-rt
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- elif ! test_compiler; then
+ fi
+
+ if ! is_crosspkg && ! test_compiler ; then
+ local nolib_flags=( -nodefaultlibs -lc )
+
if test_compiler "${nolib_flags[@]}"; then
local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
+ # Avoiding -nostartfiles earlier on for bug #862540,
+ # and set available entry symbol for bug #862798.
+ nolib_flags+=( -nostartfiles -emain )
+
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
fi
fi
local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
@@ -96,13 +115,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
@@ -121,8 +160,8 @@ src_configure() {
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
- -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++"
+ -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
)
fi
diff --git a/sys-libs/compiler-rt/compiler-rt-13.0.1.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.6.ebuild
index 1f0bd3af8c06..50ca8e397361 100644
--- a/sys-libs/compiler-rt/compiler-rt-13.0.1.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-17.0.6.ebuild
@@ -1,42 +1,41 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
+SLOT="${LLVM_MAJOR}"
+KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
RESTRICT="!test? ( test ) !clang? ( test )"
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6"
+ sys-devel/llvm:${LLVM_MAJOR}
+"
BDEPEND="
- >=dev-util/cmake-3.16
clang? ( sys-devel/clang )
test? (
- $(python_gen_any_dep ">=dev-python/lit-9.0.1[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
)
!test? (
${PYTHON_DEPS}
- )"
+ )
+"
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_PATCHSET=9999-1
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_PATCHSET=${PV}
llvm.org_set_globals
python_check_deps() {
use test || return 0
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
}
pkg_pretend() {
@@ -50,13 +49,21 @@ pkg_setup() {
# Darwin Prefix builds do not have llvm installed yet, so rely on
# bootstrap-prefix to set the appropriate path vars to LLVM instead
# of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
+ if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -68,22 +75,35 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- local nolib_flags=( -nodefaultlibs -lc )
- if use clang; then
- local -x CC=${CHOST}-clang
- local -x CXX=${CHOST}-clang++
+ if use clang && ! is_crosspkg; then
+ # Only do this conditionally to allow overriding with
+ # e.g. CC=clang-13 in case of breakage
+ if ! tc-is-clang ; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ fi
+
strip-unsupported-flags
- # ensure we can use clang before installing compiler-rt
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- elif ! test_compiler; then
+ fi
+
+ if ! is_crosspkg && ! test_compiler ; then
+ local nolib_flags=( -nodefaultlibs -lc )
+
if test_compiler "${nolib_flags[@]}"; then
local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
+ # Avoiding -nostartfiles earlier on for bug #862540,
+ # and set available entry symbol for bug #862798.
+ nolib_flags+=( -nostartfiles -emain )
+
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
fi
fi
local mycmakeargs=(
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
@@ -96,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
@@ -121,8 +161,8 @@ src_configure() {
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
- -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang"
- -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++"
+ -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
)
fi
diff --git a/sys-libs/compiler-rt/compiler-rt-18.1.4.ebuild b/sys-libs/compiler-rt/compiler-rt-18.1.4.ebuild
new file mode 100644
index 000000000000..e2a452caad61
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-18.1.4.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake crossdev flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="Compiler runtime library for clang (built-in part)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+RESTRICT="!test? ( test ) !clang? ( test )"
+
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? ( sys-devel/clang )
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if ! use clang && ! tc-is-clang; then
+ ewarn "Building using a compiler other than clang may result in broken atomics"
+ ewarn "library. Enable USE=clang unless you have a very good reason not to."
+ fi
+}
+
+pkg_setup() {
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
+ python-any-r1_pkg_setup
+}
+
+test_compiler() {
+ target_is_not_host && return
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ # pre-set since we need to pass it to cmake
+ BUILD_DIR=${WORKDIR}/${P}_build
+
+ if use clang && ! is_crosspkg; then
+ # Only do this conditionally to allow overriding with
+ # e.g. CC=clang-13 in case of breakage
+ if ! tc-is-clang ; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ fi
+
+ strip-unsupported-flags
+ fi
+
+ if ! is_crosspkg && ! test_compiler ; then
+ local nolib_flags=( -nodefaultlibs -lc )
+
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
+ # Avoiding -nostartfiles earlier on for bug #862540,
+ # and set available entry symbol for bug #862798.
+ nolib_flags+=( -nostartfiles -emain )
+
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local mycmakeargs=(
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+ -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
+ -DCOMPILER_RT_BUILD_MEMPROF=OFF
+ -DCOMPILER_RT_BUILD_ORC=OFF
+ -DCOMPILER_RT_BUILD_PROFILE=OFF
+ -DCOMPILER_RT_BUILD_SANITIZERS=OFF
+ -DCOMPILER_RT_BUILD_XRAY=OFF
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ if use amd64 && ! target_is_not_host; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+ mycmakeargs+=(
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX.
+ # This disables i386 for SDK >= 10.15
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
+ fi
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+ -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+ )
+ fi
+
+ cmake_src_configure
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake_build check-builtins
+}
diff --git a/sys-libs/compiler-rt/compiler-rt-19.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..75ff3c155c03
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-19.0.0.9999.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake crossdev flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="Compiler runtime library for clang (built-in part)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+RESTRICT="!test? ( test ) !clang? ( test )"
+
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? ( sys-devel/clang )
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if ! use clang && ! tc-is-clang; then
+ ewarn "Building using a compiler other than clang may result in broken atomics"
+ ewarn "library. Enable USE=clang unless you have a very good reason not to."
+ fi
+}
+
+pkg_setup() {
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
+ python-any-r1_pkg_setup
+}
+
+test_compiler() {
+ target_is_not_host && return
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ # pre-set since we need to pass it to cmake
+ BUILD_DIR=${WORKDIR}/${P}_build
+
+ if use clang && ! is_crosspkg; then
+ # Only do this conditionally to allow overriding with
+ # e.g. CC=clang-13 in case of breakage
+ if ! tc-is-clang ; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ fi
+
+ strip-unsupported-flags
+ fi
+
+ if ! is_crosspkg && ! test_compiler ; then
+ local nolib_flags=( -nodefaultlibs -lc )
+
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
+ # Avoiding -nostartfiles earlier on for bug #862540,
+ # and set available entry symbol for bug #862798.
+ nolib_flags+=( -nostartfiles -emain )
+
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local mycmakeargs=(
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+ -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
+ -DCOMPILER_RT_BUILD_MEMPROF=OFF
+ -DCOMPILER_RT_BUILD_ORC=OFF
+ -DCOMPILER_RT_BUILD_PROFILE=OFF
+ -DCOMPILER_RT_BUILD_SANITIZERS=OFF
+ -DCOMPILER_RT_BUILD_XRAY=OFF
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ if use amd64 && ! target_is_not_host; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+ mycmakeargs+=(
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX.
+ # This disables i386 for SDK >= 10.15
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
+ fi
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+ -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+ )
+ fi
+
+ cmake_src_configure
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake_build check-builtins
+}
diff --git a/sys-libs/compiler-rt/compiler-rt-19.0.0_pre20240410.ebuild b/sys-libs/compiler-rt/compiler-rt-19.0.0_pre20240410.ebuild
new file mode 100644
index 000000000000..75ff3c155c03
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-19.0.0_pre20240410.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake crossdev flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="Compiler runtime library for clang (built-in part)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+RESTRICT="!test? ( test ) !clang? ( test )"
+
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? ( sys-devel/clang )
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if ! use clang && ! tc-is-clang; then
+ ewarn "Building using a compiler other than clang may result in broken atomics"
+ ewarn "library. Enable USE=clang unless you have a very good reason not to."
+ fi
+}
+
+pkg_setup() {
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
+ python-any-r1_pkg_setup
+}
+
+test_compiler() {
+ target_is_not_host && return
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ # pre-set since we need to pass it to cmake
+ BUILD_DIR=${WORKDIR}/${P}_build
+
+ if use clang && ! is_crosspkg; then
+ # Only do this conditionally to allow overriding with
+ # e.g. CC=clang-13 in case of breakage
+ if ! tc-is-clang ; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ fi
+
+ strip-unsupported-flags
+ fi
+
+ if ! is_crosspkg && ! test_compiler ; then
+ local nolib_flags=( -nodefaultlibs -lc )
+
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
+ # Avoiding -nostartfiles earlier on for bug #862540,
+ # and set available entry symbol for bug #862798.
+ nolib_flags+=( -nostartfiles -emain )
+
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local mycmakeargs=(
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+ -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
+ -DCOMPILER_RT_BUILD_MEMPROF=OFF
+ -DCOMPILER_RT_BUILD_ORC=OFF
+ -DCOMPILER_RT_BUILD_PROFILE=OFF
+ -DCOMPILER_RT_BUILD_SANITIZERS=OFF
+ -DCOMPILER_RT_BUILD_XRAY=OFF
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ if use amd64 && ! target_is_not_host; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+ mycmakeargs+=(
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX.
+ # This disables i386 for SDK >= 10.15
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
+ fi
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+ -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+ )
+ fi
+
+ cmake_src_configure
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake_build check-builtins
+}
diff --git a/sys-libs/compiler-rt/compiler-rt-19.0.0_pre20240420.ebuild b/sys-libs/compiler-rt/compiler-rt-19.0.0_pre20240420.ebuild
new file mode 100644
index 000000000000..75ff3c155c03
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-19.0.0_pre20240420.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake crossdev flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="Compiler runtime library for clang (built-in part)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+RESTRICT="!test? ( test ) !clang? ( test )"
+
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? ( sys-devel/clang )
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if ! use clang && ! tc-is-clang; then
+ ewarn "Building using a compiler other than clang may result in broken atomics"
+ ewarn "library. Enable USE=clang unless you have a very good reason not to."
+ fi
+}
+
+pkg_setup() {
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
+ python-any-r1_pkg_setup
+}
+
+test_compiler() {
+ target_is_not_host && return
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ # pre-set since we need to pass it to cmake
+ BUILD_DIR=${WORKDIR}/${P}_build
+
+ if use clang && ! is_crosspkg; then
+ # Only do this conditionally to allow overriding with
+ # e.g. CC=clang-13 in case of breakage
+ if ! tc-is-clang ; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ fi
+
+ strip-unsupported-flags
+ fi
+
+ if ! is_crosspkg && ! test_compiler ; then
+ local nolib_flags=( -nodefaultlibs -lc )
+
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
+ # Avoiding -nostartfiles earlier on for bug #862540,
+ # and set available entry symbol for bug #862798.
+ nolib_flags+=( -nostartfiles -emain )
+
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local mycmakeargs=(
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+ -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
+ -DCOMPILER_RT_BUILD_MEMPROF=OFF
+ -DCOMPILER_RT_BUILD_ORC=OFF
+ -DCOMPILER_RT_BUILD_PROFILE=OFF
+ -DCOMPILER_RT_BUILD_SANITIZERS=OFF
+ -DCOMPILER_RT_BUILD_XRAY=OFF
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ if use amd64 && ! target_is_not_host; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+ mycmakeargs+=(
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX.
+ # This disables i386 for SDK >= 10.15
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
+ fi
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+ -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+ )
+ fi
+
+ cmake_src_configure
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake_build check-builtins
+}
diff --git a/sys-libs/compiler-rt/metadata.xml b/sys-libs/compiler-rt/metadata.xml
index 6441506eb3e9..1167201f29f0 100644
--- a/sys-libs/compiler-rt/metadata.xml
+++ b/sys-libs/compiler-rt/metadata.xml
@@ -8,4 +8,7 @@
<flag name="clang">Force building using installed clang (rather
than the default CC/CXX).</flag>
</use>
+ <upstream>
+ <remote-id type="github">llvm/llvm-project</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/cracklib/Manifest b/sys-libs/cracklib/Manifest
index a50754412673..f7c1656f60c2 100644
--- a/sys-libs/cracklib/Manifest
+++ b/sys-libs/cracklib/Manifest
@@ -1 +1 @@
-DIST cracklib-2.9.7.tar.bz2 603630 BLAKE2B 81a45b2fb9f34da84d4fb864e1a9f67a4b22c246f1e4db1c599a555f79d560a04d95afb01a89cd3a2e0936f0e8fc51ff5ada26098c24d7af0777a94f51b82bbd SHA512 f6bf65ac092ba46ff78ddbc115692260fb76dc71219cd679d2ea935ebfb9e709fbb30259a7406743ed00dbdc415335b3ac9d9fcba1d204ea36d5eb96bf1333a2
+DIST cracklib-2.9.11.tar.xz 461116 BLAKE2B 46b499e465c1c268b772781a9c8ce573a5167ae2e0ac919b403acdb9a14c35140dfb53909eef6e41600e26c2f87d905b3d6d05380c66f053d091765b58a264f4 SHA512 c32e509f757344a1f0b7032ad3b6dc47a8759852a94e511c92073d85bce55f45d48c389d9eb34c993e1d61ad5c1542150672f3e8bc147148ebbb04d3319a2409
diff --git a/sys-libs/cracklib/cracklib-2.9.7.ebuild b/sys-libs/cracklib/cracklib-2.9.11.ebuild
index b2cada86052b..8be12c0d3441 100644
--- a/sys-libs/cracklib/cracklib-2.9.7.ebuild
+++ b/sys-libs/cracklib/cracklib-2.9.11.ebuild
@@ -1,47 +1,44 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
# Note: ideally bump with sys-apps/cracklib-words
-PYTHON_COMPAT=( python3_{7..10} )
DISTUTILS_OPTIONAL=1
-
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} )
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.bz2"
+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 ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="nls python static-libs zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RDEPEND="python? ( ${PYTHON_DEPS} )
- zlib? ( >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
+RDEPEND="
+ python? ( ${PYTHON_DEPS} )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] )
+"
+DEPEND="
+ ${RDEPEND}
nls? ( virtual/libintl )
- python? (
- dev-python/setuptools[${PYTHON_USEDEP}]
- )"
-BDEPEND="nls? ( sys-devel/gettext )"
-
-S="${WORKDIR}/${MY_P}"
-
-do_python() {
- multilib_is_native_abi || return 0
- use python || return 0
- pushd python > /dev/null || die
- distutils-r1_src_${EBUILD_PHASE}
- popd > /dev/null
-}
+"
+BDEPEND="
+ nls? ( sys-devel/gettext )
+ python? ( ${DISTUTILS_DEPS} )
+"
+
+distutils_enable_tests unittest
pkg_setup() {
- # workaround #195017
+ # 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"
@@ -50,48 +47,73 @@ pkg_setup() {
}
src_prepare() {
- eapply_user
- elibtoolize #269003
- do_python
+ 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'
+ --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
- do_python
+
+ 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() {
- # Make sure we load the freshly built library
- LD_LIBRARY_PATH="${BUILD_DIR}/lib/.libs" do_python
+ default
+
+ if multilib_is_native_abi && use python ; then
+ distutils-r1_src_test
+ fi
}
python_test() {
- ${EPYTHON} -m unittest test_cracklib || die "Tests fail with ${EPYTHON}"
+ 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 /
+
+ # Move shared libs to /
gen_usr_ldscript -a crack
- do_python
+ 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
diff --git a/sys-libs/cygwin-crypt/Manifest b/sys-libs/cygwin-crypt/Manifest
deleted file mode 100644
index 465976b10f0e..000000000000
--- a/sys-libs/cygwin-crypt/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST cygwin-crypt-1.4.tar.bz2 4446 BLAKE2B a0644f036c55fd169a1d708d51fc7d3b1cc0a94fba845319357b4251eb379aa799ed39ba81b2551774c870944b19e6e1053453e1e99b48a93ed5a62272c37e25 SHA512 1ecc4256730f13161a651cfdf71b27c1042e6f56fb859943426c371d4b37b8b2bd6ea768f86e45f7b8cf3478e97ff9578b79e5c37178c8794ff9b87799f2cab3
diff --git a/sys-libs/cygwin-crypt/cygwin-crypt-1.4-r1.ebuild b/sys-libs/cygwin-crypt/cygwin-crypt-1.4-r1.ebuild
deleted file mode 100644
index 24de50f1790b..000000000000
--- a/sys-libs/cygwin-crypt/cygwin-crypt-1.4-r1.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-DESCRIPTION="Cygwin Encryption/Decryption utility and library"
-HOMEPAGE="https://sourceware.org/cygwin-apps/"
-# Upstream provides the git repo only, so we do:
-# git clone git://cygwin.com/git/cygwin-apps/crypt.git
-# cd crypt
-# git archive -o cygwin-crypt-${PV}.tar --prefix=cygwin-crypt-${PV}/ crypt-${PV}-release
-# bzip2 cygwin-crypt-${PV}.tar
-SRC_URI="mirror://gentoo/${P}.tar.bz2"
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="~x64-cygwin"
-
-mymake() {
- emake \
- CC="$(tc-getCC)" \
- AR="$(tc-getAR)" \
- CFLAGS="${CFLAGS}" \
- prefix="${EPREFIX}/usr" \
- docdir="${EPREFIX}/share/doc/${P}" \
- "$@"
-}
-
-src_compile() {
- mymake
-}
-
-src_install() {
- mymake install DESTDIR="${D}"
-}
diff --git a/sys-libs/cygwin-crypt/metadata.xml b/sys-libs/cygwin-crypt/metadata.xml
deleted file mode 100644
index 64452cadca28..000000000000
--- a/sys-libs/cygwin-crypt/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-needed -->
- <longdescription lang="en">
- This packages provides a library which exports the functions crypt(3),
- encrypt(3), and setkey(3). The created passwords are 56 bit DES
- encrypted and are 100% identical to those created by the Linux crypt(3).
- </longdescription>
-</pkgmetadata>
diff --git a/sys-libs/db/Manifest b/sys-libs/db/Manifest
index 8cfa23e4f61f..99e1d0be129a 100644
--- a/sys-libs/db/Manifest
+++ b/sys-libs/db/Manifest
@@ -1,7 +1,3 @@
-DIST db-18.1.32.tar.gz 44244747 BLAKE2B b539d8966a269f6a9440ef442248849f12c6b1eda79b9a41074e1eb0eb4930fd4674dd0e20a114e4020fe2ce19832572c4c86d458835da39a99f639dc3c4e23e SHA512 890b3047c28114ac30794c0234126b0b2a3e699f3ed259831091f02d51885e3583dd10c0ef0cecc215b9b8d80b48a2d3a82a5793cd3816afb45f6cc19ae23f25
-DIST db-18.1.40.tar.gz 30763705 BLAKE2B c7235cbdf82d8e38450c98baa1ff67132f6132d59a43dd2d6ed8bc2672b7924b4cbd93320278a0a3a78e454caff622b4480abe8dcc20c94ae56a78b3569a76fd SHA512 53787164fb8a198a0178c7f58d891c2b0943d1c52b11fe9de525938469327e85664f0bc63e33d740c171bc370954710a6b3e8b9be2a08237fb9757a795c5b19e
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
-DIST db-6.1.38.tar.gz 37644337 BLAKE2B 32b3f65bef04bb18e45c3c0c9110d5d0bf58f4761bee5bf07949e192f4b9f5fa28117b1696c17863da0affe408bd6c81eeee32c472c46d31c17693519959ff03 SHA512 5760d1e441bea11c371825ac47203b1eb9f188f9cb2ea0e3d547b3d3b15620d27cb0b3333d617eb7b89c53407fb7ed79cad27477d714b5b797869f8bf4b1808b
-DIST db-6.2.38.tar.gz 41298311 BLAKE2B a04a3344058b1d9982f39628c1114aded8f8c860753853c8b487e9ea14bd69a0391301620396d22204b3c8f25945c3f5485ea4792567e2d903a657541204d297 SHA512 b357932e4a5856b9cf8cf42050a307977eee8483d24a32ad938611545178fb1e6be597c1542a11466b1fb31ef4ef47b519deea1c5310a6460495281539083a19
diff --git a/sys-libs/db/db-18.1.40-r1.ebuild b/sys-libs/db/db-18.1.40-r1.ebuild
deleted file mode 100644
index 407d361673f7..000000000000
--- a/sys-libs/db/db-18.1.40-r1.ebuild
+++ /dev/null
@@ -1,243 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal eapi7-ver 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="fetch
- !test? ( test )"
-
-S_BASE="${WORKDIR}/${MY_P}"
-S="${S_BASE}/dist"
-DESCRIPTION="Oracle Berkeley DB"
-HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-SRC_URI="https://download.oracle.com/otn/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 ~ia64 ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-IUSE="doc java 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}] )
- java? ( >=virtual/jdk-1.8 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.8 )"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/db$(ver_cut 1-2)/db.h
-)
-
-PATCHES=(
- # bug #510506
- "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
-
- # use the includes from the prefix
- "${FILESDIR}"/${PN}-6.2.32-jni-check-prefix-first.patch
- "${FILESDIR}"/${PN}-4.2-listen-to-java-options.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}-18.1.25-test-link.patch
-
- "${FILESDIR}"/${PN}-18.1.40-fix-docs.patch
-)
-
-src_prepare() {
- cd "${WORKDIR}"/"${MY_P}"
- for (( i=1 ; i<=${PATCHNO} ; i++ ))
- do
- eapply "${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 -i \
- -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
- "${S_BASE}"/dist/RELEASE || die
-
- # Include the SLOT for Java JAR files
- # This supersedes the unused jarlocation patches.
- sed -r -i \
- -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
- "${S_BASE}"/dist/Makefile.in || die
-
- cd "${S_BASE}"/dist || die
- rm -f aclocal/libtool.m4
- sed -i \
- -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
- configure.ac || die
- sed -i \
- -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
- aclocal/programs.m4 || die
- AT_M4DIR="aclocal aclocal_java" eautoreconf
- # Upstream sucks - they do autoconf and THEN replace the version variables.
- . ./RELEASE
- 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
- local ev="__EDIT_${v}__"
- sed -i -e "s/${ev}/${!v}/g" configure || die
- done
-
- # This is a false positive skip in the tests as the test-reviewer code
- # looks for 'Skipping\s'
- sed -i \
- -e '/db_repsite/s,Skipping:,Skipping,g' \
- "${S_BASE}"/test/tcl/reputils.tcl || die
-}
-
-multilib_src_configure() {
- # 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
- local myeconfargs=(
- --enable-compat185
- --enable-dbm
- --enable-o_direct
- # Requires openssl-1.0
- --with-repmgr-ssl=no
- --without-uniquename
- --disable-sql
- --disable-sql_codegen
- --disable-sql_compat
- $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly)
- $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
- $(use_enable cxx)
- $(use_enable cxx stl)
- $(multilib_native_use_enable java)
- $(use_enable test)
- )
-
- tc-ld-force-bfd #470634 #729510
-
- # 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
-
- # use `set` here since the java opts will contain whitespace
- if multilib_is_native_abi && use java ; then
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
-
- # Bug #270851: test needs TCL support
- if use tcl || use test ; then
- myeconfargs+=(
- --enable-tcl
- --with-tcl="${EPREFIX}/usr/$(get_libdir)"
- )
- else
- myeconfargs+=(--disable-tcl )
- fi
-
- ECONF_SOURCE="${S_BASE}"/dist \
- STRIP="true" \
- econf "${myeconfargs[@]}"
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- db_src_install_headerslot
-
- db_src_install_usrlibcleanup
-
- if multilib_is_native_abi && use java; then
- java-pkg_regso "${ED%/}"/usr/"$(get_libdir)"/libdb_java*.so
- java-pkg_dojar "${ED%/}"/usr/"$(get_libdir)"/*.jar
- rm -f "${ED%/}"/usr/"$(get_libdir)"/*.jar
- fi
-}
-
-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
-}
-
-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 -ri \
- -e '/multi_repmgr/d' \
- "${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 -ri \
- -e '/set parms.*repmgr018/d' \
- -e 's/repmgr018//g' \
- "${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-4.8.30-r6.ebuild b/sys-libs/db/db-4.8.30-r8.ebuild
index 3bc178287279..7d3883eeb360 100644
--- a/sys-libs/db/db-4.8.30-r6.ebuild
+++ b/sys-libs/db/db-4.8.30-r8.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit autotools db flag-o-matic java-pkg-opt-2 multilib multilib-minimal toolchain-funcs
+inherit autotools db flag-o-matic multilib-minimal toolchain-funcs
-#Number of official patches
+# Number of official patches
#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
PATCHNO="${PV/*.*.*_p}"
if [[ ${PATCHNO} == "${PV}" ]] ; then
@@ -17,44 +17,38 @@ else
MY_P="${PN}-${MY_PV}"
fi
-RESTRICT="!test? ( test )"
-
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
- export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+ 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 ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
-IUSE="doc java cxx tcl test"
-
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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
+# 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}] )
- java? ( >=virtual/jdk-1.8 )"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.8 )"
+ 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.24-java-manifest-location.patch
"${FILESDIR}"/${PN}-4.8.30-rename-atomic-compare-exchange.patch
-
- # use the includes from the prefix
- "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
- "${FILESDIR}"/${PN}-4.2-listen-to-java-options.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
+ for (( i=1 ; i<=${PATCHNO} ; i++ )); do
eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
done
@@ -63,12 +57,6 @@ src_prepare() {
sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE \
|| die
- # Include the SLOT for Java JAR files
- # This supersedes the unused jarlocation patches.
- sed -r \
- -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
- -i dist/Makefile.in || die
-
cd dist || die
rm aclocal/libtool.m4 || die
sed \
@@ -78,9 +66,9 @@ src_prepare() {
-e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
-i aclocal/programs.m4 || die
- AT_M4DIR="aclocal aclocal_java" eautoreconf
+ AT_M4DIR="aclocal" eautoreconf
- # Upstream sucks - they do autoconf and THEN replace the version variables.
+ # They do autoconf and THEN replace the version variables :(
. ./RELEASE
sed \
-e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
@@ -92,21 +80,25 @@ src_prepare() {
-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)
- $(multilib_native_use_enable java)
$(use_enable test)
)
- tc-ld-force-bfd #470634 #729510
-
# compilation with -O0 fails on amd64, see bug #171231
if [[ ${ABI} == amd64 ]]; then
local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
@@ -118,14 +110,6 @@ multilib_src_configure() {
# mumbo jumbo.
append-ldflags -Wl,--default-symver
- # use `set` here since the java opts will contain whitespace
- if multilib_is_native_abi && use java ; then
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
-
# Bug #270851: test needs TCL support
if use tcl || use test ; then
myconf+=(
@@ -136,9 +120,7 @@ multilib_src_configure() {
myconf+=(--disable-tcl )
fi
- ECONF_SOURCE="${S}"/../dist \
- STRIP="true" \
- econf "${myconf[@]}"
+ 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.
@@ -161,12 +143,6 @@ multilib_src_install() {
db_src_install_headerslot
db_src_install_usrlibcleanup
-
- if multilib_is_native_abi && use java; then
- java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
- java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
- rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
- fi
}
multilib_src_install_all() {
diff --git a/sys-libs/db/db-4.8.30-r9.ebuild b/sys-libs/db/db-4.8.30-r9.ebuild
new file mode 100644
index 000000000000..ac50491119bd
--- /dev/null
+++ b/sys-libs/db/db-4.8.30-r9.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2023 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 ~ia64 ~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
+ "${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-r8.ebuild b/sys-libs/db/db-5.3.28-r10.ebuild
index 91d4a786cf4c..a25371a07960 100644
--- a/sys-libs/db/db-5.3.28-r8.ebuild
+++ b/sys-libs/db/db-5.3.28-r10.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit autotools db flag-o-matic java-pkg-opt-2 multilib multilib-minimal toolchain-funcs
+inherit autotools db flag-o-matic multilib-minimal toolchain-funcs
#Number of official patches
#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
@@ -24,35 +24,32 @@ 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
- export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+ 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 ~ia64 ~m68k ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="doc java cxx tcl test"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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}] )
- java? ( >=virtual/jdk-1.7 )"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.7 )"
+ 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=(
- # bug #510506
- "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
-
- # use the includes from the prefix
- "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
- "${FILESDIR}"/${PN}-4.2-listen-to-java-options.patch
-
# 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
@@ -63,6 +60,8 @@ PATCHES=(
# 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() {
@@ -83,12 +82,6 @@ src_prepare() {
-e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
-i dist/RELEASE || die
- # Include the SLOT for Java JAR files
- # This supersedes the unused jarlocation patches.
- sed -r \
- -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
- -i dist/Makefile.in || die
-
cd dist || die
rm aclocal/libtool.m4 || die
sed \
@@ -98,9 +91,9 @@ src_prepare() {
-e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
-i aclocal/programs.m4 || die
- AT_M4DIR="aclocal aclocal_java" eautoreconf
+ AT_M4DIR="aclocal" eautoreconf
- # Upstream sucks - they do autoconf and THEN replace the version variables.
+ # They do autoconf and THEN replace the version variables :(
. ./RELEASE
local v ev
for v in \
@@ -119,6 +112,12 @@ src_prepare() {
-i "${S_BASE}"/test/tcl/reputils.tcl || 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=(
# sql_compat will cause a collision with sqlite3
@@ -133,15 +132,13 @@ multilib_src_configure() {
--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)
- $(multilib_native_use_enable java)
$(use_enable test)
)
- tc-ld-force-bfd #470634 #729510
-
# compilation with -O0 fails on amd64, see bug #171231
if [[ ${ABI} == amd64 ]]; then
local CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
@@ -153,13 +150,6 @@ multilib_src_configure() {
# mumbo jumbo.
append-ldflags -Wl,--default-symver
- if multilib_is_native_abi && use java ; then
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
-
# Bug #270851: test needs TCL support
if use tcl || use test ; then
myconf+=(
@@ -189,12 +179,6 @@ multilib_src_install() {
db_src_install_headerslot
db_src_install_usrlibcleanup
-
- if multilib_is_native_abi && use java; then
- java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
- java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
- rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
- fi
}
multilib_src_install_all() {
diff --git a/sys-libs/db/db-18.1.32-r1.ebuild b/sys-libs/db/db-5.3.28-r9.ebuild
index 76b018c57445..09d3ce82c642 100644
--- a/sys-libs/db/db-18.1.32-r1.ebuild
+++ b/sys-libs/db/db-5.3.28-r9.ebuild
@@ -1,75 +1,73 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-inherit db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal eapi7-ver toolchain-funcs
+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}
+PATCHNO="${PV/*.*.*_p}"
if [[ ${PATCHNO} == "${PV}" ]] ; then
- MY_PV=${PV}
- MY_P=${P}
+ MY_PV="${PV}"
+ MY_P="${P}"
PATCHNO=0
else
- MY_PV=${PV/_p${PATCHNO}}
- MY_P=${PN}-${MY_PV}
+ MY_PV="${PV/_p${PATCHNO}}"
+ MY_P="${PN}-${MY_PV}"
fi
RESTRICT="!test? ( test )"
S_BASE="${WORKDIR}/${MY_P}"
-S="${S_BASE}/dist"
+S="${S_BASE}/build_unix"
DESCRIPTION="Oracle Berkeley DB"
HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-SRC_URI="https://download.oracle.com/otn/berkeley-db/${MY_P}.tar.gz
- mirror://gentoo/${MY_P}.tar.gz"
+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"
+LICENSE="Sleepycat"
SLOT="$(ver_cut 1-2)"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE="doc java cxx tcl test"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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}] )
- java? ( >=virtual/jdk-1.8 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.8 )"
+ 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$(ver_cut 1-2)/db.h
+ /usr/include/db${SLOT}/db.h
)
PATCHES=(
- # bug #510506
- "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
-
- # use the includes from the prefix
- "${FILESDIR}"/${PN}-6.2.32-jni-check-prefix-first.patch
- "${FILESDIR}"/${PN}-4.2-listen-to-java-options.patch
-
# 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}-18.1.25-sqlite-configure-path.patch
+ # 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}-18.1.25-test-link.patch
+ "${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 "${WORKDIR}"/"${MY_P}"
+ cd "${S_BASE}" || die
for (( i=1 ; i<=${PATCHNO} ; i++ ))
do
- eapply "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
done
default
@@ -79,71 +77,70 @@ src_prepare() {
export REAL_DB_RELEASE_DATE="$(awk \
'/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
"${S_BASE}"/dist/configure)"
- sed -r -i \
+ sed -r \
-e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
- "${S_BASE}"/dist/RELEASE || die
+ -i dist/RELEASE || die
- # Include the SLOT for Java JAR files
- # This supersedes the unused jarlocation patches.
- sed -r -i \
- -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
- "${S_BASE}"/dist/Makefile.in || die
-
- cd "${S_BASE}"/dist || die
- rm -f aclocal/libtool.m4
- sed -i \
+ cd dist || die
+ rm aclocal/libtool.m4 || die
+ sed \
-e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
- configure.ac || die
- sed -i \
+ -i configure.ac || die
+ sed \
-e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
- aclocal/programs.m4 || die
- AT_M4DIR="aclocal aclocal_java" eautoreconf
- # Upstream sucks - they do autoconf and THEN replace the version variables.
+ -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
- local ev="__EDIT_${v}__"
- sed -i -e "s/${ev}/${!v}/g" configure || die
+ 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 -i \
+ sed \
-e '/db_repsite/s,Skipping:,Skipping,g' \
- "${S_BASE}"/test/tcl/reputils.tcl || die
+ -i "${S_BASE}"/test/tcl/reputils.tcl || die
+}
+
+src_configure() {
+ # Force bfd before calling multilib_toolchain_setup
+ tc-ld-force-bfd #470634 #729510
+ multilib-minimal_src_configure
}
multilib_src_configure() {
- # 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
- local myeconfargs=(
+ 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
- # Requires openssl-1.0
- --with-repmgr-ssl=no
--without-uniquename
--disable-sql
--disable-sql_codegen
--disable-sql_compat
- $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly)
+ --disable-static
+ --disable-java
$([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
$(use_enable cxx)
$(use_enable cxx stl)
- $(multilib_native_use_enable java)
$(use_enable test)
)
- tc-ld-force-bfd #470634 #729510
-
# compilation with -O0 fails on amd64, see bug #171231
if [[ ${ABI} == amd64 ]]; then
- local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ local CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
replace-flags -O0 -O2
is-flagq -O[s123] || append-flags -O2
fi
@@ -152,41 +149,35 @@ multilib_src_configure() {
# mumbo jumbo.
append-ldflags -Wl,--default-symver
- # use `set` here since the java opts will contain whitespace
- if multilib_is_native_abi && use java ; then
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
-
# Bug #270851: test needs TCL support
if use tcl || use test ; then
- myeconfargs+=(
+ myconf+=(
--enable-tcl
--with-tcl="${EPREFIX}/usr/$(get_libdir)"
)
else
- myeconfargs+=(--disable-tcl )
+ myconf+=(--disable-tcl )
fi
ECONF_SOURCE="${S_BASE}"/dist \
STRIP="true" \
- econf "${myeconfargs[@]}"
+ 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 install DESTDIR="${D}"
+ emake DESTDIR="${D}" install
db_src_install_headerslot
db_src_install_usrlibcleanup
-
- if multilib_is_native_abi && use java; then
- java-pkg_regso "${ED%/}"/usr/"$(get_libdir)"/libdb_java*.so
- java-pkg_dojar "${ED%/}"/usr/"$(get_libdir)"/*.jar
- rm -f "${ED%/}"/usr/"$(get_libdir)"/*.jar
- fi
}
multilib_src_install_all() {
@@ -196,10 +187,13 @@ multilib_src_install_all() {
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
+ 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() {
@@ -218,9 +212,9 @@ src_test() {
#sed -ri \
# -e '/set subs/s,multi_repmgr,,g' \
# "${S_BASE}/test/testparams.tcl"
- sed -ri \
+ sed -r \
-e '/multi_repmgr/d' \
- "${S_BASE}/test/tcl/test.tcl" || die
+ -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.
@@ -230,10 +224,10 @@ src_test() {
# 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 -ri \
+ sed -r \
-e '/set parms.*repmgr018/d' \
-e 's/repmgr018//g' \
- "${S_BASE}/test/tcl/test.tcl" || die
+ -i "${S_BASE}/test/tcl/test.tcl" || die
multilib-minimal_src_test
}
@@ -241,5 +235,5 @@ src_test() {
multilib_src_test() {
multilib_is_native_abi || return
- S=${BUILD_DIR} db_src_test
+ 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
index 261cbcd2b8c0..422b7e8188a8 100644
--- a/sys-libs/db/db-6.0.35-r4.ebuild
+++ b/sys-libs/db/db-6.0.35-r4.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit autotools db flag-o-matic java-pkg-opt-2 multilib multilib-minimal toolchain-funcs
+inherit autotools db flag-o-matic multilib-minimal toolchain-funcs
#Number of official patches
#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
@@ -24,35 +24,28 @@ 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
- export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+ 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 ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="doc java cxx tcl test"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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}] )
- java? ( >=virtual/jdk-1.7:* )"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.7:* )"
+ 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=(
- # bug #510506
- "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
-
- # use the includes from the prefix
- "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
- "${FILESDIR}"/${PN}-4.2-listen-to-java-options.patch
-
# 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
@@ -81,12 +74,6 @@ src_prepare() {
-e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
-i dist/RELEASE || die
- # Include the SLOT for Java JAR files
- # This supersedes the unused jarlocation patches.
- sed -r \
- -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
- -i dist/Makefile.in || die
-
cd dist || die
rm aclocal/libtool.m4 || die
sed \
@@ -96,9 +83,9 @@ src_prepare() {
-e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
-i aclocal/programs.m4 || die
- AT_M4DIR="aclocal aclocal_java" eautoreconf
+ AT_M4DIR="aclocal" eautoreconf
- # Upstream sucks - they do autoconf and THEN replace the version variables.
+ # They do autoconf and THEN replace the version variables :(
. ./RELEASE
local v ev
for v in \
@@ -117,6 +104,12 @@ src_prepare() {
-i "${S_BASE}"/test/tcl/reputils.tcl || 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
@@ -127,15 +120,13 @@ multilib_src_configure() {
--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)
- $(multilib_native_use_enable java)
$(use_enable test)
)
- tc-ld-force-bfd #470634 #729510
-
# compilation with -O0 fails on amd64, see bug #171231
if [[ ${ABI} == amd64 ]]; then
local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
@@ -147,14 +138,6 @@ multilib_src_configure() {
# mumbo jumbo.
append-ldflags -Wl,--default-symver
- # use `set` here since the java opts will contain whitespace
- if multilib_is_native_abi && use java ; then
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
-
# Bug #270851: test needs TCL support
if use tcl || use test ; then
myconf+=(
@@ -188,12 +171,6 @@ multilib_src_install() {
db_src_install_headerslot
db_src_install_usrlibcleanup
-
- if multilib_is_native_abi && use java; then
- java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
- java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
- rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
- fi
}
multilib_src_install_all() {
diff --git a/sys-libs/db/db-6.1.38-r1.ebuild b/sys-libs/db/db-6.0.35-r5.ebuild
index 74fb45257401..f59d3811f5a4 100644
--- a/sys-libs/db/db-6.1.38-r1.ebuild
+++ b/sys-libs/db/db-6.0.35-r5.ebuild
@@ -1,19 +1,19 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-inherit db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal eapi7-ver toolchain-funcs
+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}
+PATCHNO="${PV/*.*.*_p}"
if [[ ${PATCHNO} == "${PV}" ]] ; then
- MY_PV=${PV}
- MY_P=${P}
+ MY_PV="${PV}"
+ MY_P="${P}"
PATCHNO=0
else
- MY_PV=${PV/_p${PATCHNO}}
- MY_P=${PN}-${MY_PV}
+ MY_PV="${PV/_p${PATCHNO}}"
+ MY_P="${PN}-${MY_PV}"
fi
RESTRICT="!test? ( test )"
@@ -24,51 +24,45 @@ 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
- export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+ SRC_URI+=" http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
done
LICENSE="AGPL-3"
-SLOT="$(get_version_component_range 1-2)"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="doc java cxx tcl test"
+SLOT="$(ver_cut 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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}] )
- java? ( >=virtual/jdk-1.8 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.8 )"
+ 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$(ver_cut 1-2)/db.h
+ /usr/include/db${SLOT}/db.h
)
PATCHES=(
- # bug #510506
- "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
-
- # use the includes from the prefix
- "${FILESDIR}"/${PN}-6.2-jni-check-prefix-first.patch
- "${FILESDIR}"/${PN}-4.2-listen-to-java-options.patch
-
# 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.1.19-sqlite-configure-path.patch
+ "${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 "${WORKDIR}"/"${MY_P}"
+ cd "${S_BASE}" || die
for (( i=1 ; i<=${PATCHNO} ; i++ ))
do
- eapply "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
done
default
@@ -78,49 +72,48 @@ src_prepare() {
export REAL_DB_RELEASE_DATE="$(awk \
'/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
"${S_BASE}"/dist/configure)"
- sed -r -i \
+ sed -r \
-e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
- "${S_BASE}"/dist/RELEASE || die
+ -i dist/RELEASE || die
- # Include the SLOT for Java JAR files
- # This supersedes the unused jarlocation patches.
- sed -r -i \
- -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
- "${S_BASE}"/dist/Makefile.in || die
-
- cd "${S_BASE}"/dist || die
- rm -f aclocal/libtool.m4
- sed -i \
+ cd dist || die
+ rm aclocal/libtool.m4 || die
+ sed \
-e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
- configure.ac || die
- sed -i \
+ -i configure.ac || die
+ sed \
-e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
- aclocal/programs.m4 || die
- AT_M4DIR="aclocal aclocal_java" eautoreconf
- # Upstream sucks - they do autoconf and THEN replace the version variables.
+ -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
- local ev="__EDIT_${v}__"
- sed -i -e "s/${ev}/${!v}/g" configure || die
+ 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 -i \
+ sed \
-e '/db_repsite/s,Skipping:,Skipping,g' \
- "${S_BASE}"/test/tcl/reputils.tcl || die
+ -i "${S_BASE}"/test/tcl/reputils.tcl || die
+}
+
+src_configure() {
+ # Force bfd before calling multilib_toolchain_setup
+ tc-ld-force-bfd #470634 #729510
+ multilib-minimal_src_configure
}
multilib_src_configure() {
- # 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
- local myeconfargs=(
+ local myconf=(
--enable-compat185
--enable-dbm
--enable-o_direct
@@ -129,16 +122,13 @@ multilib_src_configure() {
--disable-sql_codegen
--disable-sql_compat
--disable-static
- $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly)
+ --disable-java
$([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
$(use_enable cxx)
$(use_enable cxx stl)
- $(multilib_native_use_enable java)
$(use_enable test)
)
- tc-ld-force-bfd #470634 #729510
-
# compilation with -O0 fails on amd64, see bug #171231
if [[ ${ABI} == amd64 ]]; then
local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
@@ -150,41 +140,39 @@ multilib_src_configure() {
# mumbo jumbo.
append-ldflags -Wl,--default-symver
- # use `set` here since the java opts will contain whitespace
- if multilib_is_native_abi && use java ; then
- myeconfargs+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
-
# Bug #270851: test needs TCL support
if use tcl || use test ; then
- myeconfargs+=(
+ myconf+=(
--enable-tcl
--with-tcl="${EPREFIX}/usr/$(get_libdir)"
)
else
- myeconfargs+=(--disable-tcl )
+ 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 "${myeconfargs[@]}"
+ 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 install DESTDIR="${D}"
+ emake DESTDIR="${D}" install
db_src_install_headerslot
db_src_install_usrlibcleanup
-
- if multilib_is_native_abi && use java; then
- java-pkg_regso "${ED%/}"/usr/"$(get_libdir)"/libdb_java*.so
- java-pkg_dojar "${ED%/}"/usr/"$(get_libdir)"/*.jar
- rm -f "${ED%/}"/usr/"$(get_libdir)"/*.jar
- fi
}
multilib_src_install_all() {
@@ -194,9 +182,9 @@ multilib_src_install_all() {
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
+ 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
@@ -216,12 +204,12 @@ src_test() {
# 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 \
+ #sed -r \
# -e '/set subs/s,multi_repmgr,,g' \
- # "${S_BASE}/test/testparams.tcl"
- sed -ri \
+ # -i "${S_BASE}/test/testparams.tcl"
+ sed -r \
-e '/multi_repmgr/d' \
- "${S_BASE}/test/tcl/test.tcl" || die
+ -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.
@@ -231,10 +219,10 @@ src_test() {
# 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 -ri \
+ sed -r \
-e '/set parms.*repmgr018/d' \
-e 's/repmgr018//g' \
- "${S_BASE}/test/tcl/test.tcl" || die
+ -i "${S_BASE}/test/tcl/test.tcl" || die
multilib-minimal_src_test
}
@@ -242,5 +230,5 @@ src_test() {
multilib_src_test() {
multilib_is_native_abi || return
- S=${BUILD_DIR} db_src_test
+ S="${BUILD_DIR}" db_src_test
}
diff --git a/sys-libs/db/db-6.2.38-r1.ebuild b/sys-libs/db/db-6.2.38-r1.ebuild
deleted file mode 100644
index 786041b37bd1..000000000000
--- a/sys-libs/db/db-6.2.38-r1.ebuild
+++ /dev/null
@@ -1,249 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal eapi7-ver 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
- export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
-done
-
-LICENSE="AGPL-3"
-SLOT="$(get_version_component_range 1-2)"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc java 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}] )
- java? ( >=virtual/jdk-1.8 )
- kernel_linux? ( >=sys-devel/binutils-2.16.1 )
- kernel_SunOS? ( >=sys-devel/binutils-2.16.1 )"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.8 )"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/db$(ver_cut 1-2)/db.h
-)
-
-PATCHES=(
- # bug #510506
- "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
-
- # use the includes from the prefix
- "${FILESDIR}"/${PN}-6.2.32-jni-check-prefix-first.patch
- "${FILESDIR}"/${PN}-4.2-listen-to-java-options.patch
-
- # 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.1.19-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 "${WORKDIR}"/"${MY_P}"
- for (( i=1 ; i<=${PATCHNO} ; i++ ))
- do
- eapply "${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 -i \
- -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
- "${S_BASE}"/dist/RELEASE || die
-
- # Include the SLOT for Java JAR files
- # This supersedes the unused jarlocation patches.
- sed -r -i \
- -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
- "${S_BASE}"/dist/Makefile.in || die
-
- cd "${S_BASE}"/dist || die
- rm -f aclocal/libtool.m4
- sed -i \
- -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
- configure.ac || die
- sed -i \
- -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
- aclocal/programs.m4 || die
- AT_M4DIR="aclocal aclocal_java" eautoreconf
- # Upstream sucks - they do autoconf and THEN replace the version variables.
- . ./RELEASE
- 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
- local ev="__EDIT_${v}__"
- sed -i -e "s/${ev}/${!v}/g" configure || die
- done
-
- # This is a false positive skip in the tests as the test-reviewer code
- # looks for 'Skipping\s'
- sed -i \
- -e '/db_repsite/s,Skipping:,Skipping,g' \
- "${S_BASE}"/test/tcl/reputils.tcl || die
-}
-
-multilib_src_configure() {
- # 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
- local myeconfargs=(
- --enable-compat185
- --enable-dbm
- --enable-o_direct
- --without-uniquename
- --disable-sql
- --disable-sql_codegen
- --disable-sql_compat
- --disable-static
- $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly)
- $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
- $(use_enable cxx)
- $(use_enable cxx stl)
- $(multilib_native_use_enable java)
- $(use_enable test)
- )
-
- tc-ld-force-bfd #470634 #729510
-
- # 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.
- if use kernel_linux || use kernel_SunOS; then
- append-ldflags -Wl,--default-symver
- fi
-
- # use `set` here since the java opts will contain whitespace
- if multilib_is_native_abi && use java ; then
- myeconfargs+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
-
- # Bug #270851: test needs TCL support
- if use tcl || use test ; then
- myeconfargs+=(
- --enable-tcl
- --with-tcl="${EPREFIX}/usr/$(get_libdir)"
- )
- else
- myeconfargs+=(--disable-tcl )
- fi
-
- ECONF_SOURCE="${S_BASE}"/dist \
- STRIP="true" \
- econf "${myeconfargs[@]}"
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- db_src_install_headerslot
-
- db_src_install_usrlibcleanup
-
- if multilib_is_native_abi && use java; then
- java-pkg_regso "${ED%/}"/usr/"$(get_libdir)"/libdb_java*.so
- java-pkg_dojar "${ED%/}"/usr/"$(get_libdir)"/*.jar
- rm -f "${ED%/}"/usr/"$(get_libdir)"/*.jar
- fi
-}
-
-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 -ri \
- -e '/multi_repmgr/d' \
- "${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 -ri \
- -e '/set parms.*repmgr018/d' \
- -e 's/repmgr018//g' \
- "${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-18.1.25-test-link.patch b/sys-libs/db/files/db-18.1.25-test-link.patch
deleted file mode 100644
index dc3d8ae93c5a..000000000000
--- a/sys-libs/db/files/db-18.1.25-test-link.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- db-18.1.25/test/tcl/parallel.tcl
-+++ db-18.1.25/test/tcl/parallel.tcl
-@@ -296,17 +296,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}$EXE} \
-- {$dir/db_{stat,upgrade,archive,verify}$EXE} \
-- {$dir/db_{hotbackup,log_verify,tuner}$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-18.1.40-fix-docs.patch b/sys-libs/db/files/db-18.1.40-fix-docs.patch
deleted file mode 100644
index 7bed9f1cbca0..000000000000
--- a/sys-libs/db/files/db-18.1.40-fix-docs.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Fixes
-
- cp: cannot stat 'bdb-sql': No such file or directory
- cp: cannot stat 'gsg_db_server': No such file or directory
-
---- a/dist/Makefile.in
-+++ b/dist/Makefile.in
-@@ -1299,8 +1299,8 @@ uninstall_utilities:
-
- # We install csharp docs even on UNIX so we don't have a
- # broken link on the landing page.
--DOCLIST=api_reference articles bdb-sql collections csharp gsg \
-- gsg_db_rep gsg_db_server gsg_txn index.html installation \
-+DOCLIST=api_reference articles collections csharp gsg \
-+ gsg_db_rep gsg_txn index.html installation \
- java license porting programmer_reference upgrading
-
- install_docs:
-
diff --git a/sys-libs/db/files/db-4.2-listen-to-java-options.patch b/sys-libs/db/files/db-4.2-listen-to-java-options.patch
deleted file mode 100644
index f1f701de1261..000000000000
--- a/sys-libs/db/files/db-4.2-listen-to-java-options.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/dist/configure.ac
-+++ b/dist/configure.ac
-@@ -385,6 +385,7 @@
- # A classpath that includes . is needed to check for Java
- CLASSPATH=".:$CLASSPATH"
- export CLASSPATH
-+ AC_JAVA_OPTIONS
- AC_PROG_JAVAC
- AC_PROG_JAR
- AC_PROG_JAVA
diff --git a/sys-libs/db/files/db-4.6-jni-check-prefix-first.patch b/sys-libs/db/files/db-4.6-jni-check-prefix-first.patch
deleted file mode 100644
index a0b2800d1286..000000000000
--- a/sys-libs/db/files/db-4.6-jni-check-prefix-first.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/dist/aclocal_java/ac_jni_include_dirs.m4
-+++ b/dist/aclocal_java/ac_jni_include_dirs.m4
-@@ -43,14 +43,19 @@
- *) AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
- esac
-
--_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
--_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
--case "$host_os" in
-- darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
-- _JINC="$_JTOPDIR/Headers";;
-- *) _JINC="$_JTOPDIR/include";;
--esac
--
-+# If JAVAPREFIX is defined, look there first
-+if test -r "$JAVAPREFIX/include/jni.h"; then
-+ _JTOPDIR="$JAVAPREFIX"
-+ _JINC="$JAVAPREFIX/include"
-+else
-+ _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
-+ _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
-+ case "$host_os" in
-+ darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
-+ _JINC="$_JTOPDIR/Headers";;
-+ *) _JINC="$_JTOPDIR/include";;
-+ esac
-+fi
- # If we find jni.h in /usr/include, then it's not a java-only tree, so
- # don't add /usr/include or subdirectories to the list of includes.
- # An extra -I/usr/include can foul things up with newer gcc's.
diff --git a/sys-libs/db/files/db-4.8-wformat-security.patch b/sys-libs/db/files/db-4.8-wformat-security.patch
new file mode 100644
index 000000000000..4db5bada0d9f
--- /dev/null
+++ b/sys-libs/db/files/db-4.8-wformat-security.patch
@@ -0,0 +1,43 @@
+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.24-java-manifest-location.patch b/sys-libs/db/files/db-4.8.24-java-manifest-location.patch
deleted file mode 100644
index 9cebadc52064..000000000000
--- a/sys-libs/db/files/db-4.8.24-java-manifest-location.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nuar db-4.8.24.orig/dist/Makefile.in db-4.8.24/dist/Makefile.in
---- db-4.8.24.orig/dist/Makefile.in 2009-09-19 23:39:45.286001896 +0000
-+++ db-4.8.24/dist/Makefile.in 2009-09-19 23:41:13.079326882 +0000
-@@ -830,7 +830,7 @@
- $(JAVA) -classpath $(JAVA_CLASSTOP) \
- com.sleepycat.persist.model.ClassEnhancer $(JAVA_CLASSTOP)
- cd $(JAVA_CLASSTOP) && \
-- $(JAR) cfm ../$(libj_jarfile) ../$(JAVA_MANIFEST) ./com/sleepycat
-+ $(JAR) cfm ../$(libj_jarfile) $(JAVA_MANIFEST) ./com/sleepycat
-
- $(libj_exjarfile): $(libj_jarfile) $(JAVA_EXSRCS)
- @test -d $(JAVA_EXCLASSTOP) || \
diff --git a/sys-libs/db/files/db-4.8.30-clang16.patch b/sys-libs/db/files/db-4.8.30-clang16.patch
new file mode 100644
index 000000000000..b28eb145e4a8
--- /dev/null
+++ b/sys-libs/db/files/db-4.8.30-clang16.patch
@@ -0,0 +1,281 @@
+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
index c53160a82970..99a26e15fbfb 100644
--- 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
@@ -1,5 +1,3 @@
-diff --git a/dbinc/atomic.h b/dbinc/atomic.h
-index 0034dcc..fa7ba93 100644
--- a/dbinc/atomic.h
+++ b/dbinc/atomic.h
@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
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
new file mode 100644
index 000000000000..e6aaa3259e19
--- /dev/null
+++ b/sys-libs/db/files/db-4.8.30-tls-configure.patch
@@ -0,0 +1,31 @@
+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
index ad3da2786c88..252a6213b30f 100644
--- 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
@@ -1,5 +1,3 @@
-diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h
-index 0034dcc..fa7ba93 100644
--- a/src/dbinc/atomic.h
+++ b/src/dbinc/atomic.h
@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
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
index ff7abbe1fd79..cfbe2a7ffd01 100644
--- 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
@@ -1,6 +1,5 @@
-diff -Nuar db-5.2.28.orig//dist/aclocal/sql.m4 db-5.2.28//dist/aclocal/sql.m4
---- db-5.2.28.orig//dist/aclocal/sql.m4 2011-06-10 09:50:45.000000000 -0700
-+++ db-5.2.28//dist/aclocal/sql.m4 2011-07-15 17:02:54.646521189 -0700
+--- a/dist/aclocal/sql.m4
++++ b/dist/aclocal/sql.m4
@@ -91,7 +91,7 @@
# !!! END COPIED from autoconf distribution
diff --git a/sys-libs/db/files/db-5.3.28-clang16.patch b/sys-libs/db/files/db-5.3.28-clang16.patch
new file mode 100644
index 000000000000..aab73d87a06b
--- /dev/null
+++ b/sys-libs/db/files/db-5.3.28-clang16.patch
@@ -0,0 +1,325 @@
+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-6.0.20-test-link.patch b/sys-libs/db/files/db-6.0.20-test-link.patch
index 8aceaa4d6f8c..5fc6669465c6 100644
--- a/sys-libs/db/files/db-6.0.20-test-link.patch
+++ b/sys-libs/db/files/db-6.0.20-test-link.patch
@@ -1,6 +1,5 @@
-diff -Nuar db-6.0.20.orig/test/tcl/parallel.tcl db-6.0.20/test/tcl/parallel.tcl
---- db-6.0.20.orig/test/tcl/parallel.tcl 2013-07-04 15:49:43.408348040 +0000
-+++ db-6.0.20/test/tcl/parallel.tcl 2013-07-04 17:40:07.147943377 +0000
+--- 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}
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
index c239bb118a82..66bdcf9fe130 100644
--- 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
@@ -1,5 +1,5 @@
---- db-6.0.35/dist/aclocal/sql.m4
-+++ db-6.0.35/dist/aclocal/sql.m4
+--- 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"
diff --git a/sys-libs/db/files/db-6.1.19-sqlite-configure-path.patch b/sys-libs/db/files/db-6.1.19-sqlite-configure-path.patch
deleted file mode 100644
index 25854c53e160..000000000000
--- a/sys-libs/db/files/db-6.1.19-sqlite-configure-path.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- db-6.1.19/dist/aclocal/sql.m4
-+++ db-6.1.19/dist/aclocal/sql.m4
-@@ -96,6 +96,6 @@
- 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
diff --git a/sys-libs/db/files/db-6.2-jni-check-prefix-first.patch b/sys-libs/db/files/db-6.2-jni-check-prefix-first.patch
deleted file mode 100644
index 963b01380c23..000000000000
--- a/sys-libs/db/files/db-6.2-jni-check-prefix-first.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- db-6.2.23/dist/aclocal_java/ac_jni_include_dirs.m4
-+++ db-6.2.23/dist/aclocal_java/ac_jni_include_dirs.m4
-@@ -43,18 +43,23 @@
- *) AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
- esac
-
--_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
--_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
--case "$host_os" in
-- darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
-- if test -d "$_JTOPDIR/include"; then
-- _JINC="$_JTOPDIR/include"
-- else
-- _JINC="$_JTOPDIR/Headers"
-- fi;;
-- *) _JINC="$_JTOPDIR/include";;
--esac
--
-+# If JAVAPREFIX is defined, look there first
-+if test -r "$JAVAPREFIX/include/jni.h"; then
-+ _JTOPDIR="$JAVAPREFIX"
-+ _JINC="$JAVAPREFIX/include"
-+else
-+ _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
-+ _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
-+ case "$host_os" in
-+ darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
-+ if test -d "$_JTOPDIR/include"; then
-+ _JINC="$_JTOPDIR/include"
-+ else
-+ _JINC="$_JTOPDIR/Headers"
-+ fi;;
-+ *) _JINC="$_JTOPDIR/include";;
-+ esac
-+fi
- # If we find jni.h in /usr/include, then it's not a java-only tree, so
- # don't add /usr/include or subdirectories to the list of includes.
- # An extra -I/usr/include can foul things up with newer gcc's.
diff --git a/sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch b/sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch
deleted file mode 100644
index 0a320d7f9336..000000000000
--- a/sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch
+++ /dev/null
@@ -1,44 +0,0 @@
---- db-6.2.32/dist/aclocal_java/ac_jni_include_dirs.m4
-+++ db-6.2.32/dist/aclocal_java/ac_jni_include_dirs.m4
-@@ -43,21 +43,26 @@
- *) AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
- esac
-
--_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
--_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
--case "$host_os" in
-- darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
-- if test -d "$_JTOPDIR/include"; then
-- _JINC="$_JTOPDIR/include"
-- else
-- _JINC="`$_JTOPDIR/Commands/java_home`/include"
-- fi;;
-- *) if test ! -r "$_JTOPDIR/include/jni.h"; then
-- _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
-- fi
-- _JINC="$_JTOPDIR/include";;
--esac
--
-+# If JAVAPREFIX is defined, look there first
-+if test -r "$JAVAPREFIX/include/jni.h"; then
-+ _JTOPDIR="$JAVAPREFIX"
-+ _JINC="$JAVAPREFIX/include"
-+else
-+ _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
-+ _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
-+ case "$host_os" in
-+ darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
-+ if test -d "$_JTOPDIR/include"; then
-+ _JINC="$_JTOPDIR/include"
-+ else
-+ _JINC="`$_JTOPDIR/Commands/java_home`/include"
-+ fi;;
-+ *) if test ! -r "$_JTOPDIR/include/jni.h"; then
-+ _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
-+ fi
-+ _JINC="$_JTOPDIR/include";;
-+ esac
-+fi
- # If we find jni.h in /usr/include, then it's not a java-only tree, so
- # don't add /usr/include or subdirectories to the list of includes.
- # An extra -I/usr/include can foul things up with newer gcc's.
diff --git a/sys-libs/e2fsprogs-libs/Manifest b/sys-libs/e2fsprogs-libs/Manifest
deleted file mode 100644
index 580fc5c7611f..000000000000
--- a/sys-libs/e2fsprogs-libs/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST e2fsprogs-1.46.4.tar.xz 7035200 BLAKE2B 473f7fd3f521b94cdaa68e37784a518fc1919387dd114f31b5338f1b4c472f86b150229ec3dcae8b73eac95330c0dea729befc8cea08bcf1e455c0b6652d6d2b SHA512 7d9cfdf00ed58e66049585e8382fe4977088956421a0fb8155900c69afd8857309ad2b9301b3f74c9c0afa7287a0ddba2fd1538fcf57858b37a9ab712390016d
diff --git a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.46.4-r1.ebuild b/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.46.4-r1.ebuild
deleted file mode 100644
index 666389defb2c..000000000000
--- a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.46.4-r1.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs multilib-minimal usr-ldscript
-
-MY_PN=${PN%-libs}
-MY_P="${MY_PN}-${PV}"
-
-DESCRIPTION="e2fsprogs libraries (common error and subsystem)"
-HOMEPAGE="http://e2fsprogs.sourceforge.net/"
-SRC_URI="https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v${PV}/${MY_P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x86-solaris"
-IUSE="static-libs"
-
-RDEPEND="!>=sys-fs/e2fsprogs-1.46.4-r51"
-BDEPEND="virtual/pkgconfig"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.42.13-fix-build-cflags.patch #516854
-)
-
-src_prepare() {
- default
-
- cp doc/RelNotes/v${PV}.txt ChangeLog || die "Failed to copy Release Notes"
-}
-
-multilib_src_configure() {
- local myconf=(
- --enable-elf-shlibs
- $(tc-has-tls || echo --disable-tls)
- --disable-e2initrd-helper
- --disable-fsck
- )
-
- # we use blkid/uuid from util-linux now
- if use kernel_linux ; then
- export ac_cv_lib_{uuid_uuid_generate,blkid_blkid_get_cache}=yes
- myconf+=( --disable-lib{blkid,uuid} )
- fi
-
- ac_cv_path_LDCONFIG=: \
- ECONF_SOURCE="${S}" \
- CC="$(tc-getCC)" \
- BUILD_CC="$(tc-getBUILD_CC)" \
- BUILD_LD="$(tc-getBUILD_LD)" \
- econf "${myconf[@]}"
-}
-
-multilib_src_compile() {
- emake -C lib/et V=1
-
- emake -C lib/ss V=1
-}
-
-multilib_src_test() {
- if multilib_is_native_abi; then
- emake -C lib/et V=1 check
-
- emake -C lib/ss V=1 check
- fi
-}
-
-multilib_src_install() {
- emake -C lib/et V=1 DESTDIR="${D}" install
-
- emake -C lib/ss V=1 DESTDIR="${D}" install
-
- # We call "gen_usr_ldscript -a" to ensure libs are present in /lib to support
- # split /usr (e.g. "e2fsck" from sys-fs/e2fsprogs is installed in /sbin and
- # links to libcom_err.so).
- gen_usr_ldscript -a com_err ss $(usex kernel_linux '' 'uuid blkid')
-
- if ! use static-libs ; then
- find "${ED}" -name '*.a' -delete || die
- fi
-}
-
-multilib_src_install_all() {
- # Package installs same header twice -- use symlink instead
- dosym et/com_err.h /usr/include/com_err.h
-
- einstalldocs
-}
diff --git a/sys-libs/e2fsprogs-libs/files/e2fsprogs-libs-1.42.13-fix-build-cflags.patch b/sys-libs/e2fsprogs-libs/files/e2fsprogs-libs-1.42.13-fix-build-cflags.patch
deleted file mode 100644
index a87f0c697eab..000000000000
--- a/sys-libs/e2fsprogs-libs/files/e2fsprogs-libs-1.42.13-fix-build-cflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://bugs.gentoo.org/516854
-
---- e2fsprogs-libs-1.42.13/configure
-+++ e2fsprogs-libs-1.42.13/configure
-@@ -1315,6 +1315,8 @@
- if test $cross_compiling = no; then
- BUILD_CFLAGS="$CFLAGS $CPPFLAGS $INCLUDES -DHAVE_CONFIG_H"
- BUILD_LDFLAGS="$LDFLAGS"
-+else
-+ BUILD_CFLAGS="$INCLUDES"
- fi
-
-
diff --git a/sys-libs/efivar/Manifest b/sys-libs/efivar/Manifest
index 450ec0b1c8a3..70de2f8e537c 100644
--- a/sys-libs/efivar/Manifest
+++ b/sys-libs/efivar/Manifest
@@ -1,2 +1 @@
-DIST efivar-37.tar.bz2 109431 BLAKE2B 813d477d31562b773f6e19f20e9e237b94beed437ce221771770e7d46ff0e657530285f035dc942cc20609185be92dc50319bfe8e10dee642c8bd88403ef6ffe SHA512 305a82ed103c7e3d8f723934019d552677c73558768dd5341f87d0364f5c60824d24f5a8e1bf90075e825908085083d4ecdccec5ac757fd38ee6ac8fea28c3e4
DIST efivar-38.tar.bz2 320221 BLAKE2B 0b96f3d71ddc2246e6a11a5cd32af3d007823c4a283186a428c3f145cd74425a31bd22c4671ad1ab252a3c572991bb1698381cb8bdf51efcbebd62befdc6c070 SHA512 c2f17297c863ece134a9dd758d237fd2df8c8d072f87af1d0bf2bcf9acfc7a53c25597f03fd4fb8cc664b205743d4ffa0ef1b068d0f73c58fa573d40993f3155
diff --git a/sys-libs/efivar/efivar-37.ebuild b/sys-libs/efivar/efivar-37.ebuild
deleted file mode 100644
index af1df743350a..000000000000
--- a/sys-libs/efivar/efivar-37.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs
-
-DESCRIPTION="Tools and library to manipulate EFI variables"
-HOMEPAGE="https://github.com/rhinstaller/efivar"
-SRC_URI="https://github.com/rhinstaller/efivar/releases/download/${PV}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0/1"
-KEYWORDS="amd64 ~arm arm64 ~ia64 ~ppc64 ~riscv x86"
-
-RDEPEND="dev-libs/popt"
-DEPEND="${RDEPEND}
- >=sys-kernel/linux-headers-3.18
- virtual/pkgconfig
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-37-ia64-relro.patch
-)
-
-src_prepare() {
- default
- sed -i -e 's/-Werror //' gcc.specs || die
-}
-
-src_configure() {
- tc-export CC
- export CC_FOR_BUILD=$(tc-getBUILD_CC)
- tc-ld-disable-gold
- export libdir="/usr/$(get_libdir)"
- unset LIBS # Bug 562004
-
- if [[ -n ${GCC_SPECS} ]]; then
- # The environment overrides the command line.
- GCC_SPECS+=":${S}/gcc.specs"
- fi
-}
diff --git a/sys-libs/efivar/efivar-38.ebuild b/sys-libs/efivar/efivar-38.ebuild
index a3b90daffac1..afed8c46956a 100644
--- a/sys-libs/efivar/efivar-38.ebuild
+++ b/sys-libs/efivar/efivar-38.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2014-2022 Gentoo Authors
+# Copyright 2014-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/rhinstaller/efivar/releases/download/${PV}/${P}.tar.
LICENSE="GPL-2"
SLOT="0/1"
-KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc64 ~riscv ~x86"
+KEYWORDS="amd64 arm arm64 ~ia64 ~loong ppc64 ~riscv x86"
IUSE="test"
RESTRICT="!test? ( test )"
@@ -29,10 +29,18 @@ DEPEND="${RDEPEND}
src_prepare() {
local PATCHES=(
- "${FILESDIR}"/efivar-38-ia64-relro.patch
"${FILESDIR}"/efivar-38-march-native.patch
"${FILESDIR}"/efivar-38-Makefile-dep.patch
"${FILESDIR}"/efivar-38-binutils-2.36.patch
+ "${FILESDIR}"/efivar-38-ld-locale.patch
+ "${FILESDIR}"/efivar-38-glibc-2.36.patch
+ "${FILESDIR}"/efivar-38-lld-fixes.patch
+ "${FILESDIR}"/efivar-38-efisecdb-musl.patch
+ "${FILESDIR}"/efivar-38-efisecdb-optarg.patch
+ "${FILESDIR}"/efivar-38-64bit-off_t.patch
+
+ # Rejected upstream, keep this for ia64 support
+ "${FILESDIR}"/efivar-38-ia64-relro.patch
)
default
}
@@ -60,3 +68,8 @@ src_configure() {
# Used by tests/Makefile
export GRUB_PREFIX=grub
}
+
+src_test() {
+ # https://bugs.gentoo.org/924370
+ emake -j1 test
+}
diff --git a/sys-libs/efivar/files/efivar-37-ia64-relro.patch b/sys-libs/efivar/files/efivar-37-ia64-relro.patch
deleted file mode 100644
index 92a79aec88e4..000000000000
--- a/sys-libs/efivar/files/efivar-37-ia64-relro.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-https://github.com/rhboot/efivar/pull/164
-https://bugs.gentoo.org/749963
-
-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)
-
-```
-$ 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` options from gcc.spec entirely.
-
-Reported-by: Émeric Maschino
-Bug: https://bugs.gentoo.org/749963
-Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---- a/gcc.specs
-+++ b/gcc.specs
-@@ -11,7 +11,7 @@
- + %(efivar_cpp_options) -Wmaybe-uninitialized -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
-
- *self_spec:
--+ %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now}
-++ %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-static -static -Wl,-z,relro,-z,now}
-
- *link:
--+ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined --add-needed -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
-++ --no-undefined-version --no-allow-shlib-undefined --add-needed -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
diff --git a/sys-libs/efivar/files/efivar-38-64bit-off_t.patch b/sys-libs/efivar/files/efivar-38-64bit-off_t.patch
new file mode 100644
index 000000000000..d06868b22587
--- /dev/null
+++ b/sys-libs/efivar/files/efivar-38-64bit-off_t.patch
@@ -0,0 +1,46 @@
+https://bugs.gentoo.org/905930
+
+From 914c686cc54b2405dab08bff77cd60827aab54b1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 14 Dec 2022 16:55:51 -0800
+Subject: [PATCH] Use off_t instead of off64_t
+
+Pass _FILE_OFFSET_BITS=64 to ensure 64bit off_t
+
+This helps building efivar for 32bit arches on systems using musl C
+library. It works with glibc since _GNU_SOURCE defines
+_LARGEFILE64_SOURCE as well, this feature test macro enables the 64bit
+interfaces which were done as intermediate steps when transition to
+66-bit off_t was done as part olf LFS64 support.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/error.c | 2 +-
+ src/include/defaults.mk | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/error.c b/src/error.c
+index fcbba0d6..9530e22c 100644
+--- a/src/error.c
++++ b/src/error.c
+@@ -191,7 +191,7 @@ dbglog_write(void *cookie, const char *buf, size_t size)
+ }
+
+ static int
+-dbglog_seek(void *cookie UNUSED, off64_t *offset, int whence)
++dbglog_seek(void *cookie UNUSED, off_t *offset, int whence)
+ {
+ FILE *log = efi_errlog ? efi_errlog : stderr;
+ int rc;
+diff --git a/src/include/defaults.mk b/src/include/defaults.mk
+index 42bd3d6e..bb9c997f 100644
+--- a/src/include/defaults.mk
++++ b/src/include/defaults.mk
+@@ -34,6 +34,7 @@ CPPFLAGS ?=
+ override _CPPFLAGS := $(CPPFLAGS)
+ override CPPFLAGS = $(_CPPFLAGS) -DLIBEFIVAR_VERSION=$(VERSION) \
+ -D_GNU_SOURCE \
++ -D_FILE_OFFSET_BITS=64 \
+ -I$(TOPDIR)/src/include/
+ CFLAGS ?= $(OPTIMIZE) $(DEBUGINFO) $(WARNINGS) $(ERRORS)
+ CFLAGS_GCC ?= -specs=$(TOPDIR)/src/include/gcc.specs \
diff --git a/sys-libs/efivar/files/efivar-38-efisecdb-musl.patch b/sys-libs/efivar/files/efivar-38-efisecdb-musl.patch
new file mode 100644
index 000000000000..a1bfa631aae1
--- /dev/null
+++ b/sys-libs/efivar/files/efivar-38-efisecdb-musl.patch
@@ -0,0 +1,179 @@
+From cece3ffd5be2f8641eb694513f2b73e5eb97ffd3 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Fri, 28 Jan 2022 12:13:30 +0100
+Subject: [PATCH] efisecdb: fix build with musl libc
+
+Refactor code to use POSIX atexit(3) instead of the GNU specific
+on_exit(3).
+
+Resolves: #197
+Resolves: #202
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ src/compiler.h | 2 --
+ src/efisecdb.c | 68 +++++++++++++++++++-------------------------------
+ 2 files changed, 26 insertions(+), 44 deletions(-)
+
+diff --git a/src/compiler.h b/src/compiler.h
+index e2f18f0b..d95fb014 100644
+--- a/src/compiler.h
++++ b/src/compiler.h
+@@ -7,8 +7,6 @@
+ #ifndef COMPILER_H_
+ #define COMPILER_H_
+
+-#include <sys/cdefs.h>
+-
+ /* GCC version checking borrowed from glibc. */
+ #if defined(__GNUC__) && defined(__GNUC_MINOR__)
+ # define GNUC_PREREQ(maj,min) \
+diff --git a/src/efisecdb.c b/src/efisecdb.c
+index f8823737..6bd5ad90 100644
+--- a/src/efisecdb.c
++++ b/src/efisecdb.c
+@@ -25,6 +25,10 @@
+ extern char *optarg;
+ extern int optind, opterr, optopt;
+
++static efi_secdb_t *secdb = NULL;
++static list_t infiles;
++static list_t actions;
++
+ struct hash_param {
+ char *name;
+ efi_secdb_type_t algorithm;
+@@ -187,12 +191,11 @@ add_action(list_t *list, action_type_t action_type, const efi_guid_t *owner,
+ }
+
+ static void
+-free_actions(int status UNUSED, void *actionsp)
++free_actions(void)
+ {
+- list_t *actions = (list_t *)actionsp;
+ list_t *pos, *tmp;
+
+- for_each_action_safe(pos, tmp, actions) {
++ for_each_action_safe(pos, tmp, &actions) {
+ action_t *action = list_entry(pos, action_t, list);
+
+ list_del(&action->list);
+@@ -202,12 +205,11 @@ free_actions(int status UNUSED, void *actionsp)
+ }
+
+ static void
+-free_infiles(int status UNUSED, void *infilesp)
++free_infiles(void)
+ {
+- list_t *infiles = (list_t *)infilesp;
+ list_t *pos, *tmp;
+
+- for_each_ptr_safe(pos, tmp, infiles) {
++ for_each_ptr_safe(pos, tmp, &infiles) {
+ ptrlist_t *entry = list_entry(pos, ptrlist_t, list);
+
+ list_del(&entry->list);
+@@ -216,27 +218,12 @@ free_infiles(int status UNUSED, void *infilesp)
+ }
+
+ static void
+-maybe_free_secdb(int status UNUSED, void *voidp)
++maybe_free_secdb(void)
+ {
+- efi_secdb_t **secdbp = (efi_secdb_t **)voidp;
+-
+- if (secdbp == NULL || *secdbp == NULL)
++ if (secdb == NULL)
+ return;
+
+- efi_secdb_free(*secdbp);
+-}
+-
+-static void
+-maybe_do_unlink(int status, void *filep)
+-{
+- char **file = (char **)filep;
+-
+- if (status == 0)
+- return;
+- if (file == NULL || *file == NULL)
+- return;
+-
+- unlink(*file);
++ efi_secdb_free(secdb);
+ }
+
+ static void
+@@ -323,15 +310,6 @@ parse_input_files(list_t *infiles, char **outfile, efi_secdb_t **secdb,
+ return status;
+ }
+
+-/*
+- * These need to be static globals so that they're not on main's stack when
+- * on_exit() fires.
+- */
+-static efi_secdb_t *secdb = NULL;
+-static list_t infiles;
+-static list_t actions;
+-static char *outfile = NULL;
+-
+ int
+ main(int argc, char *argv[])
+ {
+@@ -351,6 +329,7 @@ main(int argc, char *argv[])
+ bool do_sort_data = false;
+ bool sort_descending = false;
+ int status = 0;
++ char *outfile = NULL;
+
+ const char sopts[] = ":aAc:dfg:h:i:Lo:rs:t:v?";
+ const struct option lopts[] = {
+@@ -376,10 +355,9 @@ main(int argc, char *argv[])
+ INIT_LIST_HEAD(&infiles);
+ INIT_LIST_HEAD(&actions);
+
+- on_exit(free_actions, &actions);
+- on_exit(free_infiles, &infiles);
+- on_exit(maybe_free_secdb, &secdb);
+- on_exit(maybe_do_unlink, &outfile);
++ atexit(free_actions);
++ atexit(free_infiles);
++ atexit(maybe_free_secdb);
+
+ /*
+ * parse the command line.
+@@ -587,24 +565,30 @@ main(int argc, char *argv[])
+ outfd = open(outfile, flags, 0600);
+ if (outfd < 0) {
+ char *tmpoutfile = outfile;
+- if (errno == EEXIST)
+- outfile = NULL;
++ if (errno != EEXIST)
++ unlink(outfile);
+ err(1, "could not open \"%s\"", tmpoutfile);
+ }
+
+ rc = ftruncate(outfd, 0);
+- if (rc < 0)
++ if (rc < 0) {
++ unlink(outfile);
+ err(1, "could not truncate output file \"%s\"", outfile);
++ }
+
+ void *output;
+ size_t size = 0;
+ rc = efi_secdb_realize(secdb, &output, &size);
+- if (rc < 0)
++ if (rc < 0) {
++ unlink(outfile);
+ secdb_err(1, "could not realize signature list");
++ }
+
+ rc = write(outfd, output, size);
+- if (rc < 0)
++ if (rc < 0) {
++ unlink(outfile);
+ err(1, "could not write signature list");
++ }
+
+ close(outfd);
+ xfree(output);
diff --git a/sys-libs/efivar/files/efivar-38-efisecdb-optarg.patch b/sys-libs/efivar/files/efivar-38-efisecdb-optarg.patch
new file mode 100644
index 000000000000..612395efbe18
--- /dev/null
+++ b/sys-libs/efivar/files/efivar-38-efisecdb-optarg.patch
@@ -0,0 +1,51 @@
+From df09b472419466987f2f30176dd00937e640aa9a Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Fri, 28 Jan 2022 12:29:00 +0100
+Subject: [PATCH] efisecdb: do not free optarg
+
+The *outfile passed to parse_input_files can only be either set to
+optarg or be NULL. optarg should not be free'd and NULL does not need
+to.
+
+Since we no longer use on_exit to unlink outfile we also don't need to
+set *outfile to NULL.
+
+Fixes commit d91787035bc1 (efisecdb: add efisecdb)
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ src/efisecdb.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/src/efisecdb.c b/src/efisecdb.c
+index 6bd5ad90..70fa1847 100644
+--- a/src/efisecdb.c
++++ b/src/efisecdb.c
+@@ -255,8 +255,7 @@ list_guids(void)
+ * failure.
+ */
+ static int
+-parse_input_files(list_t *infiles, char **outfile, efi_secdb_t **secdb,
+- bool dump)
++parse_input_files(list_t *infiles, efi_secdb_t **secdb, bool dump)
+ {
+ int status = 0;
+ list_t *pos, *tmp;
+@@ -297,8 +296,6 @@ parse_input_files(list_t *infiles, char **outfile, efi_secdb_t **secdb,
+ if (!dump)
+ exit(1);
+ status = 1;
+- xfree(*outfile);
+- *outfile = NULL;
+ break;
+ }
+ }
+@@ -528,7 +525,7 @@ main(int argc, char *argv[])
+ efi_secdb_set_bool(secdb, EFI_SECDB_SORT_DATA, do_sort_data);
+ efi_secdb_set_bool(secdb, EFI_SECDB_SORT_DESCENDING, sort_descending);
+
+- status = parse_input_files(&infiles, &outfile, &secdb, dump);
++ status = parse_input_files(&infiles, &secdb, dump);
+ if (status == 0) {
+ for_each_action_safe(pos, tmp, &actions) {
+ action_t *action = list_entry(pos, action_t, list);
diff --git a/sys-libs/efivar/files/efivar-38-glibc-2.36.patch b/sys-libs/efivar/files/efivar-38-glibc-2.36.patch
new file mode 100644
index 000000000000..0a7e5f2e099c
--- /dev/null
+++ b/sys-libs/efivar/files/efivar-38-glibc-2.36.patch
@@ -0,0 +1,46 @@
+https://github.com/rhboot/efivar/commit/bc65d63ebf8fe6ac8a099ff15ca200986dba1565
+https://bugs.gentoo.org/863230
+
+From: Robbie Harwood <rharwood@redhat.com>
+Date: Thu, 28 Jul 2022 16:11:24 -0400
+Subject: [PATCH] Fix glibc 2.36 build (mount.h conflicts)
+
+glibc has decided that sys/mount.h and linux/mount.h are no longer
+usable at the same time. This broke the build, since linux/fs.h itself
+includes linux/mount.h. For now, fix the build by only including
+sys/mount.h where we need it.
+
+See-also: https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
+Resolves: #227
+Signed-off-by: Robbie Harwood <rharwood@redhat.com>
+--- a/src/gpt.c
++++ b/src/gpt.c
+@@ -17,6 +17,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/mount.h>
+ #include <sys/param.h>
+ #include <sys/stat.h>
+ #include <sys/utsname.h>
+--- a/src/linux.c
++++ b/src/linux.c
+@@ -20,6 +20,7 @@
+ #include <stdbool.h>
+ #include <stdio.h>
+ #include <sys/ioctl.h>
++#include <sys/mount.h>
+ #include <sys/socket.h>
+ #include <sys/sysmacros.h>
+ #include <sys/types.h>
+--- a/src/util.h
++++ b/src/util.h
+@@ -23,7 +23,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/ioctl.h>
+-#include <sys/mount.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <tgmath.h>
+
diff --git a/sys-libs/efivar/files/efivar-38-ia64-relro.patch b/sys-libs/efivar/files/efivar-38-ia64-relro.patch
index 2f3686cac444..f43057e5e0ad 100644
--- a/sys-libs/efivar/files/efivar-38-ia64-relro.patch
+++ b/sys-libs/efivar/files/efivar-38-ia64-relro.patch
@@ -23,6 +23,8 @@ 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>
@@ -38,8 +40,21 @@ index ef28e2b..4deead5 100644
+ %{!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 --add-needed -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
-++ --no-undefined-version --no-allow-shlib-undefined --add-needed -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
+-+ %{!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/files/efivar-38-ld-locale.patch b/sys-libs/efivar/files/efivar-38-ld-locale.patch
new file mode 100644
index 000000000000..b1dd699a4461
--- /dev/null
+++ b/sys-libs/efivar/files/efivar-38-ld-locale.patch
@@ -0,0 +1,30 @@
+From 01de7438520868650bfaa1ef3e2bfaf00cacbcc6 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 24 Jun 2022 17:00:33 -0400
+Subject: [PATCH] Set LC_ALL=C to force English output from ld
+
+If the user has a different locale set, ld --version may not contain the
+string "GNU ld".
+
+For example, in Italian, ld --version outputs "ld di GNU".
+
+Signed-off-by: Mike Gilbert <floppym@gentoo.org>
+---
+ src/include/workarounds.mk | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/include/workarounds.mk b/src/include/workarounds.mk
+index 143e7902..b72fbaf6 100644
+--- a/src/include/workarounds.mk
++++ b/src/include/workarounds.mk
+@@ -2,8 +2,8 @@
+ #
+ # workarounds.mk - workarounds for weird stuff behavior
+
+-LD_FLAVOR := $(shell $(LD) --version | grep -E '^(LLD|GNU ld)'|sed 's/ .*//g')
+-LD_VERSION := $(shell $(LD) --version | grep -E '^(LLD|GNU ld)'|sed 's/.* //')
++LD_FLAVOR := $(shell LC_ALL=C $(LD) --version | grep -E '^(LLD|GNU ld)'|sed 's/ .*//g')
++LD_VERSION := $(shell LC_ALL=C $(LD) --version | grep -E '^(LLD|GNU ld)'|sed 's/.* //')
+ # 2.35 is definitely broken and 2.36 seems to work
+ LD_DASH_T := $(shell \
+ if [ "x${LD_FLAVOR}" = xLLD ] ; then \
diff --git a/sys-libs/efivar/files/efivar-38-lld-fixes.patch b/sys-libs/efivar/files/efivar-38-lld-fixes.patch
new file mode 100644
index 000000000000..c0fbee802edd
--- /dev/null
+++ b/sys-libs/efivar/files/efivar-38-lld-fixes.patch
@@ -0,0 +1,345 @@
+https://bugs.gentoo.org/831472
+
+From b23aba1469de8bb7a115751f9cd294ad3aaa6680 Mon Sep 17 00:00:00 2001
+From: Ali Abdel-Qader <abdelqaderali@protonmail.com>
+Date: Tue, 31 May 2022 11:53:32 -0400
+Subject: [PATCH] Remove deprecated --add-needed linker flag
+
+Resolves #204
+Signed-off-by: Ali Abdel-Qader <abdelqaderali@protonmail.com>
+---
+ src/include/defaults.mk | 2 --
+ src/include/gcc.specs | 2 +-
+ 2 files changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/include/defaults.mk b/src/include/defaults.mk
+index b8cc590c..42bd3d6e 100644
+--- a/src/include/defaults.mk
++++ b/src/include/defaults.mk
+@@ -51,7 +51,6 @@ LDFLAGS ?=
+ override _CCLDFLAGS := $(CCLDFLAGS)
+ override _LDFLAGS := $(LDFLAGS)
+ override LDFLAGS = $(CFLAGS) -L. $(_LDFLAGS) $(_CCLDFLAGS) \
+- -Wl,--add-needed \
+ -Wl,--build-id \
+ -Wl,--no-allow-shlib-undefined \
+ -Wl,--no-undefined-version \
+@@ -98,7 +97,6 @@ override _HOST_LDFLAGS := $(HOST_LDFLAGS)
+ override _HOST_CCLDFLAGS := $(HOST_CCLDFLAGS)
+ override HOST_LDFLAGS = $(HOST_CFLAGS) -L. \
+ $(_HOST_LDFLAGS) $(_HOST_CCLDFLAGS) \
+- -Wl,--add-needed \
+ -Wl,--build-id \
+ -Wl,--no-allow-shlib-undefined \
+ -Wl,-z,now \
+diff --git a/src/include/gcc.specs b/src/include/gcc.specs
+index ef28e2bb..d85e8658 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 --add-needed -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
+++ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
+From 1f247260c9b4bd6fcda30f3e4cc358852aeb9e4d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tomasz=20Pawe=C5=82=20Gajc?= <tpgxyz@gmail.com>
+Date: Wed, 29 Jun 2022 21:44:29 +0200
+Subject: [PATCH] LLD: fix detection and remove not needed workarounds
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Tomasz Paweł Gajc <tpgxyz@gmail.com>
+---
+ src/include/workarounds.mk | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/include/workarounds.mk b/src/include/workarounds.mk
+index b72fbaf6..57394edd 100644
+--- a/src/include/workarounds.mk
++++ b/src/include/workarounds.mk
+@@ -2,12 +2,12 @@
+ #
+ # workarounds.mk - workarounds for weird stuff behavior
+
+-LD_FLAVOR := $(shell LC_ALL=C $(LD) --version | grep -E '^(LLD|GNU ld)'|sed 's/ .*//g')
+-LD_VERSION := $(shell LC_ALL=C $(LD) --version | grep -E '^(LLD|GNU ld)'|sed 's/.* //')
++LD_FLAVOR := $(shell LC_ALL=C $(LD) --version | grep -E '^((.* )?LLD|GNU ld)'|sed 's/.* LLD/LLD/;s/ .*//g')
++LD_VERSION := $(shell LC_ALL=C $(LD) --version | grep -E '^((.* )?LLD|GNU ld)'|sed 's/.* LLD/LLD/;s/.* //')
+ # 2.35 is definitely broken and 2.36 seems to work
+ LD_DASH_T := $(shell \
+ if [ "x${LD_FLAVOR}" = xLLD ] ; then \
+- echo '-T' ; \
++ echo "" ; \
+ elif [ "x${LD_FLAVOR}" = xGNU ] ; then \
+ if echo "${LD_VERSION}" | grep -q -E '^2\.3[6789]|^2\.[456789]|^[3456789]|^[[:digit:]][[:digit:]]' ; then \
+ echo '-T' ; \
+@@ -15,7 +15,7 @@ LD_DASH_T := $(shell \
+ echo "" ; \
+ fi ; \
+ else \
+- echo "Your linker is not supported" ; \
++ echo "Your linker ${LD_FLAVOR} version ${LD_VERSION} is not supported" ; \
+ exit 1 ; \
+ fi)
+
+From cfd686de51494d3e34be896a91835657ccab37d4 Mon Sep 17 00:00:00 2001
+From: Nicholas Vinson <nvinson234@gmail.com>
+Date: Mon, 10 Oct 2022 14:22:36 -0400
+Subject: [PATCH] Revamp efi_well_known_* variable handling
+
+The current implementation attempts to use the linker to create aliases
+for efi_well_known_guids and efi_well_known_names. It also tries to use
+the linker to generate the variables efi_well_known_guids_end and
+efi_well_known_names_end.
+
+When building with clang, the generated linker result results in a
+broken libefivar.so that causes programs to segfault when linked against
+it. This change does away with linker script hacker and instead
+introduces pointers to store the locations of efi_well_known_guids_end
+and efi_well_known_names_end.
+
+Additionally, efi_well_known_guids and efi_well_known_names are now
+created as pointers that point to the beginning of their respective
+arrays.
+
+Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
+Fixes: #234
+---
+ src/Makefile | 7 ++--
+ src/include/rules.mk | 5 +--
+ src/include/workarounds.mk | 24 -------------
+ src/makeguids.c | 72 +++++++++++++-------------------------
+ 4 files changed, 27 insertions(+), 81 deletions(-)
+ delete mode 100644 src/include/workarounds.mk
+
+diff --git a/src/Makefile b/src/Makefile
+index e04357a7..ec1eabe6 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -4,7 +4,6 @@ include $(TOPDIR)/src/include/deprecated.mk
+ include $(TOPDIR)/src/include/version.mk
+ include $(TOPDIR)/src/include/rules.mk
+ include $(TOPDIR)/src/include/defaults.mk
+-include $(TOPDIR)/src/include/workarounds.mk
+
+ LIBTARGETS=libefivar.so libefiboot.so libefisec.so
+ STATICLIBTARGETS=libefivar.a libefiboot.a libefisec.a
+@@ -30,7 +29,7 @@ EFISECDB_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(EFISECDB_SOURCES)))
+ GENERATED_SOURCES = include/efivar/efivar-guids.h guid-symbols.c
+ MAKEGUIDS_SOURCES = makeguids.c util-makeguids.c
+ MAKEGUIDS_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(MAKEGUIDS_SOURCES)))
+-MAKEGUIDS_OUTPUT = $(GENERATED_SOURCES) guids.lds
++MAKEGUIDS_OUTPUT = $(GENERATED_SOURCES)
+
+ util-makeguids.c : util.c
+ cp util.c util-makeguids.c
+@@ -84,7 +83,7 @@ $(MAKEGUIDS_OUTPUT) : guids.txt
+ if [ "$${missing}" != "no" ]; then \
+ exit 1 ; \
+ fi
+- ./makeguids $(LD_DASH_T) guids.txt guid-symbols.c include/efivar/efivar-guids.h guids.lds
++ ./makeguids guids.txt guid-symbols.c include/efivar/efivar-guids.h
+
+ prep : makeguids $(GENERATED_SOURCES)
+
+@@ -96,7 +95,6 @@ libefivar.a : $(patsubst %.o,%.static.o,$(LIBEFIVAR_OBJECTS))
+ libefivar.so : $(LIBEFIVAR_OBJECTS)
+ libefivar.so : | $(GENERATED_SOURCES) libefivar.map
+ libefivar.so : LIBS=dl
+-libefivar.so : LDSCRIPTS=guids.lds
+ libefivar.so : MAP=libefivar.map
+
+ efivar : $(EFIVAR_OBJECTS) | libefivar.so
+@@ -137,7 +135,6 @@ deps : $(ALL_SOURCES)
+ clean :
+ @rm -rfv *~ *.o *.a *.E *.so *.so.* *.pc *.bin .*.d *.map \
+ makeguids guid-symbols.c include/efivar/efivar-guids.h \
+- guids.lds \
+ $(TARGETS) $(STATICTARGETS)
+ @# remove the deps files we used to create, as well.
+ @rm -rfv .*.P .*.h.P *.S.P include/efivar/.*.h.P
+diff --git a/src/include/rules.mk b/src/include/rules.mk
+index f309f863..8d0b68a2 100644
+--- a/src/include/rules.mk
++++ b/src/include/rules.mk
+@@ -3,7 +3,6 @@ default : all
+ .PHONY: default all clean install test
+
+ include $(TOPDIR)/src/include/version.mk
+-include $(TOPDIR)/src/include/workarounds.mk
+
+ comma:= ,
+ empty:=
+@@ -36,9 +35,7 @@ family = $(foreach FAMILY_SUFFIX,$(FAMILY_SUFFIXES),$($(1)_$(FAMILY_SUFFIX)))
+ $(CCLD) $(CCLDFLAGS) $(CPPFLAGS) -o $@ $(sort $^) $(LDLIBS)
+
+ %.so :
+- $(CCLD) $(CCLDFLAGS) $(CPPFLAGS) $(SOFLAGS) \
+- $(foreach LDS,$(LDSCRIPTS),$(LD_DASH_T) $(LDS)) \
+- -o $@ $^ $(LDLIBS)
++ $(CCLD) $(CCLDFLAGS) $(CPPFLAGS) $(SOFLAGS) -o $@ $^ $(LDLIBS)
+ ln -vfs $@ $@.1
+
+ %.abixml : %.so
+diff --git a/src/include/workarounds.mk b/src/include/workarounds.mk
+deleted file mode 100644
+index 57394edd..00000000
+--- a/src/include/workarounds.mk
++++ /dev/null
+@@ -1,24 +0,0 @@
+-# SPDX-License-Identifier: SPDX-License-Identifier: LGPL-2.1-or-later
+-#
+-# workarounds.mk - workarounds for weird stuff behavior
+-
+-LD_FLAVOR := $(shell LC_ALL=C $(LD) --version | grep -E '^((.* )?LLD|GNU ld)'|sed 's/.* LLD/LLD/;s/ .*//g')
+-LD_VERSION := $(shell LC_ALL=C $(LD) --version | grep -E '^((.* )?LLD|GNU ld)'|sed 's/.* LLD/LLD/;s/.* //')
+-# 2.35 is definitely broken and 2.36 seems to work
+-LD_DASH_T := $(shell \
+- if [ "x${LD_FLAVOR}" = xLLD ] ; then \
+- echo "" ; \
+- elif [ "x${LD_FLAVOR}" = xGNU ] ; then \
+- if echo "${LD_VERSION}" | grep -q -E '^2\.3[6789]|^2\.[456789]|^[3456789]|^[[:digit:]][[:digit:]]' ; then \
+- echo '-T' ; \
+- else \
+- echo "" ; \
+- fi ; \
+- else \
+- echo "Your linker ${LD_FLAVOR} version ${LD_VERSION} is not supported" ; \
+- exit 1 ; \
+- fi)
+-
+-export LD_DASH_T
+-
+-# vim:ft=make
+diff --git a/src/makeguids.c b/src/makeguids.c
+index 376bffba..bfdee12e 100644
+--- a/src/makeguids.c
++++ b/src/makeguids.c
+@@ -107,51 +107,46 @@ write_guidnames(FILE *out, const char *listname,
+ gn->symbol, gn->name, gn->description);
+ }
+ fprintf(out, "};\n");
++ fprintf(out, "const struct efivar_guidname\n"
++ "\t__attribute__((__visibility__ (\"default\")))\n"
++ "\t* const %s = %s_;\n", listname, listname);
++ fprintf(out, "const struct efivar_guidname\n"
++ "\t__attribute__((__visibility__ (\"default\")))\n"
++ "\t* const %s_end = %s_\n\t+ %zd;\n",
++ listname, listname, n - 1);
+ }
+
+ int
+ main(int argc, char *argv[])
+ {
+ int rc;
+- int argstart = 0;
+- FILE *symout, *header, *ldsout;
+- int dash_t = 0;
++ FILE *symout, *header;
+
+- if (argc < 5) {
++ if (argc < 4) {
+ errx(1, "Not enough arguments.\n");
+- } else if (argc > 5 && !strcmp(argv[1],"-T")) {
+- argstart = 1;
+- dash_t = 1;
+- } else if (argc > 5) {
++ } else if (argc > 4) {
+ errx(1, "Too many arguments.\n");
+ }
+
+- symout = fopen(argv[argstart + 2], "w");
++ symout = fopen(argv[2], "w");
+ if (symout == NULL)
+- err(1, "could not open \"%s\"", argv[argstart + 2]);
+- rc = chmod(argv[argstart + 2], 0644);
++ err(1, "could not open \"%s\"", argv[2]);
++ rc = chmod(argv[2], 0644);
+ if (rc < 0)
+- warn("chmod(%s, 0644)", argv[argstart + 2]);
++ warn("chmod(%s, 0644)", argv[2]);
+
+- header = fopen(argv[argstart + 3], "w");
++ header = fopen(argv[3], "w");
+ if (header == NULL)
+- err(1, "could not open \"%s\"", argv[argstart + 3]);
+- rc = chmod(argv[argstart + 3], 0644);
+- if (rc < 0)
+- warn("chmod(%s, 0644)", argv[argstart + 3]);
+-
+- ldsout = fopen(argv[argstart + 4], "w");
+- if (ldsout == NULL)
+- err(1, "could not open \"%s\"", argv[argstart + 4]);
+- rc = chmod(argv[argstart + 4], 0644);
++ err(1, "could not open \"%s\"", argv[3]);
++ rc = chmod(argv[3], 0644);
+ if (rc < 0)
+- warn("chmod(%s, 0644)", argv[argstart + 4]);
++ warn("chmod(%s, 0644)", argv[3]);
+
+ struct guidname_index *guidnames = NULL;
+
+- rc = read_guids_at(AT_FDCWD, argv[argstart + 1], &guidnames);
++ rc = read_guids_at(AT_FDCWD, argv[1], &guidnames);
+ if (rc < 0)
+- err(1, "could not read \"%s\"", argv[argstart + 1]);
++ err(1, "could not read \"%s\"", argv[1]);
+
+ struct efivar_guidname *outbuf;
+
+@@ -243,12 +238,11 @@ struct efivar_guidname {\n\
+ fprintf(header,
+ "extern const struct efivar_guidname\n"
+ "\t__attribute__((__visibility__ (\"default\")))\n"
+- "\tefi_well_known_guids[%d];\n",
+- i);
++ "\t* const efi_well_known_guids;\n");
+ fprintf(header,
+ "extern const struct efivar_guidname\n"
+ "\t__attribute__((__visibility__ (\"default\")))\n"
+- "\tefi_well_known_guids_end;\n");
++ "\t* const efi_well_known_guids_end;\n");
+ fprintf(header,
+ "extern const uint64_t\n"
+ "\t__attribute__((__visibility__ (\"default\")))\n"
+@@ -256,12 +250,11 @@ struct efivar_guidname {\n\
+ fprintf(header,
+ "extern const struct efivar_guidname\n"
+ "\t__attribute__((__visibility__ (\"default\")))\n"
+- "\tefi_well_known_names[%d];\n",
+- i);
++ "\t* const efi_well_known_names;\n");
+ fprintf(header,
+ "extern const struct efivar_guidname\n"
+ "\t__attribute__((__visibility__ (\"default\")))\n"
+- "\tefi_well_known_names_end;\n");
++ "\t* const efi_well_known_names_end;\n");
+ fprintf(header,
+ "extern const uint64_t\n"
+ "\t__attribute__((__visibility__ (\"default\")))\n"
+@@ -310,23 +303,6 @@ struct efivar_guidname {\n\
+
+ fclose(symout);
+
+- fprintf(ldsout,
+- "SECTIONS\n"
+- "{\n"
+- " .data :\n"
+- " {\n"
+- " efi_well_known_guids = efi_well_known_guids_;\n"
+- " efi_well_known_guids_end = efi_well_known_guids_ + %zd;\n"
+- " efi_well_known_names = efi_well_known_names_;\n"
+- " efi_well_known_names_end = efi_well_known_names_ + %zd;\n"
+- " }\n"
+- "}%s;\n",
+- (line - 1) * sizeof(struct efivar_guidname),
+- (line - 1) * sizeof(struct efivar_guidname),
+- dash_t ? " INSERT AFTER .data" : "");
+-
+- fclose(ldsout);
+-
+ free(guidnames->strtab);
+ free(guidnames);
+
diff --git a/sys-libs/fortify-headers/Manifest b/sys-libs/fortify-headers/Manifest
index d28a37a0007a..f45bc033da8d 100644
--- a/sys-libs/fortify-headers/Manifest
+++ b/sys-libs/fortify-headers/Manifest
@@ -1,2 +1 @@
-DIST fortify-headers-0.7.tar.gz 5524 BLAKE2B 76ec4ee5b50bc77db05bf45a4a5550f3a369e5a49e333cd095613acbc04794d074103f3110c353a3283757f12cec866c45ed7d71ef4509667cae49926ee6953a SHA512 9335d5042f973904cf131d4894c71d3d25c84e82427500064a4ed3f798abd8051c3b52375a17c807ca89227115fa5ba9922939f0e86059a9f04fee61f0b69e53
DIST fortify-headers-1.1.tar.gz 5510 BLAKE2B d0454ad3ba432c051aeabfffad82799fae4ef37c07a8d2b8efcc26cd867dea8b31586f312d2947cb7e6ef7eedcacc3bb68591be4409376cc702ffbbafe144ea0 SHA512 a39d6e7c002bf91085f712aa46bc3f53ff934cc963694a229fa82d84ff4a7556105212a84a231ab5367c01c6a1e385172173f1f4a34d5eb4d2d9c58472c23dd0
diff --git a/sys-libs/fortify-headers/fortify-headers-0.7.ebuild b/sys-libs/fortify-headers/fortify-headers-0.7.ebuild
deleted file mode 100644
index 90e1ebc8b420..000000000000
--- a/sys-libs/fortify-headers/fortify-headers-0.7.ebuild
+++ /dev/null
@@ -1,29 +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_install() {
- export DESTDIR="${ED}"
- default
-}
diff --git a/sys-libs/fortify-headers/fortify-headers-9999.ebuild b/sys-libs/fortify-headers/fortify-headers-9999.ebuild
index 5347e1e57683..978f5b027268 100644
--- a/sys-libs/fortify-headers/fortify-headers-9999.ebuild
+++ b/sys-libs/fortify-headers/fortify-headers-9999.ebuild
@@ -1,20 +1,22 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+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="git://git.2f30.org/fortify-headers"
+ EGIT_REPO_URI="https://github.com/jvoisin/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"
+ 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
-DESCRIPTION="A standalone implementation of fortify source"
-HOMEPAGE="http://git.2f30.org/fortify-headers/"
-
LICENSE="ISC"
SLOT="0"
@@ -30,6 +32,10 @@ src_compile() {
:;
}
+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
index 489e730c1c90..dd8b1ddfa342 100644
--- a/sys-libs/fortify-headers/metadata.xml
+++ b/sys-libs/fortify-headers/metadata.xml
@@ -5,4 +5,7 @@
<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
index 68a015e3b8ed..5572fab3da51 100644
--- a/sys-libs/freeipmi/Manifest
+++ b/sys-libs/freeipmi/Manifest
@@ -1,2 +1,2 @@
-DIST freeipmi-1.6.8.tar.gz 3426706 BLAKE2B afe3238955786b13aae0e0062028f5c969a8e686b46bea3850696361355b3bd82a55bd93523ea7fe2223fe5bb04922c26b46023f783bd879bbd01e34ffd6d59e SHA512 66cae2aed95ddb3fd9301146d5a1065b61267232d6ced726b106402bf3840a17364a29d7bf6bbe4db7955b77dcd23510f1258aac85ead5c295c876c6fa4333c3
-DIST freeipmi-1.6.9.tar.gz 3429566 BLAKE2B 68ee7bd27d459a25464e17d9c98370252d33961d10e69675505f046db26a95d780c114b4f90eeab43a39d0fca3d98b1f108c6d3ca9550fd9d3c455d2e9a79c6b SHA512 536add8dc01aa4d9df45e3499f8be1318185b19beb579c8f991a11ca973626d7e0aabe1d8760a9addadc418ea5c1e2b5432053e46ba94fd9078fb6dcabf48280
+DIST freeipmi-1.6.10.tar.gz 3431062 BLAKE2B e217570d8fcf78ca9d04aad4d5bd46b4120beb21f2dcfb083bc9779a4541856e08ec6e87549651ee3c9b62fe54521585e192c784254dd9482bf9da09935853ae SHA512 90b6b78cdd119c2a1f332f007333aa6df70c6e3de0fd81ab007025392ee7cb7a01ab4a7a174d1f2e760c55d78f21ebbbe9667af661ccdd669e4b54edb1346937
+DIST freeipmi-1.6.11.tar.gz 3429533 BLAKE2B abc803341db4e48fe1a81da1d9cce2e7a808e51f41fb5b18019fa25bec41b443275f737553fe8b7bfd1dd9ad06d08b2097ca9f8e78a431e20d1a0e89d0e8cda6 SHA512 db37bb1ec559f88764ac08491b616d24e49c9a8ba070717e940fea4886d877819064cb00221aac703d0d149dc38e562924e192e992222e18b0e8b548248487a4
diff --git a/sys-libs/freeipmi/files/freeipmi-1.6.10-0001-configure.ac-Fix-Wimplicit-function-declaration-for-.patch b/sys-libs/freeipmi/files/freeipmi-1.6.10-0001-configure.ac-Fix-Wimplicit-function-declaration-for-.patch
new file mode 100644
index 000000000000..8d8cfcc2ae7a
--- /dev/null
+++ b/sys-libs/freeipmi/files/freeipmi-1.6.10-0001-configure.ac-Fix-Wimplicit-function-declaration-for-.patch
@@ -0,0 +1,27 @@
+https://marc.info/?l=freeipmi-devel&m=166752785904895&w=2
+
+From 3ec9097fc558c888be9268344ea94a4caf5f7883 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 4 Nov 2022 01:58:38 +0000
+Subject: [PATCH 1/3] configure.ac: Fix -Wimplicit-function-declaration for
+ printf
+
+Clang 16 makes these errors fatal by default:
+```
+error: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
+```
+
+printf(3) is provided by <stdio.h>, not <stdlib.h>.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -692,7 +692,7 @@ fi
+
+ AM_CONDITIONAL(WITH_FREEIPMI_ARGP, test "$have_argp" = "no")
+
+-AC_TRY_COMPILE([#include <stdlib.h>],
++AC_TRY_COMPILE([#include <stdio.h>],
+ [printf("%s\n", __FUNCTION__);],
+ [AC_DEFINE([HAVE_FUNCTION_MACRO], [1], [Define is you have __FUNCTION__])])
+
diff --git a/sys-libs/freeipmi/files/freeipmi-1.6.10-0002-configure.ac-Fix-detecting-sighandler_t-on-glibc.patch b/sys-libs/freeipmi/files/freeipmi-1.6.10-0002-configure.ac-Fix-detecting-sighandler_t-on-glibc.patch
new file mode 100644
index 000000000000..4ffd569ae71d
--- /dev/null
+++ b/sys-libs/freeipmi/files/freeipmi-1.6.10-0002-configure.ac-Fix-detecting-sighandler_t-on-glibc.patch
@@ -0,0 +1,27 @@
+https://marc.info/?l=freeipmi-devel&m=166752785904895&w=2
+
+From e3f759741ffc96c92c3a97e4518b09becce622b7 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 4 Nov 2022 02:01:51 +0000
+Subject: [PATCH 2/3] configure.ac: Fix detecting sighandler_t on glibc
+
+Fixes the following error/misdetection of sighandler_t:
+```
+config.log:2639:conftest.c:83:13: error: 'sighandler_t' undeclared (first use in this function); did you mean 'sa_handler'?
+```
+
+sighandler_t requires -D_GNU_SOURCE on glibc systems.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -490,7 +490,8 @@ AC_CHECK_FUNCS([cbrt])
+ AC_CHECK_FUNCS([getmsg putmsg])
+
+ dnl sighandler_t apparently not defined in Apple/OS X
+-AC_CHECK_TYPES([sighandler_t], [], [], [[#include <signal.h>]])
++AC_CHECK_TYPES([sighandler_t], [], [], [[#define _GNU_SOURCE
++#include <signal.h>]])
+
+ # At least on freebsd, putc_unlocked is a macro, so the standard
+ # AC_CHECK_FUNCS doesn't work well.
diff --git a/sys-libs/freeipmi/files/freeipmi-1.6.10-0003-configure.ac-Use-AC_USE_SYSTEM_EXTENSIONS-instead-of.patch b/sys-libs/freeipmi/files/freeipmi-1.6.10-0003-configure.ac-Use-AC_USE_SYSTEM_EXTENSIONS-instead-of.patch
new file mode 100644
index 000000000000..2219ddd8719d
--- /dev/null
+++ b/sys-libs/freeipmi/files/freeipmi-1.6.10-0003-configure.ac-Use-AC_USE_SYSTEM_EXTENSIONS-instead-of.patch
@@ -0,0 +1,331 @@
+https://marc.info/?l=freeipmi-devel&m=166752785904895&w=2
+
+From e89f234b9032ce5b2a9477c91a25ce982e14cc63 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 4 Nov 2022 02:05:53 +0000
+Subject: [PATCH 3/3] configure.ac: Use AC_USE_SYSTEM_EXTENSIONS instead of
+ appending -D_GNU_SOURCE
+
+This achieves the same effect as it'll use -D_GNU_SOURCE when possible
+but it ensures we never forget it in an individual Makefile.am.
+
+AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60, so we bump
+the requirement from 2.57->2.60. Given the comment mentions "modern
+autoconf and automake", we could really justify bumping this to 2.69
+which itself is not exactly brand new, if we want.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/bmc-device/Makefile.am
++++ b/bmc-device/Makefile.am
+@@ -7,7 +7,6 @@ bmc_device_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ bmc_device_LDADD = \
+--- a/bmc-info/Makefile.am
++++ b/bmc-info/Makefile.am
+@@ -7,7 +7,6 @@ bmc_info_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ bmc_info_LDADD = \
+--- a/bmc-watchdog/Makefile.am
++++ b/bmc-watchdog/Makefile.am
+@@ -7,7 +7,6 @@ bmc_watchdog_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT \
+ -DBMC_WATCHDOG_LOCALSTATEDIR='"$(localstatedir)"'
+
+--- a/common/debugutil/Makefile.am
++++ b/common/debugutil/Makefile.am
+@@ -5,7 +5,6 @@ libdebugutil_la_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ libdebugutil_la_SOURCES = \
+--- a/common/miscutil/Makefile.am
++++ b/common/miscutil/Makefile.am
+@@ -2,7 +2,6 @@ noinst_LTLIBRARIES = \
+ libmiscutil.la
+
+ libmiscutil_la_CPPFLAGS = \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ libmiscutil_la_SOURCES = \
+--- a/common/parsecommon/Makefile.am
++++ b/common/parsecommon/Makefile.am
+@@ -5,7 +5,6 @@ libparsecommon_la_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ libparsecommon_la_SOURCES = \
+--- a/common/pingtool/Makefile.am
++++ b/common/pingtool/Makefile.am
+@@ -6,7 +6,6 @@ libpingtool_la_CPPFLAGS = \
+ -I$(top_srcdir)/common/toolcommon \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ libpingtool_la_SOURCES = \
+--- a/common/portability/Makefile.am
++++ b/common/portability/Makefile.am
+@@ -16,7 +16,6 @@ noinst_LTLIBRARIES = \
+ libportability.la
+
+ libportability_la_CPPFLAGS = \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ libportability_la_SOURCES = \
+--- a/common/toolcommon/Makefile.am
++++ b/common/toolcommon/Makefile.am
+@@ -11,7 +11,6 @@ libtoolcommon_la_CPPFLAGS = \
+ -I$(top_builddir)/libipmidetect \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ libtoolcommon_la_SOURCES = \
+--- a/configure.ac
++++ b/configure.ac
+@@ -12,7 +12,7 @@ AC_SUBST(FREEIPMI_PACKAGE_VERSION_MINOR)
+ AC_SUBST(FREEIPMI_PACKAGE_VERSION_PATCH)
+
+ dnl We require a modern autoconf and automake
+-AC_PREREQ([2.57])
++AC_PREREQ([2.60])
+
+ AC_CONFIG_AUX_DIR([config])
+
+@@ -304,6 +304,8 @@ AM_CONDITIONAL(WITH_GNU_LD, test "$with_gnu_ld" = "yes")
+ AC_PROG_MAKE_SET
+ AC_PROG_LN_S
+
++AC_USE_SYSTEM_EXTENSIONS
++
+ dnl Enable error tracing. Lower level calls will spit error messages
+ dnl on to the console
+ AC_ARG_ENABLE([trace],
+--- a/ipmi-chassis/Makefile.am
++++ b/ipmi-chassis/Makefile.am
+@@ -7,7 +7,6 @@ ipmi_chassis_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ ipmi_chassis_LDADD = \
+--- a/ipmi-config/Makefile.am
++++ b/ipmi-config/Makefile.am
+@@ -13,7 +13,6 @@ ipmi_config_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ ipmi_config_LDADD = \
+--- a/ipmi-dcmi/Makefile.am
++++ b/ipmi-dcmi/Makefile.am
+@@ -7,7 +7,6 @@ ipmi_dcmi_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ ipmi_dcmi_LDADD = \
+--- a/ipmi-fru/Makefile.am
++++ b/ipmi-fru/Makefile.am
+@@ -7,7 +7,6 @@ ipmi_fru_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ ipmi_fru_LDADD = \
+--- a/ipmi-locate/Makefile.am
++++ b/ipmi-locate/Makefile.am
+@@ -7,7 +7,6 @@ ipmi_locate_CPPFLAGS = \
+ -I$(top_srcdir)/common/miscutil \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ ipmi_locate_LDADD = \
+--- a/ipmi-oem/Makefile.am
++++ b/ipmi-oem/Makefile.am
+@@ -7,7 +7,6 @@ ipmi_oem_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ ipmi_oem_LDADD = \
+--- a/ipmi-pet/Makefile.am
++++ b/ipmi-pet/Makefile.am
+@@ -7,7 +7,6 @@ ipmi_pet_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ ipmi_pet_LDADD = \
+--- a/ipmi-raw/Makefile.am
++++ b/ipmi-raw/Makefile.am
+@@ -7,7 +7,6 @@ ipmi_raw_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ ipmi_raw_LDADD = \
+--- a/ipmi-sel/Makefile.am
++++ b/ipmi-sel/Makefile.am
+@@ -8,7 +8,6 @@ ipmi_sel_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ ipmi_sel_LDADD = \
+--- a/ipmi-sensors/Makefile.am
++++ b/ipmi-sensors/Makefile.am
+@@ -9,7 +9,6 @@ ipmi_sensors_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ ipmi_sensors_LDADD = \
+--- a/ipmiconsole/Makefile.am
++++ b/ipmiconsole/Makefile.am
+@@ -8,7 +8,6 @@ ipmiconsole_CPPFLAGS = \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+ -I$(top_builddir)/libipmiconsole/ \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+
+--- a/ipmidetect/Makefile.am
++++ b/ipmidetect/Makefile.am
+@@ -10,7 +10,6 @@ ipmidetect_CPPFLAGS = \
+ -I$(top_srcdir)/common/miscutil \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libipmidetect/ \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ ipmidetect_LDADD = \
+--- a/ipmidetectd/Makefile.am
++++ b/ipmidetectd/Makefile.am
+@@ -12,7 +12,6 @@ ipmidetectd_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT \
+ -DIPMIDETECTD_LOCALSTATEDIR='"$(localstatedir)"'
+
+--- a/ipmiping/Makefile.am
++++ b/ipmiping/Makefile.am
+@@ -5,8 +5,7 @@ ipmiping_CPPFLAGS = \
+ -I$(top_srcdir)/common/debugutil \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+- -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE
++ -I$(top_srcdir)/libfreeipmi/include
+
+ ipmiping_LDADD = \
+ $(top_builddir)/common/pingtool/libpingtool.la \
+--- a/ipmipower/Makefile.am
++++ b/ipmipower/Makefile.am
+@@ -11,7 +11,6 @@ ipmipower_CPPFLAGS = \
+ -I$(top_srcdir)/libfreeipmi/include \
+ -DWITH_LSD_FATAL_ERROR_FUNC=1 \
+ -DWITH_LSD_NOMEM_ERROR_FUNC=1 \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ ipmipower_LDADD = \
+--- a/ipmiseld/Makefile.am
++++ b/ipmiseld/Makefile.am
+@@ -13,7 +13,6 @@ ipmiseld_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT \
+ -DIPMISELD_LOCALSTATEDIR='"$(localstatedir)"'
+
+--- a/libfreeipmi/Makefile.am
++++ b/libfreeipmi/Makefile.am
+@@ -25,7 +25,6 @@ libfreeipmi_la_CPPFLAGS = \
+ -I$(top_srcdir)/libfreeipmi \
+ -DIPMI_IPCKEY=\"$(localstatedir)/lib/$(PACKAGE_NAME)/ipckey\" \
+ -DIPMI_DEBUG_IPCKEY=\"$(top_builddir)/libfreeipmi/driver/ipmi-semaphores.h\" \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ libfreeipmi_la_LDFLAGS = \
+--- a/libipmiconsole/Makefile.am
++++ b/libipmiconsole/Makefile.am
+@@ -21,7 +21,6 @@ libipmiconsole_la_CPPFLAGS = \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+ -DWITH_PTHREADS=1 \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ libipmiconsole_la_LDFLAGS = \
+--- a/libipmimonitoring/Makefile.am
++++ b/libipmimonitoring/Makefile.am
+@@ -30,7 +30,6 @@ libipmimonitoring_la_CPPFLAGS = \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+ -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE \
+ -D_REENTRANT
+
+ libipmimonitoring_la_LDFLAGS = \
+--- a/rmcpping/Makefile.am
++++ b/rmcpping/Makefile.am
+@@ -5,8 +5,7 @@ rmcpping_CPPFLAGS = \
+ -I$(top_srcdir)/common/debugutil \
+ -I$(top_srcdir)/common/portability \
+ -I$(top_builddir)/libfreeipmi/include \
+- -I$(top_srcdir)/libfreeipmi/include \
+- -D_GNU_SOURCE
++ -I$(top_srcdir)/libfreeipmi/include
+
+ rmcpping_LDADD = \
+ $(top_builddir)/common/pingtool/libpingtool.la \
diff --git a/sys-libs/freeipmi/files/freeipmi-1.6.10-header-fixes.patch b/sys-libs/freeipmi/files/freeipmi-1.6.10-header-fixes.patch
new file mode 100644
index 000000000000..ccd1262333db
--- /dev/null
+++ b/sys-libs/freeipmi/files/freeipmi-1.6.10-header-fixes.patch
@@ -0,0 +1,118 @@
+https://git.savannah.gnu.org/cgit/freeipmi.git/commit/?id=587b0cce3d0f146c9f97efbf33d599d23217d610
+https://git.savannah.gnu.org/cgit/freeipmi.git/commit/?id=9cc6f981b55d6aa784788674a5a77c5b970bcabe
+https://git.savannah.gnu.org/cgit/freeipmi.git/commit/?id=14c6e2d373173d06fa3f2148629b4d8bdedec0a2
+https://git.savannah.gnu.org/cgit/freeipmi.git/commit/?id=66cf8d0bb7e47d3360389ce427a6303cc0b63d00
+
+From 587b0cce3d0f146c9f97efbf33d599d23217d610 Mon Sep 17 00:00:00 2001
+From: Albert Chu <chu11@llnl.gov>
+Date: Tue, 7 Jan 2020 13:48:12 -0800
+Subject: [PATCH 1/7] ipmi-sensors: Fix header guards
+
+--- a/ipmi-sensors/ipmi-sensors-oem-intel-quanta-qssc-s4r.h
++++ b/ipmi-sensors/ipmi-sensors-oem-intel-quanta-qssc-s4r.h
+@@ -17,7 +17,7 @@
+ */
+
+ #ifndef IPMI_SENSORS_OEM_INTEL_QUANTA_QSSC_S4R_H
+-#define IPMI_SENSORS_OEM_INTEL_H
++#define IPMI_SENSORS_OEM_INTEL_QUANTA_QSSC_S4R_H
+
+ #include "ipmi-sensors.h"
+
+--- a/ipmi-sensors/ipmi-sensors-oem-intel-s2600jf.h
++++ b/ipmi-sensors/ipmi-sensors-oem-intel-s2600jf.h
+@@ -17,7 +17,7 @@
+ */
+
+ #ifndef IPMI_SENSORS_OEM_INTEL_S2600JF_H
+-#define IPMI_SENSORS_OEM_INTEL_H
++#define IPMI_SENSORS_OEM_INTEL_S2600JF_H
+
+ #include "ipmi-sensors.h"
+
+--- a/ipmi-sensors/ipmi-sensors-oem-intel-s2600wp.h
++++ b/ipmi-sensors/ipmi-sensors-oem-intel-s2600wp.h
+@@ -17,7 +17,7 @@
+ */
+
+ #ifndef IPMI_SENSORS_OEM_INTEL_S2600WP_H
+-#define IPMI_SENSORS_OEM_INTEL_H
++#define IPMI_SENSORS_OEM_INTEL_S2600WP_H
+
+ #include "ipmi-sensors.h"
+
+--- a/ipmi-sensors/ipmi-sensors-oem-intel-s5500wb.h
++++ b/ipmi-sensors/ipmi-sensors-oem-intel-s5500wb.h
+@@ -17,7 +17,7 @@
+ */
+
+ #ifndef IPMI_SENSORS_OEM_INTEL_S5500WB_H
+-#define IPMI_SENSORS_OEM_INTEL_H
++#define IPMI_SENSORS_OEM_INTEL_S5500WB_H
+
+ #include "ipmi-sensors.h"
+
+From 9cc6f981b55d6aa784788674a5a77c5b970bcabe Mon Sep 17 00:00:00 2001
+From: Albert Chu <chu11@llnl.gov>
+Date: Tue, 7 Jan 2020 14:06:27 -0800
+Subject: [PATCH 4/7] libipmiconsole: Move header guard macros to top of file
+
+--- a/libipmiconsole/ipmiconsole_defs.h
++++ b/libipmiconsole/ipmiconsole_defs.h
+@@ -24,6 +24,9 @@
+ * with Ipmiconsole. If not, see <http://www.gnu.org/licenses/>.
+ \*****************************************************************************/
+
++#ifndef IPMICONSOLE_DEFS_H
++#define IPMICONSOLE_DEFS_H
++
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+@@ -54,9 +57,6 @@
+
+ #include "scbuf.h"
+
+-#ifndef IPMICONSOLE_DEFS_H
+-#define IPMICONSOLE_DEFS_H
+-
+ #ifndef MAXHOSTNAMELEN
+ #define MAXHOSTNAMELEN 64
+ #endif /* MAXHOSTNAMELEN */
+From 14c6e2d373173d06fa3f2148629b4d8bdedec0a2 Mon Sep 17 00:00:00 2001
+From: Albert Chu <chu11@llnl.gov>
+Date: Tue, 7 Jan 2020 15:30:39 -0800
+Subject: [PATCH 6/7] libfreeipmi/sel: Add missing functions to header
+
+--- a/libfreeipmi/sel/ipmi-sel-string-supermicro-common.h
++++ b/libfreeipmi/sel/ipmi-sel-string-supermicro-common.h
+@@ -39,4 +39,14 @@ int sel_string_output_supermicro_overheat_event_data1_class_oem (ipmi_sel_ctx_t
+ unsigned int *wlen,
+ struct ipmi_sel_system_event_record_data *system_event_record_data);
+
++int sel_string_output_supermicro_dimm_event_data2_event_data3 (ipmi_sel_ctx_t ctx,
++ struct ipmi_sel_entry *sel_entry,
++ uint8_t sel_record_type,
++ char *buf,
++ unsigned int buflen,
++ unsigned int flags,
++ unsigned int *wlen,
++ struct ipmi_sel_system_event_record_data *system_event_record_data,
++ int *oem_rv);
++
+ #endif /* IPMI_SEL_STRING_SUPERMICRO_COMMON_H */
+From 66cf8d0bb7e47d3360389ce427a6303cc0b63d00 Mon Sep 17 00:00:00 2001
+From: Albert Chu <chu11@llnl.gov>
+Date: Tue, 7 Jan 2020 15:32:22 -0800
+Subject: [PATCH 7/7] ipmi-sensors: Add missing header to file
+
+--- a/ipmi-sensors/ipmi-sensors-oem-intel.c
++++ b/ipmi-sensors/ipmi-sensors-oem-intel.c
+@@ -34,6 +34,7 @@
+ #include "ipmi-sensors-oem-intel.h"
+ #include "ipmi-sensors-oem-intel-s5500wb.h"
+ #include "ipmi-sensors-oem-intel-s2600jf.h"
++#include "ipmi-sensors-oem-intel-s2600wp.h"
+ #include "ipmi-sensors-oem-intel-quanta-qssc-s4r.h"
+ #include "ipmi-sensors-oem-intel-node-manager.h"
+
diff --git a/sys-libs/freeipmi/freeipmi-1.6.8.ebuild b/sys-libs/freeipmi/freeipmi-1.6.10-r1.ebuild
index c822176742c9..6f12a9a5d306 100644
--- a/sys-libs/freeipmi/freeipmi-1.6.8.ebuild
+++ b/sys-libs/freeipmi/freeipmi-1.6.10-r1.ebuild
@@ -1,22 +1,23 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
AT_M4DIR="config"
+inherit autotools toolchain-funcs
DESCRIPTION="Provides Remote-Console and System Management Software as per IPMI v1.5/2.0"
HOMEPAGE="https://www.gnu.org/software/freeipmi/"
MY_P="${P/_/.}"
-S="${WORKDIR}/${MY_P}"
[[ ${MY_P} == *.beta* ]] && ALPHA="-alpha"
SRC_URI="mirror://gnu${ALPHA}/${PN}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64 hppa ~ppc64 x86"
-IUSE="debug nagios"
+IUSE="debug nagios without-root"
RDEPEND="dev-libs/libgcrypt:0="
DEPEND="${RDEPEND}
@@ -28,20 +29,33 @@ RDEPEND="${RDEPEND}
)
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.6.10-0001-configure.ac-Fix-Wimplicit-function-declaration-for-.patch
+ "${FILESDIR}"/${PN}-1.6.10-0002-configure.ac-Fix-detecting-sighandler_t-on-glibc.patch
+ "${FILESDIR}"/${PN}-1.6.10-0003-configure.ac-Use-AC_USE_SYSTEM_EXTENSIONS-instead-of.patch
+ "${FILESDIR}"/${P}-header-fixes.patch
+)
+
+src_prepare() {
+ default
+
+ # Needed for configure.ac patches, drop if/when merged
+ eautoreconf
+}
+
src_configure() {
local myeconfargs=(
$(use_enable debug)
+ $(usex 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[@]}"
}
-# There are no tests
-src_test() { :; }
-
src_install() {
default
diff --git a/sys-libs/freeipmi/freeipmi-1.6.9.ebuild b/sys-libs/freeipmi/freeipmi-1.6.11.ebuild
index 0898db455b04..d56e388c2f3b 100644
--- a/sys-libs/freeipmi/freeipmi-1.6.9.ebuild
+++ b/sys-libs/freeipmi/freeipmi-1.6.11.ebuild
@@ -1,47 +1,52 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-AT_M4DIR="config"
+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/"
-
-MY_P="${P/_/.}"
+SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"
-[[ ${MY_P} == *.beta* ]] && ALPHA="-alpha"
-SRC_URI="mirror://gnu${ALPHA}/${PN}/${MY_P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~amd64 ~hppa ~ppc64 ~x86"
-IUSE="debug nagios"
+KEYWORDS="amd64 ~arm64 hppa ~ppc64 x86"
+IUSE="debug doc nagios without-root"
-RDEPEND="dev-libs/libgcrypt:0="
-DEPEND="${RDEPEND}
- virtual/os-headers"
-RDEPEND="${RDEPEND}
+RDEPEND="dev-libs/libgcrypt:="
+DEPEND="
+ ${RDEPEND}
+ virtual/os-headers
+"
+RDEPEND="
+ ${RDEPEND}
nagios? (
|| ( net-analyzer/icinga net-analyzer/nagios )
dev-lang/perl
)
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.6.10-header-fixes.patch
+)
+
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[@]}"
}
-# There are no tests
-src_test() { :; }
-
src_install() {
default
diff --git a/sys-libs/freeipmi/metadata.xml b/sys-libs/freeipmi/metadata.xml
index a4cf4d39338a..afd59dfd46f3 100644
--- a/sys-libs/freeipmi/metadata.xml
+++ b/sys-libs/freeipmi/metadata.xml
@@ -5,10 +5,15 @@
<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/fts-standalone-1.2.7.ebuild b/sys-libs/fts-standalone/fts-standalone-1.2.7.ebuild
index 93438b4f17e0..4dd2e655db4a 100644
--- a/sys-libs/fts-standalone/fts-standalone-1.2.7.ebuild
+++ b/sys-libs/fts-standalone/fts-standalone-1.2.7.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,7 +12,7 @@ S="${WORKDIR}/musl-fts-${PV}"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
+KEYWORDS="amd64 arm arm64 ~m68k ~mips ppc ppc64 ~riscv x86"
IUSE="static-libs"
DEPEND="
diff --git a/sys-libs/gdbm/Manifest b/sys-libs/gdbm/Manifest
index 32567a6b6fb8..63bb68e78015 100644
--- a/sys-libs/gdbm/Manifest
+++ b/sys-libs/gdbm/Manifest
@@ -1 +1,2 @@
-DIST gdbm-1.22.tar.gz 1090100 BLAKE2B f27c65e8cc7c71fc4f4a119b92e1d1b2068c1ec87456d5a555879dc23654ad4e7cf8172049aa9f4f9c432cc7140ff61fc36ddf6d5e45c321add67a105754a59c SHA512 67461fc4f41e825d0134175ff99c913ccb4aa7ea3d0f64f32bdedbc7677b3ecabd2c525ac6b2ee47a9561e002e4224e492b72088d57bb4862a1f8c089521ec51
+DIST gdbm-1.23.tar.gz 1115854 BLAKE2B a47746577cf2f3c9b62faea496c4d6a50a8f1b0a5af448cb2215e90057c99b5b630ba3f5357c85dfb7fd98ba4e90969e30a779120c29106ed1e8736721f9bec1 SHA512 918080cb0225b221c11eb7339634a95e00c526072395f7a3d46ccf42ef020dea7c4c5bec34aff2c4f16033e1fff6583252b7e978f68b8d7f8736b0e025838e10
+DIST gdbm-1.23.tar.gz.sig 181 BLAKE2B 34785e6fe8e02100084d61e989749ee388794b8af82fc59a417140807bf169c45c15935f8cf91d0ba116dfdee295e05b2b014f1539f1f128a57acfe59010d34d SHA512 6653751c04584f10aa3325bd1cb5b9f7970a786dd2a99602ea620c11a86a9ba5c342aa52627bd06c03da822e9e1600dc034d9a8f42856a287fd67f6b9f161c71
diff --git a/sys-libs/gdbm/gdbm-1.22.ebuild b/sys-libs/gdbm/gdbm-1.23.ebuild
index 7026c44c322e..178a5707800d 100644
--- a/sys-libs/gdbm/gdbm-1.22.ebuild
+++ b/sys-libs/gdbm/gdbm-1.23.ebuild
@@ -1,23 +1,36 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit multilib-minimal
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gdbm.asc
+inherit libtool multilib-minimal verify-sig
DESCRIPTION="Standard GNU database libraries"
HOMEPAGE="https://www.gnu.org/software/gdbm/"
SRC_URI="mirror://gnu/gdbm/${P}.tar.gz"
+SRC_URI+=" verify-sig? ( mirror://gnu/gdbm/${P}.tar.gz.sig )"
LICENSE="GPL-3"
SLOT="0/6" # libgdbm.so version
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+berkdb nls +readline static-libs"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="+berkdb nls +readline static-libs test"
+RESTRICT="!test? ( test )"
-DEPEND="
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
-"
+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() {
# gdbm doesn't appear to use either of these libraries
@@ -30,6 +43,7 @@ multilib_src_configure() {
$(use_enable static-libs static)
$(use_with readline)
)
+
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
@@ -39,5 +53,6 @@ multilib_src_install_all() {
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
index 12136288f7bd..931542e3ee05 100644
--- a/sys-libs/gdbm/metadata.xml
+++ b/sys-libs/gdbm/metadata.xml
@@ -1,11 +1,14 @@
<?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>
+ <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
index 0983d08c16a3..4571f2d2a6fc 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -4,20 +4,30 @@ DIST gcc-multilib-bootstrap-20180511.tar.xz 2392908 BLAKE2B f3cf614399368acd8908
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.30-patches-10.tar.xz 72808 BLAKE2B a7a95c99482524b2896d15539766f1e6b1fe34a22f32119248c6dd44f42632076e86fdcbbdc2d604ec73ceccdd8a7f5936a62a6f4c3d039fae8f6901dfc6be77 SHA512 af5e213ff08bf38f6f529816c36b4e38df27207c2df254609ebe45b2f039ab553bbe563aa6f64b6667d328fd2c120dc21b6e2676540bdd94e58079237089eac3
-DIST glibc-2.30-sparc-reg-fix-clobber.patch 6106 BLAKE2B cad6a4cbef5d529519ef486f4ef8e189cb4d43dd67fa8f8d50d67072cbb682f60474d482a5c5152d1317de92b98851d8a88eee6b331eb5bc22de065c03c58fde SHA512 a018ef1f196257f3888af20a5cbc97892c8382a4f489da042568e087c077f30cf4dda6ac711b573e1274317866ce97cf817d92a28cf55f18f5e8d32787e6cb3f
-DIST glibc-2.30.tar.xz 16576920 BLAKE2B bd5aae4c9854f40785b91f83c3b632de6d48d811027ddfe61651cb1bc617db8017d7914c23a770cdd3feed06fcc316da841eea916cdba54179e7eace4ea45484 SHA512 37483990cd653685873e96c45dd1651b32b441b6d7919a68ebe3bae31a0c3f7ce183fc9b110f0b268b353f80312f18370559a1e7aecea0e5aa755c8f2aef1d6b
DIST glibc-2.31-patches-9.tar.xz 74712 BLAKE2B 62991b67de4def4cca944e8420d2f0139f88b6754c6bc81072bb321c574c1db22641857345325848e1dfb551c10758f582e4425e687a7921cdbd4e7e7923a047 SHA512 699d898e3a8ed02b04573c675f572076e8f747767bfc577a033a49cd7d9078a7a60ac325acd4bd419a93b56edf90ce067baa7578ab315e27885f1f0e13916354
DIST glibc-2.31.tar.xz 16676764 BLAKE2B 91df1792345f157265eae405185a81fd4b8ce36d4c2388f44b0d5b1ae38174ea374cbc909cd260770b9f38ea58051da13766d4fa22abf41c2d4a2493257b179b SHA512 735e4c0ef10418b6ea945ad3906585e5bbd8b282d76f2131309dce4cec6b15066a5e4a3731773ce428a819b542579c9957867bb0abf05ed2030983fca4412306
DIST glibc-2.32-patches-8.tar.xz 65532 BLAKE2B 00c572cff396e52313d0324f7bc28192a65f06b22fc5a04aa631b76b3016842365006399715531ee693f3519720edcebef7884247f2f8c19e3518c1ddafab7cc SHA512 5240bc3a6df46d12c03ea4ce7b1a0df85301256ae3bd003fd04c61dadaaec34998873bf20544d891f6eedf896302bb916010aebc1d8d646a3cce09a93b533d0b
DIST glibc-2.32.tar.xz 16744512 BLAKE2B a56b4afbb35315c5cd6dca0f62e44455dceae3e6e88a8453621f9a5394a60ddf10ca9309b2db0911830c7fd77e3faa5d94694eb94d5b2c05fc5285cef52255da SHA512 8460c155b7003e04f18dabece4ed9ad77445fa2288a7dc08e80a8fc4c418828af29e0649951bd71a54ea2ad2d4da7570aafd9bdfe4a37e9951b772b442afe50b
-DIST glibc-2.33-patches-6.tar.xz 64632 BLAKE2B f04ca4320d65c8796c67471cb56d3bf002cc34fb6a81075b85948e41c94df46cb2a3a944cced42d6d2c17ffc11e32a9840810864e655cc0fe18e6e0fe9f3c985 SHA512 b95746cd3415ec9ca275e542a2b5fddd5ce5680aa3bda08e94e96cf431191f7488ef6b7999ff0dfaf7405a4212531a75283e9bd7f5ae65bf572912038877a6df
+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-11.tar.xz 90452 BLAKE2B 86d0186cfa2684bf772697b8385c05338b91b220ac56f28d4aa20e448f94b8cbf4475c8bfe134945b8ad66c0361f4764da9a6fe0c7b1ad3de88166ffc42b7ed1 SHA512 b0bc7306d64af824a6d85e61b0a3614c3976e57efac130b36b356f6f1088c184638c12723aab108c17e6cb6264d62255707f47645e6d86a0b54345437e1ce343
-DIST glibc-2.34-patches-8.tar.xz 61284 BLAKE2B a042d3bfd85cb9732f033eb1489fc4a9d5b42ec599bb320a97a9633047819d1d02b2f00dce601ddb02036f8bf0d67f9b0d6463785965db72d9ac2ce13765fa07 SHA512 1d92abb82ae404b90841217bba3b1ccb7e03799e5f21656b0a2eaaf06bd4a5a2f0fd7ebf927acc72fce0e2af6bb1a2e8658bac431423d07e75dce1f2868bd029
+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-10.tar.xz 60792 BLAKE2B e228568f9e9cfa719ee9f2f91d220efa53e4eba617377fdf37bf7381b9f7c43036dfe62dd284b4228e9a99d41223ed0416ed058407a630b84064962518cba90b SHA512 573661299d75b63b7e2f771e9032193492e762e64cbb495b42bb7ad1021532f54f19d829a721e8070c79b2ad5edef077584cc4c76896d951cc93275592cf255c
+DIST glibc-2.38-patches-11.tar.xz 67188 BLAKE2B 5025fd72359842a357e7c2cd76de3e717c9bd117259dd8be93aa6fcd906f8b65e266388bf685e611bfa439d57c03e0a4f7d024d7a766ff275277936f76f1ecbf SHA512 d0fa1c11c153c7ada8668d865a15c7c47013956b5fa1e0d0e2b7e24cea5d3e16909dc8f9ba9b2b392d85271ed71603deb440ead19de50fd61b53a6c1f73d467b
+DIST glibc-2.38-patches-12.tar.xz 83568 BLAKE2B 051f32976d82cfe510084a94a4a40f328531eab8601454685c906405a96bb92527780378ccf6bfa42ab9cbadc405545d3bd28d0c4a15927d1a1c18a7a23c513f SHA512 a66d567680f5b34e35d1e4c5c2a4a9b0af67450cc0ea4a03074ec66953d79e4d0e9e921ca44717b3ca45f5910a8cdb033818bc111efd93b41666610cc8478b67
+DIST glibc-2.38.tar.xz 18913712 BLAKE2B f9b039f0ef98a7dd8e1cba228ed10286b9e4fbe4dd89af4d26fa5c4e4cf266f19c2746b44d797ce54739d86499e74cf334aaf311bcf6e30120fd7748453e653f SHA512 a6dd5e42dcd63d58e2820c783522c8c895890b6e8c8e6c83b025553de0cc77cdf227e7044e431ead98c89c68a9ce4dd63509b47e647775fb2075f011849c1900
+DIST glibc-2.39-patches-3.tar.xz 69980 BLAKE2B 08239eb30c0059ea7ff750287f9349ebc4dff3416aa4711db2cdfedf5a01ba000e135b390528cc77e50c20cb2656aaa571c299542b495fe72828301f61702548 SHA512 47c87e568ce6bdddf42605d8c422869c238be13e77905051b214fed51265de0cd35c2031d0fc906019058f5a159b6b99ed52cb177450db2f710ce398770b3e85
+DIST glibc-2.39.tar.xz 18520988 BLAKE2B 9d98459a2d58401e07c081e0d841935b23998da75a7eb5a7ebd23a1f9ebab99dee623fe166397c1b6c926960c570f62dbca5cb3b5ce84a918adff6b7a15e16bb SHA512 818f58172a52815b4338ea9f2a69ecaa3335492b9f8f64cbf8afb24c0d737982341968ecd79631cae3d3074ab0ae4bc6056fc4ba3ffe790849dc374835cd57e2
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.34/glibc-2.34-hppa-asm-getcontext-fixes.patch b/sys-libs/glibc/files/2.34/glibc-2.34-hppa-asm-getcontext-fixes.patch
new file mode 100644
index 000000000000..299a6dae7dbe
--- /dev/null
+++ b/sys-libs/glibc/files/2.34/glibc-2.34-hppa-asm-getcontext-fixes.patch
@@ -0,0 +1,214 @@
+https://sourceware.org/git/?p=glibc.git;a=patch;h=738ee53f0ce5e39b9b7a6777f5d3057afbaac498
+https://sourceware.org/git/?p=glibc.git;a=patch;h=d53b9cc391c72a1011ea8fe7a9f70dc5060a0db2
+
+From 738ee53f0ce5e39b9b7a6777f5d3057afbaac498 Mon Sep 17 00:00:00 2001
+From: John David Anglin <danglin@gcc.gnu.org>
+Date: Tue, 15 Mar 2022 23:12:37 +0000
+Subject: [PATCH] hppa: Implement swapcontext in assembler (bug 28960)
+
+When swapcontext.c is compiled without -g, the following error occurs:
+Error: CFI instruction used without previous .cfi_startproc
+
+Fix by converting swapcontext routine to assembler.
+---
+ sysdeps/unix/sysv/linux/hppa/swapcontext.S | 72 +++++++++++++++++++
+ sysdeps/unix/sysv/linux/hppa/swapcontext.c | 83 ----------------------
+ 2 files changed, 72 insertions(+), 83 deletions(-)
+ create mode 100644 sysdeps/unix/sysv/linux/hppa/swapcontext.S
+ delete mode 100644 sysdeps/unix/sysv/linux/hppa/swapcontext.c
+
+diff --git a/sysdeps/unix/sysv/linux/hppa/swapcontext.S b/sysdeps/unix/sysv/linux/hppa/swapcontext.S
+new file mode 100644
+index 0000000000..94b164dc63
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/hppa/swapcontext.S
+@@ -0,0 +1,72 @@
++/* Swap to new context.
++ Copyright (C) 2008-2022 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C 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.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library. If not, see
++ <https://www.gnu.org/licenses/>. */
++
++#include <sysdep.h>
++#include "ucontext_i.h"
++
++ .text
++ENTRY(__swapcontext)
++
++ /* Copy rp to ret0 (r28). */
++ copy %rp,%ret0
++
++ /* Create a frame. */
++ ldo 64(%sp),%sp
++ .cfi_def_cfa_offset -64
++
++ /* Save the current machine context to oucp. */
++ bl __getcontext,%rp
++
++ /* Copy oucp to register ret1 (r29). __getcontext saves and
++ restores it on a normal return. It is restored from oR29
++ on reactivation. */
++ copy %r26,%ret1
++
++ /* Pop frame. */
++ ldo -64(%sp),%sp
++ .cfi_def_cfa_offset 0
++
++ /* Load return pointer from oR28. */
++ ldw oR28(%ret1),%rp
++
++ /* Return if error. */
++ or,= %r0,%ret0,%r0
++ bv,n %r0(%rp)
++
++ /* Load sc_sar flag. */
++ ldb oSAR(%ret1),%r20
++
++ /* Return if oucp context has been reactivated. */
++ or,= %r0,%r20,%r0
++ bv,n %r0(%rp)
++
++ /* Mark sc_sar flag. */
++ ldi 1,%r20
++ stb %r20,oSAR(%ret1)
++
++ /* Activate the machine context in ucp. */
++ bl __setcontext,%rp
++ ldw oR25(%ret1),%r26
++
++ /* Load return pointer. */
++ ldw oR28(%ret1),%rp
++ bv,n %r0(%rp)
++
++PSEUDO_END(__swapcontext)
++
++weak_alias (__swapcontext, swapcontext)
+diff --git a/sysdeps/unix/sysv/linux/hppa/swapcontext.c b/sysdeps/unix/sysv/linux/hppa/swapcontext.c
+deleted file mode 100644
+index 1664f68c7b..0000000000
+--- a/sysdeps/unix/sysv/linux/hppa/swapcontext.c
++++ /dev/null
+@@ -1,83 +0,0 @@
+-/* Swap to new context.
+- Copyright (C) 2008-2021 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Helge Deller <deller@gmx.de>, 2008.
+-
+- The GNU C 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.
+-
+- The GNU C Library 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
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library. If not, see
+- <https://www.gnu.org/licenses/>. */
+-
+-#include <ucontext.h>
+-#include "ucontext_i.h"
+-
+-extern int __getcontext (ucontext_t *ucp);
+-extern int __setcontext (const ucontext_t *ucp);
+-
+-int
+-__swapcontext (ucontext_t *oucp, const ucontext_t *ucp)
+-{
+- /* Save rp for debugger. */
+- asm ("stw %rp,-20(%sp)");
+- asm (".cfi_offset 2, -20");
+-
+- /* Copy rp to ret0 (r28). */
+- asm ("copy %rp,%ret0");
+-
+- /* Create a frame. */
+- asm ("ldo 64(%sp),%sp");
+- asm (".cfi_def_cfa_offset -64");
+-
+- /* Save the current machine context to oucp. */
+- asm ("bl __getcontext,%rp");
+-
+- /* Copy oucp to register ret1 (r29). __getcontext saves and restores it
+- on a normal return. It is restored from oR29 on reactivation. */
+- asm ("copy %r26,%ret1");
+-
+- /* Pop frame. */
+- asm ("ldo -64(%sp),%sp");
+- asm (".cfi_def_cfa_offset 0");
+-
+- /* Load return pointer from oR28. */
+- asm ("ldw %0(%%ret1),%%rp" : : "i" (oR28));
+-
+- /* Return if error. */
+- asm ("or,= %r0,%ret0,%r0");
+- asm ("bv,n %r0(%rp)");
+-
+- /* Load sc_sar flag. */
+- asm ("ldb %0(%%ret1),%%r20" : : "i" (oSAR));
+-
+- /* Return if oucp context has been reactivated. */
+- asm ("or,= %r0,%r20,%r0");
+- asm ("bv,n %r0(%rp)");
+-
+- /* Mark sc_sar flag. */
+- asm ("1: ldi 1,%r20");
+- asm ("stb %%r20,%0(%%ret1)" : : "i" (oSAR));
+-
+- /* Activate the machine context in ucp. */
+- asm ("bl __setcontext,%rp");
+- asm ("ldw %0(%%ret1),%%r26" : : "i" (oR25));
+-
+- /* Load return pointer. */
+- asm ("ldw %0(%%ret1),%%rp" : : "i" (oR28));
+-
+- /* A successful call to setcontext does not return. */
+- asm ("bv,n %r0(%rp)");
+-
+- /* Make gcc happy. */
+- return 0;
+-}
+-
+-weak_alias (__swapcontext, swapcontext)
+--
+2.27.0
+
+
+From d53b9cc391c72a1011ea8fe7a9f70dc5060a0db2 Mon Sep 17 00:00:00 2001
+From: John David Anglin <danglin@gcc.gnu.org>
+Date: Tue, 15 Mar 2022 23:04:39 +0000
+Subject: [PATCH] hppa: Use END instead of PSEUDO_END in swapcontext.S
+
+(cherry picked from commit 7a5c440102d4ec7fafd9bbd98eca9bd90ecaaafd)
+---
+ sysdeps/unix/sysv/linux/hppa/swapcontext.S | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sysdeps/unix/sysv/linux/hppa/swapcontext.S b/sysdeps/unix/sysv/linux/hppa/swapcontext.S
+index 94b164dc63..fbc22586d1 100644
+--- a/sysdeps/unix/sysv/linux/hppa/swapcontext.S
++++ b/sysdeps/unix/sysv/linux/hppa/swapcontext.S
+@@ -67,6 +67,6 @@ ENTRY(__swapcontext)
+ ldw oR28(%ret1),%rp
+ bv,n %r0(%rp)
+
+-PSEUDO_END(__swapcontext)
++END(__swapcontext)
+
+ weak_alias (__swapcontext, swapcontext)
+--
+2.27.0
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
new file mode 100644
index 000000000000..51fbe5f54074
--- /dev/null
+++ b/sys-libs/glibc/files/2.35/glibc-2.35-make-4.4-MAKEFLAGS.patch
@@ -0,0 +1,102 @@
+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.34-make-clone3-syscall-optional.patch b/sys-libs/glibc/files/glibc-2.34-make-clone3-syscall-optional.patch
deleted file mode 100644
index bbc6cabb463d..000000000000
--- a/sys-libs/glibc/files/glibc-2.34-make-clone3-syscall-optional.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 22afb7abbfa0e2d4d168dcd2844aa9935a71cb37 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Wed, 1 Dec 2021 14:58:40 +0000
-Subject: [PATCH] clone-internal.c: disable use of clone3 conditinally
-
-We're disabling clone3 for now _CONDITIONALLY_ (not by default) to allow
-compatibility with applications using older Electron.
-
-Use -DGENTOO_USE_CLONE3 to enable clone3 for now. In future, we will
-revert back to always using clone3.
-
-This was impacting e.g. Discord and Skype. This patch stops glibc from using
-clone3 internally (which is the only real use of it) and falls back to the old
-behaviour.
-
-Specifically, we want https://github.com/electron/electron/pull/31091
-to work its way downstream to various Electron applications.
-
-https://bugs.gentoo.org/819045
-https://bugs.gentoo.org/827386
-
-https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/glibc/plain/debian/patches/ubuntu/disable-clone3.patch
-
-This is the same as the patch that was considered but ultimately rejected
-for 2.34 because Docker got sorted out in time:
-https://patchwork.ozlabs.org/project/glibc/patch/87eebkf8ph.fsf@oldenburg.str.redhat.com/.
-
-Signed-off-by: Sam James <sam@gentoo.org>
----
- sysdeps/unix/sysv/linux/clone-internal.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sysdeps/unix/sysv/linux/clone-internal.c b/sysdeps/unix/sysv/linux/clone-internal.c
-index 979f7880be..c5566daf73 100644
---- a/sysdeps/unix/sysv/linux/clone-internal.c
-+++ b/sysdeps/unix/sysv/linux/clone-internal.c
-@@ -48,7 +48,7 @@ __clone_internal (struct clone_args *cl_args,
- int (*func) (void *arg), void *arg)
- {
- int ret;
--#ifdef HAVE_CLONE3_WRAPPER
-+#if defined(HAVE_CLONE3_WRAPPER) && defined(GENTOO_USE_CLONE3)
- /* Try clone3 first. */
- int saved_errno = errno;
- ret = __clone3 (cl_args, sizeof (*cl_args), func, arg);
---
-2.34.1
-
diff --git a/sys-libs/glibc/glibc-2.19-r2.ebuild b/sys-libs/glibc/glibc-2.19-r3.ebuild
index 933241c81394..692c93b9e4cd 100644
--- a/sys-libs/glibc/glibc-2.19-r2.ebuild
+++ b/sys-libs/glibc/glibc-2.19-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -33,7 +33,11 @@ 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 debug doc gd headers-only multilib nscd profile selinux suid systemtap vanilla"
+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
@@ -92,7 +96,7 @@ COMMON_DEPEND="
) )
suid? ( caps? ( sys-libs/libcap ) )
selinux? ( sys-libs/libselinux )
- systemtap? ( dev-util/systemtap )
+ systemtap? ( dev-debug/systemtap )
"
DEPEND="${COMMON_DEPEND}
>=app-misc/pax-utils-0.1.10
@@ -335,6 +339,7 @@ setup_flags() {
# problems as possible.
strip-flags
strip-unsupported-flags
+ filter-lto
filter-flags -m32 -m64 '-mabi=*'
# glibc aborts if rpath is set by LDFLAGS
@@ -592,7 +597,7 @@ sanity_prechecks() {
if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then
local entry
for entry in passwd group shadow; do
- if ! egrep -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then
+ 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."
@@ -1302,7 +1307,7 @@ pkg_postinst() {
if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
local entry
for entry in passwd group shadow; do
- if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
+ 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"
diff --git a/sys-libs/glibc/glibc-2.30-r9.ebuild b/sys-libs/glibc/glibc-2.30-r9.ebuild
deleted file mode 100644
index 88282a7f5956..000000000000
--- a/sys-libs/glibc/glibc-2.30-r9.ebuild
+++ /dev/null
@@ -1,1471 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8} )
-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"
-
-if [[ ${PV} == 9999* ]]; then
- EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
- inherit git-r3
-else
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
- SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
-fi
-
-RELEASE_VER=${PV}
-
-GCC_BOOTSTRAP_VER=20180511
-
-# Gentoo patchset
-PATCH_VER=10
-PATCH_DEV=dilfridge
-
-SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
-SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
-SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/glibc-2.30-sparc-reg-fix-clobber.patch"
-
-IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs 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.
-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-util/systemtap )
-"
-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=(
- # 1) Sandbox
- tst-ldconfig-bad-aux-cache
- tst-pldd
- tst-mallocfork2
- tst-nss-db-endgrent
- tst-nss-db-endpwent
- tst-nss-files-hosts-long
- tst-nss-test3
- # 2) Namespaces and cgroup
- tst-locale-locpath
- # 9) Failures of unknown origin
- tst-latepthread
-
- # buggy test, fixed in glibc-2.31 in 70ba28f7ab29
- tst-pkey
-
- # 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
-
- 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
- ;;
- 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
- ;;
- ia64)
- # Workaround GPREL22 overflow by slightly pessimizing global
- # references to go via 64-bit relocations instead of 22-bit ones.
- # This allows building glibc on ia64 without an overflow: #723268
- append-flags -fcommon
- ;;
- 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"
-
- local cpu
- case ${CTARGET} in
- sparc64-*)
- cpu="sparc64"
- case $(get-flag mcpu) in
- v9)
- # We need to force at least v9a because the base build doesn't
- # work with just v9.
- # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
- append-flags "-Wa,-xarch=v9a"
- ;;
- esac
- ;;
- sparc-*)
- case $(get-flag mcpu) in
- v8|supersparc|hypersparc|leon|leon3)
- cpu="sparcv8"
- ;;
- *)
- cpu="sparcv9"
- ;;
- esac
- ;;
- esac
- [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
- ;;
- esac
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Allow users to explicitly avoid flag sanitization via
- # USE=custom-cflags.
- if ! use custom-cflags; then
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- # Lock glibc at -O2; we want to be conservative here.
- filter-flags '-O?'
- append-flags -O2
- fi
- strip-unsupported-flags
- filter-flags -m32 -m64 '-mabi=*'
-
- # glibc aborts if rpath is set by LDFLAGS
- filter-ldflags '-Wl,-rpath=*'
-
- # #492892
- filter-flags -frecord-gcc-switches
-
- unset CBUILD_OPT CTARGET_OPT
- if use multilib ; then
- CTARGET_OPT=$(get_abi_CTARGET)
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
- fi
-
- setup_target_flags
-
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
- CBUILD_OPT=${CTARGET_OPT}
- fi
-
- # glibc's headers disallow -O0 and fail at build time:
- # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization"
- replace-flags -O0 -O1
-
- filter-flags '-fstack-protector*'
-}
-
-want_tls() {
- # Archs that can use TLS (Thread Local Storage)
- case $(tc-arch) in
- x86)
- # requires i486 or better #106556
- [[ ${CTARGET} == i[4567]86* ]] && return 0
- return 1
- ;;
- esac
- return 0
-}
-
-want__thread() {
- want_tls || return 1
-
- # For some reason --with-tls --with__thread is causing segfaults on sparc32.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
-
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
-
- # only test gcc -- can't test linking yet
- tc-has-tls -c ${CTARGET}
- WANT__THREAD=$?
-
- return ${WANT__THREAD}
-}
-
-use_multiarch() {
- # Allow user to disable runtime arch detection in multilib.
- use multiarch || return 1
- # Make sure binutils is new enough to support indirect functions,
- # #336792. This funky sed supports gold and bfd linkers.
- local bver nver
- bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}')
- case $(tc-arch ${CTARGET}) in
- amd64|x86) nver="2.20" ;;
- arm) nver="2.22" ;;
- hppa) nver="2.23" ;;
- ppc|ppc64) nver="2.20" ;;
- # ifunc support was added in 2.23, but glibc also needs
- # machinemode which is in 2.24.
- s390) nver="2.24" ;;
- sparc) nver="2.21" ;;
- *) return 1 ;;
- esac
- ver_test ${bver} -ge ${nver}
-}
-
-# Setup toolchain variables that had historically been defined in the
-# profiles for these archs.
-setup_env() {
- # silly users
- unset LD_RUN_PATH
- unset LD_ASSUME_KERNEL
-
- if is_crosscompile || tc-is-cross-compiler ; then
- multilib_env ${CTARGET_OPT:-${CTARGET}}
-
- if ! use multilib ; then
- MULTILIB_ABIS=${DEFAULT_ABI}
- else
- MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
- fi
-
- # If the user has CFLAGS_<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 ! egrep -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then
- eerror "Your ${EROOT}/etc/nsswitch.conf is out of date."
- eerror "Please make sure you have 'files' entries for"
- eerror "'passwd:', 'group:' and 'shadow:' databases."
- eerror "For more details see:"
- eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26"
- die "nsswitch.conf has no 'files' provider in '${entry}'."
- fi
- done
- fi
-
- # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
- # we test for...
- if ! is_crosscompile ; then
- if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then
- ebegin "Checking that IA32 emulation is enabled in the running kernel"
- echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
- local STAT
- if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
- "${T}/check-ia32-emulation.elf32"
- STAT=$?
- else
- # Don't fail here to allow single->multi ABI switch
- # or recover from breakage like bug #646424
- ewarn "Failed to compile the ABI test. Broken host glibc?"
- STAT=0
- fi
- rm -f "${T}/check-ia32-emulation.elf32"
- eend $STAT
- [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."
- fi
-
- fi
-
- # When we actually have to compile something...
- if ! just_headers ; then
- ebegin "Checking gcc for __thread support"
- if ! eend $(want__thread ; echo $?) ; then
- echo
- eerror "Could not find a gcc that supports the __thread directive!"
- eerror "Please update your binutils/gcc and try again."
- die "No __thread support in gcc!"
- fi
-
- if [[ ${CTARGET} == *-linux* ]] ; then
- local run_kv build_kv want_kv
-
- run_kv=$(g_get_running_KV)
- build_kv=$(g_int_to_KV $(get_kheader_version))
- want_kv=${MIN_KERN_VER}
-
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- # Building fails on an non-supporting kernel
- ebegin "Checking running kernel version (${run_kv} >= ${want_kv})"
- if ! eend_KV ${run_kv} ${want_kv} ; then
- echo
- eerror "You need a kernel of at least ${want_kv}!"
- die "Kernel version too low!"
- fi
- fi
-
- ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})"
- if ! eend_KV ${build_kv} ${want_kv} ; then
- echo
- eerror "You need linux-headers of at least ${want_kv}!"
- die "linux-headers version too low!"
- fi
- fi
- fi
-}
-
-#
-# the phases
-#
-
-# pkg_pretend
-
-pkg_pretend() {
- # All the checks...
- einfo "Checking general environment sanity."
- sanity_prechecks
-}
-
-pkg_setup() {
- # see bug 682570
- [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup
-}
-
-# src_unpack
-
-src_unpack() {
- # Consistency is not guaranteed between pkg_ and src_ ...
- sanity_prechecks
-
- use multilib && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
-
- setup_env
-
- if [[ -n ${EGIT_REPO_URI} ]] ; then
- git-r3_src_unpack
- else
- unpack ${P}.tar.xz
- fi
-
- cd "${WORKDIR}" || die
- unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
-}
-
-src_prepare() {
- if ! use vanilla ; then
- elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}"
- eapply "${WORKDIR}"/patches
- eapply "${DISTDIR}"/glibc-2.30-sparc-reg-fix-clobber.patch
- einfo "Done."
- fi
-
- default
-
- gnuconfig_update
-
- 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
-
- cd "${S}"
-}
-
-glibc_do_configure() {
- # Glibc does not work with gold (for various reasons) #269274.
- tc-ld-disable-gold
-
- # CXX isnt handled by the multilib system, so if we dont unset here
- # we accumulate crap across abis
- unset CXX
-
- einfo "Configuring glibc for nptl"
-
- if use doc ; then
- export MAKEINFO=makeinfo
- else
- export MAKEINFO=/dev/null
- fi
-
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO ; 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}"
-
- 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 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 '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
-
- emake ${myxfailparams} check
-}
-
-do_src_test() {
- local ret=0
-
- glibc_src_test
- : $(( ret |= $? ))
-
- return ${ret}
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # Give tests more time to complete.
- export TIMEOUTFACTOR=5
-
- foreach_abi do_src_test || die "tests failed"
-}
-
-run_locale_gen() {
- # if the host locales.gen contains no entries, we'll install everything
- local root="$1"
- local inplace=""
-
- if [[ "${root}" == "--inplace-glibc" ]] ; then
- inplace="--inplace-glibc"
- root="$2"
- fi
-
- local locale_list="${root}/etc/locale.gen"
-
- pushd "${ED}"/$(get_libdir) >/dev/null
-
- if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
- [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
- locale_list="${root}/usr/share/i18n/SUPPORTED"
- fi
-
- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
- --destdir "${root}"
-
- popd >/dev/null
-}
-
-glibc_do_src_install() {
- local builddir=$(builddir nptl)
- cd "${builddir}"
-
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
-
- # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
- # which come without headers etc. Only needed for binary packages since the
- # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
- find "${D}" -name "libnsl.a" -delete
- find "${D}" -name "libnsl.so" -delete
-
- # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
- # to infer upstream version:
- # '#define VERSION "2.26.90"' -> '2.26.90'
- local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
-
- # Avoid stripping binaries not targeted by ${CHOST}. Or else
- # ${CHOST}-strip would break binaries build for ${CTARGET}.
- is_crosscompile && dostrip -x /
- # gdb thread introspection relies on local libpthreas symbols. stripping breaks it
- # See Note [Disable automatic stripping]
- dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
-
- if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
- # Move versioned .a file out of libdir to evade portage QA checks
- # instead of using gen_usr_ldscript(). We fix ldscript as:
- # "GROUP ( /usr/lib64/libm-<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 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
- dodoc -r ChangeLog.old
-
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the
- # creation of the "factory" symlink in pkg_postinst().
- rm -f "${ED}"/etc/localtime
-
- # Generate all locales if this is a native build as locale generation
- if use compile-locales && ! is_crosscompile ; then
- run_locale_gen --inplace-glibc "${ED}/"
- sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
- fi
-}
-
-glibc_headers_install() {
- local builddir=$(builddir "headers")
- cd "${builddir}"
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
-
- insinto $(alt_headers)/gnu
- doins "${S}"/include/gnu/stubs.h
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include $(alt_prefix)/sys-include
-}
-
-src_install() {
- if just_headers ; then
- export ABI=default
- glibc_headers_install
- return
- fi
-
- foreach_abi glibc_do_src_install
-
- if ! use static-libs ; then
- elog "Not installing static glibc libraries"
- find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
- fi
-}
-
-# Simple test to make sure our new glibc isn't completely broken.
-# Make sure we don't test with statically built binaries since
-# they will fail. Also, skip if this glibc is a cross compiler.
-#
-# If coreutils is built with USE=multicall, some of these files
-# will just be wrapper scripts, not actual ELFs we can test.
-glibc_sanity_check() {
- cd / #228809
-
- # We enter ${ED} so to avoid trouble if the path contains
- # special characters; for instance if the path contains the
- # colon character (:), then the linker will try to split it
- # and look for the libraries in an unexpected place. This can
- # lead to unsafe code execution if the generated prefix is
- # within a world-writable directory.
- # (e.g. /var/tmp/portage:${HOSTNAME})
- pushd "${ED}"/$(get_libdir) >/dev/null
-
- local x striptest
- for x in cal date env free ls true uname uptime ; do
- x=$(type -p ${x})
- [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
- case ${striptest} in
- *"statically linked"*) continue;;
- *"ASCII text"*) continue;;
- esac
- # We need to clear the locale settings as the upgrade might want
- # incompatible locale data. This test is not for verifying that.
- LC_ALL=C \
- ./ld-*.so --library-path . ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-
- popd >/dev/null
-}
-
-pkg_preinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- # prepare /etc/ld.so.conf.d/ for files
- mkdir -p "${EROOT}"/etc/ld.so.conf.d
-
- # Default /etc/hosts.conf:multi to on for systems with small dbs.
- if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
- sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
- einfo "Defaulting /etc/host.conf:multi to on"
- fi
-
- [[ -n ${ROOT} ]] && return 0
- [[ -d ${ED}/$(get_libdir) ]] || return 0
- [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
-}
-
-pkg_postinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/"
- fi
-
- if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
- use compile-locales || run_locale_gen "${EROOT}/"
- fi
-
- # Check for sanity of /etc/nsswitch.conf, take 2
- if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
- local entry
- for entry in passwd group shadow; do
- if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
- ewarn ""
- ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been"
- ewarn "removed from glibc and is now provided by the package"
- ewarn " sys-auth/libnss-nis"
- ewarn "Install it now to keep your NIS setup working."
- ewarn ""
- fi
- done
- fi
-}
diff --git a/sys-libs/glibc/glibc-2.31-r7.ebuild b/sys-libs/glibc/glibc-2.31-r7.ebuild
index 975a2dec59c9..b9666e9e7e59 100644
--- a/sys-libs/glibc/glibc-2.31-r7.ebuild
+++ b/sys-libs/glibc/glibc-2.31-r7.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{10..11} )
TMPFILES_OPTIONAL=1
inherit python-any-r1 prefix toolchain-funcs flag-o-matic gnuconfig \
@@ -103,7 +103,7 @@ COMMON_DEPEND="
) )
suid? ( caps? ( sys-libs/libcap ) )
selinux? ( sys-libs/libselinux )
- systemtap? ( dev-util/systemtap )
+ systemtap? ( dev-debug/systemtap )
!<net-misc/openssh-8.1_p1-r2
"
DEPEND="${COMMON_DEPEND}
@@ -372,6 +372,7 @@ setup_flags() {
append-flags -O2
fi
strip-unsupported-flags
+ filter-lto
filter-flags -m32 -m64 '-mabi=*'
# glibc aborts if rpath is set by LDFLAGS
@@ -633,7 +634,7 @@ sanity_prechecks() {
if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then
local entry
for entry in passwd group shadow; do
- if ! egrep -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then
+ 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."
@@ -1486,7 +1487,7 @@ pkg_postinst() {
if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
local entry
for entry in passwd group shadow; do
- if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
+ 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"
diff --git a/sys-libs/glibc/glibc-2.32-r8.ebuild b/sys-libs/glibc/glibc-2.32-r8.ebuild
index 101254fce5ab..c2a242aa11ed 100644
--- a/sys-libs/glibc/glibc-2.32-r8.ebuild
+++ b/sys-libs/glibc/glibc-2.32-r8.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{10..11} )
TMPFILES_OPTIONAL=1
inherit python-any-r1 prefix toolchain-funcs flag-o-matic gnuconfig \
@@ -101,7 +101,7 @@ BDEPEND="
!compile-locales? (
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
)
"
COMMON_DEPEND="
@@ -112,21 +112,21 @@ COMMON_DEPEND="
) )
suid? ( caps? ( sys-libs/libcap ) )
selinux? ( sys-libs/libselinux )
- systemtap? ( dev-util/systemtap )
+ systemtap? ( dev-debug/systemtap )
!<net-misc/openssh-8.1_p1-r2
"
DEPEND="${COMMON_DEPEND}
compile-locales? (
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
)
test? ( >=net-dns/libidn2-2.3.0 )
"
RDEPEND="${COMMON_DEPEND}
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
sys-apps/gentoo-functions
"
@@ -389,6 +389,7 @@ setup_flags() {
append-flags -O2
fi
strip-unsupported-flags
+ filter-lto
filter-flags -m32 -m64 '-mabi=*'
# glibc aborts if rpath is set by LDFLAGS
@@ -650,7 +651,7 @@ sanity_prechecks() {
if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then
local entry
for entry in passwd group shadow; do
- if ! egrep -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then
+ 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."
@@ -1504,7 +1505,7 @@ pkg_postinst() {
if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
local entry
for entry in passwd group shadow; do
- if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
+ 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"
diff --git a/sys-libs/glibc/glibc-2.33-r8.ebuild b/sys-libs/glibc/glibc-2.33-r14.ebuild
index 6d5339c15907..c9d2f2586f87 100644
--- a/sys-libs/glibc/glibc-2.33-r8.ebuild
+++ b/sys-libs/glibc/glibc-2.33-r14.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,10 +6,7 @@ EAPI=7
# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
# Please read & adapt the page as necessary if obsolete.
-# We avoid Python 3.10 here _for now_ (it does work!) to avoid circular dependencies
-# on upgrades as people migrate to libxcrypt.
-# https://wiki.gentoo.org/wiki/User:Sam/Portage_help/Circular_dependencies#Python_and_libcrypt
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{10..11} )
TMPFILES_OPTIONAL=1
inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
@@ -23,13 +20,13 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=6
+PATCH_VER=11
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
inherit git-r3
else
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
fi
@@ -109,7 +106,7 @@ BDEPEND="
!compile-locales? (
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
)
"
COMMON_DEPEND="
@@ -120,20 +117,20 @@ COMMON_DEPEND="
) )
suid? ( caps? ( sys-libs/libcap ) )
selinux? ( sys-libs/libselinux )
- systemtap? ( dev-util/systemtap )
+ systemtap? ( dev-debug/systemtap )
"
DEPEND="${COMMON_DEPEND}
compile-locales? (
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
)
test? ( >=net-dns/libidn2-2.3.0 )
"
RDEPEND="${COMMON_DEPEND}
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
sys-apps/gentoo-functions
!<app-misc/pax-utils-1.3.1
!<net-misc/openssh-8.1_p1-r2
@@ -404,6 +401,7 @@ setup_flags() {
append-flags -O2
fi
strip-unsupported-flags
+ filter-lto
filter-flags -m32 -m64 '-mabi=*'
# glibc aborts if rpath is set by LDFLAGS
@@ -438,33 +436,6 @@ setup_flags() {
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
@@ -783,14 +754,6 @@ sanity_prechecks() {
# When we actually have to compile something...
if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; 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
@@ -1166,6 +1129,7 @@ glibc_headers_configure() {
--host=${CTARGET_OPT:-${CTARGET}}
--with-headers=$(build_eprefix)$(alt_build_headers)
--prefix="$(host_eprefix)/usr"
+ $(use_enable crypt)
${EXTRA_ECONF}
)
@@ -1532,7 +1496,7 @@ glibc_sanity_check() {
# 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)
+ local newldso=$(find . -maxdepth 1 -name 'ld-*so' -type f -print -quit)
einfo Last-minute run tests with ${newldso} in /$(get_libdir) ...
@@ -1608,7 +1572,7 @@ pkg_postinst() {
if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
local entry
for entry in passwd group shadow; do
- if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
+ 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"
diff --git a/sys-libs/glibc/glibc-2.34-r6.ebuild b/sys-libs/glibc/glibc-2.34-r14.ebuild
index b1093aed0f13..e0d9f9970c12 100644
--- a/sys-libs/glibc/glibc-2.34-r6.ebuild
+++ b/sys-libs/glibc/glibc-2.34-r14.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,10 +6,7 @@ EAPI=7
# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
# Please read & adapt the page as necessary if obsolete.
-# We avoid Python 3.10 here _for now_ (it does work!) to avoid circular dependencies
-# on upgrades as people migrate to libxcrypt.
-# https://wiki.gentoo.org/wiki/User:Sam/Portage_help/Circular_dependencies#Python_and_libcrypt
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{10..11} )
TMPFILES_OPTIONAL=1
inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
@@ -23,13 +20,13 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=11
+PATCH_VER=17
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
inherit git-r3
else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
fi
@@ -112,7 +109,7 @@ BDEPEND="
!compile-locales? (
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
)
"
COMMON_DEPEND="
@@ -123,20 +120,20 @@ COMMON_DEPEND="
) )
suid? ( caps? ( sys-libs/libcap ) )
selinux? ( sys-libs/libselinux )
- systemtap? ( dev-util/systemtap )
+ systemtap? ( dev-debug/systemtap )
"
DEPEND="${COMMON_DEPEND}
compile-locales? (
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
)
test? ( >=net-dns/libidn2-2.3.0 )
"
RDEPEND="${COMMON_DEPEND}
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
sys-apps/gentoo-functions
!<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
!<net-misc/openssh-8.1_p1-r2
@@ -169,19 +166,11 @@ 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
@@ -416,6 +405,7 @@ setup_flags() {
fi
strip-unsupported-flags
+ filter-lto
filter-flags -m32 -m64 '-mabi=*'
# glibc aborts if rpath is set by LDFLAGS
@@ -448,33 +438,9 @@ setup_flags() {
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}
+ # See end of bug #830454; we handle this via USE=cet
+ filter-flags '-fcf-protection='
}
use_multiarch() {
@@ -560,9 +526,11 @@ setup_env() {
# 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=$(binutils-config -B)
- local current_gcc_path=$(gcc-config -B)
+ 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"
@@ -795,12 +763,12 @@ sanity_prechecks() {
# When we actually have to compile something...
if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; 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!"
+ 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
@@ -838,6 +806,7 @@ upgrade_warning() {
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
@@ -1058,11 +1027,6 @@ glibc_do_configure() {
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}"
@@ -1186,6 +1150,7 @@ glibc_headers_configure() {
--host=${CTARGET_OPT:-${CTARGET}}
--with-headers=$(build_eprefix)$(alt_build_headers)
--prefix="$(host_eprefix)/usr"
+ $(use_enable crypt)
${EXTRA_ECONF}
)
@@ -1628,7 +1593,7 @@ pkg_postinst() {
if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
local entry
for entry in passwd group shadow; do
- if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
+ 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"
diff --git a/sys-libs/glibc/glibc-2.34-r4.ebuild b/sys-libs/glibc/glibc-2.35-r11.ebuild
index 88f72ad1d7db..57474eb0373f 100644
--- a/sys-libs/glibc/glibc-2.34-r4.ebuild
+++ b/sys-libs/glibc/glibc-2.35-r11.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,10 +6,7 @@ EAPI=7
# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
# Please read & adapt the page as necessary if obsolete.
-# We avoid Python 3.10 here _for now_ (it does work!) to avoid circular dependencies
-# on upgrades as people migrate to libxcrypt.
-# https://wiki.gentoo.org/wiki/User:Sam/Portage_help/Circular_dependencies#Python_and_libcrypt
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{10..11} )
TMPFILES_OPTIONAL=1
inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
@@ -23,15 +20,16 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=8
+PATCH_VER=12
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
inherit git-r3
else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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}
@@ -46,7 +44,7 @@ SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${L
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"
+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"
@@ -112,7 +110,7 @@ BDEPEND="
!compile-locales? (
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
)
"
COMMON_DEPEND="
@@ -123,20 +121,20 @@ COMMON_DEPEND="
) )
suid? ( caps? ( sys-libs/libcap ) )
selinux? ( sys-libs/libselinux )
- systemtap? ( dev-util/systemtap )
+ systemtap? ( dev-debug/systemtap )
"
DEPEND="${COMMON_DEPEND}
compile-locales? (
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
)
test? ( >=net-dns/libidn2-2.3.0 )
"
RDEPEND="${COMMON_DEPEND}
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
sys-apps/gentoo-functions
!<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
!<net-misc/openssh-8.1_p1-r2
@@ -147,13 +145,13 @@ RESTRICT="!test? ( test )"
if [[ ${CATEGORY} == cross-* ]] ; then
BDEPEND+=" !headers-only? (
>=${CATEGORY}/binutils-2.27
- >=${CATEGORY}/gcc-6
+ >=${CATEGORY}/gcc-6.2
)"
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
else
BDEPEND+="
>=sys-devel/binutils-2.27
- >=sys-devel/gcc-6
+ >=sys-devel/gcc-6.2
"
DEPEND+=" virtual/os-headers "
RDEPEND+="
@@ -169,24 +167,31 @@ 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
#
+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} ]]
}
@@ -253,8 +258,8 @@ do_compile_test() {
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})}"
+ # We assume CC is already set up.
+ nonfatal emake glibc-test
ret=$?
popd >/dev/null
@@ -309,30 +314,33 @@ setup_target_flags() {
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.
- [[ ${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
+ 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 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})"
+ # 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)
@@ -410,6 +418,7 @@ setup_flags() {
fi
strip-unsupported-flags
+ filter-lto
filter-flags -m32 -m64 '-mabi=*'
# glibc aborts if rpath is set by LDFLAGS
@@ -442,33 +451,9 @@ setup_flags() {
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}
+ # See end of bug #830454; we handle this via USE=cet
+ filter-flags '-fcf-protection='
}
use_multiarch() {
@@ -545,7 +530,12 @@ setup_env() {
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
@@ -554,12 +544,15 @@ setup_env() {
# 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=$(binutils-config -B)
- local current_gcc_path=$(gcc-config -B)
+ 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"
@@ -771,7 +764,7 @@ sanity_prechecks() {
ebegin "Checking that IA32 emulation is enabled in the running kernel"
echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
local STAT
- if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
+ 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
@@ -789,12 +782,12 @@ sanity_prechecks() {
# When we actually have to compile something...
if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; 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!"
+ 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
@@ -832,6 +825,7 @@ upgrade_warning() {
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
@@ -845,9 +839,6 @@ upgrade_warning() {
# pkg_pretend
pkg_pretend() {
- # All the checks...
- einfo "Checking general environment sanity."
- sanity_prechecks
upgrade_warning
}
@@ -859,13 +850,13 @@ pkg_setup() {
# src_unpack
src_unpack() {
- # Consistency is not guaranteed between pkg_ and src_ ...
+ setup_env
+
+ einfo "Checking general environment sanity."
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
@@ -880,6 +871,7 @@ src_unpack() {
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
@@ -898,8 +890,16 @@ src_prepare() {
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
@@ -928,30 +928,13 @@ src_prepare() {
}
glibc_do_configure() {
+ dump_build_environment
- 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 )
+ # 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:
@@ -1001,7 +984,6 @@ glibc_do_configure() {
fi
myconf+=(
- --without-cvs
--disable-werror
--enable-bind-now
--build=${CBUILD_OPT:-${CBUILD}}
@@ -1020,7 +1002,6 @@ glibc_do_configure() {
--with-pkgversion="$(glibc_banner)"
$(use_enable crypt)
$(use_multiarch || echo --disable-multi-arch)
- $(use_enable static-pie)
$(use_enable systemtap)
$(use_enable nscd)
@@ -1052,11 +1033,6 @@ glibc_do_configure() {
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}"
@@ -1173,13 +1149,13 @@ glibc_headers_configure() {
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}
)
@@ -1240,7 +1216,10 @@ glibc_src_test() {
# sandbox does not understand unshare() and prevents
# writes to /proc/, which makes many tests fail
- SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check
+ # 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() {
@@ -1622,7 +1601,7 @@ pkg_postinst() {
if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
local entry
for entry in passwd group shadow; do
- if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
+ 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"
diff --git a/sys-libs/glibc/glibc-2.33-r7.ebuild b/sys-libs/glibc/glibc-2.36-r8.ebuild
index 9c12fe15458e..fe8428a2490e 100644
--- a/sys-libs/glibc/glibc-2.33-r7.ebuild
+++ b/sys-libs/glibc/glibc-2.36-r8.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-# We avoid Python 3.10 here _for now_ (it does work!) to avoid circular dependencies
-# on upgrades as people migrate to libxcrypt.
-# https://wiki.gentoo.org/wiki/User:Sam/Portage_help/Circular_dependencies#Python_and_libcrypt
-PYTHON_COMPAT=( python3_{7,8,9} )
+# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
+# Please read & adapt the page as necessary if obsolete.
+
+PYTHON_COMPAT=( python3_{10..11} )
TMPFILES_OPTIONAL=1
inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
@@ -20,13 +20,13 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=6
+PATCH_VER=10
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
inherit git-r3
else
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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
@@ -35,18 +35,21 @@ RELEASE_VER=${PV}
GCC_BOOTSTRAP_VER=20201208
-LOCALE_GEN_VER=2.10
+LOCALE_GEN_VER=2.23
-GLIBC_SYSTEMD_VER=20210814
+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 headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemd systemtap test vanilla"
+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
@@ -100,14 +103,15 @@ fi
BDEPEND="
${PYTHON_DEPS}
- >=app-misc/pax-utils-1.3.1
+ >=app-misc/pax-utils-${MIN_PAX_UTILS_VER}
sys-devel/bison
doc? ( sys-apps/texinfo )
!compile-locales? (
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
)
+ test? ( dev-lang/perl )
"
COMMON_DEPEND="
gd? ( media-libs/gd:2= )
@@ -115,24 +119,26 @@ COMMON_DEPEND="
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-util/systemtap )
+ systemtap? ( dev-debug/systemtap )
"
DEPEND="${COMMON_DEPEND}
compile-locales? (
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
)
test? ( >=net-dns/libidn2-2.3.0 )
"
RDEPEND="${COMMON_DEPEND}
app-arch/gzip
sys-apps/grep
- virtual/awk
+ app-alternatives/awk
sys-apps/gentoo-functions
- !<app-misc/pax-utils-1.3.1
+ !<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
!<net-misc/openssh-8.1_p1-r2
"
@@ -141,13 +147,13 @@ RESTRICT="!test? ( test )"
if [[ ${CATEGORY} == cross-* ]] ; then
BDEPEND+=" !headers-only? (
>=${CATEGORY}/binutils-2.27
- >=${CATEGORY}/gcc-6
+ >=${CATEGORY}/gcc-6.2
)"
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
else
BDEPEND+="
>=sys-devel/binutils-2.27
- >=sys-devel/gcc-6
+ >=sys-devel/gcc-6.2
"
DEPEND+=" virtual/os-headers "
RDEPEND+="
@@ -163,24 +169,31 @@ 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
#
+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} ]]
}
@@ -247,8 +260,8 @@ do_compile_test() {
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})}"
+ # We assume CC is already set up.
+ nonfatal emake glibc-test
ret=$?
popd >/dev/null
@@ -303,22 +316,37 @@ setup_target_flags() {
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.
- [[ ${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})"
+ 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)
@@ -394,7 +422,9 @@ setup_flags() {
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
@@ -404,9 +434,21 @@ setup_flags() {
# https://sourceware.org/PR27837
filter-ldflags '-Wl,--relax'
+ # 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)
@@ -423,34 +465,26 @@ setup_flags() {
# 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*'
-}
-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}
+ # 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() {
@@ -508,14 +542,112 @@ setup_env() {
einfo "Skip CC ABI injection. We can't use (cross-)compiler yet."
return 0
fi
- local VAR=CFLAGS_${ABI}
+
+ # Glibc does not work with gold (for various reasons) #269274.
+ tc-ld-disable-gold
+
+ 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.
- : ${__GLIBC_CC:=$(tc-getCC ${CTARGET})}
- export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}"
- einfo " $(printf '%15s' 'Manual CC:') ${CC}"
+ # 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() {
@@ -663,7 +795,7 @@ sanity_prechecks() {
ebegin "Checking that IA32 emulation is enabled in the running kernel"
echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
local STAT
- if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
+ 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
@@ -681,12 +813,12 @@ sanity_prechecks() {
# When we actually have to compile something...
if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; 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!"
+ 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
@@ -706,16 +838,39 @@ sanity_prechecks() {
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!"
+ # 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
#
@@ -723,9 +878,7 @@ sanity_prechecks() {
# pkg_pretend
pkg_pretend() {
- # All the checks...
- einfo "Checking general environment sanity."
- sanity_prechecks
+ upgrade_warning
}
pkg_setup() {
@@ -736,13 +889,13 @@ pkg_setup() {
# src_unpack
src_unpack() {
- # Consistency is not guaranteed between pkg_ and src_ ...
+ setup_env
+
+ einfo "Checking general environment sanity."
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
@@ -797,78 +950,13 @@ src_prepare() {
}
glibc_do_configure() {
- # Glibc does not work with gold (for various reasons) #269274.
- tc-ld-disable-gold
-
- # CXX isnt handled by the multilib system, so if we dont unset here
- # we accumulate crap across abis
- unset CXX
-
- einfo "Configuring glibc for nptl"
-
- if use doc ; then
- export MAKEINFO=makeinfo
- else
- export MAKEINFO=/dev/null
- fi
-
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
-
- # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760
- # To build .S (assembly) files with the same ABI-specific flags
- # upstream currently recommends adding CFLAGS to CC/CXX:
- # https://sourceware.org/PR23273
- # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS
- # and breaks multiarch support. See 659030#c3 for an example.
- # The glibc configure script doesn't properly use LDFLAGS all the time.
- export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}"
- einfo " $(printf '%15s' 'Manual CC:') ${CC}"
-
- # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
- export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}"
-
- if is_crosscompile; then
- # Assume worst-case bootstrap: glibc is buil first time
- # when ${CTARGET}-g++ is not available yet. We avoid
- # building auxiliary programs that require C++: bug #683074
- # It should not affect final result.
- export libc_cv_cxx_link_ok=no
- # The line above has the same effect. We set CXX explicitly
- # to make build logs less confusing.
- export CXX=
- fi
- einfo " $(printf '%15s' 'Manual CXX:') ${CXX}"
-
- # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
- # can't detect them automatically due to ${CHOST} mismatch and fallbacks
- # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
- export NM="$(tc-getNM ${CTARGET})"
- export READELF="$(tc-getREADELF ${CTARGET})"
- einfo " $(printf '%15s' 'Manual NM:') ${NM}"
- einfo " $(printf '%15s' 'Manual READELF:') ${READELF}"
-
- echo
+ dump_build_environment
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 )
+ # 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:
@@ -918,7 +1006,6 @@ glibc_do_configure() {
fi
myconf+=(
- --without-cvs
--disable-werror
--enable-bind-now
--build=${CBUILD_OPT:-${CBUILD}}
@@ -937,10 +1024,17 @@ glibc_do_configure() {
--with-pkgversion="$(glibc_banner)"
$(use_enable crypt)
$(use_multiarch || echo --disable-multi-arch)
- $(use_enable static-pie)
$(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'
@@ -969,11 +1063,6 @@ glibc_do_configure() {
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}"
@@ -1090,13 +1179,13 @@ glibc_headers_configure() {
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}
)
@@ -1157,7 +1246,10 @@ glibc_src_test() {
# sandbox does not understand unshare() and prevents
# writes to /proc/, which makes many tests fail
- SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check
+ # 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() {
@@ -1190,13 +1282,13 @@ run_locale_gen() {
root="$2"
fi
- local locale_list="${root}/etc/locale.gen"
+ local locale_list="${root%/}/etc/locale.gen"
pushd "${ED}"/$(get_libdir) >/dev/null
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
- locale_list="${root}/usr/share/i18n/SUPPORTED"
+ locale_list="${root%/}/usr/share/i18n/SUPPORTED"
fi
set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
@@ -1240,6 +1332,17 @@ glibc_do_src_install() {
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
@@ -1461,6 +1564,12 @@ glibc_sanity_check() {
# (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})
@@ -1473,7 +1582,7 @@ glibc_sanity_check() {
# 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 \
+ ${newldso} --library-path . ${x} > /dev/null \
|| die "simple run test (${x}) failed"
done
@@ -1527,11 +1636,13 @@ pkg_postinst() {
use compile-locales || run_locale_gen "${EROOT}/"
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 egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
+ 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"
@@ -1550,6 +1661,5 @@ pkg_postinst() {
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."
- elog "If you have FEATURES=collision-protect, please use FEATURES=unmerge-orphans instead!"
fi
}
diff --git a/sys-libs/glibc/glibc-2.37-r10.ebuild b/sys-libs/glibc/glibc-2.37-r10.ebuild
new file mode 100644
index 000000000000..053cfe2b0f85
--- /dev/null
+++ b/sys-libs/glibc/glibc-2.37-r10.ebuild
@@ -0,0 +1,1684 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
+# Please read & adapt the page as necessary if obsolete.
+
+PYTHON_COMPAT=( python3_{10..11} )
+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 ~ia64 ~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'
+
+ # 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 gold (for various reasons) #269274.
+ tc-ld-disable-gold
+
+ 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 ; then
+ if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then
+ ebegin "Checking that IA32 emulation is enabled in the running kernel"
+ echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
+ local STAT
+ if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
+ "${T}/check-ia32-emulation.elf32"
+ STAT=$?
+ else
+ # Don't fail here to allow single->multi ABI switch
+ # or recover from breakage like bug #646424
+ ewarn "Failed to compile the ABI test. Broken host glibc?"
+ STAT=0
+ fi
+ rm -f "${T}/check-ia32-emulation.elf32"
+ eend $STAT
+ [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."
+ fi
+
+ fi
+
+ # When we actually have to compile something...
+ if ! just_headers && [[ ${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 '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() {
+ # if the host locales.gen contains no entries, we'll install everything
+ local root="$1"
+ local inplace=""
+
+ if [[ "${root}" == "--inplace-glibc" ]] ; then
+ inplace="--inplace-glibc"
+ root="$2"
+ fi
+
+ local locale_list="${root%/}/etc/locale.gen"
+
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
+ [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
+ locale_list="${root%/}/usr/share/i18n/SUPPORTED"
+ fi
+
+ # bug 736794: we need to be careful with the parallelization... the number of
+ # processors saved in the environment of a binary package may differ strongly
+ # from the number of processes available during postinst
+ local mygenjobs="$(makeopts_jobs)"
+ if [[ "${EMERGE_FROM}" == "binary" ]] ; then
+ mygenjobs="$(nproc)"
+ fi
+
+ set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \
+ --destdir "${root}"
+ echo "$@"
+ "$@"
+
+ popd >/dev/null
+}
+
+glibc_do_src_install() {
+ local builddir=$(builddir nptl)
+ cd "${builddir}"
+
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
+
+ # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
+ # which come without headers etc. Only needed for binary packages since the
+ # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
+ find "${D}" -name "libnsl.a" -delete
+ find "${D}" -name "libnsl.so" -delete
+
+ # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
+ # to infer upstream version:
+ # '#define VERSION "2.26.90"' -> '2.26.90'
+ local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
+
+ # Avoid stripping binaries not targeted by ${CHOST}. Or else
+ # ${CHOST}-strip would break binaries build for ${CTARGET}.
+ is_crosscompile && dostrip -x /
+
+ # gdb thread introspection relies on local libpthreads symbols. stripping breaks it
+ # See Note [Disable automatic stripping]
+ dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
+ # valgrind requires knowledge about ld.so symbols.
+ dostrip -x $(alt_libdir)/ld-*.so*
+
+ if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
+ # Move versioned .a file out of libdir to evade portage QA checks
+ # instead of using gen_usr_ldscript(). We fix ldscript as:
+ # "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..."
+ sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die
+ dodir $(alt_usrlibdir)/${P}
+ mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
+ fi
+
+ # We configure toolchains for standalone prefix systems with a sysroot,
+ # which is prepended to paths in ld scripts, so strip the prefix from these.
+ # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) )
+ # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )
+ if [[ -n $(host_eprefix) ]] ; then
+ local file
+ grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do
+ sed -i "s|$(host_eprefix)/|/|g" "${file}" || die
+ done
+ fi
+
+ # We'll take care of the cache ourselves
+ rm -f "${ED}"/etc/ld.so.cache
+
+ # Everything past this point just needs to be done once ...
+ is_final_abi || return 0
+
+ # Make sure the non-native interp can be found on multilib systems even
+ # if the main library set isn't installed into the right place. Maybe
+ # we should query the active gcc for info instead of hardcoding it ?
+ local i ldso_abi ldso_name
+ local ldso_abi_list=(
+ # x86
+ amd64 /lib64/ld-linux-x86-64.so.2
+ x32 /libx32/ld-linux-x32.so.2
+ x86 /lib/ld-linux.so.2
+ # mips
+ o32 /lib/ld.so.1
+ n32 /lib32/ld.so.1
+ n64 /lib64/ld.so.1
+ # powerpc
+ ppc /lib/ld.so.1
+ # riscv
+ ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
+ ilp32 /lib/ld-linux-riscv32-ilp32.so.1
+ lp64d /lib/ld-linux-riscv64-lp64d.so.1
+ lp64 /lib/ld-linux-riscv64-lp64.so.1
+ # s390
+ s390 /lib/ld.so.1
+ s390x /lib/ld64.so.1
+ # sparc
+ sparc32 /lib/ld-linux.so.2
+ sparc64 /lib64/ld-linux.so.2
+ )
+ case $(tc-endian) in
+ little)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
+ )
+ ;;
+ big)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
+ )
+ ;;
+ esac
+ if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
+ fi
+ for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
+ ldso_abi=${ldso_abi_list[i]}
+ has ${ldso_abi} $(get_install_abis) || continue
+
+ ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
+ if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
+ dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
+ fi
+ done
+
+ # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that require this.
+ # However, binary commercial packages are known to adhere to weird practices.
+ # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
+ # With devpts under Linux mounted properly, we do not need the pt_chown
+ # binary to be setuid. This is because the default owners/perms will be
+ # exactly what we want.
+ if ! use suid ; then
+ find "${ED}" -name pt_chown -exec chmod -s {} +
+ fi
+
+ #################################################################
+ # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
+ #################################################################
+
+ # Make sure we install some symlink hacks so that when we build
+ # a 2nd stage cross-compiler, gcc finds the target system
+ # headers correctly. See gcc/doc/gccinstall.info
+ if is_crosscompile ; then
+ # We need to make sure that /lib and /usr/lib always exists.
+ # gcc likes to use relative paths to get to its multilibs like
+ # /usr/lib/../lib64/. So while we don't install any files into
+ # /usr/lib/, we do need it to exist.
+ keepdir $(alt_prefix)/lib
+ keepdir $(alt_prefix)/usr/lib
+
+ dosym usr/include $(alt_prefix)/sys-include
+ return 0
+ fi
+
+ # Files for Debian-style locale updating
+ dodir /usr/share/i18n
+ sed \
+ -e "/^#/d" \
+ -e "/SUPPORTED-LOCALES=/d" \
+ -e "s: \\\\::g" -e "s:/: :g" \
+ "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
+ || die "generating /usr/share/i18n/SUPPORTED failed"
+
+ cd "${S}" || die
+
+ # Install misc network config files
+ insinto /etc
+ doins posix/gai.conf
+
+ if use systemd ; then
+ doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf"
+ else
+ doins nss/nsswitch.conf
+ fi
+
+ # Gentoo-specific
+ newins "${FILESDIR}"/host.conf-1 host.conf
+
+ if use nscd ; then
+ doins nscd/nscd.conf
+
+ newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd
+
+ local nscd_args=(
+ -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
+ )
+
+ sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
+
+ use systemd && systemd_dounit nscd/nscd.service
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
+ fi
+
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
+ doenvd "${T}"/00glibc
+
+ for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
+ [[ -s ${d} ]] && dodoc ${d}
+ done
+ dodoc -r ChangeLog.old
+
+ # Prevent overwriting of the /etc/localtime symlink. We'll handle the
+ # creation of the "factory" symlink in pkg_postinst().
+ rm -f "${ED}"/etc/localtime
+
+ # Generate all locales if this is a native build as locale generation
+ if use compile-locales && ! is_crosscompile ; then
+ run_locale_gen --inplace-glibc "${ED}/"
+ fi
+}
+
+glibc_headers_install() {
+ local builddir=$(builddir "headers")
+ cd "${builddir}"
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
+
+ insinto $(alt_headers)/gnu
+ doins "${S}"/include/gnu/stubs.h
+
+ # Make sure we install the sys-include symlink so that when
+ # we build a 2nd stage cross-compiler, gcc finds the target
+ # system headers correctly. See gcc/doc/gccinstall.info
+ dosym usr/include $(alt_prefix)/sys-include
+}
+
+src_install() {
+ if just_headers ; then
+ export ABI=default
+ glibc_headers_install
+ return
+ fi
+
+ foreach_abi glibc_do_src_install
+
+ if ! use static-libs ; then
+ einfo "Not installing static glibc libraries"
+ find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
+ fi
+}
+
+# Simple test to make sure our new glibc isn't completely broken.
+# Make sure we don't test with statically built binaries since
+# they will fail. Also, skip if this glibc is a cross compiler.
+#
+# If coreutils is built with USE=multicall, some of these files
+# will just be wrapper scripts, not actual ELFs we can test.
+glibc_sanity_check() {
+ cd / #228809
+
+ # We enter ${ED} so to avoid trouble if the path contains
+ # special characters; for instance if the path contains the
+ # colon character (:), then the linker will try to split it
+ # and look for the libraries in an unexpected place. This can
+ # lead to unsafe code execution if the generated prefix is
+ # within a world-writable directory.
+ # (e.g. /var/tmp/portage:${HOSTNAME})
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ # first let's find the actual dynamic linker here
+ # symlinks may point to the wrong abi
+ local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit)
+
+ einfo Last-minute run tests with ${newldso} in /$(get_libdir) ...
+
+ local x striptest
+ for x in cal date env free ls true uname uptime ; do
+ x=$(type -p ${x})
+ [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
+ striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
+ case ${striptest} in
+ *"statically linked"*) continue;;
+ *"ASCII text"*) continue;;
+ esac
+ # We need to clear the locale settings as the upgrade might want
+ # incompatible locale data. This test is not for verifying that.
+ LC_ALL=C \
+ ${newldso} --library-path . ${x} > /dev/null \
+ || die "simple run test (${x}) failed"
+ done
+
+ popd >/dev/null
+}
+
+pkg_preinst() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ einfo "Checking general environment sanity."
+ sanity_prechecks
+
+ # prepare /etc/ld.so.conf.d/ for files
+ mkdir -p "${EROOT}"/etc/ld.so.conf.d
+
+ # Default /etc/hosts.conf:multi to on for systems with small dbs.
+ if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
+ sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
+ einfo "Defaulting /etc/host.conf:multi to on"
+ fi
+
+ [[ -n ${ROOT} ]] && return 0
+ [[ -d ${ED}/$(get_libdir) ]] || return 0
+ [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
+
+ if [[ -L ${EROOT}/usr/lib/locale ]]; then
+ # Help portage migrate this to a directory
+ # https://bugs.gentoo.org/753740
+ rm "${EROOT}"/usr/lib/locale || die
+ fi
+
+ # Keep around libcrypt so that Perl doesn't break when merging libxcrypt
+ # (libxcrypt is the new provider for now of libcrypt.so.{1,2}).
+ # bug #802207
+ if ! 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
+ use compile-locales || run_locale_gen "${EROOT}/"
+ 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-r10.ebuild b/sys-libs/glibc/glibc-2.38-r10.ebuild
new file mode 100644
index 000000000000..5fca93e98070
--- /dev/null
+++ b/sys-libs/glibc/glibc-2.38-r10.ebuild
@@ -0,0 +1,1718 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
+# Please read & adapt the page as necessary if obsolete.
+
+PYTHON_COMPAT=( python3_{10..12} )
+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
+
+# 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 ~ia64 ~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=*'
+
+ # 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 gold (for various reasons) #269274.
+ tc-ld-disable-gold
+
+ 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 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 ; then
+ if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then
+ ebegin "Checking that IA32 emulation is enabled in the running kernel"
+ echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
+ local STAT
+ if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
+ "${T}/check-ia32-emulation.elf32"
+ STAT=$?
+ else
+ # Don't fail here to allow single->multi ABI switch
+ # or recover from breakage like bug #646424
+ ewarn "Failed to compile the ABI test. Broken host glibc?"
+ STAT=0
+ fi
+ rm -f "${T}/check-ia32-emulation.elf32"
+ eend $STAT
+ [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."
+ fi
+
+ fi
+
+ # When we actually have to compile something...
+ if ! just_headers && [[ ${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
+
+ 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() {
+ # if the host locales.gen contains no entries, we'll install everything
+ local root="$1"
+ local inplace=""
+
+ if [[ "${root}" == "--inplace-glibc" ]] ; then
+ inplace="--inplace-glibc"
+ root="$2"
+ fi
+
+ local locale_list="${root%/}/etc/locale.gen"
+
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
+ [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
+ locale_list="${root%/}/usr/share/i18n/SUPPORTED"
+ fi
+
+ # bug 736794: we need to be careful with the parallelization... the number of
+ # processors saved in the environment of a binary package may differ strongly
+ # from the number of processes available during postinst
+ local mygenjobs="$(makeopts_jobs)"
+ if [[ "${EMERGE_FROM}" == "binary" ]] ; then
+ mygenjobs="$(nproc)"
+ fi
+
+ set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \
+ --destdir "${root}"
+ echo "$@"
+ "$@"
+
+ popd >/dev/null
+}
+
+glibc_do_src_install() {
+ local builddir=$(builddir nptl)
+ cd "${builddir}"
+
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
+
+ # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
+ # which come without headers etc. Only needed for binary packages since the
+ # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
+ find "${D}" -name "libnsl.a" -delete
+ find "${D}" -name "libnsl.so" -delete
+
+ # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
+ # to infer upstream version:
+ # '#define VERSION "2.26.90"' -> '2.26.90'
+ local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
+
+ # Avoid stripping binaries not targeted by ${CHOST}. Or else
+ # ${CHOST}-strip would break binaries build for ${CTARGET}.
+ is_crosscompile && dostrip -x /
+
+ # gdb thread introspection relies on local libpthreads symbols. stripping breaks it
+ # See Note [Disable automatic stripping]
+ dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
+ # valgrind requires knowledge about ld.so symbols.
+ dostrip -x $(alt_libdir)/ld-*.so*
+
+ if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
+ # Move versioned .a file out of libdir to evade portage QA checks
+ # instead of using gen_usr_ldscript(). We fix ldscript as:
+ # "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..."
+ sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die
+ dodir $(alt_usrlibdir)/${P}
+ mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
+ fi
+
+ # We configure toolchains for standalone prefix systems with a sysroot,
+ # which is prepended to paths in ld scripts, so strip the prefix from these.
+ # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) )
+ # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )
+ if [[ -n $(host_eprefix) ]] ; then
+ local file
+ grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do
+ sed -i "s|$(host_eprefix)/|/|g" "${file}" || die
+ done
+ fi
+
+ # We'll take care of the cache ourselves
+ rm -f "${ED}"/etc/ld.so.cache
+
+ # Everything past this point just needs to be done once ...
+ is_final_abi || return 0
+
+ # Make sure the non-native interp can be found on multilib systems even
+ # if the main library set isn't installed into the right place. Maybe
+ # we should query the active gcc for info instead of hardcoding it ?
+ local i ldso_abi ldso_name
+ local ldso_abi_list=(
+ # x86
+ amd64 /lib64/ld-linux-x86-64.so.2
+ x32 /libx32/ld-linux-x32.so.2
+ x86 /lib/ld-linux.so.2
+ # mips
+ o32 /lib/ld.so.1
+ n32 /lib32/ld.so.1
+ n64 /lib64/ld.so.1
+ # powerpc
+ ppc /lib/ld.so.1
+ # riscv
+ ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
+ ilp32 /lib/ld-linux-riscv32-ilp32.so.1
+ lp64d /lib/ld-linux-riscv64-lp64d.so.1
+ lp64 /lib/ld-linux-riscv64-lp64.so.1
+ # s390
+ s390 /lib/ld.so.1
+ s390x /lib/ld64.so.1
+ # sparc
+ sparc32 /lib/ld-linux.so.2
+ sparc64 /lib64/ld-linux.so.2
+ )
+ case $(tc-endian) in
+ little)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
+ )
+ ;;
+ big)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
+ )
+ ;;
+ esac
+ if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
+ fi
+ for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
+ ldso_abi=${ldso_abi_list[i]}
+ has ${ldso_abi} $(get_install_abis) || continue
+
+ ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
+ if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
+ dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
+ fi
+ done
+
+ # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that require this.
+ # However, binary commercial packages are known to adhere to weird practices.
+ # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
+ # With devpts under Linux mounted properly, we do not need the pt_chown
+ # binary to be setuid. This is because the default owners/perms will be
+ # exactly what we want.
+ if ! use suid ; then
+ find "${ED}" -name pt_chown -exec chmod -s {} +
+ fi
+
+ #################################################################
+ # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
+ #################################################################
+
+ # Make sure we install some symlink hacks so that when we build
+ # a 2nd stage cross-compiler, gcc finds the target system
+ # headers correctly. See gcc/doc/gccinstall.info
+ if is_crosscompile ; then
+ # We need to make sure that /lib and /usr/lib always exists.
+ # gcc likes to use relative paths to get to its multilibs like
+ # /usr/lib/../lib64/. So while we don't install any files into
+ # /usr/lib/, we do need it to exist.
+ keepdir $(alt_prefix)/lib
+ keepdir $(alt_prefix)/usr/lib
+
+ dosym usr/include $(alt_prefix)/sys-include
+ return 0
+ fi
+
+ # Files for Debian-style locale updating
+ dodir /usr/share/i18n
+ sed \
+ -e "/^#/d" \
+ -e "/SUPPORTED-LOCALES=/d" \
+ -e "s: \\\\::g" -e "s:/: :g" \
+ "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
+ || die "generating /usr/share/i18n/SUPPORTED failed"
+
+ cd "${S}" || die
+
+ # Install misc network config files
+ insinto /etc
+ doins posix/gai.conf
+
+ if use systemd ; then
+ doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf"
+ else
+ doins nss/nsswitch.conf
+ fi
+
+ # Gentoo-specific
+ newins "${FILESDIR}"/host.conf-1 host.conf
+
+ if use nscd ; then
+ doins nscd/nscd.conf
+
+ newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd
+
+ local nscd_args=(
+ -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
+ )
+
+ sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
+
+ use systemd && systemd_dounit nscd/nscd.service
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
+ fi
+
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
+ doenvd "${T}"/00glibc
+
+ for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
+ [[ -s ${d} ]] && dodoc ${d}
+ done
+ dodoc -r ChangeLog.old
+
+ # Prevent overwriting of the /etc/localtime symlink. We'll handle the
+ # creation of the "factory" symlink in pkg_postinst().
+ rm -f "${ED}"/etc/localtime
+
+ # Generate all locales if this is a native build as locale generation
+ if use compile-locales && ! is_crosscompile ; then
+ run_locale_gen --inplace-glibc "${ED}/"
+ fi
+}
+
+glibc_headers_install() {
+ local builddir=$(builddir "headers")
+ cd "${builddir}"
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
+
+ insinto $(alt_headers)/gnu
+ doins "${S}"/include/gnu/stubs.h
+
+ # Make sure we install the sys-include symlink so that when
+ # we build a 2nd stage cross-compiler, gcc finds the target
+ # system headers correctly. See gcc/doc/gccinstall.info
+ dosym usr/include $(alt_prefix)/sys-include
+}
+
+src_install() {
+ if just_headers ; then
+ export ABI=default
+ glibc_headers_install
+ return
+ fi
+
+ foreach_abi glibc_do_src_install
+
+ if ! use static-libs ; then
+ einfo "Not installing static glibc libraries"
+ find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
+ fi
+}
+
+# Simple test to make sure our new glibc isn't completely broken.
+# Make sure we don't test with statically built binaries since
+# they will fail. Also, skip if this glibc is a cross compiler.
+#
+# If coreutils is built with USE=multicall, some of these files
+# will just be wrapper scripts, not actual ELFs we can test.
+glibc_sanity_check() {
+ cd / #228809
+
+ # We enter ${ED} so to avoid trouble if the path contains
+ # special characters; for instance if the path contains the
+ # colon character (:), then the linker will try to split it
+ # and look for the libraries in an unexpected place. This can
+ # lead to unsafe code execution if the generated prefix is
+ # within a world-writable directory.
+ # (e.g. /var/tmp/portage:${HOSTNAME})
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ # first let's find the actual dynamic linker here
+ # symlinks may point to the wrong abi
+ local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit)
+
+ einfo Last-minute run tests with ${newldso} in /$(get_libdir) ...
+
+ local x striptest
+ for x in cal date env free ls true uname uptime ; do
+ x=$(type -p ${x})
+ [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
+ striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
+ case ${striptest} in
+ *"statically linked"*) continue;;
+ *"ASCII text"*) continue;;
+ esac
+ # We need to clear the locale settings as the upgrade might want
+ # incompatible locale data. This test is not for verifying that.
+ LC_ALL=C \
+ ${newldso} --library-path . ${x} > /dev/null \
+ || die "simple run test (${x}) failed"
+ done
+
+ popd >/dev/null
+}
+
+pkg_preinst() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ einfo "Checking general environment sanity."
+ sanity_prechecks
+
+ # prepare /etc/ld.so.conf.d/ for files
+ mkdir -p "${EROOT}"/etc/ld.so.conf.d
+
+ # Default /etc/hosts.conf:multi to on for systems with small dbs.
+ if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
+ sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
+ einfo "Defaulting /etc/host.conf:multi to on"
+ fi
+
+ [[ -n ${ROOT} ]] && return 0
+ [[ -d ${ED}/$(get_libdir) ]] || return 0
+ [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
+
+ if [[ -L ${EROOT}/usr/lib/locale ]]; then
+ # Help portage migrate this to a directory
+ # https://bugs.gentoo.org/753740
+ rm "${EROOT}"/usr/lib/locale || die
+ fi
+
+ # Keep around libcrypt so that Perl doesn't break when merging libxcrypt
+ # (libxcrypt is the new provider for now of libcrypt.so.{1,2}).
+ # bug #802207
+ if ! 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
+
+ use compile-locales || run_locale_gen "${EROOT}/"
+ 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-r11.ebuild b/sys-libs/glibc/glibc-2.38-r11.ebuild
new file mode 100644
index 000000000000..93f0999d1d03
--- /dev/null
+++ b/sys-libs/glibc/glibc-2.38-r11.ebuild
@@ -0,0 +1,1724 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
+# Please read & adapt the page as necessary if obsolete.
+
+PYTHON_COMPAT=( python3_{10..12} )
+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
+
+# 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 ~ia64 ~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=*'
+
+ # 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 gold (for various reasons) #269274.
+ tc-ld-disable-gold
+
+ 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}"
+
+ 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 ; then
+ if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then
+ ebegin "Checking that IA32 emulation is enabled in the running kernel"
+ echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
+ local STAT
+ if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
+ "${T}/check-ia32-emulation.elf32"
+ STAT=$?
+ else
+ # Don't fail here to allow single->multi ABI switch
+ # or recover from breakage like bug #646424
+ ewarn "Failed to compile the ABI test. Broken host glibc?"
+ STAT=0
+ fi
+ rm -f "${T}/check-ia32-emulation.elf32"
+ eend $STAT
+ [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."
+ fi
+
+ fi
+
+ # When we actually have to compile something...
+ if ! just_headers && [[ ${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
+
+ 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() {
+ # if the host locales.gen contains no entries, we'll install everything
+ local root="$1"
+ local inplace=""
+
+ if [[ "${root}" == "--inplace-glibc" ]] ; then
+ inplace="--inplace-glibc"
+ root="$2"
+ fi
+
+ local locale_list="${root%/}/etc/locale.gen"
+
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
+ [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
+ locale_list="${root%/}/usr/share/i18n/SUPPORTED"
+ fi
+
+ # bug 736794: we need to be careful with the parallelization... the number of
+ # processors saved in the environment of a binary package may differ strongly
+ # from the number of processes available during postinst
+ local mygenjobs="$(makeopts_jobs)"
+ if [[ "${EMERGE_FROM}" == "binary" ]] ; then
+ mygenjobs="$(nproc)"
+ fi
+
+ set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \
+ --destdir "${root}"
+ echo "$@"
+ "$@"
+
+ popd >/dev/null
+}
+
+glibc_do_src_install() {
+ local builddir=$(builddir nptl)
+ cd "${builddir}"
+
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
+
+ # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
+ # which come without headers etc. Only needed for binary packages since the
+ # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
+ find "${D}" -name "libnsl.a" -delete
+ find "${D}" -name "libnsl.so" -delete
+
+ # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
+ # to infer upstream version:
+ # '#define VERSION "2.26.90"' -> '2.26.90'
+ local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
+
+ # Avoid stripping binaries not targeted by ${CHOST}. Or else
+ # ${CHOST}-strip would break binaries build for ${CTARGET}.
+ is_crosscompile && dostrip -x /
+
+ # gdb thread introspection relies on local libpthreads symbols. stripping breaks it
+ # See Note [Disable automatic stripping]
+ dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
+ # valgrind requires knowledge about ld.so symbols.
+ dostrip -x $(alt_libdir)/ld-*.so*
+
+ if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
+ # Move versioned .a file out of libdir to evade portage QA checks
+ # instead of using gen_usr_ldscript(). We fix ldscript as:
+ # "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..."
+ sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die
+ dodir $(alt_usrlibdir)/${P}
+ mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
+ fi
+
+ # We configure toolchains for standalone prefix systems with a sysroot,
+ # which is prepended to paths in ld scripts, so strip the prefix from these.
+ # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) )
+ # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )
+ if [[ -n $(host_eprefix) ]] ; then
+ local file
+ grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do
+ sed -i "s|$(host_eprefix)/|/|g" "${file}" || die
+ done
+ fi
+
+ # We'll take care of the cache ourselves
+ rm -f "${ED}"/etc/ld.so.cache
+
+ # Everything past this point just needs to be done once ...
+ is_final_abi || return 0
+
+ # Make sure the non-native interp can be found on multilib systems even
+ # if the main library set isn't installed into the right place. Maybe
+ # we should query the active gcc for info instead of hardcoding it ?
+ local i ldso_abi ldso_name
+ local ldso_abi_list=(
+ # x86
+ amd64 /lib64/ld-linux-x86-64.so.2
+ x32 /libx32/ld-linux-x32.so.2
+ x86 /lib/ld-linux.so.2
+ # mips
+ o32 /lib/ld.so.1
+ n32 /lib32/ld.so.1
+ n64 /lib64/ld.so.1
+ # powerpc
+ ppc /lib/ld.so.1
+ # riscv
+ ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
+ ilp32 /lib/ld-linux-riscv32-ilp32.so.1
+ lp64d /lib/ld-linux-riscv64-lp64d.so.1
+ lp64 /lib/ld-linux-riscv64-lp64.so.1
+ # s390
+ s390 /lib/ld.so.1
+ s390x /lib/ld64.so.1
+ # sparc
+ sparc32 /lib/ld-linux.so.2
+ sparc64 /lib64/ld-linux.so.2
+ )
+ case $(tc-endian) in
+ little)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
+ )
+ ;;
+ big)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
+ )
+ ;;
+ esac
+ if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
+ fi
+ for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
+ ldso_abi=${ldso_abi_list[i]}
+ has ${ldso_abi} $(get_install_abis) || continue
+
+ ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
+ if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
+ dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
+ fi
+ done
+
+ # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that require this.
+ # However, binary commercial packages are known to adhere to weird practices.
+ # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
+ # With devpts under Linux mounted properly, we do not need the pt_chown
+ # binary to be setuid. This is because the default owners/perms will be
+ # exactly what we want.
+ if ! use suid ; then
+ find "${ED}" -name pt_chown -exec chmod -s {} +
+ fi
+
+ #################################################################
+ # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
+ #################################################################
+
+ # Make sure we install some symlink hacks so that when we build
+ # a 2nd stage cross-compiler, gcc finds the target system
+ # headers correctly. See gcc/doc/gccinstall.info
+ if is_crosscompile ; then
+ # We need to make sure that /lib and /usr/lib always exists.
+ # gcc likes to use relative paths to get to its multilibs like
+ # /usr/lib/../lib64/. So while we don't install any files into
+ # /usr/lib/, we do need it to exist.
+ keepdir $(alt_prefix)/lib
+ keepdir $(alt_prefix)/usr/lib
+
+ dosym usr/include $(alt_prefix)/sys-include
+ return 0
+ fi
+
+ # Files for Debian-style locale updating
+ dodir /usr/share/i18n
+ sed \
+ -e "/^#/d" \
+ -e "/SUPPORTED-LOCALES=/d" \
+ -e "s: \\\\::g" -e "s:/: :g" \
+ "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
+ || die "generating /usr/share/i18n/SUPPORTED failed"
+
+ cd "${S}" || die
+
+ # Install misc network config files
+ insinto /etc
+ doins posix/gai.conf
+
+ if use systemd ; then
+ doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf"
+ else
+ doins nss/nsswitch.conf
+ fi
+
+ # Gentoo-specific
+ newins "${FILESDIR}"/host.conf-1 host.conf
+
+ if use nscd ; then
+ doins nscd/nscd.conf
+
+ newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd
+
+ local nscd_args=(
+ -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
+ )
+
+ sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
+
+ use systemd && systemd_dounit nscd/nscd.service
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
+ fi
+
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
+ doenvd "${T}"/00glibc
+
+ for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
+ [[ -s ${d} ]] && dodoc ${d}
+ done
+ dodoc -r ChangeLog.old
+
+ # Prevent overwriting of the /etc/localtime symlink. We'll handle the
+ # creation of the "factory" symlink in pkg_postinst().
+ rm -f "${ED}"/etc/localtime
+
+ # Generate all locales if this is a native build as locale generation
+ if use compile-locales && ! is_crosscompile ; then
+ run_locale_gen --inplace-glibc "${ED}/"
+ fi
+}
+
+glibc_headers_install() {
+ local builddir=$(builddir "headers")
+ cd "${builddir}"
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
+
+ insinto $(alt_headers)/gnu
+ doins "${S}"/include/gnu/stubs.h
+
+ # Make sure we install the sys-include symlink so that when
+ # we build a 2nd stage cross-compiler, gcc finds the target
+ # system headers correctly. See gcc/doc/gccinstall.info
+ dosym usr/include $(alt_prefix)/sys-include
+}
+
+src_install() {
+ if just_headers ; then
+ export ABI=default
+ glibc_headers_install
+ return
+ fi
+
+ foreach_abi glibc_do_src_install
+
+ if ! use static-libs ; then
+ einfo "Not installing static glibc libraries"
+ find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
+ fi
+}
+
+# Simple test to make sure our new glibc isn't completely broken.
+# Make sure we don't test with statically built binaries since
+# they will fail. Also, skip if this glibc is a cross compiler.
+#
+# If coreutils is built with USE=multicall, some of these files
+# will just be wrapper scripts, not actual ELFs we can test.
+glibc_sanity_check() {
+ cd / #228809
+
+ # We enter ${ED} so to avoid trouble if the path contains
+ # special characters; for instance if the path contains the
+ # colon character (:), then the linker will try to split it
+ # and look for the libraries in an unexpected place. This can
+ # lead to unsafe code execution if the generated prefix is
+ # within a world-writable directory.
+ # (e.g. /var/tmp/portage:${HOSTNAME})
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ # first let's find the actual dynamic linker here
+ # symlinks may point to the wrong abi
+ local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit)
+
+ einfo Last-minute run tests with ${newldso} in /$(get_libdir) ...
+
+ local x striptest
+ for x in cal date env free ls true uname uptime ; do
+ x=$(type -p ${x})
+ [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
+ striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
+ case ${striptest} in
+ *"statically linked"*) continue;;
+ *"ASCII text"*) continue;;
+ esac
+ # We need to clear the locale settings as the upgrade might want
+ # incompatible locale data. This test is not for verifying that.
+ LC_ALL=C \
+ ${newldso} --library-path . ${x} > /dev/null \
+ || die "simple run test (${x}) failed"
+ done
+
+ popd >/dev/null
+}
+
+pkg_preinst() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ einfo "Checking general environment sanity."
+ sanity_prechecks
+
+ # prepare /etc/ld.so.conf.d/ for files
+ mkdir -p "${EROOT}"/etc/ld.so.conf.d
+
+ # Default /etc/hosts.conf:multi to on for systems with small dbs.
+ if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
+ sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
+ einfo "Defaulting /etc/host.conf:multi to on"
+ fi
+
+ [[ -n ${ROOT} ]] && return 0
+ [[ -d ${ED}/$(get_libdir) ]] || return 0
+ [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
+
+ if [[ -L ${EROOT}/usr/lib/locale ]]; then
+ # Help portage migrate this to a directory
+ # https://bugs.gentoo.org/753740
+ rm "${EROOT}"/usr/lib/locale || die
+ fi
+
+ # Keep around libcrypt so that Perl doesn't break when merging libxcrypt
+ # (libxcrypt is the new provider for now of libcrypt.so.{1,2}).
+ # bug #802207
+ if ! 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
+
+ use compile-locales || run_locale_gen "${EROOT}/"
+ 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-r12.ebuild b/sys-libs/glibc/glibc-2.38-r12.ebuild
new file mode 100644
index 000000000000..9c1814df87de
--- /dev/null
+++ b/sys-libs/glibc/glibc-2.38-r12.ebuild
@@ -0,0 +1,1724 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
+# Please read & adapt the page as necessary if obsolete.
+
+PYTHON_COMPAT=( python3_{10..12} )
+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 ~ia64 ~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=*'
+
+ # 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 gold (for various reasons) #269274.
+ tc-ld-disable-gold
+
+ 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 ; then
+ if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then
+ ebegin "Checking that IA32 emulation is enabled in the running kernel"
+ echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
+ local STAT
+ if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
+ "${T}/check-ia32-emulation.elf32"
+ STAT=$?
+ else
+ # Don't fail here to allow single->multi ABI switch
+ # or recover from breakage like bug #646424
+ ewarn "Failed to compile the ABI test. Broken host glibc?"
+ STAT=0
+ fi
+ rm -f "${T}/check-ia32-emulation.elf32"
+ eend $STAT
+ [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."
+ fi
+
+ fi
+
+ # When we actually have to compile something...
+ if ! just_headers && [[ ${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
+
+ 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() {
+ # if the host locales.gen contains no entries, we'll install everything
+ local root="$1"
+ local inplace=""
+
+ if [[ "${root}" == "--inplace-glibc" ]] ; then
+ inplace="--inplace-glibc"
+ root="$2"
+ fi
+
+ local locale_list="${root%/}/etc/locale.gen"
+
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
+ [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
+ locale_list="${root%/}/usr/share/i18n/SUPPORTED"
+ fi
+
+ # bug 736794: we need to be careful with the parallelization... the number of
+ # processors saved in the environment of a binary package may differ strongly
+ # from the number of processes available during postinst
+ local mygenjobs="$(makeopts_jobs)"
+ if [[ "${EMERGE_FROM}" == "binary" ]] ; then
+ mygenjobs="$(nproc)"
+ fi
+
+ set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \
+ --destdir "${root}"
+ echo "$@"
+ "$@"
+
+ popd >/dev/null
+}
+
+glibc_do_src_install() {
+ local builddir=$(builddir nptl)
+ cd "${builddir}"
+
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
+
+ # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
+ # which come without headers etc. Only needed for binary packages since the
+ # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
+ find "${D}" -name "libnsl.a" -delete
+ find "${D}" -name "libnsl.so" -delete
+
+ # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
+ # to infer upstream version:
+ # '#define VERSION "2.26.90"' -> '2.26.90'
+ local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
+
+ # Avoid stripping binaries not targeted by ${CHOST}. Or else
+ # ${CHOST}-strip would break binaries build for ${CTARGET}.
+ is_crosscompile && dostrip -x /
+
+ # gdb thread introspection relies on local libpthreads symbols. stripping breaks it
+ # See Note [Disable automatic stripping]
+ dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
+ # valgrind requires knowledge about ld.so symbols.
+ dostrip -x $(alt_libdir)/ld-*.so*
+
+ if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
+ # Move versioned .a file out of libdir to evade portage QA checks
+ # instead of using gen_usr_ldscript(). We fix ldscript as:
+ # "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..."
+ sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die
+ dodir $(alt_usrlibdir)/${P}
+ mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
+ fi
+
+ # We configure toolchains for standalone prefix systems with a sysroot,
+ # which is prepended to paths in ld scripts, so strip the prefix from these.
+ # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) )
+ # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )
+ if [[ -n $(host_eprefix) ]] ; then
+ local file
+ grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do
+ sed -i "s|$(host_eprefix)/|/|g" "${file}" || die
+ done
+ fi
+
+ # We'll take care of the cache ourselves
+ rm -f "${ED}"/etc/ld.so.cache
+
+ # Everything past this point just needs to be done once ...
+ is_final_abi || return 0
+
+ # Make sure the non-native interp can be found on multilib systems even
+ # if the main library set isn't installed into the right place. Maybe
+ # we should query the active gcc for info instead of hardcoding it ?
+ local i ldso_abi ldso_name
+ local ldso_abi_list=(
+ # x86
+ amd64 /lib64/ld-linux-x86-64.so.2
+ x32 /libx32/ld-linux-x32.so.2
+ x86 /lib/ld-linux.so.2
+ # mips
+ o32 /lib/ld.so.1
+ n32 /lib32/ld.so.1
+ n64 /lib64/ld.so.1
+ # powerpc
+ ppc /lib/ld.so.1
+ # riscv
+ ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
+ ilp32 /lib/ld-linux-riscv32-ilp32.so.1
+ lp64d /lib/ld-linux-riscv64-lp64d.so.1
+ lp64 /lib/ld-linux-riscv64-lp64.so.1
+ # s390
+ s390 /lib/ld.so.1
+ s390x /lib/ld64.so.1
+ # sparc
+ sparc32 /lib/ld-linux.so.2
+ sparc64 /lib64/ld-linux.so.2
+ )
+ case $(tc-endian) in
+ little)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
+ )
+ ;;
+ big)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
+ )
+ ;;
+ esac
+ if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
+ fi
+ for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
+ ldso_abi=${ldso_abi_list[i]}
+ has ${ldso_abi} $(get_install_abis) || continue
+
+ ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
+ if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
+ dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
+ fi
+ done
+
+ # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that require this.
+ # However, binary commercial packages are known to adhere to weird practices.
+ # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
+ # With devpts under Linux mounted properly, we do not need the pt_chown
+ # binary to be setuid. This is because the default owners/perms will be
+ # exactly what we want.
+ if ! use suid ; then
+ find "${ED}" -name pt_chown -exec chmod -s {} +
+ fi
+
+ #################################################################
+ # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
+ #################################################################
+
+ # Make sure we install some symlink hacks so that when we build
+ # a 2nd stage cross-compiler, gcc finds the target system
+ # headers correctly. See gcc/doc/gccinstall.info
+ if is_crosscompile ; then
+ # We need to make sure that /lib and /usr/lib always exists.
+ # gcc likes to use relative paths to get to its multilibs like
+ # /usr/lib/../lib64/. So while we don't install any files into
+ # /usr/lib/, we do need it to exist.
+ keepdir $(alt_prefix)/lib
+ keepdir $(alt_prefix)/usr/lib
+
+ dosym usr/include $(alt_prefix)/sys-include
+ return 0
+ fi
+
+ # Files for Debian-style locale updating
+ dodir /usr/share/i18n
+ sed \
+ -e "/^#/d" \
+ -e "/SUPPORTED-LOCALES=/d" \
+ -e "s: \\\\::g" -e "s:/: :g" \
+ "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
+ || die "generating /usr/share/i18n/SUPPORTED failed"
+
+ cd "${S}" || die
+
+ # Install misc network config files
+ insinto /etc
+ doins posix/gai.conf
+
+ if use systemd ; then
+ doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf"
+ else
+ doins nss/nsswitch.conf
+ fi
+
+ # Gentoo-specific
+ newins "${FILESDIR}"/host.conf-1 host.conf
+
+ if use nscd ; then
+ doins nscd/nscd.conf
+
+ newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd
+
+ local nscd_args=(
+ -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
+ )
+
+ sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
+
+ use systemd && systemd_dounit nscd/nscd.service
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
+ fi
+
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
+ doenvd "${T}"/00glibc
+
+ for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
+ [[ -s ${d} ]] && dodoc ${d}
+ done
+ dodoc -r ChangeLog.old
+
+ # Prevent overwriting of the /etc/localtime symlink. We'll handle the
+ # creation of the "factory" symlink in pkg_postinst().
+ rm -f "${ED}"/etc/localtime
+
+ # Generate all locales if this is a native build as locale generation
+ if use compile-locales && ! is_crosscompile ; then
+ run_locale_gen --inplace-glibc "${ED}/"
+ fi
+}
+
+glibc_headers_install() {
+ local builddir=$(builddir "headers")
+ cd "${builddir}"
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
+
+ insinto $(alt_headers)/gnu
+ doins "${S}"/include/gnu/stubs.h
+
+ # Make sure we install the sys-include symlink so that when
+ # we build a 2nd stage cross-compiler, gcc finds the target
+ # system headers correctly. See gcc/doc/gccinstall.info
+ dosym usr/include $(alt_prefix)/sys-include
+}
+
+src_install() {
+ if just_headers ; then
+ export ABI=default
+ glibc_headers_install
+ return
+ fi
+
+ foreach_abi glibc_do_src_install
+
+ if ! use static-libs ; then
+ einfo "Not installing static glibc libraries"
+ find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
+ fi
+}
+
+# Simple test to make sure our new glibc isn't completely broken.
+# Make sure we don't test with statically built binaries since
+# they will fail. Also, skip if this glibc is a cross compiler.
+#
+# If coreutils is built with USE=multicall, some of these files
+# will just be wrapper scripts, not actual ELFs we can test.
+glibc_sanity_check() {
+ cd / #228809
+
+ # We enter ${ED} so to avoid trouble if the path contains
+ # special characters; for instance if the path contains the
+ # colon character (:), then the linker will try to split it
+ # and look for the libraries in an unexpected place. This can
+ # lead to unsafe code execution if the generated prefix is
+ # within a world-writable directory.
+ # (e.g. /var/tmp/portage:${HOSTNAME})
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ # first let's find the actual dynamic linker here
+ # symlinks may point to the wrong abi
+ local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit)
+
+ einfo Last-minute run tests with ${newldso} in /$(get_libdir) ...
+
+ local x striptest
+ for x in cal date env free ls true uname uptime ; do
+ x=$(type -p ${x})
+ [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
+ striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
+ case ${striptest} in
+ *"statically linked"*) continue;;
+ *"ASCII text"*) continue;;
+ esac
+ # We need to clear the locale settings as the upgrade might want
+ # incompatible locale data. This test is not for verifying that.
+ LC_ALL=C \
+ ${newldso} --library-path . ${x} > /dev/null \
+ || die "simple run test (${x}) failed"
+ done
+
+ popd >/dev/null
+}
+
+pkg_preinst() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ einfo "Checking general environment sanity."
+ sanity_prechecks
+
+ # prepare /etc/ld.so.conf.d/ for files
+ mkdir -p "${EROOT}"/etc/ld.so.conf.d
+
+ # Default /etc/hosts.conf:multi to on for systems with small dbs.
+ if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
+ sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
+ einfo "Defaulting /etc/host.conf:multi to on"
+ fi
+
+ [[ -n ${ROOT} ]] && return 0
+ [[ -d ${ED}/$(get_libdir) ]] || return 0
+ [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
+
+ if [[ -L ${EROOT}/usr/lib/locale ]]; then
+ # Help portage migrate this to a directory
+ # https://bugs.gentoo.org/753740
+ rm "${EROOT}"/usr/lib/locale || die
+ fi
+
+ # Keep around libcrypt so that Perl doesn't break when merging libxcrypt
+ # (libxcrypt is the new provider for now of libcrypt.so.{1,2}).
+ # bug #802207
+ if ! 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
+
+ use compile-locales || run_locale_gen "${EROOT}/"
+ 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-r3.ebuild b/sys-libs/glibc/glibc-2.39-r3.ebuild
new file mode 100644
index 000000000000..1e6aadbb04e3
--- /dev/null
+++ b/sys-libs/glibc/glibc-2.39-r3.ebuild
@@ -0,0 +1,1724 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
+# Please read & adapt the page as necessary if obsolete.
+
+PYTHON_COMPAT=( python3_{10..12} )
+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=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"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa -ia64 ~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 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
+)
+
+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=*'
+
+ # 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 cet; then
+ if use amd64 || use x86; then
+ append-flags '-fcf-protection=none'
+ elif use arm64; then
+ append-flags '-mbranch-protection=none'
+ fi
+ 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 gold (for various reasons) #269274.
+ tc-ld-disable-gold
+
+ 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 ; then
+ if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then
+ ebegin "Checking that IA32 emulation is enabled in the running kernel"
+ echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
+ local STAT
+ if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
+ "${T}/check-ia32-emulation.elf32"
+ STAT=$?
+ else
+ # Don't fail here to allow single->multi ABI switch
+ # or recover from breakage like bug #646424
+ ewarn "Failed to compile the ABI test. Broken host glibc?"
+ STAT=0
+ fi
+ rm -f "${T}/check-ia32-emulation.elf32"
+ eend $STAT
+ [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."
+ fi
+
+ fi
+
+ # When we actually have to compile something...
+ if ! just_headers && [[ ${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
+
+ 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
+
+ for myt in ${XFAIL_TEST_LIST[@]} ; do
+ myxfailparams+="test-xfail-${myt}=yes "
+ done
+ fi
+
+ # sandbox does not understand unshare() and prevents
+ # writes to /proc/, which makes many tests fail
+
+ # we give the tests a bit more time to avoid spurious
+ # bug reports on slow arches
+
+ SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check
+}
+
+src_test() {
+ if just_headers ; then
+ return
+ fi
+
+ foreach_abi glibc_src_test || die "tests failed"
+}
+
+# src_install
+
+run_locale_gen() {
+ # if the host locales.gen contains no entries, we'll install everything
+ local root="$1"
+ local inplace=""
+
+ if [[ "${root}" == "--inplace-glibc" ]] ; then
+ inplace="--inplace-glibc"
+ root="$2"
+ fi
+
+ local locale_list="${root%/}/etc/locale.gen"
+
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
+ [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
+ locale_list="${root%/}/usr/share/i18n/SUPPORTED"
+ fi
+
+ # bug 736794: we need to be careful with the parallelization... the number of
+ # processors saved in the environment of a binary package may differ strongly
+ # from the number of processes available during postinst
+ local mygenjobs="$(makeopts_jobs)"
+ if [[ "${EMERGE_FROM}" == "binary" ]] ; then
+ mygenjobs="$(nproc)"
+ fi
+
+ set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \
+ --destdir "${root}"
+ echo "$@"
+ "$@"
+
+ popd >/dev/null
+}
+
+glibc_do_src_install() {
+ local builddir=$(builddir nptl)
+ cd "${builddir}"
+
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
+
+ # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
+ # which come without headers etc. Only needed for binary packages since the
+ # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
+ find "${D}" -name "libnsl.a" -delete
+ find "${D}" -name "libnsl.so" -delete
+
+ # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
+ # to infer upstream version:
+ # '#define VERSION "2.26.90"' -> '2.26.90'
+ local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
+
+ # Avoid stripping binaries not targeted by ${CHOST}. Or else
+ # ${CHOST}-strip would break binaries build for ${CTARGET}.
+ is_crosscompile && dostrip -x /
+
+ # gdb thread introspection relies on local libpthreads symbols. stripping breaks it
+ # See Note [Disable automatic stripping]
+ dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
+ # valgrind requires knowledge about ld.so symbols.
+ dostrip -x $(alt_libdir)/ld-*.so*
+
+ if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
+ # Move versioned .a file out of libdir to evade portage QA checks
+ # instead of using gen_usr_ldscript(). We fix ldscript as:
+ # "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..."
+ sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die
+ dodir $(alt_usrlibdir)/${P}
+ mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
+ fi
+
+ # We configure toolchains for standalone prefix systems with a sysroot,
+ # which is prepended to paths in ld scripts, so strip the prefix from these.
+ # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) )
+ # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )
+ if [[ -n $(host_eprefix) ]] ; then
+ local file
+ grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do
+ sed -i "s|$(host_eprefix)/|/|g" "${file}" || die
+ done
+ fi
+
+ # We'll take care of the cache ourselves
+ rm -f "${ED}"/etc/ld.so.cache
+
+ # Everything past this point just needs to be done once ...
+ is_final_abi || return 0
+
+ # Make sure the non-native interp can be found on multilib systems even
+ # if the main library set isn't installed into the right place. Maybe
+ # we should query the active gcc for info instead of hardcoding it ?
+ local i ldso_abi ldso_name
+ local ldso_abi_list=(
+ # x86
+ amd64 /lib64/ld-linux-x86-64.so.2
+ x32 /libx32/ld-linux-x32.so.2
+ x86 /lib/ld-linux.so.2
+ # mips
+ o32 /lib/ld.so.1
+ n32 /lib32/ld.so.1
+ n64 /lib64/ld.so.1
+ # powerpc
+ ppc /lib/ld.so.1
+ # riscv
+ ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
+ ilp32 /lib/ld-linux-riscv32-ilp32.so.1
+ lp64d /lib/ld-linux-riscv64-lp64d.so.1
+ lp64 /lib/ld-linux-riscv64-lp64.so.1
+ # s390
+ s390 /lib/ld.so.1
+ s390x /lib/ld64.so.1
+ # sparc
+ sparc32 /lib/ld-linux.so.2
+ sparc64 /lib64/ld-linux.so.2
+ )
+ case $(tc-endian) in
+ little)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
+ )
+ ;;
+ big)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
+ )
+ ;;
+ esac
+ if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
+ fi
+ for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
+ ldso_abi=${ldso_abi_list[i]}
+ has ${ldso_abi} $(get_install_abis) || continue
+
+ ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
+ if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
+ dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
+ fi
+ done
+
+ # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that require this.
+ # However, binary commercial packages are known to adhere to weird practices.
+ # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
+ # With devpts under Linux mounted properly, we do not need the pt_chown
+ # binary to be setuid. This is because the default owners/perms will be
+ # exactly what we want.
+ if ! use suid ; then
+ find "${ED}" -name pt_chown -exec chmod -s {} +
+ fi
+
+ #################################################################
+ # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
+ #################################################################
+
+ # Make sure we install some symlink hacks so that when we build
+ # a 2nd stage cross-compiler, gcc finds the target system
+ # headers correctly. See gcc/doc/gccinstall.info
+ if is_crosscompile ; then
+ # We need to make sure that /lib and /usr/lib always exists.
+ # gcc likes to use relative paths to get to its multilibs like
+ # /usr/lib/../lib64/. So while we don't install any files into
+ # /usr/lib/, we do need it to exist.
+ keepdir $(alt_prefix)/lib
+ keepdir $(alt_prefix)/usr/lib
+
+ dosym usr/include $(alt_prefix)/sys-include
+ return 0
+ fi
+
+ # Files for Debian-style locale updating
+ dodir /usr/share/i18n
+ sed \
+ -e "/^#/d" \
+ -e "/SUPPORTED-LOCALES=/d" \
+ -e "s: \\\\::g" -e "s:/: :g" \
+ "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
+ || die "generating /usr/share/i18n/SUPPORTED failed"
+
+ cd "${S}" || die
+
+ # Install misc network config files
+ insinto /etc
+ doins posix/gai.conf
+
+ if use systemd ; then
+ doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf"
+ else
+ doins nss/nsswitch.conf
+ fi
+
+ # Gentoo-specific
+ newins "${FILESDIR}"/host.conf-1 host.conf
+
+ if use nscd ; then
+ doins nscd/nscd.conf
+
+ newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd
+
+ local nscd_args=(
+ -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
+ )
+
+ sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
+
+ use systemd && systemd_dounit nscd/nscd.service
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
+ fi
+
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
+ doenvd "${T}"/00glibc
+
+ for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
+ [[ -s ${d} ]] && dodoc ${d}
+ done
+ dodoc -r ChangeLog.old
+
+ # Prevent overwriting of the /etc/localtime symlink. We'll handle the
+ # creation of the "factory" symlink in pkg_postinst().
+ rm -f "${ED}"/etc/localtime
+
+ # Generate all locales if this is a native build as locale generation
+ if use compile-locales && ! is_crosscompile ; then
+ run_locale_gen --inplace-glibc "${ED}/"
+ fi
+}
+
+glibc_headers_install() {
+ local builddir=$(builddir "headers")
+ cd "${builddir}"
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
+
+ insinto $(alt_headers)/gnu
+ doins "${S}"/include/gnu/stubs.h
+
+ # Make sure we install the sys-include symlink so that when
+ # we build a 2nd stage cross-compiler, gcc finds the target
+ # system headers correctly. See gcc/doc/gccinstall.info
+ dosym usr/include $(alt_prefix)/sys-include
+}
+
+src_install() {
+ if just_headers ; then
+ export ABI=default
+ glibc_headers_install
+ return
+ fi
+
+ foreach_abi glibc_do_src_install
+
+ if ! use static-libs ; then
+ einfo "Not installing static glibc libraries"
+ find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
+ fi
+}
+
+# Simple test to make sure our new glibc isn't completely broken.
+# Make sure we don't test with statically built binaries since
+# they will fail. Also, skip if this glibc is a cross compiler.
+#
+# If coreutils is built with USE=multicall, some of these files
+# will just be wrapper scripts, not actual ELFs we can test.
+glibc_sanity_check() {
+ cd / #228809
+
+ # We enter ${ED} so to avoid trouble if the path contains
+ # special characters; for instance if the path contains the
+ # colon character (:), then the linker will try to split it
+ # and look for the libraries in an unexpected place. This can
+ # lead to unsafe code execution if the generated prefix is
+ # within a world-writable directory.
+ # (e.g. /var/tmp/portage:${HOSTNAME})
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ # first let's find the actual dynamic linker here
+ # symlinks may point to the wrong abi
+ local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit)
+
+ einfo Last-minute run tests with ${newldso} in /$(get_libdir) ...
+
+ local x striptest
+ for x in cal date env free ls true uname uptime ; do
+ x=$(type -p ${x})
+ [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
+ striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
+ case ${striptest} in
+ *"statically linked"*) continue;;
+ *"ASCII text"*) continue;;
+ esac
+ # We need to clear the locale settings as the upgrade might want
+ # incompatible locale data. This test is not for verifying that.
+ LC_ALL=C \
+ ${newldso} --library-path . ${x} > /dev/null \
+ || die "simple run test (${x}) failed"
+ done
+
+ popd >/dev/null
+}
+
+pkg_preinst() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ einfo "Checking general environment sanity."
+ sanity_prechecks
+
+ # prepare /etc/ld.so.conf.d/ for files
+ mkdir -p "${EROOT}"/etc/ld.so.conf.d
+
+ # Default /etc/hosts.conf:multi to on for systems with small dbs.
+ if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
+ sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
+ einfo "Defaulting /etc/host.conf:multi to on"
+ fi
+
+ [[ -n ${ROOT} ]] && return 0
+ [[ -d ${ED}/$(get_libdir) ]] || return 0
+ [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
+
+ if [[ -L ${EROOT}/usr/lib/locale ]]; then
+ # Help portage migrate this to a directory
+ # https://bugs.gentoo.org/753740
+ rm "${EROOT}"/usr/lib/locale || die
+ fi
+
+ # Keep around libcrypt so that Perl doesn't break when merging libxcrypt
+ # (libxcrypt is the new provider for now of libcrypt.so.{1,2}).
+ # bug #802207
+ if has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then
+ PRESERVED_OLD_LIBCRYPT=1
+ cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" "${T}/libcrypt$(get_libname 1)" || die
+ else
+ PRESERVED_OLD_LIBCRYPT=0
+ fi
+}
+
+glibc_refresh_ldconfig() {
+ if [[ ${MERGE_TYPE} == buildonly ]]; then
+ return
+ fi
+
+ # Version check could be added to avoid unnecessary work, but ldconfig
+ # should finish quickly enough to not matter.
+ ebegin "Refreshing ld.so.cache"
+ ldconfig -i
+ if ! eend $?; then
+ ewarn "Failed to refresh the ld.so.cache for you. Some programs may be broken"
+ ewarn "before you manually do so (ldconfig -i)."
+ fi
+}
+
+pkg_postinst() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then
+ # Generate fastloading iconv module configuration file.
+ "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/"
+ fi
+
+ if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
+ # glibc-2.38+ on loong has ldconfig support added, but the ELF e_flags
+ # handling has changed as well, which means stale ldconfig auxiliary
+ # cache entries and failure to lookup libgcc_s / libstdc++ (breaking
+ # every C++ application) / libgomp etc., among other breakages.
+ #
+ # To fix this, simply refresh the ld.so.cache without using the
+ # auxiliary cache if we're natively installing on loong. This should
+ # be done relatively soon because we want to minimize the breakage
+ # window for the affected programs.
+ use loong && glibc_refresh_ldconfig
+
+ use compile-locales || run_locale_gen "${EROOT}/"
+ 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
index 80dd186c1af6..c3dce15e7e99 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -1,15 +1,12 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
# Please read & adapt the page as necessary if obsolete.
-# We avoid Python 3.10 here _for now_ (it does work!) to avoid circular dependencies
-# on upgrades as people migrate to libxcrypt.
-# https://wiki.gentoo.org/wiki/User:Sam/Portage_help/Circular_dependencies#Python_and_libcrypt
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{10..12} )
TMPFILES_OPTIONAL=1
inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
@@ -23,37 +20,38 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=2
+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"
+
if [[ ${PV} == 9999* ]]; then
inherit git-r3
else
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- KEYWORDS=""
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa -ia64 ~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.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"
+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
@@ -94,6 +92,8 @@ fi
# * 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.
@@ -103,17 +103,21 @@ fi
# Lastly, let's avoid some openssh nastiness, bug 708224, as
# convenience to our users.
-# gzip, grep, awk are needed by locale-gen, bug 740750
-
+IDEPEND="
+ !compile-locales? ( sys-apps/locale-gen )
+"
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
- virtual/awk
+ 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="
@@ -124,23 +128,14 @@ COMMON_DEPEND="
) )
suid? ( caps? ( sys-libs/libcap ) )
selinux? ( sys-libs/libselinux )
- systemtap? ( dev-util/systemtap )
+ systemtap? ( dev-debug/systemtap )
"
DEPEND="${COMMON_DEPEND}
- compile-locales? (
- app-arch/gzip
- sys-apps/grep
- virtual/awk
- )
- test? ( >=net-dns/libidn2-2.3.0 )
"
RDEPEND="${COMMON_DEPEND}
- app-arch/gzip
- sys-apps/grep
- virtual/awk
- sys-apps/gentoo-functions
!<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
- !<net-misc/openssh-8.1_p1-r2
+ !<sys-apps/systemd-${MIN_SYSTEMD_VER}
+ perl? ( dev-lang/perl )
"
RESTRICT="!test? ( test )"
@@ -148,13 +143,13 @@ RESTRICT="!test? ( test )"
if [[ ${CATEGORY} == cross-* ]] ; then
BDEPEND+=" !headers-only? (
>=${CATEGORY}/binutils-2.27
- >=${CATEGORY}/gcc-6
+ >=${CATEGORY}/gcc-6.2
)"
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
else
BDEPEND+="
>=sys-devel/binutils-2.27
- >=sys-devel/gcc-6
+ >=sys-devel/gcc-6.2
"
DEPEND+=" virtual/os-headers "
RDEPEND+="
@@ -170,30 +165,60 @@ 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
+
+ # Fails with certain PORTAGE_NICENESS/PORTAGE_SCHEDULING_POLICY
+ tst-sched1
+
+ # Fails regularly, unreliable
+ tst-valgrind-smoke
+)
+
+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} ]]
}
@@ -260,8 +285,8 @@ do_compile_test() {
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})}"
+ # We assume CC is already set up.
+ nonfatal emake glibc-test
ret=$?
popd >/dev/null
@@ -316,22 +341,37 @@ setup_target_flags() {
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.
- [[ ${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})"
+ 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)
@@ -409,6 +449,7 @@ setup_flags() {
fi
strip-unsupported-flags
+ filter-lto
filter-flags -m32 -m64 '-mabi=*'
# glibc aborts if rpath is set by LDFLAGS
@@ -418,9 +459,22 @@ setup_flags() {
# 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=*'
+
+ # 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
@@ -438,36 +492,33 @@ setup_flags() {
# 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*'
-}
-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}
+ # 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
+ if use amd64 || use x86; then
+ append-flags '-fcf-protection=none'
+ elif use arm64; then
+ append-flags '-mbranch-protection=none'
+ fi
+ fi
}
use_multiarch() {
@@ -536,15 +587,22 @@ setup_env() {
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})}}
+ 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 __ORIC_CC and __ORIG_CXX is defined now.
- export __ORIG_CC=${CC}
- export __ORIG_CXX=${CXX}
+ # 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
@@ -553,12 +611,15 @@ setup_env() {
# 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=$(binutils-config -B)
- local current_gcc_path=$(gcc-config -B)
+ 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"
@@ -582,6 +643,7 @@ setup_env() {
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
@@ -596,10 +658,11 @@ setup_env() {
# 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 glibc__GLIBC_CC=${CC}
+ export glibc__GLIBC_CXX=${CXX}
+ export glibc__GLIBC_CPP=${CPP}
- export __abi_CFLAGS="$(get_abi_CFLAGS)"
+ 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
@@ -608,14 +671,16 @@ setup_env() {
# 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}"
+ 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_CXX} ${__abi_CFLAGS} ${CFLAGS}"
+ 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 buil first time
- # when ${CTARGET}-g++ is not available yet. We avoid
+ # 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
@@ -647,7 +712,7 @@ foreach_abi() {
glibc_banner() {
local b="Gentoo ${PVR}"
- [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}"
+ [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" (patchset ${PATCH_VER})"
echo "${b}"
}
@@ -743,13 +808,6 @@ sanity_prechecks() {
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."
@@ -770,7 +828,7 @@ sanity_prechecks() {
ebegin "Checking that IA32 emulation is enabled in the running kernel"
echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
local STAT
- if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
+ 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
@@ -788,12 +846,12 @@ sanity_prechecks() {
# When we actually have to compile something...
if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; 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!"
+ 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
@@ -813,17 +871,27 @@ sanity_prechecks() {
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!"
+ # 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
@@ -831,6 +899,7 @@ upgrade_warning() {
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
@@ -844,12 +913,11 @@ upgrade_warning() {
# pkg_pretend
pkg_pretend() {
- # All the checks...
- einfo "Checking general environment sanity."
- sanity_prechecks
upgrade_warning
}
+# pkg_setup
+
pkg_setup() {
# see bug 682570
[[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup
@@ -858,13 +926,13 @@ pkg_setup() {
# src_unpack
src_unpack() {
- # Consistency is not guaranteed between pkg_ and src_ ...
+ setup_env
+
+ einfo "Checking general environment sanity."
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
@@ -878,79 +946,51 @@ src_unpack() {
unpack ${P}.tar.xz
cd "${WORKDIR}" || die
- unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
+ unpack glibc-${PV}-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
+
src_prepare() {
local patchsetname
if ! use vanilla ; then
if [[ ${PV} == 9999* ]] ; then
patchsetname="from git master"
else
- patchsetname="${RELEASE_VER}-${PATCH_VER}"
+ patchsetname="${PV}-${PATCH_VER}"
fi
- einfo "Applying Gentoo Glibc Patchset ${patchsetname}"
+ 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}"
+ cd "${WORKDIR}" || die
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}"
+ cd "${S}" || die
}
-glibc_do_configure() {
+# src_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
+glibc_do_configure() {
+ dump_build_environment
- 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 )
+ # 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:
@@ -958,14 +998,13 @@ glibc_do_configure() {
# 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) ;;
+ 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) ) ;;
+ case ${ABI}-${CTARGET} in
+ amd64-x86_64-*|x32-x86_64-*-*-gnux32) myconf+=( $(use_enable cet) ) ;;
*) ;;
esac
@@ -1000,9 +1039,9 @@ glibc_do_configure() {
fi
myconf+=(
- --without-cvs
--disable-werror
--enable-bind-now
+ --enable-fortify-source
--build=${CBUILD_OPT:-${CBUILD}}
--host=${CTARGET_OPT:-${CTARGET}}
$(use_enable profile)
@@ -1017,24 +1056,26 @@ glibc_do_configure() {
--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)
+ # /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
+ # 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}
)
@@ -1051,11 +1092,6 @@ glibc_do_configure() {
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}"
@@ -1063,23 +1099,13 @@ glibc_do_configure() {
echo "$@"
"$@" || die "failed to configure glibc"
- # ia64 static cross-compilers are a pita in so much that they
- # can't produce static ELFs (as the libgcc.a is broken). so
- # disable building of the programs for those targets if it
- # doesn't work.
- # XXX: We could turn this into a compiler test, but ia64 is
- # the only one that matters, so this should be fine for now.
- if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
- sed -i '1i+link-static = touch $@' config.make
- fi
-
# If we're trying to migrate between ABI sets, we need
# to lie and use a local copy of gcc. Like if the system
# is built with MULTILIB_ABIS="amd64 x86" but we want to
# add x32 to it, gcc/glibc don't yet support x32.
#
if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then
- echo 'main(){}' > "${T}"/test.c
+ 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
@@ -1098,7 +1124,7 @@ glibc_headers_configure() {
# 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_{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
@@ -1149,7 +1175,15 @@ glibc_headers_configure() {
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
@@ -1168,11 +1202,9 @@ glibc_headers_configure() {
) ;;
esac
- local myconf=()
myconf+=(
--disable-sanity-checks
--enable-hacker-mode
- --without-cvs
--disable-werror
--enable-bind-now
--build=${CBUILD_OPT:-${CBUILD}}
@@ -1214,6 +1246,8 @@ src_configure() {
foreach_abi do_src_configure
}
+# src_compile
+
do_src_compile() {
emake -C "$(builddir nptl)"
}
@@ -1226,11 +1260,19 @@ src_compile() {
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
@@ -1239,16 +1281,10 @@ glibc_src_test() {
# 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
+ # we give the tests a bit more time to avoid spurious
+ # bug reports on slow arches
- glibc_src_test
- : $(( ret |= $? ))
-
- return ${ret}
+ SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check
}
src_test() {
@@ -1256,12 +1292,11 @@ src_test() {
return
fi
- # Give tests more time to complete.
- export TIMEOUTFACTOR=5
-
- foreach_abi do_src_test || die "tests failed"
+ foreach_abi glibc_src_test || die "tests failed"
}
+# src_install
+
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
@@ -1281,7 +1316,15 @@ run_locale_gen() {
locale_list="${root%/}/usr/share/i18n/SUPPORTED"
fi
- set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
+ # bug 736794: we need to be careful with the parallelization... the number of
+ # processors saved in the environment of a binary package may differ strongly
+ # from the number of processes available during postinst
+ local mygenjobs="$(makeopts_jobs)"
+ if [[ "${EMERGE_FROM}" == "binary" ]] ; then
+ mygenjobs="$(nproc)"
+ fi
+
+ set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \
--destdir "${root}"
echo "$@"
"$@"
@@ -1309,9 +1352,12 @@ glibc_do_src_install() {
# 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
+
+ # 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
@@ -1322,6 +1368,17 @@ glibc_do_src_install() {
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
@@ -1416,6 +1473,8 @@ glibc_do_src_install() {
#################################################################
# 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
@@ -1439,15 +1498,8 @@ glibc_do_src_install() {
-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}"
+ cd "${S}" || die
# Install misc network config files
insinto /etc
@@ -1492,7 +1544,6 @@ glibc_do_src_install() {
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
- sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
fi
}
@@ -1572,6 +1623,9 @@ 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
@@ -1594,7 +1648,7 @@ pkg_preinst() {
# 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
+ 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
@@ -1602,6 +1656,21 @@ pkg_preinst() {
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
@@ -1612,6 +1681,17 @@ pkg_postinst() {
fi
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
+ # glibc-2.38+ on loong has ldconfig support added, but the ELF e_flags
+ # handling has changed as well, which means stale ldconfig auxiliary
+ # cache entries and failure to lookup libgcc_s / libstdc++ (breaking
+ # every C++ application) / libgomp etc., among other breakages.
+ #
+ # To fix this, simply refresh the ld.so.cache without using the
+ # auxiliary cache if we're natively installing on loong. This should
+ # be done relatively soon because we want to minimize the breakage
+ # window for the affected programs.
+ use loong && glibc_refresh_ldconfig
+
use compile-locales || run_locale_gen "${EROOT}/"
fi
@@ -1621,7 +1701,7 @@ pkg_postinst() {
if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
local entry
for entry in passwd group shadow; do
- if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
+ 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"
diff --git a/sys-libs/glibc/metadata.xml b/sys-libs/glibc/metadata.xml
index 613e58eff7ee..846d01d34e0c 100644
--- a/sys-libs/glibc/metadata.xml
+++ b/sys-libs/glibc/metadata.xml
@@ -1,26 +1,30 @@
<?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="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="gd">build memusage and memusagestat tools</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="ssp">protect stack of glibc internals</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 systemtap static probe points</flag>
-</use>
-<upstream>
- <remote-id type="cpe">cpe:/a:gnu:glibc</remote-id>
-</upstream>
+ <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="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="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 systemtap static probe points</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:gnu:glibc</remote-id>
+ </upstream>
</pkgmetadata>
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
new file mode 100644
index 000000000000..51d047c465cc
--- /dev/null
+++ b/sys-libs/gpm/files/gpm-1.20.7-gcc-include.patch
@@ -0,0 +1,18 @@
+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-musl.patch b/sys-libs/gpm/files/gpm-1.20.7-musl.patch
new file mode 100644
index 000000000000..37f8542a87aa
--- /dev/null
+++ b/sys-libs/gpm/files/gpm-1.20.7-musl.patch
@@ -0,0 +1,143 @@
+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
new file mode 100644
index 000000000000..3904bfd6cca3
--- /dev/null
+++ b/sys-libs/gpm/files/gpm-1.20.7-signedness.patch
@@ -0,0 +1,20 @@
+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-warnings.patch b/sys-libs/gpm/files/gpm-1.20.7-warnings.patch
new file mode 100644
index 000000000000..21838ee24bf5
--- /dev/null
+++ b/sys-libs/gpm/files/gpm-1.20.7-warnings.patch
@@ -0,0 +1,202 @@
+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.service-r1 b/sys-libs/gpm/files/gpm.service-r1
new file mode 100644
index 000000000000..105649870aa0
--- /dev/null
+++ b/sys-libs/gpm/files/gpm.service-r1
@@ -0,0 +1,11 @@
+[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-r5.ebuild b/sys-libs/gpm/gpm-1.20.7-r5.ebuild
new file mode 100644
index 000000000000..738560a07fb2
--- /dev/null
+++ b/sys-libs/gpm/gpm-1.20.7-r5.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic linux-info systemd usr-ldscript 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
+ mirror://gentoo/${P}-docs.patch.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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() {
+ # 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
+ gen_usr_ldscript -a gpm
+}
+
+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/gpm-1.20.7-r3.ebuild b/sys-libs/gpm/gpm-1.20.7-r6.ebuild
index 7554d790cd56..3ad21ff8191c 100644
--- a/sys-libs/gpm/gpm-1.20.7-r3.ebuild
+++ b/sys-libs/gpm/gpm-1.20.7-r6.ebuild
@@ -1,11 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# emacs support disabled due to #99533 #335900
+EAPI=8
-EAPI=7
-
-inherit autotools linux-info systemd usr-ldscript multilib-minimal
+inherit autotools flag-o-matic linux-info systemd multilib-minimal
DESCRIPTION="Console-based mouse driver"
HOMEPAGE="https://www.nico.schottelius.org/software/gpm/"
@@ -15,7 +13,7 @@ SRC_URI="
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="selinux"
RDEPEND="
@@ -25,7 +23,7 @@ DEPEND="${RDEPEND}"
BDEPEND="
app-arch/xz-utils
sys-apps/texinfo
- virtual/yacc"
+ app-alternatives/yacc"
CONFIG_CHECK="~INPUT_MOUSEDEV"
ERROR_INPUT_MOUSEDEV="CONFIG_INPUT_MOUSEDEV:\tis not set (required to expose mice for GPM)"
@@ -44,13 +42,18 @@ src_prepare() {
# 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
+ # Fix ABI values
sed -i \
-e '/^abi_lev=/s:=.*:=1:' \
-e '/^abi_age=/s:=.*:=20:' \
@@ -68,6 +71,11 @@ src_prepare() {
}
multilib_src_configure() {
+ # 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 \
@@ -93,7 +101,6 @@ multilib_src_install() {
_emake DESTDIR="${D}" install
dosym libgpm.so.1 /usr/$(get_libdir)/libgpm.so
- gen_usr_ldscript -a gpm
}
multilib_src_install_all() {
@@ -104,5 +111,5 @@ multilib_src_install_all() {
newinitd "${FILESDIR}"/gpm.rc6-2 gpm
newconfd "${FILESDIR}"/gpm.conf.d gpm
- systemd_dounit "${FILESDIR}"/gpm.service
+ systemd_newunit "${FILESDIR}"/gpm.service-r1 gpm.service
}
diff --git a/sys-libs/gpm/metadata.xml b/sys-libs/gpm/metadata.xml
index 73dda144f9ac..938b813536bf 100644
--- a/sys-libs/gpm/metadata.xml
+++ b/sys-libs/gpm/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">telmich/gpm</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/gwenhywfar/Manifest b/sys-libs/gwenhywfar/Manifest
index d7685261487e..17e89385ff99 100644
--- a/sys-libs/gwenhywfar/Manifest
+++ b/sys-libs/gwenhywfar/Manifest
@@ -1 +1 @@
-DIST gwenhywfar-5.4.1.tar.gz 2373780 BLAKE2B bc2666145d958c5ab9c5600be65bcdd4a2ea6e35f3bd83a5ba9a2380dcc8788e91038733c49c1c16ff00d27eea999a0c0f4a02a70f30180d54a1541dbb951131 SHA512 78ec815374410bb3ebbbcc5c18120b47bbc2460aa8a620fae068f3c6aaeb16351139fe0e28e8dc7037ffb9eaa449011d2483dde3c99ecd0fed7bb2c9f97f89a0
+DIST gwenhywfar-5.10.1.tar.gz 2687042 BLAKE2B 78fb776a605761f309060affef4e84e526ba789039f48f1e68e107d5002c508e19c9c2c2c0b3a8aba39c6c32543816914b504a6212219cfeeb4f0f04b0354f45 SHA512 11781bec2dd1c4156b609574283179278b8070d604a792aeddf92c8f9b873b3ac09273a8558b9adba567af8d016ea10914d2a149f4b6813798b5800e34e29aa5
diff --git a/sys-libs/gwenhywfar/gwenhywfar-5.4.1-r1.ebuild b/sys-libs/gwenhywfar/gwenhywfar-5.10.1.ebuild
index 7a39fab60949..8d4759d13614 100644
--- a/sys-libs/gwenhywfar/gwenhywfar-5.4.1-r1.ebuild
+++ b/sys-libs/gwenhywfar/gwenhywfar-5.10.1.ebuild
@@ -1,24 +1,23 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-MY_P="${P/_rc/rc}"
inherit qmake-utils
DESCRIPTION="Multi-platform helper library for other libraries"
HOMEPAGE="https://www.aquamaniac.de/sites/aqbanking/index.php"
-SRC_URI="https://www.aquamaniac.de/rdm/attachments/download/344/${MY_P}.tar.gz"
+SRC_URI="https://www.aquamaniac.de/rdm/attachments/download/465/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0/79" # correspond with libgwenhywfar.so version
-KEYWORDS="amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc x86"
+KEYWORDS="amd64 ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc x86"
IUSE="debug doc gtk qt5 test"
BDEPEND="
sys-devel/gettext
virtual/pkgconfig
- doc? ( app-doc/doxygen )
+ doc? ( app-text/doxygen )
"
DEPEND="
dev-libs/libgcrypt:0=
@@ -43,15 +42,14 @@ DEPEND="
dev-qt/qtxml:5
)
"
-RDEPEND="${DEPEND}
+RDEPEND="
+ ${DEPEND}
gtk? ( !<app-office/gnucash-3.7[aqbanking] )
"
# broken upstream, reported but got no reply
RESTRICT+=" test"
-S="${WORKDIR}/${MY_P}"
-
src_configure() {
local myeconfargs=(
--with-docpath="${EPREFIX}/usr/share/doc/${PF}/apidoc"
diff --git a/sys-libs/kpmcore/Manifest b/sys-libs/kpmcore/Manifest
index 27064c04655d..ecf6fdbe52fe 100644
--- a/sys-libs/kpmcore/Manifest
+++ b/sys-libs/kpmcore/Manifest
@@ -1,2 +1,2 @@
-DIST kpmcore-21.08.3.tar.xz 589464 BLAKE2B 188a702b21976c352bea49c3e40e86c6d3f85b398c3dc9577301471c49cbbf8f161a5f6b62acfc020bcd9530aab2739a39023170c7586a1f18e52add4b2d6ecd SHA512 16570fe9b5e4e83d26b1c2e591d797cd23f37a2195ac5f043ee921d038d0e10d63f9d2c72c4d710e10eeb05d81a6df577f9ddb48b762b034154e399560daa7a7
-DIST kpmcore-21.12.1.tar.xz 594168 BLAKE2B 2eff6a30d9143be7fe9ca9fd1d2aed9f8a97d9810644c61e801c06f9a7aa6c0184b3c3c4bf731f57ca02459033a1a444281d62d5ddb68e33402d7cc2f1ca79da SHA512 ab9d22adfd5d3a0e6e58f2bb63e6d26b8aad1cf33b24c3f6b39a358d5e0e939a3ac11ce95c8bee0d8443fc506f27673a5daecd0ba430f02435fbf1d7d4c3af83
+DIST kpmcore-23.08.5.tar.xz 630396 BLAKE2B f5a470c9b54663b9f52467519046646de9ea20b83c8afaf199e3877ecc3f9de47139c9d44e8b23a2d49bfb00ae624b9117cf1adf83092f141a8e46d02adfaf8f SHA512 30ddbe62412df5645e034b745159b7c8db7801340225653d05856032083181d482379415a56d4e6f703c4f6c4a1a79c252a3b549beba227ab70dfc673cc59acd
+DIST kpmcore-24.02.2.tar.xz 633412 BLAKE2B b270bbb8c41b9b1821b6bb4761faf3d17efd19b137a2283cc31eb91efd362b0c3ba5c795edc468744a678674997b345038989fe3124bf5f69504c86272740ae4 SHA512 24664d79e4fbc630ecdbc08006de2bc6a1d42abd1eeeb842b00c45a17742ae651c0c5a490310d99803b6dfe757f4fcc0a66c211dd2afbbafd4cd8cfb30050bd0
diff --git a/sys-libs/kpmcore/files/kpmcore-21.08.3-dont-destroy-zfs-pool.patch b/sys-libs/kpmcore/files/kpmcore-21.08.3-dont-destroy-zfs-pool.patch
deleted file mode 100644
index 83cc15d0f2d5..000000000000
--- a/sys-libs/kpmcore/files/kpmcore-21.08.3-dont-destroy-zfs-pool.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 282cfdcde179ec44d053b257e13aa715158596bd Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= <andrius@stikonas.eu>
-Date: Sat, 30 Oct 2021 21:13:07 +0100
-Subject: [PATCH] Do not destroy zfs pool when removing zfs partition.
-
-This can be dangerous, e.g. if partition is part of raid set.
-So better be more cautious and in some cases fail to remove partition
-than lose data.
----
- src/fs/zfs.cpp | 7 -------
- src/fs/zfs.h | 1 -
- 2 files changed, 8 deletions(-)
-
-diff --git a/src/fs/zfs.cpp b/src/fs/zfs.cpp
-index 5d12894..5f4c87d 100644
---- a/src/fs/zfs.cpp
-+++ b/src/fs/zfs.cpp
-@@ -77,13 +77,6 @@ qint64 zfs::maxCapacity() const
- return Capacity::unitFactor(Capacity::Unit::Byte, Capacity::Unit::EiB);
- }
-
--bool zfs::remove(Report& report, const QString& deviceNode) const
--{
-- Q_UNUSED(deviceNode)
-- ExternalCommand cmd(report, QStringLiteral("zpool"), { QStringLiteral("destroy"), QStringLiteral("-f"), label() });
-- return cmd.run(-1) && cmd.exitCode() == 0;
--}
--
- bool zfs::writeLabel(Report& report, const QString& deviceNode, const QString& newLabel)
- {
- Q_UNUSED(deviceNode)
-diff --git a/src/fs/zfs.h b/src/fs/zfs.h
-index 6e559de..61026c3 100644
---- a/src/fs/zfs.h
-+++ b/src/fs/zfs.h
-@@ -35,7 +35,6 @@ public:
- public:
- void init() override;
-
-- bool remove(Report& report, const QString& deviceNode) const override;
- bool writeLabel(Report& report, const QString& deviceNode, const QString& newLabel) override;
-
- CommandSupportType supportGetUsed() const override {
---
-GitLab
-
diff --git a/sys-libs/kpmcore/files/kpmcore-21.08.3-fix-seek-error-when-shred-partition.patch b/sys-libs/kpmcore/files/kpmcore-21.08.3-fix-seek-error-when-shred-partition.patch
deleted file mode 100644
index 568db790c7e9..000000000000
--- a/sys-libs/kpmcore/files/kpmcore-21.08.3-fix-seek-error-when-shred-partition.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From e9fc875c5e233401afd12f54ab0472c66ff6fdff Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= <andrius@stikonas.eu>
-Date: Fri, 12 Nov 2021 01:02:15 +0000
-Subject: [PATCH] Fix seek error when filling device with random data or
- zeroes.
-
----
- src/util/externalcommandhelper.cpp | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/util/externalcommandhelper.cpp b/src/util/externalcommandhelper.cpp
-index 6e61aba..0fa400d 100644
---- a/src/util/externalcommandhelper.cpp
-+++ b/src/util/externalcommandhelper.cpp
-@@ -80,7 +80,8 @@ bool ExternalCommandHelper::readData(const QString& sourceDevice, QByteArray& bu
- return false;
- }
-
-- if (!device.seek(offset)) {
-+ // Sequential devices such as /dev/zero or /dev/urandom return false on seek().
-+ if (!device.isSequential() && !device.seek(offset)) {
- qCritical() << xi18n("Could not seek position %1 on device <filename>%2</filename>.", offset, sourceDevice);
- return false;
- }
---
-GitLab
-
diff --git a/sys-libs/kpmcore/kpmcore-21.08.3-r1.ebuild b/sys-libs/kpmcore/kpmcore-21.08.3-r1.ebuild
deleted file mode 100644
index dbf7c293053e..000000000000
--- a/sys-libs/kpmcore/kpmcore-21.08.3-r1.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-ECM_NONGUI="true"
-KDE_GEAR="true"
-KFMIN=5.84.0
-QTMIN=5.15.2
-inherit ecm kde.org
-
-DESCRIPTION="Library for managing partitions"
-HOMEPAGE="https://apps.kde.org/partitionmanager/"
-
-LICENSE="GPL-3"
-SLOT="5/10"
-KEYWORDS="amd64 ~arm arm64 ~ppc64 x86"
-IUSE=""
-
-# bug 689468, tests need polkit etc.
-RESTRICT="test"
-
-DEPEND="
- >=dev-qt/qtdbus-${QTMIN}:5
- >=dev-qt/qtgui-${QTMIN}:5
- >=dev-qt/qtwidgets-${QTMIN}:5
- >=kde-frameworks/kcoreaddons-${KFMIN}:5
- >=kde-frameworks/ki18n-${KFMIN}:5
- >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
- >=sys-apps/util-linux-2.33.2
- sys-auth/polkit-qt
-"
-RDEPEND="${DEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
- "${FILESDIR}/${P}-dont-destroy-zfs-pool.patch"
- "${FILESDIR}/${P}-fix-seek-error-when-shred-partition.patch"
-)
diff --git a/sys-libs/kpmcore/kpmcore-21.12.1.ebuild b/sys-libs/kpmcore/kpmcore-23.08.5.ebuild
index d0800f0fc763..8548d6d3112d 100644
--- a/sys-libs/kpmcore/kpmcore-21.12.1.ebuild
+++ b/sys-libs/kpmcore/kpmcore-23.08.5.ebuild
@@ -1,20 +1,19 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
ECM_NONGUI="true"
-KDE_GEAR="true"
-KFMIN=5.88.0
-QTMIN=5.15.2
-inherit ecm kde.org
+KFMIN=5.106.0
+QTMIN=5.15.9
+inherit ecm gear.kde.org
DESCRIPTION="Library for managing partitions"
HOMEPAGE="https://apps.kde.org/partitionmanager/"
LICENSE="GPL-3"
SLOT="5/10"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 x86"
IUSE=""
# bug 689468, tests need polkit etc.
@@ -29,6 +28,6 @@ DEPEND="
>=kde-frameworks/ki18n-${KFMIN}:5
>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
>=sys-apps/util-linux-2.33.2
- sys-auth/polkit-qt
+ >=sys-auth/polkit-qt-0.113.0[qt5(+)]
"
RDEPEND="${DEPEND}"
diff --git a/sys-libs/kpmcore/kpmcore-24.02.2.ebuild b/sys-libs/kpmcore/kpmcore-24.02.2.ebuild
new file mode 100644
index 000000000000..981859e0e0f5
--- /dev/null
+++ b/sys-libs/kpmcore/kpmcore-24.02.2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_NONGUI="true"
+KFMIN=6.0.0
+QTMIN=6.6.2
+inherit ecm gear.kde.org
+
+DESCRIPTION="Library for managing partitions"
+HOMEPAGE="https://apps.kde.org/partitionmanager/"
+
+LICENSE="GPL-3"
+SLOT="6/10"
+KEYWORDS="~amd64"
+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/ldb/Manifest b/sys-libs/ldb/Manifest
index 237908b81793..08b7fcf23d6d 100644
--- a/sys-libs/ldb/Manifest
+++ b/sys-libs/ldb/Manifest
@@ -1,4 +1,7 @@
-DIST ldb-2.3.1.tar.gz 1718379 BLAKE2B e2aa196e6e09846be2a631d81bf0b94c0cd80984ac124757888889717efdf78caf5501c4278ace33dcc2a6fb92a4a2f224b20ea9f3bf3fa5c7333f9994dcbdc1 SHA512 d87f3839481c3ac3f5ce5e2b5bb766451fe39681bff9c53747d45e2cdcef9f1eb91c0a7d6a9c202c4d01097600d66ca431a175f4fc28a126ad987b9783cb87bc
-DIST ldb-2.3.2.tar.gz 1718583 BLAKE2B 48b9fb77e414af0f9fffe0cda9cf49971d79ed8b66213b01b73f53a61969e03f9e6426a04a33ff70da906c814470d8fa356902a68aa1169d969cc597e8c234d7 SHA512 be324e8f20db50529634548451dbc5f95f26a701e124bfb40ae2b0a5069de78b7c5c1a66222097209ea24ef6077373d996e67c00257a5a05198f1b81bf0ed53e
-DIST ldb-2.4.0.tar.gz 1689484 BLAKE2B 904d74900011ce3f63ad1c24fe88b1a090e835c68829ddfda5e8af2c0ab3674d7a8cd9a62b95c1f38f26578d0704556d3562e46e21a54cbb44a15b9d83676521 SHA512 6c500b723c081488bc0717b6a5b0e8966c5d8a751232f8856281a6fe4d358ae6b5878c8400a82fa666379066105fbb9259b2967313e73efabef0e1386095e2ee
-DIST ldb-2.4.1.tar.gz 1719769 BLAKE2B 868d3dcc51bd8272d99f2335ed1af2e37506b6a175254f1aca37f758488ba0997e37419a7d8c81def77698128307df97de26d4807ac78c34088f7a623f8d9e68 SHA512 14ab5397d28c369142b2ccf55a2ab4e678a3fe6e018541cfce46241f8226400bc169360bbef254fae4410a6e15024ae986f02298d3d324e3d3a8b88801bf76d7
+DIST ldb-2.4.4.tar.gz 1726595 BLAKE2B c01440e7032dbd3f7b735cb8d2078d7e1dbb56370bd1defe5f170eff006d3979daa654698e6e046c0583288dacd2cda9a5cde249fd6382db52c4aadb83f55e34 SHA512 2e4c762525eee9db40083b21e2a23f9cdfad5d2969cc628b3ea5414f9ec1be2c12d0aa65137cd8d8a5395c0414166ba14fc3dd57d53c533596762d80b9c561f4
+DIST ldb-2.5.2.tar.gz 1730347 BLAKE2B a0d3a9ae02f79c27b396314b804195ecd37b8bcd843fb94f9813a69fb15773db94ed2210f4102e395333562c2dccebabde1c2dcc0c2fceac97dfa31b2ad97e3d SHA512 02ae1246f99d9b6d6b33c5030488aa46c6abb535b4da4b13799a62b49d32c490b7c088ef41c0bc5a1b2f7263c680faceb8033827834cb6f66916adcdb5be421c
+DIST ldb-2.5.3.tar.gz 1736354 BLAKE2B dcd4d33f7a0ce3583bc96762b274d195c20e868337a29fd7793d6edf092069632f5c4f7f805693e3b330bbda1cc24540a989e2937f6325ac68bacf15d0f12db4 SHA512 b6f62dfb4887927514a98f01771b2178ac781886fc361600be0f59e513fc5762e3a421e48f452b1dd4452795f04b5c7c95e4dd4a9cc97573e563f5f528af4a35
+DIST ldb-2.6.2.tar.gz 1738908 BLAKE2B 44998efdff46486f94deb115225119cb3f6f23e15192672a5ac59c27e06c074fbcf2e1dba7d89d5ce273748cf08bc2261a10f7818cc2d02c4b25fd5403b158a9 SHA512 091111b8cf6cd93d662737890dacb64439e930b287d29299d2fc2cb18709f61d1e8a8c17d44f7224d8370dda6dc89af91e4ce8959816903ad5363388d8e37d8f
+DIST ldb-2.7.2.tar.gz 1737849 BLAKE2B 0aa70d8a4827448e41874db97130f18d17683c800b8f03f9940b4852e24fd6092052f6e70aae845c587939b9be16c80d7a920f6b874a746f923c4513b73d2afc SHA512 beb2cd83a8f128713e0b43ec6e80d0f87ab0883c6c8f0cefbbf5bf49e29dfa327b245b78467d1906917cb5f3f11e01cb76cc6bcca58a47c5deac4f05c2e9dfbd
+DIST ldb-2.8.0.tar.gz 1747616 BLAKE2B 19fd4cc0893ca36e7aa65eb605b050e3faeb7add6c00a2dfd8415334c58b7dc644ffaad41c24fe358b39292aaa581e3231e6b8161b03c073e903cdae16050ac5 SHA512 b6f289af3137e02a8e3ee0588bc300d1756b8980558e0b3a3a9eee4449100ccd42ed873187dbdb334e7e7834a8bff8478cd4f20588d4ca834d9ea14c0ee2c2f9
+DIST ldb-2.9.0.tar.gz 1757213 BLAKE2B 6d24ced193a64e723da65f26a055b97e5c5645b0ce17263073db997e9310509c788e7739136b70d099d171d1d0cbbe43bb43ea50746d876d74a1be06fa2fc36f SHA512 b5cfbbcb2c35d6830bf1a7c85e1d4363728ae474504441add54c4c8569316b26aedbf6fb9f561ec4f187eb5a847ac76af07396e38d00e6f7632b63e02d7b64a1
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
new file mode 100644
index 000000000000..70f34c5f1a58
--- /dev/null
+++ b/sys-libs/ldb/files/ldb-2.4.2-skip-32bit-time_t-tests.patch
@@ -0,0 +1,35 @@
+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
new file mode 100644
index 000000000000..4578435064b0
--- /dev/null
+++ b/sys-libs/ldb/files/ldb-2.5.2-skip-waf-tevent-check.patch
@@ -0,0 +1,12 @@
+--- 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
new file mode 100644
index 000000000000..791f49c8de6c
--- /dev/null
+++ b/sys-libs/ldb/files/ldb-2.9.0-optional_packages.patch
@@ -0,0 +1,41 @@
+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.3.1.ebuild b/sys-libs/ldb/ldb-2.3.1.ebuild
deleted file mode 100644
index b6f289c27beb..000000000000
--- a/sys-libs/ldb/ldb-2.3.1.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-PYTHON_REQ_USE="threads(+)"
-inherit python-single-r1 waf-utils multilib-minimal
-
-DESCRIPTION="LDAP-like embedded database"
-HOMEPAGE="https://ldb.samba.org"
-SRC_URI="https://samba.org/ftp/pub/${PN}/${P}.tar.gz"
-
-LICENSE="LGPL-3"
-SLOT="0/${PV}"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="doc ldap +lmdb python test"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- test? ( python )"
-
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- dev-libs/popt[${MULTILIB_USEDEP}]
- >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
- >=sys-libs/talloc-2.3.2[${MULTILIB_USEDEP}]
- >=sys-libs/tdb-1.4.3[${MULTILIB_USEDEP}]
- >=sys-libs/tevent-0.10.2[${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
-"
-BDEPEND="${PYTHON_DEPS}
- dev-libs/libxslt
- virtual/pkgconfig
- doc? ( app-doc/doxygen )
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h )
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.5.2-optional_packages.patch
- "${FILESDIR}"/${PN}-1.1.31-fix_PKGCONFIGDIR-when-python-disabled.patch
-)
-
-pkg_setup() {
- # Package fails to build with distcc
- export DISTCC_DISABLE=1
-
- # waf requires a python interpreter
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local myconf=(
- $(usex ldap '' --disable-ldap)
- $(usex lmdb '' --without-ldb-lmdb)
- --disable-rpath
- --disable-rpath-install --bundled-libraries=NONE
- --with-modulesdir="${EPREFIX}"/usr/$(get_libdir)/samba
- --builtin-libraries=NONE
- )
- if ! multilib_is_native_abi; then
- myconf+=( --disable-python )
- else
- use python || myconf+=( --disable-python )
- fi
- 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
-
- use python && python_optimize #726454
-}
-
-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/ldb-2.4.1.ebuild b/sys-libs/ldb/ldb-2.4.4.ebuild
index dc288a66eecd..fbcda7f37ac1 100644
--- a/sys-libs/ldb/ldb-2.4.1.ebuild
+++ b/sys-libs/ldb/ldb-2.4.4.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{10..11} )
PYTHON_REQ_USE="threads(+)"
inherit python-single-r1 waf-utils multilib-minimal
@@ -13,11 +13,11 @@ SRC_URI="https://samba.org/ftp/pub/${PN}/${P}.tar.gz"
LICENSE="LGPL-3"
SLOT="0/${PV}"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="doc ldap +lmdb python test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
- test? ( python )"
+ test? ( lmdb python )"
RESTRICT="!test? ( test )"
@@ -28,8 +28,8 @@ RDEPEND="
>=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}]
>=sys-libs/tdb-1.4.4[${MULTILIB_USEDEP}]
>=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}]
- ldap? ( net-nds/openldap )
- lmdb? ( >=dev-db/lmdb-0.9.16[${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}]
@@ -43,7 +43,7 @@ DEPEND="${RDEPEND}
BDEPEND="${PYTHON_DEPS}
dev-libs/libxslt
virtual/pkgconfig
- doc? ( app-doc/doxygen )
+ doc? ( app-text/doxygen )
"
WAF_BINARY="${S}/buildtools/bin/waf"
@@ -53,6 +53,8 @@ MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h )
PATCHES=(
"${FILESDIR}"/${PN}-1.5.2-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() {
diff --git a/sys-libs/ldb/ldb-2.4.0-r1.ebuild b/sys-libs/ldb/ldb-2.5.2.ebuild
index 054a066f3cbb..180e90208d90 100644
--- a/sys-libs/ldb/ldb-2.4.0-r1.ebuild
+++ b/sys-libs/ldb/ldb-2.5.2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{10..11} )
PYTHON_REQ_USE="threads(+)"
inherit python-single-r1 waf-utils multilib-minimal
@@ -13,11 +13,11 @@ SRC_URI="https://samba.org/ftp/pub/${PN}/${P}.tar.gz"
LICENSE="LGPL-3"
SLOT="0/${PV}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="doc ldap +lmdb python test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
- test? ( python )"
+ test? ( lmdb python )"
RESTRICT="!test? ( test )"
@@ -26,10 +26,10 @@ RDEPEND="
dev-libs/popt[${MULTILIB_USEDEP}]
>=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
>=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}]
- >=sys-libs/tdb-1.4.4[${MULTILIB_USEDEP}]
+ >=sys-libs/tdb-1.4.6[${MULTILIB_USEDEP}]
>=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}]
- ldap? ( net-nds/openldap )
- lmdb? ( >=dev-db/lmdb-0.9.16[${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}]
@@ -43,7 +43,7 @@ DEPEND="${RDEPEND}
BDEPEND="${PYTHON_DEPS}
dev-libs/libxslt
virtual/pkgconfig
- doc? ( app-doc/doxygen )
+ doc? ( app-text/doxygen )
"
WAF_BINARY="${S}/buildtools/bin/waf"
@@ -53,6 +53,8 @@ MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h )
PATCHES=(
"${FILESDIR}"/${PN}-1.5.2-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() {
diff --git a/sys-libs/ldb/ldb-2.3.2.ebuild b/sys-libs/ldb/ldb-2.5.3.ebuild
index b6f289c27beb..8ec35b8dee3a 100644
--- a/sys-libs/ldb/ldb-2.3.2.ebuild
+++ b/sys-libs/ldb/ldb-2.5.3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_COMPAT=( python3_{10..11} )
PYTHON_REQ_USE="threads(+)"
inherit python-single-r1 waf-utils multilib-minimal
@@ -13,11 +13,11 @@ SRC_URI="https://samba.org/ftp/pub/${PN}/${P}.tar.gz"
LICENSE="LGPL-3"
SLOT="0/${PV}"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="doc ldap +lmdb python test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
- test? ( python )"
+ test? ( lmdb )"
RESTRICT="!test? ( test )"
@@ -25,11 +25,11 @@ RDEPEND="
dev-libs/libbsd[${MULTILIB_USEDEP}]
dev-libs/popt[${MULTILIB_USEDEP}]
>=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
- >=sys-libs/talloc-2.3.2[${MULTILIB_USEDEP}]
- >=sys-libs/tdb-1.4.3[${MULTILIB_USEDEP}]
- >=sys-libs/tevent-0.10.2[${MULTILIB_USEDEP}]
- ldap? ( net-nds/openldap )
- lmdb? ( >=dev-db/lmdb-0.9.16[${MULTILIB_USEDEP}] )
+ >=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}]
+ >=sys-libs/tdb-1.4.6[${MULTILIB_USEDEP}]
+ >=sys-libs/tevent-0.11.0[${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}]
@@ -43,7 +43,7 @@ DEPEND="${RDEPEND}
BDEPEND="${PYTHON_DEPS}
dev-libs/libxslt
virtual/pkgconfig
- doc? ( app-doc/doxygen )
+ doc? ( app-text/doxygen )
"
WAF_BINARY="${S}/buildtools/bin/waf"
@@ -53,6 +53,8 @@ MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h )
PATCHES=(
"${FILESDIR}"/${PN}-1.5.2-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() {
@@ -65,6 +67,13 @@ pkg_setup() {
src_prepare() {
default
+
+ 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
}
diff --git a/sys-libs/ldb/ldb-2.6.2.ebuild b/sys-libs/ldb/ldb-2.6.2.ebuild
new file mode 100644
index 000000000000..192c588a358d
--- /dev/null
+++ b/sys-libs/ldb/ldb-2.6.2.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="threads(+)"
+inherit python-single-r1 waf-utils multilib-minimal
+
+DESCRIPTION="LDAP-like embedded database"
+HOMEPAGE="https://ldb.samba.org"
+SRC_URI="https://samba.org/ftp/pub/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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.3.4"
+TDB_VERSION="1.4.7"
+TEVENT_VERSION="0.13.0"
+
+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}-1.5.2-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
+
+ 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/ldb-2.7.2.ebuild b/sys-libs/ldb/ldb-2.7.2.ebuild
new file mode 100644
index 000000000000..104e3ff13045
--- /dev/null
+++ b/sys-libs/ldb/ldb-2.7.2.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="threads(+)"
+inherit python-single-r1 waf-utils multilib-minimal
+
+DESCRIPTION="LDAP-like embedded database"
+HOMEPAGE="https://ldb.samba.org"
+SRC_URI="https://samba.org/ftp/pub/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~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.0"
+TDB_VERSION="1.4.8"
+TEVENT_VERSION="0.14.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}-1.5.2-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
+
+ 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/ldb-2.8.0.ebuild b/sys-libs/ldb/ldb-2.8.0.ebuild
new file mode 100644
index 000000000000..695c2e00e998
--- /dev/null
+++ b/sys-libs/ldb/ldb-2.8.0.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="threads(+)"
+inherit python-single-r1 waf-utils multilib-minimal
+
+DESCRIPTION="LDAP-like embedded database"
+HOMEPAGE="https://ldb.samba.org"
+SRC_URI="https://samba.org/ftp/pub/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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.1"
+TDB_VERSION="1.4.9"
+TEVENT_VERSION="0.15.0"
+
+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}-1.5.2-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
+
+ 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/ldb-2.9.0.ebuild b/sys-libs/ldb/ldb-2.9.0.ebuild
new file mode 100644
index 000000000000..c0dac63c7137
--- /dev/null
+++ b/sys-libs/ldb/ldb-2.9.0.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="threads(+)"
+inherit python-single-r1 waf-utils multilib-minimal
+
+DESCRIPTION="LDAP-like embedded database"
+HOMEPAGE="https://ldb.samba.org"
+SRC_URI="https://samba.org/ftp/pub/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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
+
+ 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
index a47d418951f0..02e87ace94c2 100644
--- a/sys-libs/ldb/metadata.xml
+++ b/sys-libs/ldb/metadata.xml
@@ -5,9 +5,6 @@
<email>samba@gentoo.org</email>
<name>Samba</name>
</maintainer>
- <upstream>
- <remote-id type="cpe">cpe:/a:samba:samba</remote-id>
- </upstream>
<use>
<flag name="doc">Builds documentation</flag>
<flag name="ldap">Enable LDAP support</flag>
diff --git a/sys-libs/libaal/libaal-1.0.7-r2.ebuild b/sys-libs/libaal/libaal-1.0.7-r2.ebuild
index 7994ee19251f..32c17e6921af 100644
--- a/sys-libs/libaal/libaal-1.0.7-r2.ebuild
+++ b/sys-libs/libaal/libaal-1.0.7-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/reiser4/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0/7"
-KEYWORDS="amd64 arm ~arm64 ppc ppc64 -sparc x86"
+KEYWORDS="amd64 arm ~arm64 ~loong ppc ppc64 -sparc x86"
IUSE="static-libs"
BDEPEND="virtual/os-headers"
diff --git a/sys-libs/libapparmor/Manifest b/sys-libs/libapparmor/Manifest
index 76c9ff7d636a..86b70cba9120 100644
--- a/sys-libs/libapparmor/Manifest
+++ b/sys-libs/libapparmor/Manifest
@@ -1,2 +1,3 @@
-DIST apparmor-3.0.1.tar.gz 7785713 BLAKE2B c530d159a4139de8e59d9d975af866259b56d555e3abe2d1e2a6bfd2db57d8371d643bb93f1cd6ca96172960c09a74cc05c82d34a2e253c4c1f6ecce747f4129 SHA512 e1073e7b2cde7cc4cefcfddce8fa5069845b5873c260b9fbd4bea2ff801708101d813ff30e23a64da36f3c6394cd9339e01a170e9add69deef2d70ecd9ed9687
-DIST apparmor-3.0.3.tar.gz 7790012 BLAKE2B aada9c32c2cde4a110cbd1d626ec00b08e29e76182185752e5c23e2ec0c2668a732ffdf1eb1660bd8bc294188ccf0da42b4282939f5969a6aed39084be00769c SHA512 bbf26377e60da60dab56473ee5af15aa0f3fdf2f2a61dbfcdeba12a925afda3bc6a0f6cc31e07927400425b8c3b3649833f448d8674044c7274ef06923ab48b5
+DIST apparmor-3.0.10.tar.gz 7967601 BLAKE2B 8fa094dac6140949cecad8fdf056c6e119291d9490404b0c7379e14d85eff8d6424ec5099e04184424c271b83bb5893389e4023a2946b8296268559f13d20c20 SHA512 94866c3151e6776b9efbbf3852a48e19908ddbc1f3156df1e1bf0b8a79be49b4eba96ce3725a3cf10af3affa00f9a045bbab06ffd3d668c80039eb369b3f6762
+DIST apparmor-3.0.8.tar.gz 7946880 BLAKE2B bbff6c0223b9f20cb53d96cb2e41aa4b7eee51b35a2c010cdd394f85517e87c9a34fb7182f600ba212e99baf4ee1a16a5bfd7e92ec6a9fb9ce6076a216cd89e1 SHA512 539e955b24c6f4f62ef0d7885fc341e4f6bc69ee840981426fb6a40f8f8e5c945f774246cb0efe1a76e778b8047d4a7fe315ab062d2dbe17e524b8527d5a8087
+DIST apparmor-3.1.4.tar.gz 7965268 BLAKE2B a9be29a42bb96c1d2c69a6b7627d59aea023f22fe79bff1a487aa5ddd6845ec98f67be5c597ec51edf4493513dfed3b43fc493f454bcf48b3f43c44572ffc2ae SHA512 db65edfa1b9c1f953940165e71dddcab9a2d378f29683b0b4e5d44f0810bb0105ba3820ba89de927ef90d0a94ea6d61e91ce3de09ec2e385817735a93d4039c4
diff --git a/sys-libs/libapparmor/files/libapparmor-3.1.4-clang-flto-partition.patch b/sys-libs/libapparmor/files/libapparmor-3.1.4-clang-flto-partition.patch
new file mode 100644
index 000000000000..6cb3528ea4db
--- /dev/null
+++ b/sys-libs/libapparmor/files/libapparmor-3.1.4-clang-flto-partition.patch
@@ -0,0 +1,33 @@
+https://gitlab.com/apparmor/apparmor/-/commit/d8bb0435c2b283fe9eed2a6db9a0b09ac2566c0e
+From d8bb0435c2b283fe9eed2a6db9a0b09ac2566c0e Mon Sep 17 00:00:00 2001
+From: John Johansen <john@jjmx.net>
+Date: Sun, 25 Feb 2024 03:31:01 +0000
+Subject: [PATCH] Merge makefiles: test for support of flto-partition flag
+--- a/configure.ac
++++ b/configure.ac
+@@ -92,6 +92,13 @@ if test "$ac_cv_prog_cc_c99" = "no"; then
+ AC_MSG_ERROR([C99 mode is required to build libapparmor])
+ fi
+
++EXTRA_CFLAGS="-Wall ${EXTRA_WARNINGS} -fPIC"
++AX_CHECK_COMPILE_FLAG([-flto-partition=none], , , [-Werror])
++AS_VAR_IF([ax_cv_check_cflags__Werror__flto_partition_none], [yes],
++ [EXTRA_CFLAGS="$EXTRA_CFLAGS -flto-partition=none"]
++ ,)
++AC_SUBST([AM_CFLAGS], ["$EXTRA_CFLAGS"])
++
+ AC_OUTPUT(
+ Makefile
+ doc/Makefile
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -39,7 +39,6 @@ include $(COMMONDIR)/Make.rules
+ BUILT_SOURCES = grammar.h scanner.h af_protos.h
+ AM_LFLAGS = -v
+ AM_YFLAGS = -d -p aalogparse_
+-AM_CFLAGS = -Wall $(EXTRA_WARNINGS) -fPIC -flto-partition=none
+ AM_CPPFLAGS = -D_GNU_SOURCE -I$(top_srcdir)/include/
+ scanner.h: scanner.l
+ $(LEX) -v $<
+--
+GitLab
diff --git a/sys-libs/libapparmor/libapparmor-3.0.3.ebuild b/sys-libs/libapparmor/libapparmor-3.0.10.ebuild
index e35b3da8a32e..1623bc032d6c 100644
--- a/sys-libs/libapparmor/libapparmor-3.0.3.ebuild
+++ b/sys-libs/libapparmor/libapparmor-3.0.10.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{10..11} )
GENTOO_DEPEND_ON_PERL="no"
inherit autotools distutils-r1 perl-functions
@@ -17,7 +17,7 @@ SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${PV}/+download/apparmor-${PV}.
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+KEYWORDS="amd64 ~arm arm64 ~riscv ~x86"
IUSE="doc +perl +python static-libs"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
@@ -26,12 +26,15 @@ RDEPEND="perl? ( dev-lang/perl:= )
python? ( ${PYTHON_DEPS} )"
DEPEND="${RDEPEND}"
BDEPEND="
- sys-devel/autoconf-archive
+ dev-build/autoconf-archive
sys-devel/bison
sys-devel/flex
doc? ( dev-lang/perl )
perl? ( dev-lang/swig )
- python? ( dev-lang/swig )"
+ python? (
+ dev-lang/swig
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )"
S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
@@ -39,13 +42,23 @@ S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
RESTRICT="test"
src_prepare() {
- rm -r m4 || die "failed to remove bundled macros"
default
+
+ # We used to rm m4/ but led to this after eautoreconf:
+ # checking whether the libapparmor man pages should be generated... yes
+ # ./configure: 5065: PROG_PODCHECKER: not found
+ # ./configure: 5068: PROG_POD2MAN: not found
+ # checking whether python bindings are enabled... yes
eautoreconf
+
use python && distutils-r1_src_prepare
}
src_configure() {
+ # Fails with reflex/byacc, heavily relies on bisonisms
+ export LEX=flex
+ export YACC=yacc.bison
+
econf \
$(use_enable static-libs static) \
$(use_with perl) \
@@ -83,15 +96,20 @@ src_install() {
fi
if use python ; then
- pushd swig/python > /dev/null
+ pushd swig/python > /dev/null || die
distutils-r1_src_install
- python_moduleinto LibAppArmor
- python_foreach_impl python_domodule LibAppArmor.py
- popd > /dev/null
+ popd > /dev/null || die
fi
dodoc AUTHORS ChangeLog NEWS README
find "${D}" -name '*.la' -delete || die
}
+
+python_install() {
+ distutils-r1_python_install
+
+ python_moduleinto LibAppArmor
+ python_domodule LibAppArmor.py
+}
diff --git a/sys-libs/libapparmor/libapparmor-3.0.1.ebuild b/sys-libs/libapparmor/libapparmor-3.0.8.ebuild
index 3da7dd1b466e..1623bc032d6c 100644
--- a/sys-libs/libapparmor/libapparmor-3.0.1.ebuild
+++ b/sys-libs/libapparmor/libapparmor-3.0.8.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{10..11} )
GENTOO_DEPEND_ON_PERL="no"
inherit autotools distutils-r1 perl-functions
@@ -17,7 +17,7 @@ SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${PV}/+download/apparmor-${PV}.
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~x86"
+KEYWORDS="amd64 ~arm arm64 ~riscv ~x86"
IUSE="doc +perl +python static-libs"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
@@ -26,12 +26,15 @@ RDEPEND="perl? ( dev-lang/perl:= )
python? ( ${PYTHON_DEPS} )"
DEPEND="${RDEPEND}"
BDEPEND="
- sys-devel/autoconf-archive
+ dev-build/autoconf-archive
sys-devel/bison
sys-devel/flex
doc? ( dev-lang/perl )
perl? ( dev-lang/swig )
- python? ( dev-lang/swig )"
+ python? (
+ dev-lang/swig
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )"
S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
@@ -39,13 +42,23 @@ S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
RESTRICT="test"
src_prepare() {
- rm -r m4 || die "failed to remove bundled macros"
default
+
+ # We used to rm m4/ but led to this after eautoreconf:
+ # checking whether the libapparmor man pages should be generated... yes
+ # ./configure: 5065: PROG_PODCHECKER: not found
+ # ./configure: 5068: PROG_POD2MAN: not found
+ # checking whether python bindings are enabled... yes
eautoreconf
+
use python && distutils-r1_src_prepare
}
src_configure() {
+ # Fails with reflex/byacc, heavily relies on bisonisms
+ export LEX=flex
+ export YACC=yacc.bison
+
econf \
$(use_enable static-libs static) \
$(use_with perl) \
@@ -83,15 +96,20 @@ src_install() {
fi
if use python ; then
- pushd swig/python > /dev/null
+ pushd swig/python > /dev/null || die
distutils-r1_src_install
- python_moduleinto LibAppArmor
- python_foreach_impl python_domodule LibAppArmor.py
- popd > /dev/null
+ popd > /dev/null || die
fi
dodoc AUTHORS ChangeLog NEWS README
find "${D}" -name '*.la' -delete || die
}
+
+python_install() {
+ distutils-r1_python_install
+
+ python_moduleinto LibAppArmor
+ python_domodule LibAppArmor.py
+}
diff --git a/sys-libs/libapparmor/libapparmor-3.1.4-r1.ebuild b/sys-libs/libapparmor/libapparmor-3.1.4-r1.ebuild
new file mode 100644
index 000000000000..30cc21d16aee
--- /dev/null
+++ b/sys-libs/libapparmor/libapparmor-3.1.4-r1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2024 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_{10..11} )
+GENTOO_DEPEND_ON_PERL="no"
+
+inherit autotools distutils-r1 perl-functions
+
+MY_PV="$(ver_cut 1-2)"
+
+DESCRIPTION="Library to support AppArmor userspace utilities"
+HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home"
+SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${PV}/+download/apparmor-${PV}.tar.gz"
+S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="doc +perl +python static-libs"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+# depends on the package already being installed
+RESTRICT="test"
+
+RDEPEND="
+ perl? ( dev-lang/perl:= )
+ python? (
+ ${PYTHON_DEPS}
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-build/autoconf-archive
+ sys-devel/bison
+ sys-devel/flex
+ doc? ( dev-lang/perl )
+ perl? ( dev-lang/swig )
+ python? (
+ ${PYTHON_DEPS}
+ ${DISTUTILS_DEPS}
+ dev-lang/swig
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.4-clang-flto-partition.patch
+)
+
+src_prepare() {
+ default
+
+ # We used to rm m4/ but led to this after eautoreconf:
+ # checking whether the libapparmor man pages should be generated... yes
+ # ./configure: 5065: PROG_PODCHECKER: not found
+ # ./configure: 5068: PROG_POD2MAN: not found
+ # checking whether python bindings are enabled... yes
+ eautoreconf
+
+ use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+ # Fails with reflex/byacc, heavily relies on bisonisms
+ export LEX=flex
+ export YACC=yacc.bison
+
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with perl) \
+ $(use_with python)
+}
+
+src_compile() {
+ emake -C src
+ emake -C include
+ use doc && emake -C doc
+ use perl && emake -C swig/perl
+
+ if use python ; then
+ pushd swig/python > /dev/null
+ emake libapparmor_wrap.c
+ distutils-r1_src_compile
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" -C src install
+ emake DESTDIR="${D}" -C include install
+ use doc && emake DESTDIR="${D}" -C doc install
+
+ if use perl ; then
+ emake DESTDIR="${D}" -C swig/perl install
+ perl_set_version
+ insinto "${VENDOR_ARCH}"
+ doins swig/perl/LibAppArmor.pm
+
+ # bug 620886
+ perl_delete_localpod
+ perl_fix_packlist
+ fi
+
+ if use python ; then
+ pushd swig/python > /dev/null || die
+ distutils-r1_src_install
+
+ popd > /dev/null || die
+ fi
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ find "${D}" -name '*.la' -delete || die
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ python_moduleinto LibAppArmor
+ python_domodule LibAppArmor.py
+}
diff --git a/sys-libs/libapparmor/libapparmor-3.1.4.ebuild b/sys-libs/libapparmor/libapparmor-3.1.4.ebuild
new file mode 100644
index 000000000000..eeeff5594e54
--- /dev/null
+++ b/sys-libs/libapparmor/libapparmor-3.1.4.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python3_{10..11} )
+GENTOO_DEPEND_ON_PERL="no"
+
+inherit autotools distutils-r1 perl-functions
+
+MY_PV="$(ver_cut 1-2)"
+
+DESCRIPTION="Library to support AppArmor userspace utilities"
+HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home"
+SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${PV}/+download/apparmor-${PV}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm arm64 ~ppc64 ~riscv ~x86"
+IUSE="doc +perl +python static-libs"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-build/autoconf-archive
+ sys-devel/bison
+ sys-devel/flex
+ doc? ( dev-lang/perl )
+ perl? ( dev-lang/swig )
+ python? (
+ dev-lang/swig
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )"
+
+S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
+
+# depends on the package already being installed
+RESTRICT="test"
+
+src_prepare() {
+ default
+
+ # We used to rm m4/ but led to this after eautoreconf:
+ # checking whether the libapparmor man pages should be generated... yes
+ # ./configure: 5065: PROG_PODCHECKER: not found
+ # ./configure: 5068: PROG_POD2MAN: not found
+ # checking whether python bindings are enabled... yes
+ eautoreconf
+
+ use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+ # Fails with reflex/byacc, heavily relies on bisonisms
+ export LEX=flex
+ export YACC=yacc.bison
+
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with perl) \
+ $(use_with python)
+}
+
+src_compile() {
+ emake -C src
+ emake -C include
+ use doc && emake -C doc
+ use perl && emake -C swig/perl
+
+ if use python ; then
+ pushd swig/python > /dev/null
+ emake libapparmor_wrap.c
+ distutils-r1_src_compile
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" -C src install
+ emake DESTDIR="${D}" -C include install
+ use doc && emake DESTDIR="${D}" -C doc install
+
+ if use perl ; then
+ emake DESTDIR="${D}" -C swig/perl install
+ perl_set_version
+ insinto "${VENDOR_ARCH}"
+ doins swig/perl/LibAppArmor.pm
+
+ # bug 620886
+ perl_delete_localpod
+ perl_fix_packlist
+ fi
+
+ if use python ; then
+ pushd swig/python > /dev/null || die
+ distutils-r1_src_install
+
+ popd > /dev/null || die
+ fi
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ find "${D}" -name '*.la' -delete || die
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ python_moduleinto LibAppArmor
+ python_domodule LibAppArmor.py
+}
diff --git a/sys-libs/libapparmor/metadata.xml b/sys-libs/libapparmor/metadata.xml
index f7b28ab4f352..32fae81e7e61 100644
--- a/sys-libs/libapparmor/metadata.xml
+++ b/sys-libs/libapparmor/metadata.xml
@@ -1,14 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>kensington@gentoo.org</email>
- </maintainer>
<maintainer type="project">
<email>hardened@gentoo.org</email>
<name>Gentoo Hardened</name>
</maintainer>
<upstream>
<remote-id type="launchpad">apparmor</remote-id>
+ <remote-id type="gitlab">apparmor/apparmor</remote-id>
</upstream>
</pkgmetadata>
diff --git a/sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild b/sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild
index ecc3bbed45ea..fb1e3382f967 100644
--- a/sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild
+++ b/sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/libavc1394/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 ~riscv sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
BDEPEND="virtual/pkgconfig"
DEPEND=">=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
diff --git a/sys-libs/libblockdev/Manifest b/sys-libs/libblockdev/Manifest
index b0eb31d6494c..301c93b4bf6a 100644
--- a/sys-libs/libblockdev/Manifest
+++ b/sys-libs/libblockdev/Manifest
@@ -1,2 +1,5 @@
-DIST libblockdev-2.25.tar.gz 930238 BLAKE2B ae28c40b5e114826baf4a8ba9012267b297dbc4abee52669cf39c886d2c9989291f41937ec742c7457049a6a30e674f9c89ad6478923f393ae1773db3afcf621 SHA512 628d05f3a257b44208a9d0b5d84ae248fefd415812d9a93d132c03039b09fefc4d6110beb9aa0d3072e3f0c992e642d7867d0241209056538f132f86a748e195
-DIST libblockdev-2.26.tar.gz 932129 BLAKE2B 39d95db69de917449e6009fa0160b6288327b2c49b64309d17a1e4e028756d1ce170779ce1c4df926c8796d8a8ed7b9131b5d4b51115a3ea901dacdaa971961a SHA512 ddd4e9c22135bd7dad0bb9bc254ac0c63e3bacc592e7c5a0c846e367da3fc248bf6187f1c81407c3bce599d3b0ceeec9a8a0030ad8e981e245f715b35eaec523
+DIST libblockdev-2.28.tar.gz 925698 BLAKE2B 63ac7ab5bd02c1ef1848d0b252e09fe721cfe86258f063b7bab616766cbc56311707dcb2dd3a1fadf0e0840187f121aa178fd5959500cd590b846238a9d3e36e SHA512 9e01c41db4f728c8e81e710c6bb4725bbe34b3a7de25ff7f57b7b88ca6b7b5debbe858947585d314770036b2c3c533f9f8ff3d038b7ca50eee3d18f9fbe0d392
+DIST libblockdev-2.29.tar.gz 935117 BLAKE2B 774062459602a6f3730ac6e694b3f535daf0258cc5f509ff138bb8c15f44ff46bdc08e32ae1957909b51a191726cf5e9cb418c0317e5178300687947704cf5e0 SHA512 0d9637800b189f3824483010d2ff079da11b15ed0b42c578352a0d3cd9c35dab4e5945a3cc31c17ea6f88637548151fc7cf237ac8e9c98edfc7b7bce1a756e01
+DIST libblockdev-3.0.3.tar.gz 1048628 BLAKE2B c26a806797effc7231a0eb92f1b8cd74e548da5b1800cddd75a21e7df327be8371edabc2e9a39a727291f365b6a4f6242f78b66396adc4526b41749219f0429f SHA512 f2cc6fbe1df6fd9886016177a4a94984d704f3b402c7090344c581afb89f7cb050c9516c52974157a99ea6c6239f6a1f6079cde0b43a2336af0daca7311ca788
+DIST libblockdev-3.0.4.tar.gz 1050971 BLAKE2B e31ecb04310c2c66cbe432c1e003b3c3241f318f78916d5c61c0efca37fa677e5f857eab9b7c3bfc7c5a589350cdef12402940d28af68ab9fc95e5da6852ddf1 SHA512 82b574c1f8e301d6e9ff07f8c3d2a351a5bc966b5d65a3b578c214e03e48b54270b54176d646ac15e8119c79536d08b36415de478ffd34c8b3fe536300fc5172
+DIST libblockdev-3.1.1.tar.gz 1056270 BLAKE2B b3dbdc7226524d544193b609ced8a9fee725268ba2201b639c22103fcae6d047c94fb1b848e489525300242cb235d688934193894a06279a4dc0e0b33dff6e96 SHA512 44628d9e68a467f8a5d5e65e12d5d6ffb4d9b953c846acd9f6da257eab5ccd79309651d6b20092fa700fb4340f1f718ceef11141203da676d088824aa9d03481
diff --git a/sys-libs/libblockdev/files/libblockdev-2.28-sh_tests.patch b/sys-libs/libblockdev/files/libblockdev-2.28-sh_tests.patch
new file mode 100644
index 000000000000..2fbeaf49f233
--- /dev/null
+++ b/sys-libs/libblockdev/files/libblockdev-2.28-sh_tests.patch
@@ -0,0 +1,23 @@
+bash is fine with "test . == ." but e.g. dash fails on not having
+the two dots quoted as strings.
+
+--- a/docs/Makefile.am
++++ b/docs/Makefile.am
+@@ -2,7 +2,7 @@
+
+ html-doc.stamp: ${srcdir}/libblockdev-docs.xml ${srcdir}/libblockdev-sections.txt $(wildcard ${srcdir}/../src/plugins/*.[ch]) $(wildcard ${srcdir}/../src/lib/*.[ch]) $(wildcard ${srcdir}/../src/utils/*.[ch])
+ touch ${builddir}/html-doc.stamp
+- test ${builddir} == ${srcdir} || cp ${srcdir}/libblockdev-sections.txt ${srcdir}/libblockdev-docs.xml ${builddir}
++ test "${builddir}" == "${srcdir}" || cp ${srcdir}/libblockdev-sections.txt ${srcdir}/libblockdev-docs.xml ${builddir}
+ gtkdoc-scan --rebuild-types --module=libblockdev --source-dir=${srcdir}/../src/plugins/ --source-dir=${srcdir}/../src/lib/ --source-dir=${srcdir}/../src/utils/
+ gtkdoc-mkdb --module=libblockdev --output-format=xml --source-dir=${srcdir}/../src/plugins/ --source-dir=${srcdir}/../src/lib/ --source-dir=${srcdir}/../src/utils/ --source-suffixes=c,h
+ test -d ${builddir}/html || mkdir ${builddir}/html
+@@ -13,7 +13,7 @@
+ -rm -rf ${builddir}/html
+ -rm -rf ${builddir}/xml
+ test ! -f ${builddir}/html-doc.stamp || rm ${builddir}/html-doc.stamp
+- test ${builddir} == ${srcdir} || rm -f ${builddir}/libblockdev-sections.txt ${builddir}/libblockdev-docs.xml
++ test "${builddir}" == "${srcdir}" || rm -f ${builddir}/libblockdev-sections.txt ${builddir}/libblockdev-docs.xml
+
+ install-data-local:
+ test -d ${DESTDIR}${datadir}/gtk-doc/html/libblockdev || mkdir -p ${DESTDIR}${datadir}/gtk-doc/html/libblockdev
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
new file mode 100644
index 000000000000..5625478c6081
--- /dev/null
+++ b/sys-libs/libblockdev/files/libblockdev-3.0.4-add-non-systemd-method-for-distro-info.patch
@@ -0,0 +1,30 @@
+From ec8cab726abe60ba5c7ffcce07905b29c5376163 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
+@@ -514,10 +514,16 @@ def get_version():
+ """ Try to get distro and version
+ """
+
+- bus = dbus.SystemBus()
++ try:
++ bus = dbus.SystemBus()
++
++ # get information about the distribution from systemd (hostname1)
++ sys_info = bus.get_object("org.freedesktop.hostname1", "/org/freedesktop/hostname1")
++ except dbus.exceptions.DBusException:
++ import platform
++ info = platform.freedesktop_os_release()
++ return (info["NAME"], info["VERSION_ID"])
+
+- # 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))
+
+ if cpe:
+--
+2.42.1
+
diff --git a/sys-libs/libblockdev/libblockdev-2.26.ebuild b/sys-libs/libblockdev/libblockdev-2.28-r1.ebuild
index 0682b4b778eb..3a4d698c3f06 100644
--- a/sys-libs/libblockdev/libblockdev-2.26.ebuild
+++ b/sys-libs/libblockdev/libblockdev-2.28-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..10} )
+PYTHON_COMPAT=( python3_{10..11} )
inherit autotools python-single-r1 xdg-utils
DESCRIPTION="A library for manipulating block devices"
@@ -12,18 +12,15 @@ if [[ "${PV}" == *9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/storaged-project/libblockdev.git"
BDEPEND="
- sys-devel/autoconf-archive
+ dev-build/autoconf-archive
"
else
MY_PV="${PV}-1"
- #MY_P="${PN}-${MY_PV}"
- #SRC_URI="https://github.com/storaged-project/${PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
SRC_URI="https://github.com/storaged-project/${PN}/releases/download/${MY_PV}/${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
- #S="${WORKDIR}/${MY_P}"
+ KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
fi
LICENSE="LGPL-2+"
-SLOT="0"
+SLOT="0/2" # subslot is SOVERSION
IUSE="bcache +cryptsetup device-mapper dmraid escrow gtk-doc introspection lvm kbd test +tools vdo"
# Tests require root. In a future release, we may be able to run a smaller
# subset with new run_tests.py arguments.
@@ -59,15 +56,26 @@ DEPEND="
${RDEPEND}
"
+# TODO: relax libbytesize condition once it has gained py3.11 support
BDEPEND+="
- dev-util/gtk-doc-am
+ dev-build/gtk-doc-am
gtk-doc? ( dev-util/gtk-doc )
introspection? ( >=dev-libs/gobject-introspection-1.3.0 )
+ test? (
+ $(python_gen_cond_dep '
+ dev-libs/libbytesize[python,${PYTHON_USEDEP}]
+ ' python3_{9..10} )
+ sys-block/targetcli-fb
+ )
"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
escrow? ( cryptsetup )"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.28-sh_tests.patch
+)
+
pkg_setup() {
python-single-r1_pkg_setup
}
@@ -88,8 +96,10 @@ src_configure() {
--with-btrfs
--with-fs
--with-part
+ --with-python3
--without-mpath
--without-nvdimm
+ --without-python2
$(use_enable introspection)
$(use_enable test tests)
$(use_with bcache)
@@ -103,8 +113,6 @@ src_configure() {
$(use_with lvm lvm-dbus)
$(use_with tools)
$(use_with vdo)
- --without-python2
- --with-python3
)
econf "${myeconfargs[@]}"
}
@@ -121,7 +129,7 @@ src_install() {
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
+ if ! use lvm ; then
rm -f "${ED}"/usr/bin/lvm-cache-stats || die
fi
python_optimize #718576
diff --git a/sys-libs/libblockdev/libblockdev-9999.ebuild b/sys-libs/libblockdev/libblockdev-2.29.ebuild
index 0682b4b778eb..aed9cc3e41c6 100644
--- a/sys-libs/libblockdev/libblockdev-9999.ebuild
+++ b/sys-libs/libblockdev/libblockdev-2.29.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..10} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit autotools python-single-r1 xdg-utils
DESCRIPTION="A library for manipulating block devices"
@@ -12,18 +12,15 @@ if [[ "${PV}" == *9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/storaged-project/libblockdev.git"
BDEPEND="
- sys-devel/autoconf-archive
+ dev-build/autoconf-archive
"
else
MY_PV="${PV}-1"
- #MY_P="${PN}-${MY_PV}"
- #SRC_URI="https://github.com/storaged-project/${PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
SRC_URI="https://github.com/storaged-project/${PN}/releases/download/${MY_PV}/${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
- #S="${WORKDIR}/${MY_P}"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
LICENSE="LGPL-2+"
-SLOT="0"
+SLOT="0/2" # subslot is SOVERSION
IUSE="bcache +cryptsetup device-mapper dmraid escrow gtk-doc introspection lvm kbd test +tools vdo"
# Tests require root. In a future release, we may be able to run a smaller
# subset with new run_tests.py arguments.
@@ -60,14 +57,24 @@ DEPEND="
"
BDEPEND+="
- dev-util/gtk-doc-am
+ dev-build/gtk-doc-am
gtk-doc? ( dev-util/gtk-doc )
introspection? ( >=dev-libs/gobject-introspection-1.3.0 )
+ test? (
+ $(python_gen_cond_dep '
+ dev-libs/libbytesize[python,${PYTHON_USEDEP}]
+ ')
+ sys-block/targetcli-fb
+ )
"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
escrow? ( cryptsetup )"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.28-sh_tests.patch
+)
+
pkg_setup() {
python-single-r1_pkg_setup
}
@@ -88,8 +95,10 @@ src_configure() {
--with-btrfs
--with-fs
--with-part
+ --with-python3
--without-mpath
--without-nvdimm
+ --without-python2
$(use_enable introspection)
$(use_enable test tests)
$(use_with bcache)
@@ -103,8 +112,6 @@ src_configure() {
$(use_with lvm lvm-dbus)
$(use_with tools)
$(use_with vdo)
- --without-python2
- --with-python3
)
econf "${myeconfargs[@]}"
}
@@ -121,7 +128,7 @@ src_install() {
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
+ if ! use lvm ; then
rm -f "${ED}"/usr/bin/lvm-cache-stats || die
fi
python_optimize #718576
diff --git a/sys-libs/libblockdev/libblockdev-2.25.ebuild b/sys-libs/libblockdev/libblockdev-3.0.3.ebuild
index 542a3e9e88c6..88cfcd76553c 100644
--- a/sys-libs/libblockdev/libblockdev-2.25.ebuild
+++ b/sys-libs/libblockdev/libblockdev-3.0.3.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
-inherit autotools python-single-r1 xdg-utils
+PYTHON_COMPAT=( python3_{10..11} )
+inherit autotools python-single-r1 toolchain-funcs xdg-utils
DESCRIPTION="A library for manipulating block devices"
HOMEPAGE="https://github.com/storaged-project/libblockdev"
@@ -12,24 +12,24 @@ if [[ "${PV}" == *9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/storaged-project/libblockdev.git"
BDEPEND="
- sys-devel/autoconf-archive
+ dev-build/autoconf-archive
"
else
MY_PV="${PV}-1"
- #MY_P="${PN}-${MY_PV}"
- #SRC_URI="https://github.com/storaged-project/${PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
SRC_URI="https://github.com/storaged-project/${PN}/releases/download/${MY_PV}/${P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 ~riscv sparc x86"
- #S="${WORKDIR}/${MY_P}"
+ KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc64 ~riscv x86"
fi
LICENSE="LGPL-2+"
-SLOT="0"
-IUSE="bcache +cryptsetup device-mapper dmraid escrow gtk-doc introspection lvm kbd test +tools vdo"
-RESTRICT="!test? ( test )"
+SLOT="0/3" # subslot is SOVERSION
+IUSE="+cryptsetup device-mapper escrow gtk-doc introspection lvm +nvme test +tools"
+# Tests require root. In a future release, we may be able to run a smaller
+# subset with new run_tests.py arguments.
+RESTRICT="!test? ( test ) test"
RDEPEND="
>=dev-libs/glib-2.42.2
dev-libs/libbytesize
+ sys-apps/gptfdisk
>=sys-apps/kmod-19
>=sys-apps/util-linux-2.27
>=sys-block/parted-3.1
@@ -38,29 +38,33 @@ RDEPEND="
>=dev-libs/nss-3.18.0
dev-libs/volume_key
)
- >=sys-fs/cryptsetup-1.6.7:=
+ >=sys-apps/keyutils-1.5.0:=
+ >=sys-fs/cryptsetup-2.3.0:=
)
device-mapper? ( sys-fs/lvm2 )
- dmraid? (
- sys-fs/dmraid
- sys-fs/lvm2
- )
lvm? (
sys-fs/lvm2
virtual/udev
)
- vdo? ( dev-libs/libyaml )
+ nvme? ( sys-libs/libnvme )
${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ ')
"
-DEPEND="
- ${RDEPEND}
-"
+DEPEND="${RDEPEND}"
BDEPEND+="
- dev-util/gtk-doc-am
+ dev-build/gtk-doc-am
gtk-doc? ( dev-util/gtk-doc )
introspection? ( >=dev-libs/gobject-introspection-1.3.0 )
+ test? (
+ $(python_gen_cond_dep '
+ dev-libs/libbytesize[python,${PYTHON_USEDEP}]
+ ')
+ sys-block/targetcli-fb
+ )
"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
@@ -82,37 +86,45 @@ src_prepare() {
}
src_configure() {
+ # Bug #910487
+ if tc-ld-is-lld; then
+ tc-ld-force-bfd
+ fi
+
local myeconfargs=(
--with-btrfs
--with-fs
--with-part
+ --with-python3
--without-mpath
--without-nvdimm
$(use_enable introspection)
$(use_enable test tests)
- $(use_with bcache)
$(use_with cryptsetup crypto)
$(use_with device-mapper dm)
- $(use_with dmraid)
$(use_with escrow)
$(use_with gtk-doc)
- $(use_with kbd)
$(use_with lvm lvm)
$(use_with lvm lvm-dbus)
+ $(use_with nvme)
$(use_with tools)
- $(use_with vdo)
- --without-python2
- --with-python3
)
econf "${myeconfargs[@]}"
}
+src_test() {
+ # See http://storaged.org/libblockdev/ch03.html
+ # The 'check' target just does Pylint.
+ # ... but it needs root.
+ emake test
+}
+
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
+ if ! use lvm ; then
rm -f "${ED}"/usr/bin/lvm-cache-stats || die
fi
python_optimize #718576
diff --git a/sys-libs/libblockdev/libblockdev-3.0.4.ebuild b/sys-libs/libblockdev/libblockdev-3.0.4.ebuild
new file mode 100644
index 000000000000..4d3b38836631
--- /dev/null
+++ b/sys-libs/libblockdev/libblockdev-3.0.4.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit autotools python-single-r1 xdg-utils
+
+DESCRIPTION="A 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
+ MY_PV="${PV}-1"
+ SRC_URI="https://github.com/storaged-project/${PN}/releases/download/${MY_PV}/${P}.tar.gz"
+ KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ~mips ~ppc ppc64 ~riscv x86"
+fi
+LICENSE="LGPL-2+"
+SLOT="0/3" # subslot is SOVERSION
+IUSE="+cryptsetup device-mapper escrow gtk-doc introspection lvm +nvme test +tools"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-libs/glib-2.42.2
+ dev-libs/libbytesize
+ sys-apps/gptfdisk
+ >=sys-apps/kmod-19
+ >=sys-apps/util-linux-2.27
+ >=sys-block/parted-3.1
+ cryptsetup? (
+ escrow? (
+ >=dev-libs/nss-3.18.0
+ dev-libs/volume_key
+ )
+ >=sys-apps/keyutils-1.5.0:=
+ >=sys-fs/cryptsetup-2.3.0:=
+ )
+ device-mapper? ( sys-fs/lvm2 )
+ lvm? (
+ sys-fs/lvm2
+ virtual/udev
+ )
+ nvme? ( sys-libs/libnvme )
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ ')
+"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND+="
+ dev-build/gtk-doc-am
+ gtk-doc? ( dev-util/gtk-doc )
+ introspection? ( >=dev-libs/gobject-introspection-1.3.0 )
+ test? (
+ $(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_REQUIRED_USE}
+ escrow? ( cryptsetup )
+ test? ( introspection lvm )
+"
+
+PATCHES=(
+ "${FILESDIR}/libblockdev-3.0.4-add-non-systemd-method-for-distro-info.patch"
+)
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ xdg_environment_reset #623992
+ default
+
+ # https://bugs.gentoo.org/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
+ --with-python3
+ --without-mpath
+ --without-nvdimm
+ $(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 tools)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ # See http://storaged.org/libblockdev/ch03.html
+ # Largest subset which doesn't require root priviledges
+ ${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
+ python_optimize #718576
+}
diff --git a/sys-libs/libblockdev/libblockdev-3.1.1.ebuild b/sys-libs/libblockdev/libblockdev-3.1.1.ebuild
new file mode 100644
index 000000000000..dbce37fe8a48
--- /dev/null
+++ b/sys-libs/libblockdev/libblockdev-3.1.1.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit autotools python-single-r1 xdg-utils
+
+DESCRIPTION="A 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
+ MY_PV="${PV}-1"
+ SRC_URI="https://github.com/storaged-project/${PN}/releases/download/${MY_PV}/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~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 test +tools"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-libs/glib-2.42.2
+ dev-libs/libbytesize
+ sys-apps/gptfdisk
+ >=sys-apps/kmod-19
+ >=sys-apps/util-linux-2.27
+ >=sys-block/parted-3.1
+ cryptsetup? (
+ escrow? (
+ >=dev-libs/nss-3.18.0
+ dev-libs/volume_key
+ )
+ >=sys-apps/keyutils-1.5.0:=
+ >=sys-fs/cryptsetup-2.3.0:=
+ )
+ device-mapper? ( sys-fs/lvm2 )
+ lvm? (
+ sys-fs/lvm2
+ virtual/udev
+ )
+ nvme? ( sys-libs/libnvme )
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ ')
+"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND+="
+ dev-build/gtk-doc-am
+ gtk-doc? ( dev-util/gtk-doc )
+ introspection? ( >=dev-libs/gobject-introspection-1.3.0 )
+ test? (
+ $(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_REQUIRED_USE}
+ escrow? ( cryptsetup )
+ test? ( introspection lvm )
+"
+
+PATCHES=(
+ "${FILESDIR}/libblockdev-3.0.4-add-non-systemd-method-for-distro-info.patch"
+)
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ xdg_environment_reset #623992
+ default
+
+ # https://bugs.gentoo.org/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
+ --with-python3
+ --without-mpath
+ --without-nvdimm
+ $(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 tools)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ # See http://storaged.org/libblockdev/ch03.html
+ # Largest subset which doesn't require root priviledges
+ ${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
+ python_optimize #718576
+}
diff --git a/sys-libs/libblockdev/metadata.xml b/sys-libs/libblockdev/metadata.xml
index 981e2c38015b..1c865386b8fd 100644
--- a/sys-libs/libblockdev/metadata.xml
+++ b/sys-libs/libblockdev/metadata.xml
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>polynomial-c@gentoo.org</email>
- <name>Lars Wendler</name>
- </maintainer>
- <use>
- <flag name="bcache">Enable block device cache support.</flag>
- <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="dmraid">Support for dmraid devices, also known as ATA-RAID, or Fake RAID.</flag>
- <flag name="escrow">Support for building crypto plugin with escrow device support</flag>
- <flag name="kbd">Enable kernel block device support.</flag>
- <flag name="lvm">Enable support for Logical Volume Management via <pkg>sys-fs/lvm2</pkg>.</flag>
- <flag name="tools">Build tools</flag>
- <flag name="vdo">Enable Virtual Data Optimizer support.</flag>
- </use>
- <upstream>
- <remote-id type="github">storaged-project/libblockdev</remote-id>
- </upstream>
+ <maintainer type="person">
+ <email>marecki@gentoo.org</email>
+ <name>Marek Szuba</name>
+ </maintainer>
+ <use>
+ <flag name="bcache">Enable block device cache support.</flag>
+ <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="dmraid">Support for dmraid devices, also known as ATA-RAID, or Fake RAID.</flag>
+ <flag name="escrow">Support for building crypto plugin with escrow device support</flag>
+ <flag name="kbd">Enable kernel block 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="tools">Build tools</flag>
+ <flag name="vdo">Enable Virtual Data Optimizer support.</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
index 91583ac0a494..0ffa199c4537 100644
--- a/sys-libs/libcap-ng/Manifest
+++ b/sys-libs/libcap-ng/Manifest
@@ -1,2 +1,3 @@
DIST libcap-ng-0.8.2-apply-disable.patch 723 BLAKE2B 70d9959c55119c02bbc4ea605251491c04c477511c20b9fe93e6527ffd3fe2f35a72fabab5ca149c4aaf536c6cd8dceb15375297158f8827a0c676744381bbc1 SHA512 8c9317bdd4fde7d6a4618ec613bce46bed7646891bd16bc3fa307e9a814e38601bf3c6ad13102389d4596d9ed6a7ad853cca58624e724fe07383007e386c51f8
-DIST libcap-ng-0.8.2.tar.gz 456066 BLAKE2B 7e721d05b92fd3708b970527e76b1898daa91bde3ab6ed5d8f23b1435404fbe7d15731461c6d9d2c791738e5498d1f5eaba727413480d34b7edea13c8691c32b SHA512 0ac6e55c03b1fba3a849048b721e250951afb59190d9646704d4fd9938eccc3bd0767380fbddc42f186b4f55695475e31f34f537ae91c04a37662577a5b7a19b
+DIST libcap-ng-0.8.3.tar.gz 455383 BLAKE2B c54dd753e0ef6dd21bcf6af7b003f85ded9faf2fbf1ea834cda6b181b165ff4b11a0284c23c73d0e6f97a810b3e6a63fceeb57ff583a2b32f23924bdee597ef5 SHA512 0ef9bc7bc6b7b59991f43b79aa6cde3e8d2c22c4b9ced2af8deae501e01d51e893033d109cb8aa0fdcba190140110993089245346334d7b114d18f1bb1b55b97
+DIST libcap-ng-0.8.4.tar.gz 453749 BLAKE2B 523480281cfa544e77e30932968b4b18424286dbced06bb4645d536cf19d4cc0f7c73de82006ffc329aa7ef208e0cf8e3379f1b20e1e8e4e90e422ed736f6c44 SHA512 f4f3499d592e8583c2bdb8d700981a7930bd545f0889bc02f49acecf17e3bc600b100cd4f64e9326e5bac0a07a02a1ac4b7e83e919563066665a3d67cbe6871e
diff --git a/sys-libs/libcap-ng/files/libcap-ng-0.8.4-slibtool.patch b/sys-libs/libcap-ng/files/libcap-ng-0.8.4-slibtool.patch
new file mode 100644
index 000000000000..d69f986875e3
--- /dev/null
+++ b/sys-libs/libcap-ng/files/libcap-ng-0.8.4-slibtool.patch
@@ -0,0 +1,32 @@
+https://github.com/stevegrubb/libcap-ng/commit/75fe3714a8da28f0e2939c4402527782014401dd
+https://github.com/stevegrubb/libcap-ng/pull/52
+
+From b7d21b473badb349bc0d6246b3804a8a2d329f36 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Wed, 3 Apr 2024 17:32:04 -0700
+Subject: [PATCH] utils: link using libcap-ng.la
+
+When linking internal dependencies that were linked using $(LIBTOOL) the
+ideal method is to use the generated libtool archive (.la) file. This
+fixes the build with slibtool which doesn't find -lcap-ng during the
+build and explicitly requires the .la file to be used.
+
+Gentoo Issue: https://bugs.gentoo.org/928450
+Signed-off-by: orbea <orbea@riseup.net>
+---
+ utils/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utils/Makefile.am b/utils/Makefile.am
+index f430454..97aa021 100644
+--- a/utils/Makefile.am
++++ b/utils/Makefile.am
+@@ -25,7 +25,7 @@ CONFIG_CLEAN_FILES = *.loT *.rej *.orig
+ AUTOMAKE_OPTIONS = no-dependencies
+ EXTRA_DIST = $(man_MANS)
+ AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/src
+-LIBS = -L${top_builddir}/src -lcap-ng
++LDADD = ${top_builddir}/src/libcap-ng.la
+ AM_CFLAGS = -W -Wall -Wshadow ${WFLAGS} -Wundef -D_GNU_SOURCE
+ bin_PROGRAMS = pscap netcap filecap captest
+ man_MANS = pscap.8 netcap.8 filecap.8 captest.8
diff --git a/sys-libs/libcap-ng/files/libcap-ng-0.8.4-swig.patch b/sys-libs/libcap-ng/files/libcap-ng-0.8.4-swig.patch
new file mode 100644
index 000000000000..4b3f41a580ab
--- /dev/null
+++ b/sys-libs/libcap-ng/files/libcap-ng-0.8.4-swig.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/921305
+https://github.com/stevegrubb/libcap-ng/issues/48
+https://github.com/stevegrubb/libcap-ng/commit/30453b6553948cd05c438f9f509013e3bb84f25b
+
+From 30453b6553948cd05c438f9f509013e3bb84f25b Mon Sep 17 00:00:00 2001
+From: Steve Grubb <ausearch.1@gmail.com>
+Date: Thu, 4 Jan 2024 15:06:29 -0500
+Subject: [PATCH] Remove python global exception handler since its deprecated
+
+---
+ bindings/src/capng_swig.i | 7 -------
+ 2 files changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/bindings/src/capng_swig.i b/bindings/src/capng_swig.i
+index fcdaf18..fa85e13 100644
+--- a/bindings/src/capng_swig.i
++++ b/bindings/src/capng_swig.i
+@@ -30,13 +30,6 @@
+
+ %varargs(16, signed capability = 0) capng_updatev;
+
+-%except(python) {
+- $action
+- if (result < 0) {
+- PyErr_SetFromErrno(PyExc_OSError);
+- return NULL;
+- }
+-}
+ #endif
+
+ %define __signed__
diff --git a/sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild b/sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild
index f79095d55829..ffb59a372613 100644
--- a/sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild
+++ b/sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild
@@ -1,21 +1,25 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit autotools flag-o-matic python-r1
+# 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_{9..11} )
+inherit autotools flag-o-matic out-of-source-utils python-r1
DESCRIPTION="POSIX 1003.1e capabilities"
HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/"
+# Patch works around / reverts a behaviour change because not all consumers were ready.
+# Keep this patch for a bit longer until Fedora stop shipping it (not clear what else
+# other than gnome-keyring was broken by it: bug #759550)
# Fedora 0.8.2 https://src.fedoraproject.org/rpms/libcap-ng/c/a5b0f536df1132d8e7afa4c0ce07b630e7970cad?branch=master
SRC_URI="https://people.redhat.com/sgrubb/${PN}/${P}.tar.gz
- https://src.fedoraproject.org/rpms/libcap-ng/raw/a5b0f536df1132d8e7afa4c0ce07b630e7970cad/f/libcap-ng-0.8.2-apply-disable.patch"
+ https://src.fedoraproject.org/rpms/libcap-ng/raw/a5b0f536df1132d8e7afa4c0ce07b630e7970cad/f/libcap-ng-0.8.2-apply-disable.patch"
LICENSE="LGPL-2.1"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux"
IUSE="python static-libs"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
@@ -30,9 +34,11 @@ PATCHES=(
src_prepare() {
default
+
if use prefix ; then
sed -i "s@cat /usr@cat ${EPREFIX}/usr@" bindings/python*/Makefile.am || die
- eautomake #668722
+ # bug #668722
+ eautomake
fi
}
@@ -45,51 +51,59 @@ src_configure() {
$(use_enable static-libs static)
)
- local pythonconf=( --without-python --without-python3 )
+ local pythonconf=(
+ --without-python
+ --without-python3
+ )
- # set up python bindings build(s)
+ # Set up python bindings build(s)
if use python ; then
setup_python_flags_configure() {
- pythonconf=( --without-python --with-python3 )
+ pythonconf=(
+ --without-python
+ --with-python3
+ )
+
run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}"
}
python_foreach_impl setup_python_flags_configure
else
- local BUILD_DIR=${WORKDIR}/build
+ local BUILD_DIR="${WORKDIR}"/build
run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}"
fi
}
src_compile() {
- if use python; then
+ if use python ; then
python_foreach_impl run_in_build_dir emake
else
- local BUILD_DIR=${WORKDIR}/build
+ local BUILD_DIR="${WORKDIR}"/build
emake -C "${BUILD_DIR}"
fi
}
src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
+ if [[ "${EUID}" -eq 0 ]] ; then
ewarn "Skipping tests due to root permissions."
return
fi
- if use python; then
+ if use python ; then
python_foreach_impl run_in_build_dir emake check
else
- local BUILD_DIR=${WORKDIR}/build
+ local BUILD_DIR="${WORKDIR}"/build
emake -C "${BUILD_DIR}" check
fi
}
src_install() {
- if use python; then
+ if use python ; then
python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
else
- local BUILD_DIR=${WORKDIR}/build
+ local BUILD_DIR="${WORKDIR}"/build
emake -C "${BUILD_DIR}" DESTDIR="${D}" install
fi
+
find "${ED}" -name '*.la' -delete || die
}
diff --git a/sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild b/sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild
new file mode 100644
index 000000000000..f6c6b3dbba65
--- /dev/null
+++ b/sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2024 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_{10..12} )
+inherit autotools 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 ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux"
+IUSE="python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="python? ( ${PYTHON_DEPS} )"
+DEPEND="
+ ${RDEPEND}
+ sys-kernel/linux-headers
+"
+BDEPEND="python? ( >=dev-lang/swig-2 )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-swig.patch
+ # https://bugs.gentoo.org/928450
+ "${FILESDIR}"/${P}-slibtool.patch
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ use sparc && replace-flags -O? -O0
+
+ 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
+
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/sys-libs/libcap-ng/libcap-ng-0.8.4.ebuild b/sys-libs/libcap-ng/libcap-ng-0.8.4.ebuild
new file mode 100644
index 000000000000..cffaa6067dc7
--- /dev/null
+++ b/sys-libs/libcap-ng/libcap-ng-0.8.4.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2024 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_{10..12} )
+inherit autotools 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 ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux"
+IUSE="python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="python? ( ${PYTHON_DEPS} )"
+DEPEND="
+ ${RDEPEND}
+ sys-kernel/linux-headers
+"
+BDEPEND="python? ( >=dev-lang/swig-2 )"
+
+src_prepare() {
+ default
+
+ if use prefix ; then
+ sed -i "s@cat /usr@cat ${EPREFIX}/usr@" bindings/python*/Makefile.am || die
+ # bug #668722
+ eautomake
+ fi
+}
+
+src_configure() {
+ use sparc && replace-flags -O? -O0
+
+ local ECONF_SOURCE="${S}"
+
+ local myconf=(
+ $(use_enable static-libs static)
+ )
+
+ 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
+
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/sys-libs/libcap-ng/metadata.xml b/sys-libs/libcap-ng/metadata.xml
index 2d75111936ad..d321b5cf8882 100644
--- a/sys-libs/libcap-ng/metadata.xml
+++ b/sys-libs/libcap-ng/metadata.xml
@@ -1,17 +1,18 @@
<?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>
+ <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>
-<upstream>
- <remote-id type="cpe">cpe:/a:libcap-ng_project:libcap-ng</remote-id>
-</upstream>
+ </longdescription>
+ <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
index 2f5d81e1e4b5..12f008357e12 100644
--- a/sys-libs/libcap/Manifest
+++ b/sys-libs/libcap/Manifest
@@ -1 +1 @@
-DIST libcap-2.62.tar.xz 174772 BLAKE2B e3c86a5b88b9be932802ec8612f79e5f04912bf3e66f673eae2add85362292f4737c544d21b9e5adfd1a7a33c073568301b6532cdf0ea6c8b834d895b84323f1 SHA512 61ac004920c5cd3382a5443db2eacfc2041b7a8c0814b27084c1d111125639fe3950dea4325d0f7fb6bfb0d5de114452c3a62230cc958edb05ffdb83b213f9b3
+DIST libcap-2.69.tar.xz 189200 BLAKE2B 94d1fef7666a1c383a8b96f1f6092bd242164631532868b628d2f5de71b42a371d041a978ef7fbadfee3eeb433165444995d1078cd790275bc0433a7875a697e SHA512 647c307dc451517da9d089495ab959b4a6fbbe41c79f4e1e9bb663569dad630ead0c2e413dfb393319e3ea14dc9848c81b392107fe3382ce1813d278c3394a7f
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
index 04c59357c45f..bd1c22fcad5a 100644
--- 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
@@ -8,11 +8,6 @@ due to the fs not supporting it) shouldn't impair the default install.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-Forward ported from libcap-2.20 to libcap-2.25
-
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
-diff --git a/progs/Makefile b/progs/Makefile
-index 2cb7520..6d417de 100644
--- a/progs/Makefile
+++ b/progs/Makefile
@@ -39,7 +39,7 @@ install: all
diff --git a/sys-libs/libcap/libcap-2.69-r1.ebuild b/sys-libs/libcap/libcap-2.69-r1.ebuild
new file mode 100644
index 000000000000..d7218cbc4b0a
--- /dev/null
+++ b/sys-libs/libcap/libcap-2.69-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit 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 ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="POSIX 1003.1e capabilities"
+HOMEPAGE="https://sites.google.com/site/fullycapable/"
+
+# it's available under either of the licenses
+LICENSE="|| ( GPL-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() {
+ 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
+ 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-2.62.ebuild b/sys-libs/libcap/libcap-2.69.ebuild
index 6f1eb8a076a3..f1d3b050aad9 100644
--- a/sys-libs/libcap/libcap-2.62.ebuild
+++ b/sys-libs/libcap/libcap-2.69.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit multilib-minimal toolchain-funcs pam usr-ldscript
@@ -11,7 +11,7 @@ if [[ ${PV} == *9999 ]]; then
else
SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
fi
DESCRIPTION="POSIX 1003.1e capabilities"
@@ -92,5 +92,5 @@ multilib_src_install() {
}
multilib_src_install_all() {
- dodoc CHANGELOG README doc/capability.notes
+ dodoc CHANGELOG README doc/capability.md
}
diff --git a/sys-libs/libcap/libcap-9999.ebuild b/sys-libs/libcap/libcap-9999.ebuild
index 969f9d0aaacb..ee91b8f42d9c 100644
--- a/sys-libs/libcap/libcap-9999.ebuild
+++ b/sys-libs/libcap/libcap-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit multilib-minimal toolchain-funcs pam usr-ldscript
+inherit multilib-minimal toolchain-funcs pam
if [[ ${PV} == *9999 ]]; then
inherit git-r3
@@ -11,7 +11,7 @@ if [[ ${PV} == *9999 ]]; then
else
SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
fi
DESCRIPTION="POSIX 1003.1e capabilities"
@@ -33,6 +33,10 @@ BDEPEND="
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
@@ -72,8 +76,6 @@ multilib_src_install() {
# no configure, needs explicit install line #444724#c3
run_emake DESTDIR="${D}" install
- gen_usr_ldscript -a cap
- gen_usr_ldscript -a psx
if ! use static-libs ; then
rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die
fi
@@ -88,5 +90,5 @@ multilib_src_install() {
}
multilib_src_install_all() {
- dodoc CHANGELOG README doc/capability.notes
+ dodoc CHANGELOG README doc/capability.md
}
diff --git a/sys-libs/libchipcard/Manifest b/sys-libs/libchipcard/Manifest
index 0a67c8296940..ccc116389bcd 100644
--- a/sys-libs/libchipcard/Manifest
+++ b/sys-libs/libchipcard/Manifest
@@ -1 +1,2 @@
DIST libchipcard-5.1.5rc2.tar.gz 877820 BLAKE2B dfe82e3d6aea26e95e5f69298ea17ad4bb9a1d106cca02a9fc23f5aa5ea338471ae5628248350e01571f4819567da2a0f5a3699d56d8f02ed58971d6ac715abe SHA512 5e86068bd688f72e04073dbd076f21646a6b75d2a7a73c25bba4396e8657c4df28cf5cfb61eef7b243186f8313cea1262e415f2acad5348fa5179b46d7f96ed1
+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
new file mode 100644
index 000000000000..45f44665beba
--- /dev/null
+++ b/sys-libs/libchipcard/files/libchipcard-5.1.6-clang16-build-fix.patch
@@ -0,0 +1,12 @@
+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.5_rc2.ebuild b/sys-libs/libchipcard/libchipcard-5.1.5_rc2.ebuild
index d7a4578bb9f2..72c3965f46dc 100644
--- a/sys-libs/libchipcard/libchipcard-5.1.5_rc2.ebuild
+++ b/sys-libs/libchipcard/libchipcard-5.1.5_rc2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -11,12 +11,12 @@ SRC_URI="https://www.aquamaniac.de/rdm/attachments/download/229/${MY_P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
-KEYWORDS="amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc x86"
+KEYWORDS="amd64 ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc x86"
IUSE="doc examples"
BDEPEND="
sys-devel/gettext
- doc? ( app-doc/doxygen )
+ doc? ( app-text/doxygen )
"
DEPEND="
>=sys-apps/pcsc-lite-1.6.2
diff --git a/sys-libs/libchipcard/libchipcard-5.1.6-r1.ebuild b/sys-libs/libchipcard/libchipcard-5.1.6-r1.ebuild
new file mode 100644
index 000000000000..7fda516cd379
--- /dev/null
+++ b/sys-libs/libchipcard/libchipcard-5.1.6-r1.ebuild
@@ -0,0 +1,53 @@
+# 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:=
+ sys-libs/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/libchipcard-5.1.6.ebuild b/sys-libs/libchipcard/libchipcard-5.1.6.ebuild
new file mode 100644
index 000000000000..22b7cb9b20a5
--- /dev/null
+++ b/sys-libs/libchipcard/libchipcard-5.1.6.ebuild
@@ -0,0 +1,49 @@
+# 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:=
+ sys-libs/zlib
+ virtual/libintl
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO doc/{CERTIFICATES,CONFIG,IPCCOMMANDS} )
+
+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/libcxx/Manifest b/sys-libs/libcxx/Manifest
index 45e9d7a057c0..baf0ab9370b1 100644
--- a/sys-libs/libcxx/Manifest
+++ b/sys-libs/libcxx/Manifest
@@ -1,9 +1,12 @@
-DIST llvm-gentoo-patchset-11.1.0-1.tar.xz 4032 BLAKE2B e69138a422e315b31a3d9c11faa4ae1ddf1bf9092cee2db0de4d2adef81fd802973488293aab48b764402b51996893b17ca03249ef4620848a576d1f6cdb9698 SHA512 e1c5504dab6c5db9fdf4addfeb12316f22d0258717ba551a9b7b3ba37919491fb6011ac5cca1e793b7509d5c1c186bc6bc4213f7d6155d190612492b216f979b
-DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249
-DIST llvm-gentoo-patchset-13.0.0.tar.xz 5012 BLAKE2B 6760c78c086aaf6629143fd920b0a2c68cad9278628fbea8164dfeb59db95984a5b5d6b3505b510c697e8c95bf8d2be782c6b73c01622d52f2da9b07ecff39e0 SHA512 7764d49343b795b6bebae64f646ba27e3e6cc2a20b8a1aee645ce0d8474633c34acfbb73c08546fee415755dd4ea5a98c1d84db5e394cf5f4fc802eb61148ab6
-DIST llvm-gentoo-patchset-13.0.1-rc3.tar.xz 4808 BLAKE2B d8ed3ae424914437413e2e8c029880072e93d79ca79b842ad59451df46594c9b0d73ee5d49d3b65c4c7a40c86b2e0d43501ef106aea7c481f22425a5245a3411 SHA512 10430a720b120a340a681fa435a7f050741c75270607e3f5214bf829313d274c11f019f1ac072857dc5d7f868e6eb013932d1c94446e8cb2e151ac818a081914
-DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc
-DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
-DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
-DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
-DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1
+DIST llvm-gentoo-patchset-15.0.7-r1.tar.xz 21400 BLAKE2B 6b149cb721ac476b728bf9b0197f630d3db40622b85e3d099cdbc1d85ec14872d4e1eb0c94be6edc20fc6187da29b42f934dfb765f2077425a5b919900bb97c0 SHA512 d84d48caa3781633c7c6147e0b786417e93e4b5c9d1393809164e6d355a56673013ed0ea9bc3309488d7cfb794c1b336c888adc52dcd95e70c16d9208c36bd15
+DIST llvm-gentoo-patchset-16.0.6.tar.xz 17340 BLAKE2B 37cdf4b38367b4256d4f7a25d1b4f41758e5f81be8e20a1c94a10d6c5e36642e9672121b455e73a0bac2eb40467ef2db4b43789b2912a6790593d97b8b5c27e3 SHA512 2c02b9d8a4c5af9fddcd26c95dc66fffae32cb5b7f85c65a1aa4ed00dd8cd5b01cc1975a711aee63c0b8b11e9dc20f2bc05ea753904eb516892b820f02aff825
+DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
+DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
+DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
+DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
+DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
+DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29
+DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386
+DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1
+DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50
diff --git a/sys-libs/libcxx/libcxx-11.1.0.ebuild b/sys-libs/libcxx/libcxx-11.1.0.ebuild
deleted file mode 100644
index a976ee77c535..000000000000
--- a/sys-libs/libcxx/libcxx-11.1.0.ebuild
+++ /dev/null
@@ -1,211 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{7..9} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~riscv x86 ~x64-macos"
-IUSE="+libcxxabi +libunwind static-libs test"
-REQUIRED_USE="libunwind? ( libcxxabi )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
- !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )"
-# llvm-6 for new lit options
-# clang-3.9.0 installs necessary target symlinks unconditionally
-# which removes the need for MULTILIB_USEDEP
-DEPEND="${RDEPEND}
- >=sys-devel/llvm-6"
-BDEPEND="
- test? (
- >=dev-util/cmake-3.16
- >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-DOCS=( CREDITS.TXT )
-
-LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake/modules,utils/llvm-lit} )
-LLVM_PATCHSET=11.1.0-1
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # Darwin Prefix builds do not have llvm installed yet, so rely on
- # bootstrap-prefix to set the appropriate path vars to LLVM instead
- # of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- use test && python-any-r1_pkg_setup
-
- if ! use libcxxabi && ! tc-is-gcc ; then
- eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
- eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
- eerror "and try again."
- die
- fi
-}
-
-test_compiler() {
- $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
- <<<'int main() { return 0; }' &>/dev/null
-}
-
-src_configure() {
- # note: we need to do this before multilib kicks in since it will
- # alter the CHOST
- local cxxabi cxxabi_incs
- if use libcxxabi; then
- cxxabi=libcxxabi
- cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
- else
- local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
- cxxabi=libsupc++
- cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
- fi
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- # we want -lgcc_s for unwinder, and for compiler runtime when using
- # gcc, clang with gcc runtime (or any unknown compiler)
- local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
- if use libunwind; then
- # work-around missing -lunwind upstream
- extra_libs+=( -lunwind )
- # if we're using libunwind and clang with compiler-rt, we want
- # to link to compiler-rt instead of -lgcc_s
- if tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LDFLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- want_gcc_s=OFF
- want_compiler_rt=ON
- extra_libs+=( "${compiler_rt}" )
- fi
- fi
- elif [[ ${CHOST} == *-darwin* ]] && tc-is-clang; then
- # clang-based darwin prefix disables libunwind useflag during
- # bootstrap, because libunwind is not in the prefix yet.
- # override the default, though, because clang based libcxx
- # should never use gcc_s on Darwin.
- want_gcc_s=OFF
- # compiler_rt is not available in EPREFIX during bootstrap,
- # so we cannot link to it yet anyway, so keep the defaults
- # of want_compiler_rt=OFF and extra_libs=()
- fi
-
- # bootstrap: cmake is unhappy if compiler can't link to stdlib
- local nolib_flags=( -nodefaultlibs -lc )
- if ! test_compiler; then
- if test_compiler "${nolib_flags[@]}"; then
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
- fi
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBCXX_ENABLE_SHARED=ON
- -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXX_CXX_ABI=${cxxabi}
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
- # we're using our own mechanism for generating linker scripts
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
- -DLIBCXX_INCLUDE_TESTS=$(usex test)
- -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
- -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
- )
-
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- fi
- cmake_src_configure
-}
-
-multilib_src_test() {
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-cxx
-}
-
-# Usage: deps
-gen_ldscript() {
- local output_format
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
- cat <<-END_LDSCRIPT
-/* GNU ld script
- Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
- local libdir=$(get_libdir)
- local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "libsupc++.a")
-
- # Move it first.
- mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
- # Generate libc++.a ldscript for inclusion of its dependencies so that
- # clang++ -stdlib=libc++ -static works out of the box.
- local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
- # On Linux/glibc it does not link without libpthread or libdl. It is
- # fine on FreeBSD.
- use elibc_glibc && deps+=" libpthread.a libdl.a"
-
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
-}
-
-gen_shared_ldscript() {
- local libdir=$(get_libdir)
- # libsupc++ doesn't have a shared version
- local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "libsupc++.a")
-
- mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
- local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
-
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
-}
-
-multilib_src_install() {
- cmake_src_install
- if [[ ${CHOST} != *-darwin* ]] ; then
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
- fi
-}
-
-pkg_postinst() {
- elog "This package (${PN}) is mainly intended as a replacement for the C++"
- elog "standard library when using clang."
- elog "To use it, instead of libstdc++, use:"
- elog " clang++ -stdlib=libc++"
- elog "to compile your C++ programs."
-}
diff --git a/sys-libs/libcxx/libcxx-12.0.1.ebuild b/sys-libs/libcxx/libcxx-12.0.1.ebuild
deleted file mode 100644
index 32417c012865..000000000000
--- a/sys-libs/libcxx/libcxx-12.0.1.ebuild
+++ /dev/null
@@ -1,212 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~riscv x86 ~x64-macos"
-IUSE="+libcxxabi +libunwind static-libs test"
-REQUIRED_USE="libunwind? ( libcxxabi )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
- !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )"
-# llvm-6 for new lit options
-# clang-3.9.0 installs necessary target symlinks unconditionally
-# which removes the need for MULTILIB_USEDEP
-DEPEND="${RDEPEND}
- >=sys-devel/llvm-6"
-BDEPEND="
- test? (
- >=dev-util/cmake-3.16
- >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-DOCS=( CREDITS.TXT )
-
-LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake/modules,utils/llvm-lit} )
-LLVM_PATCHSET=12.0.1
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # Darwin Prefix builds do not have llvm installed yet, so rely on
- # bootstrap-prefix to set the appropriate path vars to LLVM instead
- # of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- use test && python-any-r1_pkg_setup
-
- if ! use libcxxabi && ! tc-is-gcc ; then
- eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
- eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
- eerror "and try again."
- die
- fi
-}
-
-test_compiler() {
- $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
- <<<'int main() { return 0; }' &>/dev/null
-}
-
-src_configure() {
- # note: we need to do this before multilib kicks in since it will
- # alter the CHOST
- local cxxabi cxxabi_incs
- if use libcxxabi; then
- cxxabi=libcxxabi
- cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
- else
- local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
- cxxabi=libsupc++
- cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
- fi
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- # we want -lgcc_s for unwinder, and for compiler runtime when using
- # gcc, clang with gcc runtime (or any unknown compiler)
- local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
- if use libunwind; then
- # work-around missing -lunwind upstream
- extra_libs+=( -lunwind )
- # if we're using libunwind and clang with compiler-rt, we want
- # to link to compiler-rt instead of -lgcc_s
- if tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LDFLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- want_gcc_s=OFF
- want_compiler_rt=ON
- extra_libs+=( "${compiler_rt}" )
- fi
- fi
- elif [[ ${CHOST} == *-darwin* ]] && tc-is-clang; then
- # clang-based darwin prefix disables libunwind useflag during
- # bootstrap, because libunwind is not in the prefix yet.
- # override the default, though, because clang based libcxx
- # should never use gcc_s on Darwin.
- want_gcc_s=OFF
- # compiler_rt is not available in EPREFIX during bootstrap,
- # so we cannot link to it yet anyway, so keep the defaults
- # of want_compiler_rt=OFF and extra_libs=()
- fi
-
- # bootstrap: cmake is unhappy if compiler can't link to stdlib
- local nolib_flags=( -nodefaultlibs -lc )
- if ! test_compiler; then
- if test_compiler "${nolib_flags[@]}"; then
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
- fi
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBCXX_ENABLE_SHARED=ON
- -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXX_CXX_ABI=${cxxabi}
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
- # we're using our own mechanism for generating linker scripts
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
- -DLIBCXX_INCLUDE_TESTS=$(usex test)
- -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
- -DLIBCXX_HAS_ATOMIC_LIB=${want_gcc_s}
- -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
- )
-
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- fi
- cmake_src_configure
-}
-
-multilib_src_test() {
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-cxx
-}
-
-# Usage: deps
-gen_ldscript() {
- local output_format
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
- cat <<-END_LDSCRIPT
-/* GNU ld script
- Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
- local libdir=$(get_libdir)
- local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "libsupc++.a")
-
- # Move it first.
- mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
- # Generate libc++.a ldscript for inclusion of its dependencies so that
- # clang++ -stdlib=libc++ -static works out of the box.
- local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
- # On Linux/glibc it does not link without libpthread or libdl. It is
- # fine on FreeBSD.
- use elibc_glibc && deps+=" libpthread.a libdl.a"
-
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
-}
-
-gen_shared_ldscript() {
- local libdir=$(get_libdir)
- # libsupc++ doesn't have a shared version
- local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "libsupc++.a")
-
- mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
- local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
-
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
-}
-
-multilib_src_install() {
- cmake_src_install
- if [[ ${CHOST} != *-darwin* ]] ; then
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
- fi
-}
-
-pkg_postinst() {
- elog "This package (${PN}) is mainly intended as a replacement for the C++"
- elog "standard library when using clang."
- elog "To use it, instead of libstdc++, use:"
- elog " clang++ -stdlib=libc++"
- elog "to compile your C++ programs."
-}
diff --git a/sys-libs/libcxx/libcxx-13.0.0.ebuild b/sys-libs/libcxx/libcxx-13.0.0.ebuild
deleted file mode 100644
index 74bdf451ab48..000000000000
--- a/sys-libs/libcxx/libcxx-13.0.0.ebuild
+++ /dev/null
@@ -1,214 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~riscv x86 ~x64-macos"
-IUSE="+libcxxabi +libunwind static-libs test"
-REQUIRED_USE="libunwind? ( libcxxabi )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
- !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )"
-# llvm-6 for new lit options
-# clang-3.9.0 installs necessary target symlinks unconditionally
-# which removes the need for MULTILIB_USEDEP
-DEPEND="${RDEPEND}
- >=sys-devel/llvm-6"
-BDEPEND="
- test? (
- >=dev-util/cmake-3.16
- >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-DOCS=( CREDITS.TXT )
-
-LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake,utils/llvm-lit} )
-LLVM_PATCHSET=${PV/_/-}
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # Darwin Prefix builds do not have llvm installed yet, so rely on
- # bootstrap-prefix to set the appropriate path vars to LLVM instead
- # of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- use test && python-any-r1_pkg_setup
-
- if ! use libcxxabi && ! tc-is-gcc ; then
- eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
- eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
- eerror "and try again."
- die
- fi
-}
-
-test_compiler() {
- $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
- <<<'int main() { return 0; }' &>/dev/null
-}
-
-src_configure() {
- # note: we need to do this before multilib kicks in since it will
- # alter the CHOST
- local cxxabi cxxabi_incs
- if use libcxxabi; then
- cxxabi=libcxxabi
- cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
- else
- local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
- cxxabi=libsupc++
- cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
- fi
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- # we want -lgcc_s for unwinder, and for compiler runtime when using
- # gcc, clang with gcc runtime (or any unknown compiler)
- local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
- if use libunwind; then
- # work-around missing -lunwind upstream
- extra_libs+=( -lunwind )
- # if we're using libunwind and clang with compiler-rt, we want
- # to link to compiler-rt instead of -lgcc_s
- if tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LDFLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- want_gcc_s=OFF
- want_compiler_rt=ON
- extra_libs+=( "${compiler_rt}" )
- fi
- fi
- elif [[ ${CHOST} == *-darwin* ]] && tc-is-clang; then
- # clang-based darwin prefix disables libunwind useflag during
- # bootstrap, because libunwind is not in the prefix yet.
- # override the default, though, because clang based libcxx
- # should never use gcc_s on Darwin.
- want_gcc_s=OFF
- # compiler_rt is not available in EPREFIX during bootstrap,
- # so we cannot link to it yet anyway, so keep the defaults
- # of want_compiler_rt=OFF and extra_libs=()
- fi
-
- # bootstrap: cmake is unhappy if compiler can't link to stdlib
- local nolib_flags=( -nodefaultlibs -lc )
- if ! test_compiler; then
- if test_compiler "${nolib_flags[@]}"; then
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
- fi
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBCXX_ENABLE_SHARED=ON
- -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXX_CXX_ABI=${cxxabi}
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
- # we're using our own mechanism for generating linker scripts
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
- -DLIBCXX_INCLUDE_TESTS=$(usex test)
- -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
- -DLIBCXX_HAS_ATOMIC_LIB=${want_gcc_s}
- -DLIBCXX_TARGET_TRIPLE="${CHOST}"
- -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
- )
-
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DLIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABI=ON
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- fi
- cmake_src_configure
-}
-
-multilib_src_test() {
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-cxx
-}
-
-# Usage: deps
-gen_ldscript() {
- local output_format
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
- cat <<-END_LDSCRIPT
-/* GNU ld script
- Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
- local libdir=$(get_libdir)
- local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "libsupc++.a")
-
- # Move it first.
- mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
- # Generate libc++.a ldscript for inclusion of its dependencies so that
- # clang++ -stdlib=libc++ -static works out of the box.
- local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
- # On Linux/glibc it does not link without libpthread or libdl. It is
- # fine on FreeBSD.
- use elibc_glibc && deps+=" libpthread.a libdl.a"
-
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
-}
-
-gen_shared_ldscript() {
- local libdir=$(get_libdir)
- # libsupc++ doesn't have a shared version
- local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "libsupc++.a")
-
- mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
- local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
-
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
-}
-
-multilib_src_install() {
- cmake_src_install
- if [[ ${CHOST} != *-darwin* ]] ; then
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
- fi
-}
-
-pkg_postinst() {
- elog "This package (${PN}) is mainly intended as a replacement for the C++"
- elog "standard library when using clang."
- elog "To use it, instead of libstdc++, use:"
- elog " clang++ -stdlib=libc++"
- elog "to compile your C++ programs."
-}
diff --git a/sys-libs/libcxx/libcxx-13.0.1.9999.ebuild b/sys-libs/libcxx/libcxx-13.0.1.9999.ebuild
deleted file mode 100644
index a9c71dc6e041..000000000000
--- a/sys-libs/libcxx/libcxx-13.0.1.9999.ebuild
+++ /dev/null
@@ -1,214 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="+libcxxabi +libunwind static-libs test"
-REQUIRED_USE="libunwind? ( libcxxabi )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
- !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )"
-# llvm-6 for new lit options
-# clang-3.9.0 installs necessary target symlinks unconditionally
-# which removes the need for MULTILIB_USEDEP
-DEPEND="${RDEPEND}
- >=sys-devel/llvm-6"
-BDEPEND="
- test? (
- >=dev-util/cmake-3.16
- >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-DOCS=( CREDITS.TXT )
-
-LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake,utils/llvm-lit} )
-LLVM_PATCHSET=9999-1
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # Darwin Prefix builds do not have llvm installed yet, so rely on
- # bootstrap-prefix to set the appropriate path vars to LLVM instead
- # of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- use test && python-any-r1_pkg_setup
-
- if ! use libcxxabi && ! tc-is-gcc ; then
- eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
- eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
- eerror "and try again."
- die
- fi
-}
-
-test_compiler() {
- $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
- <<<'int main() { return 0; }' &>/dev/null
-}
-
-src_configure() {
- # note: we need to do this before multilib kicks in since it will
- # alter the CHOST
- local cxxabi cxxabi_incs
- if use libcxxabi; then
- cxxabi=libcxxabi
- cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
- else
- local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
- cxxabi=libsupc++
- cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
- fi
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- # we want -lgcc_s for unwinder, and for compiler runtime when using
- # gcc, clang with gcc runtime (or any unknown compiler)
- local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
- if use libunwind; then
- # work-around missing -lunwind upstream
- extra_libs+=( -lunwind )
- # if we're using libunwind and clang with compiler-rt, we want
- # to link to compiler-rt instead of -lgcc_s
- if tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LDFLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- want_gcc_s=OFF
- want_compiler_rt=ON
- extra_libs+=( "${compiler_rt}" )
- fi
- fi
- elif [[ ${CHOST} == *-darwin* ]] && tc-is-clang; then
- # clang-based darwin prefix disables libunwind useflag during
- # bootstrap, because libunwind is not in the prefix yet.
- # override the default, though, because clang based libcxx
- # should never use gcc_s on Darwin.
- want_gcc_s=OFF
- # compiler_rt is not available in EPREFIX during bootstrap,
- # so we cannot link to it yet anyway, so keep the defaults
- # of want_compiler_rt=OFF and extra_libs=()
- fi
-
- # bootstrap: cmake is unhappy if compiler can't link to stdlib
- local nolib_flags=( -nodefaultlibs -lc )
- if ! test_compiler; then
- if test_compiler "${nolib_flags[@]}"; then
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
- fi
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBCXX_ENABLE_SHARED=ON
- -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXX_CXX_ABI=${cxxabi}
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
- # we're using our own mechanism for generating linker scripts
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
- -DLIBCXX_INCLUDE_TESTS=$(usex test)
- -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
- -DLIBCXX_HAS_ATOMIC_LIB=${want_gcc_s}
- -DLIBCXX_TARGET_TRIPLE="${CHOST}"
- -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
- )
-
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DLIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABI=ON
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- fi
- cmake_src_configure
-}
-
-multilib_src_test() {
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-cxx
-}
-
-# Usage: deps
-gen_ldscript() {
- local output_format
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
- cat <<-END_LDSCRIPT
-/* GNU ld script
- Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
- local libdir=$(get_libdir)
- local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "libsupc++.a")
-
- # Move it first.
- mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
- # Generate libc++.a ldscript for inclusion of its dependencies so that
- # clang++ -stdlib=libc++ -static works out of the box.
- local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
- # On Linux/glibc it does not link without libpthread or libdl. It is
- # fine on FreeBSD.
- use elibc_glibc && deps+=" libpthread.a libdl.a"
-
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
-}
-
-gen_shared_ldscript() {
- local libdir=$(get_libdir)
- # libsupc++ doesn't have a shared version
- local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "libsupc++.a")
-
- mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
- local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
-
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
-}
-
-multilib_src_install() {
- cmake_src_install
- if [[ ${CHOST} != *-darwin* ]] ; then
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
- fi
-}
-
-pkg_postinst() {
- elog "This package (${PN}) is mainly intended as a replacement for the C++"
- elog "standard library when using clang."
- elog "To use it, instead of libstdc++, use:"
- elog " clang++ -stdlib=libc++"
- elog "to compile your C++ programs."
-}
diff --git a/sys-libs/libcxx/libcxx-13.0.1_rc3.ebuild b/sys-libs/libcxx/libcxx-13.0.1_rc3.ebuild
deleted file mode 100644
index 0e230df43a5d..000000000000
--- a/sys-libs/libcxx/libcxx-13.0.1_rc3.ebuild
+++ /dev/null
@@ -1,214 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="+libcxxabi +libunwind static-libs test"
-REQUIRED_USE="libunwind? ( libcxxabi )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
- !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )"
-# llvm-6 for new lit options
-# clang-3.9.0 installs necessary target symlinks unconditionally
-# which removes the need for MULTILIB_USEDEP
-DEPEND="${RDEPEND}
- >=sys-devel/llvm-6"
-BDEPEND="
- test? (
- >=dev-util/cmake-3.16
- >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-DOCS=( CREDITS.TXT )
-
-LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake,utils/llvm-lit} )
-LLVM_PATCHSET=${PV/_/-}
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # Darwin Prefix builds do not have llvm installed yet, so rely on
- # bootstrap-prefix to set the appropriate path vars to LLVM instead
- # of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- use test && python-any-r1_pkg_setup
-
- if ! use libcxxabi && ! tc-is-gcc ; then
- eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
- eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
- eerror "and try again."
- die
- fi
-}
-
-test_compiler() {
- $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
- <<<'int main() { return 0; }' &>/dev/null
-}
-
-src_configure() {
- # note: we need to do this before multilib kicks in since it will
- # alter the CHOST
- local cxxabi cxxabi_incs
- if use libcxxabi; then
- cxxabi=libcxxabi
- cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
- else
- local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
- cxxabi=libsupc++
- cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
- fi
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- # we want -lgcc_s for unwinder, and for compiler runtime when using
- # gcc, clang with gcc runtime (or any unknown compiler)
- local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
- if use libunwind; then
- # work-around missing -lunwind upstream
- extra_libs+=( -lunwind )
- # if we're using libunwind and clang with compiler-rt, we want
- # to link to compiler-rt instead of -lgcc_s
- if tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LDFLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- want_gcc_s=OFF
- want_compiler_rt=ON
- extra_libs+=( "${compiler_rt}" )
- fi
- fi
- elif [[ ${CHOST} == *-darwin* ]] && tc-is-clang; then
- # clang-based darwin prefix disables libunwind useflag during
- # bootstrap, because libunwind is not in the prefix yet.
- # override the default, though, because clang based libcxx
- # should never use gcc_s on Darwin.
- want_gcc_s=OFF
- # compiler_rt is not available in EPREFIX during bootstrap,
- # so we cannot link to it yet anyway, so keep the defaults
- # of want_compiler_rt=OFF and extra_libs=()
- fi
-
- # bootstrap: cmake is unhappy if compiler can't link to stdlib
- local nolib_flags=( -nodefaultlibs -lc )
- if ! test_compiler; then
- if test_compiler "${nolib_flags[@]}"; then
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
- fi
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBCXX_ENABLE_SHARED=ON
- -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXX_CXX_ABI=${cxxabi}
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
- # we're using our own mechanism for generating linker scripts
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
- -DLIBCXX_INCLUDE_TESTS=$(usex test)
- -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
- -DLIBCXX_HAS_ATOMIC_LIB=${want_gcc_s}
- -DLIBCXX_TARGET_TRIPLE="${CHOST}"
- -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
- )
-
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DLIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABI=ON
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- fi
- cmake_src_configure
-}
-
-multilib_src_test() {
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-cxx
-}
-
-# Usage: deps
-gen_ldscript() {
- local output_format
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
- cat <<-END_LDSCRIPT
-/* GNU ld script
- Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
- local libdir=$(get_libdir)
- local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "libsupc++.a")
-
- # Move it first.
- mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
- # Generate libc++.a ldscript for inclusion of its dependencies so that
- # clang++ -stdlib=libc++ -static works out of the box.
- local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
- # On Linux/glibc it does not link without libpthread or libdl. It is
- # fine on FreeBSD.
- use elibc_glibc && deps+=" libpthread.a libdl.a"
-
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
-}
-
-gen_shared_ldscript() {
- local libdir=$(get_libdir)
- # libsupc++ doesn't have a shared version
- local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "libsupc++.a")
-
- mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
- local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
-
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
-}
-
-multilib_src_install() {
- cmake_src_install
- if [[ ${CHOST} != *-darwin* ]] ; then
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
- fi
-}
-
-pkg_postinst() {
- elog "This package (${PN}) is mainly intended as a replacement for the C++"
- elog "standard library when using clang."
- elog "To use it, instead of libstdc++, use:"
- elog " clang++ -stdlib=libc++"
- elog "to compile your C++ programs."
-}
diff --git a/sys-libs/libcxx/libcxx-14.0.0.9999.ebuild b/sys-libs/libcxx/libcxx-14.0.0.9999.ebuild
deleted file mode 100644
index ff9cb4ac3d94..000000000000
--- a/sys-libs/libcxx/libcxx-14.0.0.9999.ebuild
+++ /dev/null
@@ -1,214 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="+libcxxabi +libunwind static-libs test"
-REQUIRED_USE="libunwind? ( libcxxabi )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
- !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )"
-# llvm-6 for new lit options
-# clang-3.9.0 installs necessary target symlinks unconditionally
-# which removes the need for MULTILIB_USEDEP
-DEPEND="${RDEPEND}
- >=sys-devel/llvm-6"
-BDEPEND="
- test? (
- >=dev-util/cmake-3.16
- >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-DOCS=( CREDITS.TXT )
-
-LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
-LLVM_PATCHSET=9999-1
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # Darwin Prefix builds do not have llvm installed yet, so rely on
- # bootstrap-prefix to set the appropriate path vars to LLVM instead
- # of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- use test && python-any-r1_pkg_setup
-
- if ! use libcxxabi && ! tc-is-gcc ; then
- eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
- eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
- eerror "and try again."
- die
- fi
-}
-
-test_compiler() {
- $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
- <<<'int main() { return 0; }' &>/dev/null
-}
-
-src_configure() {
- # note: we need to do this before multilib kicks in since it will
- # alter the CHOST
- local cxxabi cxxabi_incs
- if use libcxxabi; then
- cxxabi=libcxxabi
- cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
- else
- local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
- cxxabi=libsupc++
- cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
- fi
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- # we want -lgcc_s for unwinder, and for compiler runtime when using
- # gcc, clang with gcc runtime (or any unknown compiler)
- local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
- if use libunwind; then
- # work-around missing -lunwind upstream
- extra_libs+=( -lunwind )
- # if we're using libunwind and clang with compiler-rt, we want
- # to link to compiler-rt instead of -lgcc_s
- if tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LDFLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- want_gcc_s=OFF
- want_compiler_rt=ON
- extra_libs+=( "${compiler_rt}" )
- fi
- fi
- elif [[ ${CHOST} == *-darwin* ]] && tc-is-clang; then
- # clang-based darwin prefix disables libunwind useflag during
- # bootstrap, because libunwind is not in the prefix yet.
- # override the default, though, because clang based libcxx
- # should never use gcc_s on Darwin.
- want_gcc_s=OFF
- # compiler_rt is not available in EPREFIX during bootstrap,
- # so we cannot link to it yet anyway, so keep the defaults
- # of want_compiler_rt=OFF and extra_libs=()
- fi
-
- # bootstrap: cmake is unhappy if compiler can't link to stdlib
- local nolib_flags=( -nodefaultlibs -lc )
- if ! test_compiler; then
- if test_compiler "${nolib_flags[@]}"; then
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
- ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
- fi
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBCXX_ENABLE_SHARED=ON
- -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXX_CXX_ABI=${cxxabi}
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
- # we're using our own mechanism for generating linker scripts
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
- -DLIBCXX_INCLUDE_TESTS=$(usex test)
- -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
- -DLIBCXX_HAS_ATOMIC_LIB=${want_gcc_s}
- -DLIBCXX_TARGET_TRIPLE="${CHOST}"
- -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
- )
-
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DLIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABI=ON
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- fi
- cmake_src_configure
-}
-
-multilib_src_test() {
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-cxx
-}
-
-# Usage: deps
-gen_ldscript() {
- local output_format
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
- cat <<-END_LDSCRIPT
-/* GNU ld script
- Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
- local libdir=$(get_libdir)
- local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "libsupc++.a")
-
- # Move it first.
- mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
- # Generate libc++.a ldscript for inclusion of its dependencies so that
- # clang++ -stdlib=libc++ -static works out of the box.
- local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
- # On Linux/glibc it does not link without libpthread or libdl. It is
- # fine on FreeBSD.
- use elibc_glibc && deps+=" libpthread.a libdl.a"
-
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
-}
-
-gen_shared_ldscript() {
- local libdir=$(get_libdir)
- # libsupc++ doesn't have a shared version
- local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "libsupc++.a")
-
- mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
- local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
-
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
-}
-
-multilib_src_install() {
- cmake_src_install
- if [[ ${CHOST} != *-darwin* ]] ; then
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
- fi
-}
-
-pkg_postinst() {
- elog "This package (${PN}) is mainly intended as a replacement for the C++"
- elog "standard library when using clang."
- elog "To use it, instead of libstdc++, use:"
- elog " clang++ -stdlib=libc++"
- elog "to compile your C++ programs."
-}
diff --git a/sys-libs/libcxx/libcxx-15.0.7-r1.ebuild b/sys-libs/libcxx/libcxx-15.0.7-r1.ebuild
new file mode 100644
index 000000000000..f07e4e73f9ce
--- /dev/null
+++ b/sys-libs/libcxx/libcxx-15.0.7-r1.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \
+ toolchain-funcs
+
+DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
+HOMEPAGE="https://libcxx.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~riscv sparc x86 ~x64-macos"
+IUSE="+clang +libcxxabi +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ libcxxabi? (
+ ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}]
+ )
+ !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ dev-debug/gdb[python]
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
+LLVM_PATCHSET=${PV}-r1
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ # Darwin Prefix builds do not have llvm installed yet, so rely on
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead
+ # of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+
+ if ! use libcxxabi && ! tc-is-gcc ; then
+ eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
+ eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
+ eerror "and try again."
+ die
+ fi
+}
+
+test_compiler() {
+ $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ # note: we need to do this before multilib kicks in since it will
+ # alter the CHOST
+ local cxxabi cxxabi_incs
+ if use libcxxabi; then
+ cxxabi=system-libcxxabi
+ cxxabi_incs="${EPREFIX}/usr/include/c++/v1"
+ else
+ local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
+ cxxabi=libsupc++
+ cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # bootstrap: cmake is unhappy if compiler can't link to stdlib
+ local nolib_flags=( -nodefaultlibs -lc )
+ if ! test_compiler; then
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES=libcxx
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXX_CXX_ABI=${cxxabi}
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
+ # we're using our own mechanism for generating linker scripts
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=$(usex test)
+ -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
+ )
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_src_compile
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ gen_shared_ldscript
+ use static-libs && gen_static_ldscript
+ fi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxx
+}
+
+multilib_src_install() {
+ cmake_src_install
+ # since we've replaced libc++.{a,so} with ldscripts, now we have to
+ # install the extra symlinks
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ dolib.so lib/libc++_shared.so
+ use static-libs && dolib.a lib/libc++_static.a
+ fi
+}
+
+# Usage: deps
+gen_ldscript() {
+ local output_format
+ output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
+ [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
+
+ cat <<-END_LDSCRIPT
+/* GNU ld script
+ Include missing dependencies
+*/
+${output_format}
+GROUP ( $@ )
+END_LDSCRIPT
+}
+
+gen_static_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_static}.a || die
+ # Generate libc++.a ldscript for inclusion of its dependencies so that
+ # clang++ -stdlib=libc++ -static works out of the box.
+ local deps=(
+ libc++_static.a
+ $(usex libcxxabi libc++abi.a libsupc++.a)
+ )
+ # On Linux/glibc it does not link without libpthread or libdl. It is
+ # fine on FreeBSD.
+ use elibc_glibc && deps+=( libpthread.a libdl.a )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.a || die
+}
+
+gen_shared_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_shared}.so || die
+ local deps=(
+ libc++_shared.so
+ # libsupc++ doesn't have a shared version
+ $(usex libcxxabi libc++abi.so libsupc++.a)
+ )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.so || die
+}
diff --git a/sys-libs/libcxx/libcxx-16.0.6.ebuild b/sys-libs/libcxx/libcxx-16.0.6.ebuild
new file mode 100644
index 000000000000..f58235f01d4e
--- /dev/null
+++ b/sys-libs/libcxx/libcxx-16.0.6.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \
+ toolchain-funcs
+
+DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
+HOMEPAGE="https://libcxx.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ~riscv sparc x86 ~arm64-macos ~x64-macos"
+IUSE="+clang +libcxxabi +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ libcxxabi? (
+ ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}]
+ )
+ !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ dev-debug/gdb[python]
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
+LLVM_PATCHSET=${PV}
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ # Darwin Prefix builds do not have llvm installed yet, so rely on
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead
+ # of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+
+ if ! use libcxxabi && ! tc-is-gcc ; then
+ eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
+ eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
+ eerror "and try again."
+ die
+ fi
+}
+
+test_compiler() {
+ $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ # note: we need to do this before multilib kicks in since it will
+ # alter the CHOST
+ local cxxabi cxxabi_incs
+ if use libcxxabi; then
+ cxxabi=system-libcxxabi
+ cxxabi_incs="${EPREFIX}/usr/include/c++/v1"
+ else
+ local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
+ cxxabi=libsupc++
+ cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # bootstrap: cmake is unhappy if compiler can't link to stdlib
+ local nolib_flags=( -nodefaultlibs -lc )
+ if ! test_compiler; then
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES=libcxx
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXX_CXX_ABI=${cxxabi}
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
+ # we're using our own mechanism for generating linker scripts
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=$(usex test)
+ -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
+ )
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_src_compile
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ gen_shared_ldscript
+ use static-libs && gen_static_ldscript
+ fi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxx
+}
+
+multilib_src_install() {
+ cmake_src_install
+ # since we've replaced libc++.{a,so} with ldscripts, now we have to
+ # install the extra symlinks
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ dolib.so lib/libc++_shared.so
+ use static-libs && dolib.a lib/libc++_static.a
+ fi
+}
+
+# Usage: deps
+gen_ldscript() {
+ local output_format
+ output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
+ [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
+
+ cat <<-END_LDSCRIPT
+/* GNU ld script
+ Include missing dependencies
+*/
+${output_format}
+GROUP ( $@ )
+END_LDSCRIPT
+}
+
+gen_static_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_static}.a || die
+ # Generate libc++.a ldscript for inclusion of its dependencies so that
+ # clang++ -stdlib=libc++ -static works out of the box.
+ local deps=(
+ libc++_static.a
+ $(usex libcxxabi libc++abi.a libsupc++.a)
+ )
+ # On Linux/glibc it does not link without libpthread or libdl. It is
+ # fine on FreeBSD.
+ use elibc_glibc && deps+=( libpthread.a libdl.a )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.a || die
+}
+
+gen_shared_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_shared}.so || die
+ local deps=(
+ libc++_shared.so
+ # libsupc++ doesn't have a shared version
+ $(usex libcxxabi libc++abi.so libsupc++.a)
+ )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.so || die
+}
diff --git a/sys-libs/libcxx/libcxx-17.0.6.ebuild b/sys-libs/libcxx/libcxx-17.0.6.ebuild
new file mode 100644
index 000000000000..0f39a16ae5e9
--- /dev/null
+++ b/sys-libs/libcxx/libcxx-17.0.6.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \
+ toolchain-funcs
+
+DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
+HOMEPAGE="https://libcxx.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ~riscv sparc x86 ~arm64-macos ~x64-macos"
+IUSE="+clang +libcxxabi +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ libcxxabi? (
+ ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}]
+ )
+ !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ dev-debug/gdb[python]
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ # Darwin Prefix builds do not have llvm installed yet, so rely on
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead
+ # of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+
+ if ! use libcxxabi && ! tc-is-gcc ; then
+ eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
+ eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
+ eerror "and try again."
+ die
+ fi
+}
+
+test_compiler() {
+ $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ # note: we need to do this before multilib kicks in since it will
+ # alter the CHOST
+ local cxxabi cxxabi_incs
+ if use libcxxabi; then
+ cxxabi=system-libcxxabi
+ cxxabi_incs="${EPREFIX}/usr/include/c++/v1"
+ else
+ local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
+ cxxabi=libsupc++
+ cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # bootstrap: cmake is unhappy if compiler can't link to stdlib
+ local nolib_flags=( -nodefaultlibs -lc )
+ if ! test_compiler; then
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES=libcxx
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXX_CXX_ABI=${cxxabi}
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
+ # we're using our own mechanism for generating linker scripts
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=$(usex test)
+ -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
+ )
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_src_compile
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ gen_shared_ldscript
+ use static-libs && gen_static_ldscript
+ fi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxx
+}
+
+multilib_src_install() {
+ cmake_src_install
+ # since we've replaced libc++.{a,so} with ldscripts, now we have to
+ # install the extra symlinks
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ dolib.so lib/libc++_shared.so
+ use static-libs && dolib.a lib/libc++_static.a
+ fi
+}
+
+# Usage: deps
+gen_ldscript() {
+ local output_format
+ output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
+ [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
+
+ cat <<-END_LDSCRIPT
+/* GNU ld script
+ Include missing dependencies
+*/
+${output_format}
+GROUP ( $@ )
+END_LDSCRIPT
+}
+
+gen_static_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_static}.a || die
+ # Generate libc++.a ldscript for inclusion of its dependencies so that
+ # clang++ -stdlib=libc++ -static works out of the box.
+ local deps=(
+ libc++_static.a
+ $(usex libcxxabi libc++abi.a libsupc++.a)
+ )
+ # On Linux/glibc it does not link without libpthread or libdl. It is
+ # fine on FreeBSD.
+ use elibc_glibc && deps+=( libpthread.a libdl.a )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.a || die
+}
+
+gen_shared_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_shared}.so || die
+ local deps=(
+ libc++_shared.so
+ # libsupc++ doesn't have a shared version
+ $(usex libcxxabi libc++abi.so libsupc++.a)
+ )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.so || die
+}
diff --git a/sys-libs/libcxx/libcxx-18.1.4.ebuild b/sys-libs/libcxx/libcxx-18.1.4.ebuild
new file mode 100644
index 000000000000..a6fca47e6c29
--- /dev/null
+++ b/sys-libs/libcxx/libcxx-18.1.4.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
+HOMEPAGE="https://libcxx.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86 ~arm64-macos ~x64-macos"
+IUSE="+clang +libcxxabi +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ libcxxabi? (
+ ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}]
+ )
+ !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ dev-debug/gdb[python]
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+
+ if ! use libcxxabi && ! tc-is-gcc ; then
+ eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
+ eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
+ eerror "and try again."
+ die
+ fi
+}
+
+src_prepare() {
+ # hanging tests
+ # https://github.com/llvm/llvm-project/issues/73791
+ rm ../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_* || die
+ rm ../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.*_equals* || die
+
+ cmake_src_prepare
+}
+
+test_compiler() {
+ $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # note: we need to do this before multilib kicks in since it will
+ # alter the CHOST
+ local cxxabi cxxabi_incs
+ if use libcxxabi; then
+ cxxabi=system-libcxxabi
+ cxxabi_incs="${EPREFIX}/usr/include/c++/v1"
+ else
+ local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
+ cxxabi=libsupc++
+ cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # bootstrap: cmake is unhappy if compiler can't link to stdlib
+ local nolib_flags=( -nodefaultlibs -lc )
+ if ! test_compiler; then
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES=libcxx
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXX_CXX_ABI=${cxxabi}
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
+ # we're using our own mechanism for generating linker scripts
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=$(usex test)
+ -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
+ # this is broken with standalone builds, and also meaningless
+ -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
+ )
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_src_compile
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ gen_shared_ldscript
+ use static-libs && gen_static_ldscript
+ fi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxx
+}
+
+multilib_src_install() {
+ cmake_src_install
+ # since we've replaced libc++.{a,so} with ldscripts, now we have to
+ # install the extra symlinks
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ dolib.so lib/libc++_shared.so
+ use static-libs && dolib.a lib/libc++_static.a
+ fi
+}
+
+# Usage: deps
+gen_ldscript() {
+ local output_format
+ output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
+ [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
+
+ cat <<-END_LDSCRIPT
+/* GNU ld script
+ Include missing dependencies
+*/
+${output_format}
+GROUP ( $@ )
+END_LDSCRIPT
+}
+
+gen_static_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_static}.a || die
+ # Generate libc++.a ldscript for inclusion of its dependencies so that
+ # clang++ -stdlib=libc++ -static works out of the box.
+ local deps=(
+ libc++_static.a
+ $(usex libcxxabi libc++abi.a libsupc++.a)
+ )
+ # On Linux/glibc it does not link without libpthread or libdl. It is
+ # fine on FreeBSD.
+ use elibc_glibc && deps+=( libpthread.a libdl.a )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.a || die
+}
+
+gen_shared_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_shared}.so || die
+ local deps=(
+ libc++_shared.so
+ # libsupc++ doesn't have a shared version
+ $(usex libcxxabi libc++abi.so libsupc++.a)
+ )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.so || die
+}
diff --git a/sys-libs/libcxx/libcxx-19.0.0.9999.ebuild b/sys-libs/libcxx/libcxx-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..e29d57a316d3
--- /dev/null
+++ b/sys-libs/libcxx/libcxx-19.0.0.9999.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
+HOMEPAGE="https://libcxx.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+IUSE="+clang +libcxxabi +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ libcxxabi? (
+ ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}]
+ )
+ !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ dev-debug/gdb[python]
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+
+ if ! use libcxxabi && ! tc-is-gcc ; then
+ eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
+ eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
+ eerror "and try again."
+ die
+ fi
+}
+
+src_prepare() {
+ # hanging tests
+ # https://github.com/llvm/llvm-project/issues/73791
+ rm ../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_* || die
+ rm ../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.*_equals* || die
+
+ cmake_src_prepare
+}
+
+test_compiler() {
+ $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # note: we need to do this before multilib kicks in since it will
+ # alter the CHOST
+ local cxxabi cxxabi_incs
+ if use libcxxabi; then
+ cxxabi=system-libcxxabi
+ cxxabi_incs="${EPREFIX}/usr/include/c++/v1"
+ else
+ local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
+ cxxabi=libsupc++
+ cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # bootstrap: cmake is unhappy if compiler can't link to stdlib
+ local nolib_flags=( -nodefaultlibs -lc )
+ if ! test_compiler; then
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES=libcxx
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXX_CXX_ABI=${cxxabi}
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
+ # we're using our own mechanism for generating linker scripts
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=$(usex test)
+ -DLIBCXX_INSTALL_MODULES=ON
+ -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
+ # this is broken with standalone builds, and also meaningless
+ -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
+ )
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_src_compile
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ gen_shared_ldscript
+ use static-libs && gen_static_ldscript
+ fi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxx
+}
+
+multilib_src_install() {
+ cmake_src_install
+ # since we've replaced libc++.{a,so} with ldscripts, now we have to
+ # install the extra symlinks
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ dolib.so lib/libc++_shared.so
+ use static-libs && dolib.a lib/libc++_static.a
+ fi
+}
+
+# Usage: deps
+gen_ldscript() {
+ local output_format
+ output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
+ [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
+
+ cat <<-END_LDSCRIPT
+/* GNU ld script
+ Include missing dependencies
+*/
+${output_format}
+GROUP ( $@ )
+END_LDSCRIPT
+}
+
+gen_static_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_static}.a || die
+ # Generate libc++.a ldscript for inclusion of its dependencies so that
+ # clang++ -stdlib=libc++ -static works out of the box.
+ local deps=(
+ libc++_static.a
+ $(usex libcxxabi libc++abi.a libsupc++.a)
+ )
+ # On Linux/glibc it does not link without libpthread or libdl. It is
+ # fine on FreeBSD.
+ use elibc_glibc && deps+=( libpthread.a libdl.a )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.a || die
+}
+
+gen_shared_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_shared}.so || die
+ local deps=(
+ libc++_shared.so
+ # libsupc++ doesn't have a shared version
+ $(usex libcxxabi libc++abi.so libsupc++.a)
+ )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.so || die
+}
diff --git a/sys-libs/libcxx/libcxx-19.0.0_pre20240410.ebuild b/sys-libs/libcxx/libcxx-19.0.0_pre20240410.ebuild
new file mode 100644
index 000000000000..e29d57a316d3
--- /dev/null
+++ b/sys-libs/libcxx/libcxx-19.0.0_pre20240410.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
+HOMEPAGE="https://libcxx.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+IUSE="+clang +libcxxabi +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ libcxxabi? (
+ ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}]
+ )
+ !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ dev-debug/gdb[python]
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+
+ if ! use libcxxabi && ! tc-is-gcc ; then
+ eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
+ eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
+ eerror "and try again."
+ die
+ fi
+}
+
+src_prepare() {
+ # hanging tests
+ # https://github.com/llvm/llvm-project/issues/73791
+ rm ../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_* || die
+ rm ../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.*_equals* || die
+
+ cmake_src_prepare
+}
+
+test_compiler() {
+ $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # note: we need to do this before multilib kicks in since it will
+ # alter the CHOST
+ local cxxabi cxxabi_incs
+ if use libcxxabi; then
+ cxxabi=system-libcxxabi
+ cxxabi_incs="${EPREFIX}/usr/include/c++/v1"
+ else
+ local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
+ cxxabi=libsupc++
+ cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # bootstrap: cmake is unhappy if compiler can't link to stdlib
+ local nolib_flags=( -nodefaultlibs -lc )
+ if ! test_compiler; then
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES=libcxx
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXX_CXX_ABI=${cxxabi}
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
+ # we're using our own mechanism for generating linker scripts
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=$(usex test)
+ -DLIBCXX_INSTALL_MODULES=ON
+ -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
+ # this is broken with standalone builds, and also meaningless
+ -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
+ )
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_src_compile
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ gen_shared_ldscript
+ use static-libs && gen_static_ldscript
+ fi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxx
+}
+
+multilib_src_install() {
+ cmake_src_install
+ # since we've replaced libc++.{a,so} with ldscripts, now we have to
+ # install the extra symlinks
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ dolib.so lib/libc++_shared.so
+ use static-libs && dolib.a lib/libc++_static.a
+ fi
+}
+
+# Usage: deps
+gen_ldscript() {
+ local output_format
+ output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
+ [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
+
+ cat <<-END_LDSCRIPT
+/* GNU ld script
+ Include missing dependencies
+*/
+${output_format}
+GROUP ( $@ )
+END_LDSCRIPT
+}
+
+gen_static_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_static}.a || die
+ # Generate libc++.a ldscript for inclusion of its dependencies so that
+ # clang++ -stdlib=libc++ -static works out of the box.
+ local deps=(
+ libc++_static.a
+ $(usex libcxxabi libc++abi.a libsupc++.a)
+ )
+ # On Linux/glibc it does not link without libpthread or libdl. It is
+ # fine on FreeBSD.
+ use elibc_glibc && deps+=( libpthread.a libdl.a )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.a || die
+}
+
+gen_shared_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_shared}.so || die
+ local deps=(
+ libc++_shared.so
+ # libsupc++ doesn't have a shared version
+ $(usex libcxxabi libc++abi.so libsupc++.a)
+ )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.so || die
+}
diff --git a/sys-libs/libcxx/libcxx-19.0.0_pre20240420.ebuild b/sys-libs/libcxx/libcxx-19.0.0_pre20240420.ebuild
new file mode 100644
index 000000000000..e29d57a316d3
--- /dev/null
+++ b/sys-libs/libcxx/libcxx-19.0.0_pre20240420.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
+HOMEPAGE="https://libcxx.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+IUSE="+clang +libcxxabi +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ libcxxabi? (
+ ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}]
+ )
+ !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ dev-debug/gdb[python]
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+
+ if ! use libcxxabi && ! tc-is-gcc ; then
+ eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
+ eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
+ eerror "and try again."
+ die
+ fi
+}
+
+src_prepare() {
+ # hanging tests
+ # https://github.com/llvm/llvm-project/issues/73791
+ rm ../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_* || die
+ rm ../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.*_equals* || die
+
+ cmake_src_prepare
+}
+
+test_compiler() {
+ $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # note: we need to do this before multilib kicks in since it will
+ # alter the CHOST
+ local cxxabi cxxabi_incs
+ if use libcxxabi; then
+ cxxabi=system-libcxxabi
+ cxxabi_incs="${EPREFIX}/usr/include/c++/v1"
+ else
+ local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
+ cxxabi=libsupc++
+ cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # bootstrap: cmake is unhappy if compiler can't link to stdlib
+ local nolib_flags=( -nodefaultlibs -lc )
+ if ! test_compiler; then
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES=libcxx
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXX_CXX_ABI=${cxxabi}
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
+ # we're using our own mechanism for generating linker scripts
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=$(usex test)
+ -DLIBCXX_INSTALL_MODULES=ON
+ -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
+ # this is broken with standalone builds, and also meaningless
+ -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
+ )
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_src_compile
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ gen_shared_ldscript
+ use static-libs && gen_static_ldscript
+ fi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxx
+}
+
+multilib_src_install() {
+ cmake_src_install
+ # since we've replaced libc++.{a,so} with ldscripts, now we have to
+ # install the extra symlinks
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ dolib.so lib/libc++_shared.so
+ use static-libs && dolib.a lib/libc++_static.a
+ fi
+}
+
+# Usage: deps
+gen_ldscript() {
+ local output_format
+ output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
+ [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
+
+ cat <<-END_LDSCRIPT
+/* GNU ld script
+ Include missing dependencies
+*/
+${output_format}
+GROUP ( $@ )
+END_LDSCRIPT
+}
+
+gen_static_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_static}.a || die
+ # Generate libc++.a ldscript for inclusion of its dependencies so that
+ # clang++ -stdlib=libc++ -static works out of the box.
+ local deps=(
+ libc++_static.a
+ $(usex libcxxabi libc++abi.a libsupc++.a)
+ )
+ # On Linux/glibc it does not link without libpthread or libdl. It is
+ # fine on FreeBSD.
+ use elibc_glibc && deps+=( libpthread.a libdl.a )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.a || die
+}
+
+gen_shared_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_shared}.so || die
+ local deps=(
+ libc++_shared.so
+ # libsupc++ doesn't have a shared version
+ $(usex libcxxabi libc++abi.so libsupc++.a)
+ )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.so || die
+}
diff --git a/sys-libs/libcxx/metadata.xml b/sys-libs/libcxx/metadata.xml
index 437ced3c45e3..413b6a08b4d8 100644
--- a/sys-libs/libcxx/metadata.xml
+++ b/sys-libs/libcxx/metadata.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>aballier@gentoo.org</email>
- <name>Alexis Ballier</name>
- </maintainer>
<maintainer type="project">
<email>llvm@gentoo.org</email>
<name>LLVM Project</name>
</maintainer>
<use>
+ <flag name="clang">Force building using installed clang (rather
+ than the default CC/CXX; required for testing).</flag>
<flag name="libcxxabi">Build on top of <pkg>sys-libs/libcxxabi</pkg> instead of gcc's libsupc++ (avoids depending on gcc).</flag>
- <flag name="libunwind">Use libunwind instead of libgcc_s for stack unwinding, thus avoiding dependence on gcc.</flag>
</use>
+ <upstream>
+ <remote-id type="github">llvm/llvm-project</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/libcxxabi/Manifest b/sys-libs/libcxxabi/Manifest
index dd7644d62981..bd71f2e58a68 100644
--- a/sys-libs/libcxxabi/Manifest
+++ b/sys-libs/libcxxabi/Manifest
@@ -1,4 +1,10 @@
-DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
-DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
-DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
-DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1
+DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
+DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
+DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
+DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
+DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
+DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29
+DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386
+DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1
+DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50
diff --git a/sys-libs/libcxxabi/libcxxabi-11.1.0.ebuild b/sys-libs/libcxxabi/libcxxabi-11.1.0.ebuild
deleted file mode 100644
index 60fed4fd01c8..000000000000
--- a/sys-libs/libcxxabi/libcxxabi-11.1.0.ebuild
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{7..9} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="Low level support for a standard C++ library"
-HOMEPAGE="https://libcxxabi.llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~riscv x86 ~x64-macos"
-IUSE="+libunwind static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- libunwind? (
- || (
- >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}]
- >=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,${MULTILIB_USEDEP}]
- )
- )"
-# llvm-6 for new lit options
-DEPEND="${RDEPEND}
- >=sys-devel/llvm-6"
-BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-# libcxx is needed uncondtionally for the headers
-LLVM_COMPONENTS=( libcxx{abi,} )
-LLVM_TEST_COMPONENTS=( llvm/cmake )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # darwin prefix builds do not have llvm installed yet, so rely on bootstrap-prefix
- # to set the appropriate path vars to LLVM instead of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- # link against compiler-rt instead of libgcc if we are using clang with libunwind
- local want_compiler_rt=OFF
- if use libunwind && tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LDFLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- want_compiler_rt=ON
- fi
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBCXXABI_ENABLE_SHARED=ON
- -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
- -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
- -DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
- # upstream is omitting standard search path for this
- # probably because gcc & clang are bundling their own unwind.h
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
- )
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- fi
- cmake_src_configure
-}
-
-build_libcxx() {
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${S}"/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- )
-
- cmake_src_configure
- cmake_src_compile
-}
-
-multilib_src_test() {
- # build a local copy of libc++ for testing to avoid circular dep
- build_libcxx
- mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
-
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-cxxabi
-}
-
-multilib_src_install_all() {
- insinto /usr/include/libcxxabi
- doins -r include/.
-}
diff --git a/sys-libs/libcxxabi/libcxxabi-12.0.1.ebuild b/sys-libs/libcxxabi/libcxxabi-12.0.1.ebuild
deleted file mode 100644
index a6a51a0b90b5..000000000000
--- a/sys-libs/libcxxabi/libcxxabi-12.0.1.ebuild
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="Low level support for a standard C++ library"
-HOMEPAGE="https://libcxxabi.llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~riscv x86 ~x64-macos"
-IUSE="+libunwind static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- libunwind? (
- || (
- >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}]
- >=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,${MULTILIB_USEDEP}]
- )
- )"
-# llvm-6 for new lit options
-DEPEND="${RDEPEND}
- >=sys-devel/llvm-6"
-BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-# libcxx is needed uncondtionally for the headers
-LLVM_COMPONENTS=( libcxx{abi,} llvm/cmake/modules )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # darwin prefix builds do not have llvm installed yet, so rely on bootstrap-prefix
- # to set the appropriate path vars to LLVM instead of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- # link against compiler-rt instead of libgcc if we are using clang with libunwind
- local want_compiler_rt=OFF
- if use libunwind && tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LDFLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- want_compiler_rt=ON
- fi
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBCXXABI_ENABLE_SHARED=ON
- -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
- -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
- -DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
- # upstream is omitting standard search path for this
- # probably because gcc & clang are bundling their own unwind.h
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
- )
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- fi
- cmake_src_configure
-}
-
-build_libcxx() {
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${S}"/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- )
-
- cmake_src_configure
- cmake_src_compile
-}
-
-multilib_src_test() {
- # build a local copy of libc++ for testing to avoid circular dep
- build_libcxx
- mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
-
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-cxxabi
-}
-
-multilib_src_install_all() {
- insinto /usr/include/libcxxabi
- doins -r include/.
-}
diff --git a/sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild b/sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild
deleted file mode 100644
index 690b4d4e2681..000000000000
--- a/sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="Low level support for a standard C++ library"
-HOMEPAGE="https://libcxxabi.llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~riscv x86 ~x64-macos"
-IUSE="+libunwind static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- libunwind? (
- || (
- >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}]
- >=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,${MULTILIB_USEDEP}]
- )
- )"
-# llvm-6 for new lit options
-DEPEND="${RDEPEND}
- >=sys-devel/llvm-6"
-BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-LLVM_COMPONENTS=( libcxx{abi,} llvm/cmake )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # darwin prefix builds do not have llvm installed yet, so rely on bootstrap-prefix
- # to set the appropriate path vars to LLVM instead of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- # we need a configured libc++ for __config_site
- wrap_libcxx cmake_src_configure
- wrap_libcxx cmake_build generate-cxx-headers
-
- # link against compiler-rt instead of libgcc if we are using clang with libunwind
- local want_compiler_rt=OFF
- if use libunwind && tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LDFLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- want_compiler_rt=ON
- fi
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBCXXABI_ENABLE_SHARED=ON
- -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
- -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
- -DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
- # upstream is omitting standard search path for this
- # probably because gcc & clang are bundling their own unwind.h
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
- -DLIBCXXABI_TARGET_TRIPLE="${CHOST}"
- )
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- fi
- cmake_src_configure
-}
-
-wrap_libcxx() {
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${S}"/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- -DLIBCXX_TARGET_TRIPLE="${CHOST}"
- )
-
- "${@}"
-}
-
-multilib_src_test() {
- wrap_libcxx cmake_src_compile
- mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
-
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-cxxabi
-}
-
-multilib_src_install_all() {
- insinto /usr/include/libcxxabi
- doins -r include/.
-}
diff --git a/sys-libs/libcxxabi/libcxxabi-13.0.1.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-13.0.1.9999.ebuild
deleted file mode 100644
index d260ea2e3450..000000000000
--- a/sys-libs/libcxxabi/libcxxabi-13.0.1.9999.ebuild
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="Low level support for a standard C++ library"
-HOMEPAGE="https://libcxxabi.llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="+libunwind static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- libunwind? (
- || (
- >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}]
- >=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,${MULTILIB_USEDEP}]
- )
- )"
-# llvm-6 for new lit options
-DEPEND="${RDEPEND}
- >=sys-devel/llvm-6"
-BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-LLVM_COMPONENTS=( libcxx{abi,} llvm/cmake )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # darwin prefix builds do not have llvm installed yet, so rely on bootstrap-prefix
- # to set the appropriate path vars to LLVM instead of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- # we need a configured libc++ for __config_site
- wrap_libcxx cmake_src_configure
- wrap_libcxx cmake_build generate-cxx-headers
-
- # link against compiler-rt instead of libgcc if we are using clang with libunwind
- local want_compiler_rt=OFF
- if use libunwind && tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LDFLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- want_compiler_rt=ON
- fi
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBCXXABI_ENABLE_SHARED=ON
- -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
- -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
- -DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
- # upstream is omitting standard search path for this
- # probably because gcc & clang are bundling their own unwind.h
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
- -DLIBCXXABI_TARGET_TRIPLE="${CHOST}"
- )
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- fi
- cmake_src_configure
-}
-
-wrap_libcxx() {
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${S}"/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- -DLIBCXX_TARGET_TRIPLE="${CHOST}"
- )
-
- "${@}"
-}
-
-multilib_src_test() {
- wrap_libcxx cmake_src_compile
- mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
-
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-cxxabi
-}
-
-multilib_src_install_all() {
- insinto /usr/include/libcxxabi
- doins -r include/.
-}
diff --git a/sys-libs/libcxxabi/libcxxabi-13.0.1_rc3.ebuild b/sys-libs/libcxxabi/libcxxabi-13.0.1_rc3.ebuild
deleted file mode 100644
index d260ea2e3450..000000000000
--- a/sys-libs/libcxxabi/libcxxabi-13.0.1_rc3.ebuild
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="Low level support for a standard C++ library"
-HOMEPAGE="https://libcxxabi.llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="+libunwind static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- libunwind? (
- || (
- >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}]
- >=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,${MULTILIB_USEDEP}]
- )
- )"
-# llvm-6 for new lit options
-DEPEND="${RDEPEND}
- >=sys-devel/llvm-6"
-BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-LLVM_COMPONENTS=( libcxx{abi,} llvm/cmake )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # darwin prefix builds do not have llvm installed yet, so rely on bootstrap-prefix
- # to set the appropriate path vars to LLVM instead of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- # we need a configured libc++ for __config_site
- wrap_libcxx cmake_src_configure
- wrap_libcxx cmake_build generate-cxx-headers
-
- # link against compiler-rt instead of libgcc if we are using clang with libunwind
- local want_compiler_rt=OFF
- if use libunwind && tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LDFLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- want_compiler_rt=ON
- fi
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBCXXABI_ENABLE_SHARED=ON
- -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
- -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
- -DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
- # upstream is omitting standard search path for this
- # probably because gcc & clang are bundling their own unwind.h
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
- -DLIBCXXABI_TARGET_TRIPLE="${CHOST}"
- )
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- fi
- cmake_src_configure
-}
-
-wrap_libcxx() {
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${S}"/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- -DLIBCXX_TARGET_TRIPLE="${CHOST}"
- )
-
- "${@}"
-}
-
-multilib_src_test() {
- wrap_libcxx cmake_src_compile
- mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
-
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-cxxabi
-}
-
-multilib_src_install_all() {
- insinto /usr/include/libcxxabi
- doins -r include/.
-}
diff --git a/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild
deleted file mode 100644
index 2bd92bc0287d..000000000000
--- a/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild
+++ /dev/null
@@ -1,124 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="Low level support for a standard C++ library"
-HOMEPAGE="https://libcxxabi.llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="+libunwind static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- libunwind? (
- || (
- >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}]
- >=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,${MULTILIB_USEDEP}]
- )
- )"
-# llvm-6 for new lit options
-DEPEND="${RDEPEND}
- >=sys-devel/llvm-6"
-BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-LLVM_COMPONENTS=( libcxx{abi,} llvm/cmake cmake )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- # darwin prefix builds do not have llvm installed yet, so rely on bootstrap-prefix
- # to set the appropriate path vars to LLVM instead of using llvm_pkg_setup.
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
- llvm_pkg_setup
- fi
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- # we need a configured libc++ for __config_site
- wrap_libcxx cmake_src_configure
- wrap_libcxx cmake_build generate-cxx-headers
-
- # link against compiler-rt instead of libgcc if we are using clang with libunwind
- local want_compiler_rt=OFF
- if use libunwind && tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LDFLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- want_compiler_rt=ON
- fi
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBCXXABI_ENABLE_SHARED=ON
- -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
- -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
- -DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
- # upstream is omitting standard search path for this
- # probably because gcc & clang are bundling their own unwind.h
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
- -DLIBCXXABI_TARGET_TRIPLE="${CHOST}"
- )
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DPython3_EXECUTABLE="${PYTHON}"
- )
- fi
- cmake_src_configure
-}
-
-wrap_libcxx() {
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${S}"/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- -DLIBCXX_TARGET_TRIPLE="${CHOST}"
- )
-
- "${@}"
-}
-
-multilib_src_test() {
- wrap_libcxx cmake_src_compile
- mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/lib/" || die
-
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-cxxabi
-}
-
-multilib_src_install_all() {
- insinto /usr/include/libcxxabi
- doins -r include/.
-}
diff --git a/sys-libs/libcxxabi/libcxxabi-15.0.7.ebuild b/sys-libs/libcxxabi/libcxxabi-15.0.7.ebuild
new file mode 100644
index 000000000000..047a5a0e8d28
--- /dev/null
+++ b/sys-libs/libcxxabi/libcxxabi-15.0.7.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \
+ toolchain-funcs
+
+DESCRIPTION="Low level support for a standard C++ library"
+HOMEPAGE="https://libcxxabi.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~riscv sparc x86 ~x64-macos"
+IUSE="+clang +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+# in 15.x, cxxabi.h is moving from libcxx to libcxxabi
+RDEPEND+="
+ !<sys-libs/libcxx-15
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{abi,} llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ # darwin prefix builds do not have llvm installed yet, so rely on bootstrap-prefix
+ # to set the appropriate path vars to LLVM instead of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx"
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLIBCXXABI_ENABLE_SHARED=ON
+ -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
+ -DLIBCXXABI_USE_COMPILER_RT=${use_compiler_rt}
+
+ # upstream is omitting standard search path for this
+ # probably because gcc & clang are bundling their own unwind.h
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_build cxxabi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxxabi
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" cmake_build install-cxxabi
+}
diff --git a/sys-libs/libcxxabi/libcxxabi-16.0.6.ebuild b/sys-libs/libcxxabi/libcxxabi-16.0.6.ebuild
new file mode 100644
index 000000000000..b9dcfb43e585
--- /dev/null
+++ b/sys-libs/libcxxabi/libcxxabi-16.0.6.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \
+ toolchain-funcs
+
+DESCRIPTION="Low level support for a standard C++ library"
+HOMEPAGE="https://libcxxabi.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ~riscv sparc x86 ~arm64-macos ~x64-macos"
+IUSE="+clang +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+# in 15.x, cxxabi.h is moving from libcxx to libcxxabi
+RDEPEND+="
+ !<sys-libs/libcxx-15
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{abi,} llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ # darwin prefix builds do not have llvm installed yet, so rely on bootstrap-prefix
+ # to set the appropriate path vars to LLVM instead of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx"
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLIBCXXABI_ENABLE_SHARED=ON
+ -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
+ -DLIBCXXABI_USE_COMPILER_RT=${use_compiler_rt}
+
+ # upstream is omitting standard search path for this
+ # probably because gcc & clang are bundling their own unwind.h
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_build cxxabi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxxabi
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" cmake_build install-cxxabi
+}
diff --git a/sys-libs/libcxxabi/libcxxabi-17.0.6.ebuild b/sys-libs/libcxxabi/libcxxabi-17.0.6.ebuild
new file mode 100644
index 000000000000..b9dcfb43e585
--- /dev/null
+++ b/sys-libs/libcxxabi/libcxxabi-17.0.6.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \
+ toolchain-funcs
+
+DESCRIPTION="Low level support for a standard C++ library"
+HOMEPAGE="https://libcxxabi.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ~riscv sparc x86 ~arm64-macos ~x64-macos"
+IUSE="+clang +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+# in 15.x, cxxabi.h is moving from libcxx to libcxxabi
+RDEPEND+="
+ !<sys-libs/libcxx-15
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{abi,} llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ # darwin prefix builds do not have llvm installed yet, so rely on bootstrap-prefix
+ # to set the appropriate path vars to LLVM instead of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx"
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLIBCXXABI_ENABLE_SHARED=ON
+ -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
+ -DLIBCXXABI_USE_COMPILER_RT=${use_compiler_rt}
+
+ # upstream is omitting standard search path for this
+ # probably because gcc & clang are bundling their own unwind.h
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_build cxxabi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxxabi
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" cmake_build install-cxxabi
+}
diff --git a/sys-libs/libcxxabi/libcxxabi-18.1.4.ebuild b/sys-libs/libcxxabi/libcxxabi-18.1.4.ebuild
new file mode 100644
index 000000000000..8865a2ce4c2c
--- /dev/null
+++ b/sys-libs/libcxxabi/libcxxabi-18.1.4.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="Low level support for a standard C++ library"
+HOMEPAGE="https://libcxxabi.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86 ~arm64-macos ~x64-macos"
+IUSE="+clang +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+# in 15.x, cxxabi.h is moving from libcxx to libcxxabi
+RDEPEND+="
+ !<sys-libs/libcxx-15
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{abi,} llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+multilib_src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx"
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLIBCXXABI_ENABLE_SHARED=ON
+ -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
+ -DLIBCXXABI_USE_COMPILER_RT=${use_compiler_rt}
+
+ # upstream is omitting standard search path for this
+ # probably because gcc & clang are bundling their own unwind.h
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+ # this is broken with standalone builds, and also meaningless
+ -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_build cxxabi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxxabi
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" cmake_build install-cxxabi
+}
diff --git a/sys-libs/libcxxabi/libcxxabi-19.0.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..d45de5993114
--- /dev/null
+++ b/sys-libs/libcxxabi/libcxxabi-19.0.0.9999.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="Low level support for a standard C++ library"
+HOMEPAGE="https://libcxxabi.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+IUSE="+clang +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+# in 15.x, cxxabi.h is moving from libcxx to libcxxabi
+RDEPEND+="
+ !<sys-libs/libcxx-15
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{abi,} llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+multilib_src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx"
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLIBCXXABI_ENABLE_SHARED=ON
+ -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
+ -DLIBCXXABI_USE_COMPILER_RT=${use_compiler_rt}
+
+ # upstream is omitting standard search path for this
+ # probably because gcc & clang are bundling their own unwind.h
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+ # this is broken with standalone builds, and also meaningless
+ -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_build cxxabi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxxabi
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" cmake_build install-cxxabi
+}
diff --git a/sys-libs/libcxxabi/libcxxabi-19.0.0_pre20240410.ebuild b/sys-libs/libcxxabi/libcxxabi-19.0.0_pre20240410.ebuild
new file mode 100644
index 000000000000..d45de5993114
--- /dev/null
+++ b/sys-libs/libcxxabi/libcxxabi-19.0.0_pre20240410.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="Low level support for a standard C++ library"
+HOMEPAGE="https://libcxxabi.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+IUSE="+clang +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+# in 15.x, cxxabi.h is moving from libcxx to libcxxabi
+RDEPEND+="
+ !<sys-libs/libcxx-15
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{abi,} llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+multilib_src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx"
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLIBCXXABI_ENABLE_SHARED=ON
+ -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
+ -DLIBCXXABI_USE_COMPILER_RT=${use_compiler_rt}
+
+ # upstream is omitting standard search path for this
+ # probably because gcc & clang are bundling their own unwind.h
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+ # this is broken with standalone builds, and also meaningless
+ -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_build cxxabi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxxabi
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" cmake_build install-cxxabi
+}
diff --git a/sys-libs/libcxxabi/libcxxabi-19.0.0_pre20240420.ebuild b/sys-libs/libcxxabi/libcxxabi-19.0.0_pre20240420.ebuild
new file mode 100644
index 000000000000..d45de5993114
--- /dev/null
+++ b/sys-libs/libcxxabi/libcxxabi-19.0.0_pre20240420.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="Low level support for a standard C++ library"
+HOMEPAGE="https://libcxxabi.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+IUSE="+clang +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+# in 15.x, cxxabi.h is moving from libcxx to libcxxabi
+RDEPEND+="
+ !<sys-libs/libcxx-15
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{abi,} llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+multilib_src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx"
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLIBCXXABI_ENABLE_SHARED=ON
+ -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
+ -DLIBCXXABI_USE_COMPILER_RT=${use_compiler_rt}
+
+ # upstream is omitting standard search path for this
+ # probably because gcc & clang are bundling their own unwind.h
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+ # this is broken with standalone builds, and also meaningless
+ -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_build cxxabi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxxabi
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" cmake_build install-cxxabi
+}
diff --git a/sys-libs/libcxxabi/metadata.xml b/sys-libs/libcxxabi/metadata.xml
index 4e546195d6a6..9dfed369952d 100644
--- a/sys-libs/libcxxabi/metadata.xml
+++ b/sys-libs/libcxxabi/metadata.xml
@@ -5,6 +5,10 @@
<email>llvm@gentoo.org</email>
</maintainer>
<use>
- <flag name="libunwind">Use libunwind instead of libgcc_s for stack unwinding, thus avoiding dependency on gcc</flag>
+ <flag name="clang">Force building using installed clang (rather
+ than the default CC/CXX; required for testing).</flag>
</use>
+ <upstream>
+ <remote-id type="github">llvm/llvm-project</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/libfaketime/Manifest b/sys-libs/libfaketime/Manifest
index ab71085c4be9..1e76f97098bb 100644
--- a/sys-libs/libfaketime/Manifest
+++ b/sys-libs/libfaketime/Manifest
@@ -1,2 +1,3 @@
+DIST libfaketime-0.9.10.tar.gz 88908 BLAKE2B 0faa7b1fd0ef7fe99bb586bb4e68e8172f799a2cdca680c75b08145d84f3602ab10b84853589df19398e92fa5f248190624e5585b156c06e99cec7bc332925ab SHA512 07c431bee21e31343b680d1322dd529ea276e3cc4dbec61646c12bf5d0263163faf6186efeb36b199e24b655578a493c43e3b7a7acf8eba8b9ff84a1e94d618b
DIST libfaketime-0.9.6.tar.gz 53540 BLAKE2B 5559e683d9d513fe60fe4b7f22a2ee794bccd8b1fe2a58735876fb9a0f05e1157d20485cfc2f0bcefa0b1f642f3b981de00471a36998867b0024dd8ac5a77466 SHA512 22cd796d4c6f7b327c664895df5b93b72a7243d886bf5241f932cc23fd54049c5fb6a8351078d036d78d12cb6f530ff66b98ef75df6eba5339ebfef1e7561225
DIST libfaketime-0.9.9.tar.gz 78610 BLAKE2B 863e3aaf5f26a7b4d6104bdf5dd8fc0ac70547770d01cad302e476a7eeee63f0900ddc825aa75f6db7be08155d7ceb05f3b730fffb9e4928147fbdc097ee0df8 SHA512 b1aecf456753ccf771f0f80c92d57ffcd2c8349dde93a575862b4570a06812d4bce104f2efbcfd627a85a80fed99dbc37cb156dda0389892bfb4e71df816191f
diff --git a/sys-libs/libfaketime/libfaketime-0.9.10.ebuild b/sys-libs/libfaketime/libfaketime-0.9.10.ebuild
new file mode 100644
index 000000000000..eaeab20e29a2
--- /dev/null
+++ b/sys-libs/libfaketime/libfaketime-0.9.10.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2024 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 ~ia64 ~mips ~ppc ~ppc64 ~riscv sparc x86"
+
+src_prepare() {
+ default
+
+ sed -i -e 's/-Werror //' {src,test}/Makefile || die
+
+ # Bug #617624 (GCC-6 compatibility)
+ sed -i 's/-Wno-nonnull-compare //' src/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
+
+ # bug #908668
+ use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE
+
+ 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/libfaketime-0.9.9.ebuild b/sys-libs/libfaketime/libfaketime-0.9.9.ebuild
index 332eb881b2bd..df970bfb51c5 100644
--- a/sys-libs/libfaketime/libfaketime-0.9.9.ebuild
+++ b/sys-libs/libfaketime/libfaketime-0.9.9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -11,7 +11,7 @@ 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 ~ia64 ~ppc ~ppc64 -riscv ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
src_prepare() {
default
@@ -28,6 +28,9 @@ src_prepare() {
# CLOCK_MONOTONIC test without that
append-cflags -DFORCE_MONOTONIC_FIX
+ # bug #844958
+ use riscv && append-cflags -DFORCE_PTHREAD_NONVER
+
multilib_copy_sources
}
diff --git a/sys-libs/libfaketime/metadata.xml b/sys-libs/libfaketime/metadata.xml
index 8837fc4586b8..9dbf15865d46 100644
--- a/sys-libs/libfaketime/metadata.xml
+++ b/sys-libs/libfaketime/metadata.xml
@@ -2,8 +2,8 @@
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>whissi@gentoo.org</email>
- <name>Thomas Deutschmann</name>
+ <email>sam@gentoo.org</email>
+ <name>Sam James</name>
</maintainer>
<longdescription lang="en">
The Fake Time Preload Library (FTPL, a.k.a. libfaketime) intercepts
diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
deleted file mode 100644
index ffd498e94ecf..000000000000
--- a/sys-libs/libhugetlbfs/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libhugetlbfs-2.23.tar.gz 175459 BLAKE2B f469ff9a65364e9f0e04c11c8010c958855ebd4d50e1dd719576cda7c280586623404304be64a794907a5fb1d97bd9c0620a91d7a2492577e04fa40ff432b4c7 SHA512 fc9a7d59bcda9d3ca9c9e43a3a348f989c9cbdbbb77f21a43a06e71eacd05bbe5a7b2b51e20ae9ea00da9f1c4d1130da529bbfb702e8c9d11cab6efadd3dc168
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch
deleted file mode 100644
index 68e121e240ab..000000000000
--- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch
+++ /dev/null
@@ -1,258 +0,0 @@
-From 959d74fd0fbbff310943096e15024a84e8f5cba4 Mon Sep 17 00:00:00 2001
-From: Matheus Castanho <msc@linux.ibm.com>
-Date: Thu, 12 Aug 2021 16:38:46 -0300
-Subject: [PATCH] Disable hugepage-backed malloc if __morecore is not available
-
-Starting with glibc 2.32, __morecore hook has been marked as deprecated, and was
-completely removed on glibc 2.34, which causes an undefined symbol error during
-the build of libhugetlbfs.
-
-Greater changes are needed in order to keep providing the same functionality
-with future versions of glibc (see issue #52). Meanwhile, we can disable
-hugepage-backed malloc setup if __morecore is not available so users can at
-least keep using the other features provided by the library. Related tests are
-also conditionally disabled, and will show as SKIPPED if __morecore is not
-available.
-
-Tested on powerpc64le and x86_64 with glibc 2.34 and olders.
-
-Signed-off-by: Matheus Castanho <msc@linux.ibm.com>
----
- Makefile | 6 +++++
- morecore.c | 8 ++++++
- tests/run_tests.py | 67 +++++++++++++++++++++++++++++++++++++++-------
- 3 files changed, 71 insertions(+), 10 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 8b73523..35e53e7 100644
---- a/Makefile
-+++ b/Makefile
-@@ -192,6 +192,12 @@ endif
- endif
- endif
-
-+# glibc 2.34 removed __morecore, so it may not be available with recent versions
-+HAS_MORECORE := $(shell /bin/echo -e '\#include <malloc.h>\nvoid * morecore_exists() { return &__morecore; }' | $(CC) -c -xc -o /dev/null - &> /dev/null && /bin/echo yes || /bin/echo no)
-+ifeq ($(HAS_MORECORE),yes)
-+CFLAGS += -DHAS_MORECORE
-+endif
-+
- HEADERDIR = $(PREFIX)/include
- LIBDIR32 = $(PREFIX)/$(LIB32)
- LIBDIR64 = $(PREFIX)/$(LIB64)
-diff --git a/morecore.c b/morecore.c
-index 6563bbd..405c566 100644
---- a/morecore.c
-+++ b/morecore.c
-@@ -33,6 +33,13 @@
-
- #include "libhugetlbfs_internal.h"
-
-+#ifndef HAS_MORECORE
-+void hugetlbfs_setup_morecore(void)
-+{
-+ INFO("Not setting up morecore because it's not available (see issue #52).\n");
-+}
-+#else
-+
- static int heap_fd;
-
- static void *heapbase;
-@@ -381,3 +388,4 @@ void hugetlbfs_setup_morecore(void)
- * to mmap() if we run out of hugepages. */
- mallopt(M_MMAP_MAX, 0);
- }
-+#endif /* HAS_MORECORE */
-diff --git a/tests/run_tests.py b/tests/run_tests.py
-index 018264d..871d04d 100755
---- a/tests/run_tests.py
-+++ b/tests/run_tests.py
-@@ -60,7 +60,7 @@ def snapshot_pool_state():
- l.append((d, tuple(substate)))
- return tuple(l)
-
--def run_test_prog(bits, pagesize, cmd, **env):
-+def run_test_prog(bits, pagesize, cmd, output='stdout', **env):
- if paranoid_pool_check:
- beforepool = snapshot_pool_state()
- print("Pool state: %s" % str(beforepool))
-@@ -73,15 +73,17 @@ def run_test_prog(bits, pagesize, cmd, **env):
- % (bits, bits, local_env.get("LD_LIBRARY_PATH", ""))
- local_env["HUGETLB_DEFAULT_PAGE_SIZE"] = repr(pagesize)
-
-+ popen_args = {'env' : local_env, output : subprocess.PIPE}
-+
- try:
-- p = subprocess.Popen(cmd, env=local_env, stdout=subprocess.PIPE)
-+ p = subprocess.Popen(cmd, **popen_args)
- rc = p.wait()
- except KeyboardInterrupt:
- # Abort and mark this a strange test result
- return (None, "")
- except OSError as e:
- return (-e.errno, "")
-- out = p.stdout.read().decode().strip()
-+ out = getattr(p, output).read().decode().strip()
-
- if paranoid_pool_check:
- afterpool = snapshot_pool_state()
-@@ -309,6 +311,33 @@ def check_linkhuge_tests():
- okbits.add(bits)
- return okbits
-
-+def check_morecore_disabled():
-+ """
-+ Check if support for morecore is available.
-+
-+ Newer glibc versions (>= 2.34) removed the __morecore malloc hook, so tests
-+ relying on that functionality will not work as expected, and should be
-+ disabled.
-+ """
-+ global morecore_disabled, wordsizes, pagesizes
-+
-+ # Quick and dirty way to get a word and page size. Which one doesn't really
-+ # matter in this case.
-+ for wsz in wordsizes:
-+ b = wsz
-+ break
-+ for psz in pagesizes:
-+ p = psz
-+ break
-+
-+ # Run an arbitrary program and check stderr for the "morecore disabled"
-+ # message
-+ (rc, out) = run_test_prog(b, p, "gethugepagesize", output='stderr',
-+ HUGETLB_MORECORE="yes",
-+ HUGETLB_VERBOSE="3")
-+
-+ morecore_disabled = "Not setting up morecore" in out
-+
- def print_cmd(pagesize, bits, cmd, env):
- if env:
- print(' '.join(['%s=%s' % (k, v) for k, v in env.items()]), end=" ")
-@@ -357,14 +386,17 @@ def skip_test(pagesize, bits, cmd, **env):
- print_cmd(pagesize, bits, cmd, env)
- print("SKIPPED")
-
--def do_test(cmd, bits=None, **env):
-+def do_test(cmd, bits=None, skip=False, **env):
- """
- Run a test case, testing each page size and each indicated word size.
- """
- if bits == None: bits = wordsizes
- for p in pagesizes:
- for b in (set(bits) & wordsizes_by_pagesize[p]):
-- run_test(p, b, cmd, **env)
-+ if skip:
-+ skip_test(p, b, cmd, **env)
-+ else:
-+ run_test(p, b, cmd, **env)
-
- def do_test_with_rlimit(rtype, limit, cmd, bits=None, **env):
- """
-@@ -375,7 +407,7 @@ def do_test_with_rlimit(rtype, limit, cmd, bits=None, **env):
- do_test(cmd, bits, **env)
- resource.setrlimit(rtype, oldlimit)
-
--def do_test_with_pagesize(pagesize, cmd, bits=None, **env):
-+def do_test_with_pagesize(pagesize, cmd, bits=None, skip=False, **env):
- """
- Run a test case, testing with a specified huge page size and
- each indicated word size.
-@@ -383,7 +415,10 @@ def do_test_with_pagesize(pagesize, cmd, bits=None, **env):
- if bits == None:
- bits = wordsizes
- for b in (set(bits) & wordsizes_by_pagesize[pagesize]):
-- run_test(pagesize, b, cmd, **env)
-+ if skip:
-+ skip_test(pagesize, b, cmd, **env)
-+ else:
-+ run_test(pagesize, b, cmd, **env)
-
- def do_elflink_test(cmd, **env):
- """
-@@ -533,7 +568,7 @@ def functional_tests():
- """
- Run the set of functional tests.
- """
-- global linkhuge_wordsizes
-+ global linkhuge_wordsizes, morecore_disabled
-
- # Kernel background tests not requiring hugepage support
- do_test("zero_filesize_segment")
-@@ -598,19 +633,24 @@ def functional_tests():
- do_test("fork-cow")
- do_test("direct")
- do_test_with_pagesize(system_default_hpage_size, "malloc")
-+
- do_test_with_pagesize(system_default_hpage_size, "malloc",
-+ skip=morecore_disabled,
- LD_PRELOAD="libhugetlbfs.so",
- HUGETLB_MORECORE="yes")
- do_test_with_pagesize(system_default_hpage_size, "malloc",
-+ skip=morecore_disabled,
- LD_PRELOAD="libhugetlbfs.so",
- HUGETLB_MORECORE="yes",
- HUGETLB_RESTRICT_EXE="unknown:none")
- do_test_with_pagesize(system_default_hpage_size, "malloc",
-+ skip=morecore_disabled,
- LD_PRELOAD="libhugetlbfs.so",
- HUGETLB_MORECORE="yes",
- HUGETLB_RESTRICT_EXE="unknown:malloc")
- do_test_with_pagesize(system_default_hpage_size, "malloc_manysmall")
- do_test_with_pagesize(system_default_hpage_size, "malloc_manysmall",
-+ skip=morecore_disabled,
- LD_PRELOAD="libhugetlbfs.so",
- HUGETLB_MORECORE="yes")
-
-@@ -630,26 +670,32 @@ def functional_tests():
- do_test_with_pagesize(system_default_hpage_size, "heapshrink",
- GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
- LD_PRELOAD="libheapshrink.so")
-+
- do_test_with_pagesize(system_default_hpage_size, "heapshrink",
-+ skip=morecore_disabled,
- GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
- LD_PRELOAD="libhugetlbfs.so",
- HUGETLB_MORECORE="yes")
- do_test_with_pagesize(system_default_hpage_size, "heapshrink",
-+ skip=morecore_disabled,
- GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
- LD_PRELOAD="libhugetlbfs.so libheapshrink.so",
- HUGETLB_MORECORE="yes")
- do_test_with_pagesize(system_default_hpage_size, "heapshrink",
-+ skip=morecore_disabled,
- GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
- LD_PRELOAD="libheapshrink.so",
- HUGETLB_MORECORE="yes",
- HUGETLB_MORECORE_SHRINK="yes")
- do_test_with_pagesize(system_default_hpage_size, "heapshrink",
-+ skip=morecore_disabled,
- GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
- LD_PRELOAD="libhugetlbfs.so libheapshrink.so",
- HUGETLB_MORECORE="yes",
- HUGETLB_MORECORE_SHRINK="yes")
-
-- do_test("heap-overflow", HUGETLB_VERBOSE="1", HUGETLB_MORECORE="yes")
-+ do_test("heap-overflow", skip=morecore_disabled, HUGETLB_VERBOSE="1",
-+ HUGETLB_MORECORE="yes")
-
- # Run the remapping tests' up-front checks
- linkhuge_wordsizes = check_linkhuge_tests()
-@@ -747,7 +793,7 @@ def print_help():
-
- def main():
- global wordsizes, pagesizes, dangerous, paranoid_pool_check, system_default_hpage_size
-- global custom_ldscripts
-+ global custom_ldscripts, morecore_disabled
- testsets = set()
- env_override = {"QUIET_TEST": "1", "HUGETLBFS_MOUNTS": "",
- "HUGETLB_ELFMAP": None, "HUGETLB_MORECORE": None}
-@@ -802,6 +848,7 @@ def main():
- return 1
-
- check_hugetlbfs_path()
-+ check_morecore_disabled()
-
- if "func" in testsets: functional_tests()
- if "stress" in testsets: stress_tests()
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-uncompressed-man-pages.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-uncompressed-man-pages.patch
deleted file mode 100644
index c0ca6a398e70..000000000000
--- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-uncompressed-man-pages.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -436,27 +436,19 @@ install-man:
- $(INSTALL) -d $(DESTDIR)$(MANDIR8)
- for x in $(INSTALL_MAN1); do \
- $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR1); \
-- gzip -f $(DESTDIR)$(MANDIR1)/$$x; \
- done
- for x in $(INSTALL_MAN3); do \
- $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR3); \
-- gzip -f $(DESTDIR)$(MANDIR3)/$$x; \
- done
-- rm -f $(DESTDIR)$(MANDIR3)/free_huge_pages.3.gz
-- rm -f $(DESTDIR)$(MANDIR3)/free_hugepage_region.3.gz
-- rm -f $(DESTDIR)$(MANDIR3)/hugetlbfs_unlinked_fd_for_size.3.gz
-- rm -f $(DESTDIR)$(MANDIR3)/hugetlbfs_find_path_for_size.3.gz
-- ln -s get_huge_pages.3.gz $(DESTDIR)$(MANDIR3)/free_huge_pages.3.gz
-- ln -s get_hugepage_region.3.gz $(DESTDIR)$(MANDIR3)/free_hugepage_region.3.gz
-- ln -s hugetlbfs_unlinked_fd.3.gz $(DESTDIR)$(MANDIR3)/hugetlbfs_unlinked_fd_for_size.3.gz
-- ln -s hugetlbfs_find_path.3.gz $(DESTDIR)$(MANDIR3)/hugetlbfs_find_path_for_size.3.gz
-+ ln -s get_huge_pages.3 $(DESTDIR)$(MANDIR3)/free_huge_pages.3
-+ ln -s get_hugepage_region.3 $(DESTDIR)$(MANDIR3)/free_hugepage_region.3
-+ ln -s hugetlbfs_unlinked_fd.3 $(DESTDIR)$(MANDIR3)/hugetlbfs_unlinked_fd_for_size.3
-+ ln -s hugetlbfs_find_path.3 $(DESTDIR)$(MANDIR3)/hugetlbfs_find_path_for_size.3
- for x in $(INSTALL_MAN7); do \
- $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR7); \
-- gzip -f $(DESTDIR)$(MANDIR7)/$$x; \
- done
- for x in $(INSTALL_MAN8); do \
- $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR8); \
-- gzip -f $(DESTDIR)$(MANDIR8)/$$x; \
- done
-
- install-bin:
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-fixup-testsuite.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-fixup-testsuite.patch
deleted file mode 100644
index 12548a884a6f..000000000000
--- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-fixup-testsuite.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -Nuar --exclude '*.S' --exclude Makefile libhugetlbfs-2.6.orig/tests/run_tests.py libhugetlbfs-2.6/tests/run_tests.py
---- libhugetlbfs-2.6.orig/tests/run_tests.py 2009-08-24 05:56:07.000000000 -0700
-+++ libhugetlbfs-2.6/tests/run_tests.py 2009-10-31 00:40:28.520387427 -0700
-@@ -56,6 +56,11 @@
- local_env["LD_LIBRARY_PATH"] = "../obj%d:obj%d:%s" \
- % (bits, bits, local_env.get("LD_LIBRARY_PATH", ""))
- local_env["HUGETLB_DEFAULT_PAGE_SIZE"] = repr(pagesize)
-+ if isinstance(cmd, types.StringType):
-+ cmd = 'obj%d/%s' % (bits, cmd)
-+ else:
-+ s = 'obj%d/%s' % (bits, cmd[0])
-+ cmd = (s,)+(cmd[1:])
-
- p = subprocess.Popen(cmd, env=local_env, stdout=subprocess.PIPE)
- try:
-@@ -523,10 +528,11 @@
- elfshare_test("linkshare")
- elflink_and_share_test("linkhuge")
-
-- # elflink_rw tests
-- elflink_rw_test("linkhuge_rw")
-- # elflink_rw sharing tests
-- elflink_rw_and_share_test("linkhuge_rw")
-+ if 32 in wordsizes:
-+ # elflink_rw tests
-+ elflink_rw_test("linkhuge_rw")
-+ # elflink_rw sharing tests
-+ elflink_rw_and_share_test("linkhuge_rw")
-
- # Accounting bug tests
- # reset free hpages because sharing will have held some
diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
deleted file mode 100644
index c091b4a8c00b..000000000000
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
+++ /dev/null
@@ -1,171 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-
-inherit toolchain-funcs python-any-r1
-
-DESCRIPTION="Easy hugepage access"
-HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs"
-SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~s390 ~x86"
-IUSE="static-libs test"
-RESTRICT="!test? ( test )"
-
-BDEPEND="test? ( ${PYTHON_DEPS} )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
- "${FILESDIR}"/${PN}-2.23-uncompressed-man-pages.patch
- "${FILESDIR}"/${PN}-2.23-allow-building-against-glibc-2.34.patch
-)
-
-src_prepare() {
- default
-
- sed -i \
- -e '/^PREFIX/s:/local::' \
- -e '1iBUILDTYPE = NATIVEONLY' \
- -e '1iV = 1' \
- -e '/gzip.*MANDIR/d' \
- -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
- -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
- -e 's@^\(ARCH\) ?=@\1 =@' \
- Makefile || die "sed failed"
-
- if [ "$(get_libdir)" == "lib64" ]; then
- sed -i \
- -e "/^LIB\(32\)/s:=.*:= lib32:" \
- Makefile
- fi
-
- # Tarballs from github don't have the version set.
- # https://github.com/libhugetlbfs/libhugetlbfs/issues/7
- [[ -f version ]] || echo "${PV}" > version
-}
-
-src_compile() {
- tc-export AR
- emake CC="$(tc-getCC)" libs tools
-}
-
-src_install() {
- default
-
- use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
-}
-
-src_test_alloc_one() {
- hugeadm="${1}"
- sign="${2}"
- pagesize="${3}"
- pagecount="${4}"
-
- ${hugeadm} \
- --pool-pages-max ${pagesize}:${sign}${pagecount} \
- && \
- ${hugeadm} \
- --pool-pages-min ${pagesize}:${sign}${pagecount}
- return $?
-}
-
-# die is NOT allowed in this src_test block after the marked point, so that we
-# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
-src_test() {
- [[ ${UID} -eq 0 ]] || die "Need FEATURES=-userpriv to run this testsuite"
- einfo "Building testsuite"
- emake -j1 tests
-
- local hugeadm='obj/hugeadm'
- local allocated=''
- local rc=0
- # the testcases need 64MiB per pagesize.
- local MIN_HUGEPAGE_RAM=$((64*1024*1024))
-
- einfo "Planning allocation"
- local PAGESIZES="$(${hugeadm} --page-sizes-all)"
-
- # Need to do this before we can create the mountpoints.
- local pagesize pagecount
- for pagesize in ${PAGESIZES} ; do
- # The kernel depends on the location :-(
- mkdir -p /var/lib/hugetlbfs/pagesize-${pagesize}
- addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
- done
-
- addwrite /proc/sys/vm/
- addwrite /proc/sys/kernel/shmall
- addwrite /proc/sys/kernel/shmmax
- addwrite /proc/sys/kernel/shmmni
-
- einfo "Checking HugeTLB mountpoints"
- ${hugeadm} --create-mounts || die "Failed to set up hugetlb mountpoints."
-
- # -----------------------------------------------------
- # --------- die is unsafe after this point. -----------
- # -----------------------------------------------------
-
- einfo "Starting allocation"
- for pagesize in ${PAGESIZES} ; do
- pagecount=$((${MIN_HUGEPAGE_RAM}/${pagesize}))
- einfo " ${pagecount} @ ${pagesize}"
-
- addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
- src_test_alloc_one "${hugeadm}" "+" "${pagesize}" "${pagecount}"
-
- rc=$?
- if [[ ${rc} -eq 0 ]]; then
- allocated="${allocated} ${pagesize}:${pagecount}"
- else
- eerror "Failed to add ${pagecount} pages of size ${pagesize}"
- fi
- done
-
- einfo "Allocation status"
- ${hugeadm} --pool-list
-
- if [[ -n "${allocated}" ]]; then
- # All our allocations worked, so time to run.
- einfo "Starting tests"
-
- cd "${S}"/tests || die
- local TESTOPTS="-t func"
- case ${ARCH} in
- amd64|ppc64)
- TESTOPTS="${TESTOPTS} -b 64"
- ;;
- x86)
- TESTOPTS="${TESTOPTS} -b 32"
- ;;
- esac
-
- # This needs a bit of work to give a nice exit code still.
- ./run_tests.py ${TESTOPTS}
- rc=$?
- else
- eerror "Failed to make HugeTLB allocations."
- rc=1
- fi
-
- einfo "Cleaning up memory"
- cd "${S}" || die
- # Cleanup memory allocation
- for alloc in ${allocated} ; do
- pagesize="${alloc/:*}"
- pagecount="${alloc/*:}"
-
- einfo " ${pagecount} @ ${pagesize}"
- src_test_alloc_one "${hugeadm}" "-" "${pagesize}" "${pagecount}"
- done
-
- # ---------------------------------------------------------
- # --------- die is safe again after this point. -----------
- # ---------------------------------------------------------
-
- return ${rc}
-}
diff --git a/sys-libs/libhugetlbfs/metadata.xml b/sys-libs/libhugetlbfs/metadata.xml
deleted file mode 100644
index 4256595eca45..000000000000
--- a/sys-libs/libhugetlbfs/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">libhugetlbfs/libhugetlbfs</remote-id>
- <remote-id type="sourceforge">libhugetlbfs</remote-id>
-</upstream>
-</pkgmetadata>
diff --git a/sys-libs/libhx/Manifest b/sys-libs/libhx/Manifest
index dd169cc59c4d..333695429332 100644
--- a/sys-libs/libhx/Manifest
+++ b/sys-libs/libhx/Manifest
@@ -1,2 +1,4 @@
DIST libHX-3.24.tar.xz 876992 BLAKE2B 518b99e78acc0cb412f444c0dacaae830a853294a0ee549facfbe65a423a9f32d0388e30e255c87c3f5325102bea45e5e9d72d3fce5b89139b689fddcb299f93 SHA512 faf7af53b628efe1531568ccb2b7e9910db833b14583ab1487eb6a554b407a7546bc75348f7d2344c29ab53fd2df061f6f8de8db634bbd62c3672dc4347d27e4
DIST libHX-3.25.tar.xz 890576 BLAKE2B d8e13a7fb0ea2cd033edc6b179ef3d4b30c37f522b1e90aea0de96d225655b654d1a7cb133834ef2f10044ccbe60e7559b2280ecbc136a458fd3a2237b8f83ab SHA512 221000fddd1316b6c452babbcb7e234683e3bad559a4b1a608936a086143ad8f17cec489606f8d50ea66775b9f8305ec52c7401d568f01b33372388f75bdea94
+DIST libHX-4.21.tar.xz 359760 BLAKE2B cda2c5e29ede3e0d7ab575983b8443326f9e5aa49ccc3e64826e306c80a86fd7dd7a120d9c6ac82f790c1a9690666d1a54039240669abd1a88c0189d1af7bc80 SHA512 cf3c5fd7b1137c9f56b56abe52886a47ec21256cfa393bd31339f1f9f4683cfeca2107f46ac0fc5571962f5daeb9c5c060c6db442667cc99380f6e55183a6ab5
+DIST libHX-4.23.tar.xz 359608 BLAKE2B f14d7be69d3bedb78758e5705b196c0179a00f77e768802a3e19fd5b1bbbdc1d117c907718eb6d63e1aba33d2bc872b64a6dd550c9bf29c6ba47b09682829d69 SHA512 c19a2e8a2f84a81552258a58f47a55fd3f5c81a19d12cf7511c12a3a97bef051977f18cd82a004a825c20d4fd3b2c48f23ddbf9364a46b24faabcb94aa0167ff
diff --git a/sys-libs/libhx/libhx-4.21.ebuild b/sys-libs/libhx/libhx-4.21.ebuild
new file mode 100644
index 000000000000..9126c9cafb8e
--- /dev/null
+++ b/sys-libs/libhx/libhx-4.21.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2024 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"
+
+LICENSE="GPL-3"
+SLOT="0/32" # soname version
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+
+BDEPEND="app-arch/xz-utils"
+
+S="${WORKDIR}/libHX-${PV}"
+
+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-4.23.ebuild b/sys-libs/libhx/libhx-4.23.ebuild
new file mode 100644
index 000000000000..3383d9ca212a
--- /dev/null
+++ b/sys-libs/libhx/libhx-4.23.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2024 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"
+
+LICENSE="GPL-3"
+SLOT="0/32" # soname version
+KEYWORDS="amd64 ppc x86"
+IUSE="doc"
+
+BDEPEND="app-arch/xz-utils"
+
+S="${WORKDIR}/libHX-${PV}"
+
+src_install() {
+ default
+
+ if use doc; then
+ dodoc doc/*.txt doc/*.rst
+ fi
+
+ find "${ED}" -name "*.la" -delete || die
+}
diff --git a/sys-libs/libieee1284/libieee1284-0.2.11-r8.ebuild b/sys-libs/libieee1284/libieee1284-0.2.11-r8.ebuild
index ce05c62326ea..4be47a172a48 100644
--- a/sys-libs/libieee1284/libieee1284-0.2.11-r8.ebuild
+++ b/sys-libs/libieee1284/libieee1284-0.2.11-r8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 ppc x86"
+KEYWORDS="amd64 ~arm ~arm64 ppc x86"
IUSE="doc static-libs"
BDEPEND="doc? (
diff --git a/sys-libs/libmodulemd/Manifest b/sys-libs/libmodulemd/Manifest
new file mode 100644
index 000000000000..a287407d75ca
--- /dev/null
+++ b/sys-libs/libmodulemd/Manifest
@@ -0,0 +1 @@
+DIST libmodulemd-2.15.0.tar.gz 572396 BLAKE2B 39e9240deb4e1a3278bf323e111b137b980ac5a3069598b7306390d27623730ac1bc826c91ed049257c0d5de8c6a05c3bbc22ac8e9435b5c38c147f0f077ec41 SHA512 6e890952bf6b6fe3ee5790ff71866938627134eaa2d6c6e3bf1940dcf21203dc0101f487801d62f3698e5a50402eb089665c99723aeffd831e5f0b341a63aace
diff --git a/sys-libs/libmodulemd/libmodulemd-2.15.0.ebuild b/sys-libs/libmodulemd/libmodulemd-2.15.0.ebuild
new file mode 100644
index 000000000000..72b02229c8f2
--- /dev/null
+++ b/sys-libs/libmodulemd/libmodulemd-2.15.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+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="gtk-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
+ dev-util/glib-utils
+ gtk-doc? (
+ dev-libs/glib[gtk-doc]
+ dev-util/gtk-doc
+ )
+ test? (
+ sys-libs/libmodulemd
+ )
+"
+
+src_configure() {
+ local emesonargs=(
+ $(meson_use gtk-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
new file mode 100644
index 000000000000..9b232210697a
--- /dev/null
+++ b/sys-libs/libmodulemd/libmodulemd-9999.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+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"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+IUSE="gtk-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
+ dev-util/glib-utils
+ gtk-doc? (
+ dev-libs/glib[gtk-doc]
+ dev-util/gtk-doc
+ )
+ test? (
+ sys-libs/libmodulemd
+ )
+"
+
+src_configure() {
+ local emesonargs=(
+ $(meson_use gtk-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
new file mode 100644
index 000000000000..8b31faedb4d6
--- /dev/null
+++ b/sys-libs/libmodulemd/metadata.xml
@@ -0,0 +1,11 @@
+<?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
new file mode 100644
index 000000000000..ee6963a1435b
--- /dev/null
+++ b/sys-libs/libnbd/Manifest
@@ -0,0 +1,3 @@
+DIST libnbd-1.14.1.tar.gz 1257547 BLAKE2B 4c2fc02abc1d069b23fb8cc52b3359f10ebd23f2bc8cb359274a4fc2781413445d64ca1013b3123dff090d359a0e28076aa410220a05b155f95320238d1b99ee SHA512 9d95cf7a66926d00ec9aacfc6d04f2dc885ccfed07c78f1e6693190dd14132d30d6d1ff7d46e46007732a8a20a9fbf648775bc0b3371ad49eff4ce1e44e47209
+DIST libnbd-1.16.1.tar.gz 1379437 BLAKE2B 13020c21663e988d46fb5a048b31c58b0256c7c547fee2b95bde139324043d6102a0a901c98ffa75f88eca38cd0293329c62d6613435b74e65802c083af3c58f SHA512 e840cff964e847015955f0a0dcc7d03899d5e0fb0bdd3f5597ec87169d0b2689213fed72fd3afc84300ec86ed10703e9396599c11750ef10df66cf61853210a5
+DIST libnbd-1.18.1.tar.gz 1482736 BLAKE2B d3f0b2993fa1392df93b0bbc5d63805489ad1a82cf5bcc5eb5c3b5b7e7e6c40095471ab8fc964cc0e5c7a99affa7150f7be38cc16c42f27fc4cdc16bd0ca0359 SHA512 f4262666be55d580550e053355f14f80d352bf869ae7241e9fa032a9b5cd9e027eb89a536871c1206422413fc7ed745da7d612b3e1413f76ec17168705fbf12c
diff --git a/sys-libs/libnbd/libnbd-1.14.1.ebuild b/sys-libs/libnbd/libnbd-1.14.1.ebuild
new file mode 100644
index 000000000000..7e6f7e91caf7
--- /dev/null
+++ b/sys-libs/libnbd/libnbd-1.14.1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-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 ~sparc ~x86"
+IUSE="fuse gnutls uri-support test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ fuse? ( sys-fs/fuse:3 )
+ gnutls? ( net-libs/gnutls:= )
+ uri-support? ( dev-libs/libxml2 )
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( sys-block/nbd[gnutls?] )
+"
+BDEPEND="dev-lang/perl"
+
+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
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable fuse)
+ $(use_with gnutls)
+ $(use_with uri-support libxml2)
+ --disable-ocaml
+ --disable-python
+ --disable-golang
+ )
+
+ export bashcompdir="$(get_bashcompdir)"
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/sys-libs/libnbd/libnbd-1.16.1-r1.ebuild b/sys-libs/libnbd/libnbd-1.16.1-r1.ebuild
new file mode 100644
index 000000000000..6be886ede4e7
--- /dev/null
+++ b/sys-libs/libnbd/libnbd-1.16.1-r1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+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 ~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"
+
+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)
+ --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.18.1.ebuild b/sys-libs/libnbd/libnbd-1.18.1.ebuild
new file mode 100644
index 000000000000..f113c5cc6050
--- /dev/null
+++ b/sys-libs/libnbd/libnbd-1.18.1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+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"
+
+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/metadata.xml b/sys-libs/libnbd/metadata.xml
new file mode 100644
index 000000000000..907f610bee5a
--- /dev/null
+++ b/sys-libs/libnbd/metadata.xml
@@ -0,0 +1,23 @@
+<?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>
+ <remote-id type="github">libguestfs/libnbd</remote-id>
+ </upstream>
+ <use>
+ <flag name="uri-support">
+ Enable nbd:// URI support via <pkg>dev-libs/libxml2</pkg>.
+ </flag>
+ <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/libnvme/Manifest b/sys-libs/libnvme/Manifest
new file mode 100644
index 000000000000..553267caeaa1
--- /dev/null
+++ b/sys-libs/libnvme/Manifest
@@ -0,0 +1,2 @@
+DIST libnvme-1.7.1.tar.gz 604220 BLAKE2B b02bf0914be73f5877f418bebdbed31dfb019484fb9f6e169c3474d90306706b8e787003a472f13bedb72e90eff39a30ba35df252a3cdf4ea08a362c3f9e221b SHA512 aea986ae35eafa17482e07015228d5a7d529d41148f4cee9e4619adc2460abb5460d60cd91177462cbcaf2e94e5870026ff9e45548f91d9f90b65a6268eb3abb
+DIST libnvme-1.8.tar.gz 629032 BLAKE2B cba5215983fa14e485156cf68613a7acca07b7e0fdac41663ebf2246c9f6fd6d1bfcebc7c1457ab4217705769ebea382e85726eb302fd9af6f6b85cec7b2e14d SHA512 ba0cec72fd6c9bb29b29c4342be7b25aec1f31157a094ad387a1105cbd1961ab600e1448a2462d8be2af91d5251b2970d6d06d4871ce96604c5be204d6096bcb
diff --git a/sys-libs/libnvme/libnvme-1.7.1-r1.ebuild b/sys-libs/libnvme/libnvme-1.7.1-r1.ebuild
new file mode 100644
index 000000000000..bc07dd00ff7c
--- /dev/null
+++ b/sys-libs/libnvme/libnvme-1.7.1-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+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 ~ia64 ~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.8.ebuild b/sys-libs/libnvme/libnvme-1.8.ebuild
new file mode 100644
index 000000000000..79c6241197d9
--- /dev/null
+++ b/sys-libs/libnvme/libnvme-1.8.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+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 ~ia64 ~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
new file mode 100644
index 000000000000..b8882391c6fc
--- /dev/null
+++ b/sys-libs/libnvme/metadata.xml
@@ -0,0 +1,16 @@
+<?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="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>
+ <upstream>
+ <remote-id type="github">linux-nvme/libnvme</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
index 378cdb597c9e..b5f9814a55cf 100644
--- a/sys-libs/libomp/Manifest
+++ b/sys-libs/libomp/Manifest
@@ -1,7 +1,11 @@
-DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249
-DIST llvm-gentoo-patchset-13.0.0-r2.tar.xz 6500 BLAKE2B 0ce8d0c4a5508f70c8ec49dbc03dfbfc6371ac224bc5dfc9a39f71def0f574405a06df5666baf6159afafd83a8028c5ea6cb369f22a06f927f3ce6795e96994d SHA512 800d44b382c03b673b43965d80d6ed1b7e8e4ced8d066183b9b8df722b2cc002a6aa54092e600f0d77611be581d312f8886ce8af25b23ff818115a209ec21312
-DIST llvm-gentoo-patchset-13.0.1-rc3.tar.xz 4808 BLAKE2B d8ed3ae424914437413e2e8c029880072e93d79ca79b842ad59451df46594c9b0d73ee5d49d3b65c4c7a40c86b2e0d43501ef106aea7c481f22425a5245a3411 SHA512 10430a720b120a340a681fa435a7f050741c75270607e3f5214bf829313d274c11f019f1ac072857dc5d7f868e6eb013932d1c94446e8cb2e151ac818a081914
-DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
-DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
-DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
-DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1
+DIST llvm-gentoo-patchset-15.0.7-r6.tar.xz 25208 BLAKE2B c9fca31a053ee059c3060a94dcf675d472fc1a59b5f927648de58fb4ff20bfc229890f789ed47b3d053bd466b860a0c60a53b4b024a8fe18c776e9a72434d6de SHA512 601cd923711839dca7cb5bfea53ded644777c6340265a797939a53409fd2ca27059a015fd6ca6832e60314699ade27919a9a59dab395cc27f8fdc479a0f3c034
+DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
+DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
+DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
+DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
+DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
+DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29
+DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386
+DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1
+DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50
diff --git a/sys-libs/libomp/libomp-11.1.0.ebuild b/sys-libs/libomp/libomp-11.1.0.ebuild
deleted file mode 100644
index 5c983795cfff..000000000000
--- a/sys-libs/libomp/libomp-11.1.0.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{7..9} )
-inherit cmake-multilib linux-info llvm.org python-any-r1
-
-DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
-HOMEPAGE="https://openmp.llvm.org"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
-IUSE="cuda hwloc offload ompt test"
-# CUDA works only with the x86_64 ABI
-REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )
- offload? (
- virtual/libelf:=[${MULTILIB_USEDEP}]
- dev-libs/libffi:=[${MULTILIB_USEDEP}]
- cuda? ( dev-util/nvidia-cuda-toolkit:= )
- )"
-# tests:
-# - dev-python/lit provides the test runner
-# - sys-devel/llvm provide test utils (e.g. FileCheck)
-# - sys-devel/clang provides the compiler to run tests
-DEPEND="${RDEPEND}"
-BDEPEND="dev-lang/perl
- offload? ( virtual/pkgconfig )
- test? (
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- >=sys-devel/clang-6
- )"
-
-LLVM_COMPONENTS=( openmp )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-kernel_pds_check() {
- if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
- local CONFIG_CHECK="~!SCHED_PDS"
- local ERROR_SCHED_PDS="\
-PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11
-< 4.14-pf9) do not implement sched_yield() call which may result in horrible
-performance problems with libomp. If you are using one of the specified
-kernel versions, you may want to disable the PDS scheduler."
-
- check_extra_config
- fi
-}
-
-pkg_pretend() {
- kernel_pds_check
-}
-
-pkg_setup() {
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- local libdir="$(get_libdir)"
- local mycmakeargs=(
- -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
-
- -DLIBOMP_USE_HWLOC=$(usex hwloc)
- -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
-
- -DOPENMP_ENABLE_LIBOMPTARGET=$(usex offload)
-
- # do not install libgomp.so & libiomp5.so aliases
- -DLIBOMP_INSTALL_ALIASES=OFF
- # disable unnecessary hack copying stuff back to srcdir
- -DLIBOMP_COPY_EXPORTS=OFF
- )
- use offload && mycmakeargs+=(
- # this is non-fatal and libomp checks for CUDA conditionally
- # to ABI, so we can just ignore passing the wrong value
- # on non-amd64 ABIs
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
- )
- use test && mycmakeargs+=(
- # this project does not use standard LLVM cmake macros
- -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
- -DOPENMP_LIT_ARGS="$(get_lit_flags)"
-
- -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
- -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
- )
- cmake_src_configure
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
-
- cmake_build check-libomp
-}
diff --git a/sys-libs/libomp/libomp-12.0.1.ebuild b/sys-libs/libomp/libomp-12.0.1.ebuild
deleted file mode 100644
index 6f0a864fcf48..000000000000
--- a/sys-libs/libomp/libomp-12.0.1.ebuild
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib linux-info llvm.org python-any-r1
-
-DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
-HOMEPAGE="https://openmp.llvm.org"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
-IUSE="cuda hwloc offload ompt test"
-# CUDA works only with the x86_64 ABI
-REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )
- offload? (
- virtual/libelf:=[${MULTILIB_USEDEP}]
- dev-libs/libffi:=[${MULTILIB_USEDEP}]
- cuda? ( dev-util/nvidia-cuda-toolkit:= )
- )"
-# tests:
-# - dev-python/lit provides the test runner
-# - sys-devel/llvm provide test utils (e.g. FileCheck)
-# - sys-devel/clang provides the compiler to run tests
-DEPEND="${RDEPEND}"
-BDEPEND="dev-lang/perl
- offload? ( virtual/pkgconfig )
- test? (
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- >=sys-devel/clang-6
- )"
-
-LLVM_COMPONENTS=( openmp llvm/include )
-LLVM_PATCHSET=12.0.1
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-kernel_pds_check() {
- if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
- local CONFIG_CHECK="~!SCHED_PDS"
- local ERROR_SCHED_PDS="\
-PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11
-< 4.14-pf9) do not implement sched_yield() call which may result in horrible
-performance problems with libomp. If you are using one of the specified
-kernel versions, you may want to disable the PDS scheduler."
-
- check_extra_config
- fi
-}
-
-pkg_pretend() {
- kernel_pds_check
-}
-
-pkg_setup() {
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- local libdir="$(get_libdir)"
- local mycmakeargs=(
- -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
-
- -DLIBOMP_USE_HWLOC=$(usex hwloc)
- -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
-
- -DOPENMP_ENABLE_LIBOMPTARGET=$(usex offload)
-
- # do not install libgomp.so & libiomp5.so aliases
- -DLIBOMP_INSTALL_ALIASES=OFF
- # disable unnecessary hack copying stuff back to srcdir
- -DLIBOMP_COPY_EXPORTS=OFF
- )
- use offload && mycmakeargs+=(
- # this is non-fatal and libomp checks for CUDA conditionally
- # to ABI, so we can just ignore passing the wrong value
- # on non-amd64 ABIs
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
- )
- use test && mycmakeargs+=(
- # this project does not use standard LLVM cmake macros
- -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
- -DOPENMP_LIT_ARGS="$(get_lit_flags)"
-
- -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
- -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
- )
- addpredict /dev/nvidiactl
- cmake_src_configure
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
-
- cmake_build check-libomp
-}
diff --git a/sys-libs/libomp/libomp-13.0.1.9999.ebuild b/sys-libs/libomp/libomp-15.0.7-r6.ebuild
index 81e776270450..ddef8e6ff939 100644
--- a/sys-libs/libomp/libomp-13.0.1.9999.ebuild
+++ b/sys-libs/libomp/libomp-15.0.7-r6.ebuild
@@ -1,24 +1,21 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib linux-info llvm llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{9..11} )
+inherit flag-o-matic cmake-multilib linux-info llvm llvm.org python-any-r1
DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
HOMEPAGE="https://openmp.llvm.org"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="cuda debug hwloc offload ompt test
- llvm_targets_AMDGPU llvm_targets_NVPTX"
-# CUDA works only with the x86_64 ABI
-REQUIRED_USE="
- cuda? ( llvm_targets_NVPTX )
- offload? ( cuda? ( abi_x86_64 ) )"
+SLOT="0/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
+IUSE="
+ debug hwloc offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX
+"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -27,14 +24,18 @@ RDEPEND="
virtual/libelf:=[${MULTILIB_USEDEP}]
dev-libs/libffi:=[${MULTILIB_USEDEP}]
~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}]
- cuda? ( dev-util/nvidia-cuda-toolkit:= )
- )"
+ llvm_targets_AMDGPU? ( dev-libs/rocr-runtime:= )
+ )
+"
# tests:
# - dev-python/lit provides the test runner
# - sys-devel/llvm provide test utils (e.g. FileCheck)
# - sys-devel/clang provides the compiler to run tests
-DEPEND="${RDEPEND}"
-BDEPEND="dev-lang/perl
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ dev-lang/perl
offload? (
llvm_targets_AMDGPU? ( sys-devel/clang )
llvm_targets_NVPTX? ( sys-devel/clang )
@@ -43,13 +44,15 @@ BDEPEND="dev-lang/perl
test? (
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
sys-devel/clang
- )"
+ )
+"
-LLVM_COMPONENTS=( openmp llvm/include )
+LLVM_COMPONENTS=( openmp cmake llvm/include )
+LLVM_PATCHSET=15.0.7-r6
llvm.org_set_globals
python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
}
kernel_pds_check() {
@@ -70,11 +73,14 @@ pkg_pretend() {
}
pkg_setup() {
- use offload && LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
+ use offload && LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
use test && python-any-r1_pkg_setup
}
multilib_src_configure() {
+ # LTO causes issues in other packages building, #870127
+ filter-lto
+
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
@@ -92,24 +98,21 @@ multilib_src_configure() {
# disable unnecessary hack copying stuff back to srcdir
-DLIBOMP_COPY_EXPORTS=OFF
)
- if use offload && has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
- mycmakeargs+=(
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
- -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU)
- -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX)
- # a cheap hack to force clang
- -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")"
- # upstream defaults to looking for it in clang dir
- # this fails when ccache is being used
- -DLIBOMPTARGET_NVPTX_BC_LINKER="$(type -P llvm-link)"
- )
- else
- mycmakeargs+=(
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
- -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF
- -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=OFF
- )
+
+ if use offload; then
+ if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=$(usex llvm_targets_NVPTX)
+ )
+ else
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=OFF
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF
+ )
+ fi
fi
+
use test && mycmakeargs+=(
# this project does not use standard LLVM cmake macros
-DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
diff --git a/sys-libs/libomp/libomp-13.0.1_rc3.ebuild b/sys-libs/libomp/libomp-16.0.6.ebuild
index 6447245880b8..82c6efffb251 100644
--- a/sys-libs/libomp/libomp-13.0.1_rc3.ebuild
+++ b/sys-libs/libomp/libomp-16.0.6.ebuild
@@ -1,58 +1,62 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib linux-info llvm llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{10..12} )
+inherit flag-o-matic cmake-multilib linux-info llvm llvm.org
+inherit python-single-r1 toolchain-funcs
DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
HOMEPAGE="https://openmp.llvm.org"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="cuda debug hwloc offload ompt test
- llvm_targets_AMDGPU llvm_targets_NVPTX"
-# CUDA works only with the x86_64 ABI
+SLOT="0/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
+IUSE="
+ debug gdb-plugin hwloc offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX
+"
REQUIRED_USE="
- cuda? ( llvm_targets_NVPTX )
- offload? ( cuda? ( abi_x86_64 ) )"
+ gdb-plugin? ( ${PYTHON_REQUIRED_USE} )
+"
RESTRICT="!test? ( test )"
RDEPEND="
+ gdb-plugin? ( ${PYTHON_DEPS} )
hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
offload? (
- virtual/libelf:=[${MULTILIB_USEDEP}]
dev-libs/libffi:=[${MULTILIB_USEDEP}]
~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}]
- cuda? ( dev-util/nvidia-cuda-toolkit:= )
- )"
+ llvm_targets_AMDGPU? ( dev-libs/rocr-runtime:= )
+ )
+"
# tests:
# - dev-python/lit provides the test runner
# - sys-devel/llvm provide test utils (e.g. FileCheck)
# - sys-devel/clang provides the compiler to run tests
-DEPEND="${RDEPEND}"
-BDEPEND="dev-lang/perl
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ dev-lang/perl
offload? (
llvm_targets_AMDGPU? ( sys-devel/clang )
llvm_targets_NVPTX? ( sys-devel/clang )
virtual/pkgconfig
)
test? (
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/lit[${PYTHON_USEDEP}]
+ ')
sys-devel/clang
- )"
+ )
+"
-LLVM_COMPONENTS=( openmp llvm/include )
-LLVM_PATCHSET=${PV/_/-}
+LLVM_COMPONENTS=( openmp cmake llvm/include )
llvm.org_set_globals
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
kernel_pds_check() {
if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
local CONFIG_CHECK="~!SCHED_PDS"
@@ -71,46 +75,62 @@ pkg_pretend() {
}
pkg_setup() {
- use offload && LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
- use test && python-any-r1_pkg_setup
+ use offload && LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ if use gdb-plugin || use test; then
+ python-single-r1_pkg_setup
+ fi
}
multilib_src_configure() {
+ # LTO causes issues in other packages building, #870127
+ filter-lto
+
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ local build_omptarget=OFF
+ # upstream disallows building libomptarget when sizeof(void*) != 8
+ if use offload &&
+ "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null \
+ <<-EOF &>/dev/null
+ int test[sizeof(void *) == 8 ? 1 : -1];
+ EOF
+ then
+ build_omptarget=ON
+ fi
+
local libdir="$(get_libdir)"
local mycmakeargs=(
-DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
-DLIBOMP_USE_HWLOC=$(usex hwloc)
+ -DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin)
-DLIBOMP_OMPT_SUPPORT=$(usex ompt)
- -DOPENMP_ENABLE_LIBOMPTARGET=$(usex offload)
+ -DOPENMP_ENABLE_LIBOMPTARGET=${build_omptarget}
# do not install libgomp.so & libiomp5.so aliases
-DLIBOMP_INSTALL_ALIASES=OFF
# disable unnecessary hack copying stuff back to srcdir
-DLIBOMP_COPY_EXPORTS=OFF
+ # prevent trying to access the GPU
+ -DLIBOMPTARGET_AMDGPU_ARCH=LIBOMPTARGET_AMDGPU_ARCH-NOTFOUND
)
- if use offload && has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
- mycmakeargs+=(
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
- -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU)
- -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX)
- # a cheap hack to force clang
- -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")"
- # upstream defaults to looking for it in clang dir
- # this fails when ccache is being used
- -DLIBOMPTARGET_NVPTX_BC_LINKER="$(type -P llvm-link)"
- )
- else
- mycmakeargs+=(
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
- -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF
- -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=OFF
- )
+
+ if [[ ${build_omptarget} == ON ]]; then
+ if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=$(usex llvm_targets_NVPTX)
+ )
+ else
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=OFF
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF
+ )
+ fi
fi
+
use test && mycmakeargs+=(
# this project does not use standard LLVM cmake macros
-DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
diff --git a/sys-libs/libomp/libomp-14.0.0.9999.ebuild b/sys-libs/libomp/libomp-17.0.6.ebuild
index 81e776270450..a2075dcce87c 100644
--- a/sys-libs/libomp/libomp-14.0.0.9999.ebuild
+++ b/sys-libs/libomp/libomp-17.0.6.ebuild
@@ -1,57 +1,62 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib linux-info llvm llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{10..12} )
+inherit flag-o-matic cmake-multilib linux-info llvm llvm.org
+inherit python-single-r1 toolchain-funcs
DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
HOMEPAGE="https://openmp.llvm.org"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="cuda debug hwloc offload ompt test
- llvm_targets_AMDGPU llvm_targets_NVPTX"
-# CUDA works only with the x86_64 ABI
+SLOT="0/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
+IUSE="
+ debug gdb-plugin hwloc offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX
+"
REQUIRED_USE="
- cuda? ( llvm_targets_NVPTX )
- offload? ( cuda? ( abi_x86_64 ) )"
+ gdb-plugin? ( ${PYTHON_REQUIRED_USE} )
+"
RESTRICT="!test? ( test )"
RDEPEND="
+ gdb-plugin? ( ${PYTHON_DEPS} )
hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
offload? (
- virtual/libelf:=[${MULTILIB_USEDEP}]
dev-libs/libffi:=[${MULTILIB_USEDEP}]
~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}]
- cuda? ( dev-util/nvidia-cuda-toolkit:= )
- )"
+ llvm_targets_AMDGPU? ( dev-libs/rocr-runtime:= )
+ )
+"
# tests:
# - dev-python/lit provides the test runner
# - sys-devel/llvm provide test utils (e.g. FileCheck)
# - sys-devel/clang provides the compiler to run tests
-DEPEND="${RDEPEND}"
-BDEPEND="dev-lang/perl
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ dev-lang/perl
offload? (
llvm_targets_AMDGPU? ( sys-devel/clang )
llvm_targets_NVPTX? ( sys-devel/clang )
virtual/pkgconfig
)
test? (
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/lit[${PYTHON_USEDEP}]
+ ')
sys-devel/clang
- )"
+ )
+"
-LLVM_COMPONENTS=( openmp llvm/include )
+LLVM_COMPONENTS=( openmp cmake llvm/include )
llvm.org_set_globals
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
kernel_pds_check() {
if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
local CONFIG_CHECK="~!SCHED_PDS"
@@ -70,46 +75,64 @@ pkg_pretend() {
}
pkg_setup() {
- use offload && LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
- use test && python-any-r1_pkg_setup
+ use offload && LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ if use gdb-plugin || use test; then
+ python-single-r1_pkg_setup
+ fi
}
multilib_src_configure() {
+ # LTO causes issues in other packages building, #870127
+ filter-lto
+
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ local build_omptarget=OFF
+ # upstream disallows building libomptarget when sizeof(void*) != 8
+ if use offload &&
+ "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null \
+ <<-EOF &>/dev/null
+ int test[sizeof(void *) == 8 ? 1 : -1];
+ EOF
+ then
+ build_omptarget=ON
+ fi
+
local libdir="$(get_libdir)"
local mycmakeargs=(
-DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
-DLIBOMP_USE_HWLOC=$(usex hwloc)
+ -DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin)
-DLIBOMP_OMPT_SUPPORT=$(usex ompt)
- -DOPENMP_ENABLE_LIBOMPTARGET=$(usex offload)
+ -DOPENMP_ENABLE_LIBOMPTARGET=${build_omptarget}
# do not install libgomp.so & libiomp5.so aliases
-DLIBOMP_INSTALL_ALIASES=OFF
# disable unnecessary hack copying stuff back to srcdir
-DLIBOMP_COPY_EXPORTS=OFF
)
- if use offload && has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
- mycmakeargs+=(
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
- -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU)
- -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX)
- # a cheap hack to force clang
- -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")"
- # upstream defaults to looking for it in clang dir
- # this fails when ccache is being used
- -DLIBOMPTARGET_NVPTX_BC_LINKER="$(type -P llvm-link)"
- )
- else
- mycmakeargs+=(
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
- -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF
- -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=OFF
- )
+
+ if [[ ${build_omptarget} == ON ]]; then
+ if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=$(usex llvm_targets_NVPTX)
+
+ # prevent trying to access the GPU
+ -DLIBOMPTARGET_AMDGPU_ARCH=LIBOMPTARGET_AMDGPU_ARCH-NOTFOUND
+ -DLIBOMPTARGET_NVPTX_ARCH=LIBOMPTARGET_NVPTX_ARCH-NOTFOUND
+ )
+ else
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=OFF
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF
+ )
+ fi
fi
+
use test && mycmakeargs+=(
# this project does not use standard LLVM cmake macros
-DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
diff --git a/sys-libs/libomp/libomp-18.1.4.ebuild b/sys-libs/libomp/libomp-18.1.4.ebuild
new file mode 100644
index 000000000000..5f6fa687234c
--- /dev/null
+++ b/sys-libs/libomp/libomp-18.1.4.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit flag-o-matic cmake-multilib linux-info llvm.org llvm-utils
+inherit python-single-r1 toolchain-funcs
+
+DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
+HOMEPAGE="https://openmp.llvm.org"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0/${LLVM_SOABI}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos"
+IUSE="
+ debug gdb-plugin hwloc offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX
+"
+REQUIRED_USE="
+ gdb-plugin? ( ${PYTHON_REQUIRED_USE} )
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ gdb-plugin? ( ${PYTHON_DEPS} )
+ hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
+ offload? (
+ dev-libs/libffi:=[${MULTILIB_USEDEP}]
+ ~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}]
+ llvm_targets_AMDGPU? ( dev-libs/rocr-runtime:= )
+ )
+"
+# tests:
+# - dev-python/lit provides the test runner
+# - sys-devel/llvm provide test utils (e.g. FileCheck)
+# - sys-devel/clang provides the compiler to run tests
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ dev-lang/perl
+ offload? (
+ llvm_targets_AMDGPU? ( sys-devel/clang )
+ llvm_targets_NVPTX? ( sys-devel/clang )
+ virtual/pkgconfig
+ )
+ test? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/lit[${PYTHON_USEDEP}]
+ ')
+ sys-devel/clang
+ )
+"
+
+LLVM_COMPONENTS=( openmp cmake llvm/include )
+llvm.org_set_globals
+
+kernel_pds_check() {
+ if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
+ local CONFIG_CHECK="~!SCHED_PDS"
+ local ERROR_SCHED_PDS="\
+PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11
+< 4.14-pf9) do not implement sched_yield() call which may result in horrible
+performance problems with libomp. If you are using one of the specified
+kernel versions, you may want to disable the PDS scheduler."
+
+ check_extra_config
+ fi
+}
+
+pkg_pretend() {
+ kernel_pds_check
+}
+
+pkg_setup() {
+ if use gdb-plugin || use test; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+multilib_src_configure() {
+ use offload && llvm_prepend_path "${LLVM_MAJOR}"
+
+ # LTO causes issues in other packages building, #870127
+ filter-lto
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ local build_omptarget=OFF
+ # upstream disallows building libomptarget when sizeof(void*) != 8
+ if use offload &&
+ "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null \
+ <<-EOF &>/dev/null
+ int test[sizeof(void *) == 8 ? 1 : -1];
+ EOF
+ then
+ build_omptarget=ON
+ fi
+
+ local libdir="$(get_libdir)"
+ local mycmakeargs=(
+ -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
+
+ -DLIBOMP_USE_HWLOC=$(usex hwloc)
+ -DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin)
+ -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
+
+ -DOPENMP_ENABLE_LIBOMPTARGET=${build_omptarget}
+
+ # do not install libgomp.so & libiomp5.so aliases
+ -DLIBOMP_INSTALL_ALIASES=OFF
+ # disable unnecessary hack copying stuff back to srcdir
+ -DLIBOMP_COPY_EXPORTS=OFF
+ )
+
+ if [[ ${build_omptarget} == ON ]]; then
+ local ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
+ local ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
+ mycmakeargs+=(
+ -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
+ -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
+ )
+
+ if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=$(usex llvm_targets_NVPTX)
+
+ # prevent trying to access the GPU
+ -DLIBOMPTARGET_AMDGPU_ARCH=LIBOMPTARGET_AMDGPU_ARCH-NOTFOUND
+ -DLIBOMPTARGET_NVPTX_ARCH=LIBOMPTARGET_NVPTX_ARCH-NOTFOUND
+ )
+ else
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=OFF
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF
+ )
+ fi
+ fi
+
+ use test && mycmakeargs+=(
+ # this project does not use standard LLVM cmake macros
+ -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
+ -DOPENMP_LIT_ARGS="$(get_lit_flags)"
+
+ -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
+ -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
+ )
+ addpredict /dev/nvidiactl
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake_build check-libomp
+}
diff --git a/sys-libs/libomp/libomp-13.0.0-r2.ebuild b/sys-libs/libomp/libomp-19.0.0.9999.ebuild
index 725187193ff6..a40d0aed1c41 100644
--- a/sys-libs/libomp/libomp-13.0.0-r2.ebuild
+++ b/sys-libs/libomp/libomp-19.0.0.9999.ebuild
@@ -1,58 +1,61 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib linux-info llvm llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{10..12} )
+inherit flag-o-matic cmake-multilib linux-info llvm.org llvm-utils
+inherit python-single-r1 toolchain-funcs
DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
HOMEPAGE="https://openmp.llvm.org"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
-IUSE="cuda debug hwloc offload ompt test
- llvm_targets_AMDGPU llvm_targets_NVPTX"
-# CUDA works only with the x86_64 ABI
+SLOT="0/${LLVM_SOABI}"
+IUSE="
+ +debug gdb-plugin hwloc offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX
+"
REQUIRED_USE="
- cuda? ( llvm_targets_NVPTX )
- offload? ( cuda? ( abi_x86_64 ) )"
+ gdb-plugin? ( ${PYTHON_REQUIRED_USE} )
+"
RESTRICT="!test? ( test )"
RDEPEND="
+ gdb-plugin? ( ${PYTHON_DEPS} )
hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
offload? (
- virtual/libelf:=[${MULTILIB_USEDEP}]
dev-libs/libffi:=[${MULTILIB_USEDEP}]
~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}]
- cuda? ( dev-util/nvidia-cuda-toolkit:= )
- )"
+ llvm_targets_AMDGPU? ( dev-libs/rocr-runtime:= )
+ )
+"
# tests:
# - dev-python/lit provides the test runner
# - sys-devel/llvm provide test utils (e.g. FileCheck)
# - sys-devel/clang provides the compiler to run tests
-DEPEND="${RDEPEND}"
-BDEPEND="dev-lang/perl
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ dev-lang/perl
offload? (
llvm_targets_AMDGPU? ( sys-devel/clang )
llvm_targets_NVPTX? ( sys-devel/clang )
virtual/pkgconfig
)
test? (
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/lit[${PYTHON_USEDEP}]
+ ')
sys-devel/clang
- )"
+ )
+"
-LLVM_COMPONENTS=( openmp llvm/include )
-LLVM_PATCHSET=${PV/_/-}-r2
+LLVM_COMPONENTS=( openmp cmake llvm/include )
llvm.org_set_globals
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
kernel_pds_check() {
if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
local CONFIG_CHECK="~!SCHED_PDS"
@@ -71,46 +74,72 @@ pkg_pretend() {
}
pkg_setup() {
- use offload && LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
- use test && python-any-r1_pkg_setup
+ if use gdb-plugin || use test; then
+ python-single-r1_pkg_setup
+ fi
}
multilib_src_configure() {
+ use offload && llvm_prepend_path "${LLVM_MAJOR}"
+
+ # LTO causes issues in other packages building, #870127
+ filter-lto
+
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ local build_omptarget=OFF
+ # upstream disallows building libomptarget when sizeof(void*) != 8
+ if use offload &&
+ "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null \
+ <<-EOF &>/dev/null
+ int test[sizeof(void *) == 8 ? 1 : -1];
+ EOF
+ then
+ build_omptarget=ON
+ fi
+
local libdir="$(get_libdir)"
local mycmakeargs=(
-DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
-DLIBOMP_USE_HWLOC=$(usex hwloc)
+ -DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin)
-DLIBOMP_OMPT_SUPPORT=$(usex ompt)
- -DOPENMP_ENABLE_LIBOMPTARGET=$(usex offload)
+ -DOPENMP_ENABLE_LIBOMPTARGET=${build_omptarget}
# do not install libgomp.so & libiomp5.so aliases
-DLIBOMP_INSTALL_ALIASES=OFF
# disable unnecessary hack copying stuff back to srcdir
-DLIBOMP_COPY_EXPORTS=OFF
)
- if use offload && has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
- mycmakeargs+=(
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
- -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU)
- -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX)
- # a cheap hack to force clang
- -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")"
- # upstream defaults to looking for it in clang dir
- # this fails when ccache is being used
- -DLIBOMPTARGET_NVPTX_BC_LINKER="$(type -P llvm-link)"
- )
- else
+
+ if [[ ${build_omptarget} == ON ]]; then
+ local ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
+ local ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
mycmakeargs+=(
- -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
- -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF
- -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=OFF
+ -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
+ -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
)
+
+ if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=$(usex llvm_targets_NVPTX)
+
+ # prevent trying to access the GPU
+ -DLIBOMPTARGET_AMDGPU_ARCH=LIBOMPTARGET_AMDGPU_ARCH-NOTFOUND
+ -DLIBOMPTARGET_NVPTX_ARCH=LIBOMPTARGET_NVPTX_ARCH-NOTFOUND
+ )
+ else
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=OFF
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF
+ )
+ fi
fi
+
use test && mycmakeargs+=(
# this project does not use standard LLVM cmake macros
-DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
diff --git a/sys-libs/libomp/libomp-19.0.0_pre20240410.ebuild b/sys-libs/libomp/libomp-19.0.0_pre20240410.ebuild
new file mode 100644
index 000000000000..a40d0aed1c41
--- /dev/null
+++ b/sys-libs/libomp/libomp-19.0.0_pre20240410.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit flag-o-matic cmake-multilib linux-info llvm.org llvm-utils
+inherit python-single-r1 toolchain-funcs
+
+DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
+HOMEPAGE="https://openmp.llvm.org"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0/${LLVM_SOABI}"
+IUSE="
+ +debug gdb-plugin hwloc offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX
+"
+REQUIRED_USE="
+ gdb-plugin? ( ${PYTHON_REQUIRED_USE} )
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ gdb-plugin? ( ${PYTHON_DEPS} )
+ hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
+ offload? (
+ dev-libs/libffi:=[${MULTILIB_USEDEP}]
+ ~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}]
+ llvm_targets_AMDGPU? ( dev-libs/rocr-runtime:= )
+ )
+"
+# tests:
+# - dev-python/lit provides the test runner
+# - sys-devel/llvm provide test utils (e.g. FileCheck)
+# - sys-devel/clang provides the compiler to run tests
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ dev-lang/perl
+ offload? (
+ llvm_targets_AMDGPU? ( sys-devel/clang )
+ llvm_targets_NVPTX? ( sys-devel/clang )
+ virtual/pkgconfig
+ )
+ test? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/lit[${PYTHON_USEDEP}]
+ ')
+ sys-devel/clang
+ )
+"
+
+LLVM_COMPONENTS=( openmp cmake llvm/include )
+llvm.org_set_globals
+
+kernel_pds_check() {
+ if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
+ local CONFIG_CHECK="~!SCHED_PDS"
+ local ERROR_SCHED_PDS="\
+PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11
+< 4.14-pf9) do not implement sched_yield() call which may result in horrible
+performance problems with libomp. If you are using one of the specified
+kernel versions, you may want to disable the PDS scheduler."
+
+ check_extra_config
+ fi
+}
+
+pkg_pretend() {
+ kernel_pds_check
+}
+
+pkg_setup() {
+ if use gdb-plugin || use test; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+multilib_src_configure() {
+ use offload && llvm_prepend_path "${LLVM_MAJOR}"
+
+ # LTO causes issues in other packages building, #870127
+ filter-lto
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ local build_omptarget=OFF
+ # upstream disallows building libomptarget when sizeof(void*) != 8
+ if use offload &&
+ "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null \
+ <<-EOF &>/dev/null
+ int test[sizeof(void *) == 8 ? 1 : -1];
+ EOF
+ then
+ build_omptarget=ON
+ fi
+
+ local libdir="$(get_libdir)"
+ local mycmakeargs=(
+ -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
+
+ -DLIBOMP_USE_HWLOC=$(usex hwloc)
+ -DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin)
+ -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
+
+ -DOPENMP_ENABLE_LIBOMPTARGET=${build_omptarget}
+
+ # do not install libgomp.so & libiomp5.so aliases
+ -DLIBOMP_INSTALL_ALIASES=OFF
+ # disable unnecessary hack copying stuff back to srcdir
+ -DLIBOMP_COPY_EXPORTS=OFF
+ )
+
+ if [[ ${build_omptarget} == ON ]]; then
+ local ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
+ local ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
+ mycmakeargs+=(
+ -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
+ -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
+ )
+
+ if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=$(usex llvm_targets_NVPTX)
+
+ # prevent trying to access the GPU
+ -DLIBOMPTARGET_AMDGPU_ARCH=LIBOMPTARGET_AMDGPU_ARCH-NOTFOUND
+ -DLIBOMPTARGET_NVPTX_ARCH=LIBOMPTARGET_NVPTX_ARCH-NOTFOUND
+ )
+ else
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=OFF
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF
+ )
+ fi
+ fi
+
+ use test && mycmakeargs+=(
+ # this project does not use standard LLVM cmake macros
+ -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
+ -DOPENMP_LIT_ARGS="$(get_lit_flags)"
+
+ -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
+ -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
+ )
+ addpredict /dev/nvidiactl
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake_build check-libomp
+}
diff --git a/sys-libs/libomp/libomp-19.0.0_pre20240420.ebuild b/sys-libs/libomp/libomp-19.0.0_pre20240420.ebuild
new file mode 100644
index 000000000000..a40d0aed1c41
--- /dev/null
+++ b/sys-libs/libomp/libomp-19.0.0_pre20240420.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit flag-o-matic cmake-multilib linux-info llvm.org llvm-utils
+inherit python-single-r1 toolchain-funcs
+
+DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
+HOMEPAGE="https://openmp.llvm.org"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0/${LLVM_SOABI}"
+IUSE="
+ +debug gdb-plugin hwloc offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX
+"
+REQUIRED_USE="
+ gdb-plugin? ( ${PYTHON_REQUIRED_USE} )
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ gdb-plugin? ( ${PYTHON_DEPS} )
+ hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
+ offload? (
+ dev-libs/libffi:=[${MULTILIB_USEDEP}]
+ ~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}]
+ llvm_targets_AMDGPU? ( dev-libs/rocr-runtime:= )
+ )
+"
+# tests:
+# - dev-python/lit provides the test runner
+# - sys-devel/llvm provide test utils (e.g. FileCheck)
+# - sys-devel/clang provides the compiler to run tests
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ dev-lang/perl
+ offload? (
+ llvm_targets_AMDGPU? ( sys-devel/clang )
+ llvm_targets_NVPTX? ( sys-devel/clang )
+ virtual/pkgconfig
+ )
+ test? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/lit[${PYTHON_USEDEP}]
+ ')
+ sys-devel/clang
+ )
+"
+
+LLVM_COMPONENTS=( openmp cmake llvm/include )
+llvm.org_set_globals
+
+kernel_pds_check() {
+ if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
+ local CONFIG_CHECK="~!SCHED_PDS"
+ local ERROR_SCHED_PDS="\
+PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11
+< 4.14-pf9) do not implement sched_yield() call which may result in horrible
+performance problems with libomp. If you are using one of the specified
+kernel versions, you may want to disable the PDS scheduler."
+
+ check_extra_config
+ fi
+}
+
+pkg_pretend() {
+ kernel_pds_check
+}
+
+pkg_setup() {
+ if use gdb-plugin || use test; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+multilib_src_configure() {
+ use offload && llvm_prepend_path "${LLVM_MAJOR}"
+
+ # LTO causes issues in other packages building, #870127
+ filter-lto
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ local build_omptarget=OFF
+ # upstream disallows building libomptarget when sizeof(void*) != 8
+ if use offload &&
+ "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null \
+ <<-EOF &>/dev/null
+ int test[sizeof(void *) == 8 ? 1 : -1];
+ EOF
+ then
+ build_omptarget=ON
+ fi
+
+ local libdir="$(get_libdir)"
+ local mycmakeargs=(
+ -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
+
+ -DLIBOMP_USE_HWLOC=$(usex hwloc)
+ -DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin)
+ -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
+
+ -DOPENMP_ENABLE_LIBOMPTARGET=${build_omptarget}
+
+ # do not install libgomp.so & libiomp5.so aliases
+ -DLIBOMP_INSTALL_ALIASES=OFF
+ # disable unnecessary hack copying stuff back to srcdir
+ -DLIBOMP_COPY_EXPORTS=OFF
+ )
+
+ if [[ ${build_omptarget} == ON ]]; then
+ local ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
+ local ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
+ mycmakeargs+=(
+ -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
+ -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
+ )
+
+ if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=$(usex llvm_targets_NVPTX)
+
+ # prevent trying to access the GPU
+ -DLIBOMPTARGET_AMDGPU_ARCH=LIBOMPTARGET_AMDGPU_ARCH-NOTFOUND
+ -DLIBOMPTARGET_NVPTX_ARCH=LIBOMPTARGET_NVPTX_ARCH-NOTFOUND
+ )
+ else
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=OFF
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF
+ )
+ fi
+ fi
+
+ use test && mycmakeargs+=(
+ # this project does not use standard LLVM cmake macros
+ -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
+ -DOPENMP_LIT_ARGS="$(get_lit_flags)"
+
+ -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
+ -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
+ )
+ addpredict /dev/nvidiactl
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake_build check-libomp
+}
diff --git a/sys-libs/libomp/metadata.xml b/sys-libs/libomp/metadata.xml
index bb2d1e2ed416..ba8a5232a5a8 100644
--- a/sys-libs/libomp/metadata.xml
+++ b/sys-libs/libomp/metadata.xml
@@ -9,10 +9,13 @@
<email>llvm@gentoo.org</email>
</maintainer>
<use>
- <flag name="cuda">Build CUDA offloading plugin (only with USE=offload)</flag>
+ <flag name="gdb-plugin">Build OMPD GDB plugin</flag>
<flag name="hwloc">Enable CPU affinity support via hwloc</flag>
<flag name="offload">Support offloading OpenMP using libomptarget</flag>
<flag name="ompt">Enable OpenMP Tools Interface support</flag>
</use>
<longdescription>The OpenMP subproject of LLVM is intended to contain all of the components required to build an executing OpenMP program that are outside the compiler itself.</longdescription>
+ <upstream>
+ <remote-id type="github">llvm/llvm-project</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/libosinfo/Manifest b/sys-libs/libosinfo/Manifest
index fa3169fc5486..5800717815ea 100644
--- a/sys-libs/libosinfo/Manifest
+++ b/sys-libs/libosinfo/Manifest
@@ -1 +1,2 @@
-DIST libosinfo-1.9.0.tar.xz 279376 BLAKE2B 9f231f022d80e96fc9b031ff8f16ea1e432e5e3ce079e384ad123043b89dd5e47ae119aec3052c8926965bf30c49b150f0ee727fb3b0e0391d393b1031aabeab SHA512 2e62e69f4353eb935734f091caa4cc4e3dce74020a93b684807470f068da73e8ecb7f4af0623b6d3053ecff3a34c6709a783dec3d25a56dc69f0e7ff9041cf26
+DIST libosinfo-1.10.0.tar.xz 293804 BLAKE2B 5c676a466459c4e4150294fd263cd32ed95f181a3dea913977165f61dd81d75fb545dd96d0f87661ea13db9f10706c064421a5ecf0ec1b220054149c66c957d1 SHA512 58a30d62d5a4862150826fd9fda3d5189df3693efca3a8732efaa470fa65dbb64181987534ccc13c0bf2fd4efda229217a169590405f0601927472f6ca08e4e7
+DIST libosinfo-1.11.0.tar.xz 303944 BLAKE2B 3d61d66c6ef7a9e2706a1a5dd17d8ceff4538a8ff5988eb81509cbd81673dd193b3685092842d7dbb37e6f92c7ed1f915fcf71cf5db5cad8482f230b3ce066ac SHA512 d1b527cc50eaa92e143f068d9a484a1e591dafb77e65e0172e43d6d6440970c5c3b4e2d65050fd0d64f39d1163d49b339ae6d75943306917b4b367c26a938fb6
diff --git a/sys-libs/libosinfo/files/1.10.0-build-Add-option-to-disable-libsoup3.patch b/sys-libs/libosinfo/files/1.10.0-build-Add-option-to-disable-libsoup3.patch
new file mode 100644
index 000000000000..a2b13067679e
--- /dev/null
+++ b/sys-libs/libosinfo/files/1.10.0-build-Add-option-to-disable-libsoup3.patch
@@ -0,0 +1,50 @@
+https://gitlab.com/libosinfo/libosinfo/-/merge_requests/134
+
+From 7148e47e84199d5ffeb695bcf064400b7fa0da77 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 15 Feb 2022 12:22:00 -0800
+Subject: [PATCH] build: Add option to disable libsoup3
+
+... and fall back to libsoup2 if disabled. This allows distributions
+that ship both versions to choose which version of libsoup will be
+linked.
+
+Signed-off-by: Matt Turner <mattst88@gmail.com>
+---
+ meson.build | 2 +-
+ meson_options.txt | 6 ++++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index a664402..4f1d2df 100644
+--- a/meson.build
++++ b/meson.build
+@@ -71,7 +71,7 @@ gio_dep = dependency('gio-2.0', version: glib_version_info)
+ gobject_dep = dependency('gobject-2.0', version: glib_version_info)
+
+ # everything else
+-libsoup_dep = dependency('libsoup-3.0', required: false)
++libsoup_dep = dependency('libsoup-3.0', required: get_option('libsoup3'))
+ # fallback to libsoup2
+ if not libsoup_dep.found()
+ libsoup_dep = dependency('libsoup-2.4')
+diff --git a/meson_options.txt b/meson_options.txt
+index 13fc358..2084677 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -24,6 +24,12 @@ option('enable-vala',
+ description: 'Enable Vala bindings'
+ )
+
++option('libsoup3',
++ type: 'feature',
++ value: 'enabled',
++ description: 'Whether to enable libsoup3'
++)
++
+ option('with-pci-ids-path',
+ type: 'string',
+ value: '',
+--
+2.34.1
+
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
new file mode 100644
index 000000000000..ea05c46a03b0
--- /dev/null
+++ b/sys-libs/libosinfo/files/1.11.0-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch
@@ -0,0 +1,32 @@
+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/libosinfo-1.10.0-r1.ebuild b/sys-libs/libosinfo/libosinfo-1.10.0-r1.ebuild
new file mode 100644
index 000000000000..49f731a52713
--- /dev/null
+++ b/sys-libs/libosinfo/libosinfo-1.10.0-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2024 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 ~ia64 ~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.56:= )
+"
+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}-build-Add-option-to-disable-libsoup3.patch
+ "${FILESDIR}"/1.11.0-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)
+ -Dlibsoup3=enabled
+ -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.9.0-r1.ebuild b/sys-libs/libosinfo/libosinfo-1.11.0.ebuild
index 018a2bb3d169..d09dfbd5915b 100644
--- a/sys-libs/libosinfo/libosinfo-1.9.0-r1.ebuild
+++ b/sys-libs/libosinfo/libosinfo-1.11.0.ebuild
@@ -1,10 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-VALA_USE_DEPEND="vapigen"
+EAPI=8
-inherit meson udev vala xdg
+inherit meson vala xdg
DESCRIPTION="GObject library for managing information about real and virtual OSes"
HOMEPAGE="https://libosinfo.org/"
@@ -17,12 +16,12 @@ IUSE="gtk-doc +introspection +vala test"
RESTRICT="!test? ( test )"
REQUIRED_USE="vala? ( introspection )"
-KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc x86"
+KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~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:2.4
+ net-libs/libsoup:3.0
>=dev-libs/libxml2-2.6.0
>=dev-libs/libxslt-1.0.0
sys-apps/hwdata
@@ -35,16 +34,23 @@ DEPEND="${RDEPEND}"
BDEPEND="
dev-lang/perl
dev-util/glib-utils
- gtk-doc? ( >=dev-util/gtk-doc-1.10
- app-text/docbook-xml-dtd:4.3 )
+ 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() {
- xdg_src_prepare
- use vala && vala_src_prepare
+ default
+ use vala && vala_setup
+ xdg_environment_reset
}
src_configure() {
@@ -53,6 +59,7 @@ src_configure() {
$(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
)
diff --git a/sys-libs/libosinfo/metadata.xml b/sys-libs/libosinfo/metadata.xml
index 7b343b06be8a..10983b30d1b7 100644
--- a/sys-libs/libosinfo/metadata.xml
+++ b/sys-libs/libosinfo/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>gnome@gentoo.org</email>
- <name>Gentoo GNOME Desktop</name>
-</maintainer>
+ <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/libraw1394-2.1.2-r1.ebuild b/sys-libs/libraw1394/libraw1394-2.1.2-r1.ebuild
index d541d4e9d30f..5c243f9092d2 100644
--- a/sys-libs/libraw1394/libraw1394-2.1.2-r1.ebuild
+++ b/sys-libs/libraw1394/libraw1394-2.1.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -11,11 +11,15 @@ 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 ~ia64 ppc ppc64 ~riscv sparc x86"
-IUSE=""
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
+IUSE="valgrind"
+
+DEPEND="valgrind? ( dev-debug/valgrind )"
multilib_src_configure() {
- ECONF_SOURCE="${S}" econf --disable-static
+ ECONF_SOURCE="${S}" econf \
+ --disable-static \
+ $(use_with valgrind)
}
multilib_src_install_all() {
diff --git a/sys-libs/librtas/Manifest b/sys-libs/librtas/Manifest
index 696537d43241..d47a6a52926a 100644
--- a/sys-libs/librtas/Manifest
+++ b/sys-libs/librtas/Manifest
@@ -1 +1,2 @@
DIST librtas-2.0.2.tar.gz 91627 BLAKE2B 1455af1af4a932fb81815ba67d1d1d8eeb0866bcf49fdcced622c1982121b5bb3ddeaf78f121a6540ec6c60d641991a87342713478a5be5232128db35d272059 SHA512 112d355bc486657289a186d9f1b8c576af55422f1527259a0cd680c07d6fa787aef2dc0cb6322721dc4aa1c5bd1de669f5c4d05e6a07de65262e9e3d4d0283c7
+DIST librtas-2.0.3.tar.gz 95483 BLAKE2B 38ce5c3924dfdb18f3a9a6e309a0ba093468b12e05b38dd81525b59ddd5afda65da3c46b7b48c1e8aaa1dc0afc6cb1eaf7d930e6e27bb1a06005a7f24620a9cd SHA512 3ff59007ad6fc893d226ae9413b57b8b478a214a824f60c2af58a65c0a3cefecc0d19bb4c791b677a0d5c1d7da9646d66f48d0e0446768092ef7afd6e4baff34
diff --git a/sys-libs/librtas/librtas-2.0.3.ebuild b/sys-libs/librtas/librtas-2.0.3.ebuild
new file mode 100644
index 000000000000..0e6e2879eed3
--- /dev/null
+++ b/sys-libs/librtas/librtas-2.0.3.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2023 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 ~ppc64-linux"
+IUSE="static-libs"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ 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/metadata.xml b/sys-libs/librtas/metadata.xml
index 1b9f0ccdccee..b93ca6387bf1 100644
--- a/sys-libs/librtas/metadata.xml
+++ b/sys-libs/librtas/metadata.xml
@@ -3,9 +3,11 @@
<pkgmetadata>
<maintainer type="project">
<email>ppc@gentoo.org</email>
- <name>Gentoo Linux PowerPC Development</name>
+ <name>PowerPC architecture team</name>
</maintainer>
<upstream>
- <remote-id type="sourceforge">librtas</remote-id>
+ <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
index e405158403da..4140907f66f9 100644
--- a/sys-libs/libseccomp/Manifest
+++ b/sys-libs/libseccomp/Manifest
@@ -1,3 +1,3 @@
-DIST libseccomp-2.5.1.tar.gz 638811 BLAKE2B 683ae7536c0cba36f4d30640b42361171fc34b7cb04985ea56e64369df29c440361a0205385b14580cc0e481e0f9ffd0b0e8ebd4ac98817ed59298db6b274c35 SHA512 2be80a6323f9282dbeae8791724e5778b32e2382b2a3d1b0f77366371ec4072ea28128204f675cce101c091c0420d12c497e1a9ccbb7dc5bcbf61bfd777160af
-DIST libseccomp-2.5.2.tar.gz 640305 BLAKE2B b61214cb9a9a793d1f04ae1de3f62c578cfaec54fcc355947b4c71efb75072bf60497db8c8a0fd34a46764952349027df3f025ddbd276d58be93209170950e89 SHA512 b2a95152cb274d6b35753596fd825406dae20c4a48b2f4076f835f977ecf324de38a3fe02e789dc20b49ecf6b4eb67f03e7733e92d40f5e20f25874307f1c2ac
-DIST libseccomp-2.5.3.tar.gz 637572 BLAKE2B cedf04b3a926f9fe5202e6169ddac6b983e755009c14fc1d645157b9c0bcdf65d4085f8ea7abad90f3a0c13ae4d66b5d8306e725168490863aad15976de1eae7 SHA512 00170fe2360f0c0b33293dccfcc33e98fabb99619f34ecefbcc92bfdaa249ba91e7433226545b842b71542a3b224b6e980ea2ae656c4addf07e84a0def1870a0
+DIST libseccomp-2.5.5-loongarch-r1.patch 119822 BLAKE2B 4aa75c1ac87b2ca25cf6be38dfd760879c7255ca8e6cf86be3ac6e354f76cdaf3c8e2f59b646254414ffb0f1ffe6b7c50478f4db895a6ce632db8782c9807e91 SHA512 f7cd768d672a25448b2a3ceda27db52e0d62b5d9ab3eeb906226b6ebc19332c89332e0b870aaf82d4ffcfd642c2deb6029a30ae9a6bd702ebad9fdd40622b582
+DIST libseccomp-2.5.5-loongarch64-20231204.patch.xz 41236 BLAKE2B 7831b28c275771bb675b4b5045e657d96c254e69cee7188a19f4812bc83343e0041772c20be1e7392ec88387726b49f34aa670a906b922dba531a0d35e548b1e SHA512 7870e536d834360dfec446493815b675a305f6bec1b79d0caae6fb546d2f694e77ce52e547bbcdb22cda272272bf3d5a427960b4aa76fb987d06ab035298007d
+DIST libseccomp-2.5.5.tar.gz 642445 BLAKE2B d770cee1f3e02fbbcd9f25655b360ab38160ad800e2829a67f2b9da62b095a90be99ac851a67344cf95bd6810a6268da4655dc1d37d996e58239c4999eb41998 SHA512 f630e7a7e53a21b7ccb4d3e7b37616b89aeceba916677c8e3032830411d77a14c2d74dcf594cd193b1acc11f52595072e28316dc44300e54083d5d7b314a38da
diff --git a/sys-libs/libseccomp/files/libseccomp-2.5.5-arch-syscall-check.patch b/sys-libs/libseccomp/files/libseccomp-2.5.5-arch-syscall-check.patch
new file mode 100644
index 000000000000..238098ad4c9e
--- /dev/null
+++ b/sys-libs/libseccomp/files/libseccomp-2.5.5-arch-syscall-check.patch
@@ -0,0 +1,45 @@
+From 744c9a897b74ad66d065791593e25a05e4b6f6a1 Mon Sep 17 00:00:00 2001
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Tue, 1 Nov 2022 11:59:51 +0100
+Subject: [PATCH] src: Make arch-syscall-check work in VPATH build
+
+The aim of arch-syscall-check test is to check for syscalls
+missing implementation. It does so by comparing two files:
+
+ 1) src/syscalls.csv
+ 2) include/seccomp-syscalls.h
+
+However, due to use of relative paths these files are not found
+when doing a VPATH build. But, we can re-use an idea from GNU
+coreutils and get an absolute path to the source dir. All that's
+needed then is to prefix those two paths with the source dir
+path.
+
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
+Signed-off-by: Paul Moore <paul@paul-moore.com>
+---
+ src/arch-syscall-check | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/arch-syscall-check b/src/arch-syscall-check
+index ae67daa..9c7fd41 100755
+--- a/src/arch-syscall-check
++++ b/src/arch-syscall-check
+@@ -22,8 +22,11 @@
+ # along with this library; if not, see <http://www.gnu.org/licenses>.
+ #
+
+-SYSCALL_CSV="./syscalls.csv"
+-SYSCALL_HDR="../include/seccomp-syscalls.h"
++# Based on an idea from GNU coreutils
++abs_topsrcdir="$(unset CDPATH; cd $(dirname $0)/.. && pwd)"
++
++SYSCALL_CSV="$abs_topsrcdir/src/syscalls.csv"
++SYSCALL_HDR="$abs_topsrcdir/include/seccomp-syscalls.h"
+
+ function check_snr() {
+ (export LC_ALL=C; diff \
+--
+2.44.0
+
diff --git a/sys-libs/libseccomp/files/libseccomp-2.5.5-which-hunt.patch b/sys-libs/libseccomp/files/libseccomp-2.5.5-which-hunt.patch
new file mode 100644
index 000000000000..90dc25bf4e7c
--- /dev/null
+++ b/sys-libs/libseccomp/files/libseccomp-2.5.5-which-hunt.patch
@@ -0,0 +1,69 @@
+https://github.com/seccomp/libseccomp/pull/424
+
+From 865adeed17cac7063cbbce0c5df225aa35c83621 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 16 Dec 2023 02:17:36 +0000
+Subject: [PATCH] tests: avoid use of non-portable `which`
+
+which is not a standard POSIX utility, and indeed, each of these test scripts
+uses #!/bin/bash as its shebang, so we can use `type -P` which has the same
+behaviour as `which` for free.
+
+(If the tests used POSIX shell, we could do `command -v`, its only caveat is
+that it'll pick up functions in the user's shell, which doesn't matter 99% of
+the time anyway.)
+
+Distributions like Debian [0] and Gentoo [1] are looking to remove `which`
+from their base set of packages.
+
+[0] https://lwn.net/Articles/874049/
+[1] https://bugs.gentoo.org/646588
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/tests/38-basic-pfc_coverage.sh
++++ b/tests/38-basic-pfc_coverage.sh
+@@ -18,7 +18,7 @@
+ #
+ function check_deps() {
+ [[ -z "$1" ]] && return
+- which "$1" >& /dev/null
++ type -P "$1" >& /dev/null
+ return $?
+ }
+
+--- a/tests/55-basic-pfc_binary_tree.sh
++++ b/tests/55-basic-pfc_binary_tree.sh
+@@ -18,7 +18,7 @@
+ #
+ function check_deps() {
+ [[ -z "$1" ]] && return
+- which "$1" >& /dev/null
++ type -P "$1" >& /dev/null
+ return $?
+ }
+
+--- a/tests/regression
++++ b/tests/regression
+@@ -73,7 +73,7 @@ GLBL_SYS_API="../tools/scmp_api_level"
+ #
+ function check_deps() {
+ [[ -z "$1" ]] && return
+- which "$1" >& /dev/null
++ type -P "$1" >& /dev/null
+ return $?
+ }
+
+--- a/tests/testgen
++++ b/tests/testgen
+@@ -32,7 +32,7 @@
+ #
+ function verify_deps() {
+ [[ -z "$1" ]] && return
+- if ! which "$1" >& /dev/null; then
++ if ! type -P "$1" >& /dev/null; then
+ echo "error: install \"$1\" and include it in your \$PATH"
+ exit 1
+ fi
+--
+2.43.0
+
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
new file mode 100644
index 000000000000..34b12db22112
--- /dev/null
+++ b/sys-libs/libseccomp/files/libseccomp-2.6.0-python-shared.patch
@@ -0,0 +1,25 @@
+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.5.1-r1.ebuild b/sys-libs/libseccomp/libseccomp-2.5.1-r1.ebuild
deleted file mode 100644
index 3838d8dfc8d7..000000000000
--- a/sys-libs/libseccomp/libseccomp-2.5.1-r1.ebuild
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-DISTUTILS_OPTIONAL=1
-
-inherit distutils-r1 multilib-minimal
-
-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
- SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz"
- KEYWORDS="-* amd64 arm arm64 hppa ~mips ppc ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux"
-fi
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-IUSE="python static-libs"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DEPEND="python? ( ${PYTHON_DEPS} )"
-RDEPEND="${DEPEND}"
-BDEPEND="${DEPEND}
- dev-util/gperf
- python? ( dev-python/cython[${PYTHON_USEDEP}] )
-"
-# 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. #551248
-DEPEND="${DEPEND} >=sys-kernel/linux-headers-4.3"
-
-src_prepare() {
- local PATCHES=(
- "${FILESDIR}/libseccomp-python-shared.patch"
- )
- default
- if [[ "${PV}" == *9999 ]] ; then
- sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac
- eautoreconf
- fi
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- $(use_enable static-libs static)
- --disable-python
- )
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-do_python() {
- # setup.py reads VERSION_RELEASE from the environment
- local -x VERSION_RELEASE=${PRERELEASE-${PV}}
- pushd "${BUILD_DIR}/src/python" >/dev/null || die
- "$@"
- popd >/dev/null || die
-}
-
-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}"
- do_python distutils-r1_src_compile
- fi
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- if multilib_is_native_abi && use python ; then
- do_python 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-2.5.1.ebuild b/sys-libs/libseccomp/libseccomp-2.5.1.ebuild
deleted file mode 100644
index bf83271b3fde..000000000000
--- a/sys-libs/libseccomp/libseccomp-2.5.1.ebuild
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-DISTUTILS_OPTIONAL=1
-
-inherit distutils-r1 multilib-minimal
-
-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
- SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz"
- KEYWORDS="-* amd64 arm arm64 hppa ~mips ppc ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux"
-fi
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-IUSE="python static-libs"
-
-REQUIRED_USE="
- python? (
- static-libs
- ${PYTHON_REQUIRED_USE}
- )"
-
-DEPEND="python? ( ${PYTHON_DEPS} )"
-RDEPEND="${DEPEND}"
-BDEPEND="${DEPEND}
- dev-util/gperf
- python? ( dev-python/cython[${PYTHON_USEDEP}] )
-"
-# 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. #551248
-DEPEND="${DEPEND} >=sys-kernel/linux-headers-4.3"
-
-src_prepare() {
- default
- if [[ "${PV}" == *9999 ]] ; then
- sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac
- eautoreconf
- fi
-}
-
-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
- cd "${S}/src/python" || die
- sed -i -e "s/=.*VERSION_RELEASE.*,/=\"${PRERELEASE}\",/" \
- -e "/extra_objects/s,\.\.,${OLDPWD}/src," \
- setup.py || die
- local -x CPPFLAGS="-I${OLDPWD}/include -I../../include"
- distutils-r1_src_compile
- fi
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- if multilib_is_native_abi && use python ; then
- cd "${S}/src/python" || die
- 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-2.5.2.ebuild b/sys-libs/libseccomp/libseccomp-2.5.2.ebuild
deleted file mode 100644
index eea16fa2bbf5..000000000000
--- a/sys-libs/libseccomp/libseccomp-2.5.2.ebuild
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-DISTUTILS_OPTIONAL=1
-
-inherit distutils-r1 multilib-minimal
-
-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
- SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz"
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux"
-fi
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-IUSE="python static-libs"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DEPEND="python? ( ${PYTHON_DEPS} )"
-RDEPEND="${DEPEND}"
-BDEPEND="${DEPEND}
- dev-util/gperf
- python? ( dev-python/cython[${PYTHON_USEDEP}] )
-"
-# 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. #551248
-DEPEND="${DEPEND} >=sys-kernel/linux-headers-4.3"
-
-src_prepare() {
- local PATCHES=(
- "${FILESDIR}/libseccomp-python-shared.patch"
- )
- default
- if [[ "${PV}" == *9999 ]] ; then
- sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac
- eautoreconf
- fi
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- $(use_enable static-libs static)
- --disable-python
- )
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-do_python() {
- # setup.py reads VERSION_RELEASE from the environment
- local -x VERSION_RELEASE=${PRERELEASE-${PV}}
- pushd "${BUILD_DIR}/src/python" >/dev/null || die
- "$@"
- popd >/dev/null || die
-}
-
-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}"
- do_python distutils-r1_src_compile
- fi
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- if multilib_is_native_abi && use python ; then
- do_python 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-2.5.5-r1.ebuild b/sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild
new file mode 100644
index 000000000000..ecedd688b53f
--- /dev/null
+++ b/sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2024 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_{10..12} )
+
+inherit distutils-r1 multilib-minimal
+
+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"
+ AUTOTOOLS_AUTO_DEPEND=yes
+ inherit autotools git-r3
+else
+ AUTOTOOLS_AUTO_DEPEND=no
+ inherit autotools
+ SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz
+ experimental-loong? ( https://github.com/matoro/libseccomp/compare/v${PV}..loongarch-r1.patch
+ -> ${P}-loongarch-r1.patch )"
+ KEYWORDS="-* amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="experimental-loong python static-libs test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# 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="
+ >=sys-kernel/linux-headers-5.15
+ python? ( ${PYTHON_DEPS} )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ ${DEPEND}
+ dev-util/gperf
+ experimental-loong? ( ${AUTOTOOLS_DEPEND} )
+ python? (
+ ${DISTUTILS_DEPS}
+ dev-python/cython[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/libseccomp-python-shared.patch
+ "${FILESDIR}"/libseccomp-2.5.3-skip-valgrind.patch
+ "${FILESDIR}"/libseccomp-2.5.5-which-hunt.patch
+ "${FILESDIR}"/libseccomp-2.5.5-arch-syscall-check.patch
+)
+
+src_prepare() {
+ if use experimental-loong; then
+ PATCHES+=( "${DISTDIR}/${P}-loongarch-r1.patch" )
+ fi
+
+ default
+
+ if [[ ${PV} == *9999 ]] ; then
+ sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac || die
+ fi
+
+ if use experimental-loong; then
+ # touch generated files to avoid activating maintainer mode
+ # remove when loong-fix-build.patch is no longer necessary
+ touch ./aclocal.m4 ./configure ./configure.h.in || die
+ find . -name Makefile.in -exec touch {} + || die
+ fi
+
+ if [[ ${PV} == *9999 ]] || use experimental-loong; then
+ rm -f "include/seccomp.h" || die
+ eautoreconf
+ fi
+}
+
+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_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-2.5.3.ebuild b/sys-libs/libseccomp/libseccomp-2.5.5.ebuild
index 847d2ce335b0..a7ba7a3f25c0 100644
--- a/sys-libs/libseccomp/libseccomp-2.5.3.ebuild
+++ b/sys-libs/libseccomp/libseccomp-2.5.5.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{10..11} )
DISTUTILS_OPTIONAL=1
inherit distutils-r1 multilib-minimal
@@ -16,36 +16,48 @@ if [[ ${PV} == *9999 ]] ; then
PRERELEASE="2.6.0"
inherit autotools git-r3
else
- SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz"
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux"
+ SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz
+ experimental-loong? ( https://dev.gentoo.org/~xen0n/distfiles/${PN}-2.5.5-loongarch64-20231204.patch.xz )"
+ KEYWORDS="-* amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux"
fi
LICENSE="LGPL-2.1"
SLOT="0"
-IUSE="python static-libs test"
+IUSE="experimental-loong python static-libs test"
RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-DEPEND="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=">=sys-kernel/linux-headers-5.15
+ python? ( ${PYTHON_DEPS} )"
RDEPEND="${DEPEND}"
BDEPEND="${DEPEND}
dev-util/gperf
- python? ( dev-python/cython[${PYTHON_USEDEP}] )
-"
-# 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. #551248
-DEPEND="${DEPEND} >=sys-kernel/linux-headers-4.3"
+ python? ( dev-python/cython[${PYTHON_USEDEP}] )"
+
+PATCHES=(
+ "${FILESDIR}"/libseccomp-python-shared.patch
+ "${FILESDIR}"/libseccomp-2.5.3-skip-valgrind.patch
+ "${FILESDIR}"/libseccomp-2.5.5-which-hunt.patch
+)
src_prepare() {
- local PATCHES=(
- "${FILESDIR}/libseccomp-python-shared.patch"
- "${FILESDIR}/libseccomp-2.5.3-skip-valgrind.patch"
- )
+ if use experimental-loong; then
+ PATCHES+=( "${WORKDIR}/${PN}-2.5.5-loongarch64-20231204.patch" )
+ fi
default
- if [[ "${PV}" == *9999 ]] ; then
+ if use experimental-loong; then
+ # touch generated files to avoid activating maintainer mode
+ # remove when loong-fix-build.patch is no longer necessary
+ touch ./aclocal.m4 ./configure ./configure.h.in || die
+ find . -name Makefile.in -exec touch {} + || die
+ fi
+
+ if [[ ${PV} == *9999 ]] ; then
sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac || die
eautoreconf
@@ -76,8 +88,8 @@ multilib_src_compile() {
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
+ 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}"
do_python distutils-r1_src_compile
diff --git a/sys-libs/libseccomp/libseccomp-9999.ebuild b/sys-libs/libseccomp/libseccomp-9999.ebuild
index 847d2ce335b0..ac4df4483838 100644
--- a/sys-libs/libseccomp/libseccomp-9999.ebuild
+++ b/sys-libs/libseccomp/libseccomp-9999.ebuild
@@ -1,14 +1,16 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
inherit distutils-r1 multilib-minimal
-DESCRIPTION="high level interface to Linux seccomp filter"
+DESCRIPTION="High level interface to Linux seccomp filter"
HOMEPAGE="https://github.com/seccomp/libseccomp"
if [[ ${PV} == *9999 ]] ; then
@@ -17,35 +19,40 @@ if [[ ${PV} == *9999 ]] ; then
inherit autotools git-r3
else
SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz"
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux"
+ KEYWORDS="-* ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux"
fi
LICENSE="LGPL-2.1"
SLOT="0"
IUSE="python static-libs test"
RESTRICT="!test? ( test )"
-
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-DEPEND="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="
+ >=sys-kernel/linux-headers-5.15
+ python? ( ${PYTHON_DEPS} )
+"
RDEPEND="${DEPEND}"
-BDEPEND="${DEPEND}
+BDEPEND="
+ ${DEPEND}
dev-util/gperf
- python? ( dev-python/cython[${PYTHON_USEDEP}] )
+ python? (
+ ${DISTUTILS_DEPS}
+ dev-python/cython[${PYTHON_USEDEP}]
+ )
"
-# 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. #551248
-DEPEND="${DEPEND} >=sys-kernel/linux-headers-4.3"
-src_prepare() {
- local PATCHES=(
- "${FILESDIR}/libseccomp-python-shared.patch"
- "${FILESDIR}/libseccomp-2.5.3-skip-valgrind.patch"
- )
+PATCHES=(
+ "${FILESDIR}"/libseccomp-2.6.0-python-shared.patch
+ "${FILESDIR}"/libseccomp-2.5.3-skip-valgrind.patch
+)
+src_prepare() {
default
- if [[ "${PV}" == *9999 ]] ; then
+ if [[ ${PV} == *9999 ]] ; then
sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac || die
eautoreconf
@@ -61,26 +68,22 @@ multilib_src_configure() {
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
-do_python() {
- # setup.py reads VERSION_RELEASE from the environment
- local -x VERSION_RELEASE=${PRERELEASE-${PV}}
-
- pushd "${BUILD_DIR}/src/python" >/dev/null || die
- "$@"
- popd >/dev/null || die
-}
-
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
+ 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}"
- do_python distutils-r1_src_compile
+ # 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
}
@@ -88,7 +91,7 @@ multilib_src_install() {
emake DESTDIR="${D}" install
if multilib_is_native_abi && use python ; then
- do_python distutils-r1_src_install
+ distutils-r1_src_install
fi
}
diff --git a/sys-libs/libseccomp/metadata.xml b/sys-libs/libseccomp/metadata.xml
index dd20dd0473ec..72ee48a1f860 100644
--- a/sys-libs/libseccomp/metadata.xml
+++ b/sys-libs/libseccomp/metadata.xml
@@ -5,9 +5,11 @@
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
+ <use>
+ <flag name="experimental-loong">Add experimental LoongArch patchset</flag>
+ </use>
<upstream>
<remote-id type="github">seccomp/libseccomp</remote-id>
- <remote-id type="sourceforge">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
index 18b3e6b273f7..3dedaef745f7 100644
--- a/sys-libs/libselinux/Manifest
+++ b/sys-libs/libselinux/Manifest
@@ -1,3 +1,2 @@
-DIST libselinux-3.1.tar.gz 204703 BLAKE2B 72ff2d99dd6640405e804f58bdfbf05e152615ea92f902b3942602af13dc17080afeabb942ed33ae6b3f528870f4b11584e533848e455a97bf8f7151a8d44646 SHA512 57730cddd2d4751556d9e1f207c0f85119c81848f0620c16239e997150989e3f9a586a8c23861fd51ed89f7e084ad441190a58a288258a49a95f7beef7dbbb13
-DIST libselinux-3.2.tar.gz 206380 BLAKE2B 544eaaa87b9738c61929abe48713b530a8909eaea017890040f2fe299af86f09b6eb2cf4c9a68e06268ba09923b2b67703ac7a2b973906acb45f698e9ccaeed2 SHA512 18129ac0b9936e1f66021f1b311cf1c1e27a01e50cb70f08a3e1c642c5251e4538aec25a8427778569dfecf5333cf1fb84f1a59afdce8019328d0cff7e5833c5
-DIST libselinux-3.3.tar.gz 206826 BLAKE2B e4cd2bf7172db1dd7661dd7981f875eb45f3c123805618edd03d7258f4b1f7afc974020187ec2e9e50dd59b3581ee21a29012eaa90ddfa82e43db4b8e60c51b7 SHA512 9a89c05ea4b17453168a985ece93ba6d6c4127916e657c46d4135eb59a1f6408faa0802cc2e49187defbde5247d659037beee089877affbab3eab6af3433696c
+DIST libselinux-3.5.tar.gz 211453 BLAKE2B f7f3067c4bb0448e18bd7085135f11d94ae99728949480a655c0f660486817beb5829d8a43dff7bce286ccd50705b0c657bde85970f01c794e01fb707f469d8b SHA512 4e13261a5821018a5f3cdce676f180bb62e5bc225981ca8a498ece0d1c88d9ba8eaa0ce4099dd0849309a8a7c5a9a0953df841a9922f2c284e5a109e5d937ba7
+DIST libselinux-3.6.tar.gz 194210 BLAKE2B 615198d47ecfb4b6274810cbe32cce5953dd44d1d04e8ce244213dc4ddbd61cde3515f4650046b805cf98f341aba718af8d7a9e1d66773172031ac19599f6032 SHA512 182dcdf3510083ff4b9376a4a6d6a7b33905ac3c5e974c188bf3965686c54b663162c543ecf15eab75102f3c91a2502d33d0f1104dec01dd9b14737ef3f2b544
diff --git a/sys-libs/libselinux/libselinux-3.1-r1.ebuild b/sys-libs/libselinux/libselinux-3.1-r1.ebuild
deleted file mode 100644
index 9734717e280c..000000000000
--- a/sys-libs/libselinux/libselinux-3.1-r1.ebuild
+++ /dev/null
@@ -1,155 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-PYTHON_COMPAT=( python3_{7..9} )
-USE_RUBY="ruby25 ruby26 ruby27"
-
-# No, I am not calling ruby-ng
-inherit python-r1 toolchain-funcs multilib-minimal
-
-MY_P="${P//_/-}"
-SEPOL_VER="${PV}"
-MY_RELEASEDATE="20200710"
-
-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}/${MY_P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_RELEASEDATE}/${MY_P}.tar.gz"
- KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="pcre2 python ruby static-libs ruby_targets_ruby25 ruby_targets_ruby26 ruby_targets_ruby27"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}:=[${MULTILIB_USEDEP}]
- !pcre2? ( >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}] )
- pcre2? ( dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] )
- python? ( ${PYTHON_DEPS} )
- ruby? (
- ruby_targets_ruby25? ( dev-lang/ruby:2.5 )
- ruby_targets_ruby26? ( dev-lang/ruby:2.6 )
- ruby_targets_ruby27? ( dev-lang/ruby:2.7 )
- )
- elibc_musl? ( sys-libs/fts-standalone )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig
- python? ( >=dev-lang/swig-2.0.9 )
- ruby? ( >=dev-lang/swig-2.0.9 )"
-
-src_prepare() {
- eapply_user
-
- multilib_copy_sources
-}
-
-multilib_src_compile() {
- tc-export AR CC PKG_CONFIG RANLIB
-
- emake \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
- USE_PCRE2="$(usex pcre2 y n)" \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- all
-
- if multilib_is_native_abi && use python; then
- building() {
- emake \
- LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- pywrap
- }
- python_foreach_impl building
- fi
-
- if multilib_is_native_abi && 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_PCRE2="$(usex pcre2 y n)" \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- building ${RUBYTARGET}
- done
- fi
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
- install
-
- if multilib_is_native_abi && use python; then
- installation() {
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
- install-pywrap
- python_optimize # bug 531638
- }
- python_foreach_impl installation
- fi
-
- if multilib_is_native_abi && 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_PCRE2="$(usex pcre2 y n)" \
- install-rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- installation ${RUBYTARGET}
- done
- fi
-
- use static-libs || rm "${D}"/usr/lib*/*.a || die
-}
-
-pkg_postinst() {
- # Fix bug 473502
- for POLTYPE in ${POLICY_TYPES};
- do
- mkdir -p /etc/selinux/${POLTYPE}/contexts/files || die
- touch /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 "/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
- sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} \
- || die "Failed to recompile contexts"
- fi
- done
- done
-}
diff --git a/sys-libs/libselinux/libselinux-3.2.ebuild b/sys-libs/libselinux/libselinux-3.5-r1.ebuild
index 8cb65e1d9e80..dc0b5af229be 100644
--- a/sys-libs/libselinux/libselinux-3.2.ebuild
+++ b/sys-libs/libselinux/libselinux-3.5-r1.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-PYTHON_COMPAT=( python3_{7..10} )
-USE_RUBY="ruby25 ruby26 ruby27"
+PYTHON_COMPAT=( python3_{10..12} )
+USE_RUBY="ruby30 ruby31 ruby32"
# No, I am not calling ruby-ng
-inherit python-r1 toolchain-funcs multilib-minimal
+inherit flag-o-matic python-r1 toolchain-funcs multilib-minimal
MY_PV="${PV//_/-}"
MY_P="${PN}-${MY_PV}"
@@ -26,22 +26,24 @@ fi
LICENSE="public-domain"
SLOT="0"
-IUSE="pcre2 python ruby static-libs ruby_targets_ruby25 ruby_targets_ruby26 ruby_targets_ruby27"
+IUSE="python ruby static-libs ruby_targets_ruby30 ruby_targets_ruby31 ruby_targets_ruby32"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RDEPEND=">=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
- !pcre2? ( >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}] )
- pcre2? ( dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] )
+RDEPEND="dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}]
+ >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
python? ( ${PYTHON_DEPS} )
ruby? (
- ruby_targets_ruby25? ( dev-lang/ruby:2.5 )
- ruby_targets_ruby26? ( dev-lang/ruby:2.6 )
- ruby_targets_ruby27? ( dev-lang/ruby:2.7 )
+ ruby_targets_ruby30? ( dev-lang/ruby:3.0 )
+ ruby_targets_ruby31? ( dev-lang/ruby:3.1 )
+ ruby_targets_ruby32? ( dev-lang/ruby:3.2 )
)
elibc_musl? ( sys-libs/fts-standalone )"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig
- python? ( >=dev-lang/swig-2.0.9 )
+ python? (
+ >=dev-lang/swig-2.0.9
+ dev-python/pip[${PYTHON_USEDEP}]
+ )
ruby? ( >=dev-lang/swig-2.0.9 )"
src_prepare() {
@@ -53,13 +55,16 @@ src_prepare() {
multilib_src_compile() {
tc-export AR CC PKG_CONFIG RANLIB
+ # bug 905711
+ use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE
+
local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
emake \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
all
@@ -69,7 +74,7 @@ multilib_src_compile() {
LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
pywrap
}
@@ -86,7 +91,7 @@ multilib_src_compile() {
LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
rubywrap
}
@@ -102,7 +107,7 @@ multilib_src_install() {
emake DESTDIR="${D}" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
install
if multilib_is_native_abi && use python; then
@@ -110,7 +115,7 @@ multilib_src_install() {
emake DESTDIR="${D}" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
install-pywrap
python_optimize # bug 531638
}
@@ -126,7 +131,7 @@ multilib_src_install() {
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
RUBY=${1} \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
install-rubywrap
}
for RUBYTARGET in ${USE_RUBY}; do
@@ -143,12 +148,12 @@ pkg_postinst() {
# Fix bug 473502
for POLTYPE in ${POLICY_TYPES};
do
- mkdir -p /etc/selinux/${POLTYPE}/contexts/files || die
- touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local || die
+ 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 "/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
- sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} \
+ 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
diff --git a/sys-libs/libselinux/libselinux-3.3.ebuild b/sys-libs/libselinux/libselinux-3.6-r1.ebuild
index 8cb65e1d9e80..002a1bf64a54 100644
--- a/sys-libs/libselinux/libselinux-3.3.ebuild
+++ b/sys-libs/libselinux/libselinux-3.6-r1.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-PYTHON_COMPAT=( python3_{7..10} )
-USE_RUBY="ruby25 ruby26 ruby27"
+PYTHON_COMPAT=( python3_{10..12} )
+USE_RUBY="ruby31 ruby32 ruby33"
# No, I am not calling ruby-ng
-inherit python-r1 toolchain-funcs multilib-minimal
+inherit flag-o-matic python-r1 toolchain-funcs multilib-minimal
MY_PV="${PV//_/-}"
MY_P="${PN}-${MY_PV}"
@@ -26,22 +26,24 @@ fi
LICENSE="public-domain"
SLOT="0"
-IUSE="pcre2 python ruby static-libs ruby_targets_ruby25 ruby_targets_ruby26 ruby_targets_ruby27"
+IUSE="python ruby static-libs ruby_targets_ruby31 ruby_targets_ruby32 ruby_targets_ruby33"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RDEPEND=">=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
- !pcre2? ( >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}] )
- pcre2? ( dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] )
+RDEPEND="dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}]
+ >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
python? ( ${PYTHON_DEPS} )
ruby? (
- ruby_targets_ruby25? ( dev-lang/ruby:2.5 )
- ruby_targets_ruby26? ( dev-lang/ruby:2.6 )
- ruby_targets_ruby27? ( dev-lang/ruby:2.7 )
+ ruby_targets_ruby31? ( dev-lang/ruby:3.1 )
+ 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 )
+ python? (
+ >=dev-lang/swig-2.0.9
+ dev-python/pip[${PYTHON_USEDEP}]
+)
ruby? ( >=dev-lang/swig-2.0.9 )"
src_prepare() {
@@ -53,13 +55,16 @@ src_prepare() {
multilib_src_compile() {
tc-export AR CC PKG_CONFIG RANLIB
+ # bug 905711
+ use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE
+
local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
emake \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
all
@@ -69,7 +74,7 @@ multilib_src_compile() {
LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
pywrap
}
@@ -86,7 +91,7 @@ multilib_src_compile() {
LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
rubywrap
}
@@ -102,7 +107,7 @@ multilib_src_install() {
emake DESTDIR="${D}" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
install
if multilib_is_native_abi && use python; then
@@ -110,7 +115,7 @@ multilib_src_install() {
emake DESTDIR="${D}" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
install-pywrap
python_optimize # bug 531638
}
@@ -126,7 +131,7 @@ multilib_src_install() {
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
RUBY=${1} \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
install-rubywrap
}
for RUBYTARGET in ${USE_RUBY}; do
@@ -143,12 +148,12 @@ pkg_postinst() {
# Fix bug 473502
for POLTYPE in ${POLICY_TYPES};
do
- mkdir -p /etc/selinux/${POLTYPE}/contexts/files || die
- touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local || die
+ 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 "/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
- sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} \
+ 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
diff --git a/sys-libs/libselinux/libselinux-9999.ebuild b/sys-libs/libselinux/libselinux-9999.ebuild
index ebe92ac34793..204faee972bf 100644
--- a/sys-libs/libselinux/libselinux-9999.ebuild
+++ b/sys-libs/libselinux/libselinux-9999.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-PYTHON_COMPAT=( python3_{8..10} )
-USE_RUBY="ruby25 ruby26 ruby27"
+PYTHON_COMPAT=( python3_{10..12} )
+USE_RUBY="ruby31 ruby32 ruby33"
# No, I am not calling ruby-ng
-inherit python-r1 toolchain-funcs multilib-minimal
+inherit flag-o-matic python-r1 toolchain-funcs multilib-minimal
MY_PV="${PV//_/-}"
MY_P="${PN}-${MY_PV}"
@@ -20,28 +20,30 @@ if [[ ${PV} == 9999 ]]; then
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 ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~riscv ~x86"
S="${WORKDIR}/${MY_P}"
fi
LICENSE="public-domain"
SLOT="0"
-IUSE="pcre2 python ruby static-libs ruby_targets_ruby25 ruby_targets_ruby26 ruby_targets_ruby27"
+IUSE="python ruby static-libs ruby_targets_ruby31 ruby_targets_ruby32 ruby_targets_ruby33"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RDEPEND=">=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
- !pcre2? ( >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}] )
- pcre2? ( dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] )
+RDEPEND="dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}]
+ >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
python? ( ${PYTHON_DEPS} )
ruby? (
- ruby_targets_ruby25? ( dev-lang/ruby:2.5 )
- ruby_targets_ruby26? ( dev-lang/ruby:2.6 )
- ruby_targets_ruby27? ( dev-lang/ruby:2.7 )
+ ruby_targets_ruby31? ( dev-lang/ruby:3.1 )
+ 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 )
+ python? (
+ >=dev-lang/swig-2.0.9
+ dev-python/pip[${PYTHON_USEDEP}]
+)
ruby? ( >=dev-lang/swig-2.0.9 )"
src_prepare() {
@@ -53,13 +55,16 @@ src_prepare() {
multilib_src_compile() {
tc-export AR CC PKG_CONFIG RANLIB
+ # bug 905711
+ use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE
+
local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
emake \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
all
@@ -69,7 +74,7 @@ multilib_src_compile() {
LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
pywrap
}
@@ -86,7 +91,7 @@ multilib_src_compile() {
LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
rubywrap
}
@@ -102,7 +107,7 @@ multilib_src_install() {
emake DESTDIR="${D}" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
install
if multilib_is_native_abi && use python; then
@@ -110,7 +115,7 @@ multilib_src_install() {
emake DESTDIR="${D}" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
install-pywrap
python_optimize # bug 531638
}
@@ -126,7 +131,7 @@ multilib_src_install() {
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)" \
RUBY=${1} \
- USE_PCRE2="$(usex pcre2 y n)" \
+ USE_PCRE2=y \
install-rubywrap
}
for RUBYTARGET in ${USE_RUBY}; do
@@ -143,12 +148,12 @@ pkg_postinst() {
# Fix bug 473502
for POLTYPE in ${POLICY_TYPES};
do
- mkdir -p /etc/selinux/${POLTYPE}/contexts/files || die
- touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local || die
+ 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 "/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
- sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} \
+ 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
diff --git a/sys-libs/libselinux/metadata.xml b/sys-libs/libselinux/metadata.xml
index 73a31c45e9f4..dfd7bb04e0a4 100644
--- a/sys-libs/libselinux/metadata.xml
+++ b/sys-libs/libselinux/metadata.xml
@@ -10,9 +10,6 @@
process and file security contexts and to obtain security policy
decisions. Required for any applications that use the SELinux API.
</longdescription>
- <use>
- <flag name="pcre2">Use <pkg>dev-libs/libpcre2</pkg> for fcontext regexes</flag>
- </use>
<upstream>
<remote-id type="cpe">cpe:/a:selinuxproject:libselinux</remote-id>
<remote-id type="github">SELinuxProject/selinux</remote-id>
diff --git a/sys-libs/libsemanage/Manifest b/sys-libs/libsemanage/Manifest
index eea237e73a74..a3f9dcc60c04 100644
--- a/sys-libs/libsemanage/Manifest
+++ b/sys-libs/libsemanage/Manifest
@@ -1,3 +1,3 @@
-DIST libsemanage-3.1.tar.gz 179601 BLAKE2B 69450a4eda1f3728d339f65db1eec9940995fcea5208d17dca531ebc998aefbfec48fe91beffa3490e1502953aa550405fb696635d01b0eb8050c8f00f11106a SHA512 8609ca7d13b5c603677740f2b14558fea3922624af182d20d618237ba11fcf2559fab82fc68d1efa6ff118f064d426f005138521652c761de92cd66150102197
-DIST libsemanage-3.2.tar.gz 178839 BLAKE2B c0925812d784923a7a239ba919fc0a0e1d84cb528cbf4a357fb7938d3c06ebd2f0b60cd3eba40b76bf7c2922a081b99b16b32dc16638aa1bfce32553e241fb9f SHA512 6ad670bb298b1bab506217b12a3fda5d2209f4387a11410f0c1b65f765ffb579b0d70795dee19048909e0b72ef904fc318be60d5a01f80ab12742ce07647a084
-DIST libsemanage-3.3.tar.gz 178890 BLAKE2B f1ff2d25f0c98e9794cb443365e6193db80a42104b645ef4edf783db2eb3d940d1f39cddfa59f9a86ba16957c77852159b3ced83c5d01ecb1811aa6255f8be83 SHA512 6026d9773c0886436ad801bc0c8beac888b6fb62034edeb863192dea4b6ef34a88e080758820fe635a20e048ac666beee505a0f946258f18571709cca5228aad
+DIST libsemanage-3.4.tar.gz 185177 BLAKE2B 45276ae6f54cf3dc453bc0d99fb4d7439970bb14ff5b909ebc5511ec31bce1d2bdc477ba9c1fb4fd04ab494ccb37cd8bf47a90d81460c2974af2196d9019bf67 SHA512 831dc789545bb9a0b009bdb4f7fe52f6197ad8325946640f886a960d08e40b8a69eccd5a70cce51466bb5cb7f742feb78d19a9ec63383fbd03aa451508677e73
+DIST libsemanage-3.5.tar.gz 185060 BLAKE2B 3e08b15cb6b335a2747bd5f0bd84f74abdd22a7e8ec91ebb443ca6fe3886d5e8cd2827fefdaa0e9caf2af3280cffbf593ee828fee54dd423a21b257493cc754c SHA512 959fbd0d6bc6849da6caa13dc41c3f8818cbbd29f04b5d2ac7246c4b395b4f370f113a04cc9cfcb52be2afebfa636013ac4ad4011384c58c7ce066a45cae2751
+DIST libsemanage-3.6.tar.gz 182583 BLAKE2B 3ed9ef06601093983fa41ad6ab9f7eeae241dce98937db04efca6f421afcfd3f59cf5e51d24c596ae03997a398949ed84fbdf629518e3c382a5453129b0a87ab SHA512 8998b6a1b254a9673b99ae4d70a1edc769bb728a44f573cdf62e0a9c9392b77644ee2d70e1936a2f8a9a7f8b063ce98a981f4b8b7060f5b82791889330d69364
diff --git a/sys-libs/libsemanage/libsemanage-3.2.ebuild b/sys-libs/libsemanage/libsemanage-3.4-r1.ebuild
index cea18c8179bf..42c8c982f7d2 100644
--- a/sys-libs/libsemanage/libsemanage-3.2.ebuild
+++ b/sys-libs/libsemanage/libsemanage-3.4-r1.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{9..11} )
inherit python-r1 toolchain-funcs multilib-minimal
@@ -26,14 +26,15 @@ LICENSE="GPL-2"
SLOT="0/2"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RDEPEND=">=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
+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
- sys-devel/bison
- sys-devel/flex
+ app-alternatives/yacc
+ app-alternatives/lex
virtual/pkgconfig"
# tests are not meant to be run outside of the
@@ -84,6 +85,7 @@ multilib_src_compile() {
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
"$@"
}
@@ -101,6 +103,7 @@ multilib_src_install() {
installation_py() {
emake DESTDIR="${ED}" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
install-pywrap
python_optimize # bug 531638
}
diff --git a/sys-libs/libsemanage/libsemanage-3.3.ebuild b/sys-libs/libsemanage/libsemanage-3.5.ebuild
index cea18c8179bf..42c8c982f7d2 100644
--- a/sys-libs/libsemanage/libsemanage-3.3.ebuild
+++ b/sys-libs/libsemanage/libsemanage-3.5.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{9..11} )
inherit python-r1 toolchain-funcs multilib-minimal
@@ -26,14 +26,15 @@ LICENSE="GPL-2"
SLOT="0/2"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RDEPEND=">=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
+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
- sys-devel/bison
- sys-devel/flex
+ app-alternatives/yacc
+ app-alternatives/lex
virtual/pkgconfig"
# tests are not meant to be run outside of the
@@ -84,6 +85,7 @@ multilib_src_compile() {
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
"$@"
}
@@ -101,6 +103,7 @@ multilib_src_install() {
installation_py() {
emake DESTDIR="${ED}" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
install-pywrap
python_optimize # bug 531638
}
diff --git a/sys-libs/libsemanage/libsemanage-3.1-r1.ebuild b/sys-libs/libsemanage/libsemanage-3.6.ebuild
index 3fa67d4bf2af..94a270075a5b 100644
--- a/sys-libs/libsemanage/libsemanage-3.1-r1.ebuild
+++ b/sys-libs/libsemanage/libsemanage-3.6.ebuild
@@ -1,16 +1,13 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{10..11} )
inherit python-r1 toolchain-funcs multilib-minimal
-MY_P="${P//_/-}"
-MY_RELEASEDATE="20200710"
-
-SEPOL_VER="${PV}"
-SELNX_VER="${PV}"
+MY_PV="${PV//_/-}"
+MY_P="${PN}-${MY_PV}"
DESCRIPTION="SELinux kernel and policy management library"
HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
@@ -18,25 +15,26 @@ 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}/${MY_P}/${PN}"
+ S="${WORKDIR}/${P}/${PN}"
else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_RELEASEDATE}/${MY_P}.tar.gz"
- KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
+ 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"
+SLOT="0/2"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}[${MULTILIB_USEDEP}]
- >=sys-libs/libselinux-${SELNX_VER}[${MULTILIB_USEDEP}]
+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
- sys-devel/bison
- sys-devel/flex
+ app-alternatives/yacc
+ app-alternatives/lex
virtual/pkgconfig"
# tests are not meant to be run outside of the
@@ -74,6 +72,8 @@ src_prepare() {
}
multilib_src_compile() {
+ local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
+
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
@@ -85,6 +85,7 @@ multilib_src_compile() {
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
"$@"
}
@@ -102,6 +103,7 @@ multilib_src_install() {
installation_py() {
emake DESTDIR="${ED}" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
install-pywrap
python_optimize # bug 531638
}
diff --git a/sys-libs/libsemanage/libsemanage-9999.ebuild b/sys-libs/libsemanage/libsemanage-9999.ebuild
index e48ea5a71f78..eb127413897f 100644
--- a/sys-libs/libsemanage/libsemanage-9999.ebuild
+++ b/sys-libs/libsemanage/libsemanage-9999.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{10..11} )
inherit python-r1 toolchain-funcs multilib-minimal
@@ -18,7 +18,7 @@ if [[ ${PV} == 9999 ]]; then
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 ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~riscv ~x86"
S="${WORKDIR}/${MY_P}"
fi
@@ -26,14 +26,15 @@ LICENSE="GPL-2"
SLOT="0/2"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RDEPEND=">=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
+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
- sys-devel/bison
- sys-devel/flex
+ app-alternatives/yacc
+ app-alternatives/lex
virtual/pkgconfig"
# tests are not meant to be run outside of the
@@ -84,6 +85,7 @@ multilib_src_compile() {
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
"$@"
}
@@ -101,6 +103,7 @@ multilib_src_install() {
installation_py() {
emake DESTDIR="${ED}" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
install-pywrap
python_optimize # bug 531638
}
diff --git a/sys-libs/libsemanage/metadata.xml b/sys-libs/libsemanage/metadata.xml
index 861770703d93..6de2a0cea852 100644
--- a/sys-libs/libsemanage/metadata.xml
+++ b/sys-libs/libsemanage/metadata.xml
@@ -7,5 +7,6 @@
</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
index 2dfd96f02d09..aeb3b703de01 100644
--- a/sys-libs/libsepol/Manifest
+++ b/sys-libs/libsepol/Manifest
@@ -1,3 +1,2 @@
-DIST libsepol-3.1.tar.gz 473842 BLAKE2B ef1d596c4d53cc0a87e899ef4aeb5bf29c9d6b8303632ddc866c100d30debd8aedd0e8b38cb4ce3141b80421cd914148ff072e492d63dc2dacf03ac2ce59ca5a SHA512 4b5f4e82853ff3e9b4fac2dbdea5c2fc3bb7b508af912217ac4b75da6540fbcd77aa314ab95cd9dfa94fbc4a885000656a663c1a152f65b4cf6970ea0b6034ab
-DIST libsepol-3.2.tar.gz 477749 BLAKE2B 6f35387c0373869672080e151f212c081389f6799539124353aa1749ae2648669b2e237a271297c1c212b7a9e0c35f05edfff1bb724c8a15993e8fb8c599ac2e SHA512 1a6b3489ff766958a4b444b9be63a794267243aed303d3e7d87278f11be492dbf603a0c8181c4c5e01cb0e1ceb43810a77f738f0b9bd1d7d2be67053f9c67a6f
-DIST libsepol-3.3.tar.gz 482546 BLAKE2B 977996f68807f73a5bc0bd3a07b605640eb02a7bc67971882d489def166539ff7cfd00e474adde7e923fbebebdfcdcb71d17a43e3396c3176e25fd7d3bd65238 SHA512 fb6bb69f8e43a911a1a9cbd791593215386e93cb9292e003f5d8efe6e86e0ce5d0287e95d52fe2fbce518a618beaf9b1135aea0d04eaebcdbd8c6d07ee67b500
+DIST libsepol-3.5.tar.gz 497522 BLAKE2B dad2d346605be53fe41aef69e2e4bd4f1ce68a15f0b9307deb6b66bbe7bf06a9ee6be580e60d2f19aebbc8ee5041ac8a7b831b51342ba7c7089e1f1a447e7691 SHA512 66f45a9f4951589855961955db686b006b4c0cddead6ac49ad238a0e4a34775905bd10fb8cf0c0ff2ab64f9b7d8366b97fcd5b19c382dec39971a2835cc765c8
+DIST libsepol-3.6.tar.gz 509100 BLAKE2B c073c9437004df0c723125971ed26354dc6b8a78b069c593977062527342061303bcc48917fcd9623d17998748254f63408b233173f3c62e92ee0ea2f3c4a430 SHA512 35a42d2749fc4f71bc6b7488380714f56975564007128566f1c73e5c50bf81c17535b2cfda4583aacb4870aa2cd5885321c01523e415bda8b3326bfefb13d58e
diff --git a/sys-libs/libsepol/libsepol-3.1.ebuild b/sys-libs/libsepol/libsepol-3.1.ebuild
deleted file mode 100644
index ccf481b3d44a..000000000000
--- a/sys-libs/libsepol/libsepol-3.1.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit toolchain-funcs multilib-minimal
-
-MY_P="${P//_/-}"
-MY_RELEASEDATE="20200710"
-
-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}/${MY_P}/${PN}"
-else
- SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_RELEASEDATE}/${MY_P}.tar.gz"
- KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-
-# tests are not meant to be run outside of the full SELinux userland repo
-RESTRICT="test"
-
-src_prepare() {
- eapply_user
- multilib_copy_sources
-}
-
-multilib_src_compile() {
- tc-export CC AR RANLIB
-
- # https://bugs.gentoo.org/706730
- local -x CFLAGS="${CFLAGS} -fcommon"
-
- emake \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)"
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- install
-}
diff --git a/sys-libs/libsepol/libsepol-3.3.ebuild b/sys-libs/libsepol/libsepol-3.5.ebuild
index 58ebda5eaea9..16ea268dc5c0 100644
--- a/sys-libs/libsepol/libsepol-3.3.ebuild
+++ b/sys-libs/libsepol/libsepol-3.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
diff --git a/sys-libs/libsepol/libsepol-3.2.ebuild b/sys-libs/libsepol/libsepol-3.6.ebuild
index 58ebda5eaea9..27b0f0542d4c 100644
--- a/sys-libs/libsepol/libsepol-3.2.ebuild
+++ b/sys-libs/libsepol/libsepol-3.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
diff --git a/sys-libs/libsepol/libsepol-9999.ebuild b/sys-libs/libsepol/libsepol-9999.ebuild
index 141803b9f569..17fe4da89451 100644
--- a/sys-libs/libsepol/libsepol-9999.ebuild
+++ b/sys-libs/libsepol/libsepol-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -17,7 +17,7 @@ if [[ ${PV} == 9999 ]]; then
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 ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~riscv ~x86"
S="${WORKDIR}/${MY_P}"
fi
diff --git a/sys-libs/libservicelog/metadata.xml b/sys-libs/libservicelog/metadata.xml
index 2219560b548b..31d9727cfc8e 100644
--- a/sys-libs/libservicelog/metadata.xml
+++ b/sys-libs/libservicelog/metadata.xml
@@ -3,9 +3,9 @@
<pkgmetadata>
<maintainer type="project">
<email>ppc@gentoo.org</email>
- <name>Gentoo Linux PowerPC Development</name>
+ <name>PowerPC architecture team</name>
</maintainer>
<upstream>
- <remote-id type="sourceforge">linux-diag</remote-id>
+ <remote-id type="github">power-ras/libservicelog</remote-id>
</upstream>
</pkgmetadata>
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
new file mode 100644
index 000000000000..e1390cb64770
--- /dev/null
+++ b/sys-libs/libsmbios/files/libsmbios-2.4.3-insecure_rpaths.patch
@@ -0,0 +1,13 @@
+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-deprecations.patch b/sys-libs/libsmbios/files/libsmbios-2.4.3-python-deprecations.patch
new file mode 100644
index 000000000000..c67df620e85f
--- /dev/null
+++ b/sys-libs/libsmbios/files/libsmbios-2.4.3-python-deprecations.patch
@@ -0,0 +1,33 @@
+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.ebuild b/sys-libs/libsmbios/libsmbios-2.4.3-r1.ebuild
index 56a475848ec4..1bb35b9b5cd5 100644
--- a/sys-libs/libsmbios/libsmbios-2.4.3.ebuild
+++ b/sys-libs/libsmbios/libsmbios-2.4.3-r1.ebuild
@@ -1,20 +1,21 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit autotools flag-o-matic python-single-r1
DESCRIPTION="Provide access to (SM)BIOS information"
-HOMEPAGE="http://linux.dell.com/files/libsmbios/"
+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.0"
+LICENSE="|| ( GPL-2+ OSL-2.1 ) BSD Boost-1.0"
SLOT="0"
-KEYWORDS="amd64 ~arm64 ~ia64 ~riscv x86"
+KEYWORDS="-* amd64 ~ia64 x86"
IUSE="doc graphviz nls +python static-libs test"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
+ test? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
@@ -24,18 +25,25 @@ RDEPEND="dev-libs/libxml2
python? ( ${PYTHON_DEPS} )"
DEPEND="${RDEPEND}
virtual/pkgconfig
- doc? ( app-doc/doxygen )
+ doc? ( app-text/doxygen )
graphviz? ( media-gfx/graphviz )
- nls? ( sys-devel/gettext )
- test? ( >=dev-util/cppunit-1.9.6 )"
+ nls? ( sys-devel/gettext )"
+BDEPEND="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" #715202
+ "${FILESDIR}/${PN}-2.4.3-insecure_rpaths.patch"
+ "${FILESDIR}"/${PN}-2.4.3-python-deprecations.patch
)
pkg_setup() {
- use python && python-single-r1_pkg_setup
+ if use python || use test; then
+ python-single-r1_pkg_setup
+ fi
}
src_prepare() {
@@ -44,6 +52,10 @@ src_prepare() {
# 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
}
@@ -64,9 +76,9 @@ src_configure() {
src_install() {
emake install DESTDIR="${D}"
- if use python ; then
+ if use python; then
python_scriptinto /usr/sbin
- python_doscript "${ED}"/usr/sbin/smbios-{{keyboard,thermal,token,wakeup,wireless}-ctl,lcd-brightness,passwd,sys-info}
+ python_doscript "${ED}"/usr/sbin/smbios-{{battery,keyboard,thermal,token,wakeup,wireless}-ctl,lcd-brightness,passwd,sys-info}
fi
insinto /usr/include/
diff --git a/sys-libs/libsmbios/metadata.xml b/sys-libs/libsmbios/metadata.xml
index ce37030a7d8c..b131555971d7 100644
--- a/sys-libs/libsmbios/metadata.xml
+++ b/sys-libs/libsmbios/metadata.xml
@@ -1,18 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>polynomial-c@gentoo.org</email>
- <name>Lars Wendler</name>
- </maintainer>
- <maintainer type="person">
- <email>whissi@gentoo.org</email>
- <name>Thomas Deutschmann</name>
- </maintainer>
- <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>
+ <maintainer type="person">
+ <email>marecki@gentoo.org</email>
+ <name>Marek Szuba</name>
+ </maintainer>
+ <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
index 51c78d111e25..5b68a24ad6cf 100644
--- a/sys-libs/libstatgrab/Manifest
+++ b/sys-libs/libstatgrab/Manifest
@@ -1 +1,2 @@
+DIST libstatgrab-0.92.1.tar.gz 817531 BLAKE2B 5315772da07a9229f7f5d85dc7563333892e2a7293d7b331bd65edbebc08841103e6cf695d8faf25b83135545dda767bfc358517afa866981657dc8205d319be SHA512 e1f14df8abbb044d02b0ecebc23fbe9effaa0bac6738686e661de015564df5a4d872edef6d07fd150db25764b449d47ef54beecbe12c51987a679b07edc53c97
DIST libstatgrab-0.92.tar.gz 815262 BLAKE2B d8ca538f01d9e0b1d5c459c9c0da6df5b6806e02649d726c3ee8a2f69233a7183df6dda95980a8e6f8b438478ec28f4baa9d623d5372e5e3e28ea4909e905872 SHA512 a99c6be56d930779d0d8f6f81e64e2f31e19423009c39e925b39116a42aa2c6037651992ac2168c43a5c6ecadf3e4a58486ab6148cf96118c429b04fdcf65192
diff --git a/sys-libs/libstatgrab/libstatgrab-0.92.1.ebuild b/sys-libs/libstatgrab/libstatgrab-0.92.1.ebuild
new file mode 100644
index 000000000000..759fb6778a53
--- /dev/null
+++ b/sys-libs/libstatgrab/libstatgrab-0.92.1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2023 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://www.i-scream.org/libstatgrab/"
+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 ~ia64 ~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/libstatgrab-0.92.ebuild b/sys-libs/libstatgrab/libstatgrab-0.92.ebuild
index 4a87ed781b6c..bfaaf511ec56 100644
--- a/sys-libs/libstatgrab/libstatgrab-0.92.ebuild
+++ b/sys-libs/libstatgrab/libstatgrab-0.92.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -9,10 +9,11 @@ SRC_URI="https://www.mirrorservice.org/sites/ftp.i-scream.org/pub/i-scream/libst
LICENSE="|| ( GPL-2 LGPL-2.1 )"
SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ia64 ppc ~riscv x86"
-IUSE="examples"
+KEYWORDS="amd64 ~arm arm64 ~ia64 ~loong ppc ~riscv x86"
+IUSE="examples test"
+RESTRICT="!test? ( test )"
-RDEPEND="sys-libs/ncurses"
+RDEPEND="sys-libs/ncurses:="
DEPEND="${RDEPEND}"
DOCS=( ChangeLog PLATFORMS NEWS AUTHORS README )
@@ -23,6 +24,7 @@ src_configure() {
--disable-setuid-binaries
--with-ncurses
--disable-static
+ $(use_enable test tests)
)
econf "${myeconfargs[@]}"
diff --git a/sys-libs/libstdc++-v3/Manifest b/sys-libs/libstdc++-v3/Manifest
index 584ab64a4d90..614374a5e9d0 100644
--- a/sys-libs/libstdc++-v3/Manifest
+++ b/sys-libs/libstdc++-v3/Manifest
@@ -1,3 +1,2 @@
-DIST gcc-3.3.6-patches-1.10.tar.bz2 53739 BLAKE2B d22772d30c432669299e3e6df350920408c510a241a20e6795dcc680227342a16c3b6d2e477a17d6c49794005b42972ed30b4efe5b2d69398d283f50efdeb459 SHA512 be6cc8fae217f789982e324e0d3ad12d527e43ca4c168bce613397aaf3d86219b125e7b39c2b236638a68112cfee0e06c1b297fead712d92b3923b7195299d0a
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-r3.ebuild b/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r3.ebuild
deleted file mode 100644
index 0bf6a4ade8c8..000000000000
--- a/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r3.ebuild
+++ /dev/null
@@ -1,201 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit epatch flag-o-matic libtool multilib toolchain-funcs
-
-PATCH_VER="1.10"
-
-DESCRIPTION="Compatibility package for binaries linked against a pre gcc 3.4 libstdc++"
-HOMEPAGE="https://gcc.gnu.org/libstdc++/"
-SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2
- mirror://gentoo/gcc-${PV}-patches-${PATCH_VER}.tar.bz2"
-
-LICENSE="GPL-2 LGPL-2.1"
-SLOT="5"
-KEYWORDS="~amd64 ~x86"
-IUSE="multilib nls"
-
-RDEPEND="sys-libs/zlib"
-DEPEND="
- ${RDEPEND}
- sys-devel/bison"
-
-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
-
- # In general gcc does not like optimization, and add -O2 where
- # it is safe. This is especially true for gcc 3.3 + 3.4
- replace-flags -O? -O2
-
- # 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}" || filter-flags -march="${setting}"
- fi
- setting="`get-flag mcpu`"
- if [ ! -z "${setting}" ] ; then
- is_arch_allowed "${setting}" || filter-flags -mcpu="${setting}"
- fi
-
- # xgcc wont understand gcc 3.4 flags...
- filter-flags -fno-unit-at-a-time
- filter-flags -funit-at-a-time
- filter-flags -fweb
- filter-flags -fno-web
- filter-flags -mno-tls-direct-seg-refs
-
- # xgcc isnt patched with propolice
- filter-flags -fstack-protector-all
- filter-flags -fno-stack-protector-all
- filter-flags -fstack-protector
- filter-flags -fno-stack-protector
-
- # xgcc isnt patched with the gcc symbol visibility patch
- filter-flags -fvisibility-inlines-hidden
- filter-flags -fvisibility=hidden
-
- # Bug #269433 & #290202
- filter-flags -fno-strict-overflow
- filter-flags -fstrict-overflow
-
- # Bug #442784
- filter-flags '-W*'
-
- filter-flags -frecord-gcc-switches
- filter-flags '-fdiagnostics-color*'
-
- # Bug #610064
- filter-flags '-fstack-check*'
-
- # ...sure, why not?
- strip-unsupported-flags
-
- strip-flags
-}
-
-S=${WORKDIR}/gcc-${PV}
-
-src_prepare() {
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/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
-}
-
-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-r4.ebuild b/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r4.ebuild
index 9650ef069fa5..7c20c6524879 100644
--- a/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r4.ebuild
+++ b/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -20,7 +20,7 @@ IUSE="multilib nls"
RDEPEND="sys-libs/zlib"
DEPEND="
${RDEPEND}
- sys-devel/bison"
+ app-alternatives/yacc"
transform_known_flags() {
declare setting
diff --git a/sys-libs/libucontext/Manifest b/sys-libs/libucontext/Manifest
index d38b31369f67..909d659abb99 100644
--- a/sys-libs/libucontext/Manifest
+++ b/sys-libs/libucontext/Manifest
@@ -1 +1,2 @@
DIST libucontext-1.1.tar.gz 25261 BLAKE2B 269b3899657779bc2c6a2f1c365242f0ee936afeb0acf74e48af5c1e6b96918bbaa239039508e7b1b1f7b358679fb4a222311b761223b69b9a3e7a9be2d0bc40 SHA512 05aed6f82a2b3d9dba896423335a7fc2fc5eddc87ed725f05e14488c6ddfcef10b835c928619439c7783e052baff7ef2dc162b6e06aa78992f6f611ca13c2e39
+DIST libucontext-1.2.tar.gz 29073 BLAKE2B 378816376877729776c41515ad1c3da36c24528bcdcf5272c4df2029b5273cf90228c163e87bd1af558129b1274d0b22632c4fa8ad2a0f37ac7014dae527a48e SHA512 f47b776517fa9e3fe48b762b11ae580c28bd7646f9e3ab843141d3e203f886326e68dd8040852ab1cb92dbd09d821161660c4be44e3025448d90131e74a4cf51
diff --git a/sys-libs/libucontext/files/libucontext-1.1-respect-CFLAGS.patch b/sys-libs/libucontext/files/libucontext-1.1-respect-CFLAGS.patch
new file mode 100644
index 000000000000..49dd872690d5
--- /dev/null
+++ b/sys-libs/libucontext/files/libucontext-1.1-respect-CFLAGS.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/832677
+https://github.com/kaniini/libucontext/issues/39
+--- a/Makefile
++++ b/Makefile
+@@ -17,7 +17,7 @@ endif
+ LIBDIR := /lib
+ INCLUDEDIR := /usr/include
+ PKGCONFIGDIR := /usr/lib/pkgconfig
+-CFLAGS := -ggdb3 -O2 -Wall
++CFLAGS ?= -ggdb3 -O2 -Wall
+ CPPFLAGS := -Iinclude -Iarch/${ARCH} -Iarch/common
+ EXPORT_UNPREFIXED := yes
+ FREESTANDING := no
diff --git a/sys-libs/libucontext/libucontext-1.1.ebuild b/sys-libs/libucontext/libucontext-1.1-r1.ebuild
index f637a693a337..7ec73298a79c 100644
--- a/sys-libs/libucontext/libucontext-1.1.ebuild
+++ b/sys-libs/libucontext/libucontext-1.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -20,10 +20,14 @@ BDEPEND="man? ( app-text/scdoc )"
# segfault needs investigation
RESTRICT="test"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1-respect-CFLAGS.patch
+)
+
src_compile() {
tc-export AR CC
- local arch
+ arch=
# Override arch detection
# https://github.com/kaniini/libucontext/blob/master/Makefile#L3
@@ -39,13 +43,25 @@ src_compile() {
arch="$(uname -m)"
fi
- emake ARCH="${arch}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" all $(usev man 'docs')
+ emake \
+ ARCH="${arch}" \
+ LDFLAGS="${LDFLAGS}" \
+ LIBDIR="/usr/$(get_libdir)" \
+ all $(usev man 'docs')
}
src_test() {
- emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" check
+ emake \
+ ARCH="${arch}" \
+ LDFLAGS="${LDFLAGS}" \
+ LIBDIR="/usr/$(get_libdir)" \
+ check
}
src_install() {
- emake DESTDIR="${ED}" LIBDIR="/usr/$(get_libdir)" install $(usev man 'install_docs')
+ emake \
+ ARCH="${arch}" \
+ DESTDIR="${ED}" \
+ LIBDIR="/usr/$(get_libdir)" \
+ install $(usev man 'install_docs')
}
diff --git a/sys-libs/libucontext/libucontext-1.2.ebuild b/sys-libs/libucontext/libucontext-1.2.ebuild
new file mode 100644
index 000000000000..6d0a0bd5c14a
--- /dev/null
+++ b/sys-libs/libucontext/libucontext-1.2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2022 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://github.com/kaniini/libucontext/archive/refs/tags/${P}.tar.gz"
+S="${WORKDIR}"/${PN}-${P}
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86"
+IUSE="+man"
+
+BDEPEND="man? ( app-text/scdoc )"
+
+# segfault needs investigation
+# 1.2 eems ok?
+#RESTRICT="test"
+
+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="${ED}" \
+ LIBDIR="/usr/$(get_libdir)" \
+ PKGCONFIGDIR="/usr/$(get_libdir)/pkgconfig" \
+ install $(usev man 'install_docs')
+
+ find "${ED}" -name '*.a' -delete || die
+}
diff --git a/sys-libs/libunwind/Manifest b/sys-libs/libunwind/Manifest
index 2cf810467cc0..e156b3de32b2 100644
--- a/sys-libs/libunwind/Manifest
+++ b/sys-libs/libunwind/Manifest
@@ -1,2 +1,4 @@
-DIST libunwind-1.5.0.tar.gz 878355 BLAKE2B ee35441289926ac22a58bedb9f831d8e13bacd663a99b3ce25eed229f25f0423bbbd90e09e3d62b003518d7a620aa6d15b0dd5b93632736a89fa0667b35d5fc2 SHA512 1df20ca7a8cee2f2e61294fa9b677e88fec52e9d5a329f88d05c2671c69fa462f6c18808c97ca9ff664ef57292537a844f00b18d142b1938c9da701ca95a4bab
-DIST libunwind-1.6.2.tar.gz 901392 BLAKE2B 3d0313f7e92cbc3e1a84ad3831a5170f21cdf772f1697ca0a59dea63cdd47da382e9f1fd77325d9ff8bcd47559a425dc883a820c646c628cd00faed82cb0f83f SHA512 1d17dfb14f99a894a6cda256caf9ec481c14068aaf8f3a85fa3befa7c7cca7fca0f544a91a3a7c2f2fc55bab19b06a67ca79f55ac9081151d94478c7f611f8f7
+DIST libunwind-1.7.1-docs.tar.xz 27248 BLAKE2B 0905f49ce72e6cafbb185828a4adf7eb5a88ede335104b1b0679e66199079e3dad9d83815d10a864b4480d88abd82b73bb71181962b1fea39ec41f534d78d549 SHA512 d786572e7fbd5ef7852712f592bd17d4110951083991c5ffcff2bb4ae91e4519b42743f848fe7f2cc9f72d8a0240531ec3d27806972c2c309d06a9048284b97b
+DIST libunwind-1.7.2.tar.gz 912590 BLAKE2B 519570a02d06ce4a174ca226941e493499054112de1c92938434e9fb56fabc8446f699a886ea8beee672ac5e28acd03d16169257a43e2ee1bab084fb331ef4cf SHA512 903f7e26c7d4c22e6ef4fe8954ca0f153fdf346cec40e1e8f7ab966d251110f4deb0a84d1fd150aee194ed966b5c1e01ee27c821cd043859852da33a94faae1f
+DIST libunwind-1.8.0-docs.tar.xz 29280 BLAKE2B 260c5011cf23422ec04449126259c9960b5549b94def8ffa3821ccc67809b5da06be22fb0b465fcee2f0ec89faebab71d2bf3316dc68315a27e0913856513b0a SHA512 6969c8426dc5d79a78a9dae366a9e7b6f1d9a7ce307357913d4f5b8867a540ab8225b5342ee0e06e77b832ef76336fba41dadf12effa5236a076e6bfe72ec548
+DIST libunwind-1.8.1.tar.gz 958468 BLAKE2B 936e70f2428d8f6ada3b4d58b3c9e3a9738eb2f7aee1ad5fb4e44dbb7400186d1bd1ead86a698e53d199d5944b102f8380d08b48104a138021286a79fb006ec3 SHA512 aba7b578c1b8cbe78f05b64e154f3530525f8a34668b2a9f1ee6acb4b22c857befe34ad4e9e8cca99dbb66689d41bc72060a8f191bd8be232725d342809431b3
diff --git a/sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch b/sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch
deleted file mode 100644
index 3ddc610d4afc..000000000000
--- a/sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-https://bugs.gentoo.org/586092
-
-this might not be correct, but at least it builds, and doesn't crash
-
---- a/src/coredump/_UCD_access_reg_linux.c
-+++ b/src/coredump/_UCD_access_reg_linux.c
-@@ -51,6 +51,9 @@ _UCD_access_reg (unw_addr_space_t as,
- #elif defined(UNW_TARGET_TILEGX)
- if (regnum < 0 || regnum > UNW_TILEGX_CFA)
- goto badreg;
-+#elif defined(UNW_TARGET_IA64) || defined(UNW_TARGET_HPPA) || defined(UNW_TARGET_PPC32) || defined(UNW_TARGET_PPC64)
-+ if (regnum < 0 || regnum >= ARRAY_SIZE(ui->prstatus->pr_reg))
-+ goto badreg;
- #else
- #if defined(UNW_TARGET_MIPS)
- static const uint8_t remap_regs[] =
diff --git a/sys-libs/libunwind/files/libunwind-1.2-ia64-missing.patch b/sys-libs/libunwind/files/libunwind-1.2-ia64-missing.patch
deleted file mode 100644
index e15250b4c61f..000000000000
--- a/sys-libs/libunwind/files/libunwind-1.2-ia64-missing.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-Original libunwind release is missing a few ia64-specific files in tarball.
-diff --git a/src/ia64/mk_Gcursor_i.c b/src/ia64/mk_Gcursor_i.c
-new file mode 100644
-index 0000000..67b14d5
---- /dev/null
-+++ b/src/ia64/mk_Gcursor_i.c
-@@ -0,0 +1,65 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2003 Hewlett-Packard Co
-+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+/* Utility to generate cursor_i.h. */
-+
-+#include "libunwind_i.h"
-+
-+#ifdef offsetof
-+# undef offsetof
-+#endif
-+
-+#define offsetof(type,field) ((char *) &((type *) 0)->field - (char *) 0)
-+
-+#define OFFSET(sym, offset) \
-+ asm volatile("\n->" #sym " %0" : : "i" (offset))
-+
-+int
-+main (void)
-+{
-+ OFFSET("IP_OFF", offsetof (struct cursor, ip));
-+ OFFSET("PR_OFF", offsetof (struct cursor, pr));
-+ OFFSET("BSP_OFF", offsetof (struct cursor, bsp));
-+ OFFSET("PSP_OFF", offsetof (struct cursor, psp));
-+ OFFSET("PFS_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_PFS]));
-+ OFFSET("RNAT_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_RNAT]));
-+ OFFSET("UNAT_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_UNAT]));
-+ OFFSET("LC_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_LC]));
-+ OFFSET("FPSR_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_FPSR]));
-+ OFFSET("B1_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_B1]));
-+ OFFSET("B2_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_B2]));
-+ OFFSET("B3_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_B3]));
-+ OFFSET("B4_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_B4]));
-+ OFFSET("B5_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_B5]));
-+ OFFSET("F2_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_F2]));
-+ OFFSET("F3_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_F3]));
-+ OFFSET("F4_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_F4]));
-+ OFFSET("F5_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_F5]));
-+ OFFSET("FR_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_F16]));
-+ OFFSET("LOC_SIZE",
-+ (offsetof (struct cursor, loc[1]) - offsetof (struct cursor, loc[0])));
-+ OFFSET("SIGCONTEXT_ADDR_OFF", offsetof (struct cursor, sigcontext_addr));
-+ return 0;
-+}
-diff --git a/src/ia64/mk_Lcursor_i.c b/src/ia64/mk_Lcursor_i.c
-new file mode 100644
-index 0000000..aee2e7e
---- /dev/null
-+++ b/src/ia64/mk_Lcursor_i.c
-@@ -0,0 +1,2 @@
-+#define UNW_LOCAL_ONLY
-+#include "mk_Gcursor_i.c"
-diff --git a/src/ia64/mk_cursor_i b/src/ia64/mk_cursor_i
-new file mode 100755
-index 0000000..9211f91
---- /dev/null
-+++ b/src/ia64/mk_cursor_i
-@@ -0,0 +1,7 @@
-+#!/bin/sh
-+test -z "$1" && exit 1
-+echo "/* GENERATED */"
-+echo "#ifndef cursor_i_h"
-+echo "#define cursor_i_h"
-+sed -ne 's/^->"\(\S*\)" \(\d*\)/#define \1 \2/p' < $1 || exit $?
-+echo "#endif"
diff --git a/sys-libs/libunwind/files/libunwind-1.2-ia64-ptrace-coredump.patch b/sys-libs/libunwind/files/libunwind-1.2-ia64-ptrace-coredump.patch
deleted file mode 100644
index 3785d8820cd9..000000000000
--- a/sys-libs/libunwind/files/libunwind-1.2-ia64-ptrace-coredump.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Fix build failure on ia64.
- coredump/_UPT_get_dyn_info_list_addr.c
-is almost identical to
- ptrace/_UPT_get_dyn_info_list_addr.c
-It's clearly an __ia64 implementation copy.
-diff --git a/src/coredump/_UPT_get_dyn_info_list_addr.c b/src/coredump/_UPT_get_dyn_info_list_addr.c
-index 0d11905..176b146 100644
---- a/src/coredump/_UPT_get_dyn_info_list_addr.c
-+++ b/src/coredump/_UPT_get_dyn_info_list_addr.c
-@@ -31,2 +31,3 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
- # include "os-linux.h"
-+# include "../ptrace/_UPT_internal.h"
-
-@@ -40,3 +41,2 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
- char path[PATH_MAX];
-- unw_dyn_info_t *di;
- unw_word_t res;
-@@ -50,5 +50,5 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
-
-- invalidate_edi (&ui->edi);
-+ invalidate_edi(&ui->edi);
-
-- if (elf_map_image (&ui->ei, path) < 0)
-+ if (elf_map_image (&ui->edi.ei, path) < 0)
- /* ignore unmappable stuff like "/SYSV00001b58 (deleted)" */
-@@ -58,6 +58,5 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
-
-- di = tdep_find_unwind_table (&ui->edi, as, path, lo, off);
-- if (di)
-+ if (tdep_find_unwind_table (&ui->edi, as, path, lo, off, 0) > 0)
- {
-- res = _Uia64_find_dyn_list (as, di, arg);
-+ res = _Uia64_find_dyn_list (as, &ui->edi.di_cache, arg);
- if (res && count++ == 0)
diff --git a/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch b/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch
deleted file mode 100644
index b6ba0028c80f..000000000000
--- a/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-https://github.com/libunwind/libunwind/commit/6382d6f5c9d4d149989e47b20446f794365137c1
-
-From 0f3f41a86842f2b19aa07af5242cb775ef9b20d3 Mon Sep 17 00:00:00 2001
-From: "Jory A. Pratt" <anarchy@gentoo.org>
-Date: Sat, 30 Jun 2018 22:44:22 -0500
-Subject: [PATCH] Only include execinfo.h where avaliable
-
-Signed-off-by: Jory A. Pratt <anarchy@gentoo.org>
----
- tests/test-coredump-unwind.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c
-index 5254708..33f92b0 100644
---- a/tests/test-coredump-unwind.c
-+++ b/tests/test-coredump-unwind.c
-@@ -57,7 +57,9 @@
- #include <grp.h>
-
- /* For SIGSEGV handler code */
-+#if HAVE_EXECINFO_H
- #include <execinfo.h>
-+#endif
- #include <sys/ucontext.h>
-
- #include <libunwind-coredump.h>
-@@ -202,7 +204,7 @@ void die_out_of_memory(void)
- /* End of utility logging functions */
-
-
--
-+#if HAVE_EXECINFO_H
- static
- void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
- {
-@@ -249,12 +251,14 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
-
- _exit(1);
- }
--
-+#endif
- static void install_sigsegv_handler(void)
- {
- struct sigaction sa;
- memset(&sa, 0, sizeof(sa));
-+#if HAVE_EXECINFO_H
- sa.sa_sigaction = handle_sigsegv;
-+#endif
- sa.sa_flags = SA_SIGINFO;
- sigaction(SIGSEGV, &sa, NULL);
- sigaction(SIGILL, &sa, NULL);
---
-2.18.0
diff --git a/sys-libs/libunwind/files/libunwind-1.5.0-x32.patch b/sys-libs/libunwind/files/libunwind-1.5.0-x32.patch
deleted file mode 100644
index a3bbc81f45b5..000000000000
--- a/sys-libs/libunwind/files/libunwind-1.5.0-x32.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-https://bugs.gentoo.org/614374
-
-From: kasperk81 <83082615+kasperk81@users.noreply.github.com>
-Date: Wed, 30 Jun 2021 23:23:22 +0000
-Subject: [PATCH] Fix -mx32 compilation error
-
---- a/src/x86_64/Gos-linux.c
-+++ b/src/x86_64/Gos-linux.c
-@@ -149,7 +149,7 @@ x86_64_sigreturn (unw_cursor_t *cursor)
- __asm__ __volatile__ ("mov %0, %%rsp;"
- "mov %1, %%rax;"
- "syscall"
-- :: "r"(sc), "i"(SYS_rt_sigreturn)
-+ :: "r"((uint64_t)sc), "i"(SYS_rt_sigreturn)
- : "memory");
- abort();
- }
diff --git a/sys-libs/libunwind/files/libunwind-1.7.2-backport-pr521.patch b/sys-libs/libunwind/files/libunwind-1.7.2-backport-pr521.patch
new file mode 100644
index 000000000000..addfc0a60a03
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.7.2-backport-pr521.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/913817
+https://github.com/libunwind/libunwind/issues/520
+https://github.com/libunwind/libunwind/pull/521
+
+From aaf9909c91f1fa875907df8d437bff689e00172e Mon Sep 17 00:00:00 2001
+From: Stephen Webb <swebb@blackberry.com>
+Date: Fri, 26 May 2023 16:22:08 -0400
+Subject: [PATCH] Fix FTBFS on Linux ppc32
+
+Looks like the Linux ucontext structure has changed for PPC at some
+point. This probably needs some kind of version check, or else ancient
+kernels will need to stick with 1.6 or earlier.
+---
+ src/ppc32/ucontext_i.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ppc32/ucontext_i.h b/src/ppc32/ucontext_i.h
+index 64f8ed878..ee93c6979 100644
+--- a/src/ppc32/ucontext_i.h
++++ b/src/ppc32/ucontext_i.h
+@@ -44,8 +44,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+ //#define MQ_IDX 36
+ #define LINK_IDX 36
+
+-#define _UC_MCONTEXT_GPR(x) ( (void *)&dmy_ctxt.uc_mcontext.gregs[x] - (void *)&dmy_ctxt) )
+-#define _UC_MCONTEXT_FPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.fpregs[x] - (void *)&dmy_ctxt) )
++#define _UC_MCONTEXT_GPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[x] - (void *)&dmy_ctxt) )
++#define _UC_MCONTEXT_FPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[x] - (void *)&dmy_ctxt) )
+
+ /* These are dummy structures used only for obtaining the offsets of the
+ various structure members. */
diff --git a/sys-libs/libunwind/libunwind-1.5.0-r1.ebuild b/sys-libs/libunwind/libunwind-1.5.0-r1.ebuild
deleted file mode 100644
index 082fdab6ed88..000000000000
--- a/sys-libs/libunwind/libunwind-1.5.0-r1.ebuild
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 2005-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${MY_PV}
-inherit autotools flag-o-matic libtool multilib-minimal
-
-DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
-HOMEPAGE="https://savannah.nongnu.org/projects/libunwind"
-SRC_URI="mirror://nongnu/libunwind/${MY_P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0/8" # libunwind.so.8
-KEYWORDS="amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 -riscv -sparc x86 ~amd64-linux ~x86-linux"
-IUSE="debug debug-frame doc libatomic lzma static-libs zlib"
-
-RESTRICT="test" # some tests are broken (toolchain version dependent, rely on external binaries)
-
-# We just use the header from libatomic.
-RDEPEND="
- lzma? ( app-arch/xz-utils[static-libs?,${MULTILIB_USEDEP}] )
- zlib? ( sys-libs/zlib[static-libs?,${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}
- libatomic? ( dev-libs/libatomic_ops[${MULTILIB_USEDEP}] )"
-
-S="${WORKDIR}/${MY_P}"
-
-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-sh.h
- /usr/include/libunwind-tilegx.h
- /usr/include/libunwind-x86.h
- /usr/include/libunwind-x86_64.h
-)
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.2-coredump-regs.patch #586092
- "${FILESDIR}"/${PN}-1.2-ia64-ptrace-coredump.patch
- "${FILESDIR}"/${PN}-1.2-ia64-missing.patch
- "${FILESDIR}"/${PN}-1.5.0-x32.patch
- # needs refresh:
- #"${FILESDIR}"/${PN}-1.2.1-only-include-execinfo_h-if-avaliable.patch
-)
-
-src_prepare() {
- default
- chmod +x src/ia64/mk_cursor_i || die
- # Since we have tests disabled via RESTRICT, disable building in the subdir
- # entirely. This works around some build errors too. #484846
- sed -i -e '/^SUBDIRS/s:tests::' Makefile.in || die
-
- elibtoolize
- eautoreconf
-
- # Let's wait for proper fix upstream in https://github.com/libunwind/libunwind/issues/154
- # Meanwhile workaround for gcc-10 with -fcommon, bug #706560
- append-cflags -fcommon
-}
-
-multilib_src_configure() {
- # --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
- # 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.
- ECONF_SOURCE="${S}" \
- ac_cv_header_atomic_ops_h=$(usex libatomic) \
- econf \
- --enable-cxx-exceptions \
- --enable-coredump \
- --enable-ptrace \
- --enable-setjmp \
- $(use_enable debug-frame) \
- $(use_enable doc documentation) \
- $(use_enable lzma minidebuginfo) \
- $(use_enable static-libs static) \
- $(use_enable zlib zlibdebuginfo) \
- $(use_enable debug conservative_checks) \
- $(use_enable debug)
-}
-
-multilib_src_compile() {
- # Bug 586208
- CCACHE_NODIRECT=1 default
-}
-
-multilib_src_test() {
- # Explicitly allow parallel build of tests.
- # Sandbox causes some tests to freak out.
- SANDBOX_ON=0 emake check
-}
-
-multilib_src_install_all() {
- find "${D}" -name "*.la" -type f -delete || die
-}
diff --git a/sys-libs/libunwind/libunwind-1.6.2.ebuild b/sys-libs/libunwind/libunwind-1.7.2.ebuild
index 62c11c5c04ce..97d9b3981477 100644
--- a/sys-libs/libunwind/libunwind-1.6.2.ebuild
+++ b/sys-libs/libunwind/libunwind-1.7.2.ebuild
@@ -1,31 +1,59 @@
-# Copyright 2005-2021 Gentoo Authors
+# Copyright 2005-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-MY_PV=${PV/_/-}
-MY_P=${PN}-${MY_PV}
-inherit autotools multilib-minimal
+# 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.7.1
+# Default to generating docs (inc. man pages) if no prebuilt; overridden later
+LIBUNWIND_DOCS_USEFLAG="+doc"
+
+inherit multilib-minimal
DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
HOMEPAGE="https://savannah.nongnu.org/projects/libunwind"
-SRC_URI="mirror://nongnu/libunwind/${MY_P}.tar.gz"
-S="${WORKDIR}/${MY_P}"
+
+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}/${P}.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
+
+ KEYWORDS="amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 -sparc x86 ~amd64-linux ~x86-linux"
+fi
+
+[[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] && LIBUNWIND_DOCS_USEFLAG="doc"
LICENSE="MIT"
SLOT="0/8" # libunwind.so.8
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv -sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="debug debug-frame doc libatomic lzma static-libs test zlib"
+IUSE="debug debug-frame ${LIBUNWIND_DOCS_USEFLAG} libatomic lzma static-libs test zlib"
RESTRICT="test !test? ( test )" # some tests are broken (toolchain version dependent, rely on external binaries)
-# We just use the header from libatomic.
+BDEPEND="
+ doc? ( app-text/texlive-core )
+"
RDEPEND="
lzma? ( app-arch/xz-utils[static-libs?,${MULTILIB_USEDEP}] )
zlib? ( sys-libs/zlib[static-libs?,${MULTILIB_USEDEP}] )
"
-DEPEND="${RDEPEND}
- libatomic? ( dev-libs/libatomic_ops[${MULTILIB_USEDEP}] )"
+# We just use the header from libatomic.
+DEPEND="
+ ${RDEPEND}
+ libatomic? ( dev-libs/libatomic_ops[${MULTILIB_USEDEP}] )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-1.7.2-backport-pr521.patch" )
MULTILIB_WRAPPED_HEADERS=(
/usr/include/libunwind.h
@@ -50,7 +78,9 @@ src_prepare() {
chmod +x src/ia64/mk_cursor_i || die
- eautoreconf
+ if [[ ${PV} == 9999 ]] ; then
+ eautoreconf
+ fi
}
multilib_src_configure() {
@@ -63,7 +93,7 @@ multilib_src_configure() {
--enable-ptrace
--enable-setjmp
$(use_enable debug-frame)
- $(use_enable doc documentation)
+ $(multilib_native_use_enable doc documentation)
$(use_enable lzma minidebuginfo)
$(use_enable static-libs static)
$(use_enable zlib zlibdebuginfo)
@@ -93,4 +123,9 @@ multilib_src_test() {
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.1.ebuild b/sys-libs/libunwind/libunwind-1.8.1.ebuild
new file mode 100644
index 000000000000..589d748ba8b7
--- /dev/null
+++ b/sys-libs/libunwind/libunwind-1.8.1.ebuild
@@ -0,0 +1,134 @@
+# 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 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 -sparc ~x86 ~amd64-linux ~x86-linux"
+ 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? ( sys-libs/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-9999.ebuild b/sys-libs/libunwind/libunwind-9999.ebuild
new file mode 100644
index 000000000000..589d748ba8b7
--- /dev/null
+++ b/sys-libs/libunwind/libunwind-9999.ebuild
@@ -0,0 +1,134 @@
+# 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 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 -sparc ~x86 ~amd64-linux ~x86-linux"
+ 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? ( sys-libs/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
index 02901daf788b..2861d2a86f04 100644
--- a/sys-libs/libunwind/metadata.xml
+++ b/sys-libs/libunwind/metadata.xml
@@ -10,6 +10,7 @@
<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
index 397baaaf055a..7261ce892260 100644
--- a/sys-libs/liburing/Manifest
+++ b/sys-libs/liburing/Manifest
@@ -1 +1,5 @@
DIST liburing-2.1.tar.bz2 120806 BLAKE2B 3a09d1504150ed1c111f064187d868fd86ec7c3dbf661f73999f7fbb9c945b528f7ab2e0cfff5d270a1a977f04deedc7c790b6df8708ef2884fbf28c1a9ffd1b SHA512 a658454869b01752b5e499c4f0b50c342a8ff63b3dd1a473a96f9fad03f22a6e4d2354b0e658a4e7e50ea27440a84ee274856b3687803583bc80cb4bc45aec71
+DIST liburing-2.2.tar.bz2 172733 BLAKE2B 19ae8a356e4fdc296bfb3ff121b777bd7c970388b31686aac5c531508e807360d58220bc27f9c62c55bd76ca687013acfceb3fa8a2162b615561f637cc50ffe1 SHA512 55b935a90c108be54393a5ab341b56e40ad8d506360fe15b3dcde5ee263356f11080f8614efdc4253f6318ea35d808ec47a9dbfc6b9f6cc2e04f7f1a75c3f621
+DIST liburing-2.3.tar.bz2 197929 BLAKE2B 94ae2a79522fbac13c071ad752f5cbfae3e3b3dd6b35da24e5c756ba47a7b304e5bcb18391ca23fc2edafeb2dbcdcf143fd2cda71656396ac34248159a964fb7 SHA512 341aa13d3b560617f3710291945ec2fe35d828e0b67ee3a97555fd4eb3d2042a7f9e722080d8ebb45aa74a2ca4ef58db1e8a10c351e951a604da007ba69d2738
+DIST liburing-2.4.tar.bz2 213774 BLAKE2B 3e6c28842db6ee10e38df297e392803e0ff40ccfea774b2c473ba63b5583e760371bf0ce8e34ca4311e2bef69eee81b2b50b5e906bb328d5b321488136fc61e0 SHA512 45b5123739280835c88c1addcf99a3210a91c6e1b3e0c5a20fd4cf3ff55db5fd1475b0351806be2e86fedfa313200eecac6a9a6f410a9eca7e451081fd8eec96
+DIST liburing-2.5.tar.bz2 217397 BLAKE2B cb5d0a61bc8ce5a92a1b581c5411938146a84c365598454ac8bac7ba0d7429e20a5a608cb725619cbf8b77570b2d638fc347fd9ee9cb1456361957a2a4d6e6d6 SHA512 cba62acde52c07185ade0ac0fee6bf3845f5677d061b52d179c6341a62f8581d4f8920fc09d27a3723bc3832bc84dd5475d173427ee5d8a063d079b07af96416
diff --git a/sys-libs/liburing/files/liburing-2.1-gnu_source-musl-cpuset.patch b/sys-libs/liburing/files/liburing-2.1-gnu_source-musl-cpuset.patch
new file mode 100644
index 000000000000..b6486f8b140a
--- /dev/null
+++ b/sys-libs/liburing/files/liburing-2.1-gnu_source-musl-cpuset.patch
@@ -0,0 +1,42 @@
+https://github.com/axboe/liburing/commit/c34070e08199491fe9653617364f4aea9b9b22be
+
+From: Sam James <sam@gentoo.org>
+Date: Mon, 14 Mar 2022 14:18:55 +0000
+Subject: [PATCH] liburing.h: define GNU_SOURCE for cpu_set_t
+
+On musl, cpu_set_t is only exposed if GNU_SOURCE is defined. While in
+the liburing build system, this is set (43b7ec8d17888df0debccda27dd58f4d1b90245e),
+it can't be guaranteed that folks including the header externally will set
+that macro.
+
+Noticed while investigating a build failure for glusterfs on a musl
+system:
+```
+configure:17701: checking for liburing.h
+configure:17701: x86_64-gentoo-linux-musl-gcc -c -pipe -march=native -fno-diagnostics-color -O2 conftest.c >&5
+In file included from conftest.c:105:
+/usr/include/liburing.h:162:39: error: unknown type name 'cpu_set_t'
+ 162 | const cpu_set_t *mask);
+ | ^~~~~~~~~
+configure:17701: $? = 1
+```
+
+Just like _XOPEN_SOURCE, set if needed.
+
+Bug: https://bugs.gentoo.org/829293
+Bug: https://github.com/axboe/liburing/issues/422
+See: 43b7ec8d17888df0debccda27dd58f4d1b90245e
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/src/include/liburing.h
++++ b/src/include/liburing.h
+@@ -6,6 +6,10 @@
+ #define _XOPEN_SOURCE 500 /* Required for glibc to expose sigset_t */
+ #endif
+
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE /* Required for musl to expose cpu_set_t */
++#endif
++
+ #include <sys/socket.h>
+ #include <sys/stat.h>
+ #include <sys/uio.h>
diff --git a/sys-libs/liburing/files/liburing-2.3-liburing.map-Export-io_uring_-enable_rings-register_.patch b/sys-libs/liburing/files/liburing-2.3-liburing.map-Export-io_uring_-enable_rings-register_.patch
new file mode 100644
index 000000000000..8ea4c4df2b8a
--- /dev/null
+++ b/sys-libs/liburing/files/liburing-2.3-liburing.map-Export-io_uring_-enable_rings-register_.patch
@@ -0,0 +1,35 @@
+From 19424b0baa5999918701e1972b901b0937331581 Mon Sep 17 00:00:00 2001
+From: Ammar Faizi <ammarfaizi2@gnuweeb.org>
+Date: Sat, 14 Jan 2023 10:54:05 +0700
+Subject: [PATCH] liburing.map: Export
+ `io_uring_{enable_rings,register_restrictions}`
+
+When adding these two functions, Stefano didn't add
+io_uring_enable_rings() and io_uring_register_restrictions() to
+liburing.map. It causes a linking problem. Add them to liburing.map.
+
+This issue hits liburing 2.0 to 2.3.
+
+[flow: backport to liburing 2.3]
+
+Closes: https://github.com/axboe/liburing/pull/774
+Fixes: https://github.com/axboe/liburing/issues/773
+Fixes: https://github.com/facebook/folly/issues/1908
+Fixes: d2654b1ac886 ("Add helper to enable rings")
+Fixes: 25cf9b968a27 ("Add helper to register restrictions")
+Cc: Dylan Yudaken <dylany@meta.com>
+Cc: Stefano Garzarella <sgarzare@redhat.com>
+Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
+Link: https://lore.kernel.org/r/20230114035405.429608-1-ammar.faizi@intel.com
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+--- a/src/liburing.map
++++ b/src/liburing.map
+@@ -68,2 +68,5 @@ LIBURING_2.3 {
+ io_uring_submit_and_get_events;
++
++ io_uring_enable_rings;
++ io_uring_register_restrictions;
+ } LIBURING_2.3;
+--
+2.39.1
+
diff --git a/sys-libs/liburing/files/liburing-2.3-remove-error-from-error_h-for-portability.patch b/sys-libs/liburing/files/liburing-2.3-remove-error-from-error_h-for-portability.patch
new file mode 100644
index 000000000000..0f2933a10bb4
--- /dev/null
+++ b/sys-libs/liburing/files/liburing-2.3-remove-error-from-error_h-for-portability.patch
@@ -0,0 +1,150 @@
+From 11dc64a71558948aef16730cb363e7e5da773a5b Mon Sep 17 00:00:00 2001
+From: Steffen <steffen.winter@proton.me>
+Date: Mon, 13 Feb 2023 17:32:16 +0100
+Subject: [PATCH 1/3] Add custom error function for tests.
+
+On musl systems, liburing cannot build examples and tests due to
+it's usage of error.h. t_error calls fprintf(stderr, ...) and
+exits.
+
+Closes: #786
+
+Signed-off-by: Steffen Winter <steffen.winter@proton.me>
+--- a/test/helpers.c
++++ b/test/helpers.c
+@@ -8,6 +8,7 @@
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#include <stdarg.h>
+ #include <sys/types.h>
+
+ #include <arpa/inet.h>
+@@ -300,3 +301,20 @@ unsigned __io_uring_flush_sq(struct io_uring *ring)
+ */
+ return tail - *sq->khead;
+ }
++
++/*
++ * Implementation of error(3), prints an error message and exits.
++ */
++void t_error(int status, int errnum, const char *format, ...)
++{
++ va_list args;
++ va_start(args, format);
++
++ vfprintf(stderr, format, args);
++ if (errnum)
++ fprintf(stderr, ": %s", strerror(errnum));
++
++ fprintf(stderr, "\n");
++ va_end(args);
++ exit(status);
++}
+--- a/test/helpers.h
++++ b/test/helpers.h
+@@ -89,6 +89,8 @@ unsigned __io_uring_flush_sq(struct io_uring *ring);
+
+ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
++void t_error(int status, int errnum, const char *format, ...);
++
+ #ifdef __cplusplus
+ }
+ #endif
+
+From 3b0b4976d7da2e4616fe860fb7a8e52d88d4523b Mon Sep 17 00:00:00 2001
+From: Steffen <steffen.winter@proton.me>
+Date: Mon, 13 Feb 2023 17:56:03 +0100
+Subject: [PATCH 2/3] test: Use t_error instead of glibc's error.
+
+On musl systems, liburing cannot build examples and tests due to
+it's usage of error.h. Replacing calls to error() with t_error().
+
+Closes: #786
+
+Signed-off-by: Steffen Winter <steffen.winter@proton.me>
+--- a/test/defer-taskrun.c
++++ b/test/defer-taskrun.c
+@@ -4,7 +4,6 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
+ #include <sys/eventfd.h>
+ #include <signal.h>
+ #include <poll.h>
+--- a/test/send-zerocopy.c
++++ b/test/send-zerocopy.c
+@@ -4,7 +4,6 @@
+ #include <stdint.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
+ #include <limits.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+--- a/test/single-issuer.c
++++ b/test/single-issuer.c
+@@ -5,7 +5,6 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <fcntl.h>
+-#include <error.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+
+@@ -56,13 +55,13 @@ static int try_submit(struct io_uring *ring)
+ return ret;
+
+ if (ret != 1)
+- error(1, ret, "submit %i", ret);
++ t_error(1, ret, "submit %i", ret);
+ ret = io_uring_wait_cqe(ring, &cqe);
+ if (ret)
+- error(1, ret, "wait fail %i", ret);
++ t_error(1, ret, "wait fail %i", ret);
+
+ if (cqe->res || cqe->user_data != 42)
+- error(1, ret, "invalid cqe");
++ t_error(1, ret, "invalid cqe");
+
+ io_uring_cqe_seen(ring, cqe);
+ return 0;
+@@ -105,7 +104,7 @@ int main(int argc, char *argv[])
+ ret = io_uring_queue_init(8, &ring, IORING_SETUP_SINGLE_ISSUER |
+ IORING_SETUP_R_DISABLED);
+ if (ret)
+- error(1, ret, "ring init (2) %i", ret);
++ t_error(1, ret, "ring init (2) %i", ret);
+
+ if (!fork_t()) {
+ io_uring_enable_rings(&ring);
+@@ -121,7 +120,7 @@ int main(int argc, char *argv[])
+ ret = io_uring_queue_init(8, &ring, IORING_SETUP_SINGLE_ISSUER |
+ IORING_SETUP_R_DISABLED);
+ if (ret)
+- error(1, ret, "ring init (3) %i", ret);
++ t_error(1, ret, "ring init (3) %i", ret);
+
+ io_uring_enable_rings(&ring);
+ if (!fork_t()) {
+@@ -136,7 +135,7 @@ int main(int argc, char *argv[])
+ /* test that anyone can submit to a SQPOLL|SINGLE_ISSUER ring */
+ ret = io_uring_queue_init(8, &ring, IORING_SETUP_SINGLE_ISSUER|IORING_SETUP_SQPOLL);
+ if (ret)
+- error(1, ret, "ring init (4) %i", ret);
++ t_error(1, ret, "ring init (4) %i", ret);
+
+ ret = try_submit(&ring);
+ if (ret) {
+@@ -156,7 +155,7 @@ int main(int argc, char *argv[])
+ /* test that IORING_ENTER_REGISTERED_RING doesn't break anything */
+ ret = io_uring_queue_init(8, &ring, IORING_SETUP_SINGLE_ISSUER);
+ if (ret)
+- error(1, ret, "ring init (5) %i", ret);
++ t_error(1, ret, "ring init (5) %i", ret);
+
+ if (!fork_t()) {
+ ret = try_submit(&ring);
+
diff --git a/sys-libs/liburing/files/liburing-2.5-lld-17.patch b/sys-libs/liburing/files/liburing-2.5-lld-17.patch
new file mode 100644
index 000000000000..1e31f94959b1
--- /dev/null
+++ b/sys-libs/liburing/files/liburing-2.5-lld-17.patch
@@ -0,0 +1,26 @@
+https://bugs.gentoo.org/919780
+https://github.com/axboe/liburing/commit/92b21aa1b4ea98e322c5eca9db1d94b837f4be75
+
+(Rebased.)
+
+From 92b21aa1b4ea98e322c5eca9db1d94b837f4be75 Mon Sep 17 00:00:00 2001
+From: Jens Axboe <axboe@kernel.dk>
+Date: Mon, 11 Dec 2023 13:14:54 -0700
+Subject: [PATCH] Rename ffi io_uring_prep_sock_cmd _> io_uring_prep_cmd_sock()
+
+The non-ffi versions already use this name, and to make this as painless
+as it can be, rename the ffi version even though it is technically
+the better one. The documentation also matches prep_cmd_sock().
+
+Link: https://github.com/axboe/liburing/issues/1013
+Fixes: 2459fef09411 ("io_uring_prep_cmd: Create a new helper for command ops")
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+--- a/src/liburing-ffi.map
++++ b/src/liburing-ffi.map
+@@ -179,5 +179,5 @@ LIBURING_2.4 {
+ LIBURING_2.5 {
+ global:
+ io_uring_queue_init_mem;
+- io_uring_prep_sock_cmd;
++ io_uring_prep_cmd_sock;
+ } LIBURING_2.4;
diff --git a/sys-libs/liburing/files/liburing-2.5-print-libgcc-file-name.patch b/sys-libs/liburing/files/liburing-2.5-print-libgcc-file-name.patch
new file mode 100644
index 000000000000..bedc6897b901
--- /dev/null
+++ b/sys-libs/liburing/files/liburing-2.5-print-libgcc-file-name.patch
@@ -0,0 +1,43 @@
+From https://github.com/axboe/liburing/commit/09b8ded9686f33f1044ad8c612f2281b865cd314 Mon Sep 17 00:00:00 2001
+From: Violet Purcell <vimproved@inventati.org>
+Date: Sat, 16 Dec 2023 16:17:09 -0500
+Subject: [PATCH] Link against libgcc based on output of
+ -print-libgcc-file-name
+
+GCC and clang have the -print-libgcc-file-name option to automatically
+print out the correct compiler runtime library to link to. This can be
+helpful in case the runtime library is named something other than libgcc
+(i.e. on a system where only LLVM's compiler-rt is used), or if libgcc
+is in a non-standard directory. If the option fails for whatever reason,
+fall back to using "-lgcc".
+
+Signed-off-by: Violet Purcell <vimproved@inventati.org>
+--- a/configure
++++ b/configure
+@@ -202,6 +202,15 @@ print_and_output_mak "relativelibdir" "$relativelibdir"
+ print_and_output_mak "mandir" "$mandir"
+ print_and_output_mak "datadir" "$datadir"
+
++####################################################
++# Check for correct compiler runtime library to link with
++libgcc_link_flag="-lgcc"
++if $cc -print-libgcc-file-name >/dev/null 2>&1; then
++ libgcc_link_flag="$($cc $CFLAGS $LDFLAGS -print-libgcc-file-name)"
++fi
++print_and_output_mak "libgcc_link_flag" "$libgcc_link_flag"
++####################################################
++
+ ##########################################
+ # check for compiler -Wstringop-overflow
+ stringop_overflow="no"
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -47,7 +47,7 @@ ifeq ($(CONFIG_NOLIBC),y)
+ liburing_srcs += nolibc.c
+ override CFLAGS += -nostdlib -nodefaultlibs -ffreestanding -fno-builtin -fno-stack-protector
+ override CPPFLAGS += -nostdlib -nodefaultlibs -ffreestanding -fno-builtin -fno-stack-protector
+- override LINK_FLAGS += -nostdlib -nodefaultlibs -lgcc
++ override LINK_FLAGS += -nostdlib -nodefaultlibs $(libgcc_link_flag)
+ endif
+
+ override CPPFLAGS += -MT "$@" -MMD -MP -MF "$@.d"
diff --git a/sys-libs/liburing/liburing-2.1-r2.ebuild b/sys-libs/liburing/liburing-2.1-r2.ebuild
new file mode 100644
index 000000000000..2c652078fe04
--- /dev/null
+++ b/sys-libs/liburing/liburing-2.1-r2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2022 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://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86"
+fi
+LICENSE="MIT"
+SLOT="0/2" # liburing.so major version
+
+IUSE="static-libs"
+# fsync test hangs forever
+RESTRICT="test"
+
+# At least installed headers need <linux/*>, bug #802516
+DEPEND=">=sys-kernel/linux-headers-5.1"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ # Upstream, bug #816798
+ "${FILESDIR}"/${P}-arm-syscall.patch
+ # Upstream, bug #829293
+ "${FILESDIR}"/${P}-gnu_source-musl-cpuset.patch
+)
+
+src_prepare() {
+ default
+
+ if [[ "${PV}" != *9999 ]] ; then
+ # Make sure pkgconfig files contain the correct version
+ # bug #809095 and #833895
+ sed -i "/^Version:/s@[[:digit:]\.]\+@${PV}@" ${PN}.spec || 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)"
+ )
+ # 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 V=1 runtests
+}
diff --git a/sys-libs/liburing/liburing-2.1.ebuild b/sys-libs/liburing/liburing-2.2.ebuild
index 268300b356e1..9869290a120e 100644
--- a/sys-libs/liburing/liburing-2.1.ebuild
+++ b/sys-libs/liburing/liburing-2.2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit multilib-minimal toolchain-funcs
@@ -12,7 +12,7 @@ if [[ "${PV}" == *9999 ]] ; then
EGIT_REPO_URI="https://github.com/axboe/liburing.git"
else
SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv sparc x86"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86"
fi
LICENSE="MIT"
SLOT="0/2" # liburing.so major version
@@ -21,13 +21,19 @@ IUSE="static-libs"
# fsync test hangs forever
RESTRICT="test"
-PATCHES=(
- # Upstream, bug #816798
- "${FILESDIR}"/${P}-arm-syscall.patch
-)
+# At least installed headers need <linux/*>, bug #802516
+DEPEND=">=sys-kernel/linux-headers-5.1"
+RDEPEND="${DEPEND}"
src_prepare() {
default
+
+ if [[ "${PV}" != *9999 ]] ; then
+ # Make sure pkgconfig files contain the correct version
+ # bug #809095 and #833895
+ sed -i "/^Version:/s@[[:digit:]\.]\+@${PV}@" ${PN}.spec || die
+ fi
+
multilib_copy_sources
}
@@ -38,9 +44,10 @@ multilib_src_configure() {
--libdevdir="${EPREFIX}/usr/$(get_libdir)"
--mandir="${EPREFIX}/usr/share/man"
--cc="$(tc-getCC)"
+ --cxx="$(tc-getCXX)"
)
# No autotools configure! "econf" will fail.
- TMPDIR="${T}" ./configure "${myconf[@]}"
+ TMPDIR="${T}" ./configure "${myconf[@]}" || die
}
multilib_src_compile() {
diff --git a/sys-libs/liburing/liburing-2.3-r4.ebuild b/sys-libs/liburing/liburing-2.3-r4.ebuild
new file mode 100644
index 000000000000..cbc51c2809dd
--- /dev/null
+++ b/sys-libs/liburing/liburing-2.3-r4.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2023 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://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc x86"
+ QA_PKGCONFIG_VERSION=${PV}
+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}"
+
+PATCHES=(
+ # https://bugs.gentoo.org/891633
+ "${FILESDIR}/${PN}-2.3-liburing.map-Export-io_uring_-enable_rings-register_.patch"
+ # https://github.com/axboe/liburing/pull/787
+ "${FILESDIR}/${PN}-2.3-remove-error-from-error_h-for-portability.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)"
+ )
+ # 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.4.ebuild b/sys-libs/liburing/liburing-2.4.ebuild
new file mode 100644
index 000000000000..ecb77ed5b823
--- /dev/null
+++ b/sys-libs/liburing/liburing-2.4.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2023 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://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ QA_PKGCONFIG_VERSION=${PV}
+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)"
+ )
+ # 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.5-r1.ebuild b/sys-libs/liburing/liburing-2.5-r1.ebuild
new file mode 100644
index 000000000000..14dd58f7e6f6
--- /dev/null
+++ b/sys-libs/liburing/liburing-2.5-r1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2023 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://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ QA_PKGCONFIG_VERSION=${PV}
+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}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-lld-17.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)"
+ )
+ # 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.5-r2.ebuild b/sys-libs/liburing/liburing-2.5-r2.ebuild
new file mode 100644
index 000000000000..29f679d0a2da
--- /dev/null
+++ b/sys-libs/liburing/liburing-2.5-r2.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2023 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://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ QA_PKGCONFIG_VERSION=${PV}
+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}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-lld-17.patch
+ "${FILESDIR}"/${P}-print-libgcc-file-name.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)"
+ )
+ # 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.5.ebuild b/sys-libs/liburing/liburing-2.5.ebuild
new file mode 100644
index 000000000000..ecb77ed5b823
--- /dev/null
+++ b/sys-libs/liburing/liburing-2.5.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2023 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://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ QA_PKGCONFIG_VERSION=${PV}
+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)"
+ )
+ # 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
index 72d3d7d1fa2a..ecb77ed5b823 100644
--- a/sys-libs/liburing/liburing-9999.ebuild
+++ b/sys-libs/liburing/liburing-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,17 +12,30 @@ if [[ "${PV}" == *9999 ]] ; then
EGIT_REPO_URI="https://github.com/axboe/liburing.git"
else
SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ QA_PKGCONFIG_VERSION=${PV}
fi
LICENSE="MIT"
SLOT="0/2" # liburing.so major version
-IUSE="static-libs"
+IUSE="examples static-libs test"
# fsync test hangs forever
-RESTRICT="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
+ fi
+
multilib_copy_sources
}
@@ -33,9 +46,10 @@ multilib_src_configure() {
--libdevdir="${EPREFIX}/usr/$(get_libdir)"
--mandir="${EPREFIX}/usr/share/man"
--cc="$(tc-getCC)"
+ --cxx="$(tc-getCXX)"
)
# No autotools configure! "econf" will fail.
- TMPDIR="${T}" ./configure "${myconf[@]}"
+ TMPDIR="${T}" ./configure "${myconf[@]}" || die
}
multilib_src_compile() {
@@ -51,5 +65,19 @@ multilib_src_install_all() {
}
multilib_src_test() {
- emake V=1 runtests
+ 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/metadata.xml b/sys-libs/liburing/metadata.xml
index 52230348c908..6107bab3f5fa 100644
--- a/sys-libs/liburing/metadata.xml
+++ b/sys-libs/liburing/metadata.xml
@@ -2,8 +2,8 @@
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>polynomial-c@gentoo.org</email>
- <name>Lars Wendler</name>
+ <name>Florian Schmaus</name>
+ <email>flow@gentoo.org</email>
</maintainer>
<upstream>
<remote-id type="github">axboe/liburing</remote-id>
diff --git a/sys-libs/libutempter/libutempter-1.2.1.ebuild b/sys-libs/libutempter/libutempter-1.2.1.ebuild
index df75fe30ee63..953cc42fcc2d 100644
--- a/sys-libs/libutempter/libutempter-1.2.1.ebuild
+++ b/sys-libs/libutempter/libutempter-1.2.1.ebuild
@@ -11,7 +11,7 @@ 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 ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="static-libs"
RDEPEND="
diff --git a/sys-libs/libuuid/libuuid-1.0.3.ebuild b/sys-libs/libuuid/libuuid-1.0.3-r1.ebuild
index 7a1c16dc0192..fe50ffb5bf2f 100644
--- a/sys-libs/libuuid/libuuid-1.0.3.ebuild
+++ b/sys-libs/libuuid/libuuid-1.0.3-r1.ebuild
@@ -1,18 +1,17 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
inherit libtool
DESCRIPTION="Portable uuid C library"
-HOMEPAGE="http://libuuid.sourceforge.net/"
+HOMEPAGE="https://libuuid.sourceforge.io/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE=""
+KEYWORDS="~x64-solaris"
DEPEND="!!sys-apps/util-linux
!!sys-libs/native-uuid"
@@ -29,5 +28,5 @@ src_configure() {
src_install() {
default
- rm -f "${ED}"/usr/lib/*.la || die
+ find "${ED}" -name "*.la" -delete || die
}
diff --git a/sys-libs/libvpd/Manifest b/sys-libs/libvpd/Manifest
index 908a68bb41b4..3e825ef8afde 100644
--- a/sys-libs/libvpd/Manifest
+++ b/sys-libs/libvpd/Manifest
@@ -1 +1 @@
-DIST libvpd-2.2.8.tar.gz 52725 BLAKE2B 76bdc6ddf80236a6848185273c2cac181d44214f0c609d7c5af6fa4d09a7cd816324af35745617ce3daa7268311e2ed754335600df1d4970a324eb327015d051 SHA512 d0b7d1760c6ae54717c538405c651317b7318dec5780961f5386c09b7d245e35a84c2fc47d89c47c3cd2168d73d7186f5819981d52c3ba962514639833dc62aa
+DIST libvpd-2.2.9.tar.gz 53747 BLAKE2B c8898e2f604431b74bf5e10fc99e7a9b5540b825f2a996776109a2b2b636f732ff8d9f7956ffea1231e5b023e285eee641a873a68fcd8a2d6a6d9e64c5ab3b18 SHA512 e32a80e0f3aaedbaaac64dbdedfee7eeb2e7a7b6d2d737bca4678d26caadab77032a7c26211a5fc3caed3724488bc8fa99620ceac05f8d156ca90f4452cfaf0a
diff --git a/sys-libs/libvpd/files/2.2.8-gcc11.patch b/sys-libs/libvpd/files/2.2.8-gcc11.patch
deleted file mode 100644
index 7e09f8329bba..000000000000
--- a/sys-libs/libvpd/files/2.2.8-gcc11.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 83ccb994e30364c0703d7b8c15817d56b42da2e6 Mon Sep 17 00:00:00 2001
-From: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
-Date: Wed, 7 Apr 2021 14:11:41 +0530
-Subject: [PATCH] Remove dynamic exception specification
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Tomasz KÅ‚oczko reported that the build fails, while compiling
-with GCC 11:
-
-In file included from src/vpdretriever.cpp:25:
-./src/libvpd-2/vpdretriever.hpp:62:33: error: ISO C++17 does not allow dynamic exception specifications
- 62 | throw( VpdException& );
- | ^~~~~
-./src/libvpd-2/vpdretriever.hpp:74:33: error: ISO C++17 does not allow dynamic exception specifications
- 74 | throw( VpdException& );
- | ^~~~~
-src/vpdretriever.cpp:50:37: error: ISO C++17 does not allow dynamic exception specifications
- 50 | string dbFileName ) throw( VpdException& )
- | ^~~~~
-src/vpdretriever.cpp:62:39: error: ISO C++17 does not allow dynamic exception specifications
- 62 | VpdRetriever::VpdRetriever( ) throw( VpdException& )
- | ^~~~~
-make: *** [Makefile:660: src/vpdretriever.lo] Error 1
-
-As part of
-http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html,
-the dynamic exception specification have been removed. Remove the
-throw specifier, to specify that the function might throw an exception.
-
-Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
-Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
----
- src/libvpd-2/vpdretriever.hpp | 6 ++----
- src/vpdretriever.cpp | 4 ++--
- 2 files changed, 4 insertions(+), 6 deletions(-)
-
-diff --git a/src/libvpd-2/vpdretriever.hpp b/src/libvpd-2/vpdretriever.hpp
-index 0d91ac4..1be2664 100644
---- a/src/libvpd-2/vpdretriever.hpp
-+++ b/src/libvpd-2/vpdretriever.hpp
-@@ -58,8 +58,7 @@ namespace lsvpd
- * @param dbFileName
- * The file name for the VPD database.
- */
-- VpdRetriever( string envDir, string dbFileName )
-- throw( VpdException& );
-+ VpdRetriever( string envDir, string dbFileName );
-
- /**
- * Builds A VpdRetriever object that can be used for reading the
-@@ -70,8 +69,7 @@ namespace lsvpd
- * this constructor, there were serious underlying issues that
- * are not recoverable. Uses the default dir and filename
- */
-- VpdRetriever( )
-- throw( VpdException& );
-+ VpdRetriever( );
- ~VpdRetriever( );
-
- /**
-diff --git a/src/vpdretriever.cpp b/src/vpdretriever.cpp
-index 9f7e7a0..470047e 100644
---- a/src/vpdretriever.cpp
-+++ b/src/vpdretriever.cpp
-@@ -47,7 +47,7 @@ namespace lsvpd
- const string VpdRetriever::UDEV_NOTIFY_FILE ( "/run/run.vpdupdate" );
-
- VpdRetriever::VpdRetriever( string envDir,
-- string dbFileName ) throw( VpdException& )
-+ string dbFileName )
- {
- try {
- db = new VpdDbEnv( envDir, dbFileName, true );
-@@ -59,7 +59,7 @@ namespace lsvpd
- }
- }
-
-- VpdRetriever::VpdRetriever( ) throw( VpdException& )
-+ VpdRetriever::VpdRetriever( )
- {
- struct stat vpd_stat,udev_stat;
- const string vpddb = VpdRetriever::DEFAULT_DIR + VpdRetriever::DEFAULT_FILE;
diff --git a/sys-libs/libvpd/files/2.2.8-warnings.patch b/sys-libs/libvpd/files/2.2.8-warnings.patch
deleted file mode 100644
index 1419de3dda49..000000000000
--- a/sys-libs/libvpd/files/2.2.8-warnings.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 72b75e1976b50372f07271a5235ee8e9c75bdac4 Mon Sep 17 00:00:00 2001
-From: Kamalesh Babulal <kamalesh@linux.ibm.com>
-Date: Mon, 21 Jun 2021 11:42:02 +0530
-Subject: [PATCH] vpddbenv_c: fix compile warnings
-
-src/vpddbenv_c.c: In function 'new_vpddbenv':
-src/vpddbenv_c.c:56:17: warning: 'strncat' specified bound 1 equals source length [-Wstringop-overflow=]
- 56 | strncat( ret->fullPath, "/" , 1 );
- | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-src/vpddbenv_c.c:58:17: warning: 'strncat' accessing between 258 and 9223372036854775804 bytes at offsets 514 and 257 may overlap 1 byte at offset 514 [-Wrestrict]
- 58 | strncat( ret->fullPath, ret->dbFileName, strlen(ret->dbFileName) );
- |
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-While compiling the code with GCC-11 (Fedora 34), the GCC complains
-about src string length and N bytes mentioned in the strncat() are of
-same length. It gets suspicious, when strncat() mimics strcat(), the
-strcat() was replaced using strncat() by the commit 38de4e65205
-("libvpd: Convert strcat to strncat") as part of secure coding.
-
-refactor the code using snprintf(), making the code lean and keep the
-GCC happy as well.
-
-Signed-off-by: Kamalesh Babulal <kamalesh@linux.ibm.com>
-Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
----
- src/vpddbenv_c.c | 12 ++++--------
- 1 file changed, 4 insertions(+), 8 deletions(-)
-
-diff --git a/src/vpddbenv_c.c b/src/vpddbenv_c.c
-index 96aecd3..bae36e9 100644
---- a/src/vpddbenv_c.c
-+++ b/src/vpddbenv_c.c
-@@ -50,14 +50,10 @@ struct vpddbenv * new_vpddbenv( const char *dir, const char *file )
- ret->dbFileName[MAX_NAME_LENGTH] = '\0';
- }
-
-- strncpy( ret->fullPath, ret->envDir , FULL_PATH_SIZE - 1);
--
-- if (strlen(ret->fullPath) + 1 < FULL_PATH_SIZE)
-- strncat( ret->fullPath, "/" , 1 );
-- if (strlen(ret->fullPath) + strlen(ret->dbFileName) < FULL_PATH_SIZE)
-- strncat( ret->fullPath, ret->dbFileName, strlen (ret->dbFileName) );
--
-- ret->fullPath[FULL_PATH_SIZE - 1] = '\0';
-+ if ( ( strlen( ret->envDir ) + strlen( ret->dbFileName ) + 1 ) <
-+ FULL_PATH_SIZE )
-+ snprintf( ret->fullPath, FULL_PATH_SIZE,
-+ "%s/%s", ret->envDir, ret->dbFileName );
-
- rc = sqlite3_open( ret->fullPath, &(ret->db) );
- if( rc != SQLITE_OK )
diff --git a/sys-libs/libvpd/libvpd-2.2.8-r1.ebuild b/sys-libs/libvpd/libvpd-2.2.9.ebuild
index 3b69e327edd6..8d0128e92307 100644
--- a/sys-libs/libvpd/libvpd-2.2.8-r1.ebuild
+++ b/sys-libs/libvpd/libvpd-2.2.9.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit autotools udev
DESCRIPTION="Library implementation for listing Vital Product Data"
@@ -9,7 +9,7 @@ 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"
+SLOT="0/3"
KEYWORDS="ppc ppc64"
DEPEND="
@@ -18,11 +18,6 @@ DEPEND="
"
RDEPEND="${DEPEND}"
-PATCHES=(
- "${FILESDIR}/2.2.8-gcc11.patch"
- "${FILESDIR}/2.2.8-warnings.patch"
-)
-
src_prepare() {
default
eautoreconf
diff --git a/sys-libs/libvpd/metadata.xml b/sys-libs/libvpd/metadata.xml
index 2219560b548b..079cdb9aa6f0 100644
--- a/sys-libs/libvpd/metadata.xml
+++ b/sys-libs/libvpd/metadata.xml
@@ -3,9 +3,10 @@
<pkgmetadata>
<maintainer type="project">
<email>ppc@gentoo.org</email>
- <name>Gentoo Linux PowerPC Development</name>
+ <name>PowerPC architecture team</name>
</maintainer>
<upstream>
- <remote-id type="sourceforge">linux-diag</remote-id>
+ <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
index 02dbaeba5293..416fefe5b930 100644
--- a/sys-libs/libxcrypt/Manifest
+++ b/sys-libs/libxcrypt/Manifest
@@ -1,4 +1 @@
-DIST libxcrypt-4.4.20-autotools.tar.xz 628688 BLAKE2B 4c23af2a765495758e52c8e95d53d1c1d911fea011375160c4f10e468939734fcc7198cc327fafa4d5c90afa6d4c56dfe6d1b56c2c17bbc015b44cffcd7bcc8b SHA512 5b7504e9d83df12af7d11864e88d1034ed9ce0a837ef061044c5c7fe603d7f3e5613ddf20b30613a7943735120cd058f2117401d59879afcba34ce0e48ae62ee
-DIST libxcrypt-4.4.25-autotools.tar.xz 614652 BLAKE2B f0f4fbf92585fdd8d328aaa68811ea15bdf75778363ea4bc46a75fb76bb065f044708446d655356ebbf2834f8b14bac40fbe700b510b09ce101f750667a04298 SHA512 30f38a54c8e5cbd31c463223913079f9869d38ed38a2f64c57778ac4cf1b6f557caa527073df54ca8396bb7220807b84afcae2f9790f6604af1561a4b277874e
-DIST libxcrypt-4.4.26-autotools.tar.xz 617808 BLAKE2B 9fb8e31b22a085c0d0d5ab2ee3fb69fbebaccee2281e9be7d745218b5b92d949ffd3aa9c385671d58c93a654e16b943a33284b0b4737d52d26e43e2f7840fe74 SHA512 22c72cacd87c5751c4160413738fdf52c8fee300dcad01b289a6eaf892439883b9478103f791f5f53c8e5e2f2dd81057e5fda45e7cf7fdfd3ba93dd811bc01e3
-DIST libxcrypt-4.4.27-autotools.tar.xz 619240 BLAKE2B 13dd5730fded0684c8e7321fee8a786663ff1080a6ca248bd718c4f6c9f6bd2853689c347be9f9ae51ebc1281aaa2143dfc020149382d259e7eefe66ac8b675e SHA512 f13ae1e69bf5850abb47a28f9ac3e3b0a8b3123adc53d39fd39a26d53847bf6e3fdca751e086cd80ce4e5d9ee419b09148c247cbe5f663b3019b66f82cdc5f5c
+DIST libxcrypt-4.4.36-autotools.tar.xz 624660 BLAKE2B 8dc3d0f354baf8c64dc011e95e7df10d48b0dfe428503936ffd55edf2745de04003c7efe231ed5d9a14cea7f682ba377b7e00f0463b4060c50c9c29f555b790f SHA512 fb8391ecb89622eb0d74d13c5fc1369718e83c47671449044ca0c2f78a236d7b06177a60bf8cda47694caa840c68eaaf0b23690e8975fa5d64b734c8eb246d10
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.20.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.20.ebuild
deleted file mode 100644
index 9d57697c9416..000000000000
--- a/sys-libs/libxcrypt/libxcrypt-4.4.20.ebuild
+++ /dev/null
@@ -1,206 +0,0 @@
-# Copyright 2004-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-# NEED_BOOTSTRAP is for developers to quickly generate a tarball
-# for publishing to the tree.
-NEED_BOOTSTRAP="no"
-inherit multibuild multilib python-any-r1 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/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-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 ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="+compat split-usr static-libs system test"
-REQUIRED_USE="split-usr? ( system )"
-RESTRICT="!test? ( test )"
-
-DEPEND="system? (
- elibc_glibc? ( sys-libs/glibc[-crypt(+)] )
- !sys-libs/musl
- )"
-RDEPEND="${DEPEND}"
-BDEPEND="dev-lang/perl
- test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') )"
-
-python_check_deps() {
- has_version -b "dev-python/passlib[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- MULTIBUILD_VARIANTS=(
- $(usex compat 'xcrypt_compat' '')
- xcrypt_nocompat
- )
-
- use test && python-any-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # WARNING: Please read on bumping or applying patches!
- #
- # There are two circular dependencies to be aware of:
- # 1)
- # if we're bootstrapping configure and makefiles:
- # libxcrypt -> automake -> perl -> libxcrypt
- #
- # mitigation:
- # toolchain@ manually runs `make dist` after running autoconf + `./configure`
- # and the ebuild uses that.
- # (Don't include the pre-generated Perl artefacts.)
- #
- # solution for future:
- # Upstream are working on producing `make dist` tarballs.
- # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573
- #
- # 2)
- # configure *unconditionally* needs Perl at build time to generate
- # a list of enabled algorithms based on the set passed to `configure`:
- # libxcrypt -> perl -> libxcrypt
- #
- # mitigation:
- # None at the moment.
- #
- # solution for future:
- # Not possible right now. Upstream intend on depending on Perl for further
- # configuration options.
- # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573
- #
- # Therefore, on changes (inc. bumps):
- # * You must check whether upstream have started providing tarballs with bootstrapped
- # auto{conf,make};
- #
- # * diff the build system changes!
- #
- if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then
- # Facilitate our split variant build for compat + non-compat
- eapply "${FILESDIR}"/${PN}-4.4.19-multibuild.patch
- eautoreconf
- fi
-}
-
-src_configure() {
- multibuild_foreach_variant multilib-minimal_src_configure
-}
-
-get_xclibdir() {
- printf -- "%s/%s/%s\n" \
- "$(usex split-usr '' '/usr')" \
- "$(get_libdir)" \
- "$(usex system '' 'xcrypt')"
-}
-
-multilib_src_configure() {
- local -a myconf=(
- --disable-werror
- --libdir="${EPREFIX}"$(get_xclibdir)
- --with-pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
- --includedir="${EPREFIX}/usr/include/$(usex system '' 'xcrypt')"
- )
-
- 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() {
- multibuild_foreach_variant multilib-minimal_src_compile
-}
-
-multilib_src_test() {
- emake check
-}
-
-src_test() {
- multibuild_foreach_variant multilib-minimal_src_test
-}
-
-src_install() {
- multibuild_foreach_variant multilib-minimal_src_install
-
- (
- shopt -s failglob || die "failglob failed"
-
- # Make sure our man pages do not collide with glibc or man-pages.
- for manpage in "${ED}"/usr/share/man/man3/crypt{,_r}.?*; do
- mv -n "${manpage}" "$(dirname "${manpage}")/xcrypt_$(basename "${manpage}")" \
- || die "mv failed"
- done
- ) || die "failglob error"
-
- # Remove useless stuff from installation
- find "${ED}"/usr/share/doc/${PF} -type l -delete || die
- find "${ED}" -name '*.la' -delete || die
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- # Don't install the libcrypt.so symlink for the "compat" version
- case "${MULTIBUILD_ID}" in
- xcrypt_compat-*)
- rm "${ED}"$(get_xclibdir)/libcrypt$(get_libname) \
- || die "failed to remove extra compat libraries"
- ;;
- xcrypt_nocompat-*)
- if use split-usr; then
- (
- if use static-libs; then
- # .a files are installed to /$(get_libdir) by default
- # Move static libraries to /usr prefix or portage will abort
- shopt -s nullglob || die "failglob failed"
- static_libs=( "${ED}"/$(get_xclibdir)/*.a )
-
- if [[ -n ${static_libs[*]} ]]; then
- dodir "/usr/$(get_xclibdir)"
- mv "${static_libs[@]}" "${ED}/usr/$(get_xclibdir)" \
- || die "Moving static libs failed"
- fi
- fi
-
- if use system; then
- # Move versionless .so symlinks from /$(get_libdir) to /usr/$(get_libdir)
- # to allow linker to correctly find shared libraries.
- shopt -s failglob || die "failglob failed"
-
- for lib_file in "${ED}"$(get_xclibdir)/*$(get_libname); do
- lib_file_basename="$(basename "${lib_file}")"
- lib_file_target="$(basename "$(readlink -f "${lib_file}")")"
- dosym "../../$(get_libdir)/${lib_file_target}" "/usr/$(get_xclibdir)/${lib_file_basename}"
- done
-
- rm "${ED}"$(get_xclibdir)/*$(get_libname) || die "Removing symlinks in incorrect location failed"
- fi
- )
- fi
- ;;
- *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
- esac
-}
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.25-r1.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild
index c9559428437e..700cbf7866ee 100644
--- a/sys-libs/libxcrypt/libxcrypt-4.4.25-r1.ebuild
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild
@@ -1,44 +1,62 @@
-# Copyright 2004-2022 Gentoo Authors
+# Copyright 2004-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{10..11} )
# NEED_BOOTSTRAP is for developers to quickly generate a tarball
# for publishing to the tree.
NEED_BOOTSTRAP="no"
-inherit multibuild multilib python-any-r1 toolchain-funcs multilib-minimal
+inherit multibuild multilib python-any-r1 flag-o-matic toolchain-funcs multilib-minimal
DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others"
HOMEPAGE="https://github.com/besser82/libxcrypt"
if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then
inherit autotools
- SRC_URI="https://github.com/besser82/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ 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 ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="+compat split-usr static-libs system test"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="+compat split-usr static-libs +system test headers-only"
REQUIRED_USE="split-usr? ( system )"
RESTRICT="!test? ( test )"
-DEPEND="system? (
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+is_cross() {
+ local enabled_abis=( $(multilib_get_enabled_abis) )
+ [[ "${#enabled_abis[@]}" -le 1 ]] && [[ ${CHOST} != ${CTARGET} ]]
+}
+
+DEPEND="
+ system? (
elibc_glibc? (
- sys-libs/glibc[-crypt(+)]
- !sys-libs/glibc[crypt(+)]
+ ${CATEGORY}/glibc[-crypt(-)]
+ !${CATEGORY}/glibc[crypt(-)]
+ )
+ elibc_musl? (
+ ${CATEGORY}/musl[-crypt(+)]
+ !${CATEGORY}/musl[crypt(+)]
)
- !sys-libs/musl
)
"
RDEPEND="${DEPEND}"
-BDEPEND="dev-lang/perl
- test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') )"
+BDEPEND="
+ dev-lang/perl
+ test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') )
+"
python_check_deps() {
- has_version -b "dev-python/passlib[${PYTHON_USEDEP}]"
+ python_has_version "dev-python/passlib[${PYTHON_USEDEP}]"
}
pkg_pretend() {
@@ -54,7 +72,7 @@ pkg_pretend() {
pkg_setup() {
MULTIBUILD_VARIANTS=(
- $(usex compat 'xcrypt_compat' '')
+ $(usev compat 'xcrypt_compat')
xcrypt_nocompat
)
@@ -111,24 +129,68 @@ src_configure() {
# bug #821496
tc-ld-disable-gold
+ # Doesn't work with LTO: bug #852917.
+ # https://github.com/besser82/libxcrypt/issues/24
+ filter-lto
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
multibuild_foreach_variant multilib-minimal_src_configure
}
+get_xcprefix() {
+ if is_cross; then
+ echo "${EPREFIX}/usr/${CTARGET}"
+ else
+ echo "${EPREFIX}"
+ fi
+}
+
get_xclibdir() {
- printf -- "%s/%s/%s\n" \
- "$(usex split-usr '' '/usr')" \
+ printf -- "%s/%s/%s/%s\n" \
+ "$(get_xcprefix)" \
+ "$(usev !split-usr '/usr')" \
"$(get_libdir)" \
- "$(usex system '' 'xcrypt')"
+ "$(usev !system 'xcrypt')"
+}
+
+get_xcincludedir() {
+ printf -- "%s/usr/include/%s\n" \
+ "$(get_xcprefix)" \
+ "$(usev !system 'xcrypt')"
+}
+
+get_xcmandir() {
+ printf -- "%s/usr/share/man\n" \
+ "$(get_xcprefix)"
+}
+
+get_xcpkgconfigdir() {
+ printf -- "%s/usr/%s/pkgconfig\n" \
+ "$(get_xcprefix)" \
+ "$(get_libdir)"
}
multilib_src_configure() {
local -a myconf=(
+ --host=${CTARGET}
--disable-werror
- --libdir="${EPREFIX}"$(get_xclibdir)
- --with-pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
- --includedir="${EPREFIX}/usr/include/$(usex system '' 'xcrypt')"
+ --libdir=$(get_xclibdir)
+ --with-pkgconfigdir=$(get_xcpkgconfigdir)
+ --includedir=$(get_xcincludedir)
+ --mandir="$(get_xcmandir)"
)
+ tc-export PKG_CONFIG
+
+ if is_cross; then
+ if tc-is-clang; then
+ export CC="${CTARGET}-clang"
+ else
+ export CC="${CTARGET}-gcc"
+ fi
+ fi
+
case "${MULTIBUILD_ID}" in
xcrypt_compat-*)
myconf+=(
@@ -146,10 +208,18 @@ multilib_src_configure() {
*) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
esac
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
+ if use headers-only; then
+ # Nothing is compiled here which would affect the headers for the target.
+ # So forcing CC is sane.
+ headers_only_flags="CC=$(tc-getBUILD_CC)"
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" "${headers_only_flags}"
}
src_compile() {
+ use headers-only && return
+
multibuild_foreach_variant multilib-minimal_src_compile
}
@@ -164,11 +234,12 @@ src_test() {
src_install() {
multibuild_foreach_variant multilib-minimal_src_install
+ use headers-only || \
(
shopt -s failglob || die "failglob failed"
# Make sure our man pages do not collide with glibc or man-pages.
- for manpage in "${ED}"/usr/share/man/man3/crypt{,_r}.?*; do
+ for manpage in "${D}$(get_xcmandir)"/man3/crypt{,_r}.?*; do
mv -n "${manpage}" "$(dirname "${manpage}")/xcrypt_$(basename "${manpage}")" \
|| die "mv failed"
done
@@ -177,15 +248,27 @@ src_install() {
# Remove useless stuff from installation
find "${ED}"/usr/share/doc/${PF} -type l -delete || die
find "${ED}" -name '*.la' -delete || die
+
+ # workaround broken upstream cross-* --docdir by installing files in proper locations
+ if is_cross; then
+ insinto "$(get_xcprefix)"/usr/share
+ doins -r "${ED}"/usr/share/doc
+ rm -r "${ED}"/usr/share/doc || die
+ fi
}
multilib_src_install() {
+ if use headers-only; then
+ emake DESTDIR="${D}" install-nodist_includeHEADERS
+ return
+ fi
+
emake DESTDIR="${D}" install
# Don't install the libcrypt.so symlink for the "compat" version
case "${MULTIBUILD_ID}" in
xcrypt_compat-*)
- rm "${ED}"$(get_xclibdir)/libcrypt$(get_libname) \
+ rm "${D}"$(get_xclibdir)/libcrypt$(get_libname) \
|| die "failed to remove extra compat libraries"
;;
xcrypt_nocompat-*)
@@ -195,7 +278,7 @@ multilib_src_install() {
# .a files are installed to /$(get_libdir) by default
# Move static libraries to /usr prefix or portage will abort
shopt -s nullglob || die "failglob failed"
- static_libs=( "${ED}"/$(get_xclibdir)/*.a )
+ static_libs=( "${D}"/$(get_xclibdir)/*.a )
if [[ -n ${static_libs[*]} ]]; then
dodir "/usr/$(get_xclibdir)"
@@ -209,13 +292,19 @@ multilib_src_install() {
# to allow linker to correctly find shared libraries.
shopt -s failglob || die "failglob failed"
- for lib_file in "${ED}"$(get_xclibdir)/*$(get_libname); do
+ for lib_file in "${D}"$(get_xclibdir)/*$(get_libname); do
lib_file_basename="$(basename "${lib_file}")"
lib_file_target="$(basename "$(readlink -f "${lib_file}")")"
- dosym "../../$(get_libdir)/${lib_file_target}" "/usr/$(get_xclibdir)/${lib_file_basename}"
+
+ # We already know we're in split-usr (checked above)
+ # See bug #843209 (also worth keeping in mind bug #802222 too)
+ local libdir_no_prefix=$(get_xclibdir)
+ libdir_no_prefix=${libdir_no_prefix#${EPREFIX}}
+ libdir_no_prefix=${libdir_no_prefix%/usr}
+ dosym -r "/$(get_libdir)/${lib_file_target}" "/usr/${libdir_no_prefix}/${lib_file_basename}"
done
- rm "${ED}"$(get_xclibdir)/*$(get_libname) || die "Removing symlinks in incorrect location failed"
+ rm "${D}"$(get_xclibdir)/*$(get_libname) || die "Removing symlinks in incorrect location failed"
fi
)
fi
@@ -223,3 +312,24 @@ multilib_src_install() {
*) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
esac
}
+
+pkg_preinst() {
+ # Verify we're not in a bad case like bug #843209 with broken symlinks.
+ # This can be dropped when, if ever, the split-usr && system && compat case
+ # is cleaned up in *_src_install.
+ local broken_symlinks=()
+ mapfile -d '' broken_symlinks < <(
+ find "${ED}" -xtype l -print0
+ )
+
+ if [[ ${#broken_symlinks[@]} -gt 0 ]]; then
+ eerror "Broken symlinks found before merging!"
+ local symlink target resolved
+ for symlink in "${broken_symlinks[@]}" ; do
+ target="$(readlink "${symlink}")"
+ resolved="$(readlink -f "${symlink}")"
+ eerror " '${symlink}' -> '${target}' (${resolved})"
+ done
+ die "Broken symlinks found! Aborting to avoid damaging system. Please report a bug."
+ fi
+}
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.27.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.36-r3.ebuild
index 9bebb1243fee..550e7631a094 100644
--- a/sys-libs/libxcrypt/libxcrypt-4.4.27.ebuild
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.36-r3.ebuild
@@ -1,44 +1,49 @@
-# Copyright 2004-2022 Gentoo Authors
+# Copyright 2004-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{10..12} )
# NEED_BOOTSTRAP is for developers to quickly generate a tarball
# for publishing to the tree.
NEED_BOOTSTRAP="no"
-inherit multibuild multilib python-any-r1 toolchain-funcs multilib-minimal
+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/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ 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 ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="+compat split-usr static-libs system test"
-REQUIRED_USE="split-usr? ( system )"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+IUSE="+compat static-libs +system test headers-only"
RESTRICT="!test? ( test )"
-DEPEND="system? (
+DEPEND="
+ system? (
elibc_glibc? (
- sys-libs/glibc[-crypt(+)]
- !sys-libs/glibc[crypt(+)]
+ ${CATEGORY}/glibc[-crypt(-)]
+ !${CATEGORY}/glibc[crypt(-)]
+ )
+ elibc_musl? (
+ ${CATEGORY}/musl[-crypt(+)]
+ !${CATEGORY}/musl[crypt(+)]
)
- !sys-libs/musl
)
"
RDEPEND="${DEPEND}"
-BDEPEND="dev-lang/perl
- test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') )"
+BDEPEND="
+ dev-lang/perl
+ test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') )
+"
python_check_deps() {
- has_version -b "dev-python/passlib[${PYTHON_USEDEP}]"
+ python_has_version "dev-python/passlib[${PYTHON_USEDEP}]"
}
pkg_pretend() {
@@ -53,12 +58,7 @@ pkg_pretend() {
}
pkg_setup() {
- MULTIBUILD_VARIANTS=(
- $(usex compat 'xcrypt_compat' '')
- xcrypt_nocompat
- )
-
- use test && python-any-r1_pkg_setup
+ :
}
src_prepare() {
@@ -107,28 +107,69 @@ src_prepare() {
}
src_configure() {
+ MULTIBUILD_VARIANTS=(
+ $(usev compat 'xcrypt_compat')
+ xcrypt_nocompat
+ )
+
+ MYPREFIX=${EPREFIX}
+ MYSYSROOT=${ESYSROOT}
+
+ if target_is_not_host; then
+ local CHOST=${CTARGET}
+
+ MYPREFIX=
+ MYSYSROOT=${ESYSROOT}/usr/${CTARGET}
+
+ # Ensure we get compatible libdir
+ unset DEFAULT_ABI MULTILIB_ABIS
+ multilib_env
+ ABI=${DEFAULT_ABI}
+
+ tc-getCC >/dev/null
+ if [[ ${CC} != ${CHOST}-* ]]; then
+ unset CC
+ tc-getCC >/dev/null
+ fi
+
+ strip-unsupported-flags
+ fi
+
+ if use headers-only; then
+ # Nothing is compiled here which would affect the headers for the target.
+ # So forcing CC is sane.
+ local -x CC="$(tc-getBUILD_CC)"
+ fi
+
# Avoid possible "illegal instruction" errors with gold
# bug #821496
tc-ld-disable-gold
- multibuild_foreach_variant multilib-minimal_src_configure
-}
+ # Doesn't work with LTO: bug #852917.
+ # https://github.com/besser82/libxcrypt/issues/24
+ filter-lto
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-get_xclibdir() {
- printf -- "%s/%s/%s\n" \
- "$(usex split-usr '' '/usr')" \
- "$(get_libdir)" \
- "$(usex system '' 'xcrypt')"
+ if use test; then
+ python_setup
+ fi
+
+ multibuild_foreach_variant multilib-minimal_src_configure
}
multilib_src_configure() {
- local -a myconf=(
+ local myconf=(
--disable-werror
- --libdir="${EPREFIX}"$(get_xclibdir)
- --with-pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
- --includedir="${EPREFIX}/usr/include/$(usex system '' 'xcrypt')"
+ --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+=(
@@ -142,7 +183,7 @@ multilib_src_configure() {
--enable-obsolete-api=no
$(use_enable static-libs static)
)
- ;;
+ ;;
*) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
esac
@@ -150,6 +191,8 @@ multilib_src_configure() {
}
src_compile() {
+ use headers-only && return
+
multibuild_foreach_variant multilib-minimal_src_compile
}
@@ -162,64 +205,50 @@ src_test() {
}
src_install() {
- multibuild_foreach_variant multilib-minimal_src_install
-
- (
- shopt -s failglob || die "failglob failed"
+ local DESTDIR=${D}
+ if target_is_not_host; then
+ DESTDIR=${ED}/usr/${CTARGET}
+ fi
- # Make sure our man pages do not collide with glibc or man-pages.
- for manpage in "${ED}"/usr/share/man/man3/crypt{,_r}.?*; do
- mv -n "${manpage}" "$(dirname "${manpage}")/xcrypt_$(basename "${manpage}")" \
- || die "mv failed"
- done
- ) || die "failglob error"
+ multibuild_foreach_variant multilib-minimal_src_install
- # Remove useless stuff from installation
- find "${ED}"/usr/share/doc/${PF} -type l -delete || die
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() {
- emake DESTDIR="${D}" 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
+}
- # Don't install the libcrypt.so symlink for the "compat" version
- case "${MULTIBUILD_ID}" in
- xcrypt_compat-*)
- rm "${ED}"$(get_xclibdir)/libcrypt$(get_libname) \
- || die "failed to remove extra compat libraries"
- ;;
- xcrypt_nocompat-*)
- if use split-usr; then
- (
- if use static-libs; then
- # .a files are installed to /$(get_libdir) by default
- # Move static libraries to /usr prefix or portage will abort
- shopt -s nullglob || die "failglob failed"
- static_libs=( "${ED}"/$(get_xclibdir)/*.a )
-
- if [[ -n ${static_libs[*]} ]]; then
- dodir "/usr/$(get_xclibdir)"
- mv "${static_libs[@]}" "${ED}/usr/$(get_xclibdir)" \
- || die "Moving static libs failed"
- fi
- fi
-
- if use system; then
- # Move versionless .so symlinks from /$(get_libdir) to /usr/$(get_libdir)
- # to allow linker to correctly find shared libraries.
- shopt -s failglob || die "failglob failed"
-
- for lib_file in "${ED}"$(get_xclibdir)/*$(get_libname); do
- lib_file_basename="$(basename "${lib_file}")"
- lib_file_target="$(basename "$(readlink -f "${lib_file}")")"
- dosym "../../$(get_libdir)/${lib_file_target}" "/usr/$(get_xclibdir)/${lib_file_basename}"
- done
-
- rm "${ED}"$(get_xclibdir)/*$(get_libname) || die "Removing symlinks in incorrect location failed"
- fi
- )
- fi
- ;;
- *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
- esac
+pkg_preinst() {
+ # Verify we're not in a bad case like bug #843209 with broken symlinks.
+ # This can be dropped when, if ever, the split-usr && system && compat case
+ # is cleaned up in *_src_install.
+ local broken_symlinks=()
+ mapfile -d '' broken_symlinks < <(
+ find "${ED}" -xtype l -print0
+ )
+
+ if [[ ${#broken_symlinks[@]} -gt 0 ]]; then
+ eerror "Broken symlinks found before merging!"
+ local symlink target resolved
+ for symlink in "${broken_symlinks[@]}" ; do
+ target="$(readlink "${symlink}")"
+ resolved="$(readlink -f "${symlink}")"
+ eerror " '${symlink}' -> '${target}' (${resolved})"
+ done
+ die "Broken symlinks found! Aborting to avoid damaging system. Please report a bug."
+ fi
}
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.26-r1.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.36.ebuild
index 9bebb1243fee..51562c02d41f 100644
--- a/sys-libs/libxcrypt/libxcrypt-4.4.26-r1.ebuild
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.36.ebuild
@@ -1,44 +1,62 @@
-# Copyright 2004-2022 Gentoo Authors
+# Copyright 2004-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{10..11} )
# NEED_BOOTSTRAP is for developers to quickly generate a tarball
# for publishing to the tree.
NEED_BOOTSTRAP="no"
-inherit multibuild multilib python-any-r1 toolchain-funcs multilib-minimal
+inherit multibuild multilib python-any-r1 flag-o-matic toolchain-funcs multilib-minimal
DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others"
HOMEPAGE="https://github.com/besser82/libxcrypt"
if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then
inherit autotools
- SRC_URI="https://github.com/besser82/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ 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 ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="+compat split-usr static-libs system test"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+IUSE="+compat split-usr static-libs +system test headers-only"
REQUIRED_USE="split-usr? ( system )"
RESTRICT="!test? ( test )"
-DEPEND="system? (
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+is_cross() {
+ local enabled_abis=( $(multilib_get_enabled_abis) )
+ [[ "${#enabled_abis[@]}" -le 1 ]] && [[ ${CHOST} != ${CTARGET} ]]
+}
+
+DEPEND="
+ system? (
elibc_glibc? (
- sys-libs/glibc[-crypt(+)]
- !sys-libs/glibc[crypt(+)]
+ ${CATEGORY}/glibc[-crypt(+)]
+ !${CATEGORY}/glibc[crypt(+)]
+ )
+ elibc_musl? (
+ ${CATEGORY}/musl[-crypt(+)]
+ !${CATEGORY}/musl[crypt(+)]
)
- !sys-libs/musl
)
"
RDEPEND="${DEPEND}"
-BDEPEND="dev-lang/perl
- test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') )"
+BDEPEND="
+ dev-lang/perl
+ test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') )
+"
python_check_deps() {
- has_version -b "dev-python/passlib[${PYTHON_USEDEP}]"
+ python_has_version "dev-python/passlib[${PYTHON_USEDEP}]"
}
pkg_pretend() {
@@ -54,7 +72,7 @@ pkg_pretend() {
pkg_setup() {
MULTIBUILD_VARIANTS=(
- $(usex compat 'xcrypt_compat' '')
+ $(usev compat 'xcrypt_compat')
xcrypt_nocompat
)
@@ -111,24 +129,73 @@ src_configure() {
# bug #821496
tc-ld-disable-gold
+ # Doesn't work with LTO: bug #852917.
+ # https://github.com/besser82/libxcrypt/issues/24
+ filter-lto
+
+ # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+ # https://github.com/gentoo/gentoo/pull/28355
+ # mold needs this too but right now tc-ld-is-mold is also not available
+ if tc-ld-is-lld; then
+ append-ldflags -Wl,--undefined-version
+ fi
+
multibuild_foreach_variant multilib-minimal_src_configure
}
+get_xcprefix() {
+ if is_cross; then
+ echo "${EPREFIX}/usr/${CTARGET}"
+ else
+ echo "${EPREFIX}"
+ fi
+}
+
get_xclibdir() {
- printf -- "%s/%s/%s\n" \
- "$(usex split-usr '' '/usr')" \
+ printf -- "%s/%s/%s/%s\n" \
+ "$(get_xcprefix)" \
+ "$(usev !split-usr '/usr')" \
"$(get_libdir)" \
- "$(usex system '' 'xcrypt')"
+ "$(usev !system 'xcrypt')"
+}
+
+get_xcincludedir() {
+ printf -- "%s/usr/include/%s\n" \
+ "$(get_xcprefix)" \
+ "$(usev !system 'xcrypt')"
+}
+
+get_xcmandir() {
+ printf -- "%s/usr/share/man\n" \
+ "$(get_xcprefix)"
+}
+
+get_xcpkgconfigdir() {
+ printf -- "%s/usr/%s/pkgconfig\n" \
+ "$(get_xcprefix)" \
+ "$(get_libdir)"
}
multilib_src_configure() {
local -a myconf=(
+ --host=${CTARGET}
--disable-werror
- --libdir="${EPREFIX}"$(get_xclibdir)
- --with-pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
- --includedir="${EPREFIX}/usr/include/$(usex system '' 'xcrypt')"
+ --libdir=$(get_xclibdir)
+ --with-pkgconfigdir=$(get_xcpkgconfigdir)
+ --includedir=$(get_xcincludedir)
+ --mandir="$(get_xcmandir)"
)
+ tc-export PKG_CONFIG
+
+ if is_cross; then
+ if tc-is-clang; then
+ export CC="${CTARGET}-clang"
+ else
+ export CC="${CTARGET}-gcc"
+ fi
+ fi
+
case "${MULTIBUILD_ID}" in
xcrypt_compat-*)
myconf+=(
@@ -146,10 +213,18 @@ multilib_src_configure() {
*) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
esac
- ECONF_SOURCE="${S}" econf "${myconf[@]}"
+ if use headers-only; then
+ # Nothing is compiled here which would affect the headers for the target.
+ # So forcing CC is sane.
+ headers_only_flags="CC=$(tc-getBUILD_CC)"
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" "${headers_only_flags}"
}
src_compile() {
+ use headers-only && return
+
multibuild_foreach_variant multilib-minimal_src_compile
}
@@ -164,11 +239,12 @@ src_test() {
src_install() {
multibuild_foreach_variant multilib-minimal_src_install
+ use headers-only || \
(
shopt -s failglob || die "failglob failed"
# Make sure our man pages do not collide with glibc or man-pages.
- for manpage in "${ED}"/usr/share/man/man3/crypt{,_r}.?*; do
+ for manpage in "${D}$(get_xcmandir)"/man3/crypt{,_r}.?*; do
mv -n "${manpage}" "$(dirname "${manpage}")/xcrypt_$(basename "${manpage}")" \
|| die "mv failed"
done
@@ -177,15 +253,27 @@ src_install() {
# Remove useless stuff from installation
find "${ED}"/usr/share/doc/${PF} -type l -delete || die
find "${ED}" -name '*.la' -delete || die
+
+ # workaround broken upstream cross-* --docdir by installing files in proper locations
+ if is_cross; then
+ insinto "$(get_xcprefix)"/usr/share
+ doins -r "${ED}"/usr/share/doc
+ rm -r "${ED}"/usr/share/doc || die
+ fi
}
multilib_src_install() {
+ if use headers-only; then
+ emake DESTDIR="${D}" install-nodist_includeHEADERS
+ return
+ fi
+
emake DESTDIR="${D}" install
# Don't install the libcrypt.so symlink for the "compat" version
case "${MULTIBUILD_ID}" in
xcrypt_compat-*)
- rm "${ED}"$(get_xclibdir)/libcrypt$(get_libname) \
+ rm "${D}"$(get_xclibdir)/libcrypt$(get_libname) \
|| die "failed to remove extra compat libraries"
;;
xcrypt_nocompat-*)
@@ -195,7 +283,7 @@ multilib_src_install() {
# .a files are installed to /$(get_libdir) by default
# Move static libraries to /usr prefix or portage will abort
shopt -s nullglob || die "failglob failed"
- static_libs=( "${ED}"/$(get_xclibdir)/*.a )
+ static_libs=( "${D}"/$(get_xclibdir)/*.a )
if [[ -n ${static_libs[*]} ]]; then
dodir "/usr/$(get_xclibdir)"
@@ -209,13 +297,19 @@ multilib_src_install() {
# to allow linker to correctly find shared libraries.
shopt -s failglob || die "failglob failed"
- for lib_file in "${ED}"$(get_xclibdir)/*$(get_libname); do
+ for lib_file in "${D}"$(get_xclibdir)/*$(get_libname); do
lib_file_basename="$(basename "${lib_file}")"
lib_file_target="$(basename "$(readlink -f "${lib_file}")")"
- dosym "../../$(get_libdir)/${lib_file_target}" "/usr/$(get_xclibdir)/${lib_file_basename}"
+
+ # We already know we're in split-usr (checked above)
+ # See bug #843209 (also worth keeping in mind bug #802222 too)
+ local libdir_no_prefix=$(get_xclibdir)
+ libdir_no_prefix=${libdir_no_prefix#${EPREFIX}}
+ libdir_no_prefix=${libdir_no_prefix%/usr}
+ dosym -r "/$(get_libdir)/${lib_file_target}" "/usr/${libdir_no_prefix}/${lib_file_basename}"
done
- rm "${ED}"$(get_xclibdir)/*$(get_libname) || die "Removing symlinks in incorrect location failed"
+ rm "${D}"$(get_xclibdir)/*$(get_libname) || die "Removing symlinks in incorrect location failed"
fi
)
fi
@@ -223,3 +317,24 @@ multilib_src_install() {
*) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
esac
}
+
+pkg_preinst() {
+ # Verify we're not in a bad case like bug #843209 with broken symlinks.
+ # This can be dropped when, if ever, the split-usr && system && compat case
+ # is cleaned up in *_src_install.
+ local broken_symlinks=()
+ mapfile -d '' broken_symlinks < <(
+ find "${ED}" -xtype l -print0
+ )
+
+ if [[ ${#broken_symlinks[@]} -gt 0 ]]; then
+ eerror "Broken symlinks found before merging!"
+ local symlink target resolved
+ for symlink in "${broken_symlinks[@]}" ; do
+ target="$(readlink "${symlink}")"
+ resolved="$(readlink -f "${symlink}")"
+ eerror " '${symlink}' -> '${target}' (${resolved})"
+ done
+ die "Broken symlinks found! Aborting to avoid damaging system. Please report a bug."
+ fi
+}
diff --git a/sys-libs/libxcrypt/metadata.xml b/sys-libs/libxcrypt/metadata.xml
index 6b56e023623a..cef5e501f632 100644
--- a/sys-libs/libxcrypt/metadata.xml
+++ b/sys-libs/libxcrypt/metadata.xml
@@ -12,7 +12,8 @@
</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 sys-libs/glibc's version)</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.</flag>
</use>
<upstream>
<remote-id type="github">besser82/libxcrypt</remote-id>
diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest
index dd7644d62981..bd71f2e58a68 100644
--- a/sys-libs/llvm-libunwind/Manifest
+++ b/sys-libs/llvm-libunwind/Manifest
@@ -1,4 +1,10 @@
-DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
-DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
-DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
-DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1
+DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
+DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
+DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
+DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
+DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
+DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29
+DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386
+DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1
+DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-11.1.0.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-11.1.0.ebuild
deleted file mode 100644
index 98002383aafb..000000000000
--- a/sys-libs/llvm-libunwind/llvm-libunwind-11.1.0.ebuild
+++ /dev/null
@@ -1,124 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{7..9} )
-inherit cmake-multilib llvm llvm.org python-any-r1
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~ppc64 ~riscv x86 ~x64-macos"
-IUSE="debug static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="!sys-libs/libunwind"
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-LLVM_COMPONENTS=( libunwind )
-LLVM_TEST_COMPONENTS=( libcxx{,abi} llvm/cmake )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- local libdir=$(get_libdir)
-
- local mycmakeargs=(
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
- -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
- -DLLVM_INCLUDE_TESTS=$(usex test)
-
- # support non-native unwinding; given it's small enough,
- # enable it unconditionally
- -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
- )
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
- )
- fi
-
- cmake_src_configure
-}
-
-build_libcxxabi() {
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxxabi
- local BUILD_DIR=${BUILD_DIR}/libcxxabi
- local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=
- -DLIBCXXABI_ENABLE_SHARED=OFF
- -DLIBCXXABI_ENABLE_STATIC=ON
- -DLIBCXXABI_USE_LLVM_UNWINDER=ON
- -DLIBCXXABI_INCLUDE_TESTS=OFF
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include
- )
-
- cmake_src_configure
- cmake_src_compile
-}
-
-build_libcxx() {
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/libcxxabi/lib -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXXABI_USE_LLVM_UNWINDER=ON
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}"/libcxxabi/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- )
-
- cmake_src_configure
- cmake_src_compile
-}
-
-multilib_src_test() {
- # build local copies of libc++ & libc++abi for testing to avoid
- # circular deps
- build_libcxxabi
- build_libcxx
- mv "${BUILD_DIR}"/libcxx*/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
-
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-unwind
-}
-
-multilib_src_install() {
- cmake_src_install
-
- # install headers like sys-libs/libunwind
- doheader "${S}"/include/*.h
-}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-12.0.1.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-12.0.1.ebuild
deleted file mode 100644
index a91bfc24114b..000000000000
--- a/sys-libs/llvm-libunwind/llvm-libunwind-12.0.1.ebuild
+++ /dev/null
@@ -1,138 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~x64-macos"
-IUSE="debug static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="!sys-libs/libunwind"
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-LLVM_COMPONENTS=( libunwind libcxx llvm/cmake/modules )
-LLVM_TEST_COMPONENTS=( libcxxabi )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- local use_compiler_rt=OFF
- local libdir=$(get_libdir)
-
- # link to compiler-rt
- # https://github.com/gentoo/gentoo/pull/21516
- if tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LD_FLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- use_compiler_rt=ON
- fi
- fi
-
- local mycmakeargs=(
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
- -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
- -DLLVM_INCLUDE_TESTS=$(usex test)
-
- # support non-native unwinding; given it's small enough,
- # enable it unconditionally
- -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
-
- # avoid dependency on libgcc_s if compiler-rt is used
- -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
- )
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
- )
- fi
-
- cmake_src_configure
-}
-
-build_libcxxabi() {
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxxabi
- local BUILD_DIR=${BUILD_DIR}/libcxxabi
- local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=
- -DLIBCXXABI_ENABLE_SHARED=OFF
- -DLIBCXXABI_ENABLE_STATIC=ON
- -DLIBCXXABI_USE_LLVM_UNWINDER=ON
- -DLIBCXXABI_INCLUDE_TESTS=OFF
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include
- )
-
- cmake_src_configure
- cmake_src_compile
-}
-
-build_libcxx() {
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/libcxxabi/lib -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXXABI_USE_LLVM_UNWINDER=ON
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}"/libcxxabi/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- )
-
- cmake_src_configure
- cmake_src_compile
-}
-
-multilib_src_test() {
- # build local copies of libc++ & libc++abi for testing to avoid
- # circular deps
- build_libcxxabi
- build_libcxx
- mv "${BUILD_DIR}"/libcxx*/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
-
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-unwind
-}
-
-multilib_src_install() {
- cmake_src_install
-
- # install headers like sys-libs/libunwind
- doheader "${S}"/include/*.h
-}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.ebuild
deleted file mode 100644
index 607404341462..000000000000
--- a/sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.ebuild
+++ /dev/null
@@ -1,142 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~x64-macos"
-IUSE="debug static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="!sys-libs/libunwind"
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-LLVM_COMPONENTS=( libunwind libcxx llvm/cmake )
-LLVM_TEST_COMPONENTS=( libcxxabi )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- local use_compiler_rt=OFF
- local libdir=$(get_libdir)
-
- # link to compiler-rt
- # https://github.com/gentoo/gentoo/pull/21516
- if tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LD_FLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- use_compiler_rt=ON
- fi
- fi
-
- local mycmakeargs=(
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
- -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
- -DLIBUNWIND_TARGET_TRIPLE="${CHOST}"
- -DLLVM_INCLUDE_TESTS=$(usex test)
-
- # support non-native unwinding; given it's small enough,
- # enable it unconditionally
- -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
-
- # avoid dependency on libgcc_s if compiler-rt is used
- -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
- )
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
- )
- fi
-
- cmake_src_configure
-}
-
-wrap_libcxxabi() {
- local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=
- -DLIBCXXABI_ENABLE_SHARED=OFF
- -DLIBCXXABI_ENABLE_STATIC=ON
- -DLIBCXXABI_USE_LLVM_UNWINDER=ON
- -DLIBCXXABI_INCLUDE_TESTS=OFF
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include
- )
-
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxxabi
- local BUILD_DIR=${BUILD_DIR}/libcxxabi
-
- "${@}"
-}
-
-wrap_libcxx() {
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXXABI_USE_LLVM_UNWINDER=ON
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}"/libcxxabi/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- )
-
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/libcxxabi/lib -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
-
- "${@}"
-}
-
-multilib_src_test() {
- # build local copies of libc++ & libc++abi for testing to avoid
- # circular deps
- wrap_libcxx cmake_src_configure
- wrap_libcxx cmake_build generate-cxx-headers
- wrap_libcxxabi cmake_src_configure
- wrap_libcxxabi cmake_src_compile
- wrap_libcxx cmake_src_compile
- mv "${BUILD_DIR}"/libcxx*/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
-
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-unwind
-}
-
-multilib_src_install() {
- cmake_src_install
-
- # install headers like sys-libs/libunwind
- doheader "${S}"/include/*.h
-}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-13.0.1.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-13.0.1.9999.ebuild
deleted file mode 100644
index b2e400ff295b..000000000000
--- a/sys-libs/llvm-libunwind/llvm-libunwind-13.0.1.9999.ebuild
+++ /dev/null
@@ -1,142 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="debug static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="!sys-libs/libunwind"
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-LLVM_COMPONENTS=( libunwind libcxx llvm/cmake )
-LLVM_TEST_COMPONENTS=( libcxxabi )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- local use_compiler_rt=OFF
- local libdir=$(get_libdir)
-
- # link to compiler-rt
- # https://github.com/gentoo/gentoo/pull/21516
- if tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LD_FLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- use_compiler_rt=ON
- fi
- fi
-
- local mycmakeargs=(
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
- -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
- -DLIBUNWIND_TARGET_TRIPLE="${CHOST}"
- -DLLVM_INCLUDE_TESTS=$(usex test)
-
- # support non-native unwinding; given it's small enough,
- # enable it unconditionally
- -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
-
- # avoid dependency on libgcc_s if compiler-rt is used
- -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
- )
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
- )
- fi
-
- cmake_src_configure
-}
-
-wrap_libcxxabi() {
- local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=
- -DLIBCXXABI_ENABLE_SHARED=OFF
- -DLIBCXXABI_ENABLE_STATIC=ON
- -DLIBCXXABI_USE_LLVM_UNWINDER=ON
- -DLIBCXXABI_INCLUDE_TESTS=OFF
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include
- )
-
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxxabi
- local BUILD_DIR=${BUILD_DIR}/libcxxabi
-
- "${@}"
-}
-
-wrap_libcxx() {
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXXABI_USE_LLVM_UNWINDER=ON
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}"/libcxxabi/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- )
-
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/libcxxabi/lib -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
-
- "${@}"
-}
-
-multilib_src_test() {
- # build local copies of libc++ & libc++abi for testing to avoid
- # circular deps
- wrap_libcxx cmake_src_configure
- wrap_libcxx cmake_build generate-cxx-headers
- wrap_libcxxabi cmake_src_configure
- wrap_libcxxabi cmake_src_compile
- wrap_libcxx cmake_src_compile
- mv "${BUILD_DIR}"/libcxx*/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
-
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-unwind
-}
-
-multilib_src_install() {
- cmake_src_install
-
- # install headers like sys-libs/libunwind
- doheader "${S}"/include/*.h
-}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-13.0.1_rc3.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-13.0.1_rc3.ebuild
deleted file mode 100644
index bc5a62c6434a..000000000000
--- a/sys-libs/llvm-libunwind/llvm-libunwind-13.0.1_rc3.ebuild
+++ /dev/null
@@ -1,142 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="debug static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="!sys-libs/libunwind"
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-LLVM_COMPONENTS=( libunwind libcxx llvm/cmake )
-LLVM_TEST_COMPONENTS=( libcxxabi )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- local use_compiler_rt=OFF
- local libdir=$(get_libdir)
-
- # link to compiler-rt
- # https://github.com/gentoo/gentoo/pull/21516
- if tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LD_FLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- use_compiler_rt=ON
- fi
- fi
-
- local mycmakeargs=(
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
- -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
- -DLIBUNWIND_TARGET_TRIPLE="${CHOST}"
- -DLLVM_INCLUDE_TESTS=$(usex test)
-
- # support non-native unwinding; given it's small enough,
- # enable it unconditionally
- -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
-
- # avoid dependency on libgcc_s if compiler-rt is used
- -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
- )
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
- -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
- )
- fi
-
- cmake_src_configure
-}
-
-wrap_libcxxabi() {
- local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=
- -DLIBCXXABI_ENABLE_SHARED=OFF
- -DLIBCXXABI_ENABLE_STATIC=ON
- -DLIBCXXABI_USE_LLVM_UNWINDER=ON
- -DLIBCXXABI_INCLUDE_TESTS=OFF
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include
- )
-
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxxabi
- local BUILD_DIR=${BUILD_DIR}/libcxxabi
-
- "${@}"
-}
-
-wrap_libcxx() {
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXXABI_USE_LLVM_UNWINDER=ON
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}"/libcxxabi/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- )
-
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/libcxxabi/lib -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
-
- "${@}"
-}
-
-multilib_src_test() {
- # build local copies of libc++ & libc++abi for testing to avoid
- # circular deps
- wrap_libcxx cmake_src_configure
- wrap_libcxx cmake_build generate-cxx-headers
- wrap_libcxxabi cmake_src_configure
- wrap_libcxxabi cmake_src_compile
- wrap_libcxx cmake_src_compile
- mv "${BUILD_DIR}"/libcxx*/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
-
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-unwind
-}
-
-multilib_src_install() {
- cmake_src_install
-
- # install headers like sys-libs/libunwind
- doheader "${S}"/include/*.h
-}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-14.0.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-14.0.0.9999.ebuild
deleted file mode 100644
index a9e274cc99af..000000000000
--- a/sys-libs/llvm-libunwind/llvm-libunwind-14.0.0.9999.ebuild
+++ /dev/null
@@ -1,141 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="debug static-libs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="!sys-libs/libunwind"
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
- )"
-
-LLVM_COMPONENTS=( libunwind libcxx llvm/cmake cmake )
-LLVM_TEST_COMPONENTS=( libcxxabi )
-llvm.org_set_globals
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- use test && python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
- local use_compiler_rt=OFF
- local libdir=$(get_libdir)
-
- # link to compiler-rt
- # https://github.com/gentoo/gentoo/pull/21516
- if tc-is-clang; then
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
- ${LD_FLAGS} -print-libgcc-file-name)
- if [[ ${compiler_rt} == *libclang_rt* ]]; then
- use_compiler_rt=ON
- fi
- fi
-
- local mycmakeargs=(
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
- -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
- -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
- -DLIBUNWIND_INSTALL_HEADERS=ON
- -DLIBUNWIND_TARGET_TRIPLE="${CHOST}"
- -DLLVM_INCLUDE_TESTS=$(usex test)
-
- # support non-native unwinding; given it's small enough,
- # enable it unconditionally
- -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
-
- # avoid dependency on libgcc_s if compiler-rt is used
- -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
- )
- if use test; then
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
- )
- fi
-
- cmake_src_configure
-
- if use test; then
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- # meh, we need to override the compiler explicitly
- sed -e "/%{cxx}/s@, '.*'@, '${clang_path}'@" \
- -i "${BUILD_DIR}"/test/lit.site.cfg || die
- fi
-}
-
-wrap_libcxxabi() {
- local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=
- -DLIBCXXABI_ENABLE_SHARED=OFF
- -DLIBCXXABI_ENABLE_STATIC=ON
- -DLIBCXXABI_USE_LLVM_UNWINDER=ON
- -DLIBCXXABI_INCLUDE_TESTS=OFF
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include
- )
-
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxxabi
- local BUILD_DIR=${BUILD_DIR}/libcxxabi
-
- "${@}"
-}
-
-wrap_libcxx() {
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}"/libcxxabi/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- -DLIBCXX_INCLUDE_BENCHMARKS=OFF
- )
-
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
-
- "${@}"
-}
-
-multilib_src_test() {
- # build local copies of libc++ & libc++abi for testing to avoid
- # circular deps
- wrap_libcxx cmake_src_configure
- wrap_libcxx cmake_build generate-cxx-headers
- wrap_libcxxabi cmake_src_configure
- wrap_libcxxabi cmake_src_compile
- wrap_libcxx cmake_src_compile
- mv "${BUILD_DIR}"/libcxx*/lib/libc++* "${BUILD_DIR}/lib/" || die
-
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-unwind
-}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-15.0.7.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-15.0.7.ebuild
new file mode 100644
index 000000000000..4623b458be97
--- /dev/null
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-15.0.7.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \
+ toolchain-funcs
+
+DESCRIPTION="C++ runtime stack unwinder from LLVM"
+HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv sparc x86 ~x64-macos"
+IUSE="+clang debug static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !sys-libs/libunwind
+"
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( libcxxabi llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ local libdir=$(get_libdir)
+
+ # https://github.com/llvm/llvm-project/issues/56825
+ # also separately bug #863917
+ filter-lto
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ # https://github.com/gentoo/gentoo/pull/21516
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libunwind"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
+ -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ -DLIBUNWIND_INCLUDE_TESTS=$(usex test)
+ -DLIBUNWIND_INSTALL_HEADERS=ON
+
+ # support non-native unwinding; given it's small enough,
+ # enable it unconditionally
+ -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
+
+ # avoid dependency on libgcc_s if compiler-rt is used
+ -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
+
+ -DLIBCXXABI_LIBDIR_SUFFIX=
+ -DLIBCXXABI_ENABLE_SHARED=OFF
+ -DLIBCXXABI_ENABLE_STATIC=ON
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -DLIBCXXABI_INCLUDE_TESTS=OFF
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=OFF
+ -DLIBCXX_ENABLE_STATIC=ON
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ )
+ fi
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-unwind
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-unwind
+}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-16.0.6-r1.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-16.0.6-r1.ebuild
new file mode 100644
index 000000000000..e61b9836b074
--- /dev/null
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-16.0.6-r1.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \
+ toolchain-funcs
+
+DESCRIPTION="C++ runtime stack unwinder from LLVM"
+HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv sparc x86 ~arm64-macos ~x64-macos"
+IUSE="+clang debug static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !sys-libs/libunwind
+"
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( libcxxabi llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ local libdir=$(get_libdir)
+
+ # https://github.com/llvm/llvm-project/issues/56825
+ # also separately bug #863917
+ filter-lto
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ # https://github.com/gentoo/gentoo/pull/21516
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # Respect upstream build type assumptions (bug #910436) where they do:
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=ON =>
+ # -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG
+ # -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=OFF =>
+ # -UNDEBUG
+ # See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
+ use debug || append-cppflags -DNDEBUG
+
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libunwind"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
+ -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ -DLIBUNWIND_INCLUDE_TESTS=$(usex test)
+ -DLIBUNWIND_INSTALL_HEADERS=ON
+
+ # support non-native unwinding; given it's small enough,
+ # enable it unconditionally
+ -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
+
+ # avoid dependency on libgcc_s if compiler-rt is used
+ -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
+
+ -DLIBCXXABI_LIBDIR_SUFFIX=
+ -DLIBCXXABI_ENABLE_SHARED=OFF
+ -DLIBCXXABI_ENABLE_STATIC=ON
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -DLIBCXXABI_INCLUDE_TESTS=OFF
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=OFF
+ -DLIBCXX_ENABLE_STATIC=ON
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ )
+ fi
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-unwind
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-unwind
+}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-17.0.6.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-17.0.6.ebuild
new file mode 100644
index 000000000000..e61b9836b074
--- /dev/null
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-17.0.6.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \
+ toolchain-funcs
+
+DESCRIPTION="C++ runtime stack unwinder from LLVM"
+HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv sparc x86 ~arm64-macos ~x64-macos"
+IUSE="+clang debug static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !sys-libs/libunwind
+"
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( libcxxabi llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ local libdir=$(get_libdir)
+
+ # https://github.com/llvm/llvm-project/issues/56825
+ # also separately bug #863917
+ filter-lto
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ # https://github.com/gentoo/gentoo/pull/21516
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # Respect upstream build type assumptions (bug #910436) where they do:
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=ON =>
+ # -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG
+ # -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=OFF =>
+ # -UNDEBUG
+ # See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
+ use debug || append-cppflags -DNDEBUG
+
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libunwind"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
+ -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ -DLIBUNWIND_INCLUDE_TESTS=$(usex test)
+ -DLIBUNWIND_INSTALL_HEADERS=ON
+
+ # support non-native unwinding; given it's small enough,
+ # enable it unconditionally
+ -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
+
+ # avoid dependency on libgcc_s if compiler-rt is used
+ -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
+
+ -DLIBCXXABI_LIBDIR_SUFFIX=
+ -DLIBCXXABI_ENABLE_SHARED=OFF
+ -DLIBCXXABI_ENABLE_STATIC=ON
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -DLIBCXXABI_INCLUDE_TESTS=OFF
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=OFF
+ -DLIBCXX_ENABLE_STATIC=ON
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ )
+ fi
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-unwind
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-unwind
+}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-18.1.4.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-18.1.4.ebuild
new file mode 100644
index 000000000000..944fc4144f4e
--- /dev/null
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-18.1.4.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="C++ runtime stack unwinder from LLVM"
+HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~arm64-macos ~x64-macos"
+IUSE="+clang debug static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !sys-libs/libunwind
+"
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( libcxxabi llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+multilib_src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ local libdir=$(get_libdir)
+
+ # https://github.com/llvm/llvm-project/issues/56825
+ # also separately bug #863917
+ filter-lto
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ # https://github.com/gentoo/gentoo/pull/21516
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # Respect upstream build type assumptions (bug #910436) where they do:
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=ON =>
+ # -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG
+ # -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=OFF =>
+ # -UNDEBUG
+ # See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
+ use debug || append-cppflags -DNDEBUG
+
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libunwind"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
+ -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ -DLIBUNWIND_INCLUDE_TESTS=$(usex test)
+ -DLIBUNWIND_INSTALL_HEADERS=ON
+
+ # support non-native unwinding; given it's small enough,
+ # enable it unconditionally
+ -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
+
+ # avoid dependency on libgcc_s if compiler-rt is used
+ -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
+
+ -DLIBCXXABI_LIBDIR_SUFFIX=
+ -DLIBCXXABI_ENABLE_SHARED=OFF
+ -DLIBCXXABI_ENABLE_STATIC=ON
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -DLIBCXXABI_INCLUDE_TESTS=OFF
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=OFF
+ -DLIBCXX_ENABLE_STATIC=ON
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ )
+ fi
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-unwind
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-unwind
+}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-19.0.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..df7d3e6095bc
--- /dev/null
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-19.0.0.9999.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="C++ runtime stack unwinder from LLVM"
+HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+IUSE="+clang +debug static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !sys-libs/libunwind
+"
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( libcxxabi llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+multilib_src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ local libdir=$(get_libdir)
+
+ # https://github.com/llvm/llvm-project/issues/56825
+ # also separately bug #863917
+ filter-lto
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ # https://github.com/gentoo/gentoo/pull/21516
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # Respect upstream build type assumptions (bug #910436) where they do:
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=ON =>
+ # -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG
+ # -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=OFF =>
+ # -UNDEBUG
+ # See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
+ use debug || append-cppflags -DNDEBUG
+
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libunwind"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
+ -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ -DLIBUNWIND_INCLUDE_TESTS=$(usex test)
+ -DLIBUNWIND_INSTALL_HEADERS=ON
+
+ # support non-native unwinding; given it's small enough,
+ # enable it unconditionally
+ -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
+
+ # avoid dependency on libgcc_s if compiler-rt is used
+ -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
+
+ -DLIBCXXABI_LIBDIR_SUFFIX=
+ -DLIBCXXABI_ENABLE_SHARED=OFF
+ -DLIBCXXABI_ENABLE_STATIC=ON
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -DLIBCXXABI_INCLUDE_TESTS=OFF
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=OFF
+ -DLIBCXX_ENABLE_STATIC=ON
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ )
+ fi
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-unwind
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-unwind
+}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-19.0.0_pre20240410.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-19.0.0_pre20240410.ebuild
new file mode 100644
index 000000000000..df7d3e6095bc
--- /dev/null
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-19.0.0_pre20240410.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="C++ runtime stack unwinder from LLVM"
+HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+IUSE="+clang +debug static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !sys-libs/libunwind
+"
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( libcxxabi llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+multilib_src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ local libdir=$(get_libdir)
+
+ # https://github.com/llvm/llvm-project/issues/56825
+ # also separately bug #863917
+ filter-lto
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ # https://github.com/gentoo/gentoo/pull/21516
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # Respect upstream build type assumptions (bug #910436) where they do:
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=ON =>
+ # -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG
+ # -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=OFF =>
+ # -UNDEBUG
+ # See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
+ use debug || append-cppflags -DNDEBUG
+
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libunwind"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
+ -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ -DLIBUNWIND_INCLUDE_TESTS=$(usex test)
+ -DLIBUNWIND_INSTALL_HEADERS=ON
+
+ # support non-native unwinding; given it's small enough,
+ # enable it unconditionally
+ -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
+
+ # avoid dependency on libgcc_s if compiler-rt is used
+ -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
+
+ -DLIBCXXABI_LIBDIR_SUFFIX=
+ -DLIBCXXABI_ENABLE_SHARED=OFF
+ -DLIBCXXABI_ENABLE_STATIC=ON
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -DLIBCXXABI_INCLUDE_TESTS=OFF
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=OFF
+ -DLIBCXX_ENABLE_STATIC=ON
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ )
+ fi
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-unwind
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-unwind
+}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-19.0.0_pre20240420.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-19.0.0_pre20240420.ebuild
new file mode 100644
index 000000000000..df7d3e6095bc
--- /dev/null
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-19.0.0_pre20240420.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="C++ runtime stack unwinder from LLVM"
+HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+IUSE="+clang +debug static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !sys-libs/libunwind
+"
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( libcxxabi llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+multilib_src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ local libdir=$(get_libdir)
+
+ # https://github.com/llvm/llvm-project/issues/56825
+ # also separately bug #863917
+ filter-lto
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ # https://github.com/gentoo/gentoo/pull/21516
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # Respect upstream build type assumptions (bug #910436) where they do:
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=ON =>
+ # -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG
+ # -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG
+ # -DLIBUNWIND_ENABLE_ASSERTIONS=OFF =>
+ # -UNDEBUG
+ # See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
+ use debug || append-cppflags -DNDEBUG
+
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libunwind"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
+ -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ -DLIBUNWIND_INCLUDE_TESTS=$(usex test)
+ -DLIBUNWIND_INSTALL_HEADERS=ON
+
+ # support non-native unwinding; given it's small enough,
+ # enable it unconditionally
+ -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
+
+ # avoid dependency on libgcc_s if compiler-rt is used
+ -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
+
+ -DLIBCXXABI_LIBDIR_SUFFIX=
+ -DLIBCXXABI_ENABLE_SHARED=OFF
+ -DLIBCXXABI_ENABLE_STATIC=ON
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -DLIBCXXABI_INCLUDE_TESTS=OFF
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=OFF
+ -DLIBCXX_ENABLE_STATIC=ON
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ )
+ fi
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-unwind
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-unwind
+}
diff --git a/sys-libs/llvm-libunwind/metadata.xml b/sys-libs/llvm-libunwind/metadata.xml
index 0c3d32050a15..9e58371ca860 100644
--- a/sys-libs/llvm-libunwind/metadata.xml
+++ b/sys-libs/llvm-libunwind/metadata.xml
@@ -5,6 +5,10 @@
<email>llvm@gentoo.org</email>
</maintainer>
<upstream>
- <remote-id type="github">llvm-mirror/libunwind</remote-id>
+ <remote-id type="github">llvm/llvm-project</remote-id>
</upstream>
+ <use>
+ <flag name="clang">Force building using installed clang (rather
+ than the default CC/CXX; required for testing).</flag>
+ </use>
</pkgmetadata>
diff --git a/sys-libs/minizip-ng/Manifest b/sys-libs/minizip-ng/Manifest
new file mode 100644
index 000000000000..f08e2bb1b3de
--- /dev/null
+++ b/sys-libs/minizip-ng/Manifest
@@ -0,0 +1,2 @@
+DIST minizip-ng-4.0.4.tar.gz 770202 BLAKE2B 5b9f4a66325de4298db0f7cdb8830050fe55c46c3914f51d7e7c4fe4cd9e080ab9658739dc936da602d67199333b6eca71218ad155244b9c04f50944486a02b1 SHA512 2662ddf90666babe73474f6fc48f5a64f276d555b7a0f04f790b9edef570cb958356e900632c3795fb2053f4813c449240ff101d32b063eca4ad869bef0546fd
+DIST minizip-ng-4.0.5.tar.gz 770078 BLAKE2B e9e416a8fae3c4e33c1fe644bbf4f3edf2becc8e8e0dfba079481c8c8fbd871c1591537c58e7aaa9b08ecee430c2acb8c1a5ee085fa8c819714fbe906876241e SHA512 760c540ccedd04c21d72ec7b41bc31a16e4291776580a6febb9400198440b3a64f39d4ba26be2608abf47b9dcc1ed266dad8bc0a8cacb607e4885c9dd05be0d6
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
new file mode 100644
index 000000000000..2a62f96f1413
--- /dev/null
+++ b/sys-libs/minizip-ng/files/minizip-ng-4.0.4-libbsd-overlay.patch
@@ -0,0 +1,16 @@
+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/e2fsprogs-libs/metadata.xml b/sys-libs/minizip-ng/metadata.xml
index ec439e44fe94..f712872be38f 100644
--- a/sys-libs/e2fsprogs-libs/metadata.xml
+++ b/sys-libs/minizip-ng/metadata.xml
@@ -5,9 +5,11 @@
<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</flag>
+ <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> for further encryption capabilities</flag>
+ </use>
<upstream>
- <remote-id type="cpe">cpe:/a:e2fsprogs_project:e2fsprogs</remote-id>
- <remote-id type="github">tytso/e2fsprogs</remote-id>
- <remote-id type="sourceforge">e2fsprogs</remote-id>
+ <remote-id type="github">zlib-ng/minizip-ng</remote-id>
</upstream>
</pkgmetadata>
diff --git a/sys-libs/minizip-ng/minizip-ng-4.0.4.ebuild b/sys-libs/minizip-ng/minizip-ng-4.0.4.ebuild
new file mode 100644
index 000000000000..d23ad9d63cb9
--- /dev/null
+++ b/sys-libs/minizip-ng/minizip-ng-4.0.4.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Worth keeping an eye on 'develop' branch upstream for possible backports,
+# 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 ~ppc64 ~riscv ~x86"
+IUSE="compat 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}]
+ app-arch/xz-utils
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
+ sys-libs/zlib-ng[${MULTILIB_USEDEP}]
+ virtual/libiconv
+ compat? ( !sys-libs/zlib[minizip] )
+ 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=ON
+ -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
+}
+
+multilib_src_install_all() {
+ if ! use compat && use test ; then
+ # Test binaries, bug #874591
+ rm "${ED}"/usr/bin/minigzip || die
+ rm "${ED}"/usr/bin/minizip-ng || die
+ fi
+}
+
+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.5.ebuild b/sys-libs/minizip-ng/minizip-ng-4.0.5.ebuild
new file mode 100644
index 000000000000..d23ad9d63cb9
--- /dev/null
+++ b/sys-libs/minizip-ng/minizip-ng-4.0.5.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Worth keeping an eye on 'develop' branch upstream for possible backports,
+# 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 ~ppc64 ~riscv ~x86"
+IUSE="compat 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}]
+ app-arch/xz-utils
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
+ sys-libs/zlib-ng[${MULTILIB_USEDEP}]
+ virtual/libiconv
+ compat? ( !sys-libs/zlib[minizip] )
+ 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=ON
+ -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
+}
+
+multilib_src_install_all() {
+ if ! use compat && use test ; then
+ # Test binaries, bug #874591
+ rm "${ED}"/usr/bin/minigzip || die
+ rm "${ED}"/usr/bin/minizip-ng || die
+ fi
+}
+
+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
index 94f2b4729f05..d9c4000147ce 100644
--- a/sys-libs/mtdev/Manifest
+++ b/sys-libs/mtdev/Manifest
@@ -1 +1,2 @@
DIST mtdev-1.1.6.tar.bz2 295965 BLAKE2B 212cf0f0bea0fc295528c90c6685770e88cb135a714cbf21e53b75ab2eaedd210269d073520e44c5bffafe8a5ecca521221061193725cba916bc2cf703fd5166 SHA512 859fb0803f330ecaae69f80713ff5a5235c0cb00de6d5ac2717ad82cea856a92b866f0c272ecfe743186abcf925f95585149ba4828b4c91555cfeb2f2a1c98f1
+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
index 3b39973e35b8..2e8b56d091be 100644
--- a/sys-libs/mtdev/metadata.xml
+++ b/sys-libs/mtdev/metadata.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="person">
- <email>naota@gentoo.org</email>
-</maintainer>
-<maintainer type="project">
- <email>x11@gentoo.org</email>
- <name>X11</name>
-</maintainer>
+ <maintainer type="person">
+ <email>naota@gentoo.org</email>
+ <name>Naohiro Aota</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>x11@gentoo.org</email>
+ <name>X11</name>
+ </maintainer>
</pkgmetadata>
diff --git a/sys-libs/mtdev/mtdev-1.1.6.ebuild b/sys-libs/mtdev/mtdev-1.1.6.ebuild
index abbd8dd4b15f..e427325f3747 100644
--- a/sys-libs/mtdev/mtdev-1.1.6.ebuild
+++ b/sys-libs/mtdev/mtdev-1.1.6.ebuild
@@ -9,7 +9,7 @@ SRC_URI="https://bitmath.org/code/mtdev/${P}.tar.bz2"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE=""
DEPEND=">=sys-kernel/linux-headers-2.6.31"
diff --git a/sys-libs/mtdev/mtdev-1.1.7.ebuild b/sys-libs/mtdev/mtdev-1.1.7.ebuild
new file mode 100644
index 000000000000..fbfb9db211c0
--- /dev/null
+++ b/sys-libs/mtdev/mtdev-1.1.7.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2024 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 ~ia64 ~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
index e3c2b5382c49..88436bb5a431 100644
--- a/sys-libs/musl-nscd/Manifest
+++ b/sys-libs/musl-nscd/Manifest
@@ -1,2 +1 @@
-DIST musl-nscd-1.0.3.tar.gz 45023 BLAKE2B de3985878745497f0f6904efba0ecf1c5d4ab96dd190fe0b776459db946749858821f51e75d457172da75cd68c5bba22143647b269473f35d41e0ab9bbac3e36 SHA512 b931a28d70bbcc19a5b592449e7400ee61d5af93511d44e2e63416010b3938f1d350a965b0ad876699bed406926d3180a0380868279e13d3456e2264c80a4b7d
DIST musl-nscd-1.1.1.tar.gz 51598 BLAKE2B 0c14cfed06f766e174154cdedf046eee8206822d21ce6ac0f1d2c253224a9c8be2fabe6a7d9c0e7c63d1811e3ccf06ca7b2c9dcb728cde445108039723e486c2 SHA512 f067b1491c6c46c3070aa2f61328b874eb6ad390c2efc928e2fee591ef5997b40400e29495546a861e803460efa46024c7a01c53ddae5b763ef63c2f274fceea
diff --git a/sys-libs/musl-nscd/files/musl-nscd-1.0.2-fno-common.patch b/sys-libs/musl-nscd/files/musl-nscd-1.0.2-fno-common.patch
deleted file mode 100644
index fce44ecdef7d..000000000000
--- a/sys-libs/musl-nscd/files/musl-nscd-1.0.2-fno-common.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/include/modules.h
-+++ b/include/modules.h
-@@ -28,7 +28,7 @@ struct mod_passwd {
- link_t link;
- };
-
--list_t passwd_mods;
--list_t group_mods;
-+extern list_t passwd_mods;
-+extern list_t group_mods;
-
- #endif
---- a/src/main.c
-+++ b/src/main.c
-@@ -18,6 +18,9 @@
- #include "parse.h"
- #include "util.h"
-
-+list_t passwd_mods;
-+list_t group_mods;
-+
- static void *get_dll(const char *service)
- {
- char *path;
---- a/src/socket_handle.c
-+++ b/src/socket_handle.c
-@@ -19,6 +19,9 @@
- #include "modules.h"
- #include "list.h"
-
-+extern list_t passwd_mods;
-+extern list_t group_mods;
-+
- static int return_result(int fd, int swap, uint32_t reqtype, void *key);
-
- struct pthread_args {
diff --git a/sys-libs/musl-nscd/musl-nscd-1.0.3-r1.ebuild b/sys-libs/musl-nscd/musl-nscd-1.0.3-r1.ebuild
deleted file mode 100644
index bec1e9b35ef1..000000000000
--- a/sys-libs/musl-nscd/musl-nscd-1.0.3-r1.ebuild
+++ /dev/null
@@ -1,54 +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}"
-
-PATCHES=( "${FILESDIR}"/${PN}-1.0.2-fno-common.patch )
-
-src_prepare() {
- default
-
- sed -i '/LDFLAGS_AUTO=-s/d' configure || die "Cannot patch configure file"
-}
-
-src_install() {
- if use minimal; then
- emake DESTDIR="${D}" install-headers
- else
- emake DESTDIR="${D}" install
-
- newinitd "${FILESDIR}"/nscd.initd nscd
- systemd_dounit "${FILESDIR}"/nscd.service
- newtmpfiles "${FILESDIR}"/nscd.tmpfilesd nscd.conf
-
- dodoc README
- fi
-}
-
-pkg_postinst() {
- if ! use minimal; then
- tmpfiles_process nscd.conf
- fi
-}
diff --git a/sys-libs/musl/Manifest b/sys-libs/musl/Manifest
index 33b6ddc01148..db22821f8a4a 100644
--- a/sys-libs/musl/Manifest
+++ b/sys-libs/musl/Manifest
@@ -1,4 +1,9 @@
DIST getconf.c 11614 BLAKE2B ba49a573fc16d51780a0b0b81fbf7b64a1142f1dbad203c9609a59b6b07e7404f676c415383ae88c0aede95694821f6ee381bffd93cc3330501e17dc07d122bd SHA512 0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d
DIST iconv.c 2577 BLAKE2B 070ca87b30c90ab98c27d5faf7a2fcb64ff7c67ca212ee6072165b2146979c551f714954dbd465462a171837c59b6ea027e0206458a2df0f977e45f01be3ce48 SHA512 9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf
-DIST musl-1.2.2.tar.gz 1055220 BLAKE2B a000357ed52e417d8cebe5537df658dc0f8f02f2da3efcd79125544ad63e11e05fa96136551d0bfeb09a3f6c9a2260bffcfbd329ea92e6a7b62aa690f48968aa SHA512 5344b581bd6463d71af8c13e91792fa51f25a96a1ecbea81e42664b63d90b325aeb421dfbc8c22e187397ca08e84d9296a0c0c299ba04fa2b751d6864914bd82
+DIST musl-1.2.3.tar.gz 1058642 BLAKE2B b7f667eeb6b9f612c086cb44e69b34da4361b8cb76819fb65f10ef7dd55f48d2f37a32d698dcada965c7c76c3c1cd5621447c4240b6ab2e5b39b2d214e7e302b SHA512 9332f713d3eb7de4369bc0327d99252275ee52abf523ee34b894b24a387f67579787f7c72a46cf652e090cffdb0bc3719a4e7b84dca66890b6a37f12e8ad089c
+DIST musl-1.2.3.tar.gz.asc 490 BLAKE2B 4de3d2b2f4e748795b71e144df3ac073c68b0b1b5d40c7a4c3507cc3700c1f47a4ec745f644fa78d82de4cd1915b80be7ac1071fdfd6d468e01361c49ded065d SHA512 01a857dbc3981c90244d4d1d883efe51986652ca5734a741c9d1a4d06c5a22831e85520ac67212268b70c22049317a8f39b3219be182e7e67741add428ac5bc6
+DIST musl-1.2.4.tar.gz 1063758 BLAKE2B 7b5c5e335c55248789bca26084a744152f1128dd39159bcf46456ce1a4438c50097c75c7b84aa2980dccf2156f45de41e446ee39c7b3a43d80592c2b9ce75d98 SHA512 498ec5d7941194a8806f4d42f0f6d218c862996ef1398b737d0d06995e0b7a6574b240a48088f6b84016b14b2776fe463f829dcb11149cdfc1023d496b235c55
+DIST musl-1.2.4.tar.gz.asc 490 BLAKE2B 2133cff9ae2c8f69213fb72a256533d0686fd118012bddf0880d444fdfa456c6b448681838fcf3effa5403fd1bfbef7274cac548fecca3ec2f2e4e217ef74409 SHA512 5a3362ef1e60ae021a2c56ecde202a9dfd71914f3631ab498c8b751c38b217010997c8b28e31ebb6d1a8fb2663165a35943615825e2c220eb48ce66908ea1a9e
+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-getent-93a08815f8598db442d8b766b463d0150ed8e2ab.c 11656 BLAKE2B 1b7bf7102a1eb91a8cb881ed8ca65eb8eed911dd50238e97dc2952d89d4c6ebed6bfd046a2b38776c550b2872ab54ced8cb452fcc2ad56e5616f722debda761f SHA512 7f5b9d934d82deb5f8b23e16169a5d9b99ccab3a4708df06a95d685e1b24a3a3e69b3dcf4942f2f66c12a3d4bf0c5827e2ee2e8c4d7b1997359fccc2ac212dee
diff --git a/sys-libs/musl/files/ldconfig.in b/sys-libs/musl/files/ldconfig.in
deleted file mode 100644
index 19c94d85353a..000000000000
--- a/sys-libs/musl/files/ldconfig.in
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/bin/bash -e
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-ROOT="/"
-
-LDSO_CONF="/etc/ld.so.conf"
-if [[ ! -e $LDSO_CONF ]]; then
- echo "$LDSO_CONF not found" >&2
- exit 1
-fi
-
-LDSO_CONF_DIR=$(dirname $LDSO_CONF)
-
-VERBOSE=0
-
-UPDATE_LINKS=1
-
-get_options() {
- 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 [[ $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 "/lib" $drs || drs="/lib $drs"
- repeated "/usr/lib" $drs || drs="/usr/lib $drs"
-
- echo $drs
-}
-
-get_options "$@"
-drs=$(read_ldso_conf "$LDSO_CONF")
-drs=$(sanitize $drs)
-
-ARCH=@@ARCH@@
-LDSO_PATH="/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=/etc/${LDSO_NAME}.path
-
-X=$(mktemp -p /tmp ${LDSO_NAME}.XXXXXX)
-for d in $drs; do
- echo $d >> $X
-done
-chmod 644 $X
-mv $X $ETC_LDSO_PATH
diff --git a/sys-libs/musl/files/ldconfig.in-r1 b/sys-libs/musl/files/ldconfig.in-r1
deleted file mode 100644
index 7bf254dfd91c..000000000000
--- a/sys-libs/musl/files/ldconfig.in-r1
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/bin/bash -e
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-ROOT="/"
-LDSO_CONF="/etc/ld.so.conf"
-
-VERBOSE=0
-
-UPDATE_LINKS=1
-
-get_options() {
- while getopts "vnNXf:C:r:p" opt "$@"; do
- case $opt in
- v)
- echo "ldconfig for musl in Gentoo"
- VERBOSE=1
- ;;
- r)
- ROOT=${OPTARG}
- LDSO_CONF=${ROOT}${LDSO_CONF}
- LDSO_CONF_DIR=$(dirname ${LDSO_CONF})
- ;;
- 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 [[ ${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 "/lib" ${drs} || drs="/lib ${drs}"
- repeated "/usr/lib" ${drs} || drs="/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}/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}/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}
-mv ${X} ${ETC_LDSO_PATH}
diff --git a/sys-libs/musl/files/ldconfig.in-r2 b/sys-libs/musl/files/ldconfig.in-r3
index 72a2f58bc744..60f6cc9e1130 100644
--- a/sys-libs/musl/files/ldconfig.in-r2
+++ b/sys-libs/musl/files/ldconfig.in-r3
@@ -1,15 +1,17 @@
#!/bin/bash -e
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
ROOT="/"
-LDSO_CONF="/etc/ld.so.conf"
+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)
@@ -18,8 +20,6 @@ get_options() {
;;
r)
ROOT=${OPTARG}
- LDSO_CONF=${ROOT}${LDSO_CONF}
- LDSO_CONF_DIR=$(dirname ${LDSO_CONF})
;;
f)
LDSO_CONF=${OPTARG}
@@ -37,6 +37,9 @@ get_options() {
;;
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."
@@ -110,8 +113,8 @@ read_ldso_conf() {
sanitize() {
local drs=$@
- repeated "/lib" ${drs} || drs="/lib ${drs}"
- repeated "/usr/lib" ${drs} || drs="/usr/lib ${drs}"
+ repeated "${EPREFIX}/lib" ${drs} || drs="${EPREFIX}/lib ${drs}"
+ repeated "${EPREFIX}/usr/lib" ${drs} || drs="${EPREFIX}/usr/lib ${drs}"
echo ${drs}
}
@@ -136,7 +139,7 @@ drs=$(read_ldso_conf "${LDSO_CONF}")
drs=$(sanitize ${drs})
ARCH=@@ARCH@@
-LDSO_PATH="${ROOT}/lib/ld-musl-${ARCH}.so.1"
+LDSO_PATH="${ROOT}${EPREFIX}/lib/ld-musl-${ARCH}.so.1"
if [[ ! -e ${LDSO_PATH} ]]; then
echo "${LDSO_PATH} not found" >&2
exit 1
@@ -144,7 +147,7 @@ fi
LDSO_ARCH=$(basename ${LDSO_PATH})
LDSO_NAME=${LDSO_ARCH%.so.1}
-ETC_LDSO_PATH="${ROOT}/etc/${LDSO_NAME}.path"
+ETC_LDSO_PATH="${ROOT}${EPREFIX}/etc/${LDSO_NAME}.path"
changed || exit 0
X=$(mktemp -p /tmp ${LDSO_NAME}.XXXXXX)
diff --git a/sys-libs/musl/files/musl-1.2.2-gethostid.patch b/sys-libs/musl/files/musl-1.2.2-gethostid.patch
deleted file mode 100644
index 96c799cfca29..000000000000
--- a/sys-libs/musl/files/musl-1.2.2-gethostid.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Subject: [musl] [PATCH] extend gethostid beyond a stub
-Archived-At: <https://inbox.vuxu.org/musl/20210420191519.23822-3-ericonr@disroot.org/>
-List-Archive: <https://inbox.vuxu.org/musl/>
-List-Post: <mailto:musl@inbox.vuxu.org>
-
-From: Érico Rolim <erico.erc@gmail.com>
-
-Implement part of the glibc behavior, where the 32-bit identifier stored
-in /etc/hostid, if the file exists, is returned. If this file doesn't
-contain at least 32 bits or can't be opened for some reason, return 0.
----
- src/misc/gethostid.c | 15 ++++++++++++++-
- 1 file changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/src/misc/gethostid.c b/src/misc/gethostid.c
-index 25bb35db..d529de9c 100644
---- a/src/misc/gethostid.c
-+++ b/src/misc/gethostid.c
-@@ -1,6 +1,19 @@
- #include <unistd.h>
-+#include <stdio.h>
-+#include <stdint.h>
-
- long gethostid()
- {
-- return 0;
-+ FILE *f;
-+ int32_t rv = 0;
-+
-+ f = fopen("/etc/hostid", "reb");
-+ if (f) {
-+ if (fread(&rv, sizeof(rv), 1, f) == 0) {
-+ rv = 0;
-+ }
-+ fclose(f);
-+ }
-+
-+ return rv;
- }
---
-2.31.1
-
-
diff --git a/sys-libs/musl/files/musl-1.2.4-elfutils-0.190-relr.patch b/sys-libs/musl/files/musl-1.2.4-elfutils-0.190-relr.patch
new file mode 100644
index 000000000000..e5eaf46f7810
--- /dev/null
+++ b/sys-libs/musl/files/musl-1.2.4-elfutils-0.190-relr.patch
@@ -0,0 +1,73 @@
+https://www.openwall.com/lists/musl/2023/11/06/3
+https://inbox.vuxu.org/musl/20231106113336.3664-2-ncopa@alpinelinux.org/T/#u
+https://sourceware.org/bugzilla/show_bug.cgi?id=31034
+https://bugs.gentoo.org/916857
+
+From mboxrd@z Thu Jan 1 00:00:00 1970
+X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org
+X-Spam-Level:
+X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED,
+ MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,
+ RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham
+ autolearn_force=no version=3.4.4
+Received: (qmail 5179 invoked from network); 6 Nov 2023 11:46:34 -0000
+Received: from second.openwall.net (193.110.157.125)
+ by inbox.vuxu.org with ESMTPUTF8; 6 Nov 2023 11:46:34 -0000
+Received: (qmail 30570 invoked by uid 550); 6 Nov 2023 11:46:29 -0000
+Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm
+Precedence: bulk
+List-Post: <mailto:musl@lists.openwall.com>
+List-Help: <mailto:musl-help@lists.openwall.com>
+List-Unsubscribe: <mailto:musl-unsubscribe@lists.openwall.com>
+List-Subscribe: <mailto:musl-subscribe@lists.openwall.com>
+List-ID: <musl.lists.openwall.com>
+Reply-To: musl@lists.openwall.com
+Received: (qmail 30538 invoked from network); 6 Nov 2023 11:46:29 -0000
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alpinelinux.org;
+ s=smtp; t=1699271177;
+ h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
+ to:to:cc:cc:mime-version:mime-version:
+ content-transfer-encoding:content-transfer-encoding;
+ bh=73HDLjg72r1JGckDGbEyPxYrYL7dC7MB3gMwy/yp7hc=;
+ b=pSGCs/DrFDbs9eEA89un578pZbyzpmTw81QGH7xK4ZAAkYiXx1ysaXlsllwxGd076F+plw
+ kE1QbGVndutc+ieeUOiHomF4O8IP4AqO/8xCy52LlYmnhMTcxgoXD/GWHfVcXmIgFb+8Uc
+ jvgM9nXFOXceFSlHLLOwJBQFE2dyBrU=
+From: Natanael Copa <ncopa@alpinelinux.org>
+To: musl@lists.openwall.com
+Cc: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 6 Nov 2023 12:33:37 +0100
+Message-ID: <20231106113336.3664-2-ncopa@alpinelinux.org>
+X-Mailer: git-send-email 2.42.1
+MIME-Version: 1.0
+Content-Transfer-Encoding: 8bit
+Subject: [musl] [PATCH] elf.h: add typedefs for Elf*_Relr
+
+Add typedefs for Elf32_Relr and Elf64_Relr as a follow-up to commit
+d32dadd60efb (ldso: support DT_RELR relative relocation format)
+
+---
+This fixes build of iproute2 with elfutils 0.190, which assumes that
+Elf*_Relr are typedef'ed when SHT_RELR is defined.
+
+ref: https://sourceware.org/git/?p=elfutils.git;a=commit;h=39f2c500542f69c2f1a13fd0ae4eaa5778d2ed8d
+ref: https://sourceware.org/bugzilla/show_bug.cgi?id=31034
+
+ include/elf.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/include/elf.h b/include/elf.h
+index 23f2c4bc..aa186d9d 100644
+--- a/include/elf.h
++++ b/include/elf.h
+@@ -32,6 +32,9 @@ typedef uint16_t Elf64_Section;
+ typedef Elf32_Half Elf32_Versym;
+ typedef Elf64_Half Elf64_Versym;
+
++typedef Elf32_Word Elf32_Relr;
++typedef Elf64_Xword Elf64_Relr;
++
+ #define EI_NIDENT (16)
+
+ typedef struct {
+--
+2.42.1
diff --git a/sys-libs/musl/musl-1.2.2-r3.ebuild b/sys-libs/musl/musl-1.2.2-r3.ebuild
deleted file mode 100644
index 5d2851eac250..000000000000
--- a/sys-libs/musl/musl-1.2.2-r3.ebuild
+++ /dev/null
@@ -1,151 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic toolchain-funcs
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.musl-libc.org/musl"
- inherit git-r3
-else
- SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz"
- KEYWORDS="-* amd64 arm arm64 ~mips ppc ppc64 x86"
-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
-"
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
-HOMEPAGE="https://musl.libc.org"
-LICENSE="MIT LGPL-2 GPL-2"
-SLOT="0"
-IUSE="headers-only"
-
-QA_SONAME="/usr/lib/libc.so"
-QA_DT_NEEDED="/usr/lib/libc.so"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-just_headers() {
- use headers-only && is_crosscompile
-}
-
-pkg_setup() {
- if [ ${CTARGET} == ${CHOST} ] ; then
- case ${CHOST} in
- *-musl*) ;;
- *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
- esac
- fi
-
- # fix for #667126, copied from glibc ebuild
- # make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-}
-
-src_unpack() {
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- else
- unpack "${P}.tar.gz"
- fi
- mkdir misc || die
- cp "${DISTDIR}"/getconf.c misc/getconf.c || die
- cp "${DISTDIR}/${GETENT_FILE}" misc/getent.c || die
- cp "${DISTDIR}"/iconv.c misc/iconv.c || die
-}
-
-src_prepare() {
- default
-
- # Expand gethostid instead of being just a stub
- eapply "${FILESDIR}/${PN}-1.2.2-gethostid.patch"
-}
-
-src_configure() {
- tc-getCC ${CTARGET}
- just_headers && export CC=true
-
- local sysroot
- is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET}
- ./configure \
- --target=${CTARGET} \
- --prefix=${sysroot}/usr \
- --syslibdir=${sysroot}/lib \
- --disable-gcc-wrapper || die
-}
-
-src_compile() {
- emake obj/include/bits/alltypes.h
- just_headers && return 0
-
- emake
- if [[ ${CATEGORY} != cross-* ]] ; then
- emake -C "${T}" getconf getent iconv \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}" \
- CPPFLAGS="${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- VPATH="${WORKDIR}/misc"
- fi
-
- $(tc-getCC) ${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
- is_crosscompile && sysroot=/usr/${CTARGET}
- local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*)
- dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
-
- if [[ ${CATEGORY} != cross-* ]] ; 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)
- [[ -e "${D}"/lib/ld-musl-${arch}.so.1 ]] || die
- cp "${FILESDIR}"/ldconfig.in "${T}" || die
- sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
- into /
- dosbin "${T}"/ldconfig
- into /usr
- dobin "${T}"/getconf
- dobin "${T}"/getent
- dobin "${T}"/iconv
- echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
- doenvd "${T}"/00musl
- dolib.a libssp_nonshared.a
- fi
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- [ "${ROOT}" != "/" ] && return 0
-
- ldconfig || die
-}
diff --git a/sys-libs/musl/musl-1.2.2-r4.ebuild b/sys-libs/musl/musl-1.2.2-r4.ebuild
deleted file mode 100644
index 868577f61ad2..000000000000
--- a/sys-libs/musl/musl-1.2.2-r4.ebuild
+++ /dev/null
@@ -1,167 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit eapi8-dosym flag-o-matic toolchain-funcs
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.musl-libc.org/musl"
- inherit git-r3
-else
- SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz"
- KEYWORDS="-* amd64 arm arm64 ~mips ppc ppc64 x86"
-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
-"
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
-HOMEPAGE="https://musl.libc.org"
-LICENSE="MIT LGPL-2 GPL-2"
-SLOT="0"
-IUSE="headers-only"
-
-QA_SONAME="/usr/lib/libc.so"
-QA_DT_NEEDED="/usr/lib/libc.so"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-just_headers() {
- use headers-only && is_crosscompile
-}
-
-pkg_setup() {
- if [ ${CTARGET} == ${CHOST} ] ; then
- case ${CHOST} in
- *-musl*) ;;
- *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
- esac
- fi
-
- # fix for #667126, copied from glibc ebuild
- # make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-}
-
-src_unpack() {
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- else
- unpack "${P}.tar.gz"
- fi
- mkdir misc || die
- cp "${DISTDIR}"/getconf.c misc/getconf.c || die
- cp "${DISTDIR}/${GETENT_FILE}" misc/getent.c || die
- cp "${DISTDIR}"/iconv.c misc/iconv.c || die
-}
-
-src_prepare() {
- default
-
- # Expand gethostid instead of being just a stub
- eapply "${FILESDIR}/${PN}-1.2.2-gethostid.patch"
-}
-
-src_configure() {
- tc-getCC ${CTARGET}
- just_headers && export CC=true
-
- local sysroot
- is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET}
- ./configure \
- --target=${CTARGET} \
- --prefix=${sysroot}/usr \
- --syslibdir=${sysroot}/lib \
- --disable-gcc-wrapper || die
-}
-
-src_compile() {
- emake obj/include/bits/alltypes.h
- just_headers && return 0
-
- emake
- if [[ ${CATEGORY} != cross-* ]] ; then
- emake -C "${T}" getconf getent iconv \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}" \
- CPPFLAGS="${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- VPATH="${WORKDIR}/misc"
- fi
-
- $(tc-getCC) ${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
- is_crosscompile && sysroot=/usr/${CTARGET}
- local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*)
- dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
-
- if [[ ${CATEGORY} != cross-* ]] ; 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)
-
- if [[ ! -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] ; then
- # During cross (using crossdev), when emerging sys-libs/musl,
- # if /usr/lib/libc.so.1 doesn't exist on the system, installation
- # would fail.
- #
- # The musl build system seems to create a symlink:
- # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute)
- # During cross, there's no guarantee that the host is using musl
- # so that file may not exist. Use a relative symlink within ${D}
- # instead.
- dosym8 -r /usr/lib/libc.so /lib/ld-musl-${arch}.so.1
-
- # If it's still a dead symlnk, OK, we really do need to abort.
- [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die
- fi
-
- cp "${FILESDIR}"/ldconfig.in "${T}" || die
- sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
- into /
- dosbin "${T}"/ldconfig
- into /usr
- dobin "${T}"/getconf
- dobin "${T}"/getent
- dobin "${T}"/iconv
- echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
- doenvd "${T}"/00musl
- dolib.a libssp_nonshared.a
- fi
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- [ "${ROOT}" != "/" ] && return 0
-
- ldconfig || die
-}
diff --git a/sys-libs/musl/musl-1.2.2-r6.ebuild b/sys-libs/musl/musl-1.2.2-r6.ebuild
deleted file mode 100644
index 79a60682c79f..000000000000
--- a/sys-libs/musl/musl-1.2.2-r6.ebuild
+++ /dev/null
@@ -1,167 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit eapi8-dosym flag-o-matic toolchain-funcs
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.musl-libc.org/musl"
- inherit git-r3
-else
- SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz"
- KEYWORDS="-* amd64 arm arm64 ~mips ppc ppc64 x86"
-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
-"
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
-HOMEPAGE="https://musl.libc.org"
-LICENSE="MIT LGPL-2 GPL-2"
-SLOT="0"
-IUSE="headers-only"
-
-QA_SONAME="/usr/lib/libc.so"
-QA_DT_NEEDED="/usr/lib/libc.so"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-just_headers() {
- use headers-only && is_crosscompile
-}
-
-pkg_setup() {
- if [ ${CTARGET} == ${CHOST} ] ; then
- case ${CHOST} in
- *-musl*) ;;
- *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
- esac
- fi
-
- # fix for #667126, copied from glibc ebuild
- # make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-}
-
-src_unpack() {
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- else
- unpack "${P}.tar.gz"
- fi
- mkdir misc || die
- cp "${DISTDIR}"/getconf.c misc/getconf.c || die
- cp "${DISTDIR}/${GETENT_FILE}" misc/getent.c || die
- cp "${DISTDIR}"/iconv.c misc/iconv.c || die
-}
-
-src_prepare() {
- default
-
- # Expand gethostid instead of being just a stub
- eapply "${FILESDIR}/${PN}-1.2.2-gethostid.patch"
-}
-
-src_configure() {
- tc-getCC ${CTARGET}
- just_headers && export CC=true
-
- local sysroot
- is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET}
- ./configure \
- --target=${CTARGET} \
- --prefix=${sysroot}/usr \
- --syslibdir=${sysroot}/lib \
- --disable-gcc-wrapper || die
-}
-
-src_compile() {
- emake obj/include/bits/alltypes.h
- just_headers && return 0
-
- emake
- if [[ ${CATEGORY} != cross-* ]] ; then
- emake -C "${T}" getconf getent iconv \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}" \
- CPPFLAGS="${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- VPATH="${WORKDIR}/misc"
- fi
-
- $(tc-getCC) ${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
- is_crosscompile && sysroot=/usr/${CTARGET}
- local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*)
- dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
-
- if [[ ${CATEGORY} != cross-* ]] ; 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)
-
- if [[ ! -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] ; then
- # During cross (using crossdev), when emerging sys-libs/musl,
- # if /usr/lib/libc.so.1 doesn't exist on the system, installation
- # would fail.
- #
- # The musl build system seems to create a symlink:
- # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute)
- # During cross, there's no guarantee that the host is using musl
- # so that file may not exist. Use a relative symlink within ${D}
- # instead.
- dosym8 -r /usr/lib/libc.so /lib/ld-musl-${arch}.so.1
-
- # If it's still a dead symlnk, OK, we really do need to abort.
- [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die
- fi
-
- cp "${FILESDIR}"/ldconfig.in-r1 "${T}"/ldconfig.in || die
- sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
- into /
- dosbin "${T}"/ldconfig
- into /usr
- dobin "${T}"/getconf
- dobin "${T}"/getent
- dobin "${T}"/iconv
- echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
- doenvd "${T}"/00musl
- dolib.a libssp_nonshared.a
- fi
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- [ "${ROOT}" != "/" ] && return 0
-
- ldconfig || die
-}
diff --git a/sys-libs/musl/musl-1.2.2-r7.ebuild b/sys-libs/musl/musl-1.2.2-r7.ebuild
deleted file mode 100644
index dac76c213424..000000000000
--- a/sys-libs/musl/musl-1.2.2-r7.ebuild
+++ /dev/null
@@ -1,167 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit eapi8-dosym flag-o-matic toolchain-funcs
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.musl-libc.org/musl"
- inherit git-r3
-else
- SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz"
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86"
-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
-"
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
-HOMEPAGE="https://musl.libc.org"
-LICENSE="MIT LGPL-2 GPL-2"
-SLOT="0"
-IUSE="headers-only"
-
-QA_SONAME="/usr/lib/libc.so"
-QA_DT_NEEDED="/usr/lib/libc.so"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-just_headers() {
- use headers-only && is_crosscompile
-}
-
-pkg_setup() {
- if [ ${CTARGET} == ${CHOST} ] ; then
- case ${CHOST} in
- *-musl*) ;;
- *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
- esac
- fi
-
- # fix for #667126, copied from glibc ebuild
- # make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-}
-
-src_unpack() {
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- else
- unpack "${P}.tar.gz"
- fi
- mkdir misc || die
- cp "${DISTDIR}"/getconf.c misc/getconf.c || die
- cp "${DISTDIR}/${GETENT_FILE}" misc/getent.c || die
- cp "${DISTDIR}"/iconv.c misc/iconv.c || die
-}
-
-src_prepare() {
- default
-
- # Expand gethostid instead of being just a stub
- eapply "${FILESDIR}/${PN}-1.2.2-gethostid.patch"
-}
-
-src_configure() {
- tc-getCC ${CTARGET}
- just_headers && export CC=true
-
- local sysroot
- is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET}
- ./configure \
- --target=${CTARGET} \
- --prefix=${sysroot}/usr \
- --syslibdir=${sysroot}/lib \
- --disable-gcc-wrapper || die
-}
-
-src_compile() {
- emake obj/include/bits/alltypes.h
- just_headers && return 0
-
- emake
- if [[ ${CATEGORY} != cross-* ]] ; then
- emake -C "${T}" getconf getent iconv \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}" \
- CPPFLAGS="${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- VPATH="${WORKDIR}/misc"
- fi
-
- $(tc-getCC) ${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
- is_crosscompile && sysroot=/usr/${CTARGET}
- local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*)
- dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
-
- if [[ ${CATEGORY} != cross-* ]] ; 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)
-
- if [[ ! -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] ; then
- # During cross (using crossdev), when emerging sys-libs/musl,
- # if /usr/lib/libc.so.1 doesn't exist on the system, installation
- # would fail.
- #
- # The musl build system seems to create a symlink:
- # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute)
- # During cross, there's no guarantee that the host is using musl
- # so that file may not exist. Use a relative symlink within ${D}
- # instead.
- dosym8 -r /usr/lib/libc.so /lib/ld-musl-${arch}.so.1
-
- # If it's still a dead symlnk, OK, we really do need to abort.
- [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die
- fi
-
- cp "${FILESDIR}"/ldconfig.in-r2 "${T}"/ldconfig.in || die
- sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
- into /
- dosbin "${T}"/ldconfig
- into /usr
- dobin "${T}"/getconf
- dobin "${T}"/getent
- dobin "${T}"/iconv
- echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
- doenvd "${T}"/00musl
- dolib.a libssp_nonshared.a
- fi
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- [ "${ROOT}" != "/" ] && return 0
-
- ldconfig || die
-}
diff --git a/sys-libs/musl/musl-1.2.3-r8.ebuild b/sys-libs/musl/musl-1.2.3-r8.ebuild
new file mode 100644
index 000000000000..cda9968c6cc1
--- /dev/null
+++ b/sys-libs/musl/musl-1.2.3-r8.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eapi8-dosym flag-o-matic toolchain-funcs prefix
+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 ~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
+"
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
+HOMEPAGE="https://musl.libc.org"
+
+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 [[ ${CATEGORY} == cross-* ]] ; then
+ IUSE="${IUSE/crypt/+crypt}"
+else
+ RDEPEND="crypt? ( !sys-libs/libxcrypt[system] )"
+ PDEPEND="!crypt? ( sys-libs/libxcrypt[system] )"
+fi
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+just_headers() {
+ use headers-only && is_crosscompile
+}
+
+pkg_setup() {
+ if [ ${CTARGET} == ${CHOST} ] ; then
+ case ${CHOST} in
+ *-musl*) ;;
+ *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
+ esac
+ fi
+
+ # fix for #667126, copied from glibc ebuild
+ # make sure host make.conf doesn't pollute us
+ if is_crosscompile || 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?)
+ ! is_crosscompile && 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
+ is_crosscompile && 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 [[ ${CATEGORY} != cross-* ]] ; then
+ emake -C "${T}" getconf getent iconv \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ VPATH="${WORKDIR}/misc"
+ fi
+
+ $(tc-getCC) ${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=
+ is_crosscompile && sysroot=/usr/${CTARGET}
+ local ldso=$(basename "${ED}${sysroot}"/lib/ld-musl-*)
+ dosym8 -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd"
+
+ if ! use crypt ; then
+ # Allow sys-libs/libxcrypt[system] to provide it instead
+ rm "${ED}/usr/include/crypt.h" || die
+ rm "${ED}/usr/$(get_libdir)/libcrypt.a" || die
+ fi
+
+ if [[ ${CATEGORY} != cross-* ]] ; 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
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
+ doenvd "${T}"/00musl
+ fi
+
+ if is_crosscompile ; then
+ into /usr/${CTARGET}
+ dolib.a libssp_nonshared.a
+ else
+ dolib.a libssp_nonshared.a
+ fi
+}
+
+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
+}
+
+pkg_postinst() {
+ is_crosscompile && return 0
+
+ [ -n "${ROOT}" ] && return 0
+
+ ldconfig || die
+}
diff --git a/sys-libs/musl/musl-1.2.4-r1.ebuild b/sys-libs/musl/musl-1.2.4-r1.ebuild
new file mode 100644
index 000000000000..cffea8ad349b
--- /dev/null
+++ b/sys-libs/musl/musl-1.2.4-r1.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit crossdev flag-o-matic toolchain-funcs prefix
+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
+"
+
+DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
+HOMEPAGE="https://musl.libc.org"
+
+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}"/${P}-elfutils-0.190-relr.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 #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) ${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}/usr/include/crypt.h" || die
+ rm "${ED}/usr/$(get_libdir)/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
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
+ doenvd "${T}"/00musl
+ fi
+
+ if target_is_not_host ; then
+ into /usr/${CTARGET}
+ dolib.a libssp_nonshared.a
+ else
+ dolib.a libssp_nonshared.a
+ fi
+}
+
+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
+}
+
+pkg_postinst() {
+ target_is_not_host && return 0
+
+ [ -n "${ROOT}" ] && return 0
+
+ ldconfig || die
+}
diff --git a/sys-libs/musl/musl-1.2.5.ebuild b/sys-libs/musl/musl-1.2.5.ebuild
new file mode 100644
index 000000000000..77268ed11b5a
--- /dev/null
+++ b/sys-libs/musl/musl-1.2.5.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2024 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
+
+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}/usr/include/crypt.h" || die
+ rm "${ED}/usr/$(get_libdir)/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
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
+ doenvd "${T}"/00musl
+ fi
+
+ if target_is_not_host ; then
+ into /usr/${CTARGET}
+ dolib.a libssp_nonshared.a
+ else
+ dolib.a libssp_nonshared.a
+ fi
+}
+
+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
+}
+
+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
index 6a5e2688dd5a..6f769c7aa732 100644
--- a/sys-libs/musl/musl-9999.ebuild
+++ b/sys-libs/musl/musl-9999.ebuild
@@ -1,16 +1,27 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit eapi8-dosym flag-o-matic toolchain-funcs
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.musl-libc.org/musl"
+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
- SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz"
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86"
+ 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+="
@@ -19,68 +30,79 @@ SRC_URI+="
https://dev.gentoo.org/~blueness/musl-misc/iconv.c
"
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
-HOMEPAGE="https://musl.libc.org"
LICENSE="MIT LGPL-2 GPL-2"
SLOT="0"
-IUSE="headers-only"
-
-QA_SONAME="/usr/lib/libc.so"
-QA_DT_NEEDED="/usr/lib/libc.so"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
+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
just_headers() {
- use headers-only && is_crosscompile
+ 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" ;;
+ *-musl*) ;;
+ *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
esac
fi
- # fix for #667126, copied from glibc ebuild
+ # Fix for bug #667126, copied from glibc ebuild:
# make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
+ if target_is_not_host || tc-is-cross-compiler ; then
CHOST=${CTARGET} strip-unsupported-flags
fi
}
src_unpack() {
- if [[ ${PV} == 9999 ]]; then
+ if [[ ${PV} == 9999 ]] ; then
git-r3_src_unpack
- else
- unpack "${P}.tar.gz"
+ 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
- mkdir misc || die
- cp "${DISTDIR}"/getconf.c misc/getconf.c || die
- cp "${DISTDIR}/${GETENT_FILE}" misc/getent.c || die
- cp "${DISTDIR}"/iconv.c misc/iconv.c || die
+
+ 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
- is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET}
+ target_is_not_host && sysroot=/usr/${CTARGET}
./configure \
--target=${CTARGET} \
- --prefix=${sysroot}/usr \
- --syslibdir=${sysroot}/lib \
+ --prefix="${EPREFIX}${sysroot}/usr" \
+ --syslibdir="${EPREFIX}${sysroot}/lib" \
--disable-gcc-wrapper || die
}
@@ -89,7 +111,7 @@ src_compile() {
just_headers && return 0
emake
- if [[ ${CATEGORY} != cross-* ]] ; then
+ if ! is_crosspkg ; then
emake -C "${T}" getconf getent iconv \
CC="$(tc-getCC)" \
CFLAGS="${CFLAGS}" \
@@ -98,7 +120,7 @@ src_compile() {
VPATH="${WORKDIR}/misc"
fi
- $(tc-getCC) ${CFLAGS} -c -o libssp_nonshared.o "${FILESDIR}"/stack_chk_fail_local.c || die
+ $(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
}
@@ -109,36 +131,42 @@ src_install() {
just_headers && return 0
# musl provides ldd via a sym link to its ld.so
- local sysroot
- is_crosscompile && sysroot=/usr/${CTARGET}
- local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*)
- dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
+ 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}/usr/include/crypt.h" || die
+ rm "${ED}/usr/$(get_libdir)/libcrypt.a" || die
+ fi
- if [[ ${CATEGORY} != cross-* ]] ; then
+ 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)
- if [[ ! -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] ; then
- # During cross (using crossdev), when emerging sys-libs/musl,
- # if /usr/lib/libc.so.1 doesn't exist on the system, installation
- # would fail.
- #
- # The musl build system seems to create a symlink:
- # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute)
- # During cross, there's no guarantee that the host is using musl
- # so that file may not exist. Use a relative symlink within ${D}
- # instead.
- dosym8 -r /usr/lib/libc.so /lib/ld-musl-${arch}.so.1
-
- # If it's still a dead symlnk, OK, we really do need to abort.
+ # 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-r1 "${T}"/ldconfig.in || die
+ 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
@@ -147,14 +175,28 @@ src_install() {
dobin "${T}"/iconv
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
doenvd "${T}"/00musl
+ fi
+
+ if target_is_not_host ; then
+ into /usr/${CTARGET}
+ dolib.a libssp_nonshared.a
+ else
dolib.a libssp_nonshared.a
fi
}
+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
+}
+
pkg_postinst() {
- is_crosscompile && return 0
+ target_is_not_host && return 0
- [ "${ROOT}" != "/" ] && return 0
+ [[ -n "${ROOT}" ]] && return 0
ldconfig || die
}
diff --git a/sys-libs/native-uuid/native-uuid-1.0.ebuild b/sys-libs/native-uuid/native-uuid-1.0-r1.ebuild
index 18481a52211c..f5df8a1a1bbe 100644
--- a/sys-libs/native-uuid/native-uuid-1.0.ebuild
+++ b/sys-libs/native-uuid/native-uuid-1.0-r1.ebuild
@@ -1,14 +1,14 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
DESCRIPTION=".pc file for uuid"
HOMEPAGE="https://prefix.gentoo.org/"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~ppc-macos ~x64-macos"
+KEYWORDS="~arm64-macos ~ppc-macos ~x64-macos"
DEPEND="!!sys-libs/libuuid
!!sys-apps/util-linux"
diff --git a/sys-libs/ncurses-compat/Manifest b/sys-libs/ncurses-compat/Manifest
index 61cb703f5feb..2705fdade801 100644
--- a/sys-libs/ncurses-compat/Manifest
+++ b/sys-libs/ncurses-compat/Manifest
@@ -1 +1,138 @@
-DIST ncurses-6.2.tar.gz 3425862 BLAKE2B 6680cd7a369a4cb8234442a70869c283f0db6db9d7da1da2a7a5c519eb862a2c9b9411957d99f9ebb5089cad00b42e1ca6bc0784327461113df2eeaec695913c SHA512 4c1333dcc30e858e8a9525d4b9aefb60000cfc727bc4a1062bace06ffc4639ad9f6e54f6bdda0e3a0e5ea14de995f96b52b3327d9ec633608792c99a1e8d840d
+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.tar.gz 3612591 BLAKE2B 47fd9c2d27f44fa9942552881a471e5067465dbace40bf68b28998dded0556127a1d8662b96de4de4fd76c1c8b98bdae796036553ab4b05ca9f160839d841ba3 SHA512 1c2efff87a82a57e57b0c60023c87bae93f6718114c8f9dc010d4c21119a2f7576d0225dab5f0a227c2cfc6fb6bdbd62728e407f35fce5bf351bb50cf9e0fd34
+DIST ncurses-6.4.tar.gz.sig 438 BLAKE2B e6a78b8d0cbce1577205b49b0260394094632cefd95294813c7e4e51a2908e8599a9f24b3b648e42ba16c015fb9424b2a82236f58aac3bf96f5400a50482e44e SHA512 f2a7859725b4d5d62f68006338d56598ac6b38a1448983108906e192f0ec922be287cc89bcc79c1ae49ebc80c967af3dd077427f35ae579b00d445c882414fed
+DIST ncurses-6.4_p20230408-patches.tar.xz 80472 BLAKE2B 0ba8156ebd4f1691fec7bc1b800ef39ce6a4210573c027dd437919cdcd7c995830116da06c69f31c65923845a4d5c88e974673fac38acce5813f7d6cdc646e3e SHA512 32960e2cc4cd9dc60c38b49f46c5ce2c02179479abb66ca29f63cd06475ae8e26299a78b5f06762d114aefbbca3ba6fbebe7093a58106eeaa40cf500d21633a4
+DIST ncurses-6.4_p20240330-patches.tar.xz 63796 BLAKE2B 3e6618ba0b37268d10a16cf26c2810e55c17ded97079af3753e34f2d12575f979a2e55cfd308abf783e35e39d4a848b89f435b4886d3633007ccb522b8dc2e51 SHA512 1bbf1978f9287f68bf6a8596f06d4d0523564bf3d2f6b3bd9746081a2fa0c76e36862beca62a4157d51cac0df61e456ddb6cacfae10b92344fe80cd752f72c38
diff --git a/sys-libs/ncurses-compat/files/ncurses-5.7-nongnu.patch b/sys-libs/ncurses-compat/files/ncurses-5.7-nongnu.patch
deleted file mode 100644
index 3f4a40520009..000000000000
--- a/sys-libs/ncurses-compat/files/ncurses-5.7-nongnu.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ncurses-5.7/ncurses/curses.priv.h
-+++ ncurses-5.7/ncurses/curses.priv.h
-@@ -1452,6 +1452,8 @@ extern NCURSES_EXPORT(void) _nc_expanded
-
- /* charable.c */
- #if USE_WIDEC_SUPPORT
-+#include <wchar.h>
-+
- extern NCURSES_EXPORT(bool) _nc_is_charable(wchar_t);
- extern NCURSES_EXPORT(int) _nc_to_char(wint_t);
- extern NCURSES_EXPORT(wint_t) _nc_to_widechar(int);
diff --git a/sys-libs/ncurses-compat/files/ncurses-5.9-gcc-5.patch b/sys-libs/ncurses-compat/files/ncurses-5.9-gcc-5.patch
deleted file mode 100644
index 2448229b88e1..000000000000
--- a/sys-libs/ncurses-compat/files/ncurses-5.9-gcc-5.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-https://bugs.gentoo.org/545114
-
-extracted from the upstream change (which had many unrelated commits in one)
-
-From 97bb4678dc03e753290b39bbff30ba2825df9517 Mon Sep 17 00:00:00 2001
-From: "Thomas E. Dickey" <dickey@invisible-island.net>
-Date: Sun, 7 Dec 2014 03:10:09 +0000
-Subject: [PATCH] ncurses 5.9 - patch 20141206
-
-+ modify MKlib_gen.sh to work around change in development version of
- gcc introduced here:
- https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
- https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html
- (reports by Marcus Shawcroft, Maohui Lei).
-
-diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh
-index d8cc3c9..b91398c 100755
---- a/ncurses/base/MKlib_gen.sh
-+++ b/ncurses/base/MKlib_gen.sh
-@@ -474,11 +474,22 @@ sed -n -f $ED1 \
- -e 's/gen_$//' \
- -e 's/ / /g' >>$TMP
-
-+cat >$ED1 <<EOF
-+s/ / /g
-+s/^ //
-+s/ $//
-+s/P_NCURSES_BOOL/NCURSES_BOOL/g
-+EOF
-+
-+# A patch discussed here:
-+# https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
-+# introduces spurious #line markers. Work around that by ignoring the system's
-+# attempt to define "bool" and using our own symbol here.
-+sed -e 's/bool/P_NCURSES_BOOL/g' $TMP > $ED2
-+cat $ED2 >$TMP
-+
- $preprocessor $TMP 2>/dev/null \
--| sed \
-- -e 's/ / /g' \
-- -e 's/^ //' \
-- -e 's/_Bool/NCURSES_BOOL/g' \
-+| sed -f $ED1 \
- | $AWK -f $AW2 \
- | sed -f $ED3 \
- | sed \
diff --git a/sys-libs/ncurses-compat/files/ncurses-6.0-cppflags-cross.patch b/sys-libs/ncurses-compat/files/ncurses-6.0-cppflags-cross.patch
deleted file mode 100644
index decdc2677904..000000000000
--- a/sys-libs/ncurses-compat/files/ncurses-6.0-cppflags-cross.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-https://bugs.gentoo.org/601426
-https://lists.gnu.org/archive/html/bug-ncurses/2015-02/msg00012.html
-
-From: John Vogel
-Subject: [PATCH] c++ binding missed when cross compiling
-Date: Mon, 16 Feb 2015 01:01:48 -0500
-
-The configure script hard codes the include dir to the prefix'ed include dir,
-when checking if c++ compiler works. This breaks the compiler's built-in search
-path. I've included two patches. The first works on the configure.in file, which
-requires your autoconf stuff to test and I'm not ready to meddle with at the
-moment. The other works directly on the configure file. I've tested the second
-one; it should mirror what the first patch tries to achieve and works for me.
-
---- a/configure
-+++ b/configure
-@@ -2938,10 +2938,6 @@
- echo "$as_me:2938: checking if $CXX works" >&5
- echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
-
-- save_CPPFLAGS="$CPPFLAGS"
-- eval cf_includedir=${includedir}
-- CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
--
- cat >conftest.$ac_ext <<_ACEOF
- #line 2946 "configure"
- #include "confdefs.h"
-@@ -2978,7 +2974,6 @@
- cf_cxx_works=no
- fi
- rm -f conftest.$ac_objext conftest.$ac_ext
-- CPPFLAGS="$save_CPPFLAGS"
-
- echo "$as_me:2983: result: $cf_cxx_works" >&5
- echo "${ECHO_T}$cf_cxx_works" >&6
diff --git a/sys-libs/ncurses-compat/files/ncurses-6.0-pkg-config.patch b/sys-libs/ncurses-compat/files/ncurses-6.0-pkg-config.patch
deleted file mode 100644
index 6808319b9533..000000000000
--- a/sys-libs/ncurses-compat/files/ncurses-6.0-pkg-config.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-disable the $PATH search for the PKG_CONFIG tool. it isn't needed and just
-gets in the way when setting to a value that might not yet exist.
-
---- ncurses-6.0/configure
-+++ ncurses-6.0/configure
-@@ -3533,7 +3533,7 @@
- esac
-
- test -z "$PKG_CONFIG" && PKG_CONFIG=none
--if test "$PKG_CONFIG" != none ; then
-+if false ; then
-
- if test "x$prefix" != xNONE; then
- cf_path_syntax="$prefix"
diff --git a/sys-libs/ncurses-compat/files/ncurses-6.0-rxvt-unicode-9.15.patch b/sys-libs/ncurses-compat/files/ncurses-6.0-rxvt-unicode-9.15.patch
deleted file mode 100644
index af3df941d699..000000000000
--- a/sys-libs/ncurses-compat/files/ncurses-6.0-rxvt-unicode-9.15.patch
+++ /dev/null
@@ -1,191 +0,0 @@
-Add rxvt-unicode terminfo, required by rxvt-unicode to function properly.
-
-Providing this in ncurses makes it widely available, much better than having to
-install rxvt-unicode everywhere.
-
-http://bugs.gentoo.org/show_bug.cgi?id=192083
-
-This patch uses the updated rxvt-unicode-9.15 terminfo
-which includes 256 color support and fixes Gentoo bug 383871
-
-http://bugs.gentoo.org/show_bug.cgi?id=383871
-
---- ncurses-6.0/misc/terminfo.src
-+++ ncurses-6.0/misc/terminfo.src
-@@ -5214,6 +5214,176 @@
- rxvt-16color|rxvt with 16 colors like aixterm,
- ncv#32, use=ibm+16color, use=rxvt,
-
-+# From: Thomas Dickey <dickey@clark.net> 04 Oct 1997
-+# Updated: Özgür Kesim <kesim@math.fu-berlin.de> 02 Nov 1997
-+# Updated: Marc Lehmann <schmorp@schmorp.de>, 17 Feb 2005
-+# Updated: Marc Lehmann <schmorp@schmorp.de>, 04 Nov 2008: change init/reset sequences
-+rxvt-unicode|rxvt-unicode terminal (X Window System),
-+ am,
-+ bce,
-+ eo,
-+ km,
-+ msgr,
-+ xenl,
-+ hs,
-+ cols#80,
-+ it#8,
-+ lines#24,
-+ acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~-A.B+C\,D0EhFiG,
-+ bel=^G,
-+ blink=\E[5m,
-+ bold=\E[1m,
-+ civis=\E[?25l,
-+ clear=\E[H\E[2J,
-+ cnorm=\E[?25h,
-+ cr=^M,
-+ csr=\E[%i%p1%d;%p2%dr,
-+ cub=\E[%p1%dD,
-+ cub1=^H,
-+ cud=\E[%p1%dB,
-+ cud1=^J,
-+ cuf=\E[%p1%dC,
-+ cuf1=\E[C,
-+ cup=\E[%i%p1%d;%p2%dH,
-+ cuu=\E[%p1%dA,
-+ cuu1=\E[A,
-+ cvvis=\E[?25h,
-+ dch=\E[%p1%dP,
-+ dch1=\E[P,
-+ dl=\E[%p1%dM,
-+ dl1=\E[M,
-+ ed=\E[J,
-+ el=\E[K,
-+ el1=\E[1K,
-+ flash=\E[?5h$<20/>\E[?5l,
-+ home=\E[H,
-+ hpa=\E[%i%p1%dG,
-+ ht=^I,
-+ hts=\EH,
-+ ich=\E[%p1%d@,
-+ ich1=\E[@,
-+ il=\E[%p1%dL,
-+ il1=\E[L,
-+ ind=^J,
-+ is1=\E[\041p,
-+ is2=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l,
-+ kDC=\E[3$,
-+ kIC=\E[2$,
-+ kEND=\E[8$,
-+ kHOM=\E[7$,
-+ kLFT=\E[d,
-+ kNXT=\E[6$,
-+ kPRV=\E[5$,
-+ kRIT=\E[c,
-+ kbs=\177,
-+ ka1=\EOw,
-+ ka3=\EOy,
-+ kb2=\EOu,
-+ kc1=\EOq,
-+ kc3=\EOs,
-+ kcbt=\E[Z,
-+ kcub1=\E[D,
-+ kcud1=\E[B,
-+ kcuf1=\E[C,
-+ kcuu1=\E[A,
-+ kdch1=\E[3~,
-+ kel=\E[8\^,
-+ kend=\E[8~,
-+ kent=\EOM,
-+ kf1=\E[11~,
-+ kf10=\E[21~,
-+ kf11=\E[23~,
-+ kf12=\E[24~,
-+ kf13=\E[25~,
-+ kf14=\E[26~,
-+ kf15=\E[28~,
-+ kf16=\E[29~,
-+ kf17=\E[31~,
-+ kf18=\E[32~,
-+ kf19=\E[33~,
-+ kf2=\E[12~,
-+ kf20=\E[34~,
-+ kf3=\E[13~,
-+ kf4=\E[14~,
-+ kf5=\E[15~,
-+ kf6=\E[17~,
-+ kf7=\E[18~,
-+ kf8=\E[19~,
-+ kf9=\E[20~,
-+ kfnd=\E[1~,
-+ khome=\E[7~,
-+ kich1=\E[2~,
-+ kmous=\E[M,
-+ knp=\E[6~,
-+ kpp=\E[5~,
-+ kslt=\E[4~,
-+ rc=\E8,
-+ rev=\E[7m,
-+ ri=\EM,
-+ rmso=\E[27m,
-+ rmul=\E[24m,
-+ rs1=\Ec,
-+ rs2=\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l,
-+ sgr0=\E[m\E(B,
-+ enacs=,
-+ smacs=\E(0,
-+ rmacs=\E(B,
-+ smso=\E[7m,
-+ smul=\E[4m,
-+ tbc=\E[3g,
-+ vpa=\E[%i%p1%dd,
-+ colors#88,
-+ pairs#7744,
-+ btns#5,
-+ lm#0,
-+ ccc,
-+ npc,
-+ mc5i,
-+ ncv#0,
-+ mir,
-+ xon,
-+ bw,
-+ ech=\E[%p1%dX,
-+ mc0=\E[i,
-+ mc4=\E[4i,
-+ mc5=\E[5i,
-+ sitm=\E[3m,
-+ ritm=\E[23m,
-+ smam=\E[?7h,
-+ rmam=\E[?7l,
-+ smir=\E[4h,
-+ rmir=\E[4l,
-+ smcup=\E[?1049h,
-+ rmcup=\E[r\E[?1049l,
-+ smkx=\E=,
-+ rmkx=\E>,
-+ indn=\E[%p1%dS,
-+ rin=\E[%p1%dT,
-+ sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;,
-+ op=\E[39;49m,
-+ setaf=\E[38;5;%p1%dm,
-+ setab=\E[48;5;%p1%dm,
-+ setf=%?%p1%{7}%>%t\E[38;5;%p1%dm%e\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;,
-+ setb=%?%p1%{7}%>%t\E[48;5;%p1%dm%e\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;,
-+ initc=\E]4;%p1%d;rgb\:%p2%{65535}%*%{1000}%/%4.4X/%p3%{65535}%*%{1000}%/%4.4X/%p4%{65535}%*%{1000}%/%4.4X\E\\,
-+ sc=\E7,
-+ s0ds=\E(B,
-+ s1ds=\E(0,
-+ s2ds=\E*B,
-+ s3ds=\E+B,
-+ u6=\E[%i%d;%dR,
-+ u7=\E[6n,
-+ u8=\E[?1;2c,
-+ u9=\E[c,
-+ tsl=\E]2;,
-+ fsl=\007,
-+ dsl=\E]2;\007,
-+
-+rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System),
-+ colors#256,
-+ pairs#32767,
-+ use=rxvt-unicode,
-+
- #### MRXVT
- # mrxvt 0.5.4
- #
diff --git a/sys-libs/ncurses-compat/files/ncurses-6.0-ticlib.patch b/sys-libs/ncurses-compat/files/ncurses-6.0-ticlib.patch
deleted file mode 100644
index 188e6adff8c7..000000000000
--- a/sys-libs/ncurses-compat/files/ncurses-6.0-ticlib.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-always include ticlib even when progs are disabled
-
-https://bugs.gentoo.org/557360
-
---- a/configure
-+++ b/configure
-@@ -21312,7 +21312,7 @@ echo "$as_me:21311: checking for library subsets" >&5
- echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
- LIB_SUBSETS=
-
--if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
-+if true; then
- LIB_SUBSETS="${LIB_SUBSETS}ticlib"
- if test "$with_ticlib" != no ; then
- LIB_SUBSETS="${LIB_SUBSETS} "
diff --git a/sys-libs/ncurses-compat/metadata.xml b/sys-libs/ncurses-compat/metadata.xml
index ca53c7cdb04d..b1102f235f24 100644
--- a/sys-libs/ncurses-compat/metadata.xml
+++ b/sys-libs/ncurses-compat/metadata.xml
@@ -1,18 +1,24 @@
<?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="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>
- <remote-id type="cpe">cpe:/a:gnu:ncurses</remote-id>
-</upstream>
+ <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.2.ebuild b/sys-libs/ncurses-compat/ncurses-compat-6.2.ebuild
deleted file mode 100644
index 0c319e1dadb0..000000000000
--- a/sys-libs/ncurses-compat/ncurses-compat-6.2.ebuild
+++ /dev/null
@@ -1,227 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# This version is just for the ABI .5 library
-
-EAPI=7
-
-inherit flag-o-matic toolchain-funcs multilib-minimal preserve-libs usr-ldscript
-
-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/"
-SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz"
-
-if [[ "${PV}" == *_p* ]] ; then
- SRC_URI+=" ftp://ftp.invisible-island.net/ncurses/${PV/_p*}/${MY_PN}-${PV/_p/-}-patch.sh.bz2
- https://invisible-mirror.net/archives/ncurses/${PV/_p*}/${MY_PN}-${PV/_p/-}-patch.sh.bz2"
-fi
-
-LICENSE="MIT"
-# The subslot reflects the SONAME.
-SLOT="5/5"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="gpm tinfo unicode"
-
-DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
-# Block the ncurses-5 that installs the same lib. #557472
-RDEPEND="${DEPEND}
- !<sys-libs/ncurses-6:0
- !sys-libs/ncurses:5"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/ncurses-5.7-nongnu.patch"
- "${FILESDIR}/ncurses-6.0-rxvt-unicode-9.15.patch" #192083 #383871
- "${FILESDIR}/ncurses-6.0-pkg-config.patch"
- "${FILESDIR}/ncurses-5.9-gcc-5.patch" #545114
- "${FILESDIR}/ncurses-6.0-ticlib.patch" #557360
- "${FILESDIR}/ncurses-6.0-cppflags-cross.patch" #601426
-)
-
-src_prepare() {
- if [[ "${PV}" == *_p* ]] ; then
- eapply "${WORKDIR}/${MY_PN}-${PV/_p/-}-patch.sh"
- fi
- default
-}
-
-src_configure() {
- unset TERMINFO #115036
- tc-export_build_env BUILD_{CC,CPP}
- BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642
-
- # 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
- $(usex 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. #249363 #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= ;;
- *-aix*) 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}" \
- 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() {
- 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-rcs-ids
- --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
-
- # Force bash until upstream rebuilds the configure script with a newer
- # version of autotools. #545532
- CONFIG_SHELL="${EPREFIX}"/bin/bash \
- 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
- 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-compat/ncurses-compat-6.4_p20230401.ebuild b/sys-libs/ncurses-compat/ncurses-compat-6.4_p20230401.ebuild
new file mode 100644
index 000000000000..57a48f40effc
--- /dev/null
+++ b/sys-libs/ncurses-compat/ncurses-compat-6.4_p20230401.ebuild
@@ -0,0 +1,325 @@
+# Copyright 1999-2023 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/${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.4_p20230408
+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
+
+ # 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"
+
+LICENSE="MIT"
+# The subslot reflects the SONAME.
+SLOT="5/5"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~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 )"
+
+S="${WORKDIR}/${MY_P}"
+
+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-compat/ncurses-compat-6.4_p20240330.ebuild b/sys-libs/ncurses-compat/ncurses-compat-6.4_p20240330.ebuild
new file mode 100644
index 000000000000..0bef02b79d0c
--- /dev/null
+++ b/sys-libs/ncurses-compat/ncurses-compat-6.4_p20240330.ebuild
@@ -0,0 +1,382 @@
+# Copyright 1999-2024 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/${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.4_p20240330
+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
+
+ # 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="5/5"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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
index 71621376f4c0..7b5177af9182 100644
--- a/sys-libs/ncurses/Manifest
+++ b/sys-libs/ncurses/Manifest
@@ -1,6 +1,144 @@
-DIST ncurses-6.2-20210619-patch.sh.bz2 836967 BLAKE2B f210bf25c33f11d67e54a6f416aae75f0a976880ea543408780fd3a8dc992ee8d9999bf15c925c79504be0f30ade4bbfaed763abedd2b2d6b35de65b353a6314 SHA512 b8392bf6c0b7570766ae31a043df311660201265dfe3e2e49425b1e2aa08c72030b5f5b6c7871532897596262c88a7192e3ff2adfdc618f1b9c13c22c373eeb3
-DIST ncurses-6.2.tar.gz 3425862 BLAKE2B 6680cd7a369a4cb8234442a70869c283f0db6db9d7da1da2a7a5c519eb862a2c9b9411957d99f9ebb5089cad00b42e1ca6bc0784327461113df2eeaec695913c SHA512 4c1333dcc30e858e8a9525d4b9aefb60000cfc727bc4a1062bace06ffc4639ad9f6e54f6bdda0e3a0e5ea14de995f96b52b3327d9ec633608792c99a1e8d840d
-DIST ncurses-6.3-20211026.patch.gz 117363 BLAKE2B 74c6c80271edc3b69d17c891436e48ee0579b3d16dd1bbd42f953be5b6ef07596343abd34f4d508b0cb371c1c0febfec12d65e938739892a617c8b141f599753 SHA512 25a99bc9cb7a18eb8fd16a0f887bae90c2551e0228b077d28f7217e58190f4b19a526350c999922f7394a1b749e834643c1bf5f339248b842717c146a3ec1df4
-DIST ncurses-6.3-20211030.patch.gz 46304 BLAKE2B 6fa0f5223c97dc045117c208b92e75aad61638585506aeed0fa5cd6b215f67d212fc780e527f1281ae77063edb1ef9b3a3671b00d306fe322c3ca1b34c1d4d81 SHA512 90440af3959a17388999f07a3b40f770c5511bceda6a39d4c56f867dc5ae8494e49cfb700eb79e31422ebfd1b1990f6d7912083c688963139446f1e43e9d08c8
-DIST ncurses-6.3-20211106.patch.gz 3995 BLAKE2B fbacfd6bfbf64b2935d47f648bd74c93136ea8d17b51e218b80a24695b52246ce8ec01704a0636692bae72815c8b93dec8573570dfd126b19645ec90926e818a SHA512 799819ed01967387fdca4755ab44401f0dc90306f6f771c894ce6702c929e2ff87f45d3e1c2e683cc32bb01553f3332c3a7591a00b7a4bdff93da25307379bdc
-DIST ncurses-6.3.tar.gz 3583550 BLAKE2B b2c174ac48d587b4d3aa054f04e4ec8bffd8a657a4aff5f090104965c741901e600712c8f8e5e98f3b8a26bc558996a1e14a746f113854832853b855e9d406c3 SHA512 5373f228cba6b7869210384a607a2d7faecfcbfef6dbfcd7c513f4e84fbd8bcad53ac7db2e7e84b95582248c1039dcfc7c4db205a618f7da22a166db482f0105
+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_p20230408-patches.tar.xz 80472 BLAKE2B 0ba8156ebd4f1691fec7bc1b800ef39ce6a4210573c027dd437919cdcd7c995830116da06c69f31c65923845a4d5c88e974673fac38acce5813f7d6cdc646e3e SHA512 32960e2cc4cd9dc60c38b49f46c5ce2c02179479abb66ca29f63cd06475ae8e26299a78b5f06762d114aefbbca3ba6fbebe7093a58106eeaa40cf500d21633a4
+DIST ncurses-6.4_p20230527-patches.tar.xz 63080 BLAKE2B 9db4ac28c8936d3a9c6f3ca5cb8a4c92aa79ee4ce49789bcfc9c031a0454bf6f55a0544bc4a3dbb5c243ed9b2d0792afb98622a6a14b11675b7988100a650eb5 SHA512 3eacda173e8a177cd201ca3fef65311ac92e7e5af4039dc8a5792beae7db1d37efd06f5a55c249eebb771d1245995ff3a206a45794936b6b4299151666dbeade
+DIST ncurses-6.4_p20240330-patches.tar.xz 63796 BLAKE2B 3e6618ba0b37268d10a16cf26c2810e55c17ded97079af3753e34f2d12575f979a2e55cfd308abf783e35e39d4a848b89f435b4886d3633007ccb522b8dc2e51 SHA512 1bbf1978f9287f68bf6a8596f06d4d0523564bf3d2f6b3bd9746081a2fa0c76e36862beca62a4157d51cac0df61e456ddb6cacfae10b92344fe80cd752f72c38
+DIST ncurses-6.4_p20240413-patches.tar.xz 63760 BLAKE2B 6a91d453cca3705ca54b3a6f2ef00250d655168c1697726db4b581a1597cbc143479b8794e176d5e4154c794f99ea33c3fe1eb26605789930fc82649a2da3c93 SHA512 59239503a9400e054641428528799aa9c13b12669b31f32b2ff18cb60882698801e04dcdf75ece8357c7a4c3b899a729aa973090ec12a20de72cb80a916878b8
diff --git a/sys-libs/ncurses/files/ncurses-5.7-nongnu.patch b/sys-libs/ncurses/files/ncurses-5.7-nongnu.patch
deleted file mode 100644
index 3f4a40520009..000000000000
--- a/sys-libs/ncurses/files/ncurses-5.7-nongnu.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ncurses-5.7/ncurses/curses.priv.h
-+++ ncurses-5.7/ncurses/curses.priv.h
-@@ -1452,6 +1452,8 @@ extern NCURSES_EXPORT(void) _nc_expanded
-
- /* charable.c */
- #if USE_WIDEC_SUPPORT
-+#include <wchar.h>
-+
- extern NCURSES_EXPORT(bool) _nc_is_charable(wchar_t);
- extern NCURSES_EXPORT(int) _nc_to_char(wint_t);
- extern NCURSES_EXPORT(wint_t) _nc_to_widechar(int);
diff --git a/sys-libs/ncurses/files/ncurses-6.0-pkg-config.patch b/sys-libs/ncurses/files/ncurses-6.0-pkg-config.patch
deleted file mode 100644
index 6808319b9533..000000000000
--- a/sys-libs/ncurses/files/ncurses-6.0-pkg-config.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-disable the $PATH search for the PKG_CONFIG tool. it isn't needed and just
-gets in the way when setting to a value that might not yet exist.
-
---- ncurses-6.0/configure
-+++ ncurses-6.0/configure
-@@ -3533,7 +3533,7 @@
- esac
-
- test -z "$PKG_CONFIG" && PKG_CONFIG=none
--if test "$PKG_CONFIG" != none ; then
-+if false ; then
-
- if test "x$prefix" != xNONE; then
- cf_path_syntax="$prefix"
diff --git a/sys-libs/ncurses/files/ncurses-6.0-rxvt-unicode-9.15.patch b/sys-libs/ncurses/files/ncurses-6.0-rxvt-unicode-9.15.patch
deleted file mode 100644
index af3df941d699..000000000000
--- a/sys-libs/ncurses/files/ncurses-6.0-rxvt-unicode-9.15.patch
+++ /dev/null
@@ -1,191 +0,0 @@
-Add rxvt-unicode terminfo, required by rxvt-unicode to function properly.
-
-Providing this in ncurses makes it widely available, much better than having to
-install rxvt-unicode everywhere.
-
-http://bugs.gentoo.org/show_bug.cgi?id=192083
-
-This patch uses the updated rxvt-unicode-9.15 terminfo
-which includes 256 color support and fixes Gentoo bug 383871
-
-http://bugs.gentoo.org/show_bug.cgi?id=383871
-
---- ncurses-6.0/misc/terminfo.src
-+++ ncurses-6.0/misc/terminfo.src
-@@ -5214,6 +5214,176 @@
- rxvt-16color|rxvt with 16 colors like aixterm,
- ncv#32, use=ibm+16color, use=rxvt,
-
-+# From: Thomas Dickey <dickey@clark.net> 04 Oct 1997
-+# Updated: Özgür Kesim <kesim@math.fu-berlin.de> 02 Nov 1997
-+# Updated: Marc Lehmann <schmorp@schmorp.de>, 17 Feb 2005
-+# Updated: Marc Lehmann <schmorp@schmorp.de>, 04 Nov 2008: change init/reset sequences
-+rxvt-unicode|rxvt-unicode terminal (X Window System),
-+ am,
-+ bce,
-+ eo,
-+ km,
-+ msgr,
-+ xenl,
-+ hs,
-+ cols#80,
-+ it#8,
-+ lines#24,
-+ acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~-A.B+C\,D0EhFiG,
-+ bel=^G,
-+ blink=\E[5m,
-+ bold=\E[1m,
-+ civis=\E[?25l,
-+ clear=\E[H\E[2J,
-+ cnorm=\E[?25h,
-+ cr=^M,
-+ csr=\E[%i%p1%d;%p2%dr,
-+ cub=\E[%p1%dD,
-+ cub1=^H,
-+ cud=\E[%p1%dB,
-+ cud1=^J,
-+ cuf=\E[%p1%dC,
-+ cuf1=\E[C,
-+ cup=\E[%i%p1%d;%p2%dH,
-+ cuu=\E[%p1%dA,
-+ cuu1=\E[A,
-+ cvvis=\E[?25h,
-+ dch=\E[%p1%dP,
-+ dch1=\E[P,
-+ dl=\E[%p1%dM,
-+ dl1=\E[M,
-+ ed=\E[J,
-+ el=\E[K,
-+ el1=\E[1K,
-+ flash=\E[?5h$<20/>\E[?5l,
-+ home=\E[H,
-+ hpa=\E[%i%p1%dG,
-+ ht=^I,
-+ hts=\EH,
-+ ich=\E[%p1%d@,
-+ ich1=\E[@,
-+ il=\E[%p1%dL,
-+ il1=\E[L,
-+ ind=^J,
-+ is1=\E[\041p,
-+ is2=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l,
-+ kDC=\E[3$,
-+ kIC=\E[2$,
-+ kEND=\E[8$,
-+ kHOM=\E[7$,
-+ kLFT=\E[d,
-+ kNXT=\E[6$,
-+ kPRV=\E[5$,
-+ kRIT=\E[c,
-+ kbs=\177,
-+ ka1=\EOw,
-+ ka3=\EOy,
-+ kb2=\EOu,
-+ kc1=\EOq,
-+ kc3=\EOs,
-+ kcbt=\E[Z,
-+ kcub1=\E[D,
-+ kcud1=\E[B,
-+ kcuf1=\E[C,
-+ kcuu1=\E[A,
-+ kdch1=\E[3~,
-+ kel=\E[8\^,
-+ kend=\E[8~,
-+ kent=\EOM,
-+ kf1=\E[11~,
-+ kf10=\E[21~,
-+ kf11=\E[23~,
-+ kf12=\E[24~,
-+ kf13=\E[25~,
-+ kf14=\E[26~,
-+ kf15=\E[28~,
-+ kf16=\E[29~,
-+ kf17=\E[31~,
-+ kf18=\E[32~,
-+ kf19=\E[33~,
-+ kf2=\E[12~,
-+ kf20=\E[34~,
-+ kf3=\E[13~,
-+ kf4=\E[14~,
-+ kf5=\E[15~,
-+ kf6=\E[17~,
-+ kf7=\E[18~,
-+ kf8=\E[19~,
-+ kf9=\E[20~,
-+ kfnd=\E[1~,
-+ khome=\E[7~,
-+ kich1=\E[2~,
-+ kmous=\E[M,
-+ knp=\E[6~,
-+ kpp=\E[5~,
-+ kslt=\E[4~,
-+ rc=\E8,
-+ rev=\E[7m,
-+ ri=\EM,
-+ rmso=\E[27m,
-+ rmul=\E[24m,
-+ rs1=\Ec,
-+ rs2=\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l,
-+ sgr0=\E[m\E(B,
-+ enacs=,
-+ smacs=\E(0,
-+ rmacs=\E(B,
-+ smso=\E[7m,
-+ smul=\E[4m,
-+ tbc=\E[3g,
-+ vpa=\E[%i%p1%dd,
-+ colors#88,
-+ pairs#7744,
-+ btns#5,
-+ lm#0,
-+ ccc,
-+ npc,
-+ mc5i,
-+ ncv#0,
-+ mir,
-+ xon,
-+ bw,
-+ ech=\E[%p1%dX,
-+ mc0=\E[i,
-+ mc4=\E[4i,
-+ mc5=\E[5i,
-+ sitm=\E[3m,
-+ ritm=\E[23m,
-+ smam=\E[?7h,
-+ rmam=\E[?7l,
-+ smir=\E[4h,
-+ rmir=\E[4l,
-+ smcup=\E[?1049h,
-+ rmcup=\E[r\E[?1049l,
-+ smkx=\E=,
-+ rmkx=\E>,
-+ indn=\E[%p1%dS,
-+ rin=\E[%p1%dT,
-+ sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;,
-+ op=\E[39;49m,
-+ setaf=\E[38;5;%p1%dm,
-+ setab=\E[48;5;%p1%dm,
-+ setf=%?%p1%{7}%>%t\E[38;5;%p1%dm%e\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;,
-+ setb=%?%p1%{7}%>%t\E[48;5;%p1%dm%e\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;,
-+ initc=\E]4;%p1%d;rgb\:%p2%{65535}%*%{1000}%/%4.4X/%p3%{65535}%*%{1000}%/%4.4X/%p4%{65535}%*%{1000}%/%4.4X\E\\,
-+ sc=\E7,
-+ s0ds=\E(B,
-+ s1ds=\E(0,
-+ s2ds=\E*B,
-+ s3ds=\E+B,
-+ u6=\E[%i%d;%dR,
-+ u7=\E[6n,
-+ u8=\E[?1;2c,
-+ u9=\E[c,
-+ tsl=\E]2;,
-+ fsl=\007,
-+ dsl=\E]2;\007,
-+
-+rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System),
-+ colors#256,
-+ pairs#32767,
-+ use=rxvt-unicode,
-+
- #### MRXVT
- # mrxvt 0.5.4
- #
diff --git a/sys-libs/ncurses/files/ncurses-6.0-ticlib.patch b/sys-libs/ncurses/files/ncurses-6.0-ticlib.patch
deleted file mode 100644
index 188e6adff8c7..000000000000
--- a/sys-libs/ncurses/files/ncurses-6.0-ticlib.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-always include ticlib even when progs are disabled
-
-https://bugs.gentoo.org/557360
-
---- a/configure
-+++ b/configure
-@@ -21312,7 +21312,7 @@ echo "$as_me:21311: checking for library subsets" >&5
- echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
- LIB_SUBSETS=
-
--if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
-+if true; then
- LIB_SUBSETS="${LIB_SUBSETS}ticlib"
- if test "$with_ticlib" != no ; then
- LIB_SUBSETS="${LIB_SUBSETS} "
diff --git a/sys-libs/ncurses/files/ncurses-6.2_p20210123-cppflags-cross.patch b/sys-libs/ncurses/files/ncurses-6.2_p20210123-cppflags-cross.patch
deleted file mode 100644
index 1087bf5c9cb7..000000000000
--- a/sys-libs/ncurses/files/ncurses-6.2_p20210123-cppflags-cross.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-https://bugs.gentoo.org/601426
-https://lists.gnu.org/archive/html/bug-ncurses/2015-02/msg00012.html
-
-From: John Vogel
-Subject: [PATCH] c++ binding missed when cross compiling
-Date: Mon, 16 Feb 2015 01:01:48 -0500
-
-The configure script hard codes the include dir to the prefix'ed include dir,
-when checking if c++ compiler works. This breaks the compiler's built-in search
-path. I've included two patches. The first works on the configure.in file, which
-requires your autoconf stuff to test and I'm not ready to meddle with at the
-moment. The other works directly on the configure file. I've tested the second
-one; it should mirror what the first patch tries to achieve and works for me.
-
---- a/configure
-+++ b/configure
-@@ -3459,10 +3459,6 @@
- echo "$as_me:3459: checking if $CXX works" >&5
- echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
-
-- save_CPPFLAGS="$CPPFLAGS"
-- eval cf_includedir=${includedir}
-- CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
--
- cat >"conftest.$ac_ext" <<_ACEOF
- #line 3467 "configure"
- #include "confdefs.h"
-@@ -3499,7 +3495,6 @@
- cf_cxx_works=no
- fi
- rm -f "conftest.$ac_objext" "conftest.$ac_ext"
-- CPPFLAGS="$save_CPPFLAGS"
-
- echo "$as_me:3504: result: $cf_cxx_works" >&5
- echo "${ECHO_T}$cf_cxx_works" >&6
diff --git a/sys-libs/ncurses/metadata.xml b/sys-libs/ncurses/metadata.xml
index 27fbeede9c53..481ccfc2e019 100644
--- a/sys-libs/ncurses/metadata.xml
+++ b/sys-libs/ncurses/metadata.xml
@@ -12,10 +12,15 @@
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.2_p20210619.ebuild b/sys-libs/ncurses/ncurses-6.2_p20210619.ebuild
deleted file mode 100644
index 464f7ca0bcc2..000000000000
--- a/sys-libs/ncurses/ncurses-6.2_p20210619.ebuild
+++ /dev/null
@@ -1,326 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs multilib multilib-minimal preserve-libs usr-ldscript
-
-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/"
-SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz"
-
-if [[ "${PV}" == *_p* ]] ; then
- SRC_URI+=" ftp://ftp.invisible-island.net/${PN}/${PV/_p*}/${P/_p/-}-patch.sh.bz2
- https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${P/_p/-}-patch.sh.bz2"
- #SRC_URI+=" https://dev.gentoo.org/~polynomial-c/dist/${P}.patch.xz"
-fi
-
-LICENSE="MIT"
-# The subslot reflects the SONAME.
-SLOT="0/6"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="ada +cxx debug doc gpm minimal profile static-libs test tinfo trace"
-RESTRICT="!test? ( test )"
-
-DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
-# berkdb? ( sys-libs/db )"
-# Block the older ncurses that installed all files w/SLOT=5. #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"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/${PN}-5.7-nongnu.patch"
- "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" #192083 #383871
- "${FILESDIR}/${PN}-6.0-pkg-config.patch"
- "${FILESDIR}/${PN}-6.0-ticlib.patch" #557360
- "${FILESDIR}/${PN}-6.2_p20210123-cppflags-cross.patch" #601426
-)
-
-src_prepare() {
- if [[ "${PV}" == *_p* ]] ; then
- eapply "${WORKDIR}"/${P/_p/-}-patch.sh
- #eapply "${WORKDIR}/${P}.patch"
- fi
- default
-}
-
-src_configure() {
- unset TERMINFO #115036
- tc-export_build_env BUILD_{CC,CPP}
- BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642
-
- # 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. #249363 #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} \
- CHOST=${CBUILD} \
- CFLAGS=${BUILD_CFLAGS} \
- CXXFLAGS=${BUILD_CXXFLAGS} \
- CPPFLAGS=${BUILD_CPPFLAGS} \
- LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
- do_configure cross --without-shared --with-normal --with-progs
- fi
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- 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"
-
- # Disabled until #245417 is sorted out.
- #$(use_with berkdb hashed-db)
-
- # 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
- --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)
- # Required for building on mingw-w64, and possibly other windows
- # platforms, bug #639670
- $(use_enable kernel_Winnt term-driver)
- --disable-termcap
- --enable-symlinks
- --with-rcs-ids
- --with-manpage-format=normal
- --enable-const
- --enable-colorfgbg
- --enable-hard-tabs
- --enable-echo
- $(use_enable !ada warnings)
- $(use_with debug assertions)
- $(use_enable !debug leaks)
- $(use_with debug expanded)
- $(use_with !debug macros)
- $(multilib_native_with progs)
- $(use_with test tests)
- $(use_with trace)
- $(use_with tinfo termlib)
- --disable-stripping
- --disable-pkg-ldflags
- )
-
- 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_PATH="${cross_path}/progs/tic"
- fi
-
- # Force bash until upstream rebuilds the configure script with a newer
- # version of autotools. #545532
- #CONFIG_SHELL=${EPREFIX}/bin/bash \
- ECONF_SOURCE="${S}" \
- econf "${conf[@]}" "$@"
-}
-
-src_compile() {
- # See comments in src_configure.
- if ! has_version -b "~sys-libs/${P}:0" ; then
- # We could possibly merge these two branches but opting to be
- # conservative when merging some of the Prefix changes.
-
- if [[ ${CHOST} == *-cygwin* ]] && ! multilib_is_native_abi ; then
- # We make 'tic$(x)' here, for Cygwin having x=".exe".
- BUILD_DIR="${WORKDIR}" \
- do_compile cross -C progs all PROGS='tic$(x)'
- else
- BUILD_DIR="${WORKDIR}" \
- do_compile cross -C progs tic
- fi
- 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
- if ! tc-is-static-only ; then
- # Provide a link for -lcurses.
- ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die
- fi
- # don't delete '*.dll.a', needed for linking #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 (#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
-}
-
-multilib_src_install_all() {
-# if ! use berkdb ; then
- # We need the basic terminfo files in /etc for embedded/recovery. #37026
- einfo "Installing basic terminfo files in /etc..."
- 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
- )
- local x
- 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
-# fi
-
- 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
- keepdir /usr/share/terminfo #245374
-
- 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.3.ebuild b/sys-libs/ncurses/ncurses-6.3.ebuild
deleted file mode 100644
index 0faa70d2aa52..000000000000
--- a/sys-libs/ncurses/ncurses-6.3.ebuild
+++ /dev/null
@@ -1,328 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs multilib multilib-minimal preserve-libs usr-ldscript
-
-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/"
-SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz
- https://invisible-mirror.net/archives/${PN}/${MY_P}.tar.gz
- ftp://ftp.invisible-island.net/${PN}/${MY_P}.tar.gz"
-
-if [[ "${PV}" == *_p* ]] ; then
- SRC_URI+=" ftp://ftp.invisible-island.net/${PN}/${PV/_p*}/${P/_p/-}-patch.sh.bz2
- https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${P/_p/-}-patch.sh.bz2"
- #SRC_URI+=" https://dev.gentoo.org/~polynomial-c/dist/${P}.patch.xz"
-fi
-
-LICENSE="MIT"
-# The subslot reflects the SONAME.
-SLOT="0/6"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="ada +cxx debug doc gpm minimal profile static-libs test tinfo trace"
-RESTRICT="!test? ( test )"
-
-DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
-# berkdb? ( sys-libs/db )"
-# Block the older ncurses that installed all files w/SLOT=5. #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"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/${PN}-5.7-nongnu.patch"
- "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" #192083 #383871
- "${FILESDIR}/${PN}-6.0-pkg-config.patch"
- "${FILESDIR}/${PN}-6.0-ticlib.patch" #557360
- "${FILESDIR}/${PN}-6.2_p20210123-cppflags-cross.patch" #601426
-)
-
-src_prepare() {
- if [[ "${PV}" == *_p* ]] ; then
- eapply "${WORKDIR}"/${P/_p/-}-patch.sh
- #eapply "${WORKDIR}/${P}.patch"
- fi
- default
-}
-
-src_configure() {
- unset TERMINFO #115036
- tc-export_build_env BUILD_{CC,CPP}
- BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642
-
- # 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. #249363 #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} \
- CHOST=${CBUILD} \
- CFLAGS=${BUILD_CFLAGS} \
- CXXFLAGS=${BUILD_CXXFLAGS} \
- CPPFLAGS=${BUILD_CPPFLAGS} \
- LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
- do_configure cross --without-shared --with-normal --with-progs
- fi
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- 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"
-
- # Disabled until #245417 is sorted out.
- #$(use_with berkdb hashed-db)
-
- # 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
- --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)
- # Required for building on mingw-w64, and possibly other windows
- # platforms, bug #639670
- $(use_enable kernel_Winnt term-driver)
- --disable-termcap
- --enable-symlinks
- --with-rcs-ids
- --with-manpage-format=normal
- --enable-const
- --enable-colorfgbg
- --enable-hard-tabs
- --enable-echo
- $(use_enable !ada warnings)
- $(use_with debug assertions)
- $(use_enable !debug leaks)
- $(use_with debug expanded)
- $(use_with !debug macros)
- $(multilib_native_with progs)
- $(use_with test tests)
- $(use_with trace)
- $(use_with tinfo termlib)
- --disable-stripping
- --disable-pkg-ldflags
- )
-
- 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_PATH="${cross_path}/progs/tic"
- fi
-
- # Force bash until upstream rebuilds the configure script with a newer
- # version of autotools. #545532
- #CONFIG_SHELL=${EPREFIX}/bin/bash \
- ECONF_SOURCE="${S}" \
- econf "${conf[@]}" "$@"
-}
-
-src_compile() {
- # See comments in src_configure.
- if ! has_version -b "~sys-libs/${P}:0" ; then
- # We could possibly merge these two branches but opting to be
- # conservative when merging some of the Prefix changes.
-
- if [[ ${CHOST} == *-cygwin* ]] && ! multilib_is_native_abi ; then
- # We make 'tic$(x)' here, for Cygwin having x=".exe".
- BUILD_DIR="${WORKDIR}" \
- do_compile cross -C progs all PROGS='tic$(x)'
- else
- BUILD_DIR="${WORKDIR}" \
- do_compile cross -C progs tic
- fi
- 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
- if ! tc-is-static-only ; then
- # Provide a link for -lcurses.
- ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die
- fi
- # don't delete '*.dll.a', needed for linking #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 (#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
-}
-
-multilib_src_install_all() {
-# if ! use berkdb ; then
- # We need the basic terminfo files in /etc for embedded/recovery. #37026
- einfo "Installing basic terminfo files in /etc..."
- 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
- )
- local x
- 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
-# fi
-
- 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
- keepdir /usr/share/terminfo #245374
-
- 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.3_p20211106.ebuild b/sys-libs/ncurses/ncurses-6.4_p20230401.ebuild
index 6c1bee312825..1c268c058ea2 100644
--- a/sys-libs/ncurses/ncurses-6.3_p20211106.ebuild
+++ b/sys-libs/ncurses/ncurses-6.4_p20230401.ebuild
@@ -1,88 +1,149 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit toolchain-funcs multilib multilib-minimal preserve-libs usr-ldscript
+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"
+DESCRIPTION="Console display library"
HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/"
-SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz
+# 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
- ftp://ftp.invisible-island.net/${PN}/${MY_P}.tar.gz"
+ verify-sig? ( mirror://gnu/ncurses/${MY_P}.tar.gz.sig )
+"
-if [[ "${PV}" == *_p* ]] ; then
+GENTOO_PATCH_DEV=sam
+GENTOO_PATCH_PV=6.4_p20230408
+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-mirror.net/archives/ncurses/6.3/:
+ # 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=(
- 20211026
- 20211030
+ 20230107
+ 20230114
+ 20230121
+ 20230128
+ 20230211
+ 20230218
+ 20230225
+ 20230311
+
# Latest patch is just _pN = $(ver_cut 4)
$(ver_cut 4)
)
if [[ -z ${PATCH_DATES[@]} ]] ; then
- SRC_URI+=" ftp://ftp.invisible-island.net/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.bz2
- https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.bz2"
+ 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
- patch_date=
- for patch_date in "${PATCH_DATES[@]}" ; do
- SRC_URI+=" ftp://ftp.invisible-island.net/${PN}/${PV/_p*}/${MY_P}-${patch_date}.patch.gz"
- SRC_URI+=" https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-${patch_date}.patch.gz"
- done
- unset patch_date
+ # 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
-
- #SRC_URI+=" https://dev.gentoo.org/~polynomial-c/dist/${P}.patch.xz"
fi
+SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${GENTOO_PATCH_NAME}.tar.xz"
+
LICENSE="MIT"
# The subslot reflects the SONAME.
SLOT="0/6"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="ada +cxx debug doc gpm minimal profile static-libs test tinfo trace"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="ada +cxx debug doc gpm minimal profile split-usr +stack-realign static-libs test tinfo trace"
RESTRICT="!test? ( test )"
DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
-# berkdb? ( sys-libs/db )"
-# Block the older ncurses that installed all files w/SLOT=5. #557472
-RDEPEND="${DEPEND}
+# 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"
+ !<x11-terms/st-0.6-r1
+"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )"
S="${WORKDIR}/${MY_P}"
PATCHES=(
- "${FILESDIR}/${PN}-5.7-nongnu.patch"
- "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" #192083 #383871
- "${FILESDIR}/${PN}-6.0-pkg-config.patch"
- "${FILESDIR}/${PN}-6.0-ticlib.patch" #557360
- "${FILESDIR}/${PN}-6.2_p20210123-cppflags-cross.patch" #601426
+ "${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_prepare() {
- if [[ "${PV}" == *_p* ]] ; then
- #eapply "${WORKDIR}"/${P/_p/-}-patch.sh
- eapply "${WORKDIR}"/
+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() {
- unset TERMINFO #115036
- tc-export_build_env BUILD_{CC,CPP}
- BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642
+ # 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
@@ -99,7 +160,7 @@ src_configure() {
# 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. #249363 #557598
+ # the host version isn't available. bug #249363, bug #557598
if ! has_version -b "~sys-libs/${P}:0" ; then
local lbuildflags="-static"
@@ -116,17 +177,25 @@ src_configure() {
# 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
+ 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}"
@@ -146,9 +215,6 @@ do_configure() {
# src_install() ...
--with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo"
- # Disabled until #245417 is sorted out.
- #$(use_with berkdb hashed-db)
-
# Enable installation of .pc files.
--enable-pc-files
# This path is used to control where the .pc files are installed.
@@ -156,6 +222,9 @@ do_configure() {
# Now the rest of the various standard flags.
--with-shared
+ # (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)
@@ -168,10 +237,9 @@ do_configure() {
$(use_with gpm gpm libgpm.so.1)
# Required for building on mingw-w64, and possibly other windows
# platforms, bug #639670
- $(use_enable kernel_Winnt term-driver)
+ --disable-term-driver
--disable-termcap
--enable-symlinks
- --with-rcs-ids
--with-manpage-format=normal
--enable-const
--enable-colorfgbg
@@ -200,6 +268,7 @@ do_configure() {
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
@@ -215,27 +284,13 @@ do_configure() {
[[ -d ${cross_path} ]] && export TIC_PATH="${cross_path}/progs/tic"
fi
- # Force bash until upstream rebuilds the configure script with a newer
- # version of autotools. #545532
- #CONFIG_SHELL=${EPREFIX}/bin/bash \
- ECONF_SOURCE="${S}" \
- econf "${conf[@]}" "$@"
+ ECONF_SOURCE="${S}" econf "${conf[@]}" "$@"
}
src_compile() {
# See comments in src_configure.
if ! has_version -b "~sys-libs/${P}:0" ; then
- # We could possibly merge these two branches but opting to be
- # conservative when merging some of the Prefix changes.
-
- if [[ ${CHOST} == *-cygwin* ]] && ! multilib_is_native_abi ; then
- # We make 'tic$(x)' here, for Cygwin having x=".exe".
- BUILD_DIR="${WORKDIR}" \
- do_compile cross -C progs all PROGS='tic$(x)'
- else
- BUILD_DIR="${WORKDIR}" \
- do_compile cross -C progs tic
- fi
+ BUILD_DIR="${WORKDIR}" do_compile cross -C progs tic$(get_exeext)
fi
multilib-minimal_src_compile
@@ -260,6 +315,7 @@ do_compile() {
# 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
@@ -280,42 +336,46 @@ multilib_src_install() {
"${NCURSES_TARGETS[@]}" \
$(usex tinfo 'tinfow tinfo' '')
fi
- if ! tc-is-static-only ; then
- # Provide a link for -lcurses.
- ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die
- fi
- # don't delete '*.dll.a', needed for linking #631468
+
+ # 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 (#689240)
+ # 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() {
-# if ! use berkdb ; then
- # We need the basic terminfo files in /etc for embedded/recovery. #37026
- einfo "Installing basic terminfo files in /etc..."
- 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
- )
+ 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}")")
@@ -327,13 +387,19 @@ multilib_src_install_all() {
"/usr/share/terminfo/${basedir}/${x}"
fi
done
-# fi
-
- 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
- keepdir /usr/share/terminfo #245374
+ 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
diff --git a/sys-libs/ncurses/ncurses-6.4_p20230527.ebuild b/sys-libs/ncurses/ncurses-6.4_p20230527.ebuild
new file mode 100644
index 000000000000..007bbc486ccd
--- /dev/null
+++ b/sys-libs/ncurses/ncurses-6.4_p20230527.ebuild
@@ -0,0 +1,431 @@
+# Copyright 1999-2023 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.4_p20230527
+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=(
+ 20230107
+ 20230114
+ 20230121
+ 20230128
+ 20230211
+ 20230218
+ 20230225
+ 20230311
+ 20230401
+ 20230408
+ 20230415
+ 20230418
+ 20230423
+ 20230424
+ 20230429
+ 20230506
+ 20230514
+ 20230520
+
+ # 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"
+
+LICENSE="MIT"
+# The subslot reflects the SONAME.
+SLOT="0/6"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="ada +cxx debug doc gpm minimal profile split-usr +stack-realign static-libs test tinfo trace"
+RESTRICT="!test? ( test )"
+
+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
+"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )"
+
+S="${WORKDIR}/${MY_P}"
+
+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
+ # (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)
+ --disable-term-driver
+ --disable-termcap
+ --enable-symlinks
+ --with-manpage-format=normal
+ --enable-const
+ --enable-colorfgbg
+ --enable-hard-tabs
+ --enable-echo
+ $(use_enable !ada warnings)
+ $(use_with debug assertions)
+ $(use_enable !debug leaks)
+ $(use_with debug expanded)
+ $(use_with !debug macros)
+ $(multilib_native_with progs)
+ $(use_with test tests)
+ $(use_with trace)
+ $(use_with tinfo termlib)
+ --disable-stripping
+ --disable-pkg-ldflags
+ )
+
+ 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_PATH="${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.4_p20240330.ebuild b/sys-libs/ncurses/ncurses-6.4_p20240330.ebuild
new file mode 100644
index 000000000000..e4fb6c71f0fe
--- /dev/null
+++ b/sys-libs/ncurses/ncurses-6.4_p20240330.ebuild
@@ -0,0 +1,478 @@
+# Copyright 1999-2024 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.4_p20240330
+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=(
+ 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
+
+ # 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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="ada +cxx debug doc gpm minimal profile split-usr +stack-realign static-libs test tinfo trace"
+RESTRICT="!test? ( test )"
+
+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
+"
+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
+ # (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)
+ --disable-term-driver
+ --disable-termcap
+ --enable-symlinks
+ --with-manpage-format=normal
+ --enable-const
+ --enable-colorfgbg
+ --enable-hard-tabs
+ --enable-echo
+ $(use_enable !ada warnings)
+ $(use_with debug assertions)
+ $(use_enable !debug leaks)
+ $(use_with debug expanded)
+ $(use_with !debug macros)
+ $(multilib_native_with progs)
+ $(use_with test tests)
+ $(use_with trace)
+ $(use_with tinfo termlib)
+ --disable-stripping
+ --disable-pkg-ldflags
+ )
+
+ 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_PATH="${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.4_p20240414.ebuild b/sys-libs/ncurses/ncurses-6.4_p20240414.ebuild
new file mode 100644
index 000000000000..3d26b093679b
--- /dev/null
+++ b/sys-libs/ncurses/ncurses-6.4_p20240414.ebuild
@@ -0,0 +1,488 @@
+# Copyright 1999-2024 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.4_p20240413
+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=(
+ 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/${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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="ada +cxx debug doc gpm minimal profile split-usr +stack-realign static-libs test tinfo trace"
+RESTRICT="!test? ( test )"
+
+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
+"
+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
+ # (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)
+ --disable-term-driver
+ --disable-termcap
+ --enable-symlinks
+ --with-manpage-format=normal
+ --enable-const
+ --enable-colorfgbg
+ --enable-hard-tabs
+ --enable-echo
+ $(use_enable !ada warnings)
+ $(use_with debug assertions)
+ $(use_enable !debug leaks)
+ $(use_with debug expanded)
+ $(use_with !debug macros)
+ $(multilib_native_with progs)
+ $(use_with test tests)
+ $(use_with trace)
+ $(use_with tinfo termlib)
+ --disable-stripping
+ --disable-pkg-ldflags
+ )
+
+ 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}
+
+ # XXX: Revisit on next ABI break (>6) (bug #928873)
+ --disable-opaque-curses
+ --disable-opaque-form
+ --disable-opaque-menu
+ --disable-opaque-panel
+ )
+ 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_PATH="${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
index 70c92629aba4..5797ec3a58bd 100644
--- a/sys-libs/newlib/Manifest
+++ b/sys-libs/newlib/Manifest
@@ -1,2 +1,4 @@
DIST newlib-4.1.0.tar.gz 18648429 BLAKE2B c4d4d734bceeacf05b75d450d4316392d0000266812f98f99cd3f9f0926ac9848e1dc145361827d1d6951edfe5f109923c982d9f284f927ffc5fd5e5edaf8be6 SHA512 6a24b64bb8136e4cd9d21b8720a36f87a34397fd952520af66903e183455c5cf19bb0ee4607c12a05d139c6c59382263383cb62c461a839f969d23d3bc4b1d34
DIST newlib-4.2.0.20211231.tar.gz 18921589 BLAKE2B fb85a368d082e2b9005d5d295d6854eb7d0e351cfade6516e6a06b18656d9139d7629f55a6d5f63337c6bce511a2373e797bed96847f19941b26cacfb1c8d3bc SHA512 0c3efd7b74a6b8457a717cbb6aa6c5ff268eeaba375535465c6bd6502c3d32b54a9bc3ba7f2c6990f78e29152eee2f62acb39b674d24f9ddf440374a1ec9d2e8
+DIST newlib-4.3.0.20230120.tar.gz 8832922 BLAKE2B b5493f25e44049f4e1222698894e7e67756928062e05f5d16bcd52b2221e5c04a80a9e0cbc3fc6e92d67fe6b3813e06b6d3a6d39e8742e02b8f13ff84d809de1 SHA512 4a06309d36c2255fef8fc8f2d133cafa850f1ed2eddfb27b5d45f5d16af69e0fca829a0b4c9b34af4ed3a28c6fcc929761e0ee823a4229f35c2853d432b5e7ef
+DIST newlib-4.4.0.20231231.tar.gz 9022406 BLAKE2B 1df810c7776aa1fe2806682509ab45df642f5e80d6069b7c6ca513b3d820440fc73abdf7505d1f3149d0a07f0c5558a48620d2824f1698c2f1df5f6473105eb4 SHA512 ea3baa0b7c9175aae024f0b7d272be092ef2c07483239a99329203e18a44bc23093d29e0ffcbe14bc591f610f0829eacd646cabb06d1c34aa23239cb1b814b46
diff --git a/sys-libs/newlib/files/newlib-4.3.0.20230120-libc-arm-setjmp-gcc-backwards-compat.patch b/sys-libs/newlib/files/newlib-4.3.0.20230120-libc-arm-setjmp-gcc-backwards-compat.patch
new file mode 100644
index 000000000000..3eab820db787
--- /dev/null
+++ b/sys-libs/newlib/files/newlib-4.3.0.20230120-libc-arm-setjmp-gcc-backwards-compat.patch
@@ -0,0 +1,57 @@
+https://bugs.gentoo.org/891589
+https://sourceware.org/pipermail/newlib/2022/020035.html
+https://sourceware.org/git/?p=newlib-cygwin.git;a=commit;h=c6e601de84ea9f2be2b026c609cc3c1fe82a3103
+
+From c6e601de84ea9f2be2b026c609cc3c1fe82a3103 Mon Sep 17 00:00:00 2001
+From: "Victor L. Do Nascimento" <victor.donascimento@arm.com>
+Date: Fri, 3 Feb 2023 11:15:26 +0000
+Subject: [PATCH] libc: arm: Implement setjmp GCC backwards compatibility.
+
+When compiling Newlib for arm targets with GCC 12.1 onward, the
+passing of architecture extension information to the assembler is
+automatic, making the use of .fpu and .arch_extension directives
+in assembly files redundant.
+
+With older versions of GCC, however, these directives must be
+hard-coded into the `arm/setjmp.S' file to allow the assembly of
+instructions concerning the storage and subsequent reloading of the
+floating point registers to/from the jump buffer, respectively.
+
+This patch conditionally adds the `.fpu vfpxd' and `.arch_extension
+mve' directives based on compile-time preprocessor macros concerning
+GCC version and target architectural features, such that both the
+assembly and linking of setjmp.S succeeds for older versions of
+Newlib.
+--- a/newlib/libc/machine/arm/setjmp.S
++++ b/newlib/libc/machine/arm/setjmp.S
+@@ -64,6 +64,28 @@
+
+ .syntax unified
+
++/* GCC 12.1 and later will tell the assembler exactly which floating
++ point (or MVE) unit is required and we don't want to override
++ that. Conversely, older versions of the compiler don't pass this
++ information so we need to enable the VFP version that is most
++ appropriate. The choice here should support all suitable VFP
++ versions that the older toolchains can handle. */
++#if __GNUC__ && __GNUC__ < 12
++/* Ensure that FPU instructions are correctly compiled and, likewise,
++ the appropriate build attributes are added to the resulting object
++ file. Check whether the MVE extension is present and whether
++ we have support for hardware floating point-operations. VFPxd
++ covers all the cases we need in this file for hardware
++ floating-point and should be compatible with all required FPUs
++ that we need to support. */
++# if __ARM_FP
++ .fpu vfpxd
++# endif
++# if __ARM_FEATURE_MVE
++ .arch_extension mve
++# endif
++#endif
++
+ #if __ARM_ARCH_ISA_THUMB == 1 && !__ARM_ARCH_ISA_ARM
+ /* ARMv6-M-like has to be implemented in Thumb mode. */
+
+--
+2.39.3
diff --git a/sys-libs/newlib/metadata.xml b/sys-libs/newlib/metadata.xml
index 5e314acbb2e9..0efee71c01f4 100644
--- a/sys-libs/newlib/metadata.xml
+++ b/sys-libs/newlib/metadata.xml
@@ -11,4 +11,7 @@
<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.1.0-r1.ebuild b/sys-libs/newlib/newlib-4.1.0-r2.ebuild
index a6ad7b9c65d1..52f5c0cbde67 100644
--- a/sys-libs/newlib/newlib-4.1.0-r1.ebuild
+++ b/sys-libs/newlib/newlib-4.1.0-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -111,7 +111,7 @@ src_configure() {
--enable-lite-exit \
--enable-newlib-global-atexit \
--enable-newlib-nano-formatted-io \
- ${myconf}
+ "${myconf[@]}"
fi
}
diff --git a/sys-libs/newlib/newlib-4.2.0.20211231.ebuild b/sys-libs/newlib/newlib-4.2.0.20211231-r1.ebuild
index a6ad7b9c65d1..17fd43c36734 100644
--- a/sys-libs/newlib/newlib-4.2.0.20211231.ebuild
+++ b/sys-libs/newlib/newlib-4.2.0.20211231-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -111,7 +111,7 @@ src_configure() {
--enable-lite-exit \
--enable-newlib-global-atexit \
--enable-newlib-nano-formatted-io \
- ${myconf}
+ "${myconf[@]}"
fi
}
@@ -136,16 +136,16 @@ src_install() {
emake -j1 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\)\.a" -print)
+ 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 "${D}/usr/${CTARGET}/include/newlib-nano" || die
- mv "${NEWLIBNANOTMPINSTALL}/usr/${CTARGET}/include/newlib.h" \
- "${D}/usr/${CTARGET}/include/newlib-nano/newlib.h" || die
+ 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
# minor hack to keep things clean
diff --git a/sys-libs/newlib/newlib-4.3.0.20230120-r1.ebuild b/sys-libs/newlib/newlib-4.3.0.20230120-r1.ebuild
new file mode 100644
index 000000000000..21ce7e99de7c
--- /dev/null
+++ b/sys-libs/newlib/newlib-4.3.0.20230120-r1.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit 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="ftp://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() {
+ # 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-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}"
+ 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}"
+ 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}"
+ emake -C "${NEWLIBBUILD}"
+
+ if use nano ; then
+ export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}"
+ export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}"
+ 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
+
+ # 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.3.0.20230120-r2.ebuild b/sys-libs/newlib/newlib-4.3.0.20230120-r2.ebuild
new file mode 100644
index 000000000000..2436fa048633
--- /dev/null
+++ b/sys-libs/newlib/newlib-4.3.0.20230120-r2.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit 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="ftp://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
+ "${FILESDIR}"/${P}-libc-arm-setjmp-gcc-backwards-compat.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() {
+ # 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}"
+ 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}"
+ 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}"
+ emake -C "${NEWLIBBUILD}"
+
+ if use nano ; then
+ export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}"
+ export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}"
+ 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
+
+ # 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.4.0.20231231.ebuild b/sys-libs/newlib/newlib-4.4.0.20231231.ebuild
new file mode 100644
index 000000000000..d29d3f10e0d1
--- /dev/null
+++ b/sys-libs/newlib/newlib-4.4.0.20231231.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit 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() {
+ # 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}"
+ 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}"
+ 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}"
+ emake -C "${NEWLIBBUILD}"
+
+ if use nano ; then
+ export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}"
+ export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}"
+ 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
+
+ # 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
index a6ad7b9c65d1..d29d3f10e0d1 100644
--- a/sys-libs/newlib/newlib-9999.ebuild
+++ b/sys-libs/newlib/newlib-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI="8"
inherit flag-o-matic toolchain-funcs
@@ -9,7 +9,7 @@ if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://sourceware.org/git/newlib-cygwin.git"
inherit git-r3
else
- SRC_URI="ftp://sourceware.org/pub/newlib/${P}.tar.gz"
+ SRC_URI="https://sourceware.org/pub/newlib/${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
@@ -37,12 +37,8 @@ NEWLIBBUILD="${WORKDIR}/build"
NEWLIBNANOBUILD="${WORKDIR}/build.nano"
NEWLIBNANOTMPINSTALL="${WORKDIR}/nano_tmp_install"
-# Adding -U_FORTIFY_SOURCE to counter the effect of Gentoo's
-# auto-addition of _FORTIFY_SOURCE at gcc site: bug #656018#c4
-# Currently newlib can't be built itself when _FORTIFY_SOURCE
-# is set.
-CFLAGS_FULL="-ffunction-sections -fdata-sections -U_FORTIFY_SOURCE"
-CFLAGS_NANO="-Os -ffunction-sections -fdata-sections -U_FORTIFY_SOURCE"
+CFLAGS_FULL="-ffunction-sections -fdata-sections"
+CFLAGS_NANO="-Os -ffunction-sections -fdata-sections"
pkg_setup() {
# Reject newlib-on-glibc type installs
@@ -71,6 +67,10 @@ src_configure() {
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.
@@ -111,7 +111,7 @@ src_configure() {
--enable-lite-exit \
--enable-newlib-global-atexit \
--enable-newlib-nano-formatted-io \
- ${myconf}
+ "${myconf[@]}"
fi
}
@@ -129,23 +129,23 @@ src_compile() {
src_install() {
cd "${NEWLIBBUILD}" || die
- emake -j1 DESTDIR="${D}" install
+ emake DESTDIR="${D}" install
if use nano ; then
cd "${NEWLIBNANOBUILD}" || die
- emake -j1 DESTDIR="${NEWLIBNANOTMPINSTALL}" install
+ 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\)\.a" -print)
+ 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 "${D}/usr/${CTARGET}/include/newlib-nano" || die
- mv "${NEWLIBNANOTMPINSTALL}/usr/${CTARGET}/include/newlib.h" \
- "${D}/usr/${CTARGET}/include/newlib-nano/newlib.h" || die
+ 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
# minor hack to keep things clean
diff --git a/sys-libs/nss_wrapper/Manifest b/sys-libs/nss_wrapper/Manifest
index 98ab948fa58e..e3e3a00d14c7 100644
--- a/sys-libs/nss_wrapper/Manifest
+++ b/sys-libs/nss_wrapper/Manifest
@@ -1,2 +1 @@
-DIST nss_wrapper-1.1.10.tar.gz 89593 BLAKE2B 9f478f87acbe9a842edf443ddfc45642621cee22dd03342cfb7dcc03fd4b188950a43527d3b332b03714729f7f57cf072b77ffb38574b98124dfdbb4b03f227d SHA512 7c2f0eccdb3535643015aea8b4bdb87b421c3575c3124b62c8f17c9d3db54d92ba012524674c41c16f02a1b6ebe4177724f04eefdc04760ca49b32d3f77910c5
-DIST nss_wrapper-1.1.6.tar.gz 57893 BLAKE2B 4952b1af2b2b0487104b650b98694e5d39aed9edb44992d22e10ea38a2c4009f076aafa36f43775a021eca5b1f2708c9f42fa711d6715c43b077a9a3341570e8 SHA512 213d611abc072cb8d098b0782f661b4cdf1dcfd04fb564fb05034f023197aeed15a684478c660c00fb72f9438a192914e7b6878e505e4380435534bef52e0328
+DIST nss_wrapper-1.1.15.tar.gz 185236 BLAKE2B 9c087ec3118eabccef386214abf76d384d9f85bb095aded43492a7f41b13e196a92e088ca7b8b798f9517cbbdc1cf5efbe3c7201cbb623322a9277681203954a SHA512 803dfb67e042800e60f4735177384ff3b9348f4c96c02e62ae0b449583542fdaf443eb1fa48b5d5e4ea6fe0d81ce84f340bd406c968c05f71b5c64dd499feacd
diff --git a/sys-libs/nss_wrapper/files/nss_wrapper-1.1.15-cmocka-cmake.patch b/sys-libs/nss_wrapper/files/nss_wrapper-1.1.15-cmocka-cmake.patch
new file mode 100644
index 000000000000..503066dd30b9
--- /dev/null
+++ b/sys-libs/nss_wrapper/files/nss_wrapper-1.1.15-cmocka-cmake.patch
@@ -0,0 +1,26 @@
+https://git.samba.org/?p=nss_wrapper.git;a=commit;h=2c879a0ffa70cee33329291d7576ec971d420da2
+
+From 2c879a0ffa70cee33329291d7576ec971d420da2 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@samba.org>
+Date: Fri, 17 Feb 2023 17:51:27 +0100
+Subject: [PATCH] cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode
+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>
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -1,5 +1,9 @@
+ project(tests C)
+
++if (TARGET cmocka::cmocka)
++ set(CMOCKA_LIBRARY cmocka::cmocka)
++endif()
++
+ set(TESTSUITE_LIBRARIES nss_utils ${NWRAP_REQUIRED_LIBRARIES} ${CMOCKA_LIBRARY})
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
+
+--
+2.34.1
diff --git a/sys-libs/nss_wrapper/nss_wrapper-1.1.10.ebuild b/sys-libs/nss_wrapper/nss_wrapper-1.1.10.ebuild
deleted file mode 100644
index f501d9ba9041..000000000000
--- a/sys-libs/nss_wrapper/nss_wrapper-1.1.10.ebuild
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-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 ~ia64 ppc ppc64 ~riscv sparc x86"
diff --git a/sys-libs/nss_wrapper/nss_wrapper-1.1.15.ebuild b/sys-libs/nss_wrapper/nss_wrapper-1.1.15.ebuild
new file mode 100644
index 000000000000..b99114af385b
--- /dev/null
+++ b/sys-libs/nss_wrapper/nss_wrapper-1.1.15.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2024 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 ~ia64 ~loong ~mips ppc ppc64 ~riscv 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}-cmocka-cmake.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DUNIT_TESTING=$(usex test)
+ )
+
+ cmake-multilib_src_configure
+}
diff --git a/sys-libs/nss_wrapper/nss_wrapper-1.1.6.ebuild b/sys-libs/nss_wrapper/nss_wrapper-1.1.6.ebuild
deleted file mode 100644
index 5c9ce92a6146..000000000000
--- a/sys-libs/nss_wrapper/nss_wrapper-1.1.6.ebuild
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-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 ~ia64 ppc ppc64 sparc x86"
diff --git a/sys-libs/obstack-standalone/Manifest b/sys-libs/obstack-standalone/Manifest
index 8834b86ea65e..d851231c5fa9 100644
--- a/sys-libs/obstack-standalone/Manifest
+++ b/sys-libs/obstack-standalone/Manifest
@@ -1 +1 @@
-DIST obstack-standalone-1.1.tar.gz 11561 BLAKE2B c6eba8ed7e235dcdefcfa7244d6318c6ac4d4b6d12a8f4778753bbc762ec98439724e1e8bbba4b1a04fbbafe56a1634bbb1c604c4d5f30574da39c82d52ca1c1 SHA512 e3a9956133d72a00663cf8d9720e62002142e113e7d67e2338a2bce1bdfac9eefd4290db8add15eabafdf01065f7fe9bb6754faa36b88df819c53d44fa140757
+DIST obstack-standalone-1.2.3.tar.gz 11483 BLAKE2B fa8322c680fed9f876c90e3182271ec0cf45319ae46c5139613ed1c2f1f268c3361654b55a7a28c2043a7365ea89cefcf3eab2190dadbc1f36c20c203fe97945 SHA512 b2bbed19c4ab2714ca794bdcb1a84fad1af964e884d4f3bbe91c9937ca089d92b8472cb05ebe998a9f5c85cb922b9b458db91eff29077bd099942e1ce18e16cc
diff --git a/sys-libs/obstack-standalone/obstack-standalone-1.1.ebuild b/sys-libs/obstack-standalone/obstack-standalone-1.1.ebuild
deleted file mode 100644
index ab63552c9de4..000000000000
--- a/sys-libs/obstack-standalone/obstack-standalone-1.1.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools
-
-DESCRIPTION="A standalone library to implement GNU libc's obstack"
-HOMEPAGE="https://github.com/pullmoll/musl-obstack"
-SRC_URI="https://github.com/pullmoll/musl-obstack/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
-IUSE="static-libs"
-
-DEPEND="
- !sys-libs/glibc"
-
-S="${WORKDIR}/musl-obstack-${PV}"
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable static-libs static)
-}
-
-src_install() {
- default
- find "${D}" -name '*.la' -delete || die
- mv "${ED%/}"/usr/$(get_libdir)/pkgconfig/{musl-obstack,obstack-standalone}.pc || die
-}
diff --git a/sys-libs/obstack-standalone/obstack-standalone-1.2.3.ebuild b/sys-libs/obstack-standalone/obstack-standalone-1.2.3.ebuild
new file mode 100644
index 000000000000..37b4aaf57c0a
--- /dev/null
+++ b/sys-libs/obstack-standalone/obstack-standalone-1.2.3.ebuild
@@ -0,0 +1,36 @@
+# 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
index 7c7f6311fa00..ae49ecaf283a 100644
--- a/sys-libs/openipmi/Manifest
+++ b/sys-libs/openipmi/Manifest
@@ -1,3 +1 @@
-DIST OpenIPMI-2.0.29.tar.gz 3119530 BLAKE2B 5c60b04e828699c396cb7ce29dca7665109d7b39c3d64535fafdca328c01eab0af9cc4d7fd1a30aa254836f6ce10a16e491fb7239777dc4d57edc65c20998504 SHA512 ff23aadfe4b9002574d1f06dda3d61f7a03ef1df2c61855516b7d67bd6d3272c53af74e3412e1045242dcb845f50b7c542083e918805c0efac424dd86e720a10
-DIST OpenIPMI-2.0.31.tar.gz 3129097 BLAKE2B 477d3c7abe0d04b3aa949b36c78ca149d92f4cea379e5be22a2718367f2fb3edac4d8487dd95bdf25b54b9c8c8d8d4ba1582b7bc65e416a8f1745b2790f405d7 SHA512 de1b364315e97daffb4c601bcf3bf33591795449d71690496ae368bd0730a117c1716508ecaddef5d55498f56e73481a32f509791185e80e2475667d7abd73e7
-DIST OpenIPMI-2.0.32.tar.gz 3140147 BLAKE2B 7f5d3f9e4a5a8388413d1cfb7d1b8bb1a46abce8404b408d4e505bb389e6f871b6f6d67560bcba9a5716dfcf95c5d3c27bbaf4a5fd7b924a629aa4546efde0c1 SHA512 e409f32e6bbf26756338ada386fa394d48d734b4d6ba4beca700ce60bc3af3d0f41e972a328c4e076ae014f4fbd8598d05d3f879f9c6d76198e6ae1a2ba03e95
+DIST OpenIPMI-2.0.33.tar.gz 3141439 BLAKE2B 02634ac8e17abf6a95f37e1b6825fe1f493e1990d7a5b0f6e87f7d9527f2a778f9faf0b12566529a3c87ecce893346e5125c51da988b95fbb56145282194ed16 SHA512 615fccd1ffd4af18584c1b0e54667ba2de60b6d42b44e7448f27808114180fa3b31b4834276bdf69c3df1e5210df871fd888deec8186377524838390fe41e641
diff --git a/sys-libs/openipmi/files/openipmi-2.0.33-c99.patch b/sys-libs/openipmi/files/openipmi-2.0.33-c99.patch
new file mode 100644
index 000000000000..b7786c3ceab1
--- /dev/null
+++ b/sys-libs/openipmi/files/openipmi-2.0.33-c99.patch
@@ -0,0 +1,56 @@
+https://sourceforge.net/p/openipmi/patches/38/
+
+C type errors in the SWIG-generated Perl bindings
+
+The first change fixes an error with newer compilers:
+
+OpenIPMI_wrap.c: In function ‘_wrap_strconstarray_val_set’:
+OpenIPMI_wrap.c:10491:27: error: assignment to ‘const char **’ from incompatible pointer type ‘char **’
+10491 | if (arg1) (arg1)->val = arg2;
+ | ^
+
+The second change is also about a compiler error:
+
+In file included from /usr/lib64/perl5/CORE/perl.h:4530,
+ from OpenIPMI_wrap.c:751:
+OpenIPMI_wrap.c: In function ‘_wrap_ipmi_sol_conn_t_write’:
+/usr/lib64/perl5/CORE/sv.h:1952:31: error: passing argument 3 of ‘Perl_SvPV_helper’ from incompatible pointer type
+ 1952 | Perl_SvPV_helper(aTHX_ sv, &len, flags, SvPVnormal_type_, \
+/usr/lib64/perl5/CORE/sv.h:1972:37: note: in expansion of macro ‘SvPV_flags’
+ 1972 | #define SvPV(sv, len) SvPV_flags(sv, len, SV_GMAGIC)
+ | ^~~~~~~~~~
+OpenIPMI_wrap.c:27664:24: note: in expansion of macro ‘SvPV’
+27664 | (&arg2)->val = SvPV(tempsv, (&arg2)->len);
+ | ^~~~
+In file included from /usr/lib64/perl5/CORE/perl.h:7812:
+/usr/lib64/perl5/CORE/sv_inline.h:908:33: note: expected ‘STRLEN * const’ {aka ‘long unsigned int * const’} but argument is of type ‘int *’
+ 908 | STRLEN * const lp,
+ | ~~~~~~~~~~~~~~~^~
+
+But the existing code looks broken on big-endian 64-bit architectures,
+too.
+
+--- a/swig/OpenIPMI.i
++++ b/swig/OpenIPMI.i
+@@ -359,7 +359,7 @@ typedef struct iargarray
+ %}
+ typedef struct strconstarray
+ {
+- char **val;
++ const char **val;
+ int len;
+ } strconstarray;
+ typedef struct argarray
+--- a/swig/perl/OpenIPMI_lang.i
++++ b/swig/perl/OpenIPMI_lang.i
+@@ -292,7 +292,9 @@
+ $1.val = NULL;
+ $1.len = 0;
+ } else {
+- $1.val = SvPV(tempsv, $1.len);
++ STRLEN len;
++ $1.val = SvPV(tempsv, len);
++ $1.len = len;
+ }
+ }
+
diff --git a/sys-libs/openipmi/openipmi-2.0.31.ebuild b/sys-libs/openipmi/openipmi-2.0.31.ebuild
deleted file mode 100644
index c8b61d3259f7..000000000000
--- a/sys-libs/openipmi/openipmi-2.0.31.ebuild
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-
-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="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="LGPL-2.1 GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
-IUSE="crypt snmp perl python static-libs tcl"
-RESTRICT="test"
-
-RDEPEND="
- dev-libs/glib:2
- sys-libs/gdbm:=
- sys-libs/ncurses:0=
- sys-libs/readline:0=
- crypt? ( dev-libs/openssl:0= )
- snmp? ( net-analyzer/net-snmp )
- perl? ( dev-lang/perl:= )
- python? ( ${PYTHON_DEPS} )
- tcl? ( dev-lang/tcl:0= )"
-DEPEND="${RDEPEND}
- >=dev-lang/swig-1.3.21"
-BDEPEND="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" #501510
-)
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # Bug #298250: parallel install fix.
- sed -r -i \
- -e '/^install-data-local:/s,$, install-exec-am,g' \
- cmdlang/Makefile.{am,in} || die
-
- # We touch the .in and .am above because if we use the below, the Perl stuff
- # is very fragile, and often fails to link.
- 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.29.ebuild b/sys-libs/openipmi/openipmi-2.0.33-r1.ebuild
index aa52f4eaaaa8..26db37796649 100644
--- a/sys-libs/openipmi/openipmi-2.0.29.ebuild
+++ b/sys-libs/openipmi/openipmi-2.0.33-r1.ebuild
@@ -1,46 +1,48 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
+EAPI=8
+PYTHON_COMPAT=( python3_{9..11} )
inherit autotools python-single-r1
-DESCRIPTION="Library interface to IPMI"
-HOMEPAGE="https://sourceforge.net/projects/openipmi/"
MY_PN="OpenIPMI"
MY_P="${MY_PN}-${PV/_/-}"
+DESCRIPTION="Library interface to IPMI"
+HOMEPAGE="https://sourceforge.net/projects/openipmi/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
LICENSE="LGPL-2.1 GPL-2"
SLOT="0"
-KEYWORDS="amd64 ~arm64 ~hppa ~ia64 ppc ppc64 x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~x86"
IUSE="crypt snmp perl python static-libs tcl"
-S="${WORKDIR}/${MY_P}"
-RESTRICT='test'
RDEPEND="
dev-libs/glib:2
+ dev-libs/popt
sys-libs/gdbm:=
- sys-libs/ncurses:0=
- sys-libs/readline:0=
- crypt? ( dev-libs/openssl:0= )
+ 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:0= )"
-DEPEND="${RDEPEND}
- >=dev-lang/swig-1.3.21"
-BDEPEND="virtual/pkgconfig"
+ 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" #501510
+ "${FILESDIR}/${PN}-2.0.26-tinfo.patch" # bug #501510
+ "${FILESDIR}/${PN}-2.0.33-c99.patch"
)
pkg_setup() {
@@ -50,19 +52,13 @@ pkg_setup() {
src_prepare() {
default
- # Bug #298250: parallel install fix.
- sed -r -i \
- -e '/^install-data-local:/s,$, install-exec-am,g' \
- cmdlang/Makefile.{am,in} || die
-
- # We touch the .in and .am above because if we use the below, the Perl stuff
- # is very fragile, and often fails to link.
+ # For tinfo patch
eautoreconf
}
src_configure() {
local myconf=(
- # these binaries are for root!
+ # These binaries are for root!
--bindir="${EPREFIX}"/usr/sbin
--with-glib
--with-glibver=2.0
@@ -95,6 +91,7 @@ src_install() {
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.32.ebuild b/sys-libs/openipmi/openipmi-2.0.33.ebuild
index c8b61d3259f7..7bd51efeb8d7 100644
--- a/sys-libs/openipmi/openipmi-2.0.32.ebuild
+++ b/sys-libs/openipmi/openipmi-2.0.33.ebuild
@@ -1,10 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
+EAPI=8
+PYTHON_COMPAT=( python3_{9..11} )
inherit autotools python-single-r1
MY_PN="OpenIPMI"
@@ -16,31 +15,33 @@ S="${WORKDIR}/${MY_P}"
LICENSE="LGPL-2.1 GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
+KEYWORDS="amd64 ~arm arm64 hppa ~ia64 ~loong ppc ppc64 ~riscv x86"
IUSE="crypt snmp perl python static-libs tcl"
-RESTRICT="test"
RDEPEND="
dev-libs/glib:2
+ dev-libs/popt
sys-libs/gdbm:=
- sys-libs/ncurses:0=
- sys-libs/readline:0=
- crypt? ( dev-libs/openssl:0= )
+ 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:0= )"
-DEPEND="${RDEPEND}
- >=dev-lang/swig-1.3.21"
-BDEPEND="virtual/pkgconfig"
+ 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" #501510
+ "${FILESDIR}/${PN}-2.0.26-tinfo.patch" # bug #501510
)
pkg_setup() {
@@ -50,19 +51,13 @@ pkg_setup() {
src_prepare() {
default
- # Bug #298250: parallel install fix.
- sed -r -i \
- -e '/^install-data-local:/s,$, install-exec-am,g' \
- cmdlang/Makefile.{am,in} || die
-
- # We touch the .in and .am above because if we use the below, the Perl stuff
- # is very fragile, and often fails to link.
+ # For tinfo patch
eautoreconf
}
src_configure() {
local myconf=(
- # these binaries are for root!
+ # These binaries are for root!
--bindir="${EPREFIX}"/usr/sbin
--with-glib
--with-glibver=2.0
@@ -95,6 +90,7 @@ src_install() {
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
index f96fe0d87fd3..8ff63cd068f0 100644
--- a/sys-libs/pam/Manifest
+++ b/sys-libs/pam/Manifest
@@ -1,4 +1,2 @@
-DIST Linux-PAM-1.5.2-docs.tar.xz 443276 BLAKE2B eb0376022bd17d472cfbb7d757acd9a7743d68929ac604bc7fbc27e87b35f0424e9459afff8110ee094c6914cef6e6f483e6eeb2fc2ec24909477ec53f600fa2 SHA512 69bbb52b3855a1ff3066ffe3ae1890440516311260ddfb20a7a7ea7beeb42484ea085080e3206f23933edf4a695a13f2317e33dffcab2b29f6e9e210d493e1f0
-DIST Linux-PAM-1.5.2.tar.xz 988784 BLAKE2B a835034cd239bc9377419c13dda45276e8e64a33fcf714a1957ff41112fbb6dce0be8e9773afc82458a04d54bf146a0c26117d7170521fecdc0c98184cef5f4f SHA512 fa16350c132d3e5fb82b60d991768fb596582639841b8ece645c684705467305ccf1302a0147ec222ab78c01b2c9114c5496dc1ca565d2b56bf315f29a815144
-DIST pam-1.5.1_p20210622.tar.gz 783068 BLAKE2B c8f13c2ccef73ad367d4fac9a7d1d0d3f3d0e4f1c8eea877d2ab467411cf17cc32c6c9c89e98d94090481d7d7746723175031ba8713a8fb0c3e1976e2854e58b SHA512 5b7a84b9de2d0b0c39cb33e9b8d24aeedca670b998536d74dc497eb7af31cb1f3157f196a01712c4ae273634b51ddad2062f207534b35b1d1a1e790816c8dc1b
-DIST pam-doc-1.5.1_p20210610.tar.xz 62308 BLAKE2B b3311e704ddc840b7fd28ea7764e8a0d3fdf508e2e37405acbfa26462a188c480859b3b21bd4a4b4acea70928e68650c216e8fb2d2b6f11ba33f54c6692cf3a2 SHA512 89b88f8ebf0c46f6b25dc0c5f39383ecbef0b12d6ffab388d92026066ee986f9068819cdbf38baaa1e341cd6cc84b1e8d3ad02db121aaf0ddad27e4e6efe26e7
+DIST Linux-PAM-1.5.3-docs.tar.xz 466340 BLAKE2B 6bade3c63ebe6b6ca7a86d7385850bb87bf1d6526add3ac5aad140533516c1d27b594a17d09c4127ff985c42e6c571618785d6b2a2913e6575678c4dcf947dc0 SHA512 a9082823da88e0054d74e13aef872519ced5fbef25c8cc1a7e3a99160f835aa09c9ef701b6ec507acd3b540da0019288424bb4c8ebd828181ea90450db1494a9
+DIST Linux-PAM-1.5.3.tar.xz 1020076 BLAKE2B 362c939f3afc343e6f4e78e7f6ba6f7a9c6ee0a9948bb5a4fc34cecfd29e9fa974082534d4ceedd04d8d3e34c7b3ef43d2a07ba5f41d26da04ec8330fc3790fb SHA512 af88e8c1b6a9b737ffaffff7dd9ed8eec996d1fbb5804fb76f590bed66d8a1c2c6024a534d7a7b6d18496b300f3d6571a08874cf406cd2e8cea1d5eff49c136a
diff --git a/sys-libs/pam/files/pam-1.5.3-termios.patch b/sys-libs/pam/files/pam-1.5.3-termios.patch
new file mode 100644
index 000000000000..8f7baf76fee4
--- /dev/null
+++ b/sys-libs/pam/files/pam-1.5.3-termios.patch
@@ -0,0 +1,34 @@
+Replace System V termio.h with POSIX termios.h for musl
+Upstream: https://github.com/linux-pam/linux-pam/pull/576
+Bug: https://bugs.gentoo.org/906137
+
+From 5658105b04ad4df212baf302898ee2cca99516a6 Mon Sep 17 00:00:00 2001
+From: Violet Purcell <vimproved@inventati.org>
+Date: Thu, 11 May 2023 10:27:53 -0400
+Subject: [PATCH] fix build on musl
+
+--- a/examples/tty_conv.c
++++ b/examples/tty_conv.c
+@@ -6,8 +6,9 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <unistd.h>
+-#include <termio.h>
++#include <termios.h>
+ #include <security/pam_appl.h>
++#include <sys/ioctl.h>
+
+ /***************************************
+ * @brief echo off/on
+@@ -16,7 +17,7 @@
+ ***************************************/
+ static void echoOff(int fd, int off)
+ {
+- struct termio tty;
++ struct termios tty;
+ if (ioctl(fd, TCGETA, &tty) < 0)
+ {
+ fprintf(stderr, "TCGETA failed: %s\n", strerror(errno));
+--
+2.40.1
+
diff --git a/sys-libs/pam/metadata.xml b/sys-libs/pam/metadata.xml
index 3b9be27ff8f6..1abda7583cda 100644
--- a/sys-libs/pam/metadata.xml
+++ b/sys-libs/pam/metadata.xml
@@ -1,21 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="person">
- <email>zlogene@gentoo.org</email>
- <name>Mikle Kolyada</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>
+ <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>
+ <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.5.2-r1.ebuild b/sys-libs/pam/pam-1.5.3-r1.ebuild
index 77719a8fded9..5e9602e23a38 100644
--- a/sys-libs/pam/pam-1.5.2-r1.ebuild
+++ b/sys-libs/pam/pam-1.5.3-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
MY_P="Linux-${PN^^}-${PV}"
@@ -9,59 +9,75 @@ MY_P="Linux-${PN^^}-${PV}"
# Can reconsider w/ EAPI 8 and IDEPEND, bug #810979
TMPFILES_OPTIONAL=1
-inherit autotools db-use fcaps toolchain-funcs multilib-minimal
+inherit db-use fcaps flag-o-matic toolchain-funcs multilib-minimal
DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
HOMEPAGE="https://github.com/linux-pam/linux-pam"
-
-SRC_URI="https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}.tar.xz
- https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}-docs.tar.xz"
+SRC_URI="
+ https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}.tar.xz
+ https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}-docs.tar.xz
+"
+S="${WORKDIR}/${MY_P}"
LICENSE="|| ( BSD GPL-2 )"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="audit berkdb debug nis selinux"
BDEPEND="
+ app-alternatives/yacc
dev-libs/libxslt
- sys-devel/flex
+ app-alternatives/lex
sys-devel/gettext
virtual/pkgconfig
- virtual/yacc
"
-
DEPEND="
virtual/libcrypt:=[${MULTILIB_USEDEP}]
>=virtual/libintl-0-r1[${MULTILIB_USEDEP}]
audit? ( >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}] )
berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] )
selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- nis? ( net-libs/libnsl:=[${MULTILIB_USEDEP}]
- >=net-libs/libtirpc-0.2.4-r2:=[${MULTILIB_USEDEP}] )"
-
+ nis? (
+ net-libs/libnsl:=[${MULTILIB_USEDEP}]
+ >=net-libs/libtirpc-0.2.4-r2:=[${MULTILIB_USEDEP}]
+ )
+"
RDEPEND="${DEPEND}"
-
PDEPEND=">=sys-auth/pambase-20200616"
-S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/${P}-termios.patch"
+)
src_prepare() {
default
touch ChangeLog || die
- eautoreconf
}
multilib_src_configure() {
- # Do not let user's BROWSER setting mess us up. #549684
+ # Do not let user's BROWSER setting mess us up, bug #549684
unset BROWSER
+ # This whole weird has_version libxcrypt block can go once
+ # musl systems have libxcrypt[system] if we ever make
+ # that mandatory. See bug #867991.
+ if use elibc_musl && ! has_version sys-libs/libxcrypt[system] ; then
+ # Avoid picking up symbol-versioned compat symbol on musl systems
+ export ac_cv_search_crypt_gensalt_rn=no
+
+ # Need to avoid picking up the libxcrypt headers which define
+ # CRYPT_GENSALT_IMPLEMENTS_AUTO_ENTROPY.
+ cp "${ESYSROOT}"/usr/include/crypt.h "${T}"/crypt.h || die
+ append-cppflags -I"${T}"
+ fi
+
local myconf=(
CC_FOR_BUILD="$(tc-getBUILD_CC)"
--with-db-uniquename=-$(db_findver sys-libs/db)
- --with-xml-catalog=/etc/xml/catalog
- --enable-securedir=/$(get_libdir)/security
- --includedir=/usr/include/security
- --libdir=/usr/$(get_libdir)
+ --with-xml-catalog="${EPREFIX}"/etc/xml/catalog
+ --enable-securedir="${EPREFIX}"/$(get_libdir)/security
+ --includedir="${EPREFIX}"/usr/include/security
+ --libdir="${EPREFIX}"/usr/$(get_libdir)
--enable-pie
--enable-unix
--disable-prelude
@@ -69,13 +85,23 @@ multilib_src_configure() {
--disable-regenerate-docu
--disable-static
--disable-Werror
+ # TODO: wire this up now it's more useful as of 1.5.3
+ --disable-econf
+
+ # TODO: add elogind support
+ # lastlog is enabled again for now by us until logind support
+ # is handled. Even then, disabling lastlog will probably need
+ # a news item.
+ --disable-logind
+ --enable-lastlog
+
$(use_enable audit)
$(use_enable berkdb db)
$(use_enable debug)
$(use_enable nis)
$(use_enable selinux)
- --enable-isadir='.' #464016
- )
+ --enable-isadir='.' # bug #464016
+ )
ECONF_SOURCE="${S}" econf "${myconf[@]}"
}
@@ -93,7 +119,6 @@ multilib_src_install_all() {
# tmpfiles.eclass is impossible to use because
# there is the pam -> tmpfiles -> systemd -> pam dependency loop
-
dodir /usr/lib/tmpfiles.d
cat ->> "${D}"/usr/lib/tmpfiles.d/${CATEGORY}-${PN}.conf <<-_EOF_
@@ -118,7 +143,7 @@ pkg_postinst() {
ewarn "restart the software manually after the update."
ewarn ""
ewarn "You can get a list of such software running a command like"
- ewarn " lsof / | egrep -i 'del.*libpam\\.so'"
+ ewarn " lsof / | grep -E -i 'del.*libpam\\.so'"
ewarn ""
ewarn "Alternatively, simply reboot your system."
diff --git a/sys-libs/pam/pam-1.5.1_p20210622-r1.ebuild b/sys-libs/pam/pam-1.5.3.ebuild
index bbc95832d99a..2ddcf24b4f38 100644
--- a/sys-libs/pam/pam-1.5.1_p20210622-r1.ebuild
+++ b/sys-libs/pam/pam-1.5.3.ebuild
@@ -1,68 +1,83 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
+
+MY_P="Linux-${PN^^}-${PV}"
# Avoid QA warnings
# Can reconsider w/ EAPI 8 and IDEPEND, bug #810979
TMPFILES_OPTIONAL=1
-inherit autotools db-use fcaps toolchain-funcs usr-ldscript multilib-minimal
-
-GIT_COMMIT="fe1307512fb8892b5ceb3d884c793af8dbd4c16a"
-DOC_SNAPSHOT="20210610"
+inherit db-use fcaps flag-o-matic toolchain-funcs usr-ldscript multilib-minimal
DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
HOMEPAGE="https://github.com/linux-pam/linux-pam"
-
-SRC_URI="https://github.com/linux-pam/linux-pam/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz
- https://dev.gentoo.org/~zlogene/distfiles/${CATEGORY}/${PN}/${PN}-doc-${PV%_p*}_p${DOC_SNAPSHOT}.tar.xz"
+SRC_URI="
+ https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}.tar.xz
+ https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}-docs.tar.xz
+"
+S="${WORKDIR}/${MY_P}"
LICENSE="|| ( BSD GPL-2 )"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="audit berkdb debug nis selinux"
BDEPEND="
+ app-alternatives/yacc
dev-libs/libxslt
- sys-devel/flex
+ app-alternatives/lex
sys-devel/gettext
virtual/pkgconfig
- virtual/yacc
"
-
DEPEND="
virtual/libcrypt:=[${MULTILIB_USEDEP}]
>=virtual/libintl-0-r1[${MULTILIB_USEDEP}]
audit? ( >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}] )
berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] )
selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- nis? ( net-libs/libnsl:=[${MULTILIB_USEDEP}]
- >=net-libs/libtirpc-0.2.4-r2:=[${MULTILIB_USEDEP}] )"
-
+ nis? (
+ net-libs/libnsl:=[${MULTILIB_USEDEP}]
+ >=net-libs/libtirpc-0.2.4-r2:=[${MULTILIB_USEDEP}]
+ )
+"
RDEPEND="${DEPEND}"
-
PDEPEND=">=sys-auth/pambase-20200616"
-S="${WORKDIR}/linux-${PN}-${GIT_COMMIT}"
+PATCHES=(
+ "${FILESDIR}/${P}-termios.patch"
+)
src_prepare() {
default
touch ChangeLog || die
- eautoreconf
}
multilib_src_configure() {
- # Do not let user's BROWSER setting mess us up. #549684
+ # Do not let user's BROWSER setting mess us up, bug #549684
unset BROWSER
+ # This whole weird has_version libxcrypt block can go once
+ # musl systems have libxcrypt[system] if we ever make
+ # that mandatory. See bug #867991.
+ if use elibc_musl && ! has_version sys-libs/libxcrypt[system] ; then
+ # Avoid picking up symbol-versioned compat symbol on musl systems
+ export ac_cv_search_crypt_gensalt_rn=no
+
+ # Need to avoid picking up the libxcrypt headers which define
+ # CRYPT_GENSALT_IMPLEMENTS_AUTO_ENTROPY.
+ cp "${ESYSROOT}"/usr/include/crypt.h "${T}"/crypt.h || die
+ append-cppflags -I"${T}"
+ fi
+
local myconf=(
CC_FOR_BUILD="$(tc-getBUILD_CC)"
--with-db-uniquename=-$(db_findver sys-libs/db)
- --with-xml-catalog=/etc/xml/catalog
- --enable-securedir=/$(get_libdir)/security
- --includedir=/usr/include/security
- --libdir=/usr/$(get_libdir)
+ --with-xml-catalog="${EPREFIX}"/etc/xml/catalog
+ --enable-securedir="${EPREFIX}"/$(get_libdir)/security
+ --includedir="${EPREFIX}"/usr/include/security
+ --libdir="${EPREFIX}"/usr/$(get_libdir)
--enable-pie
--enable-unix
--disable-prelude
@@ -70,13 +85,23 @@ multilib_src_configure() {
--disable-regenerate-docu
--disable-static
--disable-Werror
+ # TODO: wire this up now it's more useful as of 1.5.3
+ --disable-econf
+
+ # TODO: add elogind support
+ # lastlog is enabled again for now by us until logind support
+ # is handled. Even then, disabling lastlog will probably need
+ # a news item.
+ --disable-logind
+ --enable-lastlog
+
$(use_enable audit)
$(use_enable berkdb db)
$(use_enable debug)
$(use_enable nis)
$(use_enable selinux)
- --enable-isadir='.' #464016
- )
+ --enable-isadir='.' # bug #464016
+ )
ECONF_SOURCE="${S}" econf "${myconf[@]}"
}
@@ -96,7 +121,6 @@ multilib_src_install_all() {
# tmpfiles.eclass is impossible to use because
# there is the pam -> tmpfiles -> systemd -> pam dependency loop
-
dodir /usr/lib/tmpfiles.d
cat ->> "${D}"/usr/lib/tmpfiles.d/${CATEGORY}-${PN}.conf <<-_EOF_
@@ -108,7 +132,7 @@ multilib_src_install_all() {
local page
- for page in "${WORKDIR}"/man/*.{3,5,8} ; do
+ for page in doc/man/*.{3,5,8} modules/*/*.{5,8} ; do
doman ${page}
done
}
@@ -121,7 +145,7 @@ pkg_postinst() {
ewarn "restart the software manually after the update."
ewarn ""
ewarn "You can get a list of such software running a command like"
- ewarn " lsof / | egrep -i 'del.*libpam\\.so'"
+ 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
index d839c44aeea9..8cb28f18f031 100644
--- a/sys-libs/pam_wrapper/Manifest
+++ b/sys-libs/pam_wrapper/Manifest
@@ -1,2 +1,2 @@
-DIST pam_wrapper-1.1.3.tar.gz 118034 BLAKE2B 3c05e74959f3c6dfd35575cc5f9187f4a328bfd7ce002e327fc135c82a4ff1513add87678360992d2010c124f7fd95e4bdb3c0a4d63418d9711069cbc200e417 SHA512 3b7cbd25ae7dd73f4a0c64a7762cdeb38cc7ba6e8b4e18e79aceffea09241d520aa884de88e4105b5957b2b18ec682be6568a6bfccf82b9354a3510cd2cd98eb
DIST pam_wrapper-1.1.4.tar.gz 170882 BLAKE2B fa0a789f6fd6f809c7ef80e354e886b5f1f0b4212060dc0e388a44701e4a1f49635b8f47344156ad65cd273660e3b0a806480c37875a830e2f5d8e56c4ec0818 SHA512 3b68dc6d7815707d74d1340facd9c2de4dff3934402ac2c2632371b39c41a75744434744ed7308e157be03a03a941405638cadb6f34995de56fb1f5f45d37de2
+DIST pam_wrapper-1.1.5.tar.gz 95037 BLAKE2B 78adeaac3994349460c2c9966e1145c3c6b78189cf1e6092cf0272bc82498c2182b114d718ce47b3403e32255d8ae5e65dee22e7bc261442323a661a4dbd1b38 SHA512 eee2c0683bd87c5416b52115105a9a2397cbec261e358ff20d9b272509f64ee5ea50a4adcb04f7791d451ca904ffd31c3bc07dc53555c3808f50f71634ab6323
diff --git a/sys-libs/pam_wrapper/files/pam_wrapper-1.1.4-tests-import.patch b/sys-libs/pam_wrapper/files/pam_wrapper-1.1.4-tests-import.patch
new file mode 100644
index 000000000000..aba9c370a22c
--- /dev/null
+++ b/sys-libs/pam_wrapper/files/pam_wrapper-1.1.4-tests-import.patch
@@ -0,0 +1,22 @@
+--- 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.modpath = os.path.join(os.getcwd(), "../src/python/python2")
+- 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/files/pam_wrapper-1.1.5-env-var-typo.patch b/sys-libs/pam_wrapper/files/pam_wrapper-1.1.5-env-var-typo.patch
new file mode 100644
index 000000000000..0874e5daaf24
--- /dev/null
+++ b/sys-libs/pam_wrapper/files/pam_wrapper-1.1.5-env-var-typo.patch
@@ -0,0 +1,25 @@
+https://git.samba.org/?p=pam_wrapper.git;a=commit;h=9f0cccf7432dd9be1de953f9b13a7f9b06c40442
+
+From 9f0cccf7432dd9be1de953f9b13a7f9b06c40442 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Fri, 10 Nov 2023 15:38:37 +0100
+Subject: [PATCH] pwrap: Fix PAM_WRAPPER_DISABLE_DEEPBIND environment variable
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
+--- a/src/pam_wrapper.c
++++ b/src/pam_wrapper.c
+@@ -336,7 +336,7 @@ static void *pwrap_load_lib_handle(enum pwrap_lib lib)
+
+ #ifdef RTLD_DEEPBIND
+ const char *env_preload = getenv("LD_PRELOAD");
+- const char *env_deepbind = getenv("UID_WRAPPER_DISABLE_DEEPBIND");
++ const char *env_deepbind = getenv("PAM_WRAPPER_DISABLE_DEEPBIND");
+ bool enable_deepbind = true;
+
+ /* Don't do a deepbind if we run with libasan */
+--
+2.34.1
diff --git a/sys-libs/pam_wrapper/files/pam_wrapper-1.1.5-mkdir-race.patch b/sys-libs/pam_wrapper/files/pam_wrapper-1.1.5-mkdir-race.patch
new file mode 100644
index 000000000000..f3c1458d6dce
--- /dev/null
+++ b/sys-libs/pam_wrapper/files/pam_wrapper-1.1.5-mkdir-race.patch
@@ -0,0 +1,40 @@
+https://git.samba.org/?p=pam_wrapper.git;a=commitdiff;h=7bd24b0e54995da5f333575f97c9f1fa796fe0f1
+
+From 7bd24b0e54995da5f333575f97c9f1fa796fe0f1 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Jan=20Kundr=C3=A1t?= <jan.kundrat@cesnet.cz>
+Date: Mon, 6 Nov 2023 18:34:58 +0100
+Subject: [PATCH] die quickly upon mkdir failure
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+We just had this failure in our CI system that's currently running just
+three PAM-wrapped tests in parallel. Since this is a classic TOCTOU race
+(albeit in a test code, and therefore with little to no security
+implications), the `mkdir` can fail, and when that happens it's much
+better to just die quickly rather than continuing as if nothing
+happened.
+
+Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
+Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
+Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
+--- a/src/pam_wrapper.c
++++ b/src/pam_wrapper.c
+@@ -893,6 +893,7 @@ static void pwrap_init(void)
+ PWRAP_LOG(PWRAP_LOG_ERROR,
+ "Failed to create pam_wrapper config dir: %s - %s",
+ tmp_config_dir, strerror(errno));
++ exit(1);
+ }
+
+ /* Create file with the PID of the the process */
+@@ -1121,6 +1122,7 @@ static void pwrap_init(void)
+ PWRAP_LOG(PWRAP_LOG_ERROR,
+ "Failed to create pam_wrapper config dir: %s - %s",
+ tmp_config_dir, strerror(errno));
++ exit(1);
+ }
+
+ /* Create file with the PID of the the process */
+--
+2.34.1
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
new file mode 100644
index 000000000000..884583c098b4
--- /dev/null
+++ b/sys-libs/pam_wrapper/files/pam_wrapper-1.1.5-tests-import.patch
@@ -0,0 +1,22 @@
+--- 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/pam_wrapper-1.1.3.ebuild b/sys-libs/pam_wrapper/pam_wrapper-1.1.3.ebuild
deleted file mode 100644
index 2643b37d037f..000000000000
--- a/sys-libs/pam_wrapper/pam_wrapper-1.1.3.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-CMAKE_ECLASS=cmake
-inherit cmake-multilib python-single-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 ~ia64 ~ppc ~ppc64 ~riscv ~sparc x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="${PYTHON_DEPS}
- sys-libs/pam:0=[${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}
- test? ( dev-util/cmocka[${MULTILIB_USEDEP}] )"
-
-multilib_src_configure() {
- local libpam="${EPREFIX}"
- multilib_is_native_abi || libpam+="/usr"
- libpam+="/$(get_libdir)/libpam.so.0"
-
- local mycmakeargs=(
- -DPAM_LIBRARY="${libpam}"
- -DUNIT_TESTING=$(usex test)
- -DPYTHON2_LIBRARY="/dev/null" # Disabled
- -DPYTHON3_INCLUDE_DIR="$(python_get_includedir)"
- -DPYTHON3_SITELIB="$(python_get_sitedir)"
- )
- cmake_src_configure
-}
diff --git a/sys-libs/pam_wrapper/pam_wrapper-1.1.3-r3.ebuild b/sys-libs/pam_wrapper/pam_wrapper-1.1.4-r2.ebuild
index fe217064fb7f..5ddcce1a4b03 100644
--- a/sys-libs/pam_wrapper/pam_wrapper-1.1.3-r3.ebuild
+++ b/sys-libs/pam_wrapper/pam_wrapper-1.1.4-r2.ebuild
@@ -1,11 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-CMAKE_ECLASS=cmake
+EAPI=8
+PYTHON_COMPAT=( python3_{10..11} )
inherit cmake-multilib python-r1
DESCRIPTION="A tool to test PAM applications and PAM modules"
@@ -17,26 +15,28 @@ SRC_URI="
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~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:0=[${MULTILIB_USEDEP}]
+ >=sys-libs/pam-1.5.2-r1:0=[${MULTILIB_USEDEP}]
"
DEPEND="
${RDEPEND}
test? ( dev-util/cmocka[${MULTILIB_USEDEP}] )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.4-tests-import.patch
+)
+
multilib_src_configure() {
configure_for_python() {
- local mycmakeargs=(
- -DUNIT_TESTING=OFF
- )
-
+ local mycmakeargs=( -DUNIT_TESTING=OFF )
cmake_src_configure
}
@@ -51,7 +51,6 @@ multilib_src_configure() {
-DUNIT_TESTING=$(usex test)
-DCMAKE_DISABLE_FIND_PACKAGE_Python{Libs,Interp,SiteLibs}=ON
)
-
cmake_src_configure
}
@@ -64,6 +63,21 @@ multilib_src_compile() {
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
diff --git a/sys-libs/pam_wrapper/pam_wrapper-1.1.4.ebuild b/sys-libs/pam_wrapper/pam_wrapper-1.1.4-r3.ebuild
index 96a3d1fd2aa8..96d2c6f81f35 100644
--- a/sys-libs/pam_wrapper/pam_wrapper-1.1.4.ebuild
+++ b/sys-libs/pam_wrapper/pam_wrapper-1.1.4-r3.ebuild
@@ -1,11 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-CMAKE_ECLASS=cmake
+EAPI=8
+PYTHON_COMPAT=( python3_{10..11} )
inherit cmake-multilib python-r1
DESCRIPTION="A tool to test PAM applications and PAM modules"
@@ -17,20 +15,25 @@ SRC_URI="
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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:0=[${MULTILIB_USEDEP}]
+ >=sys-libs/pam-1.5.3-r1:0=[${MULTILIB_USEDEP}]
"
DEPEND="
${RDEPEND}
test? ( dev-util/cmocka[${MULTILIB_USEDEP}] )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.4-tests-import.patch
+)
+
multilib_src_configure() {
configure_for_python() {
local mycmakeargs=( -DUNIT_TESTING=OFF )
@@ -60,6 +63,21 @@ multilib_src_compile() {
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
diff --git a/sys-libs/pam_wrapper/pam_wrapper-1.1.5.ebuild b/sys-libs/pam_wrapper/pam_wrapper-1.1.5.ebuild
new file mode 100644
index 000000000000..8ce00c0e4a60
--- /dev/null
+++ b/sys-libs/pam_wrapper/pam_wrapper-1.1.5.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+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 ~ia64 ~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:0=[${MULTILIB_USEDEP}]
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-util/cmocka[${MULTILIB_USEDEP}] )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.5-tests-import.patch
+ "${FILESDIR}"/${P}-mkdir-race.patch
+ "${FILESDIR}"/${P}-env-var-typo.patch
+)
+
+multilib_src_configure() {
+ configure_for_python() {
+ 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{Libs,Interp,SiteLibs}=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
new file mode 100644
index 000000000000..9de5d157e4d7
--- /dev/null
+++ b/sys-libs/pkgcraft/Manifest
@@ -0,0 +1 @@
+DIST pkgcraft-c-0.0.14.tar.xz 29920400 BLAKE2B dc163e0fb9bcdfb283346cc2bc2dfec9111d4d70c0bbd7b37b9306cd1bcf1d262e99b8126db71608f16807224ca6a357a7449d7076ab57b225745c7bb69c6080 SHA512 9d47788b60a00f5d006787fa38606f12a738a86e587cff0df5671a959d1e970860f31546117f44187f17c0fa8b52e6ac8ad6ec2a767abcc985e470d5a5f9f4a5
diff --git a/sys-libs/pkgcraft/metadata.xml b/sys-libs/pkgcraft/metadata.xml
new file mode 100644
index 000000000000..33c1ad3bdca7
--- /dev/null
+++ b/sys-libs/pkgcraft/metadata.xml
@@ -0,0 +1,11 @@
+<?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.14.ebuild b/sys-libs/pkgcraft/pkgcraft-0.0.14.ebuild
new file mode 100644
index 000000000000..5745de4a1c9f
--- /dev/null
+++ b/sys-libs/pkgcraft/pkgcraft-0.0.14.ebuild
@@ -0,0 +1,92 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES=" "
+inherit edo cargo 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
+ sys-devel/clang
+ >=virtual/rust-1.71
+"
+
+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
+
+ # 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
+
+ # 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
new file mode 100644
index 000000000000..575e7c74f56c
--- /dev/null
+++ b/sys-libs/pkgcraft/pkgcraft-9999.ebuild
@@ -0,0 +1,92 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES=" "
+inherit edo cargo 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
+ sys-devel/clang
+ >=virtual/rust-1.74
+"
+
+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
+
+ # 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
+
+ # 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/pwdb/pwdb-0.62-r2.ebuild b/sys-libs/pwdb/pwdb-0.62-r2.ebuild
index d44cdd852dd0..935c713d0a0a 100644
--- a/sys-libs/pwdb/pwdb-0.62-r2.ebuild
+++ b/sys-libs/pwdb/pwdb-0.62-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,7 +6,7 @@ EAPI=7
inherit toolchain-funcs flag-o-matic usr-ldscript
DESCRIPTION="Password database"
-HOMEPAGE="https://packages.gentoo.org/package/sys-libs/pwdb"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI="mirror://gentoo/${P}.tar.gz"
LICENSE="|| ( BSD GPL-2 )"
diff --git a/sys-libs/queue-standalone/queue-standalone-0.1-r1.ebuild b/sys-libs/queue-standalone/queue-standalone-0.1-r1.ebuild
index cbdaa9876e04..709080527b31 100644
--- a/sys-libs/queue-standalone/queue-standalone-0.1-r1.ebuild
+++ b/sys-libs/queue-standalone/queue-standalone-0.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -8,7 +8,7 @@ HOMEPAGE="https://www.gnu.org/software/libc/libc.html"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="amd64 arm arm64 ~hppa ~mips ppc ppc64 x86"
+KEYWORDS="amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv x86"
DEPEND="
!sys-libs/glibc"
diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest
index fec78a126892..0d184ee7215e 100644
--- a/sys-libs/readline/Manifest
+++ b/sys-libs/readline/Manifest
@@ -1,4 +1,30 @@
DIST readline-8.1.tar.gz 2993288 BLAKE2B f0feca1ea3517b2b613adacac8c997cce0e86aa2f410c82a40ce1a2e128067112b4c68dbf25b808291c28c47583345abac994ce10b8d117958afcb96ee5e7c69 SHA512 27790d0461da3093a7fee6e89a51dcab5dc61928ec42e9228ab36493b17220641d5e481ea3d8fee5ee0044c70bf960f55c7d3f1a704cf6b9c42e5c269b797e00
-DIST readline-8.2-alpha.tar.gz 3004737 BLAKE2B 05af0ed2bb096d579f5c25879d8917af71f73a0d3db2e5c1c06078bad3617923c88cd3741a8d3cb762177ba9bf4eac88012d9ebf4be2d0a1dfc6f0764a9a4ba0 SHA512 3f7523db5a11eebb4a1d0162cc54260b2155f32717740d0aea0bb192b17129f686400414bef4470a771d3988ad4c24fd9bf0ed9d9cf1256c142089e33c7abd31
+DIST readline-8.1.tar.gz.sig 95 BLAKE2B 8a297ef2ebf815ac53f02d6395aa2ff9f24234aef6b9793bfcd5a610cd3a5024182ad8ec8beb75eadd5cf876c57cd56d4226075578a86e0e2421d2e9b1677aa5 SHA512 42a6052d5882f16e5b6f8cd16433d793a9cbb43cf1886b2d858dc65ce067a4c39c8dda7331e52f76426c43de02c358f9ffdaf5c8fd7b089479008c1e5aa19112
+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-alpha.tar.gz 3091427 BLAKE2B f40e1db1ea39bbf4183901688733df0c67666eb58a33333f9b57ea7ba5399956f5523748ecce9bc5b6dc1954647c0bceb6ebbb4fe93b0085a595047650ad7c7e SHA512 d3aacd82826f1d1adc7ea846d8b8e70726da925e74a8bb1d141a9093e0d5e375236d1c745f0609f8ba3aff9f5266b1cf3da31d76e414a284b6ed798d92a1a1f6
+DIST readline-8.3-alpha.tar.gz.sig 95 BLAKE2B c11d1b4dd8f453bc5f7d19dd25901bfa4796825efa4f07f2043aa94d556a39bc1c928aed7fdc09ed6325c6ef017f72df18bbdd461a52a7122ccdf9b58a345c17 SHA512 fb070ae3dbafa042f591d8a5c24f48b40a672843e41e78f5d6a5ded5228046fe75893be6b10a9634d8852617bfa8b675e68a4c808f06ee95f07a40536fc63769
DIST readline81-001 2454 BLAKE2B 7ec4e5c39a224a70643b44b88bcfef5198e199c76f2a34f0b0ce24f1747dd46be49ddf93871c474cda64322b4358127fec4c2401d19422f84934546bbe1f3bf2 SHA512 cfbef10bdeb562a302ccf214878d02ebadf799343b3d2d7996a282f81bcfde83997ba6dcc9a8477af4dd7c73bca74105ca00a81e42ed13321672bd2930550e54
+DIST readline81-001.sig 95 BLAKE2B 7d523d0fc21772cb03aa4b5d66ea58c1a99a6c0e4a8625e89cad015cbff63cd68e08207ca5150819225300ac864806032888104bbbea64ca38ebf89e28c24b7e SHA512 7fa3747e388aecb26f2d4f8346b89b367710ea99a14618c625066b820901dc467bd156ec37340fde1f86f0fe0d6b33044c1ed5768cf8ed1a25386d32dc6419a6
DIST readline81-002 1242 BLAKE2B 4ef0404561bd8fc5559e8e5f675ae3f12c467178a8954f54f3204c2d09b88ccec960e807c7af0ec3514b489b676e3be51f98351e377fb18e3d7a14d33d4da69d SHA512 e47c029b82cf3a4d44e85c4348f7e059c56726694c190d84186822e1c893e1c006e7ec75f33c36791112f81abd792a2e2fdae9a65cd128f3c89ff4ffd9a9a1ff
+DIST readline81-002.sig 95 BLAKE2B f85d8a65a7326d6e18b32a603c8082952e4b81c53b6a1bd1668c7b0064ecce6ef04a41e2a042f100424dbf152e4db32c0e07ff166d528aa4ac4a9bd7daf4c7a9 SHA512 9ffb6cc697499f57df133f5ebaa5e43e24d33df5eb450d94a02144e94c833424218594c366f21101bc63331c1d532299c9327bd447d0a9849b0bbedce206a5b7
+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
diff --git a/sys-libs/readline/metadata.xml b/sys-libs/readline/metadata.xml
index c54508aa76cf..d1f832b0672f 100644
--- a/sys-libs/readline/metadata.xml
+++ b/sys-libs/readline/metadata.xml
@@ -1,14 +1,15 @@
<?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>
-</upstream>
+ <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.1_p2.ebuild b/sys-libs/readline/readline-8.1_p2-r1.ebuild
index f27175df6017..8c2239444310 100644
--- a/sys-libs/readline/readline-8.1_p2.ebuild
+++ b/sys-libs/readline/readline-8.1_p2-r1.ebuild
@@ -1,9 +1,10 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs usr-ldscript
+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/
@@ -11,21 +12,9 @@ PLEVEL="${PV##*_p}"
MY_PV="${PV/_p*}"
MY_PV="${MY_PV/_/-}"
MY_P="${PN}-${MY_PV}"
+MY_PATCHES=()
+
[[ ${PV} != *_p* ]] && PLEVEL=0
-patches() {
- [[ ${PLEVEL} -eq 0 ]] && return 1
- local opt=$1
- eval set -- {1..${PLEVEL}}
- set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@")
- if [[ ${opt} == -s ]] ; then
- echo "${@/#/${DISTDIR}/}"
- else
- local u
- for u in mirror://gnu/${PN} ftp://ftp.cwru.edu/pub/bash ; do
- printf "${u}/${PN}-${MY_PV}-patches/%s " "$@"
- done
- fi
-}
DESCRIPTION="Another cute console display library"
HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html"
@@ -33,23 +22,54 @@ HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html"
case ${PV} in
*_alpha*|*_beta*|*_rc*)
SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
+ SRC_URI+=" verify-sig? ( ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )"
;;
+
*)
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)"
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
+ 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/bash"
+ mirror_url_base="ftp://ftp.cwru.edu/pub/bash"
+
+ 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 )"
+
+ # Add in the mirror URL too.
+ SRC_URI+=" ${patch_url/${upstream_url_base}/${mirror_url_base}}"
+ SRC_URI+=" verify-sig? ( ${patch_url/${upstream_url_base}/${mirror_url_base}}.sig )"
+
+ MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
+ done
+
+ unset my_p patch_url my_patch_index upstream_url_base mirror_url_base
+ fi
;;
esac
-LICENSE="GPL-3"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-3+"
SLOT="0/8" # subslot matches SONAME major
-[[ "${PV}" == *_rc* ]] || \
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+[[ ${PV} == *_rc* ]] || \
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="static-libs +unicode utils"
RDEPEND=">=sys-libs/ncurses-5.9-r3:=[static-libs?,unicode(+)?,${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-S="${WORKDIR}/${MY_P}"
+BDEPEND="virtual/pkgconfig
+ verify-sig? ( sec-keys/openpgp-keys-chetramey )"
PATCHES=(
"${FILESDIR}"/${PN}-5.0-no_rpath.patch
@@ -63,11 +83,14 @@ PATCHES=(
# Needed because we don't want the patches being unpacked
# (which emits annoying and useless error messages)
src_unpack() {
+ verify-sig_src_unpack
+
unpack ${MY_P}.tar.gz
}
src_prepare() {
- [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s)
+ [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}"
+
default
if use prefix && [[ ! -x "${BROOT}"/usr/bin/pkg-config ]] ; then
@@ -118,7 +141,7 @@ src_configure() {
# In cases where the C library doesn't support wide characters, readline
# itself won't work correctly, so forcing the answer below should be OK.
if tc-is-cross-compiler ; then
- use kernel_Winnt || export bash_cv_func_sigsetjmp='present'
+ export bash_cv_func_sigsetjmp='present'
export bash_cv_func_ctype_nonascii='yes'
export bash_cv_wcwidth_broken='no' #503312
fi
@@ -166,8 +189,6 @@ multilib_src_install() {
default
if multilib_is_native_abi ; then
- gen_usr_ldscript -a readline history #4411
-
if use utils && ! tc-is-cross-compiler; then
dobin examples/rlfe/rlfe
fi
diff --git a/sys-libs/readline/readline-8.1_p1-r1.ebuild b/sys-libs/readline/readline-8.1_p2-r2.ebuild
index 36d25d6c4aad..8c2239444310 100644
--- a/sys-libs/readline/readline-8.1_p1-r1.ebuild
+++ b/sys-libs/readline/readline-8.1_p2-r2.ebuild
@@ -1,9 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs usr-ldscript
+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/
@@ -11,21 +12,9 @@ PLEVEL="${PV##*_p}"
MY_PV="${PV/_p*}"
MY_PV="${MY_PV/_/-}"
MY_P="${PN}-${MY_PV}"
+MY_PATCHES=()
+
[[ ${PV} != *_p* ]] && PLEVEL=0
-patches() {
- [[ ${PLEVEL} -eq 0 ]] && return 1
- local opt=$1
- eval set -- {1..${PLEVEL}}
- set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@")
- if [[ ${opt} == -s ]] ; then
- echo "${@/#/${DISTDIR}/}"
- else
- local u
- for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do
- printf "${u}/${PN}-${MY_PV}-patches/%s " "$@"
- done
- fi
-}
DESCRIPTION="Another cute console display library"
HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html"
@@ -33,23 +22,54 @@ HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html"
case ${PV} in
*_alpha*|*_beta*|*_rc*)
SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
+ SRC_URI+=" verify-sig? ( ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )"
;;
+
*)
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)"
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
+ 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/bash"
+ mirror_url_base="ftp://ftp.cwru.edu/pub/bash"
+
+ 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 )"
+
+ # Add in the mirror URL too.
+ SRC_URI+=" ${patch_url/${upstream_url_base}/${mirror_url_base}}"
+ SRC_URI+=" verify-sig? ( ${patch_url/${upstream_url_base}/${mirror_url_base}}.sig )"
+
+ MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
+ done
+
+ unset my_p patch_url my_patch_index upstream_url_base mirror_url_base
+ fi
;;
esac
-LICENSE="GPL-3"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-3+"
SLOT="0/8" # subslot matches SONAME major
-[[ "${PV}" == *_rc* ]] || \
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+[[ ${PV} == *_rc* ]] || \
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="static-libs +unicode utils"
RDEPEND=">=sys-libs/ncurses-5.9-r3:=[static-libs?,unicode(+)?,${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-S="${WORKDIR}/${MY_P}"
+BDEPEND="virtual/pkgconfig
+ verify-sig? ( sec-keys/openpgp-keys-chetramey )"
PATCHES=(
"${FILESDIR}"/${PN}-5.0-no_rpath.patch
@@ -63,11 +83,14 @@ PATCHES=(
# Needed because we don't want the patches being unpacked
# (which emits annoying and useless error messages)
src_unpack() {
+ verify-sig_src_unpack
+
unpack ${MY_P}.tar.gz
}
src_prepare() {
- [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s)
+ [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}"
+
default
if use prefix && [[ ! -x "${BROOT}"/usr/bin/pkg-config ]] ; then
@@ -118,7 +141,7 @@ src_configure() {
# In cases where the C library doesn't support wide characters, readline
# itself won't work correctly, so forcing the answer below should be OK.
if tc-is-cross-compiler ; then
- use kernel_Winnt || export bash_cv_func_sigsetjmp='present'
+ export bash_cv_func_sigsetjmp='present'
export bash_cv_func_ctype_nonascii='yes'
export bash_cv_wcwidth_broken='no' #503312
fi
@@ -166,8 +189,6 @@ multilib_src_install() {
default
if multilib_is_native_abi ; then
- gen_usr_ldscript -a readline history #4411
-
if use utils && ! tc-is-cross-compiler; then
dobin examples/rlfe/rlfe
fi
diff --git a/sys-libs/readline/readline-8.2_p10.ebuild b/sys-libs/readline/readline-8.2_p10.ebuild
new file mode 100644
index 000000000000..26af570758a2
--- /dev/null
+++ b/sys-libs/readline/readline-8.2_p10.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2024 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+=" 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"
+ mirror_url_base="ftp://ftp.cwru.edu/pub/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 )"
+
+ # Add in the mirror URL too.
+ SRC_URI+=" ${patch_url/${upstream_url_base}/${mirror_url_base}}"
+ SRC_URI+=" verify-sig? ( ${patch_url/${upstream_url_base}/${mirror_url_base}}.sig )"
+
+ MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
+ done
+
+ unset my_p patch_url my_patch_index upstream_url_base mirror_url_base
+ fi
+else
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/readline/${MY_P}.tar.gz"
+ SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig ftp://ftp.cwru.edu/pub/readline/${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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-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}-6.2-rlfe-tgoto.patch # bug #385091
+ "${FILESDIR}"/${PN}-7.0-headers.patch
+ "${FILESDIR}"/${PN}-8.0-headers.patch
+
+ # TODO: rebase
+ #"${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch
+)
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ else
+ # Needed because we don't want the patches being unpacked
+ # (which emits annoying and useless error messages)
+ verify-sig_src_unpack
+ unpack ${MY_P}.tar.gz
+ fi
+}
+
+src_prepare() {
+ [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}"
+
+ default
+
+ is_release || eautoreconf
+
+ if use prefix && [[ ! -x "${BROOT}"/usr/bin/pkg-config ]] ; 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)
+ 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.2_alpha.ebuild b/sys-libs/readline/readline-8.3_alpha.ebuild
index 65d619f5bbbd..616ce593d07b 100644
--- a/sys-libs/readline/readline-8.2_alpha.ebuild
+++ b/sys-libs/readline/readline-8.3_alpha.ebuild
@@ -1,9 +1,14 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs usr-ldscript
+# 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/
@@ -11,53 +16,85 @@ PLEVEL="${PV##*_p}"
MY_PV="${PV/_p*}"
MY_PV="${MY_PV/_/-}"
MY_P="${PN}-${MY_PV}"
-[[ ${PV} != *_p* ]] && PLEVEL=0
-patches() {
- [[ ${PLEVEL} -eq 0 ]] && return 1
- local opt=$1
- eval set -- {1..${PLEVEL}}
- set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@")
- if [[ ${opt} == -s ]] ; then
- echo "${@/#/${DISTDIR}/}"
- else
- local u
- for u in mirror://gnu/${PN} ftp://ftp.cwru.edu/pub/bash ; do
- printf "${u}/${PN}-${MY_PV}-patches/%s " "$@"
- done
- fi
+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"
+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+=" 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))
-case ${PV} in
- *_alpha*|*_beta*|*_rc*)
- # TODO: check if needed on next alpha/beta
- inherit autotools
+ patch_url=
+ my_patch_index=
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
- ;;
- *)
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)"
- ;;
-esac
+ upstream_url_base="mirror://gnu/readline"
+ mirror_url_base="ftp://ftp.cwru.edu/pub/readline"
-LICENSE="GPL-3"
+ 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 )"
+
+ # Add in the mirror URL too.
+ SRC_URI+=" ${patch_url/${upstream_url_base}/${mirror_url_base}}"
+ SRC_URI+=" verify-sig? ( ${patch_url/${upstream_url_base}/${mirror_url_base}}.sig )"
+
+ MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
+ done
+
+ unset my_p patch_url my_patch_index upstream_url_base mirror_url_base
+ fi
+else
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/readline/${MY_P}.tar.gz"
+ SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig ftp://ftp.cwru.edu/pub/readline/${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 [[ ${PV} != *_alpha* && ${PV} != *_rc* ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+if is_release ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-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"
-
-S="${WORKDIR}/${MY_P}"
+BDEPEND="
+ virtual/pkgconfig
+ verify-sig? ( sec-keys/openpgp-keys-chetramey )
+"
PATCHES=(
"${FILESDIR}"/${PN}-5.0-no_rpath.patch
- "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091
"${FILESDIR}"/${PN}-7.0-headers.patch
"${FILESDIR}"/${PN}-8.0-headers.patch
@@ -65,17 +102,23 @@ PATCHES=(
#"${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch
)
-# Needed because we don't want the patches being unpacked
-# (which emits annoying and useless error messages)
src_unpack() {
- unpack ${MY_P}.tar.gz
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ else
+ # Needed because we don't want the patches being unpacked
+ # (which emits annoying and useless error messages)
+ verify-sig_src_unpack
+ unpack ${MY_P}.tar.gz
+ fi
}
src_prepare() {
- [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s)
+ [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}"
+
default
- [[ ${PV} == *_alpha* ]] && eautoreconf
+ is_release || eautoreconf
if use prefix && [[ ! -x "${BROOT}"/usr/bin/pkg-config ]] ; then
# If we're bootstrapping, make a guess. We don't have pkg-config
@@ -90,8 +133,8 @@ src_prepare() {
ncurses_libs+=" -ltinfo${ncurses_libs_suffix}"
fi
else
- # Force ncurses linking. #71420
- # Use pkg-config to get the right values. #457558
+ # 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)
fi
@@ -102,21 +145,22 @@ src_prepare() {
-e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \
examples/rlfe/configure || die
- # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
+ # Fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
# objformat for years, so we don't want to rely on that.
sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
- ln -s ../.. examples/rlfe/readline || die # for local readline headers
+ # For local readline headers
+ ln -s ../.. examples/rlfe/readline || die
}
src_configure() {
- # fix implicit decls with widechar funcs
+ # Fix implicit decls with widechar funcs
append-cppflags -D_GNU_SOURCE
# https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
- # Make sure configure picks a better ar than `ar`. #484866
- export ac_cv_prog_AR=$(tc-getAR)
+ # 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
@@ -125,9 +169,10 @@ src_configure() {
# In cases where the C library doesn't support wide characters, readline
# itself won't work correctly, so forcing the answer below should be OK.
if tc-is-cross-compiler ; then
- use kernel_Winnt || export bash_cv_func_sigsetjmp='present'
- export bash_cv_func_ctype_nonascii='yes'
- export bash_cv_wcwidth_broken='no' #503312
+ 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
@@ -143,14 +188,15 @@ multilib_src_configure() {
--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()
+ # 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
+
+ ECONF_SOURCE="${S}"/examples/rlfe econf --cache-file="${BUILD_DIR}"/config.cache
fi
}
@@ -158,7 +204,7 @@ multilib_src_compile() {
emake
if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
- # code is full of AC_TRY_RUN()
+ # Code is full of AC_TRY_RUN()
cd examples/rlfe || die
local l
for l in readline history ; do
@@ -173,8 +219,6 @@ multilib_src_install() {
default
if multilib_is_native_abi ; then
- gen_usr_ldscript -a readline history #4411
-
if use utils && ! tc-is-cross-compiler; then
dobin examples/rlfe/rlfe
fi
@@ -183,13 +227,14 @@ multilib_src_install() {
multilib_src_install_all() {
HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs
+
dodoc USAGE
docinto ps
dodoc doc/*.ps
}
pkg_preinst() {
# bug #29865
- # Reappeared in #595324 with paludis so keeping this for now...
+ # 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) \
diff --git a/sys-libs/readline/readline-9999.ebuild b/sys-libs/readline/readline-9999.ebuild
new file mode 100644
index 000000000000..616ce593d07b
--- /dev/null
+++ b/sys-libs/readline/readline-9999.ebuild
@@ -0,0 +1,251 @@
+# Copyright 1999-2024 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=()
+
+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+=" 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"
+ mirror_url_base="ftp://ftp.cwru.edu/pub/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 )"
+
+ # Add in the mirror URL too.
+ SRC_URI+=" ${patch_url/${upstream_url_base}/${mirror_url_base}}"
+ SRC_URI+=" verify-sig? ( ${patch_url/${upstream_url_base}/${mirror_url_base}}.sig )"
+
+ MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
+ done
+
+ unset my_p patch_url my_patch_index upstream_url_base mirror_url_base
+ fi
+else
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/readline/${MY_P}.tar.gz"
+ SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig ftp://ftp.cwru.edu/pub/readline/${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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-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
+
+ # TODO: rebase
+ #"${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch
+)
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ else
+ # Needed because we don't want the patches being unpacked
+ # (which emits annoying and useless error messages)
+ verify-sig_src_unpack
+ unpack ${MY_P}.tar.gz
+ fi
+}
+
+src_prepare() {
+ [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}"
+
+ default
+
+ is_release || eautoreconf
+
+ if use prefix && [[ ! -x "${BROOT}"/usr/bin/pkg-config ]] ; 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)
+ 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/rpmatch-standalone-1.0-r1.ebuild b/sys-libs/rpmatch-standalone/rpmatch-standalone-1.0-r1.ebuild
new file mode 100644
index 000000000000..7310a10e2914
--- /dev/null
+++ b/sys-libs/rpmatch-standalone/rpmatch-standalone-1.0-r1.ebuild
@@ -0,0 +1,36 @@
+# 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/rpmatch-standalone/rpmatch-standalone-1.0.ebuild b/sys-libs/rpmatch-standalone/rpmatch-standalone-1.0.ebuild
index 6cacfa6cfc13..d6689b450bd9 100644
--- a/sys-libs/rpmatch-standalone/rpmatch-standalone-1.0.ebuild
+++ b/sys-libs/rpmatch-standalone/rpmatch-standalone-1.0.ebuild
@@ -11,11 +11,10 @@ SRC_URI="https://github.com/pullmoll/musl-rpmatch/archive/v${PV}.tar.gz -> ${P}.
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
+KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 ~riscv x86"
IUSE="static-libs"
-DEPEND="
- !sys-libs/glibc"
+RDEPEND="!sys-libs/glibc"
S="${WORKDIR}/musl-rpmatch-${PV}"
diff --git a/sys-libs/slang/Manifest b/sys-libs/slang/Manifest
index 026bb6d4230c..d258c25d37ec 100644
--- a/sys-libs/slang/Manifest
+++ b/sys-libs/slang/Manifest
@@ -1 +1,2 @@
DIST slang-2.3.2.tar.bz2 1586720 BLAKE2B e923a431e6273f1783c40dc09b2e324ace22e41a163fd46dcb8ab16c9ef27f190651df8da24432edc75890b83cd95051a835d5e582385bb23e36cd8ae18e6d24 SHA512 35cdfe8af66dac62ee89cca60fa87ddbd02cae63b30d5c0e3786e77b1893c45697ace4ac7e82d9832b8a9ac342560bc35997674846c5022341481013e76f74b5
+DIST slang-2.3.3.tar.bz2 1646311 BLAKE2B 2f304b25e807fe38b544479f4a6e98723816d08cda576177a270df736d7db8992a478f980333afc10a7bc0b5dc5508e49b33a13de02f0466f065efdfa3b7b351 SHA512 f882f09e3fcd53427de0f233c9fc3ab15497f2323007be9a084696c8cf810ffe2726cd003149e757df26198b390b9f8c1ff411dc6473513457bd0f94722f8490
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
new file mode 100644
index 000000000000..d3085797d1f8
--- /dev/null
+++ b/sys-libs/slang/files/slang-2.3.3-remove-undefined-symbol-from-version-script.patch
@@ -0,0 +1,30 @@
+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
new file mode 100644
index 000000000000..15062ee7d420
--- /dev/null
+++ b/sys-libs/slang/files/slang-2.3.3-slsh-libs.patch
@@ -0,0 +1,21 @@
+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/slang-2.3.2.ebuild b/sys-libs/slang/slang-2.3.2.ebuild
index 1d8efbe42904..4dbae877427b 100644
--- a/sys-libs/slang/slang-2.3.2.ebuild
+++ b/sys-libs/slang/slang-2.3.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -14,7 +14,7 @@ if [[ "${PV}" = *_pre* ]] ; then
else
SRC_URI="http://www.jedsoft.org/releases/${PN}/${P}.tar.bz2
http://www.jedsoft.org/releases/${PN}/old/${P}.tar.bz2"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
fi
LICENSE="GPL-2"
SLOT="0"
diff --git a/sys-libs/slang/slang-2.3.3-r1.ebuild b/sys-libs/slang/slang-2.3.3-r1.ebuild
new file mode 100644
index 000000000000..cce3a9b5292e
--- /dev/null
+++ b/sys-libs/slang/slang-2.3.3-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2024 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 ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~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? ( >=sys-libs/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.ebuild b/sys-libs/slang/slang-2.3.3.ebuild
new file mode 100644
index 000000000000..1cf13c918011
--- /dev/null
+++ b/sys-libs/slang/slang-2.3.3.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit 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 ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~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? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}"
+
+MAKEOPTS+=" -j1"
+
+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
+
+ # 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 elf $(usex static-libs static '')
+ emake -C slsh slsh
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install $(usex 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
new file mode 100644
index 000000000000..094164411d98
--- /dev/null
+++ b/sys-libs/snapd-glib/Manifest
@@ -0,0 +1,2 @@
+DIST snapd-glib-1.63.tar.xz 187676 BLAKE2B a212f826ee35ef5458b716ce64d8f4b32474f991938bc314fcdb0feb5c803f93880a517fe5e1550bc82bc4992bee7467dc0d8cf5cb260712e83b8a1fe6b75743 SHA512 94a2f46e4e066270ea5492cb00fd44da247686a354cbe6766fe3e8974e6bb51f4cf1ca95027533417ec8c8117fc9d3866cb173a113b89d789b6ba518489a314f
+DIST snapd-glib-1.64.tar.xz 195580 BLAKE2B 1c6e958033c2b98dd72b5bfb6f1a44739a79d5d9a289fded9756cf3031a1fe62cccbf3ba4ce4c4f34d3c7e48b945b481ff6c3ae245d205a49e37845dd3efbb27 SHA512 a3fa101bcc64b750c170ccd433dbbfaa306354dc6c66d5ab62911c866b7e65f6aefc7e9c82f84f5d16b8b96174edf4bef771a4839ef6e5acd15399a84b93aec4
diff --git a/sys-libs/snapd-glib/files/snapd-glib-1.64-qt6.patch b/sys-libs/snapd-glib/files/snapd-glib-1.64-qt6.patch
new file mode 100644
index 000000000000..de6b4bbdec5c
--- /dev/null
+++ b/sys-libs/snapd-glib/files/snapd-glib-1.64-qt6.patch
@@ -0,0 +1,286 @@
+From 5377f5d01adce209b9a148018cab100d5d5a1d4c Mon Sep 17 00:00:00 2001
+From: Aleix Pol <aleixpol@kde.org>
+Date: Tue, 13 Feb 2024 01:25:39 +0100
+Subject: [PATCH] qt: Port to Qt 6
+
+It's what we are using in Discover now.
+diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
+index 8a8668f2..58700c2f 100644
+--- a/.github/workflows/test.yaml
++++ b/.github/workflows/test.yaml
+@@ -55,7 +55,7 @@ jobs:
+ - name: Install dependencies (Fedora)
+ if: startsWith(matrix.image, 'fedora:')
+ run: |
+- dnf install -y gcc gcc-c++ gobject-introspection-devel glib2-devel gtk-doc json-glib-devel libsoup3-devel ninja-build python3-pip qt5-qtbase-devel qt5-qtdeclarative-devel redhat-rpm-config vala
++ dnf install -y gcc gcc-c++ gobject-introspection-devel glib2-devel gtk-doc json-glib-devel libsoup3-devel ninja-build python3-pip qt6-qtbase-devel qt6-qtdeclarative-devel redhat-rpm-config vala
+
+ - name: Install meson
+ if: matrix.image != 'ubuntu:rolling'
+diff --git a/meson.build b/meson.build
+index b9f98d37..26951e9c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1,7 +1,7 @@
+ project ('snapd-glib', [ 'c', 'cpp' ],
+ version: '1.64',
+- meson_version: '>= 0.43.0',
+- default_options : [ 'c_std=c11', 'cpp_std=c++11' ])
++ meson_version: '>= 0.57.0',
++ default_options : [ 'c_std=c11' ])
+
+ glib_dep = dependency ('glib-2.0', version: '>= 2.46')
+ gio_dep = dependency ('gio-2.0', version: '>= 2.46')
+@@ -14,9 +14,9 @@ endif
+ json_glib_dep = dependency ('json-glib-1.0', version: '>= 1.1.2')
+
+ if get_option ('qt-bindings')
+- qt5_core_dep = dependency ('qt5', modules: [ 'Core' ])
+- qt5_network_dep = dependency ('qt5', modules: [ 'Network' ])
+- qml_dep = dependency ('qt5', modules: [ 'Qml' ])
++ qt6_core_dep = dependency ('qt6', modules: [ 'Core' ])
++ qt6_network_dep = dependency ('qt6', modules: [ 'Network' ])
++ qml_dep = dependency ('qt6', modules: [ 'Qml' ])
+ endif
+
+ datadir = join_paths (get_option ('prefix'), get_option ('datadir'))
+diff --git a/snapd-qt/markdown-node.cpp b/snapd-qt/markdown-node.cpp
+index 2be1751e..2e87707b 100644
+--- a/snapd-qt/markdown-node.cpp
++++ b/snapd-qt/markdown-node.cpp
+@@ -62,3 +62,14 @@ QSnapdMarkdownNode *QSnapdMarkdownNode::child (int n) const
+ return NULL;
+ return new QSnapdMarkdownNode (children->pdata[n]);
+ }
++
++QSnapdMarkdownNode & QSnapdMarkdownNode::operator=(const QSnapdMarkdownNode& node)
++{
++ if (&node == this) {
++ return *this;
++ }
++ g_object_unref(wrapped_object);
++ wrapped_object = node.wrapped_object;
++ g_object_ref(wrapped_object);
++ return *this;
++}
+diff --git a/snapd-qt/markdown-parser.cpp b/snapd-qt/markdown-parser.cpp
+index 751592c3..1a305ad9 100644
+--- a/snapd-qt/markdown-parser.cpp
++++ b/snapd-qt/markdown-parser.cpp
+@@ -56,7 +56,7 @@ bool QSnapdMarkdownParser::preserveWhitespace () const
+ QList<QSnapdMarkdownNode> QSnapdMarkdownParser::parse (const QString &text) const
+ {
+ Q_D(const QSnapdMarkdownParser);
+- g_autoptr(GPtrArray) nodes = snapd_markdown_parser_parse (d->parser, text.toStdString ().c_str ());
++ g_autoptr(GPtrArray) nodes = snapd_markdown_parser_parse (d->parser, text.toUtf8().constData());
+ QList<QSnapdMarkdownNode> nodes_list;
+ for (uint i = 0; i < nodes->len; i++) {
+ SnapdMarkdownNode *node = (SnapdMarkdownNode *) g_ptr_array_index (nodes, i);
+diff --git a/snapd-qt/meson.build b/snapd-qt/meson.build
+index 74687852..48fe650c 100644
+--- a/snapd-qt/meson.build
++++ b/snapd-qt/meson.build
+@@ -9,7 +9,7 @@ if not get_option('soup2')
+ endif
+
+ install_header_dir = join_paths (includedir, library_name, 'Snapd')
+-qml_dir = join_paths (libdir, 'qt5', 'qml', qt_name)
++qml_dir = join_paths (libdir, 'qt6', 'qml', qt_name)
+ cmake_dir = join_paths (libdir, 'cmake', qt_name)
+
+ source_cpp = [
+@@ -114,19 +114,19 @@ source_private_h = [
+ ]
+
+ if get_option ('qt-bindings')
+- qt5 = import ('qt5')
+- moc_files = qt5.preprocess (moc_headers: [ source_h, source_private_h ],
+- dependencies: [ qt5_core_dep, qt5_network_dep ])
++ qt6 = import ('qt6')
++ moc_files = qt6.preprocess (moc_headers: [ source_h, source_private_h ],
++ dependencies: [ qt6_core_dep, qt6_network_dep ])
+
+ snapd_qt_lib = library (library_name,
+ source_cpp, moc_files,
+ version: '1.0.0',
+- dependencies: [ qt5_core_dep, qt5_network_dep, glib_dep, gio_dep, snapd_glib_dep ],
++ dependencies: [ qt6_core_dep, qt6_network_dep, glib_dep, gio_dep, snapd_glib_dep ],
+ cpp_args: [ '-DQT_NO_SIGNALS_SLOTS_KEYWORDS' ],
+ install: true)
+
+ snapd_qt_dep = declare_dependency (link_with: snapd_qt_lib,
+- dependencies: [ qt5_network_dep ],
++ dependencies: [ qt6_network_dep ],
+ include_directories: include_directories ('.'))
+
+ install_headers (source_h + source_alias_h,
+@@ -160,7 +160,7 @@ if get_option ('qt-bindings')
+ install_data ('qmldir',
+ install_dir: qml_dir)
+
+- qml_moc_files = qt5.preprocess (moc_headers: 'qml-plugin.h',
++ qml_moc_files = qt6.preprocess (moc_headers: 'qml-plugin.h',
+ dependencies: qml_dep)
+ library (qt_name,
+ 'qml-plugin.cpp', qml_moc_files,
+diff --git a/tests/meson.build b/tests/meson.build
+index dd4ac7ef..4207244b 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -39,7 +39,7 @@ test_file = configure_file (input: 'test-markdown-glib.test.in',
+ install_data (test_file, install_dir: installed_tests_data_dir)
+
+ if get_option ('qt-bindings')
+- moc_files = qt5.preprocess (moc_headers: [ 'test-qt.h' ])
++ moc_files = qt6.preprocess (moc_headers: [ 'test-qt.h' ])
+
+ test_executable = executable ('test-qt',
+ 'test-qt.cpp', moc_files,
+diff --git a/tests/test-qt.cpp b/tests/test-qt.cpp
+index 04243a51..2bd225cf 100644
+--- a/tests/test-qt.cpp
++++ b/tests/test-qt.cpp
+@@ -2918,32 +2918,32 @@ test_get_connections_attributes ()
+
+ check_names_match (connection->plugAttributeNames (), QStringList () << "plug-string-key" << "plug-int-key" << "plug-bool-key" << "plug-number-key");
+ g_assert_true (connection->hasPlugAttribute ("plug-string-key"));
+- g_assert_true (connection->plugAttribute ("plug-string-key").type () == (QVariant::Type) QMetaType::QString);
++ g_assert_true (connection->plugAttribute ("plug-string-key").metaType().id () == QMetaType::QString);
+ g_assert_true (connection->plugAttribute ("plug-string-key").toString () == "value");
+ g_assert_true (connection->hasPlugAttribute ("plug-int-key"));
+- g_assert_true (connection->plugAttribute ("plug-int-key").type () == (QVariant::Type) QMetaType::LongLong);
++ g_assert_true (connection->plugAttribute ("plug-int-key").metaType().id () == QMetaType::LongLong);
+ g_assert_cmpint (connection->plugAttribute ("plug-int-key").toLongLong (), ==, 42);
+ g_assert_true (connection->hasPlugAttribute ("plug-bool-key"));
+- g_assert_true (connection->plugAttribute ("plug-bool-key").type () == (QVariant::Type) QMetaType::Bool);
++ g_assert_true (connection->plugAttribute ("plug-bool-key").metaType().id () == QMetaType::Bool);
+ g_assert_true (connection->plugAttribute ("plug-bool-key").toBool ());
+ g_assert_true (connection->hasPlugAttribute ("plug-number-key"));
+- g_assert_true (connection->plugAttribute ("plug-number-key").type () == (QVariant::Type) QMetaType::Double);
++ g_assert_true (connection->plugAttribute ("plug-number-key").metaType().id () == QMetaType::Double);
+ g_assert_cmpfloat (connection->plugAttribute ("plug-number-key").toDouble (), ==, 1.25);
+ g_assert_false (connection->hasPlugAttribute ("plug-invalid-key"));
+ g_assert_false (connection->plugAttribute ("plug-invalid-key").isValid ());
+
+ check_names_match (connection->slotAttributeNames (), QStringList () << "slot-string-key" << "slot-int-key" << "slot-bool-key" << "slot-number-key");
+ g_assert_true (connection->hasSlotAttribute ("slot-string-key"));
+- g_assert_true (connection->slotAttribute ("slot-string-key").type () == (QVariant::Type) QMetaType::QString);
++ g_assert_true (connection->slotAttribute ("slot-string-key").metaType().id () == QMetaType::QString);
+ g_assert_true (connection->slotAttribute ("slot-string-key").toString () == "value");
+ g_assert_true (connection->hasSlotAttribute ("slot-int-key"));
+- g_assert_true (connection->slotAttribute ("slot-int-key").type () == (QVariant::Type) QMetaType::LongLong);
++ g_assert_true (connection->slotAttribute ("slot-int-key").metaType().id () == QMetaType::LongLong);
+ g_assert_cmpint (connection->slotAttribute ("slot-int-key").toLongLong (), ==, 42);
+ g_assert_true (connection->hasSlotAttribute ("slot-bool-key"));
+- g_assert_true (connection->slotAttribute ("slot-bool-key").type () == (QVariant::Type) QMetaType::Bool);
++ g_assert_true (connection->slotAttribute ("slot-bool-key").metaType().id () == QMetaType::Bool);
+ g_assert_true (connection->slotAttribute ("slot-bool-key").toBool ());
+ g_assert_true (connection->hasSlotAttribute ("slot-number-key"));
+- g_assert_true (connection->slotAttribute ("slot-number-key").type () == (QVariant::Type) QMetaType::Double);
++ g_assert_true (connection->slotAttribute ("slot-number-key").metaType().id () == QMetaType::Double);
+ g_assert_cmpfloat (connection->slotAttribute ("slot-number-key").toDouble (), ==, 1.25);
+ g_assert_false (connection->hasSlotAttribute ("slot-invalid-key"));
+ g_assert_false (connection->slotAttribute ("slot-invalid-key").isValid ());
+@@ -2952,16 +2952,16 @@ test_get_connections_attributes ()
+ QScopedPointer<QSnapdPlug> plug (getConnectionsRequest->plug (0));
+ check_names_match (plug->attributeNames (), QStringList () << "plug-string-key" << "plug-int-key" << "plug-bool-key" << "plug-number-key");
+ g_assert_true (plug->hasAttribute ("plug-string-key"));
+- g_assert_true (plug->attribute ("plug-string-key").type () == (QVariant::Type) QMetaType::QString);
++ g_assert_true (plug->attribute ("plug-string-key").metaType().id () == QMetaType::QString);
+ g_assert_true (plug->attribute ("plug-string-key").toString () == "value");
+ g_assert_true (plug->hasAttribute ("plug-int-key"));
+- g_assert_true (plug->attribute ("plug-int-key").type () == (QVariant::Type) QMetaType::LongLong);
++ g_assert_true (plug->attribute ("plug-int-key").metaType().id () == QMetaType::LongLong);
+ g_assert_cmpint (plug->attribute ("plug-int-key").toLongLong (), ==, 42);
+ g_assert_true (plug->hasAttribute ("plug-bool-key"));
+- g_assert_true (plug->attribute ("plug-bool-key").type () == (QVariant::Type) QMetaType::Bool);
++ g_assert_true (plug->attribute ("plug-bool-key").metaType().id () == QMetaType::Bool);
+ g_assert_true (plug->attribute ("plug-bool-key").toBool ());
+ g_assert_true (plug->hasAttribute ("plug-number-key"));
+- g_assert_true (plug->attribute ("plug-number-key").type () == (QVariant::Type) QMetaType::Double);
++ g_assert_true (plug->attribute ("plug-number-key").metaType().id () == QMetaType::Double);
+ g_assert_cmpfloat (plug->attribute ("plug-number-key").toDouble (), ==, 1.25);
+ g_assert_false (plug->hasAttribute ("plug-invalid-key"));
+ g_assert_false (plug->attribute ("plug-invalid-key").isValid ());
+@@ -2970,16 +2970,16 @@ test_get_connections_attributes ()
+ QScopedPointer<QSnapdSlot> slot (getConnectionsRequest->slot (0));
+ check_names_match (slot->attributeNames (), QStringList () << "slot-string-key" << "slot-int-key" << "slot-bool-key" << "slot-number-key");
+ g_assert_true (slot->hasAttribute ("slot-string-key"));
+- g_assert_true (slot->attribute ("slot-string-key").type () == (QVariant::Type) QMetaType::QString);
++ g_assert_true (slot->attribute ("slot-string-key").metaType().id () == QMetaType::QString);
+ g_assert_true (slot->attribute ("slot-string-key").toString () == "value");
+ g_assert_true (slot->hasAttribute ("slot-int-key"));
+- g_assert_true (slot->attribute ("slot-int-key").type () == (QVariant::Type) QMetaType::LongLong);
++ g_assert_true (slot->attribute ("slot-int-key").metaType().id () == QMetaType::LongLong);
+ g_assert_cmpint (slot->attribute ("slot-int-key").toLongLong (), ==, 42);
+ g_assert_true (slot->hasAttribute ("slot-bool-key"));
+- g_assert_true (slot->attribute ("slot-bool-key").type () == (QVariant::Type) QMetaType::Bool);
++ g_assert_true (slot->attribute ("slot-bool-key").metaType().id () == QMetaType::Bool);
+ g_assert_true (slot->attribute ("slot-bool-key").toBool ());
+ g_assert_true (slot->hasAttribute ("slot-number-key"));
+- g_assert_true (slot->attribute ("slot-number-key").type () == (QVariant::Type) QMetaType::Double);
++ g_assert_true (slot->attribute ("slot-number-key").metaType().id () == QMetaType::Double);
+ g_assert_cmpfloat (slot->attribute ("slot-number-key").toDouble (), ==, 1.25);
+ g_assert_false (slot->hasAttribute ("slot-invalid-key"));
+ g_assert_false (slot->attribute ("slot-invalid-key").isValid ());
+@@ -3123,13 +3123,13 @@ test_get_interfaces_attributes ()
+ QScopedPointer<QSnapdPlug> plug (getInterfacesRequest->plug (0));
+ check_names_match (plug->attributeNames (), QStringList () << "plug-string-key" << "plug-int-key" << "plug-bool-key");
+ g_assert_true (plug->hasAttribute ("plug-string-key"));
+- g_assert_true (plug->attribute ("plug-string-key").type () == (QVariant::Type) QMetaType::QString);
++ g_assert_true (plug->attribute ("plug-string-key").metaType().id () == QMetaType::QString);
+ g_assert_true (plug->attribute ("plug-string-key").toString () == "value");
+ g_assert_true (plug->hasAttribute ("plug-int-key"));
+- g_assert_true (plug->attribute ("plug-int-key").type () == (QVariant::Type) QMetaType::LongLong);
++ g_assert_true (plug->attribute ("plug-int-key").metaType().id () == QMetaType::LongLong);
+ g_assert_cmpint (plug->attribute ("plug-int-key").toLongLong (), ==, 42);
+ g_assert_true (plug->hasAttribute ("plug-bool-key"));
+- g_assert_true (plug->attribute ("plug-bool-key").type () == (QVariant::Type) QMetaType::Bool);
++ g_assert_true (plug->attribute ("plug-bool-key").metaType().id () == QMetaType::Bool);
+ g_assert_true (plug->attribute ("plug-bool-key").toBool ());
+ g_assert_false (plug->hasAttribute ("plug-invalid-key"));
+ g_assert_false (plug->attribute ("plug-invalid-key").isValid ());
+@@ -3138,13 +3138,13 @@ test_get_interfaces_attributes ()
+ QScopedPointer<QSnapdSlot> slot (getInterfacesRequest->slot (0));
+ check_names_match (slot->attributeNames (), QStringList () << "slot-string-key" << "slot-int-key" << "slot-bool-key");
+ g_assert_true (slot->hasAttribute ("slot-string-key"));
+- g_assert_true (slot->attribute ("slot-string-key").type () == (QVariant::Type) QMetaType::QString);
++ g_assert_true (slot->attribute ("slot-string-key").metaType().id () == QMetaType::QString);
+ g_assert_true (slot->attribute ("slot-string-key").toString () == "value");
+ g_assert_true (slot->hasAttribute ("slot-int-key"));
+- g_assert_true (slot->attribute ("slot-int-key").type () == (QVariant::Type) QMetaType::LongLong);
++ g_assert_true (slot->attribute ("slot-int-key").metaType().id () == QMetaType::LongLong);
+ g_assert_cmpint (slot->attribute ("slot-int-key").toLongLong (), ==, 42);
+ g_assert_true (slot->hasAttribute ("slot-bool-key"));
+- g_assert_true (slot->attribute ("slot-bool-key").type () == (QVariant::Type) QMetaType::Bool);
++ g_assert_true (slot->attribute ("slot-bool-key").metaType().id () == QMetaType::Bool);
+ g_assert_true (slot->attribute ("slot-bool-key").toBool ());
+ g_assert_false (slot->hasAttribute ("slot-invalid-key"));
+ g_assert_false (slot->attribute ("slot-invalid-key").isValid ());
+@@ -3894,7 +3894,7 @@ test_find_channels ()
+ if (channel->name () == "stable") {
+ g_assert_true (channel->track () == "latest");
+ g_assert_true (channel->risk () == "stable");
+- g_assert_true (channel->branch () == NULL);
++ g_assert_true (channel->branch ().isEmpty());
+ g_assert_true (channel->revision () == "REVISION");
+ g_assert_true (channel->version () == "VERSION");
+ g_assert_true (channel->epoch () == "0");
+@@ -3907,7 +3907,7 @@ test_find_channels ()
+ g_assert_true (channel->name () == "beta");
+ g_assert_true (channel->track () == "latest");
+ g_assert_true (channel->risk () == "beta");
+- g_assert_true (channel->branch () == NULL);
++ g_assert_true (channel->branch ().isEmpty());
+ g_assert_true (channel->revision () == "BETA-REVISION");
+ g_assert_true (channel->version () == "BETA-VERSION");
+ g_assert_true (channel->epoch () == "1");
+@@ -3926,7 +3926,7 @@ test_find_channels ()
+ if (channel->name () == "insider/stable") {
+ g_assert_true (channel->track () == "insider");
+ g_assert_true (channel->risk () == "stable");
+- g_assert_true (channel->branch () == NULL);
++ g_assert_true (channel->branch ().isEmpty());
+ g_assert_true (channel->releasedAt ().isNull ());
+ matched_track = TRUE;
+ }
diff --git a/sys-libs/snapd-glib/metadata.xml b/sys-libs/snapd-glib/metadata.xml
new file mode 100644
index 000000000000..8e8a7baf2077
--- /dev/null
+++ b/sys-libs/snapd-glib/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>andrewammerlaan@gentoo.org</email>
+ <name>Andrew 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.63.ebuild b/sys-libs/snapd-glib/snapd-glib-1.63.ebuild
new file mode 100644
index 000000000000..5f95bf2cdd41
--- /dev/null
+++ b/sys-libs/snapd-glib/snapd-glib-1.63.ebuild
@@ -0,0 +1,63 @@
+# Copyright 2019-2023 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/snapcore/snapd-glib/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="LGPL-3"
+SLOT="0/1"
+KEYWORDS="amd64"
+
+IUSE="doc introspection qml qt5 vala"
+REQUIRED_USE="
+ qml? ( qt5 )
+ vala? ( introspection )
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ sys-devel/gettext
+ qt5? ( dev-qt/linguist-tools:5 )
+"
+
+DEPEND="
+ dev-libs/json-glib
+ dev-libs/glib:2
+ dev-util/glib-utils
+ net-libs/libsoup:3.0
+ doc? ( dev-util/gtk-doc )
+ introspection? ( dev-libs/gobject-introspection )
+ qml? ( dev-qt/qtdeclarative:5 )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ )
+ 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 qt5 qt-bindings)"
+ "$(meson_use vala vala-bindings)"
+ -Dsoup2=false
+ )
+
+ meson_src_configure
+}
diff --git a/sys-libs/snapd-glib/snapd-glib-1.64-r100.ebuild b/sys-libs/snapd-glib/snapd-glib-1.64-r100.ebuild
new file mode 100644
index 000000000000..ca2dc1ebc3ed
--- /dev/null
+++ b/sys-libs/snapd-glib/snapd-glib-1.64-r100.ebuild
@@ -0,0 +1,65 @@
+# Copyright 2019-2024 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/snapcore/snapd-glib/releases/download/${PV}/${P}.tar.xz"
+
+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-util/gtk-doc )
+ introspection? ( dev-libs/gobject-introspection )
+ qml? ( dev-qt/qtdeclarative:6 )
+ qt6? (
+ dev-qt/qtbase:6[network,widgets]
+ )
+ vala? ( $(vala_depend) )
+"
+
+RDEPEND="${DEPEND}
+ app-containers/snapd
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-qt6.patch"
+)
+
+pkg_setup() {
+ vala_setup
+}
+
+src_configure() {
+ local emesonargs=(
+ "$(meson_use doc docs)"
+ "$(meson_use introspection)"
+ "$(meson_use qml qml-bindings)"
+ "$(meson_use qt6 qt-bindings)"
+ "$(meson_use vala vala-bindings)"
+ -Dsoup2=false
+ )
+
+ meson_src_configure
+}
diff --git a/sys-libs/snapd-glib/snapd-glib-1.64.ebuild b/sys-libs/snapd-glib/snapd-glib-1.64.ebuild
new file mode 100644
index 000000000000..8728ba207b25
--- /dev/null
+++ b/sys-libs/snapd-glib/snapd-glib-1.64.ebuild
@@ -0,0 +1,63 @@
+# Copyright 2019-2023 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/snapcore/snapd-glib/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="LGPL-3"
+SLOT="0/1"
+KEYWORDS="~amd64"
+
+IUSE="doc introspection qml qt5 vala"
+REQUIRED_USE="
+ qml? ( qt5 )
+ vala? ( introspection )
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ sys-devel/gettext
+ qt5? ( dev-qt/linguist-tools:5 )
+"
+
+DEPEND="
+ dev-libs/json-glib
+ dev-libs/glib:2
+ dev-util/glib-utils
+ net-libs/libsoup:3.0
+ doc? ( dev-util/gtk-doc )
+ introspection? ( dev-libs/gobject-introspection )
+ qml? ( dev-qt/qtdeclarative:5 )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ )
+ 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 qt5 qt-bindings)"
+ "$(meson_use vala vala-bindings)"
+ -Dsoup2=false
+ )
+
+ meson_src_configure
+}
diff --git a/sys-libs/talloc/Manifest b/sys-libs/talloc/Manifest
index ae0afae278ed..5a3da1defe46 100644
--- a/sys-libs/talloc/Manifest
+++ b/sys-libs/talloc/Manifest
@@ -1,2 +1,3 @@
-DIST talloc-2.3.2.tar.gz 661344 BLAKE2B 957eedc4a367051cb99fa4d2edb8e778de8e0187bb5c0d84a1afef20aab122a8b7310d10c694e15ddd6a0a45194889fe3d26dae0ceb8e406d51512af95a23014 SHA512 c851a6f43025720453a3bff8734bfcfff0e29fb7cf2ffcc6c03b6ab8589098daf01d668deec61aa2f238d4df3eb3c47bd080e26eec760cf04a70e1afcad5c5e1
-DIST talloc-2.3.3.tar.gz 650493 BLAKE2B 4312d8bbd54da2cb8917946e46bb77dae1c6fdfeb72bd85d86ef8d5900f2132a36c5f0075608116a9bf036a2f02671472d389eed704f8e2923f8320d29aa12bd SHA512 1e4b90769b9be72421d76bf9149fd0736f43d034b1573ab2dfb5cd613b4fb3fdf67d575f81789851787e1cbbc7353cdfc114cefbccb15fc0f39e222f40aff65f
+DIST talloc-2.4.0.tar.gz 676054 BLAKE2B 71b3f21fa7cd114579e1dc064aadda447c0d196beaa27a5919acebdce668f6b768dd7c293c056ae4c096f31d8e931255ee2b71728c4b7b0bbb7818169380e9ca SHA512 810d92a614d0b9e0ac6fe403c1643c4dda435f79c4627d3c3be228f94b4b2ee8e528efbbed07f7d1a16043d6e55bdf4f10826f31fb8ca1c649c4126ea09a3aff
+DIST talloc-2.4.1.tar.gz 679160 BLAKE2B a7913b25930c77da53c17c2e0d71386402b1059f93c751084037c5068a035bd543c2d7e24a2d8dc989bb4eea13fa1a3c7a362e4d6c14af0b2030fbfb2f513801 SHA512 4de3b66d7cd1ff3f53e28e86bf9e89528635465c67868e1262aab6946106c228b2c184e988561361c3194fb260d83e016477254c9dbea7abff40c4dc0d31c76c
+DIST talloc-2.4.2.tar.gz 679750 BLAKE2B 1f836d6b11e096e399ad7b99ad4abd3c140e75ee307695659c35b89eca600de247e5432bce523a299334f20ca2dad4c726b783a94c546b67fe25b2b7199b2915 SHA512 fb91665ffbe0cce96b1359940ff3ed21330c81c5331140788a26aa94f82b50492176e6000ff54b31d1a434bb1cb53a6a2c7894153545252a1fd91bda7c05a213
diff --git a/sys-libs/talloc/talloc-2.3.2.ebuild b/sys-libs/talloc/talloc-2.4.0.ebuild
index 6d991fb90858..72b9421fc089 100644
--- a/sys-libs/talloc/talloc-2.3.2.ebuild
+++ b/sys-libs/talloc/talloc-2.4.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{10..12} )
PYTHON_REQ_USE="threads(+)"
inherit waf-utils python-single-r1 multilib-minimal
@@ -13,8 +13,8 @@ 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 ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~x64-solaris"
-IUSE="compat +python"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+IUSE="compat +python valgrind"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="test"
@@ -27,8 +27,13 @@ RDEPEND="
)
python? ( ${PYTHON_DEPS} )
"
-DEPEND="${RDEPEND}"
-BDEPEND="${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
"
@@ -64,10 +69,15 @@ src_prepare() {
multilib_src_configure() {
local extra_opts=(
- $(usex compat --enable-talloc-compat1 '')
+ --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')
)
+
waf-utils_src_configure "${extra_opts[@]}"
}
diff --git a/sys-libs/talloc/talloc-2.3.3.ebuild b/sys-libs/talloc/talloc-2.4.1.ebuild
index 7eb4c6cba9e3..47470a52c629 100644
--- a/sys-libs/talloc/talloc-2.3.3.ebuild
+++ b/sys-libs/talloc/talloc-2.4.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{10..12} )
PYTHON_REQ_USE="threads(+)"
inherit waf-utils python-single-r1 multilib-minimal
@@ -13,11 +13,11 @@ 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 ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~x64-solaris"
-IUSE="compat +python"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+IUSE="compat +python test valgrind"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="test"
+RESTRICT="!test? ( test )"
RDEPEND="
!elibc_SunOS? (
@@ -27,8 +27,13 @@ RDEPEND="
)
python? ( ${PYTHON_DEPS} )
"
-DEPEND="${RDEPEND}"
-BDEPEND="${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
"
@@ -41,7 +46,7 @@ MULTILIB_WRAPPED_HEADERS=(
)
pkg_setup() {
- # try to turn off distcc and ccache for people that have a problem with it
+ # Try to turn off distcc and ccache for people that have a problem with it
export DISTCC_DISABLE=1
export CCACHE_DISABLE=1
@@ -58,16 +63,26 @@ src_prepare() {
sed -i "s/name = bld.pyembed_libname('pytalloc-util')/name = 'pytalloc-util'/" wscript || die
fi
- # what would you expect of waf? i won't even waste time trying.
+ 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=(
- $(usex compat --enable-talloc-compat1 '')
+ --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')
)
+
waf-utils_src_configure "${extra_opts[@]}"
}
diff --git a/sys-libs/talloc/talloc-2.4.2.ebuild b/sys-libs/talloc/talloc-2.4.2.ebuild
new file mode 100644
index 000000000000..47470a52c629
--- /dev/null
+++ b/sys-libs/talloc/talloc-2.4.2.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE="threads(+)"
+inherit waf-utils python-single-r1 multilib-minimal
+
+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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~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')
+ )
+
+ 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/tapi/Manifest b/sys-libs/tapi/Manifest
deleted file mode 100644
index cf5af5026f16..000000000000
--- a/sys-libs/tapi/Manifest
+++ /dev/null
@@ -1,5 +0,0 @@
-DIST cfe-5.0.1.src.tar.xz 11483036 BLAKE2B c4eb54cd8271b62cf7a2219db0b599b68c00b6e574d1946220efbd1633e841796e6717d6eeb35e84a6db32a731a3285b59cedeb3b1a8f3c3c502b799fdd0a720 SHA512 6619177a2ff9934fe8b15d6aa229abb8e34d0b1a75228d9efba9393daf71d6419a7256de57b31e2f9f829f71f842118556f996e86ee076f1e0a7cd394dfd31a2
-DIST clang-800.0.42.1.tar.gz 41165807 BLAKE2B 89e3ddc0268c2302f6679089648163a1b7457c3133f8f07de12c5980a66b6b7efdfa65966f5d9425ca20bd622cb1739bc009fe45edb4f0986ffd36af77a2480e SHA512 7fec6236996e4647043697f0f62d2eddb064a4604a7c64c11d2df2ff89aff95f4eb9fe1c2e604c0e276296927dd06b8a7794e0343bf0352cf65400dde40aab41
-DIST llvm-5.0.1.src.tar.xz 23428720 BLAKE2B 3db4d33df21018d17eef0042c0d8d82a8412bd5daa99cfb5405a6ec83c5774178fa76b220e8731c2a9a64dabf898aa90fe29c685327bd63a4f078e8e94a9a77e SHA512 bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b5366172c4aad46592dfd8afe372349ecf264f581463d017f9cee2d63c1cb
-DIST tapi-1.30.tar.gz 29071 BLAKE2B e5eb4f2eea6500d4f06c490c8b7f70070fe2ba31579133b92c1d162c33afb3c422c2fba1249734a5749455185a4fc3d79b1eb00820387990cc65fe0fc69ac55a SHA512 fa495da150c6b6ff9e0bf667a9a06f0b932363297b75379fd59a5c728168a3ac103a656d1a59fa1b0c0012a18c9874439237bbf2a3c26f9bdf202b4d78e31520
-DIST tapi-2.0.0.tar.gz 195080 BLAKE2B 28c31f4cb119525edb1a755895d8a3a05c9a606610fbf0c135790c0caf85a26d3b7e7fbbf856d001c26641a755e0d836f2f697a5856153d9dfc7c258e28427a1 SHA512 fc7209556ff75285a99ce64225831d53f9d959f7d6d9562cbfe91b019591860a00196c93de2258bbdaba02301af38990557b7e241ad3f66d09eb9440f4edf5ab
diff --git a/sys-libs/tapi/files/objcmetadata-800.0.42.1-standalone.patch b/sys-libs/tapi/files/objcmetadata-800.0.42.1-standalone.patch
deleted file mode 100644
index 71ca24f1beb2..000000000000
--- a/sys-libs/tapi/files/objcmetadata-800.0.42.1-standalone.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-Provide standalone cmake project file that allows compilation outside the LLVM
-source tree and installs the headers as well.
-
-Tune other CMakeLists for out-of-tree build.
-
-Provide missing isDynamic() method for Objective C properties. (Best-guess
-implementation based on
-https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html
-and llvm-objdump -m -objc-meta-data output). Does not seem to be used anywhere
-anyways - but the control flow of the code is somewhat encrypted.
-
-Adjust to some minor API differencies between Apple clang 8.0.0 and upstream
-LLVM 5.0.1.
-
---- objcmetadata-800.0.42.1/CMakeLists.txt.orig 2017-12-25 22:23:41.000000000 +0100
-+++ objcmetadata-800.0.42.1/CMakeLists.txt 2017-12-25 20:54:39.000000000 +0100
-@@ -0,0 +1,25 @@
-+cmake_minimum_required(VERSION 3.4.3)
-+project(ObjCMetadata)
-+
-+find_package(LLVM REQUIRED CONFIG)
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_CMAKE_DIR})
-+include(AddLLVM)
-+
-+include_directories(${LLVM_INCLUDE_DIRS})
-+link_directories(${LLVM_LIBRARY_DIRS})
-+add_definitions(${LLVM_DEFINITIONS})
-+set(LLVM_COMMON_LIBS Object Support Analysis Core)
-+
-+include_directories(BEFORE
-+ ${CMAKE_CURRENT_BINARY_DIR}/include
-+ ${CMAKE_CURRENT_SOURCE_DIR}/include
-+ )
-+
-+install(FILES
-+ include/llvm/${PROJECT_NAME}/ObjCBitcode.h
-+ include/llvm/${PROJECT_NAME}/ObjCMachOBinary.h
-+ include/llvm/${PROJECT_NAME}/ObjCMetadata.h
-+ DESTINATION include/llvm/${PROJECT_NAME}
-+ )
-+
-+add_subdirectory(lib/${PROJECT_NAME})
---- objcmetadata-800.0.42.1/include/llvm/ObjCMetadata/ObjCMetadata.h.orig 2017-12-25 20:09:28.000000000 +0100
-+++ objcmetadata-800.0.42.1/include/llvm/ObjCMetadata/ObjCMetadata.h 2017-12-25 20:10:11.000000000 +0100
-@@ -110,6 +110,7 @@
- // Return empty string if doesn't exists.
- Expected<std::string> getGetter() const;
- Expected<std::string> getSetter() const;
-+ Expected<bool> isDynamic() const;
- };
-
- class ObjCMethod : public ObjCInfoBase {
---- objcmetadata-800.0.42.1/lib/ObjCMetadata/ObjCMetadata.cpp.orig 2017-12-25 20:09:11.000000000 +0100
-+++ objcmetadata-800.0.42.1/lib/ObjCMetadata/ObjCMetadata.cpp 2017-12-25 20:13:33.000000000 +0100
-@@ -164,6 +164,20 @@
- return setter;
- }
-
-+Expected<bool> ObjCProperty::isDynamic() const {
-+ auto Attr = getAttribute();
-+ if (!Attr)
-+ return Attr.takeError();
-+ // Find setter attribute.
-+ SmallVector<StringRef, 4> Attrs;
-+ Attr->split(Attrs, ',');
-+ for (auto a : Attrs) {
-+ if (a == "D")
-+ return true;
-+ }
-+ return false;
-+}
-+
- Expected<StringRef> ObjCMethod::getName() const {
- return MetadataReader->getMethodName(*this);
- }
---- objcmetadata-800.0.42.1/lib/ObjCMetadata/CMakeLists.txt.orig 2017-12-25 17:29:01.000000000 +0100
-+++ objcmetadata-800.0.42.1/lib/ObjCMetadata/CMakeLists.txt 2017-12-25 20:59:31.000000000 +0100
-@@ -1,3 +1,10 @@
-+set(LLVM_LINK_COMPONENTS
-+ Object
-+ Support
-+ Analysis
-+ Core
-+)
-+
- add_llvm_library(LLVMObjCMetadata
- ObjCBitcode.cpp
- ObjCMetadata.cpp
-@@ -5,7 +12,4 @@
-
- ADDITIONAL_HEADER_DIRS
- ${LLVM_MAIN_INCLUDE_DIR}/llvm/ObjCMetadata
--
-- DEPENDS
-- intrinsics_gen
- )
---- objcmetadata-800.0.42.1/lib/ObjCMetadata/ObjCBitcode.cpp.orig 2017-12-25 17:14:29.000000000 +0100
-+++ objcmetadata-800.0.42.1/lib/ObjCMetadata/ObjCBitcode.cpp 2017-12-25 17:17:51.000000000 +0100
-@@ -20,7 +20,7 @@
- #include "llvm/IR/GlobalAlias.h"
- #include "llvm/IR/GlobalVariable.h"
- #include "llvm/IR/Operator.h"
--#include "llvm/Support/Error.h"
-+#include "llvm/Object/Error.h"
-
- #include "macho-obj.h"
-
-@@ -75,7 +75,7 @@
- Operator::getOpcode(V) == Instruction::AddrSpaceCast) {
- V = cast<Operator>(V)->getOperand(0);
- } else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) {
-- if (GA->mayBeOverridden())
-+ if (GA->isInterposable())
- return V;
- V = GA->getAliasee();
- } else if (PtrToIntOperator *PTI = dyn_cast<PtrToIntOperator>(V)) {
---- objcmetadata-800.0.42.1/lib/ObjCMetadata/ObjCMachOBinary.cpp.orig 2017-12-25 17:24:23.000000000 +0100
-+++ objcmetadata-800.0.42.1/lib/ObjCMetadata/ObjCMachOBinary.cpp 2017-12-25 17:27:15.000000000 +0100
-@@ -1262,9 +1262,9 @@
- const char *SymbolName = nullptr;
- if (reloc_found && isExtern) {
- offset = Symbol.getValue();
-- ErrorOr<StringRef> NameOrError = Symbol.getName();
-+ Expected<StringRef> NameOrError = Symbol.getName();
- if (!NameOrError) {
-- return errorOrToExpected(std::move(NameOrError));
-+ return NameOrError;
- }
- StringRef Name = *NameOrError;
- if (!Name.empty()) {
diff --git a/sys-libs/tapi/files/tapi-1.30-allow-all-clients.patch b/sys-libs/tapi/files/tapi-1.30-allow-all-clients.patch
deleted file mode 100644
index 98309132cf70..000000000000
--- a/sys-libs/tapi/files/tapi-1.30-allow-all-clients.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-libtapi is by default limited to be linked to binaries called ld only. When
-trying to link it into e.g. our ld64 we get:
-
-ld: cannot link directly with ${EPREFIX}/usr/lib/libtapi.dylib for architecture
-x86_64
-
-Drop that limitation in order to be able to use the library.
-
---- libtapi-1.30/tools/libtapi/CMakeLists.txt.orig 2017-02-12 17:35:55.000000000 +0100
-+++ libtapi-1.30/tools/libtapi/CMakeLists.txt 2017-02-12 17:36:17.000000000 +0100
-@@ -18,5 +18,5 @@
-
- set_property(TARGET libtapi APPEND_STRING
- PROPERTY
-- LINK_FLAGS " -current_version ${TAPI_VERSION_MAJOR}.${TAPI_VERSION_MINOR}.${TAPI_VERSION_PATCH} -compatibility_version 1 -allowable_client ld"
-+ LINK_FLAGS " -current_version ${TAPI_VERSION_MAJOR}.${TAPI_VERSION_MINOR}.${TAPI_VERSION_PATCH} -compatibility_version 1"
- )
diff --git a/sys-libs/tapi/files/tapi-1.30-llvm-config.patch b/sys-libs/tapi/files/tapi-1.30-llvm-config.patch
deleted file mode 100644
index ea5a462c025b..000000000000
--- a/sys-libs/tapi/files/tapi-1.30-llvm-config.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libtapi-1.30/lib/Core/Symbol.cpp.orig 2017-02-11 21:51:53.000000000 +0100
-+++ libtapi-1.30/lib/Core/Symbol.cpp 2017-02-11 21:52:00.000000000 +0100
-@@ -9,7 +9,7 @@
-
- #include "tapi/Core/Symbol.h"
- #include "tapi/Core/LLVM.h"
--#include "llvm/Config/config.h"
-+#include "llvm/Config/llvm-config.h"
- #include "llvm/Support/raw_ostream.h"
-
- #if HAVE_CXXABI_H
diff --git a/sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch b/sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch
deleted file mode 100644
index 814ca30879a0..000000000000
--- a/sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch
+++ /dev/null
@@ -1,65 +0,0 @@
---- libtapi-1.30/lib/Core/MachODylibReader.cpp.orig 2017-02-11 21:36:40.000000000 +0100
-+++ libtapi-1.30/lib/Core/MachODylibReader.cpp 2017-02-11 21:48:25.000000000 +0100
-@@ -37,7 +37,11 @@
- }
-
- auto binaryOrErr = createBinary(bufferRef);
-+#if LLVM_NEW_ERROR_API
-+ if (binaryOrErr.takeError())
-+#else
- if (binaryOrErr.getError())
-+#endif
- return FileType::Invalid;
-
- Binary &bin = *binaryOrErr.get();
-@@ -49,7 +53,11 @@
- for (auto OI = UB->begin_objects(), OE = UB->end_objects(); OI != OE; ++OI) {
- auto objOrErr = OI->getAsObjectFile();
- // Ignore archives.
-+#if LLVM_NEW_ERROR_API
-+ if (objOrErr.takeError())
-+#else
- if (objOrErr.getError())
-+#endif
- continue;
-
- auto &obj = *objOrErr.get();
-@@ -228,7 +236,11 @@
- ? SymbolFlags::WeakReferenced
- : SymbolFlags::None;
- auto symbolName = symbol.getName();
-+#if LLVM_NEW_ERROR_API
-+ if (symbolName.takeError())
-+#else
- if (symbolName.getError())
-+#endif
- continue;
-
- StringRef name;
-@@ -244,8 +256,14 @@
- file->setPath(memBuffer.getBufferIdentifier());
-
- auto binaryOrErr = createBinary(memBuffer);
-+// no way to figure this out from the headers :-(
-+#if LLVM_NEW_ERROR_API
-+ if (auto ec = binaryOrErr.takeError()) {
-+ file->setErrorCode(llvm::errorToErrorCode(std::move(ec)));
-+#else
- if (auto ec = binaryOrErr.getError()) {
- file->setErrorCode(ec);
-+#endif
- return std::move(file);
- }
-
-@@ -263,7 +281,11 @@
- auto objOrErr = OI->getAsObjectFile();
-
- // Ignore archives.
-+#if LLVM_NEW_ERROR_API
-+ if (objOrErr.takeError())
-+#else
- if (objOrErr.getError())
-+#endif
- continue;
-
- auto &object = *objOrErr.get();
diff --git a/sys-libs/tapi/files/tapi-1.30-llvm-out-of-tree.patch b/sys-libs/tapi/files/tapi-1.30-llvm-out-of-tree.patch
deleted file mode 100644
index 56386476994a..000000000000
--- a/sys-libs/tapi/files/tapi-1.30-llvm-out-of-tree.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- libtapi-1.30/CMakeLists.txt.orig 2017-02-11 21:04:56.000000000 +0100
-+++ libtapi-1.30/CMakeLists.txt 2017-02-11 21:05:12.000000000 +0100
-@@ -34,6 +34,7 @@
- ${CMAKE_CURRENT_SOURCE_DIR}/include/tapi/Version.inc.in
- ${CMAKE_CURRENT_BINARY_DIR}/include/tapi/Version.inc)
-
-+include(AddLLVM)
- macro(add_tapi_library name)
- cmake_parse_arguments(ARG
- "SHARED"
diff --git a/sys-libs/tapi/files/tapi-2.0.0-standalone.patch b/sys-libs/tapi/files/tapi-2.0.0-standalone.patch
deleted file mode 100644
index 77bc56331dfb..000000000000
--- a/sys-libs/tapi/files/tapi-2.0.0-standalone.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-Tune CMakeLists for out-of-tree build.
-
-Adjust for API discrepancies between Apple clang-8.0.0 and upstream LLVM 5.0.1.
-
-Allow all clients to link against the library, not just ld. Main reason: Our ld
-is called ld64 when we link it.
-
---- tapi-2.0.0/tools/tapi/CMakeLists.txt.orig 2017-12-25 22:36:06.620886714 +0100
-+++ tapi-2.0.0/tools/tapi/CMakeLists.txt 2017-12-25 22:41:43.867893060 +0100
-@@ -6,6 +6,12 @@
-
- target_link_libraries(tapi
- tapiDriver
-+ clangAST
-+ clangFrontend
-+ LLVMOption
-+ LLVMDemangle
-+ LLVMSupport
-+ LLVMCore
- )
-
- if (TAPI_BUILD_LIBIOSSDK)
---- tapi-2.0.0/tools/libtapi/CMakeLists.txt.orig 2017-12-25 22:26:06.816905789 +0100
-+++ tapi-2.0.0/tools/libtapi/CMakeLists.txt 2017-12-25 22:31:22.914862289 +0100
-@@ -1,4 +1,7 @@
- set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/libtapi.exports)
-+set(LLVM_LINK_COMPONENTS
-+ Support
-+ )
-
- add_tapi_library(libtapi
- SHARED
-@@ -19,5 +22,5 @@
-
- set_property(TARGET libtapi APPEND_STRING
- PROPERTY
-- LINK_FLAGS " -current_version ${TAPI_FULL_VERSION} -compatibility_version 1 -allowable_client ld"
-+ LINK_FLAGS " -current_version ${TAPI_FULL_VERSION} -compatibility_version 1"
- )
---- tapi-2.0.0/tools/tapi-run/CMakeLists.txt.orig 2017-12-26 15:12:39.605057352 +0100
-+++ tapi-2.0.0/tools/tapi-run/CMakeLists.txt 2017-12-26 15:15:53.304983942 +0100
-@@ -5,6 +5,8 @@
- target_link_libraries(tapi-run
- tapiCore
- libtapi
-+ LLVMSupport
-+ LLVMCore
- )
-
- set_property(TARGET tapi-run APPEND_STRING
---- tapi-2.0.0/CMakeLists.txt.orig 2017-12-24 15:27:56.000000000 +0100
-+++ tapi-2.0.0/CMakeLists.txt 2017-12-26 15:50:01.199506782 +0100
-@@ -4,6 +4,24 @@
- message(FATAL_ERROR "Unsupported configuration.")
- endif()
-
-+project(tapi)
-+set(PACKAGE_VENDOR Apple CACHE STRING "")
-+add_definitions(-DTAPI_BUG_REPORT_URL="https://bugs.gentoo.org/")
-+
-+find_package(LLVM REQUIRED CONFIG)
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_CMAKE_DIR})
-+include(AddLLVM)
-+
-+add_definitions(${LLVM_DEFINITIONS})
-+include_directories(${LLVM_INCLUDE_DIRS} ${OBJCMETADATA_INCLUDE_DIRS})
-+link_directories(${LLVM_LIBRARY_DIRS} ${OBJCMETADATA_LIBRARY_DIRS})
-+
-+# make tblgen happy
-+include(TableGen)
-+foreach(IPATH ${LLVM_INCLUDE_DIRS})
-+ list(APPEND LLVM_TABLEGEN_FLAGS -I ${IPATH})
-+endforeach(IPATH)
-+
- set(TAPI_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
- set(TAPI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
-
---- tapi-2.0.0/lib/Core/MachODylibReader.cpp.orig 2017-12-24 15:27:56.000000000 +0100
-+++ tapi-2.0.0/lib/Core/MachODylibReader.cpp 2017-12-25 22:15:53.075478606 +0100
-@@ -254,8 +254,7 @@
- auto arch = getArchType(H.cputype, H.cpusubtype);
- assert(arch != Architecture::unknown && "unknown architecture slice");
-
-- Error error = Error::success();
-- for (const auto &symbol : object->exports(error)) {
-+ for (const auto &symbol : object->exports()) {
- StringRef name;
- XPIKind kind;
- std::tie(name, kind) = parseSymbol(symbol.name());
-@@ -272,7 +271,7 @@
- file->addSymbol(kind, name, arch, flags);
- }
-
-- return error;
-+ return Error::success();
- }
-
- static Error readUndefinedSymbols(MachOObjectFile *object,
-@@ -309,10 +308,7 @@
- auto H = object->getHeader();
- auto arch = getArchType(H.cputype, H.cpusubtype);
-
-- auto error = Error::success();
-- MachOMetadata metadata(object, error);
-- if (error)
-- return std::move(error);
-+ MachOMetadata metadata(object);
-
- ///
- /// Classes
---- tapi-2.0.0/lib/Driver/Snapshot.cpp.orig 2017-12-24 15:27:56.000000000 +0100
-+++ tapi-2.0.0/lib/Driver/Snapshot.cpp 2017-12-26 15:49:09.864184826 +0100
-@@ -14,7 +14,7 @@
- #include "tapi/Defines.h"
- #include "clang/Frontend/FrontendOptions.h"
- #include "llvm/ADT/ArrayRef.h"
--#include "llvm/Config/config.h"
-+#include "llvm/Config/llvm-config.h"
- #include "llvm/Support/FileSystem.h"
- #include "llvm/Support/raw_ostream.h"
- #include "llvm/Support/xxhash.h"
-@@ -356,7 +356,7 @@
- }
-
- if (isCrash) {
-- outs() << "PLEASE submit a bug report to " BUG_REPORT_URL
-+ outs() << "PLEASE submit a bug report to " TAPI_BUG_REPORT_URL
- " and include the "
- "crash backtrace and snapshot.\n\n"
- "********************************************************\n\n"
---- tapi-2.0.0/lib/Driver/Options.cpp.orig 2017-12-25 22:17:40.506874748 +0100
-+++ tapi-2.0.0/lib/Driver/Options.cpp 2017-12-25 22:18:04.181989766 +0100
-@@ -1023,7 +1023,7 @@
- table->PrintHelp(
- outs(),
- (programName + " " + getNameFromTAPICommand(command)).str().c_str(),
-- toolName, /*FlagsToInclude=*/getIncludeOptionFlagMasks(command),
-+ toolName, /*FlagsToInclude=*///getIncludeOptionFlagMasks(command),
- /*FlagsToExclude=*/0, /*ShowAllAliases=*/false);
- }
-
diff --git a/sys-libs/tapi/metadata.xml b/sys-libs/tapi/metadata.xml
deleted file mode 100644
index 232d18dd1fa2..000000000000
--- a/sys-libs/tapi/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>prefix@gentoo.org</email>
- <name>Gentoo Prefix</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/tapi/tapi-1.30.ebuild b/sys-libs/tapi/tapi-1.30.ebuild
deleted file mode 100644
index 1b087540133b..000000000000
--- a/sys-libs/tapi/tapi-1.30.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-utils flag-o-matic
-
-DESCRIPTION="Text-based Application Programming Interface"
-HOMEPAGE="https://opensource.apple.com/source/tapi"
-SRC_URI="https://opensource.apple.com/tarballs/${PN}/${P}.tar.gz"
-S="${WORKDIR}/lib${P}"
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="~x64-macos"
-
-DOCS=( Readme.md )
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.30-llvm-out-of-tree.patch
- "${FILESDIR}"/${PN}-1.30-llvm-new-error-api.patch
- "${FILESDIR}"/${PN}-1.30-llvm-config.patch
- "${FILESDIR}"/${PN}-1.30-allow-all-clients.patch
-)
-
-src_configure() {
- local mycmakeargs=(
- -DCMAKE_MODULE_PATH="${EPREFIX}/usr/lib/cmake/llvm;${EPREFIX}/usr/share/llvm/cmake"
- )
-
- # poor man's configure
- [ -f "${EPREFIX}"/usr/include/llvm/Support/Error.h ] && \
- append-cxxflags -DLLVM_NEW_ERROR_API=1
-
- append-cxxflags -std=c++11
- cmake-utils_src_configure
-}
diff --git a/sys-libs/tapi/tapi-2.0.0.ebuild b/sys-libs/tapi/tapi-2.0.0.ebuild
deleted file mode 100644
index 1eb844c2cde9..000000000000
--- a/sys-libs/tapi/tapi-2.0.0.ebuild
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-
-inherit cmake-utils llvm
-
-# This is a hog: We need to carve ObjCMetadata out of Apple's clang. We also
-# need llvm-tblgen and clang-tblgen because tapi uses them to generate some
-# source. It's assumed that they're only ever needed when building LLVM and
-# clang. So they don't get installed in the system and we need to compile them
-# fresh from LLVM and clang sources. And finally we need an installed LLVM and
-# clang to build tapi against.
-
-LLVM_PV=5.0.1
-LLVM_PN=llvm
-LLVM_P=${LLVM_PN}-${LLVM_PV}
-
-CLANG_PN=cfe
-CLANG_P=${CLANG_PN}-${LLVM_PV}
-
-APPLE_LLVM_PV=800.0.42.1
-APPLE_LLVM_PN=clang
-APPLE_LLVM_P=${APPLE_LLVM_PN}-${APPLE_LLVM_PV}
-
-OBJCMD_PN=objcmetadata
-OBJCMD_P=${OBJCMD_PN}-${APPLE_LLVM_PV}
-
-DESCRIPTION="Text-based Application Programming Interface"
-HOMEPAGE="https://opensource.apple.com/source/tapi"
-SRC_URI="https://opensource.apple.com/tarballs/clang/${APPLE_LLVM_P}.tar.gz
- http://releases.llvm.org/${LLVM_PV}/${LLVM_P}.src.tar.xz
- http://releases.llvm.org/${LLVM_PV}/${CLANG_P}.src.tar.xz"
-
-if [[ ${PV} == 9999* ]] ; then
- EGIT_REPO_URI="https://github.com/ributzka/tapi.git"
- TAPI_P=${P}
- inherit git-r3
-else
- TAPI_COMMIT=b9205695b4edee91000383695be8de5ba8e0db41
- SRC_URI+=" https://github.com/ributzka/${PN}/archive/${TAPI_COMMIT}.tar.gz -> ${P}.tar.gz"
- TAPI_P=${PN}-${TAPI_COMMIT}
-fi
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="~x64-macos"
-
-DEPEND="sys-devel/llvm:=
- sys-devel/clang:="
-RDEPEND="${DEPEND}"
-
-DOCS=( Readme.md )
-
-LLVM_S="${WORKDIR}"/${LLVM_P}.src
-LLVM_BUILD="${WORKDIR}"/${LLVM_P}_build
-
-CLANG_S="${WORKDIR}"/${CLANG_P}.src
-
-APPLE_LLVM_S="${WORKDIR}/${APPLE_LLVM_P}"/src
-
-S="${WORKDIR}"/${TAPI_P}
-
-TAPI_BUILD="${WORKDIR}"/${P}_build
-
-OBJCMD_S="${WORKDIR}"/${OBJCMD_P}
-OBJCMD_BUILD="${WORKDIR}"/${OBJCMD_P}_build
-# put temporary install root into tapi build dir so that it does not end up on
-# libtapi's rpath
-OBJCMD_ROOT="${TAPI_BUILD}"/${OBJCMD_PN}_root
-
-src_prepare() {
- # carve ObjCMetadata out of llvm and make it stand on its own
- mkdir -p "${OBJCMD_S}"/{include/llvm,lib} || die
- cd ${OBJCMD_S} || die
- cp -r ${APPLE_LLVM_S}/include/llvm/ObjCMetadata include/llvm || die
- cp -r ${APPLE_LLVM_S}/lib/ObjCMetadata lib || die
- eapply "${FILESDIR}"/${OBJCMD_PN}-800.0.42.1-standalone.patch
- CMAKE_USE_DIR="${PWD}" \
- cmake-utils_src_prepare
-
- cd "${LLVM_S}" || die
- CMAKE_USE_DIR="${PWD}" \
- cmake-utils_src_prepare
-
- cd "${S}" || die
- eapply "${FILESDIR}"/${PN}-2.0.0-standalone.patch
- CMAKE_USE_DIR="${PWD}" \
- cmake-utils_src_prepare
-}
-
-src_configure() {
- # configure LLVM and clang for tablegen build
- local mycmakeargs=(
- # shared libs cause all kinds of problems and we don't need them just
- # to run tblgen a couple of times
- -DBUILD_SHARED_LIBS=OFF
- # configure less targets to speed up configuration. We don't build them
- # anyway.
- -DLLVM_TARGETS_TO_BUILD=X86
- -DLLVM_EXTERNAL_PROJECTS=clang
- -DLLVM_EXTERNAL_CLANG_SOURCE_DIR=${CLANG_S}
- )
-
- cd "${LLVM_S}" || die
- BUILD_DIR="${LLVM_BUILD}" \
- CMAKE_USE_DIR="${PWD}" \
- CMAKE_BUILD_TYPE=RelWithDebInfo \
- cmake-utils_src_configure
-
- local llvm_prefix=$(get_llvm_prefix)
-
- # configure ObjCMetadata
- local mycmakeargs=(
- # fails to compile without -std=c++11
- -DCMAKE_CXX_STANDARD=11
- # compile against currently installed LLVM
- -DLLVM_DIR="${llvm_prefix}/lib/cmake/llvm"
- # install into temporary root in work dir just so we can compile and
- # link against it. Static lib will be pulled into libtapi and tools.
- -DCMAKE_INSTALL_PREFIX="${OBJCMD_ROOT}"
- )
-
- cd "${OBJCMD_S}" || die
- BUILD_DIR="${OBJCMD_BUILD}" \
- CMAKE_USE_DIR="${PWD}" \
- cmake-utils_src_configure
-
- # configure tapi
- local mycmakeargs=(
- # fails to compile without -std=c++11
- -DCMAKE_CXX_STANDARD=11
- # compile against currently installed LLVM
- -DLLVM_DIR="${llvm_prefix}"/lib/cmake/llvm
- # use tblgens from LLVM build directory directly. They generate source
- # from description files. Therefore it shouldn't matter if they
- # match up with the installed LLVM.
- -DLLVM_TABLEGEN_EXE="${LLVM_BUILD}"/bin/llvm-tblgen
- -DCLANG_TABLEGEN_EXE="${LLVM_BUILD}"/bin/clang-tblgen
- # pull in includes and libs from ObjCMetadata's temporary install root
- -DOBJCMETADATA_INCLUDE_DIRS="${OBJCMD_ROOT}"/include
- -DOBJCMETADATA_LIBRARY_DIRS="${OBJCMD_ROOT}"/lib
- )
-
- cd "${S}" || die
- BUILD_DIR="${TAPI_BUILD}/" \
- CMAKE_USE_DIR="${PWD}" \
- cmake-utils_src_configure
-}
-
-src_compile() {
- # build LLVM and clang tablegen
- cd "${LLVM_S}" || die
- BUILD_DIR="${LLVM_BUILD}" \
- CMAKE_USE_DIR="${PWD}" \
- cmake-utils_src_compile llvm-tblgen clang-tblgen
-
- # build ObjCMetadata
- cd "${OBJCMD_S}" || die
- BUILD_DIR="${OBJCMD_BUILD}" \
- CMAKE_USE_DIR="${PWD}" \
- cmake-utils_src_compile
- # install into temporary root in work dir
- cd "${OBJCMD_BUILD}" || die
- ${CMAKE_MAKEFILE_GENERATOR} install
-
- # finally build tapi
- cd "${S}" || die
- BUILD_DIR="${TAPI_BUILD}" \
- CMAKE_USE_DIR="${PWD}" \
- cmake-utils_src_compile
-}
diff --git a/sys-libs/tdb/Manifest b/sys-libs/tdb/Manifest
index 29a2d9316c22..7ff18268d22f 100644
--- a/sys-libs/tdb/Manifest
+++ b/sys-libs/tdb/Manifest
@@ -1 +1,3 @@
-DIST tdb-1.4.5.tar.gz 729650 BLAKE2B 5d8a226cf251268d70f68759fb792628559fa3b10e7843d1a53914ea24f0ceca61fe0c3f348d704ebc8df4c56fe2365690b585b1c96cf53d63ecae1960aca58a SHA512 373b2ce5b2c68fbc28b7679f0e7531115b91ddc6a68b27acada39b995f66b508b19f24d712fc4388654199abd69857e53ebd435d1ed47e3a69ba85ff667fed56
+DIST tdb-1.4.10.tar.gz 747139 BLAKE2B e271f824acc8c691a6e88f5e5f73d0673a132134d025e84461520108b94cd7a5db587a0012ad1172270d29042f29336aab6ca59a735d611d6529f81ec3c195e9 SHA512 b5147d811617d90a025d1070abf16c42744b3fc3cac1042fbff03b1e635af2eaf9c957a7bffdb3f56b4a0c775b44f8027def9f23deb1b3ede817b95bbece2ce9
+DIST tdb-1.4.8.tar.gz 742791 BLAKE2B dc2705cb16ee59f4d5bf25602032b25fd5338caa890db19939996a40cd19c4c999f9a74786d5754dbbd1de54d818541cf56844beeb33008aaee507d5dfcdba85 SHA512 763beebe923aa04303cbb91ce5970e6bbd13546888cff75ea9ab025afff3ef88fee539ae173fc2fb7ec661b6c337b0c2da361ce3d318f51ef6627bdb3fe6ca63
+DIST tdb-1.4.9.tar.gz 746608 BLAKE2B 2cdcf636b9ef5445d48ca2aab79d4ffd137a8409b6d7b1fcdbcd28797d4bbe617f768a5ef92a14c4ae6dddfc37576f5d411cf4d67edeb4319f46a1a15ffd94ee SHA512 6b0109075826b8630f6b5a7e7ade2fcff95c5d05338340af78219422610947c520707b3e484ff13fbd40bbfffe13977976e8ddcb1be7b13e13ac78b4e3ec06c2
diff --git a/sys-libs/tdb/tdb-1.4.10.ebuild b/sys-libs/tdb/tdb-1.4.10.ebuild
new file mode 100644
index 000000000000..aaa8bb18ce55
--- /dev/null
+++ b/sys-libs/tdb/tdb-1.4.10.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE="threads(+)"
+inherit 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 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+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
+
+ 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
+}
+
+multilib_src_install() {
+ waf-utils_src_install
+ use python && python_optimize
+}
diff --git a/sys-libs/tdb/tdb-1.4.5.ebuild b/sys-libs/tdb/tdb-1.4.8.ebuild
index 79954ea15f5b..7215d9d77bb6 100644
--- a/sys-libs/tdb/tdb-1.4.5.ebuild
+++ b/sys-libs/tdb/tdb-1.4.8.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{9..12} )
PYTHON_REQ_USE="threads(+)"
inherit waf-utils multilib-minimal python-single-r1
@@ -13,18 +13,23 @@ SRC_URI="https://samba.org/ftp/tdb/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="python"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="test"
RDEPEND="
dev-libs/libbsd[${MULTILIB_USEDEP}]
- python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
- virtual/libcrypt"
-BDEPEND="${PYTHON_DEPS}
- app-text/docbook-xml-dtd:4.2"
+ python? ( ${PYTHON_DEPS} )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/libcrypt
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ app-text/docbook-xml-dtd:4.2
+"
WAF_BINARY="${S}/buildtools/bin/waf"
@@ -35,7 +40,14 @@ src_prepare() {
}
multilib_src_configure() {
- local extra_opts=()
+ 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
@@ -44,8 +56,6 @@ multilib_src_configure() {
}
multilib_src_compile() {
- # need to avoid parallel building, this looks like the sanest way with waf-utils/multiprocessing eclasses
- unset MAKEOPTS
waf-utils_src_compile
}
@@ -57,4 +67,5 @@ multilib_src_test() {
multilib_src_install() {
waf-utils_src_install
+ use python && python_optimize
}
diff --git a/sys-libs/tdb/tdb-1.4.9.ebuild b/sys-libs/tdb/tdb-1.4.9.ebuild
new file mode 100644
index 000000000000..aaa8bb18ce55
--- /dev/null
+++ b/sys-libs/tdb/tdb-1.4.9.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE="threads(+)"
+inherit 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 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+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
+
+ 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
+}
+
+multilib_src_install() {
+ waf-utils_src_install
+ use python && python_optimize
+}
diff --git a/sys-libs/tevent/Manifest b/sys-libs/tevent/Manifest
index 8453f1874082..1e65bee7c07b 100644
--- a/sys-libs/tevent/Manifest
+++ b/sys-libs/tevent/Manifest
@@ -1,2 +1,6 @@
-DIST tevent-0.10.2.tar.gz 800731 BLAKE2B 5ea6b83378b04dbe1666432db0dbd4c0df2e6b0bf5ebcc8ec4ec9bdeb834efec75c87b2019dc78c691aba6c4f6467394101febd6010f106046a1fb8848e27405 SHA512 1da8f28898f35daab515892b880d1de601062cc3e2b2570cd62e6913df17b0195a05acb7b484c628cddc0eb8b0cde893105ede3feb32bc5764e7d25684f332ba
-DIST tevent-0.11.0.tar.gz 866327 BLAKE2B 9e6e958597e21c0d228346aa102987f89bb6630a5661cef21b908735469a59e7b4f46bc4473e9c25fe636913a1eebc1f26234448c09739ad812cd3ce97bf5048 SHA512 740346b19bf290ff31b0c1b36e232021b8ad107c3ce27e0e8b1ec1a77485214b07a9b7837ba57f3650a50e4c04f530674e486b5fa4d118a1778259be63b49790
+DIST tevent-0.12.1.tar.gz 879683 BLAKE2B 51521aa26dc3ac38dcf69cdb77a7ad33fede88947e3a91cc5917fae9746951643a70615db24449437e133b575ca41d961ed63c23a0b4f1a01edf090952672032 SHA512 ab70262702d70ce00e8b3aef41930c674b04c147fdbf0006e57cfa057d82f6049ba6da4b2c2b7b53aa191dd4f0f3d55e72b0666ae8f5b6948eeb9fde1988c938
+DIST tevent-0.13.0.tar.gz 880601 BLAKE2B 4e2a2c055bac28cecae1a95b7ddab349ed780f44427e74709eca497d6242bc4f46a91878d3d253c1af4819887ce7df522fe41f88f6059ec5f6c706c7e071ee35 SHA512 7aa05c09e3c708769e31cda88b319cee3629c88c51bda559193a85d4ab32204a8b4ba11f142861dbca06b578bf54953f2aca1ad847e99995a4fc40bf08618a93
+DIST tevent-0.14.0.tar.gz 878142 BLAKE2B 8c1c2b4cb683a3ca2630181904566c3cf9d0151c7e280f86e0ce24febfc5d0a1e85757e3ad9d635205bbcbe3e0d0a060dedb3207fb4e91ea76f36246f0a2704a SHA512 5e9525b2f8f8014d1147244dcccd6cf5ac49e383c49b19480ac1256dc7ccf60705960e87b8f63348fca3f4f496861f3d307ee5e0fde8189d93a596c5e689f2b1
+DIST tevent-0.14.1.tar.gz 881979 BLAKE2B 272b7d0029061dfd172a39135d806b937ee6f5bb9eb4c9c8d68a6e5cb3d9eca01582f7ddf5a15d7f033d3322c7fd4d6e87d697f76e4d44565c8e757398a5f0f8 SHA512 0bcc87c10f84e947edad8f8c31f3923253c599b7a69a1db1c21ab292e02937ccb8bad9f0f70e27420ead687aaed1a9b3830b6daa903b8a9bd48cc035a6e5f4ec
+DIST tevent-0.15.0.tar.gz 884634 BLAKE2B 071906dc0cc199a9b550e74ca7fcd3555e54a1c48a9be2c107c498ccf2157521336c3ec63fd776e3551064e9baf1ebcf9c7ff5eb0f04375b7d714056331476aa SHA512 470cc4489255a4f122ba1d680669589ba375d4081ff46631dd56f5104202d175bfb13356820eb9108a6b768b3837b2f5d26cc7b0acc3071c4787fb070df3cbab
+DIST tevent-0.16.1.tar.gz 890010 BLAKE2B 34639cf0e63193eebdb9c3f845390685d66916c6a687f22fbe25dbe175d3279752dfea1e3567fdb2eed3bea17108b9b226039cb1218c0536fc1eb7f4e0a025ab SHA512 cda001d91728b2f28dd081e9c5f6d8ede345dcd9ce1dca04394860cd83090c15aa8dfef1c53b73e120bd17f0d95551fa9301eb4927963314556d016fe5420a39
diff --git a/sys-libs/tevent/tevent-0.10.2.ebuild b/sys-libs/tevent/tevent-0.10.2.ebuild
deleted file mode 100644
index 1d14cd94327e..000000000000
--- a/sys-libs/tevent/tevent-0.10.2.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-PYTHON_REQ_USE="threads(+)"
-inherit 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 ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux"
-IUSE="python"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="test"
-
-RDEPEND="
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- >=sys-libs/talloc-2.3.1[${MULTILIB_USEDEP}]
- python? (
- ${PYTHON_DEPS}
- sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
- )
-"
-DEPEND="${RDEPEND}
- elibc_glibc? (
- net-libs/libtirpc[${MULTILIB_USEDEP}]
- || (
- net-libs/rpcsvc-proto
- <sys-libs/glibc-2.26[rpc(+)]
- )
- )
-"
-BDEPEND="${PYTHON_DEPS}
- virtual/pkgconfig
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-pkg_setup() {
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- waf-utils_src_configure \
- --bundled-libraries=NONE \
- --builtin-libraries=NONE \
- $(multilib_native_usex python '' '--disable-python')
-}
-
-multilib_src_compile() {
- # need to avoid parallel building, this looks like the sanest way with waf-utils/multiprocessing eclasses
- unset MAKEOPTS
- 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.11.0.ebuild b/sys-libs/tevent/tevent-0.12.1.ebuild
index 4190931690f9..c10e170eb42d 100644
--- a/sys-libs/tevent/tevent-0.11.0.ebuild
+++ b/sys-libs/tevent/tevent-0.12.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{9..11} )
PYTHON_REQ_USE="threads(+)"
inherit waf-utils multilib-minimal python-single-r1
@@ -13,7 +13,7 @@ SRC_URI="https://samba.org/ftp/tevent/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux"
IUSE="python"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
@@ -21,7 +21,7 @@ RESTRICT="test"
RDEPEND="
dev-libs/libbsd[${MULTILIB_USEDEP}]
- >=sys-libs/talloc-2.3.1[${MULTILIB_USEDEP}]
+ >=sys-libs/talloc-2.3.4[${MULTILIB_USEDEP}]
python? (
${PYTHON_DEPS}
sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
@@ -45,6 +45,7 @@ WAF_BINARY="${S}/buildtools/bin/waf"
pkg_setup() {
python-single-r1_pkg_setup
+ export PYTHONHASHSEED=1
}
src_prepare() {
diff --git a/sys-libs/tevent/tevent-0.13.0.ebuild b/sys-libs/tevent/tevent-0.13.0.ebuild
new file mode 100644
index 000000000000..d13c4c06ea0b
--- /dev/null
+++ b/sys-libs/tevent/tevent-0.13.0.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE="threads(+)"
+inherit 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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux"
+IUSE="python test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="test !test? ( test )"
+
+TALLOC_VERSION="2.3.4"
+
+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"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ export PYTHONHASHSEED=1
+}
+
+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
+
+ 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
+
+ waf-utils_src_configure \
+ --bundled-libraries="${bundled_libs}" \
+ --builtin-libraries=NONE \
+ $(multilib_native_usex python '' '--disable-python')
+}
+
+multilib_src_compile() {
+ # Need to avoid parallel building, this looks like the
+ # best way with waf-utils/multiprocessing eclasses
+ unset MAKEOPTS
+ 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.14.0.ebuild b/sys-libs/tevent/tevent-0.14.0.ebuild
new file mode 100644
index 000000000000..c178820999e5
--- /dev/null
+++ b/sys-libs/tevent/tevent-0.14.0.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE="threads(+)"
+inherit 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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux"
+IUSE="python test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="test !test? ( test )"
+
+TALLOC_VERSION="2.4.0"
+
+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
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ MAKEOPTS+=" -j1"
+
+ # 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
+
+ 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.14.1.ebuild b/sys-libs/tevent/tevent-0.14.1.ebuild
new file mode 100644
index 000000000000..832834917e1d
--- /dev/null
+++ b/sys-libs/tevent/tevent-0.14.1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE="threads(+)"
+inherit 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 ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux"
+IUSE="python test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="test !test? ( test )"
+
+TALLOC_VERSION="2.4.0"
+
+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
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ MAKEOPTS+=" -j1"
+
+ # 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
+
+ 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.15.0.ebuild b/sys-libs/tevent/tevent-0.15.0.ebuild
new file mode 100644
index 000000000000..d5297a130f6f
--- /dev/null
+++ b/sys-libs/tevent/tevent-0.15.0.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="threads(+)"
+inherit 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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux"
+IUSE="python test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+TALLOC_VERSION="2.4.1"
+
+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
+
+ 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.1.ebuild b/sys-libs/tevent/tevent-0.16.1.ebuild
new file mode 100644
index 000000000000..30eeb780afc8
--- /dev/null
+++ b/sys-libs/tevent/tevent-0.16.1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="threads(+)"
+inherit 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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux"
+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
+
+ 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
index 628049e5ff6c..9ab247d9259a 100644
--- a/sys-libs/timezone-data/Manifest
+++ b/sys-libs/timezone-data/Manifest
@@ -1,4 +1,4 @@
-DIST tzcode2021a.tar.gz 262204 BLAKE2B 4072685f2344602ffcfe32a7bf92d3b0d93e38ffca842f1c07a60db5e26f1f18ab32fc7b5f155b0bdab49f8d0bfcd5b58f4a192b4d06d7d9639893e5cb596328 SHA512 bf1d53bcbfecd3b09d57a9e6d3cb49b5dc5f8e1b6674b67e7f974e1a268c2aaf13ca89a7ef12f49d0665aff782bd72685e00c22a41ca88a028da0429f972fd45
-DIST tzcode2021e.tar.gz 273644 BLAKE2B 3331477d8107fb30b2c37d3a3afb212dda7ecf53aa553ea5070537bd1a4a01bf62e70adb2fb14c025e22d272d96ee51e9e5089c5c9790682d3c43cda0ded8680 SHA512 87b0335129ea41c5f42f687f548712e5da892baa8494cecf5d34851beceecf6ae52f22104696ed187713cf9e502570eb2041e277dfd3c043c11d0253bfde685a
-DIST tzdata2021a.tar.gz 411892 BLAKE2B b8d177e90e22bd8a3fd23c9a9c19896cb245efd8e768b59ab8c63e56ab141e67331f3231e3a7c802f844375049cfd902e14e912ce677b3aea38fc0d968905e87 SHA512 7cdd762ec90ce12a30fa36b1d66d1ea82d9fa21e514e2b9c7fcbe2541514ee0fadf30843ff352c65512fb270857b51d1517b45e1232b89c6f954ba9ff1833bb3
-DIST tzdata2021e.tar.gz 422509 BLAKE2B e0e1189a1bbfb2ee641b9c4c8d00775372638d46d7aea72ff0c4bcb02b38a65eedaf89e6b272e054245c940369a50c2573e6fc720414e4ab3d45adeda8ed9c75 SHA512 c1e8d04e049157ed5d4af0868855bbd75517e3d7e1db9c41d5283ff260109de46b6fac6be94828201d093e163d868044ac2a9db2bf0aeab800e264d0c73a9119
+DIST tzcode2023d.tar.gz 298795 BLAKE2B 3e759de2e1dfe033bb98b5af5239631ef5dc33e25b6aeb95ab3e6041d5db3dd1b1cb8b210f072bc0d671117f2ad162cdcdcb3ecae97aa2d3be3bc2e809845666 SHA512 3994a5a060a7a5fffc6585f5191cf7679f9f9be44dbcee4d67d0e42c5b6020c308cb55caf8bf8d51554697665105a174cb470c8c4fc069438350f3bac725709b
+DIST tzcode2024a.tar.gz 301595 BLAKE2B f3b8d1e7735ad858d071df564a8e11ac4d252b97a5729fa6c282112ff3903f7d35897735920b4466a926ef647dc283356879134046805411c694efd3fd89b282 SHA512 46da8bfa762c7d109db93e5c060789097fc0e1e38bdad5bb8fec886ef47f138bd03b913a743cd5f7e23dc359a72bfd63e7ffc0de199d2b51e6a174361dbdc43c
+DIST tzdata2023d.tar.gz 449767 BLAKE2B b79be37a8a258745d162a575c795ee6476b4fa5f6d2f7b562d9431a238eca276a1747a983778291184fc6e40a0c1f5e6284d41290fd6d1d3bd3118bda83f426e SHA512 81832b2d738c28cecbcb3906cc07568c5ae574adc9de35b25d4bf613581c92d471d67213b4261a56f0ec02efcf211b4e298b7e1dc367c972e726b0a2e9498df4
+DIST tzdata2024a.tar.gz 451270 BLAKE2B 5ec49bbce704411a1d8b3f018b0d8f6c7de24c5600e0cb6c61a7ee29b4a49b1e502d23b40bce6584ea0aa9b66327321608cbabb994071ec4ca2b3a496aa2d621 SHA512 1f09f1b2327cc9e1afc7e9045e83ee3377918dafe1bee2f282b6991828d03b3c70a4d3a17f9207dfb1361bb25bc214a8922a756e84fa114e9ba476226db57236
diff --git a/sys-libs/timezone-data/files/timezone-data-2024a-AsiaAlmaty.patch b/sys-libs/timezone-data/files/timezone-data-2024a-AsiaAlmaty.patch
new file mode 100644
index 000000000000..994a2304f8bd
--- /dev/null
+++ b/sys-libs/timezone-data/files/timezone-data-2024a-AsiaAlmaty.patch
@@ -0,0 +1,34 @@
+https://github.com/eggert/tz/commit/59d4a1ba633f020e09765ff272120ac1a21fc028
+
+From 59d4a1ba633f020e09765ff272120ac1a21fc028 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Thu, 29 Feb 2024 23:20:23 -0800
+Subject: [PATCH] Asia/Almaty matches Asia/Tashkent from now on
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This pacifies ‘make check_now’.
+* NEWS: Mention this.
+* zonenow.tab: Remove Asia/Almaty.
+--- a/zonenow.tab
++++ b/zonenow.tab
+@@ -199,7 +199,7 @@ XX +2518+05518 Asia/Dubai Russia; Caucasus; Persian Gulf; Seychelles; Réunion
+ XX +3431+06912 Asia/Kabul Afghanistan
+ #
+ # +05
+-XX +4120+06918 Asia/Tashkent Russia; west Kazakhstan; Tajikistan; Turkmenistan; Uzbekistan; Maldives
++XX +4120+06918 Asia/Tashkent Russia; Kazakhstan; Tajikistan; Turkmenistan; Uzbekistan; Maldives
+ #
+ # +05 - PKT
+ XX +2452+06703 Asia/Karachi Pakistan ("PKT")
+@@ -215,8 +215,6 @@ XX +2743+08519 Asia/Kathmandu Nepal
+ #
+ # +06
+ XX +2343+09025 Asia/Dhaka Russia; Kyrgyzstan; Bhutan; Bangladesh; Chagos
+-# +06 until 2024-03-01; then +05
+-XX +4315+07657 Asia/Almaty Kazakhstan (except western areas)
+ #
+ # +06:30
+ XX +1647+09610 Asia/Yangon Myanmar; Cocos
+
diff --git a/sys-libs/timezone-data/metadata.xml b/sys-libs/timezone-data/metadata.xml
index 0e4c5ee4f0ad..3ff1474e992a 100644
--- a/sys-libs/timezone-data/metadata.xml
+++ b/sys-libs/timezone-data/metadata.xml
@@ -16,4 +16,7 @@
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-2021a-r1.ebuild b/sys-libs/timezone-data/timezone-data-2023d.ebuild
index 0569f80588bc..92d625f298e2 100644
--- a/sys-libs/timezone-data/timezone-data-2021a-r1.ebuild
+++ b/sys-libs/timezone-data/timezone-data-2023d.ebuild
@@ -1,28 +1,30 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=8
inherit toolchain-funcs flag-o-matic
-code_ver=${PV}
-data_ver=${PV}
+MY_CODE_VER=${PV}
+MY_DATA_VER=${PV}
DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
HOMEPAGE="https://www.iana.org/time-zones"
-SRC_URI="https://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz
- https://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz"
+SRC_URI="https://www.iana.org/time-zones/repository/releases/tzdata${MY_DATA_VER}.tar.gz
+ https://www.iana.org/time-zones/repository/releases/tzcode${MY_CODE_VER}.tar.gz"
LICENSE="BSD public-domain"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="nls leaps-timezone zic-slim"
DEPEND="nls? ( virtual/libintl )"
-RDEPEND="${DEPEND}
- !sys-libs/glibc[vanilla(+)]"
+RDEPEND="
+ ${DEPEND}
+ !sys-libs/glibc[vanilla(+)]
+"
src_unpack() {
- mkdir -p "${S}" && cd "${S}" || die
+ mkdir "${S}" && cd "${S}" || die
default
}
@@ -33,29 +35,33 @@ src_prepare() {
sed -i -e 's/check_tables check_web/check_tables/g' \
Makefile || die "Failed to disable check_web"
- tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
+ if tc-is-cross-compiler ; then
+ cp -pR "${S}" "${S}"-native || die
+ fi
}
src_configure() {
tc-export CC
- append-lfs-flags #471102
+ # bug #471102
+ append-lfs-flags
if use elibc_Darwin ; then
- append-cppflags -DSTD_INSPIRED #138251
+ # 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.
+ # 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. #154181 #578424
+ # See if an external libintl is available. bug #154181, bug #578424
local c="${T}/test"
- echo 'main(){}' > "${c}.c"
+ echo 'int main(){}' > "${c}.c" || die
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
LDLIBS+=" -lintl"
fi
@@ -71,17 +77,17 @@ _emake() {
}
src_compile() {
+ tc-export AR CC RANLIB
+
_emake \
- AR="$(tc-getAR)" \
- cc="$(tc-getCC)" \
- RANLIB="$(tc-getRANLIB)" \
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)" \
+ CC="$(tc-getBUILD_CC)" \
RANLIB="$(tc-getBUILD_RANLIB)" \
CFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}" \
LDFLAGS="${BUILD_LDFLAGS}" \
@@ -91,7 +97,7 @@ src_compile() {
}
src_test() {
- # VALIDATE_ENV is used for extended/web based tests. Punt on them.
+ # VALIDATE_ENV is used for extended/web based tests. Punt on them.
emake check VALIDATE_ENV=true
}
@@ -116,6 +122,7 @@ get_TIMEZONE() {
else
tz="FOOKABLOIE"
fi
+
[[ -z ${tz} ]] && return 1 || echo "${tz}"
}
@@ -131,21 +138,14 @@ pkg_preinst() {
# Trim the symlink by hand to avoid portage's automatic protection checks.
rm -f "${EROOT}"/usr/share/zoneinfo/posix
-
- if has_version "<=${CATEGORY}/${PN}-2015c" ; then
- elog "Support for accessing posix/ and right/ directly has been dropped to match"
- elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx."
- elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post"
- elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html"
- fi
}
configure_tz_data() {
- # make sure the /etc/localtime file does not get stale #127899
+ # 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. #511474
+ # they're managing it themselves, bug #511474
if [[ -L "${etc_lt}" ]] ; then
einfo "Assuming your ${etc_lt} symlink is what you want; skipping update."
return 0
@@ -164,7 +164,7 @@ configure_tz_data() {
local tzpath="${EROOT}/usr/share/zoneinfo/${tz}"
if [[ ! -e ${tzpath} ]]; then
- ewarn "The timezone specified in ${src} is not valid."
+ ewarn "The timezone specified in ${src} is not valid!"
return 1
fi
diff --git a/sys-libs/timezone-data/timezone-data-2021e.ebuild b/sys-libs/timezone-data/timezone-data-2024a-r1.ebuild
index 656c7f532b86..4fd0fa2b1d53 100644
--- a/sys-libs/timezone-data/timezone-data-2021e.ebuild
+++ b/sys-libs/timezone-data/timezone-data-2024a-r1.ebuild
@@ -1,28 +1,36 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=8
inherit toolchain-funcs flag-o-matic
-code_ver=${PV}
-data_ver=${PV}
+MY_CODE_VER=${PV}
+MY_DATA_VER=${PV}
DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
HOMEPAGE="https://www.iana.org/time-zones"
-SRC_URI="https://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz
- https://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz"
+SRC_URI="
+ https://www.iana.org/time-zones/repository/releases/tzdata${MY_DATA_VER}.tar.gz
+ https://www.iana.org/time-zones/repository/releases/tzcode${MY_CODE_VER}.tar.gz
+"
LICENSE="BSD public-domain"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="nls leaps-timezone zic-slim"
DEPEND="nls? ( virtual/libintl )"
-RDEPEND="${DEPEND}
- !sys-libs/glibc[vanilla(+)]"
+RDEPEND="
+ ${DEPEND}
+ !sys-libs/glibc[vanilla(+)]
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-AsiaAlmaty.patch
+)
src_unpack() {
- mkdir -p "${S}" && cd "${S}" || die
+ mkdir "${S}" && cd "${S}" || die
default
}
@@ -33,29 +41,33 @@ src_prepare() {
sed -i -e 's/check_tables check_web/check_tables/g' \
Makefile || die "Failed to disable check_web"
- tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
+ if tc-is-cross-compiler ; then
+ cp -pR "${S}" "${S}"-native || die
+ fi
}
src_configure() {
tc-export CC
- append-lfs-flags #471102
+ # bug #471102
+ append-lfs-flags
if use elibc_Darwin ; then
- append-cppflags -DSTD_INSPIRED #138251
+ # 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.
+ # 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. #154181 #578424
+ # See if an external libintl is available. bug #154181, bug #578424
local c="${T}/test"
- echo 'main(){}' > "${c}.c"
+ echo 'int main(){}' > "${c}.c" || die
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
LDLIBS+=" -lintl"
fi
@@ -71,17 +83,17 @@ _emake() {
}
src_compile() {
+ tc-export AR CC RANLIB
+
_emake \
- AR="$(tc-getAR)" \
- cc="$(tc-getCC)" \
- RANLIB="$(tc-getRANLIB)" \
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)" \
+ CC="$(tc-getBUILD_CC)" \
RANLIB="$(tc-getBUILD_RANLIB)" \
CFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}" \
LDFLAGS="${BUILD_LDFLAGS}" \
@@ -91,7 +103,7 @@ src_compile() {
}
src_test() {
- # VALIDATE_ENV is used for extended/web based tests. Punt on them.
+ # VALIDATE_ENV is used for extended/web based tests. Punt on them.
emake check VALIDATE_ENV=true
}
@@ -116,6 +128,7 @@ get_TIMEZONE() {
else
tz="FOOKABLOIE"
fi
+
[[ -z ${tz} ]] && return 1 || echo "${tz}"
}
@@ -131,21 +144,14 @@ pkg_preinst() {
# Trim the symlink by hand to avoid portage's automatic protection checks.
rm -f "${EROOT}"/usr/share/zoneinfo/posix
-
- if has_version "<=${CATEGORY}/${PN}-2015c" ; then
- elog "Support for accessing posix/ and right/ directly has been dropped to match"
- elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx."
- elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post"
- elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html"
- fi
}
configure_tz_data() {
- # make sure the /etc/localtime file does not get stale #127899
+ # 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. #511474
+ # they're managing it themselves, bug #511474
if [[ -L "${etc_lt}" ]] ; then
einfo "Assuming your ${etc_lt} symlink is what you want; skipping update."
return 0
@@ -164,7 +170,7 @@ configure_tz_data() {
local tzpath="${EROOT}/usr/share/zoneinfo/${tz}"
if [[ ! -e ${tzpath} ]]; then
- ewarn "The timezone specified in ${src} is not valid."
+ ewarn "The timezone specified in ${src} is not valid!"
return 1
fi
diff --git a/sys-libs/uid_wrapper/Manifest b/sys-libs/uid_wrapper/Manifest
index 87dce289651d..4b2f1c1e4b22 100644
--- a/sys-libs/uid_wrapper/Manifest
+++ b/sys-libs/uid_wrapper/Manifest
@@ -1,2 +1 @@
-DIST uid_wrapper-1.2.7.tar.gz 47580 BLAKE2B f33a2a29a3e61315ae48317b759898cabcfcc50f72a7fac9388b2b5791a76f66e88a6339ca45c319df102354d592d6a26c8046193b7c4d07c4e4ce3f4031672e SHA512 ed906638ded4fbd981212f38de66112e65514b618bda6b1bda85a915c00691d471859df7c8dc7915b546e5c8e107e2e07e6b3a841fcebeedc8cf4b18e5c16f1a
-DIST uid_wrapper-1.2.8.tar.gz 47864 BLAKE2B d165954b4418ee23c7564d809a3c2189fc43c91822c8e4a73bdf6ea8e1621156bf0a29097b07a4d8b31ea1d10af35c3be367c4ca8f1e13db1b430f297b47b6ea SHA512 536f353f35e84ffd350a3cd5a96ff30e7b1fd4ba455dbe34fd232ed1a14b061351110c7e0cb4376a27cbde1eda789ef93e635ffa2e9948cadc41c2f1fdcfc3b5
+DIST uid_wrapper-1.3.0.tar.gz 51126 BLAKE2B 9460d50ce7cfa613316bda38678d4918aceb048a5f8bc3d48abd4024fd67b0e6194c543c7f7092041b91b4f72d8bab79858697ee541ccef0486c3aa4cfad2506 SHA512 a66515b701882cf8ac62c6aae719eb07a46b852ecfd5274c7a1f038b066db85fbc0cdf4fff2c79e7b1e45d08622cd90884498f668fe479989e47e79ecd932095
diff --git a/sys-libs/uid_wrapper/files/uid_wrapper-1.3.0-cmocka-cmake.patch b/sys-libs/uid_wrapper/files/uid_wrapper-1.3.0-cmocka-cmake.patch
new file mode 100644
index 000000000000..ada998f5f543
--- /dev/null
+++ b/sys-libs/uid_wrapper/files/uid_wrapper-1.3.0-cmocka-cmake.patch
@@ -0,0 +1,26 @@
+https://git.samba.org/?p=uid_wrapper.git;a=commit;h=850f24c6366abda30bfd77734b90330b8809d306
+
+From 850f24c6366abda30bfd77734b90330b8809d306 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@samba.org>
+Date: Fri, 17 Feb 2023 17:51:27 +0100
+Subject: [PATCH] cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode
+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>
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -1,5 +1,9 @@
+ project(tests C)
+
++if (TARGET cmocka::cmocka)
++ set(CMOCKA_LIBRARY cmocka::cmocka)
++endif()
++
+ add_library(uwrap_fake_socket_wrapper SHARED uwrap_fake_socket_wrapper.c)
+ target_compile_options(uwrap_fake_socket_wrapper
+ PRIVATE
+--
+2.34.1
diff --git a/sys-libs/uid_wrapper/uid_wrapper-1.2.7.ebuild b/sys-libs/uid_wrapper/uid_wrapper-1.2.7.ebuild
deleted file mode 100644
index 00c61d6d09c3..000000000000
--- a/sys-libs/uid_wrapper/uid_wrapper-1.2.7.ebuild
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-inherit cmake-multilib
-
-DESCRIPTION="Wrapper to fake privilege separation"
-HOMEPAGE="https://cwrap.org/uid_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 ~ia64 ppc ppc64 sparc x86"
diff --git a/sys-libs/uid_wrapper/uid_wrapper-1.2.8.ebuild b/sys-libs/uid_wrapper/uid_wrapper-1.2.8.ebuild
deleted file mode 100644
index efd18e300af7..000000000000
--- a/sys-libs/uid_wrapper/uid_wrapper-1.2.8.ebuild
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-inherit cmake-multilib
-
-DESCRIPTION="Wrapper to fake privilege separation"
-HOMEPAGE="https://cwrap.org/uid_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 ~ia64 ppc ppc64 ~riscv sparc x86"
diff --git a/sys-libs/uid_wrapper/uid_wrapper-1.3.0.ebuild b/sys-libs/uid_wrapper/uid_wrapper-1.3.0.ebuild
new file mode 100644
index 000000000000..bd23cc44cfcf
--- /dev/null
+++ b/sys-libs/uid_wrapper/uid_wrapper-1.3.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2024 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/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 ~ia64 ~loong ppc ppc64 ~riscv sparc x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="test? ( dev-util/cmocka )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cmocka-cmake.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
index aeda00647854..7b64ea0bc919 100644
--- a/sys-libs/zlib-ng/Manifest
+++ b/sys-libs/zlib-ng/Manifest
@@ -1,2 +1 @@
-DIST zlib-ng-2.0.5.tar.gz 810110 BLAKE2B 70a7a4a4f5bcc792fcf5f41487160aa15481bc5512ddd567f59ac96ebd1b8ff7c1edb7e5887f16ee502a75fabb36caf88f0d88563a0d860679b0bfd0e0b9f12a SHA512 a643089a8189bf8bd24d679b84f07ae14932b4d88b88e94c44cca23350d6a9bbdaa411822d3651c2b0bf79f30c9f99514cc252cf9e9ab0b3a840540206466654
-DIST zlib-ng-2.0.6.tar.gz 817951 BLAKE2B 52993caadf14817e328b180d728586e1332ea04504288264934ef49441cb8b8c4a2412d4c11d1982f3764fef5e4fb7ebab442b407e57d9d5f08a5b2ed890bba9 SHA512 4888f17160d0a87a9b349704047ae0d0dc57237a10e11adae09ace957afa9743cce5191db67cb082991421fc961ce68011199621034d2369c0e7724fad58b4c5
+DIST zlib-ng-2.1.6.tar.gz 2412106 BLAKE2B 9ca16c19c2c799e68e099d44721b27dc33ad9e859a3d6572bebe3a75c618bffd78e19f0d4c0607802d1c8fa6a8f328d62f9993648a99c1d2e0e5fdcaf87a2667 SHA512 59ef586c09b9a63788475abfd6dd59ed602316b38f543f801bea802ff8bec8b55a89bee90375b8bbffa3bdebc7d92a00903f4b7c94cdc1a53a36e2e1fd71d13a
diff --git a/sys-libs/zlib-ng/zlib-ng-2.0.6.ebuild b/sys-libs/zlib-ng/zlib-ng-2.0.6.ebuild
deleted file mode 100644
index 5abbd8a2ea61..000000000000
--- a/sys-libs/zlib-ng/zlib-ng-2.0.6.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Fork of the zlib data compression library"
-HOMEPAGE="https://github.com/zlib-ng/zlib-ng"
-SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0"
-#KEYWORDS="~amd64 ~x86"
-
-CPU_USE=( cpu_flags_{x86_{avx2,sse2,ssse3,sse4a,pclmul},arm_{crc32,neon},ppc_vsx2} )
-IUSE="compat ${CPU_USE[@]} test"
-
-RESTRICT="!test? ( test )"
-
-RDEPEND="compat? ( !sys-libs/zlib )"
-
-src_configure() {
- local mycmakeargs=(
- -DZLIB_COMPAT="$(usex compat)"
- -DZLIB_ENABLE_TESTS="$(usex test)"
- # Unaligned access is controversial and undefined behaviour
- # Let's keep it off for now
- # https://github.com/gentoo/gentoo/pull/17167
- -DWITH_UNALIGNED="OFF"
- )
-
- # The intrinsics options are all defined conditionally, so we need
- # to enable them on/off per-arch here for now.
- if use amd64 || use x86 ; then
- mycmakeargs+=(
- -DWITH_AVX2=$(usex cpu_flags_x86_avx2)
- -DWITH_SSE2=$(usex cpu_flags_x86_sse2)
- -DWITH_SSSE3=$(usex cpu_flags_x86_ssse3)
- -DWITH_SSE4=$(usex cpu_flags_x86_sse4a)
- -DWITH_PCLMULQDQ=$(usex cpu_flags_x86_pclmul)
- )
- fi
-
- if use arm || use arm64 ; then
- mycmakeargs+=(
- -DWITH_ACLE=$(usex cpu_flags_arm_crc32)
- -DWITH_NEON=$(usex cpu_flags_arm_neon)
- )
- fi
-
- if use ppc || use ppc64 ; then
- # The POWER8 support is VSX which was introduced
- # VSX2 was introduced with POWER8, so use that as a proxy for it
- mycmakeargs+=(
- -DWITH_POWER8=$(usex cpu_flags_ppc_vsx2)
- )
- fi
-
- # TODO: There's no s390x USE_EXPAND yet
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
-
- if use compat ; then
- ewarn "zlib-ng is experimental and replacing the system zlib is dangerous"
- ewarn "Please be careful!"
- ewarn
- ewarn "The following link explains the guarantees (and what is NOT guaranteed):"
- ewarn "https://github.com/zlib-ng/zlib-ng/blob/2.0.x/PORTING.md"
- fi
-}
diff --git a/sys-libs/zlib-ng/zlib-ng-2.0.5.ebuild b/sys-libs/zlib-ng/zlib-ng-2.1.6-r1.ebuild
index 35316b265096..d9bf5f443d25 100644
--- a/sys-libs/zlib-ng/zlib-ng-2.0.5.ebuild
+++ b/sys-libs/zlib-ng/zlib-ng-2.1.6-r1.ebuild
@@ -1,9 +1,12 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit cmake
+# 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"
@@ -11,34 +14,49 @@ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="ZLIB"
SLOT="0"
-#KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~sparc ~x86"
-CPU_USE=( cpu_flags_{x86_{avx2,sse2,ssse3,sse4a,pclmul},arm_{crc32,neon},ppc_vsx2} )
-IUSE="compat ${CPU_USE[@]} test"
+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 )"
-RDEPEND="compat? ( !sys-libs/zlib )"
+DEPEND="
+ test? ( dev-cpp/gtest )
+"
+RDEPEND="
+ compat? ( !sys-libs/zlib )
+"
-src_configure() {
+multilib_src_configure() {
local mycmakeargs=(
- -DZLIB_COMPAT="$(usex compat)"
- -DZLIB_ENABLE_TESTS="$(usex test)"
+ -DZLIB_COMPAT=$(usex compat)
+ -DZLIB_ENABLE_TESTS=$(usex test)
+ -DWITH_GTEST=$(usex test)
+
# Unaligned access is controversial and undefined behaviour
# Let's keep it off for now
# https://github.com/gentoo/gentoo/pull/17167
- -DWITH_UNALIGNED="OFF"
+ -DWITH_UNALIGNED=OFF
)
# 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_SSE4=$(usex cpu_flags_x86_sse4a)
+ -DWITH_SSE42=$(usex cpu_flags_x86_sse4_2)
-DWITH_PCLMULQDQ=$(usex cpu_flags_x86_pclmul)
+ -DWITH_VPCLMULQDQ=$(usex cpu_flags_x86_vpclmulqdq)
)
fi
@@ -53,18 +71,16 @@ src_configure() {
# 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
- # TODO: There's no s390x USE_EXPAND yet
-
cmake_src_configure
}
-src_install() {
- 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!"
diff --git a/sys-libs/zlib/Manifest b/sys-libs/zlib/Manifest
index 9a8e50982b8b..74c4bb0f8222 100644
--- a/sys-libs/zlib/Manifest
+++ b/sys-libs/zlib/Manifest
@@ -1,3 +1,4 @@
-DIST zlib-1.2.11-cygwin-gzopen_w.patch 1170 BLAKE2B fe351436716634bd823da8c2811d332327d335d450d89bee85d7713b09dd454fe6aee264b044a41bf3be603aa36d67943ba6c7d8b46470e180e9b639728b5274 SHA512 14cc63a17fbf6afb6c8a8dd0b92df9807b48e0faf09c88f952083f10716ae62be8de2a0e1424b77fb538605b88898b381160521f2872afdda59e12bd27535c5a
-DIST zlib-1.2.11.tar.gz 607698 BLAKE2B 6bfc4bca5dcadba8a0d4121a2b3ed0bfe440c261003521862c8e6381f1a6f0a72d3fc037351d30afd7ef321e8e8d2ec817c046ac749f2ca0c97fbdc2f7e840b7 SHA512 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae
-DIST zlib-1.2.7-cygwin-minizip.patch 2626 BLAKE2B 885f1fda877c0b783618b163702fb46126b7db572767cd4edb86bd92db1f432c887ef1724e70c8319c26886368dba3a962af5284ec0875c20ec8ad2245fd100a SHA512 e372f1e06311e843eca2092e182c41abb009b5e9880b60292d708e4bc0de5a9e4c43d49b25b0c09df4784bc46a1254472bc5cdbdd8d6c762a9f6a145a555bfe7
+DIST zlib-1.3.1.tar.xz 1305740 BLAKE2B 42d109223801a493de6d52e7343403d7fc3234a6ca816425fe41ac9c18019b01b93841acd28a235e99f2256a6a17f93624e96b2ddb58d588c8190a6bedb82910 SHA512 1e8e70b362d64a233591906a1f50b59001db04ca14aaffad522198b04680be501736e7d536b4191e2f99767e7001ca486cd802362cca2be05d5d409b83ea732d
+DIST zlib-1.3.1.tar.xz.asc 235 BLAKE2B b135336ef55a0c4b8e219e760bbe04bad082c405246ce51a2b373c3dfba0b05cb1e6f539363972f4cabd8290be1db1fdb2fc47fb562c6c612a08d9393065f75b SHA512 d181e9772a8139b3b2f3f42b994a65a966101db35eb46b5c84021c5eb0cc3b4511eb5e9172c509483bd9f7015794b15cfca78ed0959bd91e8216dc12c1c6e668
+DIST zlib-1.3.tar.xz 1295740 BLAKE2B 5fe0f32339267348a313f23a21e9588bdb180b7415be303c85f5f169444d019e5f176ef7322f6e64297c360acc2a6041c50e2f66d1860e5c392d8970990f176a SHA512 3868ac4da5842dd36c9dad794930675b9082ce15cbd099ddb79c0f6bd20a24aa8f33a123f378f26fe0ae02d91f31f2994dccaac565cedeaffed7b315e6ded2a2
+DIST zlib-1.3.tar.xz.asc 235 BLAKE2B 5fe6ce952699a19e848d0a6e6c3622f934340068fdcd29afb35c74f3c8ae66d04de644800d10b38c743bb2f4852ba28f1a97313cb0e6e6f9b804cbca5289ebbb SHA512 8f3ce5c21938d6abc7e121d2939648a0ce2dc01a8ab4eb001d44eb159935dd0b4f5b5e371b3ecfc0ceb23689e2cefe002065968908503cde15b1bba08aff9db6
diff --git a/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch b/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
new file mode 100644
index 000000000000..1ab5b2f5dc81
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
@@ -0,0 +1,88 @@
+From 4232e67ee1440634af8209c7022dfc64cf862819 Mon Sep 17 00:00:00 2001
+From: Adrian Ratiu <adrian.ratiu@collabora.com>
+Date: Mon, 17 Jan 2022 10:49:58 +0200
+Subject: [PATCH v3] configure: fix AR/RANLIB/NM detection
+
+Taken from zlib-devel ML:
+https://madler.net/pipermail/zlib-devel_madler.net/2022-January/003322.html
+
+Bug: https://bugs.gentoo.org/831628
+
+Scenarios where ${CROSS_PREFIX}ar & co are set but not desired
+are possible, for example in ChromiumOS we use the GNU binutils
+tools & GCC to build glibc but LLVM/Clang is used for the rest
+of the system.
+
+This allows $AR/$RANLIB/$NM to override default CROSS_PREFIX
+tools so they can be set to llvm-ar/ranlib/nm.
+
+Suggested-by: Manoj Gupta <manojgupta@chromium.org>
+Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
+---
+
+Changes in v3:
+ * Whitespace style fixes
+ * Fixed top level variable tests (eg -z AR -> -z $AR)
+ * Review and testing as part of Gentoo PR:
+ https://github.com/gentoo/gentoo/pull/23888
+Changes in v2:
+ * Fixed a typo in the "unset NM" case
+---
+ configure | 38 ++++++++++++++++++++++----------------
+ 1 file changed, 22 insertions(+), 16 deletions(-)
+
+diff --git a/configure b/configure
+index e974d1f..045c616 100755
+--- a/configure
++++ b/configure
+@@ -46,25 +46,31 @@ VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.
+ VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h`
+
+ # establish commands for library building
+-if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- AR=${AR-"${CROSS_PREFIX}ar"}
+- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
+-else
+- AR=${AR-"ar"}
+- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
++if [ -z "$AR" ]; then
++ if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
++ AR=${AR-"${CROSS_PREFIX}ar"}
++ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
++ else
++ AR="ar"
++ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
++ fi
+ fi
+ ARFLAGS=${ARFLAGS-"rc"}
+-if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
+- test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
+-else
+- RANLIB=${RANLIB-"ranlib"}
++if [ -z "$RANLIB" ]; then
++ if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
++ RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
++ test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
++ else
++ RANLIB="ranlib"
++ fi
+ fi
+-if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- NM=${NM-"${CROSS_PREFIX}nm"}
+- test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
+-else
+- NM=${NM-"nm"}
++if [ -z "$NM" ]; then
++ if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
++ NM=${NM-"${CROSS_PREFIX}nm"}
++ test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
++ else
++ NM="nm"
++ fi
+ fi
+
+ # set defaults before processing command line options
+--
+2.35.0
+
diff --git a/sys-libs/zlib/files/zlib-1.2.11-fix-deflateParams-usage.patch b/sys-libs/zlib/files/zlib-1.2.11-fix-deflateParams-usage.patch
deleted file mode 100644
index 18764849b945..000000000000
--- a/sys-libs/zlib/files/zlib-1.2.11-fix-deflateParams-usage.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From f9694097dd69354b03cb8af959094c7f260db0a1 Mon Sep 17 00:00:00 2001
-From: Mark Adler <madler@alumni.caltech.edu>
-Date: Mon, 16 Jan 2017 09:49:35 -0800
-Subject: [PATCH] Permit a deflateParams() parameter change as soon as
- possible.
-
-This commit allows a parameter change even if the input data has
-not all been compressed and copied to the application output
-buffer, so long as all of the input data has been compressed to
-the internal pending output buffer. This also allows an immediate
-deflateParams change so long as there have been no deflate calls
-since initialization or reset.
----
- deflate.c | 6 +++---
- zlib.h | 11 ++++++-----
- 2 files changed, 9 insertions(+), 8 deletions(-)
-
-diff --git a/deflate.c b/deflate.c
-index b63311a5..20bda4f6 100644
---- a/deflate.c
-+++ b/deflate.c
-@@ -494,7 +494,7 @@ int ZEXPORT deflateResetKeep (strm)
- s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
- #endif
- adler32(0L, Z_NULL, 0);
-- s->last_flush = Z_NO_FLUSH;
-+ s->last_flush = -2;
-
- _tr_init(s);
-
-@@ -587,12 +587,12 @@ int ZEXPORT deflateParams(strm, level, strategy)
- func = configuration_table[s->level].func;
-
- if ((strategy != s->strategy || func != configuration_table[level].func) &&
-- s->high_water) {
-+ s->last_flush != -2) {
- /* Flush the last buffer: */
- int err = deflate(strm, Z_BLOCK);
- if (err == Z_STREAM_ERROR)
- return err;
-- if (strm->avail_out == 0)
-+ if (strm->avail_in || (s->strstart - s->block_start) + s->lookahead)
- return Z_BUF_ERROR;
- }
- if (s->level != level) {
-diff --git a/zlib.h b/zlib.h
-index 5daf4f28..577d81e3 100644
---- a/zlib.h
-+++ b/zlib.h
-@@ -712,11 +712,12 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
- used to switch between compression and straight copy of the input data, or
- to switch to a different kind of input data requiring a different strategy.
- If the compression approach (which is a function of the level) or the
-- strategy is changed, and if any input has been consumed in a previous
-- deflate() call, then the input available so far is compressed with the old
-- level and strategy using deflate(strm, Z_BLOCK). There are three approaches
-- for the compression levels 0, 1..3, and 4..9 respectively. The new level
-- and strategy will take effect at the next call of deflate().
-+ strategy is changed, and if there have been any deflate() calls since the
-+ state was initialized or reset, then the input available so far is
-+ compressed with the old level and strategy using deflate(strm, Z_BLOCK).
-+ There are three approaches for the compression levels 0, 1..3, and 4..9
-+ respectively. The new level and strategy will take effect at the next call
-+ of deflate().
-
- If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
- not have enough output space to complete, then the parameter change will not
diff --git a/sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch b/sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch
new file mode 100644
index 000000000000..ecb5acecbb33
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch
@@ -0,0 +1,40 @@
+https://bugs.gentoo.org/916484
+https://github.com/madler/zlib/pull/843
+https://github.com/madler/zlib/commit/73331a6a0481067628f065ffe87bb1d8f787d10c
+
+From 73331a6a0481067628f065ffe87bb1d8f787d10c Mon Sep 17 00:00:00 2001
+From: Hans Wennborg <hans@chromium.org>
+Date: Fri, 18 Aug 2023 11:05:33 +0200
+Subject: [PATCH] Reject overflows of zip header fields in minizip.
+
+This checks the lengths of the file name, extra field, and comment
+that would be put in the zip headers, and rejects them if they are
+too long. They are each limited to 65535 bytes in length by the zip
+format. This also avoids possible buffer overflows if the provided
+fields are too long.
+---
+ contrib/minizip/zip.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c
+index 3d3d4cadd..0446109b2 100644
+--- a/contrib/minizip/zip.c
++++ b/contrib/minizip/zip.c
+@@ -1043,6 +1043,17 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c
+ return ZIP_PARAMERROR;
+ #endif
+
++ // The filename and comment length must fit in 16 bits.
++ if ((filename!=NULL) && (strlen(filename)>0xffff))
++ return ZIP_PARAMERROR;
++ if ((comment!=NULL) && (strlen(comment)>0xffff))
++ return ZIP_PARAMERROR;
++ // The extra field length must fit in 16 bits. If the member also requires
++ // a Zip64 extra block, that will also need to fit within that 16-bit
++ // length, but that will be checked for later.
++ if ((size_extrafield_local>0xffff) || (size_extrafield_global>0xffff))
++ return ZIP_PARAMERROR;
++
+ zi = (zip64_internal*)file;
+
+ if (zi->in_opened_file_inzip == 1)
diff --git a/sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch b/sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
new file mode 100644
index 000000000000..b5a1b4de2c47
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
@@ -0,0 +1,59 @@
+https://bugs.gentoo.org/879883
+https://github.com/madler/zlib/issues/751
+
+From 2ad2713e6cb9166dcede9a020f6913b8189ff0c6 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 23 Nov 2022 04:17:16 +0000
+Subject: [PATCH] Revert "Turn off RWX segment warnings on sparc systems."
+
+This breaks building on sparc with older binutils.
+
+This reverts commit 29fd715fd0bdaffee21e2d2d37be8c5a6ac67ee4.
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -22,7 +22,7 @@ CFLAGS=-O
+
+ SFLAGS=-O
+ LDFLAGS=
+-TEST_LDFLAGS=$(LDFLAGS) -L. libz.a
++TEST_LDFLAGS=-L. libz.a
+ LDSHARED=$(CC)
+ CPP=$(CC) -E
+
+@@ -288,10 +288,10 @@ minigzip$(EXE): minigzip.o $(STATICLIB)
+ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
+
+ examplesh$(EXE): example.o $(SHAREDLIBV)
+- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(SHAREDLIBV)
++ $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
+
+ minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
+- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(SHAREDLIBV)
++ $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
+
+ example64$(EXE): example64.o $(STATICLIB)
+ $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
+--- a/configure
++++ b/configure
+@@ -33,10 +33,7 @@ fi
+ # set command prefix for cross-compilation
+ if [ -n "${CHOST}" ]; then
+ uname=${CHOST}
+- mname=${CHOST}
+ CROSS_PREFIX="${CHOST}-"
+-else
+- mname=`(uname -a || echo unknown) 2>/dev/null`
+ fi
+
+ # destination name for static library
+@@ -223,10 +220,6 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
+ fi
+ case "$uname" in
+ Linux* | linux* | *-linux* | GNU | GNU/* | solaris*)
+- case "$mname" in
+- *sparc*)
+- LDFLAGS="${LDFLAGS} -Wl,--no-warn-rwx-segments" ;;
+- esac
+ LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;;
+ *BSD | *bsd* | DragonFly)
+ LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"}
diff --git a/sys-libs/zlib/files/zlib-1.2.13-use-LDFLAGS-in-configure.patch b/sys-libs/zlib/files/zlib-1.2.13-use-LDFLAGS-in-configure.patch
new file mode 100644
index 000000000000..9f2b240334e8
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.13-use-LDFLAGS-in-configure.patch
@@ -0,0 +1,72 @@
+https://github.com/madler/zlib/pull/599
+
+Rebased version of:
+
+From 37c9730ba474d274f4cc6a974943eef95087b9f6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 8 Mar 2022 22:38:47 -0800
+Subject: [PATCH] configure: Pass LDFLAGS to link tests
+
+LDFLAGS can contain critical flags without which linking wont succeed
+therefore ensure that all configure tests involving link time checks are
+using LDFLAGS on compiler commandline along with CFLAGS to ensure the
+tests perform correctly. Without this some tests may fail resulting in
+wrong confgure result, ending in miscompiling the package
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/configure
++++ b/configure
+@@ -436,7 +436,7 @@ if test $shared -eq 1; then
+ echo Checking for shared library support... | tee -a configure.log
+ # we must test in two steps (cc then ld), required at least on SunOS 4.x
+ if try $CC -w -c $SFLAGS $test.c &&
+- try $LDSHARED $SFLAGS -o $test$shared_ext $test.o; then
++ try $LDSHARED $SFLAGS $LDFLAGS -o $test$shared_ext $test.o; then
+ echo Building shared library $SHAREDLIBV with $CC. | tee -a configure.log
+ elif test -z "$old_cc" -a -z "$old_cflags"; then
+ echo No shared library support. | tee -a configure.log
+@@ -498,7 +498,7 @@ int main(void) {
+ }
+ EOF
+ fi
+- if try $CC $CFLAGS -o $test $test.c; then
++ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
+ sizet=`./$test`
+ echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log
+ CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}"
+@@ -532,7 +532,7 @@ int main(void) {
+ return 0;
+ }
+ EOF
+- if try $CC $CFLAGS -o $test $test.c; then
++ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
+ echo "Checking for fseeko... Yes." | tee -a configure.log
+ else
+ CFLAGS="${CFLAGS} -DNO_FSEEKO"
+@@ -549,7 +549,7 @@ cat > $test.c <<EOF
+ #include <errno.h>
+ int main() { return strlen(strerror(errno)); }
+ EOF
+-if try $CC $CFLAGS -o $test $test.c; then
++if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
+ echo "Checking for strerror... Yes." | tee -a configure.log
+ else
+ CFLAGS="${CFLAGS} -DNO_STRERROR"
+@@ -656,7 +656,7 @@ int main()
+ return (mytest("Hello%d\n", 1));
+ }
+ EOF
+- if try $CC $CFLAGS -o $test $test.c; then
++ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
+ echo "Checking for vsnprintf() in stdio.h... Yes." | tee -a configure.log
+
+ echo >> configure.log
+@@ -746,7 +746,7 @@ int main()
+ }
+ EOF
+
+- if try $CC $CFLAGS -o $test $test.c; then
++ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
+ echo "Checking for snprintf() in stdio.h... Yes." | tee -a configure.log
+
+ echo >> configure.log
diff --git a/sys-libs/zlib/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
new file mode 100644
index 000000000000..5bfb8006c4bb
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.3.1-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
@@ -0,0 +1,17 @@
+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
new file mode 100644
index 000000000000..e1e5cf4b9196
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-RANLIB-NM-detection.patch
@@ -0,0 +1,79 @@
+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
new file mode 100644
index 000000000000..4506e753ca2e
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-libtool-on-darwin.patch
@@ -0,0 +1,22 @@
+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
new file mode 100644
index 000000000000..2b1d70f7b6f6
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.3.1-use-LDFLAGS-in-configure.patch
@@ -0,0 +1,74 @@
+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/zlib-1.2.11-r4.ebuild b/sys-libs/zlib/zlib-1.2.11-r4.ebuild
deleted file mode 100644
index bc2fe9834ee2..000000000000
--- a/sys-libs/zlib/zlib-1.2.11-r4.ebuild
+++ /dev/null
@@ -1,167 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-AUTOTOOLS_AUTO_DEPEND="no"
-inherit autotools multilib-minimal usr-ldscript
-
-CYGWINPATCHES=(
- "https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.11-gzopen_w.patch -> ${PN}-1.2.11-cygwin-gzopen_w.patch"
- "https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.7-minizip-cygwin.patch -> ${PN}-1.2.7-cygwin-minizip.patch"
-)
-
-DESCRIPTION="Standard (de)compression library"
-HOMEPAGE="https://zlib.net/"
-SRC_URI="https://zlib.net/${P}.tar.gz
- http://www.gzip.org/zlib/${P}.tar.gz
- http://www.zlib.net/current/beta/${P}.tar.gz
- elibc_Cygwin? ( ${CYGWINPATCHES[*]} )"
-
-LICENSE="ZLIB"
-SLOT="0/1" # subslot = SONAME
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="minizip static-libs"
-
-BDEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )"
-# See #309623 for libxml2
-RDEPEND="
- !<dev-libs/libxml2-2.7.7
- !sys-libs/zlib-ng[compat]
-"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.2.11-fix-deflateParams-usage.patch
- "${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch #658536
-)
-
-src_prepare() {
- default
-
- if use elibc_Cygwin ; then
- local p
- for p in "${CYGWINPATCHES[@]}" ; do
- # Strip out the "... -> " from the array
- eapply -p2 "${DISTDIR}/${p#*> }"
- done
- fi
-
- if use minizip ; then
- cd contrib/minizip || die
- eautoreconf
- fi
-
- case ${CHOST} in
- *-cygwin*)
- # do not use _wopen, is a mingw symbol only
- sed -i -e '/define WIDECHAR/d' "${S}"/gzguts.h || die
- # zlib1.dll is the mingw name, need cygz.dll
- # cygz.dll is loaded by toolchain, put into subdir
- sed -i -e 's|zlib1.dll|win32/cygz.dll|' win32/Makefile.gcc || die
- ;;
- esac
-
- case ${CHOST} in
- *-mingw*|mingw*|*-cygwin*)
- # uses preconfigured Makefile rather than configure script
- multilib_copy_sources
- ;;
- esac
-}
-
-echoit() { echo "$@"; "$@"; }
-
-multilib_src_configure() {
- case ${CHOST} in
- *-mingw*|mingw*|*-cygwin*)
- ;;
- *)
- local uname=$("${EPREFIX}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) #347167
- local myconf=(
- --shared
- --prefix="${EPREFIX}/usr"
- --libdir="${EPREFIX}/usr/$(get_libdir)"
- ${uname:+--uname=${uname}}
- )
- # not an autoconf script, so can't use econf
- echoit "${S}"/configure "${myconf[@]}" || die
- ;;
- 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*|*-cygwin*)
- 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
-}
-
-sed_macros() {
- # clean up namespace a little #383179
- # we do it here so we only have to tweak 2 files
- sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die
-}
-
-multilib_src_install() {
- case ${CHOST} in
- *-mingw*|mingw*|*-cygwin*)
- 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 #620136
- insinto /usr/$(get_libdir)/pkgconfig
- doins zlib.pc
- ;;
-
- *)
- emake install DESTDIR="${D}" LDCONFIG=:
- gen_usr_ldscript -a z
- ;;
- esac
- sed_macros "${ED}"/usr/include/*.h
-
- if use minizip ; then
- emake -C contrib/minizip install DESTDIR="${D}"
- sed_macros "${ED}"/usr/include/minizip/*.h
- fi
-
- if use minizip; then
- # This might not exist if slibtool is used.
- # https://bugs.gentoo.org/816756
- rm -f "${ED}"/usr/$(get_libdir)/libminizip.la || die
- fi
-
- if ! use static-libs ; then
- # https://bugs.gentoo.org/419645
- rm "${ED}"/usr/$(get_libdir)/libz.a || die
- fi
-}
-
-multilib_src_install_all() {
- dodoc FAQ README ChangeLog doc/*.txt
- use minizip && dodoc contrib/minizip/*.txt
-}
diff --git a/sys-libs/zlib/zlib-1.3-r4.ebuild b/sys-libs/zlib/zlib-1.3-r4.ebuild
new file mode 100644
index 000000000000..22c5713a4520
--- /dev/null
+++ b/sys-libs/zlib/zlib-1.3-r4.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Worth keeping an eye on 'develop' branch upstream for possible backports.
+AUTOTOOLS_AUTO_DEPEND="no"
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/madler.asc
+inherit autotools edo multilib-minimal flag-o-matic verify-sig
+
+DESCRIPTION="Standard (de)compression library"
+HOMEPAGE="https://zlib.net/"
+SRC_URI="
+ https://zlib.net/${P}.tar.xz
+ https://zlib.net/fossils/${P}.tar.xz
+ https://zlib.net/current/beta/${P}.tar.xz
+ https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz
+ verify-sig? (
+ https://zlib.net/${P}.tar.xz.asc
+ https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz.asc
+ )
+"
+
+LICENSE="ZLIB"
+SLOT="0/1" # subslot = SONAME
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="minizip static-libs"
+
+RDEPEND="!sys-libs/zlib-ng[compat]"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ minizip? ( ${AUTOTOOLS_DEPEND} )
+ verify-sig? ( sec-keys/openpgp-keys-madler )
+"
+
+PATCHES=(
+ # Don't install unexpected & unused crypt.h header (which would clash with other pkgs)
+ # Pending upstream. bug #658536
+ "${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch
+
+ # Respect AR, RANLIB, NM during build. Pending upstream. bug #831628
+ "${FILESDIR}"/${PN}-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
+
+ # Respect LDFLAGS during configure tests. Pending upstream
+ "${FILESDIR}"/${PN}-1.2.13-use-LDFLAGS-in-configure.patch
+
+ # Fix building on sparc with older binutils, we pass it in ebuild instead
+ "${FILESDIR}"/${PN}-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
+
+ # CVE-2023-45853 (bug #916484)
+ "${FILESDIR}"/${PN}-1.2.13-CVE-2023-45853.patch
+)
+
+src_prepare() {
+ default
+
+ if use minizip ; then
+ cd contrib/minizip || die
+ eautoreconf
+ fi
+
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ # Uses preconfigured Makefile rather than configure script
+ multilib_copy_sources
+
+ ;;
+ esac
+}
+
+multilib_src_configure() {
+ # We pass manually instead of relying on the configure script/makefile
+ # because it would pass it even for older binutils.
+ use sparc && append-flags $(test-flags-CCLD -Wl,--no-warn-rwx-segments)
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ ;;
+
+ *)
+ # bug #347167
+ local uname=$("${BROOT}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3)
+
+ local myconf=(
+ --shared
+ --prefix="${EPREFIX}/usr"
+ --libdir="${EPREFIX}/usr/$(get_libdir)"
+ ${uname:+--uname=${uname}}
+ )
+
+ # Not an autoconf script, so can't use econf
+ edo "${S}"/configure "${myconf[@]}"
+
+ ;;
+ esac
+
+ if use minizip ; then
+ local minizipdir="contrib/minizip"
+ mkdir -p "${BUILD_DIR}/${minizipdir}" || die
+
+ cd ${minizipdir} || die
+ ECONF_SOURCE="${S}/${minizipdir}" econf $(use_enable static-libs static)
+ fi
+}
+
+multilib_src_compile() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
+ sed \
+ -e 's|@prefix@|'"${EPREFIX}"'/usr|g' \
+ -e 's|@exec_prefix@|${prefix}|g' \
+ -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@includedir@|${prefix}/include|g' \
+ -e 's|@VERSION@|'${PV}'|g' \
+ zlib.pc.in > zlib.pc || die
+ ;;
+
+ *)
+ emake
+
+ ;;
+ esac
+
+ use minizip && emake -C contrib/minizip
+}
+
+multilib_src_install() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc install \
+ BINARY_PATH="${ED}/usr/bin" \
+ LIBRARY_PATH="${ED}/usr/$(get_libdir)" \
+ INCLUDE_PATH="${ED}/usr/include" \
+ SHARED_MODE=1
+
+ # Overwrites zlib.pc created from win32/Makefile.gcc, bug #620136
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins zlib.pc
+
+ ;;
+
+ *)
+ emake install DESTDIR="${D}" LDCONFIG=:
+
+ ;;
+ esac
+
+ if use minizip ; then
+ emake -C contrib/minizip install DESTDIR="${D}"
+
+ # This might not exist if slibtool is used.
+ # bug #816756
+ rm -f "${ED}"/usr/$(get_libdir)/libminizip.la || die
+ fi
+
+ if ! use static-libs ; then
+ # bug #419645
+ rm "${ED}"/usr/$(get_libdir)/libz.a || die
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc FAQ README ChangeLog doc/*.txt
+
+ if use minizip ; then
+ dodoc contrib/minizip/*.txt
+ doman contrib/minizip/*.1
+ fi
+}
diff --git a/sys-libs/zlib/zlib-1.3.1-r1.ebuild b/sys-libs/zlib/zlib-1.3.1-r1.ebuild
new file mode 100644
index 000000000000..d328fd643286
--- /dev/null
+++ b/sys-libs/zlib/zlib-1.3.1-r1.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Worth keeping an eye on 'develop' branch upstream for possible backports.
+AUTOTOOLS_AUTO_DEPEND="no"
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/madler.asc
+inherit autotools edo multilib-minimal flag-o-matic verify-sig
+
+DESCRIPTION="Standard (de)compression library"
+HOMEPAGE="https://zlib.net/"
+SRC_URI="
+ https://zlib.net/${P}.tar.xz
+ https://zlib.net/fossils/${P}.tar.xz
+ https://zlib.net/current/beta/${P}.tar.xz
+ https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz
+ verify-sig? (
+ https://zlib.net/${P}.tar.xz.asc
+ https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz.asc
+ )
+"
+
+LICENSE="ZLIB"
+SLOT="0/1" # subslot = SONAME
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="minizip static-libs"
+
+RDEPEND="!sys-libs/zlib-ng[compat]"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ minizip? ( ${AUTOTOOLS_DEPEND} )
+ verify-sig? ( sec-keys/openpgp-keys-madler )
+"
+
+PATCHES=(
+ # Don't install unexpected & unused crypt.h header (which would clash with other pkgs)
+ # Pending upstream. bug #658536
+ "${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch
+
+ # Respect AR, RANLIB, NM during build. Pending upstream. bug #831628
+ "${FILESDIR}"/${PN}-1.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
+}
+
+multilib_src_configure() {
+ # We pass manually instead of relying on the configure script/makefile
+ # because it would pass it even for older binutils.
+ use sparc && append-flags $(test-flags-CCLD -Wl,--no-warn-rwx-segments)
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ ;;
+
+ *)
+ # bug #347167
+ local uname=$("${BROOT}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3)
+
+ local myconf=(
+ --shared
+ --prefix="${EPREFIX}/usr"
+ --libdir="${EPREFIX}/usr/$(get_libdir)"
+ ${uname:+--uname=${uname}}
+ )
+
+ # Not an autoconf script, so can't use econf
+ edo "${S}"/configure "${myconf[@]}"
+
+ ;;
+ esac
+
+ if use minizip ; then
+ local minizipdir="contrib/minizip"
+ mkdir -p "${BUILD_DIR}/${minizipdir}" || die
+
+ cd ${minizipdir} || die
+ ECONF_SOURCE="${S}/${minizipdir}" econf $(use_enable static-libs static)
+ fi
+}
+
+multilib_src_compile() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
+ sed \
+ -e 's|@prefix@|'"${EPREFIX}"'/usr|g' \
+ -e 's|@exec_prefix@|${prefix}|g' \
+ -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@includedir@|${prefix}/include|g' \
+ -e 's|@VERSION@|'${PV}'|g' \
+ zlib.pc.in > zlib.pc || die
+ ;;
+
+ *)
+ emake
+
+ ;;
+ esac
+
+ use minizip && emake -C contrib/minizip
+}
+
+multilib_src_install() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc install \
+ BINARY_PATH="${ED}/usr/bin" \
+ LIBRARY_PATH="${ED}/usr/$(get_libdir)" \
+ INCLUDE_PATH="${ED}/usr/include" \
+ SHARED_MODE=1
+
+ # Overwrites zlib.pc created from win32/Makefile.gcc, bug #620136
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins zlib.pc
+
+ ;;
+
+ *)
+ emake install DESTDIR="${D}" LDCONFIG=:
+
+ ;;
+ esac
+
+ if use minizip ; then
+ emake -C contrib/minizip install DESTDIR="${D}"
+
+ # This might not exist if slibtool is used.
+ # bug #816756
+ rm -f "${ED}"/usr/$(get_libdir)/libminizip.la || die
+ fi
+
+ if ! use static-libs ; then
+ # bug #419645
+ rm "${ED}"/usr/$(get_libdir)/libz.a || die
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc FAQ README ChangeLog doc/*.txt
+
+ if use minizip ; then
+ dodoc contrib/minizip/*.txt
+ doman contrib/minizip/*.1
+ fi
+}