summaryrefslogtreecommitdiff
path: root/sys-libs/libcap
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
commit21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch)
treee1810a4b135afce04b34862ef0fab2bfaeb8aeca /sys-libs/libcap
parent7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff)
gentoo resync : 15.01.2020
Diffstat (limited to 'sys-libs/libcap')
-rw-r--r--sys-libs/libcap/Manifest12
-rw-r--r--sys-libs/libcap/files/libcap-2.29-build-system-fixes.patch213
-rw-r--r--sys-libs/libcap/files/libcap-2.29-libpsx_pkgconfig.patch88
-rw-r--r--sys-libs/libcap/libcap-2.26-r2.ebuild2
-rw-r--r--sys-libs/libcap/libcap-2.27.ebuild2
-rw-r--r--sys-libs/libcap/libcap-2.28-r1.ebuild2
-rw-r--r--sys-libs/libcap/libcap-2.29-r3.ebuild85
-rw-r--r--sys-libs/libcap/libcap-2.30.ebuild84
8 files changed, 482 insertions, 6 deletions
diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest
index ad4022dfd361..f22d174c5699 100644
--- a/sys-libs/libcap/Manifest
+++ b/sys-libs/libcap/Manifest
@@ -4,10 +4,16 @@ AUX libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch 988 BLAKE2B 63417032
AUX libcap-2.26-no-perl.patch 2483 BLAKE2B 34d20ca017119a40e31e2da64786a93c1d5468558e8dfcfb15f3758b6648aaad38bf333c11b35a2c8c4cb66d823e4daefed93b7073a0a65225fe9ef3494ff9ef SHA512 750a64c7b45fd145a043f29b8262c9f972aa4dcfb76afed9e440365c0e55d67d0103491e67a34f0f24ee580656e2fffd589b46b0c5a04b4c9e05b5dac6bbe994
AUX libcap-2.28-build-system-fixes.patch 6163 BLAKE2B e4222dd22d84576d008a0029e855d6e55f7b5aee4fb49a4c04b60501e0bca92d0f58f0751892d5d5e911e67a8f282c32fc8438ad741c662cd3b22625fad94c6e SHA512 3af48ebb13ca1076bce279ef646d66ca73e8c88a54a7698f785a1afdd1019884cc507f0d4f100b6b9e39b7a277131149b818f8d079f4a6e8b2f397c435e84180
AUX libcap-2.28-no_perl.patch 2599 BLAKE2B 55a6ef3573517e7cd7f367b811a5b6edc2b91974a23e99a31e1704dd5bcda90dfa3b7fde69c37f48c8ad1d97d0c8d68441830f7cc94adacb50cb54246519cb89 SHA512 40d739250a3508538f7083da700efe47628acd6b213e806b5c9d321ce55ce870dd58073459991b235d3cd3190b53e62e1fcc11f79779bda9239f3e042fb9428b
+AUX libcap-2.29-build-system-fixes.patch 6642 BLAKE2B 747ca2279f1b44ed9d89a318fb06e5efda96388020cda126870dba0754e4651a3d4f2c171470da52cd51dfb6f7dfc57b635ac805160dd2bc995337f2bc12221a SHA512 e82497d111ac96b2fe20d245ba731d5e085a3039a4eacd9da5b598d84293bffcf40da50284139006c9d895d4274dd83811ef05d08e50e72fea44ff23873945fe
+AUX libcap-2.29-libpsx_pkgconfig.patch 2710 BLAKE2B 8f934b875e287ffdcdca063048bf2af564966ff1884fa2daa69cc7f956e7d2dab7e1e8283ffff142cbf8b1cdfcd2fcd24ed0a785aa6b2d3f9217a7aca78118ec SHA512 acf212c8cc9a60d16fa44c3a6506b207b198cb00c03ad816d54ecb9570ccaa4880f792a1bf3f9686cb5d5e52d41bd213fef64ba1145a9ea8f1332d7628f3509a
DIST libcap-2.26.tar.xz 67172 BLAKE2B 9d1952bd03e1bba5ffa225a5088b8d841c2007219bbb9524f979ac65e472bf932db496acf93984fa77fe42e71d45b85cd603ca461a071fb4742526dfbc5f66eb SHA512 1c2d59f007226405a924950b2c2090393527e06f0692a84e6463e33915a070df61a9070b8f30a624d5630ddd39290eac117e5d440577d1edd48510195b9d12f0
DIST libcap-2.27.tar.xz 67780 BLAKE2B 7b58d7afdd90281771a302cd9554f067b9e3636b0c052935973d8a0d890490c3933b3513874b788a8c10e37ab5ad9cfa766408c9629b7c8562cb17bfdef87747 SHA512 e32335fd3e0d1564574acc73df7030b5b0fd98875217bffabd76f2765f1a7a6f1369f03df2ee22a1782776838784e342378c10613ea1163d53ae5055ab6a62b6
DIST libcap-2.28.tar.xz 94244 BLAKE2B 9416ca78da0b985c25682746b5f5d052835d29ed40e2ffb2f70e3e59753423c91176a41f7d32b28d75800ccfccc5ed446050985a44471f0d0cc4cc9e0ef69661 SHA512 e693ac97483f575bb8a3f4d50262082e6d0d4906f2df48a4f52db4dde21014fcdc683d40712294c7c59d1be21740276bd20b486afee53815dc49e57a9938c5eb
-EBUILD libcap-2.26-r2.ebuild 2043 BLAKE2B 40b475415abc00cb2c5c622739d4928f34a5e1eb217a3b7bf14634de1c405f56d1dcf840e0b53a88cc4656c7ebb8ff74fb8df297f806cd58e8f1e05af011a057 SHA512 d99b520b61447d2ac5113ce8969402a6a9992800a1cde89ae472005facb23bfcd6b5969bcc7a136f9a1c6e0b760ab9ff7c58975fa158c5c3c70c0da58bd20361
-EBUILD libcap-2.27.ebuild 2056 BLAKE2B 19560d3a95c3e03ab3c86d39d0724d20fdee80fcb4114ed850038a4e6f4139ed96fcc4723745b52a18064fddeac0485a9fc3c307a9d575267ef8e32a81a9754e SHA512 ed311603a2654b268332f006ba27a414a063ebe29e7a3399377a0ee41309b805f4327122c8735c825e225bf5f797f8a672e41221bcfeac493d6be6597fbf00cf
-EBUILD libcap-2.28-r1.ebuild 2062 BLAKE2B ba7c16a072037719ff01ea01b33c9f1bfafd00e6a7ade4140096e273b50e2083202a84f51c3c49e3167d64b37c8ce402b7337e284fa50673469c6dc4f3022ce7 SHA512 0f29c2cf7f3fa7542ac939d6d8728697d1f6cec65b9db4f0019042f137743b8a797dda1d6610a712b6dd3c5647bb6c0247a7b29900eb6dd8cf88b38c6dbcc52e
+DIST libcap-2.29.tar.xz 97432 BLAKE2B 5e6de66350e79228b02b00737ce6e4be0982b88cb5e68cf89d33e46191f3444db5139b3fd241ec574204823d6c8a4862d1ea5a34845cff8d6789483cf5dd18fa SHA512 400a6883037bbc1f00847e2fcfb940d733784adec857969069972a3d5120dde6b554326ba6dd652670d854308433c66147944dda8b8b344ca249cef73ea866ef
+DIST libcap-2.30.tar.xz 98528 BLAKE2B 83892df1dc4f2a7605dbbf7332e90f1b696e16060ceba20a3fa3cdd53cb30f6a28d2bd49a4a66b7bc46221f860307de7c22cd7b2f826bad86baad6f510d01e40 SHA512 b2d843b61c3dd583b97c11ad4737b9ea5493eda6bb40da1efdb88b68c0594aeb0a2cebb0a59c749da1c6268ad1f821802d3c9e125a07c2d2457a0eb9df8c0c40
+EBUILD libcap-2.26-r2.ebuild 2043 BLAKE2B c8a51141d1ddf21b9ef071b7d0ff014ae5a66027e7e678ff093c0b235e8f4cb530c36f1ec0f14ea16b35618be498792f82d72e3ce8c65b7ab1ffc537e89b1fe4 SHA512 c41acb88e83ecf6d4d284bcf4cf73ab8a3e452a7cdfc1e1146df34e48cb00f4b3398418265fbdd4e046f8f1cc8079bf8ecaebaa413548538f1a2a46fe66038b0
+EBUILD libcap-2.27.ebuild 2056 BLAKE2B 243ed538747bd8d1588dd3ddbb654ebe9ae9f1e121b6fb37aa9888d3461c5d143ed93ce798f1f9b499cf13471751e129ac2f3d55b76124d9e253e3e4b6a530e1 SHA512 6bca40f0b987958c7d244bf64c915aac5b3d60fa4dc503b090b306039d8c23c99932071b1f44a22de25f4e38dc685a5c835eb85159ea2215d6d2df54e7314e21
+EBUILD libcap-2.28-r1.ebuild 2062 BLAKE2B 0cde464cec6e43a207945e8269cb21d5e3755251c4c2d19bac69887c5b76d6a588b9ed88595cdf578663bc65caf646b8b5e51c3d5b4dfaba5d197391339f4fa8 SHA512 1c0323e9f06deeaf614df44ee90623d4710f63a8041101e44de89c590d87416828e6d849eabcd322893b656bbf74e00dbc8a6e078b64261b779922bbeb10b942
+EBUILD libcap-2.29-r3.ebuild 2177 BLAKE2B 3a37d3027a7ad2079f66ab6757fa67b74a0522d4e0b4651d73a2967b78d1c11627c78b58fc295a5ceda7b325107db7b5a658d6f12e30d1db3c9d2dd629a17355 SHA512 e19986050f8872b8b876badc8226d443a995e0a719ea13b704ee76ef440c0e5910b7f8b7d59ea836abc40698fc85d952de580a975847f81137a7609ef44748bc
+EBUILD libcap-2.30.ebuild 2128 BLAKE2B 622799b87c4007a2a1920a2880692e25a26e6316a4b88d4ad97b0e69d376969a7507e65c0bbcac69ea01d397d5a022c16fd7f241cc0973d7512d88c3f045473d SHA512 397c13d66e11b5aac1a0748961c2e5c9bfcae185fc56e3472f63b31fd0f7d8855947cd31e4b8dd2261e82617d1e63509c35f4c9b72f224a0d9790b2d93c352c3
MISC metadata.xml 332 BLAKE2B 2177c836192a85a6d943221da405f7f11f355011767789d81009d5e4d822a203302a946fa1a0ffbc66be6a37a7069aa94a796125fa1dedbdf023762b47f8f614 SHA512 a9887500fd60b72156ac2589b1fefab8dd70b0c03477dd795f147fdc91bbe6fd027b8cf58c3e86cdb6e831368d34b4881cdf0e833af5aee9e7d1a01e90408ae1
diff --git a/sys-libs/libcap/files/libcap-2.29-build-system-fixes.patch b/sys-libs/libcap/files/libcap-2.29-build-system-fixes.patch
new file mode 100644
index 000000000000..a7751f429fd5
--- /dev/null
+++ b/sys-libs/libcap/files/libcap-2.29-build-system-fixes.patch
@@ -0,0 +1,213 @@
+From 907626b63794199163778761fb56a5c89aa33e35 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 10 Feb 2016 09:47:27 +0100
+Subject: [PATCH] build system fixes
+
+This touches up the homebrewed build system to work much better "out of the
+box" for people. Specifically:
+ - allow toolchain vars to be set via environment
+ - CC / BUILD_CC / AR / RANLIB
+ - CFLAGS / CPPFLAGS / LDFLAGS
+ - split CPPFLAGS out of CFLAGS
+ - break -fPIC out of global CFLAGS and only use where needed
+ - use LDLIBS for libraries, not LDFLAGS
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+
+Forward ported from libcap-2.24 to libcap-2.25
+Forward ported from libcap-2.25 to libcap-2.28
+Forward ported from libcap-2.28 to libcap-2.29
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ Make.Rules | 27 +++++++++++++++------------
+ Makefile | 1 -
+ libcap/Makefile | 7 ++++---
+ pam_cap/Makefile | 8 +++++---
+ progs/Makefile | 2 +-
+ tests/Makefile | 8 +++++---
+ 6 files changed, 30 insertions(+), 23 deletions(-)
+
+diff --git a/Make.Rules b/Make.Rules
+index e7641e7..32c57df 100644
+--- a/Make.Rules
++++ b/Make.Rules
+@@ -47,35 +47,38 @@ MINOR=29
+ # Compilation specifics
+
+ KERNEL_HEADERS := $(topdir)/libcap/include/uapi
+-IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
+-
+-CC := gcc
+-CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+-BUILD_CC := $(CC)
+-BUILD_CFLAGS := $(CFLAGS) $(IPATH)
+-AR := ar
+-RANLIB := ranlib
++
++CC ?= gcc
++CFLAGS ?= -O2
++BUILD_CC ?= $(CC)
++BUILD_CFLAGS ?= $(CFLAGS)
++AR ?= ar
++RANLIB ?= ranlib
+ DEBUG = -g #-DDEBUG
+ WARNINGS=-Wall -Wwrite-strings \
+ -Wpointer-arith -Wcast-qual -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes \
+ -Wnested-externs -Winline -Wshadow
+ LD=$(CC) -Wl,-x -shared
+-LDFLAGS := #-g
++LDFLAGS ?= #-g
+ LIBCAPLIB := -L$(topdir)/libcap -lcap
+ LIBPSXLIB := -L$(topdir)/libcap -lpsx -lpthread
+
+ BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)
+
+-SYSTEM_HEADERS = /usr/include
++LIBCAP_CPPFLAGS = -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
++LIBCAP_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
++CPPFLAGS += $(LIBCAP_CPPFLAGS)
++BUILD_CPPFLAGS += $(LIBCAP_CPPFLAGS)
+ INCS=$(topdir)/libcap/include/sys/capability.h
+ LDFLAGS += -L$(topdir)/libcap
+-CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
++CPPFLAGS += -Dlinux
++CFLAGS += $(WARNINGS) $(DEBUG)
+ PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
+ INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
+ DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
+
+-GOLANG := $(shell if [ -n "$(shell go version 2>/dev/null)" ]; then echo yes ; else echo no ; fi)
++GOLANG ?= $(shell if [ -n "$(shell go version 2>/dev/null)" ]; then echo yes ; else echo no ; fi)
+ ifeq ($(GOLANG),yes)
+ GOROOT := $(shell go env GOROOT)
+ GOCGO := $(shell if [ "$(shell go env CGO_ENABLED)" = 1 ]; then echo yes ; else echo no ; fi)
+diff --git a/Makefile b/Makefile
+index 14e29ef..f0104e0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -16,7 +16,6 @@ endif
+ ifeq ($(GOLANG),yes)
+ $(MAKE) -C go $@
+ endif
+- $(MAKE) -C tests $@
+ $(MAKE) -C progs $@
+ $(MAKE) -C doc $@
+ $(MAKE) -C kdebug $@
+diff --git a/libcap/Makefile b/libcap/Makefile
+index 949cfad..a7f80ce 100644
+--- a/libcap/Makefile
++++ b/libcap/Makefile
+@@ -21,6 +21,7 @@ PSXOBJS=$(addsuffix .o, $(PSXFILES))
+ MAJLIBNAME=$(LIBNAME).$(VERSION)
+ MINLIBNAME=$(MAJLIBNAME).$(MINOR)
+ GPERF_OUTPUT = _caps_output.gperf
++CFLAGS += -fPIC
+
+ all: $(MINLIBNAME) $(STACAPLIBNAME) libcap.pc $(STAPSXLIBNAME)
+
+@@ -39,7 +40,7 @@ libcap.pc: libcap.pc.in
+ $< >$@
+
+ _makenames: _makenames.c cap_names.list.h
+- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
++ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
+
+ cap_names.h: _makenames
+ ./_makenames > cap_names.h
+@@ -66,10 +67,10 @@ $(MINLIBNAME): $(CAPOBJS)
+ ln -sf $(MAJLIBNAME) $(LIBNAME)
+
+ %.o: %.c $(INCLS)
+- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+ cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS)
+- $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
+
+ install: all
+ mkdir -p -m 0755 $(FAKEROOT)$(INCDIR)/sys
+diff --git a/pam_cap/Makefile b/pam_cap/Makefile
+index 56604fd..2da4674 100644
+--- a/pam_cap/Makefile
++++ b/pam_cap/Makefile
+@@ -3,6 +3,8 @@
+ topdir=$(shell pwd)/..
+ include ../Make.Rules
+
++CFLAGS += -fPIC
++
+ all: pam_cap.so
+ $(MAKE) testlink
+
+@@ -16,16 +18,16 @@ install: all
+ # written (and you know why it fails), email me and explain why. Thanks!
+
+ pam_cap.so: pam_cap.o
+- $(LD) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS)
++ $(LD) $(CFLAGS) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS)
+
+ pam_cap.o: pam_cap.c
+- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+ test_pam_cap: test_pam_cap.c pam_cap.c
+ $(CC) $(CFLAGS) $(IPATH) -o $@ test_pam_cap.c $(LIBCAPLIB) $(LDFLAGS) --static
+
+ testlink: test.c pam_cap.o
+- $(CC) $(CFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS)
++ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS)
+
+ test: pam_cap.so
+ make testlink
+diff --git a/progs/Makefile b/progs/Makefile
+index 4c24f16..a3bbbd4 100644
+--- a/progs/Makefile
++++ b/progs/Makefile
+@@ -23,7 +23,7 @@ $(BUILD): %: %.o $(DEPS)
+ $(CC) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
+
+ %.o: %.c $(INCS)
+- $(CC) $(IPATH) $(CFLAGS) -c $< -o $@
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+ install: all
+ mkdir -p -m 0755 $(FAKEROOT)$(SBINDIR)
+diff --git a/tests/Makefile b/tests/Makefile
+index 95e4ca6..dcb89ae 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -16,6 +16,8 @@ test: run_psx_test run_libcap_psx_test
+
+ sudotest: test
+
++CFLAGS += -fPIC
++
+ install: all
+
+ run_psx_test: psx_test psx_test_wrap
+@@ -23,16 +25,16 @@ run_psx_test: psx_test psx_test_wrap
+ ./psx_test_wrap
+
+ psx_test: psx_test.c $(DEPS)
+- $(CC) $(CFLAGS) $(IPATH) -DNOWRAP $< -o $@ $(LIBPSXLIB)
++ $(CC) $(CFLAGS) $(CPPFLAGS) -DNOWRAP $< -o $@ $(LIBPSXLIB)
+
+ psx_test_wrap: psx_test.c $(DEPS)
+- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create
++ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create
+
+ run_libcap_psx_test: libcap_psx_test
+ ./libcap_psx_test
+
+ libcap_psx_test: libcap_psx_test.c $(DEPS)
+- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static
++ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static
+
+ clean:
+ rm -f psx_test psx_test_wrap libcap_psx_test
+--
+2.24.1
+
diff --git a/sys-libs/libcap/files/libcap-2.29-libpsx_pkgconfig.patch b/sys-libs/libcap/files/libcap-2.29-libpsx_pkgconfig.patch
new file mode 100644
index 000000000000..4ebdb887aa61
--- /dev/null
+++ b/sys-libs/libcap/files/libcap-2.29-libpsx_pkgconfig.patch
@@ -0,0 +1,88 @@
+From 8dbae11750ac0f85332355e6aab97005533dfb38 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Sat, 28 Dec 2019 18:48:35 +0100
+Subject: [PATCH] Use separate libpsx.pc file instead of libcap.pc
+
+pkgconfig fails to parse current libcap.pc file but pkgconf succeeds
+
+Gentoo-bug: https://bugs.gentoo.org/703932
+---
+ libcap/Makefile | 12 +++++++++++-
+ libcap/libcap.pc.in | 8 +-------
+ libcap/libpsx.pc.in | 11 +++++++++++
+ 3 files changed, 23 insertions(+), 8 deletions(-)
+ create mode 100644 libcap/libpsx.pc.in
+
+diff --git a/libcap/Makefile b/libcap/Makefile
+index 949cfad..5795458 100644
+--- a/libcap/Makefile
++++ b/libcap/Makefile
+@@ -22,7 +22,7 @@ MAJLIBNAME=$(LIBNAME).$(VERSION)
+ MINLIBNAME=$(MAJLIBNAME).$(MINOR)
+ GPERF_OUTPUT = _caps_output.gperf
+
+-all: $(MINLIBNAME) $(STACAPLIBNAME) libcap.pc $(STAPSXLIBNAME)
++all: $(MINLIBNAME) $(STACAPLIBNAME) libcap.pc libpsx.pc $(STAPSXLIBNAME)
+
+ ifeq ($(BUILD_GPERF),yes)
+ USE_GPERF_OUTPUT = $(GPERF_OUTPUT)
+@@ -38,6 +38,15 @@ libcap.pc: libcap.pc.in
+ -e 's,@deps@,$(DEPS),' \
+ $< >$@
+
++libpsx.pc: libpsx.pc.in
++ sed -e 's,@prefix@,$(prefix),' \
++ -e 's,@exec_prefix@,$(exec_prefix),' \
++ -e 's,@libdir@,$(LIBDIR),' \
++ -e 's,@includedir@,$(inc_prefix)/include,' \
++ -e 's,@VERSION@,$(VERSION).$(MINOR),' \
++ -e 's,@deps@,$(DEPS),' \
++ $< >$@
++
+ _makenames: _makenames.c cap_names.list.h
+ $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
+
+@@ -86,6 +95,7 @@ ifeq ($(FAKEROOT),)
+ endif
+ mkdir -p -m 0755 $(FAKEROOT)$(PKGCONFIGDIR)
+ install -m 0644 libcap.pc $(FAKEROOT)$(PKGCONFIGDIR)/libcap.pc
++ install -m 0644 libpsx.pc $(FAKEROOT)$(PKGCONFIGDIR)/libpsx.pc
+ ifeq ($(GOLANG),yes)
+ mkdir -p -m 0755 $(FAKEROOT)$(GOPKGDIR)/libcap/cap
+ install -m 0644 src/libcap/cap/* $(FAKEROOT)$(GOPKGDIR)/libcap/cap/
+diff --git a/libcap/libcap.pc.in b/libcap/libcap.pc.in
+index 3d6b273..8358274 100644
+--- a/libcap/libcap.pc.in
++++ b/libcap/libcap.pc.in
+@@ -9,10 +9,4 @@ Version: @VERSION@
+ Libs: -L${libdir} -lcap
+ Libs.private: @deps@
+ Cflags: -I${includedir}
+-
+-Name: libpsx
+-Description: libpsx - linux posix syscall API for pthreads
+-Version: @VERSION@
+-Libs: -L${libdir} -lpsx -lpthread -Wl,-wrap,pthread_create
+-Libs.private: @deps@
+-Cflags: -I${includedir}
++Requires: libpsx
+diff --git a/libcap/libpsx.pc.in b/libcap/libpsx.pc.in
+new file mode 100644
+index 0000000..d032b9f
+--- /dev/null
++++ b/libcap/libpsx.pc.in
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: libpsx
++Description: libpsx - linux posix syscall API for pthreads
++Version: @VERSION@
++Libs: -L${libdir} -lpsx -lpthread -Wl,-wrap,pthread_create
++Libs.private: @deps@
++Cflags: -I${includedir}
+--
+2.24.1
+
diff --git a/sys-libs/libcap/libcap-2.26-r2.ebuild b/sys-libs/libcap/libcap-2.26-r2.ebuild
index da5b4be3fdfe..7bd9b6e03880 100644
--- a/sys-libs/libcap/libcap-2.26-r2.ebuild
+++ b/sys-libs/libcap/libcap-2.26-r2.ebuild
@@ -6,7 +6,7 @@ EAPI=6
inherit multilib multilib-minimal toolchain-funcs pam usr-ldscript
DESCRIPTION="POSIX 1003.1e capabilities"
-HOMEPAGE="http://www.friedhoff.org/posixfilecaps.html"
+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
diff --git a/sys-libs/libcap/libcap-2.27.ebuild b/sys-libs/libcap/libcap-2.27.ebuild
index 0253dcbb5c62..f33205f74b28 100644
--- a/sys-libs/libcap/libcap-2.27.ebuild
+++ b/sys-libs/libcap/libcap-2.27.ebuild
@@ -6,7 +6,7 @@ EAPI=6
inherit multilib multilib-minimal toolchain-funcs pam usr-ldscript
DESCRIPTION="POSIX 1003.1e capabilities"
-HOMEPAGE="http://www.friedhoff.org/posixfilecaps.html"
+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
diff --git a/sys-libs/libcap/libcap-2.28-r1.ebuild b/sys-libs/libcap/libcap-2.28-r1.ebuild
index 679cf0b9f262..40971d0ddcab 100644
--- a/sys-libs/libcap/libcap-2.28-r1.ebuild
+++ b/sys-libs/libcap/libcap-2.28-r1.ebuild
@@ -6,7 +6,7 @@ EAPI=7
inherit multilib multilib-minimal toolchain-funcs pam usr-ldscript
DESCRIPTION="POSIX 1003.1e capabilities"
-HOMEPAGE="http://www.friedhoff.org/posixfilecaps.html"
+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
diff --git a/sys-libs/libcap/libcap-2.29-r3.ebuild b/sys-libs/libcap/libcap-2.29-r3.ebuild
new file mode 100644
index 000000000000..f9b07a851819
--- /dev/null
+++ b/sys-libs/libcap/libcap-2.29-r3.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib multilib-minimal toolchain-funcs pam usr-ldscript
+
+DESCRIPTION="POSIX 1003.1e capabilities"
+HOMEPAGE="https://sites.google.com/site/fullycapable/"
+SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
+
+# it's available under either of the licenses
+LICENSE="|| ( GPL-2 BSD )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="pam static-libs"
+
+# While the build system optionally uses gperf, we don't DEPEND on it because
+# the build automatically falls back when it's unavailable. #604802
+RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]
+ pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers"
+
+# Requires test suite being run as root (via sudo)
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.29-build-system-fixes.patch
+ "${FILESDIR}"/${PN}-2.28-no_perl.patch
+ "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
+ "${FILESDIR}"/${PN}-2.21-include.patch
+ "${FILESDIR}"/${PN}-2.29-libpsx_pkgconfig.patch
+)
+
+src_prepare() {
+ default
+ multilib_copy_sources
+}
+
+run_emake() {
+ local args=(
+ exec_prefix="${EPREFIX}"
+ lib_prefix="${EPREFIX}/usr"
+ lib="$(get_libdir)"
+ prefix="${EPREFIX}/usr"
+ PAM_CAP="$(usex pam yes no)"
+ DYNAMIC=yes
+ GOLANG=no
+ )
+ emake "${args[@]}" "$@"
+}
+
+multilib_src_compile() {
+ tc-export AR CC RANLIB
+ local BUILD_CC
+ tc-export_build_env BUILD_CC
+
+ run_emake
+}
+
+multilib_src_install() {
+ # no configure, needs explicit install line #444724#c3
+ run_emake DESTDIR="${D}" install
+
+ gen_usr_ldscript -a cap
+ if ! use static-libs ; then
+ # Don't remove libpsx.a!
+ # See https://bugs.gentoo.org/703912
+ rm "${ED}"/usr/$(get_libdir)/libcap.a || die
+ fi
+
+ if [[ -d "${ED}"/usr/$(get_libdir)/security ]] ; then
+ rm -r "${ED}"/usr/$(get_libdir)/security || die
+ fi
+
+ if use pam; then
+ dopammod pam_cap/pam_cap.so
+ dopamsecurity '' pam_cap/capability.conf
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc CHANGELOG README doc/capability.notes
+}
diff --git a/sys-libs/libcap/libcap-2.30.ebuild b/sys-libs/libcap/libcap-2.30.ebuild
new file mode 100644
index 000000000000..019cf1be2c68
--- /dev/null
+++ b/sys-libs/libcap/libcap-2.30.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib multilib-minimal toolchain-funcs pam usr-ldscript
+
+DESCRIPTION="POSIX 1003.1e capabilities"
+HOMEPAGE="https://sites.google.com/site/fullycapable/"
+SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
+
+# it's available under either of the licenses
+LICENSE="|| ( GPL-2 BSD )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="pam static-libs"
+
+# While the build system optionally uses gperf, we don't DEPEND on it because
+# the build automatically falls back when it's unavailable. #604802
+RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]
+ pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers"
+
+# Requires test suite being run as root (via sudo)
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.29-build-system-fixes.patch
+ "${FILESDIR}"/${PN}-2.28-no_perl.patch
+ "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
+ "${FILESDIR}"/${PN}-2.21-include.patch
+)
+
+src_prepare() {
+ default
+ multilib_copy_sources
+}
+
+run_emake() {
+ local args=(
+ exec_prefix="${EPREFIX}"
+ lib_prefix="${EPREFIX}/usr"
+ lib="$(get_libdir)"
+ prefix="${EPREFIX}/usr"
+ PAM_CAP="$(usex pam yes no)"
+ DYNAMIC=yes
+ GOLANG=no
+ )
+ emake "${args[@]}" "$@"
+}
+
+multilib_src_compile() {
+ tc-export AR CC RANLIB
+ local BUILD_CC
+ tc-export_build_env BUILD_CC
+
+ run_emake
+}
+
+multilib_src_install() {
+ # no configure, needs explicit install line #444724#c3
+ run_emake DESTDIR="${D}" install
+
+ gen_usr_ldscript -a cap
+ if ! use static-libs ; then
+ # Don't remove libpsx.a!
+ # See https://bugs.gentoo.org/703912
+ rm "${ED}"/usr/$(get_libdir)/libcap.a || die
+ fi
+
+ if [[ -d "${ED}"/usr/$(get_libdir)/security ]] ; then
+ rm -r "${ED}"/usr/$(get_libdir)/security || die
+ fi
+
+ if use pam; then
+ dopammod pam_cap/pam_cap.so
+ dopamsecurity '' pam_cap/capability.conf
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc CHANGELOG README doc/capability.notes
+}