diff options
author | Sven Vermeulen <swift@gentoo.org> | 2014-09-21 10:21:26 +0000 |
---|---|---|
committer | Sven Vermeulen <swift@gentoo.org> | 2014-09-21 10:21:26 +0000 |
commit | e27ec57e41ffcf8605f32401ad6b2cf1cde24311 (patch) | |
tree | 3d628c54eb7f32e6f71189b6d8e6e1d18f2f2821 /sys-libs/libselinux | |
parent | Moved to github (diff) | |
download | historical-e27ec57e41ffcf8605f32401ad6b2cf1cde24311.tar.gz historical-e27ec57e41ffcf8605f32401ad6b2cf1cde24311.tar.bz2 historical-e27ec57e41ffcf8605f32401ad6b2cf1cde24311.zip |
Noved to github; also add in masked 2.4 series
Package-Manager: portage-2.2.8-r1/cvs/Linux x86_64
Manifest-Sign-Key: 0x2EDD52403B68AF47
Diffstat (limited to 'sys-libs/libselinux')
-rw-r--r-- | sys-libs/libselinux/ChangeLog | 10 | ||||
-rw-r--r-- | sys-libs/libselinux/Manifest | 30 | ||||
-rw-r--r-- | sys-libs/libselinux/files/0005-use-ruby-include-with-rubylibver.patch | 12 | ||||
-rw-r--r-- | sys-libs/libselinux/files/0006-build-related-fixes-bug-500674.patch | 67 | ||||
-rw-r--r-- | sys-libs/libselinux/libselinux-2.3-r1.ebuild | 4 | ||||
-rw-r--r-- | sys-libs/libselinux/libselinux-2.4_rc2.ebuild | 140 |
6 files changed, 249 insertions, 14 deletions
diff --git a/sys-libs/libselinux/ChangeLog b/sys-libs/libselinux/ChangeLog index 4b709f2941bb..b56d021ffb1e 100644 --- a/sys-libs/libselinux/ChangeLog +++ b/sys-libs/libselinux/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-libs/libselinux # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.130 2014/09/16 23:03:43 dolsen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.131 2014/09/21 10:17:04 swift Exp $ + +*libselinux-2.4_rc2 (21 Sep 2014) + + 21 Sep 2014; Sven Vermeulen <swift@gentoo.org> + +files/0005-use-ruby-include-with-rubylibver.patch, + +files/0006-build-related-fixes-bug-500674.patch, +libselinux-2.4_rc2.ebuild, + libselinux-2.3-r1.ebuild: + Noved to github; also add in masked 2.4 series 16 Sep 2014; Brian Dolbec <dolsen@gentoo.org> libselinux-2.3-r1.ebuild: Add python-3.4 target, needed for dep of portage. Tested and diff --git a/sys-libs/libselinux/Manifest b/sys-libs/libselinux/Manifest index 0dc63694aa6d..2a57fbe34f24 100644 --- a/sys-libs/libselinux/Manifest +++ b/sys-libs/libselinux/Manifest @@ -1,24 +1,32 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 +AUX 0005-use-ruby-include-with-rubylibver.patch 634 SHA256 ca87111f9eb48b45b7271f4863ad4fbae99b64fd28a457cb15920250b0ded834 SHA512 6755c06e39a924dacc8cd21e8b56138938b55a54e76baddd2243bb4ec2cb99a92ca9d825f2f789ea84e87b1d795334a6b936e627d45b097ff724f00eb566c118 WHIRLPOOL 76a35b23454c941c32efdb2ed87a3fa3b044929d24acdcec53ab36f7d300bc94d6d8165a7b55483cc26ad21b4415aa47cb1540c07c498d3eeef2717f60a8ec3c +AUX 0006-build-related-fixes-bug-500674.patch 2846 SHA256 68084a13ed0366c279e37c6ce24703d0ddcbc46b2b4b88bb8af286b77df4212d SHA512 7eff094adfc4d276e72705735b3f73b2b8a4f78be153db749939cbf6c8df2246cf45d4eda0041696642ae22d3e1715f1fdc8b6351c13eb6003e48043fa38200b WHIRLPOOL dc2b99d5345e21f18de44dc56cb7996c5b567c932e4d3a2e6808a21233f582868333cc0d7c0eb2299b8d71a0cd46d2c0e88bfc6d351211b6374762b7863d72f6 DIST libselinux-2.2.2.tar.gz 171013 SHA256 30ab363416806da907b86b97f1d31c252473e3200358bb1570f563c8312b5a3e SHA512 1270cba11ec0795a2cea3706ac5547655d0e65dcd2141932000526f3d0c781b6ae114051b2bb53950b8ef207a318335329280b9fc9fd81796e8e4a27cf6ae841 WHIRLPOOL a444e44225ced35b126bbd2e8924aaf5c9f4da7abb9663d20a32b97babe750245c22d75e2238de0958b73295cf582b8aec39e23312886b96417120c600ed37dc DIST libselinux-2.3.tar.gz 171254 SHA256 0b1e0b43ecd84a812713d09564019b08e7c205d89072b5cbcd07b052cd8e77b2 SHA512 8cfcd20ab0b43ffbb32389e0498b21e43cde643dcdf471a2354f1ca557f11641d250871ed5e71b9dde4c5f47ac1048746fe514f8f6cfad668fa179ed5136e802 WHIRLPOOL e975a391559aca3f8b251d2aa484cf8e344d09caa43ff56dd929e75a0ad195cf8d9a88b950679f589f4deb74aea0d22be4e7ad00b11eacc080288df0b5ac7ccb +DIST libselinux-2.4-rc2.tar.gz 165817 SHA256 8b3b79247e6b93d49b6a9a38627e1e933cf96000117a36fe38af6a17a7d95b4d SHA512 60854a6b3efc52aa1b3f5d300aebaac889b26a51a58a8e4a5dce22a26707506b524b01706a10b6b3415e25c9eee1fbe5474e7bb7d83144ad1443c79562a565d7 WHIRLPOOL 7517be13cad652d921cf892a4e37a3e4d45676d512858a744bad5a0ed551bba210da17555845a82f14b5115c5879c813075633d76664b2bab2ade91df76a712b DIST patchbundle-libselinux-2.2.2-r5.tar.gz 2304 SHA256 ad77f499c05ec3b5707cb9db518a891dd9c84ccb77db07e686c87e5799e1802c SHA512 a01db39a7aade27b0127dd0e2f3185587ff4d913b7b1be7beac36dc2d3e1007de5e6bae8a11bc84567385420fff064ba54892d8e113c8fd54ad3c598dde7648d WHIRLPOOL 5886d9de6fcf073d54ca5e0eac3f8b4754c44382e7044debb223f94ecc81ea0e26b7638037eef17eb6f8ce4cc5046a4bb9f93b9b7767480908ee5b2ced0413ac DIST patchbundle-libselinux-4.tar.gz 2631 SHA256 91bf43c84ce3d3178c8d21fdcf97380a635fa2465d1611fe4e0e3838a586c78c SHA512 bd2f9762f095e3dbc67e77ee04968cb8e87d460fdf10feff91cb1ce6027e19a660bb57617887e44608d39720e8f95500c451c4b284d58c0a756a04b08fa305c2 WHIRLPOOL 07a6a69d33c46c443907aae2ae4f3646a0360565e28d0a50cbcf81f8b5d8c259812d3e086841fc21c2a8104ce9863fc6c9c1d32e28ea08ebc7baf2d45af3509f EBUILD libselinux-2.2.2-r5.ebuild 2534 SHA256 a98b5b6f55cba51844b9307156d0174b5aa350092d998a7d7cb4ebef691b41ca SHA512 9c789b638cd8822cdd738906de5a0e52f2cdf5c5c88316048a790a775d9f41601ae49e971709f572dd3eca964af8ec262fcb41ed1387a6d6be1ece74ed879fe2 WHIRLPOOL 1b6800e9eb589da42f05e9d8eff6009aa4aff6e1b55bc0e81f1b8cef280726e2105a069accdf645e68f0213c02bbd610c068536a57a7e56ae42156192ef288b1 -EBUILD libselinux-2.3-r1.ebuild 3916 SHA256 6d4f1de048b3025634296b2599239ef795061c7b62c793e1adb3bfd120885420 SHA512 14fee0ec9b75044025809f9b3137a6ddba477813b256a7af19b628a44f9c35daaaf62b6728ee605f00d22eacda7c5c48984b34a011488cbf5d526a5a525a426e WHIRLPOOL 190b5160640d1c27e30c68ae8bacbdea5fff584cb32ff5295c4855a83a0a2e526e54a46c295952e7b75c2b7cd529bd54062ca847b8edeb33edb63954712b281a -MISC ChangeLog 19310 SHA256 c469fc5382d598a6478834d54513bf555d4349071fb52ae5367b8507b33b2344 SHA512 464c85902ca7ae8507a59c7fce08a7b29fc61df8cf36d575b7d947b774b4992e884e5c80be6255e1ef5dc4c974c8bbaa0323291d4d5bcbbcaad131bdc3e9dcd4 WHIRLPOOL 5fed60ebbb73c30ecdcb7448c40d61d751c9f067eb2b3726fb66d4b1b881e5d44b8b55960529a826e6a370e695fb2831dcc98b27ea098279778c3e5379abac73 +EBUILD libselinux-2.3-r1.ebuild 3947 SHA256 ca0baaae337084e32d687b2c8d74c50b995d91e737a26ed3cddd4f51c121e68e SHA512 7e57b18370145fad0ffb13f0d121a3efe0f9bac0c51a1f5a9aa24e4bb8d8a42e25dfa2025252e43e05ac5ac020a1cff2ca2d0b842943d5746b269f0d22140f2c WHIRLPOOL 6686edc1ee477fd6495935b1038e6a0341727c2b9600098ed0deed8b8a8eced95f6b9466600b4846cf4ea78d091e3b9378daf1ddb109481e8d2c50160ff41fd7 +EBUILD libselinux-2.4_rc2.ebuild 3846 SHA256 66c873baa7f32acfa7678b2896e7c83b16ecc8556e7ee4e40844e96af0afa653 SHA512 029b993d39c8c883caf5175014223caff857fcff391c69134a8d194c0a941118ebf7907767f8c5bc71aa80432ac482254ab1451500a3ac256ad6f779e4bf5206 WHIRLPOOL 00bf289ec7574d34bfbf572dfa178ce47b94e104ba84c8c3e29cc7a7d48516987eb8e83596e68a966bbddc63e1e849bc1a8c807639cf5812cbf36065ef7e148c +MISC ChangeLog 19605 SHA256 8621ee7091ce73892224352d42d624794132a85fddb94a1b960d454a0f8216e9 SHA512 99622e74e80b085803497da7978d4aee8329b6759d627eb409e136fcecf59619e9c59b773f3619537b0a78f46687a9c44e63a71012a886d0f3829feebd5a1ff6 WHIRLPOOL 4bb9eda38364ee68c043c73d4d288c4ad20218f6af1b4d77798d47150a9ebb23195140fa8910aacea8eddd2638d1aacd1dfe4aa4cc8e4b1c3366feb270f4e52a MISC metadata.xml 406 SHA256 934da6149d008c09754c0654dbea6c49da117923adc6fbf3fcabac58195b9c45 SHA512 5bd2b0637c4d77b6113540dff5c4253390b1fcc69b864aaf2196d2c6e8c2c10fbb06bfcb69ba73978e3a2c3ca60fc6e4eccc0ea02a818b34a66c137f993a33a0 WHIRLPOOL f34ec6f0a7f35b9c2a8f29688fc58b6228484e3ba0568d65b6d8e24cc91662b6704ea532e036cf0a6ceca83b4e118bb7c8a64c6c4ba45bd60e2fa2d73d2d2abd -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0 -iQF8BAEBCABmBQJUGMHIXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w -ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4Njg4RkQxQ0M3MUMxQzA0RUFFQTQyMzcy -MjE0RDkwQTAxNEYxN0NCAAoJECIU2QoBTxfL9RUH/2ngq9IXEFT4gE80wKoaUnUc -gMbJjQOWf0rERxRffdb+kIwhdIoZkKZ8NHXYCfN9gMc7+c3aOFQOks4jBYavZr6T -cqlbQaVHvvst7aY1KecA9W2uwKqLGjaLPCd2NwliXqmMdXPW+x2qdqrAFhYVPf7U -J6sKc0stNiSsN/bxvKwQZgG3p6JWqTNwn3Qx8nSXMptgnKWdhzVVoVZEdlQYRDW2 -xA43GwtuZFvbdVzYYjNBEbLaHOKJNZTo6uVIf3oojU9RToD3DCk6JgWZfIYMOOVZ -aN3GzXNLa29Go5vNpnqZcu5sobNXNSYvce1fZmPCHxWrsHP312SSfIeK7bEjKHg= -=4HzL +iQIcBAEBCAAGBQJUHqViAAoJEC7dUkA7aK9HqhIP/3Mb34w0aOtPwh4EuptW2Bmm +JiKY5+uyd5oKV1ae1Hk+a+jiHM482OwKf4/Dyzgcj7dyWb+VJXsD9UToM3U/YiLb +hOpLggtMdc3L8mKSvEO59n6w6yol65g6y61bDbGc5+nM5Z+vh8lZ2X2K77cJR6qP +TxIvDolBHe4ukViHFp8D/bsnrlmwAqUSTyEYH865Q5pa/Y1mPf7pKm2PQO1JGcUM +TkhZKaYAGbkBGRdLayekVAe90pdBsQZgJkwPWO49iKf1/lxgp+ISevfMUsKzoXCx +u6pH796JVcA0++a6RJZVrKZgMy9j8uKpuu50ApcOH2eMVg9yrfV4Ygj2w/p2MmRS +qvHNhnGBPCA6choMJi50Nm9WyxdlI+bwE2KK4gy76OQgjSY+1cb2I/ygDmOAyVTj +uHykm+R8l3LdYeF/0le9JcdjC2rHZuD8D09lXWcTnxDJN7pXGD9LT+8RAee/ZGzN +FYkL4L9F0eQ2hlbD+wOriZ0TbJMw46ItABKS+oirASXy9IvratlC5uT3lCy+zbbC +NtE5HwFWjmmPiQOVy2MUyIVeAQY8PATqZmD5zcx996GdFJiw4tjas9GgT32tN65n +Bam9bXImRDt76s3I93MxOivFwJeEFIv1s/Lw6hsjY3qVXszdiebN7pO7GArovbU8 +in/DOvt/jm0hPTHwI8bS +=YJa+ -----END PGP SIGNATURE----- diff --git a/sys-libs/libselinux/files/0005-use-ruby-include-with-rubylibver.patch b/sys-libs/libselinux/files/0005-use-ruby-include-with-rubylibver.patch new file mode 100644 index 000000000000..0fc84141a3db --- /dev/null +++ b/sys-libs/libselinux/files/0005-use-ruby-include-with-rubylibver.patch @@ -0,0 +1,12 @@ +diff -uNr libselinux-2.2.2.orig/src/Makefile libselinux-2.2.2/src/Makefile +--- libselinux-2.2.2.orig/src/Makefile 2013-11-06 20:56:30.000000000 +0100 ++++ libselinux-2.2.2/src/Makefile 2013-11-25 21:02:05.327561766 +0100 +@@ -16,7 +16,7 @@ + PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER) + RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")') + RUBYPLATFORM ?= $(shell $(RUBY) -e 'print RUBY_PLATFORM') +-RUBYINC ?= $(shell pkg-config --cflags ruby) ++RUBYINC ?= $(shell pkg-config --cflags ruby-$(RUBYLIBVER)) + RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) + LIBBASE ?= $(shell basename $(LIBDIR)) + diff --git a/sys-libs/libselinux/files/0006-build-related-fixes-bug-500674.patch b/sys-libs/libselinux/files/0006-build-related-fixes-bug-500674.patch new file mode 100644 index 000000000000..cec91b12829a --- /dev/null +++ b/sys-libs/libselinux/files/0006-build-related-fixes-bug-500674.patch @@ -0,0 +1,67 @@ +https://bugs.gentoo.org/500674 + +random fixes: + - make sure PCRE_CFLAGS get used + - use PCRE_LIBS via pkg-config + - move LDFLAGS to before objects, not after + - do not hardcode -L$(LIBDIR) (let the toolchain handle it) + - do not hardcode -I$(INCLUDEDIR) (let the toolchain handle it) + +--- a/src/Makefile ++++ b/src/Makefile +@@ -75,7 +75,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi + -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const \ + -Werror -Wno-aggregate-return -Wno-redundant-decls + +-override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS) ++override CFLAGS += -I../include $(PCRE_CFLAGS) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS) + + SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter \ + -Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations +@@ -104,17 +104,17 @@ $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT) + $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $< + + $(SWIGSO): $(SWIGLOBJ) +- $(CC) $(CFLAGS) -shared -o $@ $< -L. -lselinux $(LDFLAGS) -L$(LIBDIR) ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lselinux + + $(SWIGRUBYSO): $(SWIGRUBYLOBJ) +- $(CC) $(CFLAGS) -shared -o $@ $^ -L. -lselinux $(LDFLAGS) -L$(LIBDIR) ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lselinux + + $(LIBA): $(OBJS) + $(AR) rcs $@ $^ + $(RANLIB) $@ + + $(LIBSO): $(LOBJS) +- $(CC) $(CFLAGS) -shared -o $@ $^ -lpcre -ldl $(LDFLAGS) -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -ldl $(PCRE_LIBS) -Wl,-soname,$(LIBSO),-z,defs,-z,relro + ln -sf $@ $(TARGET) + + $(LIBPC): $(LIBPC).in ../VERSION +@@ -127,7 +127,7 @@ $(AUDIT2WHYLOBJ): audit2why.c + $(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $< + + $(AUDIT2WHYSO): $(AUDIT2WHYLOBJ) +- $(CC) $(CFLAGS) -shared -o $@ $^ -L. $(LDFLAGS) -lselinux $(LIBDIR)/libsepol.a -L$(LIBDIR) ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lselinux $(LIBDIR)/libsepol.a + + %.o: %.c policy.h + $(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $< +--- a/utils/Makefile ++++ b/utils/Makefile +@@ -24,11 +24,12 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi + -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const \ + -Werror -Wno-aggregate-return -Wno-redundant-decls + override CFLAGS += -I../include -D_GNU_SOURCE $(EMFLAGS) +-LDLIBS += -L../src -lselinux -L$(LIBDIR) ++LDLIBS += -L../src -lselinux + + TARGETS=$(patsubst %.c,%,$(wildcard *.c)) + +-sefcontext_compile: LDLIBS += -lpcre ++sefcontext_compile: CFLAGS += $(PCRE_CFLAGS) ++sefcontext_compile: LDLIBS += $(PCRE_LIBS) + + ifeq ($(DISABLE_AVC),y) + UNUSED_TARGETS+=compute_av compute_create compute_member compute_relabel diff --git a/sys-libs/libselinux/libselinux-2.3-r1.ebuild b/sys-libs/libselinux/libselinux-2.3-r1.ebuild index be6426bd5514..8662bce6c10a 100644 --- a/sys-libs/libselinux/libselinux-2.3-r1.ebuild +++ b/sys-libs/libselinux/libselinux-2.3-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/libselinux-2.3-r1.ebuild,v 1.3 2014/09/16 23:03:43 dolsen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/libselinux-2.3-r1.ebuild,v 1.4 2014/09/21 10:17:04 swift Exp $ EAPI="5" PYTHON_COMPAT=( python2_7 python3_2 python3_3 python3_4 ) @@ -17,7 +17,7 @@ SEPOL_VER="2.3" DESCRIPTION="SELinux userland library" HOMEPAGE="http://userspace.selinuxproject.org" -SRC_URI="http://userspace.selinuxproject.org/releases/20140506/${MY_P}.tar.gz +SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20140506/${MY_P}.tar.gz http://dev.gentoo.org/~swift/patches/${PN}/patchbundle-${PN}-${PATCHBUNDLE}.tar.gz" LICENSE="public-domain" diff --git a/sys-libs/libselinux/libselinux-2.4_rc2.ebuild b/sys-libs/libselinux/libselinux-2.4_rc2.ebuild new file mode 100644 index 000000000000..8e7599f06705 --- /dev/null +++ b/sys-libs/libselinux/libselinux-2.4_rc2.ebuild @@ -0,0 +1,140 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/libselinux-2.4_rc2.ebuild,v 1.1 2014/09/21 10:17:04 swift Exp $ + +EAPI="5" +PYTHON_COMPAT=( python2_7 python3_2 python3_3 ) +USE_RUBY="ruby19 ruby20" + +PATCHBUNDLE="5" + +# No, I am not calling ruby-ng +inherit multilib python-r1 toolchain-funcs eutils multilib-minimal + +MY_P="${P//_/-}" + +SEPOL_VER="2.4_rc2" + +DESCRIPTION="SELinux userland library" +HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki" +SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20140826/${MY_P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="python ruby static-libs ruby_targets_ruby19 ruby_targets_ruby20" + +RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}[${MULTILIB_USEDEP}] + >=dev-libs/libpcre-8.33-r1[static-libs?,${MULTILIB_USEDEP}] + python? ( ${PYTHON_DEPS} ) + ruby? ( + ruby_targets_ruby19? ( dev-lang/ruby:1.9 ) + ruby_targets_ruby20? ( dev-lang/ruby:2.0 ) + )" +DEPEND="${RDEPEND} + virtual/pkgconfig + python? ( >=dev-lang/swig-2.0.9 )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}/0005-use-ruby-include-with-rubylibver.patch" + epatch "${FILESDIR}/0006-build-related-fixes-bug-500674.patch" + + epatch_user + + multilib_copy_sources +} + +multilib_src_compile() { + tc-export PKG_CONFIG RANLIB + local PCRE_CFLAGS=$(${PKG_CONFIG} libpcre --cflags) + local PCRE_LIBS=$(${PKG_CONFIG} libpcre --libs) + export PCRE_{CFLAGS,LIBS} + + emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + LIBDIR="\$(PREFIX)/$(get_libdir)" \ + SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \ + LDFLAGS="-fPIC ${LDFLAGS} -pthread" \ + all + + if multilib_is_native_abi && use python; then + building() { + python_export PYTHON_INCLUDEDIR PYTHON_LIBPATH + emake \ + CC="$(tc-getCC)" \ + PYINC="-I${PYTHON_INCLUDEDIR}" \ + PYTHONLIBDIR="${PYTHON_LIBPATH}" \ + PYPREFIX="${EPYTHON##*/}" \ + LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \ + pywrap + } + python_foreach_impl building + fi + + if multilib_is_native_abi && use ruby; then + building() { + einfo "Calling rubywrap for ${1}" + # Clean up .lo file to force rebuild + test -f src/selinuxswig_ruby_wrap.lo && rm src/selinuxswig_ruby_wrap.lo + emake \ + CC="$(tc-getCC)" \ + RUBY=${1} \ + RUBYINSTALL=$(${1} -e 'print RbConfig::CONFIG["vendorarchdir"]') \ + LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \ + rubywrap + } + for RUBYTARGET in ${USE_RUBY}; do + use ruby_targets_${RUBYTARGET} || continue + + building ${RUBYTARGET} + done + fi +} + +multilib_src_install() { + LIBDIR="\$(PREFIX)/$(get_libdir)" SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \ + emake DESTDIR="${D}" install + + if multilib_is_native_abi && use python; then + installation() { + LIBDIR="\$(PREFIX)/$(get_libdir)" emake DESTDIR="${D}" install-pywrap + } + python_foreach_impl installation + fi + + if multilib_is_native_abi && use ruby; then + installation() { + einfo "Calling install-rubywrap for ${1}" + # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions + rm src/selinuxswig_ruby_wrap.lo + LIBDIR="\$(PREFIX)/$(get_libdir)" emake DESTDIR="${D}" \ + RUBY=${1} \ + RUBYINSTALL="${D}/$(${1} -e 'print RbConfig::CONFIG["vendorarchdir"]')" \ + install-rubywrap + } + for RUBYTARGET in ${USE_RUBY}; do + use ruby_targets_${RUBYTARGET} || continue + + installation ${RUBYTARGET} + done + fi + + use static-libs || rm "${D}"/usr/lib*/*.a +} + +pkg_postinst() { + # Fix bug 473502 + for POLTYPE in ${POLICY_TYPES}; + do + mkdir -p /etc/selinux/${POLTYPE}/contexts/files + touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local + # Fix bug 516608 + for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do + sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}; + done + done +} |