From 344090a549284d0a1af065ff4cc3038bff8ecfea Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Thu, 14 Mar 2019 12:49:18 +0000 Subject: 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. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- .../zlib/zlib-1.2.11/Makefile-runtests.patch | 38 ------------------ .../zlib/zlib-1.2.11/ldflags-tests.patch | 45 ---------------------- .../zlib/zlib-1.2.11/remove.ldconfig.call.patch | 21 ---------- meta/recipes-core/zlib/zlib-1.2.11/run-ptest | 2 - .../recipes-core/zlib/zlib/Makefile-runtests.patch | 38 ++++++++++++++++++ meta/recipes-core/zlib/zlib/ldflags-tests.patch | 45 ++++++++++++++++++++++ meta/recipes-core/zlib/zlib/run-ptest | 2 + meta/recipes-core/zlib/zlib_1.2.11.bb | 3 +- 8 files changed, 86 insertions(+), 108 deletions(-) delete mode 100644 meta/recipes-core/zlib/zlib-1.2.11/Makefile-runtests.patch delete mode 100644 meta/recipes-core/zlib/zlib-1.2.11/ldflags-tests.patch delete mode 100644 meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch delete mode 100644 meta/recipes-core/zlib/zlib-1.2.11/run-ptest create mode 100644 meta/recipes-core/zlib/zlib/Makefile-runtests.patch create mode 100644 meta/recipes-core/zlib/zlib/ldflags-tests.patch create mode 100644 meta/recipes-core/zlib/zlib/run-ptest (limited to 'meta') diff --git a/meta/recipes-core/zlib/zlib-1.2.11/Makefile-runtests.patch b/meta/recipes-core/zlib/zlib-1.2.11/Makefile-runtests.patch deleted file mode 100644 index 61eea8238a..0000000000 --- a/meta/recipes-core/zlib/zlib-1.2.11/Makefile-runtests.patch +++ /dev/null @@ -1,38 +0,0 @@ -Add 'ptest' target to Makefile, to run tests without checking dependencies. - -Signed-off-by: Anders Roxell -Upstream-Status: Pending ---- -diff -uNr a/Makefile.in b/Makefile.in ---- a/Makefile.in 2013-06-10 13:48:14.321959162 +0200 -+++ b/Makefile.in 2013-06-10 13:49:36.686476448 +0200 -@@ -83,6 +83,9 @@ - test: all teststatic testshared - - teststatic: static -+ @make runteststatic -+ -+runteststatic: - @TMPST=tmpst_$$; \ - if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \ - echo ' *** zlib test OK ***'; \ -@@ -92,6 +95,9 @@ - rm -f $$TMPST - - testshared: shared -+ @make runtestshared -+ -+runtestshared: - @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ - LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \ - DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \ -@@ -105,6 +111,9 @@ - rm -f $$TMPSH - - test64: all64 -+ @make runtestall64 -+ -+runtestall64: - @TMP64=tmp64_$$; \ - if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \ - echo ' *** zlib 64-bit test OK ***'; \ diff --git a/meta/recipes-core/zlib/zlib-1.2.11/ldflags-tests.patch b/meta/recipes-core/zlib/zlib-1.2.11/ldflags-tests.patch deleted file mode 100644 index 19c40b7452..0000000000 --- a/meta/recipes-core/zlib/zlib-1.2.11/ldflags-tests.patch +++ /dev/null @@ -1,45 +0,0 @@ -Obey LDFLAGS for tests - -Signed-off-by: Christopher Larson -Upstream-Status: Pending - ---- zlib-1.2.8.orig/Makefile.in -+++ zlib-1.2.8/Makefile.in -@@ -26,7 +26,7 @@ CFLAGS=-O - - SFLAGS=-O - LDFLAGS= --TEST_LDFLAGS=-L. libz.a -+TEST_LDFLAGS=-L. $(LDFLAGS) - LDSHARED=$(CC) - CPP=$(CC) -E - -@@ -176,22 +176,22 @@ placebo $(SHAREDLIBV): $(PIC_OBJS) libz. - -@rmdir objs - - example$(EXE): example.o $(STATICLIB) -- $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) -+ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(STATICLIB) - - minigzip$(EXE): minigzip.o $(STATICLIB) -- $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) -+ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(STATICLIB) - - examplesh$(EXE): example.o $(SHAREDLIBV) -- $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV) -+ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(SHAREDLIBV) - - minigzipsh$(EXE): minigzip.o $(SHAREDLIBV) -- $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV) -+ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(SHAREDLIBV) - - example64$(EXE): example64.o $(STATICLIB) -- $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) -+ $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) $(STATICLIB) - - minigzip64$(EXE): minigzip64.o $(STATICLIB) -- $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) -+ $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) $(STATICLIB) - - install-libs: $(LIBS) - -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi diff --git a/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch b/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch deleted file mode 100644 index 7ccbe1f44c..0000000000 --- a/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch +++ /dev/null @@ -1,21 +0,0 @@ - -When /etc/ld.so.cache is writeable by user running bitbake then it creates invalid cache -(in my case libstdc++.so cannot be found after building zlib(-native) and I have to call -touch */libstdc++.so && /sbin/ldconfig to fix it. - -So remove ldconfig call from make install-libs - -Upstream-Status: Inappropriate [disable feature] - -Index: zlib-1.2.11/Makefile.in -=================================================================== ---- zlib-1.2.11.orig/Makefile.in -+++ zlib-1.2.11/Makefile.in -@@ -322,7 +322,6 @@ install-libs: $(LIBS) - rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \ - ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \ - ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \ -- ($(LDCONFIG) || true) >/dev/null 2>&1; \ - fi - rm -f $(DESTDIR)$(man3dir)/zlib.3 - cp $(SRCDIR)zlib.3 $(DESTDIR)$(man3dir) diff --git a/meta/recipes-core/zlib/zlib-1.2.11/run-ptest b/meta/recipes-core/zlib/zlib-1.2.11/run-ptest deleted file mode 100644 index 884d9dc699..0000000000 --- a/meta/recipes-core/zlib/zlib-1.2.11/run-ptest +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -make -k runteststatic runtestshared | sed -r -e 's/^(\s+\*+ (.+?) test OK \*+)/\1\nPASS: \2/' -e 's/^(\s+\*+ (.+?) test FAILED \*+)/\1\nFAIL: \2/' 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 @@ +Add 'ptest' target to Makefile, to run tests without checking dependencies. + +Signed-off-by: Anders Roxell +Upstream-Status: Pending +--- +diff -uNr a/Makefile.in b/Makefile.in +--- a/Makefile.in 2013-06-10 13:48:14.321959162 +0200 ++++ b/Makefile.in 2013-06-10 13:49:36.686476448 +0200 +@@ -83,6 +83,9 @@ + test: all teststatic testshared + + teststatic: static ++ @make runteststatic ++ ++runteststatic: + @TMPST=tmpst_$$; \ + if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \ + echo ' *** zlib test OK ***'; \ +@@ -92,6 +95,9 @@ + rm -f $$TMPST + + testshared: shared ++ @make runtestshared ++ ++runtestshared: + @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ + LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \ + DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \ +@@ -105,6 +111,9 @@ + rm -f $$TMPSH + + test64: all64 ++ @make runtestall64 ++ ++runtestall64: + @TMP64=tmp64_$$; \ + if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \ + 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 @@ +Obey LDFLAGS for tests + +Upstream-Status: Submitted [https://github.com/madler/zlib/pull/409] +Signed-off-by: Ross Burton + +--- zlib-1.2.8.orig/Makefile.in ++++ zlib-1.2.8/Makefile.in +@@ -26,7 +26,7 @@ CFLAGS=-O + + SFLAGS=-O + LDFLAGS= +-TEST_LDFLAGS=-L. libz.a ++TEST_LDFLAGS=-L. $(LDFLAGS) + LDSHARED=$(CC) + CPP=$(CC) -E + +@@ -176,22 +176,22 @@ placebo $(SHAREDLIBV): $(PIC_OBJS) libz. + -@rmdir objs + + example$(EXE): example.o $(STATICLIB) +- $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) ++ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(STATICLIB) + + minigzip$(EXE): minigzip.o $(STATICLIB) +- $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) ++ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(STATICLIB) + + examplesh$(EXE): example.o $(SHAREDLIBV) +- $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV) ++ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(SHAREDLIBV) + + minigzipsh$(EXE): minigzip.o $(SHAREDLIBV) +- $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV) ++ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(SHAREDLIBV) + + example64$(EXE): example64.o $(STATICLIB) +- $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) ++ $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) $(STATICLIB) + + minigzip64$(EXE): minigzip64.o $(STATICLIB) +- $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) ++ $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) $(STATICLIB) + + install-libs: $(LIBS) + -@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 @@ +#!/bin/sh +make -k runteststatic runtestshared | sed -r -e 's/^(\s+\*+ (.+?) test OK \*+)/\1\nPASS: \2/' -e 's/^(\s+\*+ (.+?) test FAILED \*+)/\1\nFAIL: \2/' diff --git a/meta/recipes-core/zlib/zlib_1.2.11.bb b/meta/recipes-core/zlib/zlib_1.2.11.bb index 6410519882..41ec29d95e 100644 --- a/meta/recipes-core/zlib/zlib_1.2.11.bb +++ b/meta/recipes-core/zlib/zlib_1.2.11.bb @@ -7,7 +7,6 @@ LICENSE = "Zlib" LIC_FILES_CHKSUM = "file://zlib.h;beginline=6;endline=23;md5=5377232268e952e9ef63bc555f7aa6c0" SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/${BPN}/${PV}/${BPN}-${PV}.tar.xz \ - file://remove.ldconfig.call.patch \ file://Makefile-runtests.patch \ file://ldflags-tests.patch \ file://run-ptest \ @@ -24,7 +23,7 @@ RDEPENDS_${PN}-ptest += "make" inherit ptest do_configure() { - uname=GNU ./configure --prefix=${prefix} --shared --libdir=${libdir} + LDCONFIG=true ./configure --prefix=${prefix} --shared --libdir=${libdir} --uname=GNU } do_compile() { -- cgit 1.2.3-korg