Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Utilities for extracting and viewing files in .zip archives" |
| 2 | HOMEPAGE = "http://www.info-zip.org" |
| 3 | SECTION = "console/utils" |
| 4 | LICENSE = "BSD-3-Clause" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29" |
| 6 | PE = "1" |
| 7 | PR = "r5" |
| 8 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 9 | SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 10 | file://avoid-strip.patch \ |
| 11 | file://define-ldflags.patch \ |
| 12 | file://06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch \ |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 13 | file://cve-2014-9636.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 14 | 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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 17 | file://CVE-2015-7696.patch \ |
| 18 | file://CVE-2015-7697.patch \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 19 | 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 Bishop | 220d553 | 2018-08-14 00:59:39 +0100 | [diff] [blame] | 22 | file://symlink.patch \ |
| 23 | file://0001-unzip-fix-CVE-2018-1000035.patch \ |
Brad Bishop | c4ea075 | 2018-11-15 14:30:15 -0800 | [diff] [blame] | 24 | file://CVE-2018-18384.patch \ |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame^] | 25 | file://CVE-2019-13232_p1.patch \ |
| 26 | file://CVE-2019-13232_p2.patch \ |
| 27 | file://CVE-2019-13232_p3.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 28 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 29 | UPSTREAM_VERSION_UNKNOWN = "1" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | |
| 31 | SRC_URI[md5sum] = "62b490407489521db863b523a7f86375" |
| 32 | SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 33 | |
| 34 | # exclude version 5.5.2 which triggers a false positive |
| 35 | UPSTREAM_CHECK_REGEX = "unzip(?P<pver>(?!552).+)\.tgz" |
| 36 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 37 | S = "${WORKDIR}/unzip60" |
| 38 | |
| 39 | # Makefile uses CF_NOOPT instead of CFLAGS. We lifted the values from |
| 40 | # Makefile and add CFLAGS. Optimization will be overriden by unzip |
| 41 | # configure to be -O3. |
| 42 | # |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 43 | EXTRA_OEMAKE = "-e MAKEFLAGS= STRIP=true LF2='' \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 44 | 'CF_NOOPT=-I. -Ibzip2 -DUNIX ${CFLAGS}'" |
| 45 | |
| 46 | export LD = "${CC}" |
| 47 | LD_class-native = "${CC}" |
| 48 | |
| 49 | do_compile() { |
| 50 | oe_runmake -f unix/Makefile generic |
| 51 | } |
| 52 | |
| 53 | do_install() { |
| 54 | oe_runmake -f unix/Makefile install prefix=${D}${prefix} |
| 55 | install -d ${D}${mandir} |
| 56 | mv ${D}${prefix}/man/* ${D}${mandir} |
| 57 | rmdir ${D}${prefix}/man/ |
| 58 | } |
| 59 | |
| 60 | inherit update-alternatives |
| 61 | |
| 62 | ALTERNATIVE_PRIORITY = "100" |
| 63 | |
| 64 | ALTERNATIVE_${PN} = "unzip" |
| 65 | ALTERNATIVE_LINK_NAME[unzip] = "${bindir}/unzip" |
| 66 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 67 | BBCLASSEXTEND = "native nativesdk" |