blob: 1c06aa0ab5ea339b04d9e42d6df1796e741430b8 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001SUMMARY = "Zlib Compression Library"
2DESCRIPTION = "Zlib is a general-purpose, patent-free, lossless data compression \
3library which is used by many different programs."
4HOMEPAGE = "http://zlib.net/"
5SECTION = "libs"
6LICENSE = "Zlib"
7LIC_FILES_CHKSUM = "file://zlib.h;beginline=6;endline=23;md5=5377232268e952e9ef63bc555f7aa6c0"
8
9SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050010 file://ldflags-tests.patch \
11 file://run-ptest \
12 "
13UPSTREAM_CHECK_URI = "http://zlib.net/"
14
15SRC_URI[md5sum] = "85adef240c5f370b308da8c938951a68"
16SRC_URI[sha256sum] = "4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066"
17
18CFLAGS += "-D_REENTRANT"
19
Patrick Williams213cb262021-08-07 19:21:33 -050020RDEPENDS:${PN}-ptest += "make"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050021
22inherit ptest
23
24do_configure() {
Brad Bishop19323692019-04-05 15:28:33 -040025 LDCONFIG=true ./configure --prefix=${prefix} --shared --libdir=${libdir} --uname=GNU
Brad Bishop6e60e8b2018-02-01 10:27:11 -050026}
27
28do_compile() {
29 oe_runmake shared
30}
31
Brad Bishop6e60e8b2018-02-01 10:27:11 -050032do_install() {
33 oe_runmake DESTDIR=${D} install
34}
35
36do_install_ptest() {
Brad Bishop19323692019-04-05 15:28:33 -040037 install ${B}/examplesh ${D}${PTEST_PATH}
Brad Bishop6e60e8b2018-02-01 10:27:11 -050038}
39
40# Move zlib shared libraries for target builds to $base_libdir so the library
41# can be used in early boot before $prefix is mounted.
Patrick Williams213cb262021-08-07 19:21:33 -050042do_install:append:class-target() {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050043 if [ ${base_libdir} != ${libdir} ]
44 then
45 mkdir -p ${D}/${base_libdir}
46 mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir}
47 libname=`readlink ${D}/${libdir}/libz.so`
48 ln -sf ${@oe.path.relative("${libdir}", "${base_libdir}")}/$libname ${D}${libdir}/libz.so
49 fi
50}
51
52BBCLASSEXTEND = "native nativesdk"