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

Collapse All | Expand All

(-)file_not_specified_in_diff (-4 / +75 lines)
Line  Link Here
0
-- libcap-ng-0.6.2.ebuild
0
++ libcap-ng-0.6.4.ebuild
Lines 1-10 Link Here
1
# Copyright 1999-2010 Gentoo Foundation
1
# Copyright 1999-2010 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
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.6.2.ebuild,v 1.11 2010/07/19 21:16:52 jer Exp $
3
# $Header: $
4
4
5
EAPI="2"
5
EAPI="2"
6
SUPPORT_PYTHON_ABIS="1"
6
7
7
inherit eutils autotools flag-o-matic
8
inherit eutils autotools flag-o-matic python
8
9
9
DESCRIPTION="POSIX 1003.1e capabilities"
10
DESCRIPTION="POSIX 1003.1e capabilities"
10
HOMEPAGE="http://people.redhat.com/sgrubb/libcap-ng/"
11
HOMEPAGE="http://people.redhat.com/sgrubb/libcap-ng/"
Lines 21-38 Link Here
21
	sys-kernel/linux-headers
22
	sys-kernel/linux-headers
22
	python? ( dev-lang/swig )"
23
	python? ( dev-lang/swig )"
23
24
25
PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
26
27
pkg_setup() {
28
	use python && python_pkg_setup
29
}
30
24
src_prepare() {
31
src_prepare() {
32
	# Disable byte-compilation of Python modules.
33
	echo "#!/bin/sh" > py-compile
34
35
	# Python bindings are built/tested/installed manually.
36
	sed -e "/^SUBDIRS/s/ python//" -i bindings/Makefile.am
37
25
	epatch "${FILESDIR}"/${PN}-gentoo.patch
38
	epatch "${FILESDIR}"/${PN}-gentoo.patch
39
	epatch "${FILESDIR}"/${P}-python.patch
40
	epatch "${FILESDIR}"/${P}-fix_tests_building.patch
26
	eautoreconf
41
	eautoreconf
27
42
28
	use sparc && replace-flags -O? -O0
43
	use sparc && replace-flags -O? -O0
29
}
44
}
30
45
31
src_configure() {
46
src_configure() {
32
	econf $(use_enable python) || die "econf failed"
47
	econf $(use_enable 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
	default
69
70
	if use python; then
71
		testing() {
72
			emake \
73
				PYTHON_VERSION="$(python_get_version)" \
74
				pyexecdir="$(python_get_sitedir)" \
75
				pythondir="$(python_get_sitedir)" \
76
				TESTS_ENVIRONMENT="PYTHONPATH=..:../.libs" \
77
				check
78
		}
79
		python_execute_function -s --source-dir bindings/python testing
80
	fi
33
}
81
}
34
82
35
src_install() {
83
src_install() {
36
	emake install DESTDIR="${D}" || die "emake install failed"
84
	emake install DESTDIR="${D}" || die "emake install failed"
85
86
	if use python; then
87
		installation() {
88
			emake \
89
				DESTDIR="${D}" \
90
				PYTHON_VERSION="$(python_get_version)" \
91
				pyexecdir="$(python_get_sitedir)" \
92
				pythondir="$(python_get_sitedir)" \
93
				install
94
		}
95
		python_execute_function -s --source-dir bindings/python installation
96
97
		python_clean_installation_image
98
	fi
99
37
	dodoc ChangeLog README
100
	dodoc ChangeLog README
38
}
101
}
102
103
pkg_postinst() {
104
	use python && python_mod_optimize capng.py
105
}
106
107
pkg_postrm() {
108
	use python && python_mod_cleanup capng.py
109
}

Return to bug 316953