Gentoo Archives: gentoo-commits

From: "Sven Vermeulen (swift)" <swift@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/libselinux: ChangeLog libselinux-2.1.12-r1.ebuild
Date: Mon, 29 Oct 2012 15:36:30
Message-Id: 20121029153613.A0C1721600@flycatcher.gentoo.org
1 swift 12/10/29 15:36:13
2
3 Modified: ChangeLog
4 Added: libselinux-2.1.12-r1.ebuild
5 Log:
6 Adding support for static-libs, needed for bug #436752
7
8 (Portage version: 2.1.11.9/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.89 sys-libs/libselinux/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/ChangeLog?rev=1.89&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/ChangeLog?rev=1.89&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/ChangeLog?r1=1.88&r2=1.89
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v
20 retrieving revision 1.88
21 retrieving revision 1.89
22 diff -u -r1.88 -r1.89
23 --- ChangeLog 13 Oct 2012 16:42:25 -0000 1.88
24 +++ ChangeLog 29 Oct 2012 15:36:13 -0000 1.89
25 @@ -1,6 +1,13 @@
26 # ChangeLog for sys-libs/libselinux
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.88 2012/10/13 16:42:25 swift Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.89 2012/10/29 15:36:13 swift Exp $
30 +
31 +*libselinux-2.1.12-r1 (29 Oct 2012)
32 +
33 + 29 Oct 2012; <swift@g.o> +libselinux-2.1.12-r1.ebuild:
34 + Adding support for static-libs and RDEPEND on libpcre[static-libs] when
35 + needed. See bug #436752. Also updates patching method and adds
36 + Requires.private towards libpcre.
37
38 13 Oct 2012; <swift@g.o> libselinux-2.1.12.ebuild:
39 Supporting user-provided patches using epatch_user
40
41
42
43 1.1 sys-libs/libselinux/libselinux-2.1.12-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/libselinux-2.1.12-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/libselinux-2.1.12-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: libselinux-2.1.12-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/libselinux-2.1.12-r1.ebuild,v 1.1 2012/10/29 15:36:13 swift Exp $
53
54 EAPI="4"
55 PYTHON_DEPEND="python? *"
56 SUPPORT_PYTHON_ABIS="1"
57 RESTRICT_PYTHON_ABIS="2.5 *-jython *-pypy-*"
58
59 inherit multilib python toolchain-funcs eutils
60
61 SEPOL_VER="2.1.8"
62
63 DESCRIPTION="SELinux userland library"
64 HOMEPAGE="http://userspace.selinuxproject.org"
65 SRC_URI="http://userspace.selinuxproject.org/releases/20120924/${P}.tar.gz
66 http://dev.gentoo.org/~swift/patches/${PN}/patchbundle-${P}-r1.tar.gz"
67
68 LICENSE="public-domain"
69 SLOT="0"
70 KEYWORDS="~amd64 ~x86"
71 IUSE="python ruby static-libs"
72
73 RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}
74 >=dev-libs/libpcre-8.30-r2[static-libs?]
75 ruby? ( dev-lang/ruby )"
76 DEPEND="${RDEPEND}
77 virtual/pkgconfig
78 ruby? ( dev-lang/swig )
79 python? ( dev-lang/swig )"
80
81 S="${WORKDIR}/${P}"
82
83 pkg_setup() {
84 if use python; then
85 python_pkg_setup
86 fi
87 }
88
89 src_unpack() {
90 default
91 }
92
93 src_prepare() {
94 # fix up paths for multilib
95 sed -i \
96 -e "/^LIBDIR/s/lib/$(get_libdir)/" \
97 -e "/^SHLIBDIR/s/lib/$(get_libdir)/" \
98 src/Makefile utils/Makefile || die
99
100 EPATCH_MULTI_MSG="Applying libselinux patches ... " \
101 EPATCH_SUFFIX="patch" \
102 EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
103 EPATCH_FORCE="yes" \
104 epatch
105
106 epatch_user
107 }
108
109 src_compile() {
110 emake \
111 AR="$(tc-getAR)" \
112 CC="$(tc-getCC)" \
113 LDFLAGS="-fPIC $($(tc-getPKG_CONFIG) libpcre --libs) ${LDFLAGS}" all || die
114
115 if use python; then
116 python_copy_sources src
117 building() {
118 emake CC="$(tc-getCC)" PYINC="-I$(python_get_includedir)" PYTHONLIBDIR="$(python_get_library -l)" PYPREFIX="python-$(python_get_version)" LDFLAGS="-fPIC $($(tc-getPKG_CONFIG) libpcre --libs) ${LDFLAGS}" pywrap
119 }
120 python_execute_function -s --source-dir src building
121 fi
122
123 if use ruby; then
124 emake CC="$(tc-getCC)" rubywrap || die
125 fi
126 }
127
128 src_install() {
129 emake DESTDIR="${D}" install || die
130
131 if use python; then
132 installation() {
133 emake DESTDIR="${D}" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" install-pywrap
134 }
135 python_execute_function -s --source-dir src installation
136 fi
137
138 if use ruby; then
139 emake DESTDIR="${D}" install-rubywrap || die
140 fi
141
142 use static-libs || rm "${D}"/usr/lib*/*.a
143 }
144
145 pkg_postinst() {
146 if use python; then
147 python_mod_optimize selinux
148 fi
149 }
150
151 pkg_postrm() {
152 if use python; then
153 python_mod_cleanup selinux
154 fi
155 }