Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libseccomp/
Date: Thu, 02 Sep 2021 06:43:22
Message-Id: 1630564987.7bdae378cd72c7d7e71c47a8ccd1929b60f03b73.polynomial-c@gentoo
1 commit: 7bdae378cd72c7d7e71c47a8ccd1929b60f03b73
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 2 06:42:54 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 2 06:43:07 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bdae378
7
8 sys-libs/libseccomp: Bump to version 2.5.2
9
10 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
11
12 sys-libs/libseccomp/Manifest | 1 +
13 sys-libs/libseccomp/libseccomp-2.5.2.ebuild | 90 +++++++++++++++++++++++++++++
14 2 files changed, 91 insertions(+)
15
16 diff --git a/sys-libs/libseccomp/Manifest b/sys-libs/libseccomp/Manifest
17 index ef91c9f4460..55539be93ca 100644
18 --- a/sys-libs/libseccomp/Manifest
19 +++ b/sys-libs/libseccomp/Manifest
20 @@ -1 +1,2 @@
21 DIST libseccomp-2.5.1.tar.gz 638811 BLAKE2B 683ae7536c0cba36f4d30640b42361171fc34b7cb04985ea56e64369df29c440361a0205385b14580cc0e481e0f9ffd0b0e8ebd4ac98817ed59298db6b274c35 SHA512 2be80a6323f9282dbeae8791724e5778b32e2382b2a3d1b0f77366371ec4072ea28128204f675cce101c091c0420d12c497e1a9ccbb7dc5bcbf61bfd777160af
22 +DIST libseccomp-2.5.2.tar.gz 640305 BLAKE2B b61214cb9a9a793d1f04ae1de3f62c578cfaec54fcc355947b4c71efb75072bf60497db8c8a0fd34a46764952349027df3f025ddbd276d58be93209170950e89 SHA512 b2a95152cb274d6b35753596fd825406dae20c4a48b2f4076f835f977ecf324de38a3fe02e789dc20b49ecf6b4eb67f03e7733e92d40f5e20f25874307f1c2ac
23
24 diff --git a/sys-libs/libseccomp/libseccomp-2.5.2.ebuild b/sys-libs/libseccomp/libseccomp-2.5.2.ebuild
25 new file mode 100644
26 index 00000000000..eea16fa2bbf
27 --- /dev/null
28 +++ b/sys-libs/libseccomp/libseccomp-2.5.2.ebuild
29 @@ -0,0 +1,90 @@
30 +# Copyright 1999-2021 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +PYTHON_COMPAT=( python3_{8..9} )
36 +DISTUTILS_OPTIONAL=1
37 +
38 +inherit distutils-r1 multilib-minimal
39 +
40 +DESCRIPTION="high level interface to Linux seccomp filter"
41 +HOMEPAGE="https://github.com/seccomp/libseccomp"
42 +
43 +if [[ ${PV} == *9999 ]] ; then
44 + EGIT_REPO_URI="https://github.com/seccomp/libseccomp.git"
45 + PRERELEASE="2.6.0"
46 + inherit autotools git-r3
47 +else
48 + SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz"
49 + KEYWORDS="-* ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux"
50 +fi
51 +
52 +LICENSE="LGPL-2.1"
53 +SLOT="0"
54 +IUSE="python static-libs"
55 +
56 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
57 +
58 +DEPEND="python? ( ${PYTHON_DEPS} )"
59 +RDEPEND="${DEPEND}"
60 +BDEPEND="${DEPEND}
61 + dev-util/gperf
62 + python? ( dev-python/cython[${PYTHON_USEDEP}] )
63 +"
64 +# We need newer kernel headers; we don't keep strict control of the exact
65 +# version here, just be safe and pull in the latest stable ones. #551248
66 +DEPEND="${DEPEND} >=sys-kernel/linux-headers-4.3"
67 +
68 +src_prepare() {
69 + local PATCHES=(
70 + "${FILESDIR}/libseccomp-python-shared.patch"
71 + )
72 + default
73 + if [[ "${PV}" == *9999 ]] ; then
74 + sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac
75 + eautoreconf
76 + fi
77 +}
78 +
79 +multilib_src_configure() {
80 + local myeconfargs=(
81 + $(use_enable static-libs static)
82 + --disable-python
83 + )
84 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
85 +}
86 +
87 +do_python() {
88 + # setup.py reads VERSION_RELEASE from the environment
89 + local -x VERSION_RELEASE=${PRERELEASE-${PV}}
90 + pushd "${BUILD_DIR}/src/python" >/dev/null || die
91 + "$@"
92 + popd >/dev/null || die
93 +}
94 +
95 +multilib_src_compile() {
96 + emake
97 +
98 + if multilib_is_native_abi && use python ; then
99 + # setup.py expects libseccomp.so to live in "../.libs"
100 + # Copy the python files to the right place for this.
101 + rm -r "${BUILD_DIR}/src/python" || die
102 + cp -r "${S}/src/python" "${BUILD_DIR}/src/python" || die
103 + local -x CPPFLAGS="-I\"${BUILD_DIR}/include\" -I\"${S}/include\" ${CPPFLAGS}"
104 + do_python distutils-r1_src_compile
105 + fi
106 +}
107 +
108 +multilib_src_install() {
109 + emake DESTDIR="${D}" install
110 +
111 + if multilib_is_native_abi && use python ; then
112 + do_python distutils-r1_src_install
113 + fi
114 +}
115 +
116 +multilib_src_install_all() {
117 + find "${ED}" -type f -name "${PN}.la" -delete || die
118 + einstalldocs
119 +}