/[gentoo-x86]/sys-libs/libcap-ng/libcap-ng-0.7.1.ebuild
Gentoo

Contents of /sys-libs/libcap-ng/libcap-ng-0.7.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Nov 2 22:25:37 2012 UTC (20 months, 2 weeks ago) by radhermit
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -3 lines
Drop unused sys-apps/attr dep as noted by Arfrever.

(Portage version: 2.2.0_alpha141/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap-ng/libcap-ng-0.7.1.ebuild,v 1.1 2012/11/02 11:43:21 radhermit Exp $
4
5 EAPI=4
6
7 SUPPORT_PYTHON_ABIS="1"
8 RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
9
10 inherit autotools flag-o-matic python
11
12 DESCRIPTION="POSIX 1003.1e capabilities"
13 HOMEPAGE="http://people.redhat.com/sgrubb/libcap-ng/"
14 SRC_URI="http://people.redhat.com/sgrubb/${PN}/${P}.tar.gz"
15
16 LICENSE="LGPL-2.1"
17 SLOT="0"
18 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
19 IUSE="python static-libs"
20
21 RDEPEND="python? ( dev-lang/python )"
22 DEPEND="${RDEPEND}
23 sys-kernel/linux-headers
24 python? ( >=dev-lang/swig-2 )"
25
26 PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
27
28 pkg_setup() {
29 use python && python_pkg_setup
30 }
31
32 src_prepare() {
33 # Disable byte-compilation of Python modules.
34 >py-compile
35
36 # Python bindings are built/tested/installed manually.
37 sed -i -e "/^SUBDIRS/s/ python//" bindings/Makefile.am || die
38
39 eautoreconf
40
41 use sparc && replace-flags -O? -O0
42 }
43
44 src_configure() {
45 econf \
46 $(use_enable static-libs static) \
47 $(use_with python)
48 }
49
50 src_compile() {
51 default
52
53 if use python; then
54 python_copy_sources bindings/python
55
56 building() {
57 emake \
58 CFLAGS="${CFLAGS}" \
59 PYTHON_VERSION="$(python_get_version)" \
60 pyexecdir="$(python_get_sitedir)" \
61 pythondir="$(python_get_sitedir)"
62 }
63 python_execute_function -s --source-dir bindings/python building
64 fi
65 }
66
67 src_test() {
68 if [[ "${EUID}" -eq 0 ]]; then
69 ewarn "Skipping tests due to root permissions."
70 return
71 fi
72
73 default
74
75 if use python; then
76 testing() {
77 emake \
78 PYTHON_VERSION="$(python_get_version)" \
79 pyexecdir="$(python_get_sitedir)" \
80 pythondir="$(python_get_sitedir)" \
81 TESTS_ENVIRONMENT="PYTHONPATH=..:../.libs" \
82 check
83 }
84 python_execute_function -s --source-dir bindings/python testing
85 fi
86 }
87
88 src_install() {
89 default
90
91 if use python; then
92 installation() {
93 emake \
94 DESTDIR="${D}" \
95 PYTHON_VERSION="$(python_get_version)" \
96 pyexecdir="$(python_get_sitedir)" \
97 pythondir="$(python_get_sitedir)" \
98 install
99 }
100 python_execute_function -s --source-dir bindings/python installation
101
102 python_clean_installation_image
103 fi
104
105 rm -f "${ED}"/usr/lib*/${PN}.la
106 }
107
108 pkg_postinst() {
109 use python && python_mod_optimize capng.py
110 }
111
112 pkg_postrm() {
113 use python && python_mod_cleanup capng.py
114 }

  ViewVC Help
Powered by ViewVC 1.1.20