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/libcap-ng/
Date: Fri, 29 Jul 2016 15:08:42
Message-Id: 1469804912.9daa908a1adb55e4d56226ac262277535f757af0.polynomial-c@gentoo
1 commit: 9daa908a1adb55e4d56226ac262277535f757af0
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 29 15:08:05 2016 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 29 15:08:32 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9daa908a
7
8 sys-libs/libcap-ng: Bump to version 0.7.8
9
10 Package-Manager: portage-2.3.0
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-libs/libcap-ng/Manifest | 1 +
14 sys-libs/libcap-ng/libcap-ng-0.7.8.ebuild | 100 ++++++++++++++++++++++++++++++
15 2 files changed, 101 insertions(+)
16
17 diff --git a/sys-libs/libcap-ng/Manifest b/sys-libs/libcap-ng/Manifest
18 index 1f99af6..0f66f7e 100644
19 --- a/sys-libs/libcap-ng/Manifest
20 +++ b/sys-libs/libcap-ng/Manifest
21 @@ -1 +1,2 @@
22 DIST libcap-ng-0.7.7.tar.gz 420178 SHA256 615549ce39b333f6b78baee0c0b4ef18bc726c6bf1cca123dfd89dd963f6d06b SHA512 eb049b29fdd31aa31c6c14ca023df62c2910504c1edd1242dba13579d0befae5b98249c22c145517bd5451969a0b186390dc11b2269e58001336e10c855e920c WHIRLPOOL 5d376b8d12ed8c19ca649095297e6016e86e5ad6112fd12685929bdd5f3c34bbcdf9c1c61cad44f44d3784192ca37df1a77c478e5fc15dacb20a2561ee945652
23 +DIST libcap-ng-0.7.8.tar.gz 447946 SHA256 c21af997445cd4107a55d386f955c5ea6f6e96ead693e9151277c0ab5f97d05f SHA512 c32a4c5780c183b13611615abe9061221fd8987188b08828d1617cdaee338ad8de67b3430aa83bde60128efc76449a688546bfbf697f0847b6a835cb1a868756 WHIRLPOOL a56ee901f301c4c2e0353e2b9e38938fcd6efbb9394d60af6c7045967e6a310fd19b658617b362f14489a75da64a69e82a3afcada97f898c2ab25fad6fb6603d
24
25 diff --git a/sys-libs/libcap-ng/libcap-ng-0.7.8.ebuild b/sys-libs/libcap-ng/libcap-ng-0.7.8.ebuild
26 new file mode 100644
27 index 0000000..ca213a6
28 --- /dev/null
29 +++ b/sys-libs/libcap-ng/libcap-ng-0.7.8.ebuild
30 @@ -0,0 +1,100 @@
31 +# Copyright 1999-2016 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +# $Id$
34 +
35 +EAPI=5
36 +
37 +AUTOTOOLS_AUTORECONF=1
38 +AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
39 +PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
40 +
41 +inherit autotools-utils flag-o-matic python-r1
42 +
43 +DESCRIPTION="POSIX 1003.1e capabilities"
44 +HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/"
45 +SRC_URI="https://people.redhat.com/sgrubb/${PN}/${P}.tar.gz"
46 +
47 +LICENSE="LGPL-2.1"
48 +SLOT="0"
49 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~arm-linux ~x86-linux"
50 +IUSE="python static-libs"
51 +
52 +RDEPEND="python? ( ${PYTHON_DEPS} )"
53 +DEPEND="${RDEPEND}
54 + sys-kernel/linux-headers
55 + python? ( >=dev-lang/swig-2 )"
56 +
57 +RESTRICT="test"
58 +
59 +src_prepare() {
60 + sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die
61 +
62 + autotools-utils_src_prepare
63 +
64 + use sparc && replace-flags -O? -O0
65 +}
66 +
67 +src_configure() {
68 + # set up the library build
69 + local myeconfargs=( --without-python --without-python3 )
70 + autotools-utils_src_configure
71 +
72 + # set up python bindings build(s)
73 + if use python ; then
74 + setup_python_flags_configure() {
75 + if [[ ${EPYTHON} == python2* ]] ; then
76 + myeconfargs=( --with-python --without-python3 )
77 + else
78 + myeconfargs=( --with-python --with-python3 )
79 + fi
80 + autotools-utils_src_configure
81 + }
82 +
83 + python_foreach_impl setup_python_flags_configure
84 + fi
85 +}
86 +
87 +src_compile() {
88 + autotools-utils_src_compile
89 +
90 + if use python; then
91 + python_compile() {
92 + local CFLAGS=${CFLAGS}
93 +
94 + python_is_python3 || CFLAGS+=" -fno-strict-aliasing"
95 +
96 + emake "${@}" \
97 + -C "${BUILD_DIR}"/bindings/python
98 + }
99 +
100 + # help build system find the right objects
101 + python_foreach_impl python_compile \
102 + VPATH="${BUILD_DIR}"/bindings/python \
103 + LIBS="${BUILD_DIR}"/src/libcap-ng.la
104 + fi
105 +}
106 +
107 +src_test() {
108 + if [[ "${EUID}" -eq 0 ]]; then
109 + ewarn "Skipping tests due to root permissions."
110 + return
111 + fi
112 +
113 + autotools-utils_src_test
114 +
115 + if use python; then
116 + python_foreach_impl \
117 + autotools-utils_src_compile -C bindings/python check \
118 + VPATH="${BUILD_DIR}"/bindings/python:"${S}"/bindings/python/test
119 + fi
120 +}
121 +
122 +src_install() {
123 + autotools-utils_src_install
124 +
125 + if use python; then
126 + python_foreach_impl \
127 + autotools-utils_src_install -C bindings/python \
128 + VPATH="${BUILD_DIR}"/bindings/python
129 + fi
130 +}