1 |
commit: 0eb147b01782e40c55276fe284e9804c25a7981e |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 17 19:41:07 2016 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 17 20:11:03 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0eb147b0 |
7 |
|
8 |
sys-libs/libsemanage: fix bad -I/-L flag usage |
9 |
|
10 |
.../files/libsemanage-2.4-build-paths.patch | 35 ++++++++++++++++++++++ |
11 |
sys-libs/libsemanage/libsemanage-2.4-r2.ebuild | 1 + |
12 |
sys-libs/libsemanage/libsemanage-9999.ebuild | 1 + |
13 |
3 files changed, 37 insertions(+) |
14 |
|
15 |
diff --git a/sys-libs/libsemanage/files/libsemanage-2.4-build-paths.patch b/sys-libs/libsemanage/files/libsemanage-2.4-build-paths.patch |
16 |
new file mode 100644 |
17 |
index 0000000..7eeb9be |
18 |
--- /dev/null |
19 |
+++ b/sys-libs/libsemanage/files/libsemanage-2.4-build-paths.patch |
20 |
@@ -0,0 +1,35 @@ |
21 |
+there's no point in using -I/-L flags to the system paths and this breaks |
22 |
+cross-compiling. just drop them. |
23 |
+ |
24 |
+--- a/src/Makefile |
25 |
++++ b/src/Makefile |
26 |
+@@ -60,7 +60,7 @@ |
27 |
+ SWIG_CFLAGS += -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -Wno-shadow \ |
28 |
+ -Wno-unused-parameter |
29 |
+ |
30 |
+-override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE |
31 |
++override CFLAGS += -I../include -D_GNU_SOURCE |
32 |
+ RANLIB=ranlib |
33 |
+ |
34 |
+ SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./ |
35 |
+@@ -82,17 +82,17 @@ |
36 |
+ $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $< |
37 |
+ |
38 |
+ $(SWIGSO): $(SWIGLOBJ) |
39 |
+- $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR) |
40 |
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage |
41 |
+ |
42 |
+ $(SWIGRUBYSO): $(SWIGRUBYLOBJ) |
43 |
+- $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lsemanage -L$(LIBDIR) |
44 |
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lsemanage |
45 |
+ |
46 |
+ $(LIBA): $(OBJS) |
47 |
+ $(AR) rcs $@ $^ |
48 |
+ $(RANLIB) $@ |
49 |
+ |
50 |
+ $(LIBSO): $(LOBJS) |
51 |
+- $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -lsepol -laudit -lselinux -lbz2 -lustr -L$(LIBDIR) -Wl,-soname,$(LIBSO),--version-script=libsemanage.map,-z,defs |
52 |
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -lsepol -laudit -lselinux -lbz2 -lustr -Wl,-soname,$(LIBSO),--version-script=libsemanage.map,-z,defs |
53 |
+ ln -sf $@ $(TARGET) |
54 |
+ |
55 |
+ $(LIBPC): $(LIBPC).in ../VERSION |
56 |
|
57 |
diff --git a/sys-libs/libsemanage/libsemanage-2.4-r2.ebuild b/sys-libs/libsemanage/libsemanage-2.4-r2.ebuild |
58 |
index b949d14..d43e13b 100644 |
59 |
--- a/sys-libs/libsemanage/libsemanage-2.4-r2.ebuild |
60 |
+++ b/sys-libs/libsemanage/libsemanage-2.4-r2.ebuild |
61 |
@@ -70,6 +70,7 @@ src_prepare() { |
62 |
"${FILESDIR}/0003-libsemanage-Add-file_contexts-and-seusers-to-the-sto.patch" \ |
63 |
"${FILESDIR}/0004-libsemanage-save-homedir_template-in-the-policy-stor.patch" \ |
64 |
"${FILESDIR}/0005-libsemanage-store-users_extra-in-the-policy-store.patch" |
65 |
+ epatch "${FILESDIR}"/${PN}-2.4-build-paths.patch |
66 |
|
67 |
epatch_user |
68 |
|
69 |
|
70 |
diff --git a/sys-libs/libsemanage/libsemanage-9999.ebuild b/sys-libs/libsemanage/libsemanage-9999.ebuild |
71 |
index 5132051..734b838 100644 |
72 |
--- a/sys-libs/libsemanage/libsemanage-9999.ebuild |
73 |
+++ b/sys-libs/libsemanage/libsemanage-9999.ebuild |
74 |
@@ -76,6 +76,7 @@ src_prepare() { |
75 |
# If wanted for live builds, please use /etc/portage/patches |
76 |
epatch "${FILESDIR}/0001-libsemanage-do-not-copy-contexts-in-semanage_migrate.patch" |
77 |
fi |
78 |
+ epatch "${FILESDIR}"/${PN}-2.4-build-paths.patch |
79 |
|
80 |
epatch_user |