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" |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 3 | DESCRIPTION = "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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 4 | SECTION = "console/utils" |
| 5 | LICENSE = "BSD-3-Clause" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29" |
| 7 | PE = "1" |
| 8 | PR = "r5" |
| 9 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 10 | 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] | 11 | file://avoid-strip.patch \ |
| 12 | file://define-ldflags.patch \ |
| 13 | file://06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch \ |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 14 | file://cve-2014-9636.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 \ |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 18 | file://CVE-2015-7696.patch \ |
| 19 | file://CVE-2015-7697.patch \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 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 \ |
Brad Bishop | 220d553 | 2018-08-14 00:59:39 +0100 | [diff] [blame] | 23 | file://symlink.patch \ |
| 24 | file://0001-unzip-fix-CVE-2018-1000035.patch \ |
Brad Bishop | c4ea075 | 2018-11-15 14:30:15 -0800 | [diff] [blame] | 25 | file://CVE-2018-18384.patch \ |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 26 | file://CVE-2019-13232_p1.patch \ |
| 27 | file://CVE-2019-13232_p2.patch \ |
| 28 | file://CVE-2019-13232_p3.patch \ |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 29 | file://unzip_optimization.patch \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 30 | file://0001-configure-Pass-LDFLAGS-to-tests-doing-link-step.patch \ |
Patrick Williams | de0582f | 2022-04-08 10:23:27 -0500 | [diff] [blame] | 31 | file://CVE-2021-4217.patch \ |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 32 | file://CVE-2022-0529.patch \ |
| 33 | file://CVE-2022-0530.patch \ |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 34 | file://0001-configure-Add-correct-system-headers-and-prototypes-.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 35 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 36 | UPSTREAM_VERSION_UNKNOWN = "1" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 37 | |
| 38 | SRC_URI[md5sum] = "62b490407489521db863b523a7f86375" |
| 39 | SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 40 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 41 | # Patch from https://bugzilla.redhat.com/attachment.cgi?id=293893&action=diff applied to 6.0 source |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 42 | CVE_CHECK_IGNORE += "CVE-2008-0888" |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 43 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 44 | # exclude version 5.5.2 which triggers a false positive |
| 45 | UPSTREAM_CHECK_REGEX = "unzip(?P<pver>(?!552).+)\.tgz" |
| 46 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | S = "${WORKDIR}/unzip60" |
| 48 | |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 49 | # Enable largefile support |
| 50 | CFLAGS += "-DLARGE_FILE_SUPPORT" |
| 51 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 52 | # Makefile uses CF_NOOPT instead of CFLAGS. We lifted the values from |
| 53 | # Makefile and add CFLAGS. Optimization will be overriden by unzip |
| 54 | # configure to be -O3. |
| 55 | # |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 56 | EXTRA_OEMAKE = "-e MAKEFLAGS= STRIP=true LF2='' \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 57 | 'CF_NOOPT=-I. -Ibzip2 -DUNIX ${CFLAGS}'" |
| 58 | |
| 59 | export LD = "${CC}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 60 | LD:class-native = "${CC}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 61 | |
| 62 | do_compile() { |
| 63 | oe_runmake -f unix/Makefile generic |
| 64 | } |
| 65 | |
| 66 | do_install() { |
| 67 | oe_runmake -f unix/Makefile install prefix=${D}${prefix} |
| 68 | install -d ${D}${mandir} |
| 69 | mv ${D}${prefix}/man/* ${D}${mandir} |
| 70 | rmdir ${D}${prefix}/man/ |
| 71 | } |
| 72 | |
| 73 | inherit update-alternatives |
| 74 | |
| 75 | ALTERNATIVE_PRIORITY = "100" |
| 76 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 77 | ALTERNATIVE:${PN} = "unzip" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 78 | ALTERNATIVE_LINK_NAME[unzip] = "${bindir}/unzip" |
| 79 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 80 | BBCLASSEXTEND = "native nativesdk" |