summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/argp-standalone/Manifest2
-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.ebuild42
-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)22
-rw-r--r--sys-libs/argp-standalone/metadata.xml7
-rw-r--r--sys-libs/basu/Manifest2
-rw-r--r--sys-libs/basu/basu-0.2.0-r1.ebuild43
-rw-r--r--sys-libs/basu/basu-0.2.0.ebuild41
-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/0001-basu-0.2.0-meson-add-libcap-option.patch39
-rw-r--r--sys-libs/basu/files/0002-basu-0.2.0-meson-convert-audit-option-to-feature-object.patch49
-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.xml18
-rw-r--r--sys-libs/binutils-libs/Manifest22
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild14
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild (renamed from sys-libs/binutils-libs/binutils-libs-2.33.1-r1.ebuild)42
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild (renamed from sys-libs/binutils-libs/binutils-libs-2.35.ebuild)29
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.37_p1-r2.ebuild137
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild155
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.39-r5.ebuild155
-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/binutils-libs/files/binutils-libs-2.35.1-cet.patch103
-rw-r--r--sys-libs/binutils-libs/metadata.xml25
-rw-r--r--sys-libs/blocksruntime/blocksruntime-0_pre20171027-r2.ebuild (renamed from sys-libs/blocksruntime/blocksruntime-0_pre20171027-r1.ebuild)8
-rw-r--r--sys-libs/blocksruntime/metadata.xml6
-rw-r--r--sys-libs/compiler-rt-sanitizers/Manifest16
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.ebuild146
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.1.ebuild148
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0.9999.ebuild148
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc1.ebuild148
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc2.ebuild148
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0.9999.ebuild148
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.7.ebuild224
-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.ebuild220
-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.ebuild217
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0_pre20240410.ebuild217
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0_pre20240420.ebuild217
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.ebuild158
-rw-r--r--sys-libs/compiler-rt-sanitizers/metadata.xml31
-rw-r--r--sys-libs/compiler-rt/Manifest18
-rw-r--r--sys-libs/compiler-rt/compiler-rt-10.0.0.ebuild110
-rw-r--r--sys-libs/compiler-rt/compiler-rt-10.0.1.ebuild106
-rw-r--r--sys-libs/compiler-rt/compiler-rt-11.0.0.9999.ebuild106
-rw-r--r--sys-libs/compiler-rt/compiler-rt-11.0.0_rc1.ebuild106
-rw-r--r--sys-libs/compiler-rt/compiler-rt-11.0.0_rc2.ebuild106
-rw-r--r--sys-libs/compiler-rt/compiler-rt-12.0.0.9999.ebuild106
-rw-r--r--sys-libs/compiler-rt/compiler-rt-15.0.7.ebuild149
-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.ebuild176
-rw-r--r--sys-libs/compiler-rt/compiler-rt-17.0.6.ebuild177
-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/compiler-rt-9.0.1.ebuild110
-rw-r--r--sys-libs/compiler-rt/metadata.xml7
-rw-r--r--sys-libs/cracklib/Manifest3
-rw-r--r--sys-libs/cracklib/cracklib-2.9.11.ebuild130
-rw-r--r--sys-libs/cracklib/cracklib-2.9.6-r2.ebuild112
-rw-r--r--sys-libs/cracklib/cracklib-2.9.7.ebuild104
-rw-r--r--sys-libs/cracklib/files/cracklib-2.9.6-CVE-2016-6318.patch108
-rw-r--r--sys-libs/cracklib/files/cracklib-2.9.6-fix-long-word-bufferoverflow.patch43
-rw-r--r--sys-libs/cracklib/metadata.xml2
-rw-r--r--sys-libs/csu/Manifest1
-rw-r--r--sys-libs/csu/csu-79.ebuild44
-rw-r--r--sys-libs/csu/csu-85-r1.ebuild11
-rw-r--r--sys-libs/csu/metadata.xml2
-rw-r--r--sys-libs/cygwin-crypt/Manifest1
-rw-r--r--sys-libs/cygwin-crypt/cygwin-crypt-1.4.ebuild41
-rw-r--r--sys-libs/cygwin-crypt/metadata.xml13
-rw-r--r--sys-libs/darwin-libc-headers/Manifest34
-rw-r--r--sys-libs/darwin-libc-headers/darwin-libc-headers-1158.50.2-r4.ebuild156
-rw-r--r--sys-libs/darwin-libc-headers/darwin-libc-headers-1244.50.9-r4.ebuild156
-rw-r--r--sys-libs/darwin-libc-headers/darwin-libc-headers-1272.250.1-r4.ebuild155
-rw-r--r--sys-libs/darwin-libc-headers/metadata.xml15
-rw-r--r--sys-libs/db/Manifest37
-rw-r--r--sys-libs/db/db-1.85-r4.ebuild56
-rw-r--r--sys-libs/db/db-18.1.32.ebuild247
-rw-r--r--sys-libs/db/db-18.1.40.ebuild244
-rw-r--r--sys-libs/db/db-3.2.9_p2-r1.ebuild196
-rw-r--r--sys-libs/db/db-4.2.52_p5-r3.ebuild185
-rw-r--r--sys-libs/db/db-4.3.29_p1-r3.ebuild184
-rw-r--r--sys-libs/db/db-4.4.20_p4-r3.ebuild178
-rw-r--r--sys-libs/db/db-4.5.20_p2-r3.ebuild190
-rw-r--r--sys-libs/db/db-4.6.21_p4-r2.ebuild179
-rw-r--r--sys-libs/db/db-4.8.30-r8.ebuild (renamed from sys-libs/db/db-4.8.30-r3.ebuild)83
-rw-r--r--sys-libs/db/db-4.8.30-r9.ebuild (renamed from sys-libs/db/db-4.7.25_p4-r2.ebuild)151
-rw-r--r--sys-libs/db/db-5.3.28-r10.ebuild (renamed from sys-libs/db/db-5.3.28-r4.ebuild)73
-rw-r--r--sys-libs/db/db-5.3.28-r9.ebuild (renamed from sys-libs/db/db-5.3.28-r2.ebuild)189
-rw-r--r--sys-libs/db/db-6.0.35-r4.ebuild (renamed from sys-libs/db/db-5.1.29-r2.ebuild)143
-rw-r--r--sys-libs/db/db-6.0.35-r5.ebuild (renamed from sys-libs/db/db-6.0.35-r2.ebuild)70
-rw-r--r--sys-libs/db/db-6.1.38.ebuild244
-rw-r--r--sys-libs/db/db-6.2.38.ebuild244
-rw-r--r--sys-libs/db/files/db-1.85-gentoo-paths.patch29
-rw-r--r--sys-libs/db/files/db-18.1.25-sqlite-configure-path.patch11
-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-3.2.9-fix-dep-link.patch26
-rw-r--r--sys-libs/db/files/db-3.2.9-gcc43.patch16
-rw-r--r--sys-libs/db/files/db-4.0.14-fix-dep-link.patch38
-rw-r--r--sys-libs/db/files/db-4.2-jni-check-prefix-first.patch30
-rw-r--r--sys-libs/db/files/db-4.2-libtool.patch20
-rw-r--r--sys-libs/db/files/db-4.2-listen-to-java-options.patch10
-rw-r--r--sys-libs/db/files/db-4.2.52_p2-TXN.patch68
-rw-r--r--sys-libs/db/files/db-4.3-libtool.patch47
-rw-r--r--sys-libs/db/files/db-4.3.27-fix-dep-link.patch38
-rw-r--r--sys-libs/db/files/db-4.4-libtool.patch47
-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/db/metadata.xml2
-rw-r--r--sys-libs/e2fsprogs-libs/Manifest2
-rw-r--r--sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.5.ebuild93
-rw-r--r--sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.6.ebuild93
-rw-r--r--sys-libs/e2fsprogs-libs/files/e2fsprogs-libs-1.42.13-fix-build-cflags.patch13
-rw-r--r--sys-libs/e2fsprogs-libs/metadata.xml12
-rw-r--r--sys-libs/efivar/Manifest2
-rw-r--r--sys-libs/efivar/efivar-37.ebuild38
-rw-r--r--sys-libs/efivar/efivar-38.ebuild75
-rw-r--r--sys-libs/efivar/files/efivar-38-64bit-off_t.patch46
-rw-r--r--sys-libs/efivar/files/efivar-38-Makefile-dep.patch33
-rw-r--r--sys-libs/efivar/files/efivar-38-binutils-2.36.patch30
-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.patch60
-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/efivar/files/efivar-38-march-native.patch37
-rw-r--r--sys-libs/efivar/metadata.xml2
-rw-r--r--sys-libs/fortify-headers/Manifest3
-rw-r--r--sys-libs/fortify-headers/fortify-headers-0.6.ebuild28
-rw-r--r--sys-libs/fortify-headers/fortify-headers-0.7.ebuild28
-rw-r--r--sys-libs/fortify-headers/fortify-headers-1.1.ebuild36
-rw-r--r--sys-libs/fortify-headers/fortify-headers-9999.ebuild42
-rw-r--r--sys-libs/fortify-headers/metadata.xml5
-rw-r--r--sys-libs/freeipmi/Manifest5
-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.5.7.ebuild91
-rw-r--r--sys-libs/freeipmi/freeipmi-1.6.10-r1.ebuild (renamed from sys-libs/freeipmi/freeipmi-1.6.5.ebuild)31
-rw-r--r--sys-libs/freeipmi/freeipmi-1.6.11.ebuild (renamed from sys-libs/freeipmi/freeipmi-1.6.6.ebuild)38
-rw-r--r--sys-libs/freeipmi/metadata.xml9
-rw-r--r--sys-libs/fts-standalone/Manifest1
-rw-r--r--sys-libs/fts-standalone/fts-standalone-0.2-r1.ebuild26
-rw-r--r--sys-libs/fts-standalone/fts-standalone-1.2.7.ebuild16
-rw-r--r--sys-libs/fts-standalone/metadata.xml4
-rw-r--r--sys-libs/gdbm/Manifest8
-rw-r--r--sys-libs/gdbm/files/gdbm-1.13-fix-a-typo-in-gdbm.h.patch21
-rw-r--r--sys-libs/gdbm/files/gdbm-1.13-fix-build-with-enable-gdbm-export.patch57
-rw-r--r--sys-libs/gdbm/files/gdbm-1.17-fix-gdbmsync.patch11
-rw-r--r--sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch40
-rw-r--r--sys-libs/gdbm/gdbm-1.13-r2.ebuild71
-rw-r--r--sys-libs/gdbm/gdbm-1.14.1.ebuild67
-rw-r--r--sys-libs/gdbm/gdbm-1.17.ebuild50
-rw-r--r--sys-libs/gdbm/gdbm-1.18.1.ebuild50
-rw-r--r--sys-libs/gdbm/gdbm-1.18.ebuild48
-rw-r--r--sys-libs/gdbm/gdbm-1.23.ebuild (renamed from sys-libs/gdbm/gdbm-1.18.1-r1.ebuild)28
-rw-r--r--sys-libs/gdbm/metadata.xml20
-rw-r--r--sys-libs/glibc/Manifest30
-rw-r--r--sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch15
-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/host.conf-11
-rw-r--r--sys-libs/glibc/glibc-2.19-r3.ebuild (renamed from sys-libs/glibc/glibc-2.19-r2.ebuild)29
-rw-r--r--sys-libs/glibc/glibc-2.25-r11.ebuild170
-rw-r--r--sys-libs/glibc/glibc-2.30-r8.ebuild1465
-rw-r--r--sys-libs/glibc/glibc-2.31-r7.ebuild25
-rw-r--r--sys-libs/glibc/glibc-2.32-r8.ebuild (renamed from sys-libs/glibc/glibc-2.32-r1.ebuild)77
-rw-r--r--sys-libs/glibc/glibc-2.33-r14.ebuild (renamed from sys-libs/glibc/glibc-2.31-r6.ebuild)418
-rw-r--r--sys-libs/glibc/glibc-2.34-r14.ebuild (renamed from sys-libs/glibc/glibc-2.32.ebuild)459
-rw-r--r--sys-libs/glibc/glibc-2.35-r11.ebuild (renamed from sys-libs/glibc/glibc-2.30-r9.ebuild)627
-rw-r--r--sys-libs/glibc/glibc-2.36-r8.ebuild1665
-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.ebuild802
-rw-r--r--sys-libs/glibc/metadata.xml49
-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.ebuild (renamed from sys-libs/gpm/gpm-1.20.7-r2.ebuild)65
-rw-r--r--sys-libs/gpm/gpm-1.20.7-r6.ebuild115
-rw-r--r--sys-libs/gpm/metadata.xml13
-rw-r--r--sys-libs/gwenhywfar/Manifest2
-rw-r--r--sys-libs/gwenhywfar/gwenhywfar-5.1.2.ebuild116
-rw-r--r--sys-libs/gwenhywfar/gwenhywfar-5.10.1.ebuild80
-rw-r--r--sys-libs/gwenhywfar/metadata.xml10
-rw-r--r--sys-libs/kpmcore/Manifest3
-rw-r--r--sys-libs/kpmcore/kpmcore-23.08.5.ebuild (renamed from sys-libs/kpmcore/kpmcore-4.1.0.ebuild)32
-rw-r--r--sys-libs/kpmcore/kpmcore-24.02.2.ebuild31
-rw-r--r--sys-libs/kpmcore/metadata.xml5
-rw-r--r--sys-libs/ldb/Manifest10
-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.4.4.ebuild (renamed from sys-libs/ldb/ldb-2.1.4-r1.ebuild)59
-rw-r--r--sys-libs/ldb/ldb-2.5.2.ebuild (renamed from sys-libs/ldb/ldb-2.0.12-r1.ebuild)59
-rw-r--r--sys-libs/ldb/ldb-2.5.3.ebuild (renamed from sys-libs/ldb/ldb-2.2.0-r1.ebuild)66
-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.xml5
-rw-r--r--sys-libs/libaal/libaal-1.0.7-r2.ebuild (renamed from sys-libs/libaal/libaal-1.0.7-r1.ebuild)15
-rw-r--r--sys-libs/libaal/metadata.xml7
-rw-r--r--sys-libs/libapparmor/Manifest4
-rw-r--r--sys-libs/libapparmor/files/libapparmor-2.10-symbol_visibility.patch13
-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-2.13.4.ebuild)45
-rw-r--r--sys-libs/libapparmor/libapparmor-3.0.8.ebuild115
-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.xml6
-rw-r--r--sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild12
-rw-r--r--sys-libs/libavc1394/metadata.xml2
-rw-r--r--sys-libs/libblockdev/Manifest7
-rw-r--r--sys-libs/libblockdev/files/libblockdev-2.23-avoid_bashisms.patch41
-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-9999.ebuild)56
-rw-r--r--sys-libs/libblockdev/libblockdev-2.29.ebuild (renamed from sys-libs/libblockdev/libblockdev-2.23-r1.ebuild)49
-rw-r--r--sys-libs/libblockdev/libblockdev-3.0.3.ebuild (renamed from sys-libs/libblockdev/libblockdev-2.24.ebuild)79
-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.xml39
-rw-r--r--sys-libs/libcap-ng/Manifest6
-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.7.10.ebuild89
-rw-r--r--sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild109
-rw-r--r--sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild (renamed from sys-libs/libcap-ng/libcap-ng-0.8.ebuild)62
-rw-r--r--sys-libs/libcap-ng/libcap-ng-0.8.4.ebuild (renamed from sys-libs/libcap-ng/libcap-ng-0.7.11.ebuild)53
-rw-r--r--sys-libs/libcap-ng/metadata.xml21
-rw-r--r--sys-libs/libcap/Manifest6
-rw-r--r--sys-libs/libcap/files/libcap-2.21-include.patch10
-rw-r--r--sys-libs/libcap/files/libcap-2.25-build-system-fixes.patch153
-rw-r--r--sys-libs/libcap/files/libcap-2.26-no-perl.patch61
-rw-r--r--sys-libs/libcap/files/libcap-2.38-no_perl.patch71
-rw-r--r--sys-libs/libcap/files/libcap-2.39-build-system-fixes.patch212
-rw-r--r--sys-libs/libcap/files/libcap-2.42-build-system-fixes.patch200
-rw-r--r--sys-libs/libcap/files/libcap-2.62-ignore-RAISE_SETFCAP-install-failures.patch (renamed from sys-libs/libcap/files/libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch)16
-rw-r--r--sys-libs/libcap/libcap-2.26-r2.ebuild82
-rw-r--r--sys-libs/libcap/libcap-2.27.ebuild82
-rw-r--r--sys-libs/libcap/libcap-2.69-r1.ebuild (renamed from sys-libs/libcap/libcap-2.43.ebuild)59
-rw-r--r--sys-libs/libcap/libcap-2.69.ebuild (renamed from sys-libs/libcap/libcap-2.42.ebuild)59
-rw-r--r--sys-libs/libcap/libcap-9999.ebuild (renamed from sys-libs/libcap/libcap-2.41.ebuild)59
-rw-r--r--sys-libs/libcap/metadata.xml19
-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/libchipcard/metadata.xml2
-rw-r--r--sys-libs/libcxx/Manifest17
-rw-r--r--sys-libs/libcxx/files/libcxx-3.9-cmake-link-flags.patch23
-rw-r--r--sys-libs/libcxx/libcxx-10.0.0.ebuild200
-rw-r--r--sys-libs/libcxx/libcxx-10.0.1.ebuild197
-rw-r--r--sys-libs/libcxx/libcxx-11.0.0.9999.ebuild197
-rw-r--r--sys-libs/libcxx/libcxx-11.0.0_rc1.ebuild197
-rw-r--r--sys-libs/libcxx/libcxx-11.0.0_rc2.ebuild197
-rw-r--r--sys-libs/libcxx/libcxx-12.0.0.9999.ebuild197
-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/libcxx-9.0.1.ebuild205
-rw-r--r--sys-libs/libcxx/metadata.xml13
-rw-r--r--sys-libs/libcxxabi/Manifest15
-rw-r--r--sys-libs/libcxxabi/libcxxabi-10.0.0.ebuild119
-rw-r--r--sys-libs/libcxxabi/libcxxabi-10.0.1.ebuild115
-rw-r--r--sys-libs/libcxxabi/libcxxabi-11.0.0.9999.ebuild116
-rw-r--r--sys-libs/libcxxabi/libcxxabi-11.0.0_rc1.ebuild116
-rw-r--r--sys-libs/libcxxabi/libcxxabi-11.0.0_rc2.ebuild116
-rw-r--r--sys-libs/libcxxabi/libcxxabi-12.0.0.9999.ebuild116
-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/libcxxabi-9.0.1.ebuild119
-rw-r--r--sys-libs/libcxxabi/metadata.xml8
-rw-r--r--sys-libs/libfaketime/Manifest6
-rw-r--r--sys-libs/libfaketime/files/libfaketime-0.9.8-Treat-unknown-clock_ids-like-CLOCK_REALTIME.patch35
-rw-r--r--sys-libs/libfaketime/libfaketime-0.9.10.ebuild (renamed from sys-libs/libfaketime/libfaketime-0.9.6-r2.ebuild)34
-rw-r--r--sys-libs/libfaketime/libfaketime-0.9.6-r4.ebuild (renamed from sys-libs/libfaketime/libfaketime-0.9.7.ebuild)14
-rw-r--r--sys-libs/libfaketime/libfaketime-0.9.9.ebuild (renamed from sys-libs/libfaketime/libfaketime-0.9.8.ebuild)12
-rw-r--r--sys-libs/libfaketime/metadata.xml6
-rw-r--r--sys-libs/libhugetlbfs/Manifest2
-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.22.ebuild159
-rw-r--r--sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild160
-rw-r--r--sys-libs/libhugetlbfs/metadata.xml12
-rw-r--r--sys-libs/libhx/Manifest4
-rw-r--r--sys-libs/libhx/libhx-3.22-r1.ebuild40
-rw-r--r--sys-libs/libhx/libhx-3.24-r1.ebuild (renamed from sys-libs/libhx/libhx-3.24.ebuild)7
-rw-r--r--sys-libs/libhx/libhx-3.25.ebuild39
-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/libhx/metadata.xml5
-rw-r--r--sys-libs/libieee1284/libieee1284-0.2.11-r4.ebuild48
-rw-r--r--sys-libs/libieee1284/libieee1284-0.2.11-r5.ebuild48
-rw-r--r--sys-libs/libieee1284/libieee1284-0.2.11-r6.ebuild48
-rw-r--r--sys-libs/libieee1284/libieee1284-0.2.11-r8.ebuild (renamed from sys-libs/libieee1284/libieee1284-0.2.11-r7.ebuild)8
-rw-r--r--sys-libs/libieee1284/metadata.xml2
-rw-r--r--sys-libs/libixp/metadata.xml2
-rw-r--r--sys-libs/libkudzu/Manifest1
-rw-r--r--sys-libs/libkudzu/files/kudzu-1.2.57.1-sbusfix.patch72
-rw-r--r--sys-libs/libkudzu/files/kudzu-1.2.57.1-sparc-keyboard.patch195
-rw-r--r--sys-libs/libkudzu/libkudzu-1.2.57.1.ebuild63
-rw-r--r--sys-libs/libkudzu/metadata.xml8
-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/libnih/Manifest1
-rw-r--r--sys-libs/libnih/files/libnih-1.0.3-expat-2.2.5.patch15
-rw-r--r--sys-libs/libnih/files/libnih-1.0.3-fno-common.patch11
-rw-r--r--sys-libs/libnih/files/libnih-1.0.3-glibc-2.24.patch57
-rw-r--r--sys-libs/libnih/files/libnih-1.0.3-optional-dbus.patch40
-rw-r--r--sys-libs/libnih/files/libnih-1.0.3-pkg-config.patch24
-rw-r--r--sys-libs/libnih/files/libnih-1.0.3-signal-race.patch44
-rw-r--r--sys-libs/libnih/libnih-1.0.3-r3.ebuild49
-rw-r--r--sys-libs/libnih/libnih-1.0.3-r4.ebuild55
-rw-r--r--sys-libs/libnih/metadata.xml8
-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/Manifest16
-rw-r--r--sys-libs/libomp/libomp-10.0.0.ebuild106
-rw-r--r--sys-libs/libomp/libomp-11.0.0.9999.ebuild104
-rw-r--r--sys-libs/libomp/libomp-11.0.0_rc1.ebuild104
-rw-r--r--sys-libs/libomp/libomp-11.0.0_rc2.ebuild104
-rw-r--r--sys-libs/libomp/libomp-12.0.0.9999.ebuild104
-rw-r--r--sys-libs/libomp/libomp-15.0.7-r6.ebuild (renamed from sys-libs/libomp/libomp-10.0.1.ebuild)83
-rw-r--r--sys-libs/libomp/libomp-16.0.6.ebuild151
-rw-r--r--sys-libs/libomp/libomp-17.0.6.ebuild153
-rw-r--r--sys-libs/libomp/libomp-18.1.4.ebuild161
-rw-r--r--sys-libs/libomp/libomp-19.0.0.9999.ebuild160
-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/libomp-9.0.1.ebuild106
-rw-r--r--sys-libs/libomp/metadata.xml13
-rw-r--r--sys-libs/libosinfo/Manifest4
-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.8.0-r1.ebuild)33
-rw-r--r--sys-libs/libosinfo/libosinfo-1.6.0.ebuild58
-rw-r--r--sys-libs/libosinfo/metadata.xml13
-rw-r--r--sys-libs/libraw1394/libraw1394-2.1.2-r1.ebuild12
-rw-r--r--sys-libs/libraw1394/metadata.xml2
-rw-r--r--sys-libs/librtas/Manifest1
-rw-r--r--sys-libs/librtas/files/librtas-2.0.2-musl.patch30
-rw-r--r--sys-libs/librtas/librtas-2.0.2-r2.ebuild34
-rw-r--r--sys-libs/librtas/librtas-2.0.2.ebuild22
-rw-r--r--sys-libs/librtas/librtas-2.0.3.ebuild (renamed from sys-libs/librtas/librtas-2.0.2-r1.ebuild)12
-rw-r--r--sys-libs/librtas/metadata.xml8
-rw-r--r--sys-libs/libseccomp/Manifest6
-rw-r--r--sys-libs/libseccomp/files/libseccomp-2.5.3-skip-valgrind.patch13
-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/files/libseccomp-python-shared.patch25
-rw-r--r--sys-libs/libseccomp/libseccomp-2.4.3.ebuild41
-rw-r--r--sys-libs/libseccomp/libseccomp-2.4.4.ebuild41
-rw-r--r--sys-libs/libseccomp/libseccomp-2.5.0.ebuild85
-rw-r--r--sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild124
-rw-r--r--sys-libs/libseccomp/libseccomp-2.5.5.ebuild111
-rw-r--r--sys-libs/libseccomp/libseccomp-9999.ebuild69
-rw-r--r--sys-libs/libseccomp/metadata.xml6
-rw-r--r--sys-libs/libselinux/Manifest5
-rw-r--r--sys-libs/libselinux/files/0001-libselinux-Use-Python-distutils-to-install-SELinux-p.patch205
-rw-r--r--sys-libs/libselinux/libselinux-2.9-r1.ebuild157
-rw-r--r--sys-libs/libselinux/libselinux-3.5-r1.ebuild (renamed from sys-libs/libselinux/libselinux-3.1.ebuild)68
-rw-r--r--sys-libs/libselinux/libselinux-3.6-r1.ebuild (renamed from sys-libs/libselinux/libselinux-3.0.ebuild)70
-rw-r--r--sys-libs/libselinux/libselinux-9999.ebuild68
-rw-r--r--sys-libs/libselinux/metadata.xml5
-rw-r--r--sys-libs/libsemanage/Manifest6
-rw-r--r--sys-libs/libsemanage/libsemanage-3.0.ebuild135
-rw-r--r--sys-libs/libsemanage/libsemanage-3.4-r1.ebuild (renamed from sys-libs/libsemanage/libsemanage-3.1.ebuild)42
-rw-r--r--sys-libs/libsemanage/libsemanage-3.5.ebuild (renamed from sys-libs/libsemanage/libsemanage-3.0-r1.ebuild)50
-rw-r--r--sys-libs/libsemanage/libsemanage-3.6.ebuild (renamed from sys-libs/libsemanage/libsemanage-2.9.ebuild)67
-rw-r--r--sys-libs/libsemanage/libsemanage-9999.ebuild42
-rw-r--r--sys-libs/libsemanage/metadata.xml3
-rw-r--r--sys-libs/libsepol/Manifest5
-rw-r--r--sys-libs/libsepol/libsepol-3.0.ebuild55
-rw-r--r--sys-libs/libsepol/libsepol-3.5.ebuild (renamed from sys-libs/libsepol/libsepol-2.9.ebuild)25
-rw-r--r--sys-libs/libsepol/libsepol-3.6.ebuild (renamed from sys-libs/libsepol/libsepol-3.1.ebuild)23
-rw-r--r--sys-libs/libsepol/libsepol-9999.ebuild23
-rw-r--r--sys-libs/libsepol/metadata.xml2
-rw-r--r--sys-libs/libservicelog/Manifest1
-rw-r--r--sys-libs/libservicelog/libservicelog-1.1.19.ebuild38
-rw-r--r--sys-libs/libservicelog/metadata.xml6
-rw-r--r--sys-libs/libsmbios/files/libsmbios-2.4.3-avoid_bashisms.patch84
-rw-r--r--sys-libs/libsmbios/files/libsmbios-2.4.3-insecure_rpaths.patch13
-rw-r--r--sys-libs/libsmbios/files/libsmbios-2.4.3-python-deprecations.patch33
-rw-r--r--sys-libs/libsmbios/libsmbios-2.4.3-r1.ebuild (renamed from sys-libs/libsmbios/libsmbios-2.4.3.ebuild)37
-rw-r--r--sys-libs/libsmbios/metadata.xml26
-rw-r--r--sys-libs/libstatgrab/Manifest3
-rw-r--r--sys-libs/libstatgrab/files/libstatgrab-0.91-tinfo.patch43
-rw-r--r--sys-libs/libstatgrab/libstatgrab-0.92.1.ebuild (renamed from sys-libs/libstatgrab/libstatgrab-0.91.ebuild)33
-rw-r--r--sys-libs/libstatgrab/libstatgrab-0.92.ebuild43
-rw-r--r--sys-libs/libstatgrab/metadata.xml7
-rw-r--r--sys-libs/libstdc++-v3/Manifest2
-rw-r--r--sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r4.ebuild (renamed from sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r2.ebuild)41
-rw-r--r--sys-libs/libstdc++-v3/metadata.xml2
-rw-r--r--sys-libs/libtermcap-compat/Manifest2
-rw-r--r--sys-libs/libtermcap-compat/libtermcap-compat-2.0.8-r4.ebuild48
-rw-r--r--sys-libs/libtermcap-compat/metadata.xml2
-rw-r--r--sys-libs/libucontext/Manifest2
-rw-r--r--sys-libs/libucontext/files/libucontext-1.1-respect-CFLAGS.patch13
-rw-r--r--sys-libs/libucontext/libucontext-1.1-r1.ebuild67
-rw-r--r--sys-libs/libucontext/libucontext-1.2.ebuild69
-rw-r--r--sys-libs/libucontext/metadata.xml11
-rw-r--r--sys-libs/libudev-compat/metadata.xml2
-rw-r--r--sys-libs/libunwind/Manifest5
-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.patch51
-rw-r--r--sys-libs/libunwind/files/libunwind-1.7.2-backport-pr521.patch31
-rw-r--r--sys-libs/libunwind/libunwind-1.4.0.ebuild102
-rw-r--r--sys-libs/libunwind/libunwind-1.7.2.ebuild131
-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.xml6
-rw-r--r--sys-libs/liburing/Manifest7
-rw-r--r--sys-libs/liburing/files/liburing-2.1-arm-syscall.patch54
-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-0.6.ebuild50
-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-0.7.ebuild)22
-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.ebuild44
-rw-r--r--sys-libs/liburing/metadata.xml6
-rw-r--r--sys-libs/libutempter/Manifest2
-rw-r--r--sys-libs/libutempter/libutempter-1.1.6-r3.ebuild70
-rw-r--r--sys-libs/libutempter/libutempter-1.2.0.ebuild70
-rw-r--r--sys-libs/libutempter/libutempter-1.2.1.ebuild30
-rw-r--r--sys-libs/libutempter/metadata.xml2
-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/libuuid/metadata.xml2
-rw-r--r--sys-libs/libvpd/Manifest2
-rw-r--r--sys-libs/libvpd/files/libvpd-2.2.6-localstatedir.patch21
-rw-r--r--sys-libs/libvpd/libvpd-2.2.9.ebuild (renamed from sys-libs/libvpd/libvpd-2.2.6.ebuild)35
-rw-r--r--sys-libs/libvpd/metadata.xml7
-rw-r--r--sys-libs/libxcrypt/Manifest3
-rw-r--r--sys-libs/libxcrypt/files/libxcrypt-4.4.12-multibuild.patch25
-rw-r--r--sys-libs/libxcrypt/files/libxcrypt-4.4.12-pythonver.patch17
-rw-r--r--sys-libs/libxcrypt/files/libxcrypt-4.4.19-multibuild.patch14
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.16.ebuild164
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.17.ebuild164
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild335
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.36-r3.ebuild254
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.36.ebuild340
-rw-r--r--sys-libs/libxcrypt/metadata.xml35
-rw-r--r--sys-libs/llvm-libunwind/Manifest15
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-10.0.0.ebuild126
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-10.0.1.ebuild122
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-11.0.0.9999.ebuild122
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-11.0.0_rc1.ebuild122
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-11.0.0_rc2.ebuild122
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-12.0.0.9999.ebuild122
-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/llvm-libunwind-9.0.1.ebuild126
-rw-r--r--sys-libs/llvm-libunwind/metadata.xml10
-rw-r--r--sys-libs/lwp/lwp-2.8.ebuild8
-rw-r--r--sys-libs/lwp/metadata.xml2
-rw-r--r--sys-libs/metadata.xml3
-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.xml15
-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.xml17
-rw-r--r--sys-libs/mtdev/mtdev-1.1.6.ebuild4
-rw-r--r--sys-libs/mtdev/mtdev-1.1.7.ebuild23
-rw-r--r--sys-libs/musl-nscd/Manifest2
-rw-r--r--sys-libs/musl-nscd/metadata.xml2
-rw-r--r--sys-libs/musl-nscd/musl-nscd-1.1.1-r1.ebuild (renamed from sys-libs/musl-nscd/musl-nscd-1.0.2.ebuild)16
-rw-r--r--sys-libs/musl-nscd/musl-nscd-9999.ebuild16
-rw-r--r--sys-libs/musl/Manifest11
-rw-r--r--sys-libs/musl/files/ldconfig.in144
-rw-r--r--sys-libs/musl/files/ldconfig.in-r3160
-rw-r--r--sys-libs/musl/files/musl-1.2.4-elfutils-0.190-relr.patch73
-rw-r--r--sys-libs/musl/files/stack_chk_fail_local.c45
-rw-r--r--sys-libs/musl/metadata.xml6
-rw-r--r--sys-libs/musl/musl-1.1.24.ebuild126
-rw-r--r--sys-libs/musl/musl-1.2.0-r1.ebuild129
-rw-r--r--sys-libs/musl/musl-1.2.1.ebuild129
-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.ebuild175
-rw-r--r--sys-libs/native-uuid/metadata.xml2
-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/Manifest141
-rw-r--r--sys-libs/ncurses-compat/files/ncurses-5.7-nongnu.patch11
-rw-r--r--sys-libs/ncurses-compat/files/ncurses-5.8-gfbsd.patch24
-rw-r--r--sys-libs/ncurses-compat/files/ncurses-5.9-fix-clang-build.patch44
-rw-r--r--sys-libs/ncurses-compat/files/ncurses-5.9-gcc-5.patch46
-rw-r--r--sys-libs/ncurses-compat/files/ncurses-5.9-no-I-usr-include.patch45
-rw-r--r--sys-libs/ncurses-compat/files/ncurses-5.9-pkg-config.patch26
-rw-r--r--sys-libs/ncurses-compat/files/ncurses-5.9-rxvt-unicode-9.15.patch191
-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.xml36
-rw-r--r--sys-libs/ncurses-compat/ncurses-compat-5.9.ebuild199
-rw-r--r--sys-libs/ncurses-compat/ncurses-compat-6.1_p20190609.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/Manifest145
-rw-r--r--sys-libs/ncurses/files/ncurses-5.7-nongnu.patch11
-rw-r--r--sys-libs/ncurses/files/ncurses-5.9-gcc-5.patch46
-rw-r--r--sys-libs/ncurses/files/ncurses-6.0-cppflags-cross.patch35
-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-no_user_ldflags_in_libs.patch40
-rw-r--r--sys-libs/ncurses/metadata.xml40
-rw-r--r--sys-libs/ncurses/ncurses-6.2-r1.ebuild316
-rw-r--r--sys-libs/ncurses/ncurses-6.4_p20230401.ebuild420
-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/netbsd-csu/Manifest2
-rw-r--r--sys-libs/netbsd-csu/metadata.xml7
-rw-r--r--sys-libs/netbsd-csu/netbsd-csu-9.0_beta.ebuild140
-rw-r--r--sys-libs/newlib/Manifest5
-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.xml5
-rw-r--r--sys-libs/newlib/newlib-4.1.0-r2.ebuild (renamed from sys-libs/newlib/newlib-3.3.0-r1.ebuild)10
-rw-r--r--sys-libs/newlib/newlib-4.2.0.20211231-r1.ebuild (renamed from sys-libs/newlib/newlib-3.3.0.ebuild)20
-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.ebuild36
-rw-r--r--sys-libs/nss-usrfiles/Manifest2
-rw-r--r--sys-libs/nss-usrfiles/metadata.xml2
-rw-r--r--sys-libs/nss-usrfiles/nss-usrfiles-2.18.1.ebuild15
-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/metadata.xml2
-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/metadata.xml2
-rw-r--r--sys-libs/obstack-standalone/obstack-standalone-1.1.ebuild37
-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.26-readline.patch11
-rw-r--r--sys-libs/openipmi/files/openipmi-2.0.33-c99.patch56
-rw-r--r--sys-libs/openipmi/metadata.xml2
-rw-r--r--sys-libs/openipmi/openipmi-2.0.27-r1.ebuild103
-rw-r--r--sys-libs/openipmi/openipmi-2.0.33-r1.ebuild (renamed from sys-libs/openipmi/openipmi-2.0.28.ebuild)49
-rw-r--r--sys-libs/openipmi/openipmi-2.0.33.ebuild (renamed from sys-libs/openipmi/openipmi-2.0.29.ebuild)48
-rw-r--r--sys-libs/pam/Manifest5
-rw-r--r--sys-libs/pam/files/pam-1.5.3-termios.patch34
-rw-r--r--sys-libs/pam/files/pam-remove-browsers.patch34
-rw-r--r--sys-libs/pam/metadata.xml44
-rw-r--r--sys-libs/pam/pam-1.3.1_p20200128-r1.ebuild119
-rw-r--r--sys-libs/pam/pam-1.5.3-r1.ebuild153
-rw-r--r--sys-libs/pam/pam-1.5.3.ebuild (renamed from sys-libs/pam/pam-1.4.0_p20200829.ebuild)94
-rw-r--r--sys-libs/pam_wrapper/Manifest3
-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/metadata.xml2
-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.ebuild88
-rw-r--r--sys-libs/pam_wrapper/pam_wrapper-1.1.4-r3.ebuild88
-rw-r--r--sys-libs/pam_wrapper/pam_wrapper-1.1.5.ebuild90
-rw-r--r--sys-libs/pinktrace/Manifest1
-rw-r--r--sys-libs/pinktrace/metadata.xml8
-rw-r--r--sys-libs/pinktrace/pinktrace-0.9.3.ebuild29
-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/files/pwdb-0.62-build.patch28
-rw-r--r--sys-libs/pwdb/files/pwdb-0.62-disable-static.patch19
-rw-r--r--sys-libs/pwdb/files/pwdb-0.62-selinux.patch24
-rw-r--r--sys-libs/pwdb/metadata.xml2
-rw-r--r--sys-libs/pwdb/pwdb-0.62-r2.ebuild (renamed from sys-libs/pwdb/pwdb-0.62-r1.ebuild)33
-rw-r--r--sys-libs/queue-standalone/metadata.xml2
-rw-r--r--sys-libs/queue-standalone/queue-standalone-0.1-r1.ebuild9
-rw-r--r--sys-libs/readline/Manifest50
-rw-r--r--sys-libs/readline/files/readline-6.3-fix-long-prompt-vi-search.patch26
-rw-r--r--sys-libs/readline/files/readline-6.3-read-eof.patch54
-rw-r--r--sys-libs/readline/files/readline-7.0-mingw.patch152
-rw-r--r--sys-libs/readline/files/readline-7.0-missing-echo-proto.patch14
-rw-r--r--sys-libs/readline/files/readline-8.0-darwin-shlib-versioning.patch41
-rw-r--r--sys-libs/readline/files/readline-8.1-windows-signals.patch23
-rw-r--r--sys-libs/readline/metadata.xml23
-rw-r--r--sys-libs/readline/readline-6.3_p8-r3.ebuild163
-rw-r--r--sys-libs/readline/readline-8.1_p2-r1.ebuild (renamed from sys-libs/readline/readline-8.0_p4.ebuild)115
-rw-r--r--sys-libs/readline/readline-8.1_p2-r2.ebuild (renamed from sys-libs/readline/readline-7.0_p5-r1.ebuild)122
-rw-r--r--sys-libs/readline/readline-8.2_p10.ebuild250
-rw-r--r--sys-libs/readline/readline-8.3_alpha.ebuild251
-rw-r--r--sys-libs/readline/readline-9999.ebuild251
-rw-r--r--sys-libs/rpmatch-standalone/metadata.xml4
-rw-r--r--sys-libs/rpmatch-standalone/rpmatch-standalone-1.0-r1.ebuild36
-rw-r--r--sys-libs/rpmatch-standalone/rpmatch-standalone-1.0.ebuild8
-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/metadata.xml2
-rw-r--r--sys-libs/slang/slang-2.3.2.ebuild23
-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/suacomp/Manifest1
-rw-r--r--sys-libs/suacomp/files/suacomp-0.6.14-strtoll.patch44
-rw-r--r--sys-libs/suacomp/metadata.xml16
-rw-r--r--sys-libs/suacomp/suacomp-0.6.14.ebuild66
-rw-r--r--sys-libs/suacomp/suacomp-9999.ebuild60
-rw-r--r--sys-libs/talloc/Manifest4
-rw-r--r--sys-libs/talloc/metadata.xml6
-rw-r--r--sys-libs/talloc/talloc-2.3.1.ebuild96
-rw-r--r--sys-libs/talloc/talloc-2.4.0.ebuild125
-rw-r--r--sys-libs/talloc/talloc-2.4.1.ebuild130
-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/metadata.xml8
-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.3.ebuild)41
-rw-r--r--sys-libs/tdb/tdb-1.4.9.ebuild79
-rw-r--r--sys-libs/tevent/Manifest7
-rw-r--r--sys-libs/tevent/metadata.xml8
-rw-r--r--sys-libs/tevent/tevent-0.12.1.ebuild (renamed from sys-libs/tevent/tevent-0.10.2.ebuild)38
-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/Manifest6
-rw-r--r--sys-libs/timezone-data/files/timezone-data-2024a-AsiaAlmaty.patch34
-rw-r--r--sys-libs/timezone-data/metadata.xml13
-rw-r--r--sys-libs/timezone-data/timezone-data-2023d.ebuild (renamed from sys-libs/timezone-data/timezone-data-2020a.ebuild)112
-rw-r--r--sys-libs/timezone-data/timezone-data-2024a-r1.ebuild202
-rw-r--r--sys-libs/uclibc-ng/Manifest4
-rw-r--r--sys-libs/uclibc-ng/files/uclibc-compat-r1.patch15
-rw-r--r--sys-libs/uclibc-ng/files/uclibc-ng-1.0.30-fix-ld.so.cache.patch48
-rw-r--r--sys-libs/uclibc-ng/metadata.xml21
-rw-r--r--sys-libs/uclibc-ng/uclibc-ng-1.0.30-r1.ebuild403
-rw-r--r--sys-libs/uclibc-ng/uclibc-ng-1.0.32.ebuild402
-rw-r--r--sys-libs/uclibc-ng/uclibc-ng-1.0.33.ebuild402
-rw-r--r--sys-libs/uclibc-ng/uclibc-ng-1.0.35.ebuild402
-rw-r--r--sys-libs/uclibc-ng/uclibc-ng-9999.ebuild402
-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/metadata.xml2
-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/Manifest1
-rw-r--r--sys-libs/zlib-ng/metadata.xml14
-rw-r--r--sys-libs/zlib-ng/zlib-ng-2.1.6-r1.ebuild91
-rw-r--r--sys-libs/zlib/Manifest5
-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/metadata.xml23
-rw-r--r--sys-libs/zlib/zlib-1.2.11-r2.ebuild123
-rw-r--r--sys-libs/zlib/zlib-1.3-r4.ebuild173
-rw-r--r--sys-libs/zlib/zlib-1.3.1-r1.ebuild173
744 files changed, 41581 insertions, 25461 deletions
diff --git a/sys-libs/argp-standalone/Manifest b/sys-libs/argp-standalone/Manifest
index ba5599b7e5b8..59fdf7b532b7 100644
--- a/sys-libs/argp-standalone/Manifest
+++ b/sys-libs/argp-standalone/Manifest
@@ -1 +1 @@
-DIST argp-standalone-1.3.tar.gz 130255 BLAKE2B 0848a0e7a98cfa09de52fa152eb9a793a9bf25c1edfc7401851ef134b62c051ad6ef2134d6f528e167046be582be23f311e74614c5511d659060addc14de6b2f SHA512 58c3feb8852b90248fff39e49b5019bd0dcf646790c3eaf70c3262eb81dda31a61dc0a45963c7b4a010e80fc14b37288dcb3b3ef48d02f2d33dd72c1c62e62d9
+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 e8a52b5d5a9d..000000000000
--- a/sys-libs/argp-standalone/argp-standalone-1.3-r2.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2020 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/argp-standalone-1.3.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.5.0.ebuild b/sys-libs/argp-standalone/argp-standalone-1.5.0.ebuild
new file mode 100644
index 000000000000..7f5b17768a74
--- /dev/null
+++ b/sys-libs/argp-standalone/argp-standalone-1.5.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="Standalone argp library for use with musl"
+HOMEPAGE="https://github.com/argp-standalone/argp-standalone"
+SRC_URI="https://github.com/argp-standalone/argp-standalone/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="public-domain GPL-2 GPL-3 XC"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~m68k ~mips ppc ppc64 ~riscv ~s390 x86"
+IUSE="static-libs"
+
+DEPEND="!sys-libs/glibc"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-shared.patch
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ append-cflags "-fgnu89-inline"
+
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+
+ insinto /usr/include
+ doins argp.h
+}
diff --git a/sys-libs/argp-standalone/files/argp-standalone-1.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 7164103f8a7d..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
@@ -1,6 +1,11 @@
---- 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 @@
+Initially added in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb196546c62e9894a46900e8078f753388d4cc1a.
+Commit mentions it being from Debian but not found any other references yet.
+
+We use -largp fairly extensively across the tree which this patch
+accommodates (easier than forcing includes?).
+--- a/Makefile.am 2022-05-03 03:41:05.000000000 -0400
++++ b/Makefile.am 2022-05-30 12:28:33.850249380 -0400
+@@ -21,19 +21,19 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = . testsuite
@@ -14,7 +19,7 @@
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 \
@@ -25,9 +30,8 @@
-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
@@ -36,8 +40,8 @@
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/argp-standalone/metadata.xml b/sys-libs/argp-standalone/metadata.xml
index 9d6d88e4ce15..b4d9c5f484e7 100644
--- a/sys-libs/argp-standalone/metadata.xml
+++ b/sys-libs/argp-standalone/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>blueness@gentoo.org</email>
<name>Anthony G. Basile</name>
</maintainer>
- </pkgmetadata>
+ <maintainer type="project">
+ <email>musl@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-libs/basu/Manifest b/sys-libs/basu/Manifest
new file mode 100644
index 000000000000..37853bd6ebb5
--- /dev/null
+++ b/sys-libs/basu/Manifest
@@ -0,0 +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
new file mode 100644
index 000000000000..2a5e288ae73b
--- /dev/null
+++ b/sys-libs/basu/basu-0.2.0.ebuild
@@ -0,0 +1,41 @@
+# 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
+)
+
+src_configure() {
+ local emesonargs=(
+ $(meson_feature audit)
+ $(meson_feature caps libcap)
+ )
+ meson_src_configure
+}
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/0001-basu-0.2.0-meson-add-libcap-option.patch b/sys-libs/basu/files/0001-basu-0.2.0-meson-add-libcap-option.patch
new file mode 100644
index 000000000000..b2727b95a7d7
--- /dev/null
+++ b/sys-libs/basu/files/0001-basu-0.2.0-meson-add-libcap-option.patch
@@ -0,0 +1,39 @@
+From 64c1c624ea63f7a3eba4f0b7cf6a7d7aff952982 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
+Date: Fri, 5 Nov 2021 18:36:54 +0100
+Subject: [PATCH 1/2] meson: add libcap option
+
+it's better to provide the user with this choice instead of
+unconditionally magically depending on it
+---
+ meson.build | 2 +-
+ meson_options.txt | 3 +++
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 056c7c4..357b346 100644
+--- a/meson.build
++++ b/meson.build
+@@ -231,7 +231,7 @@ threads = dependency('threads')
+ librt = cc.find_library('rt')
+ libm = cc.find_library('m')
+
+-libcap = dependency('libcap', required: false)
++libcap = dependency('libcap', required: get_option('libcap'))
+ have_libcap = libcap.found()
+ conf.set10('HAVE_LIBCAP', have_libcap)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index 8cf3a33..ae5c7b1 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -14,3 +14,6 @@ option('system-bus-address', type : 'string',
+
+ option('audit', type : 'combo', choices : ['auto', 'true', 'false'],
+ description : 'libaudit support')
++
++option('libcap', type : 'feature',
++ description : 'libcap support')
+--
+2.32.0
+
diff --git a/sys-libs/basu/files/0002-basu-0.2.0-meson-convert-audit-option-to-feature-object.patch b/sys-libs/basu/files/0002-basu-0.2.0-meson-convert-audit-option-to-feature-object.patch
new file mode 100644
index 000000000000..3d32f0b2352b
--- /dev/null
+++ b/sys-libs/basu/files/0002-basu-0.2.0-meson-convert-audit-option-to-feature-object.patch
@@ -0,0 +1,49 @@
+From 34d1b77f1dd15d55cfc12ef2ee52fd3b6b1d76ce Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
+Date: Fri, 5 Nov 2021 18:39:56 +0100
+Subject: [PATCH 2/2] meson: convert audit option to feature object
+
+features are more idiomatic and ubiquitous
+---
+ meson.build | 11 ++---------
+ meson_options.txt | 2 +-
+ 2 files changed, 3 insertions(+), 10 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 357b346..1f29690 100644
+--- a/meson.build
++++ b/meson.build
+@@ -235,15 +235,8 @@ libcap = dependency('libcap', required: get_option('libcap'))
+ have_libcap = libcap.found()
+ conf.set10('HAVE_LIBCAP', have_libcap)
+
+-want_audit = get_option('audit')
+-if want_audit != 'false'
+- libaudit = dependency('audit', required : want_audit == 'true')
+- have = libaudit.found()
+-else
+- have = false
+- libaudit = []
+-endif
+-conf.set10('HAVE_AUDIT', have)
++libaudit = dependency('audit', required : get_option('audit'))
++conf.set10('HAVE_AUDIT', libaudit.found())
+
+ tests = []
+
+diff --git a/meson_options.txt b/meson_options.txt
+index ae5c7b1..87adfc2 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -12,7 +12,7 @@ option('system-bus-address', type : 'string',
+ description : 'The address of the sytem bus (defined at dbus compilation)',
+ value : 'unix:path=/var/run/dbus/system_bus_socket')
+
+-option('audit', type : 'combo', choices : ['auto', 'true', 'false'],
++option('audit', type : 'feature',
+ description : 'libaudit support')
+
+ option('libcap', type : 'feature',
+--
+2.32.0
+
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
new file mode 100644
index 000000000000..5e504c9ac08a
--- /dev/null
+++ b/sys-libs/basu/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>arsen@gentoo.org</email>
+ <name>Arsen Arsenović</name>
+ </maintainer>
+ <longdescription>
+ The sd-bus library, extracted from systemd.
+
+ Some projects rely on the sd-bus library for DBus support.
+ However not all systems have systemd or elogind installed. This
+ library provides just sd-bus (and the busctl utility).
+ </longdescription>
+ <upstream>
+ <remote-id type="sourcehut">~emersion/basu</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-libs/binutils-libs/Manifest b/sys-libs/binutils-libs/Manifest
index 2c3cf7ae8ac6..232225df13df 100644
--- a/sys-libs/binutils-libs/Manifest
+++ b/sys-libs/binutils-libs/Manifest
@@ -1,6 +1,20 @@
-DIST binutils-2.33.1-patches-2.tar.xz 18636 BLAKE2B 0e0757329b6a83aeff4f4c450c95e73fd48fcc89f83e63f294568632bee0972552cf2f57494352c5d9a7c16a51cdbc4108b38fa6028d4388c8e76046b3da9212 SHA512 d982f68d1f5fdb384309a2a1b7426bf840a90e7a85b37229b4223b62c36cab9dd9ec0c08382c85c68adf996dec21133df3180a2fc649363adae8645f8282f71d
-DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac
DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6ee393fa13b4f2f27832f07790989476f11d1beddb5ad5a9be5c65c1d4dff9d4598d21adcb00c1d0490f69a99127f4527447 SHA512 e05ed8886acb5cb95a3e97c5bc0564215f7d44b604610f5c4545997fd9625d6de909c37063127e819926cd1548a48d3529dd3e82e98ee6a5dbaced028c57355d
DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
-DIST binutils-2.35-patches-1.tar.xz 12216 BLAKE2B a811449da684e3501a7520a26639e04dda2f2d2fc8610974293eff3e4a1e23c4abeb97f52fe3b796679452bd6e3a5330fef4beb6f64b9ce2a1162076803390a0 SHA512 b8da16a4d97b264da925cc939b54bedbc148eb72a8d60f79d7ed222e9e299dca2a4f1fad4a6d60448d9d196c11331443eca0508dcbb85cb4c2da6c67bfaf4cd2
-DIST binutils-2.35.tar.xz 22042160 BLAKE2B 72ea79edf3a77aa93dcf38274123abbae5ce8f800a95e6379b4c8807050b05c2dfec314f06c027b1343c5570f369324fa3e195d7e0db5f8a57c0579937c49d3f SHA512 9f222e4ab6720036402d03904fb11b73ab87714b85cd84997f7d357f405c7e10581d70202f9165a1ee0c70538632db27ecc9dfe627dddb1e6bc7edb1537cf786
+DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
+DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
+DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
+DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
+DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
+DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
+DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
+DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
+DIST binutils-2.39-patches-6.tar.xz 92380 BLAKE2B 39f490f1134fb0e7dc80924a280d3113efe0ed094ee15de97c42ab751c83d2f5aa7448966d8cbbcde722b2af4999a36c1e5aa2f37ca6d2e3942b97b6d90ff152 SHA512 213cd7a86da83987966675f3195e843d898ca4ff412dfc29fd33ed80adb7bbf80a0b2919cd8e7dd49208c73a621ab7b720970f2259418bdc82ed2a568ff62064
+DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
+DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd2490cb72376f2cb6c6a60030d8c6b71357150d956a1e71d91683d43b571cb5bf738270880f72ef175d6c8faa257b090abeb8b SHA512 984dab529276ab4f9d215f643c7c18bd1793f438aaad0be158d209787c9c4a6bb68b10bec2065d3fe14a1594d5f1c29f55b2e9bac34a6f489f4b466c02e24766
+DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
+DIST binutils-2.41-patches-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 e9527f34be71..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-2020 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 eutils 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 ~x86-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}]"
@@ -37,7 +37,7 @@ MULTILIB_WRAPPED_HEADERS=(
)
src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
+ if [[ -n ${PATCH_VER} ]] ; then
einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
eapply "${WORKDIR}/patch"/*.patch
fi
@@ -54,6 +54,8 @@ pkgversion() {
}
multilib_src_configure() {
+ filter-lto
+
local myconf=(
--enable-obsolete
--enable-shared
@@ -85,6 +87,10 @@ multilib_src_configure() {
# USE=multitarget change size of global arrays
# USE=64-bit-bfd changes data structures of exported API
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
+
+ # avoid automagic dependency on (currently prefix) systems
+ # systems with debuginfod library, bug #754753
+ --without-debuginfod
)
# mips can't do hash-style=gnu ...
diff --git a/sys-libs/binutils-libs/binutils-libs-2.33.1-r1.ebuild b/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild
index 7629a98e5fbd..f395c82f84ec 100644
--- a/sys-libs/binutils-libs/binutils-libs-2.33.1-r1.ebuild
+++ b/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PATCH_VER=2
-PATCH_DEV=slyfox
+PATCH_VER=1
+PATCH_DEV=dilfridge
-inherit eutils libtool toolchain-funcs multilib-minimal
+inherit flag-o-matic libtool toolchain-funcs multilib-minimal
MY_PN="binutils"
MY_P="${MY_PN}-${PV}"
@@ -20,16 +20,17 @@ 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"
+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 ~x64-solaris"
-COMMON_DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
-DEPEND="${COMMON_DEPEND}
- nls? ( sys-devel/gettext )"
+BDEPEND="nls? ( sys-devel/gettext )"
+DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
# Need a newer binutils-config that'll reset include/lib symlinks for us.
-RDEPEND="${COMMON_DEPEND}
+RDEPEND="${DEPEND}
>=sys-devel/binutils-config-5
- nls? ( !<sys-devel/gdb-7.10-r1[nls] )"
+"
+
+PATCHES=("${FILESDIR}"/${PN}-2.35.1-cet.patch)
S="${WORKDIR}/${MY_P}"
@@ -38,7 +39,7 @@ MULTILIB_WRAPPED_HEADERS=(
)
src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
+ if [[ -n ${PATCH_VER} ]] ; then
einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
eapply "${WORKDIR}/patch"/*.patch
fi
@@ -55,6 +56,8 @@ pkgversion() {
}
multilib_src_configure() {
+ filter-lto
+
local myconf=(
--enable-obsolete
--enable-shared
@@ -86,6 +89,15 @@ multilib_src_configure() {
# USE=multitarget change size of global arrays
# USE=64-bit-bfd changes data structures of exported API
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
+
+ # avoid automagic dependency on (currently prefix) systems
+ # systems with debuginfod library, bug #754753
+ --without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
)
# mips can't do hash-style=gnu ...
@@ -99,6 +111,12 @@ multilib_src_configure() {
&& 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[@]}"
diff --git a/sys-libs/binutils-libs/binutils-libs-2.35.ebuild b/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild
index 0decbf620dd1..d6b6b8e25bba 100644
--- a/sys-libs/binutils-libs/binutils-libs-2.35.ebuild
+++ b/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2020 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=5
PATCH_DEV=dilfridge
-inherit eutils libtool toolchain-funcs multilib-minimal
+inherit flag-o-matic libtool toolchain-funcs multilib-minimal
MY_PN="binutils"
MY_P="${MY_PN}-${PV}"
@@ -20,8 +20,8 @@ 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 ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+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 ~x64-solaris"
BDEPEND="nls? ( sys-devel/gettext )"
DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
@@ -37,7 +37,7 @@ MULTILIB_WRAPPED_HEADERS=(
)
src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
+ if [[ -n ${PATCH_VER} ]] ; then
einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
eapply "${WORKDIR}/patch"/*.patch
fi
@@ -54,6 +54,8 @@ pkgversion() {
}
multilib_src_configure() {
+ filter-lto
+
local myconf=(
--enable-obsolete
--enable-shared
@@ -85,6 +87,15 @@ multilib_src_configure() {
# USE=multitarget change size of global arrays
# USE=64-bit-bfd changes data structures of exported API
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
+
+ # avoid automagic dependency on (currently prefix) systems
+ # systems with debuginfod library, bug #754753
+ --without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
)
# mips can't do hash-style=gnu ...
@@ -98,6 +109,12 @@ multilib_src_configure() {
&& 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[@]}"
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
new file mode 100644
index 000000000000..b22a084a83e7
--- /dev/null
+++ b/sys-libs/binutils-libs/binutils-libs-2.37_p1-r2.ebuild
@@ -0,0 +1,137 @@
+# 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?}"
+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 ~x64-solaris"
+
+BDEPEND="nls? ( sys-devel/gettext )"
+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
+
+ 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}
+ # Disable modules that are in a combined binutils/gdb tree. #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags.
+ # https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # We pull in all USE-flags that change ABI in an incompatible
+ # way. #666100
+ # USE=multitarget change size of global arrays
+ # USE=64-bit-bfd changes data structures of exported API
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
+
+ # avoid automagic dependency on (currently prefix) systems
+ # systems with debuginfod library, bug #754753
+ --without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+ )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ use nls \
+ && myconf+=( --without-included-gettext ) \
+ || myconf+=( --disable-nls )
+
+ if [[ ${CHOST} == *-darwin* ]] && use nls ; then
+ # fix underlinking in opcodes
+ sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
+ "${S}"/opcodes/Makefile.in || die
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+
+ # Prevent makeinfo from running as we don't build docs here.
+ # bug #622652
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+}
+
+multilib_src_install() {
+ default
+ # Provide libiberty.h directly.
+ dosym libiberty/libiberty.h /usr/include/libiberty.h
+}
+
+multilib_src_install_all() {
+ use static-libs || find "${ED}"/usr -name '*.la' -delete
+}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild b/sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild
new file mode 100644
index 000000000000..0cbb1f3a402b
--- /dev/null
+++ b/sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild
@@ -0,0 +1,155 @@
+# 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?}"
+IUSE="64-bit-bfd cet multitarget nls static-libs"
+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}]"
+# Need a newer binutils-config that'll reset include/lib symlinks for us.
+RDEPEND="${DEPEND}
+ >=sys-devel/binutils-config-5
+"
+
+S="${WORKDIR}/${MY_P%_p?}"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/bfd.h
+)
+
+src_prepare() {
+ if [[ -n ${PATCH_VER} ]] ; then
+ einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+ eapply "${WORKDIR}/patch"/*.patch
+ fi
+
+ # Fix cross-compile relinking issue, bug #626402
+ elibtoolize
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # somehow libtool/configure is messed up and (custom patch at
+ # upstream?) and misdetects (basically assumes) nm can be called
+ # with -B arg -- can't run eautoreconf (fails), so patch up
+ # manually, this would break any target that needs -B to nm
+ sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
+ libctf/configure || die
+ fi
+
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ default
+}
+
+pkgversion() {
+ printf "Gentoo ${PVR}"
+ [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
+}
+
+multilib_src_configure() {
+ filter-lto
+
+ local myconf=(
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ # Newer versions (>=2.24) make this an explicit option. #497268
+ --enable-install-libiberty
+ --disable-werror
+ --with-bugurl="https://bugs.gentoo.org/"
+ --with-pkgversion="$(pkgversion)"
+ $(use_enable static-libs static)
+ # The binutils eclass enables this flag for all bi-arch builds,
+ # but other tools often don't care about that support. Put it
+ # beyond a flag if people really want it, but otherwise leave
+ # it disabled as it can slow things down on 32bit arches. #438522
+ $(use_enable 64-bit-bfd)
+ # This only disables building in the zlib subdir.
+ # For binutils itself, it'll use the system version. #591516
+ --without-zlib
+ --with-system-zlib
+ # We only care about the libs, so disable programs. #528088
+ --disable-{binutils,etc,ld,gas,gold,gprof}
+ # Disable modules that are in a combined binutils/gdb tree. #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags.
+ # https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # We pull in all USE-flags that change ABI in an incompatible
+ # way. #666100
+ # USE=multitarget change size of global arrays
+ # USE=64-bit-bfd changes data structures of exported API
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
+
+ # avoid automagic dependency on (currently prefix) systems
+ # systems with debuginfod library, bug #754753
+ --without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+ )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ use nls \
+ && myconf+=( --without-included-gettext ) \
+ || myconf+=( --disable-nls )
+
+ if [[ ${CHOST} == *-darwin* ]] && use nls ; then
+ # fix underlinking in opcodes
+ sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
+ "${S}"/opcodes/Makefile.in || die
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # Prevent makeinfo from running as we don't build docs here.
+ # bug #622652
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+}
+
+multilib_src_compile() {
+ emake V=1
+}
+
+multilib_src_install() {
+ emake V=1 DESTDIR="${D}" install
+
+ # Provide libiberty.h directly.
+ dosym libiberty/libiberty.h /usr/include/libiberty.h
+}
+
+multilib_src_install_all() {
+ use static-libs || find "${ED}"/usr -name '*.la' -delete
+}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.39-r5.ebuild b/sys-libs/binutils-libs/binutils-libs-2.39-r5.ebuild
new file mode 100644
index 000000000000..78844f553070
--- /dev/null
+++ b/sys-libs/binutils-libs/binutils-libs-2.39-r5.ebuild
@@ -0,0 +1,155 @@
+# 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"
+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}]"
+# Need a newer binutils-config that'll reset include/lib symlinks for us.
+RDEPEND="${DEPEND}
+ >=sys-devel/binutils-config-5
+"
+
+S="${WORKDIR}/${MY_P%_p?}"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/bfd.h
+)
+
+src_prepare() {
+ if [[ -n ${PATCH_VER} ]] ; then
+ einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+ eapply "${WORKDIR}/patch"/*.patch
+ fi
+
+ # Fix cross-compile relinking issue, bug #626402
+ elibtoolize
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # somehow libtool/configure is messed up and (custom patch at
+ # upstream?) and misdetects (basically assumes) nm can be called
+ # with -B arg -- can't run eautoreconf (fails), so patch up
+ # manually, this would break any target that needs -B to nm
+ sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
+ libctf/configure || die
+ fi
+
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ default
+}
+
+pkgversion() {
+ printf "Gentoo ${PVR}"
+ [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
+}
+
+multilib_src_configure() {
+ filter-lto
+
+ local myconf=(
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ # Newer versions (>=2.24) make this an explicit option. #497268
+ --enable-install-libiberty
+ --disable-werror
+ --with-bugurl="https://bugs.gentoo.org/"
+ --with-pkgversion="$(pkgversion)"
+ $(use_enable static-libs static)
+ # The binutils eclass enables this flag for all bi-arch builds,
+ # but other tools often don't care about that support. Put it
+ # beyond a flag if people really want it, but otherwise leave
+ # it disabled as it can slow things down on 32bit arches. #438522
+ $(use_enable 64-bit-bfd)
+ # This only disables building in the zlib subdir.
+ # For binutils itself, it'll use the system version. #591516
+ --without-zlib
+ --with-system-zlib
+ # We only care about the libs, so disable programs. #528088
+ --disable-{binutils,etc,ld,gas,gold,gprof,gprofng}
+ # Disable modules that are in a combined binutils/gdb tree. #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags.
+ # https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # We pull in all USE-flags that change ABI in an incompatible
+ # way. #666100
+ # USE=multitarget change size of global arrays
+ # USE=64-bit-bfd changes data structures of exported API
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
+
+ # avoid automagic dependency on (currently prefix) systems
+ # systems with debuginfod library, bug #754753
+ --without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+ )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ use nls \
+ && myconf+=( --without-included-gettext ) \
+ || myconf+=( --disable-nls )
+
+ if [[ ${CHOST} == *-darwin* ]] && use nls ; then
+ # fix underlinking in opcodes
+ sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
+ "${S}"/opcodes/Makefile.in || die
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # Prevent makeinfo from running as we don't build docs here.
+ # bug #622652
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+}
+
+multilib_src_compile() {
+ emake V=1
+}
+
+multilib_src_install() {
+ emake V=1 DESTDIR="${D}" install
+
+ # Provide libiberty.h directly.
+ dosym libiberty/libiberty.h /usr/include/libiberty.h
+}
+
+multilib_src_install_all() {
+ use static-libs || find "${ED}"/usr -name '*.la' -delete
+}
diff --git a/sys-libs/binutils-libs/binutils-libs-2.40-r7.ebuild b/sys-libs/binutils-libs/binutils-libs-2.40-r7.ebuild
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/binutils-libs/files/binutils-libs-2.35.1-cet.patch b/sys-libs/binutils-libs/files/binutils-libs-2.35.1-cet.patch
new file mode 100644
index 000000000000..7477ff90ac95
--- /dev/null
+++ b/sys-libs/binutils-libs/files/binutils-libs-2.35.1-cet.patch
@@ -0,0 +1,103 @@
+https://bugs.gentoo.org/771765
+https://sourceware.org/PR27397
+
+On i586-like CPUs endbr32 added by -Wl,-z,ibt,-z,shstk
+generates crashing binaries and causes ./configure failure.
+
+From 847e4b3207f97762dc641db8d3b188081c3370c3 Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+Date: Fri, 12 Feb 2021 16:30:23 -0800
+Subject: [PATCH] GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs
+
+---
+ config/cet.m4 | 19 ++++++++++++++++---
+ libiberty/configure | 29 +++++++++++++++++++++++++++++
+ 2 files changed, 45 insertions(+), 3 deletions(-)
+
+diff --git a/config/cet.m4 b/config/cet.m4
+index c67fb4f35b6..7718be1afe8 100644
+--- a/config/cet.m4
++++ b/config/cet.m4
+@@ -130,6 +130,18 @@ fi
+ if test x$may_have_cet = xyes; then
+ if test x$cross_compiling = xno; then
+ AC_TRY_RUN([
++int
++main ()
++{
++ asm ("endbr32");
++ return 0;
++}
++ ],
++ [have_multi_byte_nop=yes],
++ [have_multi_byte_nop=no])
++ have_cet=no
++ if test x$have_multi_byte_nop = xyes; then
++ AC_TRY_RUN([
+ static void
+ foo (void)
+ {
+@@ -155,9 +167,10 @@ main ()
+ bar ();
+ return 0;
+ }
+- ],
+- [have_cet=no],
+- [have_cet=yes])
++ ],
++ [have_cet=no],
++ [have_cet=yes])
++ fi
+ if test x$enable_cet = xno -a x$have_cet = xyes; then
+ AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host])
+ fi
+diff --git a/libiberty/configure b/libiberty/configure
+index 160b8c9e8b1..29a690d44fc 100755
+--- a/libiberty/configure
++++ b/libiberty/configure
+@@ -5539,6 +5539,34 @@ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
++int
++main ()
++{
++ asm ("endbr32");
++ return 0;
++}
++
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++ have_multi_byte_nop=yes
++else
++ have_multi_byte_nop=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++ conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
++
++ have_cet=no
++ if test x$have_multi_byte_nop = xyes; then
++ if test "$cross_compiling" = yes; then :
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "cannot run test program while cross compiling
++See \`config.log' for more details" "$LINENO" 5; }
++else
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
+ static void
+ foo (void)
+ {
+@@ -5575,6 +5603,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+
++ fi
+ if test x$enable_cet = xno -a x$have_cet = xyes; then
+ as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5
+ fi
+--
+2.29.2
+
diff --git a/sys-libs/binutils-libs/metadata.xml b/sys-libs/binutils-libs/metadata.xml
index 80f41eae3f2b..e1153400acab 100644
--- a/sys-libs/binutils-libs/metadata.xml
+++ b/sys-libs/binutils-libs/metadata.xml
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
-</maintainer>
-<use>
- <flag name="64-bit-bfd">Support 64-bit targets even on 32-bit hosts (is ignored on 64-bit hosts)</flag>
- <flag name="multitarget">Enable all possible targets in libbfd</flag>
-</use>
-<upstream>
- <remote-id type="cpe">cpe:/a:gnu:binutils</remote-id>
-</upstream>
+ <maintainer type="project">
+ <email>toolchain@gentoo.org</email>
+ <name>Gentoo Toolchain Project</name>
+ </maintainer>
+ <use>
+ <flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
+ <flag name="64-bit-bfd">Support 64-bit targets even on 32-bit hosts (is ignored on 64-bit hosts)</flag>
+ <flag name="multitarget">Enable all possible targets in libbfd</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:gnu:binutils</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/blocksruntime/blocksruntime-0_pre20171027-r1.ebuild b/sys-libs/blocksruntime/blocksruntime-0_pre20171027-r2.ebuild
index 6c49e1748dba..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-2020 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
@@ -13,10 +13,10 @@ SRC_URI="https://github.com/mackyle/blocksruntime/archive/${COMMIT}.tar.gz -> ${
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86"
IUSE="static-libs"
-RDEPEND=""
+RDEPEND="!dev-libs/libdispatch"
DEPEND="${RDEPEND}"
PATCHES=(
diff --git a/sys-libs/blocksruntime/metadata.xml b/sys-libs/blocksruntime/metadata.xml
index 4ce153662dd9..b872e02bef46 100644
--- a/sys-libs/blocksruntime/metadata.xml
+++ b/sys-libs/blocksruntime/metadata.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>slyfox@gentoo.org</email>
- <name>Sergei Trofimovich</name>
+ <email>marecki@gentoo.org</email>
+ <name>Marek Szuba</name>
</maintainer>
<upstream>
<remote-id type="github">mackyle/blocksruntime</remote-id>
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest
index 8ceb93829922..08f33eef70b1 100644
--- a/sys-libs/compiler-rt-sanitizers/Manifest
+++ b/sys-libs/compiler-rt-sanitizers/Manifest
@@ -1,5 +1,11 @@
-DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff219888706d2b79d5296590934714e42ac79f6a6547941ac2b1d2c4e6313dd18b6c7068e748aa6ac033e49fccbf5d355aa8191 SHA512 baa182d62fef1851836013ae8a1a00861ea89769778d67fb97b407a9de664e6c85da2af9c5b3f75d2bf34ff6b00004e531ca7e4b3115a26c0e61c575cf2303a0
-DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
-DIST llvmorg-11.0.0-rc1.tar.gz 122688246 BLAKE2B 10ff3f08ff3780abb1d86ac67942e6aac52ff5daf820a2e3d23d8b79dbade1c5b1d398d0a577028d2d7c8759ab9a8b552a0305b5750310a015585c06cdadf844 SHA512 09564ed903902a5795fffaa4679badc30bf49739889a48074b5ae2c93bd29000cfb36a650208d5cae5d74899bade066f84b4aa023fc852eec246ff67bf64a267
-DIST llvmorg-11.0.0-rc2.tar.gz 122728230 BLAKE2B 7944adf41ec7cd82489666a0a38a857de628879d59a2e3bb566b67c18500092430db66ff214d45cb324128c874a74a72c367b452df3b88ec95b33c284dd35512 SHA512 25eb2879eb22e79a1e840ef24cf3f5eec602e947101db299393e06e3d09f2d1531eef214264636e1b511eafff7f51b1834d5a03976ccd088eb680745b147e9f3
-DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
+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-10.0.0.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.ebuild
deleted file mode 100644
index 802b49fc4517..000000000000
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.ebuild
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \
- multiprocessing python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
-# FIXME: libfuzzer does not enable all its necessary dependencies
-REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-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_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 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=$(usex sanitize)
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
- )
- if use test; then
- mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
-
- # 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+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- fi
-
- cmake-utils_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-utils_src_make check-all
-}
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.1.ebuild
deleted file mode 100644
index b9be9bf67b85..000000000000
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.1.ebuild
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
-# FIXME: libfuzzer does not enable all its necessary dependencies
-REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-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
-
- 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 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=$(usex sanitize)
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
- )
- 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+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- 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-11.0.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0.9999.ebuild
deleted file mode 100644
index cecd595ac6c1..000000000000
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0.9999.ebuild
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
-IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
-# FIXME: libfuzzer does not enable all its necessary dependencies
-REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-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
-
- 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 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=$(usex sanitize)
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
- )
- 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+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- 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-11.0.0_rc1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc1.ebuild
deleted file mode 100644
index cecd595ac6c1..000000000000
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc1.ebuild
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
-IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
-# FIXME: libfuzzer does not enable all its necessary dependencies
-REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-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
-
- 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 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=$(usex sanitize)
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
- )
- 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+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- 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-11.0.0_rc2.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc2.ebuild
deleted file mode 100644
index cecd595ac6c1..000000000000
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc2.ebuild
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
-IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
-# FIXME: libfuzzer does not enable all its necessary dependencies
-REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-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
-
- 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 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=$(usex sanitize)
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
- )
- 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+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- 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.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0.9999.ebuild
deleted file mode 100644
index cecd595ac6c1..000000000000
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.0.9999.ebuild
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
-IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
-# FIXME: libfuzzer does not enable all its necessary dependencies
-REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-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
-
- 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 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=$(usex sanitize)
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
- )
- 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+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- 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-15.0.7.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.7.ebuild
new file mode 100644
index 000000000000..0ecd27c9f4f2
--- /dev/null
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-15.0.7.ebuild
@@ -0,0 +1,224 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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="${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"
+# 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? (
+ !!<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 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
+ 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
+
+ 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_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/${LLVM_VERSION}"
+
+ -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_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/${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_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/${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/${LLVM_VERSION}/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=
+ # 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-17.0.6.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.6.ebuild
new file mode 100644
index 000000000000..204f3d0d371a
--- /dev/null
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.6.ebuild
@@ -0,0 +1,220 @@
+# 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
+ # hangs, sigh
+ rm test/tsan/getline_nohang.cpp || die
+
+ 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-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-19.0.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..57f868d54be6
--- /dev/null
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0.9999.ebuild
@@ -0,0 +1,217 @@
+# 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}"
+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-19.0.0_pre20240410.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0_pre20240410.ebuild
new file mode 100644
index 000000000000..57f868d54be6
--- /dev/null
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0_pre20240410.ebuild
@@ -0,0 +1,217 @@
+# 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}"
+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-19.0.0_pre20240420.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0_pre20240420.ebuild
new file mode 100644
index 000000000000..57f868d54be6
--- /dev/null
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.0.0_pre20240420.ebuild
@@ -0,0 +1,217 @@
+# 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}"
+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-9.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.ebuild
deleted file mode 100644
index fe737189a419..000000000000
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.ebuild
+++ /dev/null
@@ -1,158 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \
- multiprocessing python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
-# FIXME: libfuzzer does not enable all its necessary dependencies
-REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-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() {
- cmake-utils_src_prepare
-
- if use test; then
- # remove tests that are (still) broken by new glibc
- # https://bugs.llvm.org/show_bug.cgi?id=36065
- if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then
- rm test/lsan/TestCases/Linux/fork_and_leak.cc || die
- fi
- fi
-}
-
-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 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=$(usex sanitize)
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
- )
- if use test; then
- mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
-
- # 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+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- fi
-
- cmake-utils_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-utils_src_make check-all
-}
diff --git a/sys-libs/compiler-rt-sanitizers/metadata.xml b/sys-libs/compiler-rt-sanitizers/metadata.xml
index 8f5cbb8b29ad..16744cf2f873 100644
--- a/sys-libs/compiler-rt-sanitizers/metadata.xml
+++ b/sys-libs/compiler-rt-sanitizers/metadata.xml
@@ -1,15 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>llvm@gentoo.org</email>
</maintainer>
<use>
- <flag name='clang'>Force building using installed clang (rather
+ <flag name="clang">Force building using installed clang (rather
than the default CC/CXX).</flag>
- <flag name='libfuzzer'>Build fuzzing runtime.</flag>
- <flag name='profile'>Build profiling runtime.</flag>
- <flag name='sanitize'>Build sanitizer runtimes.</flag>
- <flag name='xray'>Build XRay runtime.</flag>
+ <flag name="libfuzzer">Build fuzzing runtime.</flag>
+ <flag name="memprof">Build memory profiler runtime.</flag>
+ <flag name="orc">Build ORC runtime.</flag>
+ <flag name="profile">Build profiling runtime.</flag>
+ <flag name="xray">Build XRay runtime.</flag>
+
+ <flag name="asan">Build Address Sanitizer runtime.</flag>
+ <flag name="dfsan">Build Data Flow Sanitizer runtime.</flag>
+ <flag name="lsan">Build Leak Sanitizer runtime.</flag>
+ <flag name="msan">Build Memory Sanitizer runtime.</flag>
+ <flag name="hwasan">Build Hardware ASAN runtime.</flag>
+ <flag name="tsan">Build Thread Sanitizer runtime.</flag>
+ <flag name="ubsan">
+ Build Undefined Behavior Sanitizer runtime.
+ </flag>
+ <flag name="safestack">Build SafeStack runtime.</flag>
+ <flag name="cfi">Build Control Flow Integrity runtime.</flag>
+ <flag name="scudo">Build Scudo Hardened Allocator.</flag>
+ <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 8ceb93829922..07adb451589b 100644
--- a/sys-libs/compiler-rt/Manifest
+++ b/sys-libs/compiler-rt/Manifest
@@ -1,5 +1,13 @@
-DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff219888706d2b79d5296590934714e42ac79f6a6547941ac2b1d2c4e6313dd18b6c7068e748aa6ac033e49fccbf5d355aa8191 SHA512 baa182d62fef1851836013ae8a1a00861ea89769778d67fb97b407a9de664e6c85da2af9c5b3f75d2bf34ff6b00004e531ca7e4b3115a26c0e61c575cf2303a0
-DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
-DIST llvmorg-11.0.0-rc1.tar.gz 122688246 BLAKE2B 10ff3f08ff3780abb1d86ac67942e6aac52ff5daf820a2e3d23d8b79dbade1c5b1d398d0a577028d2d7c8759ab9a8b552a0305b5750310a015585c06cdadf844 SHA512 09564ed903902a5795fffaa4679badc30bf49739889a48074b5ae2c93bd29000cfb36a650208d5cae5d74899bade066f84b4aa023fc852eec246ff67bf64a267
-DIST llvmorg-11.0.0-rc2.tar.gz 122728230 BLAKE2B 7944adf41ec7cd82489666a0a38a857de628879d59a2e3bb566b67c18500092430db66ff214d45cb324128c874a74a72c367b452df3b88ec95b33c284dd35512 SHA512 25eb2879eb22e79a1e840ef24cf3f5eec602e947101db299393e06e3d09f2d1531eef214264636e1b511eafff7f51b1834d5a03976ccd088eb680745b147e9f3
-DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
+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-10.0.0.ebuild b/sys-libs/compiler-rt/compiler-rt-10.0.0.ebuild
deleted file mode 100644
index a4a199c2ed96..000000000000
--- a/sys-libs/compiler-rt/compiler-rt-10.0.0.ebuild
+++ /dev/null
@@ -1,110 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-inherit cmake-utils flag-o-matic llvm llvm.org multiprocessing \
- python-any-r1 toolchain-funcs
-
-DESCRIPTION="Compiler runtime library for clang (built-in part)"
-HOMEPAGE="https://llvm.org/"
-LLVM_COMPONENTS=( compiler-rt )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="+clang test"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-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() {
- llvm_pkg_setup
- 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
- )
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- fi
-
- if use test; then
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
-
- -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-utils_src_configure
-}
-
-src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
-
- cmake-utils_src_make check-builtins
-}
diff --git a/sys-libs/compiler-rt/compiler-rt-10.0.1.ebuild b/sys-libs/compiler-rt/compiler-rt-10.0.1.ebuild
deleted file mode 100644
index bd92186599db..000000000000
--- a/sys-libs/compiler-rt/compiler-rt-10.0.1.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( compiler-rt )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="+clang test"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-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() {
- llvm_pkg_setup
- 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
- )
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- 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-11.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-11.0.0.9999.ebuild
deleted file mode 100644
index c83c56ecf249..000000000000
--- a/sys-libs/compiler-rt/compiler-rt-11.0.0.9999.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( compiler-rt )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
-IUSE="+clang test"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-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() {
- llvm_pkg_setup
- 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
- )
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- 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-11.0.0_rc1.ebuild b/sys-libs/compiler-rt/compiler-rt-11.0.0_rc1.ebuild
deleted file mode 100644
index c83c56ecf249..000000000000
--- a/sys-libs/compiler-rt/compiler-rt-11.0.0_rc1.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( compiler-rt )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
-IUSE="+clang test"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-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() {
- llvm_pkg_setup
- 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
- )
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- 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-11.0.0_rc2.ebuild b/sys-libs/compiler-rt/compiler-rt-11.0.0_rc2.ebuild
deleted file mode 100644
index c83c56ecf249..000000000000
--- a/sys-libs/compiler-rt/compiler-rt-11.0.0_rc2.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( compiler-rt )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
-IUSE="+clang test"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-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() {
- llvm_pkg_setup
- 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
- )
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- 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.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-12.0.0.9999.ebuild
deleted file mode 100644
index c83c56ecf249..000000000000
--- a/sys-libs/compiler-rt/compiler-rt-12.0.0.9999.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( compiler-rt )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS=""
-IUSE="+clang test"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-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() {
- llvm_pkg_setup
- 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
- )
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- 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-15.0.7.ebuild b/sys-libs/compiler-rt/compiler-rt-15.0.7.ebuild
new file mode 100644
index 000000000000..c979daaf6e68
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-15.0.7.ebuild
@@ -0,0 +1,149 @@
+# 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 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_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 )"
+
+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/_/-}
+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
+ 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
+
+ if use clang; 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 ! 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_VERSION}"
+
+ -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; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ 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-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-16.0.6.ebuild b/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild
new file mode 100644
index 000000000000..4c27d82506bb
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild
@@ -0,0 +1,176 @@
+# 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.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-17.0.6.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.6.ebuild
new file mode 100644
index 000000000000..50ca8e397361
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-17.0.6.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}
+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-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/compiler-rt-9.0.1.ebuild b/sys-libs/compiler-rt/compiler-rt-9.0.1.ebuild
deleted file mode 100644
index 5a78551f828d..000000000000
--- a/sys-libs/compiler-rt/compiler-rt-9.0.1.ebuild
+++ /dev/null
@@ -1,110 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-inherit cmake-utils flag-o-matic llvm llvm.org multiprocessing \
- python-any-r1 toolchain-funcs
-
-DESCRIPTION="Compiler runtime library for clang (built-in part)"
-HOMEPAGE="https://llvm.org/"
-LLVM_COMPONENTS=( compiler-rt )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="$(ver_cut 1-3)"
-KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="+clang test"
-RESTRICT="!test? ( test ) !clang? ( test )"
-
-CLANG_SLOT=${SLOT%%.*}
-# llvm-6 for new lit options
-DEPEND="
- >=sys-devel/llvm-6"
-BDEPEND="
- 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}"
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-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() {
- llvm_pkg_setup
- 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
- )
-
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
- mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
- )
- fi
-
- if use test; then
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
-
- -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-utils_src_configure
-}
-
-src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
-
- cmake-utils_src_make check-builtins
-}
diff --git a/sys-libs/compiler-rt/metadata.xml b/sys-libs/compiler-rt/metadata.xml
index 3b996021381a..1167201f29f0 100644
--- a/sys-libs/compiler-rt/metadata.xml
+++ b/sys-libs/compiler-rt/metadata.xml
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>llvm@gentoo.org</email>
</maintainer>
<use>
- <flag name='clang'>Force building using installed clang (rather
+ <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 18189ac72994..f7c1656f60c2 100644
--- a/sys-libs/cracklib/Manifest
+++ b/sys-libs/cracklib/Manifest
@@ -1,2 +1 @@
-DIST cracklib-2.9.6.tar.gz 642402 BLAKE2B 4d7a0d12d1e7101c82d03f76e073407481078747c283fe3251f947542017fff03fbc5e98505c6a7a8987a2bbcea99dab558c15b1eb8fd16755859ce5a4440ed2 SHA512 2b09672e5b412d670e7ed911ebf0c0023fe2901ea05c9c02eefb7a58a13cddbc27a65d75bb20be9f8cebf4c90a9a56dfe1a3b656dff62b1d6048f5376e671786
-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.11.ebuild b/sys-libs/cracklib/cracklib-2.9.11.ebuild
new file mode 100644
index 000000000000..8be12c0d3441
--- /dev/null
+++ b/sys-libs/cracklib/cracklib-2.9.11.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Note: ideally bump with sys-apps/cracklib-words
+
+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.xz"
+S="${WORKDIR}"/${MY_P}
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+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}
+ nls? ( virtual/libintl )
+"
+BDEPEND="
+ nls? ( sys-devel/gettext )
+ python? ( ${DISTUTILS_DEPS} )
+"
+
+distutils_enable_tests unittest
+
+pkg_setup() {
+ # Workaround bug #195017
+ if has unmerge-orphans ${FEATURES} && has_version "<${CATEGORY}/${PN}-2.8.10" ; then
+ eerror "Upgrade path is broken with FEATURES=unmerge-orphans"
+ eerror "Please run: FEATURES=-unmerge-orphans emerge cracklib"
+ die "Please run: FEATURES=-unmerge-orphans emerge cracklib"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # bug #269003
+ elibtoolize
+
+ if use python ; then
+ distutils-r1_src_prepare
+ fi
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ # use /usr/lib so that the dictionary is shared between ABIs
+ --with-default-dict="/usr/lib/cracklib_dict"
+ --without-python
+ $(use_enable nls)
+ $(use_enable static-libs static)
+ )
+
+ export ac_cv_header_zlib_h=$(usex zlib)
+ export ac_cv_search_gzopen=$(usex zlib -lz no)
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use python ; then
+ local -x CFLAGS="${CFLAGS} -DLOCALEDIR='\"${EPREFIX}/usr/share/locale\"' -DDEFAULT_CRACKLIB_DICT=\'${EPREFIX}/usr/lib/cracklib_dict\'"
+ cd python || die
+ distutils-r1_src_compile
+ fi
+}
+
+multilib_src_test() {
+ default
+
+ if multilib_is_native_abi && use python ; then
+ distutils-r1_src_test
+ fi
+}
+
+python_test() {
+ cd "${S}"/python || die
+
+ # Make sure we load the freshly built library
+ local -x LD_LIBRARY_PATH="${BUILD_DIR/-${EPYTHON/./_}}/lib/.libs:${BUILD_DIR}/lib:${LD_LIBRARY_PATH}"
+
+ eunittest
+}
+
+multilib_src_install() {
+ default
+
+ # Move shared libs to /
+ gen_usr_ldscript -a crack
+
+ if multilib_is_native_abi && use python ; then
+ cd python || die
+ distutils-r1_src_install
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ find "${ED}" -type f -name "*.la" -delete || die
+ rm -r "${ED}"/usr/share/cracklib || die
+
+ insinto /usr/share/dict
+ doins dicts/cracklib-small
+}
+
+pkg_postinst() {
+ if [[ -z ${ROOT} ]] ; then
+ ebegin "Regenerating cracklib dictionary"
+ create-cracklib-dict "${EPREFIX}"/usr/share/dict/* > /dev/null
+ eend $?
+ fi
+}
diff --git a/sys-libs/cracklib/cracklib-2.9.6-r2.ebuild b/sys-libs/cracklib/cracklib-2.9.6-r2.ebuild
deleted file mode 100644
index 66b54d2dd663..000000000000
--- a/sys-libs/cracklib/cracklib-2.9.6-r2.ebuild
+++ /dev/null
@@ -1,112 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_6 )
-DISTUTILS_OPTIONAL=1
-
-inherit distutils-r1 libtool multilib-minimal toolchain-funcs usr-ldscript
-
-MY_P=${P/_}
-DESCRIPTION="Password Checking Library"
-HOMEPAGE="https://github.com/cracklib/cracklib/"
-# source tarballs on GitHub lack pre-generated configure script.
-#SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-SRC_URI="https://dev.gentoo.org/~polynomial-c/dist/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint"
-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}
- python? (
- dev-python/setuptools[${PYTHON_USEDEP}]
- )"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}"/cracklib-2.9.6-CVE-2016-6318.patch
- "${FILESDIR}"/cracklib-2.9.6-fix-long-word-bufferoverflow.patch
-)
-
-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
-}
-
-pkg_setup() {
- # workaround #195017
- if has unmerge-orphans ${FEATURES} && has_version "<${CATEGORY}/${PN}-2.8.10" ; then
- eerror "Upgrade path is broken with FEATURES=unmerge-orphans"
- eerror "Please run: FEATURES=-unmerge-orphans emerge cracklib"
- die "Please run: FEATURES=-unmerge-orphans emerge cracklib"
- fi
-}
-
-src_prepare() {
- eapply -p2 "${PATCHES[@]}"
- eapply_user
- elibtoolize #269003
- do_python
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- # use /usr/lib so that the dictionary is shared between ABIs
- --with-default-dict='/usr/lib/cracklib_dict'
- --without-python
- $(use_enable nls)
- $(use_enable static-libs static)
- )
- export ac_cv_header_zlib_h=$(usex zlib)
- export ac_cv_search_gzopen=$(usex zlib -lz no)
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- default
- do_python
-}
-
-multilib_src_test() {
- # Make sure we load the freshly built library
- LD_LIBRARY_PATH="${BUILD_DIR}/lib/.libs" do_python
-}
-
-python_test() {
- ${EPYTHON} -m unittest test_cracklib || die "Tests fail with ${EPYTHON}"
-}
-
-multilib_src_install() {
- default
- # move shared libs to /
- gen_usr_ldscript -a crack
-
- do_python
-}
-
-multilib_src_install_all() {
- einstalldocs
- find "${ED}" -name "*.la" -delete || die
- rm -r "${ED%/}"/usr/share/cracklib || die
-
- insinto /usr/share/dict
- doins dicts/cracklib-small
-}
-
-pkg_postinst() {
- if [[ ${ROOT} == "/" ]] ; then
- ebegin "Regenerating cracklib dictionary"
- create-cracklib-dict "${EPREFIX}"/usr/share/dict/* > /dev/null
- eend $?
- fi
-}
diff --git a/sys-libs/cracklib/cracklib-2.9.7.ebuild b/sys-libs/cracklib/cracklib-2.9.7.ebuild
deleted file mode 100644
index 320276fcb567..000000000000
--- a/sys-libs/cracklib/cracklib-2.9.7.ebuild
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-DISTUTILS_OPTIONAL=1
-
-inherit distutils-r1 libtool multilib-minimal toolchain-funcs 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"
-
-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 ~x86-macos ~m68k-mint"
-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}
- python? (
- dev-python/setuptools[${PYTHON_USEDEP}]
- )"
-
-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
-}
-
-pkg_setup() {
- # workaround #195017
- if has unmerge-orphans ${FEATURES} && has_version "<${CATEGORY}/${PN}-2.8.10" ; then
- eerror "Upgrade path is broken with FEATURES=unmerge-orphans"
- eerror "Please run: FEATURES=-unmerge-orphans emerge cracklib"
- die "Please run: FEATURES=-unmerge-orphans emerge cracklib"
- fi
-}
-
-src_prepare() {
- eapply_user
- elibtoolize #269003
- do_python
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- # use /usr/lib so that the dictionary is shared between ABIs
- --with-default-dict='/usr/lib/cracklib_dict'
- --without-python
- $(use_enable nls)
- $(use_enable static-libs static)
- )
- export ac_cv_header_zlib_h=$(usex zlib)
- export ac_cv_search_gzopen=$(usex zlib -lz no)
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- default
- do_python
-}
-
-multilib_src_test() {
- # Make sure we load the freshly built library
- LD_LIBRARY_PATH="${BUILD_DIR}/lib/.libs" do_python
-}
-
-python_test() {
- ${EPYTHON} -m unittest test_cracklib || die "Tests fail with ${EPYTHON}"
-}
-
-multilib_src_install() {
- default
- # move shared libs to /
- gen_usr_ldscript -a crack
-
- do_python
-}
-
-multilib_src_install_all() {
- einstalldocs
- find "${ED}" -name "*.la" -delete || die
- rm -r "${ED%/}"/usr/share/cracklib || die
-
- insinto /usr/share/dict
- doins dicts/cracklib-small
-}
-
-pkg_postinst() {
- if [[ ${ROOT} == "/" ]] ; then
- ebegin "Regenerating cracklib dictionary"
- create-cracklib-dict "${EPREFIX}"/usr/share/dict/* > /dev/null
- eend $?
- fi
-}
diff --git a/sys-libs/cracklib/files/cracklib-2.9.6-CVE-2016-6318.patch b/sys-libs/cracklib/files/cracklib-2.9.6-CVE-2016-6318.patch
deleted file mode 100644
index bc47734759e2..000000000000
--- a/sys-libs/cracklib/files/cracklib-2.9.6-CVE-2016-6318.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From 47e5dec521ab6243c9b249dd65b93d232d90d6b1 Mon Sep 17 00:00:00 2001
-From: Jan Dittberner <jan@dittberner.info>
-Date: Thu, 25 Aug 2016 17:13:49 +0200
-Subject: [PATCH] Apply patch to fix CVE-2016-6318
-
-This patch fixes an issue with a stack-based buffer overflow whne
-parsing large GECOS field. See
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6318 and
-https://security-tracker.debian.org/tracker/CVE-2016-6318 for more
-information.
----
- src/NEWS | 1 +
- src/lib/fascist.c | 57 ++++++++++++++++++++++++++++++++-----------------------
- 2 files changed, 34 insertions(+), 24 deletions(-)
-
-diff --git a/src/NEWS b/src/NEWS
-index 26abeee..361a207 100644
---- a/src/NEWS
-+++ b/src/NEWS
-@@ -1,3 +1,4 @@
-+v2.9.x apply patch to fix CVE-2016-6318 Stack-based buffer overflow when parsing large GECOS field
- v2.9.6 updates to cracklib-words to add a bunch of other dictionary lists
- migration to github
- patch to add some particularly bad cases to the cracklib small dictionary (Matthew Miller)
-diff --git a/src/lib/fascist.c b/src/lib/fascist.c
-index a996509..d4deb15 100644
---- a/src/lib/fascist.c
-+++ b/src/lib/fascist.c
-@@ -502,7 +502,7 @@ FascistGecosUser(char *password, const char *user, const char *gecos)
- char gbuffer[STRINGSIZE];
- char tbuffer[STRINGSIZE];
- char *uwords[STRINGSIZE];
-- char longbuffer[STRINGSIZE * 2];
-+ char longbuffer[STRINGSIZE];
-
- if (gecos == NULL)
- gecos = "";
-@@ -583,38 +583,47 @@ FascistGecosUser(char *password, const char *user, const char *gecos)
- {
- for (i = 0; i < j; i++)
- {
-- strcpy(longbuffer, uwords[i]);
-- strcat(longbuffer, uwords[j]);
--
-- if (GTry(longbuffer, password))
-+ if (strlen(uwords[i]) + strlen(uwords[j]) < STRINGSIZE)
- {
-- return _("it is derived from your password entry");
-- }
-+ strcpy(longbuffer, uwords[i]);
-+ strcat(longbuffer, uwords[j]);
-
-- strcpy(longbuffer, uwords[j]);
-- strcat(longbuffer, uwords[i]);
-+ if (GTry(longbuffer, password))
-+ {
-+ return _("it is derived from your password entry");
-+ }
-
-- if (GTry(longbuffer, password))
-- {
-- return _("it's derived from your password entry");
-- }
-+ strcpy(longbuffer, uwords[j]);
-+ strcat(longbuffer, uwords[i]);
-
-- longbuffer[0] = uwords[i][0];
-- longbuffer[1] = '\0';
-- strcat(longbuffer, uwords[j]);
-+ if (GTry(longbuffer, password))
-+ {
-+ return _("it's derived from your password entry");
-+ }
-+ }
-
-- if (GTry(longbuffer, password))
-+ if (strlen(uwords[j]) < STRINGSIZE - 1)
- {
-- return _("it is derivable from your password entry");
-+ longbuffer[0] = uwords[i][0];
-+ longbuffer[1] = '\0';
-+ strcat(longbuffer, uwords[j]);
-+
-+ if (GTry(longbuffer, password))
-+ {
-+ return _("it is derivable from your password entry");
-+ }
- }
-
-- longbuffer[0] = uwords[j][0];
-- longbuffer[1] = '\0';
-- strcat(longbuffer, uwords[i]);
--
-- if (GTry(longbuffer, password))
-+ if (strlen(uwords[i]) < STRINGSIZE - 1)
- {
-- return _("it's derivable from your password entry");
-+ longbuffer[0] = uwords[j][0];
-+ longbuffer[1] = '\0';
-+ strcat(longbuffer, uwords[i]);
-+
-+ if (GTry(longbuffer, password))
-+ {
-+ return _("it's derivable from your password entry");
-+ }
- }
- }
- }
diff --git a/sys-libs/cracklib/files/cracklib-2.9.6-fix-long-word-bufferoverflow.patch b/sys-libs/cracklib/files/cracklib-2.9.6-fix-long-word-bufferoverflow.patch
deleted file mode 100644
index 59dc9e539eb3..000000000000
--- a/sys-libs/cracklib/files/cracklib-2.9.6-fix-long-word-bufferoverflow.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 33d7fa4585247cd2247a1ffa032ad245836c6edb Mon Sep 17 00:00:00 2001
-From: Jan Dittberner <jan@dittberner.info>
-Date: Thu, 25 Aug 2016 17:17:53 +0200
-Subject: [PATCH] Fix a buffer overflow processing long words
-
-A buffer overflow processing long words has been discovered. This commit
-applies the patch from
-https://build.opensuse.org/package/view_file/Base:System/cracklib/0004-overflow-processing-long-words.patch
-by Howard Guo.
-
-See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835386 and
-http://www.openwall.com/lists/oss-security/2016/08/23/8
----
- src/NEWS | 1 +
- src/lib/rules.c | 5 ++---
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/NEWS b/src/NEWS
-index 361a207..f1df3b0 100644
---- a/src/NEWS
-+++ b/src/NEWS
-@@ -1,4 +1,5 @@
- v2.9.x apply patch to fix CVE-2016-6318 Stack-based buffer overflow when parsing large GECOS field
-+ fix a buffer overflow processing long words
- v2.9.6 updates to cracklib-words to add a bunch of other dictionary lists
- migration to github
- patch to add some particularly bad cases to the cracklib small dictionary (Matthew Miller)
-diff --git a/src/lib/rules.c b/src/lib/rules.c
-index d193cc0..3a2aa46 100644
---- a/src/lib/rules.c
-+++ b/src/lib/rules.c
-@@ -434,9 +434,8 @@ Mangle(input, control) /* returns a pointer to a controlled Mangle */
- {
- int limit;
- register char *ptr;
-- static char area[STRINGSIZE];
-- char area2[STRINGSIZE];
-- area[0] = '\0';
-+ static char area[STRINGSIZE * 2] = {0};
-+ char area2[STRINGSIZE * 2] = {0};
- strcpy(area, input);
-
- for (ptr = control; *ptr; ptr++)
diff --git a/sys-libs/cracklib/metadata.xml b/sys-libs/cracklib/metadata.xml
index 0bd584bf7040..8aacd02b19ce 100644
--- a/sys-libs/cracklib/metadata.xml
+++ b/sys-libs/cracklib/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
diff --git a/sys-libs/csu/Manifest b/sys-libs/csu/Manifest
index 975fae05aff2..480d3d1052cd 100644
--- a/sys-libs/csu/Manifest
+++ b/sys-libs/csu/Manifest
@@ -1,2 +1 @@
-DIST Csu-79.tar.gz 12719 BLAKE2B f44e979323da828ebe4546ef3077dc1fd6feaf832e0a55aa09a9ba69a83c64759548f34ede8f92769f37e88d78e248b74c4a7e042857f74a8b88fc5958481ea4 SHA512 1d47cce40d400241bdd0a4c24e332f999cb7ae08bd43b08b88e9b5fd5a0a53c9752816b0e07c5b6ffb78f7b5bc24f45986c6a50c661bc5cdd15fee5e465da1bb
DIST Csu-85.tar.gz 13376 BLAKE2B 59aa275bf01bb785b848447ff1291e0018b2f2bc3c42f4f222957aa6c1f9fd344fa6dca9ee53fb8d9d3b11f6c03c37fff9178c40e5a009712f251f502e1f4957 SHA512 3cfeb7d37630fc9d6607da018b9ac1aeb3f41a4c190a67e7dc242ae48e7abd0026e25055b9459f2f187d3bb25644f516f079d1b2e943e8cb4cc6c132ad594467
diff --git a/sys-libs/csu/csu-79.ebuild b/sys-libs/csu/csu-79.ebuild
deleted file mode 100644
index 465515a1d795..000000000000
--- a/sys-libs/csu/csu-79.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-DESCRIPTION="Darwin Csu (crt1.o) - Mac OS X 10.6.6 to 10.9.5 versions"
-HOMEPAGE="http://www.opensource.apple.com/"
-SRC_URI="http://www.opensource.apple.com/tarballs/Csu/Csu-${PV}.tar.gz"
-
-LICENSE="APSL-2"
-
-SLOT="0"
-KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
-IUSE=""
-S=${WORKDIR}/Csu-${PV}
-
-src_prepare() {
- # since we don't have crt0, we can't build it either
- sed -i \
- -e 's:$(SYMROOT)/crt0.o::' \
- -e '/LOCLIBDIR)\/crt0.o/d' \
- Makefile || die
-
- if [[ ${CHOST} == powerpc-*-darwin* && ${CHOST##*-darwin} -le 8 ]] ; then
- # *must not* be compiled with -Os on PPC because that will
- # optimize out _pointer_to__darwin_gcc3_preregister_frame_info
- # which causes linker errors for large programs because the
- # jump to ___darwin_gcc3_preregister_frame_info gets to be more
- # than 16MB away
- sed -i -e "s, -Os , -O ,g" Makefile || die
- fi
-}
-
-src_compile() {
- emake USRLIBDIR="${EPREFIX}"/lib
-}
-
-src_install() {
- emake -j1 \
- USRLIBDIR="${EPREFIX}"/lib \
- LOCLIBDIR="${EPREFIX}"/lib \
- DSTROOT="${D}" \
- install
-}
diff --git a/sys-libs/csu/csu-85-r1.ebuild b/sys-libs/csu/csu-85-r1.ebuild
index 8c9ad7d9a737..4b11e2f86b8d 100644
--- a/sys-libs/csu/csu-85-r1.ebuild
+++ b/sys-libs/csu/csu-85-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit toolchain-funcs
+inherit flag-o-matic
DESCRIPTION="Darwin Csu (crt1.o) - Mac OS X 10.10 version"
HOMEPAGE="http://www.opensource.apple.com/"
@@ -12,8 +12,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/Csu/Csu-${PV}.tar.gz"
LICENSE="APSL-2"
SLOT="0"
-KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
-IUSE=""
+KEYWORDS="~ppc-macos ~x64-macos"
S=${WORKDIR}/Csu-${PV}
# for now it seems FSF GCC can't compile this thing, so we need
@@ -24,6 +23,10 @@ DEPEND="|| (
)"
src_prepare() {
+ # apart from gcc-4.2.1 possibly not understanding, this better not
+ # be aggressively optimised
+ filter-flags -march=* -mtune=*
+
# since we don't have crt0, we can't build it either
sed -i \
-e 's:$(SYMROOT)/crt0.o::' \
diff --git a/sys-libs/csu/metadata.xml b/sys-libs/csu/metadata.xml
index 7151af145b05..3e9b4cf7fcd3 100644
--- a/sys-libs/csu/metadata.xml
+++ b/sys-libs/csu/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>prefix@gentoo.org</email>
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.ebuild b/sys-libs/cygwin-crypt/cygwin-crypt-1.4.ebuild
deleted file mode 100644
index 1b97a32993a0..000000000000
--- a/sys-libs/cygwin-crypt/cygwin-crypt-1.4.ebuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-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 ~x86-cygwin"
-IUSE=""
-
-DEPEND=""
-RDEPEND="${DEPEND}"
-
-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 598620e9d7d7..000000000000
--- a/sys-libs/cygwin-crypt/metadata.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>haubi@gentoo.org</email>
- <name>Michael Haubenwallner</name>
- </maintainer>
- <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/darwin-libc-headers/Manifest b/sys-libs/darwin-libc-headers/Manifest
deleted file mode 100644
index 54ff64636d34..000000000000
--- a/sys-libs/darwin-libc-headers/Manifest
+++ /dev/null
@@ -1,34 +0,0 @@
-DIST CommonCrypto-60092.50.5.tar.gz 606900 BLAKE2B 1b6ab62b1a9fac03c4568f3c0f2a64a2fdccc6f89f0f9aadce4ac9a1abd8ceb780c6ff8ee161bc3b1fd386b602a54c79590ee0c163e3b66a2d49276875a8448d SHA512 52d8108ac7951b3b588069338390d69afa581aecebc85130a46ba8a73316cc1964fe3e0251a703e769a420fcd11c056b03e952301785218dfdc5a31cdb971e2c
-DIST CommonCrypto-60118.220.1.tar.gz 625670 BLAKE2B 8287100e973b7fd69c2f0a9c456b33379f66dd7f27923a3b5a4af1621f8166c0f5ccc6db560bc418067ca3c2dc6d6a7ea33276024deafbd7d53e1b475501d1a7 SHA512 0f109b5b25e8036cf35946028fb078c47e6d9c966380848efe320ee5e53e197a3aa678b998d83c6537d82f1abd20a73bebbb66a09b788a617f573538d81dc342
-DIST CommonCrypto-60118.50.1.tar.gz 622283 BLAKE2B 8f1726190ef67f8777516d6b760846fcacaa61019dc54141bdc2ed06cb955b717e53cface03a87a01201c2e98740d283cf5ecba87e76f62a9d93863cc6138167 SHA512 fa1bd62acf0cd2912e082618024f26efc0e674dc1f4bf925d1c6ebc65eaf224673548bcef26f982892c3b032a0f52183ae4717bc0fefc3c0977a912e22dfeab4
-DIST Libc-1158.50.2.tar.gz 1876052 BLAKE2B 0bc7d8cdc343c6c67d54f4a15b1add6aafb59526ab19021cacc892b2ac652b5a8faa7d9319e5009d7097944f424cfce8b006fc7d8d3ec34b66c6c5b307056e91 SHA512 8d6bf09122f47184ce588ee1b6388fe7cf7cb9dc689310ac7ec56f616cecacc3667f76bfde4325e2a5558ea56ee20d89c626ff9ecd4e5cb7c466220290601a9c
-DIST Libc-1244.50.9.tar.gz 1989821 BLAKE2B 96d8be589318523d6a7f39c46a7a59bf8652e4924e1442130926ab285e4fb2a8f09bd674b304feae1907f747ab7bf3dffee1d1e990ce40ba1c5a4b8c03e5087c SHA512 425229c77d24b2fb6e69cd036460642191c7c6c7887b1e84f2c8f78a2791624a04c9d34bd93443ee7cf09381b0b5043db3bf25bb5f75bff5dd2c042ac1bf7882
-DIST Libc-1272.250.1.tar.gz 2020635 BLAKE2B 7ec6be323928e169a23de08858cfb8f42f0289710538163a43c8543337ad5b1eef214d858388700d773ec75adef6010a94c760a6c0fdb0892a5159d7667d8401 SHA512 787934b4c25cb27dd624d73553baf1af93dee1568535326f8499d2fecf30b396c8e3e2c5f060ec00b9ed098ad1143b3fe1c272b234533fb8889585ae1decab45
-DIST Libinfo-503.50.4.tar.gz 283084 BLAKE2B 69f4a32910bcdd4870c23d54916b913336ea4e13430d23d94aa728958f4da54930702c332c427155501cb6c3929a49d585db401971dbe093e05ade18c57ea316 SHA512 145ad52b14050126da9f3e17507a7e3a83e962ac796d4f014b6b44554e33a499723fdf4f6912b1457e435997cff4f5fc29f1d7424397169c5709fce762fda9d5
-DIST Libinfo-517.200.9.tar.gz 306337 BLAKE2B da91c8d79997fc04eaaeca21b5dc90336c2d43dda4641fb91085f5a32157ab50ef022886b5b4ff09e2c306a8f887c4280a045fb01c04ca86f3e59d2bd5cf8d66 SHA512 8c2f72484f584312083095b8e8a373ae349e92bca2cacebd460e6e7c885d98d5dc3975eb37c348f6e65ff77af1990d3111468613af105b8605c7d575d8119eaa
-DIST Libinfo-517.30.1.tar.gz 293825 BLAKE2B dd19937b9c8419e953ff1e22f73dc89a9328706c87284fa6f138e23c97c236600f20e71d1926607211cc82766d3c3a9113381f2471046aceb01a56d3d332f2fb SHA512 48313e8ce4822ad61023faf364d7d64d7f15f8b70930d3052c321c9b555c4af20fd6563ae4b890e0504a1ca141423635a1bb7561cb82123cb0593ccafec6f915
-DIST copyfile-138.tar.gz 52035 BLAKE2B be62d549a45d7f8140d10a3f5857e8d445e5b968e05b82ec73668176047a94b7799b41450223e32406c3ba6677a1a6c694eb8b0ad839a25c37dd4657c176e5d7 SHA512 455fb02b8f5e03a751ebaf05af7cbf2efa60ce5a8084bb3953044abf71ec6b75f394fa5f7ec7fac76532a4216b0930100aee972963cfada83eed73717a881fd6
-DIST copyfile-146.200.3.tar.gz 65045 BLAKE2B 4e5b3524e6e5a54046a68b04d0277645d6ba5be466e669cbdd7a78d41c3d1a69e222cea55198ae53c5803c96fd6ba7ab4543d0bdc42b5cc99054815a84de664f SHA512 555c320eeb27373f68f1a8844ead0614f734e47f7a3d87f867663fc8d6a9e6fa295c1159f9be4e32af2f0933f3e56dd52288a3b2ff970966de5436d2ac054f2f
-DIST copyfile-146.50.5.tar.gz 64621 BLAKE2B 1bbb368dff263e43ebd97802310f98af2592c5a04279297a645e042179f86815376b393b44cba60be5d25e89a15e3b58751da9fd30ccb923d57d62f9c08808d3 SHA512 e09cacf3c284ca3460cfc8263d75b810c2e853a6a134ff3568af86394c90f04d866ba8d1e5996a2e009034fdd9e44162b04faf2fcefe56aeb12e5d128b0a678f
-DIST darwin-libc-headers-10.12-r2.tar.gz 3867106 BLAKE2B 6ac9399716da731913e51b141935496e9ce5e596cc58b971224b39b3346c961e8b2143e88c279736a557c27e64dc286436e662b4fb63183440948d31ab761b52 SHA512 7098832b46fd79d3a5255711a8825c63bea5f513c7646363912b08203d24c30b334cb9745cf84732ea558e50f71c0327eca53c5a8bc81daafffb10c6a43bd3f1
-DIST darwin-libc-headers-10.13-r2.tar.gz 3653319 BLAKE2B 96874e314adaafe129fbd35b743ae7e3f4a258ee3a21872cc197c1fe9244f74309321664fecdd0591583425f0e4bad2eb2bc024ae5eb04a864e27db14a4cf39f SHA512 a41047db4740933e961f433660661fc84fd7a124e5ec9806859042ec32680075f35953b96a58576b494ac0c5add7abd91522b1111b862b23fef7d12049e35e5b
-DIST darwin-libc-headers-10.14-r2.tar.gz 3984239 BLAKE2B 6c0681691dffe9e105b05a63d7a9022f0085dd89154e721c11dbadedcb2382bfc029293a6c510288ea5196f69a763a7eee34a5b5224d1072bb41b4125d224f2d SHA512 422139e55ef36217b38f8ee7f3b8dc78ca127358b5fcfbe2906c22597aaa52a55c576830cf19528872fb4dc6960a134783292d714c21a8be5b7d664bfafff9b4
-DIST dyld-433.5.tar.gz 632900 BLAKE2B b051aee22eb646942473f698b1f29f9acbc0ab20b0c1a60578123b4db5032290f02301bd2d867724b424b74a08470cdd29b47234063df2d100fd535bb8ec3ed7 SHA512 9479b66e5956a852491e1d080d45ff4c9254aa5bf890c634a6cf973f6e45862d282e00ba81c6ff4c849a643585920b654964ed4dde280a73849a84dd8f7be830
-DIST dyld-551.4.tar.gz 832297 BLAKE2B e65c5b2ed90af6ec94f1295efc984404af99f0e5dc666bfc854379f13fd2e98b8048fae84b7bc8864fe27112abf12f741a33cc404b18ae7c88b7abd6a1d9e3c6 SHA512 896281c4b2330c92ed538af58f1b60906ed0a9ffa3099a5e8ef9a15b7ed974259bf546fd2ab7562739f2c8cf1fdfb44ea0ea7567092c77f2ea2cab377da064b0
-DIST dyld-655.1.tar.gz 907306 BLAKE2B d0c22abe50575dc80214d2eba8a057068e4e2d7f06f5562e7cdf29293de9c97fffece206d9324ba37c0b98afa583693e2c26fcc91f0ea089720fc960709e93a9 SHA512 7054461b6ff2ba24153f2097516c1273c77ec0fd7edd5108c336bc22990b45eb68974bcd654b9a45724fd631253443f01988e9b1647dc37f8ae5b8d18bb0352d
-DIST libclosure-67.tar.gz 128749 BLAKE2B 2ca085bd3b98bbcad6a10af27fcf058941b755a4f3ff88102ce5bda4293d2f693c06569726ad368c08bceea8997e3ffc4019c21320d64c861d866eb30dc99044 SHA512 b3c5ab14f8e0e60ef11421cc366f6596864d5837ade51a3ef7b9cf2de7958a0dacf6a5a07ee3e6db03bbecc696fce7b60091f5820450b29b447596c04d2d7ee7
-DIST libclosure-73.tar.gz 131448 BLAKE2B fec5d92d6e9ddb338d730eaddc1c83e94e1a16323308abb0531118dffe02f8e50aa85c2721041a17ab4ef3fc15ece3a6f4b5045bca9c4e3cf3d54c2fdd8b42d1 SHA512 9749a5a08b0720eec1acedc60952b0ccc40f9cbfc9a326e0640280e0d017b9d241827bb6c5a9e68077662439877f3bd14082b7972399144bcb723988bb30def1
-DIST libdispatch-1008.220.2.tar.gz 503589 BLAKE2B d09427bbaf5a3c38ad036bb0d05ca3ba548be22bda59829be43db6aaa0509199d088b854326a95494fafd4870b2d00dcf31bd5ea4484b3a37e682c89cd6db781 SHA512 f3df85d1f37449ea8538a3e34f3b90abd939a6a3ff9ea0882a129597ab024773f5499bee173bf8062cbf5c48f8a1f52dbbebab12f5abb1248ddc78edc66f79ed
-DIST libdispatch-703.50.37.tar.gz 415675 BLAKE2B a30695458f274bb869556837ee69f0f47839fd8741cb446c0c9513ed0d971f44a7eb55d7276db34b5ac3409b68ec283576ea547f12052cfd656fc110ce95cfaf SHA512 a23d3850dc7b6b6e3ef09764a202d6600fc2f238b8dbfe9b13e63b6aae2336dc800d86d987afab88d9c4493d30824468a31a48997b2cfbd2d743e7f1e6dc28cf
-DIST libdispatch-913.60.2.tar.gz 463117 BLAKE2B ec8d90788c86853bd8b65ec953b0e96c57e7a58765d3cd2e53e6c6aae4effa16ae16d18b44e25121717e26774f031391e977d6adaae796192b1f14acdc1dbfcd SHA512 29520016db9fd89457f76d86d889834140e211b6da35bd370178814e97e8f6ffce4b36d96cf41af1280846cdff0ba4ea6ca58d0c63e29ab1a49595c6e52030f4
-DIST libmalloc-116.50.8.tar.gz 186880 BLAKE2B 00ec1cf6dc494fad1e817d942323da86f4de6ab35d92702b6c98b7b0fdb765e756f566298d3369165b0cdf687d43a655be64e3015f884c4d1cd7b7a286669de6 SHA512 a2a49a1d12e66618b124917617c942a51ac36b7b4a12c218b5c979b9d05db822949fc8ffada8901f551f5c2e7fce9abf1d3aeb4a6507f5870a9eab5b9f69ec18
-DIST libmalloc-140.50.6.tar.gz 208453 BLAKE2B 40b7f0052e81bc7862b7bffd302a7868f1f0e6dc11c799370842457635d32bbc61e75753b2b6ebaf2dceaf26b43d7bf4efc718df91c91e0f5572929cbc9bed1d SHA512 9d39f9758f85cfa61835f9deaa4ae4958569aac0da006c5f0e87aaab2cd902b60f60e537fa0d9250401b7177f8c186e8c8e6498b48ee3eaf856daf103bf61412
-DIST libmalloc-166.220.1.tar.gz 277584 BLAKE2B 2fee2a98aa0babc958726522639ddd135b4383bb8328a4d879481e27ec051bd530fc540ba2d959504c457a67536197632e28384959107b103bb466f96223b9ba SHA512 ebbe6d6e5d4cb4e6d928df49c8ab6582e4197ae9b7ed4e1068afd4227ca3e7d22f0d10d47745abcd7f983a75419c8fa7c94d127e3624cee16fa557434b0c3cef
-DIST libplatform-126.50.8.tar.gz 85182 BLAKE2B 3b33b4539acf32358e6288345d33d208fa14fd25d7f1cf8e0af78c6da9c646a57e6f3220f712867d8ffd72e3ffe4ca6f6fce138994c8c825138e7465e4b896d8 SHA512 4c8a15d33aef84075031bf13dc14f1ce31c269ca4117d7249884f980da48ec057f7bf00b75a376f28cf47ff1d03210dbe1bdf2a19b611e5b647c40e10786c7d6
-DIST libplatform-161.50.1.tar.gz 87361 BLAKE2B 569ee093b15a063386dde8c0c7731bc9d1ae7a1377555d83f8c245663d8f79ddcf4287d7cad6c76e519cbc809b4ae0d1698b47f244fe58182eb92b5e1aefa1ce SHA512 d8f47b3eaeaa0600c9df0e11001082f1f211d23ce21c0fa0d7aa86270f4dcb7e7e4691124e9c7618984970c69a4c14c0a3df23a97390dd899130da90ab13a28a
-DIST libplatform-177.200.16.tar.gz 91526 BLAKE2B 699acdef02b7f47995a4c56ecdc28e581e6340eccc851d4a29b4156958e5fb90b4d5f5efc297a988f9de38e7d782cbd5c018509955559161d174ceb25f36a91e SHA512 563f103a8c6ba8cdc36972c0fa412fe82ad8ed347b48472ed3705a39fa17ce19b481e515d999e7493f4d5738551751d247afb16b9fda99357818e795305acf27
-DIST libpthread-218.60.3.tar.gz 186967 BLAKE2B 991569f288813ddebf060c36b7542bd2dab4524f3306b2674f82a7cd452294cc5a2eaab70acc9f13653b36b11439b890134de4f3aadeb38a60a5d10f6932b952 SHA512 3322e4439c72924cd9dda5739c5579e693488636d4ad1f4ba3e94a3f05cfeb0333450a48b317fb2e66e114dacb9acd76c8958c822e7038a4899372263b8ab679
-DIST libpthread-301.50.1.tar.gz 208501 BLAKE2B d9056fc4132e453ed21b054761a3b78f4675258b445fe00949a7aec34465c336d672ffd7a41bbe1f91f071ced1ef2acfbbe1fd6fa79f4bcf7ac089a78b84d010 SHA512 c4f9a4d1e4dcab72a976d5e6272c2d9a9b8e4335312563931d726369dd5cda71e185eeca28cd50e83ed82b8b302af5b7ae40d3b8e147fc426ef1ce17e3f068d8
-DIST libpthread-330.230.1.tar.gz 197145 BLAKE2B 2366a9961862ac5467e48abf1e8a6ab4f240ebb09a8c58a390b49b259aa8ee012017de3a1ab0df6f779f1fc601fe841704c68406ed457f14456041a67038b29a SHA512 6ef2cd2775668ca74f365201b3477e26e6459a2597694d7c12ff203970004abf12deaea7a00b5301ab02344fb390e402e99155bf4e28f28db23928cac9f3bf6e
-DIST libunwind-35.3.tar.gz 90002 BLAKE2B d63ab0ae6e66a6f35ec17de9713d3bf4853cd80af218e868762b20dd8a44d42cd9ff8fce1d8c46fca4759144726bbf248a02a5dede5a94a2b75d3b45ddb7d018 SHA512 b7d9a86ef24f1fe9ca14517471e03a910219a229af9f0d4cf94435115971360640451107ba20c93fb1aab788f8b6eb5ed580ee08fdaa990b9fa43e9ae360c6b4
-DIST libunwind-35.4.tar.gz 1094999 BLAKE2B 5ddc3bb3dca0ceb5c979fd55657ad3ca0a4601be5594749d26a461ea61f75891b564ea9b4d60943baafe07f924d3750e857c0cd27154aceb130cada1cc83ff41 SHA512 7fcfaf071c6bfecd1b5dbdae6a24186c9741b2d877eaea9f64158278dc19f84b5bc46f09df2a4b81cf40f6dc91594b5411a0084e9e8fefcdbbfd8b53668f2631
diff --git a/sys-libs/darwin-libc-headers/darwin-libc-headers-1158.50.2-r4.ebuild b/sys-libs/darwin-libc-headers/darwin-libc-headers-1158.50.2-r4.ebuild
deleted file mode 100644
index 622f6d899e35..000000000000
--- a/sys-libs/darwin-libc-headers/darwin-libc-headers-1158.50.2-r4.ebuild
+++ /dev/null
@@ -1,156 +0,0 @@
-# Copyright 2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-IPV=503.50.4
-CPV=60092.50.5
-MPV=116.50.8
-PPV=218.60.3
-LPV=126.50.8
-UPV=35.3
-OPV=67
-DPV=433.5
-APV=703.50.37
-FPV=138
-OSX=10.12
-DESCRIPTION="Darwin system headers from Libc ${PV}, macOS ${OSX}.6"
-HOMEPAGE="https://opensource.apple.com/source/Libc"
-SRC_URI="https://opensource.apple.com/tarballs/Libc/Libc-${PV}.tar.gz
- https://opensource.apple.com/tarballs/Libinfo/Libinfo-${IPV}.tar.gz
- https://opensource.apple.com/tarballs/CommonCrypto/CommonCrypto-${CPV}.tar.gz
- https://opensource.apple.com/tarballs/libmalloc/libmalloc-${MPV}.tar.gz
- https://opensource.apple.com/tarballs/libpthread/libpthread-${PPV}.tar.gz
- https://opensource.apple.com/tarballs/libplatform/libplatform-${LPV}.tar.gz
- https://opensource.apple.com/tarballs/libunwind/libunwind-${UPV}.tar.gz
- https://opensource.apple.com/tarballs/libclosure/libclosure-${OPV}.tar.gz
- https://opensource.apple.com/tarballs/libdispatch/libdispatch-${APV}.tar.gz
- https://opensource.apple.com/tarballs/copyfile/copyfile-${FPV}.tar.gz
- https://opensource.apple.com/tarballs/dyld/dyld-${DPV}.tar.gz
- https://dev.gentoo.org/~grobian/distfiles/${PN}-${OSX}-r2.tar.gz"
-
-LICENSE="APSL-2"
-SLOT="${OSX}"
-KEYWORDS="~x64-macos"
-IUSE="+man"
-
-BDEPEND="sys-apps/darwin-miscutils"
-
-S=${WORKDIR}/Libc-${PV}
-
-src_prepare() {
- default
-
- # convert BSD find to GNU find syntax
- sed -i \
- -e 's/find -E ${SRCROOT}/find ${SRCROOT} -regextype posix-extended/' \
- xcodescripts/manpages.sh || die
- chmod 755 xcodescripts/manpages.sh || die
-
- # drop ownership stuff and use soft-links
- sed -i \
- -e 's/-o "$INSTALL_OWNER" -g "$INSTALL_GROUP"//' \
- -e 's/ln -hf/ln -sf/' \
- "${WORKDIR}"/Libinfo-${IPV}/xcodescripts/install_files.sh \
- "${WORKDIR}"/copyfile-${FPV}/xcodescripts/install_files.sh || die
-
- # add libmalloc manpage stuff to Libc to automate the installation
- cp "${WORKDIR}"/libmalloc-${MPV}/man/*.3 man/ || die
- cat "${WORKDIR}"/libmalloc-${MPV}/man/manpages.lst \
- >> man/manpages.lst || die
-
- # produce softlinks when installing libpthread manpages, don't do
- # ownership or /usr/local stuff
- sed -i \
- -e 's/ln -fh/ln -fs/' \
- -e '/chmod/d' -e '/chown/d' \
- -e '/\/usr\/local\/share/d' \
- "${WORKDIR}"/libpthread-${PPV}/xcodescripts/install-manpages.sh || die
-}
-
-src_compile() {
- : ; # nothing to do
-}
-
-src_install() {
- run_xcode_ish() {
- env ARCHS="x86_64 i386" \
- PLATFORM_NAME=macosx \
- VARIANT_PLATFORM_NAME=macosx \
- DERIVED_FILES_DIR="${T}" \
- SRCROOT="${S}" \
- DSTROOT="${ED}" \
- PUBLIC_HEADERS_FOLDER_PATH="/usr/include" \
- PRIVATE_HEADERS_FOLDER_PATH="remove-me" \
- "${BASH}" "$@"
- }
-
- run_xcode_ish ./xcodescripts/headers.sh || die
- if use man ; then
- run_xcode_ish ./xcodescripts/manpages.sh || die
- for f in "${ED}"/usr/share/man/man*/* ; do
- [[ -e ${f} ]] || rm "${f}"
- done
- fi
-
- pushd "${WORKDIR}"/Libinfo-${IPV} > /dev/null || die
- run_xcode_ish ./xcodescripts/install_files.sh || die
- popd > /dev/null || die
-
- if use man ; then
- pushd "${WORKDIR}"/copyfile-${FPV} > /dev/null || die
- run_xcode_ish ./xcodescripts/install_files.sh || die
- popd > /dev/null || die
- fi
-
- insinto /usr/include
- doins -r "${WORKDIR}"/libmalloc-${MPV}/include/malloc
- doins -r "${WORKDIR}"/libpthread-${PPV}/pthread
- doins -r "${WORKDIR}"/libplatform-${LPV}/include/*
- doins -r "${WORKDIR}"/libunwind-${UPV}/include/*
- doins -r "${WORKDIR}"/${PN}-${OSX}/include/*
- doins "${WORKDIR}"/libclosure-${OPV}/Block.h
- doins "${WORKDIR}"/dyld-${DPV}/include/dlfcn.h
- doins "${WORKDIR}"/copyfile-${FPV}/copyfile.h \
- "${WORKDIR}"/copyfile-${FPV}/xattr_flags.h
-
- insinto /usr/include/sys
- doins "${WORKDIR}"/libpthread-${PPV}/sys/qos.h
- doins -r "${WORKDIR}"/libpthread-${PPV}/sys/_pthread
-
- insinto /usr/include/mach-o
- doins "${WORKDIR}"/dyld-${DPV}/include/mach-o/dyld{,_images}.h
-
- insinto /usr/include/CommonCrypto
- doins "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonCrypto.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonCryptoError.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonCryptor.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonDigest.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonHMAC.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonKeyDerivation.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonRandom.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonSymmetricKeywrap.h
-
- insinto /usr/include/dispatch
- doins "${WORKDIR}"/libdispatch-${APV}/dispatch/*.h \
- "${WORKDIR}"/libdispatch-${APV}/dispatch/darwin/module.modulemap
- insinto /usr/include/os
- doins "${WORKDIR}"/libdispatch-${APV}/os/object.h
-
- insinto /Frameworks
- doins -r "${WORKDIR}"/${PN}-${OSX}/Frameworks/*.framework
-
- run_xcode_ish \
- "${WORKDIR}"/libpthread-${PPV}/xcodescripts/install-symlinks.sh || die
-
- S="${WORKDIR}"/libpthread-${PPV} run_xcode_ish \
- "${WORKDIR}"/libpthread-${PPV}/xcodescripts/install-manpages.sh || die
-
- ln -s ../nameser.h "${ED}"/usr/include/arpa/nameser.h || die
-
- rm -Rf "${ED}"/remove-me "${ED}"/System "${ED}"/usr/local || die
- use man || rm -Rf "${ED}/usr/share/man"
-
- # drop conflicting header (db is antiquated)
- rm "${ED}"/usr/include/db.h || die
-}
diff --git a/sys-libs/darwin-libc-headers/darwin-libc-headers-1244.50.9-r4.ebuild b/sys-libs/darwin-libc-headers/darwin-libc-headers-1244.50.9-r4.ebuild
deleted file mode 100644
index a7a635ddd3b4..000000000000
--- a/sys-libs/darwin-libc-headers/darwin-libc-headers-1244.50.9-r4.ebuild
+++ /dev/null
@@ -1,156 +0,0 @@
-# Copyright 2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-IPV=517.30.1
-CPV=60118.50.1
-MPV=140.50.6
-PPV=301.50.1
-LPV=161.50.1
-UPV=35.3
-OPV=67
-DPV=551.4
-APV=913.60.2
-FPV=146.50.5
-OSX=10.13
-DESCRIPTION="Darwin system headers from Libc ${PV}, macOS ${OSX}.6"
-HOMEPAGE="https://opensource.apple.com/source/Libc"
-SRC_URI="https://opensource.apple.com/tarballs/Libc/Libc-${PV}.tar.gz
- https://opensource.apple.com/tarballs/Libinfo/Libinfo-${IPV}.tar.gz
- https://opensource.apple.com/tarballs/CommonCrypto/CommonCrypto-${CPV}.tar.gz
- https://opensource.apple.com/tarballs/libmalloc/libmalloc-${MPV}.tar.gz
- https://opensource.apple.com/tarballs/libpthread/libpthread-${PPV}.tar.gz
- https://opensource.apple.com/tarballs/libplatform/libplatform-${LPV}.tar.gz
- https://opensource.apple.com/tarballs/libunwind/libunwind-${UPV}.tar.gz
- https://opensource.apple.com/tarballs/libclosure/libclosure-${OPV}.tar.gz
- https://opensource.apple.com/tarballs/libdispatch/libdispatch-${APV}.tar.gz
- https://opensource.apple.com/tarballs/copyfile/copyfile-${FPV}.tar.gz
- https://opensource.apple.com/tarballs/dyld/dyld-${DPV}.tar.gz
- https://dev.gentoo.org/~grobian/distfiles/${PN}-${OSX}-r2.tar.gz"
-
-LICENSE="APSL-2"
-SLOT="${OSX}"
-KEYWORDS="~x64-macos"
-IUSE="+man"
-
-BDEPEND="sys-apps/darwin-miscutils"
-
-S=${WORKDIR}/Libc-${PV}
-
-src_prepare() {
- default
-
- # convert BSD find to GNU find syntax
- sed -i \
- -e 's/find -E ${SRCROOT}/find ${SRCROOT} -regextype posix-extended/' \
- xcodescripts/manpages.sh || die
- chmod 755 xcodescripts/manpages.sh || die
-
- # drop ownership stuff and use soft-links
- sed -i \
- -e 's/-o "$INSTALL_OWNER" -g "$INSTALL_GROUP"//' \
- -e 's/ln -hf/ln -sf/' \
- "${WORKDIR}"/Libinfo-${IPV}/xcodescripts/install_files.sh \
- "${WORKDIR}"/copyfile-${FPV}/xcodescripts/install_files.sh || die
-
- # add libmalloc manpage stuff to Libc to automate the installation
- cp "${WORKDIR}"/libmalloc-${MPV}/man/*.3 man/ || die
- cat "${WORKDIR}"/libmalloc-${MPV}/man/manpages.lst \
- >> man/manpages.lst || die
-
- # produce softlinks when installing libpthread manpages, don't do
- # ownership or /usr/local stuff
- sed -i \
- -e 's/ln -fh/ln -fs/' \
- -e '/chmod/d' -e '/chown/d' \
- -e '/\/usr\/local\/share/d' \
- "${WORKDIR}"/libpthread-${PPV}/xcodescripts/install-manpages.sh || die
-}
-
-src_compile() {
- : ; # nothing to do
-}
-
-src_install() {
- run_xcode_ish() {
- env ARCHS="x86_64 i386" \
- PLATFORM_NAME=macosx \
- VARIANT_PLATFORM_NAME=macosx \
- DERIVED_FILES_DIR="${T}" \
- SRCROOT="${S}" \
- DSTROOT="${ED}" \
- PUBLIC_HEADERS_FOLDER_PATH="/usr/include" \
- PRIVATE_HEADERS_FOLDER_PATH="remove-me" \
- "${BASH}" "$@"
- }
-
- run_xcode_ish ./xcodescripts/headers.sh || die
- if use man ; then
- run_xcode_ish ./xcodescripts/manpages.sh || die
- for f in "${ED}"/usr/share/man/man*/* ; do
- [[ -e ${f} ]] || rm "${f}"
- done
- fi
-
- pushd "${WORKDIR}"/Libinfo-${IPV} > /dev/null || die
- run_xcode_ish ./xcodescripts/install_files.sh || die
- popd > /dev/null || die
-
- if use man ; then
- pushd "${WORKDIR}"/copyfile-${FPV} > /dev/null || die
- run_xcode_ish ./xcodescripts/install_files.sh || die
- popd > /dev/null || die
- fi
-
- insinto /usr/include
- doins -r "${WORKDIR}"/libmalloc-${MPV}/include/malloc
- doins -r "${WORKDIR}"/libpthread-${PPV}/pthread
- doins -r "${WORKDIR}"/libplatform-${LPV}/include/*
- doins -r "${WORKDIR}"/libunwind-${UPV}/include/*
- doins -r "${WORKDIR}"/${PN}-${OSX}/include/*
- doins "${WORKDIR}"/libclosure-${OPV}/Block.h
- doins "${WORKDIR}"/dyld-${DPV}/include/dlfcn.h
- doins "${WORKDIR}"/copyfile-${FPV}/copyfile.h \
- "${WORKDIR}"/copyfile-${FPV}/xattr_flags.h
-
- insinto /usr/include/sys
- doins "${WORKDIR}"/libpthread-${PPV}/sys/qos.h
- doins -r "${WORKDIR}"/libpthread-${PPV}/sys/_pthread
-
- insinto /usr/include/mach-o
- doins "${WORKDIR}"/dyld-${DPV}/include/mach-o/dyld{,_images}.h
-
- insinto /usr/include/CommonCrypto
- doins "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonCrypto.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonCryptoError.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonCryptor.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonDigest.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonHMAC.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonKeyDerivation.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonRandom.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonSymmetricKeywrap.h
-
- insinto /usr/include/dispatch
- doins "${WORKDIR}"/libdispatch-${APV}/dispatch/*.h \
- "${WORKDIR}"/libdispatch-${APV}/dispatch/darwin/module.modulemap
- insinto /usr/include/os
- doins "${WORKDIR}"/libdispatch-${APV}/os/object.h
-
- insinto /Frameworks
- doins -r "${WORKDIR}"/${PN}-${OSX}/Frameworks/*.framework
-
- run_xcode_ish \
- "${WORKDIR}"/libpthread-${PPV}/xcodescripts/install-symlinks.sh || die
-
- S="${WORKDIR}"/libpthread-${PPV} run_xcode_ish \
- "${WORKDIR}"/libpthread-${PPV}/xcodescripts/install-manpages.sh || die
-
- ln -s ../nameser.h "${ED}"/usr/include/arpa/nameser.h || die
-
- rm -Rf "${ED}"/remove-me "${ED}"/System "${ED}"/usr/local || die
- use man || rm -Rf "${ED}/usr/share/man"
-
- # drop conflicting header (db is antiquated)
- rm "${ED}"/usr/include/db.h || die
-}
diff --git a/sys-libs/darwin-libc-headers/darwin-libc-headers-1272.250.1-r4.ebuild b/sys-libs/darwin-libc-headers/darwin-libc-headers-1272.250.1-r4.ebuild
deleted file mode 100644
index 8de0fcb25482..000000000000
--- a/sys-libs/darwin-libc-headers/darwin-libc-headers-1272.250.1-r4.ebuild
+++ /dev/null
@@ -1,155 +0,0 @@
-# Copyright 2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-IPV=517.200.9
-CPV=60118.220.1
-MPV=166.220.1
-PPV=330.230.1
-LPV=177.200.16
-UPV=35.4
-OPV=73
-DPV=655.1
-APV=1008.220.2
-FPV=146.200.3
-OSX=10.14
-DESCRIPTION="Darwin system headers from Libc ${PV}, macOS ${OSX}.3"
-HOMEPAGE="https://opensource.apple.com/source/Libc"
-SRC_URI="https://opensource.apple.com/tarballs/Libc/Libc-${PV}.tar.gz
- https://opensource.apple.com/tarballs/Libinfo/Libinfo-${IPV}.tar.gz
- https://opensource.apple.com/tarballs/CommonCrypto/CommonCrypto-${CPV}.tar.gz
- https://opensource.apple.com/tarballs/libmalloc/libmalloc-${MPV}.tar.gz
- https://opensource.apple.com/tarballs/libpthread/libpthread-${PPV}.tar.gz
- https://opensource.apple.com/tarballs/libplatform/libplatform-${LPV}.tar.gz
- https://opensource.apple.com/tarballs/libunwind/libunwind-${UPV}.tar.gz
- https://opensource.apple.com/tarballs/libclosure/libclosure-${OPV}.tar.gz
- https://opensource.apple.com/tarballs/libdispatch/libdispatch-${APV}.tar.gz
- https://opensource.apple.com/tarballs/copyfile/copyfile-${FPV}.tar.gz
- https://opensource.apple.com/tarballs/dyld/dyld-${DPV}.tar.gz
- https://dev.gentoo.org/~grobian/distfiles/${PN}-${OSX}-r2.tar.gz"
-
-LICENSE="APSL-2"
-SLOT="${OSX}"
-KEYWORDS="~x64-macos"
-IUSE="+man"
-
-BDEPEND="sys-apps/darwin-miscutils"
-
-S=${WORKDIR}/Libc-${PV}
-
-src_prepare() {
- default
-
- # convert BSD find to GNU find syntax
- sed -i \
- -e 's/find -E ${SRCROOT}/find ${SRCROOT} -regextype posix-extended/' \
- xcodescripts/manpages.sh || die
-
- # drop ownership stuff and use soft-links
- sed -i \
- -e 's/-o "$INSTALL_OWNER" -g "$INSTALL_GROUP"//' \
- -e 's/ln -hf/ln -sf/' \
- "${WORKDIR}"/Libinfo-${IPV}/xcodescripts/install_files.sh \
- "${WORKDIR}"/copyfile-${FPV}/xcodescripts/install_files.sh || die
-
- # add libmalloc manpage stuff to Libc to automate the installation
- cp "${WORKDIR}"/libmalloc-${MPV}/man/*.3 man/ || die
- cat "${WORKDIR}"/libmalloc-${MPV}/man/manpages.lst \
- >> man/manpages.lst || die
-
- # produce softlinks when installing libpthread manpages, don't do
- # ownership or /usr/local stuff
- sed -i \
- -e 's/ln -fh/ln -fs/' \
- -e '/chmod/d' -e '/chown/d' \
- -e '/\/usr\/local\/share/d' \
- "${WORKDIR}"/libpthread-${PPV}/xcodescripts/install-manpages.sh || die
-}
-
-src_compile() {
- : ; # nothing to do
-}
-
-src_install() {
- run_xcode_ish() {
- env ARCHS="x86_64 i386" \
- PLATFORM_NAME=macosx \
- VARIANT_PLATFORM_NAME=macosx \
- DERIVED_FILES_DIR="${T}" \
- SRCROOT="${S}" \
- DSTROOT="${ED}" \
- PUBLIC_HEADERS_FOLDER_PATH="/usr/include" \
- PRIVATE_HEADERS_FOLDER_PATH="remove-me" \
- "${BASH}" "$@"
- }
-
- run_xcode_ish ./xcodescripts/headers.sh || die
- if use man ; then
- run_xcode_ish ./xcodescripts/manpages.sh || die
- for f in "${ED}"/usr/share/man/man*/* ; do
- [[ -e ${f} ]] || rm "${f}"
- done
- fi
-
- pushd "${WORKDIR}"/Libinfo-${IPV} > /dev/null || die
- run_xcode_ish ./xcodescripts/install_files.sh || die
- popd > /dev/null || die
-
- if use man ; then
- pushd "${WORKDIR}"/copyfile-${FPV} > /dev/null || die
- run_xcode_ish ./xcodescripts/install_files.sh || die
- popd > /dev/null || die
- fi
-
- insinto /usr/include
- doins -r "${WORKDIR}"/libmalloc-${MPV}/include/malloc
- doins -r "${WORKDIR}"/libpthread-${PPV}/pthread
- doins -r "${WORKDIR}"/libplatform-${LPV}/include/*
- doins -r "${WORKDIR}"/libunwind-${UPV}/include/*
- doins -r "${WORKDIR}"/${PN}-${OSX}/include/*
- doins "${WORKDIR}"/libclosure-${OPV}/Block.h
- doins "${WORKDIR}"/dyld-${DPV}/include/dlfcn.h
- doins "${WORKDIR}"/copyfile-${FPV}/copyfile.h \
- "${WORKDIR}"/copyfile-${FPV}/xattr_flags.h
-
- insinto /usr/include/sys
- doins "${WORKDIR}"/libpthread-${PPV}/sys/qos.h
- doins -r "${WORKDIR}"/libpthread-${PPV}/sys/_pthread
-
- insinto /usr/include/mach-o
- doins "${WORKDIR}"/dyld-${DPV}/include/mach-o/dyld{,_images}.h
-
- insinto /usr/include/CommonCrypto
- doins "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonCrypto.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonCryptoError.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonCryptor.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonDigest.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonHMAC.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonKeyDerivation.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonRandom.h \
- "${WORKDIR}"/CommonCrypto-${CPV}/include/CommonSymmetricKeywrap.h
-
- insinto /usr/include/dispatch
- doins "${WORKDIR}"/libdispatch-${APV}/dispatch/*.h \
- "${WORKDIR}"/libdispatch-${APV}/dispatch/darwin/module.modulemap
- insinto /usr/include/os
- doins "${WORKDIR}"/libdispatch-${APV}/os/object.h
-
- insinto /Frameworks
- doins -r "${WORKDIR}"/${PN}-${OSX}/Frameworks/*.framework
-
- run_xcode_ish \
- "${WORKDIR}"/libpthread-${PPV}/xcodescripts/install-symlinks.sh || die
-
- S="${WORKDIR}"/libpthread-${PPV} run_xcode_ish \
- "${WORKDIR}"/libpthread-${PPV}/xcodescripts/install-manpages.sh || die
-
- ln -s ../nameser.h "${ED}"/usr/include/arpa/nameser.h || die
-
- rm -Rf "${ED}"/remove-me "${ED}"/System "${ED}"/usr/local || die
- use man || rm -Rf "${ED}/usr/share/man"
-
- # drop conflicting header (db is antiquated)
- rm "${ED}"/usr/include/db.h || die
-}
diff --git a/sys-libs/darwin-libc-headers/metadata.xml b/sys-libs/darwin-libc-headers/metadata.xml
deleted file mode 100644
index ec8d2a6ebeb4..000000000000
--- a/sys-libs/darwin-libc-headers/metadata.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>grobian@gentoo.org</email>
- <name>Fabian Groffen</name>
- </maintainer>
- <maintainer type="project">
- <email>prefix@gentoo.org</email>
- <name>Gentoo Prefix</name>
- </maintainer>
- <use>
- <flag name="man">Install the manpages</flag>
- </use>
-</pkgmetadata>
diff --git a/sys-libs/db/Manifest b/sys-libs/db/Manifest
index 317ca5d8dac2..99e1d0be129a 100644
--- a/sys-libs/db/Manifest
+++ b/sys-libs/db/Manifest
@@ -1,40 +1,3 @@
-DIST db-1.85-r3.1.patch.bz2 14641 BLAKE2B 5ca59487a433a5e5b5fed7a8737c20df041be56733fe9209047f9e53845fa034576c29ad74407509ab96473e4eef0138a3a47de6c348d27209f0e39df85b9f5f SHA512 32b1810515476758ece7415f241378460a4051bf5ee23fb464748f84a90a56ff2c5119ed93028114d64f1b1691b1c694c2301ff825edd89cdee90a870a68b6f4
-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-3.2.9.tar.gz 2085238 BLAKE2B 10cb1c102bf5db52ec16181ccbb02a8c4560f42afd2382689ee4903fcd63bf3ab4802482a065a85b1d34c8fb9f620fceb985155b1390de7ca404c121b6b4b6bc SHA512 5f07b27ae0cbd2832e5db9473cd4f2d4aebeee25ed8245ebd2c297a576571635ca5cf75e63e0967b1e90978128a5b6f5d8112559c56927d5bc5eb0d9fd3a2e95
-DIST db-4.2.52.tar.gz 4073147 BLAKE2B 0bb9649a08df9b425f28471eb65c0efac0b7833b4c5c841b9ef53a142669b549e1f1b78cf42eeceea05ebb271aacd513d115070ea028f77fb1830bb9fcc7c8a9 SHA512 47a4e1353fe4f5c2160952a8f7a09b73fdf2dfcd222a8214e12630cec3139a624907bba83a06f10f8492b4dce328a979e9155ee049b9a88798edaca62cfe60d1
-DIST db-4.3.29.tar.gz 6103264 BLAKE2B eda13cd5c8b9421044f6c8b6b41ec318ff33e19da15f8d5e3075612186e60cfce30069078f712841058224ed58caf69d43960156ac645651670665390eae28e1 SHA512 93d36c040b25739b92c52504e117a9c7f4b671463d61d00029e70d0bc8171311f5d04211f7d966b8a9ef8c2a85a5ebe8cc55e4469c3c7c0e468caa4221f691fc
-DIST db-4.4.20-20060110-rpc_server-java.tar.gz 158976 BLAKE2B 91801a784468fe6dabb4e73e7f33217f6b0130ac1774f9785e541bf2843531e5fa1bbb3f1d0bab23233e2d25e1b3ff781dd08cd8b49c43f21b69383a8388fe42 SHA512 d1f04fe512baa0e5c8a11d765cb9040943ab70258f7d07fbaf579b3442c43ca0dfee56267db7543a71abbbd2f056b80fb5f9d2d8bb83b0f5e5ccebf273280e6f
-DIST db-4.4.20.tar.gz 7952742 BLAKE2B 683ecbd601541922bba1d1bf0aea16d5ba71f25ad287d292f674639503c32070fdb1c47409b0b7dc741c74b77b45738ff6505aca405bfa6c523a7a39f10b9a38 SHA512 dea85d0aa3cea0539de2f9819e1ebc8a8aba887614bbbd1710a69dbf2cef3fe262414b8b03deb7325c8bfeb3bbbdc3d5ba35377a73aac5e3c63aa1082d3a579e
-DIST db-4.5.20.tar.gz 9281894 BLAKE2B 68d6f5a68841adf6240ddff9563fd02c97cdcbc647aa5c7f9d108c7c0195829cda5c32795b137503b46a4c9eae47b9a95a28770f3cd2ca6a1dfa37aad3e3baa1 SHA512 c34907a53323158627971f464c32b9a5b00aff0fa779c67117826ebeea86a4731e272a5dc6dc5ae32f16284ff15c79d93050273795381acaaefd48e18dc2d612
-DIST db-4.6.21.tar.gz 11881885 BLAKE2B 682e0fb1cc471f01f0246761345bacc217e17a7a282d71bd27953fb839e54f58916f89192d50b43f51ec9fc403869304a3b1966dcf49458223ae38c1037693e3 SHA512 8118218e2eaf9d22e445e551ef184f4610406b81f9257794d14f637d9d12a51a007166b48bf820140c5be287ef61d22a62a16f7702f0d29f385108c40b11ce43
-DIST db-4.7.25.tar.gz 13124129 BLAKE2B ae75fbef28d233739e9e05d9058a104366c998219e7b35ddf7ddbcfaf5b54c58bf5ba3b23ec164eca13a86ac6765934877fd41dd4db5cd7016fae031da6c4ecc SHA512 3a0b2bcb210192c7a37b082fab47a8a32da5e7e91058e18be8fb844c8780088cbd4de6234257750505d5a05864517be03afdad95cb1c549f9743386d6129554b
DIST db-4.8.30.tar.gz 22887305 BLAKE2B 10487580a371fa97ef5e468e1fcc4af68490934a82467da88b723f7d4ce403cd5f2b77bd95c218dda58161fe30bfef81f5093a8e5176f5ad5f482251c07c6423 SHA512 d1a3c52b0ab54ae3fd6792e6396c9f74d25f36b2eb9e853b67ef9c872508a58c784c7818108d06d184f59601b70cc877916e67dfea6f0ee1ca2b07468c1041f1
-DIST db-5.1.29.tar.gz 32188074 BLAKE2B 6af9e6afc0ebd06a43c0e96fd0b2b3c8e17476507996605aea0c1519b9120140ff410829118a59ea8eff1ab220762131cfab8cf574ffddfa6348128a57721b37 SHA512 b3487161cc09dd0aee6117d685d0bc0a58854cf5e96f9e778969a51d3a61b66f8e007b76e584e4ef73f84e07d4418b89c2f6697e34c1ad4072609b11b7b4c5b0
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
-DIST db.1.85.tar.gz 270953 BLAKE2B 7862979b6fe21a67eac7eb5e0d05093f33fa71fa92f9717a65bd39b366727e6928109c821b86ede85d6d2a8013199f3927e760bed19001a5cfd2270819a3b904 SHA512 03bf3a2b0947efdca4e38719542e96378b5eeb57da64d5030dd23ab710773c1826f1c867032d0bea658b7fdd8272db253e97bbc490d198b9437025ffdf9e880e
-DIST patch.3.2.9.1 2139 BLAKE2B 7c442311499244d3432a1648294f3b610da827f7d940777de01f98816d6dc8bc50b68cb45900bcc1acf1672207a86009dbc33b6226f8a4fcbefc1bee51961138 SHA512 f410c43ea4af28a39d8ea47f774d38b53bf1183a34abfcf1f27e253eb61b42f4b5e9f0a3a500e174eb796ea342e6dd50a8bb95ff3eb8ee188461489cc994b8f9
-DIST patch.3.2.9.2 495 BLAKE2B a29338b8fd1cdd75833fd4dabcca17106a75e4cc49e7f5198ac723422e0b0ed553969109293d5e83517f2e5bf6478ddcc7e0cdf371e721fb3784dc7d8165e4b6 SHA512 cc75fef11a641d480beaa2b62201177c72d10c4eb20376b5f15769db6e9e1a0da41c0365d79772af19b4cacdaa9f91dad049c735de9f95b98dcfc4f0b611b557
-DIST patch.4.2.52.1 988 BLAKE2B d743a3d798fd80727ff51a0929a6532602d09d1d28840a3012746d9ff81e445b9266be02780e540a3a54ec2ce8ede4522ca6ac0b09b9c97a1dfb5fcbaded99e0 SHA512 67b894678503dc394e50b7c6a875ebbd996d6f78acd21858c04ba2cc4aba118f527aa3aae0793cff4e44bcb17b13fb1eb6a3d895e94cb97270d9759be1bb4bdb
-DIST patch.4.2.52.2 1433 BLAKE2B 9c9e40c264170fc9da6ae7ed6b4213d3f3cccee3c3c58cb9777f6a3a78540ef88f6b7427fb4691519dc2c0a5afed2d749ae4ca8f6144ccc7e281c83d14d00e59 SHA512 93c9463e2a795049473a2799186642185b7e2f94c51efa0412031d134088d129ebcf07e6a5f309d6cb37d9d282d8168276305d7420fb4cff6d7acc38a6ba4f00
-DIST patch.4.2.52.3 8672 BLAKE2B ae364cce5cb87287a78f3d19214ffdb33bef661392111d4d736291a6798cfc571f5251c0ea254fe2070f3e6503f97e79b4fb92c1105a83b4aefb710e5c78e9b3 SHA512 234bd96b93aec826c97314b41c8b9231c55598213ee8437a6df7efea44e6c1e8e4844db8214a9468d27bae9a588b028c765747493b5d169235e3d06d0cf107b4
-DIST patch.4.2.52.4 1311 BLAKE2B c1811a0ecdd580cad6f9d68276545f8cb7e42c26de06790df1346df3d65fc6ccd63f28bb206d3d7495db0d5153912284ac8705e9b3468897ecf528a35f97f505 SHA512 e2632944d82f5b6dcbbdfc237bdc37d5db736acd0284edfdb51fc0f3a9ca4fc6bcdb412bab325e62fc30d690f6963dfe53e6120cdda65dc403eff89d3a931287
-DIST patch.4.2.52.5 839 BLAKE2B 7a08473f822a2a0bdb595c817664c138078aca125481ffa7bdaad93e9b8236a9a5ffac7d9391a0fcedfea0abb52a33725402c899f0342ff09975f8e7c15c754d SHA512 5457bc4e433c8f12f34a764fcec1dfc9e832f960f518b21bd9116ec1b1130d9ad12373553e224d844e2b2de254470daf142120ff6d3125683a57f14a42a8e879
-DIST patch.4.3.29.1 835 BLAKE2B ac796fce9fcc4779629c3a77e55a026dd293a05135811ad434b10b9cbd5d05cb3ea7f04cdbf9778d863150978295e195e1b7dacd3f68c1f0815829930f437afe SHA512 c3dda4de68bff744dac5c96d1533032b2c8e8e0945f1a126b8aacdda322e05d1ec2e364eb7432ea1fb7366424ce155a9e58f84b9bee8e1ab4dd05a3313bcd8f7
-DIST patch.4.4.20.1 867 BLAKE2B 321fd297f9466632ddb4bf874221f98fd85856edf66d6f882b6ed9c742982ccc4d0fc00f9e9b6cccab1a573692fc51e700500db2d6a2b4b052dcd10edae73b05 SHA512 0fd501d219eb3de94c59e7b526c5031bba5dcc7dea4174545db5d688f33a5b4324aadd71e0e4eca3781592da0e90c1481c3b2d8f74612dfdff651c18d10eb2d7
-DIST patch.4.4.20.2 721 BLAKE2B 364c72016241ab36f1d086ca4dae62e9f8263aebb7cd758383b0adf8aeee5a0d45b0a7827ac5294c2d2ca8d9c8961959adce8ef23515c56b1253fe14d0fc44fc SHA512 4c497ce01c740c9c32b3a74946638c21b619cf057bbc8acaef24cb9f8d55d0d020d4cbc7775cb0cf07113c44981f076316cea14573fa08b49bc6352770bf5de6
-DIST patch.4.4.20.3 1366 BLAKE2B 4e6c9e4263af2da5debf85a6aa9a64c49c7da23b4fc8d568055c06bb2a6c04e204ccee95a987677ecc043678c7cd373a5d1d8f8f8f6aac79db3f58facc883616 SHA512 2b00acd823342083f0eaaf3b9659c811d05eebba67b39d9a9dbfa4a8fb56cded322e3f9028c57d83c75cb949a79f705cd8584df1630dd8cd3ad22a54c83baa91
-DIST patch.4.4.20.4 837 BLAKE2B f94feaab0190d76cf81b20b18826ca3e71329b4cb02a3666c6f073b3a2e36e4447cf583f554f35d085b3044bf66516e5479daa024cd637bc278269a05577bd10 SHA512 9aa464580cc1b402e594da56cdfc5e4d7c465f125b5f0cb312abbcdf72753bbf9ff14248657e0d354c93d7f1f89c7189e08060242c9a061033bb1016db640ceb
-DIST patch.4.5.20.1 984 BLAKE2B a2651bb0807c196a29834c2b7d1979a73fedb715bcbd4fd3fd0e0a108c1c0443715e656e4282c265cf200d61fe9cb4f4eeec4c9c924bb143eb53d0f07a445a5c SHA512 a8aff6f594e5413436a7ae5afe48286b0d397a247b2cd466f192eb6b4870fc68353c1ec1d0209cdd06640e09090b3d84ddb0fb709f8478ff3823e244c7f6cd3e
-DIST patch.4.5.20.2 1752 BLAKE2B 1d08a79a502552b842e248fbb214f27eb837bdcc99d61949702153bd245cc00b04ed8f34673543c79ec5da33334e57f8376ae53f8c68e510585c29d7ee08950a SHA512 b6af4b73e03b290595b6823e4d5c27da1b1bb5e66721ed5f0c6ecfec6595bcc56281340ec77fe6fb9432397adec0e292b31a5ee9d01870fb2955b8519017ffb7
-DIST patch.4.6.21.1 2475 BLAKE2B 6f4985d5388d81a4409ea7be4509b0ad695e0c8d3bff9d14cd8060d2dc332eac84f56af50a3b5c7efd09e987a8e1f06c7cae7aba7687cefa6caca95923b03a9c SHA512 9fe4991a59e409cb7df5b507efed7e443c05199b41646ea2d5d52de29513c8d27c2f3bf154a0170f04e12eaee6a622b945ae0f9789c3faaeb2ccea55f7a1ca2d
-DIST patch.4.6.21.2 892 BLAKE2B 95e6e6e431a4aeb3ec91df7f35d9c0b75696755249adae58730add46e62bf702916be605f4fc1016acb14ca3433b80ac8b9a7a0d444461bef57d042b7072d29b SHA512 e8570c0bee7522056f74cea73379fc13dae02258cffa78e540ee1c0433f368b3f856a21dc83017798120b3db7987c09e23af448153f0c024217df41a3e027347
-DIST patch.4.6.21.3 1517 BLAKE2B d717f6812ae71f1852ca9a6b558101196cb1f8eb0bb69ff2a385ffd255357f1d48df80ac99240655dd765e1be4d00bf2487a50501be47a22de238a5299be3914 SHA512 4da65c9414bd04d2efddd7d7855235f1276d827258971bf3ae175c73ab9c1b57a4f089b27e22928d1ed869e4e14cfde2f5e7c6a31ddf63c8dc582d0a2384cfcf
-DIST patch.4.6.21.4 41501 BLAKE2B 5cd304b53076ddd85a034c4d6313c8ea88b3aa8a202244825743fbd6bdc233f3549fe153b01affb021cf693a36c1b02ca47aa07596f7be80f3909aa40ef0c6aa SHA512 cb7819d7b1742f09af352e7563344abef27f1db1bbf04be049710abd26fb12eda142a08ff3cd3449b0a4a406141e39bbb0535f08bff051efbd261e7fbe5b53be
-DIST patch.4.7.25.1 2072 BLAKE2B 773fb96f9c5995cee22931fcd504b9962d0c3407f7b42392358ebcc79b15ad5b4c39526494aa5bac88219d1713b69e0a23f0c8eb5151c7817c1354e20a5e10aa SHA512 6f8618a3acc7ebc2839d2786d66c85904b8a9805319178175298239a9441550f1c61dda544d7994931e2aa412cdf5c209d8bb2f38207cebca341c556b97b9191
-DIST patch.4.7.25.2 2210 BLAKE2B 3e9727a4e006fa8e4502f1481a44144458401d0df0eeea26eb135b1979f330f354cd5016f56b86400118f13fe29a92798b0dcf19581738d3e9cf83b9be1ebb6d SHA512 d57746a527574966606955a8ad6b97742ff3979e85a0d087ae0c33b64b4fc2fd854f3ac145e2efc061b3479de5ee8172a02183cf54ada91fce3e331ab948ff18
-DIST patch.4.7.25.3 8442 BLAKE2B 666b643b3bf0d1e5ef5e445ae03228f436a5528bc197338c3c9bd468d7002bc81a16e295cf34fe6b38903e7f65c2c5c3cd9be0a3227f1122aeda22afc165e2a9 SHA512 815560c45c9c8491fd58d881a0bc1d23a82a13298d4757ed7d2ae4df4b88b278b8e4d6063eb46349a8f6f11ca9aa5b8555f3ce01df025715c2579dfa36241238
-DIST patch.4.7.25.4 5647 BLAKE2B 60ecb24fb137f7aeacb9689d8edc41791f78f96d1aa15c7fa47032371533d668c5dc12a5e1641945402f0e21f4e596cebb5010ac170ef462279b2efb887be020 SHA512 df9810034773a9d0556cbd174e4f131f0461402bf3f476ae5da1deb92f3e2e9ef789687c5cc5c2df6385f6b14251e893be225ffacd895d71dfb305b9de32567e
diff --git a/sys-libs/db/db-1.85-r4.ebuild b/sys-libs/db/db-1.85-r4.ebuild
deleted file mode 100644
index e643d4f2ed68..000000000000
--- a/sys-libs/db/db-1.85-r4.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs multilib
-
-DESCRIPTION="old berk db kept around for really old packages"
-HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-SRC_URI="http://download.oracle.com/berkeley-db/db.${PV}.tar.gz
- mirror://gentoo/${P}-r3.1.patch.bz2"
-# The patch used by Gentoo is from Fedora, and includes all 5 patches found on
-# the Oracle page, plus others.
-
-LICENSE="Sleepycat"
-SLOT="1"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86"
-IUSE=""
-
-DEPEND=""
-
-S="${WORKDIR}/db.${PV}"
-
-PATCHES=(
- "${WORKDIR}"/${P}-r3.1.patch
- "${FILESDIR}"/${P}-gentoo-paths.patch
-)
-
-src_prepare() {
- default
-
- sed -i \
- -e "s:@GENTOO_LIBDIR@:$(get_libdir):" \
- PORT/linux/Makefile || die
-}
-
-src_compile() {
- tc-export CC AR RANLIB
- emake -C PORT/linux OORG="${CFLAGS}"
-}
-
-src_install() {
- make -C PORT/linux install DESTDIR="${ED}" || die
-
- # binary compat symlink
- dosym libdb1.so.2 /usr/$(get_libdir)/libdb.so.2
-
- sed -e "s:<db.h>:<db1/db.h>:" \
- -i "${ED}"/usr/include/db1/ndbm.h || die
- dosym db1/ndbm.h /usr/include/ndbm.h
-
- dodoc changelog README
- newdoc hash/README README.hash
- docinto ps
- dodoc docs/*.ps
-}
diff --git a/sys-libs/db/db-18.1.32.ebuild b/sys-libs/db/db-18.1.32.ebuild
deleted file mode 100644
index c8d7486e83f8..000000000000
--- a/sys-libs/db/db-18.1.32.ebuild
+++ /dev/null
@@ -1,247 +0,0 @@
-# Copyright 1999-2020 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}/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
- mirror://gentoo/${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 ~s390 ~sparc ~x86"
-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.5 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.5 )"
-
-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}-18.1.25-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
-)
-
-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-disable-gold #470634
-
- # 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 userland_GNU ; 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
- 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-18.1.40.ebuild b/sys-libs/db/db-18.1.40.ebuild
deleted file mode 100644
index c4022d840e79..000000000000
--- a/sys-libs/db/db-18.1.40.ebuild
+++ /dev/null
@@ -1,244 +0,0 @@
-# Copyright 1999-2020 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 ~s390 ~sparc ~x86"
-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.5 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.5 )"
-
-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-disable-gold #470634
-
- # 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 userland_GNU ; 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
- 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-3.2.9_p2-r1.ebuild b/sys-libs/db/db-3.2.9_p2-r1.ebuild
deleted file mode 100644
index 804eb7f92543..000000000000
--- a/sys-libs/db/db-3.2.9_p2-r1.ebuild
+++ /dev/null
@@ -1,196 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit db flag-o-matic multilib
-
-#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
-
-DESCRIPTION="Berkeley DB for transaction support in MySQL"
-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="Sleepycat"
-SLOT="3"
-# This ebuild is to be the compatibility ebuild for when db4 is put
-# in the tree.
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86"
-IUSE="doc"
-RESTRICT="!test? ( test )"
-
-DEPEND="${RDEPEND}
- =sys-libs/db-1.85*"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- # Get db to link libdb* to correct dependencies ... for example if we use
- # NPTL or NGPT, db detects usable mutexes, and should link against
- # libpthread, but does not do so ...
- # <azarah@gentoo.org> (23 Feb 2003)
- "${FILESDIR}"/${MY_P}-fix-dep-link.patch
-
- "${FILESDIR}"/${MY_P}-gcc43.patch
-)
-
-pkg_setup() {
- # This doesn't build without exceptions
- replace-flags -fno-exceptions -fexceptions
-}
-
-src_prepare() {
- for (( i=1 ; i<=${PATCHNO} ; i++ ))
- do
- eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
- done
-
- default
-
- # We should get dump185 to link against system db1 ..
- # <azarah@gentoo.org> (23 Feb 2003)
- mv dist/Makefile.in{,.orig} || die
- sed \
- -e 's:DB185INC=:DB185INC= -I/usr/include/db1:' \
- -e 's:DB185LIB=:DB185LIB= -ldb1:' \
- dist/Makefile.in.orig \
- > dist/Makefile.in || die
-
- cd dist || die
- # remove config.guess else we have problems with gcc-3.2
- rm config.guess || die
- sed -i "s,\(-D_GNU_SOURCE\),\1 ${CFLAGS}," configure || die
-}
-
-src_configure() {
- local conf=(
- --host=${CHOST}
- --build=${CHOST}
- --enable-cxx
- --enable-compat185
- --enable-dump185
- )
-
- local conf_shared=(
- --disable-static
- --enable-shared
-
- # --enable-rpc DOES NOT BUILD
- # Robin H. Johnson <robbat2@gentoo.org> (18 Oct 2003)
- --enable-dynamic
- )
-
- local conf_static=(
- --disable-shared
- --enable-static
- )
-
- # TCL support is also broken
- # Robin H. Johnson <robbat2@gentoo.org> (18 Oct 2003)
- # conf_shared="${conf_shared}
- # `use_enable tcl tcl`
- # `use_with tcl tcl /usr/$(get_libdir)`"
-
- # NOTE: we should not build both shared and static versions
- # of the libraries in the same build root!
-
- einfo "Configuring ${P} (static)..."
- mkdir build-static || die
- pushd build-static &>/dev/null || die
- strip="${EPREFIX}"/bin/true \
- ECONF_SOURCE="${S}"/dist \
- econf "${conf[@]}" "${conf_static[@]}"
- popd &>/dev/null || die
-
- einfo "Configuring ${P} (shared)..."
- mkdir build-shared || die
- pushd build-shared &>/dev/null || die
- strip="${EPREFIX}"/bin/true \
- ECONF_SOURCE="${S}"/dist \
- econf "${conf[@]}" "${conf_shared[@]}"
- popd &>/dev/null || die
-}
-
-src_compile() {
- # Parallel make does not work
- MAKEOPTS="${MAKEOPTS} -j1"
-
- einfo "Building ${P} (static)..."
- pushd "${S}"/build-static &>/dev/null || die
- emake strip="${EPREFIX}"/bin/true
- popd &>/dev/null || die
-
- einfo "Building ${P} (shared)..."
- pushd build-shared &>/dev/null || die
- emake strip="${EPREFIX}"/bin/true
- popd &>/dev/null || die
-}
-
-src_install() {
- pushd build-shared &>/dev/null || die
- # build system does not support DESTDIR
- emake \
- libdb=libdb-3.2.a \
- libcxx=libcxx_3.2.a \
- DESTDIR="${D}" \
- prefix="${ED}"/usr \
- libdir="${ED}"/usr/$(get_libdir) \
- strip="${EPREFIX}"/bin/true \
- install
- popd &>/dev/null || die
-
- pushd build-static &>/dev/null || die
- newlib.a libdb.a libdb-3.2.a
- newlib.a libdb_cxx.a libdb_cxx-3.2.a
- popd &>/dev/null || die
-
- db_src_install_headerslot || die "db_src_install_headerslot failed!"
-
- # this is now done in the db eclass, function db_fix_so and db_src_install_usrlibcleanup
- #cd "${D}"/usr/lib
- #ln -s libdb-3.2.so libdb.so.3
-
- # For some reason, db.so's are *not* readable by group or others,
- # resulting in no one but root being able to use them!!!
- # This fixes it -- DR 15 Jun 2001
- pushd "${ED}"/usr/$(get_libdir) &>/dev/null || die
- chmod go+rx *.so
- # The .la's aren't readable either
- chmod go+r *.la
- popd &>/dev/null || die
-
- dodoc README
-
- db_src_install_doc || die "db_src_install_doc failed!"
-
- db_src_install_usrbinslot || die "db_src_install_usrbinslot failed!"
-
- db_src_install_usrlibcleanup || die "db_src_install_usrlibcleanup failed!"
-}
-
-pkg_postinst() {
- db_fix_so
-}
-
-pkg_postrm() {
- db_fix_so
-}
-
-src_test() {
- if use test; then
- eerror "We'd love to be able to test, but the testsuite is broken in the 3.2.9 series"
- fi
-}
diff --git a/sys-libs/db/db-4.2.52_p5-r3.ebuild b/sys-libs/db/db-4.2.52_p5-r3.ebuild
deleted file mode 100644
index dd191ead6b9f..000000000000
--- a/sys-libs/db/db-4.2.52_p5-r3.ebuild
+++ /dev/null
@@ -1,185 +0,0 @@
-# Copyright 1999-2020 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
-
-#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
- export SRC_URI="${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="tcl java doc cxx"
-RESTRICT="!test? ( test )"
-
-DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
- java? ( >=virtual/jdk-1.4 )"
-RDEPEND="tcl? ( dev-lang/tcl )
- java? ( >=virtual/jre-1.4 )"
-
-PATCHES=(
- "${FILESDIR}"/"${PN}"-4.2.52_p2-TXN.patch
- "${FILESDIR}"/"${PN}"-"${SLOT}"-libtool.patch
-
- # use the includes from the prefix
- "${FILESDIR}"/"${PN}"-"${SLOT}"-jni-check-prefix-first.patch
- "${FILESDIR}"/"${PN}"-"${SLOT}"-listen-to-java-options.patch
- "${FILESDIR}"/"${PN}"-4.0.14-fix-dep-link.patch
-)
-
-# Required to avoid unpack attempt of patches
-src_unpack() {
- unpack ${MY_P}.tar.gz
-}
-
-src_prepare() {
- pushd "${WORKDIR}/${MY_P}" &>/dev/null || 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
-
- # 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
-
- # START of 4.5+earlier specific
- # Upstream sucks, they normally concat these
- local i j
- for j in dist/aclocal{,_java} ; do
- pushd ${j} &>/dev/null || die
- for i in * ; do
- ln -s ${i} ${i%.ac}.m4 || die
- done
- popd &>/dev/null || die
- done
- # END of 4.5+earlier specific
- pushd dist &>/dev/null || die
- rm aclocal/libtool.{m4,ac} || die
- sed \
- -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
- -i configure.ac || die
- sed \
- -e '/^AC_PATH_TOOL/s/ sh, missing_sh/ bash, missing_sh/' \
- -i aclocal/programs.m4 || die
-
- AT_M4DIR="aclocal aclocal_java" eautoreconf
-
- # Upstream sucks - 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
-
- popd &>/dev/null || die
- popd &>/dev/null || die
-}
-
-src_configure() {
- local myconf=(
- --enable-compat185
- --with-uniquename
- --disable-rpc
- --host="${CHOST}"
-
- $(usex amd64 '--with-mutex=x86/gcc-assembly' '')
- $(use_enable cxx)
- $(use_enable tcl)
- $(usex tcl "--with-tcl=${EPREFIX}/usr/$(get_libdir)" '') #"
- $(use_enable java)
- )
-
- if use java; then
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
-
- # the entire testsuite needs the TCL functionality
- if use tcl && use test; then
- myconf+=( --enable-test )
- else
- myconf+=( --disable-test )
- fi
-
- ECONF_SOURCE="${S}"/../dist \
- econf "${myconf[@]}"
-}
-
-src_compile() {
- # This isn't safe for prefix (Darwin should be .jnilib), but I can't get the
- # build system to behave itself, it generates libtool too late.
- sed \
- -e 's/-shrext $(SOFLAGS)/-shrext .so $(SOFLAGS)/g' \
- -i Makefile || die
- emake
-}
-
-src_install() {
- emake \
- DESTDIR="${D}" \
- libdir="${EPREFIX}/usr/$(get_libdir)" \
- strip="${EPREFIX}/bin/strip" \
- install
-
- db_src_install_usrbinslot
-
- db_src_install_headerslot
-
- db_src_install_doc
-
- db_src_install_usrlibcleanup
-
- 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
-
- if 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
-}
-
-pkg_postinst() {
- db_fix_so
-}
-
-pkg_postrm() {
- db_fix_so
-}
diff --git a/sys-libs/db/db-4.3.29_p1-r3.ebuild b/sys-libs/db/db-4.3.29_p1-r3.ebuild
deleted file mode 100644
index b2852ed59b78..000000000000
--- a/sys-libs/db/db-4.3.29_p1-r3.ebuild
+++ /dev/null
@@ -1,184 +0,0 @@
-# Copyright 1999-2020 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
-
-#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
- export SRC_URI="${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 s390 sparc x86"
-IUSE="tcl java doc cxx"
-RESTRICT="!test? ( test )"
-
-DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
- java? ( >=virtual/jdk-1.4 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( dev-lang/tcl )
- java? ( >=virtual/jre-1.4 )"
-
-PATCHES=(
- "${FILESDIR}"/"${PN}"-"${SLOT}"-libtool.patch
-
- # use the includes from the prefix
- "${FILESDIR}"/"${PN}"-4.2-jni-check-prefix-first.patch
- "${FILESDIR}"/"${PN}"-4.2-listen-to-java-options.patch
-
- "${FILESDIR}"/"${PN}"-4.3.27-fix-dep-link.patch
-)
-
-# Required to avoid unpack attempt of patches
-src_unpack() {
- unpack "${MY_P}".tar.gz
-}
-
-src_prepare() {
- pushd "${WORKDIR}"/"${MY_P}" &>/dev/null || 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
-
- # 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
-
- # START of 4.5+earlier specific
- # Upstream sucks, they normally concat these
- local i j
- for j in dist/aclocal{,_java} ; do
- pushd ${j} &>/dev/null || die
- for i in * ; do
- ln -s ${i} ${i%.ac}.m4 || die
- done
- popd &>/dev/null || die
- done
- # END of 4.5+earlier specific
-
- pushd dist &>/dev/null || die
- rm aclocal/libtool.{m4,ac} || die
- sed \
- -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
- -i configure.ac || die
- sed \
- -e '/^AC_PATH_TOOL/s/ sh, missing_sh/ bash, missing_sh/' \
- -i aclocal/programs.m4 || die
-
- AT_M4DIR="aclocal aclocal_java" eautoreconf
-
- # Upstream sucks - 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
- popd &>/dev/null || die
- popd &>/dev/null || die
-}
-
-src_configure() {
- local myconf=(
- --enable-compat185
- --enable-o_direct
- --without-uniquename
- --disable-rpc
- --host="${CHOST}"
-
- $(usex amd64 '--with-mutex=x86/gcc-assembly' '')
- $(use_enable cxx)
- $(use_enable tcl)
- $(usex tcl "--with-tcl=${EPREFIX}/usr/$(get_libdir)" '') #"
- $(use_enable java)
- )
-
- if use java; then
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
-
- # the entire testsuite needs the TCL functionality
- if use tcl && use test ; then
- myconf+=( --enable-test )
- else
- myconf+=( --disable-test )
- fi
-
- # Add linker versions to the symbols. Easier to do, and safer than header
- # file mumbo jumbo.
- if use userland_GNU; then
- append-ldflags -Wl,--default-symver
- fi
-
- ECONF_SOURCE="${S}"/../dist \
- econf "${myconf[@]}"
-}
-
-src_install() {
- emake \
- DESTDIR="${D}" \
- libdir="${EPREFIX}/usr/$(get_libdir)" \
- strip="${EPREFIX}/bin/strip" \
- install
-
- db_src_install_usrbinslot
-
- db_src_install_headerslot
-
- db_src_install_doc
-
- db_src_install_usrlibcleanup
-
- 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
-
- if 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
-}
-
-pkg_postinst() {
- db_fix_so
-}
-
-pkg_postrm() {
- db_fix_so
-}
diff --git a/sys-libs/db/db-4.4.20_p4-r3.ebuild b/sys-libs/db/db-4.4.20_p4-r3.ebuild
deleted file mode 100644
index dfdea3ae9c22..000000000000
--- a/sys-libs/db/db-4.4.20_p4-r3.ebuild
+++ /dev/null
@@ -1,178 +0,0 @@
-# Copyright 1999-2020 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
-
-#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
- mirror://gentoo/${MY_P}-20060110-rpc_server-java.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="Sleepycat BSD"
-SLOT="$(ver_cut 1-2)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE="tcl java doc cxx"
-RESTRICT="!test? ( test )"
-
-DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
- java? ( >=virtual/jdk-1.4 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( dev-lang/tcl )
- java? ( >=virtual/jre-1.4 )"
-
-PATCHES=(
- "${FILESDIR}"/"${PN}"-"${SLOT}"-libtool.patch
-
- # use the includes from the prefix
- "${FILESDIR}"/"${PN}"-4.2-jni-check-prefix-first.patch
- "${FILESDIR}"/"${PN}"-4.2-listen-to-java-options.patch
-)
-
-# Required to avoid unpack attempt of patches
-src_unpack() {
- unpack "${MY_P}".tar.gz
- unpack "${MY_P}-20060110-rpc_server-java".tar.gz
-}
-
-src_prepare() {
- pushd "${WORKDIR}"/"${MY_P}" &>/dev/null || 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
-
- # 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
-
- # START of 4.5+earlier specific
- # Upstream sucks, they normally concat these
- local i j
- for j in dist/aclocal{,_java} ; do
- pushd ${j} &>/dev/null || die
- for i in * ; do
- ln -s ${i} ${i%.ac}.m4 || die
- done
- popd &>/dev/null || die
- done
- # END of 4.5+earlier specific
- pushd dist &>/dev/null || die
- rm aclocal/libtool.{m4,ac} || die
-
- AT_M4DIR="aclocal aclocal_java" eautoreconf
-
- # Upstream sucks - 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
-
- popd &>/dev/null || die
- popd &>/dev/null || die
-}
-
-src_configure() {
- local myconf=(
- --enable-compat185
- --enable-o_direct
- --without-uniquename
- --disable-rpc
- --host="${CHOST}"
-
- $(usex amd64 '--with-mutex=x86/gcc-assembly' '')
- $(use_enable cxx)
- $(use_enable tcl)
- $(usex tcl "--with-tcl=${EPREFIX}/usr/$(get_libdir)" '') #"
- $(use_enable java)
- )
-
- if use java; then
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
-
- # the entire testsuite needs the TCL functionality
- if use tcl && use test ; then
- myconf+=( --enable-test )
- else
- myconf+=( --disable-test )
- fi
-
- # Add linker versions to the symbols. Easier to do, and safer than header file
- # mumbo jumbo.
- if use userland_GNU; then
- append-ldflags -Wl,--default-symver
- fi
-
- ECONF_SOURCE="${S}"/../dist \
- econf "${myconf[@]}"
-}
-
-src_install() {
- emake \
- DESTDIR="${D}" \
- libdir="${EPREFIX}/usr/$(get_libdir)" \
- strip="${EPREFIX}/bin/strip" \
- install
-
- db_src_install_usrbinslot
-
- db_src_install_headerslot
-
- db_src_install_doc
-
- db_src_install_usrlibcleanup
-
- 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
-
- if 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
-}
-
-pkg_postinst() {
- db_fix_so
-}
-
-pkg_postrm() {
- db_fix_so
-}
diff --git a/sys-libs/db/db-4.5.20_p2-r3.ebuild b/sys-libs/db/db-4.5.20_p2-r3.ebuild
deleted file mode 100644
index 0167e85d91b2..000000000000
--- a/sys-libs/db/db-4.5.20_p2-r3.ebuild
+++ /dev/null
@@ -1,190 +0,0 @@
-# Copyright 1999-2020 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
-
-#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
- export SRC_URI="${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="tcl java doc cxx"
-RESTRICT="!test? ( test )"
-
-DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
- java? ( >=virtual/jdk-1.4 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( dev-lang/tcl )
- java? ( >=virtual/jre-1.4 )"
-
-PATCHES=(
- "${FILESDIR}"/"${PN}"-4.4-libtool.patch
-
- # use the includes from the prefix
- "${FILESDIR}"/"${PN}"-4.2-jni-check-prefix-first.patch
- "${FILESDIR}"/"${PN}"-4.2-listen-to-java-options.patch
-)
-
-# Required to avoid unpack attempt of patches
-src_unpack() {
- unpack "${MY_P}".tar.gz
-}
-
-src_prepare() {
- pushd "${WORKDIR}"/"${MY_P}" &>/dev/null || 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
-
- # 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
-
- # START of 4.5+earlier specific
- # Upstream sucks, they normally concat these
- local i j
- for j in dist/aclocal{,_java} ; do
- pushd ${j} &>/dev/null || die
- for i in * ; do
- ln -s ${i} ${i%.ac}.m4 || die
- done
- popd &>/dev/null || die
- done
- # END of 4.5+earlier specific
- pushd dist &>/dev/null || die
- rm aclocal/libtool.{m4,ac} || 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 aclocal_java" eautoreconf
-
- # Upstream sucks - 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
-
- popd &>/dev/null || die
- popd &>/dev/null || die
-}
-
-src_configure() {
- # compilation with -O0 fails on amd64, see bug #171231
- if use amd64 ; then
- replace-flags -O0 -O2
- is-flagq -O[s123] || append-flags -O2
- fi
-
- local myconf=(
- --enable-compat185
- --enable-o_direct
- --without-uniquename
- --disable-rpc
- --host="${CHOST}"
-
- $(usex amd64 '--with-mutex=x86/gcc-assembly' '')
- $(use_enable cxx)
- $(use_enable tcl)
- $(usex tcl "--with-tcl=${EPREFIX}/usr/$(get_libdir)" '') #"
- $(use_enable java)
- )
-
- if use java; then
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
-
- # the entire testsuite needs the TCL functionality
- if use tcl && use test ; then
- myconf+=( --enable-test )
- else
- myconf+=( --disable-test )
- fi
-
- # Add linker versions to the symbols. Easier to do, and safer than header file
- # mumbo jumbo.
- if use userland_GNU; then
- append-ldflags -Wl,--default-symver
- fi
-
- ECONF_SOURCE="${S}"/../dist \
- econf "${myconf[@]}"
-
- sed -e "s,\(^STRIP *=\).*,\1\"true\"," -i Makefile || die
-}
-
-src_install() {
- emake \
- DESTDIR="${D}" \
- libdir="${EPREFIX}/usr/$(get_libdir)" \
- STRIP="true" \
- install
-
- db_src_install_usrbinslot
-
- db_src_install_headerslot
-
- db_src_install_doc
-
- db_src_install_usrlibcleanup
-
- 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
-
- if 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
-}
-
-pkg_postinst() {
- db_fix_so
-}
-
-pkg_postrm() {
- db_fix_so
-}
diff --git a/sys-libs/db/db-4.6.21_p4-r2.ebuild b/sys-libs/db/db-4.6.21_p4-r2.ebuild
deleted file mode 100644
index e0038732223a..000000000000
--- a/sys-libs/db/db-4.6.21_p4-r2.ebuild
+++ /dev/null
@@ -1,179 +0,0 @@
-# Copyright 1999-2020 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
-
-#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
- export SRC_URI="${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="tcl java doc cxx"
-RESTRICT="!test? ( test )"
-
-DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
- java? ( >=virtual/jdk-1.4 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( dev-lang/tcl )
- java? ( >=virtual/jre-1.4 )"
-
-PATCHES=(
- "${FILESDIR}"/"${PN}"-4.4-libtool.patch
-
- # use the includes from the prefix
- "${FILESDIR}"/"${PN}"-"${SLOT}"-jni-check-prefix-first.patch
- "${FILESDIR}"/"${PN}"-4.2-listen-to-java-options.patch
-)
-
-# Required to avoid unpack attempt of patches
-src_unpack() {
- unpack "${MY_P}".tar.gz
-}
-
-src_prepare() {
- pushd "${WORKDIR}"/"${MY_P}" &>/dev/null || 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
-
- # 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
-
- pushd dist &>/dev/null || 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 aclocal_java" eautoreconf
-
- # Upstream sucks - 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
-
- popd &>/dev/null || die
- popd &>/dev/null || die
-}
-
-src_configure() {
- # compilation with -O0 fails on amd64, see bug #171231
- if use amd64 ; then
- replace-flags -O0 -O2
- is-flagq -O[s123] || append-flags -O2
- fi
-
- local myconf=(
- --enable-compat185
- --enable-o_direct
- --without-uniquename
- --disable-rpc
- --host="${CHOST}"
-
- $(usex amd64 '--with-mutex=x86/gcc-assembly' '')
- $(use_enable cxx)
- $(use_enable tcl)
- $(usex tcl "--with-tcl=${EPREFIX}/usr/$(get_libdir)" '') #"
- $(use_enable java)
- )
-
- if use java; then
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
-
- # the entire testsuite needs the TCL functionality
- if use tcl && use test ; then
- myconf+=( --enable-test )
- else
- myconf+=( --disable-test )
- fi
-
- # Add linker versions to the symbols. Easier to do, and safer than header file
- # mumbo jumbo.
- if use userland_GNU; then
- append-ldflags -Wl,--default-symver
- fi
-
- ECONF_SOURCE="${S}"/../dist \
- econf "${myconf[@]}"
-
- sed -e "s,\(^STRIP *=\).*,\1\"true\"," -i Makefile || die
-}
-
-src_install() {
- emake \
- DESTDIR="${D}" \
- libdir="${EPREFIX}/usr/$(get_libdir)" \
- STRIP="true" \
- install
-
- db_src_install_usrbinslot
-
- db_src_install_headerslot
-
- db_src_install_doc
-
- db_src_install_usrlibcleanup
-
- 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
-
- if 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
-}
-
-pkg_postinst() {
- db_fix_so
-}
-
-pkg_postrm() {
- db_fix_so
-}
diff --git a/sys-libs/db/db-4.8.30-r3.ebuild b/sys-libs/db/db-4.8.30-r8.ebuild
index 11a3e2639681..7d3883eeb360 100644
--- a/sys-libs/db/db-4.8.30-r3.ebuild
+++ b/sys-libs/db/db-4.8.30-r8.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2020 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,45 +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.5 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.5 )"
+ 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
@@ -64,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 \
@@ -79,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" \
@@ -93,20 +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-disable-gold #470634
-
# compilation with -O0 fails on amd64, see bug #171231
if [[ ${ABI} == amd64 ]]; then
local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
@@ -116,17 +108,7 @@ multilib_src_configure() {
# Add linker versions to the symbols. Easier to do, and safer than header file
# mumbo jumbo.
- if use userland_GNU ; 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
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
+ append-ldflags -Wl,--default-symver
# Bug #270851: test needs TCL support
if use tcl || use test ; then
@@ -138,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.
@@ -163,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() {
@@ -182,6 +156,9 @@ multilib_src_install_all() {
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() {
diff --git a/sys-libs/db/db-4.7.25_p4-r2.ebuild b/sys-libs/db/db-4.8.30-r9.ebuild
index 51fc314037da..ac50491119bd 100644
--- a/sys-libs/db/db-4.7.25_p4-r2.ebuild
+++ b/sys-libs/db/db-4.8.30-r9.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2020 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
+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,61 +17,48 @@ 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 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
-DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
- test? ( >=dev-lang/tcl-8.4 )
- java? ( >=virtual/jdk-1.5 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( dev-lang/tcl )
- java? ( >=virtual/jre-1.5 )"
+# 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.4-libtool.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-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
)
-# Required to avoid unpack attempt of patches
-src_unpack() {
- unpack "${MY_P}".tar.gz
-}
-
src_prepare() {
- pushd "${WORKDIR}"/"${MY_P}" &>/dev/null || die
- for (( i=1 ; i<=${PATCHNO} ; i++ ))
- do
+ 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
-
- # 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
+ sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE \
+ || die
- pushd dist &>/dev/null || die
+ cd dist || die
rm aclocal/libtool.m4 || die
sed \
-e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
@@ -80,9 +67,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,76 +79,77 @@ src_prepare() {
-e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
-e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \
-i configure || die
-
- popd &>/dev/null || die
- popd &>/dev/null || die
}
src_configure() {
- # compilation with -O0 fails on amd64, see bug #171231
- if use amd64 ; then
- replace-flags -O0 -O2
- is-flagq -O[s123] || append-flags -O2
- fi
+ # 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-rpc
-
- $(usex amd64 '--with-mutex=x86/gcc-assembly' '')
+ --disable-static
+ --disable-java
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
$(use_enable cxx)
- $(use_enable tcl)
- $(usex tcl "--with-tcl=${EPREFIX}/usr/$(get_libdir)" '') #"
- $(use_enable java)
+ $(use_enable cxx stl)
$(use_enable test)
)
- if 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+=( --enable-test )
- else
- myconf+=( --disable-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.
- if use userland_GNU ; then
- append-ldflags -Wl,--default-symver
+ 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[@]}"
+ 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.
}
-src_install() {
- emake DESTDIR="${D}" install
+multilib_src_test() {
+ multilib_is_native_abi || return
- db_src_install_usrbinslot
+ S="${BUILD_DIR}" db_src_test
+}
- db_src_install_headerslot
+multilib_src_install() {
+ emake install DESTDIR="${D}"
- db_src_install_doc
+ 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
@@ -170,17 +158,14 @@ src_install() {
"${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
fi
- if 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
+ # no static libraries
+ find "${ED}" -name '*.la' -delete || die
}
pkg_postinst() {
- db_fix_so
+ multilib_foreach_abi db_fix_so
}
pkg_postrm() {
- db_fix_so
+ multilib_foreach_abi db_fix_so
}
diff --git a/sys-libs/db/db-5.3.28-r4.ebuild b/sys-libs/db/db-5.3.28-r10.ebuild
index e675393c8b4b..a25371a07960 100644
--- a/sys-libs/db/db-5.3.28-r4.ebuild
+++ b/sys-libs/db/db-5.3.28-r10.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2020 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,36 +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.5 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.5 )"
+ 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
@@ -64,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() {
@@ -84,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 \
@@ -99,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 \
@@ -120,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 +131,14 @@ multilib_src_configure() {
--disable-sql
--disable-sql_codegen
--disable-sql_compat
+ --disable-static
+ --disable-java
$([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
$(use_enable cxx)
$(use_enable cxx stl)
- $(multilib_native_use_enable java)
$(use_enable test)
)
- tc-ld-disable-gold #470634
-
# compilation with -O0 fails on amd64, see bug #171231
if [[ ${ABI} == amd64 ]]; then
local CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
@@ -151,16 +148,7 @@ multilib_src_configure() {
# Add linker versions to the symbols. Easier to do, and safer than header file
# mumbo jumbo.
- if use userland_GNU ; then
- append-ldflags -Wl,--default-symver
- fi
-
- if multilib_is_native_abi && use java ; then
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
+ append-ldflags -Wl,--default-symver
# Bug #270851: test needs TCL support
if use tcl || use test ; then
@@ -191,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() {
@@ -210,6 +192,9 @@ multilib_src_install_all() {
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() {
diff --git a/sys-libs/db/db-5.3.28-r2.ebuild b/sys-libs/db/db-5.3.28-r9.ebuild
index fed3b53efbf0..09d3ce82c642 100644
--- a/sys-libs/db/db-5.3.28-r2.ebuild
+++ b/sys-libs/db/db-5.3.28-r9.ebuild
@@ -1,19 +1,19 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal 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,120 +24,130 @@ 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="5.3"
-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 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.5 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.5 )"
+ 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/db5.3/db.h
+ /usr/include/db${SLOT}/db.h
)
-src_prepare() {
- cd "${WORKDIR}"/"${MY_P}"
- for (( i=1 ; i<=${PATCHNO} ; i++ ))
- do
- epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
- done
-
- # bug #510506
- epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
-
- # use the includes from the prefix
- epatch "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
- epatch "${FILESDIR}"/${PN}-4.2-listen-to-java-options.patch
-
+PATCHES=(
# sqlite configure call has an extra leading ..
# upstreamed:5.2.36, missing in 5.3.x
- epatch "${FILESDIR}"/${PN}-5.2.28-sqlite-configure-path.patch
+ "${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.
- epatch "${FILESDIR}"/${PN}-6.0.20-test-link.patch
+ "${FILESDIR}"/${PN}-6.0.20-test-link.patch
# Needed when compiling with clang
- epatch "${FILESDIR}"/${PN}-5.1.29-rename-atomic-compare-exchange.patch
+ "${FILESDIR}"/${PN}-5.1.29-rename-atomic-compare-exchange.patch
+ "${FILESDIR}"/${PN}-5.3.28-clang16.patch
+)
+
+src_prepare() {
+ cd "${S_BASE}" || die
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ default
# Upstream release script grabs the dates when the script was run, so lets
# end-run them to keep the date the same.
export REAL_DB_RELEASE_DATE="$(awk \
'/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
"${S_BASE}"/dist/configure)"
- sed -r -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
}
-multilib_src_configure() {
- local myconf=()
+src_configure() {
+ # Force bfd before calling multilib_toolchain_setup
+ tc-ld-force-bfd #470634 #729510
+ multilib-minimal_src_configure
+}
- tc-ld-disable-gold #470634
+multilib_src_configure() {
+ local myconf=(
+ # sql_compat will cause a collision with sqlite3
+ #--enable-sql_compat
+ # Don't --enable-sql* because we don't want to use bundled sqlite.
+ # See Gentoo bug #605688
+ --enable-compat185
+ --enable-dbm
+ --enable-o_direct
+ --without-uniquename
+ --disable-sql
+ --disable-sql_codegen
+ --disable-sql_compat
+ --disable-static
+ --disable-java
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
+ $(use_enable cxx)
+ $(use_enable cxx stl)
+ $(use_enable test)
+ )
# compilation with -O0 fails on amd64, see bug #171231
if [[ ${ABI} == amd64 ]]; then
- local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ 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 userland_GNU ; 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
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
+ append-ldflags -Wl,--default-symver
# Bug #270851: test needs TCL support
if use tcl || use test ; then
@@ -149,24 +159,10 @@ multilib_src_configure() {
myconf+=(--disable-tcl )
fi
- # sql_compat will cause a collision with sqlite3
- # --enable-sql_compat
ECONF_SOURCE="${S_BASE}"/dist \
STRIP="true" \
- econf \
- --enable-compat185 \
- --enable-dbm \
- --enable-o_direct \
- --without-uniquename \
- --enable-sql \
- --enable-sql_codegen \
- --disable-sql_compat \
- $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
- $(use_enable cxx) \
- $(use_enable cxx stl) \
- $(multilib_native_use_enable java) \
- "${myconf[@]}" \
- $(use_enable test)
+ 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:
@@ -177,17 +173,11 @@ multilib_src_configure() {
}
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() {
@@ -201,6 +191,9 @@ multilib_src_install_all() {
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() {
@@ -219,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.
@@ -231,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
}
@@ -242,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-5.1.29-r2.ebuild b/sys-libs/db/db-6.0.35-r4.ebuild
index 210615eeed80..422b7e8188a8 100644
--- a/sys-libs/db/db-5.1.29-r2.ebuild
+++ b/sys-libs/db/db-6.0.35-r4.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2020 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 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,38 +24,36 @@ 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"
+LICENSE="AGPL-3"
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 ~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.4:0 )
- test? ( >=dev-lang/tcl-8.4:0 )
- java? ( >=virtual/jdk-1.5 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( dev-lang/tcl:0 )
- java? ( >=virtual/jre-1.5 )"
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )"
+# Need binutils for tc-ld-force-bfd
+BDEPEND="sys-devel/binutils:*"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/db${SLOT}/db.h
+)
PATCHES=(
- "${FILESDIR}"/${PN}-4.8-libtool.patch
- "${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
-
- # upstream autoconf fails to build DBM when it's supposed to
- # merged upstream in 5.0.26
- #"${FILESDIR}"/${PN}-5.0.21-enable-dbm-autoconf.patch
-
- # Needed when compiling with clang
- "${FILESDIR}"/${P}-rename-atomic-compare-exchange.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.0.35-sqlite-configure-path.patch
+
+ # The upstream testsuite copies .lib and the binaries for each parallel test
+ # core, ~300MB each. This patch uses links instead, saves a lot of space.
+ "${FILESDIR}"/${PN}-6.0.20-test-link.patch
)
src_prepare() {
@@ -76,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 \
@@ -91,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 \
@@ -113,41 +105,38 @@ src_prepare() {
}
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-dbm
--enable-o_direct
--without-uniquename
- --enable-sql
- --enable-sql_codegen
+ --disable-sql
+ --disable-sql_codegen
--disable-sql_compat
- $(use amd64 && echo --with-mutex=x86/gcc-assembly)
+ --disable-static
+ --disable-java
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
$(use_enable cxx)
$(use_enable cxx stl)
- $(use_enable java)
$(use_enable test)
)
- tc-ld-disable-gold #470634
-
# compilation with -O0 fails on amd64, see bug #171231
- if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
replace-flags -O0 -O2
is-flagq -O[s123] || append-flags -O2
fi
- if use java ; then
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
-
# Add linker versions to the symbols. Easier to do, and safer than header file
# mumbo jumbo.
- if use userland_GNU ; then
- append-ldflags -Wl,--default-symver
- fi
+ append-ldflags -Wl,--default-symver
# Bug #270851: test needs TCL support
if use tcl || use test ; then
@@ -156,13 +145,13 @@ src_configure() {
--with-tcl="${EPREFIX}/usr/$(get_libdir)"
)
else
- myconf+=( --disable-tcl )
+ myconf+=(--disable-tcl )
fi
# sql_compat will cause a collision with sqlite3
# --enable-sql_compat
- cd "${S}" || die
-
+ # Don't --enable-sql* because we don't want to use bundled sqlite.
+ # See Gentoo bug #605688
ECONF_SOURCE="${S_BASE}"/dist \
STRIP="true" \
econf "${myconf[@]}"
@@ -176,16 +165,18 @@ src_configure() {
# >=db-6.1 uses LDREX instead.
}
-src_install() {
+multilib_src_install() {
emake DESTDIR="${D}" install
- db_src_install_usrbinslot
-
db_src_install_headerslot
- db_src_install_doc
-
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
@@ -194,19 +185,16 @@ src_install() {
"${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
fi
- if 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
+ # no static libraries
+ find "${ED}" -name '*.la' -delete || die
}
pkg_postinst() {
- db_fix_so
+ multilib_foreach_abi db_fix_so
}
pkg_postrm() {
- db_fix_so
+ multilib_foreach_abi db_fix_so
}
src_test() {
@@ -214,12 +202,31 @@ 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"
+ # -i "${S_BASE}/test/testparams.tcl"
sed -r \
-e '/multi_repmgr/d' \
-i "${S_BASE}/test/tcl/test.tcl" || die
- db_src_test
+ # This is the only failure in 5.2.28 so far, and looks like a false positive.
+ # Repmgr018 (btree): Test of repmgr stats.
+ # Repmgr018.a: Start a master.
+ # Repmgr018.b: Start a client.
+ # Repmgr018.c: Run some transactions at master.
+ # Rep_test: btree 20 key/data pairs starting at 0
+ # Rep_test.a: put/get loop
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
+ sed -r \
+ -e '/set parms.*repmgr018/d' \
+ -e 's/repmgr018//g' \
+ -i "${S_BASE}/test/tcl/test.tcl" || die
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S="${BUILD_DIR}" db_src_test
}
diff --git a/sys-libs/db/db-6.0.35-r2.ebuild b/sys-libs/db/db-6.0.35-r5.ebuild
index 9b1696e96c3c..f59d3811f5a4 100644
--- a/sys-libs/db/db-6.0.35-r2.ebuild
+++ b/sys-libs/db/db-6.0.35-r5.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2020 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,36 +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 ~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.5 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.5 )"
+ 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
@@ -62,6 +54,8 @@ PATCHES=(
# 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() {
@@ -82,12 +76,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 \
@@ -97,9 +85,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 \
@@ -118,6 +106,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 +121,14 @@ multilib_src_configure() {
--disable-sql
--disable-sql_codegen
--disable-sql_compat
+ --disable-static
+ --disable-java
$([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
$(use_enable cxx)
$(use_enable cxx stl)
- $(multilib_native_use_enable java)
$(use_enable test)
)
- tc-ld-disable-gold #470634
-
# compilation with -O0 fails on amd64, see bug #171231
if [[ ${ABI} == amd64 ]]; then
local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
@@ -145,17 +138,7 @@ multilib_src_configure() {
# Add linker versions to the symbols. Easier to do, and safer than header file
# mumbo jumbo.
- if use userland_GNU ; 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
- myconf+=(
- --with-java-prefix="${JAVA_HOME}"
- --with-javac-flags="$(java-pkg_javac-args)"
- )
- fi
+ append-ldflags -Wl,--default-symver
# Bug #270851: test needs TCL support
if use tcl || use test ; then
@@ -190,12 +173,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() {
@@ -209,6 +186,9 @@ multilib_src_install_all() {
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() {
diff --git a/sys-libs/db/db-6.1.38.ebuild b/sys-libs/db/db-6.1.38.ebuild
deleted file mode 100644
index 3609e94268bb..000000000000
--- a/sys-libs/db/db-6.1.38.ebuild
+++ /dev/null
@@ -1,244 +0,0 @@
-# Copyright 1999-2020 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"
-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.5 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.5 )"
-
-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-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
- $([[ ${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-disable-gold #470634
-
- # 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 userland_GNU ; 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
-}
-
-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-6.2.38.ebuild b/sys-libs/db/db-6.2.38.ebuild
deleted file mode 100644
index 965668160fc0..000000000000
--- a/sys-libs/db/db-6.2.38.ebuild
+++ /dev/null
@@ -1,244 +0,0 @@
-# Copyright 1999-2020 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"
-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.5 )
- >=sys-devel/binutils-2.16.1"
-RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
- java? ( >=virtual/jre-1.5 )"
-
-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
- $([[ ${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-disable-gold #470634
-
- # 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 userland_GNU ; 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
-}
-
-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-1.85-gentoo-paths.patch b/sys-libs/db/files/db-1.85-gentoo-paths.patch
deleted file mode 100644
index 8154300f67bc..000000000000
--- a/sys-libs/db/files/db-1.85-gentoo-paths.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/PORT/linux/Makefile
-+++ b/PORT/linux/Makefile
-@@ -1,12 +1,12 @@
- # @(#)Makefile 8.9 (Berkeley) 7/14/94
-
--LIBDB= libdb.a
--LIBDBSO=libdb.so
-+LIBDB= libdb1.a
-+LIBDBSO=libdb1.so
- SOVER=2
- SONAME=$(LIBDBSO).$(SOVER)
- LIBNDBM=libndbm.a
- LIBNDBMSO=libndbm.so
--PROG= db_dump185
-+PROG= db1_dump185
- OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
- ndbm.o
- OBJ2= bt_close.o bt_conv.o bt_debug.o bt_delete.o bt_get.o bt_open.o \
-@@ -27,8 +27,8 @@
- DESTDIR =
- prefix = /usr
- bindir = $(prefix)/bin
--libdir = $(prefix)/lib
--includedir = $(prefix)/include
-+libdir = $(prefix)/@GENTOO_LIBDIR@
-+includedir = $(prefix)/include/db1
-
- all: $(LIBDB) $(LIBDBSO) $(PROG)
-
diff --git a/sys-libs/db/files/db-18.1.25-sqlite-configure-path.patch b/sys-libs/db/files/db-18.1.25-sqlite-configure-path.patch
deleted file mode 100644
index 40570cafe210..000000000000
--- a/sys-libs/db/files/db-18.1.25-sqlite-configure-path.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- db-18.1.25/dist/aclocal/sql.m4
-+++ db-18.1.25/dist/aclocal/sql.m4
-@@ -99,7 +99,7 @@
- if test "$db_cv_debug" = "yes"; then
- CPPFLAGS="$CPPFLAGS -g"
- 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 --enable-editline=$with_editline" && 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 --enable-editline=$with_editline" && cat build_config.h >> config.h) || exit 1
-
- # Configure JDBC if --enable-jdbc
- if test "$db_cv_jdbc" != "no"; then
diff --git a/sys-libs/db/files/db-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-3.2.9-fix-dep-link.patch b/sys-libs/db/files/db-3.2.9-fix-dep-link.patch
deleted file mode 100644
index cdf6599b0d55..000000000000
--- a/sys-libs/db/files/db-3.2.9-fix-dep-link.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- db-3.2.9/dist/Makefile.in.orig 2003-02-23 23:41:13.000000000 +0200
-+++ db-3.2.9/dist/Makefile.in 2003-02-23 23:42:07.000000000 +0200
-@@ -240,19 +240,19 @@
-
- $(libso_target): $(OBJS)
- $(SOLINK) $(SOFLAGS) -o $(libso_target) \
-- $(OBJS) $(LDFLAGS) $(LIBSO_LIBS)
-+ $(OBJS) $(LDFLAGS) $(LIBS) $(LIBSO_LIBS)
-
- $(libxso_target): $(COBJS) $(OBJS)
- $(SOLINK) $(SOFLAGS) -o $(libxso_target) \
-- $(COBJS) $(OBJS) $(LDFLAGS) $(LIBXSO_LIBS)
-+ $(COBJS) $(OBJS) $(LDFLAGS) $(LIBS) $(LIBXSO_LIBS)
-
- $(libjso_target): $(JOBJS) $(OBJS)
- $(SOLINK) $(SOFLAGS) -o $(libjso_target) \
-- $(JOBJS) $(OBJS) $(LDFLAGS) $(LIBJSO_LIBS)
-+ $(JOBJS) $(OBJS) $(LDFLAGS) $(LIBS) $(LIBJSO_LIBS)
-
- $(libtso_target): $(TOBJS) $(OBJS)
- $(SOLINK) $(SOFLAGS) -o $(libtso_target) \
-- $(TOBJS) $(OBJS) $(LDFLAGS) $(LIBTSO_LIBS)
-+ $(TOBJS) $(OBJS) $(LDFLAGS) $(LIBS) $(LIBTSO_LIBS)
-
- ##################################################
- # Creating individual dependencies and actions for building class
diff --git a/sys-libs/db/files/db-3.2.9-gcc43.patch b/sys-libs/db/files/db-3.2.9-gcc43.patch
deleted file mode 100644
index 17bdddf3d8df..000000000000
--- a/sys-libs/db/files/db-3.2.9-gcc43.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -Nuar db-3.2.9.orig/include/db_cxx.h db-3.2.9/include/db_cxx.h
---- db-3.2.9.orig/include/db_cxx.h 2001-01-11 10:28:55.000000000 -0800
-+++ db-3.2.9/include/db_cxx.h 2008-08-16 16:10:48.474699646 -0700
-@@ -49,7 +49,12 @@
- // Forward declarations
- //
-
-+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
-+using namespace std;
-+#include <iostream>
-+#else
- #include <iostream.h>
-+#endif
- #include <stdarg.h>
- #include "db.h"
-
diff --git a/sys-libs/db/files/db-4.0.14-fix-dep-link.patch b/sys-libs/db/files/db-4.0.14-fix-dep-link.patch
deleted file mode 100644
index f54f064640e6..000000000000
--- a/sys-libs/db/files/db-4.0.14-fix-dep-link.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- db-4.0.14/dist/Makefile.in.orig 2003-08-16 06:21:53.763400112 +0200
-+++ db-4.0.14/dist/Makefile.in 2003-08-16 06:23:16.036892640 +0200
-@@ -58,7 +58,7 @@
-
- LDFLAGS= @LDFLAGS@
- LIBS= @LIBS@
--LIBSO_LIBS= @LIBSO_LIBS@
-+LIBSO_LIBS= @LIBSO_LIBS@ $(LIBS)
-
- libdb= libdb.a
- libso_base= libdb
-@@ -77,7 +77,7 @@
- CXX= @MAKEFILE_CXX@
- CXXLINK= @MAKEFILE_CXXLINK@
- XSOLINK= @MAKEFILE_XSOLINK@
--LIBXSO_LIBS= @LIBXSO_LIBS@
-+LIBXSO_LIBS= @LIBXSO_LIBS@ $(LIBS)
-
- libcxx= libdb_cxx.a
- libxso_base= libdb_cxx
-@@ -93,7 +93,7 @@
- # Java support is optional and requires shared librarires.
- ##################################################
- CLASSPATH= $(JAVA_CLASSTOP)
--LIBJSO_LIBS= @LIBJSO_LIBS@
-+LIBJSO_LIBS= @LIBJSO_LIBS@ $(LIBS)
-
- JAR= @JAR@
- JAVAC= env CLASSPATH="$(CLASSPATH)" @JAVAC@
-@@ -121,7 +121,7 @@
- # Tcl support is optional and requires shared libraries.
- ##################################################
- TCFLAGS= @TCFLAGS@
--LIBTSO_LIBS= @LIBTSO_LIBS@
-+LIBTSO_LIBS= @LIBTSO_LIBS@ $(LIBS)
- libtso_base= libdb_tcl
- libtso= $(libtso_base)-$(SOVERSION).@SOSUFFIX@
- libtso_static= $(libtso_base)-$(SOVERSION).a
diff --git a/sys-libs/db/files/db-4.2-jni-check-prefix-first.patch b/sys-libs/db/files/db-4.2-jni-check-prefix-first.patch
deleted file mode 100644
index 0777c706d0bf..000000000000
--- a/sys-libs/db/files/db-4.2-jni-check-prefix-first.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/dist/aclocal_java/ac_jni_include_dirs.ac
-+++ b/dist/aclocal_java/ac_jni_include_dirs.ac
-@@ -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.2-libtool.patch b/sys-libs/db/files/db-4.2-libtool.patch
deleted file mode 100644
index a4a9db7f4557..000000000000
--- a/sys-libs/db/files/db-4.2-libtool.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./dist/configure.orig 2004-09-22 22:58:48.421632944 -0700
-+++ ./dist/configure 2004-09-22 23:02:55.068136976 -0700
-@@ -5657,7 +5657,7 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
--case `"$LD" -v 2>&1 </dev/null` in
-+case `$LD -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-@@ -11135,7 +11135,7 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
--case `"$LD" -v 2>&1 </dev/null` in
-+case `$LD -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
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.2.52_p2-TXN.patch b/sys-libs/db/files/db-4.2.52_p2-TXN.patch
deleted file mode 100644
index a9ca9ef132f3..000000000000
--- a/sys-libs/db/files/db-4.2.52_p2-TXN.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-This patch is intended to be applied to Berkeley DB 4.2.52 and,
-if applied, will automatically be used by slapd(8) back-bdb/hdb.
-Without this patch the BDB DB_LOG_AUTOREMOVE option will not work,
-nor will db_archive allow any transaction log files to be removed
-while slapd is running.
-
-The patch can be applied to the BDB source using patch(1) as follows
- cd db-4.2.52
- patch -p0 < openldap-src/build/BerkeleyDB42.patch
-
-(modify directory paths as necessary), then recompile and reinstall
-the BerkeleyDB 4.2 library, and then build and install OpenLDAP
-Software.
-
-The patch should not be applied to Berkeley DB 4.3.
-
-
-Index: dbinc/db.in
-===================================================================
-RCS file: /var/CVSROOT/bdb42/dbinc/db.in,v
-retrieving revision 1.1.1.1
-retrieving revision 1.2
-diff -u -r1.1.1.1 -r1.2
---- a/dbinc/db.in 25 Nov 2003 21:58:02 -0000 1.1.1.1
-+++ b/dbinc/db.in 17 Jul 2004 16:07:23 -0000 1.2
-@@ -839,6 +839,7 @@
- #define TXN_NOWAIT 0x040 /* Do not wait on locks. */
- #define TXN_RESTORED 0x080 /* Transaction has been restored. */
- #define TXN_SYNC 0x100 /* Sync on prepare and commit. */
-+#define TXN_NOLOG 0x200 /* Do not log this transaction. */
- u_int32_t flags;
- };
-
-Index: txn/txn.c
-===================================================================
-RCS file: /var/CVSROOT/bdb42/txn/txn.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.2
-diff -u -r1.1.1.2 -r1.2
---- a/txn/txn.c 17 Dec 2003 21:43:53 -0000 1.1.1.2
-+++ b/txn/txn.c 17 Jul 2004 16:07:27 -0000 1.2
-@@ -127,7 +127,7 @@
- if ((ret = __db_fchk(dbenv,
- "txn_begin", flags,
- DB_DIRTY_READ | DB_TXN_NOWAIT |
-- DB_TXN_NOSYNC | DB_TXN_SYNC)) != 0)
-+ DB_TXN_NOSYNC | DB_TXN_SYNC | DB_TXN_NOT_DURABLE)) != 0)
- return (ret);
- if ((ret = __db_fcchk(dbenv,
- "txn_begin", flags, DB_TXN_NOSYNC, DB_TXN_SYNC)) != 0)
-@@ -193,6 +193,8 @@
- F_SET(txn, TXN_SYNC);
- if (LF_ISSET(DB_TXN_NOWAIT))
- F_SET(txn, TXN_NOWAIT);
-+ if (LF_ISSET(DB_TXN_NOT_DURABLE))
-+ F_SET(txn, TXN_NOLOG);
-
- if ((ret = __txn_begin_int(txn, 0)) != 0)
- goto err;
-@@ -328,7 +330,7 @@
- * We should set this value when we write the first log record, not
- * here.
- */
-- if (DBENV_LOGGING(dbenv))
-+ if (DBENV_LOGGING(dbenv) && !F_ISSET(txn, TXN_NOLOG))
- __log_txn_lsn(dbenv, &begin_lsn, NULL, NULL);
- else
- ZERO_LSN(begin_lsn);
diff --git a/sys-libs/db/files/db-4.3-libtool.patch b/sys-libs/db/files/db-4.3-libtool.patch
deleted file mode 100644
index c594f73c748f..000000000000
--- a/sys-libs/db/files/db-4.3-libtool.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- a/dist/configure
-+++ b/dist/configure
-@@ -5684,7 +5684,7 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
--case `$LD -v 2>&1 </dev/null` in
-+case `"$LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-@@ -8461,7 +8461,7 @@
- tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_cmds="$tmp_archive_cmds"
- supports_anon_versioning=no
-- case `$LD -v 2>/dev/null` in
-+ case `"$LD" -v 2>/dev/null` in
- *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-@@ -11383,7 +11383,7 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
--case `$LD -v 2>&1 </dev/null` in
-+case `"$LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-@@ -15353,7 +15353,7 @@
- tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_cmds_F77="$tmp_archive_cmds"
- supports_anon_versioning=no
-- case `$LD -v 2>/dev/null` in
-+ case `"$LD" -v 2>/dev/null` in
- *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-@@ -17695,7 +17695,7 @@
- tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_cmds_GCJ="$tmp_archive_cmds"
- supports_anon_versioning=no
-- case `$LD -v 2>/dev/null` in
-+ case `"$LD" -v 2>/dev/null` in
- *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
diff --git a/sys-libs/db/files/db-4.3.27-fix-dep-link.patch b/sys-libs/db/files/db-4.3.27-fix-dep-link.patch
deleted file mode 100644
index 1d14e83d078c..000000000000
--- a/sys-libs/db/files/db-4.3.27-fix-dep-link.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- db-4.3.27/dist/Makefile.in.chris 2005-02-01 23:40:34.447945464 +0100
-+++ db-4.3.27/dist/Makefile.in 2005-02-01 23:42:21.635650456 +0100
-@@ -58,7 +58,7 @@
- LDFLAGS= @LDFLAGS@
- LIBS= @LIBS@
- TEST_LIBS= @TEST_LIBS@
--LIBSO_LIBS= @LIBSO_LIBS@
-+LIBSO_LIBS= @LIBSO_LIBS@ $(LIBS)
-
- libdb_base= libdb
- libdb= $(libdb_base).a
-@@ -77,7 +77,7 @@
- CXX= @MAKEFILE_CXX@
- CXXLINK= @MAKEFILE_CXXLINK@ @CXXFLAGS@
- XSOLINK= @MAKEFILE_XSOLINK@ @CXXFLAGS@
--LIBXSO_LIBS= @LIBXSO_LIBS@
-+LIBXSO_LIBS= @LIBXSO_LIBS@ $(LIBS)
-
- libcxx_base= libdb_cxx
- libcxx= $(libcxx_base).a
-@@ -93,7 +93,7 @@
- # Java support is optional and requires shared librarires.
- ##################################################
- CLASSPATH= $(JAVA_CLASSTOP)
--LIBJSO_LIBS= @LIBJSO_LIBS@
-+LIBJSO_LIBS= @LIBJSO_LIBS@ $(LIBS)
-
- JAR= @JAR@
- JAVAC= env CLASSPATH="$(CLASSPATH)" @JAVAC@
-@@ -126,7 +126,7 @@
- # Tcl support is optional and requires shared libraries.
- ##################################################
- TCFLAGS= @TCFLAGS@
--LIBTSO_LIBS= @LIBTSO_LIBS@
-+LIBTSO_LIBS= @LIBTSO_LIBS@ $(LIBS)
- libtso_base= libdb_tcl
- libtso= $(libtso_base)-$(LIBVERSION)@MODSUFFIX@
- libtso_static= $(libtso_base)-$(LIBVERSION).a
diff --git a/sys-libs/db/files/db-4.4-libtool.patch b/sys-libs/db/files/db-4.4-libtool.patch
deleted file mode 100644
index b4d2fc8d73cf..000000000000
--- a/sys-libs/db/files/db-4.4-libtool.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- a/dist/configure
-+++ b/dist/configure
-@@ -5765,7 +5765,7 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
--case `$LD -v 2>&1 </dev/null` in
-+case `"$LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-@@ -8753,7 +8753,7 @@
- whole_archive_flag_spec=
- fi
- supports_anon_versioning=no
-- case `$LD -v 2>/dev/null` in
-+ case `"$LD" -v 2>/dev/null` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-@@ -11855,7 +11855,7 @@
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
--case `$LD -v 2>&1 </dev/null` in
-+case `"$LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-@@ -15842,7 +15842,7 @@
- whole_archive_flag_spec_F77=
- fi
- supports_anon_versioning=no
-- case `$LD -v 2>/dev/null` in
-+ case `"$LD" -v 2>/dev/null` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-@@ -18300,7 +18300,7 @@
- whole_archive_flag_spec_GCJ=
- fi
- supports_anon_versioning=no
-- case `$LD -v 2>/dev/null` in
-+ case `"$LD" -v 2>/dev/null` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
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/db/metadata.xml b/sys-libs/db/metadata.xml
index 4b0876002621..153a5bb94686 100644
--- a/sys-libs/db/metadata.xml
+++ b/sys-libs/db/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
diff --git a/sys-libs/e2fsprogs-libs/Manifest b/sys-libs/e2fsprogs-libs/Manifest
deleted file mode 100644
index 6f8e0a0bbd11..000000000000
--- a/sys-libs/e2fsprogs-libs/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST e2fsprogs-1.45.5.tar.xz 5569796 BLAKE2B cf9633caa6c00afa51408364d0c0a1515a9989ad1582fb485a300fd71bf61ec56b57dbb26f152609eaf2d63bfb04fe1e3f271085c26aa0c832c1f467960e6480 SHA512 d1a8611b525742387061f390fb24825dfa175997cc7db05decea913fcc7b97a95a3e787091f2920d4a7d4eb1d813568af734a1610229ead09bcbf9f3e262e4ce
-DIST e2fsprogs-1.45.6.tar.xz 5572144 BLAKE2B 24a44d27a02a1fa178083d5ee6034b20fedcac9faf7cf7f5cfcd4e4cee6d38775bc78949b9b00823cbbdacfab783e8e1e739579b9a7236c5425f51b27600743b SHA512 f3abfb6fe7ef632bb81152e2127d601cadd3fa93162178576a1d5ed82c2286627184b207b85a5b2a1793db0addf0885dfc3b9523bb340443224caf9c6d613b84
diff --git a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.5.ebuild b/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.5.ebuild
deleted file mode 100644
index 021b9b7ef4d8..000000000000
--- a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.5.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2020 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 ~m68k-mint ~x86-solaris"
-IUSE="static-libs"
-
-RDEPEND="!sys-libs/com_err
- !sys-libs/ss
- !<sys-fs/e2fsprogs-1.41.8"
-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/e2fsprogs-libs-1.45.6.ebuild b/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.6.ebuild
deleted file mode 100644
index 6b12701dcace..000000000000
--- a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.6.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2020 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 ~m68k-mint ~x86-solaris"
-IUSE="static-libs"
-
-RDEPEND="!sys-libs/com_err
- !sys-libs/ss
- !<sys-fs/e2fsprogs-1.41.8"
-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/e2fsprogs-libs/metadata.xml b/sys-libs/e2fsprogs-libs/metadata.xml
deleted file mode 100644
index 3455ebb9dca9..000000000000
--- a/sys-libs/e2fsprogs-libs/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://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="cpe">cpe:/a:e2fsprogs_project:e2fsprogs</remote-id>
- <remote-id type="sourceforge">e2fsprogs</remote-id>
-</upstream>
-</pkgmetadata>
diff --git a/sys-libs/efivar/Manifest b/sys-libs/efivar/Manifest
index c8afcced10cb..70de2f8e537c 100644
--- a/sys-libs/efivar/Manifest
+++ b/sys-libs/efivar/Manifest
@@ -1 +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 d85015b8778f..000000000000
--- a/sys-libs/efivar/efivar-37.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit flag-o-matic 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 x86"
-
-RDEPEND="dev-libs/popt"
-DEPEND="${RDEPEND}
- >=sys-kernel/linux-headers-3.18
- virtual/pkgconfig
-"
-
-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
new file mode 100644
index 000000000000..afed8c46956a
--- /dev/null
+++ b/sys-libs/efivar/efivar-38.ebuild
@@ -0,0 +1,75 @@
+# Copyright 2014-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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 ~loong ppc64 ~riscv x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ app-text/mandoc
+ test? ( sys-boot/grub:2 )
+"
+RDEPEND="
+ dev-libs/popt
+"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-3.18
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ local PATCHES=(
+ "${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
+}
+
+src_configure() {
+ unset CROSS_COMPILE
+ export COMPILER=$(tc-getCC)
+ export HOSTCC=$(tc-getBUILD_CC)
+
+ tc-ld-disable-gold
+
+ export libdir="/usr/$(get_libdir)"
+
+ # https://bugs.gentoo.org/562004
+ unset LIBS
+
+ # Avoid -Werror
+ export ERRORS=
+
+ if [[ -n ${GCC_SPECS} ]]; then
+ # The environment overrides the command line.
+ GCC_SPECS+=":${S}/src/include/gcc.specs"
+ fi
+
+ # Used by tests/Makefile
+ export GRUB_PREFIX=grub
+}
+
+src_test() {
+ # https://bugs.gentoo.org/924370
+ emake -j1 test
+}
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-Makefile-dep.patch b/sys-libs/efivar/files/efivar-38-Makefile-dep.patch
new file mode 100644
index 000000000000..64e3f4e0b7c4
--- /dev/null
+++ b/sys-libs/efivar/files/efivar-38-Makefile-dep.patch
@@ -0,0 +1,33 @@
+From 847856cd72088fd5f2349be858745c632c46b6c8 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Mon, 17 Jan 2022 11:42:53 -0500
+Subject: [PATCH] Adjust dependency for libefivar and libefiboot objects
+
+Depending on 'prep' causes all objects to be rebuilt every time 'make'
+is invoked.
+
+Depending on '$(GENERATED_SOURCES)' causes a build failure because
+guid-symbols.c gets passed to the compiler due to a rule in rules.mk.
+
+Depend on 'include/efivar/efivar-guids.h' directly to avoid these
+issues.
+
+Fixes: https://github.com/rhboot/efivar/issues/199
+Signed-off-by: Mike Gilbert <floppym@gentoo.org>
+---
+ src/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 0e423c44..c6006ebf 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -85,7 +85,7 @@ $(MAKEGUIDS_OUTPUT) : guids.txt
+
+ prep : makeguids $(GENERATED_SOURCES)
+
+-$(LIBEFIVAR_OBJECTS) $(LIBEFIBOOT_OBJECTS) : prep
++$(LIBEFIVAR_OBJECTS) $(LIBEFIBOOT_OBJECTS) : include/efivar/efivar-guids.h
+
+ libefivar.a : | $(GENERATED_SOURCES)
+ libefivar.a : $(patsubst %.o,%.static.o,$(LIBEFIVAR_OBJECTS))
diff --git a/sys-libs/efivar/files/efivar-38-binutils-2.36.patch b/sys-libs/efivar/files/efivar-38-binutils-2.36.patch
new file mode 100644
index 000000000000..df0575de7f33
--- /dev/null
+++ b/sys-libs/efivar/files/efivar-38-binutils-2.36.patch
@@ -0,0 +1,30 @@
+From 197a0874ea4010061b98b4b55eff65b33b1cd741 Mon Sep 17 00:00:00 2001
+From: Robbie Harwood <rharwood@redhat.com>
+Date: Mon, 17 Jan 2022 12:34:55 -0500
+Subject: [PATCH] Add -T workaround for GNU ld 2.36
+
+Signed-off-by: Robbie Harwood <rharwood@redhat.com>
+Resolves: #195
+---
+ 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 31188342..143e7902 100644
+--- a/src/include/workarounds.mk
++++ b/src/include/workarounds.mk
+@@ -4,12 +4,12 @@
+
+ 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/.* //')
+-# I haven't tested 2.36 here; 2.35 is definitely broken and 2.37 seems to work
++# 2.35 is definitely broken and 2.36 seems to work
+ LD_DASH_T := $(shell \
+ if [ "x${LD_FLAVOR}" = xLLD ] ; then \
+ echo '-T' ; \
+ elif [ "x${LD_FLAVOR}" = xGNU ] ; then \
+- if echo "${LD_VERSION}" | grep -q -E '^2\.3[789]|^2\.[456789]|^[3456789]|^[[:digit:]][[:digit:]]' ; then \
++ if echo "${LD_VERSION}" | grep -q -E '^2\.3[6789]|^2\.[456789]|^[3456789]|^[[:digit:]][[:digit:]]' ; then \
+ echo '-T' ; \
+ else \
+ echo "" ; \
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
new file mode 100644
index 000000000000..f43057e5e0ad
--- /dev/null
+++ b/sys-libs/efivar/files/efivar-38-ia64-relro.patch
@@ -0,0 +1,60 @@
+From 145c6593fa9206cc27229a9a40c49e4bed046739 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Mon, 19 Oct 2020 19:05:01 +0100
+Subject: [PATCH] gcc.specs: drop --fatal-warnings from linker options (ia64
+ compatibility)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+```
+$ LANG=C make HOSTCC=x86_64-pc-linux-gnu-gcc CC=ia64-unknown-linux-gnu-gcc HOST_ARCH=ia64
+ia64-unknown-linux-gnu-gcc ... \
+ -o libefivar.so ...
+/usr/libexec/gcc/ia64-unknown-linux-gnu/ld: warning: -z relro ignored
+collect2: error: ld returned 1 exit status
+make[1]: *** [/home/slyfox/dev/git/efivar/src/include/rules.mk:32: libefivar.so] Error 1
+```
+
+ia64 (and a few others) binutils target does not support '-z relro' and always
+issues a warning. --fatal-warnings spec option turns the build into always failing one.
+
+The change drops `--fatal-warnings` option from gcc.spec entirely.
+
+Rejected upstream in https://github.com/rhboot/efivar/pull/164.
+
+[sam: add extra hunk to fix 38 build.]
+
+Reported-by: Émeric Maschino
+Bug: https://bugs.gentoo.org/749963
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ src/include/gcc.specs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/include/gcc.specs b/src/include/gcc.specs
+index ef28e2b..4deead5 100644
+--- a/src/include/gcc.specs
++++ b/src/include/gcc.specs
+@@ -5,4 +5,4 @@
+ + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} -grecord-gcc-switches
+
+ *link:
+-+ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
+++ --no-undefined-version --no-allow-shlib-undefined -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
+--
+2.34.1
+
+diff --git a/src/include/defaults.mk b/src/include/defaults.mk
+index 9024a3a..f5515fa 100644
+--- a/src/include/defaults.mk
++++ b/src/include/defaults.mk
+@@ -58,7 +58,7 @@ override LDFLAGS = $(CFLAGS) -L. $(_LDFLAGS) $(_CCLDFLAGS) \
+ -Wl,-z,now \
+ -Wl,-z,muldefs \
+ -Wl,-z,relro \
+- -Wl,--fatal-warnings \
++ -Wl,--no-fatal-warnings \
+ $(call family,LDFLAGS) $(call family,CCLDFLAGS) \
+ $(call pkg-config-ccldflags)
+ override CCLDFLAGS = $(LDFLAGS)
diff --git a/sys-libs/efivar/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/efivar/files/efivar-38-march-native.patch b/sys-libs/efivar/files/efivar-38-march-native.patch
new file mode 100644
index 000000000000..a970d8d6de6b
--- /dev/null
+++ b/sys-libs/efivar/files/efivar-38-march-native.patch
@@ -0,0 +1,37 @@
+From 43d19f297548208ce549fd87faa41e6bb86bf9c3 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Mon, 17 Jan 2022 10:13:31 -0500
+Subject: [PATCH] Drop "-march=native" from HOST flags
+
+GCC does not support -march=native on some targets (ia64, riscv).
+The performance enhancement for makeguids isn't worth the trouble it
+causes.
+
+Bug: https://bugs.gentoo.org/831334
+Signed-off-by: Mike Gilbert <floppym@gentoo.org>
+---
+ src/include/defaults.mk | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/src/include/defaults.mk b/src/include/defaults.mk
+index 632b1551..9024a3a1 100644
+--- a/src/include/defaults.mk
++++ b/src/include/defaults.mk
+@@ -71,16 +71,10 @@ override SOFLAGS = $(_SOFLAGS) \
+ -Wl,--version-script=$(MAP) \
+ $(call family,SOFLAGS)
+
+-HOST_ARCH=$(shell uname -m)
+-ifneq ($(HOST_ARCH),ia64)
+- HOST_MARCH=-march=native
+-else
+- HOST_MARCH=
+-endif
+ HOST_CPPFLAGS ?= $(CPPFLAGS)
+ override _HOST_CPPFLAGS := $(HOST_CPPFLAGS)
+ override HOST_CPPFLAGS = $(_HOST_CPPFLAGS) \
+- -DEFIVAR_BUILD_ENVIRONMENT $(HOST_MARCH)
++ -DEFIVAR_BUILD_ENVIRONMENT
+ HOST_CFLAGS_GCC ?=
+ HOST_CFLAGS_CLANG ?=
+ HOST_CFLAGS ?= $(CFLAGS) $(call family,HOST_CFLAGS)
diff --git a/sys-libs/efivar/metadata.xml b/sys-libs/efivar/metadata.xml
index f9d83d4843a1..0a27d363fed2 100644
--- a/sys-libs/efivar/metadata.xml
+++ b/sys-libs/efivar/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>floppym@gentoo.org</email>
diff --git a/sys-libs/fortify-headers/Manifest b/sys-libs/fortify-headers/Manifest
index f31dc4adc86b..f45bc033da8d 100644
--- a/sys-libs/fortify-headers/Manifest
+++ b/sys-libs/fortify-headers/Manifest
@@ -1,2 +1 @@
-DIST fortify-headers-0.6.tar.gz 5339 BLAKE2B 404a20de075551e11750f989e05d78f450b09fc879a7ff4b649773ebc012a93c42432cc7b60c70843a375d64f6aea3ec356cdfafc0133f8cc58dadfea9b982d3 SHA512 6106219332515e7c23354d916383cdac6efccba7eefa13b0c2c221d0fd03be7afb29b3a8622bd29b62ee0b602f9d1f273e1a08c07583bdcd12db9938ef4d7acc
-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.6.ebuild b/sys-libs/fortify-headers/fortify-headers-0.6.ebuild
deleted file mode 100644
index 9f9374176ea0..000000000000
--- a/sys-libs/fortify-headers/fortify-headers-0.6.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-if [[ ${PV} == *9999* ]] ; then
- EGIT_REPO_URI="git://git.2f30.org/fortify-headers"
- inherit git-r3
-else
- SRC_URI="http://git.2f30.org/fortify-headers/snapshot/fortify-headers-${PV}.tar.gz"
- KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
-fi
-
-DESCRIPTION="A standalone implementation of fortify source."
-HOMEPAGE="http://git.2f30.org/fortify-headers/"
-
-LICENSE="ISC"
-SLOT="0"
-IUSE=""
-
-DEPEND=""
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- sed -i -e 's|^PREFIX = /usr/local|PREFIX = /usr|g' Makefile
- export DESTDIR="${D}"
- eapply_user
-}
diff --git a/sys-libs/fortify-headers/fortify-headers-0.7.ebuild b/sys-libs/fortify-headers/fortify-headers-0.7.ebuild
deleted file mode 100644
index 9f9374176ea0..000000000000
--- a/sys-libs/fortify-headers/fortify-headers-0.7.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-if [[ ${PV} == *9999* ]] ; then
- EGIT_REPO_URI="git://git.2f30.org/fortify-headers"
- inherit git-r3
-else
- SRC_URI="http://git.2f30.org/fortify-headers/snapshot/fortify-headers-${PV}.tar.gz"
- KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
-fi
-
-DESCRIPTION="A standalone implementation of fortify source."
-HOMEPAGE="http://git.2f30.org/fortify-headers/"
-
-LICENSE="ISC"
-SLOT="0"
-IUSE=""
-
-DEPEND=""
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- sed -i -e 's|^PREFIX = /usr/local|PREFIX = /usr|g' Makefile
- export DESTDIR="${D}"
- eapply_user
-}
diff --git a/sys-libs/fortify-headers/fortify-headers-1.1.ebuild b/sys-libs/fortify-headers/fortify-headers-1.1.ebuild
new file mode 100644
index 000000000000..5347e1e57683
--- /dev/null
+++ b/sys-libs/fortify-headers/fortify-headers-1.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+if [[ ${PV} == *9999* ]] ; then
+ EGIT_REPO_URI="git://git.2f30.org/fortify-headers"
+ inherit git-r3
+else
+ #SRC_URI="http://git.2f30.org/fortify-headers/snapshot/fortify-headers-${PV}.tar.gz"
+ SRC_URI="https://dl.2f30.org/releases/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
+fi
+
+DESCRIPTION="A standalone implementation of fortify source"
+HOMEPAGE="http://git.2f30.org/fortify-headers/"
+
+LICENSE="ISC"
+SLOT="0"
+
+src_prepare() {
+ sed -i -e 's|^PREFIX = /usr/local|PREFIX = /usr|g' Makefile || die
+ default
+}
+
+src_compile() {
+ # Nothing to do here but defining a dummy phase allows us to not trigger
+ # the catch-all rule and try to install here where we don't have access
+ # to ${ED}
+ :;
+}
+
+src_install() {
+ export DESTDIR="${ED}"
+ default
+}
diff --git a/sys-libs/fortify-headers/fortify-headers-9999.ebuild b/sys-libs/fortify-headers/fortify-headers-9999.ebuild
index 9f9374176ea0..978f5b027268 100644
--- a/sys-libs/fortify-headers/fortify-headers-9999.ebuild
+++ b/sys-libs/fortify-headers/fortify-headers-9999.ebuild
@@ -1,28 +1,42 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+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"
+ 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"
-IUSE=""
-
-DEPEND=""
-RDEPEND="${DEPEND}"
src_prepare() {
- sed -i -e 's|^PREFIX = /usr/local|PREFIX = /usr|g' Makefile
- export DESTDIR="${D}"
- eapply_user
+ sed -i -e 's|^PREFIX = /usr/local|PREFIX = /usr|g' Makefile || die
+ default
+}
+
+src_compile() {
+ # Nothing to do here but defining a dummy phase allows us to not trigger
+ # the catch-all rule and try to install here where we don't have access
+ # to ${ED}
+ :;
+}
+
+src_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 d920e3ba3e56..dd8b1ddfa342 100644
--- a/sys-libs/fortify-headers/metadata.xml
+++ b/sys-libs/fortify-headers/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>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 32af74478419..5572fab3da51 100644
--- a/sys-libs/freeipmi/Manifest
+++ b/sys-libs/freeipmi/Manifest
@@ -1,3 +1,2 @@
-DIST freeipmi-1.5.7.tar.gz 3321187 BLAKE2B c6f7e9c4e0a03ce1d50972fee99741ec00a8f5beb0323d61d9217b3773eed33cb04e7bb92e1f293cb39c8012872babdc4774e6d81cf808615b8b283510e1e67c SHA512 a4d39d11d4e4b9635c272ee3a197729ac61c3e1c909c202498fb480c41289116eb933cd716fe2e0b5aa6dc258751ee204892bfb009398b6d5c2c65ee1cc58544
-DIST freeipmi-1.6.5.tar.gz 3418664 BLAKE2B eac6d3bd08aec0535b64430366074d6e69574ac4607146c5139550586ebdd8f4fe7a69afe928ee926c308c3dcd90f26396b1baa8275936747a72aaad83112a36 SHA512 390f588015d4c359dccaa3fcaefe5ec7754aad559ace4cc6f4fafcde6ef292f16e014a1253cf0c03d40511539f8e444d8302398540278a5846ad68e7796267ba
-DIST freeipmi-1.6.6.tar.gz 3419134 BLAKE2B dbdb8bf4440548b0b7885a7c940f810e5266245004c42b5d4acad2acc6058cdd580bd0e2908a6c66b62c7417101cec49981038145c743096fd6294d8ae2a7e75 SHA512 8a7be74bf003b8858c054bac24615f6fba0133e38e6f759ce81ed734a9ab107eb286c70554ad9663062c92eeccf342b80536aac0da74e4ede1ec51eedd497366
+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.5.7.ebuild b/sys-libs/freeipmi/freeipmi-1.5.7.ebuild
deleted file mode 100644
index 3fddd3e7e889..000000000000
--- a/sys-libs/freeipmi/freeipmi-1.5.7.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-AT_M4DIR="config"
-
-inherit eutils multilib
-
-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"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="amd64 hppa x86"
-IUSE="debug nagios"
-
-RDEPEND="dev-libs/libgcrypt:0"
-DEPEND="${RDEPEND}
- virtual/os-headers"
-RDEPEND="${RDEPEND}
- nagios? (
- || ( net-analyzer/icinga net-analyzer/nagios )
- dev-lang/perl
- )
-"
-
-src_configure() {
- local myeconfargs=(
- $(use_enable debug)
- --disable-static
- --disable-init-scripts
- --localstatedir=/var
- )
-
- econf "${myeconfargs[@]}"
-}
-
-# There are no tests
-src_test() { :; }
-
-src_install() {
- default
-
- # freeipmi by defaults install _all_ commands to /usr/sbin, but
- # quite a few can be run remotely as standard user, so move them
- # in /usr/bin afterwards.
- dodir /usr/bin
- for file in ipmi{detect,ping,power,console}; do
- mv "${D}"/usr/{s,}bin/${file} || die
-
- # The default install symlinks these commands to add a dash
- # after the ipmi prefix; we repeat those after move for
- # consistency.
- rm "${D}"/usr/sbin/${file/ipmi/ipmi-}
- dosym ${file} /usr/bin/${file/ipmi/ipmi-}
- done
-
- # Install the nagios plugin in its proper place, if desired
- if use nagios; then
- dodir /usr/$(get_libdir)/nagios/plugins
- mv "${D}"/usr/share/doc/${PF}/contrib/nagios/nagios_ipmi_sensors.pl \
- "${D}"/usr/$(get_libdir)/nagios/plugins/ || die
- fperms 0755 /usr/$(get_libdir)/nagios/plugins/nagios_ipmi_sensors.pl
-
- insinto /etc/icinga/conf.d
- newins "${FILESDIR}"/freeipmi.icinga freeipmi-command.cfg
- fi
-
- dodoc AUTHORS ChangeLog* DISCLAIMER* NEWS README* TODO doc/*.txt
-
- keepdir \
- /var/cache/ipmimonitoringsdrcache \
- /var/lib/freeipmi \
- /var/log/ipmiconsole
-
- # starting from version 1.2.0 the two daemons are similar enough
- newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmidetectd
- newconfd "${FILESDIR}"/ipmidetectd.confd ipmidetectd
-
- newinitd "${FILESDIR}"/bmc-watchdog.initd.4 bmc-watchdog
- newconfd "${FILESDIR}"/bmc-watchdog.confd bmc-watchdog
-
- newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmiseld
- newconfd "${FILESDIR}"/ipmiseld.confd ipmiseld
-}
diff --git a/sys-libs/freeipmi/freeipmi-1.6.5.ebuild b/sys-libs/freeipmi/freeipmi-1.6.10-r1.ebuild
index a4fc52d4d3cb..6f12a9a5d306 100644
--- a/sys-libs/freeipmi/freeipmi-1.6.5.ebuild
+++ b/sys-libs/freeipmi/freeipmi-1.6.10-r1.ebuild
@@ -1,22 +1,23 @@
-# Copyright 1999-2020 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 ~x86"
-IUSE="debug nagios"
+KEYWORDS="amd64 hppa ~ppc64 x86"
+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
@@ -74,6 +88,7 @@ src_install() {
dodoc AUTHORS ChangeLog* DISCLAIMER* NEWS README* TODO doc/*.txt
keepdir \
+ /var/cache/ipmiseld \
/var/cache/ipmimonitoringsdrcache \
/var/lib/freeipmi \
/var/log/ipmiconsole
diff --git a/sys-libs/freeipmi/freeipmi-1.6.6.ebuild b/sys-libs/freeipmi/freeipmi-1.6.11.ebuild
index a4fc52d4d3cb..d56e388c2f3b 100644
--- a/sys-libs/freeipmi/freeipmi-1.6.6.ebuild
+++ b/sys-libs/freeipmi/freeipmi-1.6.11.ebuild
@@ -1,47 +1,52 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+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 ~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
@@ -74,6 +79,7 @@ src_install() {
dodoc AUTHORS ChangeLog* DISCLAIMER* NEWS README* TODO doc/*.txt
keepdir \
+ /var/cache/ipmiseld \
/var/cache/ipmimonitoringsdrcache \
/var/lib/freeipmi \
/var/log/ipmiconsole
diff --git a/sys-libs/freeipmi/metadata.xml b/sys-libs/freeipmi/metadata.xml
index 8ed4f6ed5e53..afd59dfd46f3 100644
--- a/sys-libs/freeipmi/metadata.xml
+++ b/sys-libs/freeipmi/metadata.xml
@@ -1,14 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>sysadmin@gentoo.org</email>
<name>Gentoo Sysadmin Project</name>
</maintainer>
-
<use>
<flag name="nagios">
Install a nagios plugin to check sensors' status.
</flag>
+ <flag name="without-root">
+ Configure whether or not to check for root access in ipmi tools.
+ </flag>
</use>
+ <upstream>
+ <remote-id type="savannah">freeipmi</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/fts-standalone/Manifest b/sys-libs/fts-standalone/Manifest
index 1b408f75e175..2962a836ee54 100644
--- a/sys-libs/fts-standalone/Manifest
+++ b/sys-libs/fts-standalone/Manifest
@@ -1,2 +1 @@
-DIST fts-0.2.tar.gz 339498 BLAKE2B 3800196fd67d03c5e732dec1cf6aeee85d417720c3e89f650f2c7238f60d57e4e51a69eb11dc67fdb8ca19093726d0f3f8b48e60c20ceb08b9173767ab895586 SHA512 4f31182f4ebce7f663db893def0e2380b87ef1a262a021837fc6fc9965803a829217142df140c67b1cd83b292eb8862fa0a470cf795a312494674e6e94f02f79
DIST fts-standalone-1.2.7.tar.gz 19336 BLAKE2B 045cfc32dffd18b58093dfe578a029ca15083eec98812ea2849acf37fd2c8e7272840b15b4966201421624d96ba69208a36b58d5420cef2563c107cfae98ea93 SHA512 949f73b9406b06bd8712c721b4ec89afcb37d4eaef5666cccf3712242d3a57fc0acf3ca994934e0f57c1e92f40521a9370132a21eb6d1957415a83c76bf20feb
diff --git a/sys-libs/fts-standalone/fts-standalone-0.2-r1.ebuild b/sys-libs/fts-standalone/fts-standalone-0.2-r1.ebuild
deleted file mode 100644
index ed2a00b5d132..000000000000
--- a/sys-libs/fts-standalone/fts-standalone-0.2-r1.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-MY_P=${P/-standalone/}
-
-DESCRIPTION="Standalone fts library for use with musl"
-HOMEPAGE="https://dev.gentoo.org/~blueness/fts-standalone"
-SRC_URI="https://dev.gentoo.org/~blueness/fts-standalone/${MY_P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~mips ~ppc ~ppc64 x86"
-IUSE=""
-
-DEPEND="
- !sys-libs/glibc
- !sys-libs/uclibc"
-
-S="${WORKDIR}/${MY_P}"
-
-src_install() {
- default
- rm -rf "${D}"/usr/share/man
-}
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 d816d53c4048..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,24 +1,22 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
inherit autotools
DESCRIPTION="Standalone fts library for use with musl"
HOMEPAGE="https://github.com/pullmoll/musl-fts"
SRC_URI="https://github.com/pullmoll/musl-fts/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/musl-fts-${PV}"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
+KEYWORDS="amd64 arm arm64 ~m68k ~mips ppc ppc64 ~riscv x86"
IUSE="static-libs"
DEPEND="
- !sys-libs/glibc
- !sys-libs/uclibc"
-
-S="${WORKDIR}/musl-fts-${PV}"
+ !sys-libs/glibc"
src_prepare() {
default
@@ -32,6 +30,6 @@ src_configure() {
src_install() {
default
- find "${D}" -name '*.la' -delete || die
- mv "${ED%/}"/usr/$(get_libdir)/pkgconfig/{musl-fts,fts-standalone}.pc || die
+ find "${ED}" -name '*.la' -delete || die
+ mv "${ED}"/usr/$(get_libdir)/pkgconfig/{musl-fts,fts-standalone}.pc || die
}
diff --git a/sys-libs/fts-standalone/metadata.xml b/sys-libs/fts-standalone/metadata.xml
index f9ca28f3ecc6..b9347a233c05 100644
--- a/sys-libs/fts-standalone/metadata.xml
+++ b/sys-libs/fts-standalone/metadata.xml
@@ -1,5 +1,5 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>blueness@gentoo.org</email>
diff --git a/sys-libs/gdbm/Manifest b/sys-libs/gdbm/Manifest
index 905b45813e87..63bb68e78015 100644
--- a/sys-libs/gdbm/Manifest
+++ b/sys-libs/gdbm/Manifest
@@ -1,6 +1,2 @@
-DIST gdbm-1.13.tar.gz 891987 BLAKE2B f73cb89aeed140a584c5a8bce9c2324cc39a7647ee288364af66fbe1c1cd8662e53f7cb82a208e795a6d27adc048018153671d964ecad518407eb888283e17c5 SHA512 fdb777f5b415b0578ea46b4a6fc70151a04a3568e2f2c8c0219ccad8c0d34abb773d80d5d7a06462ad1a3d6c1f3b5b7ab25f9de4f43ccf05c58db05f9a2906ad
-DIST gdbm-1.14.1.tar.gz 894412 BLAKE2B e519af45d670ec4285ece01edc17770dcb0d77f12edcf2d3d4cb9580c6d2bb6d6dddb57d4f33490e11dc9df7cd08fd44ab7737b62271c5cfdc9485b90d0d4888 SHA512 a15d7acb0ebf459f4f7d262e5a05393a9a7c8e9ae906d12ccb3b38715de15a41c9254e7814555e2f9af306ef63b2dc68b5f9f6c7b75dd0db77e07a58831ff603
-DIST gdbm-1.17.tar.gz 938173 BLAKE2B bef5d449b250af139e5c660ba700694bac28af3e7f220c1ed6e1e3871e5098f2b6585e2bc4b459ed0718066342dbbfa4fb168d363d6148a51e86f925bd17e5a6 SHA512 c90fe492e969093c3a790f71bd24666a93cb4017406da2ee6baa7b2dbab14628173bb03a9cc0212256539d525ecad17c816a1621b33df99650b16b47b9cc2212
-DIST gdbm-1.18.1.tar.gz 941863 BLAKE2B b7717224e966321d7499a90214bfb62d0402e867db475ed4eddacfe3944d8d9cca1052e41d625f447936bfb3cbd7f1b79cfe6ff435a018efed3d5a7c5eae52d7 SHA512 adf9d6c5bc843ff0d7f88c2a1667d509973b2d63378d0001d7e74cc10aee6ea498a4513cc88ddf78c32ba4db5cb040b2794f4f1b3338c65d9894058850e2f5ef
-DIST gdbm-1.18.tar.gz 939352 BLAKE2B c4b84abc6bda852c486634cf03668f189f57debe4034244c51e738f1ff791469e7b1cb6514ae03514f5288b550a436dccaaee79b9de5594a5b307d84be2ad88d SHA512 57c7e5dc52464e97ad955e28d49fdb3557d8e3bdf280f7d3cee69539e4878f055db17cb9dd591f82fadb8fa5041a5a56d8a571d34f6e115470a3a82537f872a8
-DIST gdbm-1.8.3.tar.gz 228695 BLAKE2B 21b5833facb97fe937020d80b038c7b09e55eea6bdb9ec323d185a0980f235ff6a225d180d86d984469ce04a3f0266d20881f317f4339915bc6f61ab150ac2ac SHA512 2a01751ee8f730db563b4f52185c72f1c7a4f66530d6736f05f7446153be685ea0bb6ea1d2bad16ce31547fea879dc48507ff65ad35b0973df9aa385713b10d7
+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/files/gdbm-1.13-fix-a-typo-in-gdbm.h.patch b/sys-libs/gdbm/files/gdbm-1.13-fix-a-typo-in-gdbm.h.patch
deleted file mode 100644
index f3b96e9be2c7..000000000000
--- a/sys-libs/gdbm/files/gdbm-1.13-fix-a-typo-in-gdbm.h.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From 1e0b3f4556f88013a2268bb2ef0c8d4bfaa40f90 Mon Sep 17 00:00:00 2001
-From: Sergey Poznyakoff <gray@gnu.org.ua>
-Date: Fri, 14 Apr 2017 07:48:35 +0000
-Subject: Fix a typo
-
----
-diff --git a/src/gdbm.h.in b/src/gdbm.h.in
-index e9b7b1b..de0d2b9 100644
---- a/src/gdbm.h.in
-+++ b/src/gdbm.h.in
-@@ -224,7 +224,7 @@ extern int gdbm_copy_meta (GDBM_FILE dst, GDBM_FILE src);
- # define _GDBM_MAX_ERRNO GDBM_DIR_OVERFLOW
-
- /* This one was never used and will be removed in the future */
--# define GDBM_UNKNOWN_UPDATE GDBM_ERR_UNKNOWN_ERROR
-+# define GDBM_UNKNOWN_UPDATE GDBM_UNKNOWN_ERROR
-
- typedef int gdbm_error;
- extern gdbm_error gdbm_errno;
---
-cgit v0.9.0.3
diff --git a/sys-libs/gdbm/files/gdbm-1.13-fix-build-with-enable-gdbm-export.patch b/sys-libs/gdbm/files/gdbm-1.13-fix-build-with-enable-gdbm-export.patch
deleted file mode 100644
index eb229f7261cb..000000000000
--- a/sys-libs/gdbm/files/gdbm-1.13-fix-build-with-enable-gdbm-export.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 272713d611c55effeaf1d2b45fbb2c69d70e4c74 Mon Sep 17 00:00:00 2001
-From: Sergey Poznyakoff <gray@gnu.org>
-Date: Sat, 23 Dec 2017 21:27:20 +0000
-Subject: Fix build with --enable-gdbm-export
-
-* THANKS: Add Jakub Bogusz
-* export/export.c: Define GDBM_EXPORT_18 prior to
-including gdbmexp.c
-* src/gdbmexp.c [GDBM_EXPORT_18]: Define GDBM_SET_ERRNO and
-GDBM_ASSERT_CONSISTENCY.
----
-diff --git a/THANKS b/THANKS
-index 70cb40f..feb1f87 100644
---- a/THANKS
-+++ b/THANKS
-@@ -5,6 +5,7 @@ suggesting various improvements or submitting actual code. Here is a list
- of these people. Help us keep it complete and exempt of errors.
-
- Bill Jones <rj7252@att.com>
-+Jakub Bogusz <qboosh@pld-linux.org>
- Matthew Burgess <matthew@linuxfromscratch.org>
- Tanaka Akira <akr@fsij.org>
--Thomas Klausner <tk@giga.or.at>
-\ No newline at end of file
-+Thomas Klausner <tk@giga.or.at>
-diff --git a/export/export.c b/export/export.c
-index 39e05d1..ede4858 100644
---- a/export/export.c
-+++ b/export/export.c
-@@ -24,6 +24,7 @@
- #include <gdbm.h>
-
- /* Pull in gdbm_export() */
-+#define GDBM_EXPORT_18
- #include "gdbmexp.c"
-
- void
-diff --git a/src/gdbmexp.c b/src/gdbmexp.c
-index 457f638..dc46c50 100644
---- a/src/gdbmexp.c
-+++ b/src/gdbmexp.c
-@@ -21,8 +21,13 @@
- # include "autoconf.h"
- # include <arpa/inet.h>
-
-+#ifdef GDBM_EXPORT_18
-+# define GDBM_SET_ERRNO(dbf, ec, fatal) gdbm_errno = ec
-+# define GDBM_ASSERT_CONSISTENCY(dbf, val)
-+#else
- # include "gdbmdefs.h"
- # include "gdbm.h"
-+#endif
-
- int
- gdbm_export_to_file (GDBM_FILE dbf, FILE *fp)
---
-cgit v0.9.0.3
diff --git a/sys-libs/gdbm/files/gdbm-1.17-fix-gdbmsync.patch b/sys-libs/gdbm/files/gdbm-1.17-fix-gdbmsync.patch
deleted file mode 100644
index 434aed59952b..000000000000
--- a/sys-libs/gdbm/files/gdbm-1.17-fix-gdbmsync.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- /src/gdbmsync.c.orig 2018-08-05 14:37:18.000116786 +0200
-+++ /src/gdbmsync.c 2018-08-05 14:37:39.666117321 +0200
-@@ -28,7 +28,7 @@
- gdbm_sync (GDBM_FILE dbf)
- {
- /* Return immediately if the database needs recovery */
-- GDBM_ASSERT_CONSISTENCY (dbf, );
-+ GDBM_ASSERT_CONSISTENCY (dbf, GDBM_NEED_RECOVERY);
-
- /* Initialize the gdbm_errno variable. */
- gdbm_set_errno (dbf, GDBM_NO_ERROR, FALSE);}
diff --git a/sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch b/sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch
deleted file mode 100644
index 9b3e3d736c15..000000000000
--- a/sys-libs/gdbm/files/gdbm-1.18.1-gcc-10.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From ab05ea727942b5c1469e2e86548581264c6e2de4 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Sat, 2 May 2020 12:39:39 +0100
-Subject: [PATCH] gdbm: fix link failure against gcc-10
-
-Before the change on gcc-10 link failed as:
-```
- CCLD gdbmtool
-ld: ./libgdbmapp.a(parseopt.o):(.bss+0x8): multiple definition of `parseopt_program_args';
- gdbmtool.o:(.data.rel.local+0x260): first defined here
-ld: ./libgdbmapp.a(parseopt.o):(.bss+0x10): multiple definition of `parseopt_program_doc';
- gdbmtool.o:(.data.rel.local+0x268): first defined here
-```
-
-gcc-10 will change the default from -fcommon to fno-common:
- https://gcc.gnu.org/PR85678.
-
-The fix is to avoid multiple definition and rely on
-declarations only.
-
-Bug: https://bugs.gentoo.org/705898
-Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
----
- src/parseopt.c | 2 --
- 1 file changed, 2 deletions(-)
-
---- a/src/parseopt.c
-+++ b/src/parseopt.c
-@@ -255,8 +255,6 @@ print_option_descr (const char *descr, size_t lmargin, size_t rmargin)
- }
-
- char *parseopt_program_name;
--char *parseopt_program_doc;
--char *parseopt_program_args;
- const char *program_bug_address = "<" PACKAGE_BUGREPORT ">";
- void (*parseopt_help_hook) (FILE *stream);
-
---
-2.26.2
-
diff --git a/sys-libs/gdbm/gdbm-1.13-r2.ebuild b/sys-libs/gdbm/gdbm-1.13-r2.ebuild
deleted file mode 100644
index d8d1557a69ff..000000000000
--- a/sys-libs/gdbm/gdbm-1.13-r2.ebuild
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools flag-o-matic multilib multilib-minimal
-
-EX_P="${PN}-1.8.3"
-DESCRIPTION="Standard GNU database libraries"
-HOMEPAGE="https://www.gnu.org/software/gdbm/"
-SRC_URI="mirror://gnu/gdbm/${P}.tar.gz
- exporter? ( mirror://gnu/gdbm/${EX_P}.tar.gz )"
-
-LICENSE="GPL-3"
-SLOT="0/1.13"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+berkdb exporter nls +readline static-libs"
-
-DEPEND="
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/gdbm-1.13-fix-a-typo-in-gdbm.h.patch
- "${FILESDIR}"/gdbm-1.13-fix-build-with-enable-gdbm-export.patch
-)
-
-EX_S="${WORKDIR}/${EX_P}"
-
-src_prepare() {
- default
-
- eautoreconf
-}
-
-multilib_src_configure() {
- # gdbm doesn't appear to use either of these libraries
- export ac_cv_lib_dbm_main=no ac_cv_lib_ndbm_main=no
-
- if multilib_is_native_abi && use exporter ; then
- pushd "${EX_S}" >/dev/null
- append-lfs-flags
- econf --disable-shared
- popd >/dev/null
- fi
-
- local myeconfargs=(
- --includedir="${EPREFIX}"/usr/include/gdbm
- --with-gdbm183-libdir="${EX_S}/.libs"
- --with-gdbm183-includedir="${EX_S}"
- $(use_enable berkdb libgdbm-compat)
- $(multilib_native_use_enable exporter gdbm-export)
- $(use_enable nls)
- $(use_enable static-libs static)
- $(use_with readline)
- )
- ECONF_SOURCE=${S} econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- use exporter && emake -C "${EX_S}" libgdbm.la
- emake
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- use static-libs || find "${ED}" -name '*.la' -delete
- mv "${ED%/}"/usr/include/gdbm/gdbm.h "${ED%/}"/usr/include/ || die
-}
diff --git a/sys-libs/gdbm/gdbm-1.14.1.ebuild b/sys-libs/gdbm/gdbm-1.14.1.ebuild
deleted file mode 100644
index cf94e26b3469..000000000000
--- a/sys-libs/gdbm/gdbm-1.14.1.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools flag-o-matic multilib multilib-minimal
-
-EX_P="${PN}-1.8.3"
-DESCRIPTION="Standard GNU database libraries"
-HOMEPAGE="https://www.gnu.org/software/gdbm/"
-SRC_URI="mirror://gnu/gdbm/${P}.tar.gz
- exporter? ( mirror://gnu/gdbm/${EX_P}.tar.gz )"
-
-LICENSE="GPL-3"
-SLOT="0/5" # libgdbm.so version
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+berkdb exporter nls +readline static-libs"
-
-DEPEND="
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
-"
-RDEPEND="${DEPEND}"
-
-EX_S="${WORKDIR}/${EX_P}"
-
-src_prepare() {
- default
- eautoreconf
-}
-
-multilib_src_configure() {
- # gdbm doesn't appear to use either of these libraries
- export ac_cv_lib_dbm_main=no ac_cv_lib_ndbm_main=no
-
- if multilib_is_native_abi && use exporter ; then
- pushd "${EX_S}" >/dev/null
- append-lfs-flags
- econf --disable-shared
- popd >/dev/null
- fi
-
- local myeconfargs=(
- --includedir="${EPREFIX}"/usr/include/gdbm
- --with-gdbm183-libdir="${EX_S}/.libs"
- --with-gdbm183-includedir="${EX_S}"
- $(use_enable berkdb libgdbm-compat)
- $(multilib_native_use_enable exporter gdbm-export)
- $(use_enable nls)
- $(use_enable static-libs static)
- $(use_with readline)
- )
- ECONF_SOURCE=${S} econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- use exporter && emake -C "${EX_S}" libgdbm.la
- emake
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -name '*.la' -delete || die
- fi
- mv "${ED%/}"/usr/include/gdbm/gdbm.h "${ED%/}"/usr/include/ || die
-}
diff --git a/sys-libs/gdbm/gdbm-1.17.ebuild b/sys-libs/gdbm/gdbm-1.17.ebuild
deleted file mode 100644
index c60d587a05e6..000000000000
--- a/sys-libs/gdbm/gdbm-1.17.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools flag-o-matic multilib multilib-minimal
-
-DESCRIPTION="Standard GNU database libraries"
-HOMEPAGE="https://www.gnu.org/software/gdbm/"
-SRC_URI="mirror://gnu/gdbm/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0/6" # libgdbm.so version
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+berkdb nls +readline static-libs"
-
-DEPEND="
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=( "${FILESDIR}"/gdbm-1.17-fix-gdbmsync.patch )
-
-src_prepare() {
- default
- eautoreconf
-}
-
-multilib_src_configure() {
- # gdbm doesn't appear to use either of these libraries
- export ac_cv_lib_dbm_main=no ac_cv_lib_ndbm_main=no
-
- local myeconfargs=(
- --includedir="${EPREFIX}"/usr/include/gdbm
- $(use_enable berkdb libgdbm-compat)
- $(use_enable nls)
- $(use_enable static-libs static)
- $(use_with readline)
- )
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -name '*.la' -delete || die
- fi
- mv "${ED%/}"/usr/include/gdbm/gdbm.h "${ED%/}"/usr/include/ || die
-}
diff --git a/sys-libs/gdbm/gdbm-1.18.1.ebuild b/sys-libs/gdbm/gdbm-1.18.1.ebuild
deleted file mode 100644
index 13d849c90bf2..000000000000
--- a/sys-libs/gdbm/gdbm-1.18.1.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools flag-o-matic multilib multilib-minimal
-
-DESCRIPTION="Standard GNU database libraries"
-HOMEPAGE="https://www.gnu.org/software/gdbm/"
-SRC_URI="mirror://gnu/gdbm/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0/6" # libgdbm.so version
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+berkdb nls +readline static-libs"
-
-DEPEND="
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=("${FILESDIR}"/${PN}-1.18.1-gcc-10.patch)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-multilib_src_configure() {
- # gdbm doesn't appear to use either of these libraries
- export ac_cv_lib_dbm_main=no ac_cv_lib_ndbm_main=no
-
- local myeconfargs=(
- --includedir="${EPREFIX}"/usr/include/gdbm
- $(use_enable berkdb libgdbm-compat)
- $(use_enable nls)
- $(use_enable static-libs static)
- $(use_with readline)
- )
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -name '*.la' -delete || die
- fi
- mv "${ED%/}"/usr/include/gdbm/gdbm.h "${ED%/}"/usr/include/ || die
-}
diff --git a/sys-libs/gdbm/gdbm-1.18.ebuild b/sys-libs/gdbm/gdbm-1.18.ebuild
deleted file mode 100644
index 52e70d61afa9..000000000000
--- a/sys-libs/gdbm/gdbm-1.18.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools flag-o-matic multilib multilib-minimal
-
-DESCRIPTION="Standard GNU database libraries"
-HOMEPAGE="https://www.gnu.org/software/gdbm/"
-SRC_URI="mirror://gnu/gdbm/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0/6" # libgdbm.so version
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+berkdb nls +readline static-libs"
-
-DEPEND="
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
-"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- default
- eautoreconf
-}
-
-multilib_src_configure() {
- # gdbm doesn't appear to use either of these libraries
- export ac_cv_lib_dbm_main=no ac_cv_lib_ndbm_main=no
-
- local myeconfargs=(
- --includedir="${EPREFIX}"/usr/include/gdbm
- $(use_enable berkdb libgdbm-compat)
- $(use_enable nls)
- $(use_enable static-libs static)
- $(use_with readline)
- )
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use static-libs ; then
- find "${ED}" -name '*.la' -delete || die
- fi
- mv "${ED%/}"/usr/include/gdbm/gdbm.h "${ED%/}"/usr/include/ || die
-}
diff --git a/sys-libs/gdbm/gdbm-1.18.1-r1.ebuild b/sys-libs/gdbm/gdbm-1.23.ebuild
index 0a1c428f7d42..178a5707800d 100644
--- a/sys-libs/gdbm/gdbm-1.18.1-r1.ebuild
+++ b/sys-libs/gdbm/gdbm-1.23.ebuild
@@ -1,29 +1,35 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit autotools flag-o-matic multilib 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 ~x86-macos ~m68k-mint ~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}"
-
-PATCHES=("${FILESDIR}"/${PN}-1.18.1-gcc-10.patch)
+BDEPEND="
+ test? ( dev-util/dejagnu )
+ verify-sig? ( sec-keys/openpgp-keys-gdbm )
+"
src_prepare() {
default
- eautoreconf
+
+ # gdbm ships with very old libtool files, regen to avoid
+ # errors when cross-compiling.
+ elibtoolize
}
multilib_src_configure() {
@@ -37,6 +43,7 @@ multilib_src_configure() {
$(use_enable static-libs static)
$(use_with readline)
)
+
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
@@ -46,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 d75e86be3d80..931542e3ee05 100644
--- a/sys-libs/gdbm/metadata.xml
+++ b/sys-libs/gdbm/metadata.xml
@@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>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>
- <flag name="exporter">enable gdbmexport binary for exporting data from gdbm-1.8 databases into gdbm-1.9</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 18bbbabeaa13..4571f2d2a6fc 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -1,17 +1,33 @@
DIST backport-rv32.txz 26416 BLAKE2B 7a6b593859f88a3c040f06324dace4cc6137d14d4580fad9ea285829666d761c3dd01c190746e86846c219423124c77a55bc57b6e56efe6401a9c99d7fa445cd SHA512 d08dc02c4f0a3c5a15c57fbb5190588121c0e0728e6ab2119483407a98625efe58b3c83b44d750b0146171e63dcf8a6dbb6d1a057d042f794eed9adbd1f0293e
DIST gcc-4.7.3-r1-multilib-bootstrap.tar.bz2 8064097 BLAKE2B 3cc5c82cd57d0fbd26d9a376ee8ca02f119fe9d653311cbe4d2b7b93aec2290adac3be271be19a7fdedae2e11e4b6e32360184e557204e100ad64357f5575d4b SHA512 40b93e194ad41a75d649d84d1c49070680f253a13f0617803243bc61c44fed1ca2d0a7572a97ebb79353f312b58b5f6360be916dd7435928cc53935082e15269
DIST gcc-multilib-bootstrap-20180511.tar.xz 2392908 BLAKE2B f3cf614399368acd8908f60d894c6344a2fa09383b30c1633a0682bc668367c8a2f8c6fec2d41b6e2178d709a2bd8db57e8b2ab56ba263c7d56f819c15acd061 SHA512 98c766e913693ab42ff790557acde2a36a8001e2648046a685b21964200df8d4d52d8452d499c0068c6648284d086ce062c2d36e2c6c2fd8aacd232d193f2853
+DIST gcc-multilib-bootstrap-20201208.tar.xz 5528452 BLAKE2B 16699a6e4df5b2f28a21776ae9e3728b26a9ea251f5580aa5349545ad7c9f6145b9cb6a12ca8f5f96b9cb2a3c70b7e66ca702e4c6f083ac00408e0a20a69e613 SHA512 a243f505e17d0a7e144e8713c077582412f61d6cf7f79baa846de4fb77f5e0f27e11c9a785e14624e04ac52287b32164e7995323aa11caef59113ac438254347
DIST glibc-2.19-patches-9.tar.bz2 24584 BLAKE2B a96e930a5bd20fa75d9f259cc2117fa5ce98072274a24a5823bf877e3739fa4c001a94d7865e065ee0527f3974430d27da8038e042340a451ad2052c62724f26 SHA512 a95b3063ade974a3556480b798b317d33c7423a8cb9e69f67249ffb8b3d3c671d70d2d5f782c1efadc0bec4cc49a96d4fe89911f3dfcd85b459f69f3b4f38f0e
DIST glibc-2.19.tar.xz 12083312 BLAKE2B 9dc03346e0f0df4bf009a92d894b0a9f964ff92b7f4c9663cedf1cb6cf90435f28a15539d33791ecf43ee578fa4e26f916af0367651312ef8f9c1c38ce0dafa2 SHA512 9e021fcb3afbb9ace2a0e37fded231a62de861bd766e29d47163a03182e37add718b7acc3963d1c525f9556773e842297725715acde48dcfbaab6e756af1a23d
-DIST glibc-2.25-patches-15.tar.bz2 78320 BLAKE2B 70c62cc10db13e2844de4d8a18972e0f4d01ba52fbd40db57c11d7b1c2c0d571b894f01e762bb26632fd696a77c299ef0766e2f129d2eda896f58325a754a13c SHA512 7204218ea82b677e0f278c4752ddb90aa0c08ac2349d061de81ec91dac204b0f10fe223d7b1055b9e0c21dac97c835f913a90c0168a5000d3be00dd20027c185
-DIST glibc-2.25.tar.xz 13873900 BLAKE2B 73ef792fff059f6ad154c9af2155ea15b7869ec1b93e557b6c58129bfb50f863c06f8b49425d75fd2df537dd9c4a68bad790cff770c50a6889732d66f507d349 SHA512 5b7a2418d5b8a1b6a907c6c7fb6477ee2a473151cb45e03d0d4cdd9a33497c90b1ee39e2e7e885e2b25743dcd3747336ef114b4a73eb001da1fd79f29e0f9a6e
-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-8.tar.xz 60868 BLAKE2B c641a77cab0b3e5379a6911a548483266110d747300f6bd4c138754cc35aff266088be8682ba45ac105c946ee309db0bc094b0c3bc48fd4303c925a7594e17e2 SHA512 1bc069d487ff9d4cd33c5d293bb0789114f65af5179b3d9df8ff0a9f043d5ffbcd030d8eabc90b329c896dfdd0409c4b8dac371eafdd380ecc660b9540320637
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-1.tar.xz 7640 BLAKE2B 849bdc1108e1f68f307bb9673f5ecda7c5470815f7d2de7956d529b638aafd4a8f37c22f79bc89d8e5f2efd51878927d3999d80586ec1074c46a52b6e148ea18 SHA512 a206d69693c3d9c527e17307b413aed05bcdefdf2537bb16af97ef31e85e4c48812971b60c00107b6a7c4bdc83c7e8ba1c9ea96f5641520852f98928f1018349
+DIST glibc-2.32-patches-8.tar.xz 65532 BLAKE2B 00c572cff396e52313d0324f7bc28192a65f06b22fc5a04aa631b76b3016842365006399715531ee693f3519720edcebef7884247f2f8c19e3518c1ddafab7cc SHA512 5240bc3a6df46d12c03ea4ce7b1a0df85301256ae3bd003fd04c61dadaaec34998873bf20544d891f6eedf896302bb916010aebc1d8d646a3cce09a93b533d0b
DIST glibc-2.32.tar.xz 16744512 BLAKE2B a56b4afbb35315c5cd6dca0f62e44455dceae3e6e88a8453621f9a5394a60ddf10ca9309b2db0911830c7fd77e3faa5d94694eb94d5b2c05fc5285cef52255da SHA512 8460c155b7003e04f18dabece4ed9ad77445fa2288a7dc08e80a8fc4c418828af29e0649951bd71a54ea2ad2d4da7570aafd9bdfe4a37e9951b772b442afe50b
+DIST glibc-2.33-patches-11.tar.xz 143916 BLAKE2B ac13b3ccf9681bb6d3c35ecc33e268ea3f67c1809f916019e692dc83e3ce809402a45548da5ca6c7c30d2a45a2638f9fa4254c0355bd4c53bdb216f17aa4e28b SHA512 0ee1dfcf9574543d49ab4fbfe53571258422b6e82b9d12a33e411cee7e517821a4c45c24962b5120783a4efc898afdfa170d33486cc74d94c526bdd14cc84300
+DIST glibc-2.33.tar.xz 17031280 BLAKE2B 703d12121c1e2c5d9e0c6ba5341f5fb5c4d9111611a83f2360029b5de9c6e5a5611249d1833684a58ed4afdf49cae614365d87ec8721ba0e5d218f593b1f229d SHA512 4cb5777b68b22b746cc51669e0e9282b43c83f6944e42656e6db7195ebb68f2f9260f130fdeb4e3cfc64efae4f58d96c43d388f52be1eb024ca448084684abdb
+DIST glibc-2.34-patches-17.tar.xz 241584 BLAKE2B e4eea130c331f64ba66e14a6ba318853141ee3e41b455cb45b8fdb702cae071dd307229dafcfcafcc41e5a56982f52c87e31d95295f824f1a2ae689a7e0f5b49 SHA512 c6a51b373be3986e1ad753541ccf73f29515b5df0f80e0450b26bed37e8c505e22e8f13e89554347e551819c8d89d30f306464e5d25cafa4a12400c112578dca
+DIST glibc-2.34.tar.xz 17301232 BLAKE2B 874031192f2f5a3b35c3f5b044a467d4be4e67e8593e070e5b49b901ce8ea6bde2f8d2f6c92fa33b3f61eb723572a9e5f2b45e56064168df80a96d3fdb6fa30c SHA512 15252affd9ef4523a8001db16d497f4fdcb3ddf4cde7fe80e075df0bd3cc6524dc29fbe20229dbf5f97af580556e6b1fac0de321a5fe25322bc3e72f93beb624
+DIST glibc-2.35-loongarch-patches-20220522.tar.xz 44728 BLAKE2B 09e7a061f3269ebd763cd700f7c23e6cd7aab738d87ee31f76a81281920c4e5e207964c79104cd75f0a2e07b77344c2a730a9063344aa1483cd3d9aeac87de40 SHA512 21f13892fb52ec753856d5559b032c2be3a76d1cf940127222f7aa878548ce7e6ea0d2ff8791ddb91aaa2b77ce17131cd2fb2ebbdaa99443bf0a6b4c81f7388d
+DIST glibc-2.35-patches-12.tar.xz 266056 BLAKE2B 7979dcfee270107d51c10e5ec74c9c1ab0d0a9743d6718a6d915d241fee6482958c957ef9fd25cd704925e3aa0d98c23115274c7594d149dec08c5e0766a488d SHA512 37a4c086b6a459cb378608a49d90705dddb806376edb2456b8c98e3a469fc558bce7b1b4c8a856b8dffb209e7b6e1c48382ed6f050284c5f74a92ca4f7d4b88a
+DIST glibc-2.35.tar.xz 18165952 BLAKE2B 623c728884f070cd87ffeb9203f74206197c52405ac9bc44f3dd519a3468b8e8ae2536c883e5d17d94417dbd1e91775de2e674314e4ff7424f9720026d6b7063 SHA512 e7336ce27561be5d7c217832a1136fb327e057bd8d3f92925b35c97e3e9f9e486948b5a1e03e5e4090772ef06437a074d10b82e68f17f1ad8f22077ee39e1b66
+DIST glibc-2.36-patches-10.tar.xz 118268 BLAKE2B 3d1bdb6c1a9e10ba78a344ca8940f68c49411a94aefd4d66bab17d784bc8783f2ae71efb171dea6d1919ea2c4a1f54333dabc2c4d99838ba8ec568484b84d0ae SHA512 b88dfc56ffc2df495e13cf90e709629db2b9b411a1c5ba6d39f40f45be3c2f49df7b1fe320d1cd7552515fe68dfc644c12916a6db34139ccf94ff755235d3a40
+DIST glibc-2.36.tar.xz 18610836 BLAKE2B f8375e084043f032609e66fd98c234249df57a595c59672acb1bb8c69aed64d339d526611553449492b097cda900ad1d9bae8873d7f5932b10a9a0d8c9210c55 SHA512 9ea0bbda32f83a85b7da0c34f169607fb8a102f0a11a914e6bf531be47d1bef4f5307128286cffa1e2dc5879f0e6ccaef527dd353486883fa332a0b44bde8b3e
+DIST glibc-2.37-patches-12.tar.xz 83716 BLAKE2B 123951d94dad6c22150c4ef2299bcaafc080322d6eeb58b49b0525a7f5c6867e99e96cd5c065578632d9a73b5527e2b2742bc29162da487894ecea6aff75df2e SHA512 b53c06e157b23f5fae1cd15eb90fdbf3076c79f295a687bdfd285689f94417267f167ff2d6a55c4d3c3b2e08dd6406c36fed4a5fee33378dd69976c1102c01a2
+DIST glibc-2.37.tar.xz 18674604 BLAKE2B 8139cd977b2ed3bfdbde5ffb1cda8f759763dbb83071167272fef798cfbdc0d17cfd1ec893d126c52c91511b7961f3ad12eed34534b99412dfa04a1cdd5b4ea3 SHA512 4fc5932f206bb1b8b54828a28af1a681616b838bbab60c81c82155f3629cbfe1301d271af65511ed917f4c6949a025429221fe6035753282f15346919f15b90c
+DIST glibc-2.38-patches-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.19/glibc-2.19-gcc-10.patch b/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch
new file mode 100644
index 000000000000..45e8ab80007e
--- /dev/null
+++ b/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch
@@ -0,0 +1,15 @@
+Identify gcc-10+ as a good compiler.
+
+Index: work/glibc-2.19/configure
+===================================================================
+--- glibc-2.19/configure
++++ glibc-2.19/configure
+@@ -4710,7 +4710,7 @@ $as_echo_n "checking version of $CC... "
+ ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+- 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* )
++ 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* | [1-9][0-9].* )
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+
diff --git a/sys-libs/glibc/files/2.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/host.conf-1 b/sys-libs/glibc/files/host.conf-1
index 4c58e52d6b3f..661b4af5d959 100644
--- a/sys-libs/glibc/files/host.conf-1
+++ b/sys-libs/glibc/files/host.conf-1
@@ -1,5 +1,4 @@
# /etc/host.conf:
-# $Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/etc/host.conf,v 1.1 2006/09/29 23:52:23 vapier Exp $
# The file /etc/host.conf contains configuration information specific to
# the resolver library. It should contain one configuration keyword per
diff --git a/sys-libs/glibc/glibc-2.19-r2.ebuild b/sys-libs/glibc/glibc-2.19-r3.ebuild
index 3b45b557922d..692c93b9e4cd 100644
--- a/sys-libs/glibc/glibc-2.19-r2.ebuild
+++ b/sys-libs/glibc/glibc-2.19-r3.ebuild
@@ -1,10 +1,12 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-inherit prefix eutils toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing
+TMPFILES_OPTIONAL=1
+
+inherit prefix toolchain-funcs flag-o-matic gnuconfig \
+ multilib systemd multiprocessing tmpfiles
DESCRIPTION="GNU libc C library"
HOMEPAGE="https://www.gnu.org/software/libc/"
@@ -31,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
@@ -90,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
@@ -333,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
@@ -590,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."
@@ -717,6 +724,7 @@ src_prepare() {
eapply "${FILESDIR}"/2.19/glibc-2.19-kernel-2.6.16-compat.patch
eapply "${FILESDIR}"/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch
+ eapply "${FILESDIR}"/2.19/glibc-2.19-gcc-10.patch
cd "${WORKDIR}"
find . -name configure -exec touch {} +
@@ -1075,7 +1083,6 @@ glibc_do_src_install() {
n64 /lib64/ld.so.1
# powerpc
ppc /lib/ld.so.1
- ppc64 /lib64/ld64.so.1
# s390
s390 /lib/ld.so.1
s390x /lib/ld64.so.1
@@ -1088,12 +1095,16 @@ glibc_do_src_install() {
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
)
;;
big)
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
)
;;
esac
@@ -1177,7 +1188,7 @@ glibc_do_src_install() {
sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
systemd_dounit nscd/nscd.service
- systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
else
# Do this since extra/etc/*.conf above might have nscd.conf.
rm -f "${ED}"/etc/nscd.conf
@@ -1296,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.25-r11.ebuild b/sys-libs/glibc/glibc-2.25-r11.ebuild
deleted file mode 100644
index 1946fcf4489c..000000000000
--- a/sys-libs/glibc/glibc-2.25-r11.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit toolchain-funcs toolchain-glibc
-
-DESCRIPTION="GNU libc6 (also called glibc2) C library"
-HOMEPAGE="https://www.gnu.org/software/libc/libc.html"
-
-LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86"
-EMULTILIB_PKG="true"
-
-# Configuration variables
-RELEASE_VER=""
-case ${PV} in
-9999*)
- EGIT_REPO_URIS="https://sourceware.org/git/glibc.git"
- inherit git-r3
- ;;
-*)
- RELEASE_VER=${PV}
- ;;
-esac
-GCC_BOOTSTRAP_VER="4.7.3-r1"
-# patches live at https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/glibc/
-PATCH_VER="15" # Gentoo patchset
-: ${NPTL_KERN_VER:="2.6.32"} # min kernel version nptl requires
-
-GLIBC_PATCH_EXCLUDE+=" 0005_all_sys-types.h-drop-sys-sysmacros.h-include.patch"
-
-IUSE="audit caps debug gd hardened multilib nscd +rpc selinux systemtap profile suid vanilla headers-only"
-
-# Here's how the cross-compile logic breaks down ...
-# CTARGET - machine that will target the binaries
-# CHOST - machine that will host the binaries
-# CBUILD - machine that will build the binaries
-# If CTARGET != CHOST, it means you want a libc for cross-compiling.
-# If CHOST != CBUILD, it means you want to cross-compile the libc.
-# CBUILD = CHOST = CTARGET - native build/install
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
-# For install paths:
-# CHOST = CTARGET - install into /
-# CHOST != CTARGET - install into /usr/CTARGET/
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-# Note [Disable automatic stripping]
-# Disabling automatic stripping for a few reasons:
-# - portage's attempt to strip breaks non-native binaries at least on
-# arm: bug #697428
-# - portage's attempt to strip libpthread.so.0 breaks gdb thread
-# enumeration: bug #697910. This is quite subtle:
-# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
-# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
-# via 'ps_pglobal_lookup' symbol defined in gdb.
-# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
-# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
-# (unexported) is used to sanity check compatibility before enabling
-# debugging.
-# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
-# * normal 'strip' command trims '.symtab'
-# Thus our main goal here is to prevent 'libpthread.so.0' from
-# losing it's '.symtab' entries.
-# As Gentoo's strip does not allow us to pass less aggressive stripping
-# options and does not check the machine target we disable stripping
-# entirely.
-RESTRICT=strip
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-# Why SLOT 2.2 you ask yourself while sippin your tea ?
-# Everyone knows 2.2 > 0, duh.
-SLOT="2.2"
-
-# General: We need a new-enough binutils/gcc to match upstream baseline.
-# arch: we need to make sure our binutils/gcc supports TLS.
-COMMON_DEPEND="
- nscd? ( selinux? (
- audit? ( sys-process/audit )
- caps? ( sys-libs/libcap )
- ) )
- suid? ( caps? ( sys-libs/libcap ) )
- selinux? ( sys-libs/libselinux )
- systemtap? ( dev-util/systemtap )
-"
-DEPEND="${COMMON_DEPEND}
- >=app-misc/pax-utils-0.1.10
-"
-RDEPEND="${COMMON_DEPEND}
- sys-apps/gentoo-functions"
-
-if [[ ${CATEGORY} == cross-* ]] ; then
- DEPEND+=" !headers-only? (
- >=${CATEGORY}/binutils-2.24
- >=${CATEGORY}/gcc-4.7
- )"
- [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
-else
- DEPEND+="
- >=sys-devel/binutils-2.24
- >=sys-devel/gcc-4.7
- virtual/os-headers"
- RDEPEND+=" vanilla? ( !sys-libs/timezone-data )"
- PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
-fi
-
-upstream_uris() {
- echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1
-}
-gentoo_uris() {
- local devspace="HTTP~vapier/dist/URI HTTP~dilfridge/distfiles/URI HTTP~tamiko/distfiles/URI HTTP~slyfox/distfiles/URI"
- devspace=${devspace//HTTP/https://dev.gentoo.org/}
- echo mirror://gentoo/$1 ${devspace//URI/$1}
-}
-SRC_URI=$(
- [[ -z ${EGIT_REPO_URIS} ]] && upstream_uris ${P}.tar.xz
- [[ -n ${PATCH_VER} ]] && gentoo_uris ${P}-patches-${PATCH_VER}.tar.bz2
-)
-SRC_URI+=" ${GCC_BOOTSTRAP_VER:+multilib? ( $(gentoo_uris gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2) )}"
-
-src_unpack() {
- [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2
-
- toolchain-glibc_src_unpack
-}
-
-src_prepare() {
- toolchain-glibc_src_prepare
-
- cd "${S}"
-
- epatch "${FILESDIR}"/2.19/${PN}-2.19-ia64-gcc-4.8-reloc-hack.patch #503838
-
- if use hardened ; then
- # We don't enable these for non-hardened as the output is very terse --
- # it only states that a crash happened. The default upstream behavior
- # includes backtraces and symbols.
- einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler"
- cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-stack_chk_fail.c debug/stack_chk_fail.c || die
- cp "${FILESDIR}"/2.25/glibc-2.25-gentoo-chk_fail.c debug/chk_fail.c || die
-
- if use debug ; then
- # Allow SIGABRT to dump core on non-hardened systems, or when debug is requested.
- sed -i \
- -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
- -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
- debug/Makefile || die
- fi
- fi
-
- case $(gcc-fullversion) in
- 4.8.[0-3]|4.9.0)
- eerror "You need to switch to a newer compiler; gcc-4.8.[0-3] and gcc-4.9.0 miscompile"
- eerror "glibc. See https://bugs.gentoo.org/547420 for details."
- die "need to switch compilers #547420"
- ;;
- esac
-}
diff --git a/sys-libs/glibc/glibc-2.30-r8.ebuild b/sys-libs/glibc/glibc-2.30-r8.ebuild
deleted file mode 100644
index 4888fb0aa864..000000000000
--- a/sys-libs/glibc/glibc-2.30-r8.ebuild
+++ /dev/null
@@ -1,1465 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing
-
-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 )"
-
-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
- 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
- ppc64 /lib64/ld64.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
- )
- ;;
- big)
- ldso_abi_list+=(
- # arm
- arm64 /lib/ld-linux-aarch64_be.so.1
- )
- ;;
- esac
- if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
- dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
- fi
- for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
- ldso_abi=${ldso_abi_list[i]}
- has ${ldso_abi} $(get_install_abis) || continue
-
- ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
- if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
- dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
- fi
- done
-
- # With devpts under Linux mounted properly, we do not need the pt_chown
- # binary to be setuid. This is because the default owners/perms will be
- # exactly what we want.
- if ! use suid ; then
- find "${ED}" -name pt_chown -exec chmod -s {} +
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- # We need to make sure that /lib and /usr/lib always exists.
- # gcc likes to use relative paths to get to its multilibs like
- # /usr/lib/../lib64/. So while we don't install any files into
- # /usr/lib/, we do need it to exist.
- keepdir $(alt_prefix)/lib
- keepdir $(alt_prefix)/usr/lib
-
- dosym usr/include $(alt_prefix)/sys-include
- return 0
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen
- doman *.[0-8]
- insinto /etc
- doins locale.gen
-
- # 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
- systemd_newtmpfilesd 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 07f25009bd18..b9666e9e7e59 100644
--- a/sys-libs/glibc/glibc-2.31-r7.ebuild
+++ b/sys-libs/glibc/glibc-2.31-r7.ebuild
@@ -1,12 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( python3_{10..11} )
+TMPFILES_OPTIONAL=1
-inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing
+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/"
@@ -22,7 +23,7 @@ PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
inherit git-r3
else
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
fi
@@ -102,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}
@@ -371,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
@@ -632,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."
@@ -1241,7 +1243,6 @@ glibc_do_src_install() {
n64 /lib64/ld.so.1
# powerpc
ppc /lib/ld.so.1
- ppc64 /lib64/ld64.so.1
# riscv
lp64d /lib/ld-linux-riscv64-lp64d.so.1
lp64 /lib/ld-linux-riscv64-lp64.so.1
@@ -1257,12 +1258,16 @@ glibc_do_src_install() {
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
)
;;
big)
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
)
;;
esac
@@ -1359,7 +1364,7 @@ glibc_do_src_install() {
sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
systemd_dounit nscd/nscd.service
- systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
fi
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
@@ -1482,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-r1.ebuild b/sys-libs/glibc/glibc-2.32-r8.ebuild
index 18d94a7b0ef0..c2a242aa11ed 100644
--- a/sys-libs/glibc/glibc-2.32-r1.ebuild
+++ b/sys-libs/glibc/glibc-2.32-r8.ebuild
@@ -1,12 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( python3_{10..11} )
+TMPFILES_OPTIONAL=1
-inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing
+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/"
@@ -16,13 +17,13 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=1
+PATCH_VER=8
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
inherit git-r3
else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
SRC_URI+=" riscv? ( https://dev.gentoo.org/~dilfridge/distfiles/backport-rv32.txz )"
@@ -30,7 +31,7 @@ fi
RELEASE_VER=${PV}
-GCC_BOOTSTRAP_VER=20180511
+GCC_BOOTSTRAP_VER=20201208
LOCALE_GEN_VER=2.10
@@ -89,11 +90,19 @@ fi
# and that gcc already contains the hardened patches.
# Lastly, let's avoid some openssh nastiness, bug 708224, as
# convenience to our users.
+
+# gzip, grep, awk are needed by locale-gen, bug 740750
+
BDEPEND="
${PYTHON_DEPS}
>=app-misc/pax-utils-0.1.10
sys-devel/bison
doc? ( sys-apps/texinfo )
+ !compile-locales? (
+ app-arch/gzip
+ sys-apps/grep
+ app-alternatives/awk
+ )
"
COMMON_DEPEND="
gd? ( media-libs/gd:2= )
@@ -103,13 +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
+ app-alternatives/awk
+ )
test? ( >=net-dns/libidn2-2.3.0 )
"
RDEPEND="${COMMON_DEPEND}
+ app-arch/gzip
+ sys-apps/grep
+ app-alternatives/awk
sys-apps/gentoo-functions
"
@@ -372,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
@@ -633,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."
@@ -942,6 +960,11 @@ glibc_do_configure() {
$(use_enable static-pie)
$(use_enable systemtap)
$(use_enable nscd)
+
+ # locale data is arch-independent
+ # https://bugs.gentoo.org/753740
+ libc_cv_complocaledir='${exec_prefix}/lib/locale'
+
${EXTRA_ECONF}
)
@@ -1249,7 +1272,6 @@ glibc_do_src_install() {
n64 /lib64/ld.so.1
# powerpc
ppc /lib/ld.so.1
- ppc64 /lib64/ld64.so.1
# riscv
ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
ilp32 /lib/ld-linux-riscv32-ilp32.so.1
@@ -1267,12 +1289,16 @@ glibc_do_src_install() {
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
)
;;
big)
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
)
;;
esac
@@ -1327,26 +1353,7 @@ glibc_do_src_install() {
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
+ keepdir /usr/lib/locale
cd "${S}"
@@ -1369,7 +1376,7 @@ glibc_do_src_install() {
sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
systemd_dounit nscd/nscd.service
- systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
fi
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
@@ -1473,6 +1480,12 @@ pkg_preinst() {
[[ -n ${ROOT} ]] && return 0
[[ -d ${ED}/$(get_libdir) ]] || return 0
[[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
+
+ if [[ -L ${EROOT}/usr/lib/locale ]]; then
+ # Help portage migrate this to a directory
+ # https://bugs.gentoo.org/753740
+ rm "${EROOT}"/usr/lib/locale || die
+ fi
}
pkg_postinst() {
@@ -1492,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.31-r6.ebuild b/sys-libs/glibc/glibc-2.33-r14.ebuild
index 671c8ee63a2b..c9d2f2586f87 100644
--- a/sys-libs/glibc/glibc-2.31-r6.ebuild
+++ b/sys-libs/glibc/glibc-2.33-r14.ebuild
@@ -1,12 +1,16 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
+# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
+# Please read & adapt the page as necessary if obsolete.
-inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing
+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/"
@@ -16,7 +20,7 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=8
+PATCH_VER=11
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -29,14 +33,17 @@ fi
RELEASE_VER=${PV}
-GCC_BOOTSTRAP_VER=20180511
+GCC_BOOTSTRAP_VER=20201208
+
+LOCALE_GEN_VER=2.22
-LOCALE_GEN_VER=2.00
+GLIBC_SYSTEMD_VER=20210814
SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
-SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
+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 nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla"
+IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemd systemtap test vanilla"
# Minimum kernel version that glibc requires
MIN_KERN_VER="3.2.0"
@@ -88,11 +95,19 @@ fi
# and that gcc already contains the hardened patches.
# Lastly, let's avoid some openssh nastiness, bug 708224, as
# convenience to our users.
+
+# gzip, grep, awk are needed by locale-gen, bug 740750
+
BDEPEND="
${PYTHON_DEPS}
- >=app-misc/pax-utils-0.1.10
+ >=app-misc/pax-utils-1.3.1
sys-devel/bison
doc? ( sys-apps/texinfo )
+ !compile-locales? (
+ app-arch/gzip
+ sys-apps/grep
+ app-alternatives/awk
+ )
"
COMMON_DEPEND="
gd? ( media-libs/gd:2= )
@@ -102,27 +117,36 @@ COMMON_DEPEND="
) )
suid? ( caps? ( sys-libs/libcap ) )
selinux? ( sys-libs/libselinux )
- systemtap? ( dev-util/systemtap )
- !<net-misc/openssh-8.1_p1-r2
+ systemtap? ( dev-debug/systemtap )
"
DEPEND="${COMMON_DEPEND}
+ compile-locales? (
+ app-arch/gzip
+ sys-apps/grep
+ app-alternatives/awk
+ )
test? ( >=net-dns/libidn2-2.3.0 )
"
RDEPEND="${COMMON_DEPEND}
+ app-arch/gzip
+ sys-apps/grep
+ app-alternatives/awk
sys-apps/gentoo-functions
+ !<app-misc/pax-utils-1.3.1
+ !<net-misc/openssh-8.1_p1-r2
"
RESTRICT="!test? ( test )"
if [[ ${CATEGORY} == cross-* ]] ; then
BDEPEND+=" !headers-only? (
- >=${CATEGORY}/binutils-2.24
+ >=${CATEGORY}/binutils-2.27
>=${CATEGORY}/gcc-6
)"
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
else
BDEPEND+="
- >=sys-devel/binutils-2.24
+ >=sys-devel/binutils-2.27
>=sys-devel/gcc-6
"
DEPEND+=" virtual/os-headers "
@@ -151,6 +175,12 @@ XFAIL_TEST_LIST=(
# 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
)
#
@@ -371,14 +401,22 @@ setup_flags() {
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'
+
# #492892
filter-flags -frecord-gcc-switches
+ # #829583
+ filter-lfs-flags
+
unset CBUILD_OPT CTARGET_OPT
if use multilib ; then
CTARGET_OPT=$(get_abi_CTARGET)
@@ -398,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
@@ -480,14 +491,104 @@ 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=${__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}}
+ export CXX=${__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}}
+
+ # and make sure __ORIC_CC and __ORIG_CXX is defined now.
+ export __ORIG_CC=${CC}
+ export __ORIG_CXX=${CXX}
+
+ if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then
+
+ # If we are running in an otherwise clang/llvm environment, we need to
+ # recover the proper gcc and binutils settings here, at least until glibc
+ # is finally building with clang. So let's override everything that is
+ # set in the clang profiles.
+ # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always
+ # a good start into that direction.
+ # Also, if you're crosscompiling, let's assume you know what you are doing.
+ # Hopefully.
+
+ local current_binutils_path=$(binutils-config -B)
+ local current_gcc_path=$(gcc-config -B)
+ einfo "Overriding clang configuration, since it won't work here"
+
+ export CC="${current_gcc_path}/gcc"
+ export CXX="${current_gcc_path}/g++"
+ export LD="${current_binutils_path}/ld.bfd"
+ export AR="${current_binutils_path}/ar"
+ export AS="${current_binutils_path}/as"
+ export NM="${current_binutils_path}/nm"
+ export STRIP="${current_binutils_path}/strip"
+ export RANLIB="${current_binutils_path}/ranlib"
+ export OBJCOPY="${current_binutils_path}/objcopy"
+ export STRINGS="${current_binutils_path}/strings"
+ export OBJDUMP="${current_binutils_path}/objdump"
+ export READELF="${current_binutils_path}/readelf"
+ export ADDR2LINE="${current_binutils_path}/addr2line"
+
+ # do we need to also do flags munging here? yes! at least...
+ filter-flags '-fuse-ld=*'
+ filter-flags '-D_FORTIFY_SOURCE=*'
+
+ else
+
+ # this is the "normal" case
+
+ export CC="$(tc-getCC ${CTARGET})"
+ export CXX="$(tc-getCXX ${CTARGET})"
+
+ # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
+ # can't detect them automatically due to ${CHOST} mismatch and fallbacks
+ # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
+ export NM="$(tc-getNM ${CTARGET})"
+ export READELF="$(tc-getREADELF ${CTARGET})"
+
+ fi
+
# We need to export CFLAGS with abi information in them because glibc's
# configure script checks CFLAGS for some targets (like mips). Keep
# around the original clean value to avoid appending multiple ABIs on
- # top of each other.
- : ${__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_CC=${CC}
+ export __GLIBC_CXX=${CXX}
+
+ export __abi_CFLAGS="$(get_abi_CFLAGS)"
+
+ # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760
+ # To build .S (assembly) files with the same ABI-specific flags
+ # upstream currently recommends adding CFLAGS to CC/CXX:
+ # https://sourceware.org/PR23273
+ # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS
+ # and breaks multiarch support. See 659030#c3 for an example.
+ # The glibc configure script doesn't properly use LDFLAGS all the time.
+ export CC="${__GLIBC_CC} ${__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}"
+
+ # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
+ export CXX="${__GLIBC_CXX} ${__abi_CFLAGS} ${CFLAGS}"
+
+ if is_crosscompile; then
+ # Assume worst-case bootstrap: glibc is buil first time
+ # when ${CTARGET}-g++ is not available yet. We avoid
+ # building auxiliary programs that require C++: bug #683074
+ # It should not affect final result.
+ export libc_cv_cxx_link_ok=no
+ # The line above has the same effect. We set CXX explicitly
+ # to make build logs less confusing.
+ export CXX=
+ fi
}
foreach_abi() {
@@ -628,21 +729,6 @@ sanity_prechecks() {
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
@@ -667,15 +753,7 @@ sanity_prechecks() {
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 ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then
if [[ ${CTARGET} == *-linux* ]] ; then
local run_kv build_kv want_kv
@@ -703,6 +781,20 @@ sanity_prechecks() {
fi
}
+upgrade_warning() {
+ if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then
+ local oldv newv=$(ver_cut 1-2 ${PV})
+ for oldv in ${REPLACING_VERSIONS}; do
+ if ver_test ${oldv} -lt ${newv}; then
+ ewarn "After upgrading glibc, please restart all running processes."
+ ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)."
+ ewarn "Alternatively, reboot your system."
+ break
+ fi
+ done
+ fi
+}
+
#
# the phases
#
@@ -713,6 +805,7 @@ pkg_pretend() {
# All the checks...
einfo "Checking general environment sanity."
sanity_prechecks
+ upgrade_warning
}
pkg_setup() {
@@ -726,7 +819,7 @@ src_unpack() {
# Consistency is not guaranteed between pkg_ and src_ ...
sanity_prechecks
- use multilib && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
+ use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
setup_env
@@ -748,6 +841,7 @@ src_unpack() {
cd "${WORKDIR}" || die
unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
+ use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz
}
src_prepare() {
@@ -758,7 +852,7 @@ src_prepare() {
else
patchsetname="${RELEASE_VER}-${PATCH_VER}"
fi
- elog "Applying Gentoo Glibc Patchset ${patchsetname}"
+ einfo "Applying Gentoo Glibc Patchset ${patchsetname}"
eapply "${WORKDIR}"/patches
einfo "Done."
fi
@@ -783,61 +877,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
+ 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
- # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760
- # To build .S (assembly) files with the same ABI-specific flags
- # upstream currently recommends adding CFLAGS to CC/CXX:
- # https://sourceware.org/PR23273
- # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS
- # and breaks multiarch support. See 659030#c3 for an example.
- # The glibc configure script doesn't properly use LDFLAGS all the time.
- export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}"
- einfo " $(printf '%15s' 'Manual CC:') ${CC}"
-
- # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
- export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}"
-
- if is_crosscompile; then
- # Assume worst-case bootstrap: glibc is buil first time
- # when ${CTARGET}-g++ is not available yet. We avoid
- # building auxiliary programs that require C++: bug #683074
- # It should not affect final result.
- export libc_cv_cxx_link_ok=no
- # The line above has the same effect. We set CXX explicitly
- # to make build logs less confusing.
- export CXX=
- fi
- einfo " $(printf '%15s' 'Manual CXX:') ${CXX}"
-
- # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
- # can't detect them automatically due to ${CHOST} mismatch and fallbacks
- # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
- export NM="$(tc-getNM ${CTARGET})"
- export READELF="$(tc-getREADELF ${CTARGET})"
- einfo " $(printf '%15s' 'Manual NM:') ${NM}"
- einfo " $(printf '%15s' 'Manual READELF:') ${READELF}"
-
echo
-
local myconf=()
case ${CTARGET} in
@@ -846,14 +892,6 @@ glibc_do_configure() {
# 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.
@@ -934,6 +972,20 @@ glibc_do_configure() {
$(use_enable static-pie)
$(use_enable systemtap)
$(use_enable nscd)
+
+ # locale data is arch-independent
+ # https://bugs.gentoo.org/753740
+ libc_cv_complocaledir='${exec_prefix}/lib/locale'
+
+ # -march= option tricks build system to infer too
+ # high ISA level: https://sourceware.org/PR27318
+ libc_cv_include_x86_isa_level=no
+ # Explicit override of https://sourceware.org/PR27991
+ # exposes a bug in glibc's configure:
+ # https://sourceware.org/PR27991
+ libc_cv_have_x86_lahf_sahf=no
+ libc_cv_have_x86_movbe=no
+
${EXTRA_ECONF}
)
@@ -976,7 +1028,7 @@ glibc_do_configure() {
# 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
+ 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
@@ -1077,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}
)
@@ -1170,13 +1223,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}" \
@@ -1241,8 +1294,9 @@ glibc_do_src_install() {
n64 /lib64/ld.so.1
# powerpc
ppc /lib/ld.so.1
- ppc64 /lib64/ld64.so.1
# riscv
+ ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
+ ilp32 /lib/ld-linux-riscv32-ilp32.so.1
lp64d /lib/ld-linux-riscv64-lp64d.so.1
lp64 /lib/ld-linux-riscv64-lp64.so.1
# s390
@@ -1257,12 +1311,16 @@ glibc_do_src_install() {
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
)
;;
big)
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
)
;;
esac
@@ -1279,6 +1337,27 @@ glibc_do_src_install() {
fi
done
+ # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that require this.
+ # However, binary commercial packages are known to adhere to weird practices.
+ # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
# With devpts under Linux mounted properly, we do not need the pt_chown
# binary to be setuid. This is because the default owners/perms will be
# exactly what we want.
@@ -1317,32 +1396,19 @@ glibc_do_src_install() {
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
+ keepdir /usr/lib/locale
cd "${S}"
# Install misc network config files
insinto /etc
- doins posix/gai.conf nss/nsswitch.conf
+ 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
@@ -1358,8 +1424,8 @@ glibc_do_src_install() {
sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
- systemd_dounit nscd/nscd.service
- systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf
+ use systemd && systemd_dounit nscd/nscd.service
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
fi
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
@@ -1405,7 +1471,7 @@ src_install() {
foreach_abi glibc_do_src_install
if ! use static-libs ; then
- elog "Not installing static glibc libraries"
+ einfo "Not installing static glibc libraries"
find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
fi
}
@@ -1428,6 +1494,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})
@@ -1440,7 +1512,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
@@ -1463,6 +1535,22 @@ pkg_preinst() {
[[ -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() {
@@ -1478,11 +1566,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"
@@ -1492,4 +1582,14 @@ pkg_postinst() {
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.32.ebuild b/sys-libs/glibc/glibc-2.34-r14.ebuild
index bf2ba5df8529..e0d9f9970c12 100644
--- a/sys-libs/glibc/glibc-2.32.ebuild
+++ b/sys-libs/glibc/glibc-2.34-r14.ebuild
@@ -1,12 +1,16 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
+# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
+# Please read & adapt the page as necessary if obsolete.
-inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing
+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/"
@@ -16,30 +20,36 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=1
+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
RELEASE_VER=${PV}
-GCC_BOOTSTRAP_VER=20180511
+GCC_BOOTSTRAP_VER=20201208
+
+LOCALE_GEN_VER=2.22
-LOCALE_GEN_VER=2.10
+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? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
+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 nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla"
+IUSE="audit caps cet +clone3 compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemd systemtap test vanilla"
# Minimum kernel version that glibc requires
MIN_KERN_VER="3.2.0"
+# Minimum pax-utils version needed (which contains any new syscall changes for
+# its seccomp filter!). Please double check this!
+MIN_PAX_UTILS_VER="1.3.3"
# Here's how the cross-compile logic breaks down ...
# CTARGET - machine that will target the binaries
@@ -88,11 +98,19 @@ fi
# and that gcc already contains the hardened patches.
# Lastly, let's avoid some openssh nastiness, bug 708224, as
# convenience to our users.
+
+# gzip, grep, awk are needed by locale-gen, bug 740750
+
BDEPEND="
${PYTHON_DEPS}
- >=app-misc/pax-utils-0.1.10
+ >=app-misc/pax-utils-${MIN_PAX_UTILS_VER}
sys-devel/bison
doc? ( sys-apps/texinfo )
+ !compile-locales? (
+ app-arch/gzip
+ sys-apps/grep
+ app-alternatives/awk
+ )
"
COMMON_DEPEND="
gd? ( media-libs/gd:2= )
@@ -102,27 +120,36 @@ COMMON_DEPEND="
) )
suid? ( caps? ( sys-libs/libcap ) )
selinux? ( sys-libs/libselinux )
- systemtap? ( dev-util/systemtap )
- !<net-misc/openssh-8.1_p1-r2
+ systemtap? ( dev-debug/systemtap )
"
DEPEND="${COMMON_DEPEND}
+ compile-locales? (
+ app-arch/gzip
+ sys-apps/grep
+ app-alternatives/awk
+ )
test? ( >=net-dns/libidn2-2.3.0 )
"
RDEPEND="${COMMON_DEPEND}
+ app-arch/gzip
+ sys-apps/grep
+ app-alternatives/awk
sys-apps/gentoo-functions
+ !<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
+ !<net-misc/openssh-8.1_p1-r2
"
RESTRICT="!test? ( test )"
if [[ ${CATEGORY} == cross-* ]] ; then
BDEPEND+=" !headers-only? (
- >=${CATEGORY}/binutils-2.24
+ >=${CATEGORY}/binutils-2.27
>=${CATEGORY}/gcc-6
)"
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
else
BDEPEND+="
- >=sys-devel/binutils-2.24
+ >=sys-devel/binutils-2.27
>=sys-devel/gcc-6
"
DEPEND+=" virtual/os-headers "
@@ -139,18 +166,16 @@ 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
)
#
@@ -296,6 +321,14 @@ setup_target_flags() {
export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})"
fi
+
+ # Workaround for https://bugs.gentoo.org/823780. This really should
+ # be removed when the upstream bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103275
+ # is fixed in our tree, either via 11.3 or an 11.2p2 patch set.
+ if [[ ${ABI} == x86 ]] && tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)); then
+ export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f"
+ einfo "Auto adding -mno-avx512f to CFLAGS_x86 (bug #823780) (ABI=${ABI})"
+ fi
;;
mips)
# The mips abi cannot support the GNU style hashes. #233233
@@ -370,15 +403,24 @@ 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
filter-ldflags '-Wl,-rpath=*'
+ # ld can't use -r & --relax at the same time, bug #788901
+ # https://sourceware.org/PR27837
+ filter-ldflags '-Wl,--relax'
+
# #492892
filter-flags -frecord-gcc-switches
+ # #829583
+ filter-lfs-flags
+
unset CBUILD_OPT CTARGET_OPT
if use multilib ; then
CTARGET_OPT=$(get_abi_CTARGET)
@@ -396,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() {
@@ -480,14 +498,106 @@ 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=${__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}}
+ export CXX=${__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}}
+
+ # and make sure __ORIC_CC and __ORIG_CXX is defined now.
+ export __ORIG_CC=${CC}
+ export __ORIG_CXX=${CXX}
+
+ if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then
+
+ # If we are running in an otherwise clang/llvm environment, we need to
+ # recover the proper gcc and binutils settings here, at least until glibc
+ # is finally building with clang. So let's override everything that is
+ # set in the clang profiles.
+ # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always
+ # a good start into that direction.
+ # Also, if you're crosscompiling, let's assume you know what you are doing.
+ # Hopefully.
+ # Last, we need the settings of the *build* environment, not of the
+ # target environment...
+
+ local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B)
+ local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B)
+ einfo "Overriding clang configuration, since it won't work here"
+
+ export CC="${current_gcc_path}/gcc"
+ export CXX="${current_gcc_path}/g++"
+ export LD="${current_binutils_path}/ld.bfd"
+ export AR="${current_binutils_path}/ar"
+ export AS="${current_binutils_path}/as"
+ export NM="${current_binutils_path}/nm"
+ export STRIP="${current_binutils_path}/strip"
+ export RANLIB="${current_binutils_path}/ranlib"
+ export OBJCOPY="${current_binutils_path}/objcopy"
+ export STRINGS="${current_binutils_path}/strings"
+ export OBJDUMP="${current_binutils_path}/objdump"
+ export READELF="${current_binutils_path}/readelf"
+ export ADDR2LINE="${current_binutils_path}/addr2line"
+
+ # do we need to also do flags munging here? yes! at least...
+ filter-flags '-fuse-ld=*'
+ filter-flags '-D_FORTIFY_SOURCE=*'
+
+ else
+
+ # this is the "normal" case
+
+ export CC="$(tc-getCC ${CTARGET})"
+ export CXX="$(tc-getCXX ${CTARGET})"
+
+ # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
+ # can't detect them automatically due to ${CHOST} mismatch and fallbacks
+ # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
+ export NM="$(tc-getNM ${CTARGET})"
+ export READELF="$(tc-getREADELF ${CTARGET})"
+
+ fi
+
# We need to export CFLAGS with abi information in them because glibc's
# configure script checks CFLAGS for some targets (like mips). Keep
# around the original clean value to avoid appending multiple ABIs on
- # top of each other.
- : ${__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_CC=${CC}
+ export __GLIBC_CXX=${CXX}
+
+ export __abi_CFLAGS="$(get_abi_CFLAGS)"
+
+ # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760
+ # To build .S (assembly) files with the same ABI-specific flags
+ # upstream currently recommends adding CFLAGS to CC/CXX:
+ # https://sourceware.org/PR23273
+ # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS
+ # and breaks multiarch support. See 659030#c3 for an example.
+ # The glibc configure script doesn't properly use LDFLAGS all the time.
+ export CC="${__GLIBC_CC} ${__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}"
+
+ # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
+ export CXX="${__GLIBC_CXX} ${__abi_CFLAGS} ${CFLAGS}"
+
+ if is_crosscompile; then
+ # Assume worst-case bootstrap: glibc is buil first time
+ # when ${CTARGET}-g++ is not available yet. We avoid
+ # building auxiliary programs that require C++: bug #683074
+ # It should not affect final result.
+ export libc_cv_cxx_link_ok=no
+ # The line above has the same effect. We set CXX explicitly
+ # to make build logs less confusing.
+ export CXX=
+ fi
}
foreach_abi() {
@@ -628,21 +738,6 @@ sanity_prechecks() {
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
@@ -667,13 +762,13 @@ sanity_prechecks() {
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!"
+ 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
@@ -703,6 +798,21 @@ sanity_prechecks() {
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
#
@@ -713,6 +823,7 @@ pkg_pretend() {
# All the checks...
einfo "Checking general environment sanity."
sanity_prechecks
+ upgrade_warning
}
pkg_setup() {
@@ -726,7 +837,7 @@ src_unpack() {
# Consistency is not guaranteed between pkg_ and src_ ...
sanity_prechecks
- use multilib && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
+ use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
setup_env
@@ -748,6 +859,7 @@ src_unpack() {
cd "${WORKDIR}" || die
unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
+ use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz
}
src_prepare() {
@@ -758,11 +870,19 @@ src_prepare() {
else
patchsetname="${RELEASE_VER}-${PATCH_VER}"
fi
- elog "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
@@ -783,61 +903,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
+ 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
- # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760
- # To build .S (assembly) files with the same ABI-specific flags
- # upstream currently recommends adding CFLAGS to CC/CXX:
- # https://sourceware.org/PR23273
- # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS
- # and breaks multiarch support. See 659030#c3 for an example.
- # The glibc configure script doesn't properly use LDFLAGS all the time.
- export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}"
- einfo " $(printf '%15s' 'Manual CC:') ${CC}"
-
- # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
- export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}"
-
- if is_crosscompile; then
- # Assume worst-case bootstrap: glibc is buil first time
- # when ${CTARGET}-g++ is not available yet. We avoid
- # building auxiliary programs that require C++: bug #683074
- # It should not affect final result.
- export libc_cv_cxx_link_ok=no
- # The line above has the same effect. We set CXX explicitly
- # to make build logs less confusing.
- export CXX=
- fi
- einfo " $(printf '%15s' 'Manual CXX:') ${CXX}"
-
- # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
- # can't detect them automatically due to ${CHOST} mismatch and fallbacks
- # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
- export NM="$(tc-getNM ${CTARGET})"
- export READELF="$(tc-getREADELF ${CTARGET})"
- einfo " $(printf '%15s' 'Manual NM:') ${NM}"
- einfo " $(printf '%15s' 'Manual READELF:') ${READELF}"
-
echo
-
local myconf=()
case ${CTARGET} in
@@ -846,14 +918,6 @@ glibc_do_configure() {
# 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.
@@ -934,6 +998,20 @@ glibc_do_configure() {
$(use_enable static-pie)
$(use_enable systemtap)
$(use_enable nscd)
+
+ # locale data is arch-independent
+ # https://bugs.gentoo.org/753740
+ libc_cv_complocaledir='${exec_prefix}/lib/locale'
+
+ # -march= option tricks build system to infer too
+ # high ISA level: https://sourceware.org/PR27318
+ libc_cv_include_x86_isa_level=no
+ # Explicit override of https://sourceware.org/PR27991
+ # exposes a bug in glibc's configure:
+ # https://sourceware.org/PR27991
+ libc_cv_have_x86_lahf_sahf=no
+ libc_cv_have_x86_movbe=no
+
${EXTRA_ECONF}
)
@@ -949,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}"
@@ -976,7 +1049,7 @@ glibc_do_configure() {
# 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
+ 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
@@ -1077,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}
)
@@ -1170,13 +1244,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}" \
@@ -1241,8 +1315,9 @@ glibc_do_src_install() {
n64 /lib64/ld.so.1
# powerpc
ppc /lib/ld.so.1
- ppc64 /lib64/ld64.so.1
# riscv
+ ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
+ ilp32 /lib/ld-linux-riscv32-ilp32.so.1
lp64d /lib/ld-linux-riscv64-lp64d.so.1
lp64 /lib/ld-linux-riscv64-lp64.so.1
# s390
@@ -1257,12 +1332,16 @@ glibc_do_src_install() {
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
)
;;
big)
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
)
;;
esac
@@ -1279,6 +1358,27 @@ glibc_do_src_install() {
fi
done
+ # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that require this.
+ # However, binary commercial packages are known to adhere to weird practices.
+ # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
# With devpts under Linux mounted properly, we do not need the pt_chown
# binary to be setuid. This is because the default owners/perms will be
# exactly what we want.
@@ -1317,32 +1417,19 @@ glibc_do_src_install() {
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
+ keepdir /usr/lib/locale
cd "${S}"
# Install misc network config files
insinto /etc
- doins posix/gai.conf nss/nsswitch.conf
+ 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
@@ -1358,8 +1445,8 @@ glibc_do_src_install() {
sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
- systemd_dounit nscd/nscd.service
- systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf
+ use systemd && systemd_dounit nscd/nscd.service
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
fi
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
@@ -1405,7 +1492,7 @@ src_install() {
foreach_abi glibc_do_src_install
if ! use static-libs ; then
- elog "Not installing static glibc libraries"
+ einfo "Not installing static glibc libraries"
find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
fi
}
@@ -1428,6 +1515,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})
@@ -1440,7 +1533,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
@@ -1463,6 +1556,22 @@ pkg_preinst() {
[[ -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() {
@@ -1478,11 +1587,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"
@@ -1492,4 +1603,14 @@ pkg_postinst() {
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.30-r9.ebuild b/sys-libs/glibc/glibc-2.35-r11.ebuild
index 8765ce6d87e2..57474eb0373f 100644
--- a/sys-libs/glibc/glibc-2.30-r9.ebuild
+++ b/sys-libs/glibc/glibc-2.35-r11.ebuild
@@ -1,12 +1,16 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
+# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
+# Please read & adapt the page as necessary if obsolete.
-inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing
+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/"
@@ -15,30 +19,38 @@ SLOT="2.2"
EMULTILIB_PKG="true"
+# Gentoo patchset (ignored for live ebuilds)
+PATCH_VER=12
+PATCH_DEV=dilfridge
+
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"
+ 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}
-GCC_BOOTSTRAP_VER=20180511
+GCC_BOOTSTRAP_VER=20201208
-# Gentoo patchset
-PATCH_VER=10
-PATCH_DEV=dilfridge
+LOCALE_GEN_VER=2.22
+
+GLIBC_SYSTEMD_VER=20210729
-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/~slyfox/distfiles/glibc-2.30-sparc-reg-fix-clobber.patch"
+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 nscd profile selinux +ssp +static-libs suid 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"
+# 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
@@ -85,11 +97,21 @@ fi
# We need a new-enough binutils/gcc to match upstream baseline.
# Also we need to make sure our binutils/gcc supports TLS,
# and that gcc already contains the hardened patches.
+# Lastly, let's avoid some openssh nastiness, bug 708224, as
+# convenience to our users.
+
+# gzip, grep, awk are needed by locale-gen, bug 740750
+
BDEPEND="
${PYTHON_DEPS}
- >=app-misc/pax-utils-0.1.10
+ >=app-misc/pax-utils-${MIN_PAX_UTILS_VER}
sys-devel/bison
doc? ( sys-apps/texinfo )
+ !compile-locales? (
+ app-arch/gzip
+ sys-apps/grep
+ app-alternatives/awk
+ )
"
COMMON_DEPEND="
gd? ( media-libs/gd:2= )
@@ -99,27 +121,37 @@ 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
+ app-alternatives/awk
+ )
test? ( >=net-dns/libidn2-2.3.0 )
"
RDEPEND="${COMMON_DEPEND}
+ app-arch/gzip
+ sys-apps/grep
+ app-alternatives/awk
sys-apps/gentoo-functions
+ !<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
+ !<net-misc/openssh-8.1_p1-r2
"
RESTRICT="!test? ( test )"
if [[ ${CATEGORY} == cross-* ]] ; then
BDEPEND+=" !headers-only? (
- >=${CATEGORY}/binutils-2.24
- >=${CATEGORY}/gcc-6
+ >=${CATEGORY}/binutils-2.27
+ >=${CATEGORY}/gcc-6.2
)"
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
else
BDEPEND+="
- >=sys-devel/binutils-2.24
- >=sys-devel/gcc-6
+ >=sys-devel/binutils-2.27
+ >=sys-devel/gcc-6.2
"
DEPEND+=" virtual/os-headers "
RDEPEND+="
@@ -135,37 +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=(
- # 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
+ # 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} ]]
}
@@ -232,6 +258,7 @@ do_compile_test() {
rm -f glibc-test*
printf '%b' "$*" > glibc-test.c
+ # We assume CC is already set up.
nonfatal emake glibc-test
ret=$?
@@ -287,34 +314,47 @@ 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.
+ 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
;;
- 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
;;
+ 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"
@@ -376,15 +416,24 @@ 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
filter-ldflags '-Wl,-rpath=*'
+ # ld can't use -r & --relax at the same time, bug #788901
+ # https://sourceware.org/PR27837
+ filter-ldflags '-Wl,--relax'
+
# #492892
filter-flags -frecord-gcc-switches
+ # #829583
+ filter-lfs-flags
+
unset CBUILD_OPT CTARGET_OPT
if use multilib ; then
CTARGET_OPT=$(get_abi_CTARGET)
@@ -402,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() {
@@ -486,14 +511,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=${__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}}
+ export CXX=${__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}}
+
+ # and make sure __ORIC_CC and __ORIG_CXX is defined now.
+ export __ORIG_CC=${CC}
+ export __ORIG_CXX=${CXX}
+
+ if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then
+ export glibc__force_gcc=yes
+ # once this is toggled on, it needs to stay on, since with CPP manipulated
+ # tc-is-clang does not work correctly anymore...
+ fi
+
+ if [[ ${glibc__force_gcc} == "yes" ]] ; then
+ # If we are running in an otherwise clang/llvm environment, we need to
+ # recover the proper gcc and binutils settings here, at least until glibc
+ # is finally building with clang. So let's override everything that is
+ # set in the clang profiles.
+ # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always
+ # a good start into that direction.
+ # Also, if you're crosscompiling, let's assume you know what you are doing.
+ # Hopefully.
+ # Last, we need the settings of the *build* environment, not of the
+ # target environment...
+
+ local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B)
+ local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B)
+ einfo "Overriding clang configuration, since it won't work here"
+
+ export CC="${current_gcc_path}/gcc"
+ export CPP="${current_gcc_path}/cpp"
+ export CXX="${current_gcc_path}/g++"
+ export LD="${current_binutils_path}/ld.bfd"
+ export AR="${current_binutils_path}/ar"
+ export AS="${current_binutils_path}/as"
+ export NM="${current_binutils_path}/nm"
+ export STRIP="${current_binutils_path}/strip"
+ export RANLIB="${current_binutils_path}/ranlib"
+ export OBJCOPY="${current_binutils_path}/objcopy"
+ export STRINGS="${current_binutils_path}/strings"
+ export OBJDUMP="${current_binutils_path}/objdump"
+ export READELF="${current_binutils_path}/readelf"
+ export ADDR2LINE="${current_binutils_path}/addr2line"
+
+ # do we need to also do flags munging here? yes! at least...
+ filter-flags '-fuse-ld=*'
+ filter-flags '-D_FORTIFY_SOURCE=*'
+
+ else
+
+ # this is the "normal" case
+
+ export CC="$(tc-getCC ${CTARGET})"
+ export CXX="$(tc-getCXX ${CTARGET})"
+
+ # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
+ # can't detect them automatically due to ${CHOST} mismatch and fallbacks
+ # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
+ export NM="$(tc-getNM ${CTARGET})"
+ export READELF="$(tc-getREADELF ${CTARGET})"
+
+ fi
+
# We need to export CFLAGS with abi information in them because glibc's
# configure script checks CFLAGS for some targets (like mips). Keep
# around the original clean value to avoid appending multiple ABIs on
- # top of each other.
- : ${__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_CC=${CC}
+ export __GLIBC_CXX=${CXX}
+
+ export __abi_CFLAGS="$(get_abi_CFLAGS)"
+
+ # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760
+ # To build .S (assembly) files with the same ABI-specific flags
+ # upstream currently recommends adding CFLAGS to CC/CXX:
+ # https://sourceware.org/PR23273
+ # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS
+ # and breaks multiarch support. See 659030#c3 for an example.
+ # The glibc configure script doesn't properly use LDFLAGS all the time.
+ export CC="${__GLIBC_CC} ${__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}"
+
+ # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
+ export CXX="${__GLIBC_CXX} ${__abi_CFLAGS} ${CFLAGS}"
+
+ if is_crosscompile; then
+ # Assume worst-case bootstrap: glibc is buil first time
+ # when ${CTARGET}-g++ is not available yet. We avoid
+ # building auxiliary programs that require C++: bug #683074
+ # It should not affect final result.
+ export libc_cv_cxx_link_ok=no
+ # The line above has the same effect. We set CXX explicitly
+ # to make build logs less confusing.
+ export CXX=
+ fi
}
foreach_abi() {
@@ -634,21 +757,6 @@ sanity_prechecks() {
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
@@ -656,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
@@ -673,13 +781,13 @@ sanity_prechecks() {
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!"
+ 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
@@ -709,6 +817,21 @@ sanity_prechecks() {
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
#
@@ -716,9 +839,7 @@ sanity_prechecks() {
# pkg_pretend
pkg_pretend() {
- # All the checks...
- einfo "Checking general environment sanity."
- sanity_prechecks
+ upgrade_warning
}
pkg_setup() {
@@ -729,29 +850,62 @@ 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 && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
+ use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
- setup_env
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patches || die
- if [[ -n ${EGIT_REPO_URI} ]] ; then
+ EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
+ EGIT_CHECKOUT_DIR=${S}
git-r3_src_unpack
else
unpack ${P}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
+ use experimental-loong && unpack glibc-2.35-loongarch-patches-20220522.tar.xz
fi
cd "${WORKDIR}" || die
- unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
+ unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
+ use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz
}
src_prepare() {
+ local patchsetname
if ! use vanilla ; then
- elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}"
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${RELEASE_VER}-${PATCH_VER}"
+ fi
+ einfo "Applying Gentoo Glibc Patchset ${patchsetname}"
eapply "${WORKDIR}"/patches
- eapply "${DISTDIR}"/glibc-2.30-sparc-reg-fix-clobber.patch
einfo "Done."
+
+ if use experimental-loong ; then
+ einfo "Applying experimental LoongArch patchset"
+ eapply "${WORKDIR}"/loongarch-2.35
+ einfo "Done."
+ fi
+ fi
+
+ eapply "${FILESDIR}"/2.35/glibc-2.35-make-4.4-MAKEFLAGS.patch
+
+ if use clone3 ; then
+ append-cppflags -DGENTOO_USE_CLONE3
+ else
+ # See e.g. bug #827386, bug #819045.
+ elog "Disabling the clone3 syscall for compatibility with older Electron apps."
+ elog "Please re-enable this flag before filing bugs!"
fi
default
@@ -761,6 +915,10 @@ src_prepare() {
cd "${WORKDIR}"
find . -name configure -exec touch {} +
+ # move the external locale-gen to its old place
+ mkdir extra || die
+ mv locale-gen-${LOCALE_GEN_VER} extra/locale || die
+
eprefixify extra/locale/locale-gen
# Fix permissions on some of the scripts.
@@ -770,78 +928,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 ; 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
+ 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 )
- ;;
- 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 )
+ # 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:
@@ -891,7 +984,6 @@ glibc_do_configure() {
fi
myconf+=(
- --without-cvs
--disable-werror
--enable-bind-now
--build=${CBUILD_OPT:-${CBUILD}}
@@ -912,6 +1004,20 @@ glibc_do_configure() {
$(use_multiarch || echo --disable-multi-arch)
$(use_enable systemtap)
$(use_enable nscd)
+
+ # locale data is arch-independent
+ # https://bugs.gentoo.org/753740
+ libc_cv_complocaledir='${exec_prefix}/lib/locale'
+
+ # -march= option tricks build system to infer too
+ # high ISA level: https://sourceware.org/PR27318
+ libc_cv_include_x86_isa_level=no
+ # Explicit override of https://sourceware.org/PR27991
+ # exposes a bug in glibc's configure:
+ # https://sourceware.org/PR27991
+ libc_cv_have_x86_lahf_sahf=no
+ libc_cv_have_x86_movbe=no
+
${EXTRA_ECONF}
)
@@ -927,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}"
@@ -954,7 +1055,7 @@ glibc_do_configure() {
# 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
+ 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
@@ -1048,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}
)
@@ -1112,7 +1213,13 @@ glibc_src_test() {
done
fi
- emake ${myxfailparams} check
+ # sandbox does not understand unshare() and prevents
+ # writes to /proc/, which makes many tests fail
+
+ # we give the tests a bit more time to avoid spurious
+ # bug reports on slow arches
+
+ SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check
}
do_src_test() {
@@ -1145,17 +1252,19 @@ 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
- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
+ set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
--destdir "${root}"
+ echo "$@"
+ "$@"
popd >/dev/null
}
@@ -1214,8 +1323,9 @@ glibc_do_src_install() {
n64 /lib64/ld.so.1
# powerpc
ppc /lib/ld.so.1
- ppc64 /lib64/ld64.so.1
# riscv
+ ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
+ ilp32 /lib/ld-linux-riscv32-ilp32.so.1
lp64d /lib/ld-linux-riscv64-lp64d.so.1
lp64 /lib/ld-linux-riscv64-lp64.so.1
# s390
@@ -1230,12 +1340,16 @@ glibc_do_src_install() {
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
)
;;
big)
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
)
;;
esac
@@ -1252,6 +1366,27 @@ glibc_do_src_install() {
fi
done
+ # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that require this.
+ # However, binary commercial packages are known to adhere to weird practices.
+ # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
# With devpts under Linux mounted properly, we do not need the pt_chown
# binary to be setuid. This is because the default owners/perms will be
# exactly what we want.
@@ -1290,36 +1425,27 @@ glibc_do_src_install() {
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
+ keepdir /usr/lib/locale
cd "${S}"
# Install misc network config files
insinto /etc
- doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf
- doins "${WORKDIR}"/extra/etc/*.conf
+ 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
- doinitd "$(prefixify_ro "${WORKDIR}"/extra/etc/nscd)"
+ 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):"
@@ -1327,11 +1453,8 @@ glibc_do_src_install() {
sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
- systemd_dounit nscd/nscd.service
- systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf
- else
- # Do this since extra/etc/*.conf above might have nscd.conf.
- rm -f "${ED}"/etc/nscd.conf
+ use systemd && systemd_dounit nscd/nscd.service
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
fi
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
@@ -1377,7 +1500,7 @@ src_install() {
foreach_abi glibc_do_src_install
if ! use static-libs ; then
- elog "Not installing static glibc libraries"
+ einfo "Not installing static glibc libraries"
find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
fi
}
@@ -1400,6 +1523,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})
@@ -1412,7 +1541,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
@@ -1435,6 +1564,22 @@ pkg_preinst() {
[[ -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() {
@@ -1450,11 +1595,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"
@@ -1464,4 +1611,14 @@ pkg_postinst() {
fi
done
fi
+
+ if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then
+ cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die
+ preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1)
+
+ elog "Please ignore a possible later error message about a file collision involving"
+ elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep"
+ elog "the upgrade working, but it also needs to be overwritten when"
+ elog "sys-libs/libxcrypt is installed. See bug 802210 for more details."
+ fi
}
diff --git a/sys-libs/glibc/glibc-2.36-r8.ebuild b/sys-libs/glibc/glibc-2.36-r8.ebuild
new file mode 100644
index 000000000000..fe8428a2490e
--- /dev/null
+++ b/sys-libs/glibc/glibc-2.36-r8.ebuild
@@ -0,0 +1,1665 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
+# Please read & adapt the page as necessary if obsolete.
+
+PYTHON_COMPAT=( python3_{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=10
+PATCH_DEV=dilfridge
+
+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
+
+RELEASE_VER=${PV}
+
+GCC_BOOTSTRAP_VER=20201208
+
+LOCALE_GEN_VER=2.23
+
+GLIBC_SYSTEMD_VER=20210729
+
+SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
+SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
+SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )"
+
+IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla"
+
+# Minimum kernel version that glibc requires
+MIN_KERN_VER="3.2.0"
+# Minimum pax-utils version needed (which contains any new syscall changes for
+# its seccomp filter!). Please double check this!
+MIN_PAX_UTILS_VER="1.3.3"
+
+# Here's how the cross-compile logic breaks down ...
+# CTARGET - machine that will target the binaries
+# CHOST - machine that will host the binaries
+# CBUILD - machine that will build the binaries
+# If CTARGET != CHOST, it means you want a libc for cross-compiling.
+# If CHOST != CBUILD, it means you want to cross-compile the libc.
+# CBUILD = CHOST = CTARGET - native build/install
+# CBUILD != (CHOST = CTARGET) - cross-compile a native build
+# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
+# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
+# For install paths:
+# CHOST = CTARGET - install into /
+# CHOST != CTARGET - install into /usr/CTARGET/
+#
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we strip selectively.
+
+# We need a new-enough binutils/gcc to match upstream baseline.
+# Also we need to make sure our binutils/gcc supports TLS,
+# and that gcc already contains the hardened patches.
+# Lastly, let's avoid some openssh nastiness, bug 708224, as
+# convenience to our users.
+
+# gzip, grep, awk are needed by locale-gen, bug 740750
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ >=app-misc/pax-utils-${MIN_PAX_UTILS_VER}
+ sys-devel/bison
+ doc? ( sys-apps/texinfo )
+ !compile-locales? (
+ app-arch/gzip
+ sys-apps/grep
+ app-alternatives/awk
+ )
+ test? ( dev-lang/perl )
+"
+COMMON_DEPEND="
+ gd? ( media-libs/gd:2= )
+ nscd? ( selinux? (
+ audit? ( sys-process/audit )
+ caps? ( sys-libs/libcap )
+ ) )
+ perl? ( dev-lang/perl )
+ test? ( dev-lang/perl )
+ suid? ( caps? ( sys-libs/libcap ) )
+ selinux? ( sys-libs/libselinux )
+ systemtap? ( dev-debug/systemtap )
+"
+DEPEND="${COMMON_DEPEND}
+ compile-locales? (
+ app-arch/gzip
+ sys-apps/grep
+ app-alternatives/awk
+ )
+ test? ( >=net-dns/libidn2-2.3.0 )
+"
+RDEPEND="${COMMON_DEPEND}
+ app-arch/gzip
+ sys-apps/grep
+ app-alternatives/awk
+ sys-apps/gentoo-functions
+ !<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
+ !<net-misc/openssh-8.1_p1-r2
+"
+
+RESTRICT="!test? ( test )"
+
+if [[ ${CATEGORY} == cross-* ]] ; then
+ BDEPEND+=" !headers-only? (
+ >=${CATEGORY}/binutils-2.27
+ >=${CATEGORY}/gcc-6.2
+ )"
+ [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
+else
+ BDEPEND+="
+ >=sys-devel/binutils-2.27
+ >=sys-devel/gcc-6.2
+ "
+ DEPEND+=" virtual/os-headers "
+ RDEPEND+="
+ >=net-dns/libidn2-2.3.0
+ vanilla? ( !sys-libs/timezone-data )
+ "
+ PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
+fi
+
+# Ignore tests whitelisted below
+GENTOO_GLIBC_XFAIL_TESTS="${GENTOO_GLIBC_XFAIL_TESTS:-yes}"
+
+# The following tests fail due to the Gentoo build system and are thus
+# executed but ignored:
+XFAIL_TEST_LIST=(
+ # buggy test, assumes /dev/ and /dev/null on a single filesystem
+ # 'mount --bind /dev/null /chroot/dev/null' breaks it.
+ # https://sourceware.org/PR25909
+ tst-support_descriptors
+
+ # The following tests fail only inside portage
+ # https://bugs.gentoo.org/831267
+ tst-system
+ tst-strerror
+ tst-strsignal
+)
+
+#
+# Small helper functions
+#
+
+dump_build_environment() {
+ einfo ==== glibc build environment ========================================================
+ local v
+ for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX CPP LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM AR AS STRIP RANLIB OBJCOPY STRINGS OBJDUMP READELF; do
+ einfo " $(printf '%15s' ${v}:) ${!v}"
+ done
+ einfo =====================================================================================
+}
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+just_headers() {
+ is_crosscompile && use headers-only
+}
+
+alt_prefix() {
+ is_crosscompile && echo /usr/${CTARGET}
+}
+
+# This prefix is applicable to CHOST when building against this
+# glibc. It is baked into the library at configure time.
+host_eprefix() {
+ is_crosscompile || echo "${EPREFIX}"
+}
+
+# This prefix is applicable to CBUILD when building against this
+# glibc. It determines the destination path at install time.
+build_eprefix() {
+ is_crosscompile && echo "${EPREFIX}"
+}
+
+# We need to be able to set alternative headers for compiling for non-native
+# platform. Will also become useful for testing kernel-headers without screwing
+# up the whole system.
+alt_headers() {
+ echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
+}
+
+alt_build_headers() {
+ if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
+ ALT_BUILD_HEADERS="$(host_eprefix)$(alt_headers)"
+ if tc-is-cross-compiler ; then
+ ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
+ if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
+ local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
+ ALT_BUILD_HEADERS=${header_path%/linux/version.h}
+ fi
+ fi
+ fi
+ echo "${ALT_BUILD_HEADERS}"
+}
+
+alt_libdir() {
+ echo $(alt_prefix)/$(get_libdir)
+}
+alt_usrlibdir() {
+ echo $(alt_prefix)/usr/$(get_libdir)
+}
+
+builddir() {
+ echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
+}
+
+do_compile_test() {
+ local ret save_cflags=${CFLAGS}
+ CFLAGS+=" $1"
+ shift
+
+ pushd "${T}" >/dev/null
+
+ rm -f glibc-test*
+ printf '%b' "$*" > glibc-test.c
+
+ # We assume CC is already set up.
+ nonfatal emake glibc-test
+ ret=$?
+
+ popd >/dev/null
+
+ CFLAGS=${save_cflags}
+ return ${ret}
+}
+
+do_run_test() {
+ local ret
+
+ if [[ ${MERGE_TYPE} == "binary" ]] ; then
+ # ignore build failures when installing a binary package #324685
+ do_compile_test "" "$@" 2>/dev/null || return 0
+ else
+ if ! do_compile_test "" "$@" ; then
+ ewarn "Simple build failed ... assuming this is desired #324685"
+ return 0
+ fi
+ fi
+
+ pushd "${T}" >/dev/null
+
+ ./glibc-test
+ ret=$?
+ rm -f glibc-test*
+
+ popd >/dev/null
+
+ return ${ret}
+}
+
+setup_target_flags() {
+ # This largely mucks with compiler flags. None of which should matter
+ # when building up just the headers.
+ just_headers && return 0
+
+ case $(tc-arch) in
+ x86)
+ # -march needed for #185404 #199334
+ # TODO: When creating the first glibc cross-compile, this test will
+ # always fail as it does a full link which in turn requires glibc.
+ # Probably also applies when changing multilib profile settings (e.g.
+ # enabling x86 when the profile was amd64-only previously).
+ # We could change main to _start and pass -nostdlib here so that we
+ # only test the gcc code compilation. Or we could do a compile and
+ # then look for the symbol via scanelf.
+ if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
+ local t=${CTARGET_OPT:-${CTARGET}}
+ t=${t%%-*}
+ filter-flags '-march=*'
+ export CFLAGS="-march=${t} ${CFLAGS}"
+ einfo "Auto adding -march=${t} to CFLAGS #185404"
+ fi
+ # For compatibility with older binaries at slight performance cost.
+ use stack-realign && export CFLAGS+=" -mstackrealign"
+ ;;
+ amd64)
+ # -march needed for #185404 #199334
+ # TODO: See cross-compile issues listed above for x86.
+ if [[ ${ABI} == x86 ]]; then
+ if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
+ local t=${CTARGET_OPT:-${CTARGET}}
+ t=${t%%-*}
+ # Normally the target is x86_64-xxx, so turn that into the -march that
+ # gcc actually accepts. #528708
+ [[ ${t} == "x86_64" ]] && t="x86-64"
+ filter-flags '-march=*'
+ # ugly, ugly, ugly. ugly.
+ CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}")
+ export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
+ einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})"
+ fi
+ # For compatibility with older binaries at slight performance cost.
+ use stack-realign && export CFLAGS_x86+=" -mstackrealign"
+
+ # Workaround for bug #823780.
+ # Need to save/restore CC because earlier on, we stuff it full of CFLAGS, and tc-getCPP doesn't like that.
+ CC_mangled=${CC}
+ CC=${glibc__GLIBC_CC}
+ if tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
+ export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f"
+ einfo "Auto adding -mno-avx512f to CFLAGS_x86 for buggy GCC version (bug #823780) (ABI=${ABI})"
+ fi
+ CC=${CC_mangled}
+ fi
+ ;;
+ mips)
+ # The mips abi cannot support the GNU style hashes. #233233
+ filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
+ ;;
+ ppc|ppc64)
+ # Many arch-specific implementations do not work on ppc with
+ # cache-block not equal to 128 bytes. This breaks memset:
+ # https://sourceware.org/PR26522
+ # https://bugs.gentoo.org/737996
+ # Use default -mcpu=. For ppc it means non-multiarch setup.
+ filter-flags '-mcpu=*'
+ ;;
+ sparc)
+ # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
+ filter-flags "-fcall-used-g7"
+ append-flags "-fcall-used-g6"
+
+ local cpu
+ case ${CTARGET} in
+ sparc64-*)
+ cpu="sparc64"
+ case $(get-flag mcpu) in
+ v9)
+ # We need to force at least v9a because the base build doesn't
+ # work with just v9.
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
+ append-flags "-Wa,-xarch=v9a"
+ ;;
+ esac
+ ;;
+ sparc-*)
+ case $(get-flag mcpu) in
+ v8|supersparc|hypersparc|leon|leon3)
+ cpu="sparcv8"
+ ;;
+ *)
+ cpu="sparcv9"
+ ;;
+ esac
+ ;;
+ esac
+ [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
+ ;;
+ esac
+}
+
+setup_flags() {
+ # Make sure host make.conf doesn't pollute us
+ if is_crosscompile || tc-is-cross-compiler ; then
+ CHOST=${CTARGET} strip-unsupported-flags
+ fi
+
+ # Store our CFLAGS because it's changed depending on which CTARGET
+ # we are building when pulling glibc on a multilib profile
+ CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
+ CFLAGS=${CFLAGS_BASE}
+ CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
+ CXXFLAGS=${CXXFLAGS_BASE}
+ ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
+ ASFLAGS=${ASFLAGS_BASE}
+
+ # Allow users to explicitly avoid flag sanitization via
+ # USE=custom-cflags.
+ if ! use custom-cflags; then
+ # Over-zealous CFLAGS can often cause problems. What may work for one
+ # person may not work for another. To avoid a large influx of bugs
+ # relating to failed builds, we strip most CFLAGS out to ensure as few
+ # problems as possible.
+ strip-flags
+ # Lock glibc at -O2; we want to be conservative here.
+ filter-flags '-O?'
+ append-flags -O2
+ fi
+
+ strip-unsupported-flags
+ filter-lto
+ filter-flags -m32 -m64 '-mabi=*'
+
+ # glibc aborts if rpath is set by LDFLAGS
+ filter-ldflags '-Wl,-rpath=*'
+
+ # ld can't use -r & --relax at the same time, bug #788901
+ # https://sourceware.org/PR27837
+ filter-ldflags '-Wl,--relax'
+
+ # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100
+ # we have to do that here already so mips can filter it out again :P
+ if use hash-sysv-compat ; then
+ append-ldflags '-Wl,--hash-style=both'
+ fi
+
+ # #492892
+ filter-flags -frecord-gcc-switches
+
+ # #898098
+ filter-flags -fno-builtin
+
+ # #829583
+ filter-lfs-flags
+
+ unset CBUILD_OPT CTARGET_OPT
+ if use multilib ; then
+ CTARGET_OPT=$(get_abi_CTARGET)
+ [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
+ fi
+
+ setup_target_flags
+
+ if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
+ CBUILD_OPT=${CTARGET_OPT}
+ fi
+
+ # glibc's headers disallow -O0 and fail at build time:
+ # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization"
+ replace-flags -O0 -O1
+
+ # glibc handles this internally already where it's appropriate;
+ # can't always have SSP when we're the ones setting it up, etc
+ filter-flags '-fstack-protector*'
+
+ # Similar issues as with SSP. Can't inject yourself that early.
+ filter-flags '-fsanitize=*'
+
+ # See end of bug #830454; we handle this via USE=cet
+ filter-flags '-fcf-protection=*'
+
+ # When bootstrapping, we may have a situation where
+ # CET-enabled gcc from seed is used to build CET-disabled
+ # glibc. As such, gcc implicitly enables CET if no
+ # -fcf-protection flag is passed. For a typical package it
+ # should not be a problem, but for glibc it matters as it is
+ # dealing with CET in ld.so. So if CET is supposed to be
+ # disabled for glibc, be explicit about it.
+ if (use amd64 || use x86) && ! use cet; then
+ append-flags '-fcf-protection=none'
+ fi
+}
+
+use_multiarch() {
+ # Allow user to disable runtime arch detection in multilib.
+ use multiarch || return 1
+ # Make sure binutils is new enough to support indirect functions,
+ # #336792. This funky sed supports gold and bfd linkers.
+ local bver nver
+ bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}')
+ case $(tc-arch ${CTARGET}) in
+ amd64|x86) nver="2.20" ;;
+ arm) nver="2.22" ;;
+ hppa) nver="2.23" ;;
+ ppc|ppc64) nver="2.20" ;;
+ # ifunc support was added in 2.23, but glibc also needs
+ # machinemode which is in 2.24.
+ s390) nver="2.24" ;;
+ sparc) nver="2.21" ;;
+ *) return 1 ;;
+ esac
+ ver_test ${bver} -ge ${nver}
+}
+
+# Setup toolchain variables that had historically been defined in the
+# profiles for these archs.
+setup_env() {
+ # silly users
+ unset LD_RUN_PATH
+ unset LD_ASSUME_KERNEL
+
+ if is_crosscompile || tc-is-cross-compiler ; then
+ multilib_env ${CTARGET_OPT:-${CTARGET}}
+
+ if ! use multilib ; then
+ MULTILIB_ABIS=${DEFAULT_ABI}
+ else
+ MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
+ fi
+
+ # If the user has CFLAGS_<CTARGET> in their make.conf, use that,
+ # and fall back on CFLAGS.
+ local VAR=CFLAGS_${CTARGET//[-.]/_}
+ CFLAGS=${!VAR-${CFLAGS}}
+ einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}"
+ fi
+
+ setup_flags
+
+ export ABI=${ABI:-${DEFAULT_ABI:-default}}
+
+ if just_headers ; then
+ # Avoid mixing host's CC and target's CFLAGS_${ABI}:
+ # At this bootstrap stage we have only binutils for
+ # target but not compiler yet.
+ einfo "Skip CC ABI injection. We can't use (cross-)compiler yet."
+ return 0
+ fi
+
+ # Glibc does not work with 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+=" p${PATCH_VER}"
+ echo "${b}"
+}
+
+# The following Kernel version handling functions are mostly copied from portage
+# source. It's better not to use linux-info.eclass here since a) it adds too
+# much magic, see bug 326693 for some of the arguments, and b) some of the
+# functions are just not provided.
+
+g_get_running_KV() {
+ uname -r
+ return $?
+}
+
+g_KV_major() {
+ [[ -z $1 ]] && return 1
+ local KV=$@
+ echo "${KV%%.*}"
+}
+
+g_KV_minor() {
+ [[ -z $1 ]] && return 1
+ local KV=$@
+ KV=${KV#*.}
+ echo "${KV%%.*}"
+}
+
+g_KV_micro() {
+ [[ -z $1 ]] && return 1
+ local KV=$@
+ KV=${KV#*.*.}
+ echo "${KV%%[^[:digit:]]*}"
+}
+
+g_KV_to_int() {
+ [[ -z $1 ]] && return 1
+ local KV_MAJOR=$(g_KV_major "$1")
+ local KV_MINOR=$(g_KV_minor "$1")
+ local KV_MICRO=$(g_KV_micro "$1")
+ local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
+
+ # We make version 2.2.0 the minimum version we will handle as
+ # a sanity check ... if its less, we fail ...
+ if [[ ${KV_int} -ge 131584 ]] ; then
+ echo "${KV_int}"
+ return 0
+ fi
+ return 1
+}
+
+g_int_to_KV() {
+ local version=$1 major minor micro
+ major=$((version / 65536))
+ minor=$(((version % 65536) / 256))
+ micro=$((version % 256))
+ echo ${major}.${minor}.${micro}
+}
+
+eend_KV() {
+ [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]]
+ eend $?
+}
+
+get_kheader_version() {
+ printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
+ $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \
+ tail -n 1
+}
+
+# We collect all sanity checks here. Consistency is not guranteed between
+# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
+# src_unpack.
+sanity_prechecks() {
+ # Prevent native builds from downgrading
+ if [[ ${MERGE_TYPE} != "buildonly" ]] && \
+ [[ -z ${ROOT} ]] && \
+ [[ ${CBUILD} == ${CHOST} ]] && \
+ [[ ${CHOST} == ${CTARGET} ]] ; then
+
+ # The high rev # is to allow people to downgrade between -r#
+ # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2
+ # should be fine. Hopefully we never actually use a r# this
+ # high.
+ if has_version ">${CATEGORY}/${P}-r10000" ; then
+ eerror "Sanity check to keep you from breaking your system:"
+ eerror " Downgrading glibc is not supported and a sure way to destruction."
+ [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
+ fi
+
+ if ! do_run_test '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n' ; then
+ eerror "Your old kernel is broken. You need to update it to a newer"
+ eerror "version as syscall(<bignum>) will break. See bug 279260."
+ die "Old and broken kernel."
+ fi
+ fi
+
+ # Users have had a chance to phase themselves, time to give em the boot
+ if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then
+ eerror "You still haven't deleted ${EROOT}/etc/locales.build."
+ eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher."
+ die "Lazy upgrader detected"
+ fi
+
+ if [[ ${CTARGET} == i386-* ]] ; then
+ eerror "i386 CHOSTs are no longer supported."
+ eerror "Chances are you don't actually want/need i386."
+ eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml"
+ die "Please fix your CHOST"
+ fi
+
+ if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
+ ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
+ ewarn "This will result in a 50% performance penalty when running with a 32bit"
+ ewarn "hypervisor, which is probably not what you want."
+ fi
+
+ # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
+ # we test for...
+ if ! is_crosscompile ; 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() {
+ if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then
+ local oldv newv=$(ver_cut 1-2 ${PV})
+ for oldv in ${REPLACING_VERSIONS}; do
+ if ver_test ${oldv} -lt ${newv}; then
+ ewarn "After upgrading glibc, please restart all running processes."
+ ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)."
+ ewarn "Alternatively, reboot your system."
+ ewarn "(See bug #660556, bug #741116, bug #823756, etc)"
+ break
+ fi
+ done
+ fi
+}
+
+#
+# the phases
+#
+
+# pkg_pretend
+
+pkg_pretend() {
+ upgrade_warning
+}
+
+pkg_setup() {
+ # see bug 682570
+ [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup
+}
+
+# src_unpack
+
+src_unpack() {
+ setup_env
+
+ einfo "Checking general environment sanity."
+ sanity_prechecks
+
+ use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
+
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patches || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
+ fi
+
+ cd "${WORKDIR}" || die
+ unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
+ use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz
+}
+
+src_prepare() {
+ local patchsetname
+ if ! use vanilla ; then
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${RELEASE_VER}-${PATCH_VER}"
+ fi
+ einfo "Applying Gentoo Glibc Patchset ${patchsetname}"
+ eapply "${WORKDIR}"/patches
+ einfo "Done."
+ fi
+
+ default
+
+ gnuconfig_update
+
+ cd "${WORKDIR}"
+ find . -name configure -exec touch {} +
+
+ # move the external locale-gen to its old place
+ mkdir extra || die
+ mv locale-gen-${LOCALE_GEN_VER} extra/locale || die
+
+ eprefixify extra/locale/locale-gen
+
+ # Fix permissions on some of the scripts.
+ chmod u+x "${S}"/scripts/*.sh
+
+ cd "${S}"
+}
+
+glibc_do_configure() {
+ dump_build_environment
+
+ local myconf=()
+
+ # Use '=strong' instead of '=all' to protect only functions
+ # worth protecting from stack smashes.
+ myconf+=( --enable-stack-protector=$(usex ssp strong no) )
+
+ # Keep a whitelist of targets supporing IFUNC. glibc's ./configure
+ # is not robust enough to detect proper support:
+ # https://bugs.gentoo.org/641216
+ # https://sourceware.org/PR22634#c0
+ case $(tc-arch ${CTARGET}) in
+ # Keep whitelist of targets where autodetection mostly works.
+ amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;;
+ # Blacklist everywhere else
+ *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
+ esac
+
+ # Enable Intel Control-flow Enforcement Technology on amd64 if requested
+ case ${CTARGET} in
+ x86_64-*) myconf+=( $(use_enable cet) ) ;;
+ *) ;;
+ esac
+
+ [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
+
+ myconf+=( --enable-kernel=${MIN_KERN_VER} )
+
+ # Since SELinux support is only required for nscd, only enable it if:
+ # 1. USE selinux
+ # 2. only for the primary ABI on multilib systems
+ # 3. Not a crosscompile
+ if ! is_crosscompile && use selinux ; then
+ if use multilib ; then
+ if is_final_abi ; then
+ myconf+=( --with-selinux )
+ else
+ myconf+=( --without-selinux )
+ fi
+ else
+ myconf+=( --with-selinux )
+ fi
+ else
+ myconf+=( --without-selinux )
+ fi
+
+ # Force a few tests where we always know the answer but
+ # configure is incapable of finding it.
+ if is_crosscompile ; then
+ export \
+ libc_cv_c_cleanup=yes \
+ libc_cv_forced_unwind=yes
+ fi
+
+ myconf+=(
+ --disable-werror
+ --enable-bind-now
+ --build=${CBUILD_OPT:-${CBUILD}}
+ --host=${CTARGET_OPT:-${CTARGET}}
+ $(use_enable profile)
+ $(use_with gd)
+ --with-headers=$(build_eprefix)$(alt_build_headers)
+ --prefix="$(host_eprefix)/usr"
+ --sysconfdir="$(host_eprefix)/etc"
+ --localstatedir="$(host_eprefix)/var"
+ --libdir='$(prefix)'/$(get_libdir)
+ --mandir='$(prefix)'/share/man
+ --infodir='$(prefix)'/share/info
+ --libexecdir='$(libdir)'/misc/glibc
+ --with-bugurl=https://bugs.gentoo.org/
+ --with-pkgversion="$(glibc_banner)"
+ $(use_enable crypt)
+ $(use_multiarch || echo --disable-multi-arch)
+ $(use_enable systemtap)
+ $(use_enable nscd)
+
+ # /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if
+ # Perl hasn't been installed inside the prefix yet and configure picks
+ # up a Perl from outside the prefix instead. configure will fail to
+ # execute Perl during configure if we're cross-compiling a prefix, but
+ # it will just disable mtrace in that case.
+ # Note: mtrace is needed by the test suite.
+ ac_cv_path_PERL="$(usex perl "${EPREFIX}"/usr/bin/perl $(usex test "${EPREFIX}"/usr/bin/perl no))"
+
+ # locale data is arch-independent
+ # https://bugs.gentoo.org/753740
+ libc_cv_complocaledir='${exec_prefix}/lib/locale'
+
+ # -march= option tricks build system to infer too
+ # high ISA level: https://sourceware.org/PR27318
+ libc_cv_include_x86_isa_level=no
+ # Explicit override of https://sourceware.org/PR27991
+ # exposes a bug in glibc's configure:
+ # https://sourceware.org/PR27991
+ libc_cv_have_x86_lahf_sahf=no
+ libc_cv_have_x86_movbe=no
+
+ ${EXTRA_ECONF}
+ )
+
+ # We rely on sys-libs/timezone-data for timezone tools normally.
+ myconf+=( $(use_enable vanilla timezone-tools) )
+
+ # These libs don't have configure flags.
+ ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
+ ac_cv_lib_cap_cap_init=$(usex caps || echo no)
+
+ # There is no configure option for this and we need to export it
+ # since the glibc build will re-run configure on itself
+ export libc_cv_rootsbindir="$(host_eprefix)/sbin"
+ export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)"
+
+ local builddir=$(builddir nptl)
+ mkdir -p "${builddir}"
+ cd "${builddir}"
+ set -- "${S}"/configure "${myconf[@]}"
+ echo "$@"
+ "$@" || die "failed to configure glibc"
+
+ # ia64 static cross-compilers are a pita in so much that they
+ # can't produce static ELFs (as the libgcc.a is broken). so
+ # disable building of the programs for those targets if it
+ # doesn't work.
+ # XXX: We could turn this into a compiler test, but ia64 is
+ # the only one that matters, so this should be fine for now.
+ if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
+ sed -i '1i+link-static = touch $@' config.make
+ fi
+
+ # If we're trying to migrate between ABI sets, we need
+ # to lie and use a local copy of gcc. Like if the system
+ # is built with MULTILIB_ABIS="amd64 x86" but we want to
+ # add x32 to it, gcc/glibc don't yet support x32.
+ #
+ if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then
+ echo 'main(){}' > "${T}"/test.c
+ if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
+ sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
+ fi
+ fi
+}
+
+glibc_headers_configure() {
+ export ABI=default
+
+ local builddir=$(builddir "headers")
+ mkdir -p "${builddir}"
+ cd "${builddir}"
+
+ # if we don't have a compiler yet, we can't really test it now ...
+ # hopefully they don't affect header generation, so let's hope for
+ # the best here ...
+ local v vars=(
+ ac_cv_header_cpuid_h=yes
+ libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
+ libc_cv_asm_cfi_directives=yes
+ libc_cv_broken_visibility_attribute=no
+ libc_cv_c_cleanup=yes
+ libc_cv_compiler_powerpc64le_binary128_ok=yes
+ libc_cv_forced_unwind=yes
+ libc_cv_gcc___thread=yes
+ libc_cv_mlong_double_128=yes
+ libc_cv_mlong_double_128ibm=yes
+ libc_cv_ppc_machine=yes
+ libc_cv_ppc_rel16=yes
+ libc_cv_predef_fortify_source=no
+ libc_cv_target_power8_ok=yes
+ libc_cv_visibility_attribute=yes
+ libc_cv_z_combreloc=yes
+ libc_cv_z_execstack=yes
+ libc_cv_z_initfirst=yes
+ libc_cv_z_nodelete=yes
+ libc_cv_z_nodlopen=yes
+ libc_cv_z_relro=yes
+ libc_mips_abi=${ABI}
+ libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
+ # These libs don't have configure flags.
+ ac_cv_lib_audit_audit_log_user_avc_message=no
+ ac_cv_lib_cap_cap_init=no
+ )
+
+ einfo "Forcing cached settings:"
+ for v in "${vars[@]}" ; do
+ einfo " ${v}"
+ export ${v}
+ done
+
+ local headers_only_arch_CPPFLAGS=()
+
+ # Blow away some random CC settings that screw things up. #550192
+ if [[ -d ${S}/sysdeps/mips ]]; then
+ pushd "${S}"/sysdeps/mips >/dev/null
+ sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
+ sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
+
+ # Force the mips ABI to the default. This is OK because the set of
+ # installed headers in this phase is the same between the 3 ABIs.
+ # If this ever changes, this hack will break, but that's unlikely
+ # as glibc discourages that behavior.
+ # https://crbug.com/647033
+ sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
+
+ popd >/dev/null
+ fi
+
+ case ${CTARGET} in
+ riscv*)
+ # RISC-V interrogates the compiler to determine which target to
+ # build. If building the headers then we don't strictly need a
+ # RISC-V compiler, so the built-in definitions that are provided
+ # along with all RISC-V compiler might not exist. This causes
+ # glibc's RISC-V preconfigure script to blow up. Since we're just
+ # building the headers any value will actually work here, so just
+ # pick the standard one (rv64g/lp64d) to make the build scripts
+ # happy for now -- the headers are all the same anyway so it
+ # doesn't matter.
+ headers_only_arch_CPPFLAGS+=(
+ -D__riscv_xlen=64
+ -D__riscv_flen=64
+ -D__riscv_float_abi_double=1
+ -D__riscv_atomic=1
+ ) ;;
+ esac
+
+ local myconf=()
+ myconf+=(
+ --disable-sanity-checks
+ --enable-hacker-mode
+ --disable-werror
+ --enable-bind-now
+ --build=${CBUILD_OPT:-${CBUILD}}
+ --host=${CTARGET_OPT:-${CTARGET}}
+ --with-headers=$(build_eprefix)$(alt_build_headers)
+ --prefix="$(host_eprefix)/usr"
+ $(use_enable crypt)
+ ${EXTRA_ECONF}
+ )
+
+ # Nothing is compiled here which would affect the headers for the target.
+ # So forcing CC/CFLAGS is sane.
+ local headers_only_CC=$(tc-getBUILD_CC)
+ local headers_only_CFLAGS="-O1 -pipe"
+ local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}"
+ local headers_only_LDFLAGS=""
+ set -- "${S}"/configure "${myconf[@]}"
+ echo \
+ "CC=${headers_only_CC}" \
+ "CFLAGS=${headers_only_CFLAGS}" \
+ "CPPFLAGS=${headers_only_CPPFLAGS}" \
+ "LDFLAGS=${headers_only_LDFLAGS}" \
+ "$@"
+ CC=${headers_only_CC} \
+ CFLAGS=${headers_only_CFLAGS} \
+ CPPFLAGS=${headers_only_CPPFLAGS} \
+ LDFLAGS="" \
+ "$@" || die "failed to configure glibc"
+}
+
+do_src_configure() {
+ if just_headers ; then
+ glibc_headers_configure
+ else
+ glibc_do_configure nptl
+ fi
+}
+
+src_configure() {
+ foreach_abi do_src_configure
+}
+
+do_src_compile() {
+ emake -C "$(builddir nptl)"
+}
+
+src_compile() {
+ if just_headers ; then
+ return
+ fi
+
+ foreach_abi do_src_compile
+}
+
+glibc_src_test() {
+ cd "$(builddir nptl)"
+
+ local myxfailparams=""
+ if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
+ for myt in ${XFAIL_TEST_LIST[@]} ; do
+ myxfailparams+="test-xfail-${myt}=yes "
+ done
+ fi
+
+ # sandbox does not understand unshare() and prevents
+ # writes to /proc/, which makes many tests fail
+
+ # we give the tests a bit more time to avoid spurious
+ # bug reports on slow arches
+
+ SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check
+}
+
+do_src_test() {
+ local ret=0
+
+ glibc_src_test
+ : $(( ret |= $? ))
+
+ return ${ret}
+}
+
+src_test() {
+ if just_headers ; then
+ return
+ fi
+
+ # Give tests more time to complete.
+ export TIMEOUTFACTOR=5
+
+ foreach_abi do_src_test || die "tests failed"
+}
+
+run_locale_gen() {
+ # if the host locales.gen contains no entries, we'll install everything
+ local root="$1"
+ local inplace=""
+
+ if [[ "${root}" == "--inplace-glibc" ]] ; then
+ inplace="--inplace-glibc"
+ root="$2"
+ fi
+
+ local locale_list="${root%/}/etc/locale.gen"
+
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
+ [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
+ locale_list="${root%/}/usr/share/i18n/SUPPORTED"
+ fi
+
+ set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
+ --destdir "${root}"
+ echo "$@"
+ "$@"
+
+ popd >/dev/null
+}
+
+glibc_do_src_install() {
+ local builddir=$(builddir nptl)
+ cd "${builddir}"
+
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
+
+ # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
+ # which come without headers etc. Only needed for binary packages since the
+ # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
+ find "${D}" -name "libnsl.a" -delete
+ find "${D}" -name "libnsl.so" -delete
+
+ # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
+ # to infer upstream version:
+ # '#define VERSION "2.26.90"' -> '2.26.90'
+ local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
+
+ # Avoid stripping binaries not targeted by ${CHOST}. Or else
+ # ${CHOST}-strip would break binaries build for ${CTARGET}.
+ is_crosscompile && dostrip -x /
+ # gdb thread introspection relies on local libpthreas symbols. stripping breaks it
+ # See Note [Disable automatic stripping]
+ dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
+
+ if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
+ # Move versioned .a file out of libdir to evade portage QA checks
+ # instead of using gen_usr_ldscript(). We fix ldscript as:
+ # "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..."
+ sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die
+ dodir $(alt_usrlibdir)/${P}
+ mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
+ fi
+
+ # We configure toolchains for standalone prefix systems with a sysroot,
+ # which is prepended to paths in ld scripts, so strip the prefix from these.
+ # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) )
+ # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )
+ if [[ -n $(host_eprefix) ]] ; then
+ local file
+ grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do
+ sed -i "s|$(host_eprefix)/|/|g" "${file}" || die
+ done
+ fi
+
+ # We'll take care of the cache ourselves
+ rm -f "${ED}"/etc/ld.so.cache
+
+ # Everything past this point just needs to be done once ...
+ is_final_abi || return 0
+
+ # Make sure the non-native interp can be found on multilib systems even
+ # if the main library set isn't installed into the right place. Maybe
+ # we should query the active gcc for info instead of hardcoding it ?
+ local i ldso_abi ldso_name
+ local ldso_abi_list=(
+ # x86
+ amd64 /lib64/ld-linux-x86-64.so.2
+ x32 /libx32/ld-linux-x32.so.2
+ x86 /lib/ld-linux.so.2
+ # mips
+ o32 /lib/ld.so.1
+ n32 /lib32/ld.so.1
+ n64 /lib64/ld.so.1
+ # powerpc
+ ppc /lib/ld.so.1
+ # riscv
+ ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
+ ilp32 /lib/ld-linux-riscv32-ilp32.so.1
+ lp64d /lib/ld-linux-riscv64-lp64d.so.1
+ lp64 /lib/ld-linux-riscv64-lp64.so.1
+ # s390
+ s390 /lib/ld.so.1
+ s390x /lib/ld64.so.1
+ # sparc
+ sparc32 /lib/ld-linux.so.2
+ sparc64 /lib64/ld-linux.so.2
+ )
+ case $(tc-endian) in
+ little)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
+ )
+ ;;
+ big)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
+ )
+ ;;
+ esac
+ if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
+ fi
+ for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
+ ldso_abi=${ldso_abi_list[i]}
+ has ${ldso_abi} $(get_install_abis) || continue
+
+ ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
+ if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
+ dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
+ fi
+ done
+
+ # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that require this.
+ # However, binary commercial packages are known to adhere to weird practices.
+ # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
+ # With devpts under Linux mounted properly, we do not need the pt_chown
+ # binary to be setuid. This is because the default owners/perms will be
+ # exactly what we want.
+ if ! use suid ; then
+ find "${ED}" -name pt_chown -exec chmod -s {} +
+ fi
+
+ #################################################################
+ # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
+ # Make sure we install some symlink hacks so that when we build
+ # a 2nd stage cross-compiler, gcc finds the target system
+ # headers correctly. See gcc/doc/gccinstall.info
+ if is_crosscompile ; then
+ # We need to make sure that /lib and /usr/lib always exists.
+ # gcc likes to use relative paths to get to its multilibs like
+ # /usr/lib/../lib64/. So while we don't install any files into
+ # /usr/lib/, we do need it to exist.
+ keepdir $(alt_prefix)/lib
+ keepdir $(alt_prefix)/usr/lib
+
+ dosym usr/include $(alt_prefix)/sys-include
+ return 0
+ fi
+
+ # Files for Debian-style locale updating
+ dodir /usr/share/i18n
+ sed \
+ -e "/^#/d" \
+ -e "/SUPPORTED-LOCALES=/d" \
+ -e "s: \\\\::g" -e "s:/: :g" \
+ "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
+ || die "generating /usr/share/i18n/SUPPORTED failed"
+ cd "${WORKDIR}"/extra/locale
+ dosbin locale-gen
+ doman *.[0-8]
+ insinto /etc
+ doins locale.gen
+
+ keepdir /usr/lib/locale
+
+ cd "${S}"
+
+ # Install misc network config files
+ insinto /etc
+ doins posix/gai.conf
+
+ if use systemd ; then
+ doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf"
+ else
+ doins nss/nsswitch.conf
+ fi
+
+ # Gentoo-specific
+ newins "${FILESDIR}"/host.conf-1 host.conf
+
+ if use nscd ; then
+ doins nscd/nscd.conf
+
+ newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd
+
+ local nscd_args=(
+ -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
+ )
+
+ sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
+
+ use systemd && systemd_dounit nscd/nscd.service
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
+ fi
+
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
+ doenvd "${T}"/00glibc
+
+ for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
+ [[ -s ${d} ]] && dodoc ${d}
+ done
+ dodoc -r ChangeLog.old
+
+ # Prevent overwriting of the /etc/localtime symlink. We'll handle the
+ # creation of the "factory" symlink in pkg_postinst().
+ rm -f "${ED}"/etc/localtime
+
+ # Generate all locales if this is a native build as locale generation
+ if use compile-locales && ! is_crosscompile ; then
+ run_locale_gen --inplace-glibc "${ED}/"
+ sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
+ fi
+}
+
+glibc_headers_install() {
+ local builddir=$(builddir "headers")
+ cd "${builddir}"
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
+
+ insinto $(alt_headers)/gnu
+ doins "${S}"/include/gnu/stubs.h
+
+ # Make sure we install the sys-include symlink so that when
+ # we build a 2nd stage cross-compiler, gcc finds the target
+ # system headers correctly. See gcc/doc/gccinstall.info
+ dosym usr/include $(alt_prefix)/sys-include
+}
+
+src_install() {
+ if just_headers ; then
+ export ABI=default
+ glibc_headers_install
+ return
+ fi
+
+ foreach_abi glibc_do_src_install
+
+ if ! use static-libs ; then
+ einfo "Not installing static glibc libraries"
+ find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
+ fi
+}
+
+# Simple test to make sure our new glibc isn't completely broken.
+# Make sure we don't test with statically built binaries since
+# they will fail. Also, skip if this glibc is a cross compiler.
+#
+# If coreutils is built with USE=multicall, some of these files
+# will just be wrapper scripts, not actual ELFs we can test.
+glibc_sanity_check() {
+ cd / #228809
+
+ # We enter ${ED} so to avoid trouble if the path contains
+ # special characters; for instance if the path contains the
+ # colon character (:), then the linker will try to split it
+ # and look for the libraries in an unexpected place. This can
+ # lead to unsafe code execution if the generated prefix is
+ # within a world-writable directory.
+ # (e.g. /var/tmp/portage:${HOSTNAME})
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ # first let's find the actual dynamic linker here
+ # symlinks may point to the wrong abi
+ local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit)
+
+ einfo Last-minute run tests with ${newldso} in /$(get_libdir) ...
+
+ local x striptest
+ for x in cal date env free ls true uname uptime ; do
+ x=$(type -p ${x})
+ [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
+ striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
+ case ${striptest} in
+ *"statically linked"*) continue;;
+ *"ASCII text"*) continue;;
+ esac
+ # We need to clear the locale settings as the upgrade might want
+ # incompatible locale data. This test is not for verifying that.
+ LC_ALL=C \
+ ${newldso} --library-path . ${x} > /dev/null \
+ || die "simple run test (${x}) failed"
+ done
+
+ popd >/dev/null
+}
+
+pkg_preinst() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ # prepare /etc/ld.so.conf.d/ for files
+ mkdir -p "${EROOT}"/etc/ld.so.conf.d
+
+ # Default /etc/hosts.conf:multi to on for systems with small dbs.
+ if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
+ sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
+ einfo "Defaulting /etc/host.conf:multi to on"
+ fi
+
+ [[ -n ${ROOT} ]] && return 0
+ [[ -d ${ED}/$(get_libdir) ]] || return 0
+ [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
+
+ if [[ -L ${EROOT}/usr/lib/locale ]]; then
+ # Help portage migrate this to a directory
+ # https://bugs.gentoo.org/753740
+ rm "${EROOT}"/usr/lib/locale || die
+ fi
+
+ # Keep around libcrypt so that Perl doesn't break when merging libxcrypt
+ # (libxcrypt is the new provider for now of libcrypt.so.{1,2}).
+ # bug #802207
+ if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then
+ PRESERVED_OLD_LIBCRYPT=1
+ cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" "${T}/libcrypt$(get_libname 1)" || die
+ else
+ PRESERVED_OLD_LIBCRYPT=0
+ fi
+}
+
+pkg_postinst() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then
+ # Generate fastloading iconv module configuration file.
+ "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/"
+ fi
+
+ if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
+ 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.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..88280475bb10
--- /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 643e0b3883cd..c3dce15e7e99 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -1,12 +1,16 @@
-# Copyright 1999-2020 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_{6,7,8} )
+# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
+# Please read & adapt the page as necessary if obsolete.
-inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing
+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/"
@@ -16,31 +20,38 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=16
-PATCH_DEV=slyfox
+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}
+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 )"
-GCC_BOOTSTRAP_VER=20180511
-
-LOCALE_GEN_VER=2.10
-
-SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
-SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
-
-IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla"
-
-# Minimum kernel version that glibc requires
-MIN_KERN_VER="3.2.0"
+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
@@ -81,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.
@@ -89,11 +102,23 @@ fi
# 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-0.1.10
+ >=app-misc/pax-utils-${MIN_PAX_UTILS_VER}
sys-devel/bison
- doc? ( sys-apps/texinfo )
+ 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= )
@@ -103,14 +128,14 @@ COMMON_DEPEND="
) )
suid? ( caps? ( sys-libs/libcap ) )
selinux? ( sys-libs/libselinux )
- systemtap? ( dev-util/systemtap )
- !<net-misc/openssh-8.1_p1-r2
+ systemtap? ( dev-debug/systemtap )
"
DEPEND="${COMMON_DEPEND}
- test? ( >=net-dns/libidn2-2.3.0 )
"
RDEPEND="${COMMON_DEPEND}
- sys-apps/gentoo-functions
+ !<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
+ !<sys-apps/systemd-${MIN_SYSTEMD_VER}
+ perl? ( dev-lang/perl )
"
RESTRICT="!test? ( test )"
@@ -118,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+="
@@ -140,24 +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} ]]
}
@@ -224,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
@@ -280,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)
@@ -371,15 +447,37 @@ 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
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)
@@ -394,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() {
@@ -481,14 +576,118 @@ 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})}}
+ 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.
- : ${__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__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() {
@@ -513,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}"
}
@@ -609,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."
@@ -629,21 +821,6 @@ sanity_prechecks() {
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
@@ -651,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
@@ -668,13 +845,13 @@ sanity_prechecks() {
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!"
+ 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
@@ -694,16 +871,41 @@ 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
+ 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
#
@@ -711,11 +913,11 @@ sanity_prechecks() {
# 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
@@ -724,12 +926,12 @@ pkg_setup() {
# src_unpack
src_unpack() {
- # Consistency is not guaranteed between pkg_ and src_ ...
- sanity_prechecks
+ setup_env
- use multilib && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
+ einfo "Checking general environment sanity."
+ sanity_prechecks
- setup_env
+ 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"
@@ -744,22 +946,24 @@ 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
- elog "Applying Gentoo Glibc Patchset ${patchsetname}"
+ einfo "Applying Gentoo Glibc patchset ${patchsetname}"
eapply "${WORKDIR}"/patches
einfo "Done."
fi
@@ -768,94 +972,25 @@ src_prepare() {
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() {
- # 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}"
+# src_configure
- 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
+glibc_do_configure() {
+ 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:
@@ -863,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
@@ -905,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)
@@ -922,11 +1056,27 @@ 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'
+
+ # 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}
)
@@ -942,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}"
@@ -954,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 ; then
- echo 'main(){}' > "${T}"/test.c
+ 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
@@ -989,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
@@ -1040,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
@@ -1059,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}}
@@ -1105,6 +1246,8 @@ src_configure() {
foreach_abi do_src_configure
}
+# src_compile
+
do_src_compile() {
emake -C "$(builddir nptl)"
}
@@ -1117,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
@@ -1130,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() {
@@ -1147,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"
@@ -1163,16 +1307,24 @@ 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}" \
+ # 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 "$@"
"$@"
@@ -1200,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
@@ -1213,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
@@ -1234,7 +1400,6 @@ glibc_do_src_install() {
n64 /lib64/ld.so.1
# powerpc
ppc /lib/ld.so.1
- ppc64 /lib64/ld64.so.1
# riscv
ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
ilp32 /lib/ld-linux-riscv32-ilp32.so.1
@@ -1252,12 +1417,16 @@ glibc_do_src_install() {
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
)
;;
big)
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
)
;;
esac
@@ -1274,6 +1443,27 @@ glibc_do_src_install() {
fi
done
+ # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that require this.
+ # However, binary commercial packages are known to adhere to weird practices.
+ # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
# With devpts under Linux mounted properly, we do not need the pt_chown
# binary to be setuid. This is because the default owners/perms will be
# exactly what we want.
@@ -1283,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
@@ -1306,38 +1498,18 @@ 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
-
- # 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}"
+ cd "${S}" || die
# Install misc network config files
insinto /etc
- doins posix/gai.conf nss/nsswitch.conf
+ 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
@@ -1353,8 +1525,8 @@ glibc_do_src_install() {
sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
- systemd_dounit nscd/nscd.service
- systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf
+ use systemd && systemd_dounit nscd/nscd.service
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
fi
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
@@ -1372,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
}
@@ -1400,7 +1571,7 @@ src_install() {
foreach_abi glibc_do_src_install
if ! use static-libs ; then
- elog "Not installing static glibc libraries"
+ einfo "Not installing static glibc libraries"
find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
fi
}
@@ -1423,6 +1594,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})
@@ -1435,7 +1612,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
@@ -1446,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
@@ -1458,6 +1638,37 @@ pkg_preinst() {
[[ -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() {
@@ -1470,14 +1681,27 @@ 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
+ 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"
@@ -1487,4 +1711,14 @@ pkg_postinst() {
fi
done
fi
+
+ if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then
+ cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die
+ preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1)
+
+ elog "Please ignore a possible later error message about a file collision involving"
+ elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep"
+ elog "the upgrade working, but it also needs to be overwritten when"
+ elog "sys-libs/libxcrypt is installed. See bug 802210 for more details."
+ fi
}
diff --git a/sys-libs/glibc/metadata.xml b/sys-libs/glibc/metadata.xml
index 6630fde73e7f..846d01d34e0c 100644
--- a/sys-libs/glibc/metadata.xml
+++ b/sys-libs/glibc/metadata.xml
@@ -1,25 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <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="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="nscd">Build, and enable support for, the Name Service Cache Daemon</flag>
- <flag name="rpc">Enable obsolete RPC/NIS layers</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-r2.ebuild b/sys-libs/gpm/gpm-1.20.7-r5.ebuild
index e94da64bea36..738560a07fb2 100644
--- a/sys-libs/gpm/gpm-1.20.7-r2.ebuild
+++ b/sys-libs/gpm/gpm-1.20.7-r5.ebuild
@@ -1,46 +1,59 @@
-# Copyright 1999-2020 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=5
-
-inherit eutils systemd toolchain-funcs autotools multilib-minimal usr-ldscript
+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
+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 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86"
-IUSE="selinux static-libs"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+IUSE="selinux"
-RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}]
+RDEPEND="
+ sys-libs/ncurses:=[${MULTILIB_USEDEP}]
selinux? ( sec-policy/selinux-gpm )"
-DEPEND=">=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}]
+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)"
+
+pkg_pretend() {
+ check_extra_config
+}
src_prepare() {
- epatch "${FILESDIR}"/${P}-sysmacros.patch
+ eapply "${FILESDIR}"/${P}-sysmacros.patch
# Hack up the docs until we get this sorted upstream.
# https://github.com/telmich/gpm/issues/8
- epatch "${WORKDIR}"/${P}-docs.patch
+ eapply "${WORKDIR}"/${P}-docs.patch
touch -r . doc/* || die
# bug #629774
- epatch "${FILESDIR}"/${P}-glibc-2.26.patch
-
+ eapply "${FILESDIR}"/${P}-glibc-2.26.patch
# bug #705878
- epatch "${FILESDIR}"/${P}-gcc-10.patch
+ 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
- epatch_user
+ eapply_user
- # fix ABI values
+ # Fix ABI values
sed -i \
-e '/^abi_lev=/s:=.*:=1:' \
-e '/^abi_age=/s:=.*:=20:' \
@@ -58,10 +71,15 @@ 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 \
- --sysconfdir=/etc/gpm \
- $(use_enable static-libs static) \
- emacs=/bin/false
+ --disable-static \
+ --sysconfdir="${EPREFIX}"/etc/gpm \
+ emacs="${BROOT}"/bin/false
}
_emake() {
@@ -90,10 +108,9 @@ multilib_src_install_all() {
insinto /etc/gpm
doins conf/gpm-*.conf
- dodoc README TODO
- dodoc doc/Announce doc/FAQ doc/README*
+ dodoc README TODO doc/Announce doc/FAQ doc/README*
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/gpm-1.20.7-r6.ebuild b/sys-libs/gpm/gpm-1.20.7-r6.ebuild
new file mode 100644
index 000000000000..3ad21ff8191c
--- /dev/null
+++ b/sys-libs/gpm/gpm-1.20.7-r6.ebuild
@@ -0,0 +1,115 @@
+# 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 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
+}
+
+multilib_src_install_all() {
+ insinto /etc/gpm
+ doins conf/gpm-*.conf
+
+ dodoc README TODO doc/Announce doc/FAQ doc/README*
+
+ newinitd "${FILESDIR}"/gpm.rc6-2 gpm
+ newconfd "${FILESDIR}"/gpm.conf.d gpm
+ systemd_newunit "${FILESDIR}"/gpm.service-r1 gpm.service
+}
diff --git a/sys-libs/gpm/metadata.xml b/sys-libs/gpm/metadata.xml
index 56c124413057..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 "http://www.gentoo.org/dtd/metadata.dtd">
+<!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 605f84549976..17e89385ff99 100644
--- a/sys-libs/gwenhywfar/Manifest
+++ b/sys-libs/gwenhywfar/Manifest
@@ -1 +1 @@
-DIST gwenhywfar-5.1.2.tar.gz 2354910 BLAKE2B e73519d33da9268f90ae2924b177c4ef684c9d991faa1f788f8c30ea669fa27d645481e6e41673b22d2796376aaab9cec72de6874b89c2fe141102cfbac2d2e4 SHA512 20374ed6c134b310f375eb286d83bf6074e397e3c6e22b0370d06fb870b9506f171a9276cad9a809331d8917e3bca1eca30a5d5776818ca7f5b06100474a7e0f
+DIST gwenhywfar-5.10.1.tar.gz 2687042 BLAKE2B 78fb776a605761f309060affef4e84e526ba789039f48f1e68e107d5002c508e19c9c2c2c0b3a8aba39c6c32543816914b504a6212219cfeeb4f0f04b0354f45 SHA512 11781bec2dd1c4156b609574283179278b8070d604a792aeddf92c8f9b873b3ac09273a8558b9adba567af8d016ea10914d2a149f4b6813798b5800e34e29aa5
diff --git a/sys-libs/gwenhywfar/gwenhywfar-5.1.2.ebuild b/sys-libs/gwenhywfar/gwenhywfar-5.1.2.ebuild
deleted file mode 100644
index cfb7644453e1..000000000000
--- a/sys-libs/gwenhywfar/gwenhywfar-5.1.2.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-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/234/${MY_P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0/79" # correspond with libgwenhywfar.so version
-KEYWORDS="amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc x86"
-IUSE="debug designer doc fox gtk libressl qml qt5 sensors serialport test webkit"
-
-REQUIRED_USE="designer? ( qt5 ) qml? ( qt5 ) sensors? ( qt5 ) serialport? ( qt5 ) webkit? ( qt5 )"
-
-BDEPEND="
- sys-devel/gettext
- virtual/pkgconfig
- doc? ( app-doc/doxygen )
-"
-COMMON_DEPEND="
- dev-libs/libgcrypt:0=
- dev-libs/libgpg-error
- libressl? ( dev-libs/libressl:0= )
- !libressl? ( dev-libs/openssl:0= )
- net-libs/gnutls:=
- virtual/libiconv
- virtual/libintl
- virtual/opengl
- designer? ( dev-qt/designer:5 )
- fox? ( x11-libs/fox:1.6 )
- gtk? ( x11-libs/gtk+:3 )
- qml? ( dev-qt/qtdeclarative:5 )
- qt5? (
- dev-qt/qtconcurrent:5
- dev-qt/qtcore:5
- dev-qt/qtdbus:5
- dev-qt/qtgui:5
- dev-qt/qthelp:5
- dev-qt/qtmultimedia:5[widgets]
- dev-qt/qtnetwork:5
- dev-qt/qtopengl:5
- dev-qt/qtprintsupport:5
- dev-qt/qtscript:5
- dev-qt/qtsql:5
- dev-qt/qtsvg:5
- dev-qt/qtwidgets:5
- dev-qt/qtx11extras:5
- dev-qt/qtxml:5
- dev-qt/qtxmlpatterns:5
- )
- sensors? ( dev-qt/qtsensors:5 )
- serialport? ( dev-qt/qtserialport:5 )
- webkit? ( dev-qt/qtwebkit:5 )
-"
-DEPEND="${COMMON_DEPEND}
- test? ( dev-qt/qttest:5 )
-"
-RDEPEND="${COMMON_DEPEND}
- gtk? ( !<app-office/gnucash-3.7[aqbanking] )
-"
-
-# broken upstream, reported but got no reply
-RESTRICT+=" test"
-
-S="${WORKDIR}/${MY_P}"
-
-src_configure() {
- disableQtModule() {
- local module
- for module in ${@}; do
- sed -e "/qtHaveModule(${module})/s|^|#DONT|" -i configure || die
- done
- }
-
- use designer || disableQtModule designer uitools
- use qml || disableQtModule qml qmltest
- use sensors || disableQtModule sensors
- use serialport || disableQtModule serialport
- use test || disableQtModule testlib
- use webkit || disableQtModule webkit webkitwidgets
-
- local guis=()
- use fox && guis+=( fox16 )
- use gtk && guis+=( gtk3 )
- use qt5 && guis+=( qt5 )
-
- local myeconfargs=(
- --enable-ssl
- --with-docpath="${EPREFIX}/usr/share/doc/${PF}/apidoc"
- $(use_enable debug)
- $(use_enable doc full-doc)
- )
- use qt5 && myeconfargs+=(
- --with-qt5-moc="$(qt5_get_bindir)/moc"
- --with-qt5-qmake="$(qt5_get_bindir)/qmake"
- )
-
- guis_config="--with-guis=${guis[@]}"
- econf "${myeconfargs[@]}" "${guis_config}"
-}
-
-src_compile() {
- emake
- use doc && emake srcdoc
-}
-
-src_install() {
- default
- use doc && emake DESTDIR="${D}" install-srcdoc
- find "${D}" -name '*.la' -type f -delete || die
-}
diff --git a/sys-libs/gwenhywfar/gwenhywfar-5.10.1.ebuild b/sys-libs/gwenhywfar/gwenhywfar-5.10.1.ebuild
new file mode 100644
index 000000000000..8d4759d13614
--- /dev/null
+++ b/sys-libs/gwenhywfar/gwenhywfar-5.10.1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit qmake-utils
+
+DESCRIPTION="Multi-platform helper library for other libraries"
+HOMEPAGE="https://www.aquamaniac.de/sites/aqbanking/index.php"
+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 ~riscv ~sparc x86"
+IUSE="debug doc gtk qt5 test"
+
+BDEPEND="
+ sys-devel/gettext
+ virtual/pkgconfig
+ doc? ( app-text/doxygen )
+"
+DEPEND="
+ dev-libs/libgcrypt:0=
+ dev-libs/libgpg-error
+ dev-libs/libxml2:2
+ dev-libs/openssl:0=
+ net-libs/gnutls:=
+ virtual/libiconv
+ virtual/libintl
+ virtual/opengl
+ gtk? ( x11-libs/gtk+:3 )
+ qt5? (
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtopengl:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtsql:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ )
+"
+RDEPEND="
+ ${DEPEND}
+ gtk? ( !<app-office/gnucash-3.7[aqbanking] )
+"
+
+# broken upstream, reported but got no reply
+RESTRICT+=" test"
+
+src_configure() {
+ local myeconfargs=(
+ --with-docpath="${EPREFIX}/usr/share/doc/${PF}/apidoc"
+ --with-libxml2-code=yes
+ $(use_enable debug)
+ $(use_enable doc full-doc)
+ )
+ use qt5 && myeconfargs+=(
+ --with-qt5-moc="$(qt5_get_bindir)/moc"
+ --with-qt5-qmake="$(qt5_get_bindir)/qmake"
+ )
+
+ local guis=()
+ use gtk && guis+=( gtk3 )
+ use qt5 && guis+=( qt5 )
+ econf "${myeconfargs[@]}" "--with-guis=${guis[*]}"
+}
+
+src_compile() {
+ emake
+ use doc && emake srcdoc
+}
+
+src_install() {
+ default
+ use doc && emake DESTDIR="${D}" install-srcdoc
+ find "${D}" -name '*.la' -type f -delete || die
+}
diff --git a/sys-libs/gwenhywfar/metadata.xml b/sys-libs/gwenhywfar/metadata.xml
index dbdb950a22e6..115e9d64a669 100644
--- a/sys-libs/gwenhywfar/metadata.xml
+++ b/sys-libs/gwenhywfar/metadata.xml
@@ -1,13 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
- <use>
- <flag name="designer">Build plugins for <pkg>dev-qt/designer</pkg></flag>
- <flag name="fox">Use <pkg>x11-libs/fox</pkg> graphical toolkit</flag>
- <flag name="qml">Enable support for plugins using QML</flag>
- <flag name="sensors">Enable support for <pkg>dev-qt/qtsensors</pkg> module</flag>
- <flag name="serialport">Enable support for <pkg>dev-qt/qtserialport</pkg> module</flag>
- <flag name="webkit">Enable support for <pkg>dev-qt/qtwebkit</pkg></flag>
- </use>
</pkgmetadata>
diff --git a/sys-libs/kpmcore/Manifest b/sys-libs/kpmcore/Manifest
index 7635f849e871..ecf6fdbe52fe 100644
--- a/sys-libs/kpmcore/Manifest
+++ b/sys-libs/kpmcore/Manifest
@@ -1 +1,2 @@
-DIST kpmcore-4.1.0.tar.xz 420344 BLAKE2B 1a8043c5eb774a3b9b99431543217910120a38b06a17db9db9ae6c577593c2736223e8d466ef62c33224e52513eae52d062584fc8afd86d90eb667af4e923645 SHA512 c45b31a41c62a68aee991be0f7954f4bd2136660578cc60f7fa6f05e56716458421e16cd314b3b9a14b56fdc9377db511c1645e5c41f0446d86a8ac5bb66c273
+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/kpmcore-4.1.0.ebuild b/sys-libs/kpmcore/kpmcore-23.08.5.ebuild
index de6c97e63e1d..8548d6d3112d 100644
--- a/sys-libs/kpmcore/kpmcore-4.1.0.ebuild
+++ b/sys-libs/kpmcore/kpmcore-23.08.5.ebuild
@@ -1,41 +1,33 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
ECM_NONGUI="true"
-KFMIN=5.60.0
-QTMIN=5.12.3
-inherit ecm kde.org
-
-if [[ ${KDE_BUILD_TYPE} = release ]]; then
- SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
- KEYWORDS="amd64 ~arm ~arm64 x86"
-fi
+KFMIN=5.106.0
+QTMIN=5.15.9
+inherit ecm gear.kde.org
DESCRIPTION="Library for managing partitions"
-HOMEPAGE="https://kde.org/applications/system/org.kde.partitionmanager"
+HOMEPAGE="https://apps.kde.org/partitionmanager/"
LICENSE="GPL-3"
-SLOT="5/9"
+SLOT="5/10"
+KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 x86"
IUSE=""
+# bug 689468, tests need polkit etc.
+RESTRICT="test"
+
BDEPEND="virtual/pkgconfig"
DEPEND="
- || (
- app-crypt/qca[botan]
- app-crypt/qca[ssl]
- )
>=dev-qt/qtdbus-${QTMIN}:5
>=dev-qt/qtgui-${QTMIN}:5
>=dev-qt/qtwidgets-${QTMIN}:5
- >=kde-frameworks/kauth-${KFMIN}: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-0.113.0[qt5(+)]
"
RDEPEND="${DEPEND}"
-
-# bug 689468, tests need polkit etc.
-RESTRICT+=" test"
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/kpmcore/metadata.xml b/sys-libs/kpmcore/metadata.xml
index 2fdbf33d963d..d925f2439758 100644
--- a/sys-libs/kpmcore/metadata.xml
+++ b/sys-libs/kpmcore/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>kde@gentoo.org</email>
<name>Gentoo KDE Project</name>
</maintainer>
+ <upstream>
+ <bugs-to>https://bugs.kde.org/</bugs-to>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/ldb/Manifest b/sys-libs/ldb/Manifest
index f2a976e1a7e5..08b7fcf23d6d 100644
--- a/sys-libs/ldb/Manifest
+++ b/sys-libs/ldb/Manifest
@@ -1,3 +1,7 @@
-DIST ldb-2.0.12.tar.gz 1680114 BLAKE2B 44d7b8f9ff0c1d2adc59378b9da814fb280043c8bbf5ea59920a23448db5abdd53b69c93002e2d621268610ee202377a35676ecf6bd6601d2a2ef9269e71dd6c SHA512 9f26dadee16c50844b28edf03a05ad11067bfb7678cc3e8baf278709a813498a620db3dad463bfe54adb6a44cb5b551cf1224bc30316be5fc8d29ef17295bdd8
-DIST ldb-2.1.4.tar.gz 1673335 BLAKE2B 581ea127715d82d849f78c11fc66eb278e45f6c9ff9b379d5a3cfaa8c9c424004614a5a9c2120710d23feb1252294e2abd4983158a2a46e5d70180ad3c765dbd SHA512 7e0eecccc973881dde2390568dc71a2ffe7c7ed894daaa9cadf80c221e1b969fd9a8729f3c48a0f611a64b2941c295a2bc7bd8ba869881ba14f75b8bf331167e
-DIST ldb-2.2.0.tar.gz 1676551 BLAKE2B 1ad84372b024e1ed680a09d215324027c9a37883204c2e69bb39d28a280cba639a4a46ec12b12d89f291f5505f55849eee880345412c6d95d9b6d6e9c00a4fd9 SHA512 3814078a51d2110eeda291ac859c0027df88475812bd6b5f2ce8f8f50aba9c84faced97c37aa1f45e406783a8df97c60ae778df897bb0e89ba3ac8568acced69
+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.1.4-r1.ebuild b/sys-libs/ldb/ldb-2.4.4.ebuild
index ac64906fee13..fbcda7f37ac1 100644
--- a/sys-libs/ldb/ldb-2.1.4-r1.ebuild
+++ b/sys-libs/ldb/ldb-2.4.4.ebuild
@@ -1,46 +1,51 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-PYTHON_COMPAT=( python3_{6,7,8} )
-PYTHON_REQ_USE="threads(+)"
+EAPI=7
-inherit python-single-r1 waf-utils multilib-minimal eutils
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="threads(+)"
+inherit python-single-r1 waf-utils multilib-minimal
-DESCRIPTION="An LDAP-like embedded database"
+DESCRIPTION="LDAP-like embedded database"
HOMEPAGE="https://ldb.samba.org"
-SRC_URI="https://www.samba.org/ftp/pub/${PN}/${P}.tar.gz"
+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 ~s390 ~sparc ~x86"
-IUSE="doc +ldap +lmdb python test"
+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? ( lmdb python )"
RESTRICT="!test? ( test )"
RDEPEND="
- !elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] )
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
dev-libs/popt[${MULTILIB_USEDEP}]
>=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
- >=sys-libs/talloc-2.3.1[python?,${MULTILIB_USEDEP}]
- >=sys-libs/tdb-1.4.3[python?,${MULTILIB_USEDEP}]
- >=sys-libs/tevent-0.10.2[python(+)?,${MULTILIB_USEDEP}]
- ldap? ( net-nds/openldap )
- lmdb? ( >=dev-db/lmdb-0.9.16[${MULTILIB_USEDEP}] )
- python? ( ${PYTHON_DEPS} )
+ >=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}] )
+ 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="dev-libs/libxslt
- doc? ( app-doc/doxygen )
+DEPEND="${RDEPEND}
+ virtual/libcrypt
+"
+BDEPEND="${PYTHON_DEPS}
+ dev-libs/libxslt
virtual/pkgconfig
- ${PYTHON_DEPS}
- ${RDEPEND}
+ doc? ( app-text/doxygen )
"
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- test? ( python )"
-
WAF_BINARY="${S}/buildtools/bin/waf"
MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h )
@@ -48,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() {
@@ -100,7 +107,7 @@ multilib_src_install() {
if multilib_is_native_abi && use doc; then
doman apidocs/man/man3/*.3
docinto html
- dodoc -r apidocs/html/*
+ dodoc -r apidocs/html/.
fi
use python && python_optimize #726454
diff --git a/sys-libs/ldb/ldb-2.0.12-r1.ebuild b/sys-libs/ldb/ldb-2.5.2.ebuild
index e436f29893c4..180e90208d90 100644
--- a/sys-libs/ldb/ldb-2.0.12-r1.ebuild
+++ b/sys-libs/ldb/ldb-2.5.2.ebuild
@@ -1,46 +1,51 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-PYTHON_COMPAT=( python3_{6,7,8} )
-PYTHON_REQ_USE="threads(+)"
+EAPI=7
-inherit python-single-r1 waf-utils multilib-minimal eutils
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="threads(+)"
+inherit python-single-r1 waf-utils multilib-minimal
-DESCRIPTION="An LDAP-like embedded database"
+DESCRIPTION="LDAP-like embedded database"
HOMEPAGE="https://ldb.samba.org"
-SRC_URI="https://www.samba.org/ftp/pub/${PN}/${P}.tar.gz"
+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 ~s390 sparc x86"
-IUSE="doc +ldap +lmdb python test"
+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 python )"
RESTRICT="!test? ( test )"
RDEPEND="
- !elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] )
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
dev-libs/popt[${MULTILIB_USEDEP}]
>=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
- >=sys-libs/talloc-2.2.0[python?,${MULTILIB_USEDEP}]
- >=sys-libs/tdb-1.4.2[python?,${MULTILIB_USEDEP}]
- >=sys-libs/tevent-0.10.0[python(+)?,${MULTILIB_USEDEP}]
- ldap? ( net-nds/openldap )
- lmdb? ( >=dev-db/lmdb-0.9.16[${MULTILIB_USEDEP}] )
- python? ( ${PYTHON_DEPS} )
+ >=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}]
+ sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
+ sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
+ )
"
-
-DEPEND="dev-libs/libxslt
- doc? ( app-doc/doxygen )
+DEPEND="${RDEPEND}
+ virtual/libcrypt
+"
+BDEPEND="${PYTHON_DEPS}
+ dev-libs/libxslt
virtual/pkgconfig
- ${PYTHON_DEPS}
- ${RDEPEND}
+ doc? ( app-text/doxygen )
"
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- test? ( python )"
-
WAF_BINARY="${S}/buildtools/bin/waf"
MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h )
@@ -48,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() {
@@ -100,7 +107,7 @@ multilib_src_install() {
if multilib_is_native_abi && use doc; then
doman apidocs/man/man3/*.3
docinto html
- dodoc -r apidocs/html/*
+ dodoc -r apidocs/html/.
fi
use python && python_optimize #726454
diff --git a/sys-libs/ldb/ldb-2.2.0-r1.ebuild b/sys-libs/ldb/ldb-2.5.3.ebuild
index ac64906fee13..8ec35b8dee3a 100644
--- a/sys-libs/ldb/ldb-2.2.0-r1.ebuild
+++ b/sys-libs/ldb/ldb-2.5.3.ebuild
@@ -1,46 +1,51 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-PYTHON_COMPAT=( python3_{6,7,8} )
-PYTHON_REQ_USE="threads(+)"
+EAPI=7
-inherit python-single-r1 waf-utils multilib-minimal eutils
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="threads(+)"
+inherit python-single-r1 waf-utils multilib-minimal
-DESCRIPTION="An LDAP-like embedded database"
+DESCRIPTION="LDAP-like embedded database"
HOMEPAGE="https://ldb.samba.org"
-SRC_URI="https://www.samba.org/ftp/pub/${PN}/${P}.tar.gz"
+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 ~s390 ~sparc ~x86"
-IUSE="doc +ldap +lmdb python test"
+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 )"
RDEPEND="
- !elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] )
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
dev-libs/popt[${MULTILIB_USEDEP}]
>=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
- >=sys-libs/talloc-2.3.1[python?,${MULTILIB_USEDEP}]
- >=sys-libs/tdb-1.4.3[python?,${MULTILIB_USEDEP}]
- >=sys-libs/tevent-0.10.2[python(+)?,${MULTILIB_USEDEP}]
- ldap? ( net-nds/openldap )
- lmdb? ( >=dev-db/lmdb-0.9.16[${MULTILIB_USEDEP}] )
- python? ( ${PYTHON_DEPS} )
+ >=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}]
+ sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
+ sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
+ )
"
-
-DEPEND="dev-libs/libxslt
- doc? ( app-doc/doxygen )
+DEPEND="${RDEPEND}
+ virtual/libcrypt
+"
+BDEPEND="${PYTHON_DEPS}
+ dev-libs/libxslt
virtual/pkgconfig
- ${PYTHON_DEPS}
- ${RDEPEND}
+ doc? ( app-text/doxygen )
"
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- test? ( python )"
-
WAF_BINARY="${S}/buildtools/bin/waf"
MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h )
@@ -48,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() {
@@ -60,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
}
@@ -100,7 +114,7 @@ multilib_src_install() {
if multilib_is_native_abi && use doc; then
doman apidocs/man/man3/*.3
docinto html
- dodoc -r apidocs/html/*
+ dodoc -r apidocs/html/.
fi
use python && python_optimize #726454
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 597078477105..02e87ace94c2 100644
--- a/sys-libs/ldb/metadata.xml
+++ b/sys-libs/ldb/metadata.xml
@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>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-r1.ebuild b/sys-libs/libaal/libaal-1.0.7-r2.ebuild
index c0bf7d825e9a..32c17e6921af 100644
--- a/sys-libs/libaal/libaal-1.0.7-r1.ebuild
+++ b/sys-libs/libaal/libaal-1.0.7-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI=7
-inherit toolchain-funcs usr-ldscript
+inherit usr-ldscript
DESCRIPTION="library required by reiser4progs"
HOMEPAGE="https://sourceforge.net/projects/reiser4/"
@@ -11,18 +11,18 @@ SRC_URI="mirror://sourceforge/reiser4/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0/7"
-KEYWORDS="amd64 arm ppc ppc64 -sparc x86"
+KEYWORDS="amd64 arm ~arm64 ~loong ppc ppc64 -sparc x86"
IUSE="static-libs"
-DEPEND="virtual/os-headers"
+BDEPEND="virtual/os-headers"
src_prepare() {
default
# remove stupid CFLAG hardcodes
sed -i \
- -e "/GENERIC_CFLAGS/s:-O3::" \
- -e "/^CFLAGS=/s:\"\":\"${CFLAGS}\":" \
+ -e "/GENERIC_CFLAGS/s@-O3@@" \
+ -e "/^CFLAGS=/s@\"\"@\"${CFLAGS}\"@" \
configure || die
printf '#!/bin/sh\n:\n' > run-ldconfig || die
}
@@ -39,4 +39,5 @@ src_configure() {
src_install() {
default
gen_usr_ldscript -a aal{,-minimal}
+ find "${ED}" -type f -name "*.la" -delete || die
}
diff --git a/sys-libs/libaal/metadata.xml b/sys-libs/libaal/metadata.xml
index 000768728e14..1f081edd2b30 100644
--- a/sys-libs/libaal/metadata.xml
+++ b/sys-libs/libaal/metadata.xml
@@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
+<!-- maintainer-needed -->
<longdescription>
This is a library, that provides application abstraction mechanism.
It includes device abstraction, libc independence code, etc.
diff --git a/sys-libs/libapparmor/Manifest b/sys-libs/libapparmor/Manifest
index 6a8b5e50bbe9..86b70cba9120 100644
--- a/sys-libs/libapparmor/Manifest
+++ b/sys-libs/libapparmor/Manifest
@@ -1 +1,3 @@
-DIST apparmor-2.13.4.tar.gz 7390179 BLAKE2B 49818a010d5e5757dd43710f2af925fbb62a9f8f9be74556ff31a9a8834bebac010762fc6bef3da8d295e487b65d0e0135f4be25bcb01a834846c5e5d65d92a4 SHA512 d42748bf36ae66849f79653a62d499e9d17a97c4d680fb653eb1c379d0593aaa09f7ddfc6f2fa0d2fb468bce05fb25444976f60a5ec24778fdd7ec20d1c13651
+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-2.10-symbol_visibility.patch b/sys-libs/libapparmor/files/libapparmor-2.10-symbol_visibility.patch
deleted file mode 100644
index fa2c384b014f..000000000000
--- a/sys-libs/libapparmor/files/libapparmor-2.10-symbol_visibility.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Adds an aditional symbol to allow dynamic linking.
-
---- a/src/libapparmor.map
-+++ b/src/libapparmor.map
-@@ -94,6 +94,7 @@
- _aa_autoclose;
- _aa_autofclose;
- _aa_dirat_for_each;
-+ _aa_asprintf;
- local:
- *;
- };
-
diff --git a/sys-libs/libapparmor/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-2.13.4.ebuild b/sys-libs/libapparmor/libapparmor-3.0.10.ebuild
index eff2e356a719..1623bc032d6c 100644
--- a/sys-libs/libapparmor/libapparmor-2.13.4.ebuild
+++ b/sys-libs/libapparmor/libapparmor-3.0.10.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2020 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_{5,6,7,8} )
+PYTHON_COMPAT=( python3_{10..11} )
GENTOO_DEPEND_ON_PERL="no"
inherit autotools distutils-r1 perl-functions
@@ -17,36 +17,48 @@ 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}"
RDEPEND="perl? ( dev-lang/perl:= )
python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
- sys-devel/autoconf-archive
+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 )"
+ python? (
+ dev-lang/swig
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )"
S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
-PATCHES=( "${FILESDIR}/${PN}-2.10-symbol_visibility.patch" )
-
# depends on the package already being installed
RESTRICT="test"
src_prepare() {
- rm -r m4 || die "failed to remove bundled macros"
default
+
+ # 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) \
@@ -84,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.8.ebuild b/sys-libs/libapparmor/libapparmor-3.0.8.ebuild
new file mode 100644
index 000000000000..1623bc032d6c
--- /dev/null
+++ b/sys-libs/libapparmor/libapparmor-3.0.8.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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 ~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/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 42d1e8f65243..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 "http://www.gentoo.org/dtd/metadata.dtd">
+<!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 86de2a87b7b9..fb1e3382f967 100644
--- a/sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild
+++ b/sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit multilib-minimal
+inherit flag-o-matic multilib-minimal
DESCRIPTION="Library for the 1394 AV/C (Audio/Video Control) Digital Interface Command Set"
HOMEPAGE="https://sourceforge.net/projects/libavc1394/"
@@ -11,13 +11,17 @@ SRC_URI="mirror://sourceforge/libavc1394/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 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}]"
+DEPEND=">=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
+ elibc_musl? ( sys-libs/argp-standalone )"
RDEPEND="${DEPEND}"
multilib_src_configure() {
+ # bug #713174
+ use elibc_musl && append-libs -largp
+
ECONF_SOURCE="${S}" econf --disable-static
}
diff --git a/sys-libs/libavc1394/metadata.xml b/sys-libs/libavc1394/metadata.xml
index babba315f16e..e981a0214faa 100644
--- a/sys-libs/libavc1394/metadata.xml
+++ b/sys-libs/libavc1394/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
diff --git a/sys-libs/libblockdev/Manifest b/sys-libs/libblockdev/Manifest
index 46f8638f2d66..301c93b4bf6a 100644
--- a/sys-libs/libblockdev/Manifest
+++ b/sys-libs/libblockdev/Manifest
@@ -1,2 +1,5 @@
-DIST libblockdev-2.23.tar.gz 856829 BLAKE2B 131bf429e530fc9dd44fade4f5bc937ec220365b1ee2ae46818a6fa3ec7591775fdc3ed531350cc2546f4151e41551dfd3e331b0a6d5777769a7b54c5c15ed42 SHA512 ecc4d5a3cb977fbbe176bf6872b6754833d2869e927c32f8466685916ee4550cf806e0b0c8f5e8e76de3839ae591a4eec502ff974c2f0678af6cfd46dd3016f3
-DIST libblockdev-2.24.tar.gz 905838 BLAKE2B dcc31021d72c2a4f92d8f70387537ec409302e85a9bdb338a09449b02318113d40cabf7fc2f6b4aca819400baccba69a9f67a616b30c744cf843eeac785875e4 SHA512 92b7d734ea2cefbb67e626bef369d6785ba2a4bbbf09a4f59345febe977bc32319fb44f38b3c3177b8652abbc1f87b6cc76d41fdd2d70783c1c168049bdcb1d6
+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.23-avoid_bashisms.patch b/sys-libs/libblockdev/files/libblockdev-2.23-avoid_bashisms.patch
deleted file mode 100644
index 9c4f94bd841d..000000000000
--- a/sys-libs/libblockdev/files/libblockdev-2.23-avoid_bashisms.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From e6ab6918ffac65da2d562cb286c6ab50eaf62ca2 Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Mon, 11 May 2020 22:14:26 +0200
-Subject: [PATCH] configure.ac: Avoid bashisms
-
-or else we get unpredictable results with shells != /bin/bash like:
-
-checking for gobject-introspection... no (disabled, use --enable-introspection to enable)
-./configure: 13672: test: xno: unexpected operator
-checking for python3... /var/tmp/portage/sys-libs/libblockdev-2.23-r1/temp/python3.8/bin/python3
-./configure: 13838: test: x/var/tmp/portage/sys-libs/libblockdev-2.23-r1/temp/python3.8/bin/python3: unexpected operator
-
-Reported-by: Matt Whitlock <gentoo@mattwhitlock.name>
-Gentoo-bug: https://bugs.gentoo.org/719442
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index ded64259..bbdff5e7 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -60,7 +60,7 @@ AC_ARG_WITH([python3],
- AC_SUBST(WITH_PYTHON3, 0)
- if test "x$with_python3" != "xno"; then
- AC_PATH_PROG([python3], [python3], [no])
-- AS_IF([test "x$python3" == "xno"],
-+ AS_IF([test "x$python3" = "xno"],
- [if test "x$with_python3" = "xyes"; then
- LIBBLOCKDEV_SOFT_FAILURE([Python3 support requested, but python3 is not available])
- fi],
-@@ -77,7 +77,7 @@ AC_ARG_WITH([gtk-doc],
- AC_SUBST(WITH_GTK_DOC, 0)
- if test "x$with_gtk_doc" != "xno"; then
- AC_PATH_PROG([gtkdoc_scan], [gtkdoc-scan], [no])
-- AS_IF([test "x$gtkdoc_scan" == "xno"],
-+ AS_IF([test "x$gtkdoc_scan" = "xno"],
- [if test "x$with_gtk_doc" = "xyes"; then
- LIBBLOCKDEV_SOFT_FAILURE([Building documentation with gtk-doc requested, but not available])
- fi],
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-9999.ebuild b/sys-libs/libblockdev/libblockdev-2.28-r1.ebuild
index 214de07c57c9..3a4d698c3f06 100644
--- a/sys-libs/libblockdev/libblockdev-9999.ebuild
+++ b/sys-libs/libblockdev/libblockdev-2.28-r1.ebuild
@@ -1,31 +1,30 @@
-# Copyright 1999-2020 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_{6,7,8} )
-inherit python-single-r1 xdg-utils
+PYTHON_COMPAT=( python3_{10..11} )
+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 autotools git-r3
+ 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 ~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"
-RESTRICT="!test? ( test )"
+# 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
@@ -57,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
}
@@ -73,7 +83,12 @@ pkg_setup() {
src_prepare() {
xdg_environment_reset #623992
default
- [[ "${PV}" == *9999 ]] && eautoreconf
+
+ # 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() {
@@ -81,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)
@@ -96,18 +113,23 @@ src_configure() {
$(use_with lvm lvm-dbus)
$(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-2.23-r1.ebuild b/sys-libs/libblockdev/libblockdev-2.29.ebuild
index 6007c32f473d..aed9cc3e41c6 100644
--- a/sys-libs/libblockdev/libblockdev-2.23-r1.ebuild
+++ b/sys-libs/libblockdev/libblockdev-2.29.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 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_{6,7,8} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit autotools python-single-r1 xdg-utils
DESCRIPTION="A library for manipulating block devices"
@@ -12,20 +12,19 @@ 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 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"
-RESTRICT="!test? ( test )"
+# 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
@@ -58,15 +57,23 @@ 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}/${P}-avoid_bashisms.patch" ) #719442
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.28-sh_tests.patch
+)
pkg_setup() {
python-single-r1_pkg_setup
@@ -75,6 +82,11 @@ 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
}
@@ -83,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)
@@ -98,18 +112,23 @@ src_configure() {
$(use_with lvm lvm-dbus)
$(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-2.24.ebuild b/sys-libs/libblockdev/libblockdev-3.0.3.ebuild
index 2d41db827580..88cfcd76553c 100644
--- a/sys-libs/libblockdev/libblockdev-2.24.ebuild
+++ b/sys-libs/libblockdev/libblockdev-3.0.3.ebuild
@@ -1,35 +1,35 @@
-# Copyright 1999-2020 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_{6,7,8} )
-inherit 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"
if [[ "${PV}" == *9999 ]] ; then
- inherit autotools git-r3
+ 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 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}
@@ -73,41 +77,54 @@ pkg_setup() {
src_prepare() {
xdg_environment_reset #623992
default
- [[ "${PV}" == *9999 ]] && eautoreconf
+
+ # 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() {
+ # 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 f5d22ce82f4e..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 "http://www.gentoo.org/dtd/metadata.dtd">
+<!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 a7ac7241a588..0ffa199c4537 100644
--- a/sys-libs/libcap-ng/Manifest
+++ b/sys-libs/libcap-ng/Manifest
@@ -1,3 +1,3 @@
-DIST libcap-ng-0.7.10.tar.gz 450243 BLAKE2B 8eb21b0309e46b05fa42752b9c814d90bc1eda4852ac7a4975868c279764431a8d5eafc53e50998470f622e2a59e2b4c6c2ac1ac20525c6fcd0633b09b113012 SHA512 1b93c7f5c20ae5cc705fe5244af3e299454e988388cda95f006e248d97c0713e77da2a81c67ecf15755f3958df373fc6d1ca14197d6357ab1f2d8c3a0fd12def
-DIST libcap-ng-0.7.11.tar.gz 450541 BLAKE2B 66217f7fb9e3b3876ada6f355a2b69f16fda4ab3ab490e524358c4120583280ce6497770ec6452596426594b877d79c0e03db10d6413c1cf20bd01e996f7347b SHA512 150c4f48d7334966aa7af683e46bc3b8b4d4a2e80be826e6f6a61a0ea0666e2f4dafcd012c536fa321c4954c00059c689cc8d6dc089000ca1dca2fd52e3efe9c
-DIST libcap-ng-0.8.tar.gz 453181 BLAKE2B 8f4b2e13e5c2c21f1ac1455ebdaf04b42e07fa79d9026651f41eab041cdf99bd40d91b8ce2262e58bc2de3e2a793f676df8c69d832ccadfa4b486ebefeb4b128 SHA512 d410d66f46ad25765f35ffac17e0d36740329c334c6535d55a13fa218718a750763b7ad4610efa47efe7c256c143ead7dde7d37a29e99cb5c55161f577c40bb2
+DIST libcap-ng-0.8.2-apply-disable.patch 723 BLAKE2B 70d9959c55119c02bbc4ea605251491c04c477511c20b9fe93e6527ffd3fe2f35a72fabab5ca149c4aaf536c6cd8dceb15375297158f8827a0c676744381bbc1 SHA512 8c9317bdd4fde7d6a4618ec613bce46bed7646891bd16bc3fa307e9a814e38601bf3c6ad13102389d4596d9ed6a7ad853cca58624e724fe07383007e386c51f8
+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.7.10.ebuild b/sys-libs/libcap-ng/libcap-ng-0.7.10.ebuild
deleted file mode 100644
index ffc8687f1aad..000000000000
--- a/sys-libs/libcap-ng/libcap-ng-0.7.10.ebuild
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-inherit autotools flag-o-matic python-r1
-
-DESCRIPTION="POSIX 1003.1e capabilities"
-HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/"
-SRC_URI="https://people.redhat.com/sgrubb/${PN}/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux"
-IUSE="python static-libs"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
- sys-kernel/linux-headers"
-BDEPEND="python? ( >=dev-lang/swig-2 )"
-
-src_prepare() {
- default
- if use prefix ; then
- sed -i "s@cat /usr@cat ${EPREFIX}/usr@" bindings/python*/Makefile.am || die
- eautomake #668722
- fi
-}
-
-src_configure() {
- use sparc && replace-flags -O? -O0
-
- local ECONF_SOURCE="${S}"
-
- local myconf=(
- $(use_enable static-libs static)
- )
-
- local pythonconf=( --without-python --without-python3 )
-
- # set up python bindings build(s)
- if use python ; then
- setup_python_flags_configure() {
- pythonconf=( --without-python --with-python3 )
- run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}"
- }
-
- python_foreach_impl setup_python_flags_configure
- else
- local BUILD_DIR=${WORKDIR}/build
- run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}"
- fi
-}
-
-src_compile() {
- if use python; then
- python_foreach_impl run_in_build_dir emake
- else
- local BUILD_DIR=${WORKDIR}/build
- emake -C "${BUILD_DIR}"
- fi
-}
-
-src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
- ewarn "Skipping tests due to root permissions."
- return
- fi
-
- if use python; then
- python_foreach_impl run_in_build_dir emake check
- else
- local BUILD_DIR=${WORKDIR}/build
- emake -C "${BUILD_DIR}" check
- fi
-}
-
-src_install() {
- if use python; then
- python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
- else
- local BUILD_DIR=${WORKDIR}/build
- emake -C "${BUILD_DIR}" DESTDIR="${D}" install
- fi
- find "${ED}" -name '*.la' -delete || die
-}
diff --git a/sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild b/sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild
new file mode 100644
index 000000000000..ffb59a372613
--- /dev/null
+++ b/sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# 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"
+
+LICENSE="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=(
+ "${DISTDIR}"/libcap-ng-0.8.2-apply-disable.patch
+)
+
+src_prepare() {
+ default
+
+ if use prefix ; then
+ sed -i "s@cat /usr@cat ${EPREFIX}/usr@" bindings/python*/Makefile.am || die
+ # 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-python
+ --without-python3
+ )
+
+ # Set up python bindings build(s)
+ if use python ; then
+ setup_python_flags_configure() {
+ pythonconf=(
+ --without-python
+ --with-python3
+ )
+
+ run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}"
+ }
+
+ python_foreach_impl setup_python_flags_configure
+ else
+ local BUILD_DIR="${WORKDIR}"/build
+ run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}"
+ fi
+}
+
+src_compile() {
+ if use python ; then
+ python_foreach_impl run_in_build_dir emake
+ else
+ local BUILD_DIR="${WORKDIR}"/build
+ emake -C "${BUILD_DIR}"
+ fi
+}
+
+src_test() {
+ if [[ "${EUID}" -eq 0 ]] ; then
+ ewarn "Skipping tests due to root permissions."
+ return
+ fi
+
+ if use python ; then
+ python_foreach_impl run_in_build_dir emake check
+ else
+ local BUILD_DIR="${WORKDIR}"/build
+ emake -C "${BUILD_DIR}" check
+ fi
+}
+
+src_install() {
+ if use python ; then
+ python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
+ else
+ local BUILD_DIR="${WORKDIR}"/build
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" install
+ fi
+
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/sys-libs/libcap-ng/libcap-ng-0.8.ebuild b/sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild
index 846ebcd8aae4..f6c6b3dbba65 100644
--- a/sys-libs/libcap-ng/libcap-ng-0.8.ebuild
+++ b/sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild
@@ -1,33 +1,40 @@
-# Copyright 1999-2020 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_{6,7,8} )
-
-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_{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="LGPL-2.1"
+LICENSE="GPL-2+ 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} )"
RDEPEND="python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
- sys-kernel/linux-headers"
+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
- if use prefix ; then
- sed -i "s@cat /usr@cat ${EPREFIX}/usr@" bindings/python*/Makefile.am || die
- eautomake #668722
- fi
+
+ eautoreconf
}
src_configure() {
@@ -37,53 +44,60 @@ src_configure() {
local myconf=(
$(use_enable static-libs static)
+ --with-capability_header="${ESYSROOT}"/usr/include/linux/capability.h
)
- local pythonconf=( --without-python --without-python3 )
+ local pythonconf=(
+ --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=(
+ --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.7.11.ebuild b/sys-libs/libcap-ng/libcap-ng-0.8.4.ebuild
index 846ebcd8aae4..cffaa6067dc7 100644
--- a/sys-libs/libcap-ng/libcap-ng-0.7.11.ebuild
+++ b/sys-libs/libcap-ng/libcap-ng-0.8.4.ebuild
@@ -1,32 +1,37 @@
-# Copyright 1999-2020 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_{6,7,8} )
-
-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_{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="LGPL-2.1"
+LICENSE="GPL-2+ 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} )"
RDEPEND="python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
- sys-kernel/linux-headers"
+DEPEND="
+ ${RDEPEND}
+ sys-kernel/linux-headers
+"
BDEPEND="python? ( >=dev-lang/swig-2 )"
src_prepare() {
default
+
if use prefix ; then
sed -i "s@cat /usr@cat ${EPREFIX}/usr@" bindings/python*/Makefile.am || die
- eautomake #668722
+ # bug #668722
+ eautomake
fi
}
@@ -39,51 +44,57 @@ src_configure() {
$(use_enable static-libs static)
)
- local pythonconf=( --without-python --without-python3 )
+ local pythonconf=(
+ --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=(
+ --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/metadata.xml b/sys-libs/libcap-ng/metadata.xml
index e9dd16674835..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 "http://www.gentoo.org/dtd/metadata.dtd">
+<!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 cc017ffcf49e..12f008357e12 100644
--- a/sys-libs/libcap/Manifest
+++ b/sys-libs/libcap/Manifest
@@ -1,5 +1 @@
-DIST libcap-2.26.tar.xz 67172 BLAKE2B 9d1952bd03e1bba5ffa225a5088b8d841c2007219bbb9524f979ac65e472bf932db496acf93984fa77fe42e71d45b85cd603ca461a071fb4742526dfbc5f66eb SHA512 1c2d59f007226405a924950b2c2090393527e06f0692a84e6463e33915a070df61a9070b8f30a624d5630ddd39290eac117e5d440577d1edd48510195b9d12f0
-DIST libcap-2.27.tar.xz 67780 BLAKE2B 7b58d7afdd90281771a302cd9554f067b9e3636b0c052935973d8a0d890490c3933b3513874b788a8c10e37ab5ad9cfa766408c9629b7c8562cb17bfdef87747 SHA512 e32335fd3e0d1564574acc73df7030b5b0fd98875217bffabd76f2765f1a7a6f1369f03df2ee22a1782776838784e342378c10613ea1163d53ae5055ab6a62b6
-DIST libcap-2.41.tar.xz 139812 BLAKE2B 96630d2ff45e3cc40f18d0a739796bbed4c5b246a48db64b81870c6f200c6cedfed74ed0267261c3de712e9d14799015ccd1a2391e9a2a9c6d5c250864bf841f SHA512 efb778f1fee3da9ccbcc5c05d0e33dfced55a7fdfe17e1f40f121b6ec08b891c0cd95e91e5b6dce84a9cdb62d40f20efe2b26454013e1e898c25c3f9550af0f9
-DIST libcap-2.42.tar.xz 141288 BLAKE2B 1ee5c3934ba88a8127a6d96780a539d8b291e99d2e621660338fb9a9d511470bedfc3406af0bc787fda0ee0c54ce491d65a11a3e92a8da9f5d494c0931de77db SHA512 2abe2d106583a48e3ee0dbc0f82e5ec92a3209cad2abcc1690a12f33364a1dab467b624670a1cdcac0c8d12761e86d5a05bca90aa4199fee75d46e181a695d50
-DIST libcap-2.43.tar.xz 125284 BLAKE2B bde36f8397f4adb74760eb403daa06bee1b8f45ddc253cc3c3ef1f6e95d0e4c76d0f2e6fa3335a8bc451f18ac7128c96230f6aba9ae0320fa4f9d669e7b4f715 SHA512 817add571fb2c54ad2a39974e6545b8fc8d855ecdcf2e00b2cc10e583802c49dfea2d8bca484c89ecd574fdacfc46565b51e3064a4407cf1985defb913240d45
+DIST libcap-2.69.tar.xz 189200 BLAKE2B 94d1fef7666a1c383a8b96f1f6092bd242164631532868b628d2f5de71b42a371d041a978ef7fbadfee3eeb433165444995d1078cd790275bc0433a7875a697e SHA512 647c307dc451517da9d089495ab959b4a6fbbe41c79f4e1e9bb663569dad630ead0c2e413dfb393319e3ea14dc9848c81b392107fe3382ce1813d278c3394a7f
diff --git a/sys-libs/libcap/files/libcap-2.21-include.patch b/sys-libs/libcap/files/libcap-2.21-include.patch
deleted file mode 100644
index 8ea6545659e3..000000000000
--- a/sys-libs/libcap/files/libcap-2.21-include.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/libcap/libcap.h
-+++ b/libcap/libcap.h
-@@ -13,6 +13,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <sys/capability.h>
-+#include <sys/prctl.h> /* prctl() */
-
- #ifndef __u8
- #define __u8 unsigned char
diff --git a/sys-libs/libcap/files/libcap-2.25-build-system-fixes.patch b/sys-libs/libcap/files/libcap-2.25-build-system-fixes.patch
deleted file mode 100644
index c33fffda8d91..000000000000
--- a/sys-libs/libcap/files/libcap-2.25-build-system-fixes.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From d5a0c023a7f3deefd471d7b97ef4fa40ed374645 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Wed, 10 Feb 2016 09:47:27 +0100
-Subject: [PATCH] build system fixes
-
-This touches up the homebrewed build system to work much better "out of the
-box" for people. Specifically:
- - allow toolchain vars to be set via environment
- - CC / BUILD_CC / AR / RANLIB
- - CFLAGS / CPPFLAGS / LDFLAGS
- - split CPPFLAGS out of CFLAGS
- - break -fPIC out of global CFLAGS and only use where needed
- - use LDLIBS for libraries, not LDFLAGS
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-
-Forward ported from libcap-2.24 to libcap-2.25
-
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- Make.Rules | 26 ++++++++++++++------------
- libcap/Makefile | 7 ++++---
- pam_cap/Makefile | 8 +++++---
- progs/Makefile | 2 +-
- 4 files changed, 24 insertions(+), 19 deletions(-)
-
-diff --git a/Make.Rules b/Make.Rules
-index 8347b26..d7196ef 100644
---- a/Make.Rules
-+++ b/Make.Rules
-@@ -45,28 +45,30 @@ MINOR=25
-
- # Compilation specifics
-
--KERNEL_HEADERS := $(topdir)/libcap/include/uapi
--IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
--
--CC := gcc
--CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
--BUILD_CC := $(CC)
--BUILD_CFLAGS := $(CFLAGS) $(IPATH)
--AR := ar
--RANLIB := ranlib
-+CC ?= gcc
-+CFLAGS ?= -O2
-+BUILD_CC ?= $(CC)
-+BUILD_CFLAGS ?= $(CFLAGS)
-+AR ?= ar
-+RANLIB ?= ranlib
- DEBUG = -g #-DDEBUG
- WARNINGS=-Wall -Wwrite-strings \
- -Wpointer-arith -Wcast-qual -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes \
- -Wnested-externs -Winline -Wshadow
- LD=$(CC) -Wl,-x -shared
--LDFLAGS := #-g
-+LDFLAGS ?= #-g
- BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)
-
--SYSTEM_HEADERS = /usr/include
-+KERNEL_HEADERS = $(topdir)/libcap/include/uapi
-+LIBCAP_CPPFLAGS = -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
-+LIBCAP_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-+CPPFLAGS += $(LIBCAP_CPPFLAGS)
-+BUILD_CPPFLAGS += $(LIBCAP_CPPFLAGS)
- INCS=$(topdir)/libcap/include/sys/capability.h
- LDFLAGS += -L$(topdir)/libcap
--CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
-+CPPFLAGS += -Dlinux
-+CFLAGS += $(WARNINGS) $(DEBUG)
- PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
- INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
- DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
-diff --git a/libcap/Makefile b/libcap/Makefile
-index d189777..b99740f 100644
---- a/libcap/Makefile
-+++ b/libcap/Makefile
-@@ -17,6 +17,7 @@ OBJS=$(addsuffix .o, $(FILES))
- MAJLIBNAME=$(LIBNAME).$(VERSION)
- MINLIBNAME=$(MAJLIBNAME).$(MINOR)
- GPERF_OUTPUT = _caps_output.gperf
-+CFLAGS += -fPIC
-
- all: $(MINLIBNAME) $(STALIBNAME) libcap.pc
-
-@@ -35,7 +36,7 @@ libcap.pc: libcap.pc.in
- $< >$@
-
- _makenames: _makenames.c cap_names.list.h
-- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
-+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
-
- cap_names.h: _makenames
- ./_makenames > cap_names.h
-@@ -57,10 +58,10 @@ $(MINLIBNAME): $(OBJS)
- ln -sf $(MAJLIBNAME) $(LIBNAME)
-
- %.o: %.c $(INCLS)
-- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
-+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
- cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS)
-- $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
-+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
-
- install: all
- mkdir -p -m 0755 $(FAKEROOT)$(INCDIR)/sys
-diff --git a/pam_cap/Makefile b/pam_cap/Makefile
-index cc32fb6..6f07b6b 100644
---- a/pam_cap/Makefile
-+++ b/pam_cap/Makefile
-@@ -9,6 +9,8 @@ include ../Make.Rules
- # written (and you know why it fails), email me and explain why. Thanks!
- LDLIBS += -L../libcap -lcap
-
-+CFLAGS += -fPIC
-+
- all: pam_cap.so
- $(MAKE) testcompile
-
-@@ -17,13 +19,13 @@ install: all
- install -m 0755 pam_cap.so $(FAKEROOT)$(LIBDIR)/security
-
- pam_cap.so: pam_cap.o
-- $(LD) $(LDFLAGS) -o pam_cap.so $< $(LDLIBS)
-+ $(LD) $(CFLAGS) $(LDFLAGS) -o pam_cap.so $< $(LDLIBS)
-
- pam_cap.o: pam_cap.c
-- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
-+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
- testcompile: test.c pam_cap.o
-- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS)
-+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS)
-
- clean:
- rm -f *.o *.so testcompile *~
-diff --git a/progs/Makefile b/progs/Makefile
-index c094a24..b9f0d3f 100644
---- a/progs/Makefile
-+++ b/progs/Makefile
-@@ -19,7 +19,7 @@ $(BUILD): %: %.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
-
- %.o: %.c $(INCS)
-- $(CC) $(IPATH) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
- install: all
- mkdir -p -m 0755 $(FAKEROOT)$(SBINDIR)
---
-2.7.1
-
diff --git a/sys-libs/libcap/files/libcap-2.26-no-perl.patch b/sys-libs/libcap/files/libcap-2.26-no-perl.patch
deleted file mode 100644
index 55ee34ee71f9..000000000000
--- a/sys-libs/libcap/files/libcap-2.26-no-perl.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From c15a25a61d64efe8f7b29c1e2d0a96885835ec59 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Wed, 21 Nov 2018 11:00:54 +0100
-Subject: [PATCH] use awk/sed instead of perl for creating header files
-
-More systems should have awk/sed than perl.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-
-Forward ported from libcap-2.22 to libcap-2.26
-and incorporated the gperf-3.1 fix provided by Mike Gilbert
-<floppym@gentoo.org>
-
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- libcap/Makefile | 21 +++++++++++++++++----
- 1 file changed, 17 insertions(+), 4 deletions(-)
-
-diff --git a/libcap/Makefile b/libcap/Makefile
-index 77b26c5..a3f0507 100644
---- a/libcap/Makefile
-+++ b/libcap/Makefile
-@@ -18,6 +18,8 @@ MAJLIBNAME=$(LIBNAME).$(VERSION)
- MINLIBNAME=$(MAJLIBNAME).$(MINOR)
- GPERF_OUTPUT = _caps_output.gperf
- CFLAGS += -fPIC
-+AWK = awk
-+SED = sed
-
- all: $(MINLIBNAME) $(STALIBNAME) libcap.pc
-
-@@ -42,11 +44,22 @@ cap_names.h: _makenames
- ./_makenames > cap_names.h
-
- $(GPERF_OUTPUT): cap_names.list.h
-- perl -e 'print "struct __cap_token_s { const char *name; int index; };\n%{\nconst struct __cap_token_s *__cap_lookup_name(const char *, size_t);\n%}\n%%\n"; while ($$l = <>) { $$l =~ s/[\{\"]//g; $$l =~ s/\}.*// ; print $$l; }' < $< | gperf --ignore-case --language=ANSI-C --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 $(INDENT) > $@
-+ (printf "%b" "struct __cap_token_s { const char *name; int index; };\n%%\n"; \
-+ $(SED) -e 's:["{}]::g' -e 's:,$$::' $<) | \
-+ gperf \
-+ --ignore-case \
-+ --language=ANSI-C \
-+ --includes \
-+ --readonly \
-+ --null-strings \
-+ --global-table \
-+ --hash-function-name=__cap_hash_name \
-+ --lookup-function-name="__cap_lookup_name" \
-+ -c -t -m20 $(INDENT) > $@
-
--cap_names.list.h: Makefile $(KERNEL_HEADERS)/linux/capability.h
-- @echo "=> making $@ from $(KERNEL_HEADERS)/linux/capability.h"
-- perl -e 'while ($$l=<>) { if ($$l =~ /^\#define[ \t](CAP[_A-Z]+)[ \t]+([0-9]+)\s+$$/) { $$tok=$$1; $$val=$$2; $$tok =~ tr/A-Z/a-z/; print "{\"$$tok\",$$val},\n"; } }' $(KERNEL_HEADERS)/linux/capability.h | fgrep -v 0x > $@
-+cap_names.list.h: $(KERNEL_HEADERS)/linux/capability.h Makefile
-+ @echo "=> making $@ from $<"
-+ $(AWK) '($$0 ~ /^#define[[:space:]]+CAP[_A-Z]+[[:space:]]+[0-9]+[[:space:]]*$$/) { printf "{\"%s\",%s},\n", tolower($$2), $$3 }' $< > $@
-
- $(STALIBNAME): $(OBJS)
- $(AR) rcs $@ $^
---
-2.20.0.rc0
-
diff --git a/sys-libs/libcap/files/libcap-2.38-no_perl.patch b/sys-libs/libcap/files/libcap-2.38-no_perl.patch
deleted file mode 100644
index f3e0c468c869..000000000000
--- a/sys-libs/libcap/files/libcap-2.38-no_perl.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 3f76418eaf73896489129c529fac021e4f3a03c0 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Wed, 21 Nov 2018 11:00:54 +0100
-Subject: [PATCH] use awk/sed instead of perl for creating header files
-
-More systems should have awk/sed than perl.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-
-Forward ported from libcap-2.22 to libcap-2.26
-and incorporated the gperf-3.1 fix provided by Mike Gilbert
-<floppym@gentoo.org>
-Forward ported from libcap-2.26 to libcap-2.28
-Forward ported from libcap-2.28 to libcap-2.38
-
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- libcap/Makefile | 26 +++++++++++++++++++-------
- 1 file changed, 19 insertions(+), 7 deletions(-)
-
-diff --git a/libcap/Makefile b/libcap/Makefile
-index 3d6463d..df2526c 100644
---- a/libcap/Makefile
-+++ b/libcap/Makefile
-@@ -22,6 +22,8 @@ MAJLIBNAME=$(LIBNAME).$(VERSION)
- MINLIBNAME=$(MAJLIBNAME).$(MINOR)
- GPERF_OUTPUT = _caps_output.gperf
- CFLAGS += -fPIC
-+AWK = awk
-+SED = sed
-
- all: $(MINLIBNAME) $(STACAPLIBNAME) libcap.pc libpsx.pc $(STAPSXLIBNAME)
-
-@@ -55,17 +57,27 @@ cap_names.h: _makenames
- ./_makenames > cap_names.h
-
- $(GPERF_OUTPUT): cap_names.list.h
-- perl -e 'print "struct __cap_token_s { const char *name; int index; };\n%{\nconst struct __cap_token_s *__cap_lookup_name(const char *, size_t);\n%}\n%%\n"; while ($$l = <>) { $$l =~ s/[\{\"]//g; $$l =~ s/\}.*// ; print $$l; }' < $< | gperf --ignore-case --language=ANSI-C --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 $(INDENT) > $@
-- sed -e 's/unsigned int len/size_t len/' -i $@
-+ (printf "%b" "struct __cap_token_s { const char *name; int index; };\n%%\n"; \
-+ $(SED) -e 's:["{}]::g' -e 's:,$$::' $<) | \
-+ gperf \
-+ --ignore-case \
-+ --language=ANSI-C \
-+ --includes \
-+ --readonly \
-+ --null-strings \
-+ --global-table \
-+ --hash-function-name=__cap_hash_name \
-+ --lookup-function-name="__cap_lookup_name" \
-+ -c -t -m20 $(INDENT) > $@
-
--# Intention is that libcap keeps up with torvalds' tree, as reflected
--# by this maintained version of the kernel header. libcap dynamically
--# trims the meaning of "all" capabilities down to that of the running
--# kernel as of 2.30.
- UAPI_HEADER := $(topdir)/libcap/include/uapi/linux/capability.h
- cap_names.list.h: Makefile $(UAPI_HEADER)
- @echo "=> making $@ from $(UAPI_HEADER)"
-- perl -e 'while ($$l=<>) { if ($$l =~ /^\#define[ \t](CAP[_A-Z]+)[ \t]+([0-9]+)\s+$$/) { $$tok=$$1; $$val=$$2; $$tok =~ tr/A-Z/a-z/; print "{\"$$tok\",$$val},\n"; } }' $(UAPI_HEADER) | fgrep -v 0x > $@
-+ $(AWK) '($$0 ~ /^#define[[:space:]]+CAP[_A-Z]+[[:space:]]+[0-9]+[[:space:]]*$$/) { printf "{\"%s\",%s},\n", tolower($$2), $$3 }' $(UAPI_HEADER) > $@
-+
-+cap_names.list.h: $(KERNEL_HEADERS)/linux/capability.h Makefile
-+ @echo "=> making $@ from $<"
-+ $(AWK) '($$0 ~ /^#define[[:space:]]+CAP[_A-Z]+[[:space:]]+[0-9]+[[:space:]]*$$/) { printf "{\"%s\",%s},\n", tolower($$2), $$3 }' $< > $@
-
- $(STACAPLIBNAME): $(CAPOBJS)
- $(AR) rcs $@ $^
---
-2.27.0
-
diff --git a/sys-libs/libcap/files/libcap-2.39-build-system-fixes.patch b/sys-libs/libcap/files/libcap-2.39-build-system-fixes.patch
deleted file mode 100644
index 7ae18107f9a5..000000000000
--- a/sys-libs/libcap/files/libcap-2.39-build-system-fixes.patch
+++ /dev/null
@@ -1,212 +0,0 @@
-From cc1012914a4041eb2b5fb30057f28f62c1788662 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Tue, 5 May 2020 09:52:40 +0200
-Subject: [PATCH] build system fixes
-
-This touches up the homebrewed build system to work much better "out of the
-box" for people. Specifically:
- - allow toolchain vars to be set via environment
- - CC / BUILD_CC / AR / RANLIB
- - CFLAGS / CPPFLAGS / LDFLAGS
- - split CPPFLAGS out of CFLAGS
- - break -fPIC out of global CFLAGS and only use where needed
- - use LDLIBS for libraries, not LDFLAGS
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-
-Forward ported from libcap-2.24 to libcap-2.25
-Forward ported from libcap-2.25 to libcap-2.28
-Forward ported from libcap-2.28 to libcap-2.29
-Forward ported from libcap-2.29 to libcap-2.33
-Forward ported from libcap-2.33 to libcap-2.34
-Forward ported from libcap-2.34 to libcap-2.37
-Forward ported from libcap-2.37 to libcap-2.39
-
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- Make.Rules | 24 +++++++++++++-----------
- Makefile | 1 -
- libcap/Makefile | 7 ++++---
- pam_cap/Makefile | 8 +++++---
- progs/Makefile | 2 +-
- tests/Makefile | 6 ++++--
- 6 files changed, 27 insertions(+), 21 deletions(-)
-
-diff --git a/Make.Rules b/Make.Rules
-index 98fb9db..889798e 100644
---- a/Make.Rules
-+++ b/Make.Rules
-@@ -52,37 +52,39 @@ GOMAJOR=0
- # Compilation specifics
-
- KERNEL_HEADERS := $(topdir)/libcap/include/uapi
--IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
-
--CC := $(CROSS_COMPILE)gcc
-+CC ?= $(CROSS_COMPILE)gcc
- DEFINES := -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
--CFLAGS := -O2 $(DEFINES)
--BUILD_CC := $(CC)
--BUILD_CFLAGS := -O2 $(DEFINES) $(IPATH)
--AR := $(CROSS_COMPILE)ar
--RANLIB := $(CROSS_COMPILE)ranlib
-+CFLAGS ?= -O2 $(DEFINES)
-+BUILD_CC ?= $(CC)
-+BUILD_CFLAGS ?= $(CFLAGS)
-+AR ?= $(CROSS_COMPILE)ar
-+RANLIB ?= $(CROSS_COMPILE)ranlib
- DEBUG = -g #-DDEBUG
- WARNINGS=-Wall -Wwrite-strings \
- -Wpointer-arith -Wcast-qual -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes \
- -Wnested-externs -Winline -Wshadow
- LD=$(CC) -Wl,-x -shared
--LDFLAGS := #-g
-+LDFLAGS ?= #-g
- LIBCAPLIB := -L$(topdir)/libcap -lcap
- LIBPSXLIB := -L$(topdir)/libcap -lpsx -lpthread
-
- BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)
-
--SYSTEM_HEADERS = /usr/include
-+LIBCAP_CPPFLAGS = -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include $(DEFINES)
-+CPPFLAGS += $(LIBCAP_CPPFLAGS)
-+BUILD_CPPFLAGS += $(LIBCAP_CPPFLAGS)
- INCS=$(topdir)/libcap/include/sys/capability.h
- LDFLAGS += -L$(topdir)/libcap
--CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
-+CPPFLAGS += -Dlinux
-+CFLAGS += $(WARNINGS) $(DEBUG)
- PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
- INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
- DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
-
- GO := go
--GOLANG := $(shell if [ -n "$(shell $(GO) version 2>/dev/null)" ]; then echo yes ; else echo no ; fi)
-+GOLANG ?= $(shell if [ -n "$(shell $(GO) version 2>/dev/null)" ]; then echo yes ; else echo no ; fi)
- ifeq ($(GOLANG),yes)
- GOROOT := $(shell $(GO) env GOROOT)
- GOCGO := $(shell if [ "$(shell $(GO) env CGO_ENABLED)" = 1 ]; then echo yes ; else echo no ; fi)
-diff --git a/Makefile b/Makefile
-index e148633..b29f5f1 100644
---- a/Makefile
-+++ b/Makefile
-@@ -17,7 +17,6 @@ ifeq ($(GOLANG),yes)
- $(MAKE) -C go $@
- rm -f cap/go.sum
- endif
-- $(MAKE) -C tests $@
- $(MAKE) -C progs $@
- $(MAKE) -C doc $@
- $(MAKE) -C kdebug $@
-diff --git a/libcap/Makefile b/libcap/Makefile
-index 4321c2f..3d6463d 100644
---- a/libcap/Makefile
-+++ b/libcap/Makefile
-@@ -21,6 +21,7 @@ PSXOBJS=$(addsuffix .o, $(PSXFILES))
- MAJLIBNAME=$(LIBNAME).$(VERSION)
- MINLIBNAME=$(MAJLIBNAME).$(MINOR)
- GPERF_OUTPUT = _caps_output.gperf
-+CFLAGS += -fPIC
-
- all: $(MINLIBNAME) $(STACAPLIBNAME) libcap.pc libpsx.pc $(STAPSXLIBNAME)
-
-@@ -48,7 +49,7 @@ libpsx.pc: libpsx.pc.in
- $< >$@
-
- _makenames: _makenames.c cap_names.list.h
-- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
-+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
-
- cap_names.h: _makenames
- ./_makenames > cap_names.h
-@@ -80,10 +81,10 @@ $(MINLIBNAME): $(CAPOBJS)
- ln -sf $(MAJLIBNAME) $(LIBNAME)
-
- %.o: %.c $(INCLS)
-- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
-+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
- cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS)
-- $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
-+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
-
- cap_test: cap_test.c libcap.h
- $(CC) $(CFLAGS) $(IPATH) $< -o $@
-diff --git a/pam_cap/Makefile b/pam_cap/Makefile
-index 56604fd..2da4674 100644
---- a/pam_cap/Makefile
-+++ b/pam_cap/Makefile
-@@ -3,6 +3,8 @@
- topdir=$(shell pwd)/..
- include ../Make.Rules
-
-+CFLAGS += -fPIC
-+
- all: pam_cap.so
- $(MAKE) testlink
-
-@@ -16,16 +18,16 @@ install: all
- # written (and you know why it fails), email me and explain why. Thanks!
-
- pam_cap.so: pam_cap.o
-- $(LD) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS)
-+ $(LD) $(CFLAGS) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS)
-
- pam_cap.o: pam_cap.c
-- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
-+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
- test_pam_cap: test_pam_cap.c pam_cap.c
- $(CC) $(CFLAGS) $(IPATH) -o $@ test_pam_cap.c $(LIBCAPLIB) $(LDFLAGS) --static
-
- testlink: test.c pam_cap.o
-- $(CC) $(CFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS)
-+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS)
-
- test: pam_cap.so
- make testlink
-diff --git a/progs/Makefile b/progs/Makefile
-index 076e44f..fd13351 100644
---- a/progs/Makefile
-+++ b/progs/Makefile
-@@ -23,7 +23,7 @@ $(BUILD): %: %.o $(DEPS)
- $(CC) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
-
- %.o: %.c $(INCS)
-- $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CAPSH_SHELL) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
- install: all
- mkdir -p -m 0755 $(FAKEROOT)$(SBINDIR)
-diff --git a/tests/Makefile b/tests/Makefile
-index bfedbc2..2b9a801 100644
---- a/tests/Makefile
-+++ b/tests/Makefile
-@@ -16,19 +16,21 @@ test: run_psx_test run_libcap_psx_test
-
- sudotest: test run_libcap_launch_test run_libcap_launch_test
-
-+CFLAGS += -fPIC
-+
- install: all
-
- run_psx_test: psx_test
- ./psx_test
-
- psx_test: psx_test.c $(DEPS)
-- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create
-+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create
-
- run_libcap_psx_test: libcap_psx_test
- ./libcap_psx_test
-
- libcap_psx_test: libcap_psx_test.c $(DEPS)
-- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static
-+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static
-
- run_libcap_launch_test: libcap_launch_test libcap_psx_launch_test noop
- sudo ./libcap_launch_test
---
-2.27.0
-
diff --git a/sys-libs/libcap/files/libcap-2.42-build-system-fixes.patch b/sys-libs/libcap/files/libcap-2.42-build-system-fixes.patch
deleted file mode 100644
index 10959cf93395..000000000000
--- a/sys-libs/libcap/files/libcap-2.42-build-system-fixes.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-From 8599fc87e91b7903cfb1877983615dadcbcc1b29 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Tue, 5 May 2020 09:52:40 +0200
-Subject: [PATCH] build system fixes
-
-This touches up the homebrewed build system to work much better "out of the
-box" for people. Specifically:
- - allow toolchain vars to be set via environment
- - CC / BUILD_CC / AR / RANLIB
- - CFLAGS / CPPFLAGS / LDFLAGS
- - split CPPFLAGS out of CFLAGS
- - break -fPIC out of global CFLAGS and only use where needed
- - use LDLIBS for libraries, not LDFLAGS
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-
-Forward ported from libcap-2.24 to libcap-2.25
-Forward ported from libcap-2.25 to libcap-2.28
-Forward ported from libcap-2.28 to libcap-2.29
-Forward ported from libcap-2.29 to libcap-2.33
-Forward ported from libcap-2.33 to libcap-2.34
-Forward ported from libcap-2.34 to libcap-2.37
-Forward ported from libcap-2.37 to libcap-2.39
-Forward ported from libcap-2.39 to libcap-2.42
-
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- Make.Rules | 12 +++++++-----
- Makefile | 1 -
- libcap/Makefile | 7 ++++---
- pam_cap/Makefile | 8 +++++---
- progs/Makefile | 2 +-
- tests/Makefile | 6 ++++--
- 6 files changed, 21 insertions(+), 15 deletions(-)
-
-diff --git a/Make.Rules b/Make.Rules
-index 8440e18..67fd4a6 100644
---- a/Make.Rules
-+++ b/Make.Rules
-@@ -52,13 +52,12 @@ GOMAJOR=0
- # Compilation specifics
-
- KERNEL_HEADERS := $(topdir)/libcap/include/uapi
--IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
-
- CC ?= $(CROSS_COMPILE)gcc
- DEFINES := -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
- CFLAGS ?= -O2 $(DEFINES)
- BUILD_CC ?= $(CC)
--BUILD_CFLAGS ?= -O2 $(DEFINES) $(IPATH)
-+BUILD_CFLAGS ?= $(CFLAGS)
- AR ?= $(CROSS_COMPILE)ar
- RANLIB ?= $(CROSS_COMPILE)ranlib
- DEBUG = -g #-DDEBUG
-@@ -73,16 +72,19 @@ LIBPSXLIB := -L$(topdir)/libcap -lpsx -lpthread
-
- BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)
-
--SYSTEM_HEADERS = /usr/include
-+LIBCAP_CPPFLAGS = -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include $(DEFINES)
-+CPPFLAGS += $(LIBCAP_CPPFLAGS)
-+BUILD_CPPFLAGS += $(LIBCAP_CPPFLAGS)
- INCS=$(topdir)/libcap/include/sys/capability.h
- LDFLAGS += -L$(topdir)/libcap
--CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
-+CPPFLAGS += -Dlinux
-+CFLAGS += $(WARNINGS) $(DEBUG)
- PAM_CAP ?= $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
- INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
- DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
-
- GO := go
--GOLANG := $(shell if [ -n "$(shell $(GO) version 2>/dev/null)" ]; then echo yes ; else echo no ; fi)
-+GOLANG ?= $(shell if [ -n "$(shell $(GO) version 2>/dev/null)" ]; then echo yes ; else echo no ; fi)
- ifeq ($(GOLANG),yes)
- GOROOT := $(shell $(GO) env GOROOT)
- GOCGO := $(shell if [ "$(shell $(GO) env CGO_ENABLED)" = 1 ]; then echo yes ; else echo no ; fi)
-diff --git a/Makefile b/Makefile
-index 03d7748..4437468 100644
---- a/Makefile
-+++ b/Makefile
-@@ -17,7 +17,6 @@ ifeq ($(GOLANG),yes)
- $(MAKE) -C go $@
- rm -f cap/go.sum
- endif
-- $(MAKE) -C tests $@
- $(MAKE) -C progs $@
- $(MAKE) -C doc $@
- $(MAKE) -C kdebug $@
-diff --git a/libcap/Makefile b/libcap/Makefile
-index 81b089e..63fe555 100644
---- a/libcap/Makefile
-+++ b/libcap/Makefile
-@@ -21,6 +21,7 @@ PSXOBJS=$(addsuffix .o, $(PSXFILES))
- MAJLIBNAME=$(LIBNAME).$(VERSION)
- MINLIBNAME=$(MAJLIBNAME).$(MINOR)
- GPERF_OUTPUT = _caps_output.gperf
-+CFLAGS += -fPIC
-
- all: $(MINLIBNAME) $(STACAPLIBNAME) pcs $(STAPSXLIBNAME)
-
-@@ -50,7 +51,7 @@ libpsx.pc: libpsx.pc.in
- $< >$@
-
- _makenames: _makenames.c cap_names.list.h
-- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
-+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
-
- cap_names.h: _makenames
- ./_makenames > cap_names.h
-@@ -82,10 +83,10 @@ $(MINLIBNAME): $(CAPOBJS)
- ln -sf $(MAJLIBNAME) $(LIBNAME)
-
- %.o: %.c $(INCLS)
-- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
-+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
- cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS)
-- $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
-+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
-
- cap_test: cap_test.c libcap.h
- $(CC) $(CFLAGS) $(IPATH) $< -o $@
-diff --git a/pam_cap/Makefile b/pam_cap/Makefile
-index 56604fd..2da4674 100644
---- a/pam_cap/Makefile
-+++ b/pam_cap/Makefile
-@@ -3,6 +3,8 @@
- topdir=$(shell pwd)/..
- include ../Make.Rules
-
-+CFLAGS += -fPIC
-+
- all: pam_cap.so
- $(MAKE) testlink
-
-@@ -16,16 +18,16 @@ install: all
- # written (and you know why it fails), email me and explain why. Thanks!
-
- pam_cap.so: pam_cap.o
-- $(LD) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS)
-+ $(LD) $(CFLAGS) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS)
-
- pam_cap.o: pam_cap.c
-- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
-+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
- test_pam_cap: test_pam_cap.c pam_cap.c
- $(CC) $(CFLAGS) $(IPATH) -o $@ test_pam_cap.c $(LIBCAPLIB) $(LDFLAGS) --static
-
- testlink: test.c pam_cap.o
-- $(CC) $(CFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS)
-+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS)
-
- test: pam_cap.so
- make testlink
-diff --git a/progs/Makefile b/progs/Makefile
-index 076e44f..fd13351 100644
---- a/progs/Makefile
-+++ b/progs/Makefile
-@@ -23,7 +23,7 @@ $(BUILD): %: %.o $(DEPS)
- $(CC) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
-
- %.o: %.c $(INCS)
-- $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CAPSH_SHELL) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
- install: all
- mkdir -p -m 0755 $(FAKEROOT)$(SBINDIR)
-diff --git a/tests/Makefile b/tests/Makefile
-index bfedbc2..2b9a801 100644
---- a/tests/Makefile
-+++ b/tests/Makefile
-@@ -16,19 +16,21 @@ test: run_psx_test run_libcap_psx_test
-
- sudotest: test run_libcap_launch_test run_libcap_launch_test
-
-+CFLAGS += -fPIC
-+
- install: all
-
- run_psx_test: psx_test
- ./psx_test
-
- psx_test: psx_test.c $(DEPS)
-- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create
-+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create
-
- run_libcap_psx_test: libcap_psx_test
- ./libcap_psx_test
-
- libcap_psx_test: libcap_psx_test.c $(DEPS)
-- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static
-+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static
-
- run_libcap_launch_test: libcap_launch_test libcap_psx_launch_test noop
- sudo ./libcap_launch_test
---
-2.28.0
-
diff --git a/sys-libs/libcap/files/libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch b/sys-libs/libcap/files/libcap-2.62-ignore-RAISE_SETFCAP-install-failures.patch
index 0f737361a4d1..bd1c22fcad5a 100644
--- a/sys-libs/libcap/files/libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch
+++ b/sys-libs/libcap/files/libcap-2.62-ignore-RAISE_SETFCAP-install-failures.patch
@@ -8,18 +8,9 @@ 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>
----
- progs/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/progs/Makefile b/progs/Makefile
-index c094a24..4a6db38 100644
--- a/progs/Makefile
+++ b/progs/Makefile
-@@ -27,7 +27,7 @@ install: all
+@@ -39,7 +39,7 @@ install: all
install -m 0755 $$p $(FAKEROOT)$(SBINDIR) ; \
done
ifeq ($(RAISE_SETFCAP),yes)
@@ -27,7 +18,4 @@ index c094a24..4a6db38 100644
+ -$(FAKEROOT)$(SBINDIR)/setcap cap_setfcap=i $(FAKEROOT)$(SBINDIR)/setcap
endif
- clean:
---
-2.7.1
-
+ test:
diff --git a/sys-libs/libcap/libcap-2.26-r2.ebuild b/sys-libs/libcap/libcap-2.26-r2.ebuild
deleted file mode 100644
index 4e7d7d295938..000000000000
--- a/sys-libs/libcap/libcap-2.26-r2.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit multilib multilib-minimal toolchain-funcs pam usr-ldscript
-
-DESCRIPTION="POSIX 1003.1e capabilities"
-HOMEPAGE="https://sites.google.com/site/fullycapable/"
-SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
-
-# it's available under either of the licenses
-LICENSE="|| ( GPL-2 BSD )"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="pam static-libs"
-
-# While the build system optionally uses gperf, we don't DEPEND on it because
-# the build automatically falls back when it's unavailable. #604802
-RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]"
-PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- ${PDEPEND}
- sys-kernel/linux-headers"
-
-# Requires test suite being run as root (via sudo)
-RESTRICT="test"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.25-build-system-fixes.patch
- "${FILESDIR}"/${PN}-2.26-no-perl.patch
- "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
- "${FILESDIR}"/${PN}-2.21-include.patch
-)
-
-src_prepare() {
- default
- multilib_copy_sources
-}
-
-run_emake() {
- local args=(
- exec_prefix="${EPREFIX}"
- lib_prefix="${EPREFIX}/usr"
- lib="$(get_libdir)"
- prefix="${EPREFIX}/usr"
- PAM_CAP="$(usex pam yes no)"
- DYNAMIC=yes
- )
- emake "${args[@]}" "$@"
-}
-
-multilib_src_compile() {
- tc-export AR CC RANLIB
- local BUILD_CC
- tc-export_build_env BUILD_CC
-
- run_emake
-}
-
-multilib_src_install() {
- # no configure, needs explicit install line #444724#c3
- run_emake DESTDIR="${D}" install
-
- gen_usr_ldscript -a cap
- if ! use static-libs ; then
- rm "${ED%/}"/usr/$(get_libdir)/libcap.a || die
- fi
-
- if [[ -d "${ED%/}"/usr/$(get_libdir)/security ]] ; then
- rm -r "${ED%/}"/usr/$(get_libdir)/security || die
- fi
-
- if use pam; then
- dopammod pam_cap/pam_cap.so
- dopamsecurity '' pam_cap/capability.conf
- fi
-}
-
-multilib_src_install_all() {
- dodoc CHANGELOG README doc/capability.notes
-}
diff --git a/sys-libs/libcap/libcap-2.27.ebuild b/sys-libs/libcap/libcap-2.27.ebuild
deleted file mode 100644
index 7724e1694368..000000000000
--- a/sys-libs/libcap/libcap-2.27.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit multilib multilib-minimal toolchain-funcs pam usr-ldscript
-
-DESCRIPTION="POSIX 1003.1e capabilities"
-HOMEPAGE="https://sites.google.com/site/fullycapable/"
-SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
-
-# it's available under either of the licenses
-LICENSE="|| ( GPL-2 BSD )"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="pam static-libs"
-
-# While the build system optionally uses gperf, we don't DEPEND on it because
-# the build automatically falls back when it's unavailable. #604802
-RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]"
-PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- ${PDEPEND}
- sys-kernel/linux-headers"
-
-# Requires test suite being run as root (via sudo)
-RESTRICT="test"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.25-build-system-fixes.patch
- "${FILESDIR}"/${PN}-2.26-no-perl.patch
- "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
- "${FILESDIR}"/${PN}-2.21-include.patch
-)
-
-src_prepare() {
- default
- multilib_copy_sources
-}
-
-run_emake() {
- local args=(
- exec_prefix="${EPREFIX}"
- lib_prefix="${EPREFIX}/usr"
- lib="$(get_libdir)"
- prefix="${EPREFIX}/usr"
- PAM_CAP="$(usex pam yes no)"
- DYNAMIC=yes
- )
- emake "${args[@]}" "$@"
-}
-
-multilib_src_compile() {
- tc-export AR CC RANLIB
- local BUILD_CC
- tc-export_build_env BUILD_CC
-
- run_emake
-}
-
-multilib_src_install() {
- # no configure, needs explicit install line #444724#c3
- run_emake DESTDIR="${D}" install
-
- gen_usr_ldscript -a cap
- if ! use static-libs ; then
- rm "${ED%/}"/usr/$(get_libdir)/libcap.a || die
- fi
-
- if [[ -d "${ED%/}"/usr/$(get_libdir)/security ]] ; then
- rm -r "${ED%/}"/usr/$(get_libdir)/security || die
- fi
-
- if use pam; then
- dopammod pam_cap/pam_cap.so
- dopamsecurity '' pam_cap/capability.conf
- fi
-}
-
-multilib_src_install_all() {
- dodoc CHANGELOG README doc/capability.notes
-}
diff --git a/sys-libs/libcap/libcap-2.43.ebuild b/sys-libs/libcap/libcap-2.69-r1.ebuild
index 1362bc3efe33..d7218cbc4b0a 100644
--- a/sys-libs/libcap/libcap-2.43.ebuild
+++ b/sys-libs/libcap/libcap-2.69-r1.ebuild
@@ -1,36 +1,40 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit multilib multilib-minimal toolchain-funcs pam usr-ldscript
+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/"
-SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
# it's available under either of the licenses
LICENSE="|| ( GPL-2 BSD )"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="pam static-libs"
+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
-RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]"
PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- ${PDEPEND}
+DEPEND="${PDEPEND}
sys-kernel/linux-headers"
+BDEPEND="
+ sys-apps/diffutils
+ tools? ( dev-lang/go )"
-# Requires test suite being run as root (via sudo)
-RESTRICT="test"
+QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
PATCHES=(
- "${FILESDIR}"/${PN}-2.42-build-system-fixes.patch
- "${FILESDIR}"/${PN}-2.38-no_perl.patch
- "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
- "${FILESDIR}"/${PN}-2.21-include.patch
+ "${FILESDIR}"/${PN}-2.62-ignore-RAISE_SETFCAP-install-failures.patch
)
src_prepare() {
@@ -40,19 +44,22 @@ src_prepare() {
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=no
+ GOLANG="$(multilib_native_usex tools yes no)"
)
emake "${args[@]}" "$@"
}
src_configure() {
- tc-export AR CC RANLIB
tc-export_build_env BUILD_CC
multilib-minimal_src_configure
}
@@ -61,27 +68,27 @@ 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
- gen_usr_ldscript -a cap
if ! use static-libs ; then
- # Don't remove libpsx.a!
- # See https://bugs.gentoo.org/703912
- rm "${ED}"/usr/$(get_libdir)/libcap.a || die
+ rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die
fi
- if [[ -d "${ED}"/usr/$(get_libdir)/security ]] ; then
- rm -r "${ED}"/usr/$(get_libdir)/security || die
- fi
+ # install pam plugins ourselves
+ rm -rf "${ED}"/usr/$(get_libdir)/security || die
- if use pam; then
+ if use pam ; then
dopammod pam_cap/pam_cap.so
dopamsecurity '' pam_cap/capability.conf
fi
}
multilib_src_install_all() {
- dodoc CHANGELOG README doc/capability.notes
+ dodoc CHANGELOG README doc/capability.md
}
diff --git a/sys-libs/libcap/libcap-2.42.ebuild b/sys-libs/libcap/libcap-2.69.ebuild
index acba4de6b6cd..f1d3b050aad9 100644
--- a/sys-libs/libcap/libcap-2.42.ebuild
+++ b/sys-libs/libcap/libcap-2.69.ebuild
@@ -1,36 +1,40 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit multilib multilib-minimal toolchain-funcs pam usr-ldscript
+inherit multilib-minimal toolchain-funcs pam usr-ldscript
+
+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/"
-SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
# it's available under either of the licenses
LICENSE="|| ( GPL-2 BSD )"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="pam static-libs"
+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
-RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]"
PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- ${PDEPEND}
+DEPEND="${PDEPEND}
sys-kernel/linux-headers"
+BDEPEND="
+ sys-apps/diffutils
+ tools? ( dev-lang/go )"
-# Requires test suite being run as root (via sudo)
-RESTRICT="test"
+QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
PATCHES=(
- "${FILESDIR}"/${PN}-2.42-build-system-fixes.patch
- "${FILESDIR}"/${PN}-2.38-no_perl.patch
- "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
- "${FILESDIR}"/${PN}-2.21-include.patch
+ "${FILESDIR}"/${PN}-2.62-ignore-RAISE_SETFCAP-install-failures.patch
)
src_prepare() {
@@ -40,19 +44,22 @@ src_prepare() {
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=no
+ GOLANG="$(multilib_native_usex tools yes no)"
)
emake "${args[@]}" "$@"
}
src_configure() {
- tc-export AR CC RANLIB
tc-export_build_env BUILD_CC
multilib-minimal_src_configure
}
@@ -61,27 +68,29 @@ 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
gen_usr_ldscript -a cap
+ gen_usr_ldscript -a psx
if ! use static-libs ; then
- # Don't remove libpsx.a!
- # See https://bugs.gentoo.org/703912
- rm "${ED}"/usr/$(get_libdir)/libcap.a || die
+ rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die
fi
- if [[ -d "${ED}"/usr/$(get_libdir)/security ]] ; then
- rm -r "${ED}"/usr/$(get_libdir)/security || die
- fi
+ # install pam plugins ourselves
+ rm -rf "${ED}"/usr/$(get_libdir)/security || die
- if use pam; then
+ if use pam ; then
dopammod pam_cap/pam_cap.so
dopamsecurity '' pam_cap/capability.conf
fi
}
multilib_src_install_all() {
- dodoc CHANGELOG README doc/capability.notes
+ dodoc CHANGELOG README doc/capability.md
}
diff --git a/sys-libs/libcap/libcap-2.41.ebuild b/sys-libs/libcap/libcap-9999.ebuild
index 0b09bd935e0d..ee91b8f42d9c 100644
--- a/sys-libs/libcap/libcap-2.41.ebuild
+++ b/sys-libs/libcap/libcap-9999.ebuild
@@ -1,36 +1,40 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit multilib multilib-minimal toolchain-funcs pam usr-ldscript
+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/"
-SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
# it's available under either of the licenses
LICENSE="|| ( GPL-2 BSD )"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="pam static-libs"
+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
-RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]"
PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- ${PDEPEND}
+DEPEND="${PDEPEND}
sys-kernel/linux-headers"
+BDEPEND="
+ sys-apps/diffutils
+ tools? ( dev-lang/go )"
-# Requires test suite being run as root (via sudo)
-RESTRICT="test"
+QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
PATCHES=(
- "${FILESDIR}"/${PN}-2.39-build-system-fixes.patch
- "${FILESDIR}"/${PN}-2.38-no_perl.patch
- "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
- "${FILESDIR}"/${PN}-2.21-include.patch
+ "${FILESDIR}"/${PN}-2.62-ignore-RAISE_SETFCAP-install-failures.patch
)
src_prepare() {
@@ -40,19 +44,22 @@ src_prepare() {
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=no
+ GOLANG="$(multilib_native_usex tools yes no)"
)
emake "${args[@]}" "$@"
}
src_configure() {
- tc-export AR CC RANLIB
tc-export_build_env BUILD_CC
multilib-minimal_src_configure
}
@@ -61,27 +68,27 @@ 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
- gen_usr_ldscript -a cap
if ! use static-libs ; then
- # Don't remove libpsx.a!
- # See https://bugs.gentoo.org/703912
- rm "${ED}"/usr/$(get_libdir)/libcap.a || die
+ rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die
fi
- if [[ -d "${ED}"/usr/$(get_libdir)/security ]] ; then
- rm -r "${ED}"/usr/$(get_libdir)/security || die
- fi
+ # install pam plugins ourselves
+ rm -rf "${ED}"/usr/$(get_libdir)/security || die
- if use pam; then
+ if use pam ; then
dopammod pam_cap/pam_cap.so
dopamsecurity '' pam_cap/capability.conf
fi
}
multilib_src_install_all() {
- dodoc CHANGELOG README doc/capability.notes
+ dodoc CHANGELOG README doc/capability.md
}
diff --git a/sys-libs/libcap/metadata.xml b/sys-libs/libcap/metadata.xml
index d10107478bd7..c71f3d49faae 100644
--- a/sys-libs/libcap/metadata.xml
+++ b/sys-libs/libcap/metadata.xml
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<upstream>
- <remote-id type="cpe">cpe:/a:libcap:libcap</remote-id>
-</upstream>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <use>
+ <flag name="tools">Install captree, which requires <pkg>dev-lang/go</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:libcap:libcap</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/libchipcard/Manifest b/sys-libs/libchipcard/Manifest
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/libchipcard/metadata.xml b/sys-libs/libchipcard/metadata.xml
index 7a38bb900964..115e9d64a669 100644
--- a/sys-libs/libchipcard/metadata.xml
+++ b/sys-libs/libchipcard/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
</pkgmetadata>
diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
index 8ceb93829922..baf0ab9370b1 100644
--- a/sys-libs/libcxx/Manifest
+++ b/sys-libs/libcxx/Manifest
@@ -1,5 +1,12 @@
-DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff219888706d2b79d5296590934714e42ac79f6a6547941ac2b1d2c4e6313dd18b6c7068e748aa6ac033e49fccbf5d355aa8191 SHA512 baa182d62fef1851836013ae8a1a00861ea89769778d67fb97b407a9de664e6c85da2af9c5b3f75d2bf34ff6b00004e531ca7e4b3115a26c0e61c575cf2303a0
-DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
-DIST llvmorg-11.0.0-rc1.tar.gz 122688246 BLAKE2B 10ff3f08ff3780abb1d86ac67942e6aac52ff5daf820a2e3d23d8b79dbade1c5b1d398d0a577028d2d7c8759ab9a8b552a0305b5750310a015585c06cdadf844 SHA512 09564ed903902a5795fffaa4679badc30bf49739889a48074b5ae2c93bd29000cfb36a650208d5cae5d74899bade066f84b4aa023fc852eec246ff67bf64a267
-DIST llvmorg-11.0.0-rc2.tar.gz 122728230 BLAKE2B 7944adf41ec7cd82489666a0a38a857de628879d59a2e3bb566b67c18500092430db66ff214d45cb324128c874a74a72c367b452df3b88ec95b33c284dd35512 SHA512 25eb2879eb22e79a1e840ef24cf3f5eec602e947101db299393e06e3d09f2d1531eef214264636e1b511eafff7f51b1834d5a03976ccd088eb680745b147e9f3
-DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
+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/files/libcxx-3.9-cmake-link-flags.patch b/sys-libs/libcxx/files/libcxx-3.9-cmake-link-flags.patch
deleted file mode 100644
index bef5bc187547..000000000000
--- a/sys-libs/libcxx/files/libcxx-3.9-cmake-link-flags.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index d618e83..0e76525 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -293,6 +293,18 @@ remove_flags(-DNDEBUG -UNDEBUG -D_DEBUG
- # so they don't get transformed into -Wno and -errors respectivly.
- remove_flags(-Wno-pedantic -pedantic-errors -pedantic)
-
-+# FIXME: this is cribbed from HandleLLVMOptions.cmake.
-+if(LIBCXX_STANDALONE_BUILD)
-+ # Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO
-+ # build might work on ELF but fail on MachO/COFF.
-+ if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
-+ ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
-+ ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND
-+ NOT LLVM_USE_SANITIZER)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
-+ endif()
-+endif()
-+
- # Required flags ==============================================================
- add_compile_flags_if_supported(-std=c++11)
- if (NOT MSVC AND NOT LIBCXX_SUPPORTS_STD_EQ_CXX11_FLAG)
diff --git a/sys-libs/libcxx/libcxx-10.0.0.ebuild b/sys-libs/libcxx/libcxx-10.0.0.ebuild
deleted file mode 100644
index 2fdacef86681..000000000000
--- a/sys-libs/libcxx/libcxx-10.0.0.ebuild
+++ /dev/null
@@ -1,200 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 \
- toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/"
-LLVM_COMPONENTS=( libcxx )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 x86"
-IUSE="elibc_glibc elibc_musl +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? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
-
-DOCS=( CREDITS.TXT )
-
-PATCHES=(
- # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
- # out-of-tree build.
- "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
-)
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- 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
- 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)
- local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
-
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
- )
- fi
- cmake-utils_src_configure
-}
-
-multilib_src_test() {
- local -x LIT_PRESERVES_TMP=1
- cmake-utils_src_make check-libcxx
-}
-
-# 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-utils_src_install
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
-}
-
-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-10.0.1.ebuild b/sys-libs/libcxx/libcxx-10.0.1.ebuild
deleted file mode 100644
index f933ab2e515f..000000000000
--- a/sys-libs/libcxx/libcxx-10.0.1.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( libcxx )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-IUSE="elibc_glibc elibc_musl +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? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
-
-DOCS=( CREDITS.TXT )
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- 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
-}
-
-src_prepare() {
- # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
- # out-of-tree build.
- eapply "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
-
- llvm.org_src_prepare
-}
-
-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
- 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}"
- )
- fi
- cmake_src_configure
-}
-
-multilib_src_test() {
- local -x LIT_PRESERVES_TMP=1
- cmake_build check-libcxx
-}
-
-# 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
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
-}
-
-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-11.0.0.9999.ebuild b/sys-libs/libcxx/libcxx-11.0.0.9999.ebuild
deleted file mode 100644
index 22c6462abd9d..000000000000
--- a/sys-libs/libcxx/libcxx-11.0.0.9999.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake/modules,utils/llvm-lit} )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="elibc_glibc elibc_musl +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? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
-
-DOCS=( CREDITS.TXT )
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- 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
-}
-
-src_prepare() {
- # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
- # out-of-tree build.
- eapply "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
-
- llvm.org_src_prepare
-}
-
-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
- 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}"
- )
- 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
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
-}
-
-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-11.0.0_rc1.ebuild b/sys-libs/libcxx/libcxx-11.0.0_rc1.ebuild
deleted file mode 100644
index 22c6462abd9d..000000000000
--- a/sys-libs/libcxx/libcxx-11.0.0_rc1.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake/modules,utils/llvm-lit} )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="elibc_glibc elibc_musl +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? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
-
-DOCS=( CREDITS.TXT )
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- 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
-}
-
-src_prepare() {
- # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
- # out-of-tree build.
- eapply "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
-
- llvm.org_src_prepare
-}
-
-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
- 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}"
- )
- 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
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
-}
-
-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-11.0.0_rc2.ebuild b/sys-libs/libcxx/libcxx-11.0.0_rc2.ebuild
deleted file mode 100644
index 22c6462abd9d..000000000000
--- a/sys-libs/libcxx/libcxx-11.0.0_rc2.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake/modules,utils/llvm-lit} )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="elibc_glibc elibc_musl +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? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
-
-DOCS=( CREDITS.TXT )
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- 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
-}
-
-src_prepare() {
- # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
- # out-of-tree build.
- eapply "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
-
- llvm.org_src_prepare
-}
-
-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
- 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}"
- )
- 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
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
-}
-
-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.0.9999.ebuild b/sys-libs/libcxx/libcxx-12.0.0.9999.ebuild
deleted file mode 100644
index 22c6462abd9d..000000000000
--- a/sys-libs/libcxx/libcxx-12.0.0.9999.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..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/"
-LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake/modules,utils/llvm-lit} )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="elibc_glibc elibc_musl +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? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
-
-DOCS=( CREDITS.TXT )
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- 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
-}
-
-src_prepare() {
- # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
- # out-of-tree build.
- eapply "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
-
- llvm.org_src_prepare
-}
-
-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
- 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}"
- )
- 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
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
-}
-
-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/libcxx-9.0.1.ebuild b/sys-libs/libcxx/libcxx-9.0.1.ebuild
deleted file mode 100644
index c144def9c792..000000000000
--- a/sys-libs/libcxx/libcxx-9.0.1.ebuild
+++ /dev/null
@@ -1,205 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 \
- toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/"
-LLVM_COMPONENTS=( libcxx )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 x86"
-IUSE="elibc_glibc elibc_musl +libcxxabi libcxxrt +libunwind +static-libs test"
-REQUIRED_USE="libunwind? ( || ( libcxxabi libcxxrt ) )
- ?? ( libcxxabi libcxxrt )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
- libcxxrt? ( sys-libs/libcxxrt[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
- !libcxxabi? ( !libcxxrt? ( >=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? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
-
-DOCS=( CREDITS.TXT )
-
-PATCHES=(
- # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
- # out-of-tree build.
- "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
-)
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- use test && python-any-r1_pkg_setup
-
- if ! use libcxxabi && ! use libcxxrt && ! 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"
- elif use libcxxrt; then
- cxxabi=libcxxrt
- cxxabi_incs="${EPREFIX}/usr/include/libcxxrt"
- 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
- 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)
- local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
-
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
- )
- fi
- cmake-utils_src_configure
-}
-
-multilib_src_test() {
- local -x LIT_PRESERVES_TMP=1
- cmake-utils_src_make check-libcxx
-}
-
-# 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" "$(usex libcxxrt "libcxxrt.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" "$(usex libcxxrt "libcxxrt.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-utils_src_install
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
-}
-
-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/metadata.xml b/sys-libs/libcxx/metadata.xml
index a4c89899152b..413b6a08b4d8 100644
--- a/sys-libs/libcxx/metadata.xml
+++ b/sys-libs/libcxx/metadata.xml
@@ -1,17 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>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="libcxxrt">Build on top of libcxxrt 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 8ceb93829922..bd71f2e58a68 100644
--- a/sys-libs/libcxxabi/Manifest
+++ b/sys-libs/libcxxabi/Manifest
@@ -1,5 +1,10 @@
-DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff219888706d2b79d5296590934714e42ac79f6a6547941ac2b1d2c4e6313dd18b6c7068e748aa6ac033e49fccbf5d355aa8191 SHA512 baa182d62fef1851836013ae8a1a00861ea89769778d67fb97b407a9de664e6c85da2af9c5b3f75d2bf34ff6b00004e531ca7e4b3115a26c0e61c575cf2303a0
-DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
-DIST llvmorg-11.0.0-rc1.tar.gz 122688246 BLAKE2B 10ff3f08ff3780abb1d86ac67942e6aac52ff5daf820a2e3d23d8b79dbade1c5b1d398d0a577028d2d7c8759ab9a8b552a0305b5750310a015585c06cdadf844 SHA512 09564ed903902a5795fffaa4679badc30bf49739889a48074b5ae2c93bd29000cfb36a650208d5cae5d74899bade066f84b4aa023fc852eec246ff67bf64a267
-DIST llvmorg-11.0.0-rc2.tar.gz 122728230 BLAKE2B 7944adf41ec7cd82489666a0a38a857de628879d59a2e3bb566b67c18500092430db66ff214d45cb324128c874a74a72c367b452df3b88ec95b33c284dd35512 SHA512 25eb2879eb22e79a1e840ef24cf3f5eec602e947101db299393e06e3d09f2d1531eef214264636e1b511eafff7f51b1834d5a03976ccd088eb680745b147e9f3
-DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
+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-10.0.0.ebuild b/sys-libs/libcxxabi/libcxxabi-10.0.0.ebuild
deleted file mode 100644
index 0812b96e62d8..000000000000
--- a/sys-libs/libcxxabi/libcxxabi-10.0.0.ebuild
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 toolchain-funcs
-
-DESCRIPTION="Low level support for a standard C++ library"
-HOMEPAGE="https://libcxxabi.llvm.org/"
-# libcxx is needed uncondtionally for the headers
-LLVM_COMPONENTS=( libcxx{abi,} )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 x86"
-IUSE="+libunwind +static-libs test elibc_musl"
-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}]') )"
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- 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)
- local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
-
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
- )
- fi
- cmake-utils_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-utils_src_configure
- cmake-utils_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-utils_src_make check-libcxxabi
-}
-
-multilib_src_install_all() {
- insinto /usr/include/libcxxabi
- doins -r include/.
-}
diff --git a/sys-libs/libcxxabi/libcxxabi-10.0.1.ebuild b/sys-libs/libcxxabi/libcxxabi-10.0.1.ebuild
deleted file mode 100644
index dd5f660654b1..000000000000
--- a/sys-libs/libcxxabi/libcxxabi-10.0.1.ebuild
+++ /dev/null
@@ -1,115 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..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/"
-# libcxx is needed uncondtionally for the headers
-LLVM_COMPONENTS=( libcxx{abi,} )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-IUSE="+libunwind +static-libs test elibc_musl"
-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}]') )"
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- 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}"
- )
- 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-libcxxabi
-}
-
-multilib_src_install_all() {
- insinto /usr/include/libcxxabi
- doins -r include/.
-}
diff --git a/sys-libs/libcxxabi/libcxxabi-11.0.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-11.0.0.9999.ebuild
deleted file mode 100644
index 4b304417a9c3..000000000000
--- a/sys-libs/libcxxabi/libcxxabi-11.0.0.9999.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..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/"
-# libcxx is needed uncondtionally for the headers
-LLVM_COMPONENTS=( libcxx{abi,} )
-LLVM_TEST_COMPONENTS=( llvm/cmake )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="+libunwind +static-libs test elibc_musl"
-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}]') )"
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- 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}"
- )
- 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-11.0.0_rc1.ebuild b/sys-libs/libcxxabi/libcxxabi-11.0.0_rc1.ebuild
deleted file mode 100644
index 4b304417a9c3..000000000000
--- a/sys-libs/libcxxabi/libcxxabi-11.0.0_rc1.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..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/"
-# libcxx is needed uncondtionally for the headers
-LLVM_COMPONENTS=( libcxx{abi,} )
-LLVM_TEST_COMPONENTS=( llvm/cmake )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="+libunwind +static-libs test elibc_musl"
-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}]') )"
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- 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}"
- )
- 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-11.0.0_rc2.ebuild b/sys-libs/libcxxabi/libcxxabi-11.0.0_rc2.ebuild
deleted file mode 100644
index 4b304417a9c3..000000000000
--- a/sys-libs/libcxxabi/libcxxabi-11.0.0_rc2.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..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/"
-# libcxx is needed uncondtionally for the headers
-LLVM_COMPONENTS=( libcxx{abi,} )
-LLVM_TEST_COMPONENTS=( llvm/cmake )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="+libunwind +static-libs test elibc_musl"
-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}]') )"
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- 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}"
- )
- 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.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-12.0.0.9999.ebuild
deleted file mode 100644
index 4b304417a9c3..000000000000
--- a/sys-libs/libcxxabi/libcxxabi-12.0.0.9999.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..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/"
-# libcxx is needed uncondtionally for the headers
-LLVM_COMPONENTS=( libcxx{abi,} )
-LLVM_TEST_COMPONENTS=( llvm/cmake )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="+libunwind +static-libs test elibc_musl"
-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}]') )"
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- 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}"
- )
- 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-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/libcxxabi-9.0.1.ebuild b/sys-libs/libcxxabi/libcxxabi-9.0.1.ebuild
deleted file mode 100644
index 0812b96e62d8..000000000000
--- a/sys-libs/libcxxabi/libcxxabi-9.0.1.ebuild
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 toolchain-funcs
-
-DESCRIPTION="Low level support for a standard C++ library"
-HOMEPAGE="https://libcxxabi.llvm.org/"
-# libcxx is needed uncondtionally for the headers
-LLVM_COMPONENTS=( libcxx{abi,} )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 x86"
-IUSE="+libunwind +static-libs test elibc_musl"
-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}]') )"
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-python_check_deps() {
- has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
- llvm_pkg_setup
- 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)
- local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
-
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
- )
- fi
- cmake-utils_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-utils_src_configure
- cmake-utils_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-utils_src_make check-libcxxabi
-}
-
-multilib_src_install_all() {
- insinto /usr/include/libcxxabi
- doins -r include/.
-}
diff --git a/sys-libs/libcxxabi/metadata.xml b/sys-libs/libcxxabi/metadata.xml
index 78c7d7d981b6..9dfed369952d 100644
--- a/sys-libs/libcxxabi/metadata.xml
+++ b/sys-libs/libcxxabi/metadata.xml
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>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 e7b654ec7742..1e76f97098bb 100644
--- a/sys-libs/libfaketime/Manifest
+++ b/sys-libs/libfaketime/Manifest
@@ -1,3 +1,3 @@
-DIST libfaketime-0.9.6.tar.gz 51333 BLAKE2B b9aab3da744e250f43eca4f837322932c3260d35550171d34da851740a415bf3d2c3bfe02cdf37782058d8524008743838757ed8326384ecb36d0d9839cadd1a SHA512 ab2e9c53f4ca2b9dcd2bbcd8de3ab9e27be57547ed9b52a17f07a6fe880fd3a283a6f10018736be2a6ba4e150f54e92161959ccb887be1f78ddfc96058729860
-DIST libfaketime-0.9.7.tar.gz 56277 BLAKE2B 62e10c4b3c33c203cde023cbc4e114c2ee1ad87298b1840bb2f7ea3610fdfd81c12a60c1c00a44409ca322e96408427fcad32f202737b75d28c5d69b85b579d6 SHA512 593e14e96dc0a49f65e93d25b7aace6e78fd2b4251f692c14bd6c6a2ac6360d997573aeac9005388bc49276078075c23a39fdaee912c2469acb8014127625537
-DIST libfaketime-0.9.8.tar.gz 70614 BLAKE2B a10a8859c216ce4c2edae3324515507f4c2b8a284d80da5a83d1b8046262ae5e624e358c809c2d473fdc21caa0d89f675beb3adfdb401411356145fdb9a1bac3 SHA512 87081024cab10462d4ed4d4ad9c3c56ab40fee3300d3a9ff180a4d96d418b3f25d80d7d5ad0a1af2fb87204f01a506d9fa273def7a8f9cc3be4cc0e9fef42aed
+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/files/libfaketime-0.9.8-Treat-unknown-clock_ids-like-CLOCK_REALTIME.patch b/sys-libs/libfaketime/files/libfaketime-0.9.8-Treat-unknown-clock_ids-like-CLOCK_REALTIME.patch
new file mode 100644
index 000000000000..13d7698ec1bd
--- /dev/null
+++ b/sys-libs/libfaketime/files/libfaketime-0.9.8-Treat-unknown-clock_ids-like-CLOCK_REALTIME.patch
@@ -0,0 +1,35 @@
+From bb635e4367adcac2c1517a698799a60a2bf86e83 Mon Sep 17 00:00:00 2001
+From: Wolfgang Hommel <wolf@code-wizards.com>
+Date: Thu, 30 Nov 2017 20:28:06 +0100
+Subject: [PATCH] Treat unknown clock_ids like CLOCK_REALTIME (experimental)
+
+---
+ src/libfaketime.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/libfaketime.c b/src/libfaketime.c
+index b59298c..b36c75b 100644
+--- a/src/libfaketime.c
++++ b/src/libfaketime.c
+@@ -2020,8 +2020,8 @@ int fake_clock_gettime(clockid_t clk_id, struct timespec *tp)
+ break;
+ #endif
+ default:
+- printf("Invalid clock_id for clock_gettime: %d", clk_id);
+- exit(EXIT_FAILURE);
++ timespecsub(tp, &ftpl_starttime.real, &tmp_ts);
++ break;
+ }
+
+ if (limited_faking)
+@@ -2171,8 +2171,8 @@ int fake_clock_gettime(clockid_t clk_id, struct timespec *tp)
+ break;
+ #endif
+ default:
+- printf("Invalid clock_id for clock_gettime: %d", clk_id);
+- exit(EXIT_FAILURE);
++ timespecsub(tp, &ftpl_starttime.real, &tdiff);
++ break;
+ } // end of switch (clk_id)
+ if (user_rate_set)
+ {
diff --git a/sys-libs/libfaketime/libfaketime-0.9.6-r2.ebuild b/sys-libs/libfaketime/libfaketime-0.9.10.ebuild
index 538aad5ced37..eaeab20e29a2 100644
--- a/sys-libs/libfaketime/libfaketime-0.9.6-r2.ebuild
+++ b/sys-libs/libfaketime/libfaketime-0.9.10.ebuild
@@ -1,27 +1,41 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI=8
-inherit toolchain-funcs multilib-minimal
+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="http://www.code-wizards.com/projects/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/wolfcw/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 arm arm64 hppa sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv sparc x86"
src_prepare() {
- sed -i 's/-Werror //' "${S}/src/Makefile" || die
+ default
- sed -i 's/-Werror //' "${S}/test/Makefile" || die
+ sed -i -e 's/-Werror //' {src,test}/Makefile || die
# Bug #617624 (GCC-6 compatibility)
- sed -i 's/-Wno-nonnull-compare //' "${S}/src/Makefile" || die
+ sed -i 's/-Wno-nonnull-compare //' src/Makefile || die
- eapply_user
+ # 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
}
@@ -42,8 +56,10 @@ multilib_src_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
}
diff --git a/sys-libs/libfaketime/libfaketime-0.9.7.ebuild b/sys-libs/libfaketime/libfaketime-0.9.6-r4.ebuild
index ce73633752da..0d1e323682b4 100644
--- a/sys-libs/libfaketime/libfaketime-0.9.7.ebuild
+++ b/sys-libs/libfaketime/libfaketime-0.9.6-r4.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI="7"
-inherit toolchain-funcs multilib-minimal
+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"
@@ -11,9 +11,13 @@ 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 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ~ppc64 -riscv sparc x86"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.9.8-Treat-unknown-clock_ids-like-CLOCK_REALTIME.patch )
src_prepare() {
+ default
+
sed -i 's/-Werror //' "${S}/src/Makefile" || die
sed -i 's/-Werror //' "${S}/test/Makefile" || die
@@ -21,8 +25,6 @@ src_prepare() {
# Bug #617624 (GCC-6 compatibility)
sed -i 's/-Wno-nonnull-compare //' "${S}/src/Makefile" || die
- eapply_user
-
multilib_copy_sources
}
diff --git a/sys-libs/libfaketime/libfaketime-0.9.8.ebuild b/sys-libs/libfaketime/libfaketime-0.9.9.ebuild
index 002934da696f..df970bfb51c5 100644
--- a/sys-libs/libfaketime/libfaketime-0.9.8.ebuild
+++ b/sys-libs/libfaketime/libfaketime-0.9.9.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="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 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
}
@@ -42,6 +45,11 @@ multilib_src_compile() {
}
multilib_src_test() {
+ if has usersandbox ${FEATURES} ; then
+ # Tests are using LD_PRELOAD which clashes with FEATURES=usersandbox
+ ewarn "Tests are known to fail with usersandbox enabled."
+ fi
+
multilib_is_native_abi && emake CC="$(tc-getCC)" test
}
diff --git a/sys-libs/libfaketime/metadata.xml b/sys-libs/libfaketime/metadata.xml
index e4f0f0f8ff59..9dbf15865d46 100644
--- a/sys-libs/libfaketime/metadata.xml
+++ b/sys-libs/libfaketime/metadata.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>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 a5167aec9e32..000000000000
--- a/sys-libs/libhugetlbfs/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST libhugetlbfs-2.22.tar.gz 175099 BLAKE2B e67a6a678065b10492d510b733b7c6e2926f4f01dd741d49f6e76cedde002fa81d7dad6a6fd8922443c6aacd527c9b3df35f84b8da7332c04e3fcf8c52e23084 SHA512 7f38f9fa576841f36c7cd5192a9ee3f79b275b7b64d7e2a838a43636489cf88627bdba3a045d6b3302a4a509cf64627972b569b4c2c3c4fe05d5aa4ae1d66fd8
-DIST libhugetlbfs-2.23.tar.gz 175459 BLAKE2B f469ff9a65364e9f0e04c11c8010c958855ebd4d50e1dd719576cda7c280586623404304be64a794907a5fb1d97bd9c0620a91d7a2492577e04fa40ff432b4c7 SHA512 fc9a7d59bcda9d3ca9c9e43a3a348f989c9cbdbbb77f21a43a06e71eacd05bbe5a7b2b51e20ae9ea00da9f1c4d1130da529bbfb702e8c9d11cab6efadd3dc168
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.22.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild
deleted file mode 100644
index 255bcb160f23..000000000000
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild
+++ /dev/null
@@ -1,159 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8,9} )
-
-inherit multilib 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 )"
-
-DEPEND="test? ( ${PYTHON_DEPS} )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.6-fixup-testsuite.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/libhugetlbfs-2.23.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
deleted file mode 100644
index 509763949e6a..000000000000
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
+++ /dev/null
@@ -1,160 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8,9} )
-
-inherit multilib 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 )"
-
-DEPEND="test? ( ${PYTHON_DEPS} )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
- "${FILESDIR}"/${PN}-2.23-uncompressed-man-pages.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 bf4a9ce74b49..000000000000
--- a/sys-libs/libhugetlbfs/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://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 f0f19e60cea5..333695429332 100644
--- a/sys-libs/libhx/Manifest
+++ b/sys-libs/libhx/Manifest
@@ -1,2 +1,4 @@
-DIST libHX-3.22.tar.xz 875516 BLAKE2B 1a782834bb792898275ed549eff1b70b3356f9efe7b58e6aa48e34492b3ad8b5e8a66a142643ad6c13163e5eab6762fdcebd3fe4897d8b0d3f75c80f7ef60b6c SHA512 4a50b7171be9f60e1a1bfefb0641f74fa8879c0edb258533ee04ec89617802c48358dc244497fb18d02dc37f828f79f7c52dd5ce2a07d8a2f5e6e6f7b4e97646
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-3.22-r1.ebuild b/sys-libs/libhx/libhx-3.22-r1.ebuild
deleted file mode 100644
index c697c04a25d7..000000000000
--- a/sys-libs/libhx/libhx-3.22-r1.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools eutils ltprune
-
-DESCRIPTION="Platform independent library providing basic system functions"
-HOMEPAGE="http://libhx.sourceforge.net"
-SRC_URI="mirror://sourceforge/${PN}/libHX-${PV}.tar.xz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="amd64 ~ppc x86"
-IUSE="doc"
-
-DEPEND="app-arch/xz-utils"
-RDEPEND=""
-
-S="${WORKDIR}/libHX-${PV}"
-
-PATCHES=( "${FILESDIR}/${P}-no-lyx.patch" )
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_install() {
- default
-
- if use doc; then
- dodoc doc/*.txt
- else
- dodoc doc/changelog.txt
- rm "${D}/usr/share/doc/${PF}/"*.pdf || die
- fi
-
- prune_libtool_files --all
-}
diff --git a/sys-libs/libhx/libhx-3.24.ebuild b/sys-libs/libhx/libhx-3.24-r1.ebuild
index 150e714d3ad1..0a6b6a1a4974 100644
--- a/sys-libs/libhx/libhx-3.24.ebuild
+++ b/sys-libs/libhx/libhx-3.24-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -10,12 +10,11 @@ HOMEPAGE="http://libhx.sourceforge.net"
SRC_URI="mirror://sourceforge/${PN}/libHX-${PV}.tar.xz"
LICENSE="GPL-3"
-SLOT="0"
+SLOT="0/28"
KEYWORDS="amd64 ppc x86"
IUSE="doc"
-DEPEND="app-arch/xz-utils"
-RDEPEND=""
+BDEPEND="app-arch/xz-utils"
S="${WORKDIR}/libHX-${PV}"
diff --git a/sys-libs/libhx/libhx-3.25.ebuild b/sys-libs/libhx/libhx-3.25.ebuild
new file mode 100644
index 000000000000..398b3d8c5869
--- /dev/null
+++ b/sys-libs/libhx/libhx-3.25.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+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}"
+
+PATCHES=( "${FILESDIR}/${PN}-3.22-no-lyx.patch" )
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_install() {
+ default
+
+ if use doc; then
+ dodoc doc/*.txt
+ else
+ dodoc doc/changelog.txt
+ rm "${ED}/usr/share/doc/${PF}/"*.pdf || die
+ fi
+
+ find "${ED}" -name "*.la" -delete || die
+}
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/libhx/metadata.xml b/sys-libs/libhx/metadata.xml
index 462ecca452b3..1a3cb5fcf72f 100644
--- a/sys-libs/libhx/metadata.xml
+++ b/sys-libs/libhx/metadata.xml
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>mattst88@gentoo.org</email>
- <name>Matt Turner</name>
+ <email>hanno@gentoo.org</email>
</maintainer>
<upstream>
<remote-id type="sourceforge">libhx</remote-id>
diff --git a/sys-libs/libieee1284/libieee1284-0.2.11-r4.ebuild b/sys-libs/libieee1284/libieee1284-0.2.11-r4.ebuild
deleted file mode 100644
index 1074e8dacdb0..000000000000
--- a/sys-libs/libieee1284/libieee1284-0.2.11-r4.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit python-single-r1 multilib-minimal
-
-DESCRIPTION="Library to query devices using IEEE1284"
-HOMEPAGE="http://cyberelk.net/tim/software/libieee1284/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc x86"
-IUSE="doc python static-libs"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
- doc? (
- app-text/docbook-sgml-utils
- >=app-text/docbook-sgml-dtd-4.1
- app-text/docbook-dsssl-stylesheets
- dev-perl/XML-RegExp
- )"
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-multilib_src_configure() {
- ECONF_SOURCE="${S}" econf \
- --enable-shared \
- $(use_enable static-libs static) \
- $(multilib_native_with python)
-}
-
-multilib_src_install_all() {
- einstalldocs
- dodoc doc/interface*
-
- if ! use static-libs; then
- find "${D}" -name '*.la' -delete || die
- fi
-}
diff --git a/sys-libs/libieee1284/libieee1284-0.2.11-r5.ebuild b/sys-libs/libieee1284/libieee1284-0.2.11-r5.ebuild
deleted file mode 100644
index 1512eba8b60a..000000000000
--- a/sys-libs/libieee1284/libieee1284-0.2.11-r5.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit python-single-r1 multilib-minimal
-
-DESCRIPTION="Library to query devices using IEEE1284"
-HOMEPAGE="http://cyberelk.net/tim/software/libieee1284/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc x86"
-IUSE="doc python static-libs"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
- doc? (
- app-text/docbook-sgml-utils
- >=app-text/docbook-sgml-dtd-4.1
- app-text/docbook-dsssl-stylesheets
- dev-perl/XML-RegExp
- )"
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-multilib_src_configure() {
- ECONF_SOURCE="${S}" econf \
- --enable-shared \
- $(use_enable static-libs static) \
- $(use_with python)
-}
-
-multilib_src_install_all() {
- einstalldocs
- dodoc doc/interface*
-
- if ! use static-libs; then
- find "${D}" -name '*.la' -delete || die
- fi
-}
diff --git a/sys-libs/libieee1284/libieee1284-0.2.11-r6.ebuild b/sys-libs/libieee1284/libieee1284-0.2.11-r6.ebuild
deleted file mode 100644
index ff524ed34eda..000000000000
--- a/sys-libs/libieee1284/libieee1284-0.2.11-r6.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit python-single-r1 multilib-minimal
-
-DESCRIPTION="Library to query devices using IEEE1284"
-HOMEPAGE="http://cyberelk.net/tim/software/libieee1284/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc x86"
-IUSE="doc python static-libs"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
- doc? (
- app-text/docbook-sgml-utils
- >=app-text/docbook-sgml-dtd-4.1
- app-text/docbook-dsssl-stylesheets
- dev-perl/XML-RegExp
- )"
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-multilib_src_configure() {
- ECONF_SOURCE="${S}" econf \
- --enable-shared \
- $(use_enable static-libs static) \
- $(multilib_native_use_with python)
-}
-
-multilib_src_install_all() {
- einstalldocs
- dodoc doc/interface*
-
- if ! use static-libs; then
- find "${D}" -name '*.la' -delete || die
- fi
-}
diff --git a/sys-libs/libieee1284/libieee1284-0.2.11-r7.ebuild b/sys-libs/libieee1284/libieee1284-0.2.11-r8.ebuild
index fcfc9ea12e08..4be47a172a48 100644
--- a/sys-libs/libieee1284/libieee1284-0.2.11-r7.ebuild
+++ b/sys-libs/libieee1284/libieee1284-0.2.11-r8.ebuild
@@ -1,11 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools python-single-r1 multilib-minimal
+inherit autotools multilib-minimal
DESCRIPTION="Library to query devices using IEEE1284"
HOMEPAGE="http://cyberelk.net/tim/software/libieee1284/"
@@ -13,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/libieee1284/metadata.xml b/sys-libs/libieee1284/metadata.xml
index 047e93acaa98..df6feef3e509 100644
--- a/sys-libs/libieee1284/metadata.xml
+++ b/sys-libs/libieee1284/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
diff --git a/sys-libs/libixp/metadata.xml b/sys-libs/libixp/metadata.xml
index 6f49eba8f496..85e4ed814fa2 100644
--- a/sys-libs/libixp/metadata.xml
+++ b/sys-libs/libixp/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
</pkgmetadata>
diff --git a/sys-libs/libkudzu/Manifest b/sys-libs/libkudzu/Manifest
deleted file mode 100644
index a47c798e00f5..000000000000
--- a/sys-libs/libkudzu/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST kudzu-1.2.57.1.tar.gz 165855 BLAKE2B cd7a71a45a234701dd3e94b7378b37017a03cc78bf5230cc267c273fee4baf5338a5509572f0ba1bb23c8f585ec452c4a7f2d02159326c4133ad6abd80d36c3f SHA512 799e7cea840b7495fc007f4e34adc50fecd2fa7ceda2e2779e39639d0b93b10419bd44a0eb910b2e47024a49a4376330653a6fd96e5560c4828d55e18ab5d641
diff --git a/sys-libs/libkudzu/files/kudzu-1.2.57.1-sbusfix.patch b/sys-libs/libkudzu/files/kudzu-1.2.57.1-sbusfix.patch
deleted file mode 100644
index 5c186ed631da..000000000000
--- a/sys-libs/libkudzu/files/kudzu-1.2.57.1-sbusfix.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- a/sbus.c
-+++ b/sbus.c
-@@ -162,6 +162,7 @@
- devClass = CLASS_NETWORK;
- } else if (!strcmp(prop, "le")) {
- type = "Sun Lance Ethernet";
-+ module = "sunlance";
- devClass = CLASS_NETWORK;
- } else if (!strcmp(prop, "qe")) {
- prop = prom_getproperty("channel#", &len);
-@@ -206,9 +207,11 @@
- devClass = CLASS_SCSI;
- } else if (!strcmp(prop, "esp")) {
- type = "Sun Enhanced SCSI Processor (ESP)";
-+ module = "esp";
- devClass = CLASS_SCSI;
- } else if (!strcmp(prop, "fas")) {
- type = "Sun Swift (ESP)";
-+ module = "esp";
- devClass = CLASS_SCSI;
- } else if (!strcmp(prop, "ptisp")) {
- type = "Performance Technologies ISP";
-@@ -232,19 +235,19 @@
- while ((*prop >= 'A' && *prop <= 'Z') || *prop == ',')
- if (*prop++ == ',') break;
- if (!strcmp(prop, "audio")) {
-- type = "AMD7930";
-- module = "amd7930";
-+ type = "Sun|AMD7930";
-+ module = "snd-sun-amd7930";
- devClass = CLASS_AUDIO;
- } else if (!strcmp(prop, "CS4231")) {
- if (ebus)
-- type = "CS4231 EB2 DMA (PCI)";
-+ type = "Sun|CS4231 EB2 DMA (PCI)";
- else
-- type = "CS4231 APC DMA (SBUS)";
-- module = "cs4231";
-+ type = "Sun|CS4231 APC DMA (SBUS)";
-+ module = "snd-sun-cs4231";
- devClass = CLASS_AUDIO;
- } else if (!strcmp(prop, "DBRIe")) {
-- type = "SS10/SS20 DBRI";
-- module = "dbri";
-+ type = "Sun|SS10/SS20 DBRI";
-+ module = "snd-sun-dbri";
- devClass = CLASS_AUDIO;
- }
- prop = prom_getproperty("device_type", &len);
-@@ -452,22 +455,6 @@
-
- struct device *sbusProbe( enum deviceClass probeClass, int probeFlags,
- struct device *devlist) {
-- if (probeClass & CLASS_MOUSE) {
-- int fd;
-- struct sbusDevice *mousedev;
--
-- if ((fd = open("/dev/sunmouse", O_RDONLY)) != -1) {
-- /* FIXME: Should probably talk to the mouse to see
-- if the connector is not empty. */
-- close (fd);
-- mousedev = sbusNewDevice(NULL);
-- mousedev->type = CLASS_MOUSE;
-- mousedev->device = strdup("sunmouse");
-- mousedev->desc = strdup("Sun Mouse");
-- mousedev->next = devlist;
-- devlist = (struct device *)mousedev;
-- }
-- }
- if (
- (probeClass & CLASS_OTHER) ||
- (probeClass & CLASS_NETWORK) ||
diff --git a/sys-libs/libkudzu/files/kudzu-1.2.57.1-sparc-keyboard.patch b/sys-libs/libkudzu/files/kudzu-1.2.57.1-sparc-keyboard.patch
deleted file mode 100644
index 5626a357345d..000000000000
--- a/sys-libs/libkudzu/files/kudzu-1.2.57.1-sparc-keyboard.patch
+++ /dev/null
@@ -1,195 +0,0 @@
---- a/keyboard.c
-+++ b/keyboard.c
-@@ -21,7 +21,6 @@
- #include "keyboard.h"
-
- #ifdef __sparc__
--#include <asm/kbio.h>
- #include <asm/openpromio.h>
- #include <asm/types.h>
- #endif
-@@ -96,7 +95,15 @@
- {0, 0}
- };
-
--#if !defined(__s390__) && !defined(__s390x__)
-+#if defined(__sparc__)
-+static int termcmp(struct termios *a, struct termios *b)
-+{
-+ if (a->c_iflag != b->c_iflag || a->c_oflag != b->c_oflag ||
-+ a->c_cflag != b->c_cflag || a->c_lflag != b->c_lflag)
-+ return 1;
-+ return memcmp(a->c_cc, b->c_cc, sizeof(a->c_cc));
-+}
-+#elif !defined(__s390__) && !defined(__s390x__)
- static int termcmp(struct termios *a, struct termios *b)
- {
- if (a->c_iflag != b->c_iflag || a->c_oflag != b->c_oflag ||
-@@ -110,150 +117,6 @@
- struct device *keyboardProbe(enum deviceClass probeClass, int probeFlags,
- struct device *devlist)
- {
--#ifdef __sparc__
-- int fd;
-- char buf[256];
-- struct keyboardDevice *kbddev;
--
-- if (probeClass & CLASS_KEYBOARD) {
-- static struct {
-- int layout0, layout1, layout2;
-- char *symbols;
-- int use_iso9995_3;
-- } sunkbd_translate[] = {
-- { 0, 33, 80, "", 0, },
-- { 1, 34, 81, "", 0, },
-- { 2, -1, -1, "fr_BE", 0, },
-- { 3, -1, -1, "ca", 0, },
-- { 4, 36, 83, "dk", 1, },
-- { 5, 37, 84, "de", 1, },
-- { 6, 38, 85, "it", 1, },
-- { 7, 39, 86, "nl", 0, },
-- { 8, 40, 87, "no", 1, },
-- { 9, 41, 88, "pt", 1, },
-- { 10, 42, 89, "es", 1, },
-- { 11, 43, 90, "se", 1, },
-- { 12, 44, 91, "fr_CH",1, },
-- { 13, 45, 92, "de_CH",1, },
-- { 14, 46, 93, "gb", 1, },
-- { 16, 47, 94, "ko", 0, },
-- { 17, 48, 95, "tw", 0, },
-- { 32, 49, 96, "jp", 0, },
-- { 50, 97, -1, "fr_CA",0, },
-- { 51, -1, -1, "hu", 0, },
-- { 52, -1, -1, "pl", 0, },
-- { 53, -1, -1, "cs", 0, },
-- { 54, -1, -1, "ru", 0, },
-- { -1, -1, -1, NULL, 0, }
-- };
--
-- char twelve = 12;
-- int fdstd = 0;
-- char buf[4096];
--
-- for (fd = 0; fd <= 2; fd++) {
-- sprintf (buf, "/proc/self/fd/%d", fd);
-- if (readlink (buf, buf, 4096) == 12 &&
-- !strncmp (buf, "/dev/console", 12)) {
-- fdstd = 1;
-- break;
-- }
-- }
-- if (!fdstd) {
-- fd = open("/dev/console", O_RDWR);
-- if (fd < 0) return devlist;
-- }
--
-- kbddev=keyboardNewDevice(NULL);
-- kbddev->type=CLASS_KEYBOARD;
-- if (devlist)
-- kbddev->next = devlist;
-- devlist = (struct device *) kbddev;
--
-- if (ioctl (fd, TIOCLINUX, &twelve) < 0) {
-- /* Serial console */
-- char desc[64];
-- struct serial_struct si;
-- int line = 0;
--
-- if (ioctl (fd, TIOCGSERIAL, &si) >= 0) {
-- if (si.line & 1)
-- /* ttyb */
-- line = 1;
-- }
-- if (!fdstd) close(fd);
-- sprintf (desc, "Serial console tty%c", line + 'a');
-- fd = open("/dev/openprom", O_RDONLY);
-- if (fd >= 0) {
-- struct openpromio *op = (struct openpromio *)buf;
-- sprintf (op->oprom_array, "tty%c-mode", line + 'a');
-- op->oprom_size = 4096-128-4;
-- if (ioctl (fd, OPROMGETOPT, op) >= 0 &&
-- op->oprom_size > 0 && op->oprom_size < 40) {
-- strcat (desc, " ");
-- op->oprom_array [op->oprom_size] = 0;
-- strcat (desc, op->oprom_array);
-- }
-- close (fd);
-- }
-- kbddev->desc=strdup(desc);
-- kbddev->device=strdup("console");
-- return devlist;
-- }
--
-- if (!fdstd) close(fd);
-- fd=open("/dev/kbd", O_RDWR);
-- if (fd < 0) {
-- /* PS/2 keyboard */
-- kbddev->desc=strdup("Generic PS/2 Keyboard");
-- } else {
-- /* Sun keyboard */
-- int kbdtype, kbdlayout, i;
-- char *desc, *desclayout = NULL;
--
-- kbddev->device=strdup("kbd");
-- desc = "Sun Type4 ";
-- if (ioctl(fd, KIOCTYPE, &kbdtype) >= 0)
-- switch (kbdtype) {
-- case 2: desc = "Sun Type2 "; break;
-- case 3: desc = "Sun Type3 "; break;
-- case 4: ioctl(fd, KIOCLAYOUT, &kbdlayout);
-- if (kbdlayout < 33)
-- desc = "Sun Type4 ";
-- else switch (kbdlayout) {
-- case 33: case 47: case 48: case 49:
-- case 80: case 94: case 95: case 96:
-- desc = "Sun Type5 "; break;
-- case 34: case 81:
-- desc = "Sun Type5 Unix "; break;
-- default:
-- desc = "Sun Type5 Euro "; break;
-- }
-- for (i = 0; sunkbd_translate[i].layout0 != -1; i++) {
-- if (sunkbd_translate[i].layout0 == kbdlayout ||
-- sunkbd_translate[i].layout1 == kbdlayout ||
-- sunkbd_translate[i].layout2 == kbdlayout)
-- break;
-- }
-- if (sunkbd_translate[i].layout0 != -1 &&
-- sunkbd_translate[i].symbols[0])
-- desclayout = sunkbd_translate[i].symbols;
-- break;
-- }
-- if (desclayout) {
-- kbddev->desc = malloc(strlen(desc) + strlen(desclayout) + 1 + strlen("Keyboard") + 1);
-- strcpy (kbddev->desc, desc);
-- strcat (kbddev->desc, desclayout);
-- strcat (kbddev->desc, " Keyboard");
-- } else {
-- kbddev->desc = malloc(strlen(desc) + strlen("Keyboard") + 1);
-- strcpy (kbddev->desc, desc);
-- strcat (kbddev->desc, "Keyboard");
-- }
-- }
-- close (fd);
-- }
--#else
- int fd;
- char twelve = 12;
- int fdstd = 0;
-@@ -311,7 +174,7 @@
- kbddev->device = strdup("ttySG0");
- }
- #endif
--#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__)
-+#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || defined(__sparc__)
- int cfd;
- struct termios cmode, mode;
-
-@@ -397,7 +260,6 @@
- kbddev->device=strdup(desc);
- }
- }
--#endif
- out:
- return devlist;
- }
diff --git a/sys-libs/libkudzu/libkudzu-1.2.57.1.ebuild b/sys-libs/libkudzu/libkudzu-1.2.57.1.ebuild
deleted file mode 100644
index e37cf4c2de6a..000000000000
--- a/sys-libs/libkudzu/libkudzu-1.2.57.1.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit eutils linux-info flag-o-matic toolchain-funcs
-
-DESCRIPTION="Red Hat Hardware detection tools"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-SRC_URI="mirror://gentoo/kudzu-${PV}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 hppa ~ia64 -mips ppc ppc64 sparc x86"
-IUSE="zlib"
-
-DEPEND="
- dev-libs/popt
- >=sys-apps/pciutils-2.2.4[zlib?]
- zlib? ( sys-libs/zlib )
-"
-RDEPEND="
- ${DEPEND}
- sys-apps/hwdata-gentoo
- !sys-apps/kudzu
-"
-
-S=${WORKDIR}/kudzu-${PV}
-
-src_prepare() {
- sed -i -e 's/-fpic/-fPIC/g' Makefile || die
-
- epatch \
- "${FILESDIR}"/kudzu-${PV}-sbusfix.patch \
- "${FILESDIR}"/kudzu-${PV}-sparc-keyboard.patch
-}
-
-src_configure() {
- if use zlib; then
- sed -i -e 's| -lpci| -lz -lpci|g' Makefile || die
- fi
- # Fix the modules directory to match Gentoo layout.
- sed -i -e 's|/etc/modutils/kudzu|/etc/modules.d/kudzu|g' *.* || die
-
- tc-export CC
-}
-
-src_compile() {
- emake \
- $( usex ppc ARCH='ppc' ARCH=$(tc-arch-kernel) ) \
- AR=$(tc-getAR) \
- RANLIB=$(tc-getRANLIB) \
- RPM_OPT_FLAGS="${CFLAGS}" \
- libkudzu.a libkudzu_loader.a
-}
-
-src_install() {
- insinto /usr/include/kudzu
- doins *.h
-
- dolib.a libkudzu.a libkudzu_loader.a
-
- keepdir /etc/sysconfig
-}
diff --git a/sys-libs/libkudzu/metadata.xml b/sys-libs/libkudzu/metadata.xml
deleted file mode 100644
index 767266dca141..000000000000
--- a/sys-libs/libkudzu/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>livecd@gentoo.org</email>
- <name>Gentoo LiveCD Project</name>
-</maintainer>
-</pkgmetadata>
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/libnih/Manifest b/sys-libs/libnih/Manifest
deleted file mode 100644
index 2b231bc8694c..000000000000
--- a/sys-libs/libnih/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libnih-1.0.3.tar.gz 1187624 BLAKE2B f8f9fcdda86eabff39de0b0f92cd1f8c1c0eeb0c86ec4970e5bef1cc0dff0fda83db64975ece93d5d8ede5d0613d5f363dd7456c59fe966feb5e61e5b8913627 SHA512 fce40d2445b28c27b8838631681ca3206a4f053b2dd4fc488fc9ef98bbd3d933e3d62b82cf346be2ef1677f6457f692cf5544cd915a6bb1e5c618f98ffa101b4
diff --git a/sys-libs/libnih/files/libnih-1.0.3-expat-2.2.5.patch b/sys-libs/libnih/files/libnih-1.0.3-expat-2.2.5.patch
deleted file mode 100644
index 02b5e4c0a9e2..000000000000
--- a/sys-libs/libnih/files/libnih-1.0.3-expat-2.2.5.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: Adapt test suite to expat 2.2.5
-Author: Axel Beckert <abe@debian.org>
-Bug-Debian: https://bugs.debian.org/886416
-
---- a/nih-dbus-tool/tests/test_parse.c
-+++ b/nih-dbus-tool/tests/test_parse.c
-@@ -7950,7 +7950,7 @@
-
- TEST_EQ_P (node, NULL);
-
-- TEST_FILE_EQ (output, ("test:foo:2:0: "
-+ TEST_FILE_EQ (output, ("test:foo:1:36: "
- "Invalid object path in <node> name attribute\n"));
- TEST_FILE_END (output);
- TEST_FILE_RESET (output);
diff --git a/sys-libs/libnih/files/libnih-1.0.3-fno-common.patch b/sys-libs/libnih/files/libnih-1.0.3-fno-common.patch
deleted file mode 100644
index 2b3a9cef5b48..000000000000
--- a/sys-libs/libnih/files/libnih-1.0.3-fno-common.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/nih-dbus-tool/output.h
-+++ b/nih-dbus-tool/output.h
-@@ -27,7 +27,7 @@
-
- NIH_BEGIN_EXTERN
-
--char *output_package;
-+extern char *output_package;
-
- int output (const char *source_path, int source_fd,
- const char *header_path, int header_fd,
diff --git a/sys-libs/libnih/files/libnih-1.0.3-glibc-2.24.patch b/sys-libs/libnih/files/libnih-1.0.3-glibc-2.24.patch
deleted file mode 100644
index 9b90f3539d7c..000000000000
--- a/sys-libs/libnih/files/libnih-1.0.3-glibc-2.24.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-With glibc >= 2.24, raise() temporarily blocks signals to make this
-function async-signal-safe. This has the consequence that the SIGCONT
-signal send by the call to PTRACE_CONT is delivered slightly later. In
-turn it means the next ptrace event received is the SIGCONT signal
-instead of the expected one.
-
-Unfortunately the libnih testsuite has very precise expectations, and
-do not expect such an event. Fix that by catching it and waiting for the
-following event.
-
---- libnih-1.0.3.orig/nih/tests/test_child.c
-+++ libnih-1.0.3/nih/tests/test_child.c
-@@ -360,6 +360,14 @@ test_poll (void)
-
- waitid (P_PID, pid, &siginfo, WSTOPPED | WNOWAIT);
-
-+ /* ptrace might catch the SIGCONT emitted with PTRACE_CONT, catch it
-+ and wait for the next event.
-+ */
-+ if (siginfo.si_code == CLD_TRAPPED && siginfo.si_status == SIGCONT) {
-+ assert0 (ptrace (PTRACE_CONT, pid, NULL, NULL));
-+ waitid (P_PID, pid, &siginfo, WSTOPPED | WNOWAIT);
-+ }
-+
- watch = nih_child_add_watch (NULL, pid, NIH_CHILD_TRAPPED,
- my_handler, &watch);
-
-@@ -420,6 +428,14 @@ test_poll (void)
- /* Wait for ptrace to stop the parent (signalling the fork) */
- waitid (P_PID, pid, &siginfo, WSTOPPED | WNOWAIT);
-
-+ /* ptrace might catch the SIGCONT emitted with PTRACE_CONT, catch it
-+ and wait for the next event.
-+ */
-+ if (siginfo.si_code == CLD_TRAPPED && siginfo.si_status == SIGCONT) {
-+ assert0 (ptrace (PTRACE_CONT, pid, NULL, NULL));
-+ waitid (P_PID, pid, &siginfo, WSTOPPED | WNOWAIT);
-+ }
-+
- /* Will be able to get the child pid now, we have to do it here
- * because we want to wait on it to ensure the test is synchronous;
- * otherwise nih_child_poll() could actually eat the child event
-@@ -489,6 +505,14 @@ test_poll (void)
-
- waitid (P_PID, pid, &siginfo, WSTOPPED | WNOWAIT);
-
-+ /* ptrace might catch the SIGCONT emitted with PTRACE_CONT, catch it
-+ and wait for the next event.
-+ */
-+ if (siginfo.si_code == CLD_TRAPPED && siginfo.si_status == SIGCONT) {
-+ assert0 (ptrace (PTRACE_CONT, pid, NULL, NULL));
-+ waitid (P_PID, pid, &siginfo, WSTOPPED | WNOWAIT);
-+ }
-+
- watch = nih_child_add_watch (NULL, pid, NIH_CHILD_PTRACE,
- my_handler, &watch);
-
diff --git a/sys-libs/libnih/files/libnih-1.0.3-optional-dbus.patch b/sys-libs/libnih/files/libnih-1.0.3-optional-dbus.patch
deleted file mode 100644
index 49ad68a07b5a..000000000000
--- a/sys-libs/libnih/files/libnih-1.0.3-optional-dbus.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -23,12 +23,21 @@
- PKG_PROG_PKG_CONFIG([0.22])
-
- # Checks for libraries.
--PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.2.16])
--AC_CHECK_LIB([expat], [XML_ParserCreate],
-+AC_ARG_WITH([dbus],
-+ [AS_HELP_STRING([--without-dbus],
-+ [disable support for dbus])],
-+ [],
-+ [with_dbus=yes])
-+
-+AS_IF([test "x$with_dbus" != xno],[
-+ PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.2.16])
-+ AC_CHECK_LIB([expat], [XML_ParserCreate],
- [AC_CHECK_LIB([expat], [XML_StopParser],
- [AC_SUBST([EXPAT_LIBS], [-lexpat])],
- [AC_MSG_ERROR([expat >= 2.0.0 required])])],
-- [AC_MSG_ERROR([expat library not found])])
-+ [AC_MSG_ERROR([expat library not found])])])
-+
-+AM_CONDITIONAL([DBUS_SUPPORT], [test "x$with_dbus" != xno])
-
- # Checks for header files.
- AC_CHECK_HEADERS([valgrind/valgrind.h])
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,6 +1,9 @@
- ## Process this file with automake to produce Makefile.in
-
--SUBDIRS = m4 intl nih nih-dbus nih-dbus-tool po
-+SUBDIRS = m4 intl nih po
-+if DBUS_SUPPORT
-+SUBDIRS += nih-dbus nih-dbus-tool
-+endif
-
- EXTRA_DIST = HACKING
-
diff --git a/sys-libs/libnih/files/libnih-1.0.3-pkg-config.patch b/sys-libs/libnih/files/libnih-1.0.3-pkg-config.patch
deleted file mode 100644
index 6516de799432..000000000000
--- a/sys-libs/libnih/files/libnih-1.0.3-pkg-config.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/nih-dbus/Makefile.am
-+++ b/nih-dbus/Makefile.am
-@@ -49,7 +49,7 @@
- test_dbus.h
-
-
--pkgconfigdir = $(prefix)/lib/pkgconfig
-+pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = libnih-dbus.pc
-
-
-
---- a/nih/Makefile.am
-+++ b/nih/Makefile.am
-@@ -71,7 +71,7 @@
- test_hash.h
-
-
--pkgconfigdir = $(prefix)/lib/pkgconfig
-+pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = libnih.pc
-
-
-
diff --git a/sys-libs/libnih/files/libnih-1.0.3-signal-race.patch b/sys-libs/libnih/files/libnih-1.0.3-signal-race.patch
deleted file mode 100644
index 364af7f5383e..000000000000
--- a/sys-libs/libnih/files/libnih-1.0.3-signal-race.patch
+++ /dev/null
@@ -1,44 +0,0 @@
---- a/nih/signal.c
-+++ b/nih/signal.c
-@@ -337,17 +337,37 @@
-
- nih_signal_init ();
-
-+ /* Since this poller runs w/out signals masked, we do not want to try
-+ * and clear any other signals (like zeroing the caught array at the
-+ * end). If we do that, we open a race:
-+ * - Walk the list of signals.
-+ * - First one is not set so we move on to the second one.
-+ * - First signal comes in while processing second and increments the
-+ * caught array entry.
-+ * - Finish walking the whole list.
-+ * - Zero out the whole list and thus throw away the first signal.
-+ * Since the signal handlers can take any length of time, this race
-+ * can be open for a variable amount of time.
-+ */
-+
- NIH_LIST_FOREACH_SAFE (nih_signals, iter) {
- NihSignal *signal = (NihSignal *)iter;
-
- if (! signals_caught[signal->signum])
- continue;
-
-+ /* Now that we know we're going to process this signal, clear
-+ * out all pending counts for it. There is a slight race here
-+ * where the same signal can come in, but the API has never
-+ * guaranteed exact coverage since POSIX does not provide it --
-+ * more than one signal can be collapsed into one event. All
-+ * we can guarantee is that we'll notice signals that come in
-+ * once the handler runs.
-+ */
-+ signals_caught[signal->signum] = 0;
-+
- signal->handler (signal->data, signal);
- }
--
-- for (s = 0; s < NUM_SIGNALS; s++)
-- signals_caught[s] = 0;
- }
-
-
-
diff --git a/sys-libs/libnih/libnih-1.0.3-r3.ebuild b/sys-libs/libnih/libnih-1.0.3-r3.ebuild
deleted file mode 100644
index 018cbe1034a5..000000000000
--- a/sys-libs/libnih/libnih-1.0.3-r3.ebuild
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit versionator eutils autotools toolchain-funcs multilib flag-o-matic usr-ldscript
-
-DESCRIPTION="Light-weight 'standard library' of C functions"
-HOMEPAGE="https://launchpad.net/libnih"
-SRC_URI="https://launchpad.net/${PN}/$(get_version_component_range 1-2)/${PV}/+download/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
-IUSE="+dbus nls static-libs +threads"
-
-# The configure phase will check for valgrind headers, and the tests will use
-# that header, but only to do dynamic valgrind detection. The tests aren't
-# run directly through valgrind, only by developers directly. So don't bother
-# depending on valgrind here. #559830
-RDEPEND="dbus? ( dev-libs/expat >=sys-apps/dbus-1.2.16 )"
-DEPEND="${RDEPEND}
- sys-devel/gettext
- virtual/pkgconfig"
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-1.0.3-optional-dbus.patch
- epatch "${FILESDIR}"/${PN}-1.0.3-pkg-config.patch
- epatch "${FILESDIR}"/${PN}-1.0.3-signal-race.patch
- eautoreconf
-}
-
-src_configure() {
- append-lfs-flags
- econf \
- $(use_with dbus) \
- $(use_enable nls) \
- $(use_enable static-libs static) \
- $(use_enable threads) \
- $(use_enable threads threading)
-}
-
-src_install() {
- default
-
- # we need to be in / because upstart needs libnih
- gen_usr_ldscript -a nih $(use dbus && echo nih-dbus)
- use static-libs || rm "${ED}"/usr/$(get_libdir)/*.la
-}
diff --git a/sys-libs/libnih/libnih-1.0.3-r4.ebuild b/sys-libs/libnih/libnih-1.0.3-r4.ebuild
deleted file mode 100644
index 03155daef1ee..000000000000
--- a/sys-libs/libnih/libnih-1.0.3-r4.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools toolchain-funcs multilib flag-o-matic usr-ldscript
-
-DESCRIPTION="Light-weight 'standard library' of C functions"
-HOMEPAGE="https://launchpad.net/libnih"
-SRC_URI="https://launchpad.net/${PN}/$(ver_cut 1-2)/${PV}/+download/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc ~x86"
-IUSE="+dbus nls static-libs +threads"
-
-# The configure phase will check for valgrind headers, and the tests will use
-# that header, but only to do dynamic valgrind detection. The tests aren't
-# run directly through valgrind, only by developers directly. So don't bother
-# depending on valgrind here. #559830
-RDEPEND="dbus? ( dev-libs/expat >=sys-apps/dbus-1.2.16 )"
-DEPEND="${RDEPEND}
- sys-devel/gettext
- virtual/pkgconfig"
-PATCHES=(
- "${FILESDIR}"/${P}-optional-dbus.patch
- "${FILESDIR}"/${P}-pkg-config.patch
- "${FILESDIR}"/${P}-signal-race.patch
- "${FILESDIR}"/${P}-fno-common.patch
- "${FILESDIR}"/${P}-expat-2.2.5.patch
- "${FILESDIR}"/${P}-glibc-2.24.patch
-)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- append-lfs-flags
- econf \
- $(use_with dbus) \
- $(use_enable nls) \
- $(use_enable static-libs static) \
- $(use_enable threads) \
- $(use_enable threads threading)
-}
-
-src_install() {
- default
-
- # we need to be in / because upstart needs libnih
- gen_usr_ldscript -a nih $(use dbus && echo nih-dbus)
- use static-libs || rm "${ED}"/usr/$(get_libdir)/*.la
-}
diff --git a/sys-libs/libnih/metadata.xml b/sys-libs/libnih/metadata.xml
deleted file mode 100644
index c029a63d0b84..000000000000
--- a/sys-libs/libnih/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="launchpad">libnih</remote-id>
- </upstream>
-</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 8ceb93829922..b5f9814a55cf 100644
--- a/sys-libs/libomp/Manifest
+++ b/sys-libs/libomp/Manifest
@@ -1,5 +1,11 @@
-DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff219888706d2b79d5296590934714e42ac79f6a6547941ac2b1d2c4e6313dd18b6c7068e748aa6ac033e49fccbf5d355aa8191 SHA512 baa182d62fef1851836013ae8a1a00861ea89769778d67fb97b407a9de664e6c85da2af9c5b3f75d2bf34ff6b00004e531ca7e4b3115a26c0e61c575cf2303a0
-DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
-DIST llvmorg-11.0.0-rc1.tar.gz 122688246 BLAKE2B 10ff3f08ff3780abb1d86ac67942e6aac52ff5daf820a2e3d23d8b79dbade1c5b1d398d0a577028d2d7c8759ab9a8b552a0305b5750310a015585c06cdadf844 SHA512 09564ed903902a5795fffaa4679badc30bf49739889a48074b5ae2c93bd29000cfb36a650208d5cae5d74899bade066f84b4aa023fc852eec246ff67bf64a267
-DIST llvmorg-11.0.0-rc2.tar.gz 122728230 BLAKE2B 7944adf41ec7cd82489666a0a38a857de628879d59a2e3bb566b67c18500092430db66ff214d45cb324128c874a74a72c367b452df3b88ec95b33c284dd35512 SHA512 25eb2879eb22e79a1e840ef24cf3f5eec602e947101db299393e06e3d09f2d1531eef214264636e1b511eafff7f51b1834d5a03976ccd088eb680745b147e9f3
-DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
+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-10.0.0.ebuild b/sys-libs/libomp/libomp-10.0.0.ebuild
deleted file mode 100644
index 3e9988c75e68..000000000000
--- a/sys-libs/libomp/libomp-10.0.0.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-inherit cmake-multilib linux-info llvm.org multiprocessing python-any-r1
-
-DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
-HOMEPAGE="https://openmp.llvm.org"
-LLVM_COMPONENTS=( openmp )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~x64-macos"
-IUSE="cuda hwloc kernel_linux 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
- )"
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-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="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
-
- -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
- -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
- )
- cmake-utils_src_configure
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
-
- cmake-utils_src_make check-libomp
-}
diff --git a/sys-libs/libomp/libomp-11.0.0.9999.ebuild b/sys-libs/libomp/libomp-11.0.0.9999.ebuild
deleted file mode 100644
index 5bffd6685f64..000000000000
--- a/sys-libs/libomp/libomp-11.0.0.9999.ebuild
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..9} )
-inherit cmake-multilib linux-info llvm.org python-any-r1
-
-DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
-HOMEPAGE="https://openmp.llvm.org"
-LLVM_COMPONENTS=( openmp )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="cuda hwloc kernel_linux 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
- )"
-
-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-11.0.0_rc1.ebuild b/sys-libs/libomp/libomp-11.0.0_rc1.ebuild
deleted file mode 100644
index 5bffd6685f64..000000000000
--- a/sys-libs/libomp/libomp-11.0.0_rc1.ebuild
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..9} )
-inherit cmake-multilib linux-info llvm.org python-any-r1
-
-DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
-HOMEPAGE="https://openmp.llvm.org"
-LLVM_COMPONENTS=( openmp )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="cuda hwloc kernel_linux 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
- )"
-
-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-11.0.0_rc2.ebuild b/sys-libs/libomp/libomp-11.0.0_rc2.ebuild
deleted file mode 100644
index 5bffd6685f64..000000000000
--- a/sys-libs/libomp/libomp-11.0.0_rc2.ebuild
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..9} )
-inherit cmake-multilib linux-info llvm.org python-any-r1
-
-DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
-HOMEPAGE="https://openmp.llvm.org"
-LLVM_COMPONENTS=( openmp )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="cuda hwloc kernel_linux 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
- )"
-
-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.0.9999.ebuild b/sys-libs/libomp/libomp-12.0.0.9999.ebuild
deleted file mode 100644
index 5bffd6685f64..000000000000
--- a/sys-libs/libomp/libomp-12.0.0.9999.ebuild
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..9} )
-inherit cmake-multilib linux-info llvm.org python-any-r1
-
-DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
-HOMEPAGE="https://openmp.llvm.org"
-LLVM_COMPONENTS=( openmp )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS=""
-IUSE="cuda hwloc kernel_linux 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
- )"
-
-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-10.0.1.ebuild b/sys-libs/libomp/libomp-15.0.7-r6.ebuild
index c5e2c2a87a89..ddef8e6ff939 100644
--- a/sys-libs/libomp/libomp-10.0.1.ebuild
+++ b/sys-libs/libomp/libomp-15.0.7-r6.ebuild
@@ -1,46 +1,58 @@
-# Copyright 1999-2020 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_{6..9} )
-inherit cmake-multilib linux-info 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"
-LLVM_COMPONENTS=( openmp )
-llvm.org_set_globals
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x64-macos"
-IUSE="cuda hwloc kernel_linux offload ompt test"
-# CUDA works only with the x86_64 ABI
-REQUIRED_USE="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="
- hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )
+ hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
offload? (
virtual/libelf:=[${MULTILIB_USEDEP}]
dev-libs/libffi:=[${MULTILIB_USEDEP}]
- cuda? ( dev-util/nvidia-cuda-toolkit:= )
- )"
+ ~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? ( virtual/pkgconfig )
+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}]')
- >=sys-devel/clang-6
- )"
+ sys-devel/clang
+ )
+"
+
+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() {
@@ -61,10 +73,17 @@ pkg_pretend() {
}
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"
+
local libdir="$(get_libdir)"
local mycmakeargs=(
-DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
@@ -79,12 +98,21 @@ multilib_src_configure() {
# 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)
- )
+
+ 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"
@@ -93,6 +121,7 @@ multilib_src_configure() {
-DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
-DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
)
+ addpredict /dev/nvidiactl
cmake_src_configure
}
diff --git a/sys-libs/libomp/libomp-16.0.6.ebuild b/sys-libs/libomp/libomp-16.0.6.ebuild
new file mode 100644
index 000000000000..82c6efffb251
--- /dev/null
+++ b/sys-libs/libomp/libomp-16.0.6.ebuild
@@ -0,0 +1,151 @@
+# 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 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/${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() {
+ 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=${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 [[ ${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"
+ -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-17.0.6.ebuild b/sys-libs/libomp/libomp-17.0.6.ebuild
new file mode 100644
index 000000000000..a2075dcce87c
--- /dev/null
+++ b/sys-libs/libomp/libomp-17.0.6.ebuild
@@ -0,0 +1,153 @@
+# 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 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/${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() {
+ 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=${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
+ 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-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-19.0.0.9999.ebuild b/sys-libs/libomp/libomp-19.0.0.9999.ebuild
new file mode 100644
index 000000000000..a40d0aed1c41
--- /dev/null
+++ b/sys-libs/libomp/libomp-19.0.0.9999.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_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/libomp-9.0.1.ebuild b/sys-libs/libomp/libomp-9.0.1.ebuild
deleted file mode 100644
index 256f61807d3a..000000000000
--- a/sys-libs/libomp/libomp-9.0.1.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-inherit cmake-multilib linux-info llvm.org multiprocessing python-any-r1
-
-DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
-HOMEPAGE="https://openmp.llvm.org"
-LLVM_COMPONENTS=( openmp )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~x64-macos"
-IUSE="cuda hwloc kernel_linux 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
- )"
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-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="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
-
- -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
- -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
- )
- cmake-utils_src_configure
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
-
- cmake-utils_src_make check-libomp
-}
diff --git a/sys-libs/libomp/metadata.xml b/sys-libs/libomp/metadata.xml
index 58df765860eb..ba8a5232a5a8 100644
--- a/sys-libs/libomp/metadata.xml
+++ b/sys-libs/libomp/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>voyageur@gentoo.org</email>
@@ -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='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>
+ <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 9f19a4298257..5800717815ea 100644
--- a/sys-libs/libosinfo/Manifest
+++ b/sys-libs/libosinfo/Manifest
@@ -1,2 +1,2 @@
-DIST libosinfo-1.6.0.tar.gz 1024787 BLAKE2B 4d0783b41f8c9ed7472c798acede0cd1f3808858ab954e838e8d7543dc50a9819d1f26b0cb02a97c8ed8ebee47db1b915aab5daadc0be2742e8f5c1ba8451a75 SHA512 53359095e40ef12e0cc142ddc92119b4a753bb47a728f13a8ff500a19108a44eb1f6ebe4ed67b04347a707dd0c0d55bcfe6815b57d187237dddd7376ebe9cf5e
-DIST libosinfo-1.8.0.tar.xz 273324 BLAKE2B 0d289df4eb1eb0f9793227b7925cfc37e253a4db0da5c420e7b058d4c060ae50a5609bd25f7d07822e0110e535561f675cf8eddbe6bce0875757f10ee30b2c22 SHA512 1d831443af9eea6a5ba1edccafcd47e56fc55e3cc43c0572044abc9c70c4eb8bbe0d95019d42bbdc3b680a2f52511863412ea9587c6eb553353b3802e94b2960
+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.8.0-r1.ebuild b/sys-libs/libosinfo/libosinfo-1.11.0.ebuild
index c2bc2665e86c..d09dfbd5915b 100644
--- a/sys-libs/libosinfo/libosinfo-1.8.0-r1.ebuild
+++ b/sys-libs/libosinfo/libosinfo-1.11.0.ebuild
@@ -1,10 +1,9 @@
-# Copyright 1999-2020 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,15 +16,15 @@ IUSE="gtk-doc +introspection +vala test"
RESTRICT="!test? ( test )"
REQUIRED_USE="vala? ( introspection )"
-KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~ppc ~ppc64 ~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/hwids[pci,usb]
+ sys-apps/hwdata
sys-apps/osinfo-db-tools
sys-apps/osinfo-db
introspection? ( >=dev-libs/gobject-introspection-1.56:= )
@@ -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,8 +59,9 @@ src_configure() {
$(meson_feature introspection enable-introspection)
$(meson_use test enable-tests)
$(meson_feature vala enable-vala)
- -Dwith-pci-ids-path=/usr/share/misc/pci.ids
- -Dwith-usb-ids-path=/usr/share/misc/usb.ids
+ -Dlibsoup-abi=3.0
+ -Dwith-pci-ids-path="${EPREFIX}"/usr/share/hwdata/pci.ids
+ -Dwith-usb-ids-path="${EPREFIX}"/usr/share/hwdata/usb.ids
)
meson_src_configure
}
diff --git a/sys-libs/libosinfo/libosinfo-1.6.0.ebuild b/sys-libs/libosinfo/libosinfo-1.6.0.ebuild
deleted file mode 100644
index a90d7a61740e..000000000000
--- a/sys-libs/libosinfo/libosinfo-1.6.0.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-VALA_USE_DEPEND="vapigen"
-
-inherit gnome2 udev vala
-
-DESCRIPTION="GObject library for managing information about real and virtual OSes"
-HOMEPAGE="https://libosinfo.org/"
-SRC_URI="https://releases.pagure.org/libosinfo/${P}.tar.gz"
-
-LICENSE="GPL-2+ LGPL-2.1+"
-SLOT="0"
-
-IUSE="+introspection +vala test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="vala? ( introspection )"
-
-KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~ppc ~ppc64 ~sparc x86"
-
-# Unsure about osinfo-db-tools rdep, but at least fedora does it too
-RDEPEND="
- >=dev-libs/glib-2.44:2
- >=dev-libs/libxml2-2.6.0
- >=dev-libs/libxslt-1.0.0
- net-libs/libsoup:2.4
- sys-apps/hwids[pci,usb]
- sys-apps/osinfo-db-tools
- sys-apps/osinfo-db
- introspection? ( >=dev-libs/gobject-introspection-0.9.7:= )
-"
-# perl dep is for pod2man, and configure.ac checks for it too now
-DEPEND="${RDEPEND}
- dev-lang/perl
- dev-libs/gobject-introspection-common
- dev-util/glib-utils
- >=dev-util/gtk-doc-am-1.10
- >=sys-devel/gettext-0.19.8
- virtual/pkgconfig
- vala? ( $(vala_depend) )
-"
-
-src_prepare() {
- gnome2_src_prepare
- use vala && vala_src_prepare
-}
-
-src_configure() {
- gnome2_src_configure \
- --with-usb-ids-path=/usr/share/misc/usb.ids \
- --with-pci-ids-path=/usr/share/misc/pci.ids \
- --disable-static \
- $(use_enable test tests) \
- $(use_enable introspection) \
- $(use_enable vala) \
- --disable-coverage
-}
diff --git a/sys-libs/libosinfo/metadata.xml b/sys-libs/libosinfo/metadata.xml
index 39980802b1da..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 "http://www.gentoo.org/dtd/metadata.dtd">
+<!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 a9b1d7c0fa3a..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-2020 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 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/libraw1394/metadata.xml b/sys-libs/libraw1394/metadata.xml
index 56c124413057..73dda144f9ac 100644
--- a/sys-libs/libraw1394/metadata.xml
+++ b/sys-libs/libraw1394/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
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/files/librtas-2.0.2-musl.patch b/sys-libs/librtas/files/librtas-2.0.2-musl.patch
new file mode 100644
index 000000000000..a0e92f17fcb1
--- /dev/null
+++ b/sys-libs/librtas/files/librtas-2.0.2-musl.patch
@@ -0,0 +1,30 @@
+From caa55523aca6997d55fc9c68ed121c2c2bccc569 Mon Sep 17 00:00:00 2001
+From: Fabian Groffen <grobian@gentoo.org>
+Date: Mon, 24 May 2021 10:06:54 +0200
+Subject: [PATCH] librtasevent: include endian.h for beXXtoh macros
+
+In particular using musl libc, without this include, the calls to
+be16toh/be32toh result in a compiler warning about an undefined symbol.
+Since in musl these are actually implemented by macros, the symbols
+remain undefined in the final shared library, making the library
+unusable.
+
+Issue: https://github.com/ibm-power-utilities/librtas/issues/10
+Signed-off-by: Fabian Groffen <grobian@gentoo.org>
+---
+ librtasevent_src/rtas_event.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/librtasevent_src/rtas_event.h b/librtasevent_src/rtas_event.h
+index ece6f1d..b38cd7a 100644
+--- a/librtasevent_src/rtas_event.h
++++ b/librtasevent_src/rtas_event.h
+@@ -23,6 +23,8 @@
+ #ifndef _H_RTAS_EVENT
+ #define _H_RTAS_EVENT
+
++#include <endian.h>
++
+ #define PRNT_FMT "%-20s%08x"
+ #define PRNT_FMT_L PRNT_FMT" "
+ #define PRNT_FMT_R PRNT_FMT"\n"
diff --git a/sys-libs/librtas/librtas-2.0.2-r2.ebuild b/sys-libs/librtas/librtas-2.0.2-r2.ebuild
new file mode 100644
index 000000000000..f43d44b267f5
--- /dev/null
+++ b/sys-libs/librtas/librtas-2.0.2-r2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+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"
+
+PATCHES=( "${FILESDIR}"/${P}-musl.patch )
+
+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/librtas-2.0.2.ebuild b/sys-libs/librtas/librtas-2.0.2.ebuild
deleted file mode 100644
index ab22e30e38a5..000000000000
--- a/sys-libs/librtas/librtas-2.0.2.ebuild
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools eutils
-
-DESCRIPTION="A set of libraries for userspace access to RTAS on the PowerPC platform(s)"
-HOMEPAGE="https://github.com/ibm-power-utilities/librtas"
-SRC_URI="https://github.com/ibm-power-utilities/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS="ppc ppc64"
-IUSE=""
-
-DOCS="README"
-
-src_prepare() {
- eapply_user
-
- eautoreconf
-}
diff --git a/sys-libs/librtas/librtas-2.0.2-r1.ebuild b/sys-libs/librtas/librtas-2.0.3.ebuild
index c6a20531dabb..0e6e2879eed3 100644
--- a/sys-libs/librtas/librtas-2.0.2-r1.ebuild
+++ b/sys-libs/librtas/librtas-2.0.3.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit autotools
DESCRIPTION="A set of libraries for userspace access to RTAS on the PowerPC platform(s)"
@@ -10,7 +10,7 @@ SRC_URI="https://github.com/ibm-power-utilities/${PN}/archive/v${PV}.tar.gz -> $
LICENSE="LGPL-2.1+"
SLOT="0"
-KEYWORDS="~ppc ~ppc64"
+KEYWORDS="ppc ppc64 ~ppc64-linux"
IUSE="static-libs"
src_prepare() {
@@ -23,6 +23,10 @@ src_configure() {
}
src_install() {
- emake DESTDIR="${D}" install docdir=/usr/share/doc/${PF}
+ 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 7971ce089c64..b93ca6387bf1 100644
--- a/sys-libs/librtas/metadata.xml
+++ b/sys-libs/librtas/metadata.xml
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>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 87aea1370f33..4140907f66f9 100644
--- a/sys-libs/libseccomp/Manifest
+++ b/sys-libs/libseccomp/Manifest
@@ -1,3 +1,3 @@
-DIST libseccomp-2.4.3.tar.gz 598147 BLAKE2B 272c9f1ca7e4059790f633a79cae8612831aa483d28630fb85b31dc2be0192907a8897819d835b61324e0b3fb0d77b8781e2a85e9750ef8d7974d8680b8cdea3 SHA512 7b7af2e98493243ffe1934fefff5723b24ae9b9bdc4bf039343ee8456c15acb0ea34e81ec292a41143848272aeca794ef92ad38fc3f42c77465170cb540479ef
-DIST libseccomp-2.4.4.tar.gz 604420 BLAKE2B 04a2e22996d94f2525c1f4a890f325e7c75abb7ac84928a1ffde5e4cc569ef6355fcda8415e0c9937139e187f458602714cfd042008de74637c7bf30e9bd58e2 SHA512 53e5aa338a1c30ce826551e33be6ef877af43b1d8cfd2e1b6ffb70789eb2070d2610fb7cb5cec4a3a4c4a1221767f867f3d2bc07b6b1d9742719b1e053630b24
-DIST libseccomp-2.5.0.tar.gz 638793 BLAKE2B c1f30624e210d632175b734c49411ee3f95e8f0ee68819ad83a342434231baef10c292f23fca0127394365a37efb043f9f24ade9534deecd61f50e7111a6fbc8 SHA512 00ef5aeb4db8dafb546ae680b2d6d9b6aeed008df805d0f28f9dd15c074ff6ea7a5e5131ab503825b8011c59aa23046baedd5849ca040aa73352f43ab2d602ae
+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.3-skip-valgrind.patch b/sys-libs/libseccomp/files/libseccomp-2.5.3-skip-valgrind.patch
new file mode 100644
index 000000000000..baf3ed971fc9
--- /dev/null
+++ b/sys-libs/libseccomp/files/libseccomp-2.5.3-skip-valgrind.patch
@@ -0,0 +1,13 @@
+Valgrind isn't supported on all arches (and indeed profiles for older types
+of some arches) so let's just skip the automagic Valgrind dependency entirely.
+--- a/tests/regression
++++ b/tests/regression
+@@ -876,7 +876,7 @@ function run_test() {
+ run_test_bpf_sim_fuzz "$1" $2 "$3"
+ elif [[ "$4" == "bpf-valgrind" ]]; then
+ # only run this test if valgrind is installed
+- if check_deps valgrind; then
++ if false; then
+ run_test_bpf_valgrind "$testnumstr" "$3"
+ else
+ print_result $testnumstr "SKIPPED" \
diff --git a/sys-libs/libseccomp/files/libseccomp-2.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/files/libseccomp-python-shared.patch b/sys-libs/libseccomp/files/libseccomp-python-shared.patch
new file mode 100644
index 000000000000..93e1ec8a9156
--- /dev/null
+++ b/sys-libs/libseccomp/files/libseccomp-python-shared.patch
@@ -0,0 +1,25 @@
+From 763b863c3028f604f16cc6d2de7452dc16458596 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sun, 23 May 2021 16:17:32 -0400
+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 0419111..fb650d0 100755
+--- a/src/python/setup.py
++++ b/src/python/setup.py
+@@ -41,7 +41,7 @@ setup(
+ ext_modules = [
+ Extension("seccomp", ["seccomp.pyx"],
+ # unable to handle libtool libraries directly
+- extra_objects=["../.libs/libseccomp.a"],
++ extra_objects=["../.libs/libseccomp.so"],
+ # fix build warnings, see PEP 3123
+ extra_compile_args=["-fno-strict-aliasing"])
+ ]
+--
+2.32.0.rc1
+
diff --git a/sys-libs/libseccomp/libseccomp-2.4.3.ebuild b/sys-libs/libseccomp/libseccomp-2.4.3.ebuild
deleted file mode 100644
index fb7d1492bd88..000000000000
--- a/sys-libs/libseccomp/libseccomp-2.4.3.ebuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# TODO: Add python support.
-
-EAPI=7
-
-inherit multilib-minimal
-
-DESCRIPTION="high level interface to Linux seccomp filter"
-HOMEPAGE="https://github.com/seccomp/libseccomp"
-SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="-* amd64 arm arm64 hppa ~mips ppc ppc64 s390 x86 ~amd64-linux ~x86-linux"
-IUSE="static-libs"
-
-# 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=">=sys-kernel/linux-headers-4.3"
-
-src_prepare() {
- default
- sed -i \
- -e '/_LDFLAGS/s:-static::' \
- tools/Makefile.in || die
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- $(use_enable static-libs static)
- --disable-python
- )
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install_all() {
- find "${ED}" -type f -name "${PN}.la" -delete || die
- einstalldocs
-}
diff --git a/sys-libs/libseccomp/libseccomp-2.4.4.ebuild b/sys-libs/libseccomp/libseccomp-2.4.4.ebuild
deleted file mode 100644
index 5224cb3571a8..000000000000
--- a/sys-libs/libseccomp/libseccomp-2.4.4.ebuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# TODO: Add python support.
-
-EAPI=7
-
-inherit multilib-minimal
-
-DESCRIPTION="high level interface to Linux seccomp filter"
-HOMEPAGE="https://github.com/seccomp/libseccomp"
-SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="-* ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux"
-IUSE="static-libs"
-
-# 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=">=sys-kernel/linux-headers-4.3"
-
-src_prepare() {
- default
- sed -i \
- -e '/_LDFLAGS/s:-static::' \
- tools/Makefile.in || die
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- $(use_enable static-libs static)
- --disable-python
- )
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install_all() {
- find "${ED}" -type f -name "${PN}.la" -delete || die
- einstalldocs
-}
diff --git a/sys-libs/libseccomp/libseccomp-2.5.0.ebuild b/sys-libs/libseccomp/libseccomp-2.5.0.ebuild
deleted file mode 100644
index 1375d590f41a..000000000000
--- a/sys-libs/libseccomp/libseccomp-2.5.0.ebuild
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..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}
- )"
-
-BDEPEND="
- dev-util/gperf
- python? ( ${PYTHON_DEPS} )
-"
-DEPEND="${BDEPEND}"
-RDEPEND="${DEPEND}"
-
-# 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.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.5.ebuild b/sys-libs/libseccomp/libseccomp-2.5.5.ebuild
new file mode 100644
index 000000000000..a7ba7a3f25c0
--- /dev/null
+++ b/sys-libs/libseccomp/libseccomp-2.5.5.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{10..11} )
+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
+ 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="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
+ 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() {
+ if use experimental-loong; then
+ PATCHES+=( "${WORKDIR}/${PN}-2.5.5-loongarch64-20231204.patch" )
+ fi
+
+ default
+
+ 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
+ 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-9999.ebuild b/sys-libs/libseccomp/libseccomp-9999.ebuild
index 1375d590f41a..ac4df4483838 100644
--- a/sys-libs/libseccomp/libseccomp-9999.ebuild
+++ b/sys-libs/libseccomp/libseccomp-9999.ebuild
@@ -1,14 +1,16 @@
-# Copyright 1999-2020 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_{6..9} )
+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,34 +19,42 @@ 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"
+IUSE="python static-libs test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-REQUIRED_USE="
- python? (
- static-libs
- ${PYTHON_REQUIRED_USE}
- )"
-
-BDEPEND="
- dev-util/gperf
+# 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} )
"
-DEPEND="${BDEPEND}"
RDEPEND="${DEPEND}"
+BDEPEND="
+ ${DEPEND}
+ dev-util/gperf
+ 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"
+PATCHES=(
+ "${FILESDIR}"/libseccomp-2.6.0-python-shared.patch
+ "${FILESDIR}"/libseccomp-2.5.3-skip-valgrind.patch
+)
src_prepare() {
default
- if [[ "${PV}" == *9999 ]] ; then
- sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac
+
+ if [[ ${PV} == *9999 ]] ; then
+ sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac || die
+
eautoreconf
fi
}
@@ -54,6 +64,7 @@ multilib_src_configure() {
$(use_enable static-libs static)
--disable-python
)
+
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
@@ -61,12 +72,18 @@ 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"
+ # 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
}
@@ -74,12 +91,12 @@ 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/metadata.xml b/sys-libs/libseccomp/metadata.xml
index 03ce6dc6c4b9..72ee48a1f860 100644
--- a/sys-libs/libseccomp/metadata.xml
+++ b/sys-libs/libseccomp/metadata.xml
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>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 90c22e8e0d20..3dedaef745f7 100644
--- a/sys-libs/libselinux/Manifest
+++ b/sys-libs/libselinux/Manifest
@@ -1,3 +1,2 @@
-DIST libselinux-2.9.tar.gz 211546 BLAKE2B 5b06b922690e48924865c98ed34ebfc1ce5e30e78dbeaccb6b9c931a35bed113c030f8f8575084429fe13b91aeafc73abaa24fe609a17ba54c8472d783f6ac61 SHA512 727b211d09f374d45aa3fa4dec7fd5463dfdcf5aaa47f7fcaccee51fb74896c3aa1a6f0bac9cdd47ebe4929effff13f66f5f70447b27b783dca5f7b1576d30d0
-DIST libselinux-3.0.tar.gz 212096 BLAKE2B 7502c77243928adfc445f55357b0e894087859c3a83e2beb446c31818362d10111c3e52b970150638c055f96cccca6fccde79440026201a2a48bfda3565c27d3 SHA512 6fd8c3711e25cb1363232e484268609b71d823975537b3863e403836222eba026abce8ca198f64dba6f4c1ea4deb7ecef68a0397b9656a67b363e4d74409cd95
-DIST libselinux-3.1.tar.gz 204703 BLAKE2B 72ff2d99dd6640405e804f58bdfbf05e152615ea92f902b3942602af13dc17080afeabb942ed33ae6b3f528870f4b11584e533848e455a97bf8f7151a8d44646 SHA512 57730cddd2d4751556d9e1f207c0f85119c81848f0620c16239e997150989e3f9a586a8c23861fd51ed89f7e084ad441190a58a288258a49a95f7beef7dbbb13
+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/files/0001-libselinux-Use-Python-distutils-to-install-SELinux-p.patch b/sys-libs/libselinux/files/0001-libselinux-Use-Python-distutils-to-install-SELinux-p.patch
deleted file mode 100644
index 896876a00d6b..000000000000
--- a/sys-libs/libselinux/files/0001-libselinux-Use-Python-distutils-to-install-SELinux-p.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-From 2efa06857575e4118e91ca250b6b92da68b130d5 Mon Sep 17 00:00:00 2001
-From: Petr Lautrbach <plautrba@redhat.com>
-Date: Fri, 7 Jun 2019 17:35:44 +0200
-Subject: [PATCH] libselinux: Use Python distutils to install SELinux python
- bindings
-
-Follow officially documented way how to build C extension modules using
-distutils - https://docs.python.org/3.8/extending/building.html#building
-
-Fixes:
-
-- selinux python module fails to load when it's built using SWIG-4.0:
-
->>> import selinux
-Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "/usr/lib64/python3.7/site-packages/selinux/__init__.py", line 13, in <module>
- from . import _selinux
-ImportError: cannot import name '_selinux' from 'selinux' (/usr/lib64/python3.7/site-packages/selinux/__init__.py)
-
-SWIG-4.0 changed (again?) its behavior so that it uses: from . import _selinux
-which looks for _selinux module in the same directory as where __init__.py is -
-$(PYLIBDIR)/site-packages/selinux. But _selinux module is installed into
-$(PYLIBDIR)/site-packages/ since a9604c30a5e2f ("libselinux: Change the location
-of _selinux.so").
-
-- audit2why python module fails to build with Python 3.8
-
-cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DOVERRIDE_GETTID=0 -I../include -D_GNU_SOURCE -DDISABLE_RPM -DNO_ANDROID_BACKEND -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L. -shared -o python-3.8audit2why.so python-3.8audit2why.lo -lselinux -l:libsepol.a -Wl,-soname,audit2why.so,--version-script=audit2why.map,-z,defs
-/usr/bin/ld: python-3.8audit2why.lo: in function `finish':
-/builddir/build/BUILD/libselinux-2.9/src/audit2why.c:166: undefined reference to `PyArg_ParseTuple'
-/usr/bin/ld: python-3.8audit2why.lo: in function `_Py_INCREF':
-/usr/include/python3.8/object.h:449: undefined reference to `_Py_NoneStruct'
-/usr/bin/ld: /usr/include/python3.8/object.h:449: undefined reference to `_Py_NoneStruct'
-/usr/bin/ld: python-3.8audit2why.lo: in function `check_booleans':
-/builddir/build/BUILD/libselinux-2.9/src/audit2why.c:84: undefined reference to `PyExc_RuntimeError'
-...
-
-It's related to the following Python change
-https://docs.python.org/dev/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build
-
-Python distutils adds correct link options automatically.
-
-- selinux python module doesn't provide any Python metadata
-
-When selinux python module was built manually, it didn't provide any metadata.
-distutils takes care about that so that selinux Python module is visible for
-pip:
-
-$ pip3 list | grep selinux
-selinux 2.9
-
-Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
----
- libselinux/src/.gitignore | 2 +-
- libselinux/src/Makefile | 36 ++++++++----------------------------
- libselinux/src/setup.py | 24 ++++++++++++++++++++++++
- 3 files changed, 33 insertions(+), 29 deletions(-)
- create mode 100644 libselinux/src/setup.py
-
-diff --git libselinux/src/.gitignore libselinux/src/.gitignore
-index 4dcc3b3b..428afe5a 100644
---- libselinux/src/.gitignore
-+++ libselinux/src/.gitignore
-@@ -1,4 +1,4 @@
- selinux.py
--selinuxswig_wrap.c
-+selinuxswig_python_wrap.c
- selinuxswig_python_exception.i
- selinuxswig_ruby_wrap.c
-diff --git libselinux/src/Makefile libselinux/src/Makefile
-index e9ed0383..2b1696a0 100644
---- libselinux/src/Makefile
-+++ libselinux/src/Makefile
-@@ -36,7 +36,7 @@ TARGET=libselinux.so
- LIBPC=libselinux.pc
- SWIGIF= selinuxswig_python.i selinuxswig_python_exception.i
- SWIGRUBYIF= selinuxswig_ruby.i
--SWIGCOUT= selinuxswig_wrap.c
-+SWIGCOUT= selinuxswig_python_wrap.c
- SWIGPYOUT= selinux.py
- SWIGRUBYCOUT= selinuxswig_ruby_wrap.c
- SWIGLOBJ:= $(patsubst %.c,$(PYPREFIX)%.lo,$(SWIGCOUT))
-@@ -55,7 +55,7 @@ ifeq ($(LIBSEPOLA),)
- LDLIBS_LIBSEPOLA := -l:libsepol.a
- endif
-
--GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) selinuxswig_python_exception.i
-+GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) $(SWIGCOUT) selinuxswig_python_exception.i
- SRCS= $(filter-out $(GENERATED) audit2why.c, $(sort $(wildcard *.c)))
-
- MAX_STACK_SIZE=32768
-@@ -125,25 +125,18 @@ DISABLE_FLAGS+= -DNO_ANDROID_BACKEND
- SRCS:= $(filter-out label_backends_android.c, $(SRCS))
- endif
-
--SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./ $(DISABLE_FLAGS)
--
- SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS)
-
- all: $(LIBA) $(LIBSO) $(LIBPC)
-
--pywrap: all $(SWIGFILES) $(AUDIT2WHYSO)
-+pywrap: all selinuxswig_python_exception.i
-+ CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext -I $(DESTDIR)$(INCLUDEDIR) -L $(DESTDIR)$(LIBDIR)
-
- rubywrap: all $(SWIGRUBYSO)
-
--$(SWIGLOBJ): $(SWIGCOUT)
-- $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(PYINC) -fPIC -DSHARED -c -o $@ $<
--
- $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT)
- $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
-
--$(SWIGSO): $(SWIGLOBJ)
-- $(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $< -lselinux $(PYLIBS)
--
- $(SWIGRUBYSO): $(SWIGRUBYLOBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(RUBYLIBS)
-
-@@ -161,29 +154,15 @@ $(LIBPC): $(LIBPC).in ../VERSION
- selinuxswig_python_exception.i: ../include/selinux/selinux.h
- bash -e exception.sh > $@ || (rm -f $@ ; false)
-
--$(AUDIT2WHYLOBJ): audit2why.c
-- $(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $<
--
--$(AUDIT2WHYSO): $(AUDIT2WHYLOBJ) $(LIBSEPOLA)
-- $(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(LDLIBS_LIBSEPOLA) $(PYLIBS) -Wl,-soname,audit2why.so,--version-script=audit2why.map,-z,defs
--
- %.o: %.c policy.h
- $(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
-
- %.lo: %.c policy.h
- $(CC) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
-
--$(SWIGCOUT): $(SWIGIF)
-- $(SWIG) $<
--
--$(SWIGPYOUT): $(SWIGCOUT)
--
- $(SWIGRUBYCOUT): $(SWIGRUBYIF)
- $(SWIGRUBY) $<
-
--swigify: $(SWIGIF)
-- $(SWIG) $<
--
- install: all
- test -d $(DESTDIR)$(LIBDIR) || install -m 755 -d $(DESTDIR)$(LIBDIR)
- install -m 644 $(LIBA) $(DESTDIR)$(LIBDIR)
-@@ -194,10 +173,9 @@ install: all
- ln -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET)
-
- install-pywrap: pywrap
-- test -d $(DESTDIR)$(PYTHONLIBDIR)/selinux || install -m 755 -d $(DESTDIR)$(PYTHONLIBDIR)/selinux
-- install -m 755 $(SWIGSO) $(DESTDIR)$(PYTHONLIBDIR)/_selinux$(PYCEXT)
-- install -m 755 $(AUDIT2WHYSO) $(DESTDIR)$(PYTHONLIBDIR)/selinux/audit2why$(PYCEXT)
-+ $(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
- install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py
-+ ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux$(PYCEXT) $(DESTDIR)$(PYTHONLIBDIR)/_selinux$(PYCEXT)
-
- install-rubywrap: rubywrap
- test -d $(DESTDIR)$(RUBYINSTALL) || install -m 755 -d $(DESTDIR)$(RUBYINSTALL)
-@@ -208,6 +186,8 @@ relabel:
-
- clean-pywrap:
- -rm -f $(SWIGLOBJ) $(SWIGSO) $(AUDIT2WHYLOBJ) $(AUDIT2WHYSO)
-+ $(PYTHON) setup.py clean
-+ -rm -rf build *~ \#* *pyc .#*
-
- clean-rubywrap:
- -rm -f $(SWIGRUBYLOBJ) $(SWIGRUBYSO)
-diff --git libselinux/src/setup.py libselinux/src/setup.py
-new file mode 100644
-index 00000000..4dc03f55
---- /dev/null
-+++ libselinux/src/setup.py
-@@ -0,0 +1,24 @@
-+#!/usr/bin/python3
-+
-+from distutils.core import Extension, setup
-+
-+setup(
-+ name="selinux",
-+ version="2.9",
-+ description="SELinux python 3 bindings",
-+ author="SELinux Project",
-+ author_email="selinux@vger.kernel.org",
-+ ext_modules=[
-+ Extension('selinux._selinux',
-+ sources=['selinuxswig_python.i'],
-+ include_dirs=['../include'],
-+ library_dirs=['.'],
-+ libraries=['selinux']),
-+ Extension('selinux.audit2why',
-+ sources=['audit2why.c'],
-+ include_dirs=['../include'],
-+ library_dirs=['.'],
-+ libraries=['selinux'],
-+ extra_link_args=['-l:libsepol.a', '-Wl,--version-script=audit2why.map'])
-+ ],
-+)
---
-2.21.0
-
diff --git a/sys-libs/libselinux/libselinux-2.9-r1.ebuild b/sys-libs/libselinux/libselinux-2.9-r1.ebuild
deleted file mode 100644
index e418cecf3c1f..000000000000
--- a/sys-libs/libselinux/libselinux-2.9-r1.ebuild
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-PYTHON_COMPAT=( python3_6 python3_7 python3_8 )
-USE_RUBY="ruby24 ruby25"
-
-# No, I am not calling ruby-ng
-inherit multilib python-r1 toolchain-funcs multilib-minimal
-
-MY_P="${P//_/-}"
-SEPOL_VER="${PV}"
-MY_RELEASEDATE="20190315"
-
-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_ruby24 ruby_targets_ruby25"
-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_ruby24? ( dev-lang/ruby:2.4 )
- ruby_targets_ruby25? ( dev-lang/ruby:2.5 )
- )
- elibc_musl? ( sys-libs/fts-standalone )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- python? ( >=dev-lang/swig-2.0.9 )
- ruby? ( >=dev-lang/swig-2.0.9 )"
-PATCHES=(
- "${FILESDIR}/0001-libselinux-Use-Python-distutils-to-install-SELinux-p.patch"
-)
-
-src_prepare() {
- default
-
- 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.1.ebuild b/sys-libs/libselinux/libselinux-3.5-r1.ebuild
index 2f2a870f2d6c..dc0b5af229be 100644
--- a/sys-libs/libselinux/libselinux-3.1.ebuild
+++ b/sys-libs/libselinux/libselinux-3.5-r1.ebuild
@@ -1,48 +1,49 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-PYTHON_COMPAT=( python3_{6..9} )
-USE_RUBY="ruby25 ruby26 ruby27"
+PYTHON_COMPAT=( python3_{10..12} )
+USE_RUBY="ruby30 ruby31 ruby32"
# No, I am not calling ruby-ng
-inherit multilib python-r1 toolchain-funcs multilib-minimal
+inherit flag-o-matic python-r1 toolchain-funcs multilib-minimal
-MY_P="${P//_/-}"
-SEPOL_VER="${PV}"
-MY_RELEASEDATE="20200710"
+MY_PV="${PV//_/-}"
+MY_P="${PN}-${MY_PV}"
DESCRIPTION="SELinux userland library"
HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-if [[ ${PV} == 9999 ]] ; then
+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="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-${SEPOL_VER}:=[${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}
- virtual/pkgconfig
- python? ( >=dev-lang/swig-2.0.9 )
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+ python? (
+ >=dev-lang/swig-2.0.9
+ dev-python/pip[${PYTHON_USEDEP}]
+ )
ruby? ( >=dev-lang/swig-2.0.9 )"
src_prepare() {
@@ -54,11 +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
@@ -68,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
}
@@ -85,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
}
@@ -101,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
@@ -109,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
}
@@ -125,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
@@ -142,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.0.ebuild b/sys-libs/libselinux/libselinux-3.6-r1.ebuild
index c8e582b74e9b..002a1bf64a54 100644
--- a/sys-libs/libselinux/libselinux-3.0.ebuild
+++ b/sys-libs/libselinux/libselinux-3.6-r1.ebuild
@@ -1,48 +1,49 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
-PYTHON_COMPAT=( python3_{6..9} )
-USE_RUBY="ruby24 ruby25 ruby26"
+EAPI="7"
+PYTHON_COMPAT=( python3_{10..12} )
+USE_RUBY="ruby31 ruby32 ruby33"
# No, I am not calling ruby-ng
-inherit multilib python-r1 toolchain-funcs multilib-minimal
+inherit flag-o-matic python-r1 toolchain-funcs multilib-minimal
-MY_P="${P//_/-}"
-SEPOL_VER="${PV}"
-MY_RELEASEDATE="20191204"
+MY_PV="${PV//_/-}"
+MY_P="${PN}-${MY_PV}"
DESCRIPTION="SELinux userland library"
HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-if [[ ${PV} == 9999 ]] ; then
+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="public-domain"
SLOT="0"
-IUSE="pcre2 python ruby static-libs ruby_targets_ruby24 ruby_targets_ruby25 ruby_targets_ruby26"
+IUSE="python ruby static-libs ruby_targets_ruby31 ruby_targets_ruby32 ruby_targets_ruby33"
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}] )
+RDEPEND="dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}]
+ >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
python? ( ${PYTHON_DEPS} )
ruby? (
- ruby_targets_ruby24? ( dev-lang/ruby:2.4 )
- ruby_targets_ruby25? ( dev-lang/ruby:2.5 )
- ruby_targets_ruby26? ( dev-lang/ruby:2.6 )
+ 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}
- virtual/pkgconfig
- python? ( >=dev-lang/swig-2.0.9 )
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+ python? (
+ >=dev-lang/swig-2.0.9
+ dev-python/pip[${PYTHON_USEDEP}]
+)
ruby? ( >=dev-lang/swig-2.0.9 )"
src_prepare() {
@@ -54,11 +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
@@ -68,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
}
@@ -85,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
}
@@ -101,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
@@ -109,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
}
@@ -125,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
@@ -142,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 2f2a870f2d6c..204faee972bf 100644
--- a/sys-libs/libselinux/libselinux-9999.ebuild
+++ b/sys-libs/libselinux/libselinux-9999.ebuild
@@ -1,48 +1,49 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-PYTHON_COMPAT=( python3_{6..9} )
-USE_RUBY="ruby25 ruby26 ruby27"
+PYTHON_COMPAT=( python3_{10..12} )
+USE_RUBY="ruby31 ruby32 ruby33"
# No, I am not calling ruby-ng
-inherit multilib python-r1 toolchain-funcs multilib-minimal
+inherit flag-o-matic python-r1 toolchain-funcs multilib-minimal
-MY_P="${P//_/-}"
-SEPOL_VER="${PV}"
-MY_RELEASEDATE="20200710"
+MY_PV="${PV//_/-}"
+MY_P="${PN}-${MY_PV}"
DESCRIPTION="SELinux userland library"
HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-if [[ ${PV} == 9999 ]] ; then
+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="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-${SEPOL_VER}:=[${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}
- virtual/pkgconfig
- python? ( >=dev-lang/swig-2.0.9 )
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+ python? (
+ >=dev-lang/swig-2.0.9
+ dev-python/pip[${PYTHON_USEDEP}]
+)
ruby? ( >=dev-lang/swig-2.0.9 )"
src_prepare() {
@@ -54,11 +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
@@ -68,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
}
@@ -85,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
}
@@ -101,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
@@ -109,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
}
@@ -125,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
@@ -142,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 92059a54b96d..dfd7bb04e0a4 100644
--- a/sys-libs/libselinux/metadata.xml
+++ b/sys-libs/libselinux/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>selinux@gentoo.org</email>
@@ -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 1231fb64b805..a3f9dcc60c04 100644
--- a/sys-libs/libsemanage/Manifest
+++ b/sys-libs/libsemanage/Manifest
@@ -1,3 +1,3 @@
-DIST libsemanage-2.9.tar.gz 157690 BLAKE2B 98a7800a4f4a5b6eeaad8be9870a49bc697cec6cd053cb44bcd618d22146ed1adc32b432667f8fd245ac073a458e048894cbaf68903b79577bc8596b1c255f56 SHA512 ea2924e8ce97d376519d40d499145b3db413cf9cc1eb995ed338b95c131e043d8c43b87b2012cee2bb6354a6e3161ebf5ce4a1200278d3ecd4294b43d177a5c2
-DIST libsemanage-3.0.tar.gz 180745 BLAKE2B a7e7f0c98e365fcc132e2e66de736db29b46599be2da227dbf1384110a607120f141975b859e55073f734e3ff533bdf90b7bbefd79f7bc5857bbb0722a75ad4e SHA512 f960e1bd6815d3c9f000efa7ae717bc7937e742af5a7fea4aa865cf1aee49486e34897d83dbdb9cf77975a09a5ad77e5512d47690a74512a468a89432b72a42c
-DIST libsemanage-3.1.tar.gz 179601 BLAKE2B 69450a4eda1f3728d339f65db1eec9940995fcea5208d17dca531ebc998aefbfec48fe91beffa3490e1502953aa550405fb696635d01b0eb8050c8f00f11106a SHA512 8609ca7d13b5c603677740f2b14558fea3922624af182d20d618237ba11fcf2559fab82fc68d1efa6ff118f064d426f005138521652c761de92cd66150102197
+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.0.ebuild b/sys-libs/libsemanage/libsemanage-3.0.ebuild
deleted file mode 100644
index 09d82c6ba64a..000000000000
--- a/sys-libs/libsemanage/libsemanage-3.0.ebuild
+++ /dev/null
@@ -1,135 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-PYTHON_COMPAT=( python{3_6,3_7,3_8} )
-
-inherit multilib python-r1 toolchain-funcs multilib-minimal
-
-MY_P="${P//_/-}"
-MY_RELEASEDATE="20191204"
-
-SEPOL_VER="${PV}"
-SELNX_VER="${PV}"
-
-DESCRIPTION="SELinux kernel and policy management library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${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"
-IUSE="python"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}[${MULTILIB_USEDEP}]
- >=sys-libs/libselinux-${SELNX_VER}[${MULTILIB_USEDEP}]
- >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}]
- >=dev-libs/ustr-1.0.4-r2[${MULTILIB_USEDEP}]
- python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
- sys-devel/bison
- sys-devel/flex
- python? (
- >=dev-lang/swig-2.0.4-r1
- virtual/pkgconfig
- )"
-
-# tests are not meant to be run outside of the
-# full SELinux userland repo
-RESTRICT="test"
-
-src_prepare() {
- eapply_user
-
- echo >> "${S}/src/semanage.conf"
- echo "# Set this to true to save the linked policy." >> "${S}/src/semanage.conf"
- echo "# This is normally only useful for analysis" >> "${S}/src/semanage.conf"
- echo "# or debugging of policy." >> "${S}/src/semanage.conf"
- echo "save-linked=false" >> "${S}/src/semanage.conf"
- echo >> "${S}/src/semanage.conf"
- echo "# Set this to 0 to disable assertion checking." >> "${S}/src/semanage.conf"
- echo "# This should speed up building the kernel policy" >> "${S}/src/semanage.conf"
- echo "# from policy modules, but may leave you open to" >> "${S}/src/semanage.conf"
- echo "# dangerous rules which assertion checking" >> "${S}/src/semanage.conf"
- echo "# would catch." >> "${S}/src/semanage.conf"
- echo "expand-check=1" >> "${S}/src/semanage.conf"
- echo >> "${S}/src/semanage.conf"
- echo "# Modules in the module store can be compressed" >> "${S}/src/semanage.conf"
- echo "# with bzip2. Set this to the bzip2 blocksize" >> "${S}/src/semanage.conf"
- echo "# 1-9 when compressing. The higher the number," >> "${S}/src/semanage.conf"
- echo "# the more memory is traded off for disk space." >> "${S}/src/semanage.conf"
- echo "# Set to 0 to disable bzip2 compression." >> "${S}/src/semanage.conf"
- echo "bzip-blocksize=0" >> "${S}/src/semanage.conf"
- echo >> "${S}/src/semanage.conf"
- echo "# Reduce memory usage for bzip2 compression and" >> "${S}/src/semanage.conf"
- echo "# decompression of modules in the module store." >> "${S}/src/semanage.conf"
- echo "bzip-small=true" >> "${S}/src/semanage.conf"
-
- multilib_copy_sources
-}
-
-multilib_src_compile() {
- emake \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- all
-
- if multilib_is_native_abi && use python; then
- building_py() {
- emake \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- "$@"
- }
- python_foreach_impl building_py swigify
- python_foreach_impl building_py pywrap
- fi
-}
-
-multilib_src_install() {
- emake \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- DESTDIR="${ED}" install
-
- if multilib_is_native_abi && use python; then
- installation_py() {
- emake DESTDIR="${ED}" \
- LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
- install-pywrap
- python_optimize # bug 531638
- }
- python_foreach_impl installation_py
- fi
-}
-
-pkg_postinst() {
- # Migrate the SELinux semanage configuration store if not done already
- local selinuxtype=$(awk -F'=' '/SELINUXTYPE=/ {print $2}' "${EROOT}"/etc/selinux/config 2>/dev/null)
- if [ -n "${selinuxtype}" ] && [ ! -d "${EROOT}"/var/lib/selinux/${selinuxtype}/active ] ; then
- ewarn "Since the 2.4 SELinux userspace, the policy module store is moved"
- ewarn "from /etc/selinux to /var/lib/selinux. The migration will be run now."
- ewarn "If there are any issues, it can be done manually by running:"
- ewarn "/usr/libexec/selinux/semanage_migrate_store"
- ewarn "For more information, please see"
- ewarn "- https://github.com/SELinuxProject/selinux/wiki/Policy-Store-Migration"
- fi
-
- # Run the store migration without rebuilds
- for POLICY_TYPE in ${POLICY_TYPES} ; do
- if [ ! -d "${EROOT}/var/lib/selinux/${POLICY_TYPE}/active" ] ; then
- einfo "Migrating store ${POLICY_TYPE} (without policy rebuild)."
- "${EROOT}/usr/libexec/selinux/semanage_migrate_store" -n -s "${POLICY_TYPE}" || ewarn "Failed to migrate store ${POLICY_TYPE}"
- fi
- done
-}
diff --git a/sys-libs/libsemanage/libsemanage-3.1.ebuild b/sys-libs/libsemanage/libsemanage-3.4-r1.ebuild
index f41d7dffde0a..42c8c982f7d2 100644
--- a/sys-libs/libsemanage/libsemanage-3.1.ebuild
+++ b/sys-libs/libsemanage/libsemanage-3.4-r1.ebuild
@@ -1,16 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
-PYTHON_COMPAT=( python{3_6,3_7,3_8} )
+EAPI=7
+PYTHON_COMPAT=( python3_{9..11} )
-inherit multilib python-r1 toolchain-funcs multilib-minimal
+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,27 +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"
-IUSE=""
+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}]
- >=dev-libs/ustr-1.0.4-r2[${MULTILIB_USEDEP}]
${PYTHON_DEPS}"
-DEPEND="${RDEPEND}
- >=dev-lang/swig-2.0.4-r1
- sys-devel/bison
- sys-devel/flex
+DEPEND="${RDEPEND}"
+BDEPEND=">=dev-lang/swig-2.0.4-r1
+ app-alternatives/yacc
+ app-alternatives/lex
virtual/pkgconfig"
# tests are not meant to be run outside of the
@@ -76,6 +72,8 @@ src_prepare() {
}
multilib_src_compile() {
+ local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
+
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
@@ -87,6 +85,7 @@ multilib_src_compile() {
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
"$@"
}
@@ -104,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.0-r1.ebuild b/sys-libs/libsemanage/libsemanage-3.5.ebuild
index dcff5645ff97..42c8c982f7d2 100644
--- a/sys-libs/libsemanage/libsemanage-3.0-r1.ebuild
+++ b/sys-libs/libsemanage/libsemanage-3.5.ebuild
@@ -1,16 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
-PYTHON_COMPAT=( python{3_6,3_7,3_8} )
+EAPI=7
+PYTHON_COMPAT=( python3_{9..11} )
-inherit multilib python-r1 toolchain-funcs multilib-minimal
+inherit python-r1 toolchain-funcs multilib-minimal
-MY_P="${P//_/-}"
-MY_RELEASEDATE="20191204"
-
-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,27 +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"
-IUSE=""
+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}]
- >=dev-libs/ustr-1.0.4-r2[${MULTILIB_USEDEP}]
${PYTHON_DEPS}"
-DEPEND="${RDEPEND}
- >=dev-lang/swig-2.0.4-r1
- sys-devel/bison
- sys-devel/flex
+DEPEND="${RDEPEND}"
+BDEPEND=">=dev-lang/swig-2.0.4-r1
+ app-alternatives/yacc
+ app-alternatives/lex
virtual/pkgconfig"
# tests are not meant to be run outside of the
@@ -76,6 +72,8 @@ src_prepare() {
}
multilib_src_compile() {
+ local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
+
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
@@ -87,6 +85,7 @@ multilib_src_compile() {
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
"$@"
}
@@ -104,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
}
@@ -127,12 +127,4 @@ pkg_postinst() {
ewarn "For more information, please see"
ewarn "- https://github.com/SELinuxProject/selinux/wiki/Policy-Store-Migration"
fi
-
- # Run the store migration without rebuilds
- for POLICY_TYPE in ${POLICY_TYPES} ; do
- if [ ! -d "${EROOT}/var/lib/selinux/${POLICY_TYPE}/active" ] ; then
- einfo "Migrating store ${POLICY_TYPE} (without policy rebuild)."
- "${EROOT}/usr/libexec/selinux/semanage_migrate_store" -n -s "${POLICY_TYPE}" || die "Failed to migrate store ${POLICY_TYPE}"
- fi
- done
}
diff --git a/sys-libs/libsemanage/libsemanage-2.9.ebuild b/sys-libs/libsemanage/libsemanage-3.6.ebuild
index 194834f7856c..94a270075a5b 100644
--- a/sys-libs/libsemanage/libsemanage-2.9.ebuild
+++ b/sys-libs/libsemanage/libsemanage-3.6.ebuild
@@ -1,16 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
-PYTHON_COMPAT=( python3_6 )
+EAPI=7
+PYTHON_COMPAT=( python3_{10..11} )
-inherit multilib python-r1 toolchain-funcs multilib-minimal
+inherit python-r1 toolchain-funcs multilib-minimal
-MY_P="${P//_/-}"
-MY_RELEASEDATE="20190315"
-
-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,30 +15,27 @@ 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"
-IUSE="python"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+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}]
- >=dev-libs/ustr-1.0.4-r2[${MULTILIB_USEDEP}]
- python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
- sys-devel/bison
- sys-devel/flex
- python? (
- >=dev-lang/swig-2.0.4-r1
- virtual/pkgconfig
- )"
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+BDEPEND=">=dev-lang/swig-2.0.4-r1
+ app-alternatives/yacc
+ app-alternatives/lex
+ virtual/pkgconfig"
# tests are not meant to be run outside of the
# full SELinux userland repo
@@ -78,17 +72,20 @@ src_prepare() {
}
multilib_src_compile() {
+ local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
+
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
all
- if multilib_is_native_abi && use python; then
+ if multilib_is_native_abi; then
building_py() {
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
"$@"
}
@@ -102,10 +99,11 @@ multilib_src_install() {
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
DESTDIR="${ED}" install
- if multilib_is_native_abi && use python; then
+ if multilib_is_native_abi; then
installation_py() {
emake DESTDIR="${ED}" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
install-pywrap
python_optimize # bug 531638
}
@@ -113,6 +111,11 @@ multilib_src_install() {
fi
}
+multiib_src_install_all() {
+ python_setup
+ python_fix_shebang "${ED}"/usr/libexec/selinux/semanage_migrate_store
+}
+
pkg_postinst() {
# Migrate the SELinux semanage configuration store if not done already
local selinuxtype=$(awk -F'=' '/SELINUXTYPE=/ {print $2}' "${EROOT}"/etc/selinux/config 2>/dev/null)
@@ -124,12 +127,4 @@ pkg_postinst() {
ewarn "For more information, please see"
ewarn "- https://github.com/SELinuxProject/selinux/wiki/Policy-Store-Migration"
fi
-
- # Run the store migration without rebuilds
- for POLICY_TYPE in ${POLICY_TYPES} ; do
- if [ ! -d "${EROOT}/var/lib/selinux/${POLICY_TYPE}/active" ] ; then
- einfo "Migrating store ${POLICY_TYPE} (without policy rebuild)."
- "${EROOT}/usr/libexec/selinux/semanage_migrate_store" -n -s "${POLICY_TYPE}" || die "Failed to migrate store ${POLICY_TYPE}"
- fi
- done
}
diff --git a/sys-libs/libsemanage/libsemanage-9999.ebuild b/sys-libs/libsemanage/libsemanage-9999.ebuild
index f41d7dffde0a..eb127413897f 100644
--- a/sys-libs/libsemanage/libsemanage-9999.ebuild
+++ b/sys-libs/libsemanage/libsemanage-9999.ebuild
@@ -1,16 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
-PYTHON_COMPAT=( python{3_6,3_7,3_8} )
+EAPI=7
+PYTHON_COMPAT=( python3_{10..11} )
-inherit multilib python-r1 toolchain-funcs multilib-minimal
+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,27 +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"
-IUSE=""
+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}]
- >=dev-libs/ustr-1.0.4-r2[${MULTILIB_USEDEP}]
${PYTHON_DEPS}"
-DEPEND="${RDEPEND}
- >=dev-lang/swig-2.0.4-r1
- sys-devel/bison
- sys-devel/flex
+DEPEND="${RDEPEND}"
+BDEPEND=">=dev-lang/swig-2.0.4-r1
+ app-alternatives/yacc
+ app-alternatives/lex
virtual/pkgconfig"
# tests are not meant to be run outside of the
@@ -76,6 +72,8 @@ src_prepare() {
}
multilib_src_compile() {
+ local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
+
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
@@ -87,6 +85,7 @@ multilib_src_compile() {
emake \
AR="$(tc-getAR)" \
CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
"$@"
}
@@ -104,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 9a9681c39bd3..6de2a0cea852 100644
--- a/sys-libs/libsemanage/metadata.xml
+++ b/sys-libs/libsemanage/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>selinux@gentoo.org</email>
@@ -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 07eedac7d743..aeb3b703de01 100644
--- a/sys-libs/libsepol/Manifest
+++ b/sys-libs/libsepol/Manifest
@@ -1,3 +1,2 @@
-DIST libsepol-2.9.tar.gz 474861 BLAKE2B 2d0941a003bbe6f15f047e3e55ce4561c36fb4946ce46b618df1b884881579cd192a0ac7cbedfb67ae5e926ab03ca35988d2a4fc279f31a88c83874e85862d13 SHA512 415af623c2b2898d98828c9bf0b12cf05d05790d2b412cad291f0759a8c3feacf1bd88c2ba6f2f1bca8f9f71e1627e9d5b1b69d60e7ef96fdd52df8a3d57d3e9
-DIST libsepol-3.0.tar.gz 473864 BLAKE2B ff4da6e12c1635de88a2aaba26bd3630576a3806543d7176d8fbdb4deda5c9c5fbf8a5a4f68c8041cca0af97429e720d908cd31052d13ac72780bc85db1f56c8 SHA512 82a5bae0afd9ae53b55ddcfc9f6dd61724a55e45aef1d9cd0122d1814adf2abe63c816a7ac63b64b401f5c67acb910dd8e0574eec546bed04da7842ab6c3bb55
-DIST libsepol-3.1.tar.gz 473842 BLAKE2B ef1d596c4d53cc0a87e899ef4aeb5bf29c9d6b8303632ddc866c100d30debd8aedd0e8b38cb4ce3141b80421cd914148ff072e492d63dc2dacf03ac2ce59ca5a SHA512 4b5f4e82853ff3e9b4fac2dbdea5c2fc3bb7b508af912217ac4b75da6540fbcd77aa314ab95cd9dfa94fbc4a885000656a663c1a152f65b4cf6970ea0b6034ab
+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.0.ebuild b/sys-libs/libsepol/libsepol-3.0.ebuild
deleted file mode 100644
index 91881924e6a8..000000000000
--- a/sys-libs/libsepol/libsepol-3.0.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit multilib toolchain-funcs multilib-minimal
-
-MY_P="${P//_/-}"
-MY_RELEASEDATE="20191204"
-
-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"
-IUSE=""
-
-DEPEND=""
-RDEPEND=""
-
-# 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-2.9.ebuild b/sys-libs/libsepol/libsepol-3.5.ebuild
index 6ce341e348ec..16ea268dc5c0 100644
--- a/sys-libs/libsepol/libsepol-2.9.ebuild
+++ b/sys-libs/libsepol/libsepol-3.5.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI="7"
-inherit multilib toolchain-funcs multilib-minimal
+inherit toolchain-funcs multilib-minimal
-MY_P="${P//_/-}"
-MY_RELEASEDATE="20190315"
+MY_PV="${PV//_/-}"
+MY_P="${PN}-${MY_PV}"
DESCRIPTION="SELinux binary policy representation library"
HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
@@ -14,19 +14,15 @@ 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"
-IUSE=""
-
-DEPEND=""
-RDEPEND=""
+SLOT="0/2"
# tests are not meant to be run outside of the full SELinux userland repo
RESTRICT="test"
@@ -38,6 +34,9 @@ src_prepare() {
multilib_src_compile() {
tc-export CC AR RANLIB
+
+ local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
+
emake \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
SHLIBDIR="/$(get_libdir)"
diff --git a/sys-libs/libsepol/libsepol-3.1.ebuild b/sys-libs/libsepol/libsepol-3.6.ebuild
index 5b122e23e551..27b0f0542d4c 100644
--- a/sys-libs/libsepol/libsepol-3.1.ebuild
+++ b/sys-libs/libsepol/libsepol-3.6.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-inherit multilib toolchain-funcs multilib-minimal
+inherit toolchain-funcs multilib-minimal
-MY_P="${P//_/-}"
-MY_RELEASEDATE="20200710"
+MY_PV="${PV//_/-}"
+MY_P="${PN}-${MY_PV}"
DESCRIPTION="SELinux binary policy representation library"
HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
@@ -14,19 +14,15 @@ 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"
-IUSE=""
-
-DEPEND=""
-RDEPEND=""
+SLOT="0/2"
# tests are not meant to be run outside of the full SELinux userland repo
RESTRICT="test"
@@ -39,8 +35,7 @@ src_prepare() {
multilib_src_compile() {
tc-export CC AR RANLIB
- # https://bugs.gentoo.org/706730
- local -x CFLAGS="${CFLAGS} -fcommon"
+ local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
emake \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
diff --git a/sys-libs/libsepol/libsepol-9999.ebuild b/sys-libs/libsepol/libsepol-9999.ebuild
index 5b122e23e551..17fe4da89451 100644
--- a/sys-libs/libsepol/libsepol-9999.ebuild
+++ b/sys-libs/libsepol/libsepol-9999.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-inherit multilib toolchain-funcs multilib-minimal
+inherit toolchain-funcs multilib-minimal
-MY_P="${P//_/-}"
-MY_RELEASEDATE="20200710"
+MY_PV="${PV//_/-}"
+MY_P="${PN}-${MY_PV}"
DESCRIPTION="SELinux binary policy representation library"
HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
@@ -14,19 +14,15 @@ 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"
-IUSE=""
-
-DEPEND=""
-RDEPEND=""
+SLOT="0/2"
# tests are not meant to be run outside of the full SELinux userland repo
RESTRICT="test"
@@ -39,8 +35,7 @@ src_prepare() {
multilib_src_compile() {
tc-export CC AR RANLIB
- # https://bugs.gentoo.org/706730
- local -x CFLAGS="${CFLAGS} -fcommon"
+ local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
emake \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
diff --git a/sys-libs/libsepol/metadata.xml b/sys-libs/libsepol/metadata.xml
index 5adbcb6f6f16..6a8cf19d6762 100644
--- a/sys-libs/libsepol/metadata.xml
+++ b/sys-libs/libsepol/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>selinux@gentoo.org</email>
diff --git a/sys-libs/libservicelog/Manifest b/sys-libs/libservicelog/Manifest
index 5f2acdb512cd..e9dc2b072bff 100644
--- a/sys-libs/libservicelog/Manifest
+++ b/sys-libs/libservicelog/Manifest
@@ -1 +1,2 @@
DIST libservicelog-1.1.18.tar.gz 453645 BLAKE2B bacbd3c24d97a563cc3d51872dd349780416914c8f300ba63cf43b666e18f3fc7693556ecfbb21cbb2d66e14ac2d26259f0a587a21cc70ad660626838fd4281f SHA512 a9c4a8c778c257cf9df3d35652d707ef5ff1df1bf40484a7c23bd547127d2eb0f3465ae524e2c4ab3cd67946431ed98ec876e8b4332b5f27df2e927309fd05f2
+DIST libservicelog-1.1.19.tar.gz 90198 BLAKE2B 1abeb831fe2103c19e8e7d2969c9749d7aa7f77ee87b2423b11ca13c717c9d026df60a9cd9c7067e484b4b6cf890ab1d3db1aba6c1071c0dc2583d350dad61e2 SHA512 71ecd7ef59a30fff6336621d279d33520d2d772445af0382609cbe4f311dbe31f35b4e03b3cfe918a9793b065400e0004188f5a5635a0ff71e62cd4d2e78ad66
diff --git a/sys-libs/libservicelog/libservicelog-1.1.19.ebuild b/sys-libs/libservicelog/libservicelog-1.1.19.ebuild
new file mode 100644
index 000000000000..8d3fc3d75d9c
--- /dev/null
+++ b/sys-libs/libservicelog/libservicelog-1.1.19.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Provides a library for logging service-related events"
+SRC_URI="https://github.com/power-ras/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="https://github.com/power-ras/libservicelog"
+
+SLOT="0"
+LICENSE="GPL-2+"
+KEYWORDS="~ppc ~ppc64"
+IUSE="static-libs"
+
+DEPEND="
+ dev-db/sqlite:=
+ sys-libs/librtas
+"
+RDEPEND="
+ ${DEPEND}
+ virtual/logger
+"
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-static
+}
+
+src_install() {
+ local DOCS=( ChangeLog README )
+ default
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/sys-libs/libservicelog/metadata.xml b/sys-libs/libservicelog/metadata.xml
index 2b8aee36a4fc..31d9727cfc8e 100644
--- a/sys-libs/libservicelog/metadata.xml
+++ b/sys-libs/libservicelog/metadata.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>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-avoid_bashisms.patch b/sys-libs/libsmbios/files/libsmbios-2.4.3-avoid_bashisms.patch
new file mode 100644
index 000000000000..eb26ba8dca43
--- /dev/null
+++ b/sys-libs/libsmbios/files/libsmbios-2.4.3-avoid_bashisms.patch
@@ -0,0 +1,84 @@
+From 97b4bdc042c48001132200828fe32c08cf9265e7 Mon Sep 17 00:00:00 2001
+From: Joe Dight <17280110+joedight@users.noreply.github.com>
+Date: Fri, 27 Nov 2020 20:14:24 +0000
+Subject: [PATCH 1/2] Fix configure.ac bashism
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index e14ec4a..6db254f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -116,7 +116,7 @@ AC_PROG_INSTALL
+
+ dnl Check for python support
+ AM_CONDITIONAL([HAVE_PYTHON], [false])
+-if test x$wantpython == xyes ; then
++if test x$wantpython = xyes ; then
+ AM_PATH_PYTHON([3.0],,[:])
+ AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
+ fi
+--
+2.30.0
+
+
+From fb7585222503c48f35270ee148ad3fef762a7502 Mon Sep 17 00:00:00 2001
+From: Kerin Millar <kfm@plushkava.net>
+Date: Mon, 4 Jan 2021 00:57:29 +0100
+Subject: [PATCH 2/2] Don't rely on support for indirect expansion in the shell
+
+POSIX does not define the indirect expansion syntax. Moreover, if going
+to the trouble of executing Perl, one may as well take full advantage of
+it. Address the issue by first having the shell export the variable.
+Next, have Perl perform the replacement without utilising any form of
+code injection. Instead, export 'var' into Perl's environment. That
+way, Perl can reference the variable name as $ENV{var} and its value as
+$ENV{$ENV{var}}.
+
+Signed-off-by: Kerin Millar <kfm@plushkava.net>
+Closes: https://bugs.gentoo.org/715202
+Closes: https://github.com/dell/libsmbios/issues/89
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ Makefile-std | 4 ++--
+ src/python/Makefile.am | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile-std b/Makefile-std
+index 7ac6fa2..dd30d68 100644
+--- a/Makefile-std
++++ b/Makefile-std
+@@ -38,7 +38,7 @@ install-data-hook:
+ file=$(DESTDIR)/$$i ;\
+ for var in $(REPLACE_VARS) ;\
+ do \
+- perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $$file;\
++ var="$$var" perl -p -i -e 's|^\Q$$ENV{var}\E\s*=.*|$$ENV{var}="$$ENV{$$ENV{var}}"|' $$file;\
+ done ;\
+ done
+
+@@ -48,7 +48,7 @@ install-exec-hook:
+ file=$(DESTDIR)/$$i ;\
+ for var in $(REPLACE_VARS) ;\
+ do \
+- perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $$file;\
++ var="$$var" perl -p -i -e 's|^\Q$$ENV{var}\E\s*=.*|$$ENV{var}="$$ENV{$$ENV{var}}"|' $$file;\
+ done ;\
+ done
+
+diff --git a/src/python/Makefile.am b/src/python/Makefile.am
+index 693b6d9..6aca968 100644
+--- a/src/python/Makefile.am
++++ b/src/python/Makefile.am
+@@ -29,5 +29,5 @@ src/python/_vars.py: src/python/libsmbios_c/_vars.py configure Makefile config.
+ cp $< $@
+ for var in $(REPLACE_VARS) ;\
+ do \
+- perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $@;\
++ var="$$var" perl -p -i -e 's|^\Q$$ENV{var}\E\s*=.*|$$ENV{var}="$$ENV{$$ENV{var}}"|' $@;\
+ done
+--
+2.30.0
+
diff --git a/sys-libs/libsmbios/files/libsmbios-2.4.3-insecure_rpaths.patch b/sys-libs/libsmbios/files/libsmbios-2.4.3-insecure_rpaths.patch
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 f19e11df65a4..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-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
+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 ~ia64 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,17 +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() {
@@ -43,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
}
@@ -63,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 5da9415b6118..b131555971d7 100644
--- a/sys-libs/libsmbios/metadata.xml
+++ b/sys-libs/libsmbios/metadata.xml
@@ -1,14 +1,16 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<?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>
- <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 01a4f85a8e77..5b68a24ad6cf 100644
--- a/sys-libs/libstatgrab/Manifest
+++ b/sys-libs/libstatgrab/Manifest
@@ -1 +1,2 @@
-DIST libstatgrab-0.91.tar.gz 776046 BLAKE2B 29906d4df8b8e8f1ae8fedf5ccac12b282b5cba66715a2d1b51059426e7cb073862e49cbee535c0f9ea7a34171cbc3d143a38a92149ffe5f22ed9ec426fec0be SHA512 f360f2e1b185bf9603b1d9c50649b0050e9502128ff81a9f4de88457e2f5203deafe7fd7ac13ebc4cc56e6ecd1bdf8aacae64987bdf36af0c9929e30626915f6
+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/files/libstatgrab-0.91-tinfo.patch b/sys-libs/libstatgrab/files/libstatgrab-0.91-tinfo.patch
deleted file mode 100644
index b0eb94cbcd8e..000000000000
--- a/sys-libs/libstatgrab/files/libstatgrab-0.91-tinfo.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- a/m4/ax_ncurses.m4
-+++ b/m4/ax_ncurses.m4
-@@ -12,24 +12,31 @@
-
- AS_IF([test "x$with_ncurses" != "xno"], [
- AC_CACHE_CHECK([for working ncurses], mp_cv_ncurses, [
-- LIBS="$mp_save_LIBS $SAIDARLIBS -lncurses"
-+ LIBS="$mp_save_LIBS $SAIDARLIBS -lncurses -ltinfo"
- CPPFLAGS="$mp_save_CPPFLAGS $SAIDARCPPFLAGS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <ncurses.h>], [testcode])], [
- mp_cv_ncurses="ncurses.h"
-- CURSES_LIB="-lncurses"
-+ CURSES_LIB="-lncurses -ltinfo"
- ], [
- LIBS="$mp_save_LIBS $SAIDARLIBS -lncurses"
- CPPFLAGS="$mp_save_CPPFLAGS $SAIDARCPPFLAGS"
-- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <ncurses/ncurses.h>], [testcode])], [
-- mp_cv_ncurses="ncurses/ncurses.h"
-+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <ncurses.h>], [testcode])], [
-+ mp_cv_ncurses="ncurses.h"
- CURSES_LIB="-lncurses"
- ], [
-- LIBS="$mp_save_LIBS $SAIDARLIBS -lcurses"
-+ LIBS="$mp_save_LIBS $SAIDARLIBS -lncurses"
- CPPFLAGS="$mp_save_CPPFLAGS $SAIDARCPPFLAGS"
-- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <curses.h>], [testcode])], [
-- mp_cv_ncurses="curses.h"
-- CURSES_LIB="-lcurses"
-- ], [mp_cv_ncurses=no])
-+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <ncurses/ncurses.h>], [testcode])], [
-+ mp_cv_ncurses="ncurses/ncurses.h"
-+ CURSES_LIB="-lncurses"
-+ ], [
-+ LIBS="$mp_save_LIBS $SAIDARLIBS -lcurses"
-+ CPPFLAGS="$mp_save_CPPFLAGS $SAIDARCPPFLAGS"
-+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <curses.h>], [testcode])], [
-+ mp_cv_ncurses="curses.h"
-+ CURSES_LIB="-lcurses"
-+ ], [mp_cv_ncurses=no])
-+ ])
- ])
- ])
- ])
diff --git a/sys-libs/libstatgrab/libstatgrab-0.91.ebuild b/sys-libs/libstatgrab/libstatgrab-0.92.1.ebuild
index 2e211e2a49ee..759fb6778a53 100644
--- a/sys-libs/libstatgrab/libstatgrab-0.91.ebuild
+++ b/sys-libs/libstatgrab/libstatgrab-0.92.1.ebuild
@@ -1,42 +1,43 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-
-AUTOTOOLS_AUTORECONF=frob
-inherit autotools-utils
+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 ppc x86"
-IUSE="doc examples static-libs"
+SLOT="0"
+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 )
-PATCHES=( "${FILESDIR}"/${P}-tinfo.patch )
-
src_configure() {
local myeconfargs=(
--disable-setgid-binaries
--disable-setuid-binaries
--with-ncurses
- $(use_enable static-libs static)
+ --disable-static
+ $(use_enable test tests)
)
- autotools-utils_src_configure
+
+ econf "${myeconfargs[@]}"
}
src_install() {
- autotools-utils_src_install
+ default
+
if use examples; then
docompress -x /usr/share/doc/${PF}/examples
- insinto /usr/share/doc/${PF}/examples
- doins -r 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
new file mode 100644
index 000000000000..bfaaf511ec56
--- /dev/null
+++ b/sys-libs/libstatgrab/libstatgrab-0.92.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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/metadata.xml b/sys-libs/libstatgrab/metadata.xml
index 6f49eba8f496..ca431a12697b 100644
--- a/sys-libs/libstatgrab/metadata.xml
+++ b/sys-libs/libstatgrab/metadata.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<!-- maintainer-needed -->
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="github">libstatgrab/libstatgrab</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/libstdc++-v3/Manifest b/sys-libs/libstdc++-v3/Manifest
index 816a3df55a05..614374a5e9d0 100644
--- a/sys-libs/libstdc++-v3/Manifest
+++ b/sys-libs/libstdc++-v3/Manifest
@@ -1,2 +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-r2.ebuild b/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r4.ebuild
index 7540af559883..7c20c6524879 100644
--- a/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r2.ebuild
+++ b/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r4.ebuild
@@ -1,24 +1,26 @@
-# 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 eutils flag-o-matic libtool multilib
+inherit flag-o-matic libtool multilib toolchain-funcs
-PATCH_VER="1.10"
+PATCH_VER="4"
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"
+ https://dev.gentoo.org/~sam/distfiles/gcc-${PV}-patches-${PATCH_VER}.tar.bz2"
LICENSE="GPL-2 LGPL-2.1"
SLOT="5"
KEYWORDS="~amd64 ~x86"
IUSE="multilib nls"
-DEPEND="sys-devel/bison"
-RDEPEND=""
+RDEPEND="sys-libs/zlib"
+DEPEND="
+ ${RDEPEND}
+ app-alternatives/yacc"
transform_known_flags() {
declare setting
@@ -44,7 +46,7 @@ is_arch_allowed() {
athlon-mp"
for proc in ${i386_processor_table} ; do
- [ "${proc}" == "${1}" ] && return 0
+ [[ "${proc}" == "${1}" ]] && return 0
done
mips_processor_table="mips1 mips2 mips3 mips4 mips32 mips64 r3000 r2000 \
@@ -52,7 +54,7 @@ is_arch_allowed() {
r4650 r8000 vr5000 vr5400 vr5500 4kc 4kp 5kc 20kc sr71000 sb1"
for proc in ${mips_processor_table} ; do
- [ "${proc}" == "${1}" ] && return 0
+ [[ "${proc}" == "${1}" ]] && return 0
done
rs6000_processor_table="common power power2 power3 power4 powerpc \
@@ -61,7 +63,7 @@ is_arch_allowed() {
860"
for proc in ${rs6000_processor_table} ; do
- [ "${proc}" == "${1}" ] && return 0
+ [[ "${proc}" == "${1}" ]] && return 0
done
return 1
@@ -76,22 +78,22 @@ do_filter_flags() {
# gcc 3.3 doesn't support -mtune on numerous archs, so xgcc will fail
setting="`get-flag mtune`"
- [ ! -z "${setting}" ] && filter-flags -mtune="${setting}"
+ [[ ! -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}"
+ [[ ! -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
+ if [[ ! -z "${setting}" ]] ; then
is_arch_allowed "${setting}" || filter-flags -march="${setting}"
fi
setting="`get-flag mcpu`"
- if [ ! -z "${setting}" ] ; then
+ if [[ ! -z "${setting}" ]] ; then
is_arch_allowed "${setting}" || filter-flags -mcpu="${setting}"
fi
@@ -134,7 +136,7 @@ do_filter_flags() {
S=${WORKDIR}/gcc-${PV}
src_prepare() {
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ eapply "${WORKDIR}"/patch/*.patch
default
@@ -149,6 +151,8 @@ src_prepare() {
"${S}"/gcc/config/i386/t-linux64 \
|| die "sed failed!"
fi
+
+ tc-export AR CC RANLIB NM
}
src_configure() {
@@ -173,12 +177,17 @@ src_configure() {
}
src_compile() {
- emake -C "${WORKDIR}"/build all-target-libstdc++-v3
+ 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
diff --git a/sys-libs/libstdc++-v3/metadata.xml b/sys-libs/libstdc++-v3/metadata.xml
index e396f3755977..5a1e1dee65db 100644
--- a/sys-libs/libstdc++-v3/metadata.xml
+++ b/sys-libs/libstdc++-v3/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>toolchain@gentoo.org</email>
diff --git a/sys-libs/libtermcap-compat/Manifest b/sys-libs/libtermcap-compat/Manifest
index aef10aad2339..915bc120cea3 100644
--- a/sys-libs/libtermcap-compat/Manifest
+++ b/sys-libs/libtermcap-compat/Manifest
@@ -1,3 +1,3 @@
-DIST termcap-2.0.8-patches-2.tar.bz2 11589 BLAKE2B 8fec4befa009a8dd53fd949435eba30a06523cf731ec35a7565608dd0fbcddcbb01b56c94815a79851e0e7afd75d31475cde682c0d419b86cb4750ec9a543bed SHA512 24d871007191a051dca604635f6d4e2dec67b675c2c9a0c728a0458a6a501ac268f5d4c4203356a6f64e718edba5c8ec970276c244435a25bef11c6fba0e837d
+DIST termcap-2.0.8-patches-2.tar.xz 11116 BLAKE2B 537342e45333f0373754eb5390ef1c37369531f32e2ecc4004809c800c172d370690a232b3cbd0c3ef90f977a456d97ac306e55a42e13244a0c47f4973ad94a1 SHA512 0261a9c21385578507e5c8e8f7064879904ba2b0d1ff9dce90d77ed2ad5e0c7fc49880ddc4fbc77df70f425a3fe4765bbac827824d4b59e99d77374ab4183d0f
DIST termcap-2.0.8.tar.bz2 211523 BLAKE2B 4ea7c4cdc26be4e1262a8e75e125b4349c75976c297c2389e034635d2d5324275486525fe93fd8628e8a5cd0980c7e97eba55f5a05d6b3b537337b2fb55cf2cd SHA512 1aca52f5bcda60933229143085416296fed1aa981bae4440f30424f1e2bd9d90e9836f05c5a5a53af77d20dbb1d2425bf2b7c5fa2952258e2b4a2a5babaddaad
DIST termtypes.tc.gz 228329 BLAKE2B 988b91c6c3c624963e078b424f24b26eb37fe32ca34b0ece0ca4ddf734ee1513f399a4f584f41a92c6ef2edb64144c13820677b419e58b4bfaf0e0fa2c5686a7 SHA512 13a2ee2cd0bc349d69af7efb8e8122f655b67f4bcbe0dc5cbf8a9ba22649548086a097de8bc148fb71ceba1640434a6b94763410beb3b915e03c3a6b46e8a678
diff --git a/sys-libs/libtermcap-compat/libtermcap-compat-2.0.8-r4.ebuild b/sys-libs/libtermcap-compat/libtermcap-compat-2.0.8-r4.ebuild
index e10548a47190..a11fc69bc9a9 100644
--- a/sys-libs/libtermcap-compat/libtermcap-compat-2.0.8-r4.ebuild
+++ b/sys-libs/libtermcap-compat/libtermcap-compat-2.0.8-r4.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# we only want this for binary-only packages, so we will only be installing
+# We only want this for binary-only packages, so we will only be installing
# the lib used at runtime; no headers and no files to link against
-EAPI="5"
+EAPI=7
-inherit eutils multilib toolchain-funcs multilib-minimal
+inherit toolchain-funcs multilib-minimal
PATCHVER="2"
@@ -15,23 +15,41 @@ DESCRIPTION="Compatibility package for old termcap-based programs"
HOMEPAGE="http://www.catb.org/~esr/terminfo/"
SRC_URI="http://www.catb.org/~esr/terminfo/termtypes.tc.gz
mirror://gentoo/${MY_P}.tar.bz2
- mirror://gentoo/${MY_P}-patches-${PATCHVER}.tar.bz2"
+ https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_P}-patches-${PATCHVER}.tar.xz"
+S="${WORKDIR}"/${MY_P}
LICENSE="GPL-2 LGPL-2 BSD"
SLOT="0"
-KEYWORDS="~alpha amd64 ~arm hppa ppc sparc x86"
-IUSE=""
+KEYWORDS="~alpha amd64 ~arm ~hppa ppc sparc x86"
-S=${WORKDIR}/${MY_P}
+PATCHES=(
+ # Gentoo patchset
+ "${WORKDIR}"/patch/002_all_termcap-setuid.patch
+ "${WORKDIR}"/patch/003_all_termcap-inst-no-root.patch
+ "${WORKDIR}"/patch/004_all_termcap-compat-glibc21.patch
+ "${WORKDIR}"/patch/005_all_termcap-xref.patch
+ "${WORKDIR}"/patch/006_all_termcap-fix-tc.patch
+ "${WORKDIR}"/patch/007_all_termcap-ignore-p.patch
+ "${WORKDIR}"/patch/008_all_termcap-buffer.patch
+ "${WORKDIR}"/patch/009_all_termcap-bufsize--needs-011.patch
+ "${WORKDIR}"/patch/010_all_termcap-colon.patch
+ "${WORKDIR}"/patch/011_all_termcap-AAARGH.patch
+ "${WORKDIR}"/patch/012_all_libtermcap-compat-2.0.8-fPIC.patch
+ "${WORKDIR}"/patch/013_all_libtermcap-compat_bcopy_fix.patch
+ "${WORKDIR}"/patch/014_all_libtermcap-build-settings.patch
+ "${WORKDIR}"/patch/015_all_libtermcap-only-shared-lib.patch
+ # termcap
+ "${WORKDIR}"/patch/tc.file/001_all_termcap-linuxlat.patch
+ "${WORKDIR}"/patch/tc.file/002_all_termcap-xtermchanges.patch
+ "${WORKDIR}"/patch/tc.file/003_all_termcap-utf8.patch
+ "${WORKDIR}"/patch/tc.file/004_all_termcap-xterm-X11R6.patch
+ "${WORKDIR}"/patch/tc.file/005_all_termcap-Eterm.patch
+)
src_prepare() {
- EPATCH_SOURCE="${WORKDIR}/patch"
- EPATCH_SUFFIX="patch"
- epatch "${EPATCH_SOURCE}"
+ mv "${WORKDIR}"/termtypes.tc "${S}"/termcap || die
- cd "${WORKDIR}"
- mv termtypes.tc termcap || die
- epatch "${EPATCH_SOURCE}"/tc.file
+ default
multilib_copy_sources
}
@@ -47,7 +65,7 @@ multilib_src_install() {
multilib_src_install_all() {
insinto /etc
- doins "${WORKDIR}"/termcap
+ doins "${S}"/termcap
dodoc ChangeLog README
}
diff --git a/sys-libs/libtermcap-compat/metadata.xml b/sys-libs/libtermcap-compat/metadata.xml
index 56c124413057..73dda144f9ac 100644
--- a/sys-libs/libtermcap-compat/metadata.xml
+++ b/sys-libs/libtermcap-compat/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
diff --git a/sys-libs/libucontext/Manifest b/sys-libs/libucontext/Manifest
new file mode 100644
index 000000000000..909d659abb99
--- /dev/null
+++ b/sys-libs/libucontext/Manifest
@@ -0,0 +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-r1.ebuild b/sys-libs/libucontext/libucontext-1.1-r1.ebuild
new file mode 100644
index 000000000000..7ec73298a79c
--- /dev/null
+++ b/sys-libs/libucontext/libucontext-1.1-r1.ebuild
@@ -0,0 +1,67 @@
+# 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"
+IUSE="+man"
+
+BDEPEND="man? ( app-text/scdoc )"
+
+# segfault needs investigation
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1-respect-CFLAGS.patch
+)
+
+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)" \
+ all $(usev man 'docs')
+}
+
+src_test() {
+ emake \
+ ARCH="${arch}" \
+ LDFLAGS="${LDFLAGS}" \
+ LIBDIR="/usr/$(get_libdir)" \
+ check
+}
+
+src_install() {
+ 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/libucontext/metadata.xml b/sys-libs/libucontext/metadata.xml
new file mode 100644
index 000000000000..6d14eb740806
--- /dev/null
+++ b/sys-libs/libucontext/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="project">
+ <email>musl@gentoo.org</email>
+ <name>Musl project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">kaniini/libucontext</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-libs/libudev-compat/metadata.xml b/sys-libs/libudev-compat/metadata.xml
index 54be7ff7e5d6..374cd4dedb33 100644
--- a/sys-libs/libudev-compat/metadata.xml
+++ b/sys-libs/libudev-compat/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>chewi@gentoo.org</email>
diff --git a/sys-libs/libunwind/Manifest b/sys-libs/libunwind/Manifest
index c94f42495a9b..e156b3de32b2 100644
--- a/sys-libs/libunwind/Manifest
+++ b/sys-libs/libunwind/Manifest
@@ -1 +1,4 @@
-DIST libunwind-1.4.0.tar.gz 872941 BLAKE2B 39628dd46151d2748372c8f1dfa3cd39114770b85e890b048304f8395b2778a22da4cc468eb6fe1e2357a41bed5a6067e12992634859dabe30addd0fd39b4269 SHA512 60bce1e840f071d3a48cfa8e2acff988977956f659c5c04ce83f00751348fbbeddbfc54e8c9bd6ebc9073423ca5ee1816655dc5aa59fefd0a8edc9c3f7f3b913
+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 ee11149771cd..000000000000
--- a/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-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.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.4.0.ebuild b/sys-libs/libunwind/libunwind-1.4.0.ebuild
deleted file mode 100644
index f3a6bbb9eff6..000000000000
--- a/sys-libs/libunwind/libunwind-1.4.0.ebuild
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 2005-2020 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 -sparc x86 ~amd64-linux ~x86-linux"
-IUSE="debug debug-frame doc libatomic lzma +static-libs"
-
-RESTRICT="test" # some tests are broken (toolchain version dependent)
-
-# We just use the header from libatomic.
-RDEPEND="lzma? ( app-arch/xz-utils[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.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 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.7.2.ebuild b/sys-libs/libunwind/libunwind-1.7.2.ebuild
new file mode 100644
index 000000000000..97d9b3981477
--- /dev/null
+++ b/sys-libs/libunwind/libunwind-1.7.2.ebuild
@@ -0,0 +1,131 @@
+# 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.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"
+
+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
+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)
+
+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}] )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-1.7.2-backport-pr521.patch" )
+
+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
+ 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() {
+ # Explicitly allow parallel build of tests.
+ # Sandbox causes some tests to freak out.
+ SANDBOX_ON=0 emake check
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name "*.la" -type f -delete || die
+
+ # If USE=doc, there'll be newly generated docs which we install instead.
+ if ! use doc && [[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] ; then
+ doman "${WORKDIR}"/${PN}-${LIBUNWIND_DOCS_VERSION}-docs/man*/*.[0-8]
+ fi
+}
diff --git a/sys-libs/libunwind/libunwind-1.8.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 95faca4e7634..2861d2a86f04 100644
--- a/sys-libs/libunwind/metadata.xml
+++ b/sys-libs/libunwind/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>toolchain@gentoo.org</email>
@@ -9,4 +9,8 @@
<flag name="debug-frame">Adds support for DWARF .debug_frame section: Use the information from this section if available</flag>
<flag name="libatomic">Use libatomic instead of builtin atomic operations</flag>
</use>
+ <upstream>
+ <remote-id type="savannah-nongnu">libunwind</remote-id>
+ <remote-id type="github">libunwind/libunwind</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/liburing/Manifest b/sys-libs/liburing/Manifest
index 71664493284a..7261ce892260 100644
--- a/sys-libs/liburing/Manifest
+++ b/sys-libs/liburing/Manifest
@@ -1,2 +1,5 @@
-DIST liburing-0.6.tar.bz2 81429 BLAKE2B f905238a324d5e3f4fd0c572aa7db7a2c337aea282175d2a0f89802588d3900d2fb3ef8d6787aea38a406f1ccc57bf143864b708a4716783b09d4208164d2d99 SHA512 07fb0f61cc1d204bd340ef55ec65579a718ca266e4b9c8cdd6e47ae06defa3a9521e83fb3e6ed7c8910f52428dd62f4af900c4ec13c3509c7e366b4c13e7feb5
-DIST liburing-0.7.tar.bz2 86386 BLAKE2B a4fa00cc8e384f9909f3c628d479774beaffd5ab09c9f321ef22bfbabd273e4c8d4dbb30a3280633e89e1a79e893348e68f0aa2f3b1b4deda56759f77d9b1875 SHA512 9a23bc08e0fa59273264295859dddbe3276b2911df6d937b3c6f7647a250a3175222b5f051f3094efc98e48cacd242511327c5c5b895ebde10c8c87929ba4328
+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-arm-syscall.patch b/sys-libs/liburing/files/liburing-2.1-arm-syscall.patch
new file mode 100644
index 000000000000..a652b052148a
--- /dev/null
+++ b/sys-libs/liburing/files/liburing-2.1-arm-syscall.patch
@@ -0,0 +1,54 @@
+https://github.com/axboe/liburing/commit/cb350a8989adbd65db574325d9a86d5437d800da
+https://bugs.gentoo.org/816798
+
+From cb350a8989adbd65db574325d9a86d5437d800da Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem@hadrons.org>
+Date: Mon, 13 Sep 2021 23:56:08 +0200
+Subject: [PATCH] test: Use syscall wrappers instead of using syscall(2)
+ directly
+
+Some of these syscalls have different entry points depending on the
+architecture. Use the wrappers to avoid having to reimplement them
+portably.
+
+Fixes build failures on Debian armel and armhf builds.
+
+Signed-off-by: Guillem Jover <guillem@hadrons.org>
+--- a/test/sqpoll-cancel-hang.c
++++ b/test/sqpoll-cancel-hang.c
+@@ -4,7 +4,6 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/mman.h>
+-#include <sys/syscall.h>
+ #include <sys/wait.h>
+ #include <time.h>
+ #include <unistd.h>
+@@ -29,8 +28,6 @@ static uint64_t current_time_ms(void)
+
+ #define IORING_OFF_SQES 0x10000000ULL
+
+-#define sys_io_uring_setup 425
+-
+ static void kill_and_wait(int pid, int* status)
+ {
+ kill(-pid, SIGKILL);
+@@ -53,7 +50,7 @@ a5)
+ void* vma2 = (void*)a3;
+ void** ring_ptr_out = (void**)a4;
+ void** sqes_ptr_out = (void**)a5;
+- uint32_t fd_io_uring = syscall(sys_io_uring_setup, entries, setup_params);
++ uint32_t fd_io_uring = __sys_io_uring_setup(entries, setup_params);
+ uint32_t sq_ring_sz = setup_params->sq_off.array +
+ setup_params->sq_entries * sizeof(uint32_t);
+ uint32_t cq_ring_sz = setup_params->cq_off.cqes +
+@@ -135,7 +132,7 @@ void trigger_bug(void)
+ }
+ int main(void)
+ {
+- syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
++ mmap((void *)0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
+ int pid = fork();
+ if (pid < 0)
+ exit(1);
+
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-0.6.ebuild b/sys-libs/liburing/liburing-0.6.ebuild
deleted file mode 100644
index a24e746cdfc1..000000000000
--- a/sys-libs/liburing/liburing-0.6.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-minimal toolchain-funcs
-
-DESCRIPTION="Efficient I/O with io_uring"
-HOMEPAGE="https://github.com/axboe/liburing"
-SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
-LICENSE="MIT"
-SLOT="0"
-
-KEYWORDS="~alpha amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86"
-IUSE="static-libs"
-# fsync test hangs forever
-RESTRICT="test"
-
-src_prepare() {
- default
- 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)"
- )
- # No autotools configure! "econf" will fail.
- TMPDIR="${T}" ./configure "${myconf[@]}"
-}
-
-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-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-0.7.ebuild b/sys-libs/liburing/liburing-2.2.ebuild
index 1fdee42809ce..9869290a120e 100644
--- a/sys-libs/liburing/liburing-0.7.ebuild
+++ b/sys-libs/liburing/liburing-2.2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2020 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,17 +12,28 @@ 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 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86"
fi
LICENSE="MIT"
-SLOT="0"
+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}"
+
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
}
@@ -33,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 3e0f86f21364..ecb77ed5b823 100644
--- a/sys-libs/liburing/liburing-9999.ebuild
+++ b/sys-libs/liburing/liburing-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2020 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
@@ -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 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~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"
+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 e9a23bab52b3..6107bab3f5fa 100644
--- a/sys-libs/liburing/metadata.xml
+++ b/sys-libs/liburing/metadata.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>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/Manifest b/sys-libs/libutempter/Manifest
index 016871d8cfcb..837a2bf977ca 100644
--- a/sys-libs/libutempter/Manifest
+++ b/sys-libs/libutempter/Manifest
@@ -1,3 +1 @@
-DIST libutempter-1.1.6.tar.bz2 15705 BLAKE2B 147bf96990913019c35565507eb635ba60ff5ed67134805e9f146f8f70882615ff96d7b2e52b40fb73110905afb87893a72bdec4327d879e5bdc2ec1d39ff9f0 SHA512 6ada410b981d157ae20b578de8ce20997ec0446ec6de6859549b080aa65976fc9900d211600dab09dc3d0d109daabad0994a648b093b8781b442ff26ca17fede
-DIST libutempter-1.2.0.tar.gz 17353 BLAKE2B 35e66a32e70fa59639f9a4fb71ba0e89c88aedac04e389cd29397c935daea66bd9f4f04795c977911f136b121d0445f79c0090a60a0353d04af98fe6b9b9ee09 SHA512 24b9fb59269b48bfee397520907c74746a7a38cf12cc002a8adcdd930460036caea7c72fe47b93badf678dc8306786bf4d87f23ee696a524bfc93722ea1eed23
DIST libutempter-1.2.1.tar.gz 17429 BLAKE2B 88ae0a03a8a614b960082ce4d4006ec4e3eb8148b319ae964ac3ba3f684f08f5dd670e693f25d52d04a280f7b2aed6d2894cbbc0e2db3f71ab68e6910ffb58d1 SHA512 d3a3bab7d2c2a68534c5ad41dd02bde849eb08df5dbb895a79b50b74d269c48c4cfcd12c4654941ccb7cdd43f486cfdc19148fa470870562f5cd324ce9782429
diff --git a/sys-libs/libutempter/libutempter-1.1.6-r3.ebuild b/sys-libs/libutempter/libutempter-1.1.6-r3.ebuild
deleted file mode 100644
index c47cc5ffb8d8..000000000000
--- a/sys-libs/libutempter/libutempter-1.1.6-r3.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib flag-o-matic toolchain-funcs
-
-DESCRIPTION="Library that allows non-privileged apps to write utmp (login) info"
-HOMEPAGE="https://altlinux.org/index.php?module=sisyphus&package=libutempter"
-SRC_URI="ftp://ftp.altlinux.org/pub/people/ldv/${PN}/${P}.tar.bz2"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="static-libs elibc_FreeBSD"
-
-RDEPEND="
- !sys-apps/utempter
- acct-group/utmp
-"
-
-src_prepare() {
- default
-
- local args=(
- -e "/^libdir /s:/usr/lib:${EPREFIX}/usr/$(get_libdir):"
- -e '/^libexecdir /s:=.*:= $(libdir)/misc:'
- -e '/^CFLAGS = $(RPM_OPT_FLAGS)/d'
- -e 's:,-stats::'
- -e "/^includedir /s:/usr/include:${EPREFIX}/usr/include:"
- -e "/^mandir /s:=.*:= ${EPREFIX}/usr/share/man:"
- )
- use static-libs || args+=(
- -e '/^STATICLIB/d'
- -e '/INSTALL.*STATICLIB/d'
- )
- sed -i "${args[@]}" Makefile || die
-}
-
-src_configure() {
- use elibc_FreeBSD && append-libs -lutil
- tc-export AR CC
-}
-
-src_compile() {
- emake LDLIBS="${LIBS}"
-}
-
-src_install() {
- default
-
- if ! use prefix ; then
- fowners root:utmp /usr/$(get_libdir)/misc/utempter/utempter
- fperms 2755 /usr/$(get_libdir)/misc/utempter/utempter
- fi
- dodir /usr/sbin
- dosym ../$(get_libdir)/misc/utempter/utempter /usr/sbin/utempter
-}
-
-pkg_postinst() {
- if [[ -f "${EROOT}/var/log/wtmp" ]] ; then
- chown root:utmp "${EROOT}/var/log/wtmp"
- chmod 664 "${EROOT}/var/log/wtmp"
- fi
-
- if [[ -f "${EROOT}/var/run/utmp" ]] ; then
- chown root:utmp "${EROOT}/var/run/utmp"
- chmod 664 "${EROOT}/var/run/utmp"
- fi
-}
diff --git a/sys-libs/libutempter/libutempter-1.2.0.ebuild b/sys-libs/libutempter/libutempter-1.2.0.ebuild
deleted file mode 100644
index 271a41f8bde7..000000000000
--- a/sys-libs/libutempter/libutempter-1.2.0.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib flag-o-matic toolchain-funcs
-
-DESCRIPTION="Library that allows non-privileged apps to write utmp (login) info"
-HOMEPAGE="https://altlinux.org/index.php?module=sisyphus&package=libutempter"
-SRC_URI="ftp://ftp.altlinux.org/pub/people/ldv/${PN}/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="static-libs elibc_FreeBSD"
-
-RDEPEND="
- !sys-apps/utempter
- acct-group/utmp
-"
-
-src_prepare() {
- default
-
- local args=(
- -e "/^libdir /s:/usr/lib:${EPREFIX}/usr/$(get_libdir):"
- -e '/^libexecdir /s:=.*:= $(libdir)/misc:'
- -e '/^CFLAGS = $(RPM_OPT_FLAGS)/d'
- -e 's:-Wl,-stats::'
- -e "/^includedir /s:/usr/include:${EPREFIX}/usr/include:"
- -e "/^mandir /s:=.*:= ${EPREFIX}/usr/share/man:"
- )
- use static-libs || args+=(
- -e '/^STATICLIB/d'
- -e '/INSTALL.*STATICLIB/d'
- )
- sed -i "${args[@]}" Makefile || die
-}
-
-src_configure() {
- use elibc_FreeBSD && append-libs -lutil
- tc-export AR CC
-}
-
-src_compile() {
- emake LDLIBS="${LIBS}"
-}
-
-src_install() {
- default
-
- if ! use prefix ; then
- fowners root:utmp /usr/$(get_libdir)/misc/utempter/utempter
- fperms 2755 /usr/$(get_libdir)/misc/utempter/utempter
- fi
- dodir /usr/sbin
- dosym ../$(get_libdir)/misc/utempter/utempter /usr/sbin/utempter
-}
-
-pkg_postinst() {
- if [[ -f "${EROOT}/var/log/wtmp" ]] ; then
- chown root:utmp "${EROOT}/var/log/wtmp"
- chmod 664 "${EROOT}/var/log/wtmp"
- fi
-
- if [[ -f "${EROOT}/var/run/utmp" ]] ; then
- chown root:utmp "${EROOT}/var/run/utmp"
- chmod 664 "${EROOT}/var/run/utmp"
- fi
-}
diff --git a/sys-libs/libutempter/libutempter-1.2.1.ebuild b/sys-libs/libutempter/libutempter-1.2.1.ebuild
index bf423adf43ea..953cc42fcc2d 100644
--- a/sys-libs/libutempter/libutempter-1.2.1.ebuild
+++ b/sys-libs/libutempter/libutempter-1.2.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit multilib flag-o-matic toolchain-funcs
+inherit toolchain-funcs
DESCRIPTION="Library that allows non-privileged apps to write utmp (login) info"
HOMEPAGE="https://altlinux.org/index.php?module=sisyphus&package=libutempter"
@@ -11,8 +11,8 @@ 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"
-IUSE="static-libs elibc_FreeBSD"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
RDEPEND="
!sys-apps/utempter
@@ -30,15 +30,18 @@ src_prepare() {
-e "/^includedir /s:/usr/include:${EPREFIX}/usr/include:"
-e "/^mandir /s:=.*:= ${EPREFIX}/usr/share/man:"
)
- use static-libs || args+=(
+
+ if ! use static-libs ; then
+ args+=(
-e '/^STATICLIB/d'
-e '/INSTALL.*STATICLIB/d'
)
+ fi
+
sed -i "${args[@]}" Makefile || die
}
src_configure() {
- use elibc_FreeBSD && append-libs -lutil
tc-export AR CC
}
@@ -53,18 +56,15 @@ src_install() {
fowners root:utmp /usr/$(get_libdir)/misc/utempter/utempter
fperms 2755 /usr/$(get_libdir)/misc/utempter/utempter
fi
+
dodir /usr/sbin
dosym ../$(get_libdir)/misc/utempter/utempter /usr/sbin/utempter
}
pkg_postinst() {
- if [[ -f "${EROOT}/var/log/wtmp" ]] ; then
- chown root:utmp "${EROOT}/var/log/wtmp"
- chmod 664 "${EROOT}/var/log/wtmp"
- fi
-
- if [[ -f "${EROOT}/var/run/utmp" ]] ; then
- chown root:utmp "${EROOT}/var/run/utmp"
- chmod 664 "${EROOT}/var/run/utmp"
- fi
+ local path
+ for path in "${EROOT}"/var/log/{w,u}tmp; do
+ chown root:utmp "${path}"
+ chmod 664 "${path}"
+ done
}
diff --git a/sys-libs/libutempter/metadata.xml b/sys-libs/libutempter/metadata.xml
index 56c124413057..73dda144f9ac 100644
--- a/sys-libs/libutempter/metadata.xml
+++ b/sys-libs/libutempter/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
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/libuuid/metadata.xml b/sys-libs/libuuid/metadata.xml
index 183ef343272e..4fbbc004bde5 100644
--- a/sys-libs/libuuid/metadata.xml
+++ b/sys-libs/libuuid/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>grobian@gentoo.org</email>
diff --git a/sys-libs/libvpd/Manifest b/sys-libs/libvpd/Manifest
index 8b5f0441602b..3e825ef8afde 100644
--- a/sys-libs/libvpd/Manifest
+++ b/sys-libs/libvpd/Manifest
@@ -1 +1 @@
-DIST libvpd-2.2.6.tar.gz 374262 BLAKE2B b7741948aa62ad6221d28a674f765d085e1446c0bb45d7aa7a5f08599471023b2bb794ad5645c3b70af5806cd48cc87f117f9b4021e0f8c872ca48b748cc1e60 SHA512 17046eeb6ccc5372d465848eff7135cf6e9f876a2d82862e1d01a9f674b691958942e119f846bc3220c1e8f7eb549c5c7867d5d5e896072c733f400d202abc1d
+DIST libvpd-2.2.9.tar.gz 53747 BLAKE2B c8898e2f604431b74bf5e10fc99e7a9b5540b825f2a996776109a2b2b636f732ff8d9f7956ffea1231e5b023e285eee641a873a68fcd8a2d6a6d9e64c5ab3b18 SHA512 e32a80e0f3aaedbaaac64dbdedfee7eeb2e7a7b6d2d737bca4678d26caadab77032a7c26211a5fc3caed3724488bc8fa99620ceac05f8d156ca90f4452cfaf0a
diff --git a/sys-libs/libvpd/files/libvpd-2.2.6-localstatedir.patch b/sys-libs/libvpd/files/libvpd-2.2.6-localstatedir.patch
deleted file mode 100644
index 78a44a6351c6..000000000000
--- a/sys-libs/libvpd/files/libvpd-2.2.6-localstatedir.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -66,6 +66,6 @@
-
- install-exec-hook:
- mkdir -p $(DESTDIR)/${sysconfdir}/udev/rules.d/
-- mkdir -p $(DESTDIR)/${localstatedir}/lib/lsvpd/
-+ mkdir -p $(DESTDIR)/${localstatedir}/lsvpd/
- install -D --mode=644 90-vpdupdate.rules \
- ${DESTDIR}/${sysconfdir}/udev/rules.d/90-vpdupdate.rules
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -1046,7 +1046,7 @@
-
- install-exec-hook:
- mkdir -p $(DESTDIR)/${sysconfdir}/udev/rules.d/
-- mkdir -p $(DESTDIR)/${localstatedir}/lib/lsvpd/
-+ mkdir -p $(DESTDIR)/${localstatedir}/lsvpd/
- install -D --mode=644 90-vpdupdate.rules \
- ${DESTDIR}/${sysconfdir}/udev/rules.d/90-vpdupdate.rules
-
diff --git a/sys-libs/libvpd/libvpd-2.2.6.ebuild b/sys-libs/libvpd/libvpd-2.2.9.ebuild
index 2a691e27d0c6..8d0128e92307 100644
--- a/sys-libs/libvpd/libvpd-2.2.6.ebuild
+++ b/sys-libs/libvpd/libvpd-2.2.9.ebuild
@@ -1,34 +1,39 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-inherit udev
+EAPI=8
+inherit autotools udev
-DESCRIPTION="Library implementation for listing vpds"
-HOMEPAGE="https://sourceforge.net/projects/linux-diag/"
-SRC_URI="https://sourceforge.net/projects/linux-diag/files/libvpd/${PV}/libvpd-${PV}.tar.gz"
+DESCRIPTION="Library implementation for listing Vital Product Data"
+HOMEPAGE="https://github.com/power-ras/libvpd"
+SRC_URI="https://github.com/power-ras/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="LGPL-2.1+"
-SLOT="0"
+SLOT="0/3"
KEYWORDS="ppc ppc64"
-IUSE="static-libs"
DEPEND="
- >=dev-db/sqlite-3.7.8
- sys-libs/zlib
+ dev-db/sqlite:3
+ sys-libs/zlib:=
"
RDEPEND="${DEPEND}"
-PATCHES=(
- "${FILESDIR}"/${PN}-2.2.6-localstatedir.patch
-)
+
+src_prepare() {
+ default
+ eautoreconf
+}
src_configure() {
# sysconfdir is used only to establish where the udev rules file should go
# unfortunately it also adds the subdirs on its own so we strip it down to
# dirname
- econf \
- $(use_enable static-libs static) \
+ local myconf=(
+ --disable-static
+ --localstatedir="${EPREFIX}/var"
--sysconfdir="$( dirname $(get_udevdir) )"
+ )
+
+ econf "${myconf[@]}"
}
src_install() {
diff --git a/sys-libs/libvpd/metadata.xml b/sys-libs/libvpd/metadata.xml
index 2b8aee36a4fc..079cdb9aa6f0 100644
--- a/sys-libs/libvpd/metadata.xml
+++ b/sys-libs/libvpd/metadata.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>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 c6dcdc9dde51..416fefe5b930 100644
--- a/sys-libs/libxcrypt/Manifest
+++ b/sys-libs/libxcrypt/Manifest
@@ -1,2 +1 @@
-DIST libxcrypt-4.4.16.tar.gz 480694 BLAKE2B 0e93c2ff45a8148f82a80a67fb732a3ef42e87505d19258023f91d3352a382483204e77e2704e7a0de15f4f1e38a326d0867506a5580faf8c81857270588a4a3 SHA512 e1d3b1262c6be7c6c8847b8c4eb8191d9e5e482798be6f1186876c72f3d8c737124378ec45a38aa464f556e10a557b96f855bd371f03c3611eada27904bf6781
-DIST libxcrypt-4.4.17.tar.gz 519096 BLAKE2B 12cbe3d1f235baddd8d2ec8159f2a7514e75c2f91cf0db18ef909ec11c38ac19efebecec647a90cafb27c7ebc7e940da448ca8f3edd1c49e5cb9cc4407d5198c SHA512 94aaba6ccf9b6d1a32f9a571ee32261cecd393d5b8d8c6f18d740dc7bb29ac0fbd381124e7f0d84882559bb634208c08151b3dc05c9138fa0a229c4ba20fb6f7
+DIST libxcrypt-4.4.36-autotools.tar.xz 624660 BLAKE2B 8dc3d0f354baf8c64dc011e95e7df10d48b0dfe428503936ffd55edf2745de04003c7efe231ed5d9a14cea7f682ba377b7e00f0463b4060c50c9c29f555b790f SHA512 fb8391ecb89622eb0d74d13c5fc1369718e83c47671449044ca0c2f78a236d7b06177a60bf8cda47694caa840c68eaaf0b23690e8975fa5d64b734c8eb246d10
diff --git a/sys-libs/libxcrypt/files/libxcrypt-4.4.12-multibuild.patch b/sys-libs/libxcrypt/files/libxcrypt-4.4.12-multibuild.patch
deleted file mode 100644
index 806213036886..000000000000
--- a/sys-libs/libxcrypt/files/libxcrypt-4.4.12-multibuild.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index 26db1c1..597c3f4 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -84,11 +84,7 @@ noinst_HEADERS = \
- test/des-cases.h \
- test/ka-table.inc
-
--if ENABLE_XCRYPT_COMPAT_FILES
- nodist_include_HEADERS += xcrypt.h
--else
--nodist_noinst_HEADERS += xcrypt.h
--endif
-
- noinst_PROGRAMS = \
- lib/gen-des-tables
-@@ -137,7 +133,7 @@ uninstall_hook_targets = \
- uninstall-hook-pkgconfig
- install-data-hook-pkgconfig:
- cd $(DESTDIR)$(pkgconfigdir) && \
-- $(LN_S) libxcrypt.pc libcrypt.pc
-+ $(LN_S) -f libxcrypt.pc libcrypt.pc
- uninstall-hook-pkgconfig:
- -rm -f $(DESTDIR)$(pkgconfigdir)/libcrypt.pc
-
diff --git a/sys-libs/libxcrypt/files/libxcrypt-4.4.12-pythonver.patch b/sys-libs/libxcrypt/files/libxcrypt-4.4.12-pythonver.patch
deleted file mode 100644
index 048a8ebe0a70..000000000000
--- a/sys-libs/libxcrypt/files/libxcrypt-4.4.12-pythonver.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index 1e74bb1..4249fb5 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -241,11 +241,7 @@ ENABLE_KA_TABLE_GEN="no"
- # This way we just need one call to AC_PATH_PROGS to likely get a
- # suitable version of Python. The version check afterwards is for
- # the case just a generic 'python3' or 'python' executable was found.
--PYTHON_CANDIDATE_VERSIONS="python3 python"
--
--for ver in `seq 6 1 10`; do
-- PYTHON_CANDIDATE_VERSIONS="python3.$ver $PYTHON_CANDIDATE_VERSIONS"
--done
-+PYTHON_CANDIDATE_VERSIONS="${EPYTHON}"
-
- AC_PATH_PROGS([PYTHON], [$PYTHON_CANDIDATE_VERSIONS], [])
-
diff --git a/sys-libs/libxcrypt/files/libxcrypt-4.4.19-multibuild.patch b/sys-libs/libxcrypt/files/libxcrypt-4.4.19-multibuild.patch
new file mode 100644
index 000000000000..5b3958e091d0
--- /dev/null
+++ b/sys-libs/libxcrypt/files/libxcrypt-4.4.19-multibuild.patch
@@ -0,0 +1,14 @@
+diff --git a/Makefile.am b/Makefile.am
+index d0cca1d..4a5d4a1 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -86,9 +86,7 @@ noinst_HEADERS = \
+ test/des-cases.h \
+ test/ka-table.inc
+
+-if ENABLE_XCRYPT_COMPAT_FILES
+ nodist_include_HEADERS += xcrypt.h
+-endif
+
+ noinst_PROGRAMS = \
+ lib/gen-des-tables
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.16.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.16.ebuild
deleted file mode 100644
index c2e66761e433..000000000000
--- a/sys-libs/libxcrypt/libxcrypt-4.4.16.ebuild
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright 2004-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
-inherit autotools multibuild python-any-r1 multilib-minimal
-
-DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others "
-SRC_URI="https://github.com/besser82/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-HOMEPAGE="https://github.com/besser82/libxcrypt"
-
-LICENSE="LGPL-2.1+ public-domain BSD BSD-2"
-SLOT="0/1"
-KEYWORDS="amd64 x86"
-IUSE="+compat split-usr +static-libs system test"
-
-DEPEND="system? (
- elibc_glibc? ( sys-libs/glibc[-crypt(+)] )
- !sys-libs/musl
- )"
-RDEPEND="${DEPEND}"
-BDEPEND="sys-apps/findutils
- test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') )"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="split-usr? ( system )"
-
-PATCHES=(
- "${FILESDIR}/libxcrypt-4.4.12-pythonver.patch"
- "${FILESDIR}/libxcrypt-4.4.12-multibuild.patch"
-)
-
-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
- eautoreconf
-}
-
-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=$(get_xclibdir)
- --with-pkgconfigdir=/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 "${D}"/usr/share/doc/${PF} -type l -delete || die
- find "${D}" -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 "${D}"$(get_xclibdir)/libcrypt$(get_libname) \
- || die "failed to remove extra compat libraries"
- ;;
- xcrypt_nocompat-*)
- if use split-usr; then
- (
- if use static-libs; then
- # .a files are installed to /$(get_libdir) by default
- # move static libraries to /usr prefix or portage will abort
- shopt -s nullglob || die "failglob failed"
- static_libs=( "${ED}"/$(get_xclibdir)/*.a )
-
- if [[ -n ${static_libs[*]} ]]; then
- dodir "/usr/$(get_xclibdir)"
- mv "${static_libs[@]}" "${D}/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.17.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.17.ebuild
deleted file mode 100644
index 0a1ca516b2b2..000000000000
--- a/sys-libs/libxcrypt/libxcrypt-4.4.17.ebuild
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright 2004-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{6..9} )
-inherit autotools multibuild python-any-r1 multilib-minimal
-
-DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others "
-SRC_URI="https://github.com/besser82/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-HOMEPAGE="https://github.com/besser82/libxcrypt"
-
-LICENSE="LGPL-2.1+ public-domain BSD BSD-2"
-SLOT="0/1"
-KEYWORDS="~amd64 ~x86"
-IUSE="+compat split-usr +static-libs system test"
-
-DEPEND="system? (
- elibc_glibc? ( sys-libs/glibc[-crypt(+)] )
- !sys-libs/musl
- )"
-RDEPEND="${DEPEND}"
-BDEPEND="sys-apps/findutils
- test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') )"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="split-usr? ( system )"
-
-PATCHES=(
- "${FILESDIR}/libxcrypt-4.4.12-pythonver.patch"
- "${FILESDIR}/libxcrypt-4.4.12-multibuild.patch"
-)
-
-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
- eautoreconf
-}
-
-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=$(get_xclibdir)
- --with-pkgconfigdir=/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 "${D}"/usr/share/doc/${PF} -type l -delete || die
- find "${D}" -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 "${D}"$(get_xclibdir)/libcrypt$(get_libname) \
- || die "failed to remove extra compat libraries"
- ;;
- xcrypt_nocompat-*)
- if use split-usr; then
- (
- if use static-libs; then
- # .a files are installed to /$(get_libdir) by default
- # move static libraries to /usr prefix or portage will abort
- shopt -s nullglob || die "failglob failed"
- static_libs=( "${ED}"/$(get_xclibdir)/*.a )
-
- if [[ -n ${static_libs[*]} ]]; then
- dodir "/usr/$(get_xclibdir)"
- mv "${static_libs[@]}" "${D}/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.36-r2.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild
new file mode 100644
index 000000000000..700cbf7866ee
--- /dev/null
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild
@@ -0,0 +1,335 @@
+# Copyright 2004-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+# NEED_BOOTSTRAP is for developers to quickly generate a tarball
+# for publishing to the tree.
+NEED_BOOTSTRAP="no"
+inherit multibuild multilib python-any-r1 flag-o-matic toolchain-funcs multilib-minimal
+
+DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others"
+HOMEPAGE="https://github.com/besser82/libxcrypt"
+if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then
+ inherit autotools
+ SRC_URI="https://github.com/besser82/libxcrypt/releases/download/v${PV}/${P}.tar.xz"
+else
+ SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-autotools.tar.xz"
+fi
+
+LICENSE="LGPL-2.1+ public-domain BSD BSD-2"
+SLOT="0/1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~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 )"
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+is_cross() {
+ local enabled_abis=( $(multilib_get_enabled_abis) )
+ [[ "${#enabled_abis[@]}" -le 1 ]] && [[ ${CHOST} != ${CTARGET} ]]
+}
+
+DEPEND="
+ system? (
+ elibc_glibc? (
+ ${CATEGORY}/glibc[-crypt(-)]
+ !${CATEGORY}/glibc[crypt(-)]
+ )
+ elibc_musl? (
+ ${CATEGORY}/musl[-crypt(+)]
+ !${CATEGORY}/musl[crypt(+)]
+ )
+ )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ dev-lang/perl
+ test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') )
+"
+
+python_check_deps() {
+ python_has_version "dev-python/passlib[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if has "distcc" ${FEATURES} ; then
+ ewarn "Please verify all distcc nodes are using the same versions of GCC (>= 10) and Binutils!"
+ ewarn "Older/mismatched versions of GCC may lead to a misbehaving library: bug #823179."
+
+ if [[ ${BUILD_TYPE} != "binary" ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]] ; then
+ die "libxcrypt is known to fail to build or be broken at runtime with < GCC 10 (bug #823179)!"
+ fi
+ fi
+}
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=(
+ $(usev compat 'xcrypt_compat')
+ xcrypt_nocompat
+ )
+
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # WARNING: Please read on bumping or applying patches!
+ #
+ # There are two circular dependencies to be aware of:
+ # 1)
+ # if we're bootstrapping configure and makefiles:
+ # libxcrypt -> automake -> perl -> libxcrypt
+ #
+ # mitigation:
+ # toolchain@ manually runs `make dist` after running autoconf + `./configure`
+ # and the ebuild uses that.
+ # (Don't include the pre-generated Perl artefacts.)
+ #
+ # solution for future:
+ # Upstream are working on producing `make dist` tarballs.
+ # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573
+ #
+ # 2)
+ # configure *unconditionally* needs Perl at build time to generate
+ # a list of enabled algorithms based on the set passed to `configure`:
+ # libxcrypt -> perl -> libxcrypt
+ #
+ # mitigation:
+ # None at the moment.
+ #
+ # solution for future:
+ # Not possible right now. Upstream intend on depending on Perl for further
+ # configuration options.
+ # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573
+ #
+ # Therefore, on changes (inc. bumps):
+ # * You must check whether upstream have started providing tarballs with bootstrapped
+ # auto{conf,make};
+ #
+ # * diff the build system changes!
+ #
+ if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then
+ # Facilitate our split variant build for compat + non-compat
+ eapply "${FILESDIR}"/${PN}-4.4.19-multibuild.patch
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ # Avoid possible "illegal instruction" errors with gold
+ # bug #821496
+ tc-ld-disable-gold
+
+ # Doesn't work with LTO: bug #852917.
+ # https://github.com/besser82/libxcrypt/issues/24
+ filter-lto
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ multibuild_foreach_variant multilib-minimal_src_configure
+}
+
+get_xcprefix() {
+ if is_cross; then
+ echo "${EPREFIX}/usr/${CTARGET}"
+ else
+ echo "${EPREFIX}"
+ fi
+}
+
+get_xclibdir() {
+ printf -- "%s/%s/%s/%s\n" \
+ "$(get_xcprefix)" \
+ "$(usev !split-usr '/usr')" \
+ "$(get_libdir)" \
+ "$(usev !system 'xcrypt')"
+}
+
+get_xcincludedir() {
+ printf -- "%s/usr/include/%s\n" \
+ "$(get_xcprefix)" \
+ "$(usev !system 'xcrypt')"
+}
+
+get_xcmandir() {
+ printf -- "%s/usr/share/man\n" \
+ "$(get_xcprefix)"
+}
+
+get_xcpkgconfigdir() {
+ printf -- "%s/usr/%s/pkgconfig\n" \
+ "$(get_xcprefix)" \
+ "$(get_libdir)"
+}
+
+multilib_src_configure() {
+ local -a myconf=(
+ --host=${CTARGET}
+ --disable-werror
+ --libdir=$(get_xclibdir)
+ --with-pkgconfigdir=$(get_xcpkgconfigdir)
+ --includedir=$(get_xcincludedir)
+ --mandir="$(get_xcmandir)"
+ )
+
+ tc-export PKG_CONFIG
+
+ if is_cross; then
+ if tc-is-clang; then
+ export CC="${CTARGET}-clang"
+ else
+ export CC="${CTARGET}-gcc"
+ fi
+ fi
+
+ case "${MULTIBUILD_ID}" in
+ xcrypt_compat-*)
+ myconf+=(
+ --disable-static
+ --disable-xcrypt-compat-files
+ --enable-obsolete-api=yes
+ )
+ ;;
+ xcrypt_nocompat-*)
+ myconf+=(
+ --enable-obsolete-api=no
+ $(use_enable static-libs static)
+ )
+ ;;
+ *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
+ esac
+
+ if use headers-only; then
+ # Nothing is compiled here which would affect the headers for the target.
+ # So forcing CC is sane.
+ headers_only_flags="CC=$(tc-getBUILD_CC)"
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" "${headers_only_flags}"
+}
+
+src_compile() {
+ use headers-only && return
+
+ multibuild_foreach_variant multilib-minimal_src_compile
+}
+
+multilib_src_test() {
+ emake check
+}
+
+src_test() {
+ multibuild_foreach_variant multilib-minimal_src_test
+}
+
+src_install() {
+ multibuild_foreach_variant multilib-minimal_src_install
+
+ use headers-only || \
+ (
+ shopt -s failglob || die "failglob failed"
+
+ # Make sure our man pages do not collide with glibc or man-pages.
+ for manpage in "${D}$(get_xcmandir)"/man3/crypt{,_r}.?*; do
+ mv -n "${manpage}" "$(dirname "${manpage}")/xcrypt_$(basename "${manpage}")" \
+ || die "mv failed"
+ done
+ ) || die "failglob error"
+
+ # Remove useless stuff from installation
+ find "${ED}"/usr/share/doc/${PF} -type l -delete || die
+ find "${ED}" -name '*.la' -delete || die
+
+ # workaround broken upstream cross-* --docdir by installing files in proper locations
+ if is_cross; then
+ insinto "$(get_xcprefix)"/usr/share
+ doins -r "${ED}"/usr/share/doc
+ rm -r "${ED}"/usr/share/doc || die
+ fi
+}
+
+multilib_src_install() {
+ if use headers-only; then
+ emake DESTDIR="${D}" install-nodist_includeHEADERS
+ return
+ fi
+
+ emake DESTDIR="${D}" install
+
+ # Don't install the libcrypt.so symlink for the "compat" version
+ case "${MULTIBUILD_ID}" in
+ xcrypt_compat-*)
+ rm "${D}"$(get_xclibdir)/libcrypt$(get_libname) \
+ || die "failed to remove extra compat libraries"
+ ;;
+ xcrypt_nocompat-*)
+ if use split-usr; then
+ (
+ if use static-libs; then
+ # .a files are installed to /$(get_libdir) by default
+ # Move static libraries to /usr prefix or portage will abort
+ shopt -s nullglob || die "failglob failed"
+ static_libs=( "${D}"/$(get_xclibdir)/*.a )
+
+ if [[ -n ${static_libs[*]} ]]; then
+ dodir "/usr/$(get_xclibdir)"
+ mv "${static_libs[@]}" "${ED}/usr/$(get_xclibdir)" \
+ || die "Moving static libs failed"
+ fi
+ fi
+
+ if use system; then
+ # Move versionless .so symlinks from /$(get_libdir) to /usr/$(get_libdir)
+ # to allow linker to correctly find shared libraries.
+ shopt -s failglob || die "failglob failed"
+
+ for lib_file in "${D}"$(get_xclibdir)/*$(get_libname); do
+ lib_file_basename="$(basename "${lib_file}")"
+ lib_file_target="$(basename "$(readlink -f "${lib_file}")")"
+
+ # We already know we're in split-usr (checked above)
+ # See bug #843209 (also worth keeping in mind bug #802222 too)
+ local libdir_no_prefix=$(get_xclibdir)
+ libdir_no_prefix=${libdir_no_prefix#${EPREFIX}}
+ libdir_no_prefix=${libdir_no_prefix%/usr}
+ dosym -r "/$(get_libdir)/${lib_file_target}" "/usr/${libdir_no_prefix}/${lib_file_basename}"
+ done
+
+ rm "${D}"$(get_xclibdir)/*$(get_libname) || die "Removing symlinks in incorrect location failed"
+ fi
+ )
+ fi
+ ;;
+ *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
+ esac
+}
+
+pkg_preinst() {
+ # Verify we're not in a bad case like bug #843209 with broken symlinks.
+ # This can be dropped when, if ever, the split-usr && system && compat case
+ # is cleaned up in *_src_install.
+ local broken_symlinks=()
+ mapfile -d '' broken_symlinks < <(
+ find "${ED}" -xtype l -print0
+ )
+
+ if [[ ${#broken_symlinks[@]} -gt 0 ]]; then
+ eerror "Broken symlinks found before merging!"
+ local symlink target resolved
+ for symlink in "${broken_symlinks[@]}" ; do
+ target="$(readlink "${symlink}")"
+ resolved="$(readlink -f "${symlink}")"
+ eerror " '${symlink}' -> '${target}' (${resolved})"
+ done
+ die "Broken symlinks found! Aborting to avoid damaging system. Please report a bug."
+ fi
+}
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.36-r3.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.36-r3.ebuild
new file mode 100644
index 000000000000..550e7631a094
--- /dev/null
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.36-r3.ebuild
@@ -0,0 +1,254 @@
+# Copyright 2004-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+# NEED_BOOTSTRAP is for developers to quickly generate a tarball
+# for publishing to the tree.
+NEED_BOOTSTRAP="no"
+inherit crossdev multibuild multilib python-any-r1 flag-o-matic toolchain-funcs multilib-minimal
+
+DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others"
+HOMEPAGE="https://github.com/besser82/libxcrypt"
+if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then
+ inherit autotools
+ SRC_URI="https://github.com/besser82/libxcrypt/releases/download/v${PV}/${P}.tar.xz"
+else
+ SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-autotools.tar.xz"
+fi
+
+LICENSE="LGPL-2.1+ public-domain BSD BSD-2"
+SLOT="0/1"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+IUSE="+compat static-libs +system test headers-only"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ system? (
+ elibc_glibc? (
+ ${CATEGORY}/glibc[-crypt(-)]
+ !${CATEGORY}/glibc[crypt(-)]
+ )
+ elibc_musl? (
+ ${CATEGORY}/musl[-crypt(+)]
+ !${CATEGORY}/musl[crypt(+)]
+ )
+ )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ dev-lang/perl
+ test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') )
+"
+
+python_check_deps() {
+ python_has_version "dev-python/passlib[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if has "distcc" ${FEATURES} ; then
+ ewarn "Please verify all distcc nodes are using the same versions of GCC (>= 10) and Binutils!"
+ ewarn "Older/mismatched versions of GCC may lead to a misbehaving library: bug #823179."
+
+ if [[ ${BUILD_TYPE} != "binary" ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]] ; then
+ die "libxcrypt is known to fail to build or be broken at runtime with < GCC 10 (bug #823179)!"
+ fi
+ fi
+}
+
+pkg_setup() {
+ :
+}
+
+src_prepare() {
+ default
+
+ # WARNING: Please read on bumping or applying patches!
+ #
+ # There are two circular dependencies to be aware of:
+ # 1)
+ # if we're bootstrapping configure and makefiles:
+ # libxcrypt -> automake -> perl -> libxcrypt
+ #
+ # mitigation:
+ # toolchain@ manually runs `make dist` after running autoconf + `./configure`
+ # and the ebuild uses that.
+ # (Don't include the pre-generated Perl artefacts.)
+ #
+ # solution for future:
+ # Upstream are working on producing `make dist` tarballs.
+ # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573
+ #
+ # 2)
+ # configure *unconditionally* needs Perl at build time to generate
+ # a list of enabled algorithms based on the set passed to `configure`:
+ # libxcrypt -> perl -> libxcrypt
+ #
+ # mitigation:
+ # None at the moment.
+ #
+ # solution for future:
+ # Not possible right now. Upstream intend on depending on Perl for further
+ # configuration options.
+ # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573
+ #
+ # Therefore, on changes (inc. bumps):
+ # * You must check whether upstream have started providing tarballs with bootstrapped
+ # auto{conf,make};
+ #
+ # * diff the build system changes!
+ #
+ if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then
+ # Facilitate our split variant build for compat + non-compat
+ eapply "${FILESDIR}"/${PN}-4.4.19-multibuild.patch
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ MULTIBUILD_VARIANTS=(
+ $(usev compat 'xcrypt_compat')
+ xcrypt_nocompat
+ )
+
+ MYPREFIX=${EPREFIX}
+ MYSYSROOT=${ESYSROOT}
+
+ if target_is_not_host; then
+ 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
+
+ # Doesn't work with LTO: bug #852917.
+ # https://github.com/besser82/libxcrypt/issues/24
+ filter-lto
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ if use test; then
+ python_setup
+ fi
+
+ multibuild_foreach_variant multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --disable-werror
+ --prefix="${MYPREFIX}/usr"
+ --libdir="${MYPREFIX}/usr/$(get_libdir)$(usev !system /xcrypt)"
+ --includedir="${MYPREFIX}/usr/include$(usev !system /xcrypt)"
+ --with-pkgconfigdir="${MYPREFIX}/usr/$(get_libdir)/pkgconfig"
+ --with-sysroot="${MYSYSROOT}"
+ )
+
+ tc-export PKG_CONFIG
+
+ case "${MULTIBUILD_ID}" in
+ xcrypt_compat-*)
+ myconf+=(
+ --disable-static
+ --disable-xcrypt-compat-files
+ --enable-obsolete-api=yes
+ )
+ ;;
+ xcrypt_nocompat-*)
+ myconf+=(
+ --enable-obsolete-api=no
+ $(use_enable static-libs static)
+ )
+ ;;
+ *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
+ esac
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+src_compile() {
+ use headers-only && return
+
+ multibuild_foreach_variant multilib-minimal_src_compile
+}
+
+multilib_src_test() {
+ emake check
+}
+
+src_test() {
+ multibuild_foreach_variant multilib-minimal_src_test
+}
+
+src_install() {
+ local DESTDIR=${D}
+ if target_is_not_host; then
+ DESTDIR=${ED}/usr/${CTARGET}
+ fi
+
+ multibuild_foreach_variant multilib-minimal_src_install
+
+ find "${ED}" -name '*.la' -delete || die
+
+ if target_is_not_host; then
+ insinto /usr/${CTARGET}/usr/share
+ doins -r "${ED}/usr/share/doc"
+ rm -r "${ED}/usr/share/doc" || die
+ rmdir "${ED}/usr/share" || die
+ fi
+}
+
+multilib_src_install() {
+ if use headers-only; then
+ emake DESTDIR="${DESTDIR}" install-nodist_includeHEADERS
+ else
+ emake DESTDIR="${DESTDIR}" install
+ # Conflicts with sys-apps/man-pages
+ rm "${DESTDIR}${MYPREFIX}"/usr/share/man/man3/crypt{,_r}.3 || die
+ fi
+}
+
+pkg_preinst() {
+ # Verify we're not in a bad case like bug #843209 with broken symlinks.
+ # This can be dropped when, if ever, the split-usr && system && compat case
+ # is cleaned up in *_src_install.
+ local broken_symlinks=()
+ mapfile -d '' broken_symlinks < <(
+ find "${ED}" -xtype l -print0
+ )
+
+ if [[ ${#broken_symlinks[@]} -gt 0 ]]; then
+ eerror "Broken symlinks found before merging!"
+ local symlink target resolved
+ for symlink in "${broken_symlinks[@]}" ; do
+ target="$(readlink "${symlink}")"
+ resolved="$(readlink -f "${symlink}")"
+ eerror " '${symlink}' -> '${target}' (${resolved})"
+ done
+ die "Broken symlinks found! Aborting to avoid damaging system. Please report a bug."
+ fi
+}
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.36.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.36.ebuild
new file mode 100644
index 000000000000..51562c02d41f
--- /dev/null
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.36.ebuild
@@ -0,0 +1,340 @@
+# Copyright 2004-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+# NEED_BOOTSTRAP is for developers to quickly generate a tarball
+# for publishing to the tree.
+NEED_BOOTSTRAP="no"
+inherit multibuild multilib python-any-r1 flag-o-matic toolchain-funcs multilib-minimal
+
+DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others"
+HOMEPAGE="https://github.com/besser82/libxcrypt"
+if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then
+ inherit autotools
+ SRC_URI="https://github.com/besser82/libxcrypt/releases/download/v${PV}/${P}.tar.xz"
+else
+ SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-autotools.tar.xz"
+fi
+
+LICENSE="LGPL-2.1+ public-domain BSD BSD-2"
+SLOT="0/1"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~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 )"
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+is_cross() {
+ local enabled_abis=( $(multilib_get_enabled_abis) )
+ [[ "${#enabled_abis[@]}" -le 1 ]] && [[ ${CHOST} != ${CTARGET} ]]
+}
+
+DEPEND="
+ system? (
+ elibc_glibc? (
+ ${CATEGORY}/glibc[-crypt(+)]
+ !${CATEGORY}/glibc[crypt(+)]
+ )
+ elibc_musl? (
+ ${CATEGORY}/musl[-crypt(+)]
+ !${CATEGORY}/musl[crypt(+)]
+ )
+ )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ dev-lang/perl
+ test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') )
+"
+
+python_check_deps() {
+ python_has_version "dev-python/passlib[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if has "distcc" ${FEATURES} ; then
+ ewarn "Please verify all distcc nodes are using the same versions of GCC (>= 10) and Binutils!"
+ ewarn "Older/mismatched versions of GCC may lead to a misbehaving library: bug #823179."
+
+ if [[ ${BUILD_TYPE} != "binary" ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]] ; then
+ die "libxcrypt is known to fail to build or be broken at runtime with < GCC 10 (bug #823179)!"
+ fi
+ fi
+}
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=(
+ $(usev compat 'xcrypt_compat')
+ xcrypt_nocompat
+ )
+
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # WARNING: Please read on bumping or applying patches!
+ #
+ # There are two circular dependencies to be aware of:
+ # 1)
+ # if we're bootstrapping configure and makefiles:
+ # libxcrypt -> automake -> perl -> libxcrypt
+ #
+ # mitigation:
+ # toolchain@ manually runs `make dist` after running autoconf + `./configure`
+ # and the ebuild uses that.
+ # (Don't include the pre-generated Perl artefacts.)
+ #
+ # solution for future:
+ # Upstream are working on producing `make dist` tarballs.
+ # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573
+ #
+ # 2)
+ # configure *unconditionally* needs Perl at build time to generate
+ # a list of enabled algorithms based on the set passed to `configure`:
+ # libxcrypt -> perl -> libxcrypt
+ #
+ # mitigation:
+ # None at the moment.
+ #
+ # solution for future:
+ # Not possible right now. Upstream intend on depending on Perl for further
+ # configuration options.
+ # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573
+ #
+ # Therefore, on changes (inc. bumps):
+ # * You must check whether upstream have started providing tarballs with bootstrapped
+ # auto{conf,make};
+ #
+ # * diff the build system changes!
+ #
+ if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then
+ # Facilitate our split variant build for compat + non-compat
+ eapply "${FILESDIR}"/${PN}-4.4.19-multibuild.patch
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ # Avoid possible "illegal instruction" errors with gold
+ # bug #821496
+ tc-ld-disable-gold
+
+ # Doesn't work with LTO: bug #852917.
+ # https://github.com/besser82/libxcrypt/issues/24
+ filter-lto
+
+ # 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/%s\n" \
+ "$(get_xcprefix)" \
+ "$(usev !split-usr '/usr')" \
+ "$(get_libdir)" \
+ "$(usev !system 'xcrypt')"
+}
+
+get_xcincludedir() {
+ printf -- "%s/usr/include/%s\n" \
+ "$(get_xcprefix)" \
+ "$(usev !system 'xcrypt')"
+}
+
+get_xcmandir() {
+ printf -- "%s/usr/share/man\n" \
+ "$(get_xcprefix)"
+}
+
+get_xcpkgconfigdir() {
+ printf -- "%s/usr/%s/pkgconfig\n" \
+ "$(get_xcprefix)" \
+ "$(get_libdir)"
+}
+
+multilib_src_configure() {
+ local -a myconf=(
+ --host=${CTARGET}
+ --disable-werror
+ --libdir=$(get_xclibdir)
+ --with-pkgconfigdir=$(get_xcpkgconfigdir)
+ --includedir=$(get_xcincludedir)
+ --mandir="$(get_xcmandir)"
+ )
+
+ tc-export PKG_CONFIG
+
+ if is_cross; then
+ if tc-is-clang; then
+ export CC="${CTARGET}-clang"
+ else
+ export CC="${CTARGET}-gcc"
+ fi
+ fi
+
+ case "${MULTIBUILD_ID}" in
+ xcrypt_compat-*)
+ myconf+=(
+ --disable-static
+ --disable-xcrypt-compat-files
+ --enable-obsolete-api=yes
+ )
+ ;;
+ xcrypt_nocompat-*)
+ myconf+=(
+ --enable-obsolete-api=no
+ $(use_enable static-libs static)
+ )
+ ;;
+ *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
+ esac
+
+ if use headers-only; then
+ # Nothing is compiled here which would affect the headers for the target.
+ # So forcing CC is sane.
+ headers_only_flags="CC=$(tc-getBUILD_CC)"
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" "${headers_only_flags}"
+}
+
+src_compile() {
+ use headers-only && return
+
+ multibuild_foreach_variant multilib-minimal_src_compile
+}
+
+multilib_src_test() {
+ emake check
+}
+
+src_test() {
+ multibuild_foreach_variant multilib-minimal_src_test
+}
+
+src_install() {
+ multibuild_foreach_variant multilib-minimal_src_install
+
+ use headers-only || \
+ (
+ shopt -s failglob || die "failglob failed"
+
+ # Make sure our man pages do not collide with glibc or man-pages.
+ for manpage in "${D}$(get_xcmandir)"/man3/crypt{,_r}.?*; do
+ mv -n "${manpage}" "$(dirname "${manpage}")/xcrypt_$(basename "${manpage}")" \
+ || die "mv failed"
+ done
+ ) || die "failglob error"
+
+ # Remove useless stuff from installation
+ find "${ED}"/usr/share/doc/${PF} -type l -delete || die
+ find "${ED}" -name '*.la' -delete || die
+
+ # workaround broken upstream cross-* --docdir by installing files in proper locations
+ if is_cross; then
+ insinto "$(get_xcprefix)"/usr/share
+ doins -r "${ED}"/usr/share/doc
+ rm -r "${ED}"/usr/share/doc || die
+ fi
+}
+
+multilib_src_install() {
+ if use headers-only; then
+ emake DESTDIR="${D}" install-nodist_includeHEADERS
+ return
+ fi
+
+ emake DESTDIR="${D}" install
+
+ # Don't install the libcrypt.so symlink for the "compat" version
+ case "${MULTIBUILD_ID}" in
+ xcrypt_compat-*)
+ rm "${D}"$(get_xclibdir)/libcrypt$(get_libname) \
+ || die "failed to remove extra compat libraries"
+ ;;
+ xcrypt_nocompat-*)
+ if use split-usr; then
+ (
+ if use static-libs; then
+ # .a files are installed to /$(get_libdir) by default
+ # Move static libraries to /usr prefix or portage will abort
+ shopt -s nullglob || die "failglob failed"
+ static_libs=( "${D}"/$(get_xclibdir)/*.a )
+
+ if [[ -n ${static_libs[*]} ]]; then
+ dodir "/usr/$(get_xclibdir)"
+ mv "${static_libs[@]}" "${ED}/usr/$(get_xclibdir)" \
+ || die "Moving static libs failed"
+ fi
+ fi
+
+ if use system; then
+ # Move versionless .so symlinks from /$(get_libdir) to /usr/$(get_libdir)
+ # to allow linker to correctly find shared libraries.
+ shopt -s failglob || die "failglob failed"
+
+ for lib_file in "${D}"$(get_xclibdir)/*$(get_libname); do
+ lib_file_basename="$(basename "${lib_file}")"
+ lib_file_target="$(basename "$(readlink -f "${lib_file}")")"
+
+ # We already know we're in split-usr (checked above)
+ # See bug #843209 (also worth keeping in mind bug #802222 too)
+ local libdir_no_prefix=$(get_xclibdir)
+ libdir_no_prefix=${libdir_no_prefix#${EPREFIX}}
+ libdir_no_prefix=${libdir_no_prefix%/usr}
+ dosym -r "/$(get_libdir)/${lib_file_target}" "/usr/${libdir_no_prefix}/${lib_file_basename}"
+ done
+
+ rm "${D}"$(get_xclibdir)/*$(get_libname) || die "Removing symlinks in incorrect location failed"
+ fi
+ )
+ fi
+ ;;
+ *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";;
+ esac
+}
+
+pkg_preinst() {
+ # Verify we're not in a bad case like bug #843209 with broken symlinks.
+ # This can be dropped when, if ever, the split-usr && system && compat case
+ # is cleaned up in *_src_install.
+ local broken_symlinks=()
+ mapfile -d '' broken_symlinks < <(
+ find "${ED}" -xtype l -print0
+ )
+
+ if [[ ${#broken_symlinks[@]} -gt 0 ]]; then
+ eerror "Broken symlinks found before merging!"
+ local symlink target resolved
+ for symlink in "${broken_symlinks[@]}" ; do
+ target="$(readlink "${symlink}")"
+ resolved="$(readlink -f "${symlink}")"
+ eerror " '${symlink}' -> '${target}' (${resolved})"
+ done
+ die "Broken symlinks found! Aborting to avoid damaging system. Please report a bug."
+ fi
+}
diff --git a/sys-libs/libxcrypt/metadata.xml b/sys-libs/libxcrypt/metadata.xml
index d84b73d6af1e..cef5e501f632 100644
--- a/sys-libs/libxcrypt/metadata.xml
+++ b/sys-libs/libxcrypt/metadata.xml
@@ -1,20 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="project">
- <email>hardened@gentoo.org</email>
- <name>Gentoo Hardened</name>
- </maintainer>
- <longdescription>
- Crypt library for DES, MD5, and blowfish. Libxcrypt is a replacement for
- libcrypt, which comes with the GNU C Library. It supports DES crypt,
- MD5, and passwords with blowfish encryption.
- </longdescription>
- <use>
- <flag name="compat">Build with compatibility interfaces for other crypt implementations</flag>
- <flag name="system">Install as system libcrypt.so rather than to an alternate directory (will collide with sys-libs/glibc's version)</flag>
- </use>
- <upstream>
- <remote-id type="github">besser82/libxcrypt</remote-id>
- </upstream>
+ <maintainer type="project">
+ <email>toolchain@gentoo.org</email>
+ <name>Gentoo Toolchain Project</name>
+ </maintainer>
+ <longdescription>
+ Crypt library for DES, MD5, and blowfish. Libxcrypt is a replacement for
+ libcrypt, which comes with the GNU C Library. It supports DES crypt,
+ MD5, and passwords with blowfish encryption.
+ </longdescription>
+ <use>
+ <flag name="compat">Build with compatibility interfaces for other crypt implementations</flag>
+ <flag name="system">Install as system libcrypt.so rather than to an alternate directory (will collide with <pkg>sys-libs/glibc</pkg>'s version)</flag>
+ <flag name="headers-only">Build and install only the headers.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">besser82/libxcrypt</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest
index 8ceb93829922..bd71f2e58a68 100644
--- a/sys-libs/llvm-libunwind/Manifest
+++ b/sys-libs/llvm-libunwind/Manifest
@@ -1,5 +1,10 @@
-DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff219888706d2b79d5296590934714e42ac79f6a6547941ac2b1d2c4e6313dd18b6c7068e748aa6ac033e49fccbf5d355aa8191 SHA512 baa182d62fef1851836013ae8a1a00861ea89769778d67fb97b407a9de664e6c85da2af9c5b3f75d2bf34ff6b00004e531ca7e4b3115a26c0e61c575cf2303a0
-DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
-DIST llvmorg-11.0.0-rc1.tar.gz 122688246 BLAKE2B 10ff3f08ff3780abb1d86ac67942e6aac52ff5daf820a2e3d23d8b79dbade1c5b1d398d0a577028d2d7c8759ab9a8b552a0305b5750310a015585c06cdadf844 SHA512 09564ed903902a5795fffaa4679badc30bf49739889a48074b5ae2c93bd29000cfb36a650208d5cae5d74899bade066f84b4aa023fc852eec246ff67bf64a267
-DIST llvmorg-11.0.0-rc2.tar.gz 122728230 BLAKE2B 7944adf41ec7cd82489666a0a38a857de628879d59a2e3bb566b67c18500092430db66ff214d45cb324128c874a74a72c367b452df3b88ec95b33c284dd35512 SHA512 25eb2879eb22e79a1e840ef24cf3f5eec602e947101db299393e06e3d09f2d1531eef214264636e1b511eafff7f51b1834d5a03976ccd088eb680745b147e9f3
-DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
+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-10.0.0.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-10.0.0.ebuild
deleted file mode 100644
index 782f15e8964f..000000000000
--- a/sys-libs/llvm-libunwind/llvm-libunwind-10.0.0.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-LLVM_COMPONENTS=( libunwind )
-LLVM_TEST_COMPONENTS=( libcxx{,abi} )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 x86"
-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}]') )"
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-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)
- local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
-
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
- -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
- )
- fi
-
- cmake-utils_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=ONF
- -DLIBCXXABI_USE_LLVM_UNWINDER=ON
- -DLIBCXXABI_INCLUDE_TESTS=OFF
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include
- )
-
- cmake-utils_src_configure
- cmake-utils_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-utils_src_configure
- cmake-utils_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-utils_src_make check-unwind
-}
-
-multilib_src_install() {
- cmake-utils_src_install
-
- # install headers like sys-libs/libunwind
- doheader "${S}"/include/*.h
-}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-10.0.1.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-10.0.1.ebuild
deleted file mode 100644
index 0035a57ad502..000000000000
--- a/sys-libs/llvm-libunwind/llvm-libunwind-10.0.1.ebuild
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..9} )
-inherit cmake-multilib llvm llvm.org python-any-r1
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-LLVM_COMPONENTS=( libunwind )
-LLVM_TEST_COMPONENTS=( libcxx{,abi} )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-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}]') )"
-
-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=ONF
- -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-11.0.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-11.0.0.9999.ebuild
deleted file mode 100644
index fff362b926dc..000000000000
--- a/sys-libs/llvm-libunwind/llvm-libunwind-11.0.0.9999.ebuild
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..9} )
-inherit cmake-multilib llvm llvm.org python-any-r1
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-LLVM_COMPONENTS=( libunwind )
-LLVM_TEST_COMPONENTS=( libcxx{,abi} llvm/cmake )
-llvm.org_set_globals
-
-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}]') )"
-
-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=ONF
- -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-11.0.0_rc1.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-11.0.0_rc1.ebuild
deleted file mode 100644
index fff362b926dc..000000000000
--- a/sys-libs/llvm-libunwind/llvm-libunwind-11.0.0_rc1.ebuild
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..9} )
-inherit cmake-multilib llvm llvm.org python-any-r1
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-LLVM_COMPONENTS=( libunwind )
-LLVM_TEST_COMPONENTS=( libcxx{,abi} llvm/cmake )
-llvm.org_set_globals
-
-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}]') )"
-
-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=ONF
- -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-11.0.0_rc2.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-11.0.0_rc2.ebuild
deleted file mode 100644
index fff362b926dc..000000000000
--- a/sys-libs/llvm-libunwind/llvm-libunwind-11.0.0_rc2.ebuild
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..9} )
-inherit cmake-multilib llvm llvm.org python-any-r1
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-LLVM_COMPONENTS=( libunwind )
-LLVM_TEST_COMPONENTS=( libcxx{,abi} llvm/cmake )
-llvm.org_set_globals
-
-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}]') )"
-
-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=ONF
- -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.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-12.0.0.9999.ebuild
deleted file mode 100644
index fff362b926dc..000000000000
--- a/sys-libs/llvm-libunwind/llvm-libunwind-12.0.0.9999.ebuild
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{6..9} )
-inherit cmake-multilib llvm llvm.org python-any-r1
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-LLVM_COMPONENTS=( libunwind )
-LLVM_TEST_COMPONENTS=( libcxx{,abi} llvm/cmake )
-llvm.org_set_globals
-
-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}]') )"
-
-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=ONF
- -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-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/llvm-libunwind-9.0.1.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-9.0.1.ebuild
deleted file mode 100644
index 782f15e8964f..000000000000
--- a/sys-libs/llvm-libunwind/llvm-libunwind-9.0.1.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-LLVM_COMPONENTS=( libunwind )
-LLVM_TEST_COMPONENTS=( libcxx{,abi} )
-llvm.org_set_globals
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 x86"
-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}]') )"
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-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)
- local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
-
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-
- mycmakeargs+=(
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
- -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
- )
- fi
-
- cmake-utils_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=ONF
- -DLIBCXXABI_USE_LLVM_UNWINDER=ON
- -DLIBCXXABI_INCLUDE_TESTS=OFF
-
- -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
- -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include
- )
-
- cmake-utils_src_configure
- cmake-utils_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-utils_src_configure
- cmake-utils_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-utils_src_make check-unwind
-}
-
-multilib_src_install() {
- cmake-utils_src_install
-
- # install headers like sys-libs/libunwind
- doheader "${S}"/include/*.h
-}
diff --git a/sys-libs/llvm-libunwind/metadata.xml b/sys-libs/llvm-libunwind/metadata.xml
index cfce3f1a81b3..9e58371ca860 100644
--- a/sys-libs/llvm-libunwind/metadata.xml
+++ b/sys-libs/llvm-libunwind/metadata.xml
@@ -1,10 +1,14 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<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/lwp/lwp-2.8.ebuild b/sys-libs/lwp/lwp-2.8.ebuild
index 42499946341a..fae40ac99897 100644
--- a/sys-libs/lwp/lwp-2.8.ebuild
+++ b/sys-libs/lwp/lwp-2.8.ebuild
@@ -1,8 +1,7 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-inherit ltprune
+EAPI=7
DESCRIPTION="Light-weight process library (used by Coda)"
HOMEPAGE="http://www.coda.cs.cmu.edu/"
@@ -11,7 +10,6 @@ SRC_URI="http://www.coda.cs.cmu.edu/pub/lwp/src/${P}.tar.xz"
LICENSE="LGPL-2.1"
SLOT="1"
KEYWORDS="~alpha amd64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86"
-IUSE=""
PATCHES=(
"${FILESDIR}"/${P}-ia64.patch
@@ -23,5 +21,5 @@ src_configure() {
src_install() {
default
- prune_libtool_files
+ find "${ED}" -name '*.la' -delete || die
}
diff --git a/sys-libs/lwp/metadata.xml b/sys-libs/lwp/metadata.xml
index 6f49eba8f496..85e4ed814fa2 100644
--- a/sys-libs/lwp/metadata.xml
+++ b/sys-libs/lwp/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
</pkgmetadata>
diff --git a/sys-libs/metadata.xml b/sys-libs/metadata.xml
index bb3bb995d357..a80e992f1722 100644
--- a/sys-libs/metadata.xml
+++ b/sys-libs/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE catmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<catmetadata>
<longdescription lang="en">
The sys-libs category contains various system-level libraries.
@@ -29,4 +29,3 @@
Kategoria sys-libs zawiera biblioteki systemowe.
</longdescription>
</catmetadata>
-
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/minizip-ng/metadata.xml b/sys-libs/minizip-ng/metadata.xml
new file mode 100644
index 000000000000..f712872be38f
--- /dev/null
+++ b/sys-libs/minizip-ng/metadata.xml
@@ -0,0 +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="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="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 01ea67263abc..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 "http://www.gentoo.org/dtd/metadata.dtd">
+<!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 b815bf1d83d1..e427325f3747 100644
--- a/sys-libs/mtdev/mtdev-1.1.6.ebuild
+++ b/sys-libs/mtdev/mtdev-1.1.6.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
@@ -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 ~mips ppc ppc64 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 72daae63035d..88436bb5a431 100644
--- a/sys-libs/musl-nscd/Manifest
+++ b/sys-libs/musl-nscd/Manifest
@@ -1 +1 @@
-DIST musl-nscd-1.0.2.tar.gz 44912 BLAKE2B 8a496c941232ba617b8468351cbbb780b1decc2c162210f939abb3baa430a5f5a79e21fcd3aadac2cbe62820452fc18001edc7ebc13cae7a6ab768353c45235f SHA512 45cd73f1e0eee7b32c3dcdfa96c0a11379f6208389b87fee97016af0ecb19e9e7d2a2f10e0df6e5ed8a6ad4bbbef70c01cd31ac3631fb1bcce6e69bf48843a3d
+DIST musl-nscd-1.1.1.tar.gz 51598 BLAKE2B 0c14cfed06f766e174154cdedf046eee8206822d21ce6ac0f1d2c253224a9c8be2fabe6a7d9c0e7c63d1811e3ccf06ca7b2c9dcb728cde445108039723e486c2 SHA512 f067b1491c6c46c3070aa2f61328b874eb6ad390c2efc928e2fee591ef5997b40400e29495546a861e803460efa46024c7a01c53ddae5b763ef63c2f274fceea
diff --git a/sys-libs/musl-nscd/metadata.xml b/sys-libs/musl-nscd/metadata.xml
index 24c6fe3f9982..05898e0c25df 100644
--- a/sys-libs/musl-nscd/metadata.xml
+++ b/sys-libs/musl-nscd/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>blueness@gentoo.org</email>
diff --git a/sys-libs/musl-nscd/musl-nscd-1.0.2.ebuild b/sys-libs/musl-nscd/musl-nscd-1.1.1-r1.ebuild
index 6d29e439755c..775e2a99b755 100644
--- a/sys-libs/musl-nscd/musl-nscd-1.0.2.ebuild
+++ b/sys-libs/musl-nscd/musl-nscd-1.1.1-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit systemd
+inherit systemd tmpfiles
DESCRIPTION="musl-nscd is an implementation of the NSCD protocol for the musl libc"
HOMEPAGE="https://github.com/pikhq/musl-nscd"
@@ -22,8 +22,8 @@ SLOT="0"
IUSE="minimal"
DEPEND="
- !sys-libs/glibc
- !sys-libs/uclibc"
+ !sys-libs/glibc"
+RDEPEND="${DEPEND}"
src_prepare() {
eapply_user
@@ -39,8 +39,14 @@ src_install() {
newinitd "${FILESDIR}"/nscd.initd nscd
systemd_dounit "${FILESDIR}"/nscd.service
- systemd_newtmpfilesd "${FILESDIR}"/nscd.tmpfilesd nscd.conf
+ newtmpfiles "${FILESDIR}"/nscd.tmpfilesd nscd.conf
dodoc README
fi
}
+
+pkg_postinst() {
+ if ! use minimal; then
+ tmpfiles_process nscd.conf
+ fi
+}
diff --git a/sys-libs/musl-nscd/musl-nscd-9999.ebuild b/sys-libs/musl-nscd/musl-nscd-9999.ebuild
index 6d29e439755c..775e2a99b755 100644
--- a/sys-libs/musl-nscd/musl-nscd-9999.ebuild
+++ b/sys-libs/musl-nscd/musl-nscd-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit systemd
+inherit systemd tmpfiles
DESCRIPTION="musl-nscd is an implementation of the NSCD protocol for the musl libc"
HOMEPAGE="https://github.com/pikhq/musl-nscd"
@@ -22,8 +22,8 @@ SLOT="0"
IUSE="minimal"
DEPEND="
- !sys-libs/glibc
- !sys-libs/uclibc"
+ !sys-libs/glibc"
+RDEPEND="${DEPEND}"
src_prepare() {
eapply_user
@@ -39,8 +39,14 @@ src_install() {
newinitd "${FILESDIR}"/nscd.initd nscd
systemd_dounit "${FILESDIR}"/nscd.service
- systemd_newtmpfilesd "${FILESDIR}"/nscd.tmpfilesd nscd.conf
+ 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 b395b0fd819c..db22821f8a4a 100644
--- a/sys-libs/musl/Manifest
+++ b/sys-libs/musl/Manifest
@@ -1,6 +1,9 @@
DIST getconf.c 11614 BLAKE2B ba49a573fc16d51780a0b0b81fbf7b64a1142f1dbad203c9609a59b6b07e7404f676c415383ae88c0aede95694821f6ee381bffd93cc3330501e17dc07d122bd SHA512 0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d
-DIST getent.c 9438 BLAKE2B dc20353583c10a001bd8fe8474f32b70254dc56da186d1cdbaf4081570c3d7a10497024da5815a485fc4728adc9eebd270aec99ba93b7546b38c728978e3e00b SHA512 b35de9847353b273516162ed4828a810c6130fc5b7de44ee4433003b3f99647b25792d9b1c40dfc67069add11f3fb850e5c35d4f1912dccac108059bbbdfd5a2
DIST iconv.c 2577 BLAKE2B 070ca87b30c90ab98c27d5faf7a2fcb64ff7c67ca212ee6072165b2146979c551f714954dbd465462a171837c59b6ea027e0206458a2df0f977e45f01be3ce48 SHA512 9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf
-DIST musl-1.1.24.tar.gz 1024988 BLAKE2B 5fa26746eed0f2334b740adf94a8400568d56d9b2276bf1fbac828f9b707b4e215d3c16af9ea048b9d771f1d0a58ada3bc6e1bf0ba8f5fa693f5042fc6af30df SHA512 8987f1e194ea616f34f4f21fe9def28fb7f81d7060e38619206c6349f79db3bbb76bae8b711f5f9b8ed038799c9aea1a4cbec69e0bc4131e246203e133149e77
-DIST musl-1.2.0.tar.gz 1035265 BLAKE2B 0a47e0f438cca0f3ce31ae024c19358160214842115b560efc48e66228055c9147d9550957a79425322d510ba773f197d0944bb844bf6addbbf698088a3358a9 SHA512 58bd88189a6002356728cea1c6f6605a893fe54f7687595879add4eab283c8692c3b031eb9457ad00d1edd082cfe62fcc0eb5eb1d3bf4f1d749c0efa2a95fec1
-DIST musl-1.2.1.tar.gz 1047481 BLAKE2B 5ccdee248d4caa1b433ab9c56cce3842fb46a269fd6a53d0880ba5eaad208997306e6b56fd345917e5076714fbfac0804ea226e6dc3f0f2e75f8c824a7155535 SHA512 455464ef47108a78457291bda2b1ea574987a1787f6001e9376956f20521593a4816bc215dab41c1a80292ae7ebd315accb4d4fa6a1210ff77d9a4d68239e960
+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-r3 b/sys-libs/musl/files/ldconfig.in-r3
new file mode 100644
index 000000000000..60f6cc9e1130
--- /dev/null
+++ b/sys-libs/musl/files/ldconfig.in-r3
@@ -0,0 +1,160 @@
+#!/bin/bash -e
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+ROOT="/"
+EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
+LDSO_CONF_FILE="/etc/ld.so.conf"
+
+VERBOSE=0
+
+UPDATE_LINKS=1
+
+get_options() {
+ LDSO_CONF=""
+ while getopts "vnNXf:C:r:p" opt "$@"; do
+ case $opt in
+ v)
+ echo "ldconfig for musl in Gentoo"
+ VERBOSE=1
+ ;;
+ r)
+ ROOT=${OPTARG}
+ ;;
+ f)
+ LDSO_CONF=${OPTARG}
+ ;;
+ X)
+ UPDATE_LINKS=0
+ ;;
+ \?)
+ echo "Invalid option: -${opt}" >&2
+ exit 1
+ ;;
+ n|N|C|p)
+ echo "Unimplemented option: -${opt}" >&2
+ exit 1
+ ;;
+ esac
+ done
+ if [[ -z ${LDSO_CONF} ]]; then
+ LDSO_CONF=${ROOT}${EPREFIX}${LDSO_CONF_FILE}
+ fi
+
+ if [[ ${UPDATE_LINKS} == 1 ]]; then
+ echo "Updating links is not implemented."
+ fi
+}
+
+
+repeated() {
+ local l=${1}
+ local drs="${@:2}"
+ for m in ${drs}; do
+ [[ ${m} == ${l} ]] && return 0
+ done
+ return 1
+}
+
+expand() {
+ # We are assuming the ld.so.conf's 'include' is not recursive
+ local f line l
+ local glob="${LDSO_CONF_DIR}/${1}"
+ local drs="${@:2} "
+
+ for f in ${glob}; do
+ [[ ! -f ${f} ]] && continue
+ while read line; do
+ line=${line%%#*}
+ line=${line//:/ }
+ line=${line//,/ }
+ for l in ${line}; do
+ # We must add this whether or not the directory exists
+ repeated ${l} ${drs} && continue
+ drs+=" ${l} "
+ done
+ done < ${f}
+ done
+
+ echo ${drs}
+}
+
+read_ldso_conf() {
+ local drs=" "
+
+ while read line; do
+ # Sanitize the line - see ldconfig(8) for delimiters
+ # Note: bash read turns tabs into spaces and read already
+ # delimits on newlines with the default $IFS
+ line=${line%%#*} # Remove comments
+ line=${line//:/ } # Change colon delimiter to space
+ line=${line//,/ } # Change comma delimiter to space
+
+ next=0
+ for l in ${line}; do
+ if [[ ${next} == 1 ]]; then
+ next=0
+ drs=$(expand ${l} ${drs})
+ elif [[ ${l} == "include" ]]; then
+ next=1
+ else
+ # glibc's ldconfig silently skips non directories
+ if [[ -d ${l} ]]; then
+ repeated ${l} ${drs} && continue
+ drs+=" ${l} "
+ fi
+ fi
+ done
+ done < ${1}
+
+ echo ${drs}
+}
+
+sanitize() {
+ local drs=$@
+
+ repeated "${EPREFIX}/lib" ${drs} || drs="${EPREFIX}/lib ${drs}"
+ repeated "${EPREFIX}/usr/lib" ${drs} || drs="${EPREFIX}/usr/lib ${drs}"
+
+ echo ${drs}
+}
+
+changed() {
+ [[ -f ${ETC_LDSO_PATH} ]] || return 0
+ local current=$(<${ETC_LDSO_PATH})
+ current=${current//$'\n'/ }
+ [[ ${current} != ${drs} ]] || return 1
+}
+
+get_options "$@"
+
+if [[ ! -e ${LDSO_CONF} ]]; then
+ echo "${LDSO_CONF} not found" >&2
+ exit 1
+fi
+
+LDSO_CONF_DIR=$(dirname ${LDSO_CONF})
+
+drs=$(read_ldso_conf "${LDSO_CONF}")
+drs=$(sanitize ${drs})
+
+ARCH=@@ARCH@@
+LDSO_PATH="${ROOT}${EPREFIX}/lib/ld-musl-${ARCH}.so.1"
+if [[ ! -e ${LDSO_PATH} ]]; then
+ echo "${LDSO_PATH} not found" >&2
+ exit 1
+fi
+
+LDSO_ARCH=$(basename ${LDSO_PATH})
+LDSO_NAME=${LDSO_ARCH%.so.1}
+ETC_LDSO_PATH="${ROOT}${EPREFIX}/etc/${LDSO_NAME}.path"
+
+changed || exit 0
+X=$(mktemp -p /tmp ${LDSO_NAME}.XXXXXX)
+for d in ${drs}; do
+ echo ${d} >> ${X}
+done
+chmod 644 ${X}
+# busybox doesn't support mz -Z
+cp ${X} ${ETC_LDSO_PATH}
+rm ${X}
diff --git a/sys-libs/musl/files/musl-1.2.4-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/files/stack_chk_fail_local.c b/sys-libs/musl/files/stack_chk_fail_local.c
new file mode 100644
index 000000000000..e1c903a3b635
--- /dev/null
+++ b/sys-libs/musl/files/stack_chk_fail_local.c
@@ -0,0 +1,45 @@
+/* Stack protector support.
+ Copyright (C) 2005-2019 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+In addition to the permissions in the GNU General Public License, the
+Free Software Foundation gives you unlimited permission to link the
+compiled version of this file into combinations with other programs,
+and to distribute those combinations without any restriction coming
+from the use of this file. (The General Public License restrictions
+do apply in other respects; for example, they cover modification of
+the file, and distribution when not linked into a combine
+executable.)
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+extern void __stack_chk_fail (void);
+
+/* Some targets can avoid loading a GP for calls to hidden functions.
+ Using this entry point may avoid the load of a GP entirely for the
+ function, making the overall code smaller. */
+
+void
+__attribute__((visibility ("hidden")))
+__stack_chk_fail_local (void)
+{
+ __stack_chk_fail ();
+}
diff --git a/sys-libs/musl/metadata.xml b/sys-libs/musl/metadata.xml
index d74962a333bd..e3dfac351e2a 100644
--- a/sys-libs/musl/metadata.xml
+++ b/sys-libs/musl/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>blueness@gentoo.org</email>
@@ -12,4 +12,8 @@
<email>toolchain@gentoo.org</email>
<name>Gentoo Toolchain Project</name>
</maintainer>
+ <maintainer type="project">
+ <email>musl@gentoo.org</email>
+ <name>Musl project</name>
+ </maintainer>
</pkgmetadata>
diff --git a/sys-libs/musl/musl-1.1.24.ebuild b/sys-libs/musl/musl-1.1.24.ebuild
deleted file mode 100644
index 453281e19f28..000000000000
--- a/sys-libs/musl/musl-1.1.24.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit eutils flag-o-matic multilib toolchain-funcs
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.musl-libc.org/musl"
- inherit git-r3
- SRC_URI="
- https://dev.gentoo.org/~blueness/musl-misc/getconf.c
- https://dev.gentoo.org/~blueness/musl-misc/getent.c
- https://dev.gentoo.org/~blueness/musl-misc/iconv.c"
- KEYWORDS=""
-else
- SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz
- https://dev.gentoo.org/~blueness/musl-misc/getconf.c
- https://dev.gentoo.org/~blueness/musl-misc/getent.c
- https://dev.gentoo.org/~blueness/musl-misc/iconv.c"
- KEYWORDS="-* amd64 arm arm64 ~mips ppc ppc64 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="Light, fast and simple C library focused on standards-conformance and safety"
-HOMEPAGE="http://www.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_configure() {
- tc-getCC ${CTARGET}
- just_headers && export CC=true
-
- local sysroot
- is_crosscompile && sysroot=/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
- $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getconf.c -o "${T}"/getconf || die
- $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getent.c -o "${T}"/getent || die
- $(tc-getCC) ${CFLAGS} "${DISTDIR}"/iconv.c -o "${T}"/iconv || die
- fi
-}
-
-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
- fi
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- [ "${ROOT}" != "/" ] && return 0
-
- ldconfig || die
-}
diff --git a/sys-libs/musl/musl-1.2.0-r1.ebuild b/sys-libs/musl/musl-1.2.0-r1.ebuild
deleted file mode 100644
index 170c94aedcf4..000000000000
--- a/sys-libs/musl/musl-1.2.0-r1.ebuild
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit eutils flag-o-matic multilib toolchain-funcs
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.musl-libc.org/musl"
- inherit git-r3
- SRC_URI="
- https://dev.gentoo.org/~blueness/musl-misc/getconf.c
- https://dev.gentoo.org/~blueness/musl-misc/getent.c
- https://dev.gentoo.org/~blueness/musl-misc/iconv.c"
- KEYWORDS=""
-else
- SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz
- https://dev.gentoo.org/~blueness/musl-misc/getconf.c
- https://dev.gentoo.org/~blueness/musl-misc/getent.c
- https://dev.gentoo.org/~blueness/musl-misc/iconv.c"
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~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="Light, fast and simple C library focused on standards-conformance and safety"
-HOMEPAGE="http://www.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_configure() {
- tc-getCC ${CTARGET}
- just_headers && export CC=true
-
- local sysroot
- is_crosscompile && sysroot=/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="${DISTDIR}"
- fi
-}
-
-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
- fi
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- [ "${ROOT}" != "/" ] && return 0
-
- ldconfig || die
-}
diff --git a/sys-libs/musl/musl-1.2.1.ebuild b/sys-libs/musl/musl-1.2.1.ebuild
deleted file mode 100644
index 69c39b164c3f..000000000000
--- a/sys-libs/musl/musl-1.2.1.ebuild
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit eutils flag-o-matic multilib toolchain-funcs
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.musl-libc.org/musl"
- inherit git-r3
- SRC_URI="
- https://dev.gentoo.org/~blueness/musl-misc/getconf.c
- https://dev.gentoo.org/~blueness/musl-misc/getent.c
- https://dev.gentoo.org/~blueness/musl-misc/iconv.c"
- KEYWORDS=""
-else
- SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz
- https://dev.gentoo.org/~blueness/musl-misc/getconf.c
- https://dev.gentoo.org/~blueness/musl-misc/getent.c
- https://dev.gentoo.org/~blueness/musl-misc/iconv.c"
- KEYWORDS="-* amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 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="Light, fast and simple C library focused on standards-conformance and safety"
-HOMEPAGE="http://www.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_configure() {
- tc-getCC ${CTARGET}
- just_headers && export CC=true
-
- local sysroot
- is_crosscompile && sysroot=/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="${DISTDIR}"
- fi
-}
-
-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
- 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 170c94aedcf4..6f769c7aa732 100644
--- a/sys-libs/musl/musl-9999.ebuild
+++ b/sys-libs/musl/musl-9999.ebuild
@@ -1,75 +1,108 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
-inherit eutils flag-o-matic multilib 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
- SRC_URI="
- https://dev.gentoo.org/~blueness/musl-misc/getconf.c
- https://dev.gentoo.org/~blueness/musl-misc/getent.c
- https://dev.gentoo.org/~blueness/musl-misc/iconv.c"
- KEYWORDS=""
else
- SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz
- https://dev.gentoo.org/~blueness/musl-misc/getconf.c
- https://dev.gentoo.org/~blueness/musl-misc/getent.c
- https://dev.gentoo.org/~blueness/musl-misc/iconv.c"
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86"
-fi
+ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/musl.asc
+ inherit verify-sig
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
+ 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
-DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
-HOMEPAGE="http://www.musl-libc.org/"
+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="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
+ 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
- is_crosscompile && sysroot=/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
}
@@ -78,14 +111,17 @@ 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}" \
CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}" \
- VPATH="${DISTDIR}"
+ 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() {
@@ -95,20 +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)
- [[ -e "${D}"/lib/ld-musl-${arch}.so.1 ]] || die
- cp "${FILESDIR}"/ldconfig.in "${T}" || die
+
+ # 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
@@ -118,12 +176,27 @@ src_install() {
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/metadata.xml b/sys-libs/native-uuid/metadata.xml
index 64c864af679a..7cb96120e236 100644
--- a/sys-libs/native-uuid/metadata.xml
+++ b/sys-libs/native-uuid/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>grobian@gentoo.org</email>
diff --git a/sys-libs/native-uuid/native-uuid-1.0.ebuild b/sys-libs/native-uuid/native-uuid-1.0-r1.ebuild
index 2f7e48e9fc4a..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-2018 Gentoo Foundation
+# 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 ~x86-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 469b95c8516f..2705fdade801 100644
--- a/sys-libs/ncurses-compat/Manifest
+++ b/sys-libs/ncurses-compat/Manifest
@@ -1,3 +1,138 @@
-DIST ncurses-5.9.tar.gz 2826473 BLAKE2B 91101b049a5eb6a2674fb86b5eba56515207f490dc7a6348f3194bbc50649717a26aff7a0df64f67ca318b5f244455cd57e760c65b9e551f6ec65b8c035a6ae1 SHA512 d7c5e54b6d4d8b9211f0006ca8786f7609d180cc1aaebf4f25e7e35e12959779cf66447359a602daed625621ca32b0d910d67aef3eb8b6fdc3c373819a88faa1
-DIST ncurses-6.1-20190609-patch.sh.bz2 602174 BLAKE2B 38b1cb1f376b8fdfddc7cf9ed8e10190dd50fc2315f11eaf3a14c0299167c0e6bbd82a3684fa83d6e8fa6d2f02ea14e88ea065f8bb886905d85788bde13731c0 SHA512 efd009f5087a7b16413b94ce37ad19da0df8974be579b742d57bc64e034792ccf03b9967593a0ac5c90522ccfde4b6d23ef763d6fbeb91a5f327f8d7a0970872
-DIST ncurses-6.1.tar.gz 3365395 BLAKE2B 1248a5088bc982d0880cb9550b1192457f6f624937c4b66807668c22a608002ba6c38d876986f2c2b9ee46f91d087c88bc0b19920733e4c7ca0ed8e92d9d47de SHA512 e308af43f8b7e01e98a55f4f6c4ee4d1c39ce09d95399fa555b3f0cdf5fd0db0f4c4d820b4af78a63f6cf6d8627587114a40af48cfc066134b600520808a77ee
+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.8-gfbsd.patch b/sys-libs/ncurses-compat/files/ncurses-5.8-gfbsd.patch
deleted file mode 100644
index 0200a14462af..000000000000
--- a/sys-libs/ncurses-compat/files/ncurses-5.8-gfbsd.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-we'll hijack the freebsd* case that comes later
-
---- ncurses-5.6/aclocal.m4
-+++ ncurses-5.6/aclocal.m4
-@@ -3806,7 +3806,7 @@
- fi
- cf_cv_rm_so_locs=yes
- ;;
-- linux*|gnu*|k*bsd*-gnu) #(vi
-+ linux*|gnu*|k*bsd*-gnu|freebsd*|dragonfly*) #(vi
- if test "$DFT_LWR_MODEL" = "shared" ; then
- LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
- LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
---- ncurses-5.6/configure
-+++ ncurses-5.6/configure
-@@ -3806,7 +3806,7 @@
- fi
- cf_cv_rm_so_locs=yes
- ;;
-- linux*|gnu*|k*bsd*-gnu) #(vi
-+ linux*|gnu*|k*bsd*-gnu|freebsd*|dragonfly*) #(vi
- if test "$DFT_LWR_MODEL" = "shared" ; then
- LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
- LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
diff --git a/sys-libs/ncurses-compat/files/ncurses-5.9-fix-clang-build.patch b/sys-libs/ncurses-compat/files/ncurses-5.9-fix-clang-build.patch
deleted file mode 100644
index 0c6ca7acc4fc..000000000000
--- a/sys-libs/ncurses-compat/files/ncurses-5.9-fix-clang-build.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff --git a/ncurses-5.9/c++/cursesf.h b/ncurses-5.9/c++/cursesf.h
-index 70a30c3..db38063 100644
---- a/ncurses-5.9/c++/cursesf.h
-+++ b/ncurses-5.9/c++/cursesf.h
-@@ -677,7 +677,7 @@ protected:
- }
-
- public:
-- NCursesUserForm (NCursesFormField Fields[],
-+ NCursesUserForm (NCursesFormField* Fields[],
- const T* p_UserData = STATIC_CAST(T*)(0),
- bool with_frame=FALSE,
- bool autoDelete_Fields=FALSE)
-@@ -686,7 +686,7 @@ public:
- set_user (const_cast<void *>(p_UserData));
- };
-
-- NCursesUserForm (NCursesFormField Fields[],
-+ NCursesUserForm (NCursesFormField* Fields[],
- int nlines,
- int ncols,
- int begin_y = 0,
-diff --git a/ncurses-5.9/c++/cursesm.h b/ncurses-5.9/c++/cursesm.h
-index d9c2273..2d5b79a 100644
---- a/ncurses-5.9/c++/cursesm.h
-+++ b/ncurses-5.9/c++/cursesm.h
-@@ -635,7 +635,7 @@ protected:
- }
-
- public:
-- NCursesUserMenu (NCursesMenuItem Items[],
-+ NCursesUserMenu (NCursesMenuItem* Items[],
- const T* p_UserData = STATIC_CAST(T*)(0),
- bool with_frame=FALSE,
- bool autoDelete_Items=FALSE)
-@@ -644,7 +644,7 @@ public:
- set_user (const_cast<void *>(p_UserData));
- };
-
-- NCursesUserMenu (NCursesMenuItem Items[],
-+ NCursesUserMenu (NCursesMenuItem* Items[],
- int nlines,
- int ncols,
- int begin_y = 0,
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-5.9-no-I-usr-include.patch b/sys-libs/ncurses-compat/files/ncurses-5.9-no-I-usr-include.patch
deleted file mode 100644
index 5c968e76c378..000000000000
--- a/sys-libs/ncurses-compat/files/ncurses-5.9-no-I-usr-include.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-https://bugs.gentoo.org/522586
-
-delete the -I$includedir paths that get added to CPPFLAGS. these are never
-needed when building natively or cross-compiling and really get in the way
-in both cases (upgrades/cross-compiling/etc...).
-
-extracted from the upstream change:
-http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff;h=9ee3995474454b7d956885e0fe5c8cac2ae25d42#patch5
-
---- a/configure
-+++ b/configure
-@@ -18596,33 +18596,11 @@ CPPFLAGS="$CPPFLAGS -I. -I../include"
- if test "$srcdir" != "."; then
- CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
- fi
--if test "$GCC" != yes; then
-- CPPFLAGS="$CPPFLAGS -I\${includedir}"
--elif test "$includedir" != "/usr/include"; then
-- if test "$includedir" = '${prefix}/include' ; then
-- if test $prefix != /usr ; then
-- CPPFLAGS="$CPPFLAGS -I\${includedir}"
-- fi
-- else
-- CPPFLAGS="$CPPFLAGS -I\${includedir}"
-- fi
--fi
-
- ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
- if test "$srcdir" != "."; then
- ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
- fi
--if test "$GCC" != yes; then
-- ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
--elif test "$includedir" != "/usr/include"; then
-- if test "$includedir" = '${prefix}/include' ; then
-- if test $prefix != /usr ; then
-- ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
-- fi
-- else
-- ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
-- fi
--fi
-
- ### Build up pieces for makefile rules
- echo "$as_me:18628: checking default library suffix" >&5
diff --git a/sys-libs/ncurses-compat/files/ncurses-5.9-pkg-config.patch b/sys-libs/ncurses-compat/files/ncurses-5.9-pkg-config.patch
deleted file mode 100644
index 7c3c04a449f8..000000000000
--- a/sys-libs/ncurses-compat/files/ncurses-5.9-pkg-config.patch
+++ /dev/null
@@ -1,26 +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.
-
-disable the existence test for the PKG_CONFIG_LIBDIR dir. it breaks when you
-cross-compile for an ABI that doesn't exist in the root dir (--build).
-
---- a/configure
-+++ b/configure
-@@ -3582,7 +3582,7 @@ fi
- 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"
-@@ -3626,7 +3626,7 @@ echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C
- PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
- fi
- PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
-- if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
-+ if test -n "$PKG_CONFIG_LIBDIR" ; then
-
- # Check whether --enable-pc-files or --disable-pc-files was given.
- if test "${enable_pc_files+set}" = set; then
diff --git a/sys-libs/ncurses-compat/files/ncurses-5.9-rxvt-unicode-9.15.patch b/sys-libs/ncurses-compat/files/ncurses-5.9-rxvt-unicode-9.15.patch
deleted file mode 100644
index b6d1924cbe7e..000000000000
--- a/sys-libs/ncurses-compat/files/ncurses-5.9-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
-
---- misc/terminfo.src
-+++ misc/terminfo.src
-@@ -4208,6 +4208,176 @@
- rxvt-16color|xterm 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 0.5.4
- #
- # mrxvt is based on rxvt 2.7.11, but has by default XTERM_FKEYS defined, which
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 471b2667ab5b..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 "http://www.gentoo.org/dtd/metadata.dtd">
+<!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-5.9.ebuild b/sys-libs/ncurses-compat/ncurses-compat-5.9.ebuild
deleted file mode 100644
index 5288b2e397f5..000000000000
--- a/sys-libs/ncurses-compat/ncurses-compat-5.9.ebuild
+++ /dev/null
@@ -1,199 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# This version is just for the ABI .5 library
-
-EAPI="5"
-
-inherit eutils toolchain-funcs multilib-minimal
-
-MY_PV=${PV:0:3}
-MY_P=ncurses-${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"
-
-LICENSE="MIT"
-# The subslot reflects the SONAME.
-SLOT="5/5"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 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.8-gfbsd.patch
- "${FILESDIR}"/ncurses-5.7-nongnu.patch
- "${FILESDIR}"/ncurses-5.9-rxvt-unicode-9.15.patch #192083 #383871
- "${FILESDIR}"/ncurses-5.9-fix-clang-build.patch #417763
- "${FILESDIR}"/ncurses-5.9-pkg-config.patch
- "${FILESDIR}"/ncurses-5.9-no-I-usr-include.patch #522586
- "${FILESDIR}"/ncurses-5.9-gcc-5.patch #545114
-)
-
-src_prepare() {
- epatch "${PATCHES[@]}"
-}
-
-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 ! ROOT=/ has_version "~sys-libs/${P}" ; then
- # 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} -static" \
- 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}"
- 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"
-
- # 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=/bin/bash \
- ECONF_SOURCE=${S} \
- econf "${conf[@]}" "$@"
-}
-
-src_compile() {
- # See comments in src_configure.
- if ! ROOT=/ has_version "~sys-libs/${P}" ; 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
- 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.1_p20190609.ebuild b/sys-libs/ncurses-compat/ncurses-compat-6.1_p20190609.ebuild
deleted file mode 100644
index 13a0da5e700c..000000000000
--- a/sys-libs/ncurses-compat/ncurses-compat-6.1_p20190609.ebuild
+++ /dev/null
@@ -1,227 +0,0 @@
-# Copyright 1999-2020 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 ! ROOT=/ 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 ! ROOT=/ 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 61cb703f5feb..7b5177af9182 100644
--- a/sys-libs/ncurses/Manifest
+++ b/sys-libs/ncurses/Manifest
@@ -1 +1,144 @@
-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-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-5.9-gcc-5.patch b/sys-libs/ncurses/files/ncurses-5.9-gcc-5.patch
deleted file mode 100644
index 2448229b88e1..000000000000
--- a/sys-libs/ncurses/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/files/ncurses-6.0-cppflags-cross.patch b/sys-libs/ncurses/files/ncurses-6.0-cppflags-cross.patch
deleted file mode 100644
index decdc2677904..000000000000
--- a/sys-libs/ncurses/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/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-no_user_ldflags_in_libs.patch b/sys-libs/ncurses/files/ncurses-6.2-no_user_ldflags_in_libs.patch
deleted file mode 100644
index 66345b51fe24..000000000000
--- a/sys-libs/ncurses/files/ncurses-6.2-no_user_ldflags_in_libs.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From be554be06475b36da2f69aabfd873ad55f7ef95c Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Thu, 13 Feb 2020 11:51:09 +0100
-Subject: [PATCH] Don't bleed user LDFLAGS into Libs
-
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- misc/gen-pkgconfig.in | 2 +-
- misc/ncurses-config.in | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/misc/gen-pkgconfig.in b/misc/gen-pkgconfig.in
-index 8f00b824..009d2156 100644
---- a/misc/gen-pkgconfig.in
-+++ b/misc/gen-pkgconfig.in
-@@ -80,7 +80,7 @@ if [ "$includedir" != "/usr/include" ]; then
- fi
-
- lib_flags=
--for opt in -L$libdir @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
-+for opt in -L$libdir @LIBS@
- do
- case $opt in
- -l*) # LIBS is handled specially below
-diff --git a/misc/ncurses-config.in b/misc/ncurses-config.in
-index 7f8ba697..2f1915cd 100644
---- a/misc/ncurses-config.in
-+++ b/misc/ncurses-config.in
-@@ -101,7 +101,7 @@ fi
- # There is no portable way to find the list of standard library directories.
- # Require a POSIX shell anyway, to keep this simple.
- lib_flags=
--for opt in -L$libdir @LDFLAGS@ @EXTRA_LDFLAGS@ $LIBS
-+for opt in -L$libdir $LIBS
- do
- case $opt in
- -specs*) # ignore linker specs-files which were used to build library
---
-2.25.0
-
diff --git a/sys-libs/ncurses/metadata.xml b/sys-libs/ncurses/metadata.xml
index 1030e9cebbae..481ccfc2e019 100644
--- a/sys-libs/ncurses/metadata.xml
+++ b/sys-libs/ncurses/metadata.xml
@@ -1,20 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<use>
- <flag name="ada">Add bindings for the ADA programming language</flag>
- <flag name="tinfo">
- Build curses library (libncurses) sep from the low-level terminfo
- library (libtinfo) -- usually needed only for binary packages -- but
- it is binary compatible in either mode
- </flag>
- <flag name="trace">Enable test trace() support in ncurses calls</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="ada">Add bindings for the ADA programming language</flag>
+ <flag name="tinfo">
+ Build curses library (libncurses) sep from the low-level terminfo
+ library (libtinfo) -- usually needed only for binary packages -- but
+ it is binary compatible in either mode
+ </flag>
+ <flag name="stack-realign">
+ Realign the stack in the 32-bit build for compatibility with older binaries at some performance cost.
+ Avoids crashes in older 32-bit binaries. Only affects x86/32-bit multilib builds on amd64.
+ </flag>
+ <flag name="trace">Enable test trace() support in ncurses calls</flag>
+ </use>
+ <upstream>
+ <changelog>https://invisible-island.net/ncurses/NEWS.html</changelog>
+ <remote-id type="cpe">cpe:/a:gnu:ncurses</remote-id>
+ <remote-id type="github">ThomasDickey/ncurses-snapshots</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/ncurses/ncurses-6.2-r1.ebuild b/sys-libs/ncurses/ncurses-6.2-r1.ebuild
deleted file mode 100644
index e9bdde4156dd..000000000000
--- a/sys-libs/ncurses/ncurses-6.2-r1.ebuild
+++ /dev/null
@@ -1,316 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic toolchain-funcs 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"
-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"
-IUSE="ada +cxx debug doc gpm minimal profile static-libs test threads tinfo trace unicode"
-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}-5.9-gcc-5.patch" #545114
- "${FILESDIR}/${PN}-6.0-ticlib.patch" #557360
- "${FILESDIR}/${PN}-6.0-cppflags-cross.patch" #601426
- "${FILESDIR}/${PN}-6.2-no_user_ldflags_in_libs.patch"
-)
-
-src_prepare() {
- if [[ "${PV}" == *_p* ]] ; then
- eapply "${WORKDIR}"/${P/_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' '')
- $(usex threads 'ncursest' '')
- $(use unicode && usex threads '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= ;;
- *-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-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
- )
-
- 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
- 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
- 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[@]}" \
- $(use tinfo && usex unicode 'tinfow' '') \
- $(usev 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
- use unicode && preserve_old_lib /$(get_libdir)/libncursesw.so.5
-}
-
-pkg_postinst() {
- preserve_old_lib_notify /$(get_libdir)/libncurses.so.5
- use unicode && preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5
-}
diff --git a/sys-libs/ncurses/ncurses-6.4_p20230401.ebuild b/sys-libs/ncurses/ncurses-6.4_p20230401.ebuild
new file mode 100644
index 000000000000..1c268c058ea2
--- /dev/null
+++ b/sys-libs/ncurses/ncurses-6.4_p20230401.ebuild
@@ -0,0 +1,420 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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_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-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="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)
+ # Required for building on mingw-w64, and possibly other windows
+ # platforms, bug #639670
+ --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_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/netbsd-csu/Manifest b/sys-libs/netbsd-csu/Manifest
deleted file mode 100644
index 765cdd917790..000000000000
--- a/sys-libs/netbsd-csu/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST netbsd-csu-7.1-tests.tar.bz2 579 BLAKE2B 6d042b3b549ce6ffe0bd0ce908d042e4501a95c21958710078f587d9f52316a52f4bcc219f694ee60066a427a84c027c34906b76c7b8ca151766e5b476152708 SHA512 f2aa7d2340e2545a99cb88e104aaca77b64fd5bfea42bbe5e34d790ae120a749245099a550728f3b7ca2ca5a29fd1f426ddd2e8d5a7bc1a44921c308f1cb12db
-DIST netbsd-csu-9.0_beta.tar.xz 846120 BLAKE2B 59257e72766279ec043cbee39e2056345348088fbb9af097815c381d6cc5d2bf74c24c0ffd91f45da7384ad6df74a1a4bb0a283b3fb44976f7a59ad2f3bbbb24 SHA512 497ea33ac49338cf32bc265f5d9e7f3ba19c58009717af8505f07d9e2ec9bd3a3c72f85ec37924659509111aca20a6552fd8a06c765fa442b414bd6160815e1a
diff --git a/sys-libs/netbsd-csu/metadata.xml b/sys-libs/netbsd-csu/metadata.xml
deleted file mode 100644
index 89c4bdb96049..000000000000
--- a/sys-libs/netbsd-csu/metadata.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>llvm@gentoo.org</email>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/netbsd-csu/netbsd-csu-9.0_beta.ebuild b/sys-libs/netbsd-csu/netbsd-csu-9.0_beta.ebuild
deleted file mode 100644
index 99981172dddc..000000000000
--- a/sys-libs/netbsd-csu/netbsd-csu-9.0_beta.ebuild
+++ /dev/null
@@ -1,140 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic multilib-minimal toolchain-funcs
-
-DESCRIPTION="crtbegin.o/crtend.o from NetBSD CSU for GCC-free toolchain"
-HOMEPAGE="http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/csu/"
-SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz
- test? ( https://dev.gentoo.org/~mgorny/dist/netbsd-csu-7.1-tests.tar.bz2 )"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-BDEPEND="app-arch/xz-utils
- virtual/pmake
- test? ( sys-devel/clang )"
-
-S=${WORKDIR}/${P}/lib/csu
-
-src_prepare() {
- default
- multilib_copy_sources
-}
-
-multilib_src_compile() {
- local inc_arch=${ABI:-${ARCH}}
-
- # rewrite ARCH to match NetBSD includes
- case "${inc_arch}" in
- x86) inc_arch=i386;;
- # x32 seems to be equivalent to amd64 as far as we're concerned
- x32) inc_arch=amd64;;
- arm64) inc_arch=aarch64;;
- esac
-
- # we need arch-specific headers for some assembler macros
- if [[ ! -d ${WORKDIR}/${P}/sys/arch/${inc_arch} ]]; then
- die "Unexpected ABI/ARCH: ${inc_arch}, please report"
- fi
- ln -s "${WORKDIR}/${P}/sys/arch/${inc_arch}/include" common/machine || die
-
- local opts=(
- CC="$(tc-getCC)"
- OBJCOPY="$(tc-getOBJCOPY)"
-
- MKPIC=yes
- MKSTRIPIDENT=no
- )
- # rewrite MACHINE_ARCH to match names used in CSU
- case "${inc_arch}" in
- amd64) opts+=( MACHINE_ARCH=x86_64 );;
- *) opts+=( MACHINE_ARCH="${inc_arch}" );;
- esac
-
- # we only need those files; crt1 and friends are provided by libc
- opts+=( crtbegin.o crtbeginS.o crtend.o )
-
- bmake ${MAKEOPTS} "${opts[@]}" ${EXTRA_EMAKE} || die
-
- ln -s crtbegin.o crtbeginT.o || die
- ln -s crtend.o crtendS.o || die
-}
-
-multilib_src_test() {
- cd "${WORKDIR}"/*-tests || die
-
- # TODO: fix gcc support
- local -x CC=${CHOST}-clang
- local -x CXX=${CHOST}-clang++
- strip-unsupported-flags
-
- local cc=(
- # -B sets prefix for internal gcc/clang file lookup
- "${CC}" -B"${BUILD_DIR}"
- )
-
- # 1. figure out the correct location for crt* files
- if tc-is-gcc; then
- # gcc requires crt*.o in multi-dir
- local multidir=$("${cc[@]}" -print-multi-directory)
- if [[ ${multidir} != . ]]; then
- ln -s . "${multidir}" || die
- fi
- elif tc-is-clang; then
- # clang is entirely happy with crt*.o in -B
- :
- else
- eerror "Unsupported compiler for tests ($(tc-getCC))"
- return
- fi
-
- # 2. verify that the compiler can use our crtbegin/crtend
- local crtbegin=$("${cc[@]}" -print-file-name=crtbegin.o) || die
- local crtend=$("${cc[@]}" -print-file-name=crtend.o) || die
- if [[ ! ${crtbegin} -ef ${BUILD_DIR}/crtbegin.o ]]; then
- die "Compiler uses wrong crtbegin: ${crtbegin}"
- fi
- if [[ ! ${crtend} -ef ${BUILD_DIR}/crtend.o ]]; then
- die "Compiler uses wrong crtend: ${crtend}"
- fi
-
- # 3. build and run the tests
- emake CC="${cc[*]}"
-
- local p out exp
- for p in ./hello{,-static,-dyn}; do
- if [[ ${p} == ./hello-dyn && ${ABI} == x32 ]]; then
- einfo "Skipping ${p} on x32 -- known to crash"
- continue
- fi
-
- ebegin "Testing ${p}"
- exp='ctor:main:dtor'
- [[ ${p} == ./hello-dyn ]] && exp=libctor:${exp}:libdtor
- if ! out=$("${p}"); then
- eend 1
- die "Test ${p} crashed for ${ABI:-${ARCH}}"
- fi
-
- [[ ${out} == ${exp} ]]
- if ! eend "${?}"; then
- eerror " Expected: ${exp}"
- eerror " Output : ${out}"
- die "Test ${p} failed for ${ABI:-${ARCH}}"
- fi
- done
-
- emake clean
-}
-
-multilib_src_install() {
- dolib.a crtbegin.o crtbeginS.o crtend.o
- dosym crtbegin.o "/usr/$(get_libdir)/crtbeginT.o"
- dosym crtend.o "/usr/$(get_libdir)/crtendS.o"
-}
diff --git a/sys-libs/newlib/Manifest b/sys-libs/newlib/Manifest
index 12a1c1b30174..5797ec3a58bd 100644
--- a/sys-libs/newlib/Manifest
+++ b/sys-libs/newlib/Manifest
@@ -1 +1,4 @@
-DIST newlib-3.3.0.tar.gz 18361083 BLAKE2B bdc81427955d0a2f550bf2973ca82c0b8b55aa170565cdf1cfe8ac926257fad6d3e860ce7b2e286949ab21be2677378b5b6d3c743c05fe8aa6df8a8c34a16945 SHA512 2f0c6666487520e1a0af0b6935431f85d2359e27ded0d01d02567d0d1c6479f2f0e6bbc60405e88e46b92c2a18780a01a60fc9281f7e311cfd40b8d5881d629c
+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 b0a7c56f4a9d..0efee71c01f4 100644
--- a/sys-libs/newlib/metadata.xml
+++ b/sys-libs/newlib/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>lu_zero@gentoo.org</email>
@@ -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-3.3.0-r1.ebuild b/sys-libs/newlib/newlib-4.1.0-r2.ebuild
index bd8e3d1de3f5..52f5c0cbde67 100644
--- a/sys-libs/newlib/newlib-3.3.0-r1.ebuild
+++ b/sys-libs/newlib/newlib-4.1.0-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -10,7 +10,7 @@ if [[ ${PV} == "9999" ]] ; then
inherit git-r3
else
SRC_URI="ftp://sourceware.org/pub/newlib/${P}.tar.gz"
- KEYWORDS="-* ~arm ~hppa ~m68k ~mips ~ppc ~ppc64 ~sparc ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
export CBUILD=${CBUILD:-${CHOST}}
@@ -64,7 +64,7 @@ pkg_setup() {
}
src_configure() {
- # we should fix this ...
+ # TODO: we should fix this
unset LDFLAGS
CHOST=${CTARGET} strip-unsupported-flags
CCASFLAGS_ORIG="${CCASFLAGS}"
@@ -111,7 +111,7 @@ src_configure() {
--enable-lite-exit \
--enable-newlib-global-atexit \
--enable-newlib-nano-formatted-io \
- ${myconf}
+ "${myconf[@]}"
fi
}
@@ -136,7 +136,7 @@ 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\|rdimon\)\.a" -print)
+ nanolibfiles=$(find "${NEWLIBNANOTMPINSTALL}" -regex ".*/lib\(c\|g\|m\|rdimon\)\.a" -print)
for f in ${nanolibfiles}; do
local l="${f##${NEWLIBNANOTMPINSTALL}}"
mv -v "${f}" "${D}/${l%%\.a}_nano.a" || die
diff --git a/sys-libs/newlib/newlib-3.3.0.ebuild b/sys-libs/newlib/newlib-4.2.0.20211231-r1.ebuild
index 6362c1259bd1..17fd43c36734 100644
--- a/sys-libs/newlib/newlib-3.3.0.ebuild
+++ b/sys-libs/newlib/newlib-4.2.0.20211231-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -10,7 +10,7 @@ if [[ ${PV} == "9999" ]] ; then
inherit git-r3
else
SRC_URI="ftp://sourceware.org/pub/newlib/${P}.tar.gz"
- KEYWORDS="-* ~arm ~hppa ~m68k ~mips ~ppc ~ppc64 ~sparc ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
export CBUILD=${CBUILD:-${CHOST}}
@@ -29,6 +29,10 @@ 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"
@@ -60,7 +64,7 @@ pkg_setup() {
}
src_configure() {
- # we should fix this ...
+ # TODO: we should fix this
unset LDFLAGS
CHOST=${CTARGET} strip-unsupported-flags
CCASFLAGS_ORIG="${CCASFLAGS}"
@@ -107,7 +111,7 @@ src_configure() {
--enable-lite-exit \
--enable-newlib-global-atexit \
--enable-newlib-nano-formatted-io \
- ${myconf}
+ "${myconf[@]}"
fi
}
@@ -132,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\|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 bd8e3d1de3f5..d29d3f10e0d1 100644
--- a/sys-libs/newlib/newlib-9999.ebuild
+++ b/sys-libs/newlib/newlib-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2020 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,8 +9,8 @@ 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="-* ~arm ~hppa ~m68k ~mips ~ppc ~ppc64 ~sparc ~x86"
+ 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}}
@@ -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
@@ -64,13 +60,17 @@ pkg_setup() {
}
src_configure() {
- # we should fix this ...
+ # 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.
@@ -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\|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-usrfiles/Manifest b/sys-libs/nss-usrfiles/Manifest
index 9dc13697f6b9..a66cb5b21735 100644
--- a/sys-libs/nss-usrfiles/Manifest
+++ b/sys-libs/nss-usrfiles/Manifest
@@ -1 +1 @@
-DIST nss-altfiles-2.18.1.zip 42369 BLAKE2B 9ca579cdda60aadb6ca7b153b0797d773b732ae9a3d442ba0020c7542e1f2bd1635989794477c85f855813611414ab3c12bb8d567eddcaa60d49189793f82d19 SHA512 d9e2c34ce2518a5310578a2b99a59fc1a8142c252c41e5dab0fd0c07e62ccfa2e3c5d2dd29e179514f3b37537bb0576e2bc3c850f459fa251cd57923438981af
+DIST nss-altfiles-2.18.1.tar.gz 26046 BLAKE2B bb60a37c2f9aeffca058a977e782298f5357ce736a9b46abe7c685381bb58260965c3feab32cb9eb64db111a2edace1580a8d083f17b03e68bb15c107d339bed SHA512 21c8d782e12657b07878f2869c79acca09692efe4caf2f5102557e1ecdbd97c0b1245009dccf56642fd827e742531c134e5f53ebe531e458ddd8a21a1aab6377
diff --git a/sys-libs/nss-usrfiles/metadata.xml b/sys-libs/nss-usrfiles/metadata.xml
index ee8ea728f24d..6a08262191ea 100644
--- a/sys-libs/nss-usrfiles/metadata.xml
+++ b/sys-libs/nss-usrfiles/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!--maintainer-needed-->
<upstream>
diff --git a/sys-libs/nss-usrfiles/nss-usrfiles-2.18.1.ebuild b/sys-libs/nss-usrfiles/nss-usrfiles-2.18.1.ebuild
index 46c6843878c0..c716de9bdf0b 100644
--- a/sys-libs/nss-usrfiles/nss-usrfiles-2.18.1.ebuild
+++ b/sys-libs/nss-usrfiles/nss-usrfiles-2.18.1.ebuild
@@ -1,28 +1,27 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
+
+inherit toolchain-funcs
MY_PN="nss-altfiles"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="NSS module to read passwd/group files from CoreOS /usr location"
HOMEPAGE="https://github.com/coreos/nss-altfiles"
-SRC_URI="https://github.com/coreos/${MY_PN}/archive/v${PV}.zip -> ${MY_P}.zip"
+SRC_URI="https://github.com/coreos/${MY_PN}/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
LICENSE="LGPL-2.1+"
SLOT="0"
KEYWORDS="~amd64-linux"
-IUSE=""
-
-DEPEND=""
-RDEPEND="${DEPEND}"
-S="${WORKDIR}/${MY_P}"
src_configure() {
: # Don't bother with the custom configure script.
}
src_compile() {
+ tc-export CC
emake DATADIR=/usr/share/baselayout MODULE_NAME=usrfiles
}
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/metadata.xml b/sys-libs/nss_wrapper/metadata.xml
index 48f6ca46f45a..74c488b2dd6e 100644
--- a/sys-libs/nss_wrapper/metadata.xml
+++ b/sys-libs/nss_wrapper/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>samba@gentoo.org</email>
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 c7252f28e7a2..000000000000
--- a/sys-libs/nss_wrapper/nss_wrapper-1.1.10.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/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/metadata.xml b/sys-libs/obstack-standalone/metadata.xml
index 04242345d8eb..600618884128 100644
--- a/sys-libs/obstack-standalone/metadata.xml
+++ b/sys-libs/obstack-standalone/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>blueness@gentoo.org</email>
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 12d8cbc9eb24..000000000000
--- a/sys-libs/obstack-standalone/obstack-standalone-1.1.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2020 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
- !sys-libs/uclibc"
-
-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 7f2003c4f881..ae49ecaf283a 100644
--- a/sys-libs/openipmi/Manifest
+++ b/sys-libs/openipmi/Manifest
@@ -1,3 +1 @@
-DIST OpenIPMI-2.0.27.tar.gz 3125193 BLAKE2B 86639a86803e49393aefbaf5b1d1fee8e2bf399b2772bdee7d07a00d5e6657efe5cdf962cacb0397f9de5deb0b18edc05783c3388f4fc19e1ee2de4c01be0663 SHA512 44aa2eb97559514d61654434f24bf8e87c3f89ea7095fd3d46c1a889e16c128f29ca19cfb9747afc7fd432ada84406ee884bc8b9c65e28b8bd033d368b744fe3
-DIST OpenIPMI-2.0.28.tar.gz 3118911 BLAKE2B 0f4192dc536ec1767ee72cf9f0d2c3b021e5f8e88b4029846a27c3b6561a3c63d44f4bad7ced234a171504804d2d9cdd90d0c6a6dc178f9f76ea52f6df20b9d0 SHA512 faaca335f7ff582f396d588c6b3736b4e2756a9914becba75550878a10d7acce55e85912bcf5cd9e482c3e646eb472a8a055c520f2dcba7a874f0c0f120502da
-DIST OpenIPMI-2.0.29.tar.gz 3119530 BLAKE2B 5c60b04e828699c396cb7ce29dca7665109d7b39c3d64535fafdca328c01eab0af9cc4d7fd1a30aa254836f6ce10a16e491fb7239777dc4d57edc65c20998504 SHA512 ff23aadfe4b9002574d1f06dda3d61f7a03ef1df2c61855516b7d67bd6d3272c53af74e3412e1045242dcb845f50b7c542083e918805c0efac424dd86e720a10
+DIST OpenIPMI-2.0.33.tar.gz 3141439 BLAKE2B 02634ac8e17abf6a95f37e1b6825fe1f493e1990d7a5b0f6e87f7d9527f2a778f9faf0b12566529a3c87ecce893346e5125c51da988b95fbb56145282194ed16 SHA512 615fccd1ffd4af18584c1b0e54667ba2de60b6d42b44e7448f27808114180fa3b31b4834276bdf69c3df1e5210df871fd888deec8186377524838390fe41e641
diff --git a/sys-libs/openipmi/files/openipmi-2.0.26-readline.patch b/sys-libs/openipmi/files/openipmi-2.0.26-readline.patch
deleted file mode 100644
index 79fc640ab5ad..000000000000
--- a/sys-libs/openipmi/files/openipmi-2.0.26-readline.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- OpenIPMI-2.0.26/sample/ipmi_serial_bmc_emu.c
-+++ OpenIPMI-2.0.26/sample/ipmi_serial_bmc_emu.c
-@@ -42,7 +42,7 @@
- #include <unistd.h>
- #include <stdlib.h>
- #include <sys/select.h>
--#include <editline/readline.h>
-+#include <readline/readline.h>
-
- #define _GNU_SOURCE
- #include <getopt.h>
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/metadata.xml b/sys-libs/openipmi/metadata.xml
index beb9542e8460..4d0f157f33c9 100644
--- a/sys-libs/openipmi/metadata.xml
+++ b/sys-libs/openipmi/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>sysadmin@gentoo.org</email>
diff --git a/sys-libs/openipmi/openipmi-2.0.27-r1.ebuild b/sys-libs/openipmi/openipmi-2.0.27-r1.ebuild
deleted file mode 100644
index 4a278338a6da..000000000000
--- a/sys-libs/openipmi/openipmi-2.0.27-r1.ebuild
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit autotools python-single-r1
-
-DESCRIPTION="Library interface to IPMI"
-HOMEPAGE="https://sourceforge.net/projects/openipmi/"
-MY_PN="OpenIPMI"
-MY_P="${MY_PN}-${PV/_/-}"
-SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
-
-LICENSE="LGPL-2.1 GPL-2"
-SLOT="0"
-KEYWORDS="amd64 hppa ~ia64 ppc x86"
-IUSE="crypt snmp perl python static-libs tcl"
-S="${WORKDIR}/${MY_P}"
-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
-
- "${FILESDIR}/${PN}-2.0.26-readline.patch"
-)
-
-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.28.ebuild b/sys-libs/openipmi/openipmi-2.0.33-r1.ebuild
index 99e493a94c4c..26db37796649 100644
--- a/sys-libs/openipmi/openipmi-2.0.28.ebuild
+++ b/sys-libs/openipmi/openipmi-2.0.33-r1.ebuild
@@ -1,46 +1,48 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
+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 ~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.29.ebuild b/sys-libs/openipmi/openipmi-2.0.33.ebuild
index c2d149b11ce1..7bd51efeb8d7 100644
--- a/sys-libs/openipmi/openipmi-2.0.29.ebuild
+++ b/sys-libs/openipmi/openipmi-2.0.33.ebuild
@@ -1,46 +1,47 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
+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
)
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 72ffa403f4b4..8ff63cd068f0 100644
--- a/sys-libs/pam/Manifest
+++ b/sys-libs/pam/Manifest
@@ -1,3 +1,2 @@
-DIST pam-1.4.0_p20200809-doc.tar.xz 42680 BLAKE2B e8371bd76b589db06ce95f2d10343be163aa5149f566f7d9bd5e9cd0340b95eecedb6a7d20d299fd2188c736fca3c69c0bd2f8eea4541dfd3312227c3dcf4e2d SHA512 5007aaa811b6321f124245493c6a4bc9ae07ab4ff651fc817843e8b4a74661c07418e2479363a72c35320f0f1cb469a2494c5d354dc819b920de7d1918e6ce5e
-DIST pam-4dd9b97b762cc73816cb867d49c9d0d0b91d642c.tar.gz 765455 BLAKE2B 8a8543b51c9fa877cd48d483d9af489df00376f92f26fea648d38a0ce3168702888a662e5d3c7423cce8a5d56896e84e4c1829e56d08fca8c3ab878b20945a7d SHA512 bdb236a47a5810449fb96546ff89d70dec185a215b0d047178a12e40945fde4ffdb801dbbd87ff95eead1bb7acb4748333a2d3383881d5de0dbd89ec5ceddd3f
-DIST pam-e42e178c71c11bb25740a5177eed110ee17b8af2.tar.gz 810595 BLAKE2B 897f64a7f55c033601665b0ecc292cdcbd0d9b2f24199ed6ca5fc69c2da4da7401677493bed09a118b1fc0a475dc016fc7a3a318787c650212b056064ed0b817 SHA512 3c2bc401df51dbd4118698afc80a0448559bc6b5d8c7c45c800c2f6421034a131c0bee971f9640aec6b0d77f8a31ec055c7a84a646d9a11690dfda4af4e1068a
+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/files/pam-remove-browsers.patch b/sys-libs/pam/files/pam-remove-browsers.patch
deleted file mode 100644
index 7e3ae99731ad..000000000000
--- a/sys-libs/pam/files/pam-remove-browsers.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From baadfdc644fcb88170c358c449a731520e1747a5 Mon Sep 17 00:00:00 2001
-From: Mikle Kolyada <zlogene@gentoo.org>
-Date: Mon, 1 Oct 2018 23:12:08 +0300
-Subject: [PATCH] configure.ac remobe browser logic for DocBook
-
----
- configure.ac | 11 -----------
- 1 file changed, 11 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 3012ceb..e7e7dac 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -554,17 +554,6 @@ JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.4//EN],
- JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
- [DocBook XSL Stylesheets], [], enable_docu=no)
-
--AC_PATH_PROG([BROWSER], [w3m])
--if test ! -z "$BROWSER"; then
-- BROWSER="$BROWSER -T text/html -dump"
--else
-- AC_PATH_PROG([BROWSER], [elinks])
-- if test ! -z "$BROWSER"; then
-- BROWSER="$BROWSER -no-numbering -no-references -dump"
-- else
-- enable_docu=no
-- fi
--fi
-
- AC_PATH_PROG([FO2PDF], [fop])
-
---
-2.16.4
-
diff --git a/sys-libs/pam/metadata.xml b/sys-libs/pam/metadata.xml
index c172b5d30353..1abda7583cda 100644
--- a/sys-libs/pam/metadata.xml
+++ b/sys-libs/pam/metadata.xml
@@ -1,30 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="person">
- <email>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>
-
- <flag name="cracklib">
- Build the pam_cracklib module, that allows to verify the chosen
- passwords' strength through the use of
- <pkg>sys-libs/cracklib</pkg>. Please note that simply enabling
- the USE flag on this package will not make use of pam_cracklib
- by default, you should also enable it in
- <pkg>sys-auth/pambase</pkg> as well as update your configuration
- files.
+ <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="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.3.1_p20200128-r1.ebuild b/sys-libs/pam/pam-1.3.1_p20200128-r1.ebuild
deleted file mode 100644
index d5a007ca1d2c..000000000000
--- a/sys-libs/pam/pam-1.3.1_p20200128-r1.ebuild
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools db-use fcaps multilib-minimal toolchain-funcs usr-ldscript
-
-DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
-HOMEPAGE="https://github.com/linux-pam/linux-pam"
-
-COMMIT_HASH="4dd9b97b762cc73816cb867d49c9d0d0b91d642c"
-SRC_URI="https://github.com/linux-pam/linux-pam/archive/${COMMIT_HASH}.tar.gz#/${PN}-${COMMIT_HASH}.tar.gz"
-
-LICENSE="|| ( BSD GPL-2 )"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="audit berkdb +cracklib debug nis +pie selinux static-libs"
-
-BDEPEND="app-text/docbook-xml-dtd:4.1.2
- app-text/docbook-xml-dtd:4.3
- app-text/docbook-xml-dtd:4.4
- app-text/docbook-xml-dtd:4.5
- dev-libs/libxslt
- sys-devel/flex
- 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}] )
- cracklib? ( >=sys-libs/cracklib-2.9.1-r1[${MULTILIB_USEDEP}] )
- selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- nis? ( >=net-libs/libtirpc-0.2.4-r2[${MULTILIB_USEDEP}] )"
-
-RDEPEND="${DEPEND}"
-
-PDEPEND="sys-auth/pambase"
-
-S="${WORKDIR}/linux-${PN}-${COMMIT_HASH}"
-
-src_prepare() {
- default
- eapply "${FILESDIR}/${PN}-remove-browsers.patch"
- touch ChangeLog || die
- eautoreconf
-}
-
-multilib_src_configure() {
- # Do not let user's BROWSER setting mess us up. #549684
- unset BROWSER
-
- # Disable automatic detection of libxcrypt; we _don't_ want the
- # user to link libxcrypt in by default, since we won't track the
- # dependency and allow to break PAM this way.
-
- export ac_cv_header_xcrypt_h=no
-
- local myconf=(
- --with-db-uniquename=-$(db_findver sys-libs/db)
- --with-xml-catalog="${EPREFIX}"/etc/xml/catalog
- --enable-securedir="${EPREFIX}"/$(get_libdir)/security
- --libdir="${EPREFIX}"/usr/$(get_libdir)
- --exec-prefix="${EPREFIX}"
- --disable-prelude
- --enable-doc
- $(use_enable audit)
- $(use_enable berkdb db)
- $(use_enable cracklib)
- $(use_enable debug)
- $(use_enable nis)
- $(use_enable pie)
- $(use_enable selinux)
- $(use_enable static-libs static)
- --enable-isadir='.' #464016
- )
- ECONF_SOURCE="${S}" econf ${myconf[@]}
-}
-
-multilib_src_compile() {
- emake sepermitlockdir="${EPREFIX}/run/sepermit"
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install \
- sepermitlockdir="${EPREFIX}/run/sepermit"
-
- gen_usr_ldscript -a pam pam_misc pamc
-}
-
-multilib_src_install_all() {
- find "${ED}" -type f -name '*.la' -delete || die
-
- if use selinux; then
- dodir /usr/lib/tmpfiles.d
- cat - > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<EOF
-d /run/sepermit 0755 root root
-EOF
- fi
-}
-
-pkg_postinst() {
- ewarn "Some software with pre-loaded PAM libraries might experience"
- ewarn "warnings or failures related to missing symbols and/or versions"
- ewarn "after any update. While unfortunate this is a limit of the"
- ewarn "implementation of PAM and the software, and it requires you to"
- ewarn "restart the software manually after the update."
- ewarn ""
- ewarn "You can get a list of such software running a command like"
- ewarn " lsof / | egrep -i 'del.*libpam\\.so'"
- ewarn ""
- ewarn "Alternatively, simply reboot your system."
-
- # The pam_unix module needs to check the password of the user which requires
- # read access to /etc/shadow only.
- fcaps cap_dac_override sbin/unix_chkpwd
-}
diff --git a/sys-libs/pam/pam-1.5.3-r1.ebuild b/sys-libs/pam/pam-1.5.3-r1.ebuild
new file mode 100644
index 000000000000..5e9602e23a38
--- /dev/null
+++ b/sys-libs/pam/pam-1.5.3-r1.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_P="Linux-${PN^^}-${PV}"
+
+# Avoid QA warnings
+# Can reconsider w/ EAPI 8 and IDEPEND, bug #810979
+TMPFILES_OPTIONAL=1
+
+inherit db-use fcaps flag-o-matic toolchain-funcs multilib-minimal
+
+DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
+HOMEPAGE="https://github.com/linux-pam/linux-pam"
+SRC_URI="
+ https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}.tar.xz
+ https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}-docs.tar.xz
+"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="|| ( BSD GPL-2 )"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~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
+ app-alternatives/lex
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+DEPEND="
+ virtual/libcrypt:=[${MULTILIB_USEDEP}]
+ >=virtual/libintl-0-r1[${MULTILIB_USEDEP}]
+ audit? ( >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}] )
+ berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ nis? (
+ net-libs/libnsl:=[${MULTILIB_USEDEP}]
+ >=net-libs/libtirpc-0.2.4-r2:=[${MULTILIB_USEDEP}]
+ )
+"
+RDEPEND="${DEPEND}"
+PDEPEND=">=sys-auth/pambase-20200616"
+
+PATCHES=(
+ "${FILESDIR}/${P}-termios.patch"
+)
+
+src_prepare() {
+ default
+ touch ChangeLog || die
+}
+
+multilib_src_configure() {
+ # Do not let user's BROWSER setting mess us up, bug #549684
+ unset BROWSER
+
+ # This whole weird has_version libxcrypt block can go once
+ # musl systems have libxcrypt[system] if we ever make
+ # that mandatory. See bug #867991.
+ if use elibc_musl && ! has_version sys-libs/libxcrypt[system] ; then
+ # Avoid picking up symbol-versioned compat symbol on musl systems
+ export ac_cv_search_crypt_gensalt_rn=no
+
+ # Need to avoid picking up the libxcrypt headers which define
+ # CRYPT_GENSALT_IMPLEMENTS_AUTO_ENTROPY.
+ cp "${ESYSROOT}"/usr/include/crypt.h "${T}"/crypt.h || die
+ append-cppflags -I"${T}"
+ fi
+
+ local myconf=(
+ CC_FOR_BUILD="$(tc-getBUILD_CC)"
+ --with-db-uniquename=-$(db_findver sys-libs/db)
+ --with-xml-catalog="${EPREFIX}"/etc/xml/catalog
+ --enable-securedir="${EPREFIX}"/$(get_libdir)/security
+ --includedir="${EPREFIX}"/usr/include/security
+ --libdir="${EPREFIX}"/usr/$(get_libdir)
+ --enable-pie
+ --enable-unix
+ --disable-prelude
+ --disable-doc
+ --disable-regenerate-docu
+ --disable-static
+ --disable-Werror
+ # TODO: wire this up now it's more useful as of 1.5.3
+ --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='.' # bug #464016
+ )
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake sepermitlockdir="/run/sepermit"
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install \
+ sepermitlockdir="/run/sepermit"
+}
+
+multilib_src_install_all() {
+ find "${ED}" -type f -name '*.la' -delete || die
+
+ # tmpfiles.eclass is impossible to use because
+ # there is the pam -> tmpfiles -> systemd -> pam dependency loop
+ dodir /usr/lib/tmpfiles.d
+
+ cat ->> "${D}"/usr/lib/tmpfiles.d/${CATEGORY}-${PN}.conf <<-_EOF_
+ d /run/faillock 0755 root root
+ _EOF_
+ use selinux && cat ->> "${D}"/usr/lib/tmpfiles.d/${CATEGORY}-${PN}-selinux.conf <<-_EOF_
+ d /run/sepermit 0755 root root
+ _EOF_
+
+ local page
+
+ for page in doc/man/*.{3,5,8} modules/*/*.{5,8} ; do
+ doman ${page}
+ done
+}
+
+pkg_postinst() {
+ ewarn "Some software with pre-loaded PAM libraries might experience"
+ ewarn "warnings or failures related to missing symbols and/or versions"
+ ewarn "after any update. While unfortunate this is a limit of the"
+ ewarn "implementation of PAM and the software, and it requires you to"
+ ewarn "restart the software manually after the update."
+ ewarn ""
+ ewarn "You can get a list of such software running a command like"
+ ewarn " lsof / | grep -E -i 'del.*libpam\\.so'"
+ ewarn ""
+ ewarn "Alternatively, simply reboot your system."
+
+ # The pam_unix module needs to check the password of the user which requires
+ # read access to /etc/shadow only.
+ fcaps cap_dac_override sbin/unix_chkpwd
+}
diff --git a/sys-libs/pam/pam-1.4.0_p20200829.ebuild b/sys-libs/pam/pam-1.5.3.ebuild
index 7667b4ca24ab..2ddcf24b4f38 100644
--- a/sys-libs/pam/pam-1.4.0_p20200829.ebuild
+++ b/sys-libs/pam/pam-1.5.3.ebuild
@@ -1,60 +1,75 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit autotools db-use fcaps toolchain-funcs usr-ldscript multilib-minimal
+MY_P="Linux-${PN^^}-${PV}"
+
+# Avoid QA warnings
+# Can reconsider w/ EAPI 8 and IDEPEND, bug #810979
+TMPFILES_OPTIONAL=1
+
+inherit db-use fcaps flag-o-matic toolchain-funcs usr-ldscript multilib-minimal
DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
HOMEPAGE="https://github.com/linux-pam/linux-pam"
-
-COMMIT_HASH="e42e178c71c11bb25740a5177eed110ee17b8af2"
-SRC_URI="https://github.com/linux-pam/linux-pam/archive/${COMMIT_HASH}.tar.gz#/${PN}-${COMMIT_HASH}.tar.gz
- https://dev.gentoo.org/~zlogene/distfiles/${CATEGORY}/${PN}/${PN}-1.4.0_p20200809-doc.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 ~amd64-linux ~x86-linux"
-IUSE="audit berkdb debug nis +pie selinux"
+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}-${COMMIT_HASH}"
+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
- # Disable automatic detection of libxcrypt; we _don't_ want the
- # user to link libxcrypt in by default, since we won't track the
- # dependency and allow to break PAM this way.
+ # 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
- export ac_cv_header_xcrypt_h=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)"
@@ -63,34 +78,40 @@ multilib_src_configure() {
--enable-securedir="${EPREFIX}"/$(get_libdir)/security
--includedir="${EPREFIX}"/usr/include/security
--libdir="${EPREFIX}"/usr/$(get_libdir)
- --exec-prefix="${EPREFIX}"
+ --enable-pie
--enable-unix
--disable-prelude
- --disable-cracklib
- --disable-tally
- --disable-tally2
--disable-doc
--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 pie)
$(use_enable selinux)
- --enable-isadir='.' #464016
- )
+ --enable-isadir='.' # bug #464016
+ )
ECONF_SOURCE="${S}" econf "${myconf[@]}"
}
multilib_src_compile() {
- emake sepermitlockdir="${EPREFIX}/run/sepermit"
+ emake sepermitlockdir="/run/sepermit"
}
multilib_src_install() {
emake DESTDIR="${D}" install \
- sepermitlockdir="${EPREFIX}/run/sepermit"
+ sepermitlockdir="/run/sepermit"
gen_usr_ldscript -a pam pam_misc pamc
}
@@ -100,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_
@@ -110,8 +130,10 @@ multilib_src_install_all() {
d /run/sepermit 0755 root root
_EOF_
- for i in "${WORKDIR}"/${PN}-1.4.0_p20200809-doc/*; do
- doman ${i}
+ local page
+
+ for page in doc/man/*.{3,5,8} modules/*/*.{5,8} ; do
+ doman ${page}
done
}
@@ -123,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 d4f66f3a2a4b..8cb28f18f031 100644
--- a/sys-libs/pam_wrapper/Manifest
+++ b/sys-libs/pam_wrapper/Manifest
@@ -1 +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/metadata.xml b/sys-libs/pam_wrapper/metadata.xml
index 48f6ca46f45a..74c488b2dd6e 100644
--- a/sys-libs/pam_wrapper/metadata.xml
+++ b/sys-libs/pam_wrapper/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>samba@gentoo.org</email>
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 517f2391cbeb..000000000000
--- a/sys-libs/pam_wrapper/pam_wrapper-1.1.3.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..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 ~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.4-r2.ebuild b/sys-libs/pam_wrapper/pam_wrapper-1.1.4-r2.ebuild
new file mode 100644
index 000000000000..5ddcce1a4b03
--- /dev/null
+++ b/sys-libs/pam_wrapper/pam_wrapper-1.1.4-r2.ebuild
@@ -0,0 +1,88 @@
+# 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 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.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 )
+ 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/pam_wrapper/pam_wrapper-1.1.4-r3.ebuild b/sys-libs/pam_wrapper/pam_wrapper-1.1.4-r3.ebuild
new file mode 100644
index 000000000000..96d2c6f81f35
--- /dev/null
+++ b/sys-libs/pam_wrapper/pam_wrapper-1.1.4-r3.ebuild
@@ -0,0 +1,88 @@
+# 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 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.4-tests-import.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/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/pinktrace/Manifest b/sys-libs/pinktrace/Manifest
deleted file mode 100644
index f8b68e36db08..000000000000
--- a/sys-libs/pinktrace/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST pinktrace-0.9.3.tar.bz2 405153 BLAKE2B b627f7696acf9e1a0300c4731ecdcc63e490a80277f6ec47f5c5bab62f7dc874534855ad8efaaa47e63b865cd5c3c8770f0c12668da34324c2f12cd356cbde75 SHA512 8250699d5c7c48b0d8c7df795a81f0aea724471bc32d81aeea1163b8c763028c36905b812e9c3eeb8d7642583bd32200d659d019edafb146835232f9736b6591
diff --git a/sys-libs/pinktrace/metadata.xml b/sys-libs/pinktrace/metadata.xml
deleted file mode 100644
index 0319eec4c8be..000000000000
--- a/sys-libs/pinktrace/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>mgorny@gentoo.org</email>
- <name>Michał Górny</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sys-libs/pinktrace/pinktrace-0.9.3.ebuild b/sys-libs/pinktrace/pinktrace-0.9.3.ebuild
deleted file mode 100644
index 52e6628349fe..000000000000
--- a/sys-libs/pinktrace/pinktrace-0.9.3.ebuild
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DESCRIPTION="ptrace() easy wrapper library"
-HOMEPAGE="https://dev.exherbo.org/~alip/pinktrace/"
-SRC_URI="http://distfiles.exherbo.org/distfiles/${P}.tar.bz2"
-
-LICENSE="BSD"
-SLOT="0/0.9"
-KEYWORDS="~amd64"
-IUSE="ipv6"
-
-src_configure() {
- local myconf=(
- $(use_enable ipv6)
- --disable-doxygen
- --disable-python
- --disable-python-doc
- )
-
- econf "${myconf[@]}"
-}
-
-src_install() {
- default
- find "${D}" -name '*.la' -delete || die
-}
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/files/pwdb-0.62-build.patch b/sys-libs/pwdb/files/pwdb-0.62-build.patch
index ecef517b1ca3..92c77c28d101 100644
--- a/sys-libs/pwdb/files/pwdb-0.62-build.patch
+++ b/sys-libs/pwdb/files/pwdb-0.62-build.patch
@@ -11,8 +11,8 @@ http://bugs.gentoo.org/126695
http://bugs.gentoo.org/137134
- don't show traditional warnings
---- Makefile
-+++ Makefile
+--- a/Makefile
++++ b/Makefile
@@ -71,7 +71,7 @@
WARNINGS += -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
@@ -22,8 +22,8 @@ http://bugs.gentoo.org/137134
-Wnested-externs -Winline -Wshadow
INCLUDEDIR=-I$(CRTDIR)/include
---- libpwdb/Makefile
-+++ libpwdb/Makefile
+--- a/libpwdb/Makefile
++++ b/libpwdb/Makefile
@@ -50,7 +50,7 @@
@@ -42,8 +42,8 @@ http://bugs.gentoo.org/137134
ln -sf $(LIBFILENAME) $(LIBDIR)/$(LIBDYNAME)
$(INSTALL) -m 644 $(LIBSTATIC) $(LIBDIR)
---- libpwdb/posix/pwd.c
-+++ libpwdb/posix/pwd.c
+--- a/libpwdb/posix/pwd.c
++++ b/libpwdb/posix/pwd.c
@@ -7,6 +7,7 @@
*/
@@ -52,8 +52,8 @@ http://bugs.gentoo.org/137134
#define PWDB_HARD_CORE 1
#include <pwdb/pwdb_public.h>
---- libpwdb/posix/undefined.c
-+++ libpwdb/posix/undefined.c
+--- a/libpwdb/posix/undefined.c
++++ b/libpwdb/posix/undefined.c
@@ -5,6 +5,7 @@
*/
@@ -62,8 +62,8 @@ http://bugs.gentoo.org/137134
#define PWDB_HARD_CORE 1
#include <pwdb/pwdb_public.h>
---- libpwdb/pwdb/pwdb_helper.c
-+++ libpwdb/pwdb/pwdb_helper.c
+--- a/libpwdb/pwdb/pwdb_helper.c
++++ b/libpwdb/pwdb/pwdb_helper.c
@@ -18,6 +18,7 @@
*
*/
@@ -72,8 +72,8 @@ http://bugs.gentoo.org/137134
#include "pwdb_public.h"
#include "pwdb_module.h"
---- libpwdb/pwdb/interface/shadow/group.c
-+++ libpwdb/pwdb/interface/shadow/group.c
+--- a/libpwdb/pwdb/interface/shadow/group.c
++++ b/libpwdb/pwdb/interface/shadow/group.c
@@ -533,7 +533,7 @@
static const char *supp_entry[] = {
@@ -83,8 +83,8 @@ http://bugs.gentoo.org/137134
"groups", /* these are serviced by requests */
NULL
};
---- libpwdb/radius/radius.c
-+++ libpwdb/radius/radius.c
+--- a/libpwdb/radius/radius.c
++++ b/libpwdb/radius/radius.c
@@ -145,7 +145,7 @@
const char* password,
RADIUS_RESULT *rad_result)
diff --git a/sys-libs/pwdb/files/pwdb-0.62-disable-static.patch b/sys-libs/pwdb/files/pwdb-0.62-disable-static.patch
new file mode 100644
index 000000000000..a3395e169079
--- /dev/null
+++ b/sys-libs/pwdb/files/pwdb-0.62-disable-static.patch
@@ -0,0 +1,19 @@
+--- a/libpwdb/Makefile
++++ b/libpwdb/Makefile
+@@ -46,7 +46,7 @@
+ %.o : %.c $(HEADERS)
+ $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
+
+-all: $(LIBSTATIC) $(LIBDYNAME)
++all: $(LIBDYNAME)
+
+
+ $(LIBDYNAME): $(LIBOBJ)
+@@ -70,7 +70,6 @@
+ $(INSTALL) -m 755 $(LIBFILENAME) $(LIBDIR)
+ ln -sf $(LIBFILENAME) $(LIBDIR)/$(LIBSONAME)
+ ln -sf $(LIBFILENAME) $(LIBDIR)/$(LIBDYNAME)
+- $(INSTALL) -m 644 $(LIBSTATIC) $(LIBDIR)
+
+ clean:
+ @rm -f *.so *.a core a.out `find . -name "*.o" -print` `find . -name "*~" -print`
diff --git a/sys-libs/pwdb/files/pwdb-0.62-selinux.patch b/sys-libs/pwdb/files/pwdb-0.62-selinux.patch
index 106be5645176..02ba3c50c38c 100644
--- a/sys-libs/pwdb/files/pwdb-0.62-selinux.patch
+++ b/sys-libs/pwdb/files/pwdb-0.62-selinux.patch
@@ -1,5 +1,5 @@
---- pwdb-0.62/examples/Makefile.pwdbselinux 1998-10-06 19:57:04.000000000 -0400
-+++ pwdb-0.62/examples/Makefile 2003-07-09 14:45:54.702663000 -0400
+--- a/examples/Makefile
++++ b/examples/Makefile
@@ -4,6 +4,8 @@ PROGS = posix gentest tpwdb radtest grou
SRCS = $(addsuffix .c,$(PROGS))
OBJS = $(addsuffix .o,$(PROGS))
@@ -36,8 +36,8 @@
clean:
rm -f ${PROGS} *.o *~
---- pwdb-0.62/libpwdb/shadow/shadowio.c.pwdbselinux 1998-10-06 16:58:43.000000000 -0400
-+++ pwdb-0.62/libpwdb/shadow/shadowio.c 2003-07-09 14:45:54.705662544 -0400
+--- a/libpwdb/shadow/shadowio.c
++++ b/libpwdb/shadow/shadowio.c
@@ -16,6 +16,12 @@
#include "../_pwdb_internal.h"
@@ -133,8 +133,8 @@
}
int __pwdb_spw_update (const struct __pwdb_spwd *spwd)
---- pwdb-0.62/libpwdb/shadow/sgroupio.c.pwdbselinux 1998-10-06 16:58:43.000000000 -0400
-+++ pwdb-0.62/libpwdb/shadow/sgroupio.c 2003-07-09 14:45:54.704662696 -0400
+--- a/libpwdb/shadow/sgroupio.c
++++ b/libpwdb/shadow/sgroupio.c
@@ -16,6 +16,12 @@
#include "../_pwdb_internal.h"
@@ -230,8 +230,8 @@
}
int __pwdb_sgr_update (const struct __pwdb_sgrp *sgrent)
---- pwdb-0.62/libpwdb/unix/pwio.c.pwdbselinux 1998-10-06 16:58:43.000000000 -0400
-+++ pwdb-0.62/libpwdb/unix/pwio.c 2003-07-09 14:45:54.707662240 -0400
+--- a/libpwdb/unix/pwio.c
++++ b/libpwdb/unix/pwio.c
@@ -16,6 +16,11 @@
#include "../_pwdb_internal.h"
@@ -326,8 +326,8 @@
}
/*
---- pwdb-0.62/libpwdb/unix/groupio.c.pwdbselinux 1998-10-06 16:58:43.000000000 -0400
-+++ pwdb-0.62/libpwdb/unix/groupio.c 2003-07-09 14:45:54.708662088 -0400
+--- a/libpwdb/unix/groupio.c
++++ b/libpwdb/unix/groupio.c
@@ -11,6 +11,12 @@
#include "../_pwdb_internal.h"
@@ -422,8 +422,8 @@
}
/* update an entry */
---- pwdb-0.62/libpwdb/Makefile.pwdbselinux 1999-04-10 05:31:20.000000000 -0400
-+++ pwdb-0.62/libpwdb/Makefile 2003-07-09 14:45:54.709661936 -0400
+--- a/libpwdb/Makefile
++++ b/libpwdb/Makefile
@@ -22,7 +22,7 @@ HEADERS = pwdb/pwdb_public.h pwdb/pwdb_c
# needed for generic interface compilation
diff --git a/sys-libs/pwdb/metadata.xml b/sys-libs/pwdb/metadata.xml
index 56c124413057..73dda144f9ac 100644
--- a/sys-libs/pwdb/metadata.xml
+++ b/sys-libs/pwdb/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
diff --git a/sys-libs/pwdb/pwdb-0.62-r1.ebuild b/sys-libs/pwdb/pwdb-0.62-r2.ebuild
index 5207813c4ea4..935c713d0a0a 100644
--- a/sys-libs/pwdb/pwdb-0.62-r1.ebuild
+++ b/sys-libs/pwdb/pwdb-0.62-r2.ebuild
@@ -1,37 +1,47 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit eutils toolchain-funcs flag-o-matic usr-ldscript
+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 )"
SLOT="0"
-KEYWORDS="~alpha amd64 arm hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
IUSE="selinux"
RESTRICT="test" #122603
# Note: NIS could probably be made conditional if anyone cared ...
-RDEPEND="selinux? ( sys-libs/libselinux )
+RDEPEND="
net-libs/libnsl:0=
- net-libs/libtirpc"
+ net-libs/libtirpc
+ selinux? ( sys-libs/libselinux )"
DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+DOCS=( CHANGES CREDITS README doc/pwdb.txt )
+HTML_DOCS=( doc/html/. )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-disable-static.patch # bug 725972
+)
src_prepare() {
- epatch "${FILESDIR}"/${P}-build.patch
+ default
- use selinux && epatch "${FILESDIR}"/${P}-selinux.patch
+ use selinux && eapply "${FILESDIR}"/${P}-selinux.patch
append-cppflags $($(tc-getPKG_CONFIG) --cflags libtirpc)
export LDLIBS=$($(tc-getPKG_CONFIG) --libs libtirpc)
sed -i \
-e "s/^DIRS = .*/DIRS = libpwdb/" \
- -e "s:EXTRAS += :EXTRAS += ${CFLAGS} :" \
+ -e "s;EXTRAS += ;EXTRAS += ${CFLAGS} ;" \
Makefile || die
sed -i \
-e "s:=gcc:=$(tc-getCC):g" \
@@ -53,6 +63,5 @@ src_install() {
insinto /etc
doins conf/pwdb.conf
- dodoc CHANGES CREDITS README doc/*.txt
- dohtml -r doc/html/*
+ einstalldocs
}
diff --git a/sys-libs/queue-standalone/metadata.xml b/sys-libs/queue-standalone/metadata.xml
index d920e3ba3e56..489e730c1c90 100644
--- a/sys-libs/queue-standalone/metadata.xml
+++ b/sys-libs/queue-standalone/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>blueness@gentoo.org</email>
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 133216a3d29b..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,18 +1,17 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-DESCRIPTION="Install <sys/queue.h> from glibc."
+DESCRIPTION="Install <sys/queue.h> from glibc"
HOMEPAGE="https://www.gnu.org/software/libc/libc.html"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="amd64 arm arm64 ~hppa ~mips ppc ppc64 x86"
+KEYWORDS="amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv x86"
DEPEND="
- !sys-libs/glibc
- !sys-libs/uclibc"
+ !sys-libs/glibc"
S="${WORKDIR}"
diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest
index 030cef77bbaa..0d184ee7215e 100644
--- a/sys-libs/readline/Manifest
+++ b/sys-libs/readline/Manifest
@@ -1,20 +1,30 @@
-DIST readline-6.3.tar.gz 2468560 BLAKE2B 24488ec141734c050ba985a93423692396f105619bae3ce5b109bc68a4f43862bcf3a6fb8d82fec1145d665cdb408765e179379bb35f008d09c441fa2e5739df SHA512 f70efaf46d570b85c7637172b0ee2eb9a4aa73ba38a62bb45075e665929d9701b96fba0aea6c767fd9a2a0d39dfe8e70ab06da08f8524aee76a7c502f370a401
-DIST readline-7.0.tar.gz 2910016 BLAKE2B 679b8aa7ce003017b729e6d8d4cb69d0f991578441a3e69005090079e61f6aa48b7ad4d0b1f34b6041528cf33254a1bf3ddb05b60db53a06e443d7922d49d0d4 SHA512 18243189d39bf0d4c8a76cddcce75243c1bae8824c686e9b6ba352667607e5b10c5feb79372a1093c1c388d821841670702e940df12eae94bcebdeed90047870
-DIST readline-8.0.tar.gz 2975937 BLAKE2B 95e08b28cc46582f036379413810ca40c97d4d3bc59a9e03e04e57d531573abfbe955f6f1cb86e39c208bf6c3f4c618cff70a87bec596d0b9120909d6c5a2f69 SHA512 41759d27bc3a258fefd7f4ff3277fa6ab9c21abb7b160e1a75aa8eba547bd90b288514e76264bd94fb0172da8a4faa54aab2c07b68a0356918ecf7f1969e866f
-DIST readline63-001 1366 BLAKE2B 82af5be99597719329db3f1d6049e75a5654ccf6597cf557c71ad7ada0ac03be87381a7738931eb78716de65902ae87498f574b84150a69eae9cc308c4bfffdd SHA512 e70f89ca52a4eae7e1cddd70de6a7162252231ee029c89bb3fcb0f6c8c8b46c666be910c8b2eee72e96983ec2f1a23663694dc222f67228d82e8e4684f1504a2
-DIST readline63-002 1297 BLAKE2B 5ace4a81381910ee48dee8cdbb2ca95a1bef2d1f8acca6d39a910c078c86de10a0fc29486939b336110ecb0281b3edb16e4b985f41e7ee161904728f289fff04 SHA512 4e23bd67433577e6e361d10a6c32768ea9e13b10e77493e565b870f56069b673fbcb0b860225f79fa9931845fc91d35c9a82c1385c23f8b757ebfd59f27851f4
-DIST readline63-003 985 BLAKE2B cf2cda505b100d5f820d8bfc99eed6b50e65c92b6a495073352fc7385c6456478594e5c2dc293ce556b66853dff705050fb97982aa25fce452ae53d2cb272cf4 SHA512 6bfb84a5b980091b995e2b96bdf5680f97fe670e6cac1b8606d2d75a1ef922ff5bd4e73f029f7af98a115006b7ab7828146f2cd6986287543d8a29987c91dc12
-DIST readline63-004 1363 BLAKE2B c1aec93f1e23acd51b36068d3aac31b93ffd9c1039be2c45ff4e6479135f153888030c68cf19c5ced950f6fbbb38ee7fa644d5a737f3f8ed511e97bf342940f5 SHA512 6b683e9fe28831885135391b5a23bc580cacf0ffe720951a80f545574eda4eb064fe189801d44329b2eb2d3577db5a90f9e5ad9ed131e7e8a8ae349511632721
-DIST readline63-005 1664 BLAKE2B f98f62be8676aca81b91d919bc4eccfe40c382a8baab0e64b1659b714f0d72424e29b709cc5e226fd73daf67eef264a17e07982d2553ce80f5e5f39fad70610b SHA512 b0332d7f999376788155341319d138a899a2278c338a6faaac89ecf3ed1e2248a07413dd810a76996bf25f211de787182b55f34ab3d7d31eb7519d7a48ebed32
-DIST readline63-006 1982 BLAKE2B ad6d16ff769eb8e367cf961ffe152c04778b046a04e4a62e0ce21d08fa16b0eca3d278dbdc274b082d24fa2ec959ffb62168ea7693b4de94b59a4526b1f0c4a2 SHA512 e9fbfa38d7b03ab2aff2e9e48918b85b4b67a729862ee47d1cc8e0aeb90c3224394a79f68829951e1377cae65742aa5385eae865f75e9c0b2e2abde42889431c
-DIST readline63-007 1428 BLAKE2B 60e64c2dd36457e3992cfbfbbcc261337e515be360a37d71b9de236c62c781f10f0ec37e4e196b4634e5d547edebbf915370091ca42fff873b78cd80cfe3a7f2 SHA512 abee331894846b360203a521d9a66fa02c03214120d5cafbd1cb4d680bd7bbef14321ae845dd67f7b5e8c87322801fd96fc9a5fd0ae026b41d98dc24a8949854
-DIST readline63-008 1452 BLAKE2B 4e41c45be1479fba9f74bf9cedb8d1f6237e650962d5b45ea1a61cc48a8323a0fa60d76f68c011b6e7c73a1078b5ff80f9966e983b994f814d471d0efd9efde6 SHA512 8e30bbca3aa5cea8c2ee511abe0ec8f131608d74fe5ab24d68bcf452267f0f97446ed6e7cd482360876ce6c027280e4f4450cae05eb18f56046240f4c224841c
-DIST readline70-001 1777 BLAKE2B ab217bd9d27f30351397db2b745cb33ac7e0ce18bbc00112bb87570da0f62ee0e8d182395c97e4ecc21af51e7e1e580ba48076de1095c556f0744475e4019821 SHA512 4402186905af8cd42c609d640c2e13b9ad61c7778e5a3fd2c2d9da301f0deab05b04d7836f31527262f44f406517823dbb18cb07f2c73931186c806b494699ec
-DIST readline70-002 2953 BLAKE2B 47d729b1babe904855fe5d4f780a5b2153a743def527479c3cb82759cdee5bb4260be722e1050be680f5c0dd6dec8ca25c4c1ff557415abae6b3fac2bd481f0b SHA512 13d1489578508d4d2c3a1618024198a709dbce74a6bbf0f6d7ec67d2419c55bfec9f0ca9de0ed93f129d21d5c3a94307ccdc49408455bbb301c5e3a772b03185
-DIST readline70-003 1294 BLAKE2B 9473e18b582fba69cea83e3f5b9fa278dd8b0544325439307d2b4053cbeca8d2f008104bee181ae5d9405d702e6d3bcf26379c4d46e269906474c8544367b780 SHA512 eaf962a1480eb3870519017b81ecc5cef171e4c41fcf8c17da61ccbfd0379ed6bca85c17b03e2207ae4d51509f33fd010294c75f4bd0433a52118015d4160385
-DIST readline70-004 1501 BLAKE2B cebce69a21bee3a4d6a908de09f371d65eab6af51a8dc0f58fc915b916957db420252ce07b06703c05d984f62e1e849b6975f5444b2af6ba35ff7c939acf9d99 SHA512 7be41558eab3b88a3657f8589ecfaff0b8ee7f59083d385f50e8704fe830e05a50652a5feda19ff1f3cfd98bff4bb8e25e1637ec4dac8a618db9c8220a3d954e
-DIST readline70-005 1641 BLAKE2B f720508f698b113c6328018f7e6e8775c7c79afc464047405a5c3dae017d611535017dfc2759c11483bb536fab1e9bf72c7a9d3c769b7aea3bd2cee9686bd522 SHA512 eeb27f4f9195cb905d5891f26480d58f59c885dde3457f7a30ff57760ac772e2333ee8aeae979214949f3b52030285b10db013e307ee7311abab677a4427e878
-DIST readline80-001 927 BLAKE2B 95e3ac33ff4adb65813274864c17781056a8ea065f9a76571b4a6bcb2ebab090c3a021fa2b621832c11b5995e48a8a26dd6e3a8f5864a8e8b520bfcf85d7c4ab SHA512 a148cda6ac97935d51ede1bbacf847d7d2cba8861cf3941d32e3da2f45f16dcc05b20845b63d4264692520db8329e1236cf2bc4fd8ccbe6e40921bbbdeb2cb1c
-DIST readline80-002 1401 BLAKE2B a2f511272f6d651208469998330059d6bae17bb8b704b64468685bb0368b76df1ca5b1dcd8e5cb0019e80932130c8a92fd1a305679bf79f0b801532a94c4b4ae SHA512 a941d142a59fe592cc45c1cf4d416e2fc0ab543dd6a0496fb8b2ec6f651cedd6fb9e0c105f14880700b69b2d6912653b3f66371e45cbe4adc0cc9554801afd3c
-DIST readline80-003 2158 BLAKE2B d8910aef1b796a59500b255df8db71ad1738dd164fd69827759eade74b6d9806ecd364839cfa904fc2f2d48352342155f670e5ec43aac0693f36820fb7139a4d SHA512 85235fca047b4ac87b846d998fffc67ae67ed365b068fd2743e84f11fd00086f85e622955192e07e3560965e32ff5f6d014e0146cde528fb0d0f7b5b829875ca
-DIST readline80-004 1275 BLAKE2B ac260bab163f17ccc783e0c2a21351b05e9e86ad973383d228d10ec749f265df8588c38946c9da15e987192b50f1bcb81141c2f4e171f65455f58521e864a534 SHA512 301ced2361e7583468f9932038936387a016c20d1c41966658a78c7f7c48c70308bf66b3228de0a3c6fc880427b6a90ee1ac4d2693daed432e5ae970671a7461
+DIST readline-8.1.tar.gz 2993288 BLAKE2B f0feca1ea3517b2b613adacac8c997cce0e86aa2f410c82a40ce1a2e128067112b4c68dbf25b808291c28c47583345abac994ce10b8d117958afcb96ee5e7c69 SHA512 27790d0461da3093a7fee6e89a51dcab5dc61928ec42e9228ab36493b17220641d5e481ea3d8fee5ee0044c70bf960f55c7d3f1a704cf6b9c42e5c269b797e00
+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/files/readline-6.3-fix-long-prompt-vi-search.patch b/sys-libs/readline/files/readline-6.3-fix-long-prompt-vi-search.patch
deleted file mode 100644
index 23d785054e75..000000000000
--- a/sys-libs/readline/files/readline-6.3-fix-long-prompt-vi-search.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-https://lists.gnu.org/archive/html/bug-bash/2014-08/msg00082.html
-
-From 2774192e93991e3d85ccc37c714aa018e442af6d Mon Sep 17 00:00:00 2001
-From: Dylan Cali <calid1984@gmail.com>
-Date: Sat, 23 Aug 2014 02:26:05 -0500
-Subject: [PATCH] fix vi search prompt bug for long prompts
-
----
- display.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/display.c b/display.c
-index 4df1f73..e575b16 100644
---- a/display.c
-+++ b/display.c
-@@ -2259,7 +2259,7 @@ rl_message (va_alist)
- va_start (args);
- format = va_arg (args, char *);
- #endif
-- vsnprintf (msg_buf, msg_bufsiz - 1, format, args);
-+ vsnprintf (msg_buf, msg_bufsiz, format, args);
- }
- #else
- vsprintf (msg_buf, format, args);
---
-1.7.10.4
diff --git a/sys-libs/readline/files/readline-6.3-read-eof.patch b/sys-libs/readline/files/readline-6.3-read-eof.patch
deleted file mode 100644
index f74aad63be1f..000000000000
--- a/sys-libs/readline/files/readline-6.3-read-eof.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-http://lists.gnu.org/archive/html/bug-bash/2014-12/msg00152.html
-
-*** ../bash-4.3-patched/lib/readline/readline.c 2014-10-01 13:08:28.000000000 -0400
---- lib/readline/readline.c 2014-12-20 22:37:28.000000000 -0500
-***************
-*** 580,592 ****
- }
-
-! /* EOF typed to a non-blank line is a <NL>. If we want to change this,
-! to force any existing line to be ignored when read(2) reads EOF,
-! for example, this is the place to change. */
- if (c == EOF && rl_end)
-! c = NEWLINE;
-
- /* The character _rl_eof_char typed to blank line, and not as the
-! previous character is interpreted as EOF. */
-! if (((c == _rl_eof_char && lastc != c) || c == EOF) && !rl_end)
- {
- #if defined (READLINE_CALLBACKS)
---- 587,620 ----
- }
-
-! /* EOF typed to a non-blank line is ^D the first time, EOF the second
-! time in a row. This won't return any partial line read from the tty.
-! If we want to change this, to force any existing line to be returned
-! when read(2) reads EOF, for example, this is the place to change. */
- if (c == EOF && rl_end)
-! {
-! if (RL_SIG_RECEIVED ())
-! {
-! RL_CHECK_SIGNALS ();
-! if (rl_signal_event_hook)
-! (*rl_signal_event_hook) (); /* XXX */
-! }
-!
-! /* XXX - reading two consecutive EOFs returns EOF */
-! if (RL_ISSTATE (RL_STATE_TERMPREPPED))
-! {
-! if (lastc == _rl_eof_char || lastc == EOF)
-! rl_end = 0;
-! else
-! c = _rl_eof_char;
-! }
-! else
-! c = NEWLINE;
-! }
-
- /* The character _rl_eof_char typed to blank line, and not as the
-! previous character is interpreted as EOF. This doesn't work when
-! READLINE_CALLBACKS is defined, so hitting a series of ^Ds will
-! erase all the chars on the line and then return EOF. */
-! if (((c == _rl_eof_char && lastc != c) || c == EOF) && rl_end == 0)
- {
- #if defined (READLINE_CALLBACKS)
diff --git a/sys-libs/readline/files/readline-7.0-mingw.patch b/sys-libs/readline/files/readline-7.0-mingw.patch
deleted file mode 100644
index f003038d2c0f..000000000000
--- a/sys-libs/readline/files/readline-7.0-mingw.patch
+++ /dev/null
@@ -1,152 +0,0 @@
---- a/colors.c
-+++ b/colors.c
-@@ -37,6 +37,10 @@
- #include "posixstat.h" // stat related macros (S_ISREG, ...)
- #include <fcntl.h> // S_ISUID
-
-+#ifndef S_ISDIR
-+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-+#endif
-+
- // strlen()
- #if defined (HAVE_STRING_H)
- # include <string.h>
-@@ -182,12 +186,17 @@ _rl_print_color_indicator (const char *f
- if (S_ISREG (mode))
- {
- colored_filetype = C_FILE;
--
-+#ifdef S_ISUID
- if ((mode & S_ISUID) != 0 && is_colored (C_SETUID))
- colored_filetype = C_SETUID;
-- else if ((mode & S_ISGID) != 0 && is_colored (C_SETGID))
-+ else
-+#endif
-+#ifdef S_ISGID
-+ if ((mode & S_ISGID) != 0 && is_colored (C_SETGID))
- colored_filetype = C_SETGID;
-- else if (is_colored (C_CAP) && 0) //f->has_capability)
-+ else
-+#endif
-+ if (is_colored (C_CAP) && 0) //f->has_capability)
- colored_filetype = C_CAP;
- else if ((mode & S_IXUGO) != 0 && is_colored (C_EXEC))
- colored_filetype = C_EXEC;
-@@ -211,12 +220,16 @@ _rl_print_color_indicator (const char *f
- colored_filetype = C_STICKY;
- #endif
- }
-+#if defined (S_ISLNK)
- else if (S_ISLNK (mode))
- colored_filetype = C_LINK;
-+#endif
- else if (S_ISFIFO (mode))
- colored_filetype = C_FIFO;
-+#if defined (S_ISSOCK)
- else if (S_ISSOCK (mode))
- colored_filetype = C_SOCK;
-+#endif
- else if (S_ISBLK (mode))
- colored_filetype = C_BLK;
- else if (S_ISCHR (mode))
---- a/histfile.c
-+++ b/histfile.c
-@@ -606,12 +606,14 @@ history_truncate_file (fname, lines)
- history_lines_written_to_file = 0;
- }
-
-+#if defined (HAVE_CHOWN)
- /* Make sure the new filename is owned by the same user as the old. If one
- user is running this, it's a no-op. If the shell is running after sudo
- with a shared history file, we don't want to leave the history file
- owned by root. */
- if (rv == 0 && exists)
- r = chown (filename, finfo.st_uid, finfo.st_gid);
-+#endif
-
- xfree (filename);
- FREE (tempname);
-@@ -753,12 +755,14 @@ mmap_error:
- history_lines_written_to_file = 0;
- }
-
-+#if defined (HAVE_CHOWN)
- /* Make sure the new filename is owned by the same user as the old. If one
- user is running this, it's a no-op. If the shell is running after sudo
- with a shared history file, we don't want to leave the history file
- owned by root. */
- if (rv == 0 && exists)
- mode = chown (histname, finfo.st_uid, finfo.st_gid);
-+#endif
-
- FREE (histname);
- FREE (tempname);
---- a/input.c
-+++ b/input.c
-@@ -71,6 +71,10 @@ extern int errno;
- #include "rlshell.h"
- #include "xmalloc.h"
-
-+#if defined (__MINGW32__)
-+#include <conio.h>
-+#endif
-+
- /* What kind of non-blocking I/O do we have? */
- #if !defined (O_NDELAY) && defined (O_NONBLOCK)
- # define O_NDELAY O_NONBLOCK /* Posix style */
---- a/posixstat.h
-+++ b/posixstat.h
-@@ -78,30 +78,44 @@
-
- #if defined (S_IFBLK) && !defined (S_ISBLK)
- #define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) /* block device */
-+#elif !defined (S_IFBLK)
-+#define S_ISBLK(m) 0
- #endif
-
- #if defined (S_IFCHR) && !defined (S_ISCHR)
- #define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) /* character device */
-+#elif !defined (S_IFCHR)
-+#define S_ISCHR(m) 0
- #endif
-
- #if defined (S_IFDIR) && !defined (S_ISDIR)
- #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) /* directory */
-+#elif !defined (S_IFDIR)
-+#define S_ISDIR(m) 0
- #endif
-
- #if defined (S_IFREG) && !defined (S_ISREG)
- #define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) /* file */
-+#elif !defined (S_IFREG)
-+#define S_ISREG(m) 0
- #endif
-
- #if defined (S_IFIFO) && !defined (S_ISFIFO)
- #define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) /* fifo - named pipe */
-+#elif !defined (S_IFIFO)
-+#define S_ISFIFO(m) 0
- #endif
-
- #if defined (S_IFLNK) && !defined (S_ISLNK)
- #define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) /* symbolic link */
-+#elif !defined (S_IFLNK)
-+#define S_ISLNK(m) 0
- #endif
-
- #if defined (S_IFSOCK) && !defined (S_ISSOCK)
- #define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) /* socket */
-+#elif !defined (S_IFSOCK)
-+#define S_ISSOCK(m) 0
- #endif
-
- /*
-@@ -137,6 +151,8 @@
- /* These are non-standard, but are used in builtins.c$symbolic_umask() */
- #define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH)
- #define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH)
-+#if defined(S_IXUSR) && defined(S_IXOTH)
- #define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
-+#endif
-
- #endif /* _POSIXSTAT_H_ */
diff --git a/sys-libs/readline/files/readline-7.0-missing-echo-proto.patch b/sys-libs/readline/files/readline-7.0-missing-echo-proto.patch
deleted file mode 100644
index cad3c8ca2c44..000000000000
--- a/sys-libs/readline/files/readline-7.0-missing-echo-proto.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-https://lists.gnu.org/archive/html/bug-readline/2016-11/msg00000.html
-
-fix from upstream
-
---- a/readline.h
-+++ b/readline.h
-@@ -413,6 +413,7 @@
- extern void rl_tty_set_default_bindings PARAMS((Keymap));
- extern void rl_tty_unset_default_bindings PARAMS((Keymap));
-
-+extern int rl_tty_set_echoing PARAMS((int));
- extern int rl_reset_terminal PARAMS((const char *));
- extern void rl_resize_terminal PARAMS((void));
- extern void rl_set_screen_size PARAMS((int, int));
diff --git a/sys-libs/readline/files/readline-8.0-darwin-shlib-versioning.patch b/sys-libs/readline/files/readline-8.0-darwin-shlib-versioning.patch
new file mode 100644
index 000000000000..881280087715
--- /dev/null
+++ b/sys-libs/readline/files/readline-8.0-darwin-shlib-versioning.patch
@@ -0,0 +1,41 @@
+darwin: don't do multi-arch stuff, just build a normal shared library
+
+--- a/support/shobj-conf
++++ b/support/shobj-conf
+@@ -180,34 +180,8 @@
+ SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)'
+ SHLIB_LIBSUFF='dylib'
+
+- # unused at this time
+- SHLIB_SONAME='$(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF)'
+-
+- case "${host_os}" in
+- # Darwin versions 1, 5, 6, 7 correspond to Mac OS X 10.0, 10.1, 10.2,
+- # and 10.3, respectively.
+- darwin[1-7].*)
+- SHOBJ_STATUS=unsupported
+- SHOBJ_LDFLAGS='-dynamic'
+- SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF) -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -v'
+- ;;
+- # Darwin 8 == Mac OS X 10.4; Mac OS X 10.N == Darwin N+4
+- *)
+- case "${host_os}" in
+- darwin[89]*|darwin1[012]*)
+- SHOBJ_ARCHFLAGS='-arch_only `/usr/bin/arch`'
+- ;;
+- *) # Mac OS X 10.9 (Mavericks) and later
+- SHOBJ_ARCHFLAGS=
+- # for 32 and 64bit universal library
+- #SHOBJ_ARCHFLAGS='-arch i386 -arch x86_64'
+- #SHOBJ_CFLAGS=${SHOBJ_CFLAGS}' -arch i386 -arch x86_64'
+- ;;
+- esac
+- SHOBJ_LDFLAGS="-dynamiclib -dynamic -undefined dynamic_lookup ${SHOBJ_ARCHFLAGS}"
+- SHLIB_XLDFLAGS="-dynamiclib ${SHOBJ_ARCHFLAGS}"' -install_name $(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF) -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -v'
+- ;;
+- esac
++ SHOBJ_LDFLAGS='-dynamiclib -dynamic -undefined dynamic_lookup'
++ SHLIB_XLDFLAGS='-dynamiclib -install_name $(libdir)/`basename $@ $(SHLIB_MINOR)$(SHLIB_DOT)$(SHLIB_LIBSUFF)`$(SHLIB_DOT)$(SHLIB_LIBSUFF) -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR)'
+
+ SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1
+ ;;
diff --git a/sys-libs/readline/files/readline-8.1-windows-signals.patch b/sys-libs/readline/files/readline-8.1-windows-signals.patch
new file mode 100644
index 000000000000..2f818fc7f9c1
--- /dev/null
+++ b/sys-libs/readline/files/readline-8.1-windows-signals.patch
@@ -0,0 +1,23 @@
+fix from upstream
+
+commit 4be5608573b2be2e31f3d2a01446e22e1c9d7839
+Author: Chet Ramey <chet.ramey@case.edu>
+Date: Wed Jan 27 11:49:50 2021 -0500
+
+ commit bash-20210122 snapshot
+
+diff --git a/lib/readline/signals.c b/lib/readline/signals.c
+index 0943c643b27d..ecaf699e9261 100644
+--- a/signals.c
++++ b/signals.c
+@@ -266,8 +266,10 @@ _rl_handle_signal (int sig)
+ case SIGQUIT:
+ #endif
+
++#if defined (HAVE_POSIX_SIGNALS)
+ if (block_sig)
+ sigprocmask (SIG_BLOCK, &set, &oset);
++#endif
+
+ rl_echo_signal_char (sig);
+ rl_cleanup_after_signal ();
diff --git a/sys-libs/readline/metadata.xml b/sys-libs/readline/metadata.xml
index 6bce63269f8b..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 "http://www.gentoo.org/dtd/metadata.dtd">
+<!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-6.3_p8-r3.ebuild b/sys-libs/readline/readline-6.3_p8-r3.ebuild
deleted file mode 100644
index 009f74e037f7..000000000000
--- a/sys-libs/readline/readline-6.3_p8-r3.ebuild
+++ /dev/null
@@ -1,163 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit eutils multilib toolchain-funcs flag-o-matic multilib-minimal preserve-libs usr-ldscript
-
-# Official patches
-# See ftp://ftp.cwru.edu/pub/bash/readline-6.3-patches/
-PLEVEL=${PV##*_p}
-MY_PV=${PV/_p*}
-MY_PV=${MY_PV/_/-}
-MY_P=${PN}-${MY_PV}
-[[ ${PV} != *_p* ]] && PLEVEL=0
-patches() {
- [[ ${PLEVEL} -eq 0 ]] && return 1
- local opt=$1
- eval set -- {1..${PLEVEL}}
- set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@")
- if [[ ${opt} == -s ]] ; then
- echo "${@/#/${DISTDIR}/}"
- else
- local u
- for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do
- printf "${u}/${PN}-${MY_PV}-patches/%s " "$@"
- done
- fi
-}
-
-DESCRIPTION="Another cute console display library"
-HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html"
-SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="static-libs utils"
-
-RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}
- virtual/pkgconfig"
-
-S=${WORKDIR}/${MY_P}
-
-PATCHES=(
- "${FILESDIR}"/${PN}-5.0-no_rpath.patch
- "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091
- "${FILESDIR}"/${PN}-6.3-fix-long-prompt-vi-search.patch
- "${FILESDIR}"/${PN}-6.3-read-eof.patch
-)
-
-src_unpack() {
- unpack ${MY_P}.tar.gz
-}
-
-src_prepare() {
- [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
- epatch "${PATCHES[@]}"
-
- # Force ncurses linking. #71420
- # Use pkg-config to get the right values. #457558
- local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs)
- sed -i \
- -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \
- support/shobj-conf || die
- sed -i \
- -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \
- examples/rlfe/configure || die
-
- # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
- # objformat for years, so we don't want to rely on that.
- sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
-
- ln -s ../.. examples/rlfe/readline # for local readline headers
-}
-
-src_configure() {
- # fix implicit decls with widechar funcs
- append-cppflags -D_GNU_SOURCE
- # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
- append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
-
- # Make sure configure picks a better ar than `ar`. #484866
- export ac_cv_prog_AR=$(tc-getAR)
-
- # Force the test since we used sed above to force it.
- export bash_cv_termcap_lib=ncurses
-
- # Control cross-compiling cases when we know the right answer.
- # In cases where the C library doesn't support wide characters, readline
- # itself won't work correctly, so forcing the answer below should be OK.
- if tc-is-cross-compiler ; then
- export bash_cv_func_sigsetjmp='present'
- export bash_cv_func_ctype_nonascii='yes'
- export bash_cv_wcwidth_broken='no' #503312
- fi
-
- # This is for rlfe, but we need to make sure LDFLAGS doesn't change
- # so we can re-use the config cache file between the two.
- append-ldflags -L.
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- ECONF_SOURCE=${S} \
- econf \
- --cache-file="${BUILD_DIR}"/config.cache \
- --docdir='$(datarootdir)'/doc/${PF} \
- --with-curses \
- $(use_enable static-libs static)
-
- 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)
- ln -sf ../../lib${l}.a lib${l}.a
- done
- emake
- fi
-}
-
-multilib_src_install() {
- default
-
- if multilib_is_native_abi ; then
- gen_usr_ldscript -a readline history #4411
-
- if use utils && ! tc-is-cross-compiler; then
- dobin examples/rlfe/rlfe
- fi
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
- dodoc USAGE
- dohtml -r doc/.
- docinto ps
- dodoc doc/*.ps
-}
-
-pkg_preinst() {
- preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5} #29865
-}
-
-pkg_postinst() {
- preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5}
-}
diff --git a/sys-libs/readline/readline-8.0_p4.ebuild b/sys-libs/readline/readline-8.1_p2-r1.ebuild
index 89d0c6f52b78..8c2239444310 100644
--- a/sys-libs/readline/readline-8.0_p4.ebuild
+++ b/sys-libs/readline/readline-8.1_p2-r1.ebuild
@@ -1,31 +1,20 @@
-# Copyright 1999-2020 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-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-7.0-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=()
+
[[ ${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,45 +22,95 @@ 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
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
+[[ ${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:0=[static-libs?,unicode?,${MULTILIB_USEDEP}]"
+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
+ "${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch
+ "${FILESDIR}"/${PN}-8.1-windows-signals.patch
)
# Needed because we don't want the patches being unpacked
# (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
- # Force ncurses linking. #71420
- # Use pkg-config to get the right values. #457558
- local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs)
+ 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. #71420
+ # Use pkg-config to get the right values. #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
@@ -102,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
@@ -150,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
@@ -167,9 +204,17 @@ multilib_src_install_all() {
pkg_preinst() {
# bug #29865
# Reappeared in #595324 with paludis so keeping this for now...
- preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5,6,7}
+ 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}.so.{4,5,6,7}
+ 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-7.0_p5-r1.ebuild b/sys-libs/readline/readline-8.1_p2-r2.ebuild
index 00c928489ece..8c2239444310 100644
--- a/sys-libs/readline/readline-7.0_p5-r1.ebuild
+++ b/sys-libs/readline/readline-8.1_p2-r2.ebuild
@@ -1,31 +1,20 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit flag-o-matic multilib-minimal toolchain-funcs preserve-libs 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-7.0-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=()
+
[[ ${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,44 +22,95 @@ 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"
-SLOT="0/7" # subslot matches SONAME major
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="static-libs +unicode utils"
+S="${WORKDIR}/${MY_P}"
-RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,unicode?,${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}
- virtual/pkgconfig"
+LICENSE="GPL-3+"
+SLOT="0/8" # subslot matches SONAME major
+[[ ${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"
-S=${WORKDIR}/${MY_P}
+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 #385091
"${FILESDIR}"/${PN}-7.0-headers.patch
- "${FILESDIR}"/${PN}-7.0-missing-echo-proto.patch
- "${FILESDIR}"/${PN}-7.0-mingw.patch
+ "${FILESDIR}"/${PN}-8.0-headers.patch
+ "${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch
+ "${FILESDIR}"/${PN}-8.1-windows-signals.patch
)
# Needed because we don't want the patches being unpacked
# (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
- # Force ncurses linking. #71420
- # Use pkg-config to get the right values. #457558
- local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs)
+ 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. #71420
+ # Use pkg-config to get the right values. #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
@@ -101,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
@@ -149,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
@@ -166,9 +204,17 @@ multilib_src_install_all() {
pkg_preinst() {
# bug #29865
# Reappeared in #595324 with paludis so keeping this for now...
- preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5,6}
+ 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}.so.{4,5,6}
+ 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_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.3_alpha.ebuild b/sys-libs/readline/readline-8.3_alpha.ebuild
new file mode 100644
index 000000000000..616ce593d07b
--- /dev/null
+++ b/sys-libs/readline/readline-8.3_alpha.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/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/metadata.xml b/sys-libs/rpmatch-standalone/metadata.xml
index 4aa32e43cbee..4f03b2908d47 100644
--- a/sys-libs/rpmatch-standalone/metadata.xml
+++ b/sys-libs/rpmatch-standalone/metadata.xml
@@ -1,5 +1,5 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>blueness@gentoo.org</email>
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 4881a46decc1..d6689b450bd9 100644
--- a/sys-libs/rpmatch-standalone/rpmatch-standalone-1.0.ebuild
+++ b/sys-libs/rpmatch-standalone/rpmatch-standalone-1.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -11,12 +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
- !sys-libs/uclibc"
+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/metadata.xml b/sys-libs/slang/metadata.xml
index 6f2ca22da233..a94766977fa6 100644
--- a/sys-libs/slang/metadata.xml
+++ b/sys-libs/slang/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>cjk@gentoo.org</email>
diff --git a/sys-libs/slang/slang-2.3.2.ebuild b/sys-libs/slang/slang-2.3.2.ebuild
index 5eb9b100fa5e..4dbae877427b 100644
--- a/sys-libs/slang/slang-2.3.2.ebuild
+++ b/sys-libs/slang/slang-2.3.2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit multilib-minimal
@@ -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 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-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"
@@ -62,20 +62,17 @@ multilib_src_configure() {
}
multilib_src_compile() {
- emake elf $(use static-libs && echo static)
-
- pushd slsh >/dev/null || die
- emake slsh
- popd || die
+ emake elf $(usex static-libs static '')
+ emake -C slsh slsh
}
multilib_src_install() {
- emake DESTDIR="${D}" install $(use static-libs && echo install-static)
+ emake DESTDIR="${D}" install $(usex static-libs install-static '')
}
multilib_src_install_all() {
- rm -r "${ED%/}"/usr/share/doc/{slang,slsh} || die
- dodoc NEWS README *.txt doc/{,internal,text}/*.txt
- docinto html
- dodoc doc/slangdoc.html slsh/doc/html/*.html
+ 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-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/suacomp/Manifest b/sys-libs/suacomp/Manifest
deleted file mode 100644
index 2983314f49fa..000000000000
--- a/sys-libs/suacomp/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST suacomp-0.6.14.tar.gz 36712 BLAKE2B 09df68729de50753e987a958a7184125308b652dcd4483acfa89bdf454a74341398ef4e5db616b1b2d8e51025040e7e3807df9221402b17e63fb3fd862272f68 SHA512 6e559059c18c1412611d837bf2f5fad08deaf9145464347f712fdb0cd4e0dfae1b7b46253ef086bd4c98cc1555111872b6b5af5272b77a88c767e9008143b7f1
diff --git a/sys-libs/suacomp/files/suacomp-0.6.14-strtoll.patch b/sys-libs/suacomp/files/suacomp-0.6.14-strtoll.patch
deleted file mode 100644
index 16ee7f4e5c41..000000000000
--- a/sys-libs/suacomp/files/suacomp-0.6.14-strtoll.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From a498772e5fe942eafe06ed62a00a21c4b99164b5 Mon Sep 17 00:00:00 2001
-From: David Holm <dholmster@gmail.com>
-Date: Fri, 14 Sep 2012 20:57:30 +0200
-Subject: [PATCH] Fixes build issues on SUA 6.0
-
-The prototypes for strto[u]ll.c in SUA 6.0 use C99 and are defined using (u_)quad_t. This will cause compilation to fail since there is a mismatch between stdlib.h and the implementation in suacomp. This change switches to the C99 definition and undefines strto[u]ll in case stdlib.h wants to map them to existing implementations.
-
-https://sourceforge.net/p/suacomp/tickets/1/
----
- strtoll.c | 3 ++-
- strtoull.c | 3 ++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/strtoll.c b/strtoll.c
-index 12f9886..c9e34b8 100644
---- a/strtoll.c
-+++ b/strtoll.c
-@@ -9,7 +9,8 @@
- #include <unistd.h>
- #include <stdlib.h>
-
--long long int strtoll(const char* nptr, char** endptr, int base) {
-+#undef strtoll
-+quad_t strtoll(const char* nptr, char** endptr, int base) {
- long long int ret;
- DT("enter: %p, %p, %d\n", nptr, endptr, base);
-
-diff --git a/strtoull.c b/strtoull.c
-index d0e0e67..622ee9b 100644
---- a/strtoull.c
-+++ b/strtoull.c
-@@ -9,7 +9,8 @@
- #include <unistd.h>
- #include <stdlib.h>
-
--long long int strtoull(const char* nptr, char** endptr, int base) {
-+#undef strtoull
-+u_quad_t strtoull(const char* nptr, char** endptr, int base) {
- long long int ret;
- DT("enter: %p, %p, %d\n", nptr, endptr, base);
-
---
-1.7.6.1
-
diff --git a/sys-libs/suacomp/metadata.xml b/sys-libs/suacomp/metadata.xml
deleted file mode 100644
index 0d95d5d4e805..000000000000
--- a/sys-libs/suacomp/metadata.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>haubi@gentoo.org</email>
- <name>Michael Haubenwallner</name>
- </maintainer>
- <longdescription lang="en">
- A small library, trying to overcome the problems occuring when building
- (and using) gentoo-prefix on an interix based system. This has no use
- on non-interix systems.
- </longdescription>
- <upstream>
- <remote-id type="sourceforge">suacomp</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/suacomp/suacomp-0.6.14.ebuild b/sys-libs/suacomp/suacomp-0.6.14.ebuild
deleted file mode 100644
index be3e9886e4e5..000000000000
--- a/sys-libs/suacomp/suacomp-0.6.14.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit flag-o-matic toolchain-funcs
-
-DESCRIPTION="library wrapping the interix lib-c to make it less buggy"
-HOMEPAGE="http://suacomp.sf.net"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="BEER-WARE"
-SLOT="0"
-KEYWORDS=""
-IUSE="debug"
-
-DEPEND=""
-RDEPEND=""
-
-get_opts() {
- local shlibc=
- local stlibc=
-
- local dir
- for dir in /usr/lib /usr/lib/x86; do
- [[ -f ${dir}/libc.a ]] && stlibc=${dir}/libc.a
-
- local name
- for name in libc.so.5.2 libc.so.3.5; do
- [[ -f ${dir}/${name} ]] && { shlibc=${dir}/${name}; break; }
- done
-
- [[ -f ${shlibc} && -f ${stlibc} ]] && break
- done
-
- echo "SHARED_LIBC=${shlibc} STATIC_LIBC=${stlibc}"
-}
-
-src_prepare() {
- [[ ${CHOST} == *-interix6* ]] && eapply "${FILESDIR}"/${P}-strtoll.patch
- eapply_user
-}
-
-src_configure() {
- if use debug; then
- append-flags -D_DEBUG -D_DEBUG_TRACE
- fi
-}
-
-src_compile() {
- emake all CC=$(tc-getCC) $(get_opts) CFLAGS="${CFLAGS}"
-}
-
-src_test() {
- local v=
-
- use debug && v="TEST_VERBOSE=1"
- use debug && export SUACOMP_DEBUG_OUT=stderr
-
- emake check $(get_opts) ${v}
-}
-
-src_install() {
- emake install PREFIX="${EPREFIX}/usr" DESTDIR="${D}" $(get_opts) \
- CFLAGS="${CFLAGS}"
-}
diff --git a/sys-libs/suacomp/suacomp-9999.ebuild b/sys-libs/suacomp/suacomp-9999.ebuild
deleted file mode 100644
index b356312ab407..000000000000
--- a/sys-libs/suacomp/suacomp-9999.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit flag-o-matic toolchain-funcs git-r3
-
-DESCRIPTION="library wrapping the interix lib-c to make it less buggy"
-HOMEPAGE="http://suacomp.sf.net"
-EGIT_REPO_URI="https://git.code.sf.net/p/suacomp/git"
-
-LICENSE="BEER-WARE"
-SLOT="0"
-IUSE="debug"
-
-DEPEND=""
-RDEPEND=""
-
-get_opts() {
- local shlibc=
- local stlibc=
-
- local dir
- for dir in /usr/lib /usr/lib/x86; do
- [[ -f ${dir}/libc.a ]] && stlibc=${dir}/libc.a
-
- local name
- for name in libc.so.5.2 libc.so.3.5; do
- [[ -f ${dir}/${name} ]] && { shlibc=${dir}/${name}; break; }
- done
-
- [[ -f ${shlibc} && -f ${stlibc} ]] && break
- done
-
- echo "SHARED_LIBC=${shlibc} STATIC_LIBC=${stlibc}"
-}
-
-src_configure() {
- if use debug; then
- append-flags -D_DEBUG -D_DEBUG_TRACE
- fi
-}
-
-src_compile() {
- emake all CC=$(tc-getCC) $(get_opts) CFLAGS="${CFLAGS}"
-}
-
-src_test() {
- local v=
-
- use debug && v="TEST_VERBOSE=1"
- use debug && export SUACOMP_DEBUG_OUT=stderr
-
- emake check $(get_opts) ${v}
-}
-
-src_install() {
- emake install PREFIX="${EPREFIX}/usr" DESTDIR="${D}" $(get_opts) \
- CFLAGS="${CFLAGS}"
-}
diff --git a/sys-libs/talloc/Manifest b/sys-libs/talloc/Manifest
index 851108bbb0be..5a3da1defe46 100644
--- a/sys-libs/talloc/Manifest
+++ b/sys-libs/talloc/Manifest
@@ -1 +1,3 @@
-DIST talloc-2.3.1.tar.gz 638878 BLAKE2B 3d014a47639434c65f5dda2c51da3c6c28d5d60dbc9afdaca27b8ec903cde3433a8fa4ca33305750ff60911f7e43171d0d932d98c2d30ea38494aa532d6d9626 SHA512 064fc39a9aaace6e0209f3251c8ff198d8a318b4cf4198006ff9892ca6e15e7d817b2fda43e0444fbbf04d2c3e70d06523dff5d57cbb796d27317ef4759e062e
+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/metadata.xml b/sys-libs/talloc/metadata.xml
index afa647617059..74582fbea828 100644
--- a/sys-libs/talloc/metadata.xml
+++ b/sys-libs/talloc/metadata.xml
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>patrick@gentoo.org</email>
- <name>Patrick Lauer</name>
- </maintainer>
<maintainer type="project">
<email>samba@gentoo.org</email>
<name>Samba</name>
diff --git a/sys-libs/talloc/talloc-2.3.1.ebuild b/sys-libs/talloc/talloc-2.3.1.ebuild
deleted file mode 100644
index ec25e7966a92..000000000000
--- a/sys-libs/talloc/talloc-2.3.1.ebuild
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit waf-utils python-single-r1 multilib 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 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~x64-solaris"
-IUSE="compat +python"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="!elibc_FreeBSD? (
- !elibc_SunOS? (
- !elibc_Darwin? (
- dev-libs/libbsd[${MULTILIB_USEDEP}]
- )
- )
- )
- python? ( ${PYTHON_DEPS} )
- !!<sys-libs/talloc-2.0.5"
-DEPEND="${RDEPEND}
- sys-devel/gettext
- dev-libs/libxslt
- ${PYTHON_DEPS}"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-RESTRICT="test"
-
-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
-
- # what would you expect of waf? i won't even waste time trying.
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local extra_opts=(
- $(usex 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.2.0.5.dylib || die
- if use python ; then
- install_name_tool \
- -id "${EPREFIX}"/usr/$(get_libdir)/libpytalloc-util.2.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.2.0.5.dylib || die
- install_name_tool \
- -change "${S}/bin/default/libtalloc.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${ED}"/usr/$(get_libdir)/libpytalloc-util.2.0.5.dylib || die
- install_name_tool \
- -change "${S}/bin/default/libtalloc.dylib" \
- "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
- "${D}"$(python_get_sitedir)/talloc.bundle || die
- fi
- fi
-}
diff --git a/sys-libs/talloc/talloc-2.4.0.ebuild b/sys-libs/talloc/talloc-2.4.0.ebuild
new file mode 100644
index 000000000000..72b9421fc089
--- /dev/null
+++ b/sys-libs/talloc/talloc-2.4.0.ebuild
@@ -0,0 +1,125 @@
+# 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 valgrind"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="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
+
+ # what would you expect of waf? i won't even waste time trying.
+ 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/talloc/talloc-2.4.1.ebuild b/sys-libs/talloc/talloc-2.4.1.ebuild
new file mode 100644
index 000000000000..47470a52c629
--- /dev/null
+++ b/sys-libs/talloc/talloc-2.4.1.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/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 0c982d881307..000000000000
--- a/sys-libs/tapi/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://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 c3f24900a40f..000000000000
--- a/sys-libs/tapi/tapi-1.30.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# 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 ~x86-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 a789277cf7a0..000000000000
--- a/sys-libs/tapi/tapi-2.0.0.ebuild
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# 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 ~x86-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 258c1460e7b2..7ff18268d22f 100644
--- a/sys-libs/tdb/Manifest
+++ b/sys-libs/tdb/Manifest
@@ -1 +1,3 @@
-DIST tdb-1.4.3.tar.gz 702836 BLAKE2B 6593c3be527b383a7e8fd85b3613cf2429f6b665a7c609a56f57a6f5b41a080c1a681d712afd423c2bc1c741e06d7cd2c90949d9c5bf78ca834b18c64e23d51c SHA512 99488839e7da396f04df60412d21a7d3e09efeab52772d6cb5e9470a3dfd585d73ef2422c51cd0d8ccc123a65d455de400d5d6b24a21a2a50d3da60d9a70e67a
+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/metadata.xml b/sys-libs/tdb/metadata.xml
index f0c4a5fed2f9..c05a3de2dcc7 100644
--- a/sys-libs/tdb/metadata.xml
+++ b/sys-libs/tdb/metadata.xml
@@ -1,11 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>patrick@gentoo.org</email>
- <name>Patrick Lauer</name>
- </maintainer>
-<maintainer type="project">
+ <maintainer type="project">
<email>samba@gentoo.org</email>
<name>Samba</name>
</maintainer>
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.3.ebuild b/sys-libs/tdb/tdb-1.4.8.ebuild
index 2d7a265a1291..7215d9d77bb6 100644
--- a/sys-libs/tdb/tdb-1.4.3.ebuild
+++ b/sys-libs/tdb/tdb-1.4.8.ebuild
@@ -1,35 +1,38 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( python3_{9..12} )
PYTHON_REQ_USE="threads(+)"
-
inherit waf-utils multilib-minimal python-single-r1
-DESCRIPTION="A simple database API"
+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 ~mips ppc ppc64 ~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_REQUIRED_USE}"
+RESTRICT="test"
-RDEPEND="!elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] )
- python? ( ${PYTHON_DEPS} )"
+RDEPEND="
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
+ python? ( ${PYTHON_DEPS} )
+"
DEPEND="
${RDEPEND}
+ virtual/libcrypt
+"
+BDEPEND="
${PYTHON_DEPS}
- app-text/docbook-xml-dtd:4.2"
+ app-text/docbook-xml-dtd:4.2
+"
WAF_BINARY="${S}/buildtools/bin/waf"
-RESTRICT="test"
-
src_prepare() {
default
python_fix_shebang .
@@ -37,8 +40,15 @@ src_prepare() {
}
multilib_src_configure() {
- local extra_opts=()
- if ! multilib_is_native_abi || ! use python; then
+ 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
@@ -46,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
}
@@ -59,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 09de55dd85e7..1e65bee7c07b 100644
--- a/sys-libs/tevent/Manifest
+++ b/sys-libs/tevent/Manifest
@@ -1 +1,6 @@
-DIST tevent-0.10.2.tar.gz 800731 BLAKE2B 5ea6b83378b04dbe1666432db0dbd4c0df2e6b0bf5ebcc8ec4ec9bdeb834efec75c87b2019dc78c691aba6c4f6467394101febd6010f106046a1fb8848e27405 SHA512 1da8f28898f35daab515892b880d1de601062cc3e2b2570cd62e6913df17b0195a05acb7b484c628cddc0eb8b0cde893105ede3feb32bc5764e7d25684f332ba
+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/metadata.xml b/sys-libs/tevent/metadata.xml
index 00dd5f380b4d..09a9748a01cd 100644
--- a/sys-libs/tevent/metadata.xml
+++ b/sys-libs/tevent/metadata.xml
@@ -1,11 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>patrick@gentoo.org</email>
- <name>Patrick Lauer</name>
- </maintainer>
-<maintainer type="project">
+ <maintainer type="project">
<email>samba@gentoo.org</email>
<name>Samba</name>
</maintainer>
diff --git a/sys-libs/tevent/tevent-0.10.2.ebuild b/sys-libs/tevent/tevent-0.12.1.ebuild
index 0d5e3cf69422..c10e170eb42d 100644
--- a/sys-libs/tevent/tevent-0.10.2.ebuild
+++ b/sys-libs/tevent/tevent-0.12.1.ebuild
@@ -1,27 +1,34 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-PYTHON_COMPAT=( python3_{6,7,8} )
-PYTHON_REQ_USE="threads(+)"
+EAPI=7
+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://www.samba.org/ftp/tevent/${P}.tar.gz"
+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="elibc_glibc python"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux"
+IUSE="python"
-RDEPEND="!elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] )
- >=sys-libs/talloc-2.3.1[${MULTILIB_USEDEP}]
- python? ( ${PYTHON_DEPS} )"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="test"
+RDEPEND="
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
+ >=sys-libs/talloc-2.3.4[${MULTILIB_USEDEP}]
+ python? (
+ ${PYTHON_DEPS}
+ sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
+ )
+"
DEPEND="${RDEPEND}
- virtual/pkgconfig
+ >=dev-util/cmocka-1.1.3
elibc_glibc? (
net-libs/libtirpc[${MULTILIB_USEDEP}]
|| (
@@ -29,17 +36,16 @@ DEPEND="${RDEPEND}
<sys-libs/glibc-2.26[rpc(+)]
)
)
- ${PYTHON_DEPS}
"
-# build system does not work with python3
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+BDEPEND="${PYTHON_DEPS}
+ virtual/pkgconfig
+"
WAF_BINARY="${S}/buildtools/bin/waf"
-RESTRICT="test"
-
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 c58f31d96ec2..9ab247d9259a 100644
--- a/sys-libs/timezone-data/Manifest
+++ b/sys-libs/timezone-data/Manifest
@@ -1,2 +1,4 @@
-DIST tzcode2020a.tar.gz 257509 BLAKE2B 21335f0b6a3b98ba8203d49d1273c2016bfbef9903c394cda6ca97cc5ec5d1fb1605bb73ba9aa6c73eca3fe115fb2924da37b736bf0a8a0e214eed547100fe70 SHA512 5235d6590e844491df32375857f5f36ba0046f2d21a078375188dff79b125cf9b69136a0a431624de1ecfa9d53b62a232f0e6ee0b734294cec62b670e6265cb2
-DIST tzdata2020a.tar.gz 397245 BLAKE2B 2a85a9a9badbf2b74ba2ace3f7fd436cc7752202557785be503c1c8f2f698dfc8cfb412b3f08ebc0bd4a8d0e27293b47eeedf937f713dadb4386dad14322b871 SHA512 2a2fc2e3ad8a6e4c574242296c847ad582c2c1d86add9c556e65c812d19b9528522e3c4dddb5239017091825d2acc5a2ccaf21dc41b900b6c300ef4264cc5a9d
+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 a74a2f3c9066..3ff1474e992a 100644
--- a/sys-libs/timezone-data/metadata.xml
+++ b/sys-libs/timezone-data/metadata.xml
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>djc@gentoo.org</email>
- <name>Dirkjan Ochtman</name>
- </maintainer>
<maintainer type="project">
<email>toolchain@gentoo.org</email>
<name>Gentoo Toolchain Project</name>
@@ -15,5 +11,12 @@
when counting seconds since the epoch (while POSIX does not) as they are
based on the TAI (International Atomic Time) clock
</flag>
+ <flag name="zic-slim">
+ Default to 'slim' file format for /usr/share/zoneinfo. Otherwise 'fat' format
+ is used. Not all programs can handle 'slim' format'.
+ </flag>
</use>
+ <upstream>
+ <remote-id type="github">eggert/tz</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/timezone-data/timezone-data-2020a.ebuild b/sys-libs/timezone-data/timezone-data-2023d.ebuild
index 04def569f2a5..92d625f298e2 100644
--- a/sys-libs/timezone-data/timezone-data-2020a.ebuild
+++ b/sys-libs/timezone-data/timezone-data-2023d.ebuild
@@ -1,27 +1,32 @@
-# Copyright 1999-2020 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 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="nls leaps-timezone elibc_FreeBSD"
+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(+)]
+"
-S=${WORKDIR}
+src_unpack() {
+ mkdir "${S}" && cd "${S}" || die
+ default
+}
src_prepare() {
default
@@ -30,24 +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_FreeBSD || use elibc_Darwin ; then
- append-cppflags -DSTD_INSPIRED #138251
+ if use elibc_Darwin ; then
+ # bug #138251
+ append-cppflags -DSTD_INSPIRED
fi
append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"'
+
+ # Upstream default is 'slim', but it breaks quite a few programs
+ # that parse /etc/localtime directly: bug #747538.
+ append-cppflags -DZIC_BLOAT_DEFAULT='\"'$(usex zic-slim slim fat)'\"'
+
LDLIBS=""
if use nls ; then
- # See if an external libintl is available. #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
@@ -57,24 +71,23 @@ src_configure() {
_emake() {
emake \
REDO=$(usex leaps-timezone posix_right posix_only) \
- TZDATA_TEXT= \
TOPDIR="${EPREFIX}" \
ZICDIR='$(TOPDIR)/usr/bin' \
"$@"
}
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}" \
@@ -84,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
}
@@ -109,6 +122,7 @@ get_TIMEZONE() {
else
tz="FOOKABLOIE"
fi
+
[[ -z ${tz} ]] && return 1 || echo "${tz}"
}
@@ -124,49 +138,53 @@ 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
fi
if ! tz=$(get_TIMEZONE) ; then
- einfo "Assuming your empty ${etc_lt} file is what you want; skipping update."
+ einfo "Assuming your empty ${src} file is what you want; skipping update."
return 0
fi
- if [[ "${tz}" == "FOOKABLOIE" ]] ; then
- elog "You do not have TIMEZONE set in ${src}."
- if [[ ! -e "${etc_lt}" ]] ; then
- cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
- elog "Setting ${etc_lt} to Factory."
- else
- elog "Skipping auto-update of ${etc_lt}."
- fi
+ if [[ "${tz}" == "FOOKABLOIE" ]] ; then
+ einfo "You do not have a timezone set in ${src}; skipping update."
return 0
fi
- if [[ ! -e "${EROOT}/usr/share/zoneinfo/${tz}" ]] ; then
- elog "You have an invalid TIMEZONE setting in ${src}"
- elog "Your ${etc_lt} has been reset to Factory; enjoy!"
- tz="Factory"
+ local tzpath="${EROOT}/usr/share/zoneinfo/${tz}"
+
+ if [[ ! -e ${tzpath} ]]; then
+ ewarn "The timezone specified in ${src} is not valid!"
+ return 1
+ fi
+
+ if [[ -f ${etc_lt} ]]; then
+ # If a regular file already exists, copy over it.
+ ewarn "Found a regular file at ${etc_lt}."
+ ewarn "Some software may expect a symlink instead."
+ ewarn "You may convert it to a symlink by removing the file and running:"
+ ewarn " emerge --config sys-libs/timezone-data"
+ einfo "Copying ${tzpath} to ${etc_lt}."
+ cp -f "${tzpath}" "${etc_lt}"
+ else
+ # Otherwise, create a symlink and remove the timezone file.
+ tzpath="../usr/share/zoneinfo/${tz}"
+ einfo "Linking ${tzpath} at ${etc_lt}."
+ if ln -snf "${tzpath}" "${etc_lt}"; then
+ einfo "Removing ${src}."
+ rm -f "${src}"
+ fi
fi
- einfo "Updating ${etc_lt} with ${EROOT}/usr/share/zoneinfo/${tz}"
- cp -f "${EROOT}/usr/share/zoneinfo/${tz}" "${etc_lt}"
}
pkg_config() {
diff --git a/sys-libs/timezone-data/timezone-data-2024a-r1.ebuild b/sys-libs/timezone-data/timezone-data-2024a-r1.ebuild
new file mode 100644
index 000000000000..4fd0fa2b1d53
--- /dev/null
+++ b/sys-libs/timezone-data/timezone-data-2024a-r1.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs flag-o-matic
+
+MY_CODE_VER=${PV}
+MY_DATA_VER=${PV}
+DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
+HOMEPAGE="https://www.iana.org/time-zones"
+SRC_URI="
+ https://www.iana.org/time-zones/repository/releases/tzdata${MY_DATA_VER}.tar.gz
+ https://www.iana.org/time-zones/repository/releases/tzcode${MY_CODE_VER}.tar.gz
+"
+
+LICENSE="BSD public-domain"
+SLOT="0"
+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(+)]
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-AsiaAlmaty.patch
+)
+
+src_unpack() {
+ mkdir "${S}" && cd "${S}" || die
+ default
+}
+
+src_prepare() {
+ default
+
+ # check_web contacts validator.w3.org
+ sed -i -e 's/check_tables check_web/check_tables/g' \
+ Makefile || die "Failed to disable check_web"
+
+ if tc-is-cross-compiler ; then
+ cp -pR "${S}" "${S}"-native || die
+ fi
+}
+
+src_configure() {
+ tc-export CC
+
+ # bug #471102
+ append-lfs-flags
+
+ if use elibc_Darwin ; then
+ # bug #138251
+ append-cppflags -DSTD_INSPIRED
+ fi
+
+ append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"'
+
+ # Upstream default is 'slim', but it breaks quite a few programs
+ # that parse /etc/localtime directly: bug #747538.
+ append-cppflags -DZIC_BLOAT_DEFAULT='\"'$(usex zic-slim slim fat)'\"'
+
+ LDLIBS=""
+ if use nls ; then
+ # See if an external libintl is available. bug #154181, bug #578424
+ local c="${T}/test"
+ echo 'int main(){}' > "${c}.c" || die
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
+ LDLIBS+=" -lintl"
+ fi
+ fi
+}
+
+_emake() {
+ emake \
+ REDO=$(usex leaps-timezone posix_right posix_only) \
+ TOPDIR="${EPREFIX}" \
+ ZICDIR='$(TOPDIR)/usr/bin' \
+ "$@"
+}
+
+src_compile() {
+ tc-export AR CC RANLIB
+
+ _emake \
+ CFLAGS="${CFLAGS} -std=gnu99 ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ LDLIBS="${LDLIBS}"
+
+ if tc-is-cross-compiler ; then
+ _emake -C "${S}"-native \
+ AR="$(tc-getBUILD_AR)" \
+ CC="$(tc-getBUILD_CC)" \
+ RANLIB="$(tc-getBUILD_RANLIB)" \
+ CFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}" \
+ LDFLAGS="${BUILD_LDFLAGS}" \
+ LDLIBS="${LDLIBS}" \
+ zic
+ fi
+}
+
+src_test() {
+ # VALIDATE_ENV is used for extended/web based tests. Punt on them.
+ emake check VALIDATE_ENV=true
+}
+
+src_install() {
+ local zic=""
+ tc-is-cross-compiler && zic="zic=${S}-native/zic"
+ _emake install ${zic} DESTDIR="${D}" LIBDIR="/nukeit"
+ rm -rf "${D}/nukeit" "${ED}/etc" || die
+
+ insinto /usr/share/zoneinfo
+ doins "${S}"/leap-seconds.list
+
+ # Delete man pages installed by man-pages package.
+ rm "${ED}"/usr/share/man/man5/tzfile.5* "${ED}"/usr/share/man/man8/{tzselect,zdump,zic}.8 || die
+ dodoc CONTRIBUTING README NEWS *.html
+}
+
+get_TIMEZONE() {
+ local tz src="${EROOT}/etc/timezone"
+ if [[ -e ${src} ]] ; then
+ tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
+ else
+ tz="FOOKABLOIE"
+ fi
+
+ [[ -z ${tz} ]] && return 1 || echo "${tz}"
+}
+
+pkg_preinst() {
+ local tz=$(get_TIMEZONE)
+ if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then
+ eerror "The right & posix subdirs are no longer installed as subdirs -- they have been"
+ eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the"
+ eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not"
+ eerror "be using right/xxx for the system timezone as it breaks programs."
+ die "Please fix your timezone setting"
+ fi
+
+ # Trim the symlink by hand to avoid portage's automatic protection checks.
+ rm -f "${EROOT}"/usr/share/zoneinfo/posix
+}
+
+configure_tz_data() {
+ # Make sure the /etc/localtime file does not get stale, bug #127899
+ local tz src="${EROOT}/etc/timezone" etc_lt="${EROOT}/etc/localtime"
+
+ # If it's a symlink, assume the user knows what they're doing and
+ # they're managing it themselves, bug #511474
+ if [[ -L "${etc_lt}" ]] ; then
+ einfo "Assuming your ${etc_lt} symlink is what you want; skipping update."
+ return 0
+ fi
+
+ if ! tz=$(get_TIMEZONE) ; then
+ einfo "Assuming your empty ${src} file is what you want; skipping update."
+ return 0
+ fi
+
+ if [[ "${tz}" == "FOOKABLOIE" ]] ; then
+ einfo "You do not have a timezone set in ${src}; skipping update."
+ return 0
+ fi
+
+ local tzpath="${EROOT}/usr/share/zoneinfo/${tz}"
+
+ if [[ ! -e ${tzpath} ]]; then
+ ewarn "The timezone specified in ${src} is not valid!"
+ return 1
+ fi
+
+ if [[ -f ${etc_lt} ]]; then
+ # If a regular file already exists, copy over it.
+ ewarn "Found a regular file at ${etc_lt}."
+ ewarn "Some software may expect a symlink instead."
+ ewarn "You may convert it to a symlink by removing the file and running:"
+ ewarn " emerge --config sys-libs/timezone-data"
+ einfo "Copying ${tzpath} to ${etc_lt}."
+ cp -f "${tzpath}" "${etc_lt}"
+ else
+ # Otherwise, create a symlink and remove the timezone file.
+ tzpath="../usr/share/zoneinfo/${tz}"
+ einfo "Linking ${tzpath} at ${etc_lt}."
+ if ln -snf "${tzpath}" "${etc_lt}"; then
+ einfo "Removing ${src}."
+ rm -f "${src}"
+ fi
+ fi
+}
+
+pkg_config() {
+ configure_tz_data
+}
+
+pkg_postinst() {
+ configure_tz_data
+}
diff --git a/sys-libs/uclibc-ng/Manifest b/sys-libs/uclibc-ng/Manifest
deleted file mode 100644
index cd8ee877e8b9..000000000000
--- a/sys-libs/uclibc-ng/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST uClibc-ng-1.0.30.tar.bz2 2302796 BLAKE2B 21888dfe5a68f83b7ba56bb557ecc5aa19fd75cedc82f2ed48073f47655888719feb27943e0309f8101a24fd2fd9165af31d5679f21c00b12f27ebfccf354bac SHA512 ddd1d91dcfdf7be8471afecf13196563ad348c41e2fa8b63ae50b83f103cf8ed8d9f003b51a54a58db2935b84692b7c011a4779582f30610ede44cb583aae742
-DIST uClibc-ng-1.0.32.tar.bz2 2352471 BLAKE2B 887b67f7f03fc8610d8236a18f90584720a78bfc3a036cd6616453bea6e31140f5fd1dfd1d207cc5100854bf3e0c5cc1ca38fe6c31cf97b631892767ae23ec27 SHA512 1de5d4e99b94eeeada4233c53a95ea1b9e704ce1d4aa19ca9b17535c0328b2372ed93d24591c6ea5bfbc0b950aa575c18dcf6950fb04342924bb2b5f9ee235e8
-DIST uClibc-ng-1.0.33.tar.bz2 2399235 BLAKE2B c20fd767487b2f24a0af432a1366bfb6ddf02243495d2f1c3fa95db25551a8d6215be184608528ee544661ec2ddbc2f439299245ff3dff4597b376dc7a4658ec SHA512 cab89fb6a6e314c6cc8ac964604bdfae01d2e45dc71678bbb6a8985871f625ac680fec3ddc1cb29f6d15585b7fcb782eaf40fa6c89207cde2a04286c3d610169
-DIST uClibc-ng-1.0.35.tar.bz2 2396789 BLAKE2B b4e08ccb2bbf15d6a63e279f80792520edba78a9b95cde0432a2dbfc10d4830a621d71af97d4f2bbd867e6367182847c35b62f3c315dff85ecf0c680122238e0 SHA512 da2a1bc6e4a9ce1e3f436b9987fc5f6bb968e52f09508bef6588b409b861ece29d9c1411ffb88863de3a700cb19ad52a8d38596955d3b7bbfb3b0d3745daa25f
diff --git a/sys-libs/uclibc-ng/files/uclibc-compat-r1.patch b/sys-libs/uclibc-ng/files/uclibc-compat-r1.patch
deleted file mode 100644
index f47e0f9a0152..000000000000
--- a/sys-libs/uclibc-ng/files/uclibc-compat-r1.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -Naur uClibc-ng-1.0.18.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.18/ldso/ldso/Makefile.in
---- uClibc-ng-1.0.18.orig/ldso/ldso/Makefile.in 2016-09-27 15:26:37.000000000 -0400
-+++ uClibc-ng-1.0.18/ldso/ldso/Makefile.in 2016-10-01 06:31:44.106589780 -0400
-@@ -80,11 +80,6 @@
- $(ldso:.$(ABI_VERSION)=): | $(top_builddir)lib
- $(ldso:.$(ABI_VERSION)=): $($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a
- $(call link.so,$(ldso_FULL_NAME),$(ABI_VERSION))
-- # link for backward compatibility
-- (cd $(top_builddir)lib; ln -sf $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION) $(UCLIBC_LDSO_NAME).so.0 )
--ifeq ($(CONFIG_MIPS_NAN_2008),y)
-- (cd $(top_builddir)lib; ln -sf $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION) $(UCLIBC_LDSO_NAME)-mipsn8.so.0)
--endif
-
- $($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a: $(ldso-y)
- $(Q)$(RM) $@
diff --git a/sys-libs/uclibc-ng/files/uclibc-ng-1.0.30-fix-ld.so.cache.patch b/sys-libs/uclibc-ng/files/uclibc-ng-1.0.30-fix-ld.so.cache.patch
deleted file mode 100644
index 6b13e0890d25..000000000000
--- a/sys-libs/uclibc-ng/files/uclibc-ng-1.0.30-fix-ld.so.cache.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-commit 92d250d387e247029900c9074150f45866b29781
-Author: Waldemar Brodkorb <wbx@openadk.org>
-Date: Sun Apr 29 19:34:11 2018 +0200
-
- Revert "ldconfig: add glibc compatibility fix"
-
- This reverts commit 2a3bb4daf5778c5875674cd26a3c75b3d460a042.
-
- This is breaking ld.so.cache usage. Seen on Gentoo/amd64.
-
- Reported-by: "Anthony G. Basile" <basile@freeharbor.net>
-
-diff --git a/utils/ldconfig.c b/utils/ldconfig.c
-index 58939d689..e6b788118 100644
---- a/utils/ldconfig.c
-+++ b/utils/ldconfig.c
-@@ -184,9 +184,10 @@ static char *readsoname(char *name, FILE *infile, int expected_type,
- res = readsoname32(name, infile, expected_type, type);
- else {
- res = readsoname64(name, infile, expected_type, type);
--
-- // For 64-bit glibc compatibility
-- *type |= FLAG_X8664_LIB64;
-+#if 0
-+ /* relies on multilib support which we dont have ... */
-+ *type |= LIB_ELF64;
-+#endif
- }
-
- return res;
-@@ -757,7 +758,7 @@ void cache_print(void)
-
- for (fd = 0; fd < header->nlibs; fd++) {
- printf("\t%s ", strs + libent[fd].sooffset);
-- switch (libent[fd].flags & ~LIB_ELF64 & FLAG_TYPE_MASK) {
-+ switch (libent[fd].flags & ~LIB_ELF64) {
- case LIB_DLL:
- printf("(libc4)");
- break;
-@@ -770,7 +771,7 @@ void cache_print(void)
- case LIB_ELF_LIBC5:
- case LIB_ELF_LIBC6:
- printf("(libc%d%s)",
-- (libent[fd].flags & ~LIB_ELF64 & FLAG_TYPE_MASK) + 3,
-+ (libent[fd].flags & ~LIB_ELF64) + 3,
- libent[fd].flags & LIB_ELF64 ? "/64" : "");
- break;
- default:
diff --git a/sys-libs/uclibc-ng/metadata.xml b/sys-libs/uclibc-ng/metadata.xml
deleted file mode 100644
index a06e85b43685..000000000000
--- a/sys-libs/uclibc-ng/metadata.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>blueness@gentoo.org</email>
- <name>Anthony G. Basile</name>
- </maintainer>
- <maintainer type="project">
- <email>embedded@gentoo.org</email>
- <name>Embedded Gentoo</name>
- </maintainer>
- <longdescription>
- uClibc-ng is a small C library for developing embedded Linux systems. It is much
- smaller than the GNU C Library, but nearly all applications supported by glibc
- also work perfectly with uClibc-ng.
- </longdescription>
- <use>
- <flag name="symlink-compat">Explicitly add sym links for libdl.so.0, libm.so.0, and
- friends for backward compatibility with sys-libs/uclibc-ng-1.0.17 and earlier</flag>
- </use>
-</pkgmetadata>
diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.30-r1.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.30-r1.ebuild
deleted file mode 100644
index 375d030fc404..000000000000
--- a/sys-libs/uclibc-ng/uclibc-ng-1.0.30-r1.ebuild
+++ /dev/null
@@ -1,403 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit flag-o-matic multilib savedconfig toolchain-funcs versionator
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://uclibc-ng.org/git/uclibc-ng"
- inherit git-r3
- MY_P=uclibc-ng-${PV}
-else
- MY_P=uClibc-ng-${PV}
-fi
-
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="https://uclibc-ng.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER=""
- SRC_URI="https://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2"
- KEYWORDS="-* arm"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 symlink-compat headers-only"
-# tests fail due to unusual makefile
-RESTRICT="strip test"
-
-# 1) We can't upgrade from uclibc to uclibc-ng via a soft blocker since portage
-# will delete the ld.so sym link prematurely and break the system. So we
-# will hard block and give manual migration instructions.
-# 2) Currently uclibc and uclibc-ng's iconv are in bad shape. We've been using
-# the breakout library. The disadvantage here is that we have to sprinkle
-# LDFAGS=-liconv on build systems that need to link against libiconv.
-RDEPEND="
- !!sys-libs/uclibc
- iconv? ( dev-libs/libiconv )"
-
-S=${WORKDIR}/${MY_P}
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CHOST} == ${CTARGET} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-make_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-
-make_config() {
- restore_config .config
- if [ -f .config ]; then
- make_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=$1 defconfig >/dev/null
-
- local defs_{y,n}
-
- # These are forced off
- defs_n=(
- DOASSERTS
- DODEBUG_PT
- HAS_NO_THREADS
- PROPOLICE_BLOCK_ABRT
- SSP_QUICK_CANARY
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_CTYPE_UNSAFE
- UCLIBC_HAS_LOCALE
- LDSO_SAFE_RUNPATH
- )
-
- # These are forced on
- defs_y=(
- DO_C99_MATH
- DO_XSI_MATH
- FORCE_SHAREABLE_TEXT_SEGMENTS
- LDSO_GNU_HASH_SUPPORT
- LDSO_PRELOAD_FILE_SUPPORT
- LDSO_RUNPATH
- LDSO_RUNPATH_OF_EXECUTABLE
- LDSO_STANDALONE_SUPPORT
- PROPOLICE_BLOCK_SEGV
- PTHREADS_DEBUG_SUPPORT
- UCLIBC_HAS_ARC4RANDOM
- UCLIBC_HAS_BACKTRACE
- UCLIBC_HAS_BSD_RES_CLOSE
- UCLIBC_HAS_CONTEXT_FUNCS
- UCLIBC_HAS_CTYPE_CHECKED
- UCLIBC_HAS_EXTRA_COMPAT_RES_STATE
- UCLIBC_HAS_FENV
- UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE
- UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
- UCLIBC_HAS_FOPEN_LARGEFILE_MODE
- UCLIBC_HAS_FTS
- UCLIBC_HAS_FTW
- UCLIBC_HAS_GETPT
- UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
- UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_HEXADECIMAL_FLOATS
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_NFTW
- UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
- UCLIBC_HAS_PRINTF_M_SPEC
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_SHA256_CRYPT_IMPL
- UCLIBC_HAS_SHA512_CRYPT_IMPL
- UCLIBC_HAS_SSP
- UCLIBC_HAS_STUBS
- UCLIBC_HAS_SYS_ERRLIST
- UCLIBC_HAS_SYS_SIGLIST
- UCLIBC_HAS_THREADS_NATIVE
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMP
- UCLIBC_HAS_UTMPX
- UCLIBC_HAS_WCHAR
- UCLIBC_HAS_WORDEXP
- UCLIBC_NTP_LEGACY
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV2_LEGACY
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- )
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- kconfig_q_opt debug DODEBUG
- kconfig_q_opt debug SUPPORT_LD_DEBUG
- kconfig_q_opt debug UCLIBC_HAS_PROFILING
-
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
-
- kconfig_q_opt hardened UCLIBC_BUILD_NOEXECSTACK
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_SSP
-
- local count def
- for count in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s|.*\<${def}\>.*set|${def}=y|g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s|${def}=y|# ${def} is not set|g" .config
- done
- make_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s|=.*|=\"${CTARGET}-\"|" \
- -e "/^KERNEL_HEADERS/s|=.*|=\"$(alt_build_kprefix)\"|" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s|=.*|=\"/$(get_libdir)\"|" \
- -e "/^DEVEL_PREFIX/s|=.*|=\"/usr\"|" \
- -e "/^RUNTIME_PREFIX/s|=.*|=\"/\"|" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s|=.*|=\"${UCLIBC_EXTRA_CFLAGS}\"|" \
- .config || die
-
- make_oldconfig
-}
-
-pkg_setup() {
- # Make sure our CHOST is a uclibc toolchain for native compiling
- if [[ ${CHOST} == ${CTARGET} ]]; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-
- # uClibc-ng doesn't carry old Linux threads, and since we force
- # threading our only choice is NPTL which requires i486 and later.
- [[ ${CTARGET} == i386* ]] && die "i386 can't support Native Posix Threads (NPTL)."
-}
-
-src_prepare() {
- local version subversion extraversion
-
- # uclibc-ng tries to create a two sym link with ld.so,
- # ld-uClibc.so.{0,MAJOR_VERSION} -> ld-uClibc-<version>.so
- # where MAJOR_VERSION != 0 indicates the ABI verison.
- # We want to get rid of this and just have ABI = 0.
- eapply "${FILESDIR}"/uclibc-compat-r1.patch
-
- # Critical fix for ld.so.cache
- eapply "${FILESDIR}"/${P}-fix-ld.so.cache.patch
-
- # We need to change the major.minor.sublevel of uclibc-ng.
- # Upstream sets MAJOR_VERSION = 1 which breaks runtime linking.
- # If we really want the ABI bump, we'll have to hack the gcc
- # spec file and change the '*link:' rule.
- version=( $(get_version_components) )
- if [[ -z ${version[1]} ]]; then
- subversion=0
- extraversion=0
- else
- subversion=${version[1]}
- if [[ -z ${version[2]} ]]; then
- extraversion=0
- else
- extraversion=.${version[2]}
- fi
- fi
-
- sed -i \
- -e "/^MAJOR_VERSION/s|:=.*|:= 0|" \
- -e "/^MINOR_VERSION/s|:=.*|:= ${version[0]}|" \
- -e "/^SUBLEVEL/s|:=.*|:= ${subversion}|" \
- -e "/^EXTRAVERSION/s|:=.*|:= ${extraversion}|" \
- Rules.mak || die
-
- eapply_user
-}
-
-src_configure() {
- # Map our toolchain arch name to the name expected by uClibc-ng.
- local target=$(tc-arch)
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm";;
- mips) target="mips";;
- ppc) target="powerpc";;
- x86) target="i386";;
- esac
-
- # Do arch specific configuration by changing the defaults in
- # extra/Configs/Config.<arch>. If these are not overridden
- # by an save .config, they will be selected by default.
-
- # For i386, i486, i586 and i686
- local cpu
- if [[ ${target} == "i386" ]]; then
- [[ ${CTARGET} == i[456]86* ]] && cpu="${CTARGET:1:1}86"
- sed -i -e "s|default CONFIG_686|default CONFIG_${cpu:-486}|" \
- extra/Configs/Config.i386 || die
- fi
-
- # For arm
- if [[ ${target} == "arm" ]]; then
- sed -i -e '/Build for EABI/a \\tdefault y' extra/Configs/Config.arm
- fi
-
- # We set HOSTCC to the proper tuple rather than just 'gcc'
- sed -i -e "s|^HOSTCC.*=.*|HOSTCC=$(tc-getBUILD_CC)|" Rules.mak
-
- make_config ${target}
-
- einfo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "ABI: ${ABI}"
- einfo "ENDIAN: $(uclibc_endian)"
- einfo
-}
-
-src_compile() {
- emake headers
- just_headers && return 0
-
- emake
- if is_crosscompile ; then
- emake -C utils hostutils
- else
- emake utils
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels
- # normal vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target}
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # 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
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig
- newbin utils/ldd.host ${CTARGET}-ldd
- fi
- return 0
- fi
-
- if use symlink-compat; then
- dosym libc.so.0 "${DESTDIR}"/lib/libcrypt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libdl.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libm.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libpthread.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/librt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libresolv.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libubacktrace.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libutil.so.0
- fi
-
- emake DESTDIR="${D}" install_utils
- dobin extra/scripts/getent
- dodoc README docs/*.txt
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
-}
diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.32.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.32.ebuild
deleted file mode 100644
index fffc7f103fb8..000000000000
--- a/sys-libs/uclibc-ng/uclibc-ng-1.0.32.ebuild
+++ /dev/null
@@ -1,402 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit flag-o-matic multilib savedconfig toolchain-funcs
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://uclibc-ng.org/git/uclibc-ng"
- inherit git-r3
- MY_P=uclibc-ng-${PV}
-else
- MY_P=uClibc-ng-${PV}
-fi
-
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="https://uclibc-ng.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER=""
- SRC_URI="https://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2"
- KEYWORDS="-* amd64 ~mips ppc x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 symlink-compat headers-only"
-# tests fail due to unusual makefile
-RESTRICT="strip test"
-
-# 1) We can't upgrade from uclibc to uclibc-ng via a soft blocker since portage
-# will delete the ld.so sym link prematurely and break the system. So we
-# will hard block and give manual migration instructions.
-# 2) Currently uclibc and uclibc-ng's iconv are in bad shape. We've been using
-# the breakout library. The disadvantage here is that we have to sprinkle
-# LDFAGS=-liconv on build systems that need to link against libiconv.
-RDEPEND="
- !!sys-libs/uclibc
- iconv? ( dev-libs/libiconv )"
-
-S=${WORKDIR}/${MY_P}
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CHOST} == ${CTARGET} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-make_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-
-make_config() {
- restore_config .config
- if [ -f .config ]; then
- make_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=$1 defconfig >/dev/null
-
- local defs_{y,n}
-
- # These are forced off
- defs_n=(
- DOASSERTS
- DODEBUG_PT
- HAS_NO_THREADS
- PROPOLICE_BLOCK_ABRT
- SSP_QUICK_CANARY
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_CTYPE_UNSAFE
- UCLIBC_HAS_LOCALE
- LDSO_SAFE_RUNPATH
- )
-
- # These are forced on
- defs_y=(
- DO_C99_MATH
- DO_XSI_MATH
- FORCE_SHAREABLE_TEXT_SEGMENTS
- LDSO_GNU_HASH_SUPPORT
- LDSO_PRELOAD_FILE_SUPPORT
- LDSO_RUNPATH
- LDSO_RUNPATH_OF_EXECUTABLE
- LDSO_STANDALONE_SUPPORT
- PROPOLICE_BLOCK_SEGV
- PTHREADS_DEBUG_SUPPORT
- UCLIBC_HAS_ARC4RANDOM
- UCLIBC_HAS_BACKTRACE
- UCLIBC_HAS_BSD_RES_CLOSE
- UCLIBC_HAS_CONTEXT_FUNCS
- UCLIBC_HAS_CTYPE_CHECKED
- UCLIBC_HAS_EXTRA_COMPAT_RES_STATE
- UCLIBC_HAS_FENV
- UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE
- UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
- UCLIBC_HAS_FOPEN_LARGEFILE_MODE
- UCLIBC_HAS_FTS
- UCLIBC_HAS_FTW
- UCLIBC_HAS_GETPT
- UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
- UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_HEXADECIMAL_FLOATS
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_NFTW
- UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
- UCLIBC_HAS_PRINTF_M_SPEC
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_SHA256_CRYPT_IMPL
- UCLIBC_HAS_SHA512_CRYPT_IMPL
- UCLIBC_HAS_SSP
- UCLIBC_HAS_STUBS
- UCLIBC_HAS_SYS_ERRLIST
- UCLIBC_HAS_SYS_SIGLIST
- UCLIBC_HAS_THREADS_NATIVE
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMP
- UCLIBC_HAS_UTMPX
- UCLIBC_HAS_WCHAR
- UCLIBC_HAS_WORDEXP
- UCLIBC_NTP_LEGACY
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV2_LEGACY
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- )
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- kconfig_q_opt debug DODEBUG
- kconfig_q_opt debug SUPPORT_LD_DEBUG
- kconfig_q_opt debug UCLIBC_HAS_PROFILING
-
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
-
- kconfig_q_opt hardened UCLIBC_BUILD_NOEXECSTACK
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_SSP
-
- local count def
- for count in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s|.*\<${def}\>.*set|${def}=y|g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s|${def}=y|# ${def} is not set|g" .config
- done
- make_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s|=.*|=\"${CTARGET}-\"|" \
- -e "/^KERNEL_HEADERS/s|=.*|=\"$(alt_build_kprefix)\"|" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s|=.*|=\"/$(get_libdir)\"|" \
- -e "/^DEVEL_PREFIX/s|=.*|=\"/usr\"|" \
- -e "/^RUNTIME_PREFIX/s|=.*|=\"/\"|" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s|=.*|=\"${UCLIBC_EXTRA_CFLAGS}\"|" \
- .config || die
-
- make_oldconfig
-}
-
-pkg_setup() {
- # Make sure our CHOST is a uclibc toolchain for native compiling
- if [[ ${CHOST} == ${CTARGET} ]]; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-
- # uClibc-ng doesn't carry old Linux threads, and since we force
- # threading our only choice is NPTL which requires i486 and later.
- [[ ${CTARGET} == i386* ]] && die "i386 can't support Native Posix Threads (NPTL)."
-}
-
-src_prepare() {
- local version subversion extraversion
-
- # uclibc-ng tries to create a two sym link with ld.so,
- # ld-uClibc.so.{0,MAJOR_VERSION} -> ld-uClibc-<version>.so
- # where MAJOR_VERSION != 0 indicates the ABI verison.
- # We want to get rid of this and just have ABI = 0.
- eapply "${FILESDIR}"/uclibc-compat-r1.patch
-
- # We need to change the major.minor.sublevel of uclibc-ng.
- # Upstream sets MAJOR_VERSION = 1 which breaks runtime linking.
- # If we really want the ABI bump, we'll have to hack the gcc
- # spec file and change the '*link:' rule.
- version_0=$(ver_cut 1)
- version_1=$(ver_cut 2)
- version_2=$(ver_cut 3)
- if [[ -z ${version_1} ]]; then
- subversion=0
- extraversion=0
- else
- subversion=${version_1}
- if [[ -z ${version_2} ]]; then
- extraversion=0
- else
- extraversion=.${version_2}
- fi
- fi
-
- sed -i \
- -e "/^MAJOR_VERSION/s|:=.*|:= 0|" \
- -e "/^MINOR_VERSION/s|:=.*|:= ${version_0}|" \
- -e "/^SUBLEVEL/s|:=.*|:= ${subversion}|" \
- -e "/^EXTRAVERSION/s|:=.*|:= ${extraversion}|" \
- Rules.mak || die
-
- eapply_user
-}
-
-src_configure() {
- # Map our toolchain arch name to the name expected by uClibc-ng.
- local target=$(tc-arch)
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm";;
- mips) target="mips";;
- ppc) target="powerpc";;
- x86) target="i386";;
- esac
-
- # Do arch specific configuration by changing the defaults in
- # extra/Configs/Config.<arch>. If these are not overridden
- # by an save .config, they will be selected by default.
-
- # For i386, i486, i586 and i686
- local cpu
- if [[ ${target} == "i386" ]]; then
- [[ ${CTARGET} == i[456]86* ]] && cpu="${CTARGET:1:1}86"
- sed -i -e "s|default CONFIG_686|default CONFIG_${cpu:-486}|" \
- extra/Configs/Config.i386 || die
- fi
-
- # For arm
- if [[ ${target} == "arm" ]]; then
- sed -i -e '/Build for EABI/a \\tdefault y' extra/Configs/Config.arm
- fi
-
- # We set HOSTCC to the proper tuple rather than just 'gcc'
- sed -i -e "s|^HOSTCC.*=.*|HOSTCC=$(tc-getBUILD_CC)|" Rules.mak
-
- make_config ${target}
-
- einfo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "ABI: ${ABI}"
- einfo "ENDIAN: $(uclibc_endian)"
- einfo
-}
-
-src_compile() {
- emake headers
- just_headers && return 0
-
- emake
- if is_crosscompile ; then
- emake -C utils hostutils
- else
- emake utils
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels
- # normal vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target}
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # 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
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig
- newbin utils/ldd.host ${CTARGET}-ldd
- fi
- return 0
- fi
-
- if use symlink-compat; then
- dosym libc.so.0 "${DESTDIR}"/lib/libcrypt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libdl.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libm.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libpthread.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/librt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libresolv.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libubacktrace.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libutil.so.0
- fi
-
- emake DESTDIR="${D}" install_utils
- dobin extra/scripts/getent
- dodoc README docs/*.txt
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
-}
diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.33.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.33.ebuild
deleted file mode 100644
index 4dd7db70cc0f..000000000000
--- a/sys-libs/uclibc-ng/uclibc-ng-1.0.33.ebuild
+++ /dev/null
@@ -1,402 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit flag-o-matic multilib savedconfig toolchain-funcs
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://uclibc-ng.org/git/uclibc-ng"
- inherit git-r3
- MY_P=uclibc-ng-${PV}
-else
- MY_P=uClibc-ng-${PV}
-fi
-
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="https://uclibc-ng.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER=""
- SRC_URI="https://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2"
- KEYWORDS="-* amd64 ~arm ~mips ~ppc x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 symlink-compat headers-only"
-# tests fail due to unusual makefile
-RESTRICT="strip test"
-
-# 1) We can't upgrade from uclibc to uclibc-ng via a soft blocker since portage
-# will delete the ld.so sym link prematurely and break the system. So we
-# will hard block and give manual migration instructions.
-# 2) Currently uclibc and uclibc-ng's iconv are in bad shape. We've been using
-# the breakout library. The disadvantage here is that we have to sprinkle
-# LDFAGS=-liconv on build systems that need to link against libiconv.
-RDEPEND="
- !!sys-libs/uclibc
- iconv? ( dev-libs/libiconv )"
-
-S=${WORKDIR}/${MY_P}
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CHOST} == ${CTARGET} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-make_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-
-make_config() {
- restore_config .config
- if [ -f .config ]; then
- make_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=$1 defconfig >/dev/null
-
- local defs_{y,n}
-
- # These are forced off
- defs_n=(
- DOASSERTS
- DODEBUG_PT
- HAS_NO_THREADS
- PROPOLICE_BLOCK_ABRT
- SSP_QUICK_CANARY
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_CTYPE_UNSAFE
- UCLIBC_HAS_LOCALE
- LDSO_SAFE_RUNPATH
- )
-
- # These are forced on
- defs_y=(
- DO_C99_MATH
- DO_XSI_MATH
- FORCE_SHAREABLE_TEXT_SEGMENTS
- LDSO_GNU_HASH_SUPPORT
- LDSO_PRELOAD_FILE_SUPPORT
- LDSO_RUNPATH
- LDSO_RUNPATH_OF_EXECUTABLE
- LDSO_STANDALONE_SUPPORT
- PROPOLICE_BLOCK_SEGV
- PTHREADS_DEBUG_SUPPORT
- UCLIBC_HAS_ARC4RANDOM
- UCLIBC_HAS_BACKTRACE
- UCLIBC_HAS_BSD_RES_CLOSE
- UCLIBC_HAS_CONTEXT_FUNCS
- UCLIBC_HAS_CTYPE_CHECKED
- UCLIBC_HAS_EXTRA_COMPAT_RES_STATE
- UCLIBC_HAS_FENV
- UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE
- UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
- UCLIBC_HAS_FOPEN_LARGEFILE_MODE
- UCLIBC_HAS_FTS
- UCLIBC_HAS_FTW
- UCLIBC_HAS_GETPT
- UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
- UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_HEXADECIMAL_FLOATS
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_NFTW
- UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
- UCLIBC_HAS_PRINTF_M_SPEC
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_SHA256_CRYPT_IMPL
- UCLIBC_HAS_SHA512_CRYPT_IMPL
- UCLIBC_HAS_SSP
- UCLIBC_HAS_STUBS
- UCLIBC_HAS_SYS_ERRLIST
- UCLIBC_HAS_SYS_SIGLIST
- UCLIBC_HAS_THREADS_NATIVE
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMP
- UCLIBC_HAS_UTMPX
- UCLIBC_HAS_WCHAR
- UCLIBC_HAS_WORDEXP
- UCLIBC_NTP_LEGACY
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV2_LEGACY
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- )
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- kconfig_q_opt debug DODEBUG
- kconfig_q_opt debug SUPPORT_LD_DEBUG
- kconfig_q_opt debug UCLIBC_HAS_PROFILING
-
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
-
- kconfig_q_opt hardened UCLIBC_BUILD_NOEXECSTACK
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_SSP
-
- local count def
- for count in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s|.*\<${def}\>.*set|${def}=y|g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s|${def}=y|# ${def} is not set|g" .config
- done
- make_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s|=.*|=\"${CTARGET}-\"|" \
- -e "/^KERNEL_HEADERS/s|=.*|=\"$(alt_build_kprefix)\"|" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s|=.*|=\"/$(get_libdir)\"|" \
- -e "/^DEVEL_PREFIX/s|=.*|=\"/usr\"|" \
- -e "/^RUNTIME_PREFIX/s|=.*|=\"/\"|" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s|=.*|=\"${UCLIBC_EXTRA_CFLAGS}\"|" \
- .config || die
-
- make_oldconfig
-}
-
-pkg_setup() {
- # Make sure our CHOST is a uclibc toolchain for native compiling
- if [[ ${CHOST} == ${CTARGET} ]]; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-
- # uClibc-ng doesn't carry old Linux threads, and since we force
- # threading our only choice is NPTL which requires i486 and later.
- [[ ${CTARGET} == i386* ]] && die "i386 can't support Native Posix Threads (NPTL)."
-}
-
-src_prepare() {
- local version subversion extraversion
-
- # uclibc-ng tries to create a two sym link with ld.so,
- # ld-uClibc.so.{0,MAJOR_VERSION} -> ld-uClibc-<version>.so
- # where MAJOR_VERSION != 0 indicates the ABI verison.
- # We want to get rid of this and just have ABI = 0.
- eapply "${FILESDIR}"/uclibc-compat-r1.patch
-
- # We need to change the major.minor.sublevel of uclibc-ng.
- # Upstream sets MAJOR_VERSION = 1 which breaks runtime linking.
- # If we really want the ABI bump, we'll have to hack the gcc
- # spec file and change the '*link:' rule.
- version_0=$(ver_cut 1)
- version_1=$(ver_cut 2)
- version_2=$(ver_cut 3)
- if [[ -z ${version_1} ]]; then
- subversion=0
- extraversion=0
- else
- subversion=${version_1}
- if [[ -z ${version_2} ]]; then
- extraversion=0
- else
- extraversion=.${version_2}
- fi
- fi
-
- sed -i \
- -e "/^MAJOR_VERSION/s|:=.*|:= 0|" \
- -e "/^MINOR_VERSION/s|:=.*|:= ${version_0}|" \
- -e "/^SUBLEVEL/s|:=.*|:= ${subversion}|" \
- -e "/^EXTRAVERSION/s|:=.*|:= ${extraversion}|" \
- Rules.mak || die
-
- eapply_user
-}
-
-src_configure() {
- # Map our toolchain arch name to the name expected by uClibc-ng.
- local target=$(tc-arch)
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm";;
- mips) target="mips";;
- ppc) target="powerpc";;
- x86) target="i386";;
- esac
-
- # Do arch specific configuration by changing the defaults in
- # extra/Configs/Config.<arch>. If these are not overridden
- # by an save .config, they will be selected by default.
-
- # For i386, i486, i586 and i686
- local cpu
- if [[ ${target} == "i386" ]]; then
- [[ ${CTARGET} == i[456]86* ]] && cpu="${CTARGET:1:1}86"
- sed -i -e "s|default CONFIG_686|default CONFIG_${cpu:-486}|" \
- extra/Configs/Config.i386 || die
- fi
-
- # For arm
- if [[ ${target} == "arm" ]]; then
- sed -i -e '/Build for EABI/a \\tdefault y' extra/Configs/Config.arm
- fi
-
- # We set HOSTCC to the proper tuple rather than just 'gcc'
- sed -i -e "s|^HOSTCC.*=.*|HOSTCC=$(tc-getBUILD_CC)|" Rules.mak
-
- make_config ${target}
-
- einfo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "ABI: ${ABI}"
- einfo "ENDIAN: $(uclibc_endian)"
- einfo
-}
-
-src_compile() {
- emake headers
- just_headers && return 0
-
- emake
- if is_crosscompile ; then
- emake -C utils hostutils
- else
- emake utils
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels
- # normal vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target}
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # 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
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig
- newbin utils/ldd.host ${CTARGET}-ldd
- fi
- return 0
- fi
-
- if use symlink-compat; then
- dosym libc.so.0 "${DESTDIR}"/lib/libcrypt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libdl.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libm.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libpthread.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/librt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libresolv.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libubacktrace.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libutil.so.0
- fi
-
- emake DESTDIR="${D}" install_utils
- dobin extra/scripts/getent
- dodoc README docs/*.txt
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
-}
diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.35.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.35.ebuild
deleted file mode 100644
index 5ef7e61a3a91..000000000000
--- a/sys-libs/uclibc-ng/uclibc-ng-1.0.35.ebuild
+++ /dev/null
@@ -1,402 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit flag-o-matic multilib savedconfig toolchain-funcs
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://uclibc-ng.org/git/uclibc-ng"
- inherit git-r3
- MY_P=uclibc-ng-${PV}
-else
- MY_P=uClibc-ng-${PV}
-fi
-
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="https://uclibc-ng.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER=""
- SRC_URI="https://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2"
- KEYWORDS="-* ~amd64 ~arm ~mips ~ppc ~x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 symlink-compat headers-only"
-# tests fail due to unusual makefile
-RESTRICT="strip test"
-
-# 1) We can't upgrade from uclibc to uclibc-ng via a soft blocker since portage
-# will delete the ld.so sym link prematurely and break the system. So we
-# will hard block and give manual migration instructions.
-# 2) Currently uclibc and uclibc-ng's iconv are in bad shape. We've been using
-# the breakout library. The disadvantage here is that we have to sprinkle
-# LDFAGS=-liconv on build systems that need to link against libiconv.
-RDEPEND="
- !!sys-libs/uclibc
- iconv? ( dev-libs/libiconv )"
-
-S=${WORKDIR}/${MY_P}
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CHOST} == ${CTARGET} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-make_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-
-make_config() {
- restore_config .config
- if [ -f .config ]; then
- make_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=$1 defconfig >/dev/null
-
- local defs_{y,n}
-
- # These are forced off
- defs_n=(
- DOASSERTS
- DODEBUG_PT
- HAS_NO_THREADS
- PROPOLICE_BLOCK_ABRT
- SSP_QUICK_CANARY
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_CTYPE_UNSAFE
- UCLIBC_HAS_LOCALE
- LDSO_SAFE_RUNPATH
- )
-
- # These are forced on
- defs_y=(
- DO_C99_MATH
- DO_XSI_MATH
- FORCE_SHAREABLE_TEXT_SEGMENTS
- LDSO_GNU_HASH_SUPPORT
- LDSO_PRELOAD_FILE_SUPPORT
- LDSO_RUNPATH
- LDSO_RUNPATH_OF_EXECUTABLE
- LDSO_STANDALONE_SUPPORT
- PROPOLICE_BLOCK_SEGV
- PTHREADS_DEBUG_SUPPORT
- UCLIBC_HAS_ARC4RANDOM
- UCLIBC_HAS_BACKTRACE
- UCLIBC_HAS_BSD_RES_CLOSE
- UCLIBC_HAS_CONTEXT_FUNCS
- UCLIBC_HAS_CTYPE_CHECKED
- UCLIBC_HAS_EXTRA_COMPAT_RES_STATE
- UCLIBC_HAS_FENV
- UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE
- UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
- UCLIBC_HAS_FOPEN_LARGEFILE_MODE
- UCLIBC_HAS_FTS
- UCLIBC_HAS_FTW
- UCLIBC_HAS_GETPT
- UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
- UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_HEXADECIMAL_FLOATS
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_NFTW
- UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
- UCLIBC_HAS_PRINTF_M_SPEC
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_SHA256_CRYPT_IMPL
- UCLIBC_HAS_SHA512_CRYPT_IMPL
- UCLIBC_HAS_SSP
- UCLIBC_HAS_STUBS
- UCLIBC_HAS_SYS_ERRLIST
- UCLIBC_HAS_SYS_SIGLIST
- UCLIBC_HAS_THREADS_NATIVE
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMP
- UCLIBC_HAS_UTMPX
- UCLIBC_HAS_WCHAR
- UCLIBC_HAS_WORDEXP
- UCLIBC_NTP_LEGACY
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV2_LEGACY
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- )
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- kconfig_q_opt debug DODEBUG
- kconfig_q_opt debug SUPPORT_LD_DEBUG
- kconfig_q_opt debug UCLIBC_HAS_PROFILING
-
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
-
- kconfig_q_opt hardened UCLIBC_BUILD_NOEXECSTACK
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_SSP
-
- local count def
- for count in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s|.*\<${def}\>.*set|${def}=y|g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s|${def}=y|# ${def} is not set|g" .config
- done
- make_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s|=.*|=\"${CTARGET}-\"|" \
- -e "/^KERNEL_HEADERS/s|=.*|=\"$(alt_build_kprefix)\"|" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s|=.*|=\"/$(get_libdir)\"|" \
- -e "/^DEVEL_PREFIX/s|=.*|=\"/usr\"|" \
- -e "/^RUNTIME_PREFIX/s|=.*|=\"/\"|" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s|=.*|=\"${UCLIBC_EXTRA_CFLAGS}\"|" \
- .config || die
-
- make_oldconfig
-}
-
-pkg_setup() {
- # Make sure our CHOST is a uclibc toolchain for native compiling
- if [[ ${CHOST} == ${CTARGET} ]]; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-
- # uClibc-ng doesn't carry old Linux threads, and since we force
- # threading our only choice is NPTL which requires i486 and later.
- [[ ${CTARGET} == i386* ]] && die "i386 can't support Native Posix Threads (NPTL)."
-}
-
-src_prepare() {
- local version subversion extraversion
-
- # uclibc-ng tries to create a two sym link with ld.so,
- # ld-uClibc.so.{0,MAJOR_VERSION} -> ld-uClibc-<version>.so
- # where MAJOR_VERSION != 0 indicates the ABI verison.
- # We want to get rid of this and just have ABI = 0.
- eapply "${FILESDIR}"/uclibc-compat-r1.patch
-
- # We need to change the major.minor.sublevel of uclibc-ng.
- # Upstream sets MAJOR_VERSION = 1 which breaks runtime linking.
- # If we really want the ABI bump, we'll have to hack the gcc
- # spec file and change the '*link:' rule.
- version_0=$(ver_cut 1)
- version_1=$(ver_cut 2)
- version_2=$(ver_cut 3)
- if [[ -z ${version_1} ]]; then
- subversion=0
- extraversion=0
- else
- subversion=${version_1}
- if [[ -z ${version_2} ]]; then
- extraversion=0
- else
- extraversion=.${version_2}
- fi
- fi
-
- sed -i \
- -e "/^MAJOR_VERSION/s|:=.*|:= 0|" \
- -e "/^MINOR_VERSION/s|:=.*|:= ${version_0}|" \
- -e "/^SUBLEVEL/s|:=.*|:= ${subversion}|" \
- -e "/^EXTRAVERSION/s|:=.*|:= ${extraversion}|" \
- Rules.mak || die
-
- eapply_user
-}
-
-src_configure() {
- # Map our toolchain arch name to the name expected by uClibc-ng.
- local target=$(tc-arch)
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm";;
- mips) target="mips";;
- ppc) target="powerpc";;
- x86) target="i386";;
- esac
-
- # Do arch specific configuration by changing the defaults in
- # extra/Configs/Config.<arch>. If these are not overridden
- # by an save .config, they will be selected by default.
-
- # For i386, i486, i586 and i686
- local cpu
- if [[ ${target} == "i386" ]]; then
- [[ ${CTARGET} == i[456]86* ]] && cpu="${CTARGET:1:1}86"
- sed -i -e "s|default CONFIG_686|default CONFIG_${cpu:-486}|" \
- extra/Configs/Config.i386 || die
- fi
-
- # For arm
- if [[ ${target} == "arm" ]]; then
- sed -i -e '/Build for EABI/a \\tdefault y' extra/Configs/Config.arm
- fi
-
- # We set HOSTCC to the proper tuple rather than just 'gcc'
- sed -i -e "s|^HOSTCC.*=.*|HOSTCC=$(tc-getBUILD_CC)|" Rules.mak
-
- make_config ${target}
-
- einfo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "ABI: ${ABI}"
- einfo "ENDIAN: $(uclibc_endian)"
- einfo
-}
-
-src_compile() {
- emake headers
- just_headers && return 0
-
- emake
- if is_crosscompile ; then
- emake -C utils hostutils
- else
- emake utils
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels
- # normal vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target}
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # 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
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig
- newbin utils/ldd.host ${CTARGET}-ldd
- fi
- return 0
- fi
-
- if use symlink-compat; then
- dosym libc.so.0 "${DESTDIR}"/lib/libcrypt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libdl.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libm.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libpthread.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/librt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libresolv.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libubacktrace.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libutil.so.0
- fi
-
- emake DESTDIR="${D}" install_utils
- dobin extra/scripts/getent
- dodoc README docs/*.txt
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
-}
diff --git a/sys-libs/uclibc-ng/uclibc-ng-9999.ebuild b/sys-libs/uclibc-ng/uclibc-ng-9999.ebuild
deleted file mode 100644
index 5ef7e61a3a91..000000000000
--- a/sys-libs/uclibc-ng/uclibc-ng-9999.ebuild
+++ /dev/null
@@ -1,402 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit flag-o-matic multilib savedconfig toolchain-funcs
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://uclibc-ng.org/git/uclibc-ng"
- inherit git-r3
- MY_P=uclibc-ng-${PV}
-else
- MY_P=uClibc-ng-${PV}
-fi
-
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="https://uclibc-ng.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER=""
- SRC_URI="https://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2"
- KEYWORDS="-* ~amd64 ~arm ~mips ~ppc ~x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 symlink-compat headers-only"
-# tests fail due to unusual makefile
-RESTRICT="strip test"
-
-# 1) We can't upgrade from uclibc to uclibc-ng via a soft blocker since portage
-# will delete the ld.so sym link prematurely and break the system. So we
-# will hard block and give manual migration instructions.
-# 2) Currently uclibc and uclibc-ng's iconv are in bad shape. We've been using
-# the breakout library. The disadvantage here is that we have to sprinkle
-# LDFAGS=-liconv on build systems that need to link against libiconv.
-RDEPEND="
- !!sys-libs/uclibc
- iconv? ( dev-libs/libiconv )"
-
-S=${WORKDIR}/${MY_P}
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CHOST} == ${CTARGET} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-make_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-
-make_config() {
- restore_config .config
- if [ -f .config ]; then
- make_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=$1 defconfig >/dev/null
-
- local defs_{y,n}
-
- # These are forced off
- defs_n=(
- DOASSERTS
- DODEBUG_PT
- HAS_NO_THREADS
- PROPOLICE_BLOCK_ABRT
- SSP_QUICK_CANARY
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_CTYPE_UNSAFE
- UCLIBC_HAS_LOCALE
- LDSO_SAFE_RUNPATH
- )
-
- # These are forced on
- defs_y=(
- DO_C99_MATH
- DO_XSI_MATH
- FORCE_SHAREABLE_TEXT_SEGMENTS
- LDSO_GNU_HASH_SUPPORT
- LDSO_PRELOAD_FILE_SUPPORT
- LDSO_RUNPATH
- LDSO_RUNPATH_OF_EXECUTABLE
- LDSO_STANDALONE_SUPPORT
- PROPOLICE_BLOCK_SEGV
- PTHREADS_DEBUG_SUPPORT
- UCLIBC_HAS_ARC4RANDOM
- UCLIBC_HAS_BACKTRACE
- UCLIBC_HAS_BSD_RES_CLOSE
- UCLIBC_HAS_CONTEXT_FUNCS
- UCLIBC_HAS_CTYPE_CHECKED
- UCLIBC_HAS_EXTRA_COMPAT_RES_STATE
- UCLIBC_HAS_FENV
- UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE
- UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
- UCLIBC_HAS_FOPEN_LARGEFILE_MODE
- UCLIBC_HAS_FTS
- UCLIBC_HAS_FTW
- UCLIBC_HAS_GETPT
- UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
- UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_HEXADECIMAL_FLOATS
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_NFTW
- UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
- UCLIBC_HAS_PRINTF_M_SPEC
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_SHA256_CRYPT_IMPL
- UCLIBC_HAS_SHA512_CRYPT_IMPL
- UCLIBC_HAS_SSP
- UCLIBC_HAS_STUBS
- UCLIBC_HAS_SYS_ERRLIST
- UCLIBC_HAS_SYS_SIGLIST
- UCLIBC_HAS_THREADS_NATIVE
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMP
- UCLIBC_HAS_UTMPX
- UCLIBC_HAS_WCHAR
- UCLIBC_HAS_WORDEXP
- UCLIBC_NTP_LEGACY
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV2_LEGACY
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- )
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- kconfig_q_opt debug DODEBUG
- kconfig_q_opt debug SUPPORT_LD_DEBUG
- kconfig_q_opt debug UCLIBC_HAS_PROFILING
-
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
-
- kconfig_q_opt hardened UCLIBC_BUILD_NOEXECSTACK
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_SSP
-
- local count def
- for count in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s|.*\<${def}\>.*set|${def}=y|g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s|${def}=y|# ${def} is not set|g" .config
- done
- make_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s|=.*|=\"${CTARGET}-\"|" \
- -e "/^KERNEL_HEADERS/s|=.*|=\"$(alt_build_kprefix)\"|" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s|=.*|=\"/$(get_libdir)\"|" \
- -e "/^DEVEL_PREFIX/s|=.*|=\"/usr\"|" \
- -e "/^RUNTIME_PREFIX/s|=.*|=\"/\"|" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s|=.*|=\"${UCLIBC_EXTRA_CFLAGS}\"|" \
- .config || die
-
- make_oldconfig
-}
-
-pkg_setup() {
- # Make sure our CHOST is a uclibc toolchain for native compiling
- if [[ ${CHOST} == ${CTARGET} ]]; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-
- # uClibc-ng doesn't carry old Linux threads, and since we force
- # threading our only choice is NPTL which requires i486 and later.
- [[ ${CTARGET} == i386* ]] && die "i386 can't support Native Posix Threads (NPTL)."
-}
-
-src_prepare() {
- local version subversion extraversion
-
- # uclibc-ng tries to create a two sym link with ld.so,
- # ld-uClibc.so.{0,MAJOR_VERSION} -> ld-uClibc-<version>.so
- # where MAJOR_VERSION != 0 indicates the ABI verison.
- # We want to get rid of this and just have ABI = 0.
- eapply "${FILESDIR}"/uclibc-compat-r1.patch
-
- # We need to change the major.minor.sublevel of uclibc-ng.
- # Upstream sets MAJOR_VERSION = 1 which breaks runtime linking.
- # If we really want the ABI bump, we'll have to hack the gcc
- # spec file and change the '*link:' rule.
- version_0=$(ver_cut 1)
- version_1=$(ver_cut 2)
- version_2=$(ver_cut 3)
- if [[ -z ${version_1} ]]; then
- subversion=0
- extraversion=0
- else
- subversion=${version_1}
- if [[ -z ${version_2} ]]; then
- extraversion=0
- else
- extraversion=.${version_2}
- fi
- fi
-
- sed -i \
- -e "/^MAJOR_VERSION/s|:=.*|:= 0|" \
- -e "/^MINOR_VERSION/s|:=.*|:= ${version_0}|" \
- -e "/^SUBLEVEL/s|:=.*|:= ${subversion}|" \
- -e "/^EXTRAVERSION/s|:=.*|:= ${extraversion}|" \
- Rules.mak || die
-
- eapply_user
-}
-
-src_configure() {
- # Map our toolchain arch name to the name expected by uClibc-ng.
- local target=$(tc-arch)
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm";;
- mips) target="mips";;
- ppc) target="powerpc";;
- x86) target="i386";;
- esac
-
- # Do arch specific configuration by changing the defaults in
- # extra/Configs/Config.<arch>. If these are not overridden
- # by an save .config, they will be selected by default.
-
- # For i386, i486, i586 and i686
- local cpu
- if [[ ${target} == "i386" ]]; then
- [[ ${CTARGET} == i[456]86* ]] && cpu="${CTARGET:1:1}86"
- sed -i -e "s|default CONFIG_686|default CONFIG_${cpu:-486}|" \
- extra/Configs/Config.i386 || die
- fi
-
- # For arm
- if [[ ${target} == "arm" ]]; then
- sed -i -e '/Build for EABI/a \\tdefault y' extra/Configs/Config.arm
- fi
-
- # We set HOSTCC to the proper tuple rather than just 'gcc'
- sed -i -e "s|^HOSTCC.*=.*|HOSTCC=$(tc-getBUILD_CC)|" Rules.mak
-
- make_config ${target}
-
- einfo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "ABI: ${ABI}"
- einfo "ENDIAN: $(uclibc_endian)"
- einfo
-}
-
-src_compile() {
- emake headers
- just_headers && return 0
-
- emake
- if is_crosscompile ; then
- emake -C utils hostutils
- else
- emake utils
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels
- # normal vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target}
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # 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
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig
- newbin utils/ldd.host ${CTARGET}-ldd
- fi
- return 0
- fi
-
- if use symlink-compat; then
- dosym libc.so.0 "${DESTDIR}"/lib/libcrypt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libdl.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libm.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libpthread.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/librt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libresolv.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libubacktrace.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libutil.so.0
- fi
-
- emake DESTDIR="${D}" install_utils
- dobin extra/scripts/getent
- dodoc README docs/*.txt
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
-}
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/metadata.xml b/sys-libs/uid_wrapper/metadata.xml
index 48f6ca46f45a..74c488b2dd6e 100644
--- a/sys-libs/uid_wrapper/metadata.xml
+++ b/sys-libs/uid_wrapper/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>samba@gentoo.org</email>
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 ad2fbf4c53aa..000000000000
--- a/sys-libs/uid_wrapper/uid_wrapper-1.2.8.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.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
new file mode 100644
index 000000000000..7b64ea0bc919
--- /dev/null
+++ b/sys-libs/zlib-ng/Manifest
@@ -0,0 +1 @@
+DIST zlib-ng-2.1.6.tar.gz 2412106 BLAKE2B 9ca16c19c2c799e68e099d44721b27dc33ad9e859a3d6572bebe3a75c618bffd78e19f0d4c0607802d1c8fa6a8f328d62f9993648a99c1d2e0e5fdcaf87a2667 SHA512 59ef586c09b9a63788475abfd6dd59ed602316b38f543f801bea802ff8bec8b55a89bee90375b8bbffa3bdebc7d92a00903f4b7c94cdc1a53a36e2e1fd71d13a
diff --git a/sys-libs/zlib-ng/metadata.xml b/sys-libs/zlib-ng/metadata.xml
new file mode 100644
index 000000000000..8ff9c2f6926c
--- /dev/null
+++ b/sys-libs/zlib-ng/metadata.xml
@@ -0,0 +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="compat">Enable compatibility to <pkg>sys-libs/zlib</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="github">zlib-ng/zlib-ng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-libs/zlib-ng/zlib-ng-2.1.6-r1.ebuild b/sys-libs/zlib-ng/zlib-ng-2.1.6-r1.ebuild
new file mode 100644
index 000000000000..d9bf5f443d25
--- /dev/null
+++ b/sys-libs/zlib-ng/zlib-ng-2.1.6-r1.ebuild
@@ -0,0 +1,91 @@
+# 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 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 ~arm ~arm64 ~ppc64 ~riscv ~sparc ~x86"
+
+CPU_USE=(
+ x86_{avx2,avx512f,avx512_vnni,sse2,ssse3,sse4_2,pclmul,vpclmulqdq}
+ arm_{crc32,neon}
+ ppc_{altivec,vsx2,vsx3}
+)
+IUSE="compat ${CPU_USE[@]/#/cpu_flags_} test"
+
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ test? ( dev-cpp/gtest )
+"
+RDEPEND="
+ compat? ( !sys-libs/zlib )
+"
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DZLIB_COMPAT=$(usex compat)
+ -DZLIB_ENABLE_TESTS=$(usex test)
+ -DWITH_GTEST=$(usex test)
+
+ # 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.
+ # TODO: There's no s390x USE_EXPAND yet
+ if use amd64 || use x86 ; then
+ mycmakeargs+=(
+ -DWITH_AVX2=$(usex cpu_flags_x86_avx2)
+ -DWITH_AVX512=$(usex cpu_flags_x86_avx512f)
+ -DWITH_AVX512VNNI=$(usex cpu_flags_x86_avx512_vnni)
+ -DWITH_SSE2=$(usex cpu_flags_x86_sse2)
+ -DWITH_SSSE3=$(usex cpu_flags_x86_ssse3)
+ -DWITH_SSE42=$(usex cpu_flags_x86_sse4_2)
+ -DWITH_PCLMULQDQ=$(usex cpu_flags_x86_pclmul)
+ -DWITH_VPCLMULQDQ=$(usex cpu_flags_x86_vpclmulqdq)
+ )
+ fi
+
+ if use arm || use arm64 ; then
+ mycmakeargs+=(
+ -DWITH_ACLE=$(usex cpu_flags_arm_crc32)
+ -DWITH_NEON=$(usex cpu_flags_arm_neon)
+ )
+ fi
+
+ if use ppc || use ppc64 ; then
+ # The POWER8 support is VSX which was introduced
+ # VSX2 was introduced with POWER8, so use that as a proxy for it
+ mycmakeargs+=(
+ -DWITH_ALTIVEC=$(usex cpu_flags_ppc_altivec)
+ -DWITH_POWER8=$(usex cpu_flags_ppc_vsx2)
+ -DWITH_POWER9=$(usex cpu_flags_ppc_vsx3)
+ )
+ fi
+
+ cmake_src_configure
+}
+
+pkg_postinst() {
+ if use compat ; then
+ ewarn "zlib-ng is experimental and replacing the system zlib is dangerous"
+ ewarn "Please be careful!"
+ ewarn
+ ewarn "The following link explains the guarantees (and what is NOT guaranteed):"
+ ewarn "https://github.com/zlib-ng/zlib-ng/blob/2.0.x/PORTING.md"
+ fi
+}
diff --git a/sys-libs/zlib/Manifest b/sys-libs/zlib/Manifest
index 1db6ff631533..74c4bb0f8222 100644
--- a/sys-libs/zlib/Manifest
+++ b/sys-libs/zlib/Manifest
@@ -1 +1,4 @@
-DIST zlib-1.2.11.tar.gz 607698 BLAKE2B 6bfc4bca5dcadba8a0d4121a2b3ed0bfe440c261003521862c8e6381f1a6f0a72d3fc037351d30afd7ef321e8e8d2ec817c046ac749f2ca0c97fbdc2f7e840b7 SHA512 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae
+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/metadata.xml b/sys-libs/zlib/metadata.xml
index 105b205e9e4e..4d41ee8a0c0b 100644
--- a/sys-libs/zlib/metadata.xml
+++ b/sys-libs/zlib/metadata.xml
@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<use>
- <flag name="minizip">include the minizip library for quick and dirty zip extraction</flag>
-</use>
-<upstream>
- <remote-id type="cpe">cpe:/a:gnu:zlib</remote-id>
-</upstream>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <use>
+ <flag name="minizip">include the minizip library for quick and dirty zip extraction</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">madler/zlib</remote-id>
+ <remote-id type="cpe">cpe:/a:gnu:zlib</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/zlib/zlib-1.2.11-r2.ebuild b/sys-libs/zlib/zlib-1.2.11-r2.ebuild
deleted file mode 100644
index b43e10d36094..000000000000
--- a/sys-libs/zlib/zlib-1.2.11-r2.ebuild
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-AUTOTOOLS_AUTO_DEPEND="no"
-
-inherit autotools toolchain-funcs multilib multilib-minimal usr-ldscript
-
-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"
-
-LICENSE="ZLIB"
-SLOT="0/1" # subslot = SONAME
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86"
-IUSE="minizip static-libs"
-
-DEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )"
-RDEPEND="!<dev-libs/libxml2-2.7.7" #309623
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-1.2.11-fix-deflateParams-usage.patch
- epatch "${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch #658536
-
- 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
-}
-
-echoit() { echo "$@"; "$@"; }
-
-multilib_src_configure() {
- case ${CHOST} in
- *-mingw*|mingw*)
- ;;
- *) # not an autoconf script, so can't use econf
- local uname=$("${EPREFIX}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) #347167
- echoit "${S}"/configure \
- --shared \
- --prefix="${EPREFIX}/usr" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- ${uname:+--uname=${uname}} \
- || 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*)
- emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
- sed \
- -e 's|@prefix@|/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*)
- 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
-
- use static-libs || rm -f "${ED}"/usr/$(get_libdir)/lib{z,minizip}.{a,la} #419645
-}
-
-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
+}