Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 460044 | Differences between
and this patch

Collapse All | Expand All

(-)libcap-ng-0.7.3.ebuild (-30 / +22 lines)
Lines 3-13 Link Here
3
# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap-ng/libcap-ng-0.7.3.ebuild,v 1.4 2013/02/20 23:32:06 zmedico Exp $
3
# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap-ng/libcap-ng-0.7.3.ebuild,v 1.4 2013/02/20 23:32:06 zmedico Exp $
4
4
5
EAPI=5
5
EAPI=5
6
PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} )
6
7
7
SUPPORT_PYTHON_ABIS="1"
8
inherit autotools eutils flag-o-matic python-r1
8
RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
9
10
inherit autotools flag-o-matic python
11
9
12
DESCRIPTION="POSIX 1003.1e capabilities"
10
DESCRIPTION="POSIX 1003.1e capabilities"
13
HOMEPAGE="http://people.redhat.com/sgrubb/libcap-ng/"
11
HOMEPAGE="http://people.redhat.com/sgrubb/libcap-ng/"
Lines 18-32 SLOT="0" Link Here
18
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~arm-linux ~x86-linux"
16
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~arm-linux ~x86-linux"
19
IUSE="python static-libs"
17
IUSE="python static-libs"
20
18
21
RDEPEND="python? ( dev-lang/python )"
19
RDEPEND="python? ( ${PYTHON_DEPS} )"
22
DEPEND="${RDEPEND}
20
DEPEND="${RDEPEND}
23
	sys-kernel/linux-headers
21
	sys-kernel/linux-headers
24
	python? ( >=dev-lang/swig-2 )"
22
	python? ( >=dev-lang/swig-2 )"
25
23
26
PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
27
28
pkg_setup() {
24
pkg_setup() {
29
	use python && python_pkg_setup
25
	use python && python_export_best
30
}
26
}
31
27
32
src_prepare() {
28
src_prepare() {
Lines 52-67 src_compile() { Link Here
52
	default
48
	default
53
49
54
	if use python; then
50
	if use python; then
55
		python_copy_sources bindings/python
56
57
		building() {
51
		building() {
58
			emake \
52
			if [[ ${EPYTHON} = python2.* ]]; then
53
				local CFLAGS="${CFLAGS}"
54
				append-cflags -fno-strict-aliasing
55
			fi
56
57
			cp -pr bindings/python{,-${EPYTHON}} || die
58
59
			emake -C bindings/python-${EPYTHON} \
59
				CFLAGS="${CFLAGS}" \
60
				CFLAGS="${CFLAGS}" \
60
				PYTHON_VERSION="$(python_get_version)" \
61
				PYTHON_VERSION="${EPYTHON#python}" \
61
				pyexecdir="$(python_get_sitedir)" \
62
				pyexecdir="$(python_get_sitedir)" \
62
				pythondir="$(python_get_sitedir)"
63
				pythondir="$(python_get_sitedir)"
63
		}
64
		}
64
		python_execute_function -s --source-dir bindings/python building
65
		python_foreach_impl building
65
	fi
66
	fi
66
}
67
}
67
68
Lines 75-88 src_test() { Link Here
75
76
76
	if use python; then
77
	if use python; then
77
		testing() {
78
		testing() {
78
			emake \
79
			emake -C bindings/python-${EPYTHON} \
79
				PYTHON_VERSION="$(python_get_version)" \
80
				PYTHON_VERSION="${EPYTHON#python}" \
80
				pyexecdir="$(python_get_sitedir)" \
81
				pyexecdir="$(python_get_sitedir)" \
81
				pythondir="$(python_get_sitedir)" \
82
				pythondir="$(python_get_sitedir)" \
82
				TESTS_ENVIRONMENT="PYTHONPATH=..:../.libs" \
83
				TESTS_ENVIRONMENT="PYTHONPATH=..:../.libs" \
83
				check
84
				check
84
		}
85
		}
85
		python_execute_function -s --source-dir bindings/python testing
86
		python_foreach_impl testing
86
	fi
87
	fi
87
}
88
}
88
89
Lines 91-115 src_install() { Link Here
91
92
92
	if use python; then
93
	if use python; then
93
		installation() {
94
		installation() {
94
			emake \
95
			emake -C bindings/python-${EPYTHON} \
95
				DESTDIR="${D}" \
96
				DESTDIR="${D}" \
96
				PYTHON_VERSION="$(python_get_version)" \
97
				PYTHON_VERSION="${EPYTHON#python}" \
97
				pyexecdir="$(python_get_sitedir)" \
98
				pyexecdir="$(python_get_sitedir)" \
98
				pythondir="$(python_get_sitedir)" \
99
				pythondir="$(python_get_sitedir)" \
99
				install
100
				install
101
			python_optimize
100
		}
102
		}
101
		python_execute_function -s --source-dir bindings/python installation
103
		python_foreach_impl installation
102
103
		python_clean_installation_image
104
	fi
104
	fi
105
105
106
	rm -f "${ED}"/usr/lib*/${PN}.la
106
	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
}
107
}

Return to bug 460044