Gentoo Archives: gentoo-commits

From: Sven Vermeulen <sven.vermeulen@××××××.be>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-dev:master commit in: sys-libs/libselinux/
Date: Tue, 26 Mar 2013 20:06:59
Message-Id: 1364328290.69432fe5083642ecd4ef759a904918ff4458f512.SwifT@gentoo
1 commit: 69432fe5083642ecd4ef759a904918ff4458f512
2 Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
3 AuthorDate: Tue Mar 26 20:04:50 2013 +0000
4 Commit: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
5 CommitDate: Tue Mar 26 20:04:50 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=69432fe5
7
8 Attempt to fix bug #462626
9
10 Package-Manager: portage-2.1.11.52
11 Manifest-Sign-Key: 0xCDBA2FDB
12
13 ---
14 sys-libs/libselinux/ChangeLog | 409 +++++++++++++++++++++++
15 sys-libs/libselinux/libselinux-2.1.12-r3.ebuild | 129 +++++++
16 sys-libs/libselinux/metadata.xml | 10 +
17 3 files changed, 548 insertions(+), 0 deletions(-)
18
19 diff --git a/sys-libs/libselinux/ChangeLog b/sys-libs/libselinux/ChangeLog
20 new file mode 100644
21 index 0000000..c56d12d
22 --- /dev/null
23 +++ b/sys-libs/libselinux/ChangeLog
24 @@ -0,0 +1,409 @@
25 +# ChangeLog for sys-libs/libselinux
26 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
27 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.93 2012/12/30 15:17:46 swift Exp $
28 +
29 + 30 Dec 2012; Sven Vermeulen libselinux-2.1.12-r2.ebuild:
30 + Stabilize
31 +
32 +*libselinux-2.1.12-r2 (03 Dec 2012)
33 +
34 + 03 Dec 2012; <swift@g.o> +libselinux-2.1.12-r2.ebuild:
35 + Fix bugs #444372 and #443928
36 +
37 + 17 Nov 2012; <swift@g.o> libselinux-2.1.12-r1.ebuild:
38 + Stabilize
39 +
40 + 17 Nov 2012; <swift@g.o> libselinux-2.1.9-r3.ebuild:
41 + Stabilize
42 +
43 +*libselinux-2.1.12-r1 (29 Oct 2012)
44 +
45 + 29 Oct 2012; <swift@g.o> +libselinux-2.1.12-r1.ebuild:
46 + Adding support for static-libs and RDEPEND on libpcre[static-libs] when
47 + needed. See bug #436752. Also updates patching method and adds
48 + Requires.private towards libpcre.
49 +
50 + 13 Oct 2012; <swift@g.o> libselinux-2.1.12.ebuild:
51 + Supporting user-provided patches using epatch_user
52 +
53 +*libselinux-2.1.12 (09 Oct 2012)
54 +*libselinux-2.1.9-r3 (09 Oct 2012)
55 +
56 + 09 Oct 2012; <swift@g.o> +libselinux-2.1.9-r3.ebuild,
57 + +files/libselinux-2.1.9-support_ruby19.patch, +libselinux-2.1.12.ebuild,
58 + +files/libselinux-2.1.12-mountsys.patch:
59 + Introducing upstream version and fix for ruby19
60 +
61 + 06 Oct 2012; <swift@g.o> libselinux-2.1.9-r2.ebuild:
62 + Stabilize
63 +
64 + 03 Oct 2012; Mike Frysinger <vapier@g.o> libselinux-2.1.9-r2.ebuild:
65 + Fix /usr/lib handling in utils subdir too.
66 +
67 +*libselinux-2.1.9-r2 (08 Sep 2012)
68 +
69 + 08 Sep 2012; <swift@g.o> +libselinux-2.1.9-r2.ebuild:
70 + Fix bugs #429456 and #417303
71 +
72 + 06 Aug 2012; Patrick Lauer <patrick@g.o> libselinux-2.1.9-r1.ebuild:
73 + Restricting python ABIs that don't work
74 +
75 + 10 Jul 2012; <swift@g.o> libselinux-2.1.9-r1.ebuild:
76 + Stabilization
77 +
78 + 26 Jun 2012; Mike Gilbert <floppym@g.o> libselinux-2.1.9-r1.ebuild,
79 + libselinux-2.1.9.ebuild:
80 + Restrict pypy per Arfrever.
81 +
82 + 13 May 2012; <swift@g.o> -libselinux-2.1.0.ebuild:
83 + Removing obsoleted ebuild
84 +
85 +*libselinux-2.1.9-r1 (13 May 2012)
86 +
87 + 13 May 2012; <swift@g.o> +libselinux-2.1.9-r1.ebuild,
88 + +files/libselinux-2.1.9-mountsys.patch:
89 + Mount /sys before trying to mount /sys/fs/selinux from within the policy load
90 + functions, bug #414779
91 +
92 + 29 Apr 2012; <swift@g.o> libselinux-2.1.9.ebuild:
93 + Stabilization
94 +
95 +*libselinux-2.1.9 (31 Mar 2012)
96 +
97 + 31 Mar 2012; <swift@g.o> +libselinux-2.1.9.ebuild:
98 + Bump to version 2.1.9
99 +
100 + 12 Nov 2011; <swift@g.o> -libselinux-2.0.94.ebuild,
101 + -libselinux-2.0.98.ebuild:
102 + Remove deprecated ebuilds
103 +
104 + 23 Oct 2011; <swift@g.o> libselinux-2.1.0.ebuild:
105 + Stabilization (tracker #384231)
106 +
107 + 12 Aug 2011; Anthony G. Basile <blueness@g.o>
108 + -libselinux-2.0.71.ebuild, -libselinux-2.0.85.ebuild,
109 + -files/libselinux-2.0.85-headers.patch, -files/compat.py:
110 + Removed deprecated versions
111 +
112 +*libselinux-2.1.0 (03 Aug 2011)
113 +
114 + 03 Aug 2011; Anthony G. Basile <blueness@g.o>
115 + +libselinux-2.1.0.ebuild:
116 + Bump to 20110727 SELinux userspace release
117 +
118 +*libselinux-2.0.98 (15 Jul 2011)
119 +
120 + 15 Jul 2011; Anthony G. Basile <blueness@g.o>
121 + +libselinux-2.0.98.ebuild:
122 + Bump to 2.0.98 - proxy for SwifT
123 +
124 + 28 May 2011; Anthony G. Basile <blueness@g.o>
125 + libselinux-2.0.94.ebuild:
126 + Stable amd64 x86
127 +
128 + 13 Feb 2011; Anthony G. Basile <blueness@g.o> metadata.xml:
129 + Updated metadata.xml to reflect new selinux herd.
130 +
131 + 06 Feb 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
132 + libselinux-2.0.94.ebuild:
133 + Add "python" USE flag.
134 +
135 + 05 Feb 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
136 + libselinux-2.0.94.ebuild:
137 + Set SUPPORT_PYTHON_ABIS (bug #353763). Respect AR and CC.
138 +
139 +*libselinux-2.0.94 (05 Feb 2011)
140 +
141 + 05 Feb 2011; Anthony G. Basile <blueness@g.o>
142 + +libselinux-2.0.94.ebuild:
143 + New upstream release.
144 +
145 + 29 Sep 2010; Mike Frysinger <vapier@g.o> libselinux-2.0.85.ebuild,
146 + +files/libselinux-2.0.85-headers.patch:
147 + Fix by Chris Richards for building with glibc-2.12 #338302.
148 +
149 + 16 Apr 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
150 + libselinux-2.0.71.ebuild, libselinux-2.0.85.ebuild:
151 + Delete calls to deprecated python_version().
152 +
153 + 02 Aug 2009; Chris PeBenito <pebenito@g.o>
154 + libselinux-2.0.71.ebuild, libselinux-2.0.85.ebuild:
155 + Add python_need_rebuild.
156 +
157 +*libselinux-2.0.85 (02 Aug 2009)
158 +
159 + 02 Aug 2009; Chris PeBenito <pebenito@g.o>
160 + +libselinux-2.0.85.ebuild:
161 + New upstream release.
162 +
163 + 18 Jul 2009; Chris PeBenito <pebenito@g.o>
164 + -libselinux-1.34.14.ebuild, libselinux-2.0.71.ebuild:
165 + Mark stable. Remove old ebuilds.
166 +
167 +*libselinux-2.0.71 (03 Oct 2008)
168 +
169 + 03 Oct 2008; Chris PeBenito <pebenito@g.o>
170 + +libselinux-2.0.71.ebuild:
171 + Initial commit of 2.0 libselinux.
172 +
173 + 29 May 2008; Ali Polatel <hawking@g.o> libselinux-1.34.14.ebuild:
174 + python_mod_optimize is ROOT aware. Fixed python_mod_cleanup.
175 +
176 + 13 May 2008; Chris PeBenito <pebenito@g.o>
177 + -libselinux-1.28-r1.ebuild, -libselinux-1.30.ebuild,
178 + -libselinux-1.34.0.ebuild, -libselinux-1.34.13.ebuild,
179 + libselinux-1.34.14.ebuild:
180 + Mark 1.34.14 stable, clear old ebuilds.
181 +
182 + 11 May 2008; Chris PeBenito <pebenito@g.o>
183 + libselinux-1.34.0.ebuild, libselinux-1.34.13.ebuild,
184 + libselinux-1.34.14.ebuild:
185 + Fix bug #221501.
186 +
187 +*libselinux-1.34.14 (29 Jan 2008)
188 +
189 + 29 Jan 2008; Chris PeBenito <pebenito@g.o>
190 + +libselinux-1.34.14.ebuild:
191 + New upstream bugfix release.
192 +
193 +*libselinux-1.34.13 (18 Oct 2007)
194 +
195 + 18 Oct 2007; Chris PeBenito <pebenito@g.o>
196 + +libselinux-1.34.13.ebuild:
197 + New upstream release.
198 +
199 + 04 Jun 2007; Chris PeBenito <pebenito@g.o>
200 + libselinux-1.34.0.ebuild:
201 + Mark stable.
202 +
203 + 16 Feb 2007; Stephen Bennett <spb@g.o> libselinux-1.34.0.ebuild:
204 + Add missing swig depend. Bug #167007
205 +
206 +*libselinux-1.34.0 (15 Feb 2007)
207 +
208 + 15 Feb 2007; Chris PeBenito <pebenito@g.o>
209 + +libselinux-1.34.0.ebuild:
210 + New upstream release.
211 +
212 + 23 Oct 2006; Chris PeBenito <pebenito@g.o>
213 + libselinux-1.30.29.ebuild:
214 + Fix depend for glibc
215 +
216 + 09 Oct 2006; Chris PeBenito <pebenito@g.o>
217 + libselinux-1.30.29.ebuild:
218 + Stable to make repoman happy.
219 +
220 +*libselinux-1.30.29 (05 Oct 2006)
221 +
222 + 05 Oct 2006; Chris PeBenito <pebenito@g.o>
223 + +libselinux-1.30.29.ebuild:
224 + Add SVN snapshot.
225 +
226 + 31 Jul 2006; Chris PeBenito <pebenito@g.o> libselinux-1.30.ebuild:
227 + Mark stable, long overdue.
228 +
229 + 07 Apr 2006; Chris PeBenito <pebenito@g.o> libselinux-1.30.ebuild:
230 + Split python wrapper compile into a separate emake to ensure the main
231 + library is built before trying to build the wrapper. Fixes bug #129074.
232 +
233 + 22 Mar 2006; Chris PeBenito <pebenito@g.o> -libselinux-1.24.ebuild,
234 + -libselinux-1.28.ebuild, libselinux-1.28-r1.ebuild:
235 + Mark 1.28-r1 stable, clean out old ebuilds.
236 +
237 +*libselinux-1.30 (18 Mar 2006)
238 +
239 + 18 Mar 2006; Chris PeBenito <pebenito@g.o> +libselinux-1.30.ebuild:
240 + New upstream release.
241 +
242 + 22 Feb 2006; Stephen Bennett <spb@g.o> libselinux-1.28.ebuild:
243 + Alpha stable
244 +
245 +*libselinux-1.28-r1 (20 Feb 2006)
246 +
247 + 20 Feb 2006; Chris PeBenito <pebenito@g.o> +files/compat.py,
248 + +libselinux-1.28-r1.ebuild:
249 + Add python-selinux compatability aliases to swig wrapper.
250 +
251 + 19 Feb 2006; Joshua Kinard <kumba@g.o> libselinux-1.28.ebuild:
252 + Marked stable on mips.
253 +
254 + 09 Feb 2006; Chris PeBenito <pebenito@g.o> libselinux-1.28.ebuild:
255 + Move python_version out of global scope.
256 +
257 + 29 Jan 2006; Chris PeBenito <pebenito@g.o> libselinux-1.28.ebuild:
258 + Add python version handling to fix #120829, and add -fPIC to LDFLAGS to
259 + hopefully fix #119271.
260 +
261 + 17 Jan 2006; Chris PeBenito <pebenito@g.o> libselinux-1.28.ebuild:
262 + Mark stable, x86, amd64, ppc, sparc.
263 +
264 + 14 Jan 2006; Stephen Bennett <spb@g.o> libselinux-1.28.ebuild:
265 + Added ~alpha
266 +
267 + 15 Dec 2005; Chris PeBenito <pebenito@g.o> libselinux-1.28.ebuild:
268 + Tighten up versioning to try to prevent mismatch problems as seen in #112348.
269 +
270 +*libselinux-1.28 (09 Dec 2005)
271 +
272 + 09 Dec 2005; Chris PeBenito <pebenito@g.o>
273 + -files/libselinux-1.22.diff, -libselinux-1.22-r1.ebuild,
274 + +libselinux-1.28.ebuild:
275 + New upstream release.
276 +
277 + 09 Sep 2005; Chris PeBenito <pebenito@g.o> libselinux-1.24.ebuild:
278 + Mark stable.
279 +
280 +*libselinux-1.24 (25 Jun 2005)
281 +
282 + 25 Jun 2005; Chris PeBenito <pebenito@g.o> -libselinux-1.20.ebuild,
283 + -libselinux-1.22.ebuild, +libselinux-1.24.ebuild:
284 + New upstream release.
285 +
286 + 13 May 2005; Chris PeBenito <pebenito@g.o>
287 + libselinux-1.22-r1.ebuild:
288 + Mark stable.
289 +
290 + 10 May 2005; Stephen Bennett <spb@g.o> libselinux-1.22.ebuild:
291 + mips stable
292 +
293 +*libselinux-1.22-r1 (08 May 2005)
294 +
295 + 08 May 2005; Chris PeBenito <pebenito@g.o>
296 + +files/libselinux-1.22.diff, +libselinux-1.22-r1.ebuild:
297 + A couple fixes, including one for bug #91921.
298 +
299 + 01 May 2005; Stephen Bennett <spb@g.o> libselinux-1.22.ebuild:
300 + Mark ~mips.
301 +
302 + 01 May 2005; Chris PeBenito <pebenito@g.o> libselinux-1.22.ebuild:
303 + Mark stable.
304 +
305 +*libselinux-1.22 (13 Mar 2005)
306 +
307 + 13 Mar 2005; Chris PeBenito <pebenito@g.o> +libselinux-1.22.ebuild:
308 + New upstream release.
309 +
310 + 13 Feb 2005; Chris PeBenito <pebenito@g.o> libselinux-1.20.ebuild:
311 + Mark stable.
312 +
313 +*libselinux-1.20 (07 Jan 2005)
314 +
315 + 07 Jan 2005; Chris PeBenito <pebenito@g.o> libselinux-1.18.ebuild,
316 + +libselinux-1.20.ebuild:
317 + New upstream release. Mark 1.18 stable.
318 +
319 + 03 Jan 2005; Chris PeBenito <pebenito@g.o> libselinux-1.16.ebuild,
320 + libselinux-1.18.ebuild:
321 + Switch to libc virtual for DEP since uclibc now has xattr support.
322 +
323 +*libselinux-1.18 (14 Nov 2004)
324 +
325 + 14 Nov 2004; Chris PeBenito <pebenito@g.o>
326 + +files/selinuxconfig.c.diff, +libselinux-1.18.ebuild:
327 + New upstream release.
328 +
329 +*libselinux-1.16 (07 Sep 2004)
330 +
331 + 07 Sep 2004; Chris PeBenito <pebenito@g.o> +libselinux-1.16.ebuild:
332 + New upstream release.
333 +
334 +*libselinux-1.14 (02 Jul 2004)
335 +
336 + 02 Jul 2004; Chris PeBenito <pebenito@g.o> +libselinux-1.14.ebuild:
337 + New upstream version.
338 +
339 + 11 Jun 2004; Chris PeBenito <pebenito@g.o> -libselinux-1.10.ebuild,
340 + libselinux-1.12.ebuild:
341 + Mark stable
342 +
343 +*libselinux-1.12 (14 May 2004)
344 +
345 + 14 May 2004; Chris PeBenito <pebenito@g.o> +libselinux-1.12.ebuild:
346 + New upstream release.
347 +
348 +*libselinux-1.10 (17 Apr 2004)
349 +
350 + 17 Apr 2004; Chris PeBenito <pebenito@g.o> +libselinux-1.10.ebuild:
351 + New upstream version.
352 +
353 + 08 Apr 2004; Chris PeBenito <pebenito@g.o> libselinux-1.8.ebuild:
354 + Mark stable for 2004.1
355 +
356 +*libselinux-1.8 (12 Mar 2004)
357 +
358 + 12 Mar 2004; Chris PeBenito <pebenito@g.o> libselinux-1.8.ebuild:
359 + New upstream release.
360 +
361 +*libselinux-1.6 (24 Feb 2004)
362 +
363 + 24 Feb 2004; Chris PeBenito <pebenito@g.o> libselinux-1.6.ebuild:
364 + New upstream release.
365 +
366 + 16 Dec 2003; Chris PeBenito <pebenito@g.o> libselinux-1.4.ebuild:
367 + Mark stable.
368 +
369 +*libselinux-1.4 (06 Dec 2003)
370 +
371 + 06 Dec 2003; Chris PeBenito <pebenito@g.o> libselinux-1.4.ebuild:
372 + New upstream version.
373 +
374 + 29 Oct 2003; Joshua Brindle <method@g.o> libselinux-1.2-r2.ebuild:
375 + added sparc
376 +
377 +*libselinux-1.2-r2 (20 Oct 2003)
378 +
379 + 20 Oct 2003; Chris PeBenito <pebenito@g.o> libselinux-1.2-r2.ebuild,
380 + files/libselinux-1.2-attr.diff:
381 + Compile against sys-apps/attr only if linux-headers are older than 2.4.20.
382 +
383 +*libselinux-1.2-r1 (07 Oct 2003)
384 +
385 + 07 Oct 2003; Chris PeBenito <pebenito@g.o> libselinux-1.2-r1.ebuild,
386 + files/libselinux-1.2-gentoo.diff:
387 + Move libraries to /lib, to fix problems with having a separate /usr during
388 + booting.
389 +
390 +*libselinux-1.2 (03 Oct 2003)
391 +
392 + 03 Oct 2003; Chris PeBenito <pebenito@g.o> libselinux-1.2.ebuild,
393 + files/libselinux-1.2-const.diff:
394 + New upstream version.
395 +
396 + 22 Sep 2003; <paul@g.o> metadata.xml:
397 + Fix metadata.xml
398 +
399 + 21 Aug 2003; Chris PeBenito <pebenito@g.o> libselinux-1.1-r1.ebuild:
400 + Add a dep for portage. The newer versions have labelling support for the old
401 + API.
402 +
403 + 18 Aug 2003; Chris PeBenito <pebenito@g.o> libselinux-1.1-r1.ebuild,
404 + metadata.xml:
405 + Fix license, this is public-domain, not GPL-2. Use package description in RPM
406 + spec file as metadata.xml long description.
407 +
408 + 15 Aug 2003; Chris PeBenito <pebenito@g.o> libselinux-1.0.ebuild,
409 + libselinux-1.1-r1.ebuild, files/libselinux-1.0-gentoo.diff:
410 + Mark stable
411 +
412 +*libselinux-1.1-r1 (14 Aug 2003)
413 +
414 + 14 Aug 2003; Chris PeBenito <pebenito@g.o> libselinux-1.1-r1.ebuild,
415 + libselinux-1.1.ebuild, files/libselinux-1.1-linkfix.diff:
416 + Add fix for a random linking problem that causes libselinux to work
417 + incorrectly.
418 +
419 +*libselinux-1.1 (14 Aug 2003)
420 +
421 + 14 Aug 2003; Chris PeBenito <pebenito@g.o> libselinux-1.1.ebuild,
422 + files/libselinux-1.1-gentoo.diff:
423 + New upstream version
424 +
425 + 04 Aug 2003; Chris PeBenito <pebenito@g.o>
426 + files/libselinux-1.0-gentoo.diff:
427 + Add on a NSA nullbyte patch to the gentoo patch
428 +
429 +*libselinux-1.0 (03 Aug 2003)
430 +
431 + 03 Aug 2003; Chris PeBenito <pebenito@g.o> libselinux-1.0.ebuild,
432 + metadata.xml, files/libselinux-1.0-gentoo.diff:
433 + Initial commit
434
435 diff --git a/sys-libs/libselinux/libselinux-2.1.12-r3.ebuild b/sys-libs/libselinux/libselinux-2.1.12-r3.ebuild
436 new file mode 100644
437 index 0000000..cea0487
438 --- /dev/null
439 +++ b/sys-libs/libselinux/libselinux-2.1.12-r3.ebuild
440 @@ -0,0 +1,129 @@
441 +# Copyright 1999-2013 Gentoo Foundation
442 +# Distributed under the terms of the GNU General Public License v2
443 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/libselinux-2.1.12-r2.ebuild,v 1.2 2012/12/30 15:17:46 swift Exp $
444 +
445 +EAPI="4"
446 +PYTHON_DEPEND="python? *"
447 +SUPPORT_PYTHON_ABIS="1"
448 +RESTRICT_PYTHON_ABIS="2.5 *-jython *-pypy-*"
449 +USE_RUBY="ruby18 ruby19"
450 +RUBY_OPTIONAL="yes"
451 +
452 +inherit multilib python toolchain-funcs eutils ruby-ng
453 +
454 +SEPOL_VER="2.1.8"
455 +
456 +DESCRIPTION="SELinux userland library"
457 +HOMEPAGE="http://userspace.selinuxproject.org"
458 +SRC_URI="http://userspace.selinuxproject.org/releases/20120924/${P}.tar.gz
459 + http://dev.gentoo.org/~swift/patches/${PN}/patchbundle-${P}-r3.tar.gz"
460 +
461 +LICENSE="public-domain"
462 +SLOT="0"
463 +KEYWORDS="~amd64 ~x86"
464 +IUSE="python ruby static-libs"
465 +
466 +RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}
467 + >=dev-libs/libpcre-8.30-r2[static-libs?]
468 + ruby? ( $(ruby_implementations_depend) )"
469 +DEPEND="${RDEPEND}
470 + virtual/pkgconfig
471 + ruby? ( dev-lang/swig )
472 + python? ( dev-lang/swig )"
473 +
474 +S="${WORKDIR}/${P}"
475 +
476 +pkg_setup() {
477 + if use python; then
478 + python_pkg_setup
479 + fi
480 +}
481 +
482 +src_unpack() {
483 + default
484 +}
485 +
486 +src_prepare() {
487 + # fix up paths for multilib
488 + sed -i \
489 + -e "/^LIBDIR/s/lib/$(get_libdir)/" \
490 + -e "/^SHLIBDIR/s/lib/$(get_libdir)/" \
491 + src/Makefile utils/Makefile || die
492 +
493 + EPATCH_MULTI_MSG="Applying libselinux patches ... " \
494 + EPATCH_SUFFIX="patch" \
495 + EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
496 + EPATCH_FORCE="yes" \
497 + epatch
498 +
499 + epatch_user
500 +}
501 +
502 +each_ruby_compile() {
503 + local RUBYLIBVER=$(${RUBY} -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
504 + cd "${WORKDIR}/${P}"
505 + cp -r src src-ruby-${RUBYLIBVER}
506 + cd src-ruby-${RUBYLIBVER}
507 +
508 + if [[ "${RUBYLIBVER}" == "1.8" ]]; then
509 + emake CC="$(tc-getCC)" RUBY="${RUBY}" RUBYINC="-I$(ruby_get_hdrdir)" LDFLAGS="-fPIC $($(tc-getPKG_CONFIG) libpcre --libs) ${LDFLAGS}" rubywrap || die
510 + else
511 + emake CC="$(tc-getCC)" RUBY="${RUBY}" LDFLAGS="-fPIC $($(tc-getPKG_CONFIG) libpcre --libs) ${LDFLAGS}" rubywrap || die
512 + fi
513 +}
514 +
515 +src_compile() {
516 + tc-export RANLIB
517 + emake \
518 + AR="$(tc-getAR)" \
519 + CC="$(tc-getCC)" \
520 + LDFLAGS="-fPIC $($(tc-getPKG_CONFIG) libpcre --libs) ${LDFLAGS}" all || die
521 +
522 + if use python; then
523 + python_copy_sources src
524 + building() {
525 + 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
526 + }
527 + python_execute_function -s --source-dir src building
528 + fi
529 +
530 + if use ruby; then
531 + ruby-ng_src_compile
532 + fi
533 +}
534 +
535 +each_ruby_install() {
536 + local RUBYLIBVER=$(${RUBY} -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
537 +
538 + cd "${WORKDIR}/${P}/src-ruby-${RUBYLIBVER}"
539 + emake RUBY="${RUBY}" DESTDIR="${D}" install-rubywrap || die
540 +}
541 +
542 +src_install() {
543 + emake DESTDIR="${D}" install || die
544 +
545 + if use python; then
546 + installation() {
547 + emake DESTDIR="${D}" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" install-pywrap
548 + }
549 + python_execute_function -s --source-dir src installation
550 + fi
551 +
552 + if use ruby; then
553 + ruby-ng_src_install
554 + fi
555 +
556 + use static-libs || rm "${D}"/usr/lib*/*.a
557 +}
558 +
559 +pkg_postinst() {
560 + if use python; then
561 + python_mod_optimize selinux
562 + fi
563 +}
564 +
565 +pkg_postrm() {
566 + if use python; then
567 + python_mod_cleanup selinux
568 + fi
569 +}
570
571 diff --git a/sys-libs/libselinux/metadata.xml b/sys-libs/libselinux/metadata.xml
572 new file mode 100644
573 index 0000000..0c7f186
574 --- /dev/null
575 +++ b/sys-libs/libselinux/metadata.xml
576 @@ -0,0 +1,10 @@
577 +<?xml version="1.0" encoding="UTF-8"?>
578 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
579 +<pkgmetadata>
580 + <herd>selinux</herd>
581 + <longdescription>
582 + Libselinux provides an API for SELinux applications to get and set
583 + process and file security contexts and to obtain security policy
584 + decisions. Required for any applications that use the SELinux API.
585 + </longdescription>
586 +</pkgmetadata>