aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Hughes <davidhughes205@gmail.com>2021-04-13 08:53:17 -0400
committerDave Hughes <davidhughes205@gmail.com>2021-04-13 08:53:43 -0400
commit719795fbd07364d9e19b6b9d53b57abc4337f528 (patch)
tree036dcfd2e36b07f137292c49f4bfe82d5a81da43 /sys-libs
parentdev-java/icedtea-bin: fix error with USE=-examples (diff)
downloadmusl-719795fbd07364d9e19b6b9d53b57abc4337f528.tar.gz
musl-719795fbd07364d9e19b6b9d53b57abc4337f528.tar.bz2
musl-719795fbd07364d9e19b6b9d53b57abc4337f528.zip
sys-libs/libselinux: remove from overlay
sys-libs/libsepol: remove from overlay Closes: #427 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Dave Hughes <davidhughes205@gmail.com>
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libselinux/Manifest2
-rw-r--r--sys-libs/libselinux/files/libselinux-2.6-0007-build-related-fixes-bug-500674.patch91
-rw-r--r--sys-libs/libselinux/files/libselinux-2.7-fts_ldlibs.patch12
-rw-r--r--sys-libs/libselinux/libselinux-2.6.ebuild157
-rw-r--r--sys-libs/libselinux/libselinux-2.7.ebuild158
-rw-r--r--sys-libs/libselinux/metadata.xml19
-rw-r--r--sys-libs/libsepol/Manifest1
-rw-r--r--sys-libs/libsepol/files/libsepol-2.6-cdefs.patch968
-rw-r--r--sys-libs/libsepol/libsepol-2.6.ebuild50
-rw-r--r--sys-libs/libsepol/metadata.xml12
10 files changed, 0 insertions, 1470 deletions
diff --git a/sys-libs/libselinux/Manifest b/sys-libs/libselinux/Manifest
deleted file mode 100644
index 7ddb1583..00000000
--- a/sys-libs/libselinux/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST libselinux-2.6.tar.gz 203119 SHA256 4ea2dde50665c202253ba5caac7738370ea0337c47b251ba981c60d24e1a118a SHA512 906e1bf98c669862ab4f4e883d511db8d739a5763dc857c9405ad3cc6c70766a482853d07134698a1a98257a8632cc756d0549a7640c2915d051714f502ff14b WHIRLPOOL bf60ce907b7057ada5d19e3a0cd1f092a7dfc2de774e504762424c325c657a4f144fbe252e7d908f7c6d902d80388517e15134a289f4358e564c8720ea6534d9
-DIST libselinux-2.7.tar.gz 187574 BLAKE2B cc6ee51d5015943dd73fe16efb2ce2478616f43eaf7da55655de50502010e69973c2de13c8a562c8814a31211a8dbd7200fa2f22761f3d0f81fa3a1d3cd1e998 SHA512 415d10306692d4323455b61fb61d7e56e53b9144276ff206d72760e1df9b04ab07c62a4d6f04bf4e5fa708f9f14b21a9801069b16ece0a0aade886950941ab8d
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
deleted file mode 100644
index 7d78f9f4..00000000
--- a/sys-libs/libselinux/files/libselinux-2.6-0007-build-related-fixes-bug-500674.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-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)
-
-diff --git a/libselinux/Makefile b/libselinux/Makefile
-index baa0db3..4dc5aa0 100644
---- libselinux/Makefile
-+++ libselinux/Makefile
-@@ -1,5 +1,6 @@
- SUBDIRS = src include utils man
-
-+PKG_CONFIG ?= pkg-config
- DISABLE_SETRANS ?= n
- DISABLE_RPM ?= n
- ANDROID_HOST ?= n
-@@ -20,10 +21,11 @@ export DISABLE_SETRANS DISABLE_RPM DISABLE_FLAGS ANDROID_HOST
-
- USE_PCRE2 ?= n
- ifeq ($(USE_PCRE2),y)
-- PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8
-- PCRE_LDFLAGS := -lpcre2-8
-+ PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 $(shell $(PKG_CONFIG) --cflags libpcre2-8)
-+ PCRE_LDFLAGS := $(shell $(PKG_CONFIG) --libs libpcre2-8)
- else
-- PCRE_LDFLAGS := -lpcre
-+ PCRE_CFLAGS := $(shell $(PKG_CONFIG) --cflags libpcre)
-+ PCRE_LDFLAGS := $(shell $(PKG_CONFIG) --libs libpcre)
- endif
- export PCRE_CFLAGS PCRE_LDFLAGS
-
-diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
-index 13501cd..42cb2f6 100644
---- libselinux/src/Makefile
-+++ libselinux/src/Makefile
-@@ -67,7 +67,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi
-
- PCRE_LDFLAGS ?= -lpcre
-
--override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
-+override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
-
- 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
-@@ -107,17 +107,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 $@ $^ $(PCRE_LDFLAGS) -ldl $(LDFLAGS) -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
-+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ $(PCRE_LDFLAGS) $(FTS_LDFLAGS) -ldl -Wl,-soname,$(LIBSO),-z,defs,-z,relro
- ln -sf $@ $(TARGET)
-
- $(LIBPC): $(LIBPC).in ../VERSION
-@@ -130,7 +130,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 $@ $<
-diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile
-index e56a953..6fd205a 100644
---- libselinux/utils/Makefile
-+++ libselinux/utils/Makefile
-@@ -25,7 +25,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 $(DISABLE_FLAGS) $(PCRE_CFLAGS)
--LDLIBS += -L../src -lselinux -L$(LIBDIR)
-+LDLIBS += -L../src -lselinux
- PCRE_LDFLAGS ?= -lpcre
-
- ifeq ($(ANDROID_HOST),y)
diff --git a/sys-libs/libselinux/files/libselinux-2.7-fts_ldlibs.patch b/sys-libs/libselinux/files/libselinux-2.7-fts_ldlibs.patch
deleted file mode 100644
index 778276a3..00000000
--- a/sys-libs/libselinux/files/libselinux-2.7-fts_ldlibs.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur libselinux-2.7-rc1.orig/src/Makefile libselinux-2.7-rc1/src/Makefile
---- libselinux-2.7-rc1.orig/src/Makefile 2017-06-13 10:16:48.664402029 -0700
-+++ libselinux-2.7-rc1/src/Makefile 2017-06-13 10:18:01.124009953 -0700
-@@ -144,7 +144,7 @@
- $(RANLIB) $@
-
- $(LIBSO): $(LOBJS)
-- $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ $(PCRE_LDLIBS) -ldl -Wl,$(LD_SONAME_FLAGS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ $(PCRE_LDLIBS) $(FTS_LDLIBS) -ldl -Wl,$(LD_SONAME_FLAGS)
- ln -sf $@ $(TARGET)
-
- $(LIBPC): $(LIBPC).in ../VERSION
diff --git a/sys-libs/libselinux/libselinux-2.6.ebuild b/sys-libs/libselinux/libselinux-2.6.ebuild
deleted file mode 100644
index 1a22ba69..00000000
--- a/sys-libs/libselinux/libselinux-2.6.ebuild
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-PYTHON_COMPAT=( python3_{7,8,9} )
-USE_RUBY="ruby23"
-
-# No, I am not calling ruby-ng
-inherit multilib python-r1 toolchain-funcs multilib-minimal
-
-MY_P="${P//_/-}"
-SEPOL_VER="${PV}"
-MY_RELEASEDATE="20161014"
-
-DESCRIPTION="SELinux userland library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${MY_P}/${PN}"
-else
- SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
- KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="pcre2 python ruby static-libs ruby_targets_ruby23"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}:=[${MULTILIB_USEDEP}]
- !pcre2? ( >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}] )
- pcre2? ( dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] )
- python? ( ${PYTHON_DEPS} )
- ruby? (
- ruby_targets_ruby23? ( dev-lang/ruby:2.3 )
- )
- elibc_musl? ( sys-libs/fts-standalone )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- python? ( >=dev-lang/swig-2.0.9 )"
-
-src_prepare() {
- if [[ ${PV} != 9999 ]] ; then
- # If needed for live builds, place them in /etc/portage/patches
- eapply "${FILESDIR}/libselinux-2.6-0007-build-related-fixes-bug-500674.patch"
- fi
-
- eapply_user
-
- multilib_copy_sources
-}
-
-multilib_src_compile() {
- tc-export AR CC PKG_CONFIG RANLIB
-
- emake \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
- LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
- USE_PCRE2="$(usex pcre2 y n)" \
- FTS_LDFLAGS="$(usex elibc_musl '-lfts' '')" \
- all
-
- if multilib_is_native_abi && use python; then
- building() {
- python_export PYTHON_INCLUDEDIR PYTHON_LIBPATH
- emake \
- PYINC="-I${PYTHON_INCLUDEDIR}" \
- LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
- FTS_LDFLAGS="$(usex elibc_musl '-lfts' '')" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
- 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
- rm -f src/selinuxswig_ruby_wrap.lo || die
- emake \
- RUBY=${1} \
- LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
- FTS_LDFLAGS="$(usex elibc_musl '-lfts' '')" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
- rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- building ${RUBYTARGET}
- done
- fi
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
- install
-
- if multilib_is_native_abi && use python; then
- installation() {
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
- install-pywrap
- python_optimize # bug 531638
- }
- 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
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- RUBY=${1} \
- USE_PCRE2="$(usex pcre2 y n)" \
- 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 || die
-}
-
-pkg_postinst() {
- # Fix bug 473502
- for POLTYPE in ${POLICY_TYPES};
- do
- mkdir -p /etc/selinux/${POLTYPE}/contexts/files || die
- touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local || die
- # Fix bug 516608
- for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
- if [[ -f "/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
- sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} \
- || die "Failed to recompile contexts"
- fi
- done
- done
-}
diff --git a/sys-libs/libselinux/libselinux-2.7.ebuild b/sys-libs/libselinux/libselinux-2.7.ebuild
deleted file mode 100644
index 3a7dc583..00000000
--- a/sys-libs/libselinux/libselinux-2.7.ebuild
+++ /dev/null
@@ -1,158 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-PYTHON_COMPAT=( python3_{7,8,9} )
-USE_RUBY="ruby23"
-
-# No, I am not calling ruby-ng
-inherit multilib python-r1 toolchain-funcs multilib-minimal
-
-MY_P="${P//_/-}"
-SEPOL_VER="${PV}"
-MY_RELEASEDATE="20170804"
-
-DESCRIPTION="SELinux userland library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${MY_P}/${PN}"
-else
- SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
- KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="pcre2 python ruby static-libs ruby_targets_ruby23"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}:=[${MULTILIB_USEDEP}]
- !pcre2? ( >=dev-libs/libpcre-8.33-r1:=[static-libs?,${MULTILIB_USEDEP}] )
- pcre2? ( dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] )
- python? ( ${PYTHON_DEPS} )
- ruby? (
- ruby_targets_ruby23? ( dev-lang/ruby:2.3 )
- )
- elibc_musl? ( sys-libs/fts-standalone )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- python? ( >=dev-lang/swig-2.0.9 )"
-
-src_prepare() {
- if [[ ${PV} != 9999 ]] ; then
- # If needed for live builds, place them in /etc/portage/patches
- eapply "${FILESDIR}/libselinux-2.7-fts_ldlibs.patch"
- fi
-
- eapply_user
-
- multilib_copy_sources
-}
-
-multilib_src_compile() {
- tc-export AR CC PKG_CONFIG RANLIB
-
- emake \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
- LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
- USE_PCRE2="$(usex pcre2 y n)" \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- all
-
- if multilib_is_native_abi && use python; then
- building() {
- emake \
- LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
- 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
- rm -f src/selinuxswig_ruby_wrap.lo || die
- emake \
- RUBY=${1} \
- LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
- FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
- USE_PCRE2="$(usex pcre2 y n)" \
- rubywrap
- }
- for RUBYTARGET in ${USE_RUBY}; do
- use ruby_targets_${RUBYTARGET} || continue
-
- building ${RUBYTARGET}
- done
- fi
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
- LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
- USE_PCRE2="$(usex pcre2 y n)" \
- install
-
- if multilib_is_native_abi && use python; then
- installation() {
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
- USE_PCRE2="$(usex pcre2 y n)" \
- install-pywrap
- python_optimize # bug 531638
- }
- 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
- emake DESTDIR="${D}" \
- LIBDIR="\$(PREFIX)/$(get_libdir)" \
- LIBSEPOLA="/usr/$(get_libdir)/libsepol.a" \
- RUBY=${1} \
- USE_PCRE2="$(usex pcre2 y n)" \
- 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 || die
-}
-
-pkg_postinst() {
- # Fix bug 473502
- for POLTYPE in ${POLICY_TYPES};
- do
- mkdir -p /etc/selinux/${POLTYPE}/contexts/files || die
- touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local || die
- # Fix bug 516608
- for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
- if [[ -f "/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then
- sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} \
- || die "Failed to recompile contexts"
- fi
- done
- done
-}
diff --git a/sys-libs/libselinux/metadata.xml b/sys-libs/libselinux/metadata.xml
deleted file mode 100644
index 537e0aa9..00000000
--- a/sys-libs/libselinux/metadata.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>selinux@gentoo.org</email>
- <name>SELinux Team</name>
- </maintainer>
- <longdescription>
- Libselinux provides an API for SELinux applications to get and set
- process and file security contexts and to obtain security policy
- decisions. Required for any applications that use the SELinux API.
- </longdescription>
- <use>
- <flag name="pcre2">Use <pkg>dev-libs/libpcre2</pkg> for fcontext regexes</flag>
- </use>
- <upstream>
- <remote-id type="github">SELinuxProject/selinux</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/sys-libs/libsepol/Manifest b/sys-libs/libsepol/Manifest
deleted file mode 100644
index 052ac19c..00000000
--- a/sys-libs/libsepol/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libsepol-2.6.tar.gz 442549 SHA256 d856d6506054f52abeaa3543ea2f2344595a3dc05d0d873ed7f724f7a16b1874 SHA512 17d007857634e3d581fcc9bafcbb75674a06e382bb258c2c6b3656c141d71493699c42b78c8e1917c628476aeb8ead73bb86e8ccf43d7ce59aa0b7884bea132a WHIRLPOOL c02b9dc9dcf13ce3f200293695565dec4a220f7a6b29c76121ba5a4f8c05fb347a034763f417927ed7b1952a4989a7738c9327dc47cd976410db695fd6e662ae
diff --git a/sys-libs/libsepol/files/libsepol-2.6-cdefs.patch b/sys-libs/libsepol/files/libsepol-2.6-cdefs.patch
deleted file mode 100644
index 2a8fd3f6..00000000
--- a/sys-libs/libsepol/files/libsepol-2.6-cdefs.patch
+++ /dev/null
@@ -1,968 +0,0 @@
-diff -Naur libsepol-2.6.orig/include/sepol/boolean_record.h libsepol-2.6/include/sepol/boolean_record.h
---- libsepol-2.6.orig/include/sepol/boolean_record.h 2016-12-22 15:42:47.275594342 -0800
-+++ libsepol-2.6/include/sepol/boolean_record.h 2016-12-22 15:43:40.570149391 -0800
-@@ -3,9 +3,10 @@
-
- #include <stddef.h>
- #include <sepol/handle.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- struct sepol_bool;
- struct sepol_bool_key;
-@@ -51,5 +52,7 @@
-
- extern void sepol_bool_free(sepol_bool_t * boolean);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/booleans.h libsepol-2.6/include/sepol/booleans.h
---- libsepol-2.6.orig/include/sepol/booleans.h 2016-12-22 15:42:47.275594342 -0800
-+++ libsepol-2.6/include/sepol/booleans.h 2016-12-22 15:44:28.793651565 -0800
-@@ -5,9 +5,10 @@
- #include <sepol/policydb.h>
- #include <sepol/boolean_record.h>
- #include <sepol/handle.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /*--------------compatibility--------------*/
-
-@@ -59,5 +60,7 @@
- int (*fn) (const sepol_bool_t * boolean,
- void *fn_arg), void *arg);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/context.h libsepol-2.6/include/sepol/context.h
---- libsepol-2.6.orig/include/sepol/context.h 2016-12-22 15:42:47.275594342 -0800
-+++ libsepol-2.6/include/sepol/context.h 2016-12-22 15:44:51.699890093 -0800
-@@ -4,9 +4,10 @@
- #include <sepol/context_record.h>
- #include <sepol/policydb.h>
- #include <sepol/handle.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* -- Deprecated -- */
-
-@@ -26,5 +27,7 @@
- extern int sepol_mls_check(sepol_handle_t * handle,
- const sepol_policydb_t * policydb, const char *mls);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/context_record.h libsepol-2.6/include/sepol/context_record.h
---- libsepol-2.6.orig/include/sepol/context_record.h 2016-12-22 15:42:47.275594342 -0800
-+++ libsepol-2.6/include/sepol/context_record.h 2016-12-22 15:45:07.533054968 -0800
-@@ -2,9 +2,10 @@
- #define _SEPOL_CONTEXT_RECORD_H_
-
- #include <sepol/handle.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- struct sepol_context;
- typedef struct sepol_context sepol_context_t;
-@@ -53,5 +54,7 @@
- extern int sepol_context_to_string(sepol_handle_t * handle,
- const sepol_context_t * con, char **str_ptr);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/debug.h libsepol-2.6/include/sepol/debug.h
---- libsepol-2.6.orig/include/sepol/debug.h 2016-12-22 15:42:47.275594342 -0800
-+++ libsepol-2.6/include/sepol/debug.h 2016-12-22 15:45:29.799286831 -0800
-@@ -2,9 +2,10 @@
- #define _SEPOL_DEBUG_H_
-
- #include <sepol/handle.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* Deprecated */
- extern void sepol_debug(int on);
-@@ -35,5 +36,7 @@
- const char *fmt, ...),
- void *msg_callback_arg);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/errcodes.h libsepol-2.6/include/sepol/errcodes.h
---- libsepol-2.6.orig/include/sepol/errcodes.h 2016-12-22 15:42:47.275594342 -0800
-+++ libsepol-2.6/include/sepol/errcodes.h 2016-12-22 15:45:52.376521934 -0800
-@@ -4,9 +4,10 @@
- #define __sepol_errno_h__
-
- #include <errno.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- #define SEPOL_OK 0
-
-@@ -25,5 +26,7 @@
- #define SEPOL_EEXIST -EEXIST
- #define SEPOL_ENOENT -ENOENT
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/handle.h libsepol-2.6/include/sepol/handle.h
---- libsepol-2.6.orig/include/sepol/handle.h 2016-12-22 15:42:47.275594342 -0800
-+++ libsepol-2.6/include/sepol/handle.h 2016-12-22 15:46:15.192759503 -0800
-@@ -1,9 +1,9 @@
- #ifndef _SEPOL_HANDLE_H_
- #define _SEPOL_HANDLE_H_
-
--#include <sys/cdefs.h>
--
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- struct sepol_handle;
- typedef struct sepol_handle sepol_handle_t;
-@@ -35,5 +35,7 @@
- * 0 is default and discard such branch, 1 preserves them */
- void sepol_set_preserve_tunables(sepol_handle_t * sh, int preserve_tunables);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/iface_record.h libsepol-2.6/include/sepol/iface_record.h
---- libsepol-2.6.orig/include/sepol/iface_record.h 2016-12-22 15:42:47.276594352 -0800
-+++ libsepol-2.6/include/sepol/iface_record.h 2016-12-22 15:46:43.288052034 -0800
-@@ -3,9 +3,10 @@
-
- #include <sepol/handle.h>
- #include <sepol/context_record.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- struct sepol_iface;
- struct sepol_iface_key;
-@@ -59,5 +60,7 @@
-
- extern void sepol_iface_free(sepol_iface_t * iface);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/interfaces.h libsepol-2.6/include/sepol/interfaces.h
---- libsepol-2.6.orig/include/sepol/interfaces.h 2016-12-22 15:42:47.276594352 -0800
-+++ libsepol-2.6/include/sepol/interfaces.h 2016-12-22 15:47:00.812234498 -0800
-@@ -4,9 +4,10 @@
- #include <sepol/policydb.h>
- #include <sepol/iface_record.h>
- #include <sepol/handle.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* Return the number of interfaces */
- extern int sepol_iface_count(sepol_handle_t * handle,
-@@ -43,5 +44,7 @@
- int (*fn) (const sepol_iface_t * iface,
- void *fn_arg), void *arg);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/module.h libsepol-2.6/include/sepol/module.h
---- libsepol-2.6.orig/include/sepol/module.h 2016-12-22 15:42:47.276594352 -0800
-+++ libsepol-2.6/include/sepol/module.h 2016-12-22 15:47:25.762494283 -0800
-@@ -7,9 +7,10 @@
-
- #include <sepol/handle.h>
- #include <sepol/policydb.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- struct sepol_module_package;
- typedef struct sepol_module_package sepol_module_package_t;
-@@ -82,5 +83,7 @@
- sepol_policydb_t * base,
- sepol_policydb_t * out, int verbose, int check);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/node_record.h libsepol-2.6/include/sepol/node_record.h
---- libsepol-2.6.orig/include/sepol/node_record.h 2016-12-22 15:42:47.276594352 -0800
-+++ libsepol-2.6/include/sepol/node_record.h 2016-12-22 15:47:41.288655943 -0800
-@@ -4,9 +4,10 @@
- #include <stddef.h>
- #include <sepol/context_record.h>
- #include <sepol/handle.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- struct sepol_node;
- struct sepol_node_key;
-@@ -92,5 +93,7 @@
-
- extern void sepol_node_free(sepol_node_t * node);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/nodes.h libsepol-2.6/include/sepol/nodes.h
---- libsepol-2.6.orig/include/sepol/nodes.h 2016-12-22 15:42:47.276594352 -0800
-+++ libsepol-2.6/include/sepol/nodes.h 2016-12-22 15:47:56.449813803 -0800
-@@ -4,9 +4,10 @@
- #include <sepol/handle.h>
- #include <sepol/policydb.h>
- #include <sepol/node_record.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* Return the number of nodes */
- extern int sepol_node_count(sepol_handle_t * handle,
-@@ -40,5 +41,7 @@
- int (*fn) (const sepol_node_t * node,
- void *fn_arg), void *arg);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/avrule_block.h libsepol-2.6/include/sepol/policydb/avrule_block.h
---- libsepol-2.6.orig/include/sepol/policydb/avrule_block.h 2016-12-22 15:42:47.277594362 -0800
-+++ libsepol-2.6/include/sepol/policydb/avrule_block.h 2016-12-22 15:50:47.505601422 -0800
-@@ -21,9 +21,10 @@
- #define _SEPOL_AVRULE_BLOCK_H_
-
- #include <sepol/policydb/policydb.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- extern avrule_block_t *avrule_block_create(void);
- extern void avrule_block_destroy(avrule_block_t * x);
-@@ -37,5 +38,7 @@
- extern int is_id_enabled(char *id, policydb_t * p, int symbol_table);
- extern int is_perm_enabled(char *class_id, char *perm_id, policydb_t * p);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/avtab.h libsepol-2.6/include/sepol/policydb/avtab.h
---- libsepol-2.6.orig/include/sepol/policydb/avtab.h 2016-12-22 15:42:47.277594362 -0800
-+++ libsepol-2.6/include/sepol/policydb/avtab.h 2016-12-22 15:51:08.757817880 -0800
-@@ -40,11 +40,12 @@
- #ifndef _SEPOL_POLICYDB_AVTAB_H_
- #define _SEPOL_POLICYDB_AVTAB_H_
-
--#include <sys/cdefs.h>
- #include <sys/types.h>
- #include <stdint.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- typedef struct avtab_key {
- uint16_t source_type;
-@@ -142,7 +143,9 @@
- /* avtab_alloc uses one bucket per 2-4 elements, so adjust to get maximum buckets */
- #define MAX_AVTAB_SIZE (MAX_AVTAB_HASH_BUCKETS << 1)
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* _AVTAB_H_ */
-
- /* FLASK */
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/conditional.h libsepol-2.6/include/sepol/policydb/conditional.h
---- libsepol-2.6.orig/include/sepol/policydb/conditional.h 2016-12-22 15:42:47.277594362 -0800
-+++ libsepol-2.6/include/sepol/policydb/conditional.h 2016-12-22 15:51:27.680010607 -0800
-@@ -25,9 +25,10 @@
- #include <sepol/policydb/avtab.h>
- #include <sepol/policydb/symtab.h>
- #include <sepol/policydb/policydb.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- #define COND_EXPR_MAXDEPTH 10
-
-@@ -136,5 +137,7 @@
- extern void cond_compute_av(avtab_t * ctab, avtab_key_t * key,
- struct sepol_av_decision *avd);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* _CONDITIONAL_H_ */
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/constraint.h libsepol-2.6/include/sepol/policydb/constraint.h
---- libsepol-2.6.orig/include/sepol/policydb/constraint.h 2016-12-22 15:42:47.277594362 -0800
-+++ libsepol-2.6/include/sepol/policydb/constraint.h 2016-12-22 15:52:06.286403822 -0800
-@@ -22,7 +22,9 @@
- #include <sepol/policydb/ebitmap.h>
- #include <sepol/policydb/flask_types.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- #define CEXPR_MAXDEPTH 5
-
-@@ -73,7 +75,9 @@
- extern int constraint_expr_init(constraint_expr_t * expr);
- extern void constraint_expr_destroy(constraint_expr_t * expr);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* _CONSTRAINT_H_ */
-
- /* FLASK */
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/context.h libsepol-2.6/include/sepol/policydb/context.h
---- libsepol-2.6.orig/include/sepol/policydb/context.h 2016-12-22 15:42:47.277594362 -0800
-+++ libsepol-2.6/include/sepol/policydb/context.h 2016-12-22 15:52:25.606600689 -0800
-@@ -22,7 +22,9 @@
- #include <sepol/policydb/ebitmap.h>
- #include <sepol/policydb/mls_types.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /*
- * A security context consists of an authenticated user
-@@ -95,5 +97,7 @@
- (c1->type == c2->type) && mls_context_cmp(c1, c2));
- }
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/ebitmap.h libsepol-2.6/include/sepol/policydb/ebitmap.h
---- libsepol-2.6.orig/include/sepol/policydb/ebitmap.h 2016-12-22 15:42:47.277594362 -0800
-+++ libsepol-2.6/include/sepol/policydb/ebitmap.h 2016-12-22 15:52:47.603825474 -0800
-@@ -19,9 +19,10 @@
-
- #include <stdint.h>
- #include <string.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- #define MAPTYPE uint64_t /* portion of bitmap in each node */
- #define MAPSIZE (sizeof(MAPTYPE) * 8) /* number of bits in node bitmap */
-@@ -92,7 +93,9 @@
- extern void ebitmap_destroy(ebitmap_t * e);
- extern int ebitmap_read(ebitmap_t * e, void *fp);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* _EBITMAP_H_ */
-
- /* FLASK */
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/expand.h libsepol-2.6/include/sepol/policydb/expand.h
---- libsepol-2.6.orig/include/sepol/policydb/expand.h 2016-12-22 15:42:47.277594362 -0800
-+++ libsepol-2.6/include/sepol/policydb/expand.h 2016-12-22 15:53:06.593019519 -0800
-@@ -28,9 +28,10 @@
- #include <stddef.h>
- #include <sepol/handle.h>
- #include <sepol/policydb/conditional.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /*
- * Expand only the avrules for a module. It is valid for this function
-@@ -79,5 +80,7 @@
- extern int expand_cond_av_list(policydb_t * p, cond_av_list_t * l,
- cond_av_list_t ** newl, avtab_t * expa);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/flask_types.h libsepol-2.6/include/sepol/policydb/flask_types.h
---- libsepol-2.6.orig/include/sepol/policydb/flask_types.h 2016-12-22 15:42:47.278594373 -0800
-+++ libsepol-2.6/include/sepol/policydb/flask_types.h 2016-12-22 15:53:42.755389053 -0800
-@@ -13,9 +13,10 @@
-
- #include <sys/types.h>
- #include <stdint.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /*
- * A security context is a set of security attributes
-@@ -61,5 +62,7 @@
- uint32_t seqno;
- };
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/hashtab.h libsepol-2.6/include/sepol/policydb/hashtab.h
---- libsepol-2.6.orig/include/sepol/policydb/hashtab.h 2016-12-22 15:42:47.278594373 -0800
-+++ libsepol-2.6/include/sepol/policydb/hashtab.h 2016-12-22 15:54:02.697592837 -0800
-@@ -17,9 +17,10 @@
-
- #include <stdint.h>
- #include <stdio.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- typedef char *hashtab_key_t; /* generic key type */
- typedef void *hashtab_datum_t; /* generic datum type */
-@@ -136,5 +137,7 @@
-
- extern void hashtab_hash_eval(hashtab_t h, char *tag);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/hierarchy.h libsepol-2.6/include/sepol/policydb/hierarchy.h
---- libsepol-2.6.orig/include/sepol/policydb/hierarchy.h 2016-12-22 15:42:47.278594373 -0800
-+++ libsepol-2.6/include/sepol/policydb/hierarchy.h 2016-12-22 15:54:16.684735768 -0800
-@@ -27,9 +27,10 @@
-
- #include <sepol/policydb/avtab.h>
- #include <sepol/policydb/policydb.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- extern int hierarchy_add_bounds(sepol_handle_t *handle, policydb_t *p);
-
-@@ -43,5 +44,7 @@
-
- extern int hierarchy_check_constraints(sepol_handle_t * handle, policydb_t * p);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/link.h libsepol-2.6/include/sepol/policydb/link.h
---- libsepol-2.6.orig/include/sepol/policydb/link.h 2016-12-22 15:42:47.278594373 -0800
-+++ libsepol-2.6/include/sepol/policydb/link.h 2016-12-22 15:57:01.439411892 -0800
-@@ -10,15 +10,18 @@
- #include <sepol/errcodes.h>
- #include <sepol/policydb/policydb.h>
-
-
- #include <stddef.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- extern int link_modules(sepol_handle_t * handle,
- policydb_t * b, policydb_t ** mods, int len,
- int verbose);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/mls_types.h libsepol-2.6/include/sepol/policydb/mls_types.h
---- libsepol-2.6.orig/include/sepol/policydb/mls_types.h 2016-12-22 15:42:47.278594373 -0800
-+++ libsepol-2.6/include/sepol/policydb/mls_types.h 2016-12-22 15:54:50.045075508 -0800
-@@ -34,9 +34,10 @@
- #include <stdlib.h>
- #include <sepol/policydb/ebitmap.h>
- #include <sepol/policydb/flask_types.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- typedef struct mls_level {
- uint32_t sens; /* sensitivity */
-@@ -152,5 +153,7 @@
- extern void mls_semantic_range_destroy(mls_semantic_range_t *r);
- extern int mls_semantic_range_cpy(mls_semantic_range_t *dst, mls_semantic_range_t *src);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/module.h libsepol-2.6/include/sepol/policydb/module.h
---- libsepol-2.6.orig/include/sepol/policydb/module.h 2016-12-22 15:42:47.278594373 -0800
-+++ libsepol-2.6/include/sepol/policydb/module.h 2016-12-22 15:55:07.327250943 -0800
-@@ -27,11 +27,12 @@
-
- #include <sepol/policydb/policydb.h>
- #include <sepol/policydb/conditional.h>
--#include <sys/cdefs.h>
-
- #define SEPOL_MODULE_PACKAGE_MAGIC 0xf97cff8f
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- struct sepol_module_package {
- sepol_policydb_t *policy;
-@@ -48,5 +49,7 @@
-
- extern int sepol_module_package_init(sepol_module_package_t * p);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/polcaps.h libsepol-2.6/include/sepol/policydb/polcaps.h
---- libsepol-2.6.orig/include/sepol/policydb/polcaps.h 2016-12-22 15:42:47.279594383 -0800
-+++ libsepol-2.6/include/sepol/policydb/polcaps.h 2016-12-22 15:55:26.373444286 -0800
-@@ -1,9 +1,9 @@
- #ifndef _SEPOL_POLICYDB_POLCAPS_H_
- #define _SEPOL_POLICYDB_POLCAPS_H_
-
--#include <sys/cdefs.h>
--
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* Policy capabilities */
- enum {
-@@ -21,5 +21,7 @@
- /* Convert a capability number to name. */
- extern const char *sepol_polcap_getname(int capnum);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* _SEPOL_POLICYDB_POLCAPS_H_ */
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/policydb.h libsepol-2.6/include/sepol/policydb/policydb.h
---- libsepol-2.6.orig/include/sepol/policydb/policydb.h 2016-12-22 15:42:47.279594383 -0800
-+++ libsepol-2.6/include/sepol/policydb/policydb.h 2016-12-22 15:55:56.343748521 -0800
-@@ -61,7 +61,6 @@
- #include <sepol/policydb/context.h>
- #include <sepol/policydb/constraint.h>
- #include <sepol/policydb/sidtab.h>
--#include <sys/cdefs.h>
-
- #define ERRMSG_LEN 1024
-
-@@ -69,7 +68,9 @@
- #define POLICYDB_ERROR -1
- #define POLICYDB_UNSUPPORTED -2
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /*
- * A datum type is defined for each kind of symbol
-@@ -776,7 +777,9 @@
- #define POLICYDB_MOD_MAGIC SELINUX_MOD_MAGIC
- #define POLICYDB_MOD_STRING "SE Linux Module"
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* _POLICYDB_H_ */
-
- /* FLASK */
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/services.h libsepol-2.6/include/sepol/policydb/services.h
---- libsepol-2.6.orig/include/sepol/policydb/services.h 2016-12-22 15:42:47.279594383 -0800
-+++ libsepol-2.6/include/sepol/policydb/services.h 2016-12-22 15:56:12.606913612 -0800
-@@ -15,9 +15,10 @@
- #include <sepol/policydb/flask_types.h>
- #include <sepol/policydb/policydb.h>
- #include <stddef.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* Set the policydb and sidtab structures to be used by
- the service functions. If not set, then these default
-@@ -230,5 +231,7 @@
- sepol_security_class_t sclass, /* IN */
- sepol_security_id_t * sid); /* OUT */
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/sidtab.h libsepol-2.6/include/sepol/policydb/sidtab.h
---- libsepol-2.6.orig/include/sepol/policydb/sidtab.h 2016-12-22 15:42:47.279594383 -0800
-+++ libsepol-2.6/include/sepol/policydb/sidtab.h 2016-12-22 15:56:29.257082631 -0800
-@@ -11,9 +11,10 @@
- #define _SEPOL_POLICYDB_SIDTAB_H_
-
- #include <sepol/policydb/context.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- typedef struct sidtab_node {
- sepol_security_id_t sid; /* security identifier */
-@@ -69,7 +70,9 @@
-
- extern void sepol_sidtab_shutdown(sidtab_t * s);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* _SIDTAB_H_ */
-
- /* FLASK */
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/symtab.h libsepol-2.6/include/sepol/policydb/symtab.h
---- libsepol-2.6.orig/include/sepol/policydb/symtab.h 2016-12-22 15:42:47.279594383 -0800
-+++ libsepol-2.6/include/sepol/policydb/symtab.h 2016-12-22 15:56:56.582361953 -0800
-@@ -14,9 +14,10 @@
- #define _SEPOL_POLICYDB_SYMTAB_H_
-
- #include <sepol/policydb/hashtab.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* The symtab_datum struct stores the common information for
- * all symtab datums. It should the first element in every
-@@ -37,7 +38,9 @@
- extern int symtab_init(symtab_t *, unsigned int size);
- extern void symtab_destroy(symtab_t *);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* _SYMTAB_H_ */
-
- /* FLASK */
-diff -Naur libsepol-2.6.orig/include/sepol/policydb/util.h libsepol-2.6/include/sepol/policydb/util.h
---- libsepol-2.6.orig/include/sepol/policydb/util.h 2016-12-22 15:42:47.280594393 -0800
-+++ libsepol-2.6/include/sepol/policydb/util.h 2016-12-22 15:57:19.902601728 -0800
-@@ -23,9 +23,9 @@
- #ifndef __SEPOL_UTIL_H__
- #define __SEPOL_UTIL_H__
-
--#include <sys/cdefs.h>
--
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- extern int add_i_to_a(uint32_t i, uint32_t * cnt, uint32_t ** a);
-
-@@ -40,5 +40,7 @@
- */
- extern int tokenize(char *line_buf, char delim, int num_args, ...);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/policydb.h libsepol-2.6/include/sepol/policydb.h
---- libsepol-2.6.orig/include/sepol/policydb.h 2016-12-22 15:42:47.276594352 -0800
-+++ libsepol-2.6/include/sepol/policydb.h 2016-12-22 15:48:17.853037926 -0800
-@@ -5,9 +5,10 @@
- #include <stdio.h>
-
- #include <sepol/handle.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- struct sepol_policy_file;
- typedef struct sepol_policy_file sepol_policy_file_t;
-@@ -144,5 +145,7 @@
- */
- extern int sepol_policydb_compat_net(const sepol_policydb_t * p);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/port_record.h libsepol-2.6/include/sepol/port_record.h
---- libsepol-2.6.orig/include/sepol/port_record.h 2016-12-22 15:42:47.280594393 -0800
-+++ libsepol-2.6/include/sepol/port_record.h 2016-12-22 15:48:38.945259850 -0800
-@@ -3,9 +3,10 @@
-
- #include <sepol/context_record.h>
- #include <sepol/handle.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- struct sepol_port;
- struct sepol_port_key;
-@@ -67,5 +68,7 @@
-
- extern void sepol_port_free(sepol_port_t * port);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/ports.h libsepol-2.6/include/sepol/ports.h
---- libsepol-2.6.orig/include/sepol/ports.h 2016-12-22 15:42:47.280594393 -0800
-+++ libsepol-2.6/include/sepol/ports.h 2016-12-22 15:48:57.565455765 -0800
-@@ -4,9 +4,10 @@
- #include <sepol/handle.h>
- #include <sepol/policydb.h>
- #include <sepol/port_record.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* Return the number of ports */
- extern int sepol_port_count(sepol_handle_t * handle,
-@@ -40,5 +41,7 @@
- int (*fn) (const sepol_port_t * port,
- void *fn_arg), void *arg);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/roles.h libsepol-2.6/include/sepol/roles.h
---- libsepol-2.6.orig/include/sepol/roles.h 2016-12-22 15:42:47.280594393 -0800
-+++ libsepol-2.6/include/sepol/roles.h 2016-12-22 15:49:15.901648692 -0800
-@@ -1,9 +1,9 @@
- #ifndef _SEPOL_ROLES_H_
- #define _SEPOL_ROLES_H_
-
--#include <sys/cdefs.h>
--
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- extern int sepol_role_exists(const sepol_policydb_t * policydb,
- const char *role, int *response);
-@@ -11,5 +11,7 @@
- extern int sepol_role_list(const sepol_policydb_t * policydb,
- char ***roles, unsigned int *nroles);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/sepol.h libsepol-2.6/include/sepol/sepol.h
---- libsepol-2.6.orig/include/sepol/sepol.h 2016-12-22 15:42:47.280594393 -0800
-+++ libsepol-2.6/include/sepol/sepol.h 2016-12-22 15:49:39.133893132 -0800
-@@ -3,9 +3,10 @@
-
- #include <stddef.h>
- #include <stdio.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- #include <sepol/user_record.h>
- #include <sepol/context_record.h>
-@@ -28,5 +29,7 @@
- /* Set internal policydb from a file for subsequent service calls. */
- extern int sepol_set_policydb_from_file(FILE * fp);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/user_record.h libsepol-2.6/include/sepol/user_record.h
---- libsepol-2.6.orig/include/sepol/user_record.h 2016-12-22 15:42:47.280594393 -0800
-+++ libsepol-2.6/include/sepol/user_record.h 2016-12-22 15:49:58.831100379 -0800
-@@ -3,9 +3,10 @@
-
- #include <stddef.h>
- #include <sepol/handle.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- struct sepol_user;
- struct sepol_user_key;
-@@ -76,5 +77,7 @@
-
- extern void sepol_user_free(sepol_user_t * user);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
-diff -Naur libsepol-2.6.orig/include/sepol/users.h libsepol-2.6/include/sepol/users.h
---- libsepol-2.6.orig/include/sepol/users.h 2016-12-22 15:42:47.280594393 -0800
-+++ libsepol-2.6/include/sepol/users.h 2016-12-22 15:50:16.287283457 -0800
-@@ -5,9 +5,10 @@
- #include <sepol/user_record.h>
- #include <sepol/handle.h>
- #include <stddef.h>
--#include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /*---------compatibility------------*/
-
-@@ -57,5 +58,7 @@
- int (*fn) (const sepol_user_t * user,
- void *fn_arg), void *arg);
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- #endif
diff --git a/sys-libs/libsepol/libsepol-2.6.ebuild b/sys-libs/libsepol/libsepol-2.6.ebuild
deleted file mode 100644
index ce91057b..00000000
--- a/sys-libs/libsepol/libsepol-2.6.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit multilib toolchain-funcs multilib-minimal
-
-MY_P="${P//_/-}"
-MY_RELEASEDATE="20161014"
-
-DESCRIPTION="SELinux binary policy representation library"
-HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
- S="${WORKDIR}/${MY_P}/${PN}"
-else
- SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
- KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
- S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE=""
-
-DEPEND=""
-RDEPEND=""
-
-PATCHES=( "${FILESDIR}"/${P}-cdefs.patch )
-
-# tests are not meant to be run outside of the full SELinux userland repo
-RESTRICT="test"
-
-src_prepare() {
- default
- multilib_copy_sources
-}
-
-multilib_src_compile() {
- tc-export RANLIB;
- LIBDIR="\$(PREFIX)/$(get_libdir)" SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
- emake AR="$(tc-getAR)" CC="$(tc-getCC)"
-}
-
-multilib_src_install() {
- LIBDIR="\$(PREFIX)/$(get_libdir)" SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
- emake DESTDIR="${D}" install
-}
diff --git a/sys-libs/libsepol/metadata.xml b/sys-libs/libsepol/metadata.xml
deleted file mode 100644
index ef117d5e..00000000
--- a/sys-libs/libsepol/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>selinux@gentoo.org</email>
- <name>SELinux Team</name>
- </maintainer>
- <longdescription>SELinux library for manipulating binary security policies</longdescription>
- <upstream>
- <remote-id type="github">SELinuxProject/selinux</remote-id>
- </upstream>
-</pkgmetadata>