aboutsummaryrefslogtreecommitdiffstats
path: root/main/unzip
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-02-08 13:21:02 +0200
committerTimo Teräs <timo.teras@iki.fi>2015-02-08 13:22:19 +0200
commit345ad0326ce0c2890b0980cb50b706e7de7d863f (patch)
treec18be7b3ef7b0cd6e27ba00d914264cd3205a1cc /main/unzip
parentccbc6e837a6df9649026cc834f43001742fa1c40 (diff)
downloadaports-345ad0326ce0c2890b0980cb50b706e7de7d863f.tar.bz2
aports-345ad0326ce0c2890b0980cb50b706e7de7d863f.tar.xz
main/unzip: new aport
Info-ZIP unzip http://infozip.org/UnZip.html
Diffstat (limited to 'main/unzip')
-rw-r--r--main/unzip/10-unzip-handle-pkware-verify.patch21
-rw-r--r--main/unzip/20-unzip-uidgid-fix.patch29
-rw-r--r--main/unzip/APKBUILD47
3 files changed, 97 insertions, 0 deletions
diff --git a/main/unzip/10-unzip-handle-pkware-verify.patch b/main/unzip/10-unzip-handle-pkware-verify.patch
new file mode 100644
index 0000000000..b373ce07dd
--- /dev/null
+++ b/main/unzip/10-unzip-handle-pkware-verify.patch
@@ -0,0 +1,21 @@
+From: Steven Schweda
+Subject: Handle the PKWare verification bit of internal attributes
+Bug-Debian: http://bugs.debian.org/630078
+X-Debian-version: 6.0-5
+
+--- a/process.c
++++ b/process.c
+@@ -1729,6 +1729,13 @@
+ else if (uO.L_flag > 1) /* let -LL force lower case for all names */
+ G.pInfo->lcflag = 1;
+
++ /* Handle the PKWare verification bit, bit 2 (0x0004) of internal
++ attributes. If this is set, then a verification checksum is in the
++ first 3 bytes of the external attributes. In this case all we can use
++ for setting file attributes is the last external attributes byte. */
++ if (G.crec.internal_file_attributes & 0x0004)
++ G.crec.external_file_attributes &= (ulg)0xff;
++
+ /* do Amigas (AMIGA_) also have volume labels? */
+ if (IS_VOLID(G.crec.external_file_attributes) &&
+ (G.pInfo->hostnum == FS_FAT_ || G.pInfo->hostnum == FS_HPFS_ ||
diff --git a/main/unzip/20-unzip-uidgid-fix.patch b/main/unzip/20-unzip-uidgid-fix.patch
new file mode 100644
index 0000000000..3a308990e1
--- /dev/null
+++ b/main/unzip/20-unzip-uidgid-fix.patch
@@ -0,0 +1,29 @@
+From: sms
+Subject: Restore uid and gid information when requested
+Bug-Debian: http://bugs.debian.org/689212
+X-Debian-version: 6.0-8
+
+--- a/process.c
++++ b/process.c
+@@ -2904,7 +2904,7 @@
+ #ifdef IZ_HAVE_UXUIDGID
+ if (eb_len >= EB_UX3_MINLEN
+ && z_uidgid != NULL
+- && (*((EB_HEADSIZE + 0) + ef_buf) == 1)
++ && (*((EB_HEADSIZE + 0) + ef_buf) == 1))
+ /* only know about version 1 */
+ {
+ uch uid_size;
+@@ -2916,10 +2916,10 @@
+ flags &= ~0x0ff; /* ignore any previous UNIX field */
+
+ if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf,
+- uid_size, z_uidgid[0])
++ uid_size, &z_uidgid[0])
+ &&
+ read_ux3_value((EB_HEADSIZE + uid_size + 3) + ef_buf,
+- gid_size, z_uidgid[1]) )
++ gid_size, &z_uidgid[1]) )
+ {
+ flags |= EB_UX2_VALID; /* signal success */
+ }
diff --git a/main/unzip/APKBUILD b/main/unzip/APKBUILD
new file mode 100644
index 0000000000..00ae25fd74
--- /dev/null
+++ b/main/unzip/APKBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Timo Teräs <timo.teras@iki.fi>
+pkgname=unzip
+pkgver=6.0
+pkgrel=0
+pkgdesc="Extract PKZIP-compatible .zip files"
+url="http://www.info-zip.org/UnZip.html"
+arch="all"
+license="Custom"
+depends=""
+makedepends=""
+subpackages="$pkgname-doc"
+source="ftp://ftp.info-zip.org/pub/infozip/src/${pkgname}60.zip
+ 10-unzip-handle-pkware-verify.patch
+ 20-unzip-uidgid-fix.patch
+ "
+
+_builddir="$srcdir"/${pkgname}60
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make -f unix/Makefile LOCAL_ZIP="${CFLAGS} ${CPPFLAGS}" prefix=/usr generic || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -f unix/Makefile prefix=${pkgdir}/usr MANDIR=${pkgdir}/usr/share/man install || return 1
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+md5sums="85da5203f01ab0b9403efef3b9bb4010 unzip60.zip
+b860a1557b48b2c3fa52541f9260ed72 10-unzip-handle-pkware-verify.patch
+3de9dee957cb83615cdcb165375d00bd 20-unzip-uidgid-fix.patch"
+sha256sums="2bc3e70d412447595ac3bed58c1c1fdae289d9a652e55fd0eaadddfe111aa9e4 unzip60.zip
+6829ce345b66d081cb1b8b5be37f092836fbcb71819594e45218fc03d8e80754 10-unzip-handle-pkware-verify.patch
+3650b53a49742d7ffb2c7d5db2ef1cdeaf3d34d21daa976dc7024ceb605a9dee 20-unzip-uidgid-fix.patch"
+sha512sums="4a455d45b2c33bc28cab74b82d13f2f1bc5f4a2c45de125345181d2e712079727e825d25e5b7765f9f9c16b7746cd5342897dc8502cb55b8a9f2329b138a1614 unzip60.zip
+9d2914f22fb0075a2b6f72825c235f46eafd8d47b6fb6fcc8303fc69336e256b15923c002d2615bb6af733344c2315e4a8504d77bae301e10c11d4736faa2c81 10-unzip-handle-pkware-verify.patch
+57699582e9056af0817dcb67f8db67e6a1ff8208c137fbebcf559429e5f12b471b75d7e1ef938e5bbb5416074a51ac7342e4ce8057f4bbdcb0bf079b8d7832af 20-unzip-uidgid-fix.patch"