diff compression/unzip/unzip.sh @ 452:8c4366128400

compression/unzip: initial import, closes #1553
author David Demelier <markand@malikania.fr>
date Sat, 06 Apr 2019 08:13:23 +0200
parents
children 1aa1ea59be9b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compression/unzip/unzip.sh	Sat Apr 06 08:13:23 2019 +0200
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# Copyright (c) 2019 David Demelier <markand@malikania.fr>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+PKGNAME=unzip
+PKGVERSION=6.0
+PKGREVISION=1
+PKGLICENSE="CUSTOM"
+PKGSUMMARY="utility to decompress zip files"
+PKGDOWNLOAD="https://downloads.sourceforge.net/infozip/${PKGNAME}60.tar.gz"
+PKGDEPENDS="core/bzip2"
+
+: ${CC:=clang}
+
+build()
+{
+	rm -rf ${PKGNAME}60
+	tar xvaf ${PKGNAME}60.tar.gz
+	pushd ${PKGNAME}60
+
+	patch -p1 < ../CVE-2014-8139.patch
+	patch -p1 < ../CVE-2014-8140.patch
+	patch -p1 < ../CVE-2014-8141.patch
+	patch -p1 < ../CVE-2014-9636.patch
+	patch -p1 < ../CVE-2014-9913.patch
+	patch -p1 < ../CVE-2016-9844.patch
+	patch -p1 < ../CVE-2018-1000035.patch
+
+	# does not support DESTDIR, fake it with prefix.
+	make -f unix/Makefile CC="$CC" generic
+	make -f unix/Makefile \
+		prefix=$DESTDIR/usr \
+		MANDIR=$DESTDIR/usr/share/man/man1 \
+		install
+
+	popd
+	rm -rf ${PKGNAME}60
+}