summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-02-17 14:41:07 -0500
committerMike Frysinger <vapier@gentoo.org>2016-02-17 15:11:03 -0500
commit0eb147b01782e40c55276fe284e9804c25a7981e (patch)
tree04cc5450fe70a999d302c7dbb4d4eb0378c8b91d /sys-libs
parentdev-libs/starpu: re-manifest (diff)
downloadgentoo-0eb147b01782e40c55276fe284e9804c25a7981e.tar.gz
gentoo-0eb147b01782e40c55276fe284e9804c25a7981e.tar.bz2
gentoo-0eb147b01782e40c55276fe284e9804c25a7981e.zip
sys-libs/libsemanage: fix bad -I/-L flag usage
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libsemanage/files/libsemanage-2.4-build-paths.patch35
-rw-r--r--sys-libs/libsemanage/libsemanage-2.4-r2.ebuild1
-rw-r--r--sys-libs/libsemanage/libsemanage-9999.ebuild1
3 files changed, 37 insertions, 0 deletions
diff --git a/sys-libs/libsemanage/files/libsemanage-2.4-build-paths.patch b/sys-libs/libsemanage/files/libsemanage-2.4-build-paths.patch
new file mode 100644
index 000000000000..7eeb9befb318
--- /dev/null
+++ b/sys-libs/libsemanage/files/libsemanage-2.4-build-paths.patch
@@ -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
diff --git a/sys-libs/libsemanage/libsemanage-2.4-r2.ebuild b/sys-libs/libsemanage/libsemanage-2.4-r2.ebuild
index b949d14907aa..d43e13b090e6 100644
--- a/sys-libs/libsemanage/libsemanage-2.4-r2.ebuild
+++ b/sys-libs/libsemanage/libsemanage-2.4-r2.ebuild
@@ -70,6 +70,7 @@ src_prepare() {
"${FILESDIR}/0003-libsemanage-Add-file_contexts-and-seusers-to-the-sto.patch" \
"${FILESDIR}/0004-libsemanage-save-homedir_template-in-the-policy-stor.patch" \
"${FILESDIR}/0005-libsemanage-store-users_extra-in-the-policy-store.patch"
+ epatch "${FILESDIR}"/${PN}-2.4-build-paths.patch
epatch_user
diff --git a/sys-libs/libsemanage/libsemanage-9999.ebuild b/sys-libs/libsemanage/libsemanage-9999.ebuild
index 5132051ba8c2..734b83821ca6 100644
--- a/sys-libs/libsemanage/libsemanage-9999.ebuild
+++ b/sys-libs/libsemanage/libsemanage-9999.ebuild
@@ -76,6 +76,7 @@ src_prepare() {
# If wanted for live builds, please use /etc/portage/patches
epatch "${FILESDIR}/0001-libsemanage-do-not-copy-contexts-in-semanage_migrate.patch"
fi
+ epatch "${FILESDIR}"/${PN}-2.4-build-paths.patch
epatch_user