From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- poky/meta/recipes-core/zlib/site_config/headers | 1 + .../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 +++++++ poky/meta/recipes-core/zlib/zlib-1.2.11/run-ptest | 2 + poky/meta/recipes-core/zlib/zlib_1.2.11.bb | 67 ++++++++++++++++++++++ 6 files changed, 174 insertions(+) create mode 100644 poky/meta/recipes-core/zlib/site_config/headers create mode 100644 poky/meta/recipes-core/zlib/zlib-1.2.11/Makefile-runtests.patch create mode 100644 poky/meta/recipes-core/zlib/zlib-1.2.11/ldflags-tests.patch create mode 100644 poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch create mode 100644 poky/meta/recipes-core/zlib/zlib-1.2.11/run-ptest create mode 100644 poky/meta/recipes-core/zlib/zlib_1.2.11.bb (limited to 'poky/meta/recipes-core/zlib') diff --git a/poky/meta/recipes-core/zlib/site_config/headers b/poky/meta/recipes-core/zlib/site_config/headers new file mode 100644 index 000000000..50268918a --- /dev/null +++ b/poky/meta/recipes-core/zlib/site_config/headers @@ -0,0 +1 @@ +zlib.h diff --git a/poky/meta/recipes-core/zlib/zlib-1.2.11/Makefile-runtests.patch b/poky/meta/recipes-core/zlib/zlib-1.2.11/Makefile-runtests.patch new file mode 100644 index 000000000..61eea8238 --- /dev/null +++ b/poky/meta/recipes-core/zlib/zlib-1.2.11/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/poky/meta/recipes-core/zlib/zlib-1.2.11/ldflags-tests.patch b/poky/meta/recipes-core/zlib/zlib-1.2.11/ldflags-tests.patch new file mode 100644 index 000000000..19c40b745 --- /dev/null +++ b/poky/meta/recipes-core/zlib/zlib-1.2.11/ldflags-tests.patch @@ -0,0 +1,45 @@ +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/poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch b/poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch new file mode 100644 index 000000000..7ccbe1f44 --- /dev/null +++ b/poky/meta/recipes-core/zlib/zlib-1.2.11/remove.ldconfig.call.patch @@ -0,0 +1,21 @@ + +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/poky/meta/recipes-core/zlib/zlib-1.2.11/run-ptest b/poky/meta/recipes-core/zlib/zlib-1.2.11/run-ptest new file mode 100644 index 000000000..884d9dc69 --- /dev/null +++ b/poky/meta/recipes-core/zlib/zlib-1.2.11/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/poky/meta/recipes-core/zlib/zlib_1.2.11.bb b/poky/meta/recipes-core/zlib/zlib_1.2.11.bb new file mode 100644 index 000000000..641051988 --- /dev/null +++ b/poky/meta/recipes-core/zlib/zlib_1.2.11.bb @@ -0,0 +1,67 @@ +SUMMARY = "Zlib Compression Library" +DESCRIPTION = "Zlib is a general-purpose, patent-free, lossless data compression \ +library which is used by many different programs." +HOMEPAGE = "http://zlib.net/" +SECTION = "libs" +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 \ + " +UPSTREAM_CHECK_URI = "http://zlib.net/" + +SRC_URI[md5sum] = "85adef240c5f370b308da8c938951a68" +SRC_URI[sha256sum] = "4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066" + +CFLAGS += "-D_REENTRANT" + +RDEPENDS_${PN}-ptest += "make" + +inherit ptest + +do_configure() { + uname=GNU ./configure --prefix=${prefix} --shared --libdir=${libdir} +} + +do_compile() { + oe_runmake shared +} + +do_compile_ptest() { + oe_runmake test +} + +do_install() { + oe_runmake DESTDIR=${D} install +} + +do_install_ptest() { + install ${B}/Makefile ${D}${PTEST_PATH} + install ${B}/example ${D}${PTEST_PATH} + install ${B}/minigzip ${D}${PTEST_PATH} + install ${B}/examplesh ${D}${PTEST_PATH} + install ${B}/minigzipsh ${D}${PTEST_PATH} + + # Remove buildhost references... + sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + ${D}${PTEST_PATH}/Makefile +} + +# Move zlib shared libraries for target builds to $base_libdir so the library +# can be used in early boot before $prefix is mounted. +do_install_append_class-target() { + if [ ${base_libdir} != ${libdir} ] + then + mkdir -p ${D}/${base_libdir} + mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir} + libname=`readlink ${D}/${libdir}/libz.so` + ln -sf ${@oe.path.relative("${libdir}", "${base_libdir}")}/$libname ${D}${libdir}/libz.so + fi +} + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3