From 864894045a2cf37980325fe979f42f69cbbf8253 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 17 Nov 2021 22:26:33 +0100 Subject: [PATCH] sys-libs/libcap-ng: Sync with gentoo It's from gentoo commit eacbddc77cea0ff4313712022078d7e83da52e76. --- .../sys-libs/libcap-ng/Manifest | 7 +- .../sys-libs/libcap-ng/libcap-ng-0.7.8.ebuild | 99 ------------------- .../libcap-ng/libcap-ng-0.8.2-r1.ebuild | 95 ++++++++++++++++++ .../sys-libs/libcap-ng/metadata.xml | 5 +- 4 files changed, 101 insertions(+), 105 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.7.8.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/Manifest index 35978a4308..91583ac0a4 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/Manifest @@ -1,5 +1,2 @@ -DIST libcap-ng-0.7.8.tar.gz 447946 SHA256 c21af997445cd4107a55d386f955c5ea6f6e96ead693e9151277c0ab5f97d05f SHA512 c32a4c5780c183b13611615abe9061221fd8987188b08828d1617cdaee338ad8de67b3430aa83bde60128efc76449a688546bfbf697f0847b6a835cb1a868756 WHIRLPOOL a56ee901f301c4c2e0353e2b9e38938fcd6efbb9394d60af6c7045967e6a310fd19b658617b362f14489a75da64a69e82a3afcada97f898c2ab25fad6fb6603d -EBUILD libcap-ng-0.7.8.ebuild 2258 SHA256 3dd6a45431f8502e4c7a3ffaaab145a06f5c8d82adaf10e513f89f4c0095444e SHA512 ee579c9456c306198422e5dcf16d6093117f049f3699184157ad77f1dcac6495ea486d48c465f7a2c8dca1abdcf9e57d1421f30abfaa5d18f29cf6acecc6aac4 WHIRLPOOL 93dffdd6cc9e342697b32de91be20aff172c3262a215d55cad261f8d5ae6d2a63dcd8a94f98f688c6c140325208f9e0b24401bcb17a28797615331fa0357ab9e -MISC ChangeLog 5981 SHA256 95fae46ed32a503e1542fad7542bc0fb56e8123de570dd6d5628f6eaa2f5c901 SHA512 afc8440dc05497a72381e96b1762983ead83eb67d4002ab9055150f6d729c9763e9be08a91494f3fbdf557ee910eaa1272496df4f258ed6a0d644f8c39bd7394 WHIRLPOOL 2392f36fe99fa16b12ea98aa4c8f449cee2c8192cc34136053ce139500c9cb254a4339305fd6bfdfb965723a8345e3471c6516d6f4bb8697f9603fd702c53be4 -MISC ChangeLog-2015 10433 SHA256 559a152b35084b04940b619faff0216fb5f9055caa52594096fa7a3444f3616d SHA512 678b1fe48a396ffd2bd939b2828ef9cf9aa4175701f2aea8c6fbbd608c5038c518e98969891b2b2eab65992edf84c57818bc8a7b27f593c24414907ad5767961 WHIRLPOOL 549ea31a5cae98a96e177e6dd9ca75067a9108bc5e352e369fc4f8485ba735e3ab1b973c631eda1d21aba6444d1a39d6179e4e0d34c03933fde01bb76680794b -MISC metadata.xml 580 SHA256 d6000e84fe72c4f6b507c04edda36269aed6a1cab6aaf430eab08ad3592bf48c SHA512 51d670d97a94c8c668a4580bf6106a5b027b4d8d0c2f27ca88a508e60ece5a5390b619f0368c8111f2b843748a9ad31f1804c2a60df91ae1717a2c8b2a7aedc3 WHIRLPOOL e29b31c47bdb74ea61049e6cebd897e4147c9d5acefbcd1c1f752cf8cc5893047b5918805bbc9b8553eec3b68319825a1c9a5c48f987b6f788e6415bebac8c7e +DIST libcap-ng-0.8.2-apply-disable.patch 723 BLAKE2B 70d9959c55119c02bbc4ea605251491c04c477511c20b9fe93e6527ffd3fe2f35a72fabab5ca149c4aaf536c6cd8dceb15375297158f8827a0c676744381bbc1 SHA512 8c9317bdd4fde7d6a4618ec613bce46bed7646891bd16bc3fa307e9a814e38601bf3c6ad13102389d4596d9ed6a7ad853cca58624e724fe07383007e386c51f8 +DIST libcap-ng-0.8.2.tar.gz 456066 BLAKE2B 7e721d05b92fd3708b970527e76b1898daa91bde3ab6ed5d8f23b1435404fbe7d15731461c6d9d2c791738e5498d1f5eaba727413480d34b7edea13c8691c32b SHA512 0ac6e55c03b1fba3a849048b721e250951afb59190d9646704d4fd9938eccc3bd0767380fbddc42f186b4f55695475e31f34f537ae91c04a37662577a5b7a19b diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.7.8.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.7.8.ebuild deleted file mode 100644 index 6fe529292f..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.7.8.ebuild +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -AUTOTOOLS_AUTORECONF=1 -AUTOTOOLS_PRUNE_LIBTOOL_FILES=all -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) - -inherit autotools-utils flag-o-matic python-r1 - -DESCRIPTION="POSIX 1003.1e capabilities" -HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/" -SRC_URI="https://people.redhat.com/sgrubb/${PN}/${P}.tar.gz" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~arm-linux ~x86-linux" -IUSE="python static-libs" - -RDEPEND="python? ( ${PYTHON_DEPS} )" -DEPEND="${RDEPEND} - sys-kernel/linux-headers - python? ( >=dev-lang/swig-2 )" - -RESTRICT="test" - -src_prepare() { - sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die - - autotools-utils_src_prepare - - use sparc && replace-flags -O? -O0 -} - -src_configure() { - # set up the library build - local myeconfargs=( --without-python --without-python3 ) - autotools-utils_src_configure - - # set up python bindings build(s) - if use python ; then - setup_python_flags_configure() { - if [[ ${EPYTHON} == python2* ]] ; then - myeconfargs=( --with-python --without-python3 ) - else - myeconfargs=( --with-python --with-python3 ) - fi - autotools-utils_src_configure - } - - python_foreach_impl setup_python_flags_configure - fi -} - -src_compile() { - autotools-utils_src_compile - - if use python; then - python_compile() { - local CFLAGS=${CFLAGS} - - python_is_python3 || CFLAGS+=" -fno-strict-aliasing" - - emake "${@}" \ - -C "${BUILD_DIR}"/bindings/python - } - - # help build system find the right objects - python_foreach_impl python_compile \ - VPATH="${BUILD_DIR}"/bindings/python \ - LIBS="${BUILD_DIR}"/src/libcap-ng.la - fi -} - -src_test() { - if [[ "${EUID}" -eq 0 ]]; then - ewarn "Skipping tests due to root permissions." - return - fi - - autotools-utils_src_test - - if use python; then - python_foreach_impl \ - autotools-utils_src_compile -C bindings/python check \ - VPATH="${BUILD_DIR}"/bindings/python:"${S}"/bindings/python/test - fi -} - -src_install() { - autotools-utils_src_install - - if use python; then - python_foreach_impl \ - autotools-utils_src_install -C bindings/python \ - VPATH="${BUILD_DIR}"/bindings/python - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild new file mode 100644 index 0000000000..f79095d558 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild @@ -0,0 +1,95 @@ +# 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 flag-o-matic python-r1 + +DESCRIPTION="POSIX 1003.1e capabilities" +HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/" +# Fedora 0.8.2 https://src.fedoraproject.org/rpms/libcap-ng/c/a5b0f536df1132d8e7afa4c0ce07b630e7970cad?branch=master +SRC_URI="https://people.redhat.com/sgrubb/${PN}/${P}.tar.gz + https://src.fedoraproject.org/rpms/libcap-ng/raw/a5b0f536df1132d8e7afa4c0ce07b630e7970cad/f/libcap-ng-0.8.2-apply-disable.patch" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux" +IUSE="python static-libs" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND} + sys-kernel/linux-headers" +BDEPEND="python? ( >=dev-lang/swig-2 )" + +PATCHES=( + "${DISTDIR}"/libcap-ng-0.8.2-apply-disable.patch +) + +src_prepare() { + default + if use prefix ; then + sed -i "s@cat /usr@cat ${EPREFIX}/usr@" bindings/python*/Makefile.am || die + eautomake #668722 + fi +} + +src_configure() { + use sparc && replace-flags -O? -O0 + + local ECONF_SOURCE="${S}" + + local myconf=( + $(use_enable static-libs static) + ) + + local pythonconf=( --without-python --without-python3 ) + + # set up python bindings build(s) + if use python ; then + setup_python_flags_configure() { + pythonconf=( --without-python --with-python3 ) + run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}" + } + + python_foreach_impl setup_python_flags_configure + else + local BUILD_DIR=${WORKDIR}/build + run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}" + fi +} + +src_compile() { + if use python; then + python_foreach_impl run_in_build_dir emake + else + local BUILD_DIR=${WORKDIR}/build + emake -C "${BUILD_DIR}" + fi +} + +src_test() { + if [[ "${EUID}" -eq 0 ]]; then + ewarn "Skipping tests due to root permissions." + return + fi + + if use python; then + python_foreach_impl run_in_build_dir emake check + else + local BUILD_DIR=${WORKDIR}/build + emake -C "${BUILD_DIR}" check + fi +} + +src_install() { + if use python; then + python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install + else + local BUILD_DIR=${WORKDIR}/build + emake -C "${BUILD_DIR}" DESTDIR="${D}" install + fi + find "${ED}" -name '*.la' -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/metadata.xml index 9aa642f320..2d75111936 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/metadata.xml @@ -1,5 +1,5 @@ - + base-system@gentoo.org @@ -11,4 +11,7 @@ utilities that can analyse all currently running applications and print out any capabilities and whether or not it has an open ended bounding set. + + cpe:/a:libcap-ng_project:libcap-ng +