Diff libseccomp-2.4.4 with a libseccomp-2.5.0

/usr/portage/sys-libs/libseccomp/libseccomp-2.5.0.ebuild 2020-10-16 07:09:00.000000000 +0300
1 1
# Copyright 1999-2020 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
# TODO: Add python support.
5

  
6 4
EAPI=7
7 5

  
8
inherit multilib-minimal
6
PYTHON_COMPAT=( python3_{6..9} )
7
DISTUTILS_OPTIONAL=1
8

  
9
inherit distutils-r1 multilib-minimal
9 10

  
10 11
DESCRIPTION="high level interface to Linux seccomp filter"
11 12
HOMEPAGE="https://github.com/seccomp/libseccomp"
12
SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz"
13

  
14
if [[ ${PV} == *9999 ]] ; then
15
	EGIT_REPO_URI="https://github.com/seccomp/libseccomp.git"
16
	PRERELEASE="2.6.0"
17
	inherit autotools git-r3
18
else
19
	SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz"
20
	KEYWORDS="-* ~amd64 ~arm ~arm64 ~hppa -mips ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux"
21
fi
13 22

  
14 23
LICENSE="LGPL-2.1"
15 24
SLOT="0"
16
KEYWORDS="-* amd64 arm arm64 hppa ~mips ppc ppc64 s390 x86 ~amd64-linux ~x86-linux"
17
IUSE="static-libs"
25
IUSE="python static-libs"
26

  
27
REQUIRED_USE="
28
	python? (
29
		static-libs
30
		${PYTHON_REQUIRED_USE}
31
	)"
32

  
33
BDEPEND="
34
	dev-util/gperf
35
	python? ( ${PYTHON_DEPS} )
36
"
37
DEPEND="${BDEPEND}"
38
RDEPEND="${DEPEND}"
18 39

  
19 40
# We need newer kernel headers; we don't keep strict control of the exact
20 41
# version here, just be safe and pull in the latest stable ones. #551248
21
DEPEND=">=sys-kernel/linux-headers-4.3"
42
DEPEND="${DEPEND} >=sys-kernel/linux-headers-4.3"
22 43

  
23 44
src_prepare() {
24 45
	default
25
	sed -i \
26
		-e '/_LDFLAGS/s:-static::' \
27
		tools/Makefile.in || die
46
	if [[ "${PV}" == *9999 ]] ; then
47
		sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac
48
		eautoreconf
49
	fi
28 50
}
29 51

  
30 52
multilib_src_configure() {
......
35 57
	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
36 58
}
37 59

  
60
multilib_src_compile() {
61
	emake
62

  
63
	if multilib_is_native_abi && use python ; then
64
		cd "${S}/src/python" || die
65
		sed -i -e "s/=.*VERSION_RELEASE.*,/=\"${PRERELEASE}\",/" \
66
			-e "/extra_objects/s,\.\.,${OLDPWD}/src," \
67
			setup.py || die
68
		local -x CPPFLAGS="-I${OLDPWD}/include -I../../include"
69
		distutils-r1_src_compile
70
	fi
71
}
72

  
73
multilib_src_install() {
74
	emake DESTDIR="${D}" install
75

  
76
	if multilib_is_native_abi && use python ; then
77
		cd "${S}/src/python" || die
78
		distutils-r1_src_install
79
	fi
80
}
81

  
38 82
multilib_src_install_all() {
39 83
	find "${ED}" -type f -name "${PN}.la" -delete || die
40 84
	einstalldocs
Thank you!