xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-extended/unzip/unzip_6.0.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1SUMMARY = "Utilities for extracting and viewing files in .zip archives"
2HOMEPAGE = "http://www.info-zip.org"
3DESCRIPTION = "Info-ZIP's purpose is to provide free, portable, high-quality versions of the Zip and UnZip compressor-archiver utilities that are compatible with the DOS-based PKZIP by PKWARE, Inc."
4SECTION = "console/utils"
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29"
7PE = "1"
8PR = "r5"
9
10SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz \
11	file://avoid-strip.patch \
12	file://define-ldflags.patch \
13	file://06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch \
14	file://cve-2014-9636.patch \
15	file://09-cve-2014-8139-crc-overflow.patch \
16	file://10-cve-2014-8140-test-compr-eb.patch \
17	file://11-cve-2014-8141-getzip64data.patch \
18	file://CVE-2015-7696.patch \
19	file://CVE-2015-7697.patch \
20	file://fix-security-format.patch \
21	file://18-cve-2014-9913-unzip-buffer-overflow.patch \
22	file://19-cve-2016-9844-zipinfo-buffer-overflow.patch \
23	file://symlink.patch \
24	file://0001-unzip-fix-CVE-2018-1000035.patch \
25	file://CVE-2018-18384.patch \
26	file://CVE-2019-13232_p1.patch \
27	file://CVE-2019-13232_p2.patch \
28	file://CVE-2019-13232_p3.patch \
29	file://unzip_optimization.patch \
30        file://0001-configure-Pass-LDFLAGS-to-tests-doing-link-step.patch \
31        file://CVE-2021-4217.patch \
32        file://CVE-2022-0529.patch \
33        file://CVE-2022-0530.patch \
34"
35UPSTREAM_VERSION_UNKNOWN = "1"
36
37SRC_URI[md5sum] = "62b490407489521db863b523a7f86375"
38SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37"
39
40# Patch from https://bugzilla.redhat.com/attachment.cgi?id=293893&action=diff applied to 6.0 source
41CVE_CHECK_IGNORE += "CVE-2008-0888"
42
43# exclude version 5.5.2 which triggers a false positive
44UPSTREAM_CHECK_REGEX = "unzip(?P<pver>(?!552).+)\.tgz"
45
46S = "${WORKDIR}/unzip60"
47
48# Makefile uses CF_NOOPT instead of CFLAGS.  We lifted the values from
49# Makefile and add CFLAGS.  Optimization will be overriden by unzip
50# configure to be -O3.
51#
52EXTRA_OEMAKE = "-e MAKEFLAGS= STRIP=true LF2='' \
53                'CF_NOOPT=-I. -Ibzip2 -DUNIX ${CFLAGS}'"
54
55export LD = "${CC}"
56LD:class-native = "${CC}"
57
58do_compile() {
59        oe_runmake -f unix/Makefile generic
60}
61
62do_install() {
63        oe_runmake -f unix/Makefile install prefix=${D}${prefix}
64	install -d ${D}${mandir}
65	mv ${D}${prefix}/man/* ${D}${mandir}
66	rmdir ${D}${prefix}/man/
67}
68
69inherit update-alternatives
70
71ALTERNATIVE_PRIORITY = "100"
72
73ALTERNATIVE:${PN} = "unzip"
74ALTERNATIVE_LINK_NAME[unzip] = "${bindir}/unzip"
75
76BBCLASSEXTEND = "native nativesdk"
77