Lines 4-13
Link Here
|
4 |
|
4 |
|
5 |
EAPI=5 |
5 |
EAPI=5 |
6 |
|
6 |
|
7 |
SUPPORT_PYTHON_ABIS="1" |
7 |
PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} ) |
8 |
RESTRICT_PYTHON_ABIS="*-jython *-pypy-*" |
|
|
9 |
|
8 |
|
10 |
inherit autotools flag-o-matic python |
9 |
inherit autotools eutils flag-o-matic python-r1 |
11 |
|
10 |
|
12 |
DESCRIPTION="POSIX 1003.1e capabilities" |
11 |
DESCRIPTION="POSIX 1003.1e capabilities" |
13 |
HOMEPAGE="http://people.redhat.com/sgrubb/libcap-ng/" |
12 |
HOMEPAGE="http://people.redhat.com/sgrubb/libcap-ng/" |
Lines 18-34
SLOT="0"
Link Here
|
18 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~arm-linux ~x86-linux" |
17 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~arm-linux ~x86-linux" |
19 |
IUSE="python static-libs" |
18 |
IUSE="python static-libs" |
20 |
|
19 |
|
21 |
RDEPEND="python? ( dev-lang/python )" |
20 |
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
|
|
21 |
|
22 |
RDEPEND="python? ( ${PYTHON_DEPS} )" |
22 |
DEPEND="${RDEPEND} |
23 |
DEPEND="${RDEPEND} |
23 |
sys-kernel/linux-headers |
24 |
sys-kernel/linux-headers |
24 |
python? ( >=dev-lang/swig-2 )" |
25 |
python? ( >=dev-lang/swig-2 )" |
25 |
|
26 |
|
26 |
PYTHON_CFLAGS=("2.* + -fno-strict-aliasing") |
|
|
27 |
|
28 |
pkg_setup() { |
29 |
use python && python_pkg_setup |
30 |
} |
31 |
|
32 |
src_prepare() { |
27 |
src_prepare() { |
33 |
# Disable byte-compilation of Python modules. |
28 |
# Disable byte-compilation of Python modules. |
34 |
>py-compile |
29 |
>py-compile |
Lines 52-67
src_compile() {
Link Here
|
52 |
default |
47 |
default |
53 |
|
48 |
|
54 |
if use python; then |
49 |
if use python; then |
55 |
python_copy_sources bindings/python |
50 |
S=bindings/python python_copy_sources |
56 |
|
51 |
|
57 |
building() { |
52 |
building() { |
|
|
53 |
if [[ ${EPYTHON} = python2.* ]]; then |
54 |
local CFLAGS="${CFLAGS}" |
55 |
append-cflags -fno-strict-aliasing |
56 |
fi |
58 |
emake \ |
57 |
emake \ |
59 |
CFLAGS="${CFLAGS}" \ |
58 |
CFLAGS="${CFLAGS}" \ |
60 |
PYTHON_VERSION="$(python_get_version)" \ |
59 |
PYTHON="${PYTHON}" \ |
|
|
60 |
PYTHON_VERSION="${EPYTHON#python}" \ |
61 |
pyexecdir="$(python_get_sitedir)" \ |
61 |
pyexecdir="$(python_get_sitedir)" \ |
62 |
pythondir="$(python_get_sitedir)" |
62 |
pythondir="$(python_get_sitedir)" |
63 |
} |
63 |
} |
64 |
python_execute_function -s --source-dir bindings/python building |
64 |
BUILD_DIR=bindings/python \ |
|
|
65 |
python_parallel_foreach_impl run_in_build_dir building |
65 |
fi |
66 |
fi |
66 |
} |
67 |
} |
67 |
|
68 |
|
Lines 76-88
src_test() {
Link Here
|
76 |
if use python; then |
77 |
if use python; then |
77 |
testing() { |
78 |
testing() { |
78 |
emake \ |
79 |
emake \ |
79 |
PYTHON_VERSION="$(python_get_version)" \ |
80 |
PYTHON="${PYTHON}" \ |
|
|
81 |
PYTHON_VERSION="${EPYTHON#python}" \ |
80 |
pyexecdir="$(python_get_sitedir)" \ |
82 |
pyexecdir="$(python_get_sitedir)" \ |
81 |
pythondir="$(python_get_sitedir)" \ |
83 |
pythondir="$(python_get_sitedir)" \ |
82 |
TESTS_ENVIRONMENT="PYTHONPATH=..:../.libs" \ |
84 |
TESTS_ENVIRONMENT="PYTHONPATH=..:../.libs" \ |
83 |
check |
85 |
check |
84 |
} |
86 |
} |
85 |
python_execute_function -s --source-dir bindings/python testing |
87 |
BUILD_DIR=bindings/python \ |
|
|
88 |
python_parallel_foreach_impl run_in_build_dir testing |
86 |
fi |
89 |
fi |
87 |
} |
90 |
} |
88 |
|
91 |
|
Lines 93-115
src_install() {
Link Here
|
93 |
installation() { |
96 |
installation() { |
94 |
emake \ |
97 |
emake \ |
95 |
DESTDIR="${D}" \ |
98 |
DESTDIR="${D}" \ |
96 |
PYTHON_VERSION="$(python_get_version)" \ |
99 |
PYTHON="${PYTHON}" \ |
|
|
100 |
PYTHON_VERSION="${EPYTHON#python}" \ |
97 |
pyexecdir="$(python_get_sitedir)" \ |
101 |
pyexecdir="$(python_get_sitedir)" \ |
98 |
pythondir="$(python_get_sitedir)" \ |
102 |
pythondir="$(python_get_sitedir)" \ |
99 |
install |
103 |
install |
|
|
104 |
python_optimize |
100 |
} |
105 |
} |
101 |
python_execute_function -s --source-dir bindings/python installation |
106 |
BUILD_DIR=bindings/python \ |
102 |
|
107 |
python_parallel_foreach_impl run_in_build_dir installation |
103 |
python_clean_installation_image |
|
|
104 |
fi |
108 |
fi |
105 |
|
109 |
|
106 |
rm -f "${ED}"/usr/lib*/${PN}.la |
110 |
prune_libtool_files --modules |
107 |
} |
|
|
108 |
|
109 |
pkg_postinst() { |
110 |
use python && python_mod_optimize capng.py |
111 |
} |
112 |
|
113 |
pkg_postrm() { |
114 |
use python && python_mod_cleanup capng.py |
115 |
} |
111 |
} |