Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libselinux/files/, sys-libs/libselinux/
Date: Mon, 03 Oct 2016 07:30:35
Message-Id: 1475478148.d2e6a0825a951d92abe34fa7703ba89057eae912.perfinion@gentoo
1 commit: d2e6a0825a951d92abe34fa7703ba89057eae912
2 Author: Jason Zaman <perfinion <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 1 03:26:58 2016 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 3 07:02:28 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2e6a082
7
8 sys-libs/libselinux: bump to 2.6-rc1
9
10 Package-Manager: portage-2.3.0
11
12 sys-libs/libselinux/Manifest | 1 +
13 ...2.6-0005-use-ruby-include-with-rubylibver.patch | 39 ++++++++++
14 ...x-2.6-0007-build-related-fixes-bug-500674.patch | 91 ++++++++++++++++++++++
15 ...linux-9999.ebuild => libselinux-2.6_rc1.ebuild} | 45 +++++------
16 sys-libs/libselinux/libselinux-9999.ebuild | 45 +++++------
17 sys-libs/libselinux/metadata.xml | 3 +
18 6 files changed, 180 insertions(+), 44 deletions(-)
19
20 diff --git a/sys-libs/libselinux/Manifest b/sys-libs/libselinux/Manifest
21 index 81ff468..c2a779e 100644
22 --- a/sys-libs/libselinux/Manifest
23 +++ b/sys-libs/libselinux/Manifest
24 @@ -1 +1,2 @@
25 DIST libselinux-2.5.tar.gz 189019 SHA256 94c9e97706280bedcc288f784f67f2b9d3d6136c192b2c9f812115edba58514f SHA512 1c6718aa6fa05c8635427cd6f5a89ce47fb6bb9bd2fec417293122826695d1ebb0e0b86e83711abb5c4fe71c67dce6f2e18745592833d1711f0ab2d01246b8c7 WHIRLPOOL 96192b856d32a82b9b4413137085e69ad52cbf2e0d274603a90d904e9a318a80c83f337aef26f54c685a689972432955f0f9de67949e0bb4f844611df22d3589
26 +DIST libselinux-2.6-rc1.tar.gz 203034 SHA256 4ef2bbb1bdb1d0c43ed14b237066364b07bd1d2ae0a16dcd475bbf7793723928 SHA512 72a8a1d244fea3902cecff69fda48c1bc8d7ce1789902126565272782105bd43205e517af8a4cac5cc5cab47c48f0cd3b287c42a408ae3889b51b19b0b38632b WHIRLPOOL b9012b74a3f073e25b63d83003194f23f7177cdd0e33443de87ff7491e0ecffa72eea07be04247cafd3045773427dbf98f592e02346c8fa32bc161be624cc2b4
27
28 diff --git a/sys-libs/libselinux/files/libselinux-2.6-0005-use-ruby-include-with-rubylibver.patch b/sys-libs/libselinux/files/libselinux-2.6-0005-use-ruby-include-with-rubylibver.patch
29 new file mode 100644
30 index 00000000..a2f704d
31 --- /dev/null
32 +++ b/sys-libs/libselinux/files/libselinux-2.6-0005-use-ruby-include-with-rubylibver.patch
33 @@ -0,0 +1,39 @@
34 +From 024a8628e698e8c90f7876a35c820f30c6957031 Mon Sep 17 00:00:00 2001
35 +From: Jason Zaman <jason@×××××××××.com>
36 +Date: Sun, 2 Oct 2016 02:06:35 +0800
37 +Subject: [PATCH] libselinux: versioned ruby pkg-config and query vendorarchdir
38 + properly
39 +
40 +Gentoo and Arch have pkg-config entries for "ruby-$(RUBYLIBVER)" but not
41 +for "ruby". Check if that exists first then fall back to plain ruby if
42 +it does not.
43 +
44 +The ruby install paths were incorrect. Fedora 20 installed to
45 +/usr/lib64/ruby/vendor_ruby/, Arch needs it to be vendor_ruby as well,
46 +site_ruby does not work. Thanks to Nicolas Iooss for the correct way to
47 +query for the path.
48 +
49 +Signed-off-by: Jason Zaman <jason@×××××××××.com>
50 +---
51 + libselinux/src/Makefile | 5 ++---
52 + 1 file changed, 2 insertions(+), 3 deletions(-)
53 +
54 +diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
55 +index 7169230..f9e3de1 100644
56 +--- libselinux/src/Makefile
57 ++++ libselinux/src/Makefile
58 +@@ -16,9 +16,8 @@ PYLIBVER ?= $(shell $(PYTHON) -c 'import sys;print("python%d.%d" % sys.version_i
59 + PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX))
60 + PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER)
61 + RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
62 +-RUBYPLATFORM ?= $(shell $(RUBY) -e 'print RUBY_PLATFORM')
63 +-RUBYINC ?= $(shell $(PKG_CONFIG) --cflags ruby)
64 +-RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM)
65 ++RUBYINC ?= $(shell $(PKG_CONFIG) --exists ruby-$(RUBYLIBVER) && $(PKG_CONFIG) --cflags ruby-$(RUBYLIBVER) || $(PKG_CONFIG) --cflags ruby)
66 ++RUBYINSTALL ?= $(DESTDIR)$(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]')
67 + LIBBASE ?= $(shell basename $(LIBDIR))
68 +
69 + VERSION = $(shell cat ../VERSION)
70 +--
71 +2.7.3
72 +
73
74 diff --git a/sys-libs/libselinux/files/libselinux-2.6-0007-build-related-fixes-bug-500674.patch b/sys-libs/libselinux/files/libselinux-2.6-0007-build-related-fixes-bug-500674.patch
75 new file mode 100644
76 index 00000000..83596e8
77 --- /dev/null
78 +++ b/sys-libs/libselinux/files/libselinux-2.6-0007-build-related-fixes-bug-500674.patch
79 @@ -0,0 +1,91 @@
80 +https://bugs.gentoo.org/500674
81 +
82 +random fixes:
83 +- make sure PCRE_CFLAGS get used
84 +- use PCRE_LIBS via pkg-config
85 +- move LDFLAGS to before objects, not after
86 +- do not hardcode -L$(LIBDIR) (let the toolchain handle it)
87 +- do not hardcode -I$(INCLUDEDIR) (let the toolchain handle it)
88 +
89 +diff --git a/libselinux/Makefile b/libselinux/Makefile
90 +index baa0db3..4dc5aa0 100644
91 +--- libselinux/Makefile
92 ++++ libselinux/Makefile
93 +@@ -1,5 +1,6 @@
94 + SUBDIRS = src include utils man
95 +
96 ++PKG_CONFIG ?= pkg-config
97 + DISABLE_SETRANS ?= n
98 + DISABLE_RPM ?= n
99 + ANDROID_HOST ?= n
100 +@@ -20,10 +21,11 @@ export DISABLE_SETRANS DISABLE_RPM DISABLE_FLAGS ANDROID_HOST
101 +
102 + USE_PCRE2 ?= n
103 + ifeq ($(USE_PCRE2),y)
104 +- PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8
105 +- PCRE_LDFLAGS := -lpcre2-8
106 ++ PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 $(shell $(PKG_CONFIG) --cflags libpcre2-8)
107 ++ PCRE_LDFLAGS := $(shell $(PKG_CONFIG) --libs libpcre2-8)
108 + else
109 +- PCRE_LDFLAGS := -lpcre
110 ++ PCRE_CFLAGS := $(shell $(PKG_CONFIG) --cflags libpcre)
111 ++ PCRE_LDFLAGS := $(shell $(PKG_CONFIG) --libs libpcre)
112 + endif
113 + export PCRE_CFLAGS PCRE_LDFLAGS
114 +
115 +diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
116 +index 13501cd..42cb2f6 100644
117 +--- libselinux/src/Makefile
118 ++++ libselinux/src/Makefile
119 +@@ -67,7 +67,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi
120 +
121 + PCRE_LDFLAGS ?= -lpcre
122 +
123 +-override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
124 ++override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
125 +
126 + SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter \
127 + -Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations
128 +@@ -107,17 +107,17 @@ $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT)
129 + $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
130 +
131 + $(SWIGSO): $(SWIGLOBJ)
132 +- $(CC) $(CFLAGS) -shared -o $@ $< -L. -lselinux $(LDFLAGS) -L$(LIBDIR)
133 ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lselinux
134 +
135 + $(SWIGRUBYSO): $(SWIGRUBYLOBJ)
136 +- $(CC) $(CFLAGS) -shared -o $@ $^ -L. -lselinux $(LDFLAGS) -L$(LIBDIR)
137 ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lselinux
138 +
139 + $(LIBA): $(OBJS)
140 + $(AR) rcs $@ $^
141 + $(RANLIB) $@
142 +
143 + $(LIBSO): $(LOBJS)
144 +- $(CC) $(CFLAGS) -shared -o $@ $^ $(PCRE_LDFLAGS) -ldl $(LDFLAGS) -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
145 ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ $(PCRE_LDFLAGS) -ldl -Wl,-soname,$(LIBSO),-z,defs,-z,relro
146 + ln -sf $@ $(TARGET)
147 +
148 + $(LIBPC): $(LIBPC).in ../VERSION
149 +@@ -130,7 +130,7 @@ $(AUDIT2WHYLOBJ): audit2why.c
150 + $(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $<
151 +
152 + $(AUDIT2WHYSO): $(AUDIT2WHYLOBJ)
153 +- $(CC) $(CFLAGS) -shared -o $@ $^ -L. $(LDFLAGS) -lselinux $(LIBDIR)/libsepol.a -L$(LIBDIR)
154 ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lselinux $(LIBDIR)/libsepol.a
155 +
156 + %.o: %.c policy.h
157 + $(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
158 +diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile
159 +index e56a953..6fd205a 100644
160 +--- libselinux/utils/Makefile
161 ++++ libselinux/utils/Makefile
162 +@@ -25,7 +25,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi
163 + -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const \
164 + -Werror -Wno-aggregate-return -Wno-redundant-decls
165 + override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
166 +-LDLIBS += -L../src -lselinux -L$(LIBDIR)
167 ++LDLIBS += -L../src -lselinux
168 + PCRE_LDFLAGS ?= -lpcre
169 +
170 + ifeq ($(ANDROID_HOST),y)
171
172 diff --git a/sys-libs/libselinux/libselinux-9999.ebuild b/sys-libs/libselinux/libselinux-2.6_rc1.ebuild
173 similarity index 75%
174 copy from sys-libs/libselinux/libselinux-9999.ebuild
175 copy to sys-libs/libselinux/libselinux-2.6_rc1.ebuild
176 index 54de3c9..84092cb 100644
177 --- a/sys-libs/libselinux/libselinux-9999.ebuild
178 +++ b/sys-libs/libselinux/libselinux-2.6_rc1.ebuild
179 @@ -11,7 +11,7 @@ inherit multilib python-r1 toolchain-funcs multilib-minimal
180
181 MY_P="${P//_/-}"
182 SEPOL_VER="${PV}"
183 -MY_RELEASEDATE="20160223"
184 +MY_RELEASEDATE="20160930"
185
186 DESCRIPTION="SELinux userland library"
187 HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
188 @@ -29,10 +29,11 @@ fi
189 LICENSE="public-domain"
190 SLOT="0"
191
192 -IUSE="python ruby static-libs ruby_targets_ruby21 ruby_targets_ruby22 ruby_targets_ruby23"
193 +IUSE="pcre2 python ruby static-libs ruby_targets_ruby21 ruby_targets_ruby22 ruby_targets_ruby23"
194
195 -RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}[${MULTILIB_USEDEP}]
196 - >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}]
197 +RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}:=[${MULTILIB_USEDEP}]
198 + !pcre2? ( >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}] )
199 + pcre2? ( dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] )
200 python? ( ${PYTHON_DEPS} )
201 ruby? (
202 ruby_targets_ruby21? ( dev-lang/ruby:2.1 )
203 @@ -46,8 +47,8 @@ DEPEND="${RDEPEND}
204 src_prepare() {
205 if [[ ${PV} != 9999 ]] ; then
206 # If needed for live builds, place them in /etc/portage/patches
207 - eapply "${FILESDIR}/0005-use-ruby-include-with-rubylibver.patch"
208 - eapply "${FILESDIR}/0007-build-related-fixes-bug-500674-for-2.5.patch"
209 + eapply "${FILESDIR}/libselinux-2.6-0005-use-ruby-include-with-rubylibver.patch"
210 + eapply "${FILESDIR}/libselinux-2.6-0007-build-related-fixes-bug-500674.patch"
211 fi
212
213 eapply_user
214 @@ -56,30 +57,24 @@ src_prepare() {
215 }
216
217 multilib_src_compile() {
218 - tc-export PKG_CONFIG RANLIB
219 - local PCRE_CFLAGS=$(${PKG_CONFIG} libpcre --cflags)
220 - local PCRE_LIBS=$(${PKG_CONFIG} libpcre --libs)
221 - export PCRE_{CFLAGS,LIBS}
222 + tc-export AR CC PKG_CONFIG RANLIB
223
224 emake \
225 - AR="$(tc-getAR)" \
226 - CC="$(tc-getCC)" \
227 LIBDIR="\$(PREFIX)/$(get_libdir)" \
228 SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
229 LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
230 + USE_PCRE2="$(usex pcre2 y n)" \
231 all
232
233 if multilib_is_native_abi && use python; then
234 building() {
235 python_export PYTHON_INCLUDEDIR PYTHON_LIBPATH
236 emake \
237 - CC="$(tc-getCC)" \
238 PYINC="-I${PYTHON_INCLUDEDIR}" \
239 - PYTHONLIBDIR="${PYTHON_LIBPATH}" \
240 - PYPREFIX="${EPYTHON##*/}" \
241 LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
242 LIBDIR="\$(PREFIX)/$(get_libdir)" \
243 SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
244 + USE_PCRE2="$(usex pcre2 y n)" \
245 pywrap
246 }
247 python_foreach_impl building
248 @@ -91,12 +86,11 @@ multilib_src_compile() {
249 # Clean up .lo file to force rebuild
250 rm -f src/selinuxswig_ruby_wrap.lo || die
251 emake \
252 - CC="$(tc-getCC)" \
253 RUBY=${1} \
254 - RUBYINSTALL=$(${1} -e 'print RbConfig::CONFIG["vendorarchdir"]') \
255 LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
256 LIBDIR="\$(PREFIX)/$(get_libdir)" \
257 SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
258 + USE_PCRE2="$(usex pcre2 y n)" \
259 rubywrap
260 }
261 for RUBYTARGET in ${USE_RUBY}; do
262 @@ -108,12 +102,18 @@ multilib_src_compile() {
263 }
264
265 multilib_src_install() {
266 - LIBDIR="\$(PREFIX)/$(get_libdir)" SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
267 - emake DESTDIR="${D}" install
268 + emake DESTDIR="${D}" \
269 + LIBDIR="\$(PREFIX)/$(get_libdir)" \
270 + SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
271 + USE_PCRE2="$(usex pcre2 y n)" \
272 + install
273
274 if multilib_is_native_abi && use python; then
275 installation() {
276 - LIBDIR="\$(PREFIX)/$(get_libdir)" emake DESTDIR="${D}" install-pywrap
277 + emake DESTDIR="${D}" \
278 + LIBDIR="\$(PREFIX)/$(get_libdir)" \
279 + USE_PCRE2="$(usex pcre2 y n)" \
280 + install-pywrap
281 python_optimize # bug 531638
282 }
283 python_foreach_impl installation
284 @@ -124,9 +124,10 @@ multilib_src_install() {
285 einfo "Calling install-rubywrap for ${1}"
286 # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
287 rm src/selinuxswig_ruby_wrap.lo
288 - LIBDIR="\$(PREFIX)/$(get_libdir)" emake DESTDIR="${D}" \
289 + emake DESTDIR="${D}" \
290 + LIBDIR="\$(PREFIX)/$(get_libdir)" \
291 RUBY=${1} \
292 - RUBYINSTALL="${D}/$(${1} -e 'print RbConfig::CONFIG["vendorarchdir"]')" \
293 + USE_PCRE2="$(usex pcre2 y n)" \
294 install-rubywrap
295 }
296 for RUBYTARGET in ${USE_RUBY}; do
297
298 diff --git a/sys-libs/libselinux/libselinux-9999.ebuild b/sys-libs/libselinux/libselinux-9999.ebuild
299 index 54de3c9..84092cb 100644
300 --- a/sys-libs/libselinux/libselinux-9999.ebuild
301 +++ b/sys-libs/libselinux/libselinux-9999.ebuild
302 @@ -11,7 +11,7 @@ inherit multilib python-r1 toolchain-funcs multilib-minimal
303
304 MY_P="${P//_/-}"
305 SEPOL_VER="${PV}"
306 -MY_RELEASEDATE="20160223"
307 +MY_RELEASEDATE="20160930"
308
309 DESCRIPTION="SELinux userland library"
310 HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
311 @@ -29,10 +29,11 @@ fi
312 LICENSE="public-domain"
313 SLOT="0"
314
315 -IUSE="python ruby static-libs ruby_targets_ruby21 ruby_targets_ruby22 ruby_targets_ruby23"
316 +IUSE="pcre2 python ruby static-libs ruby_targets_ruby21 ruby_targets_ruby22 ruby_targets_ruby23"
317
318 -RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}[${MULTILIB_USEDEP}]
319 - >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}]
320 +RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}:=[${MULTILIB_USEDEP}]
321 + !pcre2? ( >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}] )
322 + pcre2? ( dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] )
323 python? ( ${PYTHON_DEPS} )
324 ruby? (
325 ruby_targets_ruby21? ( dev-lang/ruby:2.1 )
326 @@ -46,8 +47,8 @@ DEPEND="${RDEPEND}
327 src_prepare() {
328 if [[ ${PV} != 9999 ]] ; then
329 # If needed for live builds, place them in /etc/portage/patches
330 - eapply "${FILESDIR}/0005-use-ruby-include-with-rubylibver.patch"
331 - eapply "${FILESDIR}/0007-build-related-fixes-bug-500674-for-2.5.patch"
332 + eapply "${FILESDIR}/libselinux-2.6-0005-use-ruby-include-with-rubylibver.patch"
333 + eapply "${FILESDIR}/libselinux-2.6-0007-build-related-fixes-bug-500674.patch"
334 fi
335
336 eapply_user
337 @@ -56,30 +57,24 @@ src_prepare() {
338 }
339
340 multilib_src_compile() {
341 - tc-export PKG_CONFIG RANLIB
342 - local PCRE_CFLAGS=$(${PKG_CONFIG} libpcre --cflags)
343 - local PCRE_LIBS=$(${PKG_CONFIG} libpcre --libs)
344 - export PCRE_{CFLAGS,LIBS}
345 + tc-export AR CC PKG_CONFIG RANLIB
346
347 emake \
348 - AR="$(tc-getAR)" \
349 - CC="$(tc-getCC)" \
350 LIBDIR="\$(PREFIX)/$(get_libdir)" \
351 SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
352 LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
353 + USE_PCRE2="$(usex pcre2 y n)" \
354 all
355
356 if multilib_is_native_abi && use python; then
357 building() {
358 python_export PYTHON_INCLUDEDIR PYTHON_LIBPATH
359 emake \
360 - CC="$(tc-getCC)" \
361 PYINC="-I${PYTHON_INCLUDEDIR}" \
362 - PYTHONLIBDIR="${PYTHON_LIBPATH}" \
363 - PYPREFIX="${EPYTHON##*/}" \
364 LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
365 LIBDIR="\$(PREFIX)/$(get_libdir)" \
366 SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
367 + USE_PCRE2="$(usex pcre2 y n)" \
368 pywrap
369 }
370 python_foreach_impl building
371 @@ -91,12 +86,11 @@ multilib_src_compile() {
372 # Clean up .lo file to force rebuild
373 rm -f src/selinuxswig_ruby_wrap.lo || die
374 emake \
375 - CC="$(tc-getCC)" \
376 RUBY=${1} \
377 - RUBYINSTALL=$(${1} -e 'print RbConfig::CONFIG["vendorarchdir"]') \
378 LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
379 LIBDIR="\$(PREFIX)/$(get_libdir)" \
380 SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
381 + USE_PCRE2="$(usex pcre2 y n)" \
382 rubywrap
383 }
384 for RUBYTARGET in ${USE_RUBY}; do
385 @@ -108,12 +102,18 @@ multilib_src_compile() {
386 }
387
388 multilib_src_install() {
389 - LIBDIR="\$(PREFIX)/$(get_libdir)" SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
390 - emake DESTDIR="${D}" install
391 + emake DESTDIR="${D}" \
392 + LIBDIR="\$(PREFIX)/$(get_libdir)" \
393 + SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
394 + USE_PCRE2="$(usex pcre2 y n)" \
395 + install
396
397 if multilib_is_native_abi && use python; then
398 installation() {
399 - LIBDIR="\$(PREFIX)/$(get_libdir)" emake DESTDIR="${D}" install-pywrap
400 + emake DESTDIR="${D}" \
401 + LIBDIR="\$(PREFIX)/$(get_libdir)" \
402 + USE_PCRE2="$(usex pcre2 y n)" \
403 + install-pywrap
404 python_optimize # bug 531638
405 }
406 python_foreach_impl installation
407 @@ -124,9 +124,10 @@ multilib_src_install() {
408 einfo "Calling install-rubywrap for ${1}"
409 # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
410 rm src/selinuxswig_ruby_wrap.lo
411 - LIBDIR="\$(PREFIX)/$(get_libdir)" emake DESTDIR="${D}" \
412 + emake DESTDIR="${D}" \
413 + LIBDIR="\$(PREFIX)/$(get_libdir)" \
414 RUBY=${1} \
415 - RUBYINSTALL="${D}/$(${1} -e 'print RbConfig::CONFIG["vendorarchdir"]')" \
416 + USE_PCRE2="$(usex pcre2 y n)" \
417 install-rubywrap
418 }
419 for RUBYTARGET in ${USE_RUBY}; do
420
421 diff --git a/sys-libs/libselinux/metadata.xml b/sys-libs/libselinux/metadata.xml
422 index 932a69e..0f6264f 100644
423 --- a/sys-libs/libselinux/metadata.xml
424 +++ b/sys-libs/libselinux/metadata.xml
425 @@ -10,6 +10,9 @@
426 process and file security contexts and to obtain security policy
427 decisions. Required for any applications that use the SELinux API.
428 </longdescription>
429 + <use>
430 + <flag name="pcre2">Use <pkg>sys-libs/pcre2</pkg> for fcontext regexes</flag>
431 + </use>
432 <upstream>
433 <remote-id type="github">SELinuxProject/selinux</remote-id>
434 </upstream>