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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Jul 26 02:39:08 2012 UTC (2 years, 1 month ago) by radhermit
Branch: MAIN
Changes since 1.1: +2 -2 lines
Remove unused eutils inherit.

(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)

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.ebuild,v 1.1 2012/07/25 21:34:00 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="sys-apps/attr
22 python? ( dev-lang/python )"
23 DEPEND="${RDEPEND}
24 sys-kernel/linux-headers
25 python? ( >=dev-lang/swig-2 )"
26
27 PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
28
29 pkg_setup() {
30 use python && python_pkg_setup
31 }
32
33 src_prepare() {
34 # Disable byte-compilation of Python modules.
35 >py-compile
36
37 # Python bindings are built/tested/installed manually.
38 sed -i -e "/^SUBDIRS/s/ python//" bindings/Makefile.am || die
39
40 eautoreconf
41
42 use sparc && replace-flags -O? -O0
43 }
44
45 src_configure() {
46 econf \
47 $(use_enable static-libs static) \
48 $(use_with python)
49 }
50
51 src_compile() {
52 default
53
54 if use python; then
55 python_copy_sources bindings/python
56
57 building() {
58 emake \
59 CFLAGS="${CFLAGS}" \
60 PYTHON_VERSION="$(python_get_version)" \
61 pyexecdir="$(python_get_sitedir)" \
62 pythondir="$(python_get_sitedir)"
63 }
64 python_execute_function -s --source-dir bindings/python building
65 fi
66 }
67
68 src_test() {
69 if [[ "${EUID}" -eq 0 ]]; then
70 ewarn "Skipping tests due to root permissions."
71 return
72 fi
73
74 default
75
76 if use python; then
77 testing() {
78 emake \
79 PYTHON_VERSION="$(python_get_version)" \
80 pyexecdir="$(python_get_sitedir)" \
81 pythondir="$(python_get_sitedir)" \
82 TESTS_ENVIRONMENT="PYTHONPATH=..:../.libs" \
83 check
84 }
85 python_execute_function -s --source-dir bindings/python testing
86 fi
87 }
88
89 src_install() {
90 default
91
92 if use python; then
93 installation() {
94 emake \
95 DESTDIR="${D}" \
96 PYTHON_VERSION="$(python_get_version)" \
97 pyexecdir="$(python_get_sitedir)" \
98 pythondir="$(python_get_sitedir)" \
99 install
100 }
101 python_execute_function -s --source-dir bindings/python installation
102
103 python_clean_installation_image
104 fi
105
106 rm -f "${ED}"/usr/lib*/${PN}.la
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 }

  ViewVC Help
Powered by ViewVC 1.1.20