summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/argp-standalone/Manifest1
-rw-r--r--sys-libs/argp-standalone/argp-standalone-1.4.1-r1.ebuild42
-rw-r--r--sys-libs/argp-standalone/files/argp-standalone-1.3-shared.patch5
-rw-r--r--sys-libs/argp-standalone/metadata.xml5
-rw-r--r--sys-libs/basu/Manifest1
-rw-r--r--sys-libs/basu/basu-0.2.0.ebuild41
-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/metadata.xml19
-rw-r--r--sys-libs/binutils-libs/Manifest1
-rw-r--r--sys-libs/binutils-libs/binutils-libs-2.37_p1-r1.ebuild135
-rw-r--r--sys-libs/compiler-rt-sanitizers/Manifest4
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0-r1.ebuild3
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.1.ebuild3
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.ebuild9
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1.9999.ebuild (renamed from sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.9999.ebuild)17
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1_rc1.ebuild (renamed from sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.1-r1.ebuild)96
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0.9999.ebuild19
-rw-r--r--sys-libs/compiler-rt-sanitizers/metadata.xml1
-rw-r--r--sys-libs/compiler-rt/Manifest4
-rw-r--r--sys-libs/compiler-rt/compiler-rt-13.0.0.ebuild6
-rw-r--r--sys-libs/compiler-rt/compiler-rt-13.0.1.9999.ebuild (renamed from sys-libs/compiler-rt/compiler-rt-13.0.0.9999.ebuild)13
-rw-r--r--sys-libs/compiler-rt/compiler-rt-13.0.1_rc1.ebuild (renamed from sys-libs/compiler-rt/compiler-rt-10.0.1.ebuild)52
-rw-r--r--sys-libs/compiler-rt/compiler-rt-14.0.0.9999.ebuild15
-rw-r--r--sys-libs/csu/Manifest1
-rw-r--r--sys-libs/csu/csu-79.ebuild44
-rw-r--r--sys-libs/cygwin-crypt/cygwin-crypt-1.4-r1.ebuild (renamed from sys-libs/cygwin-crypt/cygwin-crypt-1.4.ebuild)8
-rw-r--r--sys-libs/e2fsprogs-libs/Manifest3
-rw-r--r--sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.7.ebuild93
-rw-r--r--sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.46.2.ebuild93
-rw-r--r--sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.46.3.ebuild93
-rw-r--r--sys-libs/freeipmi/freeipmi-1.6.8.ebuild2
-rw-r--r--sys-libs/glibc/Manifest6
-rw-r--r--sys-libs/glibc/files/glibc-2.34-make-clone3-syscall-optional.patch48
-rw-r--r--sys-libs/glibc/glibc-2.33-r7.ebuild18
-rw-r--r--sys-libs/glibc/glibc-2.33.ebuild1494
-rw-r--r--sys-libs/glibc/glibc-2.34-r2.ebuild (renamed from sys-libs/glibc/glibc-2.34.ebuild)51
-rw-r--r--sys-libs/glibc/glibc-2.34-r3.ebuild (renamed from sys-libs/glibc/glibc-2.33-r6.ebuild)70
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild187
-rw-r--r--sys-libs/glibc/metadata.xml1
-rw-r--r--sys-libs/kpmcore/Manifest4
-rw-r--r--sys-libs/kpmcore/files/kpmcore-21.08.3-dont-destroy-zfs-pool.patch46
-rw-r--r--sys-libs/kpmcore/files/kpmcore-21.08.3-fix-seek-error-when-shred-partition.patch27
-rw-r--r--sys-libs/kpmcore/kpmcore-21.08.3-r1.ebuild (renamed from sys-libs/kpmcore/kpmcore-21.04.3.ebuild)13
-rw-r--r--sys-libs/kpmcore/kpmcore-21.11.90.ebuild (renamed from sys-libs/kpmcore/kpmcore-21.08.2.ebuild)2
-rw-r--r--sys-libs/ldb/Manifest5
-rw-r--r--sys-libs/ldb/ldb-2.3.1.ebuild (renamed from sys-libs/ldb/ldb-2.3.0-r1.ebuild)6
-rw-r--r--sys-libs/ldb/ldb-2.3.2.ebuild (renamed from sys-libs/ldb/ldb-2.2.1-r1.ebuild)10
-rw-r--r--sys-libs/ldb/ldb-2.4.0-r1.ebuild4
-rw-r--r--sys-libs/ldb/ldb-2.4.1.ebuild120
-rw-r--r--sys-libs/libapparmor/Manifest1
-rw-r--r--sys-libs/libapparmor/libapparmor-3.0.3.ebuild97
-rw-r--r--sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild8
-rw-r--r--sys-libs/libblockdev/libblockdev-2.26.ebuild13
-rw-r--r--sys-libs/libblockdev/libblockdev-9999.ebuild13
-rw-r--r--sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild2
-rw-r--r--sys-libs/libcap/Manifest4
-rw-r--r--sys-libs/libcap/files/libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch9
-rw-r--r--sys-libs/libcap/files/libcap-2.38-no_perl.patch9
-rw-r--r--sys-libs/libcap/files/libcap-2.48-build-system-fixes.patch24
-rw-r--r--sys-libs/libcap/files/libcap-2.57-parallel-make.patch29
-rw-r--r--sys-libs/libcap/files/libcap-2.61-Wformat.patch25
-rw-r--r--sys-libs/libcap/files/libcap-2.61-ignore-RAISE_SETFCAP-install-failures.patch24
-rw-r--r--sys-libs/libcap/files/libcap-2.61-no_perl.patch57
-rw-r--r--sys-libs/libcap/libcap-2.57.ebuild90
-rw-r--r--sys-libs/libcap/libcap-2.61.ebuild (renamed from sys-libs/libcap/libcap-2.59.ebuild)20
-rw-r--r--sys-libs/libcap/libcap-9999.ebuild (renamed from sys-libs/libcap/libcap-2.58.ebuild)20
-rw-r--r--sys-libs/libcxx/Manifest4
-rw-r--r--sys-libs/libcxx/libcxx-13.0.0.ebuild3
-rw-r--r--sys-libs/libcxx/libcxx-13.0.1.9999.ebuild (renamed from sys-libs/libcxx/libcxx-13.0.0.9999.ebuild)1
-rw-r--r--sys-libs/libcxx/libcxx-13.0.1_rc1.ebuild (renamed from sys-libs/libcxx/libcxx-10.0.1.ebuild)46
-rw-r--r--sys-libs/libcxx/libcxx-14.0.0.9999.ebuild1
-rw-r--r--sys-libs/libcxxabi/Manifest2
-rw-r--r--sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild4
-rw-r--r--sys-libs/libcxxabi/libcxxabi-13.0.1.9999.ebuild (renamed from sys-libs/libcxxabi/libcxxabi-13.0.0.9999.ebuild)2
-rw-r--r--sys-libs/libcxxabi/libcxxabi-13.0.1_rc1.ebuild (renamed from sys-libs/libcxxabi/libcxxabi-10.0.1.ebuild)38
-rw-r--r--sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild2
-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.6-r4.ebuild (renamed from sys-libs/libfaketime/libfaketime-0.9.6-r3.ebuild)2
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch258
-rw-r--r--sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild1
-rw-r--r--sys-libs/libomp/Manifest5
-rw-r--r--sys-libs/libomp/libomp-13.0.0-r1.ebuild (renamed from sys-libs/libomp/libomp-10.0.1.ebuild)59
-rw-r--r--sys-libs/libomp/libomp-13.0.1.9999.ebuild (renamed from sys-libs/libomp/libomp-13.0.0.9999.ebuild)29
-rw-r--r--sys-libs/libomp/libomp-13.0.1_rc1.ebuild (renamed from sys-libs/libomp/libomp-13.0.0.ebuild)33
-rw-r--r--sys-libs/libomp/libomp-14.0.0.9999.ebuild29
-rw-r--r--sys-libs/libosinfo/libosinfo-1.9.0-r1.ebuild60
-rw-r--r--sys-libs/librtas/librtas-2.0.2-r2.ebuild (renamed from sys-libs/librtas/librtas-2.0.2-r1.ebuild)4
-rw-r--r--sys-libs/libseccomp/Manifest1
-rw-r--r--sys-libs/libseccomp/files/libseccomp-2.5.3-skip-valgrind.patch13
-rw-r--r--sys-libs/libseccomp/libseccomp-2.5.3.ebuild99
-rw-r--r--sys-libs/libseccomp/libseccomp-9999.ebuild15
-rw-r--r--sys-libs/libselinux/Manifest1
-rw-r--r--sys-libs/libselinux/libselinux-3.2.ebuild2
-rw-r--r--sys-libs/libselinux/libselinux-3.3.ebuild156
-rw-r--r--sys-libs/libsemanage/Manifest1
-rw-r--r--sys-libs/libsemanage/libsemanage-3.2.ebuild2
-rw-r--r--sys-libs/libsemanage/libsemanage-3.3.ebuild127
-rw-r--r--sys-libs/libsepol/Manifest1
-rw-r--r--sys-libs/libsepol/libsepol-3.2.ebuild2
-rw-r--r--sys-libs/libsepol/libsepol-3.3.ebuild50
-rw-r--r--sys-libs/libucontext/Manifest1
-rw-r--r--sys-libs/libucontext/libucontext-1.1.ebuild51
-rw-r--r--sys-libs/libucontext/metadata.xml11
-rw-r--r--sys-libs/libunwind/Manifest2
-rw-r--r--sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch2
-rw-r--r--sys-libs/libunwind/libunwind-1.6.2.ebuild (renamed from sys-libs/libunwind/libunwind-1.6.0_rc2.ebuild)68
-rw-r--r--sys-libs/liburing/Manifest2
-rw-r--r--sys-libs/liburing/files/liburing-0.7-ucontext_h-detection.patch72
-rw-r--r--sys-libs/liburing/files/liburing-2.0-spec_version.patch29
-rw-r--r--sys-libs/liburing/files/liburing-2.1-arm-syscall.patch54
-rw-r--r--sys-libs/liburing/liburing-0.7-r1.ebuild59
-rw-r--r--sys-libs/liburing/liburing-2.0-r1.ebuild59
-rw-r--r--sys-libs/liburing/liburing-2.1.ebuild7
-rw-r--r--sys-libs/liburing/liburing-9999.ebuild2
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.20.ebuild12
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.25-r1.ebuild (renamed from sys-libs/libxcrypt/libxcrypt-4.4.26.ebuild)19
-rw-r--r--sys-libs/libxcrypt/libxcrypt-4.4.26-r1.ebuild (renamed from sys-libs/libxcrypt/libxcrypt-4.4.25.ebuild)17
-rw-r--r--sys-libs/llvm-libunwind/Manifest2
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.ebuild3
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-13.0.1.9999.ebuild (renamed from sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.9999.ebuild)1
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-13.0.1_rc1.ebuild (renamed from sys-libs/llvm-libunwind/llvm-libunwind-10.0.1.ebuild)64
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-14.0.0.9999.ebuild1
-rw-r--r--sys-libs/musl/files/ldconfig.in-r1155
-rw-r--r--sys-libs/musl/files/ldconfig.in-r2157
-rw-r--r--sys-libs/musl/metadata.xml4
-rw-r--r--sys-libs/musl/musl-1.2.2-r4.ebuild167
-rw-r--r--sys-libs/musl/musl-1.2.2-r6.ebuild167
-rw-r--r--sys-libs/musl/musl-1.2.2-r7.ebuild167
-rw-r--r--sys-libs/musl/musl-9999.ebuild22
-rw-r--r--sys-libs/ncurses/Manifest4
-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.2-no_user_ldflags_in_libs.patch40
-rw-r--r--sys-libs/ncurses/ncurses-6.2_p20210619.ebuild4
-rw-r--r--sys-libs/ncurses/ncurses-6.3.ebuild (renamed from sys-libs/ncurses/ncurses-6.2-r1.ebuild)33
-rw-r--r--sys-libs/ncurses/ncurses-6.3_p20211106.ebuild354
-rw-r--r--sys-libs/newlib/newlib-4.1.0-r1.ebuild2
-rw-r--r--sys-libs/newlib/newlib-9999.ebuild2
-rw-r--r--sys-libs/openipmi/Manifest2
-rw-r--r--sys-libs/openipmi/openipmi-2.0.31.ebuild101
-rw-r--r--sys-libs/openipmi/openipmi-2.0.32.ebuild101
-rw-r--r--sys-libs/pam/pam-1.5.2-r1.ebuild128
-rw-r--r--sys-libs/pam_wrapper/Manifest1
-rw-r--r--sys-libs/pam_wrapper/pam_wrapper-1.1.3-r3.ebuild74
-rw-r--r--sys-libs/pam_wrapper/pam_wrapper-1.1.4.ebuild70
-rw-r--r--sys-libs/readline/readline-8.1_p1-r1.ebuild2
-rw-r--r--sys-libs/talloc/talloc-2.3.3.ebuild2
-rw-r--r--sys-libs/tdb/Manifest2
-rw-r--r--sys-libs/tdb/tdb-1.4.3.ebuild62
-rw-r--r--sys-libs/tdb/tdb-1.4.4.ebuild62
-rw-r--r--sys-libs/tdb/tdb-1.4.5.ebuild5
-rw-r--r--sys-libs/tevent/tevent-0.11.0.ebuild2
-rw-r--r--sys-libs/timezone-data/Manifest2
-rw-r--r--sys-libs/timezone-data/timezone-data-2021e.ebuild196
155 files changed, 4434 insertions, 2837 deletions
diff --git a/sys-libs/argp-standalone/Manifest b/sys-libs/argp-standalone/Manifest
index ba5599b7e5b..1579c67dee1 100644
--- a/sys-libs/argp-standalone/Manifest
+++ b/sys-libs/argp-standalone/Manifest
@@ -1 +1,2 @@
DIST argp-standalone-1.3.tar.gz 130255 BLAKE2B 0848a0e7a98cfa09de52fa152eb9a793a9bf25c1edfc7401851ef134b62c051ad6ef2134d6f528e167046be582be23f311e74614c5511d659060addc14de6b2f SHA512 58c3feb8852b90248fff39e49b5019bd0dcf646790c3eaf70c3262eb81dda31a61dc0a45963c7b4a010e80fc14b37288dcb3b3ef48d02f2d33dd72c1c62e62d9
+DIST argp-standalone-1.4.1.tar.gz 58158 BLAKE2B aa55965d6c4a9d61e82a5f3af7a62bf1a35b82ad91c87b4b31a6fa314ba0bcf30667137b420ccae5fbe24301c994971ef48c8dfa4db48620e56edc4300fbd961 SHA512 c5f07e88434589a13a2e88e66d1142b581f19aa82da28507f3c31ea782e080a13a4504d8108c003b5d3c8a3aa20f52ea5e81f337c11a4b1342b16361d4877c1c
diff --git a/sys-libs/argp-standalone/argp-standalone-1.4.1-r1.ebuild b/sys-libs/argp-standalone/argp-standalone-1.4.1-r1.ebuild
new file mode 100644
index 00000000000..c665f174dc2
--- /dev/null
+++ b/sys-libs/argp-standalone/argp-standalone-1.4.1-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="Standalone argp library for use with musl"
+HOMEPAGE="https://github.com/ericonr/argp-standalone"
+SRC_URI="https://github.com/ericonr/argp-standalone/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+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}"/argp-standalone-1.3-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-shared.patch b/sys-libs/argp-standalone/files/argp-standalone-1.3-shared.patch
index 7164103f8a7..eea801c4ee9 100644
--- a/sys-libs/argp-standalone/files/argp-standalone-1.3-shared.patch
+++ b/sys-libs/argp-standalone/files/argp-standalone-1.3-shared.patch
@@ -1,3 +1,8 @@
+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 2009-05-28 15:19:50.000000000 +0200
+++ b/Makefile.am 2009-05-28 15:30:57.000000000 +0200
@@ -21,20 +21,20 @@
diff --git a/sys-libs/argp-standalone/metadata.xml b/sys-libs/argp-standalone/metadata.xml
index bfcf597206e..b4d9c5f484e 100644
--- a/sys-libs/argp-standalone/metadata.xml
+++ b/sys-libs/argp-standalone/metadata.xml
@@ -5,4 +5,7 @@
<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 00000000000..bdca280686a
--- /dev/null
+++ b/sys-libs/basu/Manifest
@@ -0,0 +1 @@
+DIST basu-0.2.0.tar.gz 238861 BLAKE2B 4fcc664d031477c2ae82e535711561d1a7cb60503fb31fa80101c2046e3fe11f7886851649d38f3d5868a3266f45e651085d99ec95f6788baddbf78e893b1528 SHA512 dbc2f72b6e1a880fa41fe6067a38a301f456e4305dae6eb4d465089d7d9c2f629677ba23752b3e1a1fd476cb440db01ef3a218c1c976f38d0058eed584c80165
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 00000000000..46c936a536d
--- /dev/null
+++ b/sys-libs/basu/basu-0.2.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..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/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 00000000000..b2727b95a7d
--- /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 00000000000..3d32f0b2352
--- /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/metadata.xml b/sys-libs/basu/metadata.xml
new file mode 100644
index 00000000000..e97261f5614
--- /dev/null
+++ b/sys-libs/basu/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>arsen@aarsen.me</email>
+ <name>Arsen Arsenović</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ The sd-bus library, extracted from systemd.
+
+ 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>
+</pkgmetadata>
diff --git a/sys-libs/binutils-libs/Manifest b/sys-libs/binutils-libs/Manifest
index ff138269460..5d39e2080c3 100644
--- a/sys-libs/binutils-libs/Manifest
+++ b/sys-libs/binutils-libs/Manifest
@@ -5,4 +5,5 @@ DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796
DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24
+DIST binutils-2.37_p1-patches-1.tar.xz 28956 BLAKE2B 3bc14fcc52a6d11992ad9ed88fa3347ca3d5facd59de094a178a5f720d0eed6297dadf9a8fea7189076eb81274612c0b71c01f15a8f58deeaed8c8f6135ef50d SHA512 f6b2a09bfc692cf90f6cd56be81f424a68831db48054dc150eb6ec28bfa18d35933203c2d3b502f0c80e38771353c373446aec2488469fe2df20d8066033f59e
DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
diff --git a/sys-libs/binutils-libs/binutils-libs-2.37_p1-r1.ebuild b/sys-libs/binutils-libs/binutils-libs-2.37_p1-r1.ebuild
new file mode 100644
index 00000000000..c6195ef2ed9
--- /dev/null
+++ b/sys-libs/binutils-libs/binutils-libs-2.37_p1-r1.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PATCH_VER=1
+PATCH_DEV=dilfridge
+
+inherit 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 ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-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 [[ ! -z ${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() {
+ 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/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest
index ac8a802ce04..d366da9434b 100644
--- a/sys-libs/compiler-rt-sanitizers/Manifest
+++ b/sys-libs/compiler-rt-sanitizers/Manifest
@@ -1,9 +1,9 @@
-DIST llvm-gentoo-patchset-10.0.1-4.tar.xz 10472 BLAKE2B be17f25c8e1ba102c7653ccd3890be2da18566d051dcc35eeccf738d0cdfd4c98fed1c9e3d8fada0a394acda4568d4579534255e9706912581070d3cbdb2140a SHA512 794cb77c3002b398a2fcd5f845a41f9d075ba5db53d13665c64958ec809a181ef95d054a0850e49066ef1e926e326077f4305e088ee29f30acf9c2e98161be15
DIST llvm-gentoo-patchset-11.1.0-3.tar.xz 5984 BLAKE2B 89056fb8e82c7a29ae76c643ac631876d51391ffb579324aaf13c7f79e03f6fd8bbcb27d46e57e0f04a702602ebf51c116e82cb092452a1dbc97fb0eb7518f11 SHA512 08aabe8836b62ecfde4e264d567169ba495d5b5915b56aba35ae86992387e534bba6d512fde94056e641abe909b478e47edcbdaa3ee0b94182ecd68c98201441
DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249
DIST llvm-gentoo-patchset-13.0.0.tar.xz 5012 BLAKE2B 6760c78c086aaf6629143fd920b0a2c68cad9278628fbea8164dfeb59db95984a5b5d6b3505b510c697e8c95bf8d2be782c6b73c01622d52f2da9b07ecff39e0 SHA512 7764d49343b795b6bebae64f646ba27e3e6cc2a20b8a1aee645ce0d8474633c34acfbb73c08546fee415755dd4ea5a98c1d84db5e394cf5f4fc802eb61148ab6
+DIST llvm-gentoo-patchset-13.0.1-rc1.tar.xz 5988 BLAKE2B 8f1d295d4b6937518d9e0cc00cc2ba9e12ff9773b35261f0985b2d2a4ed1e3363a7f961cb385728b5ae552d0e129d99d11e63958d32c3353b0a79a88ba5cc0d5 SHA512 8272c423a5e0e99d412bb449794ba2e8134aca69d09e90e93555dbd3b7549d6ce4d68617ca11074af0a35a6f6830bf0330cbc672c5a56054cfd824e3ac1900ea
DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc
-DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
+DIST llvmorg-13.0.1-rc1.tar.gz 147284646 BLAKE2B 3a1d8d382de633b7f8fc998f8ad1e03c24b733aefc591615cbd34115d1d6d74962ae33bbf2224527b521a76930ffee425527225563a558a04173e9aa9487c781 SHA512 d487bfc9b898ad0046e0c94338d7757d8a05a1a84d683abfbc9ed4994c6d12caf88fd18575225e284070fc67b3ac0970ca6639e61b1a7cc2948b216a5364a22d
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0-r1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0-r1.ebuild
index 83cbb9c75c1..e089a94c228 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0-r1.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.1.0-r1.ebuild
@@ -33,7 +33,8 @@ RESTRICT="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6"
+ >=sys-devel/llvm-6
+ virtual/libcrypt"
BDEPEND="
>=dev-util/cmake-3.16
clang? ( sys-devel/clang )
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.1.ebuild
index bfb20d554b3..5d5313171cc 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.1.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-12.0.1.ebuild
@@ -33,7 +33,8 @@ RESTRICT="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6"
+ >=sys-devel/llvm-6
+ virtual/libcrypt"
BDEPEND="
>=dev-util/cmake-3.16
clang? ( sys-devel/clang )
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.ebuild
index b70b3695c1f..68f7e7b395d 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="$(ver_cut 1-3)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
IUSE="+clang debug test elibc_glibc"
# base targets
IUSE+=" +libfuzzer +memprof +orc +profile +xray"
@@ -33,7 +33,8 @@ RESTRICT="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6"
+ >=sys-devel/llvm-6
+ virtual/libcrypt"
BDEPEND="
>=dev-util/cmake-3.16
clang? ( sys-devel/clang )
@@ -44,7 +45,9 @@ BDEPEND="
=sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
sys-libs/compiler-rt:${SLOT}
)
- ${PYTHON_DEPS}"
+ !test? (
+ ${PYTHON_DEPS}
+ )"
LLVM_COMPONENTS=( compiler-rt )
LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1.9999.ebuild
index fdf1c53a966..f89af63c6d3 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1.9999.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="$(ver_cut 1-3)"
KEYWORDS=""
-IUSE="+clang debug test elibc_glibc"
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test elibc_glibc"
# base targets
IUSE+=" +libfuzzer +memprof +orc +profile +xray"
# sanitizer targets, keep in sync with config-ix.cmake
@@ -33,7 +33,8 @@ RESTRICT="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6"
+ >=sys-devel/llvm-6
+ virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]"
BDEPEND="
>=dev-util/cmake-3.16
clang? ( sys-devel/clang )
@@ -44,7 +45,9 @@ BDEPEND="
=sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
sys-libs/compiler-rt:${SLOT}
)
- ${PYTHON_DEPS}"
+ !test? (
+ ${PYTHON_DEPS}
+ )"
LLVM_COMPONENTS=( compiler-rt )
LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
@@ -136,6 +139,14 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if use amd64; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
if use test; then
mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.1-r1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1_rc1.ebuild
index 470a4f5ab83..c456d296bcb 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.1-r1.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-13.0.1_rc1.ebuild
@@ -3,37 +3,56 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
HOMEPAGE="https://llvm.org/"
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
-LLVM_PATCHSET=10.0.1-4
-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"
-IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
-# FIXME: libfuzzer does not enable all its necessary dependencies
-REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
+KEYWORDS=""
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test elibc_glibc"
+# 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="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6"
+ >=sys-devel/llvm-6
+ virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]"
BDEPEND="
+ >=dev-util/cmake-3.16
clang? ( sys-devel/clang )
elibc_glibc? ( net-libs/libtirpc )
test? (
!<sys-apps/sandbox-2.13
$(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
=sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
- sys-libs/compiler-rt:${SLOT} )
- ${PYTHON_DEPS}"
+ sys-libs/compiler-rt:${SLOT}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )"
+
+LLVM_COMPONENTS=( compiler-rt )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
+LLVM_PATCHSET=${PV/_/-}
+llvm.org_set_globals
python_check_deps() {
use test || return 0
@@ -60,10 +79,30 @@ pkg_setup() {
src_prepare() {
sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+ local flag
+ for flag in "${SANITIZER_FLAGS[@]}"; do
+ if ! use "${flag}"; then
+ local cmake_flag=${flag/-/_}
+ sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+ cmake/config-ix.cmake || die
+ fi
+ done
+
+ # TODO: fix these tests to be skipped upstream
+ if use asan && ! use profile; then
+ rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+ fi
+ if use ubsan && ! use cfi; then
+ > test/cfi/CMakeLists.txt || die
+ fi
+
llvm.org_src_prepare
}
src_configure() {
+ # 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
@@ -73,6 +112,14 @@ src_configure() {
strip-unsupported-flags
fi
+ local flag want_sanitizer=OFF
+ for flag in "${SANITIZER_FLAGS[@]}"; do
+ if use "${flag}"; then
+ want_sanitizer=ON
+ break
+ fi
+ done
+
local mycmakeargs=(
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
# use a build dir structure consistent with install
@@ -84,10 +131,22 @@ src_configure() {
-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=$(usex sanitize)
+ -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"
@@ -108,8 +167,15 @@ src_configure() {
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
+ # 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
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0.9999.ebuild
index fdf1c53a966..4e70cfd227c 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-14.0.0.9999.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="$(ver_cut 1-3)"
KEYWORDS=""
-IUSE="+clang debug test elibc_glibc"
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test elibc_glibc"
# base targets
IUSE+=" +libfuzzer +memprof +orc +profile +xray"
# sanitizer targets, keep in sync with config-ix.cmake
@@ -33,7 +33,8 @@ RESTRICT="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
# llvm-6 for new lit options
DEPEND="
- >=sys-devel/llvm-6"
+ >=sys-devel/llvm-6
+ virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]"
BDEPEND="
>=dev-util/cmake-3.16
clang? ( sys-devel/clang )
@@ -44,9 +45,11 @@ BDEPEND="
=sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
sys-libs/compiler-rt:${SLOT}
)
- ${PYTHON_DEPS}"
+ !test? (
+ ${PYTHON_DEPS}
+ )"
-LLVM_COMPONENTS=( compiler-rt )
+LLVM_COMPONENTS=( compiler-rt cmake )
LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
LLVM_PATCHSET=9999-1
llvm.org_set_globals
@@ -136,6 +139,14 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if use amd64; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
if use test; then
mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
diff --git a/sys-libs/compiler-rt-sanitizers/metadata.xml b/sys-libs/compiler-rt-sanitizers/metadata.xml
index 46f57a5f913..87fa65781b5 100644
--- a/sys-libs/compiler-rt-sanitizers/metadata.xml
+++ b/sys-libs/compiler-rt-sanitizers/metadata.xml
@@ -11,7 +11,6 @@
<flag name="memprof">Build memory profiler runtime.</flag>
<flag name="orc">Build ORC 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="asan">Build Address Sanitizer runtime.</flag>
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
index 3637647d0da..3e1261de5ed 100644
--- a/sys-libs/compiler-rt/Manifest
+++ b/sys-libs/compiler-rt/Manifest
@@ -1,9 +1,9 @@
-DIST llvm-gentoo-patchset-10.0.1-1.tar.xz 8320 BLAKE2B 1b7ea7669586e08fece0efcf02b392feed4b7f3e6e9cdd10ab7dcc30082cae5bb1daa6d3314a7b0329c4d70f3c736d0c57ed408c838601dc737d558d2a0a0f26 SHA512 75898a8d719657177bbf587d848be8e53135c09e50603660c19edab00f80b6c2f29e7b6fda2bef381b38df6e24a690d694029a38c525763408322573275fc9f0
DIST llvm-gentoo-patchset-11.1.0-1.tar.xz 4032 BLAKE2B e69138a422e315b31a3d9c11faa4ae1ddf1bf9092cee2db0de4d2adef81fd802973488293aab48b764402b51996893b17ca03249ef4620848a576d1f6cdb9698 SHA512 e1c5504dab6c5db9fdf4addfeb12316f22d0258717ba551a9b7b3ba37919491fb6011ac5cca1e793b7509d5c1c186bc6bc4213f7d6155d190612492b216f979b
DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249
DIST llvm-gentoo-patchset-13.0.0.tar.xz 5012 BLAKE2B 6760c78c086aaf6629143fd920b0a2c68cad9278628fbea8164dfeb59db95984a5b5d6b3505b510c697e8c95bf8d2be782c6b73c01622d52f2da9b07ecff39e0 SHA512 7764d49343b795b6bebae64f646ba27e3e6cc2a20b8a1aee645ce0d8474633c34acfbb73c08546fee415755dd4ea5a98c1d84db5e394cf5f4fc802eb61148ab6
+DIST llvm-gentoo-patchset-13.0.1-rc1.tar.xz 5988 BLAKE2B 8f1d295d4b6937518d9e0cc00cc2ba9e12ff9773b35261f0985b2d2a4ed1e3363a7f961cb385728b5ae552d0e129d99d11e63958d32c3353b0a79a88ba5cc0d5 SHA512 8272c423a5e0e99d412bb449794ba2e8134aca69d09e90e93555dbd3b7549d6ce4d68617ca11074af0a35a6f6830bf0330cbc672c5a56054cfd824e3ac1900ea
DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc
-DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
+DIST llvmorg-13.0.1-rc1.tar.gz 147284646 BLAKE2B 3a1d8d382de633b7f8fc998f8ad1e03c24b733aefc591615cbd34115d1d6d74962ae33bbf2224527b521a76930ffee425527225563a558a04173e9aa9487c781 SHA512 d487bfc9b898ad0046e0c94338d7757d8a05a1a84d683abfbc9ed4994c6d12caf88fd18575225e284070fc67b3ac0970ca6639e61b1a7cc2948b216a5364a22d
diff --git a/sys-libs/compiler-rt/compiler-rt-13.0.0.ebuild b/sys-libs/compiler-rt/compiler-rt-13.0.0.ebuild
index 92894146cb0..a2d62590de1 100644
--- a/sys-libs/compiler-rt/compiler-rt-13.0.0.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-13.0.0.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="$(ver_cut 1-3)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
IUSE="+clang debug test"
RESTRICT="!test? ( test ) !clang? ( test )"
@@ -26,7 +26,9 @@ BDEPEND="
$(python_gen_any_dep ">=dev-python/lit-9.0.1[\${PYTHON_USEDEP}]")
=sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
)
- ${PYTHON_DEPS}"
+ !test? (
+ ${PYTHON_DEPS}
+ )"
LLVM_COMPONENTS=( compiler-rt )
LLVM_PATCHSET=${PV/_/-}
diff --git a/sys-libs/compiler-rt/compiler-rt-13.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-13.0.1.9999.ebuild
index d6a1a16eb34..1f0bd3af8c0 100644
--- a/sys-libs/compiler-rt/compiler-rt-13.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-13.0.1.9999.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="$(ver_cut 1-3)"
KEYWORDS=""
-IUSE="+clang debug test"
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
RESTRICT="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
@@ -26,7 +26,9 @@ BDEPEND="
$(python_gen_any_dep ">=dev-python/lit-9.0.1[\${PYTHON_USEDEP}]")
=sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
)
- ${PYTHON_DEPS}"
+ !test? (
+ ${PYTHON_DEPS}
+ )"
LLVM_COMPONENTS=( compiler-rt )
LLVM_PATCHSET=9999-1
@@ -94,6 +96,13 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
+ if use amd64; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-10.0.1.ebuild b/sys-libs/compiler-rt/compiler-rt-13.0.1_rc1.ebuild
index bcd5f4b351d..b2851d32c00 100644
--- a/sys-libs/compiler-rt/compiler-rt-10.0.1.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-13.0.1_rc1.ebuild
@@ -3,19 +3,16 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
-LLVM_COMPONENTS=( compiler-rt )
-LLVM_PATCHSET=10.0.1-1
-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"
-IUSE="+clang test"
+KEYWORDS=""
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
RESTRICT="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
@@ -23,11 +20,19 @@ CLANG_SLOT=${SLOT%%.*}
DEPEND="
>=sys-devel/llvm-6"
BDEPEND="
+ >=dev-util/cmake-3.16
clang? ( sys-devel/clang )
test? (
$(python_gen_any_dep ">=dev-python/lit-9.0.1[\${PYTHON_USEDEP}]")
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} )
- ${PYTHON_DEPS}"
+ =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )"
+
+LLVM_COMPONENTS=( compiler-rt )
+LLVM_PATCHSET=${PV/_/-}
+llvm.org_set_globals
python_check_deps() {
use test || return 0
@@ -42,7 +47,12 @@ pkg_pretend() {
}
pkg_setup() {
- llvm_pkg_setup
+ # Darwin Prefix builds do not have llvm installed yet, so rely on
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead
+ # of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
+ llvm_pkg_setup
+ fi
python-any-r1_pkg_setup
}
@@ -52,6 +62,9 @@ test_compiler() {
}
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
@@ -74,15 +87,32 @@ src_configure() {
-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+=(
- # disable use of SDK for the system itself
- -DDARWIN_macosx_CACHED_SYSROOT=/
+ # 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
diff --git a/sys-libs/compiler-rt/compiler-rt-14.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-14.0.0.9999.ebuild
index d6a1a16eb34..98c8fe855cf 100644
--- a/sys-libs/compiler-rt/compiler-rt-14.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-14.0.0.9999.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="$(ver_cut 1-3)"
KEYWORDS=""
-IUSE="+clang debug test"
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
RESTRICT="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
@@ -26,9 +26,11 @@ BDEPEND="
$(python_gen_any_dep ">=dev-python/lit-9.0.1[\${PYTHON_USEDEP}]")
=sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
)
- ${PYTHON_DEPS}"
+ !test? (
+ ${PYTHON_DEPS}
+ )"
-LLVM_COMPONENTS=( compiler-rt )
+LLVM_COMPONENTS=( compiler-rt cmake )
LLVM_PATCHSET=9999-1
llvm.org_set_globals
@@ -94,6 +96,13 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
+ if use amd64; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/csu/Manifest b/sys-libs/csu/Manifest
index 975fae05aff..480d3d1052c 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 c0261b5457a..00000000000
--- a/sys-libs/csu/csu-79.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# 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"
-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/cygwin-crypt/cygwin-crypt-1.4.ebuild b/sys-libs/cygwin-crypt/cygwin-crypt-1.4-r1.ebuild
index 37c9ff3d46f..24de50f1790 100644
--- a/sys-libs/cygwin-crypt/cygwin-crypt-1.4.ebuild
+++ b/sys-libs/cygwin-crypt/cygwin-crypt-1.4-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=8
inherit toolchain-funcs
@@ -17,10 +17,6 @@ SRC_URI="mirror://gentoo/${P}.tar.bz2"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~x64-cygwin"
-IUSE=""
-
-DEPEND=""
-RDEPEND="${DEPEND}"
mymake() {
emake \
diff --git a/sys-libs/e2fsprogs-libs/Manifest b/sys-libs/e2fsprogs-libs/Manifest
index 392f1604efb..580fc5c7611 100644
--- a/sys-libs/e2fsprogs-libs/Manifest
+++ b/sys-libs/e2fsprogs-libs/Manifest
@@ -1,4 +1 @@
-DIST e2fsprogs-1.45.7.tar.xz 5570052 BLAKE2B 237ef068c3899641b5eb908cc302c8c6b454e337bce2de95fc96b9a078a003db0c44bd34391063cc2f30a95dcce57950fe900f59ae7d273786c657b7c190b341 SHA512 fcbd66af7b87f2bdec562ddd59c8c5fbd60f32fdd582a5c9d21cb6cfea642d2cdca57b6c29124309798528b2d9ceadf770928a6698f75dc88a47701286128763
-DIST e2fsprogs-1.46.2.tar.xz 7020552 BLAKE2B 0eda7428862c13dfd02308f0321d22c134679197bad5b247baa6f0ca386433db6749b97529709d43934afa73d8d0801379bb342456a0fd3dab7df01f5a90fd31 SHA512 5297a4d7bf944806d8ee77227eac596b5e5efed2c665561d40094c40b9f321616c60975a2716f1499a9f72243df6e3b6e2267b98ec1fdc1dfd646d7be887fc4d
-DIST e2fsprogs-1.46.3.tar.xz 7024896 BLAKE2B 86f65cf9997f09aa7a27be35b2f38d6385f565de565b1c4cda710dbbea8312312ff77d92beb2b579a3caffa7ce82ee6b2726eb8f97daf41bba46379a94198c8f SHA512 27da6e38d3463e7a283dacfb88a3210dd6d8c63f4d990db879f63bdf503aaa5c447ef0ccc566b71526c12a8ab0a7a6529014b1010be300ad56a6ad5ce9066196
DIST e2fsprogs-1.46.4.tar.xz 7035200 BLAKE2B 473f7fd3f521b94cdaa68e37784a518fc1919387dd114f31b5338f1b4c472f86b150229ec3dcae8b73eac95330c0dea729befc8cea08bcf1e455c0b6652d6d2b SHA512 7d9cfdf00ed58e66049585e8382fe4977088956421a0fb8155900c69afd8857309ad2b9301b3f74c9c0afa7287a0ddba2fd1538fcf57858b37a9ab712390016d
diff --git a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.7.ebuild b/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.7.ebuild
deleted file mode 100644
index 722e3a0df06..00000000000
--- a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.7.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs multilib-minimal usr-ldscript
-
-MY_PN=${PN%-libs}
-MY_P="${MY_PN}-${PV}"
-
-DESCRIPTION="e2fsprogs libraries (common error and subsystem)"
-HOMEPAGE="http://e2fsprogs.sourceforge.net/"
-SRC_URI="https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v${PV}/${MY_P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x86-solaris"
-IUSE="static-libs"
-
-RDEPEND="!sys-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.46.2.ebuild b/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.46.2.ebuild
deleted file mode 100644
index a870ff5cc81..00000000000
--- a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.46.2.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs multilib-minimal usr-ldscript
-
-MY_PN=${PN%-libs}
-MY_P="${MY_PN}-${PV}"
-
-DESCRIPTION="e2fsprogs libraries (common error and subsystem)"
-HOMEPAGE="http://e2fsprogs.sourceforge.net/"
-SRC_URI="https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v${PV}/${MY_P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x86-solaris"
-IUSE="static-libs"
-
-RDEPEND="!sys-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.46.3.ebuild b/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.46.3.ebuild
deleted file mode 100644
index 41da9ca3221..00000000000
--- a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.46.3.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs multilib-minimal usr-ldscript
-
-MY_PN=${PN%-libs}
-MY_P="${MY_PN}-${PV}"
-
-DESCRIPTION="e2fsprogs libraries (common error and subsystem)"
-HOMEPAGE="http://e2fsprogs.sourceforge.net/"
-SRC_URI="https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v${PV}/${MY_P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
-IUSE="static-libs"
-
-RDEPEND="!sys-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/freeipmi/freeipmi-1.6.8.ebuild b/sys-libs/freeipmi/freeipmi-1.6.8.ebuild
index 55bbd239907..d282622d277 100644
--- a/sys-libs/freeipmi/freeipmi-1.6.8.ebuild
+++ b/sys-libs/freeipmi/freeipmi-1.6.8.ebuild
@@ -15,7 +15,7 @@ SRC_URI="mirror://gnu${ALPHA}/${PN}/${MY_P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~amd64 ~hppa ~ppc64 ~x86"
+KEYWORDS="amd64 ~hppa ~ppc64 x86"
IUSE="debug nagios"
RDEPEND="dev-libs/libgcrypt:0="
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index 78220f0644a..c54232241af 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -11,14 +11,14 @@ DIST glibc-2.31-patches-9.tar.xz 74712 BLAKE2B 62991b67de4def4cca944e8420d2f0139
DIST glibc-2.31.tar.xz 16676764 BLAKE2B 91df1792345f157265eae405185a81fd4b8ce36d4c2388f44b0d5b1ae38174ea374cbc909cd260770b9f38ea58051da13766d4fa22abf41c2d4a2493257b179b SHA512 735e4c0ef10418b6ea945ad3906585e5bbd8b282d76f2131309dce4cec6b15066a5e4a3731773ce428a819b542579c9957867bb0abf05ed2030983fca4412306
DIST glibc-2.32-patches-8.tar.xz 65532 BLAKE2B 00c572cff396e52313d0324f7bc28192a65f06b22fc5a04aa631b76b3016842365006399715531ee693f3519720edcebef7884247f2f8c19e3518c1ddafab7cc SHA512 5240bc3a6df46d12c03ea4ce7b1a0df85301256ae3bd003fd04c61dadaaec34998873bf20544d891f6eedf896302bb916010aebc1d8d646a3cce09a93b533d0b
DIST glibc-2.32.tar.xz 16744512 BLAKE2B a56b4afbb35315c5cd6dca0f62e44455dceae3e6e88a8453621f9a5394a60ddf10ca9309b2db0911830c7fd77e3faa5d94694eb94d5b2c05fc5285cef52255da SHA512 8460c155b7003e04f18dabece4ed9ad77445fa2288a7dc08e80a8fc4c418828af29e0649951bd71a54ea2ad2d4da7570aafd9bdfe4a37e9951b772b442afe50b
-DIST glibc-2.33-patches-3.tar.xz 37076 BLAKE2B 718ab706df85c966145958fb6137b5499c1989ff27a62c22beaabd530d641e4937e6d6ab0cf00052b649dc99c3acc319997640eef95669235dab864f5e0afc9f SHA512 6d460976610a1c3bd3dabee9250008b5b3024ba486d598f85bc81cbd0b88188d125714b93a8b253f9b59b292e998f35118562e2a3ca90c418ff14fa53af2a7c3
DIST glibc-2.33-patches-4.tar.xz 60124 BLAKE2B a7a99f39c16df241745772c31b10946dc44c51e6c09f8a447b905e7dd6ba529aee08f66a581431453c6665485ac1848861559aa3f0aaba8c2061c1f1eb77d9be SHA512 05c33dc465a98097f836783bb5037dfa14b3a2c0c140014f642ea72954222ae919fe2db9573ee70ca9c1881b3b59dd4b815a8f39f331494fa12951c9012797ef
-DIST glibc-2.33-patches-5.tar.xz 63032 BLAKE2B e7f5952b2d84dc264e960d8bd3d9af4ca43089ca269735168933e80a0a74d7be1cadc90935b429cfdf5f0052d3ce3482a8f073b15378e7f9c05034535d9eae4d SHA512 00c2f8f104e7899b76398a6a39f054cd109a71f5fcc4020304b7d7e15ae0c53df1c3acbafd56898427b3849452f9fb9e5064ff584d6c86c4d18c8a9201c89d29
DIST glibc-2.33-patches-6.tar.xz 64632 BLAKE2B f04ca4320d65c8796c67471cb56d3bf002cc34fb6a81075b85948e41c94df46cb2a3a944cced42d6d2c17ffc11e32a9840810864e655cc0fe18e6e0fe9f3c985 SHA512 b95746cd3415ec9ca275e542a2b5fddd5ce5680aa3bda08e94e96cf431191f7488ef6b7999ff0dfaf7405a4212531a75283e9bd7f5ae65bf572912038877a6df
DIST glibc-2.33.tar.xz 17031280 BLAKE2B 703d12121c1e2c5d9e0c6ba5341f5fb5c4d9111611a83f2360029b5de9c6e5a5611249d1833684a58ed4afdf49cae614365d87ec8721ba0e5d218f593b1f229d SHA512 4cb5777b68b22b746cc51669e0e9282b43c83f6944e42656e6db7195ebb68f2f9260f130fdeb4e3cfc64efae4f58d96c43d388f52be1eb024ca448084684abdb
-DIST glibc-2.34-patches-3.tar.xz 32984 BLAKE2B 5632cbb94bb6134348eebf545d2e1e8895edb318d2bbd4b5ff6847ca498a00814b47d6201915b3774906a125a46bcbd704f0c4b94a97eeaca4f7b89d9e93f7e4 SHA512 2c0ce3bba19a0585a869e98e63d14943655eeb40a11f1c70109781580d0de37269f44b99f0e366cd5d6a974ace668e953b66db77561152d683a30e14d8a13677
+DIST glibc-2.34-patches-5.tar.xz 56832 BLAKE2B e5f5e8e41551d9f90355e9fc854e541cdcd5dd172e12dafa84256b7aeb999c0980ec6e7299701b78b0257980f5cf91019edfdf9796bec6b886434aa1960b2d6c SHA512 bc56fe2870629700d931150e1ebdc6e9b3318e8dabf5491d3645efd4db11032e21562e9276d97fc052c45362bfbca7f3d80d93277c2bf8aa3e05a5001df75c60
+DIST glibc-2.34-patches-6.tar.xz 58396 BLAKE2B c25696e2aceef9ea4724716acde377d91b8a76b2edca2b293fcd6c89f635f63a612f8c1ecd861367b1394ebacc4b0151b0c6b68c2b08a7bde3a54a76400f35c5 SHA512 343922492e448d978dbcad1718804f892d002b6d4ce366da4cf571d97145ed850fb4b2862645681f487a9a18a77ea48f23010c0c61ea7cf914d26fd149b8271d
DIST glibc-2.34.tar.xz 17301232 BLAKE2B 874031192f2f5a3b35c3f5b044a467d4be4e67e8593e070e5b49b901ce8ea6bde2f8d2f6c92fa33b3f61eb723572a9e5f2b45e56064168df80a96d3fdb6fa30c SHA512 15252affd9ef4523a8001db16d497f4fdcb3ddf4cde7fe80e075df0bd3cc6524dc29fbe20229dbf5f97af580556e6b1fac0de321a5fe25322bc3e72f93beb624
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
diff --git a/sys-libs/glibc/files/glibc-2.34-make-clone3-syscall-optional.patch b/sys-libs/glibc/files/glibc-2.34-make-clone3-syscall-optional.patch
new file mode 100644
index 00000000000..bbc6cabb463
--- /dev/null
+++ b/sys-libs/glibc/files/glibc-2.34-make-clone3-syscall-optional.patch
@@ -0,0 +1,48 @@
+From 22afb7abbfa0e2d4d168dcd2844aa9935a71cb37 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 1 Dec 2021 14:58:40 +0000
+Subject: [PATCH] clone-internal.c: disable use of clone3 conditinally
+
+We're disabling clone3 for now _CONDITIONALLY_ (not by default) to allow
+compatibility with applications using older Electron.
+
+Use -DGENTOO_USE_CLONE3 to enable clone3 for now. In future, we will
+revert back to always using clone3.
+
+This was impacting e.g. Discord and Skype. This patch stops glibc from using
+clone3 internally (which is the only real use of it) and falls back to the old
+behaviour.
+
+Specifically, we want https://github.com/electron/electron/pull/31091
+to work its way downstream to various Electron applications.
+
+https://bugs.gentoo.org/819045
+https://bugs.gentoo.org/827386
+
+https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/glibc/plain/debian/patches/ubuntu/disable-clone3.patch
+
+This is the same as the patch that was considered but ultimately rejected
+for 2.34 because Docker got sorted out in time:
+https://patchwork.ozlabs.org/project/glibc/patch/87eebkf8ph.fsf@oldenburg.str.redhat.com/.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ sysdeps/unix/sysv/linux/clone-internal.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sysdeps/unix/sysv/linux/clone-internal.c b/sysdeps/unix/sysv/linux/clone-internal.c
+index 979f7880be..c5566daf73 100644
+--- a/sysdeps/unix/sysv/linux/clone-internal.c
++++ b/sysdeps/unix/sysv/linux/clone-internal.c
+@@ -48,7 +48,7 @@ __clone_internal (struct clone_args *cl_args,
+ int (*func) (void *arg), void *arg)
+ {
+ int ret;
+-#ifdef HAVE_CLONE3_WRAPPER
++#if defined(HAVE_CLONE3_WRAPPER) && defined(GENTOO_USE_CLONE3)
+ /* Try clone3 first. */
+ int saved_errno = errno;
+ ret = __clone3 (cl_args, sizeof (*cl_args), func, arg);
+--
+2.34.1
+
diff --git a/sys-libs/glibc/glibc-2.33-r7.ebuild b/sys-libs/glibc/glibc-2.33-r7.ebuild
index 2f9ce004d3a..20390ea8ba2 100644
--- a/sys-libs/glibc/glibc-2.33-r7.ebuild
+++ b/sys-libs/glibc/glibc-2.33-r7.ebuild
@@ -3,7 +3,10 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7,8,9,10} )
+# We avoid Python 3.10 here _for now_ (it does work!) to avoid circular dependencies
+# on upgrades as people migrate to libxcrypt.
+# https://wiki.gentoo.org/wiki/User:Sam/Portage_help/Circular_dependencies#Python_and_libcrypt
+PYTHON_COMPAT=( python3_{7,8,9} )
TMPFILES_OPTIONAL=1
inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
@@ -23,7 +26,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
@@ -1503,10 +1506,9 @@ pkg_preinst() {
# Keep around libcrypt so that Perl doesn't break when merging libxcrypt
# (libxcrypt is the new provider for now of libcrypt.so.{1,2}).
# bug #802207
- if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]"; then
+ if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then
PRESERVED_OLD_LIBCRYPT=1
- preserve_old_lib /$(get_libdir)/libcrypt$(get_libname 1)
- cp "${EROOT}"/usr/include/crypt.h "${T}"/crypt.h || die
+ cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" "${T}/libcrypt$(get_libname 1)" || die
else
PRESERVED_OLD_LIBCRYPT=0
fi
@@ -1541,11 +1543,13 @@ pkg_postinst() {
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)
- cp "${T}"/crypt.h "${EROOT}"/usr/include/crypt.h || eerror "Error restoring crypt.h, please file a bug"
+
elog "Please ignore a possible later error message about a file collision involving"
- elog "/usr/include/crypt.h. We need to preserve this file for the moment to keep"
+ elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep"
elog "the upgrade working, but it also needs to be overwritten when"
elog "sys-libs/libxcrypt is installed. See bug 802210 for more details."
+ elog "If you have FEATURES=collision-protect, please use FEATURES=unmerge-orphans instead!"
fi
}
diff --git a/sys-libs/glibc/glibc-2.33.ebuild b/sys-libs/glibc/glibc-2.33.ebuild
deleted file mode 100644
index c97ef6b4c66..00000000000
--- a/sys-libs/glibc/glibc-2.33.ebuild
+++ /dev/null
@@ -1,1494 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9,10} )
-TMPFILES_OPTIONAL=1
-
-inherit python-any-r1 prefix toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing tmpfiles
-
-DESCRIPTION="GNU libc C library"
-HOMEPAGE="https://www.gnu.org/software/libc/"
-LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
-SLOT="2.2"
-
-EMULTILIB_PKG="true"
-
-# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=3
-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"
- 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.10
-
-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 )"
-
-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 systemtap test vanilla"
-
-# Minimum kernel version that glibc requires
-MIN_KERN_VER="3.2.0"
-
-# Here's how the cross-compile logic breaks down ...
-# CTARGET - machine that will target the binaries
-# CHOST - machine that will host the binaries
-# CBUILD - machine that will build the binaries
-# If CTARGET != CHOST, it means you want a libc for cross-compiling.
-# If CHOST != CBUILD, it means you want to cross-compile the libc.
-# CBUILD = CHOST = CTARGET - native build/install
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
-# For install paths:
-# CHOST = CTARGET - install into /
-# CHOST != CTARGET - install into /usr/CTARGET/
-#
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-# Note [Disable automatic stripping]
-# Disabling automatic stripping for a few reasons:
-# - portage's attempt to strip breaks non-native binaries at least on
-# arm: bug #697428
-# - portage's attempt to strip libpthread.so.0 breaks gdb thread
-# enumeration: bug #697910. This is quite subtle:
-# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
-# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
-# via 'ps_pglobal_lookup' symbol defined in gdb.
-# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
-# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
-# (unexported) is used to sanity check compatibility before enabling
-# debugging.
-# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
-# * normal 'strip' command trims '.symtab'
-# Thus our main goal here is to prevent 'libpthread.so.0' from
-# losing it's '.symtab' entries.
-# As Gentoo's strip does not allow us to pass less aggressive stripping
-# options and does not check the machine target we strip selectively.
-
-# We need a new-enough binutils/gcc to match upstream baseline.
-# Also we need to make sure our binutils/gcc supports TLS,
-# and that gcc already contains the hardened patches.
-# Lastly, let's avoid some openssh nastiness, bug 708224, as
-# convenience to our users.
-
-# gzip, grep, awk are needed by locale-gen, bug 740750
-
-BDEPEND="
- ${PYTHON_DEPS}
- >=app-misc/pax-utils-0.1.10
- sys-devel/bison
- doc? ( sys-apps/texinfo )
- !compile-locales? (
- app-arch/gzip
- sys-apps/grep
- virtual/awk
- )
-"
-COMMON_DEPEND="
- gd? ( media-libs/gd:2= )
- nscd? ( selinux? (
- audit? ( sys-process/audit )
- caps? ( sys-libs/libcap )
- ) )
- suid? ( caps? ( sys-libs/libcap ) )
- selinux? ( sys-libs/libselinux )
- systemtap? ( dev-util/systemtap )
- !<net-misc/openssh-8.1_p1-r2
-"
-DEPEND="${COMMON_DEPEND}
- compile-locales? (
- app-arch/gzip
- sys-apps/grep
- virtual/awk
- )
- test? ( >=net-dns/libidn2-2.3.0 )
-"
-RDEPEND="${COMMON_DEPEND}
- app-arch/gzip
- sys-apps/grep
- virtual/awk
- sys-apps/gentoo-functions
-"
-
-RESTRICT="!test? ( test )"
-
-if [[ ${CATEGORY} == cross-* ]] ; then
- BDEPEND+=" !headers-only? (
- >=${CATEGORY}/binutils-2.27
- >=${CATEGORY}/gcc-6
- )"
- [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
-else
- BDEPEND+="
- >=sys-devel/binutils-2.27
- >=sys-devel/gcc-6
- "
- DEPEND+=" virtual/os-headers "
- RDEPEND+="
- >=net-dns/libidn2-2.3.0
- vanilla? ( !sys-libs/timezone-data )
- "
- PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
-fi
-
-# Ignore tests whitelisted below
-GENTOO_GLIBC_XFAIL_TESTS="${GENTOO_GLIBC_XFAIL_TESTS:-yes}"
-
-# The following tests fail due to the Gentoo build system and are thus
-# executed but ignored:
-XFAIL_TEST_LIST=(
- # 9) Failures of unknown origin
- tst-latepthread
-
- # buggy test, assumes /dev/ and /dev/null on a single filesystem
- # 'mount --bind /dev/null /chroot/dev/null' breaks it.
- # https://sourceware.org/PR25909
- tst-support_descriptors
-
- # Flaky test, known to fail occasionally:
- # https://sourceware.org/PR19329
- # https://bugs.gentoo.org/719674#c12
- tst-stack4
-)
-
-#
-# Small helper functions
-#
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-just_headers() {
- is_crosscompile && use headers-only
-}
-
-alt_prefix() {
- is_crosscompile && echo /usr/${CTARGET}
-}
-
-# This prefix is applicable to CHOST when building against this
-# glibc. It is baked into the library at configure time.
-host_eprefix() {
- is_crosscompile || echo "${EPREFIX}"
-}
-
-# This prefix is applicable to CBUILD when building against this
-# glibc. It determines the destination path at install time.
-build_eprefix() {
- is_crosscompile && echo "${EPREFIX}"
-}
-
-# We need to be able to set alternative headers for compiling for non-native
-# platform. Will also become useful for testing kernel-headers without screwing
-# up the whole system.
-alt_headers() {
- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
-}
-
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS="$(host_eprefix)$(alt_headers)"
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- echo $(alt_prefix)/$(get_libdir)
-}
-alt_usrlibdir() {
- echo $(alt_prefix)/usr/$(get_libdir)
-}
-
-builddir() {
- echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
-}
-
-do_compile_test() {
- local ret save_cflags=${CFLAGS}
- CFLAGS+=" $1"
- shift
-
- pushd "${T}" >/dev/null
-
- rm -f glibc-test*
- printf '%b' "$*" > glibc-test.c
-
- # Most of the time CC is already set, but not in early sanity checks.
- nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}"
- ret=$?
-
- popd >/dev/null
-
- CFLAGS=${save_cflags}
- return ${ret}
-}
-
-do_run_test() {
- local ret
-
- if [[ ${MERGE_TYPE} == "binary" ]] ; then
- # ignore build failures when installing a binary package #324685
- do_compile_test "" "$@" 2>/dev/null || return 0
- else
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- return 0
- fi
- fi
-
- pushd "${T}" >/dev/null
-
- ./glibc-test
- ret=$?
- rm -f glibc-test*
-
- popd >/dev/null
-
- return ${ret}
-}
-
-setup_target_flags() {
- # This largely mucks with compiler flags. None of which should matter
- # when building up just the headers.
- just_headers && return 0
-
- case $(tc-arch) in
- x86)
- # -march needed for #185404 #199334
- # TODO: When creating the first glibc cross-compile, this test will
- # always fail as it does a full link which in turn requires glibc.
- # Probably also applies when changing multilib profile settings (e.g.
- # enabling x86 when the profile was amd64-only previously).
- # We could change main to _start and pass -nostdlib here so that we
- # only test the gcc code compilation. Or we could do a compile and
- # then look for the symbol via scanelf.
- if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- filter-flags '-march=*'
- export CFLAGS="-march=${t} ${CFLAGS}"
- einfo "Auto adding -march=${t} to CFLAGS #185404"
- fi
- ;;
- amd64)
- # -march needed for #185404 #199334
- # TODO: See cross-compile issues listed above for x86.
- [[ ${ABI} == x86 ]] &&
- if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- # Normally the target is x86_64-xxx, so turn that into the -march that
- # gcc actually accepts. #528708
- [[ ${t} == "x86_64" ]] && t="x86-64"
- filter-flags '-march=*'
- # ugly, ugly, ugly. ugly.
- CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}")
- export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
- einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})"
- fi
- ;;
- mips)
- # The mips abi cannot support the GNU style hashes. #233233
- filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
- ;;
- ppc|ppc64)
- # Many arch-specific implementations do not work on ppc with
- # cache-block not equal to 128 bytes. This breaks memset:
- # https://sourceware.org/PR26522
- # https://bugs.gentoo.org/737996
- # Use default -mcpu=. For ppc it means non-multiarch setup.
- filter-flags '-mcpu=*'
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
-
- local cpu
- case ${CTARGET} in
- sparc64-*)
- cpu="sparc64"
- case $(get-flag mcpu) in
- v9)
- # We need to force at least v9a because the base build doesn't
- # work with just v9.
- # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
- append-flags "-Wa,-xarch=v9a"
- ;;
- esac
- ;;
- sparc-*)
- case $(get-flag mcpu) in
- v8|supersparc|hypersparc|leon|leon3)
- cpu="sparcv8"
- ;;
- *)
- cpu="sparcv9"
- ;;
- esac
- ;;
- esac
- [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
- ;;
- esac
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Allow users to explicitly avoid flag sanitization via
- # USE=custom-cflags.
- if ! use custom-cflags; then
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- # Lock glibc at -O2; we want to be conservative here.
- filter-flags '-O?'
- append-flags -O2
- fi
- strip-unsupported-flags
- filter-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
-
- 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
-
- # 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-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
-
- setup_env
-
- if [[ ${PV} == 9999* ]] ; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git"
- EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
- git-r3_src_unpack
- mv patches-git/9999 patches || die
-
- EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
- EGIT_CHECKOUT_DIR=${S}
- git-r3_src_unpack
- else
- unpack ${P}.tar.xz
-
- cd "${WORKDIR}" || die
- unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
- fi
-
- cd "${WORKDIR}" || die
- unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
-}
-
-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() {
- # Glibc does not work with gold (for various reasons) #269274.
- tc-ld-disable-gold
-
- # CXX isnt handled by the multilib system, so if we dont unset here
- # we accumulate crap across abis
- unset CXX
-
- einfo "Configuring glibc for nptl"
-
- if use doc ; then
- export MAKEINFO=makeinfo
- else
- export MAKEINFO=/dev/null
- fi
-
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
-
- # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760
- # To build .S (assembly) files with the same ABI-specific flags
- # upstream currently recommends adding CFLAGS to CC/CXX:
- # https://sourceware.org/PR23273
- # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS
- # and breaks multiarch support. See 659030#c3 for an example.
- # The glibc configure script doesn't properly use LDFLAGS all the time.
- export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}"
- einfo " $(printf '%15s' 'Manual CC:') ${CC}"
-
- # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
- export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}"
-
- if is_crosscompile; then
- # Assume worst-case bootstrap: glibc is buil first time
- # when ${CTARGET}-g++ is not available yet. We avoid
- # building auxiliary programs that require C++: bug #683074
- # It should not affect final result.
- export libc_cv_cxx_link_ok=no
- # The line above has the same effect. We set CXX explicitly
- # to make build logs less confusing.
- export CXX=
- fi
- einfo " $(printf '%15s' 'Manual CXX:') ${CXX}"
-
- # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
- # can't detect them automatically due to ${CHOST} mismatch and fallbacks
- # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
- export NM="$(tc-getNM ${CTARGET})"
- export READELF="$(tc-getREADELF ${CTARGET})"
- einfo " $(printf '%15s' 'Manual NM:') ${NM}"
- einfo " $(printf '%15s' 'Manual READELF:') ${READELF}"
-
- echo
-
- local myconf=()
-
- case ${CTARGET} in
- m68k*)
- # setjmp() is not compatible with stack protection:
- # https://sourceware.org/PR24202
- myconf+=( --enable-stack-protector=no )
- ;;
- *)
- # Use '=strong' instead of '=all' to protect only functions
- # worth protecting from stack smashes.
- # '=all' is also known to have a problem in IFUNC resolution
- # tests: https://sourceware.org/PR25680, bug #712356.
- myconf+=( --enable-stack-protector=$(usex ssp strong no) )
- ;;
- esac
- myconf+=( --enable-stackguard-randomization )
-
- # Keep a whitelist of targets supporing IFUNC. glibc's ./configure
- # is not robust enough to detect proper support:
- # https://bugs.gentoo.org/641216
- # https://sourceware.org/PR22634#c0
- case $(tc-arch ${CTARGET}) in
- # Keep whitelist of targets where autodetection mostly works.
- amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;;
- # Blacklist everywhere else
- *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
- esac
-
- # Enable Intel Control-flow Enforcement Technology on amd64 if requested
- case ${CTARGET} in
- x86_64-*) myconf+=( $(use_enable cet) ) ;;
- *) ;;
- esac
-
- [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
-
- myconf+=( --enable-kernel=${MIN_KERN_VER} )
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. only for the primary ABI on multilib systems
- # 3. Not a crosscompile
- if ! is_crosscompile && use selinux ; then
- if use multilib ; then
- if is_final_abi ; then
- myconf+=( --with-selinux )
- else
- myconf+=( --without-selinux )
- fi
- else
- myconf+=( --with-selinux )
- fi
- else
- myconf+=( --without-selinux )
- fi
-
- # Force a few tests where we always know the answer but
- # configure is incapable of finding it.
- if is_crosscompile ; then
- export \
- libc_cv_c_cleanup=yes \
- libc_cv_forced_unwind=yes
- fi
-
- myconf+=(
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- $(use_with gd)
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- --sysconfdir="$(host_eprefix)/etc"
- --localstatedir="$(host_eprefix)/var"
- --libdir='$(prefix)'/$(get_libdir)
- --mandir='$(prefix)'/share/man
- --infodir='$(prefix)'/share/info
- --libexecdir='$(libdir)'/misc/glibc
- --with-bugurl=https://bugs.gentoo.org/
- --with-pkgversion="$(glibc_banner)"
- $(use_enable crypt)
- $(use_multiarch || echo --disable-multi-arch)
- $(use_enable static-pie)
- $(use_enable systemtap)
- $(use_enable nscd)
-
- # locale data is arch-independent
- # https://bugs.gentoo.org/753740
- libc_cv_complocaledir='${exec_prefix}/lib/locale'
-
- # -march= option tricks build system to infer too
- # high ISA level: https://sourceware.org/PR27318
- libc_cv_include_x86_isa_level=no
-
- ${EXTRA_ECONF}
- )
-
- # We rely on sys-libs/timezone-data for timezone tools normally.
- myconf+=( $(use_enable vanilla timezone-tools) )
-
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
- ac_cv_lib_cap_cap_init=$(usex caps || echo no)
-
- # There is no configure option for this and we need to export it
- # since the glibc build will re-run configure on itself
- export libc_cv_rootsbindir="$(host_eprefix)/sbin"
- export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)"
-
- # We take care of patching our binutils to use both hash styles,
- # and many people like to force gnu hash style only, so disable
- # this overriding check. #347761
- export libc_cv_hashstyle=no
-
- local builddir=$(builddir nptl)
- mkdir -p "${builddir}"
- cd "${builddir}"
- set -- "${S}"/configure "${myconf[@]}"
- echo "$@"
- "$@" || die "failed to configure glibc"
-
- # ia64 static cross-compilers are a pita in so much that they
- # can't produce static ELFs (as the libgcc.a is broken). so
- # disable building of the programs for those targets if it
- # doesn't work.
- # XXX: We could turn this into a compiler test, but ia64 is
- # the only one that matters, so this should be fine for now.
- if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
- sed -i '1i+link-static = touch $@' config.make
- fi
-
- # If we're trying to migrate between ABI sets, we need
- # to lie and use a local copy of gcc. Like if the system
- # is built with MULTILIB_ABIS="amd64 x86" but we want to
- # add x32 to it, gcc/glibc don't yet support x32.
- #
- if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then
- echo 'main(){}' > "${T}"/test.c
- if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
- sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
- fi
- fi
-}
-
-glibc_headers_configure() {
- export ABI=default
-
- local builddir=$(builddir "headers")
- mkdir -p "${builddir}"
- cd "${builddir}"
-
- # if we don't have a compiler yet, we can't really test it now ...
- # hopefully they don't affect header generation, so let's hope for
- # the best here ...
- local v vars=(
- ac_cv_header_cpuid_h=yes
- libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
- libc_cv_asm_cfi_directives=yes
- libc_cv_broken_visibility_attribute=no
- libc_cv_c_cleanup=yes
- libc_cv_compiler_powerpc64le_binary128_ok=yes
- libc_cv_forced_unwind=yes
- libc_cv_gcc___thread=yes
- libc_cv_mlong_double_128=yes
- libc_cv_mlong_double_128ibm=yes
- libc_cv_ppc_machine=yes
- libc_cv_ppc_rel16=yes
- libc_cv_predef_fortify_source=no
- libc_cv_target_power8_ok=yes
- libc_cv_visibility_attribute=yes
- libc_cv_z_combreloc=yes
- libc_cv_z_execstack=yes
- libc_cv_z_initfirst=yes
- libc_cv_z_nodelete=yes
- libc_cv_z_nodlopen=yes
- libc_cv_z_relro=yes
- libc_mips_abi=${ABI}
- libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=no
- ac_cv_lib_cap_cap_init=no
- )
-
- einfo "Forcing cached settings:"
- for v in "${vars[@]}" ; do
- einfo " ${v}"
- export ${v}
- done
-
- local headers_only_arch_CPPFLAGS=()
-
- # Blow away some random CC settings that screw things up. #550192
- if [[ -d ${S}/sysdeps/mips ]]; then
- pushd "${S}"/sysdeps/mips >/dev/null
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
-
- # Force the mips ABI to the default. This is OK because the set of
- # installed headers in this phase is the same between the 3 ABIs.
- # If this ever changes, this hack will break, but that's unlikely
- # as glibc discourages that behavior.
- # https://crbug.com/647033
- sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
-
- popd >/dev/null
- fi
-
- case ${CTARGET} in
- riscv*)
- # RISC-V interrogates the compiler to determine which target to
- # build. If building the headers then we don't strictly need a
- # RISC-V compiler, so the built-in definitions that are provided
- # along with all RISC-V compiler might not exist. This causes
- # glibc's RISC-V preconfigure script to blow up. Since we're just
- # building the headers any value will actually work here, so just
- # pick the standard one (rv64g/lp64d) to make the build scripts
- # happy for now -- the headers are all the same anyway so it
- # doesn't matter.
- headers_only_arch_CPPFLAGS+=(
- -D__riscv_xlen=64
- -D__riscv_flen=64
- -D__riscv_float_abi_double=1
- -D__riscv_atomic=1
- ) ;;
- esac
-
- local myconf=()
- myconf+=(
- --disable-sanity-checks
- --enable-hacker-mode
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(build_eprefix)$(alt_build_headers)
- --prefix="$(host_eprefix)/usr"
- ${EXTRA_ECONF}
- )
-
- # Nothing is compiled here which would affect the headers for the target.
- # So forcing CC/CFLAGS is sane.
- local headers_only_CC=$(tc-getBUILD_CC)
- local headers_only_CFLAGS="-O1 -pipe"
- local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}"
- local headers_only_LDFLAGS=""
- set -- "${S}"/configure "${myconf[@]}"
- echo \
- "CC=${headers_only_CC}" \
- "CFLAGS=${headers_only_CFLAGS}" \
- "CPPFLAGS=${headers_only_CPPFLAGS}" \
- "LDFLAGS=${headers_only_LDFLAGS}" \
- "$@"
- CC=${headers_only_CC} \
- CFLAGS=${headers_only_CFLAGS} \
- CPPFLAGS=${headers_only_CPPFLAGS} \
- LDFLAGS="" \
- "$@" || die "failed to configure glibc"
-}
-
-do_src_configure() {
- if just_headers ; then
- glibc_headers_configure
- else
- glibc_do_configure nptl
- fi
-}
-
-src_configure() {
- foreach_abi do_src_configure
-}
-
-do_src_compile() {
- emake -C "$(builddir nptl)"
-}
-
-src_compile() {
- if just_headers ; then
- return
- fi
-
- foreach_abi do_src_compile
-}
-
-glibc_src_test() {
- cd "$(builddir nptl)"
-
- local myxfailparams=""
- if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
- for myt in ${XFAIL_TEST_LIST[@]} ; do
- myxfailparams+="test-xfail-${myt}=yes "
- done
- fi
-
- # sandbox does not understand unshare() and prevents
- # writes to /proc/, which makes many tests fail
-
- SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check
-}
-
-do_src_test() {
- local ret=0
-
- glibc_src_test
- : $(( ret |= $? ))
-
- return ${ret}
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # Give tests more time to complete.
- export TIMEOUTFACTOR=5
-
- foreach_abi do_src_test || die "tests failed"
-}
-
-run_locale_gen() {
- # 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'll take care of the cache ourselves
- rm -f "${ED}"/etc/ld.so.cache
-
- # Everything past this point just needs to be done once ...
- is_final_abi || return 0
-
- # Make sure the non-native interp can be found on multilib systems even
- # if the main library set isn't installed into the right place. Maybe
- # we should query the active gcc for info instead of hardcoding it ?
- local i ldso_abi ldso_name
- local ldso_abi_list=(
- # x86
- amd64 /lib64/ld-linux-x86-64.so.2
- x32 /libx32/ld-linux-x32.so.2
- x86 /lib/ld-linux.so.2
- # mips
- o32 /lib/ld.so.1
- n32 /lib32/ld.so.1
- n64 /lib64/ld.so.1
- # powerpc
- ppc /lib/ld.so.1
- # riscv
- ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
- ilp32 /lib/ld-linux-riscv32-ilp32.so.1
- lp64d /lib/ld-linux-riscv64-lp64d.so.1
- lp64 /lib/ld-linux-riscv64-lp64.so.1
- # s390
- s390 /lib/ld.so.1
- s390x /lib/ld64.so.1
- # sparc
- sparc32 /lib/ld-linux.so.2
- sparc64 /lib64/ld-linux.so.2
- )
- case $(tc-endian) in
- little)
- ldso_abi_list+=(
- # arm
- arm64 /lib/ld-linux-aarch64.so.1
- # ELFv2 (glibc does not support ELFv1 on LE)
- ppc64 /lib64/ld64.so.2
- )
- ;;
- big)
- ldso_abi_list+=(
- # arm
- arm64 /lib/ld-linux-aarch64_be.so.1
- # ELFv1 (glibc does not support ELFv2 on BE)
- ppc64 /lib64/ld64.so.1
- )
- ;;
- esac
- if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
- dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
- fi
- for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
- ldso_abi=${ldso_abi_list[i]}
- has ${ldso_abi} $(get_install_abis) || continue
-
- ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
- if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
- dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
- fi
- done
-
- # With devpts under Linux mounted properly, we do not need the pt_chown
- # binary to be setuid. This is because the default owners/perms will be
- # exactly what we want.
- if ! use suid ; then
- find "${ED}" -name pt_chown -exec chmod -s {} +
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- # We need to make sure that /lib and /usr/lib always exists.
- # gcc likes to use relative paths to get to its multilibs like
- # /usr/lib/../lib64/. So while we don't install any files into
- # /usr/lib/, we do need it to exist.
- keepdir $(alt_prefix)/lib
- keepdir $(alt_prefix)/usr/lib
-
- dosym usr/include $(alt_prefix)/sys-include
- return 0
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen
- doman *.[0-8]
- insinto /etc
- doins locale.gen
-
- keepdir /usr/lib/locale
-
- cd "${S}"
-
- # Install misc network config files
- insinto /etc
- doins posix/gai.conf nss/nsswitch.conf
-
- # Gentoo-specific
- newins "${FILESDIR}"/host.conf-1 host.conf
-
- if use nscd ; then
- doins nscd/nscd.conf
-
- newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd
-
- local nscd_args=(
- -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
- )
-
- sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
-
- systemd_dounit nscd/nscd.service
- newtmpfiles nscd/nscd.tmpfiles nscd.conf
- fi
-
- echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
- doenvd "${T}"/00glibc
-
- for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
- [[ -s ${d} ]] && dodoc ${d}
- done
- dodoc -r ChangeLog.old
-
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the
- # creation of the "factory" symlink in pkg_postinst().
- rm -f "${ED}"/etc/localtime
-
- # Generate all locales if this is a native build as locale generation
- if use compile-locales && ! is_crosscompile ; then
- 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
-
- local x striptest
- for x in cal date env free ls true uname uptime ; do
- x=$(type -p ${x})
- [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
- case ${striptest} in
- *"statically linked"*) continue;;
- *"ASCII text"*) continue;;
- esac
- # We need to clear the locale settings as the upgrade might want
- # incompatible locale data. This test is not for verifying that.
- LC_ALL=C \
- ./ld-*.so --library-path . ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-
- popd >/dev/null
-}
-
-pkg_preinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- # prepare /etc/ld.so.conf.d/ for files
- mkdir -p "${EROOT}"/etc/ld.so.conf.d
-
- # Default /etc/hosts.conf:multi to on for systems with small dbs.
- if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
- sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
- einfo "Defaulting /etc/host.conf:multi to on"
- fi
-
- [[ -n ${ROOT} ]] && return 0
- [[ -d ${ED}/$(get_libdir) ]] || return 0
- [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
-
- if [[ -L ${EROOT}/usr/lib/locale ]]; then
- # Help portage migrate this to a directory
- # https://bugs.gentoo.org/753740
- rm "${EROOT}"/usr/lib/locale || die
- fi
-}
-
-pkg_postinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/"
- fi
-
- if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
- 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.34.ebuild b/sys-libs/glibc/glibc-2.34-r2.ebuild
index ec8811d086a..dd50e8578a3 100644
--- a/sys-libs/glibc/glibc-2.34.ebuild
+++ b/sys-libs/glibc/glibc-2.34-r2.ebuild
@@ -6,7 +6,10 @@ 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_{7,8,9,10} )
+# We avoid Python 3.10 here _for now_ (it does work!) to avoid circular dependencies
+# on upgrades as people migrate to libxcrypt.
+# https://wiki.gentoo.org/wiki/User:Sam/Portage_help/Circular_dependencies#Python_and_libcrypt
+PYTHON_COMPAT=( python3_{7,8,9} )
TMPFILES_OPTIONAL=1
inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
@@ -20,14 +23,13 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=3
+PATCH_VER=5
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=""
+ 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
@@ -36,7 +38,7 @@ RELEASE_VER=${PV}
GCC_BOOTSTRAP_VER=20201208
-LOCALE_GEN_VER=2.10
+LOCALE_GEN_VER=2.22
GLIBC_SYSTEMD_VER=20210729
@@ -324,6 +326,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
@@ -720,6 +730,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
#
@@ -730,6 +754,7 @@ pkg_pretend() {
# All the checks...
einfo "Checking general environment sanity."
sanity_prechecks
+ upgrade_warning
}
pkg_setup() {
@@ -1194,13 +1219,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}" \
@@ -1516,10 +1541,9 @@ pkg_preinst() {
# Keep around libcrypt so that Perl doesn't break when merging libxcrypt
# (libxcrypt is the new provider for now of libcrypt.so.{1,2}).
# bug #802207
- if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]"; then
+ if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then
PRESERVED_OLD_LIBCRYPT=1
- preserve_old_lib /$(get_libdir)/libcrypt$(get_libname 1)
- cp "${EROOT}"/usr/include/crypt.h "${T}"/crypt.h || die
+ cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" "${T}/libcrypt$(get_libname 1)" || die
else
PRESERVED_OLD_LIBCRYPT=0
fi
@@ -1538,6 +1562,8 @@ 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
@@ -1554,10 +1580,11 @@ pkg_postinst() {
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)
- cp "${T}"/crypt.h "${EROOT}"/usr/include/crypt.h || eerror "Error restoring crypt.h, please file a bug"
+
elog "Please ignore a possible later error message about a file collision involving"
- elog "/usr/include/crypt.h. We need to preserve this file for the moment to keep"
+ 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.33-r6.ebuild b/sys-libs/glibc/glibc-2.34-r3.ebuild
index 53507027d87..7053b85282f 100644
--- a/sys-libs/glibc/glibc-2.33-r6.ebuild
+++ b/sys-libs/glibc/glibc-2.34-r3.ebuild
@@ -3,7 +3,13 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7,8,9,10} )
+# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
+# Please read & adapt the page as necessary if obsolete.
+
+# We avoid Python 3.10 here _for now_ (it does work!) to avoid circular dependencies
+# on upgrades as people migrate to libxcrypt.
+# https://wiki.gentoo.org/wiki/User:Sam/Portage_help/Circular_dependencies#Python_and_libcrypt
+PYTHON_COMPAT=( python3_{7,8,9} )
TMPFILES_OPTIONAL=1
inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
@@ -17,7 +23,7 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=5
+PATCH_VER=6
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -32,18 +38,21 @@ RELEASE_VER=${PV}
GCC_BOOTSTRAP_VER=20201208
-LOCALE_GEN_VER=2.10
+LOCALE_GEN_VER=2.22
-GLIBC_SYSTEMD_VER=20210814
+GLIBC_SYSTEMD_VER=20210729
SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )"
-IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemd systemtap test vanilla"
+IUSE="audit caps cet +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
@@ -97,7 +106,7 @@ fi
BDEPEND="
${PYTHON_DEPS}
- >=app-misc/pax-utils-1.3.1
+ >=app-misc/pax-utils-${MIN_PAX_UTILS_VER}
sys-devel/bison
doc? ( sys-apps/texinfo )
!compile-locales? (
@@ -129,7 +138,7 @@ RDEPEND="${COMMON_DEPEND}
sys-apps/grep
virtual/awk
sys-apps/gentoo-functions
- !<app-misc/pax-utils-1.3.1
+ !<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
!<net-misc/openssh-8.1_p1-r2
"
@@ -317,6 +326,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
@@ -774,6 +791,17 @@ src_prepare() {
einfo "Done."
fi
+ # Apply patch to allow conditional disabling of clone3
+ eapply "${FILESDIR}"/${PN}-2.34-make-clone3-syscall-optional.patch
+
+ if use clone3 ; then
+ append-cppflags -DGENTOO_USE_CLONE3
+ else
+ # See e.g. bug #827386, bug #819045.
+ elog "Disabling the clone3 syscall for compatibility with older Electron apps."
+ elog "Please re-enable this flag before filing bugs!"
+ fi
+
default
gnuconfig_update
@@ -1187,13 +1215,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}" \
@@ -1458,6 +1486,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 . -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})
@@ -1470,7 +1504,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
@@ -1503,10 +1537,9 @@ pkg_preinst() {
# Keep around libcrypt so that Perl doesn't break when merging libxcrypt
# (libxcrypt is the new provider for now of libcrypt.so.{1,2}).
# bug #802207
- if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]"; then
+ if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then
PRESERVED_OLD_LIBCRYPT=1
- preserve_old_lib /$(get_libdir)/libcrypt$(get_libname 1)
- cp "${EROOT}"/usr/include/crypt.h "${T}"/crypt.h || die
+ cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" "${T}/libcrypt$(get_libname 1)" || die
else
PRESERVED_OLD_LIBCRYPT=0
fi
@@ -1525,6 +1558,12 @@ pkg_postinst() {
use compile-locales || run_locale_gen "${EROOT}/"
fi
+ if systemd_is_booted && [[ -z ${ROOT} ]] ; then
+ # We need to restart systemd when upgrading from < 2.34
+ # bug #823756
+ systemctl daemon-reexec
+ 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
@@ -1541,10 +1580,11 @@ pkg_postinst() {
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)
- cp "${T}"/crypt.h "${EROOT}"/usr/include/crypt.h || eerror "Error restoring crypt.h, please file a bug"
+
elog "Please ignore a possible later error message about a file collision involving"
- elog "/usr/include/crypt.h. We need to preserve this file for the moment to keep"
+ 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 459c54eacc9..ea87ec9994c 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -6,7 +6,10 @@ 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_{7,8,9,10} )
+# We avoid Python 3.10 here _for now_ (it does work!) to avoid circular dependencies
+# on upgrades as people migrate to libxcrypt.
+# https://wiki.gentoo.org/wiki/User:Sam/Portage_help/Circular_dependencies#Python_and_libcrypt
+PYTHON_COMPAT=( python3_{7,8,9} )
TMPFILES_OPTIONAL=1
inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
@@ -36,7 +39,7 @@ RELEASE_VER=${PV}
GCC_BOOTSTRAP_VER=20201208
-LOCALE_GEN_VER=2.10
+LOCALE_GEN_VER=2.22
GLIBC_SYSTEMD_VER=20210729
@@ -44,7 +47,7 @@ SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${L
SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )"
-IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemd systemtap test vanilla"
+IUSE="audit caps cet +clone3 compile-locales +crypt custom-cflags doc 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"
@@ -398,6 +401,7 @@ setup_flags() {
filter-flags '-O?'
append-flags -O2
fi
+
strip-unsupported-flags
filter-flags -m32 -m64 '-mabi=*'
@@ -512,14 +516,103 @@ 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 to the value at start of emerge
+ export CC=${__ORIG_CC:-${CC}}
+
+ 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 __ORIG_CC=${CC}
+
+ 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 __ORIG_CC=${CC}
+
+ 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} ${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}"
+
+ 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() {
@@ -781,6 +874,14 @@ src_prepare() {
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
@@ -801,61 +902,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
@@ -1194,13 +1247,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}" \
@@ -1516,10 +1569,9 @@ pkg_preinst() {
# Keep around libcrypt so that Perl doesn't break when merging libxcrypt
# (libxcrypt is the new provider for now of libcrypt.so.{1,2}).
# bug #802207
- if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]"; then
+ if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then
PRESERVED_OLD_LIBCRYPT=1
- preserve_old_lib /$(get_libdir)/libcrypt$(get_libname 1)
- cp "${EROOT}"/usr/include/crypt.h "${T}"/crypt.h || die
+ cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" "${T}/libcrypt$(get_libname 1)" || die
else
PRESERVED_OLD_LIBCRYPT=0
fi
@@ -1538,6 +1590,12 @@ pkg_postinst() {
use compile-locales || run_locale_gen "${EROOT}/"
fi
+ if systemd_is_booted && [[ -z ${ROOT} ]] ; then
+ # We need to restart systemd when upgrading from < 2.34
+ # bug #823756
+ systemctl daemon-reexec
+ 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
@@ -1554,10 +1612,11 @@ pkg_postinst() {
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)
- cp "${T}"/crypt.h "${EROOT}"/usr/include/crypt.h || eerror "Error restoring crypt.h, please file a bug"
+
elog "Please ignore a possible later error message about a file collision involving"
- elog "/usr/include/crypt.h. We need to preserve this file for the moment to keep"
+ 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 a87c547c6a0..613e58eff7e 100644
--- a/sys-libs/glibc/metadata.xml
+++ b/sys-libs/glibc/metadata.xml
@@ -7,6 +7,7 @@
</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>
diff --git a/sys-libs/kpmcore/Manifest b/sys-libs/kpmcore/Manifest
index 97a2a5f8fbd..12405a5fdae 100644
--- a/sys-libs/kpmcore/Manifest
+++ b/sys-libs/kpmcore/Manifest
@@ -1,2 +1,2 @@
-DIST kpmcore-21.04.3.tar.xz 586264 BLAKE2B b9733f8b941fed98503e78b9c0357e002df92a39c4e70885822f6bb8944cf2c76be1fbba23e4cedf104b46a95832e72d2384c0d78abde312e0b2be40aa4d5745 SHA512 44614e3a0db646b81e56b87daa841b7b7e03ff97699ea393d83b6cc61e6c12efa36ac6b8aba87da612f2973a1d108bdad21ef0d73fc2db98595e5b711e5a0fcf
-DIST kpmcore-21.08.2.tar.xz 589404 BLAKE2B 759d733a06daf9d701cb7a6c96ffe6a8d530156a4d5347addc5a36ef946bca28344468661b68e2b652783e779d3f65ce4ed416b6c0e5758861782e79e90c6587 SHA512 923eff5e3f9489f3c7f5d5943ecb739dbfc71d61b7e29e55df0aef3425af5fc84ac61d973678fff378c37084739d222d4140b1c9863e8c6bc3b44d753a8f66da
+DIST kpmcore-21.08.3.tar.xz 589464 BLAKE2B 188a702b21976c352bea49c3e40e86c6d3f85b398c3dc9577301471c49cbbf8f161a5f6b62acfc020bcd9530aab2739a39023170c7586a1f18e52add4b2d6ecd SHA512 16570fe9b5e4e83d26b1c2e591d797cd23f37a2195ac5f043ee921d038d0e10d63f9d2c72c4d710e10eeb05d81a6df577f9ddb48b762b034154e399560daa7a7
+DIST kpmcore-21.11.90.tar.xz 594208 BLAKE2B 972ec50bf2deb8d9c987cc1902d3b744a668010e2f081a27307349ecae0629a2a7e75844450df6b2f2be584d2c47eeeeffcabff8a65b5730dfef0140ddc28f4d SHA512 c975c0221b711976551a1f9457329da5c52dd2ba8e582ef0e92be0f8bb1fe51c92df875044c1f8c6ed55b7e8c008215bf43cb9b98486dbc11b17acd58e15dbdf
diff --git a/sys-libs/kpmcore/files/kpmcore-21.08.3-dont-destroy-zfs-pool.patch b/sys-libs/kpmcore/files/kpmcore-21.08.3-dont-destroy-zfs-pool.patch
new file mode 100644
index 00000000000..83cc15d0f2d
--- /dev/null
+++ b/sys-libs/kpmcore/files/kpmcore-21.08.3-dont-destroy-zfs-pool.patch
@@ -0,0 +1,46 @@
+From 282cfdcde179ec44d053b257e13aa715158596bd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= <andrius@stikonas.eu>
+Date: Sat, 30 Oct 2021 21:13:07 +0100
+Subject: [PATCH] Do not destroy zfs pool when removing zfs partition.
+
+This can be dangerous, e.g. if partition is part of raid set.
+So better be more cautious and in some cases fail to remove partition
+than lose data.
+---
+ src/fs/zfs.cpp | 7 -------
+ src/fs/zfs.h | 1 -
+ 2 files changed, 8 deletions(-)
+
+diff --git a/src/fs/zfs.cpp b/src/fs/zfs.cpp
+index 5d12894..5f4c87d 100644
+--- a/src/fs/zfs.cpp
++++ b/src/fs/zfs.cpp
+@@ -77,13 +77,6 @@ qint64 zfs::maxCapacity() const
+ return Capacity::unitFactor(Capacity::Unit::Byte, Capacity::Unit::EiB);
+ }
+
+-bool zfs::remove(Report& report, const QString& deviceNode) const
+-{
+- Q_UNUSED(deviceNode)
+- ExternalCommand cmd(report, QStringLiteral("zpool"), { QStringLiteral("destroy"), QStringLiteral("-f"), label() });
+- return cmd.run(-1) && cmd.exitCode() == 0;
+-}
+-
+ bool zfs::writeLabel(Report& report, const QString& deviceNode, const QString& newLabel)
+ {
+ Q_UNUSED(deviceNode)
+diff --git a/src/fs/zfs.h b/src/fs/zfs.h
+index 6e559de..61026c3 100644
+--- a/src/fs/zfs.h
++++ b/src/fs/zfs.h
+@@ -35,7 +35,6 @@ public:
+ public:
+ void init() override;
+
+- bool remove(Report& report, const QString& deviceNode) const override;
+ bool writeLabel(Report& report, const QString& deviceNode, const QString& newLabel) override;
+
+ CommandSupportType supportGetUsed() const override {
+--
+GitLab
+
diff --git a/sys-libs/kpmcore/files/kpmcore-21.08.3-fix-seek-error-when-shred-partition.patch b/sys-libs/kpmcore/files/kpmcore-21.08.3-fix-seek-error-when-shred-partition.patch
new file mode 100644
index 00000000000..568db790c7e
--- /dev/null
+++ b/sys-libs/kpmcore/files/kpmcore-21.08.3-fix-seek-error-when-shred-partition.patch
@@ -0,0 +1,27 @@
+From e9fc875c5e233401afd12f54ab0472c66ff6fdff Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= <andrius@stikonas.eu>
+Date: Fri, 12 Nov 2021 01:02:15 +0000
+Subject: [PATCH] Fix seek error when filling device with random data or
+ zeroes.
+
+---
+ src/util/externalcommandhelper.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/util/externalcommandhelper.cpp b/src/util/externalcommandhelper.cpp
+index 6e61aba..0fa400d 100644
+--- a/src/util/externalcommandhelper.cpp
++++ b/src/util/externalcommandhelper.cpp
+@@ -80,7 +80,8 @@ bool ExternalCommandHelper::readData(const QString& sourceDevice, QByteArray& bu
+ return false;
+ }
+
+- if (!device.seek(offset)) {
++ // Sequential devices such as /dev/zero or /dev/urandom return false on seek().
++ if (!device.isSequential() && !device.seek(offset)) {
+ qCritical() << xi18n("Could not seek position %1 on device <filename>%2</filename>.", offset, sourceDevice);
+ return false;
+ }
+--
+GitLab
+
diff --git a/sys-libs/kpmcore/kpmcore-21.04.3.ebuild b/sys-libs/kpmcore/kpmcore-21.08.3-r1.ebuild
index 89b01d630c8..dbf7c293053 100644
--- a/sys-libs/kpmcore/kpmcore-21.04.3.ebuild
+++ b/sys-libs/kpmcore/kpmcore-21.08.3-r1.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
ECM_NONGUI="true"
KDE_GEAR="true"
-KFMIN=5.80.0
+KFMIN=5.84.0
QTMIN=5.15.2
inherit ecm kde.org
@@ -18,9 +18,8 @@ KEYWORDS="amd64 ~arm arm64 ~ppc64 x86"
IUSE=""
# bug 689468, tests need polkit etc.
-RESTRICT+=" test"
+RESTRICT="test"
-BDEPEND="virtual/pkgconfig"
DEPEND="
>=dev-qt/qtdbus-${QTMIN}:5
>=dev-qt/qtgui-${QTMIN}:5
@@ -32,3 +31,9 @@ DEPEND="
sys-auth/polkit-qt
"
RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-dont-destroy-zfs-pool.patch"
+ "${FILESDIR}/${P}-fix-seek-error-when-shred-partition.patch"
+)
diff --git a/sys-libs/kpmcore/kpmcore-21.08.2.ebuild b/sys-libs/kpmcore/kpmcore-21.11.90.ebuild
index ba39ac6ae27..9cf2587af68 100644
--- a/sys-libs/kpmcore/kpmcore-21.08.2.ebuild
+++ b/sys-libs/kpmcore/kpmcore-21.11.90.ebuild
@@ -5,7 +5,7 @@ EAPI=8
ECM_NONGUI="true"
KDE_GEAR="true"
-KFMIN=5.84.0
+KFMIN=5.88.0
QTMIN=5.15.2
inherit ecm kde.org
diff --git a/sys-libs/ldb/Manifest b/sys-libs/ldb/Manifest
index cf1e2cac4fc..237908b8179 100644
--- a/sys-libs/ldb/Manifest
+++ b/sys-libs/ldb/Manifest
@@ -1,3 +1,4 @@
-DIST ldb-2.2.1.tar.gz 1676819 BLAKE2B 794575d5bd7d33dcd586cb5de6c392411795c467f472f517d5182a2559698a5489e703c8360baf2d0b1bff080c943a403a666d0ef7a9a180ae90052055966f40 SHA512 a2b1598869e3d9f17c5b82fc2b7289f1f08a7378a1d72609af5ed5cc91fb571ac67d3a8c22d64dad5dcc9fe32520baccd5cc37d5b4fc5f1b00a7064902296344
-DIST ldb-2.3.0.tar.gz 1686378 BLAKE2B b31949e14a41f6fc99ef022e4072021d135037d835aeca80ee81a58ed20cab4f8cbd96e394f59460df11e2424e2e263d5fb01b9cebbfb4ca1bcc77162e93ed3f SHA512 7e389c0b4700a809893276d69216436ebd6d30e1f52407e4a08a1113cf14e151aed74300d8c36765c91c8f3195d8054b13a28cbdfcab031f88fd1d353e415348
+DIST ldb-2.3.1.tar.gz 1718379 BLAKE2B e2aa196e6e09846be2a631d81bf0b94c0cd80984ac124757888889717efdf78caf5501c4278ace33dcc2a6fb92a4a2f224b20ea9f3bf3fa5c7333f9994dcbdc1 SHA512 d87f3839481c3ac3f5ce5e2b5bb766451fe39681bff9c53747d45e2cdcef9f1eb91c0a7d6a9c202c4d01097600d66ca431a175f4fc28a126ad987b9783cb87bc
+DIST ldb-2.3.2.tar.gz 1718583 BLAKE2B 48b9fb77e414af0f9fffe0cda9cf49971d79ed8b66213b01b73f53a61969e03f9e6426a04a33ff70da906c814470d8fa356902a68aa1169d969cc597e8c234d7 SHA512 be324e8f20db50529634548451dbc5f95f26a701e124bfb40ae2b0a5069de78b7c5c1a66222097209ea24ef6077373d996e67c00257a5a05198f1b81bf0ed53e
DIST ldb-2.4.0.tar.gz 1689484 BLAKE2B 904d74900011ce3f63ad1c24fe88b1a090e835c68829ddfda5e8af2c0ab3674d7a8cd9a62b95c1f38f26578d0704556d3562e46e21a54cbb44a15b9d83676521 SHA512 6c500b723c081488bc0717b6a5b0e8966c5d8a751232f8856281a6fe4d358ae6b5878c8400a82fa666379066105fbb9259b2967313e73efabef0e1386095e2ee
+DIST ldb-2.4.1.tar.gz 1719769 BLAKE2B 868d3dcc51bd8272d99f2335ed1af2e37506b6a175254f1aca37f758488ba0997e37419a7d8c81def77698128307df97de26d4807ac78c34088f7a623f8d9e68 SHA512 14ab5397d28c369142b2ccf55a2ab4e678a3fe6e018541cfce46241f8226400bc169360bbef254fae4410a6e15024ae986f02298d3d324e3d3a8b88801bf76d7
diff --git a/sys-libs/ldb/ldb-2.3.0-r1.ebuild b/sys-libs/ldb/ldb-2.3.1.ebuild
index 31a2105b4c3..b6e69d0d529 100644
--- a/sys-libs/ldb/ldb-2.3.0-r1.ebuild
+++ b/sys-libs/ldb/ldb-2.3.1.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..9} )
PYTHON_REQ_USE="threads(+)"
inherit python-single-r1 waf-utils multilib-minimal
@@ -37,7 +37,9 @@ RDEPEND="
sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
)
"
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+ virtual/libcrypt
+"
BDEPEND="${PYTHON_DEPS}
dev-libs/libxslt
virtual/pkgconfig
diff --git a/sys-libs/ldb/ldb-2.2.1-r1.ebuild b/sys-libs/ldb/ldb-2.3.2.ebuild
index 197d720205b..b6e69d0d529 100644
--- a/sys-libs/ldb/ldb-2.2.1-r1.ebuild
+++ b/sys-libs/ldb/ldb-2.3.2.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..9} )
PYTHON_REQ_USE="threads(+)"
inherit python-single-r1 waf-utils multilib-minimal
@@ -13,7 +13,7 @@ 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"
+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}
@@ -25,7 +25,7 @@ RDEPEND="
!elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] )
dev-libs/popt[${MULTILIB_USEDEP}]
>=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
- >=sys-libs/talloc-2.3.1[${MULTILIB_USEDEP}]
+ >=sys-libs/talloc-2.3.2[${MULTILIB_USEDEP}]
>=sys-libs/tdb-1.4.3[${MULTILIB_USEDEP}]
>=sys-libs/tevent-0.10.2[${MULTILIB_USEDEP}]
ldap? ( net-nds/openldap )
@@ -37,7 +37,9 @@ RDEPEND="
sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
)
"
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+ virtual/libcrypt
+"
BDEPEND="${PYTHON_DEPS}
dev-libs/libxslt
virtual/pkgconfig
diff --git a/sys-libs/ldb/ldb-2.4.0-r1.ebuild b/sys-libs/ldb/ldb-2.4.0-r1.ebuild
index e2702089890..e11b7972d4a 100644
--- a/sys-libs/ldb/ldb-2.4.0-r1.ebuild
+++ b/sys-libs/ldb/ldb-2.4.0-r1.ebuild
@@ -37,7 +37,9 @@ RDEPEND="
sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
)
"
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+ virtual/libcrypt
+"
BDEPEND="${PYTHON_DEPS}
dev-libs/libxslt
virtual/pkgconfig
diff --git a/sys-libs/ldb/ldb-2.4.1.ebuild b/sys-libs/ldb/ldb-2.4.1.ebuild
new file mode 100644
index 00000000000..36aa67609f5
--- /dev/null
+++ b/sys-libs/ldb/ldb-2.4.1.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE="threads(+)"
+inherit python-single-r1 waf-utils multilib-minimal
+
+DESCRIPTION="LDAP-like embedded database"
+HOMEPAGE="https://ldb.samba.org"
+SRC_URI="https://samba.org/ftp/pub/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="doc ldap +lmdb python test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ test? ( python )"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] )
+ dev-libs/popt[${MULTILIB_USEDEP}]
+ >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
+ >=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}]
+ >=sys-libs/tdb-1.4.4[${MULTILIB_USEDEP}]
+ >=sys-libs/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="${RDEPEND}
+ virtual/libcrypt
+"
+BDEPEND="${PYTHON_DEPS}
+ dev-libs/libxslt
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+WAF_BINARY="${S}/buildtools/bin/waf"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.2-optional_packages.patch
+ "${FILESDIR}"/${PN}-1.1.31-fix_PKGCONFIGDIR-when-python-disabled.patch
+)
+
+pkg_setup() {
+ # Package fails to build with distcc
+ export DISTCC_DISABLE=1
+
+ # waf requires a python interpreter
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myconf=(
+ $(usex ldap '' --disable-ldap)
+ $(usex lmdb '' --without-ldb-lmdb)
+ --disable-rpath
+ --disable-rpath-install --bundled-libraries=NONE
+ --with-modulesdir="${EPREFIX}"/usr/$(get_libdir)/samba
+ --builtin-libraries=NONE
+ )
+ if ! multilib_is_native_abi; then
+ myconf+=( --disable-python )
+ else
+ use python || myconf+=( --disable-python )
+ fi
+ waf-utils_src_configure "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ waf-utils_src_compile
+ multilib_is_native_abi && use doc && doxygen Doxyfile
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi; then
+ WAF_MAKE=1 \
+ PATH=buildtools/bin:../../../buildtools/bin:$PATH:"${BUILD_DIR}"/bin/shared/private/ \
+ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"${BUILD_DIR}"/bin/shared/private/:"${BUILD_DIR}"/bin/shared \
+ waf test || die
+ fi
+}
+
+multilib_src_install() {
+ waf-utils_src_install
+
+ if multilib_is_native_abi && use doc; then
+ doman apidocs/man/man3/*.3
+ docinto html
+ dodoc -r apidocs/html/.
+ fi
+
+ use python && python_optimize #726454
+}
+
+pkg_postinst() {
+ if has_version sys-auth/sssd; then
+ ewarn "You have sssd installed. It is known to break after ldb upgrades,"
+ ewarn "so please try to rebuild it before reporting bugs."
+ ewarn "See https://bugs.gentoo.org/404281"
+ fi
+}
diff --git a/sys-libs/libapparmor/Manifest b/sys-libs/libapparmor/Manifest
index 38571173391..76c9ff7d636 100644
--- a/sys-libs/libapparmor/Manifest
+++ b/sys-libs/libapparmor/Manifest
@@ -1 +1,2 @@
DIST apparmor-3.0.1.tar.gz 7785713 BLAKE2B c530d159a4139de8e59d9d975af866259b56d555e3abe2d1e2a6bfd2db57d8371d643bb93f1cd6ca96172960c09a74cc05c82d34a2e253c4c1f6ecce747f4129 SHA512 e1073e7b2cde7cc4cefcfddce8fa5069845b5873c260b9fbd4bea2ff801708101d813ff30e23a64da36f3c6394cd9339e01a170e9add69deef2d70ecd9ed9687
+DIST apparmor-3.0.3.tar.gz 7790012 BLAKE2B aada9c32c2cde4a110cbd1d626ec00b08e29e76182185752e5c23e2ec0c2668a732ffdf1eb1660bd8bc294188ccf0da42b4282939f5969a6aed39084be00769c SHA512 bbf26377e60da60dab56473ee5af15aa0f3fdf2f2a61dbfcdeba12a925afda3bc6a0f6cc31e07927400425b8c3b3649833f448d8674044c7274ef06923ab48b5
diff --git a/sys-libs/libapparmor/libapparmor-3.0.3.ebuild b/sys-libs/libapparmor/libapparmor-3.0.3.ebuild
new file mode 100644
index 00000000000..e35b3da8a32
--- /dev/null
+++ b/sys-libs/libapparmor/libapparmor-3.0.3.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python3_{7,8,9} )
+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 ~x86"
+IUSE="doc +perl +python static-libs"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/autoconf-archive
+ sys-devel/bison
+ sys-devel/flex
+ doc? ( dev-lang/perl )
+ perl? ( dev-lang/swig )
+ python? ( dev-lang/swig )"
+
+S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
+
+# depends on the package already being installed
+RESTRICT="test"
+
+src_prepare() {
+ rm -r m4 || die "failed to remove bundled macros"
+ default
+ eautoreconf
+ use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+ 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
+ distutils-r1_src_install
+
+ python_moduleinto LibAppArmor
+ python_foreach_impl python_domodule LibAppArmor.py
+ popd > /dev/null
+ fi
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild b/sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild
index 2bd1328cadf..ecc3bbed45e 100644
--- a/sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild
+++ b/sys-libs/libavc1394/libavc1394-0.5.4-r2.ebuild
@@ -3,7 +3,7 @@
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/"
@@ -14,10 +14,14 @@ SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~ia64 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/libblockdev/libblockdev-2.26.ebuild b/sys-libs/libblockdev/libblockdev-2.26.ebuild
index 7a897bf9254..0682b4b778e 100644
--- a/sys-libs/libblockdev/libblockdev-2.26.ebuild
+++ b/sys-libs/libblockdev/libblockdev-2.26.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{7..10} )
inherit autotools python-single-r1 xdg-utils
DESCRIPTION="A library for manipulating block devices"
@@ -25,7 +25,9 @@ fi
LICENSE="LGPL-2+"
SLOT="0"
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
@@ -107,6 +109,13 @@ src_configure() {
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
diff --git a/sys-libs/libblockdev/libblockdev-9999.ebuild b/sys-libs/libblockdev/libblockdev-9999.ebuild
index 7a897bf9254..0682b4b778e 100644
--- a/sys-libs/libblockdev/libblockdev-9999.ebuild
+++ b/sys-libs/libblockdev/libblockdev-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{7..10} )
inherit autotools python-single-r1 xdg-utils
DESCRIPTION="A library for manipulating block devices"
@@ -25,7 +25,9 @@ fi
LICENSE="LGPL-2+"
SLOT="0"
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
@@ -107,6 +109,13 @@ src_configure() {
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
diff --git a/sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild b/sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild
index e8d8ab36eea..f79095d5582 100644
--- a/sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild
+++ b/sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit autotools flag-o-matic python-r1
diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest
index a4d5b5187a4..b783ac2f611 100644
--- a/sys-libs/libcap/Manifest
+++ b/sys-libs/libcap/Manifest
@@ -1,4 +1,2 @@
DIST libcap-2.49.tar.xz 139568 BLAKE2B 5746dcdf2a737e747450bd50a701ee8543277b17b7fbf1304b79f707a088ea74dc6dc79c61ff89b55b718a460a7b0814f960f44d07944a97b832b78f4e14e07f SHA512 2934a2ded1370edeb9603dbf43d8ca23a2eb5d67efc5cec5d4ba96c707a8db2702da8aa9be0cb86c5ff100d37ec96115c7777a7566ad0ab2e0b4a288bbe357d0
-DIST libcap-2.57.tar.xz 167740 BLAKE2B e0c004f3d11caf824d907315e6102707bb34c0ef3e9d430f23c191d711f073267ef6dc44463e2ce8041b8d13658b0c20560f7f3c6387f770ff9e66b81ff9f5d3 SHA512 5c70b3c6a1248ca0de92538614f0d0d516d72f6f25b135c92738c377b67533662e6fd6b0b61cb051ec99f406387d3334fcc7ddb54789626e4c387bcf46ebffbf
-DIST libcap-2.58.tar.xz 168520 BLAKE2B 9f160c08e7e8bcb9eb49ab6a7a0805145461613a946ccfebeadc269b26331eadc9f467437b2f5b022e9a545b034ea4fd8fed4d5893e84d9a48dd85318810b974 SHA512 092e45f82113293e1c2db7e51dca7298496c2a3af08eb41107e8c2b4798c25d3c9059e152181dc048b232fe0e59c4c3beaa158da2e5798cd6e1013d85226a9cf
-DIST libcap-2.59.tar.xz 168404 BLAKE2B 5db562b389f2c4034b5fa840a14f7fd7ada49470fea8d13828b2c302a7d768831a6215593d21938b8e1d5bd65fa0581628809526fa5f6091ca4eac5e884cd38c SHA512 296c11259e1b4d577b3527ab5e2160be3f94a2bee7d63d1b7feadc603f7e160b72f8c8ede34dec269f5eb7595304ff290693803be778bdbbe088de0e99a33812
+DIST libcap-2.61.tar.xz 173892 BLAKE2B 50874d3510ab2476aaceb775314d98744736aacd7364a23827756caa160c101e8bc890b7c33b5e19df8b30bb6b3b1c2be323e4b6a963f97e9ee557e86b4f13a0 SHA512 40096bf511d1c45e36f5d7f24e49c709528f3f01fcadd47b6ac40a7e8d5f1705b29b4cc56356b030639f67d0641b9f4e7c19449c3c7f4f77a4070c35745b465c
diff --git a/sys-libs/libcap/files/libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch b/sys-libs/libcap/files/libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch
index 0f737361a4d..e5455cd1ebb 100644
--- a/sys-libs/libcap/files/libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch
+++ b/sys-libs/libcap/files/libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch
@@ -11,12 +11,6 @@ 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
@@ -28,6 +22,3 @@ index c094a24..4a6db38 100644
endif
clean:
---
-2.7.1
-
diff --git a/sys-libs/libcap/files/libcap-2.38-no_perl.patch b/sys-libs/libcap/files/libcap-2.38-no_perl.patch
index f3e0c468c86..9104484d577 100644
--- a/sys-libs/libcap/files/libcap-2.38-no_perl.patch
+++ b/sys-libs/libcap/files/libcap-2.38-no_perl.patch
@@ -14,12 +14,6 @@ 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)
@@ -66,6 +60,3 @@ index 3d6463d..df2526c 100644
$(STACAPLIBNAME): $(CAPOBJS)
$(AR) rcs $@ $^
---
-2.27.0
-
diff --git a/sys-libs/libcap/files/libcap-2.48-build-system-fixes.patch b/sys-libs/libcap/files/libcap-2.48-build-system-fixes.patch
index a672ecedaca..b3986e19546 100644
--- a/sys-libs/libcap/files/libcap-2.48-build-system-fixes.patch
+++ b/sys-libs/libcap/files/libcap-2.48-build-system-fixes.patch
@@ -27,17 +27,6 @@ Forward ported from libcap-2.44 to libcap-2.45
Forward ported from libcap-2.45 to libcap-2.48
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- Make.Rules | 10 ++++++----
- Makefile | 1 -
- libcap/Makefile | 7 ++++---
- pam_cap/Makefile | 8 +++++---
- progs/Makefile | 2 +-
- tests/Makefile | 6 ++++--
- 6 files changed, 20 insertions(+), 14 deletions(-)
-
-diff --git a/Make.Rules b/Make.Rules
-index ded9014..07b716f 100644
--- a/Make.Rules
+++ b/Make.Rules
@@ -52,7 +52,6 @@ GOMAJOR=0
@@ -73,8 +62,6 @@ index ded9014..07b716f 100644
INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
# SHARED tracks whether or not the SHARED libraries (libcap.so,
-diff --git a/Makefile b/Makefile
-index 7150b9b..9dff1e9 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,6 @@ ifeq ($(GOLANG),yes)
@@ -85,8 +72,6 @@ index 7150b9b..9dff1e9 100644
$(MAKE) -C progs $@
$(MAKE) -C doc $@
$(MAKE) -C kdebug $@
-diff --git a/libcap/Makefile b/libcap/Makefile
-index 9563d88..4b42f01 100644
--- a/libcap/Makefile
+++ b/libcap/Makefile
@@ -25,6 +25,7 @@ MINCAPLIBNAME=$(MAJCAPLIBNAME).$(MINOR)
@@ -119,8 +104,6 @@ index 9563d88..4b42f01 100644
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 @@
@@ -152,8 +135,6 @@ index 56604fd..2da4674 100644
test: pam_cap.so
make testlink
-diff --git a/progs/Makefile b/progs/Makefile
-index 1d7fc7a..64dbe86 100644
--- a/progs/Makefile
+++ b/progs/Makefile
@@ -28,7 +28,7 @@ $(BUILD): %: %.o $(DEPS)
@@ -165,8 +146,6 @@ index 1d7fc7a..64dbe86 100644
install: all
mkdir -p -m 0755 $(FAKEROOT)$(SBINDIR)
-diff --git a/tests/Makefile b/tests/Makefile
-index 1e7039d..5874624 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -13,6 +13,8 @@ ifeq ($(PTHREADS),yes)
@@ -194,6 +173,3 @@ index 1e7039d..5874624 100644
# privileged
run_libcap_launch_test: libcap_launch_test noop ../progs/tcapsh-static
---
-2.30.0
-
diff --git a/sys-libs/libcap/files/libcap-2.57-parallel-make.patch b/sys-libs/libcap/files/libcap-2.57-parallel-make.patch
deleted file mode 100644
index 612044bcfb0..00000000000
--- a/sys-libs/libcap/files/libcap-2.57-parallel-make.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-https://git.kernel.org/pub/scm/libs/libcap/libcap.git/patch/?id=893c134ca5cd6fc33ac19d8dbb9d985067d2e66b
-
-From: "Andrew G. Morgan" <morgan@kernel.org>
-Date: Fri, 10 Sep 2021 16:11:57 -0700
-Subject: Another missing dependency for make -j13
-
-One more missing dependency for pam_cap.so building.
-
-Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
---- a/pam_cap/Makefile
-+++ b/pam_cap/Makefile
-@@ -19,7 +19,11 @@ install: all
- execable.o: execable.c ../libcap/execable.h ../libcap/loader.txt
- $(CC) $(CFLAGS) $(CPPFLAGS) -DLIBCAP_VERSION=\"libcap-$(VERSION).$(MINOR)\" -DSHARED_LOADER=\"$(shell cat ../libcap/loader.txt)\" -c execable.c -o $@
-
--pam_cap.so: pam_cap.o execable.o pam_cap_linkopts
-+LIBCAP:
-+ $(MAKE) -C ../libcap all
-+ touch $@
-+
-+pam_cap.so: pam_cap.o execable.o pam_cap_linkopts LIBCAP
- cat pam_cap_linkopts | xargs -e $(LD) $(LDFLAGS) -o $@ pam_cap.o execable.o $(LIBCAPLIB)
-
- # Some distributions force link everything at compile time, and don't
-@@ -83,3 +87,4 @@ sudotest: test_pam_cap
-
- clean:
- rm -f *.o *.so testlink lazylink.so test_pam_cap pam_cap_linkopts *~
-+ rm -f LIBCAP
diff --git a/sys-libs/libcap/files/libcap-2.61-Wformat.patch b/sys-libs/libcap/files/libcap-2.61-Wformat.patch
new file mode 100644
index 00000000000..e0046de5877
--- /dev/null
+++ b/sys-libs/libcap/files/libcap-2.61-Wformat.patch
@@ -0,0 +1,25 @@
+From 9fd3e7ac5870f84c73ac777d9a14480227ad7f00 Mon Sep 17 00:00:00 2001
+From: David Seifert <soap@gentoo.org>
+Date: Sun, 28 Nov 2021 14:14:42 +0100
+Subject: [PATCH] Fix `-Wformat` on 32-bit platforms
+
+---
+ libcap/cap_test.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcap/cap_test.c b/libcap/cap_test.c
+index b7fb2c5..39df261 100644
+--- a/libcap/cap_test.c
++++ b/libcap/cap_test.c
+@@ -124,7 +124,7 @@ static int test_short_bits(void)
+ }
+ if (strlen(tmp) > __CAP_NAME_SIZE) {
+ printf("cap_to_text buffer size reservation needs fixing (%ld > %d)\n",
+- strlen(tmp), __CAP_NAME_SIZE);
++ (long int)strlen(tmp), __CAP_NAME_SIZE);
+ result = -1;
+ }
+ free(tmp);
+--
+2.34.1
+
diff --git a/sys-libs/libcap/files/libcap-2.61-ignore-RAISE_SETFCAP-install-failures.patch b/sys-libs/libcap/files/libcap-2.61-ignore-RAISE_SETFCAP-install-failures.patch
new file mode 100644
index 00000000000..25f853b2a98
--- /dev/null
+++ b/sys-libs/libcap/files/libcap-2.61-ignore-RAISE_SETFCAP-install-failures.patch
@@ -0,0 +1,24 @@
+From 8dfcdcfdcb9c462a05566aa8d3c6eca871f0ddbf Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 10 Feb 2016 09:52:45 +0100
+Subject: [PATCH] ignore RAISE_SETFCAP install failures
+
+While the new RAISE_SETFCAP feature is nifty, its failure to run (often
+due to the fs not supporting it) shouldn't impair the default install.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+
+Forward ported from libcap-2.20 to libcap-2.25
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+--- a/progs/Makefile
++++ b/progs/Makefile
+@@ -39,7 +39,7 @@
+ install -m 0755 $$p $(FAKEROOT)$(SBINDIR) ; \
+ done
+ ifeq ($(RAISE_SETFCAP),yes)
+- $(FAKEROOT)$(SBINDIR)/setcap cap_setfcap=i $(FAKEROOT)$(SBINDIR)/setcap
++ -$(FAKEROOT)$(SBINDIR)/setcap cap_setfcap=i $(FAKEROOT)$(SBINDIR)/setcap
+ endif
+
+ test:
diff --git a/sys-libs/libcap/files/libcap-2.61-no_perl.patch b/sys-libs/libcap/files/libcap-2.61-no_perl.patch
new file mode 100644
index 00000000000..3d42a4dc613
--- /dev/null
+++ b/sys-libs/libcap/files/libcap-2.61-no_perl.patch
@@ -0,0 +1,57 @@
+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>
+--- a/libcap/Makefile
++++ b/libcap/Makefile
+@@ -20,6 +20,8 @@
+
+ # Always build libcap sources this way:
+ CFLAGS += -fPIC
++AWK = awk
++SED = sed
+
+ # The linker magic needed to build a dynamic library as independently
+ # executable
+@@ -82,8 +84,18 @@
+ ./_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
+@@ -92,7 +104,7 @@
+ 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) > $@
+
+ $(STACAPLIBNAME): $(CAPOBJS)
+ $(AR) rcs $@ $^
diff --git a/sys-libs/libcap/libcap-2.57.ebuild b/sys-libs/libcap/libcap-2.57.ebuild
deleted file mode 100644
index ca29aacc3bb..00000000000
--- a/sys-libs/libcap/libcap-2.57.ebuild
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit 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 tools"
-
-# While the build system optionally uses gperf, we don't DEPEND on it because
-# the build automatically falls back when it's unavailable. #604802
-PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
-DEPEND="${PDEPEND}
- sys-kernel/linux-headers"
-BDEPEND="tools? ( dev-lang/go )"
-
-PATCHES=(
- # Backported patch, drop on > 2.57
- "${FILESDIR}"/${PN}-2.57-parallel-make.patch
- "${FILESDIR}"/${PN}-2.38-no_perl.patch
- "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
-)
-
-QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
-
-src_prepare() {
- default
- multilib_copy_sources
-}
-
-run_emake() {
- local args=(
- AR="$(tc-getAR)"
- CC="$(tc-getCC)"
- OBJCOPY="$(tc-getOBJCOPY)"
- RANLIB="$(tc-getRANLIB)"
- exec_prefix="${EPREFIX}"
- lib_prefix="${EPREFIX}/usr"
- lib="$(get_libdir)"
- prefix="${EPREFIX}/usr"
- PAM_CAP="$(usex pam yes no)"
- DYNAMIC=yes
- GOLANG="$(multilib_native_usex tools yes no)"
- )
- emake "${args[@]}" "$@"
-}
-
-src_configure() {
- tc-export_build_env BUILD_CC
- multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
- run_emake
-}
-
-multilib_src_test() {
- run_emake test
-}
-
-multilib_src_install() {
- # no configure, needs explicit install line #444724#c3
- run_emake DESTDIR="${D}" install
-
- gen_usr_ldscript -a cap
- gen_usr_ldscript -a psx
- if ! use static-libs ; then
- rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die
- fi
-
- # install pam plugins ourselves
- rm -rf "${ED}"/usr/$(get_libdir)/security || die
-
- if use pam ; then
- dopammod pam_cap/pam_cap.so
- dopamsecurity '' pam_cap/capability.conf
- fi
-}
-
-multilib_src_install_all() {
- dodoc CHANGELOG README doc/capability.notes
-}
diff --git a/sys-libs/libcap/libcap-2.59.ebuild b/sys-libs/libcap/libcap-2.61.ebuild
index ea1e6af4976..ad5ca82adcb 100644
--- a/sys-libs/libcap/libcap-2.59.ebuild
+++ b/sys-libs/libcap/libcap-2.61.ebuild
@@ -5,14 +5,21 @@ EAPI=7
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 ~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 tools"
# While the build system optionally uses gperf, we don't DEPEND on it because
@@ -20,11 +27,14 @@ IUSE="pam static-libs tools"
PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
DEPEND="${PDEPEND}
sys-kernel/linux-headers"
-BDEPEND="tools? ( dev-lang/go )"
+BDEPEND="
+ sys-apps/diffutils
+ tools? ( dev-lang/go )"
PATCHES=(
- "${FILESDIR}"/${PN}-2.38-no_perl.patch
- "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
+ "${FILESDIR}"/${PN}-2.61-no_perl.patch
+ "${FILESDIR}"/${PN}-2.61-ignore-RAISE_SETFCAP-install-failures.patch
+ "${FILESDIR}"/${PN}-2.61-Wformat.patch
)
QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
diff --git a/sys-libs/libcap/libcap-2.58.ebuild b/sys-libs/libcap/libcap-9999.ebuild
index ea1e6af4976..969f9d0aaac 100644
--- a/sys-libs/libcap/libcap-2.58.ebuild
+++ b/sys-libs/libcap/libcap-9999.ebuild
@@ -5,14 +5,21 @@ EAPI=7
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 ~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 tools"
# While the build system optionally uses gperf, we don't DEPEND on it because
@@ -20,12 +27,9 @@ IUSE="pam static-libs tools"
PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
DEPEND="${PDEPEND}
sys-kernel/linux-headers"
-BDEPEND="tools? ( dev-lang/go )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.38-no_perl.patch
- "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
-)
+BDEPEND="
+ sys-apps/diffutils
+ tools? ( dev-lang/go )"
QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
index 3637647d0da..3e1261de5ed 100644
--- a/sys-libs/libcxx/Manifest
+++ b/sys-libs/libcxx/Manifest
@@ -1,9 +1,9 @@
-DIST llvm-gentoo-patchset-10.0.1-1.tar.xz 8320 BLAKE2B 1b7ea7669586e08fece0efcf02b392feed4b7f3e6e9cdd10ab7dcc30082cae5bb1daa6d3314a7b0329c4d70f3c736d0c57ed408c838601dc737d558d2a0a0f26 SHA512 75898a8d719657177bbf587d848be8e53135c09e50603660c19edab00f80b6c2f29e7b6fda2bef381b38df6e24a690d694029a38c525763408322573275fc9f0
DIST llvm-gentoo-patchset-11.1.0-1.tar.xz 4032 BLAKE2B e69138a422e315b31a3d9c11faa4ae1ddf1bf9092cee2db0de4d2adef81fd802973488293aab48b764402b51996893b17ca03249ef4620848a576d1f6cdb9698 SHA512 e1c5504dab6c5db9fdf4addfeb12316f22d0258717ba551a9b7b3ba37919491fb6011ac5cca1e793b7509d5c1c186bc6bc4213f7d6155d190612492b216f979b
DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249
DIST llvm-gentoo-patchset-13.0.0.tar.xz 5012 BLAKE2B 6760c78c086aaf6629143fd920b0a2c68cad9278628fbea8164dfeb59db95984a5b5d6b3505b510c697e8c95bf8d2be782c6b73c01622d52f2da9b07ecff39e0 SHA512 7764d49343b795b6bebae64f646ba27e3e6cc2a20b8a1aee645ce0d8474633c34acfbb73c08546fee415755dd4ea5a98c1d84db5e394cf5f4fc802eb61148ab6
+DIST llvm-gentoo-patchset-13.0.1-rc1.tar.xz 5988 BLAKE2B 8f1d295d4b6937518d9e0cc00cc2ba9e12ff9773b35261f0985b2d2a4ed1e3363a7f961cb385728b5ae552d0e129d99d11e63958d32c3353b0a79a88ba5cc0d5 SHA512 8272c423a5e0e99d412bb449794ba2e8134aca69d09e90e93555dbd3b7549d6ce4d68617ca11074af0a35a6f6830bf0330cbc672c5a56054cfd824e3ac1900ea
DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc
-DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
+DIST llvmorg-13.0.1-rc1.tar.gz 147284646 BLAKE2B 3a1d8d382de633b7f8fc998f8ad1e03c24b733aefc591615cbd34115d1d6d74962ae33bbf2224527b521a76930ffee425527225563a558a04173e9aa9487c781 SHA512 d487bfc9b898ad0046e0c94338d7757d8a05a1a84d683abfbc9ed4994c6d12caf88fd18575225e284070fc67b3ac0970ca6639e61b1a7cc2948b216a5364a22d
diff --git a/sys-libs/libcxx/libcxx-13.0.0.ebuild b/sys-libs/libcxx/libcxx-13.0.0.ebuild
index 62760143aef..851870fd9e9 100644
--- a/sys-libs/libcxx/libcxx-13.0.0.ebuild
+++ b/sys-libs/libcxx/libcxx-13.0.0.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://libcxx.llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86 ~x64-macos"
+KEYWORDS="amd64 arm arm64 ~riscv x86 ~x64-macos"
IUSE="elibc_glibc elibc_musl +libcxxabi +libunwind static-libs test"
REQUIRED_USE="libunwind? ( libcxxabi )"
RESTRICT="!test? ( test )"
@@ -132,6 +132,7 @@ multilib_src_configure() {
-DLIBCXX_INCLUDE_TESTS=$(usex test)
-DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
-DLIBCXX_HAS_ATOMIC_LIB=${want_gcc_s}
+ -DLIBCXX_TARGET_TRIPLE="${CHOST}"
-DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
)
diff --git a/sys-libs/libcxx/libcxx-13.0.0.9999.ebuild b/sys-libs/libcxx/libcxx-13.0.1.9999.ebuild
index 5dca7551438..be5566afa3b 100644
--- a/sys-libs/libcxx/libcxx-13.0.0.9999.ebuild
+++ b/sys-libs/libcxx/libcxx-13.0.1.9999.ebuild
@@ -132,6 +132,7 @@ multilib_src_configure() {
-DLIBCXX_INCLUDE_TESTS=$(usex test)
-DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
-DLIBCXX_HAS_ATOMIC_LIB=${want_gcc_s}
+ -DLIBCXX_TARGET_TRIPLE="${CHOST}"
-DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
)
diff --git a/sys-libs/libcxx/libcxx-10.0.1.ebuild b/sys-libs/libcxx/libcxx-13.0.1_rc1.ebuild
index 5c7c50377c3..f8fd0e12683 100644
--- a/sys-libs/libcxx/libcxx-10.0.1.ebuild
+++ b/sys-libs/libcxx/libcxx-13.0.1_rc1.ebuild
@@ -4,18 +4,15 @@
EAPI=7
CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
HOMEPAGE="https://libcxx.llvm.org/"
-LLVM_COMPONENTS=( libcxx )
-LLVM_PATCHSET=10.0.1-1
-llvm.org_set_globals
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0"
-KEYWORDS="amd64 arm arm64 x86"
+KEYWORDS=""
IUSE="elibc_glibc elibc_musl +libcxxabi +libunwind static-libs test"
REQUIRED_USE="libunwind? ( libcxxabi )"
RESTRICT="!test? ( test )"
@@ -29,17 +26,29 @@ RDEPEND="
DEPEND="${RDEPEND}
>=sys-devel/llvm-6"
BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
+ test? (
+ >=dev-util/cmake-3.16
+ >=sys-devel/clang-3.9.0
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )"
DOCS=( CREDITS.TXT )
+LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake,utils/llvm-lit} )
+LLVM_PATCHSET=${PV/_/-}
+llvm.org_set_globals
+
python_check_deps() {
has_version "dev-python/lit[${PYTHON_USEDEP}]"
}
pkg_setup() {
- llvm_pkg_setup
+ # Darwin Prefix builds do not have llvm installed yet, so rely on
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead
+ # of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
+ llvm_pkg_setup
+ fi
use test && python-any-r1_pkg_setup
if ! use libcxxabi && ! tc-is-gcc ; then
@@ -89,6 +98,15 @@ multilib_src_configure() {
extra_libs+=( "${compiler_rt}" )
fi
fi
+ elif [[ ${CHOST} == *-darwin* ]] && tc-is-clang; then
+ # clang-based darwin prefix disables libunwind useflag during
+ # bootstrap, because libunwind is not in the prefix yet.
+ # override the default, though, because clang based libcxx
+ # should never use gcc_s on Darwin.
+ want_gcc_s=OFF
+ # compiler_rt is not available in EPREFIX during bootstrap,
+ # so we cannot link to it yet anyway, so keep the defaults
+ # of want_compiler_rt=OFF and extra_libs=()
fi
# bootstrap: cmake is unhappy if compiler can't link to stdlib
@@ -113,6 +131,8 @@ multilib_src_configure() {
-DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
-DLIBCXX_INCLUDE_TESTS=$(usex test)
-DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
+ -DLIBCXX_HAS_ATOMIC_LIB=${want_gcc_s}
+ -DLIBCXX_TARGET_TRIPLE="${CHOST}"
-DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
)
@@ -123,6 +143,8 @@ multilib_src_configure() {
mycmakeargs+=(
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
+ -DLIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABI=ON
+ -DPython3_EXECUTABLE="${PYTHON}"
)
fi
cmake_src_configure
@@ -130,7 +152,7 @@ multilib_src_configure() {
multilib_src_test() {
local -x LIT_PRESERVES_TMP=1
- cmake_build check-libcxx
+ cmake_build check-cxx
}
# Usage: deps
@@ -177,8 +199,10 @@ gen_shared_ldscript() {
multilib_src_install() {
cmake_src_install
- gen_shared_ldscript
- use static-libs && gen_static_ldscript
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ gen_shared_ldscript
+ use static-libs && gen_static_ldscript
+ fi
}
pkg_postinst() {
diff --git a/sys-libs/libcxx/libcxx-14.0.0.9999.ebuild b/sys-libs/libcxx/libcxx-14.0.0.9999.ebuild
index 5dca7551438..be5566afa3b 100644
--- a/sys-libs/libcxx/libcxx-14.0.0.9999.ebuild
+++ b/sys-libs/libcxx/libcxx-14.0.0.9999.ebuild
@@ -132,6 +132,7 @@ multilib_src_configure() {
-DLIBCXX_INCLUDE_TESTS=$(usex test)
-DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
-DLIBCXX_HAS_ATOMIC_LIB=${want_gcc_s}
+ -DLIBCXX_TARGET_TRIPLE="${CHOST}"
-DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
)
diff --git a/sys-libs/libcxxabi/Manifest b/sys-libs/libcxxabi/Manifest
index 10303759a73..e08cd107ad6 100644
--- a/sys-libs/libcxxabi/Manifest
+++ b/sys-libs/libcxxabi/Manifest
@@ -1,4 +1,4 @@
-DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
+DIST llvmorg-13.0.1-rc1.tar.gz 147284646 BLAKE2B 3a1d8d382de633b7f8fc998f8ad1e03c24b733aefc591615cbd34115d1d6d74962ae33bbf2224527b521a76930ffee425527225563a558a04173e9aa9487c781 SHA512 d487bfc9b898ad0046e0c94338d7757d8a05a1a84d683abfbc9ed4994c6d12caf88fd18575225e284070fc67b3ac0970ca6639e61b1a7cc2948b216a5364a22d
diff --git a/sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild b/sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild
index 4c3c7882da7..628752042ee 100644
--- a/sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild
+++ b/sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://libcxxabi.llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86 ~x64-macos"
+KEYWORDS="amd64 arm arm64 ~riscv x86 ~x64-macos"
IUSE="+libunwind static-libs test elibc_musl"
RESTRICT="!test? ( test )"
@@ -75,6 +75,7 @@ multilib_src_configure() {
# upstream is omitting standard search path for this
# probably because gcc & clang are bundling their own unwind.h
-DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+ -DLIBCXXABI_TARGET_TRIPLE="${CHOST}"
)
if use test; then
local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
@@ -104,6 +105,7 @@ wrap_libcxx() {
-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
-DLIBCXX_HAS_GCC_S_LIB=OFF
-DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_TARGET_TRIPLE="${CHOST}"
)
"${@}"
diff --git a/sys-libs/libcxxabi/libcxxabi-13.0.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-13.0.1.9999.ebuild
index d11be625eea..36ccca5e938 100644
--- a/sys-libs/libcxxabi/libcxxabi-13.0.0.9999.ebuild
+++ b/sys-libs/libcxxabi/libcxxabi-13.0.1.9999.ebuild
@@ -75,6 +75,7 @@ multilib_src_configure() {
# upstream is omitting standard search path for this
# probably because gcc & clang are bundling their own unwind.h
-DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+ -DLIBCXXABI_TARGET_TRIPLE="${CHOST}"
)
if use test; then
local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
@@ -104,6 +105,7 @@ wrap_libcxx() {
-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
-DLIBCXX_HAS_GCC_S_LIB=OFF
-DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_TARGET_TRIPLE="${CHOST}"
)
"${@}"
diff --git a/sys-libs/libcxxabi/libcxxabi-10.0.1.ebuild b/sys-libs/libcxxabi/libcxxabi-13.0.1_rc1.ebuild
index 7aa13e0d8e6..36ccca5e938 100644
--- a/sys-libs/libcxxabi/libcxxabi-10.0.1.ebuild
+++ b/sys-libs/libcxxabi/libcxxabi-13.0.1_rc1.ebuild
@@ -4,18 +4,15 @@
EAPI=7
CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Low level support for a standard C++ library"
HOMEPAGE="https://libcxxabi.llvm.org/"
-# 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"
+KEYWORDS=""
IUSE="+libunwind static-libs test elibc_musl"
RESTRICT="!test? ( test )"
@@ -31,18 +28,30 @@ DEPEND="${RDEPEND}
>=sys-devel/llvm-6"
BDEPEND="
test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )"
+
+LLVM_COMPONENTS=( libcxx{abi,} llvm/cmake )
+llvm.org_set_globals
python_check_deps() {
has_version "dev-python/lit[${PYTHON_USEDEP}]"
}
pkg_setup() {
- llvm_pkg_setup
+ # darwin prefix builds do not have llvm installed yet, so rely on bootstrap-prefix
+ # to set the appropriate path vars to LLVM instead of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
+ llvm_pkg_setup
+ fi
use test && python-any-r1_pkg_setup
}
multilib_src_configure() {
+ # we need a configured libc++ for __config_site
+ wrap_libcxx cmake_src_configure
+ wrap_libcxx cmake_build generate-cxx-headers
+
# link against compiler-rt instead of libgcc if we are using clang with libunwind
local want_compiler_rt=OFF
if use libunwind && tc-is-clang; then
@@ -62,10 +71,11 @@ multilib_src_configure() {
-DLIBCXXABI_INCLUDE_TESTS=$(usex test)
-DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}
- -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
+ -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
# upstream is omitting standard search path for this
# probably because gcc & clang are bundling their own unwind.h
-DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+ -DLIBCXXABI_TARGET_TRIPLE="${CHOST}"
)
if use test; then
local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
@@ -74,12 +84,13 @@ multilib_src_configure() {
mycmakeargs+=(
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
+ -DPython3_EXECUTABLE="${PYTHON}"
)
fi
cmake_src_configure
}
-build_libcxx() {
+wrap_libcxx() {
local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
local CMAKE_USE_DIR=${WORKDIR}/libcxx
local BUILD_DIR=${BUILD_DIR}/libcxx
@@ -94,19 +105,18 @@ build_libcxx() {
-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
-DLIBCXX_HAS_GCC_S_LIB=OFF
-DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_TARGET_TRIPLE="${CHOST}"
)
- cmake_src_configure
- cmake_src_compile
+ "${@}"
}
multilib_src_test() {
- # build a local copy of libc++ for testing to avoid circular dep
- build_libcxx
+ wrap_libcxx cmake_src_compile
mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
local -x LIT_PRESERVES_TMP=1
- cmake_build check-libcxxabi
+ cmake_build check-cxxabi
}
multilib_src_install_all() {
diff --git a/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild
index d11be625eea..36ccca5e938 100644
--- a/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild
+++ b/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild
@@ -75,6 +75,7 @@ multilib_src_configure() {
# upstream is omitting standard search path for this
# probably because gcc & clang are bundling their own unwind.h
-DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+ -DLIBCXXABI_TARGET_TRIPLE="${CHOST}"
)
if use test; then
local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
@@ -104,6 +105,7 @@ wrap_libcxx() {
-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
-DLIBCXX_HAS_GCC_S_LIB=OFF
-DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_TARGET_TRIPLE="${CHOST}"
)
"${@}"
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 00000000000..13d7698ec1b
--- /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-r3.ebuild b/sys-libs/libfaketime/libfaketime-0.9.6-r4.ebuild
index b115280410e..0d1e323682b 100644
--- a/sys-libs/libfaketime/libfaketime-0.9.6-r3.ebuild
+++ b/sys-libs/libfaketime/libfaketime-0.9.6-r4.ebuild
@@ -13,6 +13,8 @@ LICENSE="GPL-2"
SLOT="0"
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
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch
new file mode 100644
index 00000000000..68e121e240a
--- /dev/null
+++ b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch
@@ -0,0 +1,258 @@
+From 959d74fd0fbbff310943096e15024a84e8f5cba4 Mon Sep 17 00:00:00 2001
+From: Matheus Castanho <msc@linux.ibm.com>
+Date: Thu, 12 Aug 2021 16:38:46 -0300
+Subject: [PATCH] Disable hugepage-backed malloc if __morecore is not available
+
+Starting with glibc 2.32, __morecore hook has been marked as deprecated, and was
+completely removed on glibc 2.34, which causes an undefined symbol error during
+the build of libhugetlbfs.
+
+Greater changes are needed in order to keep providing the same functionality
+with future versions of glibc (see issue #52). Meanwhile, we can disable
+hugepage-backed malloc setup if __morecore is not available so users can at
+least keep using the other features provided by the library. Related tests are
+also conditionally disabled, and will show as SKIPPED if __morecore is not
+available.
+
+Tested on powerpc64le and x86_64 with glibc 2.34 and olders.
+
+Signed-off-by: Matheus Castanho <msc@linux.ibm.com>
+---
+ Makefile | 6 +++++
+ morecore.c | 8 ++++++
+ tests/run_tests.py | 67 +++++++++++++++++++++++++++++++++++++++-------
+ 3 files changed, 71 insertions(+), 10 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8b73523..35e53e7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -192,6 +192,12 @@ endif
+ endif
+ endif
+
++# glibc 2.34 removed __morecore, so it may not be available with recent versions
++HAS_MORECORE := $(shell /bin/echo -e '\#include <malloc.h>\nvoid * morecore_exists() { return &__morecore; }' | $(CC) -c -xc -o /dev/null - &> /dev/null && /bin/echo yes || /bin/echo no)
++ifeq ($(HAS_MORECORE),yes)
++CFLAGS += -DHAS_MORECORE
++endif
++
+ HEADERDIR = $(PREFIX)/include
+ LIBDIR32 = $(PREFIX)/$(LIB32)
+ LIBDIR64 = $(PREFIX)/$(LIB64)
+diff --git a/morecore.c b/morecore.c
+index 6563bbd..405c566 100644
+--- a/morecore.c
++++ b/morecore.c
+@@ -33,6 +33,13 @@
+
+ #include "libhugetlbfs_internal.h"
+
++#ifndef HAS_MORECORE
++void hugetlbfs_setup_morecore(void)
++{
++ INFO("Not setting up morecore because it's not available (see issue #52).\n");
++}
++#else
++
+ static int heap_fd;
+
+ static void *heapbase;
+@@ -381,3 +388,4 @@ void hugetlbfs_setup_morecore(void)
+ * to mmap() if we run out of hugepages. */
+ mallopt(M_MMAP_MAX, 0);
+ }
++#endif /* HAS_MORECORE */
+diff --git a/tests/run_tests.py b/tests/run_tests.py
+index 018264d..871d04d 100755
+--- a/tests/run_tests.py
++++ b/tests/run_tests.py
+@@ -60,7 +60,7 @@ def snapshot_pool_state():
+ l.append((d, tuple(substate)))
+ return tuple(l)
+
+-def run_test_prog(bits, pagesize, cmd, **env):
++def run_test_prog(bits, pagesize, cmd, output='stdout', **env):
+ if paranoid_pool_check:
+ beforepool = snapshot_pool_state()
+ print("Pool state: %s" % str(beforepool))
+@@ -73,15 +73,17 @@ def run_test_prog(bits, pagesize, cmd, **env):
+ % (bits, bits, local_env.get("LD_LIBRARY_PATH", ""))
+ local_env["HUGETLB_DEFAULT_PAGE_SIZE"] = repr(pagesize)
+
++ popen_args = {'env' : local_env, output : subprocess.PIPE}
++
+ try:
+- p = subprocess.Popen(cmd, env=local_env, stdout=subprocess.PIPE)
++ p = subprocess.Popen(cmd, **popen_args)
+ rc = p.wait()
+ except KeyboardInterrupt:
+ # Abort and mark this a strange test result
+ return (None, "")
+ except OSError as e:
+ return (-e.errno, "")
+- out = p.stdout.read().decode().strip()
++ out = getattr(p, output).read().decode().strip()
+
+ if paranoid_pool_check:
+ afterpool = snapshot_pool_state()
+@@ -309,6 +311,33 @@ def check_linkhuge_tests():
+ okbits.add(bits)
+ return okbits
+
++def check_morecore_disabled():
++ """
++ Check if support for morecore is available.
++
++ Newer glibc versions (>= 2.34) removed the __morecore malloc hook, so tests
++ relying on that functionality will not work as expected, and should be
++ disabled.
++ """
++ global morecore_disabled, wordsizes, pagesizes
++
++ # Quick and dirty way to get a word and page size. Which one doesn't really
++ # matter in this case.
++ for wsz in wordsizes:
++ b = wsz
++ break
++ for psz in pagesizes:
++ p = psz
++ break
++
++ # Run an arbitrary program and check stderr for the "morecore disabled"
++ # message
++ (rc, out) = run_test_prog(b, p, "gethugepagesize", output='stderr',
++ HUGETLB_MORECORE="yes",
++ HUGETLB_VERBOSE="3")
++
++ morecore_disabled = "Not setting up morecore" in out
++
+ def print_cmd(pagesize, bits, cmd, env):
+ if env:
+ print(' '.join(['%s=%s' % (k, v) for k, v in env.items()]), end=" ")
+@@ -357,14 +386,17 @@ def skip_test(pagesize, bits, cmd, **env):
+ print_cmd(pagesize, bits, cmd, env)
+ print("SKIPPED")
+
+-def do_test(cmd, bits=None, **env):
++def do_test(cmd, bits=None, skip=False, **env):
+ """
+ Run a test case, testing each page size and each indicated word size.
+ """
+ if bits == None: bits = wordsizes
+ for p in pagesizes:
+ for b in (set(bits) & wordsizes_by_pagesize[p]):
+- run_test(p, b, cmd, **env)
++ if skip:
++ skip_test(p, b, cmd, **env)
++ else:
++ run_test(p, b, cmd, **env)
+
+ def do_test_with_rlimit(rtype, limit, cmd, bits=None, **env):
+ """
+@@ -375,7 +407,7 @@ def do_test_with_rlimit(rtype, limit, cmd, bits=None, **env):
+ do_test(cmd, bits, **env)
+ resource.setrlimit(rtype, oldlimit)
+
+-def do_test_with_pagesize(pagesize, cmd, bits=None, **env):
++def do_test_with_pagesize(pagesize, cmd, bits=None, skip=False, **env):
+ """
+ Run a test case, testing with a specified huge page size and
+ each indicated word size.
+@@ -383,7 +415,10 @@ def do_test_with_pagesize(pagesize, cmd, bits=None, **env):
+ if bits == None:
+ bits = wordsizes
+ for b in (set(bits) & wordsizes_by_pagesize[pagesize]):
+- run_test(pagesize, b, cmd, **env)
++ if skip:
++ skip_test(pagesize, b, cmd, **env)
++ else:
++ run_test(pagesize, b, cmd, **env)
+
+ def do_elflink_test(cmd, **env):
+ """
+@@ -533,7 +568,7 @@ def functional_tests():
+ """
+ Run the set of functional tests.
+ """
+- global linkhuge_wordsizes
++ global linkhuge_wordsizes, morecore_disabled
+
+ # Kernel background tests not requiring hugepage support
+ do_test("zero_filesize_segment")
+@@ -598,19 +633,24 @@ def functional_tests():
+ do_test("fork-cow")
+ do_test("direct")
+ do_test_with_pagesize(system_default_hpage_size, "malloc")
++
+ do_test_with_pagesize(system_default_hpage_size, "malloc",
++ skip=morecore_disabled,
+ LD_PRELOAD="libhugetlbfs.so",
+ HUGETLB_MORECORE="yes")
+ do_test_with_pagesize(system_default_hpage_size, "malloc",
++ skip=morecore_disabled,
+ LD_PRELOAD="libhugetlbfs.so",
+ HUGETLB_MORECORE="yes",
+ HUGETLB_RESTRICT_EXE="unknown:none")
+ do_test_with_pagesize(system_default_hpage_size, "malloc",
++ skip=morecore_disabled,
+ LD_PRELOAD="libhugetlbfs.so",
+ HUGETLB_MORECORE="yes",
+ HUGETLB_RESTRICT_EXE="unknown:malloc")
+ do_test_with_pagesize(system_default_hpage_size, "malloc_manysmall")
+ do_test_with_pagesize(system_default_hpage_size, "malloc_manysmall",
++ skip=morecore_disabled,
+ LD_PRELOAD="libhugetlbfs.so",
+ HUGETLB_MORECORE="yes")
+
+@@ -630,26 +670,32 @@ def functional_tests():
+ do_test_with_pagesize(system_default_hpage_size, "heapshrink",
+ GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
+ LD_PRELOAD="libheapshrink.so")
++
+ do_test_with_pagesize(system_default_hpage_size, "heapshrink",
++ skip=morecore_disabled,
+ GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
+ LD_PRELOAD="libhugetlbfs.so",
+ HUGETLB_MORECORE="yes")
+ do_test_with_pagesize(system_default_hpage_size, "heapshrink",
++ skip=morecore_disabled,
+ GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
+ LD_PRELOAD="libhugetlbfs.so libheapshrink.so",
+ HUGETLB_MORECORE="yes")
+ do_test_with_pagesize(system_default_hpage_size, "heapshrink",
++ skip=morecore_disabled,
+ GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
+ LD_PRELOAD="libheapshrink.so",
+ HUGETLB_MORECORE="yes",
+ HUGETLB_MORECORE_SHRINK="yes")
+ do_test_with_pagesize(system_default_hpage_size, "heapshrink",
++ skip=morecore_disabled,
+ GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
+ LD_PRELOAD="libhugetlbfs.so libheapshrink.so",
+ HUGETLB_MORECORE="yes",
+ HUGETLB_MORECORE_SHRINK="yes")
+
+- do_test("heap-overflow", HUGETLB_VERBOSE="1", HUGETLB_MORECORE="yes")
++ do_test("heap-overflow", skip=morecore_disabled, HUGETLB_VERBOSE="1",
++ HUGETLB_MORECORE="yes")
+
+ # Run the remapping tests' up-front checks
+ linkhuge_wordsizes = check_linkhuge_tests()
+@@ -747,7 +793,7 @@ def print_help():
+
+ def main():
+ global wordsizes, pagesizes, dangerous, paranoid_pool_check, system_default_hpage_size
+- global custom_ldscripts
++ global custom_ldscripts, morecore_disabled
+ testsets = set()
+ env_override = {"QUIET_TEST": "1", "HUGETLBFS_MOUNTS": "",
+ "HUGETLB_ELFMAP": None, "HUGETLB_MORECORE": None}
+@@ -802,6 +848,7 @@ def main():
+ return 1
+
+ check_hugetlbfs_path()
++ check_morecore_disabled()
+
+ if "func" in testsets: functional_tests()
+ if "stress" in testsets: stress_tests()
diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
index ce5da82ddfc..c091b4a8c00 100644
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
@@ -22,6 +22,7 @@ BDEPEND="test? ( ${PYTHON_DEPS} )"
PATCHES=(
"${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
"${FILESDIR}"/${PN}-2.23-uncompressed-man-pages.patch
+ "${FILESDIR}"/${PN}-2.23-allow-building-against-glibc-2.34.patch
)
src_prepare() {
diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
index 3340fea9ae3..999aacbc5b9 100644
--- a/sys-libs/libomp/Manifest
+++ b/sys-libs/libomp/Manifest
@@ -1,6 +1,7 @@
DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249
-DIST llvm-gentoo-patchset-13.0.0-r1.tar.xz 6208 BLAKE2B 3d6ae036b59c62d50cad64e8f5a8ba9e0249bb824df0028656359ba1a72ea69a2c56a3f802b6c20e16f4272a504864578b48e1defe7986234307862b51240ae7 SHA512 642c32f43aacc760156e9e418de01c7b83f886ab4dc0ec79913ef5bb66f78eeae73c429477f2595263ddbd1a0b49f00420f1e954b1ff2d5d676a7a4a3a92aba5
-DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
+DIST llvm-gentoo-patchset-13.0.0-r2.tar.xz 6500 BLAKE2B 0ce8d0c4a5508f70c8ec49dbc03dfbfc6371ac224bc5dfc9a39f71def0f574405a06df5666baf6159afafd83a8028c5ea6cb369f22a06f927f3ce6795e96994d SHA512 800d44b382c03b673b43965d80d6ed1b7e8e4ced8d066183b9b8df722b2cc002a6aa54092e600f0d77611be581d312f8886ce8af25b23ff818115a209ec21312
+DIST llvm-gentoo-patchset-13.0.1-rc1.tar.xz 5988 BLAKE2B 8f1d295d4b6937518d9e0cc00cc2ba9e12ff9773b35261f0985b2d2a4ed1e3363a7f961cb385728b5ae552d0e129d99d11e63958d32c3353b0a79a88ba5cc0d5 SHA512 8272c423a5e0e99d412bb449794ba2e8134aca69d09e90e93555dbd3b7549d6ce4d68617ca11074af0a35a6f6830bf0330cbc672c5a56054cfd824e3ac1900ea
DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
+DIST llvmorg-13.0.1-rc1.tar.gz 147284646 BLAKE2B 3a1d8d382de633b7f8fc998f8ad1e03c24b733aefc591615cbd34115d1d6d74962ae33bbf2224527b521a76930ffee425527225563a558a04173e9aa9487c781 SHA512 d487bfc9b898ad0046e0c94338d7757d8a05a1a84d683abfbc9ed4994c6d12caf88fd18575225e284070fc67b3ac0970ca6639e61b1a7cc2948b216a5364a22d
diff --git a/sys-libs/libomp/libomp-10.0.1.ebuild b/sys-libs/libomp/libomp-13.0.0-r1.ebuild
index aa2905dc9eb..6a1e4016def 100644
--- a/sys-libs/libomp/libomp-10.0.1.ebuild
+++ b/sys-libs/libomp/libomp-13.0.0-r1.ebuild
@@ -1,23 +1,24 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{7..9} )
-inherit cmake-multilib linux-info llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{8..10} )
+inherit 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"
+KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
+IUSE="cuda debug hwloc kernel_linux offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX"
# CUDA works only with the x86_64 ABI
-REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
+REQUIRED_USE="
+ cuda? ( llvm_targets_NVPTX )
+ offload? ( cuda? ( abi_x86_64 ) )"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -25,6 +26,7 @@ RDEPEND="
offload? (
virtual/libelf:=[${MULTILIB_USEDEP}]
dev-libs/libffi:=[${MULTILIB_USEDEP}]
+ ~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}]
cuda? ( dev-util/nvidia-cuda-toolkit:= )
)"
# tests:
@@ -33,12 +35,20 @@ RDEPEND="
# - sys-devel/clang provides the compiler to run tests
DEPEND="${RDEPEND}"
BDEPEND="dev-lang/perl
- offload? ( virtual/pkgconfig )
+ 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 llvm/include )
+LLVM_PATCHSET=${PV/_/-}-r2
+llvm.org_set_globals
+
python_check_deps() {
has_version "dev-python/lit[${PYTHON_USEDEP}]"
}
@@ -61,10 +71,14 @@ pkg_pretend() {
}
pkg_setup() {
+ use offload && LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
use test && python-any-r1_pkg_setup
}
multilib_src_configure() {
+ # 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 +93,24 @@ 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 && has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
+ mycmakeargs+=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
+ -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX)
+ # a cheap hack to force clang
+ -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")"
+ # upstream defaults to looking for it in clang dir
+ # this fails when ccache is being used
+ -DLIBOMPTARGET_NVPTX_BC_LINKER="$(type -P llvm-link)"
+ )
+ else
+ mycmakeargs+=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
+ -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF
+ -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=OFF
+ )
+ fi
use test && mycmakeargs+=(
# this project does not use standard LLVM cmake macros
-DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
@@ -93,6 +119,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-13.0.0.9999.ebuild b/sys-libs/libomp/libomp-13.0.1.9999.ebuild
index c16560830be..28c0f1fb620 100644
--- a/sys-libs/libomp/libomp-13.0.0.9999.ebuild
+++ b/sys-libs/libomp/libomp-13.0.1.9999.ebuild
@@ -92,17 +92,24 @@ 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)
-
- -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU)
- -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX)
- # a cheap hack to force clang
- -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")"
- )
+ if use offload && has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
+ mycmakeargs+=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
+ -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX)
+ # a cheap hack to force clang
+ -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")"
+ # upstream defaults to looking for it in clang dir
+ # this fails when ccache is being used
+ -DLIBOMPTARGET_NVPTX_BC_LINKER="$(type -P llvm-link)"
+ )
+ else
+ mycmakeargs+=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
+ -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF
+ -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=OFF
+ )
+ fi
use test && mycmakeargs+=(
# this project does not use standard LLVM cmake macros
-DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
diff --git a/sys-libs/libomp/libomp-13.0.0.ebuild b/sys-libs/libomp/libomp-13.0.1_rc1.ebuild
index 8771f7014c5..7f61ca615aa 100644
--- a/sys-libs/libomp/libomp-13.0.0.ebuild
+++ b/sys-libs/libomp/libomp-13.0.1_rc1.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://openmp.llvm.org"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos"
+KEYWORDS=""
IUSE="cuda debug hwloc kernel_linux offload ompt test
llvm_targets_AMDGPU llvm_targets_NVPTX"
# CUDA works only with the x86_64 ABI
@@ -46,7 +46,7 @@ BDEPEND="dev-lang/perl
)"
LLVM_COMPONENTS=( openmp llvm/include )
-LLVM_PATCHSET=${PV/_/-}-r1
+LLVM_PATCHSET=${PV/_/-}
llvm.org_set_globals
python_check_deps() {
@@ -93,17 +93,24 @@ 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)
-
- -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU)
- -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX)
- # a cheap hack to force clang
- -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")"
- )
+ if use offload && has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
+ mycmakeargs+=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
+ -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX)
+ # a cheap hack to force clang
+ -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")"
+ # upstream defaults to looking for it in clang dir
+ # this fails when ccache is being used
+ -DLIBOMPTARGET_NVPTX_BC_LINKER="$(type -P llvm-link)"
+ )
+ else
+ mycmakeargs+=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
+ -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF
+ -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=OFF
+ )
+ fi
use test && mycmakeargs+=(
# this project does not use standard LLVM cmake macros
-DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
diff --git a/sys-libs/libomp/libomp-14.0.0.9999.ebuild b/sys-libs/libomp/libomp-14.0.0.9999.ebuild
index c16560830be..28c0f1fb620 100644
--- a/sys-libs/libomp/libomp-14.0.0.9999.ebuild
+++ b/sys-libs/libomp/libomp-14.0.0.9999.ebuild
@@ -92,17 +92,24 @@ 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)
-
- -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU)
- -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX)
- # a cheap hack to force clang
- -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")"
- )
+ if use offload && has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
+ mycmakeargs+=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda)
+ -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX)
+ # a cheap hack to force clang
+ -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")"
+ # upstream defaults to looking for it in clang dir
+ # this fails when ccache is being used
+ -DLIBOMPTARGET_NVPTX_BC_LINKER="$(type -P llvm-link)"
+ )
+ else
+ mycmakeargs+=(
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON
+ -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF
+ -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=OFF
+ )
+ fi
use test && mycmakeargs+=(
# this project does not use standard LLVM cmake macros
-DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
diff --git a/sys-libs/libosinfo/libosinfo-1.9.0-r1.ebuild b/sys-libs/libosinfo/libosinfo-1.9.0-r1.ebuild
new file mode 100644
index 00000000000..54ada71ed30
--- /dev/null
+++ b/sys-libs/libosinfo/libosinfo-1.9.0-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+VALA_USE_DEPEND="vapigen"
+
+inherit meson udev 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 ~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
+ >=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) )
+"
+
+src_prepare() {
+ xdg_src_prepare
+ use vala && vala_src_prepare
+}
+
+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)
+ -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/librtas/librtas-2.0.2-r1.ebuild b/sys-libs/librtas/librtas-2.0.2-r2.ebuild
index 61863ff24d3..f43d44b267f 100644
--- a/sys-libs/librtas/librtas-2.0.2-r1.ebuild
+++ b/sys-libs/librtas/librtas-2.0.2-r2.ebuild
@@ -27,4 +27,8 @@ src_configure() {
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/libseccomp/Manifest b/sys-libs/libseccomp/Manifest
index 55539be93ca..e405158403d 100644
--- a/sys-libs/libseccomp/Manifest
+++ b/sys-libs/libseccomp/Manifest
@@ -1,2 +1,3 @@
DIST libseccomp-2.5.1.tar.gz 638811 BLAKE2B 683ae7536c0cba36f4d30640b42361171fc34b7cb04985ea56e64369df29c440361a0205385b14580cc0e481e0f9ffd0b0e8ebd4ac98817ed59298db6b274c35 SHA512 2be80a6323f9282dbeae8791724e5778b32e2382b2a3d1b0f77366371ec4072ea28128204f675cce101c091c0420d12c497e1a9ccbb7dc5bcbf61bfd777160af
DIST libseccomp-2.5.2.tar.gz 640305 BLAKE2B b61214cb9a9a793d1f04ae1de3f62c578cfaec54fcc355947b4c71efb75072bf60497db8c8a0fd34a46764952349027df3f025ddbd276d58be93209170950e89 SHA512 b2a95152cb274d6b35753596fd825406dae20c4a48b2f4076f835f977ecf324de38a3fe02e789dc20b49ecf6b4eb67f03e7733e92d40f5e20f25874307f1c2ac
+DIST libseccomp-2.5.3.tar.gz 637572 BLAKE2B cedf04b3a926f9fe5202e6169ddac6b983e755009c14fc1d645157b9c0bcdf65d4085f8ea7abad90f3a0c13ae4d66b5d8306e725168490863aad15976de1eae7 SHA512 00170fe2360f0c0b33293dccfcc33e98fabb99619f34ecefbcc92bfdaa249ba91e7433226545b842b71542a3b224b6e980ea2ae656c4addf07e84a0def1870a0
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 00000000000..baf3ed971fc
--- /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/libseccomp-2.5.3.ebuild b/sys-libs/libseccomp/libseccomp-2.5.3.ebuild
new file mode 100644
index 00000000000..847d2ce335b
--- /dev/null
+++ b/sys-libs/libseccomp/libseccomp-2.5.3.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+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 test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="python? ( ${PYTHON_DEPS} )"
+RDEPEND="${DEPEND}"
+BDEPEND="${DEPEND}
+ dev-util/gperf
+ python? ( dev-python/cython[${PYTHON_USEDEP}] )
+"
+# We need newer kernel headers; we don't keep strict control of the exact
+# version here, just be safe and pull in the latest stable ones. #551248
+DEPEND="${DEPEND} >=sys-kernel/linux-headers-4.3"
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}/libseccomp-python-shared.patch"
+ "${FILESDIR}/libseccomp-2.5.3-skip-valgrind.patch"
+ )
+
+ default
+
+ 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 eea16fa2bbf..847d2ce335b 100644
--- a/sys-libs/libseccomp/libseccomp-9999.ebuild
+++ b/sys-libs/libseccomp/libseccomp-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_COMPAT=( python3_{8..10} )
DISTUTILS_OPTIONAL=1
inherit distutils-r1 multilib-minimal
@@ -22,7 +22,8 @@ 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} )"
@@ -39,10 +40,14 @@ DEPEND="${DEPEND} >=sys-kernel/linux-headers-4.3"
src_prepare() {
local PATCHES=(
"${FILESDIR}/libseccomp-python-shared.patch"
+ "${FILESDIR}/libseccomp-2.5.3-skip-valgrind.patch"
)
+
default
+
if [[ "${PV}" == *9999 ]] ; then
- sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac
+ sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac || die
+
eautoreconf
fi
}
@@ -52,12 +57,14 @@ multilib_src_configure() {
$(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
@@ -72,6 +79,7 @@ multilib_src_compile() {
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
}
@@ -86,5 +94,6 @@ multilib_src_install() {
multilib_src_install_all() {
find "${ED}" -type f -name "${PN}.la" -delete || die
+
einstalldocs
}
diff --git a/sys-libs/libselinux/Manifest b/sys-libs/libselinux/Manifest
index 3ba4acc00b6..18b3e6b273f 100644
--- a/sys-libs/libselinux/Manifest
+++ b/sys-libs/libselinux/Manifest
@@ -1,2 +1,3 @@
DIST libselinux-3.1.tar.gz 204703 BLAKE2B 72ff2d99dd6640405e804f58bdfbf05e152615ea92f902b3942602af13dc17080afeabb942ed33ae6b3f528870f4b11584e533848e455a97bf8f7151a8d44646 SHA512 57730cddd2d4751556d9e1f207c0f85119c81848f0620c16239e997150989e3f9a586a8c23861fd51ed89f7e084ad441190a58a288258a49a95f7beef7dbbb13
DIST libselinux-3.2.tar.gz 206380 BLAKE2B 544eaaa87b9738c61929abe48713b530a8909eaea017890040f2fe299af86f09b6eb2cf4c9a68e06268ba09923b2b67703ac7a2b973906acb45f698e9ccaeed2 SHA512 18129ac0b9936e1f66021f1b311cf1c1e27a01e50cb70f08a3e1c642c5251e4538aec25a8427778569dfecf5333cf1fb84f1a59afdce8019328d0cff7e5833c5
+DIST libselinux-3.3.tar.gz 206826 BLAKE2B e4cd2bf7172db1dd7661dd7981f875eb45f3c123805618edd03d7258f4b1f7afc974020187ec2e9e50dd59b3581ee21a29012eaa90ddfa82e43db4b8e60c51b7 SHA512 9a89c05ea4b17453168a985ece93ba6d6c4127916e657c46d4135eb59a1f6408faa0802cc2e49187defbde5247d659037beee089877affbab3eab6af3433696c
diff --git a/sys-libs/libselinux/libselinux-3.2.ebuild b/sys-libs/libselinux/libselinux-3.2.ebuild
index 2956e1e94ad..8cb65e1d9e8 100644
--- a/sys-libs/libselinux/libselinux-3.2.ebuild
+++ b/sys-libs/libselinux/libselinux-3.2.ebuild
@@ -20,7 +20,7 @@ if [[ ${PV} == 9999 ]]; then
S="${WORKDIR}/${P}/${PN}"
else
SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="amd64 ~arm ~arm64 ~mips ~riscv x86"
+ KEYWORDS="amd64 arm arm64 ~mips ~riscv x86"
S="${WORKDIR}/${MY_P}"
fi
diff --git a/sys-libs/libselinux/libselinux-3.3.ebuild b/sys-libs/libselinux/libselinux-3.3.ebuild
new file mode 100644
index 00000000000..8653460938e
--- /dev/null
+++ b/sys-libs/libselinux/libselinux-3.3.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+PYTHON_COMPAT=( python3_{7..10} )
+USE_RUBY="ruby25 ruby26 ruby27"
+
+# No, I am not calling ruby-ng
+inherit python-r1 toolchain-funcs multilib-minimal
+
+MY_PV="${PV//_/-}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="SELinux userland library"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${P}/${PN}"
+else
+ SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~riscv ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="public-domain"
+SLOT="0"
+IUSE="pcre2 python ruby static-libs ruby_targets_ruby25 ruby_targets_ruby26 ruby_targets_ruby27"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND=">=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
+ !pcre2? ( >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}] )
+ pcre2? ( dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] )
+ python? ( ${PYTHON_DEPS} )
+ ruby? (
+ ruby_targets_ruby25? ( dev-lang/ruby:2.5 )
+ ruby_targets_ruby26? ( dev-lang/ruby:2.6 )
+ ruby_targets_ruby27? ( dev-lang/ruby:2.7 )
+ )
+ elibc_musl? ( sys-libs/fts-standalone )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+ python? ( >=dev-lang/swig-2.0.9 )
+ ruby? ( >=dev-lang/swig-2.0.9 )"
+
+src_prepare() {
+ eapply_user
+
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ tc-export AR CC PKG_CONFIG RANLIB
+
+ 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)" \
+ 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/libsemanage/Manifest b/sys-libs/libsemanage/Manifest
index 72d9050a7a5..eea237e73a7 100644
--- a/sys-libs/libsemanage/Manifest
+++ b/sys-libs/libsemanage/Manifest
@@ -1,2 +1,3 @@
DIST libsemanage-3.1.tar.gz 179601 BLAKE2B 69450a4eda1f3728d339f65db1eec9940995fcea5208d17dca531ebc998aefbfec48fe91beffa3490e1502953aa550405fb696635d01b0eb8050c8f00f11106a SHA512 8609ca7d13b5c603677740f2b14558fea3922624af182d20d618237ba11fcf2559fab82fc68d1efa6ff118f064d426f005138521652c761de92cd66150102197
DIST libsemanage-3.2.tar.gz 178839 BLAKE2B c0925812d784923a7a239ba919fc0a0e1d84cb528cbf4a357fb7938d3c06ebd2f0b60cd3eba40b76bf7c2922a081b99b16b32dc16638aa1bfce32553e241fb9f SHA512 6ad670bb298b1bab506217b12a3fda5d2209f4387a11410f0c1b65f765ffb579b0d70795dee19048909e0b72ef904fc318be60d5a01f80ab12742ce07647a084
+DIST libsemanage-3.3.tar.gz 178890 BLAKE2B f1ff2d25f0c98e9794cb443365e6193db80a42104b645ef4edf783db2eb3d940d1f39cddfa59f9a86ba16957c77852159b3ced83c5d01ecb1811aa6255f8be83 SHA512 6026d9773c0886436ad801bc0c8beac888b6fb62034edeb863192dea4b6ef34a88e080758820fe635a20e048ac666beee505a0f946258f18571709cca5228aad
diff --git a/sys-libs/libsemanage/libsemanage-3.2.ebuild b/sys-libs/libsemanage/libsemanage-3.2.ebuild
index 6ed97a92c98..cea18c8179b 100644
--- a/sys-libs/libsemanage/libsemanage-3.2.ebuild
+++ b/sys-libs/libsemanage/libsemanage-3.2.ebuild
@@ -18,7 +18,7 @@ if [[ ${PV} == 9999 ]]; then
S="${WORKDIR}/${P}/${PN}"
else
SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="amd64 ~arm ~arm64 ~mips ~riscv x86"
+ KEYWORDS="amd64 arm arm64 ~mips ~riscv x86"
S="${WORKDIR}/${MY_P}"
fi
diff --git a/sys-libs/libsemanage/libsemanage-3.3.ebuild b/sys-libs/libsemanage/libsemanage-3.3.ebuild
new file mode 100644
index 00000000000..88db66d921c
--- /dev/null
+++ b/sys-libs/libsemanage/libsemanage-3.3.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{7..9} )
+
+inherit python-r1 toolchain-funcs multilib-minimal
+
+MY_PV="${PV//_/-}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="SELinux kernel and policy management library"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${P}/${PN}"
+else
+ SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~riscv ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0/2"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND=">=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}]
+ >=sys-libs/libselinux-${PV}:=[${MULTILIB_USEDEP}]
+ >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}]
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+BDEPEND=">=dev-lang/swig-2.0.4-r1
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig"
+
+# tests are not meant to be run outside of the
+# full SELinux userland repo
+RESTRICT="test"
+
+src_prepare() {
+ eapply_user
+
+ echo >> "${S}/src/semanage.conf"
+ echo "# Set this to true to save the linked policy." >> "${S}/src/semanage.conf"
+ echo "# This is normally only useful for analysis" >> "${S}/src/semanage.conf"
+ echo "# or debugging of policy." >> "${S}/src/semanage.conf"
+ echo "save-linked=false" >> "${S}/src/semanage.conf"
+ echo >> "${S}/src/semanage.conf"
+ echo "# Set this to 0 to disable assertion checking." >> "${S}/src/semanage.conf"
+ echo "# This should speed up building the kernel policy" >> "${S}/src/semanage.conf"
+ echo "# from policy modules, but may leave you open to" >> "${S}/src/semanage.conf"
+ echo "# dangerous rules which assertion checking" >> "${S}/src/semanage.conf"
+ echo "# would catch." >> "${S}/src/semanage.conf"
+ echo "expand-check=1" >> "${S}/src/semanage.conf"
+ echo >> "${S}/src/semanage.conf"
+ echo "# Modules in the module store can be compressed" >> "${S}/src/semanage.conf"
+ echo "# with bzip2. Set this to the bzip2 blocksize" >> "${S}/src/semanage.conf"
+ echo "# 1-9 when compressing. The higher the number," >> "${S}/src/semanage.conf"
+ echo "# the more memory is traded off for disk space." >> "${S}/src/semanage.conf"
+ echo "# Set to 0 to disable bzip2 compression." >> "${S}/src/semanage.conf"
+ echo "bzip-blocksize=0" >> "${S}/src/semanage.conf"
+ echo >> "${S}/src/semanage.conf"
+ echo "# Reduce memory usage for bzip2 compression and" >> "${S}/src/semanage.conf"
+ echo "# decompression of modules in the module store." >> "${S}/src/semanage.conf"
+ echo "bzip-small=true" >> "${S}/src/semanage.conf"
+
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
+
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ all
+
+ if multilib_is_native_abi; then
+ building_py() {
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ "$@"
+ }
+ python_foreach_impl building_py swigify
+ python_foreach_impl building_py pywrap
+ fi
+}
+
+multilib_src_install() {
+ emake \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ DESTDIR="${ED}" install
+
+ if multilib_is_native_abi; then
+ installation_py() {
+ emake DESTDIR="${ED}" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ install-pywrap
+ python_optimize # bug 531638
+ }
+ python_foreach_impl installation_py
+ fi
+}
+
+multiib_src_install_all() {
+ python_setup
+ python_fix_shebang "${ED}"/usr/libexec/selinux/semanage_migrate_store
+}
+
+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
+}
diff --git a/sys-libs/libsepol/Manifest b/sys-libs/libsepol/Manifest
index abf164a0089..2dfd96f02d0 100644
--- a/sys-libs/libsepol/Manifest
+++ b/sys-libs/libsepol/Manifest
@@ -1,2 +1,3 @@
DIST libsepol-3.1.tar.gz 473842 BLAKE2B ef1d596c4d53cc0a87e899ef4aeb5bf29c9d6b8303632ddc866c100d30debd8aedd0e8b38cb4ce3141b80421cd914148ff072e492d63dc2dacf03ac2ce59ca5a SHA512 4b5f4e82853ff3e9b4fac2dbdea5c2fc3bb7b508af912217ac4b75da6540fbcd77aa314ab95cd9dfa94fbc4a885000656a663c1a152f65b4cf6970ea0b6034ab
DIST libsepol-3.2.tar.gz 477749 BLAKE2B 6f35387c0373869672080e151f212c081389f6799539124353aa1749ae2648669b2e237a271297c1c212b7a9e0c35f05edfff1bb724c8a15993e8fb8c599ac2e SHA512 1a6b3489ff766958a4b444b9be63a794267243aed303d3e7d87278f11be492dbf603a0c8181c4c5e01cb0e1ceb43810a77f738f0b9bd1d7d2be67053f9c67a6f
+DIST libsepol-3.3.tar.gz 482546 BLAKE2B 977996f68807f73a5bc0bd3a07b605640eb02a7bc67971882d489def166539ff7cfd00e474adde7e923fbebebdfcdcb71d17a43e3396c3176e25fd7d3bd65238 SHA512 fb6bb69f8e43a911a1a9cbd791593215386e93cb9292e003f5d8efe6e86e0ce5d0287e95d52fe2fbce518a618beaf9b1135aea0d04eaebcdbd8c6d07ee67b500
diff --git a/sys-libs/libsepol/libsepol-3.2.ebuild b/sys-libs/libsepol/libsepol-3.2.ebuild
index 23a044ae99e..58ebda5eaea 100644
--- a/sys-libs/libsepol/libsepol-3.2.ebuild
+++ b/sys-libs/libsepol/libsepol-3.2.ebuild
@@ -17,7 +17,7 @@ if [[ ${PV} == 9999 ]]; then
S="${WORKDIR}/${P}/${PN}"
else
SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
- KEYWORDS="amd64 ~arm ~arm64 ~mips ~riscv x86"
+ KEYWORDS="amd64 arm arm64 ~mips ~riscv x86"
S="${WORKDIR}/${MY_P}"
fi
diff --git a/sys-libs/libsepol/libsepol-3.3.ebuild b/sys-libs/libsepol/libsepol-3.3.ebuild
new file mode 100644
index 00000000000..0878e192477
--- /dev/null
+++ b/sys-libs/libsepol/libsepol-3.3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit toolchain-funcs multilib-minimal
+
+MY_PV="${PV//_/-}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="SELinux binary policy representation library"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${P}/${PN}"
+else
+ SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~riscv ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0/2"
+
+# 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
+
+ local -x CFLAGS="${CFLAGS} -fno-semantic-interposition"
+
+ 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/libucontext/Manifest b/sys-libs/libucontext/Manifest
new file mode 100644
index 00000000000..d38b31369f6
--- /dev/null
+++ b/sys-libs/libucontext/Manifest
@@ -0,0 +1 @@
+DIST libucontext-1.1.tar.gz 25261 BLAKE2B 269b3899657779bc2c6a2f1c365242f0ee936afeb0acf74e48af5c1e6b96918bbaa239039508e7b1b1f7b358679fb4a222311b761223b69b9a3e7a9be2d0bc40 SHA512 05aed6f82a2b3d9dba896423335a7fc2fc5eddc87ed725f05e14488c6ddfcef10b835c928619439c7783e052baff7ef2dc162b6e06aa78992f6f611ca13c2e39
diff --git a/sys-libs/libucontext/libucontext-1.1.ebuild b/sys-libs/libucontext/libucontext-1.1.ebuild
new file mode 100644
index 00000000000..f637a693a33
--- /dev/null
+++ b/sys-libs/libucontext/libucontext-1.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2021 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"
+
+src_compile() {
+ tc-export AR CC
+
+ local 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}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" all $(usev man 'docs')
+}
+
+src_test() {
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" check
+}
+
+src_install() {
+ emake DESTDIR="${ED}" LIBDIR="/usr/$(get_libdir)" install $(usev man 'install_docs')
+}
diff --git a/sys-libs/libucontext/metadata.xml b/sys-libs/libucontext/metadata.xml
new file mode 100644
index 00000000000..6d14eb74080
--- /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/libunwind/Manifest b/sys-libs/libunwind/Manifest
index a755df1496a..2cf810467cc 100644
--- a/sys-libs/libunwind/Manifest
+++ b/sys-libs/libunwind/Manifest
@@ -1,2 +1,2 @@
DIST libunwind-1.5.0.tar.gz 878355 BLAKE2B ee35441289926ac22a58bedb9f831d8e13bacd663a99b3ce25eed229f25f0423bbbd90e09e3d62b003518d7a620aa6d15b0dd5b93632736a89fa0667b35d5fc2 SHA512 1df20ca7a8cee2f2e61294fa9b677e88fec52e9d5a329f88d05c2671c69fa462f6c18808c97ca9ff664ef57292537a844f00b18d142b1938c9da701ca95a4bab
-DIST libunwind-1.6.0-rc2.tar.gz 900974 BLAKE2B bbf88b6eb0ddf1371a8d69904e7763d2b2892641f88ed985f342962de7b2d19b6201f84422252aa5ca3d6beed7b3af0e2fe1fdb603497dbe68215ebc94942074 SHA512 7b3933c4693595a85182cc11d24527c5ccda3c3af115a3947bdc9877ecb4a77659a2196f559112868b36cd2cdc5623cabef68ad519fd4017c510ee375b97cbe9
+DIST libunwind-1.6.2.tar.gz 901392 BLAKE2B 3d0313f7e92cbc3e1a84ad3831a5170f21cdf772f1697ca0a59dea63cdd47da382e9f1fd77325d9ff8bcd47559a425dc883a820c646c628cd00faed82cb0f83f SHA512 1d17dfb14f99a894a6cda256caf9ec481c14068aaf8f3a85fa3befa7c7cca7fca0f544a91a3a7c2f2fc55bab19b06a67ca79f55ac9081151d94478c7f611f8f7
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
index ee11149771c..b6ba0028c80 100644
--- 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
@@ -1,3 +1,5 @@
+https://github.com/libunwind/libunwind/commit/6382d6f5c9d4d149989e47b20446f794365137c1
+
From 0f3f41a86842f2b19aa07af5242cb775ef9b20d3 Mon Sep 17 00:00:00 2001
From: "Jory A. Pratt" <anarchy@gentoo.org>
Date: Sat, 30 Jun 2018 22:44:22 -0500
diff --git a/sys-libs/libunwind/libunwind-1.6.0_rc2.ebuild b/sys-libs/libunwind/libunwind-1.6.2.ebuild
index 2c27a4785c8..62c11c5c04c 100644
--- a/sys-libs/libunwind/libunwind-1.6.0_rc2.ebuild
+++ b/sys-libs/libunwind/libunwind-1.6.2.ebuild
@@ -5,19 +5,19 @@ EAPI=7
MY_PV=${PV/_/-}
MY_P=${PN}-${MY_PV}
-inherit autotools flag-o-matic libtool multilib-minimal
+inherit autotools multilib-minimal
DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
HOMEPAGE="https://savannah.nongnu.org/projects/libunwind"
SRC_URI="mirror://nongnu/libunwind/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
LICENSE="MIT"
SLOT="0/8" # libunwind.so.8
-#KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv -sparc ~x86 ~amd64-linux ~x86-linux"
-KEYWORDS="~riscv"
-IUSE="debug debug-frame doc libatomic lzma static-libs zlib"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv -sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug debug-frame doc libatomic lzma static-libs test zlib"
-RESTRICT="test" # some tests are broken (toolchain version dependent, rely on external binaries)
+RESTRICT="test !test? ( test )" # some tests are broken (toolchain version dependent, rely on external binaries)
# We just use the header from libatomic.
RDEPEND="
@@ -27,8 +27,6 @@ RDEPEND="
DEPEND="${RDEPEND}
libatomic? ( dev-libs/libatomic_ops[${MULTILIB_USEDEP}] )"
-S="${WORKDIR}/${MY_P}"
-
MULTILIB_WRAPPED_HEADERS=(
/usr/include/libunwind.h
@@ -47,47 +45,43 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/libunwind-x86_64.h
)
-PATCHES=(
- # needs refresh:
- #"${FILESDIR}"/${PN}-1.2.1-only-include-execinfo_h-if-avaliable.patch
-)
-
src_prepare() {
default
+
chmod +x src/ia64/mk_cursor_i || die
- # Since we have tests disabled via RESTRICT, disable building in the subdir
- # entirely. This works around some build errors too. #484846
- sed -i -e '/^SUBDIRS/s:tests::' Makefile.in || die
- elibtoolize
eautoreconf
}
multilib_src_configure() {
- # --enable-cxx-exceptions: always enable it, headers provide the interface
- # and on some archs it is disabled by default causing a mismatch between the
- # API and the ABI, bug #418253
- # conservative-checks: validate memory addresses before use; as of 1.0.1,
- # only x86_64 supports this, yet may be useful for debugging, couple it with
- # debug useflag.
- ECONF_SOURCE="${S}" \
- ac_cv_header_atomic_ops_h=$(usex libatomic) \
- econf \
- --enable-cxx-exceptions \
- --enable-coredump \
- --enable-ptrace \
- --enable-setjmp \
- $(use_enable debug-frame) \
- $(use_enable doc documentation) \
- $(use_enable lzma minidebuginfo) \
- $(use_enable static-libs static) \
- $(use_enable zlib zlibdebuginfo) \
- $(use_enable debug conservative_checks) \
+ 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)
+ $(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
+ # bug #586208
CCACHE_NODIRECT=1 default
}
@@ -98,5 +92,5 @@ multilib_src_test() {
}
multilib_src_install_all() {
- find "${D}" -name "*.la" -type f -delete || die
+ find "${ED}" -name "*.la" -type f -delete || die
}
diff --git a/sys-libs/liburing/Manifest b/sys-libs/liburing/Manifest
index 274dba18060..397baaaf055 100644
--- a/sys-libs/liburing/Manifest
+++ b/sys-libs/liburing/Manifest
@@ -1,3 +1 @@
-DIST liburing-0.7.tar.bz2 86386 BLAKE2B a4fa00cc8e384f9909f3c628d479774beaffd5ab09c9f321ef22bfbabd273e4c8d4dbb30a3280633e89e1a79e893348e68f0aa2f3b1b4deda56759f77d9b1875 SHA512 9a23bc08e0fa59273264295859dddbe3276b2911df6d937b3c6f7647a250a3175222b5f051f3094efc98e48cacd242511327c5c5b895ebde10c8c87929ba4328
-DIST liburing-2.0.tar.bz2 109066 BLAKE2B e2be57f66d2a40650c74502bef55e646986443450b2cdf4d2b5247a3fa099178ae19e61a20e4452dc723351053b613a96743f1268004939da9fddd8f38df3fa5 SHA512 a0da3472eb876c9cfbe56abe14b4d926e4d1c362ee9c4f38eec4c4ab01edab6d76651ffe2afe5cac8589caadc02517950974332eb7990f8bcc9f4f4800b66e33
DIST liburing-2.1.tar.bz2 120806 BLAKE2B 3a09d1504150ed1c111f064187d868fd86ec7c3dbf661f73999f7fbb9c945b528f7ab2e0cfff5d270a1a977f04deedc7c790b6df8708ef2884fbf28c1a9ffd1b SHA512 a658454869b01752b5e499c4f0b50c342a8ff63b3dd1a473a96f9fad03f22a6e4d2354b0e658a4e7e50ea27440a84ee274856b3687803583bc80cb4bc45aec71
diff --git a/sys-libs/liburing/files/liburing-0.7-ucontext_h-detection.patch b/sys-libs/liburing/files/liburing-0.7-ucontext_h-detection.patch
deleted file mode 100644
index 24b847d919d..00000000000
--- a/sys-libs/liburing/files/liburing-0.7-ucontext_h-detection.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 1cf969dfcba797a02d74540965677b92d3884cfa Mon Sep 17 00:00:00 2001
-From: Simon Zeni <simon@bl4ckb0ne.ca>
-Date: Tue, 27 Oct 2020 22:31:21 -0400
-Subject: [PATCH] examples: disable ucontext-cp if ucontext.h is not available
-
-The header file `ucontext.h` is not available on musl based distros. The
-example `ucontext-cp` is not built if `configure` fails to locate the
-header.
-
-Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
----
- configure | 21 +++++++++++++++++++++
- examples/Makefile | 6 +++++-
- 2 files changed, 26 insertions(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index c911f59..3b96cde 100755
---- a/configure
-+++ b/configure
-@@ -287,6 +287,24 @@ if compile_prog_cxx "" "" "C++"; then
- fi
- print_config "C++" "$has_cxx"
-
-+##########################################
-+# check for ucontext support
-+has_ucontext="no"
-+cat > $TMPC << EOF
-+#include <ucontext.h>
-+int main(int argc, char **argv)
-+{
-+ ucontext_t ctx;
-+ getcontext(&ctx);
-+ return 0;
-+}
-+EOF
-+if compile_prog "" "" "has_ucontext"; then
-+ has_ucontext="yes"
-+fi
-+print_config "has_ucontext" "$has_ucontext"
-+
-+
- #############################################################################
-
- if test "$__kernel_rwf_t" = "yes"; then
-@@ -304,6 +322,9 @@ fi
- if test "$has_cxx" = "yes"; then
- output_sym "CONFIG_HAVE_CXX"
- fi
-+if test "$has_ucontext" = "yes"; then
-+ output_sym "CONFIG_HAVE_UCONTEXT"
-+fi
-
- echo "CC=$cc" >> $config_host_mak
- print_config "CC" "$cc"
-diff --git a/examples/Makefile b/examples/Makefile
-index 0eec627..60c1b71 100644
---- a/examples/Makefile
-+++ b/examples/Makefile
-@@ -10,7 +10,11 @@ ifneq ($(MAKECMDGOALS),clean)
- include ../config-host.mak
- endif
-
--all_targets += io_uring-test io_uring-cp link-cp ucontext-cp
-+all_targets += io_uring-test io_uring-cp link-cp
-+
-+ifdef CONFIG_HAVE_UCONTEXT
-+all_targets += ucontext-cp
-+endif
-
- all: $(all_targets)
-
diff --git a/sys-libs/liburing/files/liburing-2.0-spec_version.patch b/sys-libs/liburing/files/liburing-2.0-spec_version.patch
deleted file mode 100644
index fab05916c36..00000000000
--- a/sys-libs/liburing/files/liburing-2.0-spec_version.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 1815337f7dbb530ae3e3bc1175d8da214cf76eb5 Mon Sep 17 00:00:00 2001
-From: Stefan Hajnoczi <stefanha@redhat.com>
-Date: Tue, 9 Mar 2021 14:19:12 +0000
-Subject: [PATCH] spec: bump version to 2.0
-
-The shared library is now liburing.so.2 but the pkgconfig and rpm files
-still say 0.7. Existing binaries link against liburing.so.1 and will not
-automatically pick up the new liburing.so.2 shared library.
-
-Update the version number in liburing.spec so
-
-Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-Link: https://lore.kernel.org/r/20210309141913.262131-2-stefanha@redhat.com
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
----
- liburing.spec | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/liburing.spec b/liburing.spec
-index fa4d9704..8607074c 100644
---- a/liburing.spec
-+++ b/liburing.spec
-@@ -1,5 +1,5 @@
- Name: liburing
--Version: 0.7
-+Version: 2.0
- Release: 1%{?dist}
- Summary: Linux-native io_uring I/O access library
- License: (GPLv2 with exceptions and LGPLv2+) or MIT
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 00000000000..a652b052148
--- /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/liburing-0.7-r1.ebuild b/sys-libs/liburing/liburing-0.7-r1.ebuild
deleted file mode 100644
index 715212503eb..00000000000
--- a/sys-libs/liburing/liburing-0.7-r1.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2021 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"
-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 ppc ppc64 sparc x86"
-fi
-LICENSE="MIT"
-SLOT="0/1.0.7" # liburing.so version
-
-IUSE="static-libs"
-# fsync test hangs forever
-RESTRICT="test"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-0.7-ucontext_h-detection.patch
-)
-
-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.0-r1.ebuild b/sys-libs/liburing/liburing-2.0-r1.ebuild
deleted file mode 100644
index 652b4092a8b..00000000000
--- a/sys-libs/liburing/liburing-2.0-r1.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2021 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"
-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 ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-LICENSE="MIT"
-SLOT="0/2.0.0" # liburing.so version
-
-IUSE="static-libs"
-# fsync test hangs forever
-RESTRICT="test"
-
-PATCHES=(
- "${FILESDIR}/${P}-spec_version.patch" #809095
-)
-
-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.ebuild b/sys-libs/liburing/liburing-2.1.ebuild
index 6d65622e2a7..268300b356e 100644
--- a/sys-libs/liburing/liburing-2.1.ebuild
+++ b/sys-libs/liburing/liburing-2.1.ebuild
@@ -12,7 +12,7 @@ if [[ "${PV}" == *9999 ]] ; then
EGIT_REPO_URI="https://github.com/axboe/liburing.git"
else
SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv sparc x86"
fi
LICENSE="MIT"
SLOT="0/2" # liburing.so major version
@@ -21,6 +21,11 @@ IUSE="static-libs"
# fsync test hangs forever
RESTRICT="test"
+PATCHES=(
+ # Upstream, bug #816798
+ "${FILESDIR}"/${P}-arm-syscall.patch
+)
+
src_prepare() {
default
multilib_copy_sources
diff --git a/sys-libs/liburing/liburing-9999.ebuild b/sys-libs/liburing/liburing-9999.ebuild
index 6d65622e2a7..72d3d7d1fa2 100644
--- a/sys-libs/liburing/liburing-9999.ebuild
+++ b/sys-libs/liburing/liburing-9999.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit multilib-minimal toolchain-funcs
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.20.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.20.ebuild
index f31e856bc88..6b7c1ae7612 100644
--- a/sys-libs/libxcrypt/libxcrypt-4.4.20.ebuild
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.20.ebuild
@@ -106,8 +106,8 @@ get_xclibdir() {
multilib_src_configure() {
local -a myconf=(
--disable-werror
- --libdir=$(get_xclibdir)
- --with-pkgconfigdir=/usr/$(get_libdir)/pkgconfig
+ --libdir="${EPREFIX}"$(get_xclibdir)
+ --with-pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
--includedir="${EPREFIX}/usr/include/$(usex system '' 'xcrypt')"
)
@@ -157,8 +157,8 @@ src_install() {
) || die "failglob error"
# Remove useless stuff from installation
- find "${D}"/usr/share/doc/${PF} -type l -delete || die
- find "${D}" -name '*.la' -delete || die
+ find "${ED}"/usr/share/doc/${PF} -type l -delete || die
+ find "${ED}" -name '*.la' -delete || die
}
multilib_src_install() {
@@ -167,7 +167,7 @@ multilib_src_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) \
+ rm "${ED}"$(get_xclibdir)/libcrypt$(get_libname) \
|| die "failed to remove extra compat libraries"
;;
xcrypt_nocompat-*)
@@ -181,7 +181,7 @@ multilib_src_install() {
if [[ -n ${static_libs[*]} ]]; then
dodir "/usr/$(get_xclibdir)"
- mv "${static_libs[@]}" "${D}/usr/$(get_xclibdir)" \
+ mv "${static_libs[@]}" "${ED}/usr/$(get_xclibdir)" \
|| die "Moving static libs failed"
fi
fi
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.26.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.25-r1.ebuild
index dca937cb958..13858d39650 100644
--- a/sys-libs/libxcrypt/libxcrypt-4.4.26.ebuild
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.25-r1.ebuild
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{8..10} )
# NEED_BOOTSTRAP is for developers to quickly generate a tarball
# for publishing to the tree.
NEED_BOOTSTRAP="no"
-inherit multibuild multilib python-any-r1 multilib-minimal
+inherit multibuild multilib python-any-r1 toolchain-funcs multilib-minimal
DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others"
HOMEPAGE="https://github.com/besser82/libxcrypt"
@@ -20,7 +20,7 @@ fi
LICENSE="LGPL-2.1+ public-domain BSD BSD-2"
SLOT="0/1"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
IUSE="+compat split-usr static-libs system test"
REQUIRED_USE="split-usr? ( system )"
RESTRICT="!test? ( test )"
@@ -42,6 +42,17 @@ python_check_deps() {
has_version -b "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=(
$(usex compat 'xcrypt_compat' '')
@@ -97,6 +108,10 @@ src_prepare() {
}
src_configure() {
+ # Avoid possible "illegal instruction" errors with gold
+ # bug #821496
+ tc-ld-disable-gold
+
multibuild_foreach_variant multilib-minimal_src_configure
}
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.25.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.26-r1.ebuild
index dca937cb958..fa017859016 100644
--- a/sys-libs/libxcrypt/libxcrypt-4.4.25.ebuild
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.26-r1.ebuild
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{8..10} )
# NEED_BOOTSTRAP is for developers to quickly generate a tarball
# for publishing to the tree.
NEED_BOOTSTRAP="no"
-inherit multibuild multilib python-any-r1 multilib-minimal
+inherit multibuild multilib python-any-r1 toolchain-funcs multilib-minimal
DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others"
HOMEPAGE="https://github.com/besser82/libxcrypt"
@@ -42,6 +42,17 @@ python_check_deps() {
has_version -b "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=(
$(usex compat 'xcrypt_compat' '')
@@ -97,6 +108,10 @@ src_prepare() {
}
src_configure() {
+ # Avoid possible "illegal instruction" errors with gold
+ # bug #821496
+ tc-ld-disable-gold
+
multibuild_foreach_variant multilib-minimal_src_configure
}
diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest
index 10303759a73..e08cd107ad6 100644
--- a/sys-libs/llvm-libunwind/Manifest
+++ b/sys-libs/llvm-libunwind/Manifest
@@ -1,4 +1,4 @@
-DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
+DIST llvmorg-13.0.1-rc1.tar.gz 147284646 BLAKE2B 3a1d8d382de633b7f8fc998f8ad1e03c24b733aefc591615cbd34115d1d6d74962ae33bbf2224527b521a76930ffee425527225563a558a04173e9aa9487c781 SHA512 d487bfc9b898ad0046e0c94338d7757d8a05a1a84d683abfbc9ed4994c6d12caf88fd18575225e284070fc67b3ac0970ca6639e61b1a7cc2948b216a5364a22d
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.ebuild
index 5c57e2bc3cd..60740434146 100644
--- a/sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.ebuild
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://github.com/llvm-mirror/libunwind"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~x64-macos"
+KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~x64-macos"
IUSE="debug static-libs test"
RESTRICT="!test? ( test )"
@@ -55,6 +55,7 @@ multilib_src_configure() {
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
-DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ -DLIBUNWIND_TARGET_TRIPLE="${CHOST}"
-DLLVM_INCLUDE_TESTS=$(usex test)
# support non-native unwinding; given it's small enough,
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-13.0.1.9999.ebuild
index 5d782b4128b..b2e400ff295 100644
--- a/sys-libs/llvm-libunwind/llvm-libunwind-13.0.0.9999.ebuild
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-13.0.1.9999.ebuild
@@ -55,6 +55,7 @@ multilib_src_configure() {
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
-DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ -DLIBUNWIND_TARGET_TRIPLE="${CHOST}"
-DLLVM_INCLUDE_TESTS=$(usex test)
# support non-native unwinding; given it's small enough,
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-10.0.1.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-13.0.1_rc1.ebuild
index ad26bc1602f..b2e400ff295 100644
--- a/sys-libs/llvm-libunwind/llvm-libunwind-10.0.1.ebuild
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-13.0.1_rc1.ebuild
@@ -4,18 +4,15 @@
EAPI=7
CMAKE_ECLASS=cmake
-PYTHON_COMPAT=( python3_{7..9} )
-inherit cmake-multilib llvm llvm.org python-any-r1
+PYTHON_COMPAT=( python3_{8..10} )
+inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="C++ runtime stack unwinder from LLVM"
HOMEPAGE="https://github.com/llvm-mirror/libunwind"
-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"
+KEYWORDS=""
IUSE="debug static-libs test"
RESTRICT="!test? ( test )"
@@ -25,7 +22,12 @@ DEPEND="
>=sys-devel/llvm-6"
BDEPEND="
test? ( >=sys-devel/clang-3.9.0
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )"
+
+LLVM_COMPONENTS=( libunwind libcxx llvm/cmake )
+LLVM_TEST_COMPONENTS=( libcxxabi )
+llvm.org_set_globals
python_check_deps() {
has_version "dev-python/lit[${PYTHON_USEDEP}]"
@@ -36,17 +38,32 @@ pkg_setup() {
}
multilib_src_configure() {
+ local use_compiler_rt=OFF
local libdir=$(get_libdir)
+ # link to compiler-rt
+ # https://github.com/gentoo/gentoo/pull/21516
+ if tc-is-clang; then
+ local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
+ ${LD_FLAGS} -print-libgcc-file-name)
+ if [[ ${compiler_rt} == *libclang_rt* ]]; then
+ use_compiler_rt=ON
+ fi
+ fi
+
local mycmakeargs=(
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
-DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ -DLIBUNWIND_TARGET_TRIPLE="${CHOST}"
-DLLVM_INCLUDE_TESTS=$(usex test)
# support non-native unwinding; given it's small enough,
# enable it unconditionally
-DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
+
+ # avoid dependency on libgcc_s if compiler-rt is used
+ -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
)
if use test; then
local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
@@ -62,10 +79,7 @@ multilib_src_configure() {
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
+wrap_libcxxabi() {
local mycmakeargs=(
-DLIBCXXABI_LIBDIR_SUFFIX=
-DLIBCXXABI_ENABLE_SHARED=OFF
@@ -73,18 +87,18 @@ build_libcxxabi() {
-DLIBCXXABI_USE_LLVM_UNWINDER=ON
-DLIBCXXABI_INCLUDE_TESTS=OFF
- -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
+ -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
-DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include
)
- cmake_src_configure
- cmake_src_compile
+ local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
+ local CMAKE_USE_DIR=${WORKDIR}/libcxxabi
+ local BUILD_DIR=${BUILD_DIR}/libcxxabi
+
+ "${@}"
}
-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
+wrap_libcxx() {
local mycmakeargs=(
-DLIBCXX_LIBDIR_SUFFIX=
-DLIBCXX_ENABLE_SHARED=OFF
@@ -99,15 +113,21 @@ build_libcxx() {
-DLIBCXX_INCLUDE_TESTS=OFF
)
- cmake_src_configure
- cmake_src_compile
+ local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/libcxxabi/lib -L${BUILD_DIR}/$(get_libdir)"
+ local CMAKE_USE_DIR=${WORKDIR}/libcxx
+ local BUILD_DIR=${BUILD_DIR}/libcxx
+
+ "${@}"
}
multilib_src_test() {
# build local copies of libc++ & libc++abi for testing to avoid
# circular deps
- build_libcxxabi
- build_libcxx
+ wrap_libcxx cmake_src_configure
+ wrap_libcxx cmake_build generate-cxx-headers
+ wrap_libcxxabi cmake_src_configure
+ wrap_libcxxabi cmake_src_compile
+ wrap_libcxx cmake_src_compile
mv "${BUILD_DIR}"/libcxx*/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
local -x LIT_PRESERVES_TMP=1
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-14.0.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-14.0.0.9999.ebuild
index 5d782b4128b..b2e400ff295 100644
--- a/sys-libs/llvm-libunwind/llvm-libunwind-14.0.0.9999.ebuild
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-14.0.0.9999.ebuild
@@ -55,6 +55,7 @@ multilib_src_configure() {
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
-DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ -DLIBUNWIND_TARGET_TRIPLE="${CHOST}"
-DLLVM_INCLUDE_TESTS=$(usex test)
# support non-native unwinding; given it's small enough,
diff --git a/sys-libs/musl/files/ldconfig.in-r1 b/sys-libs/musl/files/ldconfig.in-r1
new file mode 100644
index 00000000000..7bf254dfd91
--- /dev/null
+++ b/sys-libs/musl/files/ldconfig.in-r1
@@ -0,0 +1,155 @@
+#!/bin/bash -e
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+ROOT="/"
+LDSO_CONF="/etc/ld.so.conf"
+
+VERBOSE=0
+
+UPDATE_LINKS=1
+
+get_options() {
+ while getopts "vnNXf:C:r:p" opt "$@"; do
+ case $opt in
+ v)
+ echo "ldconfig for musl in Gentoo"
+ VERBOSE=1
+ ;;
+ r)
+ ROOT=${OPTARG}
+ LDSO_CONF=${ROOT}${LDSO_CONF}
+ LDSO_CONF_DIR=$(dirname ${LDSO_CONF})
+ ;;
+ f)
+ LDSO_CONF=${OPTARG}
+ ;;
+ X)
+ UPDATE_LINKS=0
+ ;;
+ \?)
+ echo "Invalid option: -${opt}" >&2
+ exit 1
+ ;;
+ n|N|C|p)
+ echo "Unimplemented option: -${opt}" >&2
+ exit 1
+ ;;
+ esac
+ done
+
+ if [[ ${UPDATE_LINKS} == 1 ]]; then
+ echo "Updating links is not implemented."
+ fi
+}
+
+
+repeated() {
+ local l=${1}
+ local drs="${@:2}"
+ for m in ${drs}; do
+ [[ ${m} == ${l} ]] && return 0
+ done
+ return 1
+}
+
+expand() {
+ # We are assuming the ld.so.conf's 'include' is not recursive
+ local f line l
+ local glob="${LDSO_CONF_DIR}/${1}"
+ local drs="${@:2} "
+
+ for f in ${glob}; do
+ [[ ! -f ${f} ]] && continue
+ while read line; do
+ line=${line%%#*}
+ line=${line//:/ }
+ line=${line//,/ }
+ for l in ${line}; do
+ # We must add this whether or not the directory exists
+ repeated ${l} ${drs} && continue
+ drs+=" ${l} "
+ done
+ done < ${f}
+ done
+
+ echo ${drs}
+}
+
+read_ldso_conf() {
+ local drs=" "
+
+ while read line; do
+ # Sanitize the line - see ldconfig(8) for delimiters
+ # Note: bash read turns tabs into spaces and read already
+ # delimits on newlines with the default $IFS
+ line=${line%%#*} # Remove comments
+ line=${line//:/ } # Change colon delimiter to space
+ line=${line//,/ } # Change comma delimiter to space
+
+ next=0
+ for l in ${line}; do
+ if [[ ${next} == 1 ]]; then
+ next=0
+ drs=$(expand ${l} ${drs})
+ elif [[ ${l} == "include" ]]; then
+ next=1
+ else
+ # glibc's ldconfig silently skips non directories
+ if [[ -d ${l} ]]; then
+ repeated ${l} ${drs} && continue
+ drs+=" ${l} "
+ fi
+ fi
+ done
+ done < ${1}
+
+ echo ${drs}
+}
+
+sanitize() {
+ local drs=$@
+
+ repeated "/lib" ${drs} || drs="/lib ${drs}"
+ repeated "/usr/lib" ${drs} || drs="/usr/lib ${drs}"
+
+ echo ${drs}
+}
+
+changed() {
+ [[ -f ${ETC_LDSO_PATH} ]] || return 0
+ local current=$(<${ETC_LDSO_PATH})
+ current=${current//$'\n'/ }
+ [[ ${current} != ${drs} ]] || return 1
+}
+
+get_options "$@"
+
+if [[ ! -e ${LDSO_CONF} ]]; then
+ echo "${LDSO_CONF} not found" >&2
+ exit 1
+fi
+
+LDSO_CONF_DIR=$(dirname ${LDSO_CONF})
+
+drs=$(read_ldso_conf "${LDSO_CONF}")
+drs=$(sanitize ${drs})
+
+ARCH=@@ARCH@@
+LDSO_PATH="${ROOT}/lib/ld-musl-${ARCH}.so.1"
+if [[ ! -e ${LDSO_PATH} ]]; then
+ echo "${LDSO_PATH} not found" >&2
+ exit 1
+fi
+
+LDSO_ARCH=$(basename ${LDSO_PATH})
+LDSO_NAME=${LDSO_ARCH%.so.1}
+ETC_LDSO_PATH="${ROOT}/etc/${LDSO_NAME}.path"
+
+changed || exit 0
+X=$(mktemp -p /tmp ${LDSO_NAME}.XXXXXX)
+for d in ${drs}; do
+ echo ${d} >> ${X}
+done
+chmod 644 ${X}
+mv ${X} ${ETC_LDSO_PATH}
diff --git a/sys-libs/musl/files/ldconfig.in-r2 b/sys-libs/musl/files/ldconfig.in-r2
new file mode 100644
index 00000000000..72a2f58bc74
--- /dev/null
+++ b/sys-libs/musl/files/ldconfig.in-r2
@@ -0,0 +1,157 @@
+#!/bin/bash -e
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+ROOT="/"
+LDSO_CONF="/etc/ld.so.conf"
+
+VERBOSE=0
+
+UPDATE_LINKS=1
+
+get_options() {
+ while getopts "vnNXf:C:r:p" opt "$@"; do
+ case $opt in
+ v)
+ echo "ldconfig for musl in Gentoo"
+ VERBOSE=1
+ ;;
+ r)
+ ROOT=${OPTARG}
+ LDSO_CONF=${ROOT}${LDSO_CONF}
+ LDSO_CONF_DIR=$(dirname ${LDSO_CONF})
+ ;;
+ f)
+ LDSO_CONF=${OPTARG}
+ ;;
+ X)
+ UPDATE_LINKS=0
+ ;;
+ \?)
+ echo "Invalid option: -${opt}" >&2
+ exit 1
+ ;;
+ n|N|C|p)
+ echo "Unimplemented option: -${opt}" >&2
+ exit 1
+ ;;
+ esac
+ done
+
+ if [[ ${UPDATE_LINKS} == 1 ]]; then
+ echo "Updating links is not implemented."
+ fi
+}
+
+
+repeated() {
+ local l=${1}
+ local drs="${@:2}"
+ for m in ${drs}; do
+ [[ ${m} == ${l} ]] && return 0
+ done
+ return 1
+}
+
+expand() {
+ # We are assuming the ld.so.conf's 'include' is not recursive
+ local f line l
+ local glob="${LDSO_CONF_DIR}/${1}"
+ local drs="${@:2} "
+
+ for f in ${glob}; do
+ [[ ! -f ${f} ]] && continue
+ while read line; do
+ line=${line%%#*}
+ line=${line//:/ }
+ line=${line//,/ }
+ for l in ${line}; do
+ # We must add this whether or not the directory exists
+ repeated ${l} ${drs} && continue
+ drs+=" ${l} "
+ done
+ done < ${f}
+ done
+
+ echo ${drs}
+}
+
+read_ldso_conf() {
+ local drs=" "
+
+ while read line; do
+ # Sanitize the line - see ldconfig(8) for delimiters
+ # Note: bash read turns tabs into spaces and read already
+ # delimits on newlines with the default $IFS
+ line=${line%%#*} # Remove comments
+ line=${line//:/ } # Change colon delimiter to space
+ line=${line//,/ } # Change comma delimiter to space
+
+ next=0
+ for l in ${line}; do
+ if [[ ${next} == 1 ]]; then
+ next=0
+ drs=$(expand ${l} ${drs})
+ elif [[ ${l} == "include" ]]; then
+ next=1
+ else
+ # glibc's ldconfig silently skips non directories
+ if [[ -d ${l} ]]; then
+ repeated ${l} ${drs} && continue
+ drs+=" ${l} "
+ fi
+ fi
+ done
+ done < ${1}
+
+ echo ${drs}
+}
+
+sanitize() {
+ local drs=$@
+
+ repeated "/lib" ${drs} || drs="/lib ${drs}"
+ repeated "/usr/lib" ${drs} || drs="/usr/lib ${drs}"
+
+ echo ${drs}
+}
+
+changed() {
+ [[ -f ${ETC_LDSO_PATH} ]] || return 0
+ local current=$(<${ETC_LDSO_PATH})
+ current=${current//$'\n'/ }
+ [[ ${current} != ${drs} ]] || return 1
+}
+
+get_options "$@"
+
+if [[ ! -e ${LDSO_CONF} ]]; then
+ echo "${LDSO_CONF} not found" >&2
+ exit 1
+fi
+
+LDSO_CONF_DIR=$(dirname ${LDSO_CONF})
+
+drs=$(read_ldso_conf "${LDSO_CONF}")
+drs=$(sanitize ${drs})
+
+ARCH=@@ARCH@@
+LDSO_PATH="${ROOT}/lib/ld-musl-${ARCH}.so.1"
+if [[ ! -e ${LDSO_PATH} ]]; then
+ echo "${LDSO_PATH} not found" >&2
+ exit 1
+fi
+
+LDSO_ARCH=$(basename ${LDSO_PATH})
+LDSO_NAME=${LDSO_ARCH%.so.1}
+ETC_LDSO_PATH="${ROOT}/etc/${LDSO_NAME}.path"
+
+changed || exit 0
+X=$(mktemp -p /tmp ${LDSO_NAME}.XXXXXX)
+for d in ${drs}; do
+ echo ${d} >> ${X}
+done
+chmod 644 ${X}
+# busybox doesn't support mz -Z
+cp ${X} ${ETC_LDSO_PATH}
+rm ${X}
diff --git a/sys-libs/musl/metadata.xml b/sys-libs/musl/metadata.xml
index ffcc1ba7137..e3dfac351e2 100644
--- a/sys-libs/musl/metadata.xml
+++ b/sys-libs/musl/metadata.xml
@@ -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.2.2-r4.ebuild b/sys-libs/musl/musl-1.2.2-r4.ebuild
new file mode 100644
index 00000000000..868577f61ad
--- /dev/null
+++ b/sys-libs/musl/musl-1.2.2-r4.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eapi8-dosym flag-o-matic toolchain-funcs
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.musl-libc.org/musl"
+ inherit git-r3
+else
+ SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz"
+ KEYWORDS="-* amd64 arm arm64 ~mips ppc ppc64 x86"
+fi
+GETENT_COMMIT="93a08815f8598db442d8b766b463d0150ed8e2ab"
+GETENT_FILE="musl-getent-${GETENT_COMMIT}.c"
+SRC_URI+="
+ https://dev.gentoo.org/~blueness/musl-misc/getconf.c
+ https://gitlab.alpinelinux.org/alpine/aports/-/raw/${GETENT_COMMIT}/main/musl/getent.c -> ${GETENT_FILE}
+ https://dev.gentoo.org/~blueness/musl-misc/iconv.c
+"
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
+HOMEPAGE="https://musl.libc.org"
+LICENSE="MIT LGPL-2 GPL-2"
+SLOT="0"
+IUSE="headers-only"
+
+QA_SONAME="/usr/lib/libc.so"
+QA_DT_NEEDED="/usr/lib/libc.so"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+just_headers() {
+ use headers-only && is_crosscompile
+}
+
+pkg_setup() {
+ if [ ${CTARGET} == ${CHOST} ] ; then
+ case ${CHOST} in
+ *-musl*) ;;
+ *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
+ esac
+ fi
+
+ # fix for #667126, copied from glibc ebuild
+ # make sure host make.conf doesn't pollute us
+ if is_crosscompile || tc-is-cross-compiler ; then
+ CHOST=${CTARGET} strip-unsupported-flags
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ else
+ unpack "${P}.tar.gz"
+ fi
+ mkdir misc || die
+ cp "${DISTDIR}"/getconf.c misc/getconf.c || die
+ cp "${DISTDIR}/${GETENT_FILE}" misc/getent.c || die
+ cp "${DISTDIR}"/iconv.c misc/iconv.c || die
+}
+
+src_prepare() {
+ default
+
+ # Expand gethostid instead of being just a stub
+ eapply "${FILESDIR}/${PN}-1.2.2-gethostid.patch"
+}
+
+src_configure() {
+ tc-getCC ${CTARGET}
+ just_headers && export CC=true
+
+ local sysroot
+ is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET}
+ ./configure \
+ --target=${CTARGET} \
+ --prefix=${sysroot}/usr \
+ --syslibdir=${sysroot}/lib \
+ --disable-gcc-wrapper || die
+}
+
+src_compile() {
+ emake obj/include/bits/alltypes.h
+ just_headers && return 0
+
+ emake
+ if [[ ${CATEGORY} != cross-* ]] ; then
+ emake -C "${T}" getconf getent iconv \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ VPATH="${WORKDIR}/misc"
+ fi
+
+ $(tc-getCC) ${CFLAGS} -c -o libssp_nonshared.o "${FILESDIR}"/stack_chk_fail_local.c || die
+ $(tc-getAR) -rcs libssp_nonshared.a libssp_nonshared.o || die
+}
+
+src_install() {
+ local target="install"
+ just_headers && target="install-headers"
+ emake DESTDIR="${D}" ${target}
+ just_headers && return 0
+
+ # musl provides ldd via a sym link to its ld.so
+ local sysroot
+ is_crosscompile && sysroot=/usr/${CTARGET}
+ local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*)
+ dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
+
+ if [[ ${CATEGORY} != cross-* ]] ; then
+ # Fish out of config:
+ # ARCH = ...
+ # SUBARCH = ...
+ # and print $(ARCH)$(SUBARCH).
+ local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak)
+
+ if [[ ! -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] ; then
+ # During cross (using crossdev), when emerging sys-libs/musl,
+ # if /usr/lib/libc.so.1 doesn't exist on the system, installation
+ # would fail.
+ #
+ # The musl build system seems to create a symlink:
+ # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute)
+ # During cross, there's no guarantee that the host is using musl
+ # so that file may not exist. Use a relative symlink within ${D}
+ # instead.
+ dosym8 -r /usr/lib/libc.so /lib/ld-musl-${arch}.so.1
+
+ # If it's still a dead symlnk, OK, we really do need to abort.
+ [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die
+ fi
+
+ cp "${FILESDIR}"/ldconfig.in "${T}" || die
+ sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
+ into /
+ dosbin "${T}"/ldconfig
+ into /usr
+ dobin "${T}"/getconf
+ dobin "${T}"/getent
+ dobin "${T}"/iconv
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
+ doenvd "${T}"/00musl
+ dolib.a libssp_nonshared.a
+ fi
+}
+
+pkg_postinst() {
+ is_crosscompile && return 0
+
+ [ "${ROOT}" != "/" ] && return 0
+
+ ldconfig || die
+}
diff --git a/sys-libs/musl/musl-1.2.2-r6.ebuild b/sys-libs/musl/musl-1.2.2-r6.ebuild
new file mode 100644
index 00000000000..79a60682c79
--- /dev/null
+++ b/sys-libs/musl/musl-1.2.2-r6.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eapi8-dosym flag-o-matic toolchain-funcs
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.musl-libc.org/musl"
+ inherit git-r3
+else
+ SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz"
+ KEYWORDS="-* amd64 arm arm64 ~mips ppc ppc64 x86"
+fi
+GETENT_COMMIT="93a08815f8598db442d8b766b463d0150ed8e2ab"
+GETENT_FILE="musl-getent-${GETENT_COMMIT}.c"
+SRC_URI+="
+ https://dev.gentoo.org/~blueness/musl-misc/getconf.c
+ https://gitlab.alpinelinux.org/alpine/aports/-/raw/${GETENT_COMMIT}/main/musl/getent.c -> ${GETENT_FILE}
+ https://dev.gentoo.org/~blueness/musl-misc/iconv.c
+"
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
+HOMEPAGE="https://musl.libc.org"
+LICENSE="MIT LGPL-2 GPL-2"
+SLOT="0"
+IUSE="headers-only"
+
+QA_SONAME="/usr/lib/libc.so"
+QA_DT_NEEDED="/usr/lib/libc.so"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+just_headers() {
+ use headers-only && is_crosscompile
+}
+
+pkg_setup() {
+ if [ ${CTARGET} == ${CHOST} ] ; then
+ case ${CHOST} in
+ *-musl*) ;;
+ *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
+ esac
+ fi
+
+ # fix for #667126, copied from glibc ebuild
+ # make sure host make.conf doesn't pollute us
+ if is_crosscompile || tc-is-cross-compiler ; then
+ CHOST=${CTARGET} strip-unsupported-flags
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ else
+ unpack "${P}.tar.gz"
+ fi
+ mkdir misc || die
+ cp "${DISTDIR}"/getconf.c misc/getconf.c || die
+ cp "${DISTDIR}/${GETENT_FILE}" misc/getent.c || die
+ cp "${DISTDIR}"/iconv.c misc/iconv.c || die
+}
+
+src_prepare() {
+ default
+
+ # Expand gethostid instead of being just a stub
+ eapply "${FILESDIR}/${PN}-1.2.2-gethostid.patch"
+}
+
+src_configure() {
+ tc-getCC ${CTARGET}
+ just_headers && export CC=true
+
+ local sysroot
+ is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET}
+ ./configure \
+ --target=${CTARGET} \
+ --prefix=${sysroot}/usr \
+ --syslibdir=${sysroot}/lib \
+ --disable-gcc-wrapper || die
+}
+
+src_compile() {
+ emake obj/include/bits/alltypes.h
+ just_headers && return 0
+
+ emake
+ if [[ ${CATEGORY} != cross-* ]] ; then
+ emake -C "${T}" getconf getent iconv \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ VPATH="${WORKDIR}/misc"
+ fi
+
+ $(tc-getCC) ${CFLAGS} -c -o libssp_nonshared.o "${FILESDIR}"/stack_chk_fail_local.c || die
+ $(tc-getAR) -rcs libssp_nonshared.a libssp_nonshared.o || die
+}
+
+src_install() {
+ local target="install"
+ just_headers && target="install-headers"
+ emake DESTDIR="${D}" ${target}
+ just_headers && return 0
+
+ # musl provides ldd via a sym link to its ld.so
+ local sysroot
+ is_crosscompile && sysroot=/usr/${CTARGET}
+ local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*)
+ dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
+
+ if [[ ${CATEGORY} != cross-* ]] ; then
+ # Fish out of config:
+ # ARCH = ...
+ # SUBARCH = ...
+ # and print $(ARCH)$(SUBARCH).
+ local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak)
+
+ if [[ ! -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] ; then
+ # During cross (using crossdev), when emerging sys-libs/musl,
+ # if /usr/lib/libc.so.1 doesn't exist on the system, installation
+ # would fail.
+ #
+ # The musl build system seems to create a symlink:
+ # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute)
+ # During cross, there's no guarantee that the host is using musl
+ # so that file may not exist. Use a relative symlink within ${D}
+ # instead.
+ dosym8 -r /usr/lib/libc.so /lib/ld-musl-${arch}.so.1
+
+ # If it's still a dead symlnk, OK, we really do need to abort.
+ [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die
+ fi
+
+ cp "${FILESDIR}"/ldconfig.in-r1 "${T}"/ldconfig.in || die
+ sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
+ into /
+ dosbin "${T}"/ldconfig
+ into /usr
+ dobin "${T}"/getconf
+ dobin "${T}"/getent
+ dobin "${T}"/iconv
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
+ doenvd "${T}"/00musl
+ dolib.a libssp_nonshared.a
+ fi
+}
+
+pkg_postinst() {
+ is_crosscompile && return 0
+
+ [ "${ROOT}" != "/" ] && return 0
+
+ ldconfig || die
+}
diff --git a/sys-libs/musl/musl-1.2.2-r7.ebuild b/sys-libs/musl/musl-1.2.2-r7.ebuild
new file mode 100644
index 00000000000..dac76c21342
--- /dev/null
+++ b/sys-libs/musl/musl-1.2.2-r7.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eapi8-dosym flag-o-matic toolchain-funcs
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.musl-libc.org/musl"
+ inherit git-r3
+else
+ SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz"
+ KEYWORDS="-* ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86"
+fi
+GETENT_COMMIT="93a08815f8598db442d8b766b463d0150ed8e2ab"
+GETENT_FILE="musl-getent-${GETENT_COMMIT}.c"
+SRC_URI+="
+ https://dev.gentoo.org/~blueness/musl-misc/getconf.c
+ https://gitlab.alpinelinux.org/alpine/aports/-/raw/${GETENT_COMMIT}/main/musl/getent.c -> ${GETENT_FILE}
+ https://dev.gentoo.org/~blueness/musl-misc/iconv.c
+"
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
+HOMEPAGE="https://musl.libc.org"
+LICENSE="MIT LGPL-2 GPL-2"
+SLOT="0"
+IUSE="headers-only"
+
+QA_SONAME="/usr/lib/libc.so"
+QA_DT_NEEDED="/usr/lib/libc.so"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+just_headers() {
+ use headers-only && is_crosscompile
+}
+
+pkg_setup() {
+ if [ ${CTARGET} == ${CHOST} ] ; then
+ case ${CHOST} in
+ *-musl*) ;;
+ *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
+ esac
+ fi
+
+ # fix for #667126, copied from glibc ebuild
+ # make sure host make.conf doesn't pollute us
+ if is_crosscompile || tc-is-cross-compiler ; then
+ CHOST=${CTARGET} strip-unsupported-flags
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ else
+ unpack "${P}.tar.gz"
+ fi
+ mkdir misc || die
+ cp "${DISTDIR}"/getconf.c misc/getconf.c || die
+ cp "${DISTDIR}/${GETENT_FILE}" misc/getent.c || die
+ cp "${DISTDIR}"/iconv.c misc/iconv.c || die
+}
+
+src_prepare() {
+ default
+
+ # Expand gethostid instead of being just a stub
+ eapply "${FILESDIR}/${PN}-1.2.2-gethostid.patch"
+}
+
+src_configure() {
+ tc-getCC ${CTARGET}
+ just_headers && export CC=true
+
+ local sysroot
+ is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET}
+ ./configure \
+ --target=${CTARGET} \
+ --prefix=${sysroot}/usr \
+ --syslibdir=${sysroot}/lib \
+ --disable-gcc-wrapper || die
+}
+
+src_compile() {
+ emake obj/include/bits/alltypes.h
+ just_headers && return 0
+
+ emake
+ if [[ ${CATEGORY} != cross-* ]] ; then
+ emake -C "${T}" getconf getent iconv \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ VPATH="${WORKDIR}/misc"
+ fi
+
+ $(tc-getCC) ${CFLAGS} -c -o libssp_nonshared.o "${FILESDIR}"/stack_chk_fail_local.c || die
+ $(tc-getAR) -rcs libssp_nonshared.a libssp_nonshared.o || die
+}
+
+src_install() {
+ local target="install"
+ just_headers && target="install-headers"
+ emake DESTDIR="${D}" ${target}
+ just_headers && return 0
+
+ # musl provides ldd via a sym link to its ld.so
+ local sysroot
+ is_crosscompile && sysroot=/usr/${CTARGET}
+ local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*)
+ dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
+
+ if [[ ${CATEGORY} != cross-* ]] ; then
+ # Fish out of config:
+ # ARCH = ...
+ # SUBARCH = ...
+ # and print $(ARCH)$(SUBARCH).
+ local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak)
+
+ if [[ ! -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] ; then
+ # During cross (using crossdev), when emerging sys-libs/musl,
+ # if /usr/lib/libc.so.1 doesn't exist on the system, installation
+ # would fail.
+ #
+ # The musl build system seems to create a symlink:
+ # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute)
+ # During cross, there's no guarantee that the host is using musl
+ # so that file may not exist. Use a relative symlink within ${D}
+ # instead.
+ dosym8 -r /usr/lib/libc.so /lib/ld-musl-${arch}.so.1
+
+ # If it's still a dead symlnk, OK, we really do need to abort.
+ [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die
+ fi
+
+ cp "${FILESDIR}"/ldconfig.in-r2 "${T}"/ldconfig.in || die
+ sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
+ into /
+ dosbin "${T}"/ldconfig
+ into /usr
+ dobin "${T}"/getconf
+ dobin "${T}"/getent
+ dobin "${T}"/iconv
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
+ doenvd "${T}"/00musl
+ dolib.a libssp_nonshared.a
+ fi
+}
+
+pkg_postinst() {
+ is_crosscompile && return 0
+
+ [ "${ROOT}" != "/" ] && return 0
+
+ ldconfig || die
+}
diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild
index 56a2bbbc42f..6a5e2688dd5 100644
--- a/sys-libs/musl/musl-9999.ebuild
+++ b/sys-libs/musl/musl-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit flag-o-matic toolchain-funcs
+inherit eapi8-dosym flag-o-matic toolchain-funcs
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="git://git.musl-libc.org/musl"
inherit git-r3
@@ -120,8 +120,24 @@ src_install() {
# 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
+
+ if [[ ! -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] ; then
+ # During cross (using crossdev), when emerging sys-libs/musl,
+ # if /usr/lib/libc.so.1 doesn't exist on the system, installation
+ # would fail.
+ #
+ # The musl build system seems to create a symlink:
+ # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute)
+ # During cross, there's no guarantee that the host is using musl
+ # so that file may not exist. Use a relative symlink within ${D}
+ # instead.
+ dosym8 -r /usr/lib/libc.so /lib/ld-musl-${arch}.so.1
+
+ # If it's still a dead symlnk, OK, we really do need to abort.
+ [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die
+ fi
+
+ cp "${FILESDIR}"/ldconfig.in-r1 "${T}"/ldconfig.in || die
sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
into /
dosbin "${T}"/ldconfig
diff --git a/sys-libs/ncurses/Manifest b/sys-libs/ncurses/Manifest
index 3f504d0580a..71621376f4c 100644
--- a/sys-libs/ncurses/Manifest
+++ b/sys-libs/ncurses/Manifest
@@ -1,2 +1,6 @@
DIST ncurses-6.2-20210619-patch.sh.bz2 836967 BLAKE2B f210bf25c33f11d67e54a6f416aae75f0a976880ea543408780fd3a8dc992ee8d9999bf15c925c79504be0f30ade4bbfaed763abedd2b2d6b35de65b353a6314 SHA512 b8392bf6c0b7570766ae31a043df311660201265dfe3e2e49425b1e2aa08c72030b5f5b6c7871532897596262c88a7192e3ff2adfdc618f1b9c13c22c373eeb3
DIST ncurses-6.2.tar.gz 3425862 BLAKE2B 6680cd7a369a4cb8234442a70869c283f0db6db9d7da1da2a7a5c519eb862a2c9b9411957d99f9ebb5089cad00b42e1ca6bc0784327461113df2eeaec695913c SHA512 4c1333dcc30e858e8a9525d4b9aefb60000cfc727bc4a1062bace06ffc4639ad9f6e54f6bdda0e3a0e5ea14de995f96b52b3327d9ec633608792c99a1e8d840d
+DIST ncurses-6.3-20211026.patch.gz 117363 BLAKE2B 74c6c80271edc3b69d17c891436e48ee0579b3d16dd1bbd42f953be5b6ef07596343abd34f4d508b0cb371c1c0febfec12d65e938739892a617c8b141f599753 SHA512 25a99bc9cb7a18eb8fd16a0f887bae90c2551e0228b077d28f7217e58190f4b19a526350c999922f7394a1b749e834643c1bf5f339248b842717c146a3ec1df4
+DIST ncurses-6.3-20211030.patch.gz 46304 BLAKE2B 6fa0f5223c97dc045117c208b92e75aad61638585506aeed0fa5cd6b215f67d212fc780e527f1281ae77063edb1ef9b3a3671b00d306fe322c3ca1b34c1d4d81 SHA512 90440af3959a17388999f07a3b40f770c5511bceda6a39d4c56f867dc5ae8494e49cfb700eb79e31422ebfd1b1990f6d7912083c688963139446f1e43e9d08c8
+DIST ncurses-6.3-20211106.patch.gz 3995 BLAKE2B fbacfd6bfbf64b2935d47f648bd74c93136ea8d17b51e218b80a24695b52246ce8ec01704a0636692bae72815c8b93dec8573570dfd126b19645ec90926e818a SHA512 799819ed01967387fdca4755ab44401f0dc90306f6f771c894ce6702c929e2ff87f45d3e1c2e683cc32bb01553f3332c3a7591a00b7a4bdff93da25307379bdc
+DIST ncurses-6.3.tar.gz 3583550 BLAKE2B b2c174ac48d587b4d3aa054f04e4ec8bffd8a657a4aff5f090104965c741901e600712c8f8e5e98f3b8a26bc558996a1e14a746f113854832853b855e9d406c3 SHA512 5373f228cba6b7869210384a607a2d7faecfcbfef6dbfcd7c513f4e84fbd8bcad53ac7db2e7e84b95582248c1039dcfc7c4db205a618f7da22a166db482f0105
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 2448229b88e..00000000000
--- 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 decdc267790..00000000000
--- 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.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 66345b51fe2..00000000000
--- 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/ncurses-6.2_p20210619.ebuild b/sys-libs/ncurses/ncurses-6.2_p20210619.ebuild
index 2b2a6df484d..464f7ca0bcc 100644
--- a/sys-libs/ncurses/ncurses-6.2_p20210619.ebuild
+++ b/sys-libs/ncurses/ncurses-6.2_p20210619.ebuild
@@ -20,7 +20,7 @@ fi
LICENSE="MIT"
# The subslot reflects the SONAME.
SLOT="0/6"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="ada +cxx debug doc gpm minimal profile static-libs test tinfo trace"
RESTRICT="!test? ( test )"
@@ -93,7 +93,7 @@ src_configure() {
CXXFLAGS=${BUILD_CXXFLAGS} \
CPPFLAGS=${BUILD_CPPFLAGS} \
LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
- do_configure cross --without-shared --with-normal
+ do_configure cross --without-shared --with-normal --with-progs
fi
multilib-minimal_src_configure
}
diff --git a/sys-libs/ncurses/ncurses-6.2-r1.ebuild b/sys-libs/ncurses/ncurses-6.3.ebuild
index 718ab0d0f1f..0faa70d2aa5 100644
--- a/sys-libs/ncurses/ncurses-6.2-r1.ebuild
+++ b/sys-libs/ncurses/ncurses-6.3.ebuild
@@ -9,18 +9,21 @@ 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"
+SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz
+ https://invisible-mirror.net/archives/${PN}/${MY_P}.tar.gz
+ ftp://ftp.invisible-island.net/${PN}/${MY_P}.tar.gz"
if [[ "${PV}" == *_p* ]] ; then
SRC_URI+=" ftp://ftp.invisible-island.net/${PN}/${PV/_p*}/${P/_p/-}-patch.sh.bz2
https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${P/_p/-}-patch.sh.bz2"
+ #SRC_URI+=" https://dev.gentoo.org/~polynomial-c/dist/${P}.patch.xz"
fi
LICENSE="MIT"
# The subslot reflects the SONAME.
SLOT="0/6"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="ada +cxx debug doc gpm minimal profile static-libs test threads tinfo trace unicode"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="ada +cxx debug doc gpm minimal profile static-libs test tinfo trace"
RESTRICT="!test? ( test )"
DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
@@ -38,15 +41,14 @@ 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"
+ "${FILESDIR}/${PN}-6.2_p20210123-cppflags-cross.patch" #601426
)
src_prepare() {
if [[ "${PV}" == *_p* ]] ; then
eapply "${WORKDIR}"/${P/_p/-}-patch.sh
+ #eapply "${WORKDIR}/${P}.patch"
fi
default
}
@@ -63,9 +65,9 @@ src_configure() {
# checking configure flags.
NCURSES_TARGETS=(
ncurses
- $(usex unicode 'ncursesw' '')
- $(usex threads 'ncursest' '')
- $(use unicode && usex threads 'ncursestw' '')
+ ncursesw
+ ncursest
+ ncursestw
)
# When installing ncurses, we have to use a compatible version of tic.
@@ -87,12 +89,13 @@ src_configure() {
# We can't re-use the multilib BUILD_DIR because we run outside of it.
BUILD_DIR="${WORKDIR}" \
+ CC=${BUILD_CC} \
CHOST=${CBUILD} \
CFLAGS=${BUILD_CFLAGS} \
CXXFLAGS=${BUILD_CXXFLAGS} \
CPPFLAGS=${BUILD_CPPFLAGS} \
LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
- do_configure cross --without-shared --with-normal
+ do_configure cross --without-shared --with-normal --with-progs
fi
multilib-minimal_src_configure
}
@@ -158,6 +161,7 @@ do_configure() {
$(use_with trace)
$(use_with tinfo termlib)
--disable-stripping
+ --disable-pkg-ldflags
)
if [[ ${target} == ncurses*w ]] ; then
@@ -187,7 +191,7 @@ do_configure() {
# Force bash until upstream rebuilds the configure script with a newer
# version of autotools. #545532
- CONFIG_SHELL=${EPREFIX}/bin/bash \
+ #CONFIG_SHELL=${EPREFIX}/bin/bash \
ECONF_SOURCE="${S}" \
econf "${conf[@]}" "$@"
}
@@ -248,8 +252,7 @@ multilib_src_install() {
if multilib_is_native_abi ; then
gen_usr_ldscript -a \
"${NCURSES_TARGETS[@]}" \
- $(use tinfo && usex unicode 'tinfow' '') \
- $(usev tinfo)
+ $(usex tinfo 'tinfow tinfo' '')
fi
if ! tc-is-static-only ; then
# Provide a link for -lcurses.
@@ -316,10 +319,10 @@ multilib_src_install_all() {
pkg_preinst() {
preserve_old_lib /$(get_libdir)/libncurses.so.5
- use unicode && preserve_old_lib /$(get_libdir)/libncursesw.so.5
+ 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
+ preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5
}
diff --git a/sys-libs/ncurses/ncurses-6.3_p20211106.ebuild b/sys-libs/ncurses/ncurses-6.3_p20211106.ebuild
new file mode 100644
index 00000000000..6c1bee31282
--- /dev/null
+++ b/sys-libs/ncurses/ncurses-6.3_p20211106.ebuild
@@ -0,0 +1,354 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs multilib multilib-minimal preserve-libs usr-ldscript
+
+MY_PV="${PV:0:3}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="console display library"
+HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/"
+SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz
+ https://invisible-mirror.net/archives/${PN}/${MY_P}.tar.gz
+ ftp://ftp.invisible-island.net/${PN}/${MY_P}.tar.gz"
+
+if [[ "${PV}" == *_p* ]] ; then
+ # Sometimes, after releases, there's no megapatch available yet.
+ #
+ # From upstream README at e.g. https://invisible-mirror.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."
+ #
+ # This array should contain a list of all the snapshots since the last
+ # release if there's no megapatch available yet.
+ PATCH_DATES=(
+ 20211026
+ 20211030
+ # Latest patch is just _pN = $(ver_cut 4)
+ $(ver_cut 4)
+ )
+
+ if [[ -z ${PATCH_DATES[@]} ]] ; then
+ SRC_URI+=" ftp://ftp.invisible-island.net/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.bz2
+ https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.bz2"
+ else
+ patch_date=
+ for patch_date in "${PATCH_DATES[@]}" ; do
+ SRC_URI+=" ftp://ftp.invisible-island.net/${PN}/${PV/_p*}/${MY_P}-${patch_date}.patch.gz"
+ SRC_URI+=" https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-${patch_date}.patch.gz"
+ done
+ unset patch_date
+ fi
+
+ #SRC_URI+=" https://dev.gentoo.org/~polynomial-c/dist/${P}.patch.xz"
+fi
+
+LICENSE="MIT"
+# The subslot reflects the SONAME.
+SLOT="0/6"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="ada +cxx debug doc gpm minimal profile static-libs test tinfo trace"
+RESTRICT="!test? ( test )"
+
+DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
+# berkdb? ( sys-libs/db )"
+# Block the older ncurses that installed all files w/SLOT=5. #557472
+RDEPEND="${DEPEND}
+ !<=sys-libs/ncurses-5.9-r4:5
+ !<sys-libs/slang-2.3.2_pre23
+ !<x11-terms/rxvt-unicode-9.06-r3
+ !<x11-terms/st-0.6-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.7-nongnu.patch"
+ "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" #192083 #383871
+ "${FILESDIR}/${PN}-6.0-pkg-config.patch"
+ "${FILESDIR}/${PN}-6.0-ticlib.patch" #557360
+ "${FILESDIR}/${PN}-6.2_p20210123-cppflags-cross.patch" #601426
+)
+
+src_prepare() {
+ if [[ "${PV}" == *_p* ]] ; then
+ #eapply "${WORKDIR}"/${P/_p/-}-patch.sh
+ eapply "${WORKDIR}"/
+ fi
+ default
+}
+
+src_configure() {
+ unset TERMINFO #115036
+ tc-export_build_env BUILD_{CC,CPP}
+ BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642
+
+ # Build the various variants of ncurses -- narrow, wide, and threaded. #510440
+ # Order matters here -- we want unicode/thread versions to come last so that the
+ # binaries in /usr/bin support both wide and narrow.
+ # The naming is also important as we use these directly with filenames and when
+ # checking configure flags.
+ NCURSES_TARGETS=(
+ ncurses
+ ncursesw
+ ncursest
+ ncursestw
+ )
+
+ # When installing ncurses, we have to use a compatible version of tic.
+ # This comes up when cross-compiling, doing multilib builds, upgrading,
+ # or installing for the first time. Build a local copy of tic whenever
+ # the host version isn't available. #249363 #557598
+ if ! has_version -b "~sys-libs/${P}:0" ; then
+ local lbuildflags="-static"
+
+ # some toolchains don't quite support static linking
+ local dbuildflags="-Wl,-rpath,${WORKDIR}/lib"
+ case ${CHOST} in
+ *-darwin*) dbuildflags= ;;
+ *-solaris*) dbuildflags="-Wl,-R,${WORKDIR}/lib" ;;
+ esac
+ echo "int main() {}" | \
+ $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \
+ || lbuildflags="${dbuildflags}"
+
+ # We can't re-use the multilib BUILD_DIR because we run outside of it.
+ BUILD_DIR="${WORKDIR}" \
+ CC=${BUILD_CC} \
+ CHOST=${CBUILD} \
+ CFLAGS=${BUILD_CFLAGS} \
+ CXXFLAGS=${BUILD_CXXFLAGS} \
+ CPPFLAGS=${BUILD_CPPFLAGS} \
+ LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
+ do_configure cross --without-shared --with-normal --with-progs
+ fi
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local t
+ for t in "${NCURSES_TARGETS[@]}" ; do
+ do_configure "${t}"
+ done
+}
+
+do_configure() {
+ local target=$1
+ shift
+
+ mkdir "${BUILD_DIR}/${target}" || die
+ cd "${BUILD_DIR}/${target}" || die
+
+ local conf=(
+ # We need the basic terminfo files in /etc, bug #37026. We will
+ # add '--with-terminfo-dirs' and then populate /etc/terminfo in
+ # src_install() ...
+ --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo"
+
+ # Disabled until #245417 is sorted out.
+ #$(use_with berkdb hashed-db)
+
+ # Enable installation of .pc files.
+ --enable-pc-files
+ # This path is used to control where the .pc files are installed.
+ --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
+
+ # Now the rest of the various standard flags.
+ --with-shared
+ --without-hashed-db
+ $(use_with ada)
+ $(use_with cxx)
+ $(use_with cxx cxx-binding)
+ --with-cxx-shared
+ $(use_with debug)
+ $(use_with profile)
+ # The configure script uses ldd to parse the linked output which
+ # is flaky for cross-compiling/multilib/ldd versions/etc...
+ $(use_with gpm gpm libgpm.so.1)
+ # Required for building on mingw-w64, and possibly other windows
+ # platforms, bug #639670
+ $(use_enable kernel_Winnt term-driver)
+ --disable-termcap
+ --enable-symlinks
+ --with-rcs-ids
+ --with-manpage-format=normal
+ --enable-const
+ --enable-colorfgbg
+ --enable-hard-tabs
+ --enable-echo
+ $(use_enable !ada warnings)
+ $(use_with debug assertions)
+ $(use_enable !debug leaks)
+ $(use_with debug expanded)
+ $(use_with !debug macros)
+ $(multilib_native_with progs)
+ $(use_with test tests)
+ $(use_with trace)
+ $(use_with tinfo termlib)
+ --disable-stripping
+ --disable-pkg-ldflags
+ )
+
+ if [[ ${target} == ncurses*w ]] ; then
+ conf+=( --enable-widec )
+ else
+ conf+=( --disable-widec )
+ fi
+ if [[ ${target} == ncursest* ]] ; then
+ conf+=( --with-{pthread,reentrant} )
+ else
+ conf+=( --without-{pthread,reentrant} )
+ fi
+ # Make sure each variant goes in a unique location.
+ if [[ ${target} == "ncurses" ]] ; then
+ # "ncurses" variant goes into "${EPREFIX}"/usr/include
+ # It is needed on Prefix because the configure script appends
+ # "ncurses" to "${prefix}/include" if "${prefix}" is not /usr.
+ conf+=( --enable-overwrite )
+ else
+ conf+=( --includedir="${EPREFIX}"/usr/include/${target} )
+ fi
+ # See comments in src_configure.
+ if [[ ${target} != "cross" ]] ; then
+ local cross_path="${WORKDIR}/cross"
+ [[ -d ${cross_path} ]] && export TIC_PATH="${cross_path}/progs/tic"
+ fi
+
+ # Force bash until upstream rebuilds the configure script with a newer
+ # version of autotools. #545532
+ #CONFIG_SHELL=${EPREFIX}/bin/bash \
+ ECONF_SOURCE="${S}" \
+ econf "${conf[@]}" "$@"
+}
+
+src_compile() {
+ # See comments in src_configure.
+ if ! has_version -b "~sys-libs/${P}:0" ; then
+ # We could possibly merge these two branches but opting to be
+ # conservative when merging some of the Prefix changes.
+
+ if [[ ${CHOST} == *-cygwin* ]] && ! multilib_is_native_abi ; then
+ # We make 'tic$(x)' here, for Cygwin having x=".exe".
+ BUILD_DIR="${WORKDIR}" \
+ do_compile cross -C progs all PROGS='tic$(x)'
+ else
+ BUILD_DIR="${WORKDIR}" \
+ do_compile cross -C progs tic
+ fi
+ fi
+
+ multilib-minimal_src_compile
+}
+
+multilib_src_compile() {
+ local t
+ for t in "${NCURSES_TARGETS[@]}" ; do
+ do_compile "${t}"
+ done
+}
+
+do_compile() {
+ local target=$1
+ shift
+
+ cd "${BUILD_DIR}/${target}" || die
+
+ # A little hack to fix parallel builds ... they break when
+ # generating sources so if we generate the sources first (in
+ # non-parallel), we can then build the rest of the package
+ # in parallel. This is not really a perf hit since the source
+ # generation is quite small.
+ emake -j1 sources
+ # For some reason, sources depends on pc-files which depends on
+ # compiled libraries which depends on sources which ...
+ # Manually delete the pc-files file so the install step will
+ # create the .pc files we want.
+ rm -f misc/pc-files || die
+ emake "$@"
+}
+
+multilib_src_install() {
+ local target
+ for target in "${NCURSES_TARGETS[@]}" ; do
+ emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install
+ done
+
+ # Move main libraries into /.
+ if multilib_is_native_abi ; then
+ gen_usr_ldscript -a \
+ "${NCURSES_TARGETS[@]}" \
+ $(usex tinfo 'tinfow tinfo' '')
+ fi
+ if ! tc-is-static-only ; then
+ # Provide a link for -lcurses.
+ ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die
+ fi
+ # don't delete '*.dll.a', needed for linking #631468
+ if ! use static-libs; then
+ find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die
+ fi
+
+ # Build fails to create this ...
+ # -FIXME-
+ # Ugly hackaround for riscv having two parts libdir (#689240)
+ # Replace this hack with an official solution once we have one...
+ # -FIXME-
+ dosym $(sed 's@[^/]\+@..@g' <<< $(get_libdir))/share/terminfo \
+ /usr/$(get_libdir)/terminfo
+}
+
+multilib_src_install_all() {
+# if ! use berkdb ; then
+ # We need the basic terminfo files in /etc for embedded/recovery. #37026
+ einfo "Installing basic terminfo files in /etc..."
+ local terms=(
+ # Dumb/simple values that show up when using the in-kernel VT.
+ ansi console dumb linux
+ vt{52,100,102,200,220}
+ # [u]rxvt users used to be pretty common. Probably should drop this
+ # since upstream is dead and people are moving away from it.
+ rxvt{,-unicode}{,-256color}
+ # xterm users are common, as is terminals re-using/spoofing it.
+ xterm xterm-{,256}color
+ # screen is common (and reused by tmux).
+ screen{,-256color}
+ screen.xterm-256color
+ )
+ local x
+ for x in "${terms[@]}"; do
+ local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
+ local basedir=$(basename "$(dirname "${termfile}")")
+
+ if [[ -n ${termfile} ]] ; then
+ dodir "/etc/terminfo/${basedir}"
+ mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die
+ dosym "../../../../etc/terminfo/${basedir}/${x}" \
+ "/usr/share/terminfo/${basedir}/${x}"
+ fi
+ done
+# fi
+
+ echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses
+
+ use minimal && rm -r "${ED}"/usr/share/terminfo*
+ # Because ncurses5-config --terminfo returns the directory we keep it
+ keepdir /usr/share/terminfo #245374
+
+ cd "${S}" || die
+ dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc
+ if use doc ; then
+ docinto html
+ dodoc -r doc/html/
+ fi
+}
+
+pkg_preinst() {
+ preserve_old_lib /$(get_libdir)/libncurses.so.5
+ preserve_old_lib /$(get_libdir)/libncursesw.so.5
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /$(get_libdir)/libncurses.so.5
+ preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5
+}
diff --git a/sys-libs/newlib/newlib-4.1.0-r1.ebuild b/sys-libs/newlib/newlib-4.1.0-r1.ebuild
index a5ec41db3c4..a6ad7b9c65d 100644
--- a/sys-libs/newlib/newlib-4.1.0-r1.ebuild
+++ b/sys-libs/newlib/newlib-4.1.0-r1.ebuild
@@ -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}}
diff --git a/sys-libs/newlib/newlib-9999.ebuild b/sys-libs/newlib/newlib-9999.ebuild
index a5ec41db3c4..a6ad7b9c65d 100644
--- a/sys-libs/newlib/newlib-9999.ebuild
+++ b/sys-libs/newlib/newlib-9999.ebuild
@@ -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}}
diff --git a/sys-libs/openipmi/Manifest b/sys-libs/openipmi/Manifest
index 4628288dee8..7c7f6311fa0 100644
--- a/sys-libs/openipmi/Manifest
+++ b/sys-libs/openipmi/Manifest
@@ -1 +1,3 @@
DIST OpenIPMI-2.0.29.tar.gz 3119530 BLAKE2B 5c60b04e828699c396cb7ce29dca7665109d7b39c3d64535fafdca328c01eab0af9cc4d7fd1a30aa254836f6ce10a16e491fb7239777dc4d57edc65c20998504 SHA512 ff23aadfe4b9002574d1f06dda3d61f7a03ef1df2c61855516b7d67bd6d3272c53af74e3412e1045242dcb845f50b7c542083e918805c0efac424dd86e720a10
+DIST OpenIPMI-2.0.31.tar.gz 3129097 BLAKE2B 477d3c7abe0d04b3aa949b36c78ca149d92f4cea379e5be22a2718367f2fb3edac4d8487dd95bdf25b54b9c8c8d8d4ba1582b7bc65e416a8f1745b2790f405d7 SHA512 de1b364315e97daffb4c601bcf3bf33591795449d71690496ae368bd0730a117c1716508ecaddef5d55498f56e73481a32f509791185e80e2475667d7abd73e7
+DIST OpenIPMI-2.0.32.tar.gz 3140147 BLAKE2B 7f5d3f9e4a5a8388413d1cfb7d1b8bb1a46abce8404b408d4e505bb389e6f871b6f6d67560bcba9a5716dfcf95c5d3c27bbaf4a5fd7b924a629aa4546efde0c1 SHA512 e409f32e6bbf26756338ada386fa394d48d734b4d6ba4beca700ce60bc3af3d0f41e972a328c4e076ae014f4fbd8598d05d3f879f9c6d76198e6ae1a2ba03e95
diff --git a/sys-libs/openipmi/openipmi-2.0.31.ebuild b/sys-libs/openipmi/openipmi-2.0.31.ebuild
new file mode 100644
index 00000000000..c8b61d3259f
--- /dev/null
+++ b/sys-libs/openipmi/openipmi-2.0.31.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit autotools python-single-r1
+
+MY_PN="OpenIPMI"
+MY_P="${MY_PN}-${PV/_/-}"
+DESCRIPTION="Library interface to IPMI"
+HOMEPAGE="https://sourceforge.net/projects/openipmi/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="crypt snmp perl python static-libs tcl"
+RESTRICT="test"
+
+RDEPEND="
+ dev-libs/glib:2
+ sys-libs/gdbm:=
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ crypt? ( dev-libs/openssl:0= )
+ snmp? ( net-analyzer/net-snmp )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ tcl? ( dev-lang/tcl:0= )"
+DEPEND="${RDEPEND}
+ >=dev-lang/swig-1.3.21"
+BDEPEND="virtual/pkgconfig"
+
+# Gui is broken!
+# python? ( tcl? ( tk? ( dev-lang/tk dev-tcltk/tix ) ) )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0.26-tinfo.patch" #501510
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # Bug #298250: parallel install fix.
+ sed -r -i \
+ -e '/^install-data-local:/s,$, install-exec-am,g' \
+ cmdlang/Makefile.{am,in} || die
+
+ # We touch the .in and .am above because if we use the below, the Perl stuff
+ # is very fragile, and often fails to link.
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ # these binaries are for root!
+ --bindir="${EPREFIX}"/usr/sbin
+ --with-glib
+ --with-glibver=2.0
+ --with-swig
+ --without-tkinter
+ $(use_with snmp ucdsnmp yes)
+ $(use_with crypt openssl yes)
+ $(use_with perl perl yes)
+ $(use_with tcl tcl yes)
+ $(use_with python python yes)
+ )
+
+ # GUI is broken
+ #use tk && use python && use !tcl && \
+ # ewarn "Not building Tk GUI because it needs both Python AND Tcl"
+ #if use python && use tcl; then
+ # myconf+=( $(use_with tk tkinter) )
+ #else
+ # myconf+=( --without-tkinter )
+ #fi
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README* FAQ ChangeLog TODO doc/IPMI.pdf lanserv/README.vm
+ newdoc cmdlang/README README.cmdlang
+
+ use python && python_optimize
+
+ find "${ED}" -name "*.la" -delete || die
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}
diff --git a/sys-libs/openipmi/openipmi-2.0.32.ebuild b/sys-libs/openipmi/openipmi-2.0.32.ebuild
new file mode 100644
index 00000000000..c8b61d3259f
--- /dev/null
+++ b/sys-libs/openipmi/openipmi-2.0.32.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit autotools python-single-r1
+
+MY_PN="OpenIPMI"
+MY_P="${MY_PN}-${PV/_/-}"
+DESCRIPTION="Library interface to IPMI"
+HOMEPAGE="https://sourceforge.net/projects/openipmi/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="crypt snmp perl python static-libs tcl"
+RESTRICT="test"
+
+RDEPEND="
+ dev-libs/glib:2
+ sys-libs/gdbm:=
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ crypt? ( dev-libs/openssl:0= )
+ snmp? ( net-analyzer/net-snmp )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ tcl? ( dev-lang/tcl:0= )"
+DEPEND="${RDEPEND}
+ >=dev-lang/swig-1.3.21"
+BDEPEND="virtual/pkgconfig"
+
+# Gui is broken!
+# python? ( tcl? ( tk? ( dev-lang/tk dev-tcltk/tix ) ) )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0.26-tinfo.patch" #501510
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # Bug #298250: parallel install fix.
+ sed -r -i \
+ -e '/^install-data-local:/s,$, install-exec-am,g' \
+ cmdlang/Makefile.{am,in} || die
+
+ # We touch the .in and .am above because if we use the below, the Perl stuff
+ # is very fragile, and often fails to link.
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ # these binaries are for root!
+ --bindir="${EPREFIX}"/usr/sbin
+ --with-glib
+ --with-glibver=2.0
+ --with-swig
+ --without-tkinter
+ $(use_with snmp ucdsnmp yes)
+ $(use_with crypt openssl yes)
+ $(use_with perl perl yes)
+ $(use_with tcl tcl yes)
+ $(use_with python python yes)
+ )
+
+ # GUI is broken
+ #use tk && use python && use !tcl && \
+ # ewarn "Not building Tk GUI because it needs both Python AND Tcl"
+ #if use python && use tcl; then
+ # myconf+=( $(use_with tk tkinter) )
+ #else
+ # myconf+=( --without-tkinter )
+ #fi
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README* FAQ ChangeLog TODO doc/IPMI.pdf lanserv/README.vm
+ newdoc cmdlang/README README.cmdlang
+
+ use python && python_optimize
+
+ find "${ED}" -name "*.la" -delete || die
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}
diff --git a/sys-libs/pam/pam-1.5.2-r1.ebuild b/sys-libs/pam/pam-1.5.2-r1.ebuild
new file mode 100644
index 00000000000..77719a8fded
--- /dev/null
+++ b/sys-libs/pam/pam-1.5.2-r1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_P="Linux-${PN^^}-${PV}"
+
+# Avoid QA warnings
+# Can reconsider w/ EAPI 8 and IDEPEND, bug #810979
+TMPFILES_OPTIONAL=1
+
+inherit autotools db-use fcaps toolchain-funcs 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"
+
+LICENSE="|| ( BSD GPL-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="audit berkdb debug nis selinux"
+
+BDEPEND="
+ 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}] )
+ 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"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+ touch ChangeLog || die
+ eautoreconf
+}
+
+multilib_src_configure() {
+ # Do not let user's BROWSER setting mess us up. #549684
+ unset BROWSER
+
+ local myconf=(
+ CC_FOR_BUILD="$(tc-getBUILD_CC)"
+ --with-db-uniquename=-$(db_findver sys-libs/db)
+ --with-xml-catalog=/etc/xml/catalog
+ --enable-securedir=/$(get_libdir)/security
+ --includedir=/usr/include/security
+ --libdir=/usr/$(get_libdir)
+ --enable-pie
+ --enable-unix
+ --disable-prelude
+ --disable-doc
+ --disable-regenerate-docu
+ --disable-static
+ --disable-Werror
+ $(use_enable audit)
+ $(use_enable berkdb db)
+ $(use_enable debug)
+ $(use_enable nis)
+ $(use_enable selinux)
+ --enable-isadir='.' #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 / | 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_wrapper/Manifest b/sys-libs/pam_wrapper/Manifest
index d4f66f3a2a4..d839c44aeea 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
diff --git a/sys-libs/pam_wrapper/pam_wrapper-1.1.3-r3.ebuild b/sys-libs/pam_wrapper/pam_wrapper-1.1.3-r3.ebuild
new file mode 100644
index 00000000000..fe217064fb7
--- /dev/null
+++ b/sys-libs/pam_wrapper/pam_wrapper-1.1.3-r3.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+CMAKE_ECLASS=cmake
+
+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 ~ppc ~ppc64 ~riscv ~sparc x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ sys-libs/pam:0=[${MULTILIB_USEDEP}]
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-util/cmocka[${MULTILIB_USEDEP}] )
+"
+
+multilib_src_configure() {
+ 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_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.ebuild b/sys-libs/pam_wrapper/pam_wrapper-1.1.4.ebuild
new file mode 100644
index 00000000000..96a3d1fd2aa
--- /dev/null
+++ b/sys-libs/pam_wrapper/pam_wrapper-1.1.4.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+CMAKE_ECLASS=cmake
+
+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 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ sys-libs/pam:0=[${MULTILIB_USEDEP}]
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-util/cmocka[${MULTILIB_USEDEP}] )
+"
+
+multilib_src_configure() {
+ 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_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/readline/readline-8.1_p1-r1.ebuild b/sys-libs/readline/readline-8.1_p1-r1.ebuild
index 7ee132fe1f1..36d25d6c4aa 100644
--- a/sys-libs/readline/readline-8.1_p1-r1.ebuild
+++ b/sys-libs/readline/readline-8.1_p1-r1.ebuild
@@ -6,7 +6,7 @@ EAPI=7
inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs usr-ldscript
# 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/_/-}"
diff --git a/sys-libs/talloc/talloc-2.3.3.ebuild b/sys-libs/talloc/talloc-2.3.3.ebuild
index 2b8eb265c04..10e40e65a72 100644
--- a/sys-libs/talloc/talloc-2.3.3.ebuild
+++ b/sys-libs/talloc/talloc-2.3.3.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
PYTHON_REQ_USE="threads(+)"
inherit waf-utils python-single-r1 multilib-minimal
diff --git a/sys-libs/tdb/Manifest b/sys-libs/tdb/Manifest
index 8b152902bb2..29a2d9316c2 100644
--- a/sys-libs/tdb/Manifest
+++ b/sys-libs/tdb/Manifest
@@ -1,3 +1 @@
-DIST tdb-1.4.3.tar.gz 702836 BLAKE2B 6593c3be527b383a7e8fd85b3613cf2429f6b665a7c609a56f57a6f5b41a080c1a681d712afd423c2bc1c741e06d7cd2c90949d9c5bf78ca834b18c64e23d51c SHA512 99488839e7da396f04df60412d21a7d3e09efeab52772d6cb5e9470a3dfd585d73ef2422c51cd0d8ccc123a65d455de400d5d6b24a21a2a50d3da60d9a70e67a
-DIST tdb-1.4.4.tar.gz 714367 BLAKE2B fdd84fc76a428b3b98ca481a9ef42c46d21f67f6ca8d92a90e6f0c1d24aa8f1f3b773c8fdcb43b572f8a1441349af491cb5d4ad9440d0b95fb51b89591510e27 SHA512 ef0a997aacebcc804e84ec4a14de8189513ddd1083ba677e421269c21a94f5ca8fc188185645855e5ef81417f4843c8649417ff28f286b768d690907d5d4cb07
DIST tdb-1.4.5.tar.gz 729650 BLAKE2B 5d8a226cf251268d70f68759fb792628559fa3b10e7843d1a53914ea24f0ceca61fe0c3f348d704ebc8df4c56fe2365690b585b1c96cf53d63ecae1960aca58a SHA512 373b2ce5b2c68fbc28b7679f0e7531115b91ddc6a68b27acada39b995f66b508b19f24d712fc4388654199abd69857e53ebd435d1ed47e3a69ba85ff667fed56
diff --git a/sys-libs/tdb/tdb-1.4.3.ebuild b/sys-libs/tdb/tdb-1.4.3.ebuild
deleted file mode 100644
index 34c29792999..00000000000
--- a/sys-libs/tdb/tdb-1.4.3.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-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 ~mips ppc ppc64 ~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} )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="${PYTHON_DEPS}
- app-text/docbook-xml-dtd:4.2
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-src_prepare() {
- default
- python_fix_shebang .
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local extra_opts=()
- if ! multilib_is_native_abi || ! use python; then
- extra_opts+=( --disable-python )
- fi
-
- waf-utils_src_configure "${extra_opts[@]}"
-}
-
-multilib_src_compile() {
- # need to avoid parallel building, this looks like the sanest way with waf-utils/multiprocessing eclasses
- unset MAKEOPTS
- waf-utils_src_compile
-}
-
-multilib_src_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
-}
diff --git a/sys-libs/tdb/tdb-1.4.4.ebuild b/sys-libs/tdb/tdb-1.4.4.ebuild
deleted file mode 100644
index 187196ce6f7..00000000000
--- a/sys-libs/tdb/tdb-1.4.4.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-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 ~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} )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="${PYTHON_DEPS}
- app-text/docbook-xml-dtd:4.2
-"
-
-WAF_BINARY="${S}/buildtools/bin/waf"
-
-src_prepare() {
- default
- python_fix_shebang .
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local extra_opts=()
- if ! multilib_is_native_abi || ! use python ; then
- extra_opts+=( --disable-python )
- fi
-
- waf-utils_src_configure "${extra_opts[@]}"
-}
-
-multilib_src_compile() {
- # need to avoid parallel building, this looks like the sanest way with waf-utils/multiprocessing eclasses
- unset MAKEOPTS
- waf-utils_src_compile
-}
-
-multilib_src_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
-}
diff --git a/sys-libs/tdb/tdb-1.4.5.ebuild b/sys-libs/tdb/tdb-1.4.5.ebuild
index e16b6ec87c6..2e3e41f8dba 100644
--- a/sys-libs/tdb/tdb-1.4.5.ebuild
+++ b/sys-libs/tdb/tdb-1.4.5.ebuild
@@ -13,7 +13,7 @@ SRC_URI="https://samba.org/ftp/tdb/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="python"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="test"
@@ -21,7 +21,8 @@ RESTRICT="test"
RDEPEND="
!elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] )
python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+ virtual/libcrypt"
BDEPEND="${PYTHON_DEPS}
app-text/docbook-xml-dtd:4.2"
diff --git a/sys-libs/tevent/tevent-0.11.0.ebuild b/sys-libs/tevent/tevent-0.11.0.ebuild
index 4539b95bc28..9f025158047 100644
--- a/sys-libs/tevent/tevent-0.11.0.ebuild
+++ b/sys-libs/tevent/tevent-0.11.0.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
PYTHON_REQ_USE="threads(+)"
inherit waf-utils multilib-minimal python-single-r1
diff --git a/sys-libs/timezone-data/Manifest b/sys-libs/timezone-data/Manifest
index 95722eb438f..628049e5ff6 100644
--- a/sys-libs/timezone-data/Manifest
+++ b/sys-libs/timezone-data/Manifest
@@ -1,2 +1,4 @@
DIST tzcode2021a.tar.gz 262204 BLAKE2B 4072685f2344602ffcfe32a7bf92d3b0d93e38ffca842f1c07a60db5e26f1f18ab32fc7b5f155b0bdab49f8d0bfcd5b58f4a192b4d06d7d9639893e5cb596328 SHA512 bf1d53bcbfecd3b09d57a9e6d3cb49b5dc5f8e1b6674b67e7f974e1a268c2aaf13ca89a7ef12f49d0665aff782bd72685e00c22a41ca88a028da0429f972fd45
+DIST tzcode2021e.tar.gz 273644 BLAKE2B 3331477d8107fb30b2c37d3a3afb212dda7ecf53aa553ea5070537bd1a4a01bf62e70adb2fb14c025e22d272d96ee51e9e5089c5c9790682d3c43cda0ded8680 SHA512 87b0335129ea41c5f42f687f548712e5da892baa8494cecf5d34851beceecf6ae52f22104696ed187713cf9e502570eb2041e277dfd3c043c11d0253bfde685a
DIST tzdata2021a.tar.gz 411892 BLAKE2B b8d177e90e22bd8a3fd23c9a9c19896cb245efd8e768b59ab8c63e56ab141e67331f3231e3a7c802f844375049cfd902e14e912ce677b3aea38fc0d968905e87 SHA512 7cdd762ec90ce12a30fa36b1d66d1ea82d9fa21e514e2b9c7fcbe2541514ee0fadf30843ff352c65512fb270857b51d1517b45e1232b89c6f954ba9ff1833bb3
+DIST tzdata2021e.tar.gz 422509 BLAKE2B e0e1189a1bbfb2ee641b9c4c8d00775372638d46d7aea72ff0c4bcb02b38a65eedaf89e6b272e054245c940369a50c2573e6fc720414e4ab3d45adeda8ed9c75 SHA512 c1e8d04e049157ed5d4af0868855bbd75517e3d7e1db9c41d5283ff260109de46b6fac6be94828201d093e163d868044ac2a9db2bf0aeab800e264d0c73a9119
diff --git a/sys-libs/timezone-data/timezone-data-2021e.ebuild b/sys-libs/timezone-data/timezone-data-2021e.ebuild
new file mode 100644
index 00000000000..6ff8d12c3bb
--- /dev/null
+++ b/sys-libs/timezone-data/timezone-data-2021e.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit toolchain-funcs flag-o-matic
+
+code_ver=${PV}
+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"
+
+LICENSE="BSD public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls leaps-timezone elibc_FreeBSD zic-slim"
+
+DEPEND="nls? ( virtual/libintl )"
+RDEPEND="${DEPEND}
+ !sys-libs/glibc[vanilla(+)]"
+
+src_unpack() {
+ mkdir -p "${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"
+
+ tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
+}
+
+src_configure() {
+ tc-export CC
+
+ append-lfs-flags #471102
+
+ if use elibc_FreeBSD || use elibc_Darwin ; then
+ append-cppflags -DSTD_INSPIRED #138251
+ 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
+ local c="${T}/test"
+ echo 'main(){}' > "${c}.c"
+ 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() {
+ _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)" \
+ 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
+
+ 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
+ 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
+ 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
+}