blob: c222a684b4c90f75c6ccf5f6787646a719027349 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Utilities for extracting and viewing files in .zip archives"
2HOMEPAGE = "http://www.info-zip.org"
Andrew Geissler95ac1b82021-03-31 14:34:31 -05003DESCRIPTION = "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."
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004SECTION = "console/utils"
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29"
7PE = "1"
8PR = "r5"
9
Patrick Williamsc0f7c042017-02-23 20:41:17 -060010SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011 file://avoid-strip.patch \
12 file://define-ldflags.patch \
13 file://06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch \
Patrick Williamsf1e5d692016-03-30 15:21:19 -050014 file://cve-2014-9636.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015 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 \
Patrick Williamsf1e5d692016-03-30 15:21:19 -050018 file://CVE-2015-7696.patch \
19 file://CVE-2015-7697.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050020 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 \
Brad Bishop220d5532018-08-14 00:59:39 +010023 file://symlink.patch \
24 file://0001-unzip-fix-CVE-2018-1000035.patch \
Brad Bishopc4ea0752018-11-15 14:30:15 -080025 file://CVE-2018-18384.patch \
Brad Bishop00e122a2019-10-05 11:10:57 -040026 file://CVE-2019-13232_p1.patch \
27 file://CVE-2019-13232_p2.patch \
28 file://CVE-2019-13232_p3.patch \
Andrew Geisslerc926e172021-05-07 16:11:35 -050029 file://unzip_optimization.patch \
Andrew Geissler9aee5002022-03-30 16:27:02 +000030 file://0001-configure-Pass-LDFLAGS-to-tests-doing-link-step.patch \
Patrick Williamsde0582f2022-04-08 10:23:27 -050031 file://CVE-2021-4217.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050033UPSTREAM_VERSION_UNKNOWN = "1"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034
35SRC_URI[md5sum] = "62b490407489521db863b523a7f86375"
36SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050037
William A. Kennington IIIac69b482021-06-02 12:28:27 -070038# Patch from https://bugzilla.redhat.com/attachment.cgi?id=293893&action=diff applied to 6.0 source
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000039CVE_CHECK_IGNORE += "CVE-2008-0888"
William A. Kennington IIIac69b482021-06-02 12:28:27 -070040
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050041# exclude version 5.5.2 which triggers a false positive
42UPSTREAM_CHECK_REGEX = "unzip(?P<pver>(?!552).+)\.tgz"
43
Patrick Williamsc124f4f2015-09-15 14:41:29 -050044S = "${WORKDIR}/unzip60"
45
46# Makefile uses CF_NOOPT instead of CFLAGS. We lifted the values from
47# Makefile and add CFLAGS. Optimization will be overriden by unzip
48# configure to be -O3.
49#
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050050EXTRA_OEMAKE = "-e MAKEFLAGS= STRIP=true LF2='' \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051 'CF_NOOPT=-I. -Ibzip2 -DUNIX ${CFLAGS}'"
52
53export LD = "${CC}"
Patrick Williams213cb262021-08-07 19:21:33 -050054LD:class-native = "${CC}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050055
56do_compile() {
57 oe_runmake -f unix/Makefile generic
58}
59
60do_install() {
61 oe_runmake -f unix/Makefile install prefix=${D}${prefix}
62 install -d ${D}${mandir}
63 mv ${D}${prefix}/man/* ${D}${mandir}
64 rmdir ${D}${prefix}/man/
65}
66
67inherit update-alternatives
68
69ALTERNATIVE_PRIORITY = "100"
70
Patrick Williams213cb262021-08-07 19:21:33 -050071ALTERNATIVE:${PN} = "unzip"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050072ALTERNATIVE_LINK_NAME[unzip] = "${bindir}/unzip"
73
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080074BBCLASSEXTEND = "native nativesdk"