1 |
swift 14/02/04 21:51:12 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: setools-3.3.8-r4.ebuild |
5 |
Log: |
6 |
Switch python eclass, use EAPI=5, explicitly use bfd linker (bug 467136) |
7 |
|
8 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x2EDD52403B68AF47) |
9 |
|
10 |
Revision Changes Path |
11 |
1.88 app-admin/setools/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/setools/ChangeLog?rev=1.88&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/setools/ChangeLog?rev=1.88&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/setools/ChangeLog?r1=1.87&r2=1.88 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/app-admin/setools/ChangeLog,v |
20 |
retrieving revision 1.87 |
21 |
retrieving revision 1.88 |
22 |
diff -u -r1.87 -r1.88 |
23 |
--- ChangeLog 19 Jan 2014 20:36:55 -0000 1.87 |
24 |
+++ ChangeLog 4 Feb 2014 21:51:12 -0000 1.88 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for app-admin/setools |
27 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/ChangeLog,v 1.87 2014/01/19 20:36:55 swift Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/ChangeLog,v 1.88 2014/02/04 21:51:12 swift Exp $ |
30 |
+ |
31 |
+*setools-3.3.8-r4 (04 Feb 2014) |
32 |
+ |
33 |
+ 04 Feb 2014; Sven Vermeulen <swift@g.o> +setools-3.3.8-r4.ebuild: |
34 |
+ Switch to python-r1, use EAPI=5, explicitly use bfd linker (bug 467136) |
35 |
|
36 |
*setools-3.3.8-r3 (19 Jan 2014) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 app-admin/setools/setools-3.3.8-r4.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/setools/setools-3.3.8-r4.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/setools/setools-3.3.8-r4.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: setools-3.3.8-r4.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2014 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/setools-3.3.8-r4.ebuild,v 1.1 2014/02/04 21:51:12 swift Exp $ |
51 |
|
52 |
EAPI="5" |
53 |
PYTHON_COMPAT=( python2_7 ) |
54 |
|
55 |
inherit autotools java-pkg-opt-2 python-r1 eutils |
56 |
|
57 |
DESCRIPTION="SELinux policy tools" |
58 |
HOMEPAGE="http://www.tresys.com/selinux/selinux_policy_tools.shtml" |
59 |
SRC_URI="http://oss.tresys.com/projects/setools/chrome/site/dists/${P}/${P}.tar.bz2 |
60 |
http://dev.gentoo.org/~swift/patches/setools/${P}-01-fedora-patches.tar.gz |
61 |
http://dev.gentoo.org/~swift/patches/setools/${P}-02-gentoo-patches.tar.gz" |
62 |
|
63 |
LICENSE="GPL-2" |
64 |
SLOT="0" |
65 |
KEYWORDS="~amd64 ~x86" |
66 |
IUSE="X debug java python" |
67 |
|
68 |
DEPEND=">=sys-libs/libsepol-2.1.4 |
69 |
sys-libs/libselinux |
70 |
sys-devel/bison |
71 |
sys-devel/flex |
72 |
>=dev-db/sqlite-3.2:3 |
73 |
dev-libs/libxml2:2 |
74 |
virtual/pkgconfig |
75 |
java? ( |
76 |
dev-lang/swig:1 |
77 |
>=virtual/jdk-1.4 |
78 |
) |
79 |
python? ( |
80 |
${PYTHON_DEPS} |
81 |
dev-lang/swig:1 |
82 |
) |
83 |
X? ( |
84 |
>=dev-lang/tk-8.4.9 |
85 |
>=gnome-base/libglade-2.0 |
86 |
>=x11-libs/gtk+-2.8:2 |
87 |
)" |
88 |
|
89 |
RDEPEND=">=sys-libs/libsepol-2.1.4 |
90 |
sys-libs/libselinux |
91 |
>=dev-db/sqlite-3.2:3 |
92 |
dev-libs/libxml2:2 |
93 |
java? ( >=virtual/jre-1.4 ) |
94 |
X? ( |
95 |
>=dev-lang/tk-8.4.9 |
96 |
>=dev-tcltk/bwidget-1.8 |
97 |
>=gnome-base/libglade-2.0 |
98 |
>=x11-libs/gtk+-2.8:2 |
99 |
)" |
100 |
|
101 |
RESTRICT="test" |
102 |
# setools dirs that contain python code to build |
103 |
PYTHON_DIRS="libapol/swig/python libpoldiff/swig/python libqpol/swig/python libseaudit/swig/python libsefs/swig/python python" |
104 |
|
105 |
pkg_setup() { |
106 |
local myld=$(tc-getLD) |
107 |
|
108 |
if use java; then |
109 |
java-pkg-opt-2_pkg_setup |
110 |
fi |
111 |
|
112 |
${myld} -v | grep -q "GNU gold" && \ |
113 |
ewarn "Bug #467136 shows us that the gold linker doesn't work with setools for now." |
114 |
} |
115 |
|
116 |
src_prepare() { |
117 |
EPATCH_MULTI_MSG="Applying various (Fedora-provided) setools fixes... " \ |
118 |
EPATCH_SUFFIX="patch" \ |
119 |
EPATCH_SOURCE="${WORKDIR}" \ |
120 |
EPATCH_FORCE="yes" \ |
121 |
epatch |
122 |
|
123 |
EPATCH_MULTI_MSG="Applying various (Gentoo) setool fixes... " \ |
124 |
EPATCH_SUFFIX="patch" \ |
125 |
EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \ |
126 |
EPATCH_FORCE="yes" \ |
127 |
epatch |
128 |
|
129 |
# Disable broken check for SWIG version. |
130 |
sed -e "s/AC_PROG_SWIG(2.0.0)/AC_PROG_SWIG/" -i configure.ac || die "sed failed" |
131 |
# Use swig1.3 |
132 |
sed -e 's/AC_PATH_PROG(\[SWIG\],\[swig\])/AC_PATH_PROG([SWIG],[swig1.3])/' -i m4/ac_pkg_swig.m4 || die "failed to set swig1.3" |
133 |
# Fix build failure due to double __init__.py installation |
134 |
sed -e "s/^wrappedpy_DATA = qpol.py \$(pkgpython_PYTHON)/wrappedpy_DATA = qpol.py/" -i libqpol/swig/python/Makefile.am || die |
135 |
|
136 |
local dir |
137 |
for dir in ${PYTHON_DIRS}; do |
138 |
# Python bindings are built/installed manually. |
139 |
sed -e "s/MAYBE_PYSWIG = python/MAYBE_PYSWIG =/" -i ${dir%python}Makefile.am || die "sed failed" |
140 |
# Make PYTHON_LDFLAGS replaceable during running `make`. |
141 |
sed -e "/^AM_LDFLAGS =/s/@PYTHON_LDFLAGS@/\$(PYTHON_LDFLAGS)/" -i ${dir}/Makefile.am || die "sed failed" |
142 |
done |
143 |
|
144 |
# temporary work around bug #424581 until automake-1.12 is stable (then |
145 |
# depend on it). Need to use MKDIR_P in the mean time for 1.12+. |
146 |
has_version ">=sys-devel/automake-1.12.1" && { find . -name 'Makefile.*' -exec sed -i -e 's:mkdir_p:MKDIR_P:g' {} + || die; } |
147 |
|
148 |
eautoreconf |
149 |
|
150 |
# Disable byte-compilation of Python modules. |
151 |
echo '#!/bin/sh' > py-compile |
152 |
|
153 |
epatch_user |
154 |
} |
155 |
|
156 |
src_configure() { |
157 |
econf \ |
158 |
--with-java-prefix=${JAVA_HOME} \ |
159 |
--disable-selinux-check \ |
160 |
--disable-bwidget-check \ |
161 |
$(use_enable python swig-python) \ |
162 |
$(use_enable java swig-java) \ |
163 |
$(use_enable X swig-tcl) \ |
164 |
$(use_enable X gui) \ |
165 |
$(use_enable debug) |
166 |
|
167 |
# work around swig c99 issues. it does not require |
168 |
# c99 anyway. |
169 |
sed -i -e 's/-std=gnu99//' "${S}/libseaudit/swig/python/Makefile" |
170 |
} |
171 |
|
172 |
src_compile() { |
173 |
emake LD="$(tc-getLD).bfd" || die "Failed to build setools" |
174 |
|
175 |
if use python; then |
176 |
building() { |
177 |
python_export PYTHON_INCLUDEDIR |
178 |
python_export PYTHON_SITEDIR |
179 |
python_export PYTHON_LIBS |
180 |
emake LD="$(tc-getLD).bfd" \ |
181 |
SWIG_PYTHON_CPPFLAGS="-I${PYTHON_INCLUDEDIR}" \ |
182 |
PYTHON_LDFLAGS="${PYTHON_LIBS}" \ |
183 |
pyexecdir="${PYTHON_SITEDIR}" \ |
184 |
pythondir="${PYTHON_SITEDIR}" \ |
185 |
-C ${1}; |
186 |
} |
187 |
local dir |
188 |
for dir in ${PYTHON_DIRS}; do |
189 |
python_foreach_impl building ${dir}; |
190 |
done |
191 |
fi |
192 |
} |
193 |
|
194 |
src_install() { |
195 |
emake DESTDIR="${D}" install || die "emake install failed" |
196 |
|
197 |
if use python; then |
198 |
installation() { |
199 |
python_export PYTHON_SITEDIR |
200 |
emake DESTDIR="${D}" \ |
201 |
pyexecdir="${PYTHON_SITEDIR}" \ |
202 |
pythondir="${PYTHON_SITEDIR}" \ |
203 |
-C ${1} install |
204 |
} |
205 |
|
206 |
local dir |
207 |
for dir in ${PYTHON_DIRS}; do |
208 |
python_foreach_impl installation ${dir}; |
209 |
done |
210 |
fi |
211 |
} |