blob: a47491ea4ab52f1b5c79d4141f83b4879fd2bcec [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"
3SECTION = "console/utils"
4LICENSE = "BSD-3-Clause"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29"
6PE = "1"
7PR = "r5"
8
Patrick Williamsc0f7c042017-02-23 20:41:17 -06009SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010 file://avoid-strip.patch \
11 file://define-ldflags.patch \
12 file://06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch \
Patrick Williamsf1e5d692016-03-30 15:21:19 -050013 file://cve-2014-9636.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014 file://09-cve-2014-8139-crc-overflow.patch \
15 file://10-cve-2014-8140-test-compr-eb.patch \
16 file://11-cve-2014-8141-getzip64data.patch \
Patrick Williamsf1e5d692016-03-30 15:21:19 -050017 file://CVE-2015-7696.patch \
18 file://CVE-2015-7697.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019 file://fix-security-format.patch \
20 file://18-cve-2014-9913-unzip-buffer-overflow.patch \
21 file://19-cve-2016-9844-zipinfo-buffer-overflow.patch \
Brad Bishop220d5532018-08-14 00:59:39 +010022 file://symlink.patch \
23 file://0001-unzip-fix-CVE-2018-1000035.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050025UPSTREAM_VERSION_UNKNOWN = "1"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026
27SRC_URI[md5sum] = "62b490407489521db863b523a7f86375"
28SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050029
30# exclude version 5.5.2 which triggers a false positive
31UPSTREAM_CHECK_REGEX = "unzip(?P<pver>(?!552).+)\.tgz"
32
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033S = "${WORKDIR}/unzip60"
34
35# Makefile uses CF_NOOPT instead of CFLAGS. We lifted the values from
36# Makefile and add CFLAGS. Optimization will be overriden by unzip
37# configure to be -O3.
38#
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050039EXTRA_OEMAKE = "-e MAKEFLAGS= STRIP=true LF2='' \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050040 'CF_NOOPT=-I. -Ibzip2 -DUNIX ${CFLAGS}'"
41
42export LD = "${CC}"
43LD_class-native = "${CC}"
44
45do_compile() {
46 oe_runmake -f unix/Makefile generic
47}
48
49do_install() {
50 oe_runmake -f unix/Makefile install prefix=${D}${prefix}
51 install -d ${D}${mandir}
52 mv ${D}${prefix}/man/* ${D}${mandir}
53 rmdir ${D}${prefix}/man/
54}
55
56inherit update-alternatives
57
58ALTERNATIVE_PRIORITY = "100"
59
60ALTERNATIVE_${PN} = "unzip"
61ALTERNATIVE_LINK_NAME[unzip] = "${bindir}/unzip"
62
63BBCLASSEXTEND = "native"