summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/selinux/android-tools/android-tools/libziparchive_mk_change_out_dir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/selinux/android-tools/android-tools/libziparchive_mk_change_out_dir.patch')
-rw-r--r--dynamic-layers/selinux/android-tools/android-tools/libziparchive_mk_change_out_dir.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/dynamic-layers/selinux/android-tools/android-tools/libziparchive_mk_change_out_dir.patch b/dynamic-layers/selinux/android-tools/android-tools/libziparchive_mk_change_out_dir.patch
new file mode 100644
index 0000000..cc9997d
--- /dev/null
+++ b/dynamic-layers/selinux/android-tools/android-tools/libziparchive_mk_change_out_dir.patch
@@ -0,0 +1,47 @@
1patching libziparchive.mk to build in yocto environment.
2
3Changes include:
4Introduced an output folder which will keep all the outputs from the
5android-tools.
6
7Adding an include file that is setting the common flags.
8Changed the cppflag to include the headers from other components
9of android-tools
10
11Modified LDflags so that the libraries that are coming from other android-tools
12are searched in the output folder.
13
14Modified the build rule so that it outputs the binary to the OUT_DIR
15
16Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
17
18Upstream-Status: Pending
19
20--- git/system/core/debian/libziparchive.mk 2021-05-17 08:13:41.684459540 +0000
21+++ git/system/core/debian/libziparchive.mk 2021-05-17 08:16:19.293722572 +0000
22@@ -1,3 +1,4 @@
23+include ../../rules_yocto.mk
24 NAME = libziparchive
25 SOURCES = zip_archive.cc \
26 zip_archive_stream_entry.cc\
27@@ -5,14 +6,15 @@
28 SOURCES := $(foreach source, $(SOURCES), libziparchive/$(source))
29 CXXFLAGS += -std=gnu++17
30 CPPFLAGS += -DZLIB_CONST -D_FILE_OFFSET_BITS=64 \
31- -Iinclude -Ibase/include -Ilibziparchive/include
32+ -Iinclude -Ibase/include -Ilibziparchive/include -I$(OUT_DIR)/usr/include/
33 LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 \
34 -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
35- -lz -L. -llog -lbase
36+ -lz -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android -llog -lbase
37
38 build: $(SOURCES)
39- $(CXX) $^ -o $(NAME).so.0 $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
40- ln -s $(NAME).so.0 $(NAME).so
41+ $(CXX) $^ -o $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so.0 $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
42+ ln -s $(NAME).so.0 $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so
43+ cp -r libziparchive/include/* $(OUT_DIR)/usr/include/
44
45 clean:
46- $(RM) $(NAME).so*
47+ $(RM) $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so*