From 4f079de87d7964052b1dce00ded1f44c76f46c6d Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Wed, 17 Apr 2019 15:33:37 +0200 Subject: [PATCH] sys-libs/libcap: Bump to version 2.27 Package-Manager: Portage-2.3.63, Repoman-2.3.12 Signed-off-by: Lars Wendler --- sys-libs/libcap/Manifest | 1 + sys-libs/libcap/libcap-2.27.ebuild | 81 ++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 sys-libs/libcap/libcap-2.27.ebuild diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest index d2c104bfab37..51cf86f20783 100644 --- a/sys-libs/libcap/Manifest +++ b/sys-libs/libcap/Manifest @@ -1,2 +1,3 @@ DIST libcap-2.25.tar.xz 63672 BLAKE2B 205790dea83f15b585e5151814ea520ab1545661d18fa57f36e8c8e597a7c0f0ff1d7b5ccffc36e313eb28606f1e71678233a06896e29cb28e5559b190dd47ed SHA512 c3ab491885292adc171cde542b96f1295e84132febb50112a46575c3bde3a3eb6fcf733f7a756b4b656e013c0abb5ed6571db24799f8c0b23d8f759f992864f9 DIST libcap-2.26.tar.xz 67172 BLAKE2B 9d1952bd03e1bba5ffa225a5088b8d841c2007219bbb9524f979ac65e472bf932db496acf93984fa77fe42e71d45b85cd603ca461a071fb4742526dfbc5f66eb SHA512 1c2d59f007226405a924950b2c2090393527e06f0692a84e6463e33915a070df61a9070b8f30a624d5630ddd39290eac117e5d440577d1edd48510195b9d12f0 +DIST libcap-2.27.tar.xz 67780 BLAKE2B 7b58d7afdd90281771a302cd9554f067b9e3636b0c052935973d8a0d890490c3933b3513874b788a8c10e37ab5ad9cfa766408c9629b7c8562cb17bfdef87747 SHA512 e32335fd3e0d1564574acc73df7030b5b0fd98875217bffabd76f2765f1a7a6f1369f03df2ee22a1782776838784e342378c10613ea1163d53ae5055ab6a62b6 diff --git a/sys-libs/libcap/libcap-2.27.ebuild b/sys-libs/libcap/libcap-2.27.ebuild new file mode 100644 index 000000000000..c5f72abafbf2 --- /dev/null +++ b/sys-libs/libcap/libcap-2.27.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit multilib multilib-minimal toolchain-funcs pam + +DESCRIPTION="POSIX 1003.1e capabilities" +HOMEPAGE="http://www.friedhoff.org/posixfilecaps.html" +SRC_URI="mirror://kernel/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 ~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? ( virtual/pam[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + sys-kernel/linux-headers" + +# Requires test suite being run as root (via sudo) +RESTRICT="test" + +PATCHES=( + "${FILESDIR}"/${PN}-2.25-build-system-fixes.patch + "${FILESDIR}"/${PN}-2.26-no-perl.patch + "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch + "${FILESDIR}"/${PN}-2.21-include.patch +) + +src_prepare() { + default + multilib_copy_sources +} + +run_emake() { + local args=( + exec_prefix="${EPREFIX}" + lib_prefix="${EPREFIX}/usr" + lib="$(get_libdir)" + prefix="${EPREFIX}/usr" + PAM_CAP="$(usex pam yes no)" + DYNAMIC=yes + ) + emake "${args[@]}" "$@" +} + +multilib_src_compile() { + tc-export AR CC RANLIB + local BUILD_CC + tc-export_build_env BUILD_CC + + run_emake +} + +multilib_src_install() { + # no configure, needs explicit install line #444724#c3 + run_emake DESTDIR="${D}" install + + gen_usr_ldscript -a cap + if ! use static-libs ; then + rm "${ED%/}"/usr/$(get_libdir)/libcap.a || die + fi + + if [[ -d "${ED%/}"/usr/$(get_libdir)/security ]] ; then + rm -r "${ED%/}"/usr/$(get_libdir)/security || die + fi + + if use pam; then + dopammod pam_cap/pam_cap.so + dopamsecurity '' pam_cap/capability.conf + fi +} + +multilib_src_install_all() { + dodoc CHANGELOG README doc/capability.notes +} -- 2.26.2