blob: f8bcc0abcf8069394df5cbb5f4cf38d3cb449764 [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 \
Andrew Geissler9aee5002022-03-30 16:27:02 +000011 file://0001-configure-Pass-LDFLAGS-to-link-tests.patch \
12 file://CVE-2018-25032.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013 file://run-ptest \
14 "
15UPSTREAM_CHECK_URI = "http://zlib.net/"
16
17SRC_URI[md5sum] = "85adef240c5f370b308da8c938951a68"
18SRC_URI[sha256sum] = "4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066"
19
20CFLAGS += "-D_REENTRANT"
21
Patrick Williams213cb262021-08-07 19:21:33 -050022RDEPENDS:${PN}-ptest += "make"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050023
24inherit ptest
25
26do_configure() {
Brad Bishop19323692019-04-05 15:28:33 -040027 LDCONFIG=true ./configure --prefix=${prefix} --shared --libdir=${libdir} --uname=GNU
Brad Bishop6e60e8b2018-02-01 10:27:11 -050028}
29
30do_compile() {
31 oe_runmake shared
32}
33
Brad Bishop6e60e8b2018-02-01 10:27:11 -050034do_install() {
35 oe_runmake DESTDIR=${D} install
36}
37
38do_install_ptest() {
Brad Bishop19323692019-04-05 15:28:33 -040039 install ${B}/examplesh ${D}${PTEST_PATH}
Brad Bishop6e60e8b2018-02-01 10:27:11 -050040}
41
42# Move zlib shared libraries for target builds to $base_libdir so the library
43# can be used in early boot before $prefix is mounted.
Patrick Williams213cb262021-08-07 19:21:33 -050044do_install:append:class-target() {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050045 if [ ${base_libdir} != ${libdir} ]
46 then
47 mkdir -p ${D}/${base_libdir}
48 mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir}
49 libname=`readlink ${D}/${libdir}/libz.so`
50 ln -sf ${@oe.path.relative("${libdir}", "${base_libdir}")}/$libname ${D}${libdir}/libz.so
51 fi
52}
53
54BBCLASSEXTEND = "native nativesdk"