summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/zlib/zlib
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-03-14 12:49:18 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-18 23:47:43 +0000
commited9971d58dce21e6ac41ae6e93a12fe4baa79430 (patch)
tree161ab13f3d51a07d3eaba72f03b01eb256762628 /meta/recipes-core/zlib/zlib
parent2c4996548535a92da22bf4c6a9ce80139e3417f9 (diff)
downloadpoky-ed9971d58dce21e6ac41ae6e93a12fe4baa79430.tar.gz
zlib: cleanup
Drop remove.ldconfig.call.patch, as it's easier to just set LDCONFIG=true. Pass uname=GNU via the documented configure option instead of undocumented environment variable. Rename zlib-1.2.11/ to just zlib/ as we don't ship multiple versions. Send ldflags-tests.patch upstream and update Upstream-Status. (From OE-Core rev: 344090a549284d0a1af065ff4cc3038bff8ecfea) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/zlib/zlib')
-rw-r--r--meta/recipes-core/zlib/zlib/Makefile-runtests.patch38
-rw-r--r--meta/recipes-core/zlib/zlib/ldflags-tests.patch45
-rw-r--r--meta/recipes-core/zlib/zlib/run-ptest2
3 files changed, 85 insertions, 0 deletions
diff --git a/meta/recipes-core/zlib/zlib/Makefile-runtests.patch b/meta/recipes-core/zlib/zlib/Makefile-runtests.patch
new file mode 100644
index 0000000000..61eea8238a
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib/Makefile-runtests.patch
@@ -0,0 +1,38 @@
1Add 'ptest' target to Makefile, to run tests without checking dependencies.
2
3Signed-off-by: Anders Roxell <anders.roxell@enea.com>
4Upstream-Status: Pending
5---
6diff -uNr a/Makefile.in b/Makefile.in
7--- a/Makefile.in 2013-06-10 13:48:14.321959162 +0200
8+++ b/Makefile.in 2013-06-10 13:49:36.686476448 +0200
9@@ -83,6 +83,9 @@
10 test: all teststatic testshared
11
12 teststatic: static
13+ @make runteststatic
14+
15+runteststatic:
16 @TMPST=tmpst_$$; \
17 if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
18 echo ' *** zlib test OK ***'; \
19@@ -92,6 +95,9 @@
20 rm -f $$TMPST
21
22 testshared: shared
23+ @make runtestshared
24+
25+runtestshared:
26 @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
27 LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
28 DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
29@@ -105,6 +111,9 @@
30 rm -f $$TMPSH
31
32 test64: all64
33+ @make runtestall64
34+
35+runtestall64:
36 @TMP64=tmp64_$$; \
37 if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
38 echo ' *** zlib 64-bit test OK ***'; \
diff --git a/meta/recipes-core/zlib/zlib/ldflags-tests.patch b/meta/recipes-core/zlib/zlib/ldflags-tests.patch
new file mode 100644
index 0000000000..286390665f
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib/ldflags-tests.patch
@@ -0,0 +1,45 @@
1Obey LDFLAGS for tests
2
3Upstream-Status: Submitted [https://github.com/madler/zlib/pull/409]
4Signed-off-by: Ross Burton <ross.burton@intel.com>
5
6--- zlib-1.2.8.orig/Makefile.in
7+++ zlib-1.2.8/Makefile.in
8@@ -26,7 +26,7 @@ CFLAGS=-O
9
10 SFLAGS=-O
11 LDFLAGS=
12-TEST_LDFLAGS=-L. libz.a
13+TEST_LDFLAGS=-L. $(LDFLAGS)
14 LDSHARED=$(CC)
15 CPP=$(CC) -E
16
17@@ -176,22 +176,22 @@ placebo $(SHAREDLIBV): $(PIC_OBJS) libz.
18 -@rmdir objs
19
20 example$(EXE): example.o $(STATICLIB)
21- $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS)
22+ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(STATICLIB)
23
24 minigzip$(EXE): minigzip.o $(STATICLIB)
25- $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
26+ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(STATICLIB)
27
28 examplesh$(EXE): example.o $(SHAREDLIBV)
29- $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
30+ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(SHAREDLIBV)
31
32 minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
33- $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
34+ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(SHAREDLIBV)
35
36 example64$(EXE): example64.o $(STATICLIB)
37- $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
38+ $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) $(STATICLIB)
39
40 minigzip64$(EXE): minigzip64.o $(STATICLIB)
41- $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS)
42+ $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) $(STATICLIB)
43
44 install-libs: $(LIBS)
45 -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
diff --git a/meta/recipes-core/zlib/zlib/run-ptest b/meta/recipes-core/zlib/zlib/run-ptest
new file mode 100644
index 0000000000..884d9dc699
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2make -k runteststatic runtestshared | sed -r -e 's/^(\s+\*+ (.+?) test OK \*+)/\1\nPASS: \2/' -e 's/^(\s+\*+ (.+?) test FAILED \*+)/\1\nFAIL: \2/'