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: app-admin/setools/
Date: Fri, 24 Aug 2012 17:06:27
Message-Id: 1345827926.e102534a3b1f0da1bcd458fb9673f54dfe4d17fb.SwifT@gentoo
1 commit: e102534a3b1f0da1bcd458fb9673f54dfe4d17fb
2 Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
3 AuthorDate: Fri Aug 24 17:05:26 2012 +0000
4 Commit: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
5 CommitDate: Fri Aug 24 17:05:26 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=e102534a
7
8 Fixing bugs #430262 and #424627
9
10 ---
11 app-admin/setools/ChangeLog | 339 +++++++++++++++++++++++++++++
12 app-admin/setools/metadata.xml | 6 +
13 app-admin/setools/setools-3.3.7-r5.ebuild | 173 +++++++++++++++
14 3 files changed, 518 insertions(+), 0 deletions(-)
15
16 diff --git a/app-admin/setools/ChangeLog b/app-admin/setools/ChangeLog
17 new file mode 100644
18 index 0000000..87aea46
19 --- /dev/null
20 +++ b/app-admin/setools/ChangeLog
21 @@ -0,0 +1,339 @@
22 +# ChangeLog for app-admin/setools
23 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
24 +# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/ChangeLog,v 1.78 2012/07/30 16:33:57 swift Exp $
25 +
26 +*setools-3.3.7-r5 (24 Aug 2012)
27 +
28 + 24 Aug 2012; <swift@g.o> +setools-3.3.7-r5.ebuild, +metadata.xml:
29 + Fixing bugs #430262 and #424627
30 +
31 + 30 Jul 2012; <swift@g.o> setools-3.3.7-r3.ebuild:
32 + Stabilization
33 +
34 + 09 Jul 2012; <swift@g.o> setools-3.3.7-r3.ebuild:
35 + Fixing bug #424581 - Work around mkdir_p changes in automake until 1.12 is
36 + default
37 +
38 + 26 Jun 2012; Mike Gilbert <floppym@g.o> setools-3.3.7-r1.ebuild,
39 + setools-3.3.7-r3.ebuild:
40 + Restict pypy per Arfrever.
41 +
42 +*setools-3.3.7-r3 (25 Jun 2012)
43 +
44 + 25 Jun 2012; <swift@g.o> +setools-3.3.7-r3.ebuild:
45 + Support Python3, fix audit2allow support, bug #415091 and bug #408179
46 +
47 + 21 May 2012; Mike Frysinger <vapier@g.o> setools-3.3.7-r1.ebuild:
48 + Inherit eutils for epatch.
49 +
50 + 03 May 2012; Jeff Horelick <jdhore@g.o> setools-3.3.7-r1.ebuild:
51 + dev-util/pkgconfig -> virtual/pkgconfig
52 +
53 + 12 Nov 2011; <swift@g.o> -setools-3.3.7.ebuild:
54 + Remove obsoleted ebuilds
55 +
56 + 23 Oct 2011; <swift@g.o> setools-3.3.7-r1.ebuild:
57 + Stabilization (tracker #384231)
58 +
59 + 19 Aug 2011; <swift@g.o> -setools-2.4.ebuild, -setools-3.3.4.ebuild,
60 + -setools-3.3.5.ebuild, -setools-3.3.6.ebuild,
61 + -files/setools-3.3.6-headers.diff, -files/apol_tcl_fc.c.diff:
62 + Remove obsoleted versions of setools
63 +
64 +*setools-3.3.7-r1 (19 Aug 2011)
65 +
66 + 19 Aug 2011; <swift@g.o>
67 + +files/fix-check-role_set_expand-libsepol-2.1.0.patch,
68 + +setools-3.3.7-r1.ebuild, +files/fix-implicit-def-fstat.patch:
69 + Fix #378943 where setools fails to build with new selinux userspace
70 +
71 + 08 Jul 2011; Samuli Suominen <ssuominen@g.o> setools-2.4.ebuild:
72 + Convert from "useq" to "use".
73 +
74 + 28 May 2011; Anthony G. Basile <blueness@g.o> setools-3.3.7.ebuild:
75 + Stable amd64 x86
76 +
77 + 04 Apr 2011; Anthony G. Basile <blueness@g.o> setools-2.4.ebuild:
78 + Updated SRC_URI, bug #341929
79 +
80 + 29 Mar 2011; Christoph Mende <angelos@g.o> setools-3.3.4.ebuild,
81 + setools-3.3.5.ebuild, setools-3.3.6.ebuild, setools-3.3.7.ebuild:
82 + Fixed slot deps
83 +
84 + 13 Feb 2011; Anthony G. Basile <blueness@g.o> metadata.xml:
85 + Updated metadata.xml to reflect new selinux herd.
86 +
87 + 06 Feb 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
88 + setools-3.3.7.ebuild:
89 + Set SUPPORT_PYTHON_ABIS (bug #308279). Fix building with SWIG 2.
90 +
91 +*setools-3.3.7 (12 May 2010)
92 +
93 + 12 May 2010; Chris PeBenito <pebenito@g.o> +setools-3.3.7.ebuild:
94 + New upstream release.
95 +
96 + 20 Sep 2009; Chris PeBenito <pebenito@g.o> setools-3.3.6.ebuild,
97 + +files/setools-3.3.6-headers.diff:
98 + Fix QA issues.
99 +
100 +*setools-3.3.6 (08 Aug 2009)
101 +
102 + 08 Aug 2009; Chris PeBenito <pebenito@g.o> +setools-3.3.6.ebuild:
103 + New upstream release.
104 +
105 + 22 Jul 2009; Chris PeBenito <pebenito@g.o> setools-3.3.4.ebuild,
106 + setools-3.3.5.ebuild:
107 + Drop alpha, mips, ppc, sparc selinux support.
108 +
109 + 13 Jul 2009; Diego E. Pettenò <flameeyes@g.o>
110 + setools-3.3.5.ebuild:
111 + Use emake rather than make.
112 +
113 +*setools-3.3.5 (02 Dec 2008)
114 +
115 + 02 Dec 2008; Chris PeBenito <pebenito@g.o> setools-2.4.ebuild,
116 + -setools-3.3.1.ebuild, -setools-3.3.3.ebuild, +setools-3.3.5.ebuild:
117 + New upstream bugfix release for libsepol 2.x additional features.
118 + Cleanup old ebuilds.
119 +
120 +*setools-3.3.4 (31 Mar 2008)
121 +
122 + 31 Mar 2008; Chris PeBenito <pebenito@g.o> +setools-3.3.4.ebuild:
123 + Update with fixes for glibc 2.7, gcc 3.4, and tcl/tk 8.5.
124 +
125 +*setools-3.3.3 (26 Feb 2008)
126 +
127 + 26 Feb 2008; Chris PeBenito <pebenito@g.o> +setools-3.3.3.ebuild:
128 + New upstream bugfix release.
129 +
130 +*setools-3.3.1 (27 Aug 2007)
131 +
132 + 27 Aug 2007; Chris PeBenito <pebenito@g.o> -setools-3.0.ebuild,
133 + -setools-3.1.ebuild, -setools-3.2.ebuild, -setools-3.3.ebuild,
134 + +setools-3.3.1.ebuild:
135 + New upstream bugfix release. Clear out old unstable ebuilds.
136 +
137 + 20 Aug 2007; Chris PeBenito <pebenito@g.o> setools-3.1.ebuild,
138 + setools-3.2.ebuild:
139 + Set bwidget dep to 1.8 to fix #175415.
140 +
141 +*setools-3.3 (04 Aug 2007)
142 +
143 + 04 Aug 2007; Chris PeBenito <pebenito@g.o> +setools-3.3.ebuild:
144 + New upstream release.
145 +
146 +*setools-3.2 (09 May 2007)
147 +
148 + 09 May 2007; Chris PeBenito <pebenito@g.o> +setools-3.2.ebuild:
149 + New upstream release.
150 +
151 +*setools-3.1 (16 Feb 2007)
152 +
153 + 16 Feb 2007; Chris PeBenito <pebenito@g.o> +setools-3.1.ebuild:
154 + New upstream release.
155 +
156 + 02 Feb 2007; Chris PeBenito <pebenito@g.o> setools-3.0.ebuild:
157 + Fix bug #156752.
158 +
159 +*setools-3.0 (18 Oct 2006)
160 +
161 + 18 Oct 2006; Chris PeBenito <pebenito@g.o>
162 + -files/setools-2.2-nogui.diff, -setools-2.2.ebuild, -setools-2.3.ebuild,
163 + +setools-3.0.ebuild:
164 + New upstream release.
165 +
166 + 12 Sep 2006; Chris PeBenito <pebenito@g.o> setools-2.4.ebuild:
167 + Mark stable.
168 +
169 + 11 Sep 2006; Chris PeBenito <pebenito@g.o>
170 + +files/apol_tcl_fc.c.diff, setools-2.4.ebuild:
171 + Fixes to hopefully take care of #133028
172 +
173 +*setools-2.4 (09 May 2006)
174 +
175 + 09 May 2006; Chris PeBenito <pebenito@g.o> +setools-2.4.ebuild:
176 + New upstream release.
177 +
178 +*setools-2.3 (03 Feb 2006)
179 +
180 + 03 Feb 2006; Chris PeBenito <pebenito@g.o> +setools-2.3.ebuild:
181 + New upstream release.
182 +
183 + 02 Jan 2006; Chris PeBenito <pebenito@g.o> -setools-2.1.2.ebuild,
184 + -setools-2.1.3.ebuild, setools-2.2.ebuild:
185 + Mark stable.
186 +
187 + 05 Dec 2005; Chris PeBenito <pebenito@g.o> metadata.xml,
188 + setools-2.1.2.ebuild, setools-2.1.3.ebuild, setools-2.2.ebuild:
189 + Update homepage and metadata.
190 +
191 + 12 Nov 2005; Chris PeBenito <pebenito@g.o>
192 + +files/setools-2.2-nogui.diff, setools-2.2.ebuild:
193 + Add patch to fix bug #112284.
194 +
195 +*setools-2.2 (08 Nov 2005)
196 +
197 + 08 Nov 2005; Chris PeBenito <pebenito@g.o> +setools-2.2.ebuild:
198 + New upstream release.
199 +
200 +*setools-2.1.3 (12 Oct 2005)
201 +
202 + 12 Oct 2005; Chris PeBenito <pebenito@g.o> -setools-2.1.0.ebuild,
203 + -setools-2.1.1.ebuild, +setools-2.1.3.ebuild:
204 + New upstream release.
205 +
206 + 08 Oct 2005; Chris PeBenito <pebenito@g.o> setools-2.1.2.ebuild:
207 + Mark stable.
208 +
209 + 07 Sep 2005; Chris PeBenito <pebenito@g.o> setools-2.1.0.ebuild,
210 + setools-2.1.1.ebuild, setools-2.1.2.ebuild:
211 + Fix changed URIs.
212 +
213 +*setools-2.1.2 (07 Sep 2005)
214 +
215 + 07 Sep 2005; Chris PeBenito <pebenito@g.o> +setools-2.1.2.ebuild:
216 + New upstream release.
217 +
218 +*setools-2.1.1 (20 May 2005)
219 +
220 + 20 May 2005; Chris PeBenito <pebenito@g.o> setools-2.1.0.ebuild,
221 + +setools-2.1.1.ebuild:
222 + Mark 2.1.0 stable, plus new upstream release.
223 +
224 + 21 Apr 2005; Simon Stelling <blubb@g.o> setools-2.0-r1.ebuild:
225 + stable on amd64
226 +
227 +*setools-2.1.0 (19 Apr 2005)
228 +
229 + 19 Apr 2005; Chris PeBenito <pebenito@g.o> +setools-2.1.0.ebuild:
230 + New upstream release.
231 +
232 +*setools-2.0-r1 (09 Apr 2005)
233 +
234 + 09 Apr 2005; Chris PeBenito <pebenito@g.o> +setools-2.0-r1.ebuild:
235 + Fix for bug #88248.
236 +
237 + 29 Mar 2005; Chris PeBenito <pebenito@g.o> setools-2.0.ebuild:
238 + Mark stable.
239 +
240 + 06 Mar 2005; Chris PeBenito <pebenito@g.o> setools-2.0.ebuild:
241 + Went overboard on CFLAGS fixes, causing some compile failures on some machines.
242 +
243 + 04 Mar 2005; Chris PeBenito <pebenito@g.o> setools-2.0.ebuild:
244 + Fix DEPEND
245 +
246 +*setools-2.0 (04 Mar 2005)
247 +
248 + 04 Mar 2005; Chris PeBenito <pebenito@g.o> setools-1.5.1.ebuild,
249 + +setools-2.0.ebuild:
250 + New upstream major release. Mark 1.5.1 stable for x86 and ppc.
251 +
252 +*setools-1.5.1 (06 Nov 2004)
253 +
254 + 06 Nov 2004; Chris PeBenito <pebenito@g.o> +setools-1.5.1.ebuild:
255 + New upstream release
256 +
257 +*setools-1.4.1-r1 (15 Sep 2004)
258 +
259 + 15 Sep 2004; Chris PeBenito <pebenito@g.o> -setools-1.3.1.ebuild,
260 + +setools-1.4.1-r1.ebuild, -setools-1.4.1.ebuild:
261 + Fix seuser.fc install.
262 +
263 +*setools-1.4.1 (22 Aug 2004)
264 +
265 + 22 Aug 2004; Chris PeBenito <pebenito@g.o> +setools-1.4.1.ebuild,
266 + -setools-1.4.ebuild:
267 + Bugfix release.
268 +
269 + 24 Jul 2004; Joshua Brindle <method@g.o> setools-1.4.ebuild:
270 + add libselinux dependancy
271 +
272 +*setools-1.4 (21 Jun 2004)
273 +
274 + 21 Jun 2004; Chris PeBenito <pebenito@g.o> +setools-1.4.ebuild:
275 + New upstream version.
276 +
277 + 21 Jun 2004; Chris PeBenito <pebenito@g.o> setools-1.3.1.ebuild:
278 + Fix for compiles that are USE="-selinux".
279 +
280 + 24 May 2004; Chris PeBenito <pebenito@g.o> setools-1.3.1.ebuild:
281 + Fix sandbox violations.
282 +
283 +*setools-1.3.1 (05 May 2004)
284 +
285 + 05 May 2004; Chris PeBenito <pebenito@g.o> +setools-1.3.1.ebuild,
286 + -setools-1.3.ebuild:
287 + New upstream bugfix release.
288 +
289 + 04 May 2004; Chris PeBenito <pebenito@g.o> -setools-1.2.1.ebuild,
290 + setools-1.3.ebuild:
291 + Mark stable
292 +
293 + 29 Apr 2004; Chris PeBenito <pebenito@g.o> setools-1.2.1.ebuild,
294 + setools-1.3.ebuild:
295 + Add missing libxml2 dep.
296 +
297 +*setools-1.3 (15 Apr 2004)
298 +
299 + 15 Apr 2004; Chris PeBenito <pebenito@g.o> +setools-1.3.ebuild:
300 + New upstream version.
301 +
302 + 03 Mar 2004; Chris PeBenito <pebenito@g.o> setools-1.2.1.ebuild:
303 + Mark stable.
304 +
305 +*setools-1.2.1 (08 Feb 2004)
306 +
307 + 08 Feb 2004; Chris PeBenito <pebenito@g.o> setools-1.2.1.ebuild:
308 + New upstream bugfix release.
309 +
310 + 06 Feb 2004; Chris PeBenito <pebenito@g.o> setools-1.2.ebuild:
311 + Fix seuser file contexts and conf file.
312 +
313 +*setools-1.2 (05 Feb 2004)
314 +
315 + 05 Feb 2004; Chris PeBenito <pebenito@g.o> setools-1.2.ebuild:
316 + New upstream version.
317 +
318 + 31 Jan 2004; Chris PeBenito <pebenito@g.o> setools-1.1.1.ebuild:
319 + Mark stable.
320 +
321 +*setools-1.1.1 (06 Jan 2004)
322 +
323 + 06 Jan 2004; Chris PeBenito <pebenito@g.o> setools-1.1.1.ebuild:
324 + New upstream bugfix release.
325 +
326 + 28 Dec 2003; Chris PeBenito <pebenito@g.o> setools-1.1.ebuild:
327 + Eliminate install -Z. The context option is not needed, and causes sandbox
328 + violations.
329 +
330 + 22 Dec 2003; Chris PeBenito <pebenito@g.o> setools-1.1.ebuild,
331 + files/setools-1.1-fix_noX.diff:
332 + Treesys makefiles are broken. Add a hack to make it really work for non X
333 + systems.
334 +
335 +*setools-1.1 (22 Dec 2003)
336 +
337 + 22 Dec 2003; Chris PeBenito <pebenito@g.o> setools-1.1.ebuild:
338 + New upstream version. Now X is optional, as there are command line tools. Also
339 + has a new optional gtk log analyzer for audit messages.
340 +
341 + 20 Nov 2003; Chris PeBenito <pebenito@g.o> setools-1.0.1.ebuild:
342 + Mark stable
343 +
344 +*setools-1.0.1 (06 Nov 2003)
345 +
346 + 06 Nov 2003; Chris PeBenito <pebenito@g.o> setools-1.0.1.ebuild:
347 + New upstream minor version.
348 +
349 +*setools-1.0 (23 Oct 2003)
350 +
351 + 23 Oct 2003; Chris PeBenito <pebenito@g.o> setools-1.0.ebuild:
352 + Setools for the new SELinux API.
353 +
354 + 22 Sep 2003; Chris PeBenito <pebenito@g.o> setools-20030609.ebuild:
355 + Overdue, mark stable.
356 +
357 +*setools-20030609 (02 Jul 2003)
358 +
359 + 02 Jul 2003; Chris PeBenito <pebenito@g.o> setools-20030609.ebuild:
360 + Initial commit
361
362 diff --git a/app-admin/setools/metadata.xml b/app-admin/setools/metadata.xml
363 new file mode 100644
364 index 0000000..3c35d57
365 --- /dev/null
366 +++ b/app-admin/setools/metadata.xml
367 @@ -0,0 +1,6 @@
368 +<?xml version="1.0" encoding="UTF-8"?>
369 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
370 +<pkgmetadata>
371 + <herd>selinux</herd>
372 + <longdescription>SELinux policy analysis tools.</longdescription>
373 +</pkgmetadata>
374
375 diff --git a/app-admin/setools/setools-3.3.7-r5.ebuild b/app-admin/setools/setools-3.3.7-r5.ebuild
376 new file mode 100644
377 index 0000000..69db1fe
378 --- /dev/null
379 +++ b/app-admin/setools/setools-3.3.7-r5.ebuild
380 @@ -0,0 +1,173 @@
381 +# Copyright 1999-2012 Gentoo Foundation
382 +# Distributed under the terms of the GNU General Public License v2
383 +# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/setools-3.3.7-r3.ebuild,v 1.4 2012/07/30 16:33:57 swift Exp $
384 +
385 +EAPI="2"
386 +PYTHON_DEPEND="python? *"
387 +SUPPORT_PYTHON_ABIS="1"
388 +RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
389 +
390 +inherit autotools java-pkg-opt-2 python eutils
391 +
392 +DESCRIPTION="SELinux policy tools"
393 +HOMEPAGE="http://www.tresys.com/selinux/selinux_policy_tools.shtml"
394 +SRC_URI="http://oss.tresys.com/projects/setools/chrome/site/dists/${P}/${P}.tar.bz2
395 + http://dev.gentoo.org/~swift/patches/setools/${P}-01-fedora-patches.tar.gz
396 + http://dev.gentoo.org/~swift/patches/setools/${P}-05-gentoo-patches.tar.gz"
397 +
398 +LICENSE="GPL-2"
399 +SLOT="0"
400 +KEYWORDS="~amd64 ~x86"
401 +IUSE="X debug java python"
402 +
403 +DEPEND=">=sys-libs/libsepol-2.1.4
404 + sys-libs/libselinux
405 + sys-devel/bison
406 + sys-devel/flex
407 + >=dev-db/sqlite-3.2:3
408 + dev-libs/libxml2:2
409 + virtual/pkgconfig
410 + java? (
411 + >=dev-lang/swig-2.0.4
412 + >=virtual/jdk-1.4
413 + )
414 + python? ( >=dev-lang/swig-2.0.4 )
415 + X? (
416 + >=dev-lang/tk-8.4.9
417 + >=gnome-base/libglade-2.0
418 + >=x11-libs/gtk+-2.8:2
419 + )"
420 +
421 +RDEPEND=">=sys-libs/libsepol-2.1.4
422 + sys-libs/libselinux
423 + >=dev-db/sqlite-3.2:3
424 + dev-libs/libxml2:2
425 + java? ( >=virtual/jre-1.4 )
426 + X? (
427 + >=dev-lang/tk-8.4.9
428 + >=dev-tcltk/bwidget-1.8
429 + >=gnome-base/libglade-2.0
430 + >=x11-libs/gtk+-2.8:2
431 + )"
432 +
433 +RESTRICT="test"
434 +
435 +pkg_setup() {
436 + if use java; then
437 + java-pkg-opt-2_pkg_setup
438 + fi
439 +
440 + if use python; then
441 + python_pkg_setup
442 + PYTHON_DIRS="libapol/swig/python libpoldiff/swig/python libqpol/swig/python libseaudit/swig/python libsefs/swig/python python"
443 + fi
444 +}
445 +
446 +src_prepare() {
447 + EPATCH_MULTI_MSG="Applying various (Fedora-provided) setools fixes... " \
448 + EPATCH_SUFFIX="patch" \
449 + EPATCH_SOURCE="${WORKDIR}" \
450 + EPATCH_FORCE="yes" \
451 + epatch
452 +
453 + EPATCH_MULTI_MSG="Applying various (Gentoo) setool fixes... " \
454 + EPATCH_SUFFIX="patch" \
455 + EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
456 + EPATCH_FORCE="yes" \
457 + epatch
458 +
459 + # Disable broken check for SWIG version.
460 + sed -e "s/AC_PROG_SWIG(2.0.0)/AC_PROG_SWIG/" -i configure.ac || die "sed failed"
461 + # Fix build failure due to double __init__.py installation
462 + sed -e "s/^wrappedpy_DATA = qpol.py \$(pkgpython_PYTHON)/wrappedpy_DATA = qpol.py/" -i libqpol/swig/python/Makefile.am || die
463 +
464 + local dir
465 + for dir in ${PYTHON_DIRS}; do
466 + # Python bindings are built/installed manually.
467 + sed -e "s/MAYBE_PYSWIG = python/MAYBE_PYSWIG =/" -i ${dir%python}Makefile.am || die "sed failed"
468 + # Make PYTHON_LDFLAGS replaceable during running `make`.
469 + sed -e "/^AM_LDFLAGS =/s/@PYTHON_LDFLAGS@/\$(PYTHON_LDFLAGS)/" -i ${dir}/Makefile.am || die "sed failed"
470 + done
471 +
472 + # temporary work around bug #424581 until automake-1.12 is stable (then
473 + # depend on it). Need to use MKDIR_P in the mean time for 1.12+.
474 + has_version ">=sys-devel/automake-1.12.1" && { find . -name 'Makefile.*' -exec sed -i -e 's:mkdir_p:MKDIR_P:g' {} + || die; }
475 +
476 + eautoreconf
477 +
478 + # Disable byte-compilation of Python modules.
479 + echo '#!/bin/sh' > py-compile
480 +}
481 +
482 +src_configure() {
483 + econf \
484 + --with-java-prefix=${JAVA_HOME} \
485 + --disable-selinux-check \
486 + --disable-bwidget-check \
487 + $(use_enable python swig-python) \
488 + $(use_enable java swig-java) \
489 + $(use_enable X swig-tcl) \
490 + $(use_enable X gui) \
491 + $(use_enable debug)
492 +
493 + # work around swig c99 issues. it does not require
494 + # c99 anyway.
495 + sed -i -e 's/-std=gnu99//' "${S}/libseaudit/swig/python/Makefile"
496 +}
497 +
498 +src_compile() {
499 + default
500 +
501 + if use python; then
502 + local dir
503 + for dir in ${PYTHON_DIRS}; do
504 + python_copy_sources ${dir}
505 + building() {
506 + emake \
507 + SWIG_PYTHON_CPPFLAGS="-I$(python_get_includedir)" \
508 + PYTHON_LDFLAGS="$(python_get_library -l)" \
509 + pyexecdir="$(python_get_sitedir)" \
510 + pythondir="$(python_get_sitedir)"
511 + }
512 + python_execute_function \
513 + --action-message "Building of Python bindings from ${dir} directory with \$(python_get_implementation) \$(python_get_version)" \
514 + --failure-message "Building of Python bindings from ${dir} directory with \$(python_get_implementation) \$(python_get_version) failed" \
515 + -s --source-dir ${dir} \
516 + building
517 + done
518 + fi
519 +}
520 +
521 +src_install() {
522 + emake DESTDIR="${D}" install || die "emake install failed"
523 +
524 + if use python; then
525 + local dir
526 + for dir in ${PYTHON_DIRS}; do
527 + installation() {
528 + emake \
529 + DESTDIR="${D}" \
530 + pyexecdir="$(python_get_sitedir)" \
531 + pythondir="$(python_get_sitedir)" \
532 + install
533 + }
534 + python_execute_function \
535 + --action-message "Installation of Python bindings from ${dir} directory with \$(python_get_implementation) \$(python_get_version)" \
536 + --failure-message "Installation of Python bindings from ${dir} directory with \$(python_get_implementation) \$(python_get_version) failed" \
537 + -s --source-dir ${dir} \
538 + installation
539 + done
540 + fi
541 +}
542 +
543 +pkg_postinst() {
544 + if use python; then
545 + python_mod_optimize setools
546 + fi
547 +}
548 +
549 +pkg_postrm() {
550 + if use python; then
551 + python_mod_cleanup setools
552 + fi
553 +}