Gentoo Archives: gentoo-commits

From: Aric Belsito <lluixhi@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: sys-libs/libselinux/
Date: Mon, 13 Nov 2017 21:23:37
Message-Id: 1510608163.77b202ece0576c102d6bb361b5c5f08b5b0bed31.lluixhi@gentoo
1 commit: 77b202ece0576c102d6bb361b5c5f08b5b0bed31
2 Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
3 AuthorDate: Mon Nov 13 21:22:43 2017 +0000
4 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
5 CommitDate: Mon Nov 13 21:22:43 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=77b202ec
7
8 sys-libs/libselinux: cleanup release candidates
9
10 sync with tree
11
12 sys-libs/libselinux/Manifest | 3 -
13 sys-libs/libselinux/libselinux-2.6.ebuild | 2 +-
14 sys-libs/libselinux/libselinux-2.7.ebuild | 9 +-
15 sys-libs/libselinux/libselinux-2.7_rc1.ebuild | 159 --------------------------
16 sys-libs/libselinux/libselinux-2.7_rc4.ebuild | 159 --------------------------
17 sys-libs/libselinux/libselinux-2.7_rc5.ebuild | 159 --------------------------
18 6 files changed, 3 insertions(+), 488 deletions(-)
19
20 diff --git a/sys-libs/libselinux/Manifest b/sys-libs/libselinux/Manifest
21 index 41a7270..03d2c3b 100644
22 --- a/sys-libs/libselinux/Manifest
23 +++ b/sys-libs/libselinux/Manifest
24 @@ -1,5 +1,2 @@
25 DIST libselinux-2.6.tar.gz 203119 SHA256 4ea2dde50665c202253ba5caac7738370ea0337c47b251ba981c60d24e1a118a SHA512 906e1bf98c669862ab4f4e883d511db8d739a5763dc857c9405ad3cc6c70766a482853d07134698a1a98257a8632cc756d0549a7640c2915d051714f502ff14b WHIRLPOOL bf60ce907b7057ada5d19e3a0cd1f092a7dfc2de774e504762424c325c657a4f144fbe252e7d908f7c6d902d80388517e15134a289f4358e564c8720ea6534d9
26 -DIST libselinux-2.7-rc1.tar.gz 186897 SHA256 213e1ca473855a61e8147e027b6ee5edf4162c9fbfc00749643f0ecc0a08371c SHA512 fe7fe67f14e5483fbb237eeb33f6eca48f1d3f6a3ab7fa1cfa99e5143ce4d6a03c9033a03a82bb3954d07c4d1a2c211cf5dea80030c727f9adcb3cc6bd72e641 WHIRLPOOL dfee20eaf3ea9e3cb7caa21ac10e710799ed324eee833650fc0bdf17c3fbcd3426bea7d915f6d6b79ca4440b99c57805a018bbd6a6103d97cb590f52d58f0e40
27 -DIST libselinux-2.7-rc4.tar.gz 186904 SHA256 27c1780d6c623ab70ccf6923b8c8f386f8984ec99b7b4734f7b23d3d25809970 SHA512 788beb44ca2d2b6d84b57193538ed6f9c25f536c129903d58a852a64fc2c46a4e4249c4acd6234a6242a6ac0ea828a553f42a0e80fd9405ff5225c8a722c395f WHIRLPOOL 709ba4c3021d8b9e260ec8dbb0ff0ecd2a06a32cb44ce2c6fc486004e4c7f8cc28728150df40967472d00b97a26194dc36702dc990f5dd7055b2571714ccd37a
28 -DIST libselinux-2.7-rc5.tar.gz 186909 SHA256 b002ec2fc5ab74041a5138ebc680e5bc2045c7a5089699f39c494ac1f0b482b2 SHA512 01a600d03ff2a04f91efee8ab6ef9dccc3e39c64e2857be57b84ab0a38e01a55710d7c1b4e3d33b69f0ed0f04e1af14b9569d65ce419294d40177baff283a8b7 WHIRLPOOL 05fa39c10669eeaf7e91609ff77967c0b3187c27d9edeee0614110e9dbe54068df317df73ce421e9a0a5511705a374f02abcf8f5dc3f8006ef73d88cb597534a
29 DIST libselinux-2.7.tar.gz 187574 SHA256 d0fec0769b3ad60aa7baf9b9a4b7a056827769dc2dadda0dc0eb59b3d1c18c57 SHA512 415d10306692d4323455b61fb61d7e56e53b9144276ff206d72760e1df9b04ab07c62a4d6f04bf4e5fa708f9f14b21a9801069b16ece0a0aade886950941ab8d WHIRLPOOL dd9175c91fa8f6f87add7b0ad1b90706b1fb203ade866b42d886faeb3710e1138fc08a2d7d371fbc8c9480148f8fdec6f0a6dd3f7142f194da580365cd527351
30
31 diff --git a/sys-libs/libselinux/libselinux-2.6.ebuild b/sys-libs/libselinux/libselinux-2.6.ebuild
32 index f088985..16b3e82 100644
33 --- a/sys-libs/libselinux/libselinux-2.6.ebuild
34 +++ b/sys-libs/libselinux/libselinux-2.6.ebuild
35 @@ -27,7 +27,7 @@ fi
36
37 LICENSE="public-domain"
38 SLOT="0"
39 -IUSE="pcre2 python ruby static-libs ruby_targets_ruby22 ruby_targets_ruby23"
40 +IUSE="pcre2 python ruby static-libs ruby_targets_ruby21 ruby_targets_ruby22 ruby_targets_ruby23"
41 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
42
43 RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}:=[${MULTILIB_USEDEP}]
44
45 diff --git a/sys-libs/libselinux/libselinux-2.7.ebuild b/sys-libs/libselinux/libselinux-2.7.ebuild
46 index d53df5f..3c754d7 100644
47 --- a/sys-libs/libselinux/libselinux-2.7.ebuild
48 +++ b/sys-libs/libselinux/libselinux-2.7.ebuild
49 @@ -21,13 +21,13 @@ if [[ ${PV} == 9999 ]] ; then
50 S="${WORKDIR}/${MY_P}/${PN}"
51 else
52 SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
53 - KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
54 + KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
55 S="${WORKDIR}/${MY_P}"
56 fi
57
58 LICENSE="public-domain"
59 SLOT="0"
60 -IUSE="pcre2 python ruby static-libs ruby_targets_ruby22 ruby_targets_ruby23"
61 +IUSE="pcre2 python ruby static-libs ruby_targets_ruby21 ruby_targets_ruby22 ruby_targets_ruby23"
62 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
63
64 RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}:=[${MULTILIB_USEDEP}]
65 @@ -44,11 +44,6 @@ DEPEND="${RDEPEND}
66 python? ( >=dev-lang/swig-2.0.9 )"
67
68 src_prepare() {
69 - if [[ ${PV} != 9999 ]] ; then
70 - # If needed for live builds, place them in /etc/portage/patches
71 - eapply "${FILESDIR}/libselinux-2.7-fts_ldlibs.patch"
72 - fi
73 -
74 eapply_user
75
76 multilib_copy_sources
77
78 diff --git a/sys-libs/libselinux/libselinux-2.7_rc1.ebuild b/sys-libs/libselinux/libselinux-2.7_rc1.ebuild
79 deleted file mode 100644
80 index b10e9ef..0000000
81 --- a/sys-libs/libselinux/libselinux-2.7_rc1.ebuild
82 +++ /dev/null
83 @@ -1,159 +0,0 @@
84 -# Copyright 1999-2017 Gentoo Foundation
85 -# Distributed under the terms of the GNU General Public License v2
86 -
87 -EAPI="6"
88 -PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 )
89 -USE_RUBY="ruby22 ruby23"
90 -
91 -# No, I am not calling ruby-ng
92 -inherit multilib python-r1 toolchain-funcs multilib-minimal
93 -
94 -MY_P="${P//_/-}"
95 -SEPOL_VER="${PV}"
96 -MY_RELEASEDATE="20170609"
97 -
98 -DESCRIPTION="SELinux userland library"
99 -HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
100 -
101 -if [[ ${PV} == 9999 ]] ; then
102 - inherit git-r3
103 - EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
104 - S="${WORKDIR}/${MY_P}/${PN}"
105 -else
106 - SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
107 - KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
108 - S="${WORKDIR}/${MY_P}"
109 -fi
110 -
111 -LICENSE="public-domain"
112 -SLOT="0"
113 -IUSE="pcre2 python ruby static-libs ruby_targets_ruby22 ruby_targets_ruby23"
114 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
115 -
116 -RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}:=[${MULTILIB_USEDEP}]
117 - !pcre2? ( >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}] )
118 - pcre2? ( dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] )
119 - python? ( ${PYTHON_DEPS} )
120 - ruby? (
121 - ruby_targets_ruby22? ( dev-lang/ruby:2.2 )
122 - ruby_targets_ruby23? ( dev-lang/ruby:2.3 )
123 - )
124 - elibc_musl? ( sys-libs/fts-standalone )"
125 -DEPEND="${RDEPEND}
126 - virtual/pkgconfig
127 - python? ( >=dev-lang/swig-2.0.9 )"
128 -
129 -src_prepare() {
130 - if [[ ${PV} != 9999 ]] ; then
131 - # If needed for live builds, place them in /etc/portage/patches
132 - eapply "${FILESDIR}/libselinux-2.7-fts_ldlibs.patch"
133 - fi
134 -
135 - eapply_user
136 -
137 - multilib_copy_sources
138 -}
139 -
140 -multilib_src_compile() {
141 - tc-export AR CC PKG_CONFIG RANLIB
142 -
143 - emake \
144 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
145 - SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
146 - LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
147 - USE_PCRE2="$(usex pcre2 y n)" \
148 - FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
149 - all
150 -
151 - if multilib_is_native_abi && use python; then
152 - building() {
153 - emake \
154 - LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
155 - FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
156 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
157 - SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
158 - USE_PCRE2="$(usex pcre2 y n)" \
159 - pywrap
160 - }
161 - python_foreach_impl building
162 - fi
163 -
164 - if multilib_is_native_abi && use ruby; then
165 - building() {
166 - einfo "Calling rubywrap for ${1}"
167 - # Clean up .lo file to force rebuild
168 - rm -f src/selinuxswig_ruby_wrap.lo || die
169 - emake \
170 - RUBY=${1} \
171 - LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
172 - FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
173 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
174 - SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
175 - USE_PCRE2="$(usex pcre2 y n)" \
176 - rubywrap
177 - }
178 - for RUBYTARGET in ${USE_RUBY}; do
179 - use ruby_targets_${RUBYTARGET} || continue
180 -
181 - building ${RUBYTARGET}
182 - done
183 - fi
184 -}
185 -
186 -multilib_src_install() {
187 - emake DESTDIR="${D}" \
188 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
189 - SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
190 - LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
191 - USE_PCRE2="$(usex pcre2 y n)" \
192 - install
193 -
194 - if multilib_is_native_abi && use python; then
195 - installation() {
196 - emake DESTDIR="${D}" \
197 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
198 - LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
199 - USE_PCRE2="$(usex pcre2 y n)" \
200 - install-pywrap
201 - python_optimize # bug 531638
202 - }
203 - python_foreach_impl installation
204 - fi
205 -
206 - if multilib_is_native_abi && use ruby; then
207 - installation() {
208 - einfo "Calling install-rubywrap for ${1}"
209 - # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
210 - rm src/selinuxswig_ruby_wrap.lo
211 - emake DESTDIR="${D}" \
212 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
213 - LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
214 - RUBY=${1} \
215 - USE_PCRE2="$(usex pcre2 y n)" \
216 - install-rubywrap
217 - }
218 - for RUBYTARGET in ${USE_RUBY}; do
219 - use ruby_targets_${RUBYTARGET} || continue
220 -
221 - installation ${RUBYTARGET}
222 - done
223 - fi
224 -
225 - use static-libs || rm "${D}"/usr/lib*/*.a || die
226 -}
227 -
228 -pkg_postinst() {
229 - # Fix bug 473502
230 - for POLTYPE in ${POLICY_TYPES};
231 - do
232 - mkdir -p /etc/selinux/${POLTYPE}/contexts/files || die
233 - touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local || die
234 - # Fix bug 516608
235 - for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
236 - if [[ -f "/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
237 - sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} \
238 - || die "Failed to recompile contexts"
239 - fi
240 - done
241 - done
242 -}
243
244 diff --git a/sys-libs/libselinux/libselinux-2.7_rc4.ebuild b/sys-libs/libselinux/libselinux-2.7_rc4.ebuild
245 deleted file mode 100644
246 index fabcf97..0000000
247 --- a/sys-libs/libselinux/libselinux-2.7_rc4.ebuild
248 +++ /dev/null
249 @@ -1,159 +0,0 @@
250 -# Copyright 1999-2017 Gentoo Foundation
251 -# Distributed under the terms of the GNU General Public License v2
252 -
253 -EAPI="6"
254 -PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 )
255 -USE_RUBY="ruby22 ruby23"
256 -
257 -# No, I am not calling ruby-ng
258 -inherit multilib python-r1 toolchain-funcs multilib-minimal
259 -
260 -MY_P="${P//_/-}"
261 -SEPOL_VER="${PV}"
262 -MY_RELEASEDATE="20170630"
263 -
264 -DESCRIPTION="SELinux userland library"
265 -HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
266 -
267 -if [[ ${PV} == 9999 ]] ; then
268 - inherit git-r3
269 - EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
270 - S="${WORKDIR}/${MY_P}/${PN}"
271 -else
272 - SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
273 - KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
274 - S="${WORKDIR}/${MY_P}"
275 -fi
276 -
277 -LICENSE="public-domain"
278 -SLOT="0"
279 -IUSE="pcre2 python ruby static-libs ruby_targets_ruby22 ruby_targets_ruby23"
280 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
281 -
282 -RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}:=[${MULTILIB_USEDEP}]
283 - !pcre2? ( >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}] )
284 - pcre2? ( dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] )
285 - python? ( ${PYTHON_DEPS} )
286 - ruby? (
287 - ruby_targets_ruby22? ( dev-lang/ruby:2.2 )
288 - ruby_targets_ruby23? ( dev-lang/ruby:2.3 )
289 - )
290 - elibc_musl? ( sys-libs/fts-standalone )"
291 -DEPEND="${RDEPEND}
292 - virtual/pkgconfig
293 - python? ( >=dev-lang/swig-2.0.9 )"
294 -
295 -src_prepare() {
296 - if [[ ${PV} != 9999 ]] ; then
297 - # If needed for live builds, place them in /etc/portage/patches
298 - eapply "${FILESDIR}/libselinux-2.7-fts_ldlibs.patch"
299 - fi
300 -
301 - eapply_user
302 -
303 - multilib_copy_sources
304 -}
305 -
306 -multilib_src_compile() {
307 - tc-export AR CC PKG_CONFIG RANLIB
308 -
309 - emake \
310 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
311 - SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
312 - LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
313 - USE_PCRE2="$(usex pcre2 y n)" \
314 - FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
315 - all
316 -
317 - if multilib_is_native_abi && use python; then
318 - building() {
319 - emake \
320 - LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
321 - FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
322 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
323 - SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
324 - USE_PCRE2="$(usex pcre2 y n)" \
325 - pywrap
326 - }
327 - python_foreach_impl building
328 - fi
329 -
330 - if multilib_is_native_abi && use ruby; then
331 - building() {
332 - einfo "Calling rubywrap for ${1}"
333 - # Clean up .lo file to force rebuild
334 - rm -f src/selinuxswig_ruby_wrap.lo || die
335 - emake \
336 - RUBY=${1} \
337 - LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
338 - FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
339 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
340 - SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
341 - USE_PCRE2="$(usex pcre2 y n)" \
342 - rubywrap
343 - }
344 - for RUBYTARGET in ${USE_RUBY}; do
345 - use ruby_targets_${RUBYTARGET} || continue
346 -
347 - building ${RUBYTARGET}
348 - done
349 - fi
350 -}
351 -
352 -multilib_src_install() {
353 - emake DESTDIR="${D}" \
354 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
355 - SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
356 - LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
357 - USE_PCRE2="$(usex pcre2 y n)" \
358 - install
359 -
360 - if multilib_is_native_abi && use python; then
361 - installation() {
362 - emake DESTDIR="${D}" \
363 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
364 - LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
365 - USE_PCRE2="$(usex pcre2 y n)" \
366 - install-pywrap
367 - python_optimize # bug 531638
368 - }
369 - python_foreach_impl installation
370 - fi
371 -
372 - if multilib_is_native_abi && use ruby; then
373 - installation() {
374 - einfo "Calling install-rubywrap for ${1}"
375 - # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
376 - rm src/selinuxswig_ruby_wrap.lo
377 - emake DESTDIR="${D}" \
378 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
379 - LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
380 - RUBY=${1} \
381 - USE_PCRE2="$(usex pcre2 y n)" \
382 - install-rubywrap
383 - }
384 - for RUBYTARGET in ${USE_RUBY}; do
385 - use ruby_targets_${RUBYTARGET} || continue
386 -
387 - installation ${RUBYTARGET}
388 - done
389 - fi
390 -
391 - use static-libs || rm "${D}"/usr/lib*/*.a || die
392 -}
393 -
394 -pkg_postinst() {
395 - # Fix bug 473502
396 - for POLTYPE in ${POLICY_TYPES};
397 - do
398 - mkdir -p /etc/selinux/${POLTYPE}/contexts/files || die
399 - touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local || die
400 - # Fix bug 516608
401 - for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
402 - if [[ -f "/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
403 - sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} \
404 - || die "Failed to recompile contexts"
405 - fi
406 - done
407 - done
408 -}
409
410 diff --git a/sys-libs/libselinux/libselinux-2.7_rc5.ebuild b/sys-libs/libselinux/libselinux-2.7_rc5.ebuild
411 deleted file mode 100644
412 index 1dc0ab9..0000000
413 --- a/sys-libs/libselinux/libselinux-2.7_rc5.ebuild
414 +++ /dev/null
415 @@ -1,159 +0,0 @@
416 -# Copyright 1999-2017 Gentoo Foundation
417 -# Distributed under the terms of the GNU General Public License v2
418 -
419 -EAPI="6"
420 -PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 )
421 -USE_RUBY="ruby22 ruby23"
422 -
423 -# No, I am not calling ruby-ng
424 -inherit multilib python-r1 toolchain-funcs multilib-minimal
425 -
426 -MY_P="${P//_/-}"
427 -SEPOL_VER="${PV}"
428 -MY_RELEASEDATE="20170718"
429 -
430 -DESCRIPTION="SELinux userland library"
431 -HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
432 -
433 -if [[ ${PV} == 9999 ]] ; then
434 - inherit git-r3
435 - EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
436 - S="${WORKDIR}/${MY_P}/${PN}"
437 -else
438 - SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
439 - KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
440 - S="${WORKDIR}/${MY_P}"
441 -fi
442 -
443 -LICENSE="public-domain"
444 -SLOT="0"
445 -IUSE="pcre2 python ruby static-libs ruby_targets_ruby22 ruby_targets_ruby23"
446 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
447 -
448 -RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}:=[${MULTILIB_USEDEP}]
449 - !pcre2? ( >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}] )
450 - pcre2? ( dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] )
451 - python? ( ${PYTHON_DEPS} )
452 - ruby? (
453 - ruby_targets_ruby22? ( dev-lang/ruby:2.2 )
454 - ruby_targets_ruby23? ( dev-lang/ruby:2.3 )
455 - )
456 - elibc_musl? ( sys-libs/fts-standalone )"
457 -DEPEND="${RDEPEND}
458 - virtual/pkgconfig
459 - python? ( >=dev-lang/swig-2.0.9 )"
460 -
461 -src_prepare() {
462 - if [[ ${PV} != 9999 ]] ; then
463 - # If needed for live builds, place them in /etc/portage/patches
464 - eapply "${FILESDIR}/libselinux-2.7-fts_ldlibs.patch"
465 - fi
466 -
467 - eapply_user
468 -
469 - multilib_copy_sources
470 -}
471 -
472 -multilib_src_compile() {
473 - tc-export AR CC PKG_CONFIG RANLIB
474 -
475 - emake \
476 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
477 - SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
478 - LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
479 - USE_PCRE2="$(usex pcre2 y n)" \
480 - FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
481 - all
482 -
483 - if multilib_is_native_abi && use python; then
484 - building() {
485 - emake \
486 - LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
487 - FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
488 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
489 - SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
490 - USE_PCRE2="$(usex pcre2 y n)" \
491 - pywrap
492 - }
493 - python_foreach_impl building
494 - fi
495 -
496 - if multilib_is_native_abi && use ruby; then
497 - building() {
498 - einfo "Calling rubywrap for ${1}"
499 - # Clean up .lo file to force rebuild
500 - rm -f src/selinuxswig_ruby_wrap.lo || die
501 - emake \
502 - RUBY=${1} \
503 - LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
504 - FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
505 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
506 - SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
507 - USE_PCRE2="$(usex pcre2 y n)" \
508 - rubywrap
509 - }
510 - for RUBYTARGET in ${USE_RUBY}; do
511 - use ruby_targets_${RUBYTARGET} || continue
512 -
513 - building ${RUBYTARGET}
514 - done
515 - fi
516 -}
517 -
518 -multilib_src_install() {
519 - emake DESTDIR="${D}" \
520 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
521 - SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
522 - LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
523 - USE_PCRE2="$(usex pcre2 y n)" \
524 - install
525 -
526 - if multilib_is_native_abi && use python; then
527 - installation() {
528 - emake DESTDIR="${D}" \
529 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
530 - LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
531 - USE_PCRE2="$(usex pcre2 y n)" \
532 - install-pywrap
533 - python_optimize # bug 531638
534 - }
535 - python_foreach_impl installation
536 - fi
537 -
538 - if multilib_is_native_abi && use ruby; then
539 - installation() {
540 - einfo "Calling install-rubywrap for ${1}"
541 - # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
542 - rm src/selinuxswig_ruby_wrap.lo
543 - emake DESTDIR="${D}" \
544 - LIBDIR="\$(PREFIX)/$(get_libdir)" \
545 - LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
546 - RUBY=${1} \
547 - USE_PCRE2="$(usex pcre2 y n)" \
548 - install-rubywrap
549 - }
550 - for RUBYTARGET in ${USE_RUBY}; do
551 - use ruby_targets_${RUBYTARGET} || continue
552 -
553 - installation ${RUBYTARGET}
554 - done
555 - fi
556 -
557 - use static-libs || rm "${D}"/usr/lib*/*.a || die
558 -}
559 -
560 -pkg_postinst() {
561 - # Fix bug 473502
562 - for POLTYPE in ${POLICY_TYPES};
563 - do
564 - mkdir -p /etc/selinux/${POLTYPE}/contexts/files || die
565 - touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local || die
566 - # Fix bug 516608
567 - for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
568 - if [[ -f "/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
569 - sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} \
570 - || die "Failed to recompile contexts"
571 - fi
572 - done
573 - done
574 -}