sys-libs/libsemanage: update to eapi6 and update build patch
authorJason Zaman <perfinion@gentoo.org>
Thu, 4 Aug 2016 16:52:54 +0000 (00:52 +0800)
committerJason Zaman <perfinion@gentoo.org>
Sun, 7 Aug 2016 17:05:18 +0000 (01:05 +0800)
Package-Manager: portage-2.2.28

sys-libs/libsemanage/files/libsemanage-2.6-build-paths.patch [new file with mode: 0644]
sys-libs/libsemanage/libsemanage-9999.ebuild

diff --git a/sys-libs/libsemanage/files/libsemanage-2.6-build-paths.patch b/sys-libs/libsemanage/files/libsemanage-2.6-build-paths.patch
new file mode 100644 (file)
index 0000000..86e5c7e
--- /dev/null
@@ -0,0 +1,35 @@
+there's no point in using -I/-L flags to the system paths and this breaks
+cross-compiling.  just drop them.
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -60,7 +60,7 @@
+ SWIG_CFLAGS += -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -Wno-shadow \
+               -Wno-unused-parameter
+-override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE 
++override CFLAGS += -I../include -D_GNU_SOURCE
+ RANLIB ?= ranlib
+ SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./
+@@ -82,17 +82,17 @@
+       $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
+ $(SWIGSO): $(SWIGLOBJ)
+-      $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR)
++      $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage
+ $(SWIGRUBYSO): $(SWIGRUBYLOBJ)
+-      $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lsemanage -L$(LIBDIR)
++      $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lsemanage
+ $(LIBA): $(OBJS)
+       $(AR) rcs $@ $^
+       $(RANLIB) $@
+ $(LIBSO): $(LOBJS)
+-      $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -lsepol -laudit -lselinux -lbz2 -lustr -L$(LIBDIR) -Wl,-soname,$(LIBSO),--version-script=libsemanage.map,-z,defs
++      $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -lsepol -laudit -lselinux -lbz2 -lustr -Wl,-soname,$(LIBSO),--version-script=libsemanage.map,-z,defs
+       ln -sf $@ $(TARGET)
+ $(LIBPC): $(LIBPC).in ../VERSION
index ce10d31bd424cd1c2c734356d777a27a9ab6f8c0..aa544a3231acda0e824132b9157a51c8691be547 100644 (file)
@@ -2,10 +2,10 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI="5"
-PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
+EAPI="6"
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
 
-inherit multilib python-r1 toolchain-funcs eutils multilib-minimal
+inherit multilib python-r1 toolchain-funcs multilib-minimal
 
 MY_P="${P//_/-}"
 MY_RELEASEDATE="20160223"
@@ -16,7 +16,7 @@ SELNX_VER="${PV}"
 DESCRIPTION="SELinux kernel and policy management library"
 HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
 
-if [[ ${PV} == 9999 ]] ; then
+if [[ ${PV} == 9999 ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
        S="${WORKDIR}/${MY_P}/${PN}"
@@ -74,11 +74,11 @@ src_prepare() {
 
        if [[ ${PV} != 9999 ]] ; then
                # If wanted for live builds, please use /etc/portage/patches
-               epatch "${FILESDIR}/0001-libsemanage-do-not-copy-contexts-in-semanage_migrate.patch"
+               eapply "${FILESDIR}/0001-libsemanage-do-not-copy-contexts-in-semanage_migrate.patch"
        fi
-       epatch "${FILESDIR}"/${PN}-2.4-build-paths.patch
+       eapply "${FILESDIR}"/${PN}-2.6-build-paths.patch
 
-       epatch_user
+       eapply_user
 
        multilib_copy_sources
 }