summaryrefslogtreecommitdiff
path: root/app-arch/zip
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-arch/zip
reinit the tree, so we can have metadata
Diffstat (limited to 'app-arch/zip')
-rw-r--r--app-arch/zip/Manifest20
-rw-r--r--app-arch/zip/files/zip-2.3-unix_configure-pic.patch12
-rw-r--r--app-arch/zip/files/zip-2.31-exec-stack.patch20
-rw-r--r--app-arch/zip/files/zip-2.32-build.patch89
-rw-r--r--app-arch/zip/files/zip-3.0-build.patch36
-rw-r--r--app-arch/zip/files/zip-3.0-exec-stack.patch22
-rw-r--r--app-arch/zip/files/zip-3.0-format-security.patch20
-rw-r--r--app-arch/zip/files/zip-3.0-natspec.patch214
-rw-r--r--app-arch/zip/files/zip-3.0-no-crypt.patch57
-rw-r--r--app-arch/zip/files/zip-3.0-pic.patch15
-rw-r--r--app-arch/zip/files/zip-3.0-zipnote-freeze.patch61
-rw-r--r--app-arch/zip/metadata.xml15
-rw-r--r--app-arch/zip/zip-2.32-r1.ebuild42
-rw-r--r--app-arch/zip/zip-3.0-r1.ebuild51
-rw-r--r--app-arch/zip/zip-3.0-r2.ebuild60
-rw-r--r--app-arch/zip/zip-3.0-r3.ebuild62
-rw-r--r--app-arch/zip/zip-3.0.ebuild50
17 files changed, 846 insertions, 0 deletions
diff --git a/app-arch/zip/Manifest b/app-arch/zip/Manifest
new file mode 100644
index 000000000000..4f0c765d5ee1
--- /dev/null
+++ b/app-arch/zip/Manifest
@@ -0,0 +1,20 @@
+AUX zip-2.3-unix_configure-pic.patch 444 SHA256 3e348be7890f21280fceab6cb2a87f3020b08a31608ab93d1b5a53667760e556 SHA512 33a8ff4bd59d50868321ea04b7454ec3be2affaa998a9ccd0fa8cd51a3b1024a4b89c56102def8fa800b3124b9d0a508d7bf679c2e006315c3cf41be41ccf590 WHIRLPOOL 87c2b56315f9b2135f1251dfd30579fe2ecca4ff5c9dd6d7a2f9fb3fe94abf554106543bf7705a37aa535705ec3ad84201e9d7c8f7c77783b0c41b752ffe2099
+AUX zip-2.31-exec-stack.patch 407 SHA256 108686d8854096422bd4895690a37202aee66757d0d2b43afa16d9fb914cbb29 SHA512 a4e9eae229cece47052bb0f1de0314b72fa0bca3e7e9e8cfa484471746a39c3a1cf5f5f7f5996bca4bccf843361d5560c201d2f76ccaa36ebc2c0da13b7f8004 WHIRLPOOL cb1d57d9222467448f06b70abdca6d075a42db8c3d281bb4e82a5e8c5aaf23f54072824f91dda42eec6dc9cd71c1350b60ad7c1dfb17e11464234609a3d8cfb8
+AUX zip-2.32-build.patch 2003 SHA256 3e4b94015c1448c8769d7154b308bd986e1d0e6e514da151d658d1b8ba3a774c SHA512 e4853ac5537072c6b887d5e0fff5afa7bcbaf902910739698e76ba362f670fcdab807d1b142fe8f55a2b3e431412ed0d40f56fbf430a6bbaa65ed032758f413b WHIRLPOOL 3264a7d8867bc58f759fb101f4e3705a83549aa28fd94f22963bef547783c10721869fc57fdda9c4f3039ce9088d65a4c01cbb172b72f2fa4a2bd0ad3fc674c0
+AUX zip-3.0-build.patch 923 SHA256 a66386c3a48019d8063a48c3610a28862412926f04a3b8f44662c6a87bb250f5 SHA512 c9cf162505938a0200eed0333849c2c4a3b59088a6549377a3af9ac89cd7a26fd388d09df55a6cd117e607c1a2f2960bc5e85f7384ff30565c2be01ce4ff442d WHIRLPOOL 44585744d662222c8d168cbf32b246e0ba5c4e911c06014bc9397455e1507ddce072d33895a30876c2f422d2e7c0951d5fdc02cd64babc7e9ad283cdd5724b41
+AUX zip-3.0-exec-stack.patch 548 SHA256 5e46b247107c71f34e00c93d27d9f5cf0812d1c8ffc171fc71addee715308ff5 SHA512 575516abe5ed633bdda22c3ee41109400360eef437671f9b658d7591bb8fa3b3854c1cd92d6396e47d91545b23ecbbc1218190192e39a60b00d6b7b5bb793eab WHIRLPOOL f777439907edb695956a6eb5c6934865575cdeca50fbcdfcc173f16b8fc6294306044245916d44eaf3083be7779e6bf308aac504c4ac99ce65ff0a8ef71c38f6
+AUX zip-3.0-format-security.patch 507 SHA256 c7f1b10f0693793954b0fdef4dea7a02ee63cb816c987bb56122899cc18ab697 SHA512 172e842e1cd43006713f570ceb8bd4998595282b973569d0e264bd9599375668a4045d691fc952a75088ad6f17e6ff90baf22606388f73ad2f2c0ac64d250fa2 WHIRLPOOL 0814288f8c665a58ff33ac2d6d603038f2c3bda30cc3e9b89222434adf8b880ee897336238aa1b17119a85f8a95f4dd103e6f0adbd3cc24c7fffb5f1c8eb1a51
+AUX zip-3.0-natspec.patch 6800 SHA256 999283d54dda78def1a21a023a5c2eb6a2f7ea407fab9718fb8334dcf2bc088a SHA512 67cf89ad016d51ec99e153cb05ee150318c18b3243b04daad0a9a0c0fce7e908bf7ed6fcd6361029bdd4da68759c22abf02dcbcca704b45a75367b1f42ebe964 WHIRLPOOL a2110dae96a3fe75522e5bfe93ce2144e600b698340021854112a5c3e03f2b288d3de22bd80fe51a469aa76ad92ad37cf0be5ec2356d0c3404bedd7b3caa11d6
+AUX zip-3.0-no-crypt.patch 1108 SHA256 e5bbe9ce46a3ab89e7dab3515cbe119c57f3330d289b7fca967c5da9b6844cff SHA512 89a99e694fa2ad289ecc93a514e7b408e4b9e01778e622b2c2928d98181de3823446e91085f401e3478afce1ccbf8775fb227c1908144889dd0106c2d7029b83 WHIRLPOOL 09b5f8e251dee686d46c49a7baf948c1f4911f48d3c21f08f82d9c5f89b1b8007d98544dbd8d5128eae28e044a4c82f607c0afccfe7c78681b6e0890d8f3cba0
+AUX zip-3.0-pic.patch 499 SHA256 5f64ef0fc1afc0256fdb3a503dda10de6c5df576b8bfad328de720c68f8b777a SHA512 a5f4381de900821c91bb164f580b7abe0bb61ebbbcb00e376f38763255bc647bda678fd66af59e9d56cb8bb7a2166553a77af79cfa75f3e0ea4dbc515b876b8e WHIRLPOOL cdec56f005c806b9d0f5a74486ea190db330d358a71e1c79cc5a425fb731f95c2f463a297fda6009be1d397b10a087b306ff51ee8a365c12b2746f56c05935fa
+AUX zip-3.0-zipnote-freeze.patch 2170 SHA256 2e0bd374a92c123578550ac559f4e601a51687ca2fe2e020e1c07b05368531b4 SHA512 c7db2d8c43d33bff4be6068c89603d2f67876f2b5ea72a01ad53f1baa42206c7a0a967f101a54092715f7fcc3ee2bf45a448e76a0ef55e64dc0fe0b204966367 WHIRLPOOL e6e6101d0536606e8a0358f92768e1b8c6e1a0c2a96c01c286ecf381cec28cb54d2edb63f862d8992cf5ce7f791b25c541f6b45b8d0601a7a584fa12717056d2
+DIST zip232.tar.gz 807180 SHA256 d0d3743f732a9baa162f80d0c4567b9c545b41a3385825042113810f2a56eb2f SHA512 706646115440597f361b77569ef0301a72c4c990ace5053d4c3b730f20ba0f08af2a8c4fe27c4df5808649cad52d477a6e36e731e82057d6b426a3983836fde2 WHIRLPOOL 3bf33c495c004089c06a17e4146b9542f21fdef6ee45368d9891893d84101ee62e0ca3190ce9eb318a5f1e02f8f4d94bcf361b90350190584d5e28833ffeb8da
+DIST zip30.zip 1287223 SHA256 7061ceac0407682b6dc54bb480347205f680f4e56cf34fe1423df2309f18968a SHA512 642ea6768d79adc1499251a3fb7bfc7ddc8d708699cbf9e0cfe849deda94165cb93e21dc2606bea1166ae5d8531e1e2cb056a7246bf2ab86ea7587bd4712d8d8 WHIRLPOOL 9e25cd9bcc25645667438019ab3423056a43b62d137c176e7aabad4ed8b7f7ddf6a7ccdedd9ada848c22d33b7f50f442910c39c4b2a5a188ad872109519cae7f
+EBUILD zip-2.32-r1.ebuild 1085 SHA256 6929806902b6ae032e6875213a508c43e9ecd8c8694382b931ce634f4489000e SHA512 28d8c49581ef41c537131643d5ef5a1b5229f181455cbcc9e84513a3784e48a65e51fdfb2c1e8ef0de6e6932f12d383c53f6a91f4599d4f3afd234d4df1d9e46 WHIRLPOOL 83a14b729e20403552fa3f4a9870b16c8b8fb4ea48fe064d610c9afa3a376acb383737f1ae89bb7bc8bcc42cb0a77103b55bdeda4b8cd0725d098e6891814c95
+EBUILD zip-3.0-r1.ebuild 1378 SHA256 2ed50e322e46882055ebe2db8e49a24f9c43cc4cc89859169740dfad20e4f110 SHA512 a3bd7c975178c44f0530f14361a7112ae1c1662e0914fc0252c591951b7e0a25f4ab498f263d0fee4fa916fa26d8fff59262cd05a45f52d12fef1f009b53ebc3 WHIRLPOOL e4e33113ea565d718701d1bff31e2008c9059c2d3cc29f09552d53ac52508bf07e9f41c036c7be76bb7c3d864c6588c5db020758fb79a639e855c657075a88de
+EBUILD zip-3.0-r2.ebuild 1620 SHA256 6abd5b78e3affcec967d89e3119324d2d74372e7cf4061b440ab3a56de1a4736 SHA512 05f7dc22394c58b22435bad6c7de359ad994ccc1665ddae55a556f9f9dff6e14136a1115532b70ccb1809c3cf4b0eba14d3aadd26a3323a0b53ff3b5b2510b14 WHIRLPOOL 6203220d249a1ae4ee1e66b0bf5be2588b847e840dba05145b1c839ea4b56f474641dd614e265ad86e531af67903d687482f076f264b98f6088dc987c5676149
+EBUILD zip-3.0-r3.ebuild 1720 SHA256 cfc04f3c790cce603bc701592dff0c2efee9a5fc47c473182bb52ca289902e67 SHA512 1910a94dc81acd0533d91b161a21b1270b4898708cdbb20bd9cf728add15456c23ba9f9b820e181beac7e77650c8cbabfabc1fc12993da281c9960884179cdf7 WHIRLPOOL 12ded356a5579b00e0f61c516dabd0ac9a813ea2b343bfbfd66a5701ed5b1a80179db94904ab85dc58f1e8b0864d134b44bb8961b08bd2b5379b6745148a6a38
+EBUILD zip-3.0.ebuild 1379 SHA256 3b6b5e399d2875407b4a8445c7bd0043d64e80cc90687983abd40578a7ca0b99 SHA512 c2954826d1e990097adcad8bc9925a5143b2e6eafea21bcf9e60c962af5db3eddfd607730ae9129dad1f8eaebfc9b5828b1e2f193e0a468a1b699bcd7d4fe712 WHIRLPOOL 7e9a6d3079c07e8137f11c34808b8e226ecec3617f3bff5ac6b124ff6c2f0064f4e1a00fa85bed3bfe7fcd2201021ae72766ca624d22858dacc6adf0aeb1d926
+MISC ChangeLog 2936 SHA256 204060e5158c91c88b6d5fa0faaa228aad798df660f308d8b78c6c1b86c71268 SHA512 5abb2b24f294bfdf79fdde2781c86767c2b898989de78785e9ea66bbb078c53df1e53a0bca655c0c1225d6eacd51e324419c5381a3a579b3202d060662934b1e WHIRLPOOL 7aee3fc102b5fbde31337f139c5ce0e382cb7bcd2e4e697c211ce97633e81d97f302dd519adab902698c01bd0370b95ac01f9debd5923e55e4b8401e718a10f0
+MISC ChangeLog-2015 13052 SHA256 458e506761fa34d0556105328eab52ead10a1a1871de74b352ebadca02e1e26a SHA512 215b1030ee2b704ead62c9d08016e6802cfa75163cf598ce371cccd815c7047b6eb1743df54f6e74c7cfda3d68d737c4beb2d61d761d2962a66ee7531573116c WHIRLPOOL 6c007e598b20dcca4863b5766032d9d97150b815cc22c8644b8f6b273de99ba1dc93cc74f10b9068f4da89456501bfac511eab55c3fefd59c01e30b5b84b15f4
+MISC metadata.xml 573 SHA256 37fd463f438c3eb58b729b66474d0a688cad78c26727f107ff76690f0fea9e88 SHA512 bd9d04efbaf530bd10d6641543984a3f5672de39c66538dd4c7a52684e8c6cf31111d3c8c0052e9958297a972c6b9f11131dd3f5d95af6db6ee9ca64c3ab5131 WHIRLPOOL a8c868054dd34c04f0f7007980ef69308346dd277cdb36721a0dad8fdf4f53d27083fda624fcf33d87a2f8cd2ca0f7d222b6df782e26ff4d2f38244cbcf1ba36
diff --git a/app-arch/zip/files/zip-2.3-unix_configure-pic.patch b/app-arch/zip/files/zip-2.3-unix_configure-pic.patch
new file mode 100644
index 000000000000..45b137b0ed85
--- /dev/null
+++ b/app-arch/zip/files/zip-2.3-unix_configure-pic.patch
@@ -0,0 +1,12 @@
+--- unix/configure.orig 2004-09-28 06:45:33.000000000 +0000
++++ unix/configure 2004-09-28 06:54:53.000000000 +0000
+@@ -29,6 +29,9 @@
+
+ echo Check if we can use asm code
+ OBJA=""
++piclib="$(echo | $CPP -dM $CFLAGS - | grep -i __pic__)"
++echo "Checking if compiler wants to create pic code"
++[ "$piclib" == "" ] && \
+ if eval "$CPP match.S > _match.s 2>/dev/null"; then
+ if test ! -s _match.s || grep error < _match.s > /dev/null; then
+ :
diff --git a/app-arch/zip/files/zip-2.31-exec-stack.patch b/app-arch/zip/files/zip-2.31-exec-stack.patch
new file mode 100644
index 000000000000..d3efbd902cb1
--- /dev/null
+++ b/app-arch/zip/files/zip-2.31-exec-stack.patch
@@ -0,0 +1,20 @@
+--- zip-2.31/crc_i386.S
++++ zip-2.31/crc_i386.S
+@@ -238,3 +238,7 @@
+ #endif /* i386 || _i386 || _I386 || __i386 */
+
+ #endif /* !USE_ZLIB */
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",@progbits
++#endif
+--- zip-2.31/match.S
++++ zip-2.31/match.S
+@@ -405,3 +405,7 @@
+ #endif /* i386 || _I386 || _i386 || __i386 */
+
+ #endif /* !USE_ZLIB */
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",@progbits
++#endif
diff --git a/app-arch/zip/files/zip-2.32-build.patch b/app-arch/zip/files/zip-2.32-build.patch
new file mode 100644
index 000000000000..61a2bae34b3f
--- /dev/null
+++ b/app-arch/zip/files/zip-2.32-build.patch
@@ -0,0 +1,89 @@
+respect build environment settings
+
+--- zip/unix/Makefile
++++ zip/unix/Makefile
+@@ -12,15 +12,15 @@
+
+ list: all
+
+-MAKE = make -f unix/Makefile
++MAKE := $(MAKE) -f unix/Makefile
+ SHELL = /bin/sh
+ LN = ln -s
+
+ # (to use the Gnu compiler, change cc to gcc in CC)
+-CC = cc
++CC ?= gcc
+ BIND = $(CC)
+ AS = $(CC) -c
+-CPP = /lib/cpp
++CPP ?= $(CC)
+ EXE =
+
+ # probably can change this to 'install' if you have it
+@@ -47,7 +47,7 @@
+ # LFLAGS1 flags after output file spec, before obj file list
+ # LFLAGS2 flags after obj file list (libraries, etc)
+ CFLAGS_NOOPT = -I. -DUNIX $(LOCAL_ZIP)
+-CFLAGS = -O2 $(CFLAGS_NOOPT)
++CFLAGS ?= -O2 $(CFLAGS_NOOPT)
+ LFLAGS1 =
+ LFLAGS2 = -s
+
+--- zip/unix/configure
++++ zip/unix/configure
+@@ -13,52 +13,13 @@
+
+ CC=${1-cc}
+-CFLAGS=${2-"-I. -DUNIX"}
+-LFLAGS1=""
++CFLAGS="${2--I. -DUNIX} ${CFLAGS} ${CPPFLAGS}"
++LFLAGS1="${LDFLAGS}"
+ LN="ln -s"
+-echo "Check C compiler type (optimization option)"
+-cat > conftest.c << _EOF_
+-int main()
+-{
+-#ifndef __SUNPRO_C
+- bad code
+-#endif
+- return 0;
+-}
+-_EOF_
+-$CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
+-if test $? -eq 0; then
+- echo ' Sun C (-xO3)'
+- CFLAGS="${CFLAGS} -xO3"
+-else
+- cat > conftest.c << _EOF_
+-int main()
+-{
+-#ifndef __DECC
+- bad code
+-#endif
+- return 0;
+-}
+-_EOF_
+- $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
+- if test $? -eq 0; then
+- echo ' DEC C (-O3)'
+- CFLAGS="${CFLAGS} -O3"
+- else
+- echo ' Other (gcc?) (-O2)'
+- CFLAGS="${CFLAGS} -O2"
+- fi
+-fi
+
+ echo Check for the C preprocessor
+ # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.
+ CPP="${CC} -E"
+ # solaris as(1) needs -P, maybe others as well ?
+-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
+-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
+-[ -f /lib/cpp ] && CPP=/lib/cpp
+-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
+-[ -f /xenix ] && CPP="${CC} -E"
+-[ -f /lynx.os ] && CPP="${CC} -E"
+
+ echo "#include <stdio.h>" > conftest.c
+ $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E"
diff --git a/app-arch/zip/files/zip-3.0-build.patch b/app-arch/zip/files/zip-3.0-build.patch
new file mode 100644
index 000000000000..595303cc48d4
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-build.patch
@@ -0,0 +1,36 @@
+respect build environment settings
+
+--- zip/unix/configure
++++ zip/unix/configure
+@@ -18,7 +18,7 @@
+
+ CC=${1-cc}
+ CFLAGS=${2-"-I. -DUNIX"}
+-LFLAGS1=''
++LFLAGS1="${LDFLAGS}"
+ LFLAGS2=''
+ LN="ln -s"
+
+@@ -118,7 +118,7 @@ _EOF_
+ fi
+
+ # optimization flags
+-if test -n "${CFLAGS_OPT}"; then
++if false; then
+ CFLAGS="${CFLAGS} ${CFLAGS_OPT}"
+ CFLAGS_BZ="${CFLAGS_BZ} ${CFLAGS_OPT}"
+ fi
+@@ -220,13 +220,6 @@ fi
+ echo Check for the C preprocessor
+ # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.
+ CPP="${CC} -E"
+-# solaris as(1) needs -P, maybe others as well ?
+-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
+-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
+-[ -f /lib/cpp ] && CPP=/lib/cpp
+-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
+-[ -f /xenix ] && CPP="${CC} -E"
+-[ -f /lynx.os ] && CPP="${CC} -E"
+
+ echo "#include <stdio.h>" > conftest.c
+ $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E"
diff --git a/app-arch/zip/files/zip-3.0-exec-stack.patch b/app-arch/zip/files/zip-3.0-exec-stack.patch
new file mode 100644
index 000000000000..80719c961298
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-exec-stack.patch
@@ -0,0 +1,22 @@
+add proper GNU stack markings so we dont get the default: executable
+
+--- zip-2.31/crc_i386.S
++++ zip-2.31/crc_i386.S
+@@ -238,3 +238,7 @@
+ #endif /* i386 || _i386 || _I386 || __i386 */
+
+ #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */
++
++#if defined __ELF__ && defined __linux__
++.section .note.GNU-stack,"",@progbits
++#endif
+--- zip-2.31/match.S
++++ zip-2.31/match.S
+@@ -405,3 +405,7 @@
+ #endif /* i386 || _I386 || _i386 || __i386 */
+
+ #endif /* !USE_ZLIB */
++
++#if defined __ELF__ && defined __linux__
++.section .note.GNU-stack,"",@progbits
++#endif
diff --git a/app-arch/zip/files/zip-3.0-format-security.patch b/app-arch/zip/files/zip-3.0-format-security.patch
new file mode 100644
index 000000000000..1edc2d6a1b88
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-format-security.patch
@@ -0,0 +1,20 @@
+--- zip.c
++++ zip.c
+@@ -1028,7 +1028,7 @@
+
+ for (i = 0; i < sizeof(text)/sizeof(char *); i++)
+ {
+- printf(text[i]);
++ fputs(text[i], stdout);
+ putchar('\n');
+ }
+ #ifdef DOS
+@@ -1225,7 +1225,7 @@
+ CR_MAJORVER, CR_MINORVER, CR_BETA_VER, CR_VERSION_DATE);
+ for (i = 0; i < sizeof(cryptnote)/sizeof(char *); i++)
+ {
+- printf(cryptnote[i]);
++ fputs(cryptnote[i], stdout);
+ putchar('\n');
+ }
+ ++i; /* crypt support means there IS at least one compilation option */
diff --git a/app-arch/zip/files/zip-3.0-natspec.patch b/app-arch/zip/files/zip-3.0-natspec.patch
new file mode 100644
index 000000000000..1dfce09d1331
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-natspec.patch
@@ -0,0 +1,214 @@
+This patch makes zip use libnatspec to recode file names is national charset.
+Initially this patch was written for altlinux:
+http://sisyphus.ru/ru/srpm/Sisyphus/zip/patches
+
+Later it was a bit improved and improved version was posted here (in Russian):
+http://www.opennet.ru/tips/info/2494.shtml
+
+Also I've added natspec support to output of zipnote (thank vapier for notice).
+
+Gentoo reference:
+https://bugs.gentoo.org/show_bug.cgi?id=275244
+
+--
+pva@gentoo.org
+
+=== modified file 'fileio.c'
+--- fileio.c 2010-12-22 13:02:43 +0000
++++ fileio.c 2010-12-22 13:03:00 +0000
+@@ -929,7 +929,7 @@
+ }
+ if ((zname = in2ex(iname)) == NULL)
+ return ZE_MEM;
+-#ifdef UNICODE_SUPPORT
++#if defined(UNICODE_SUPPORT) && !defined(UNIX)
+ /* Convert name to display or OEM name */
+ oname = local_to_display_string(iname);
+ #else
+
+=== modified file 'globals.c'
+--- globals.c 2010-12-22 13:02:43 +0000
++++ globals.c 2010-12-22 13:03:00 +0000
+@@ -32,7 +32,7 @@
+ int scanimage = 1; /* 1=scan through image files */
+ #endif
+ int method = BEST; /* one of BEST, DEFLATE (only), or STORE (only) */
+-int dosify = 0; /* 1=make new entries look like MSDOS */
++int dosify = 1; /* 1=make new entries look like MSDOS */
+ int verbose = 0; /* 1=report oddities in zip file structure */
+ int fix = 0; /* 1=fix the zip file, 2=FF, 3=ZipNote */
+ int filesync = 0; /* 1=file sync, delete entries not on file system */
+
+=== modified file 'unix/Makefile'
+--- unix/Makefile 2010-12-22 13:02:43 +0000
++++ unix/Makefile 2010-12-22 15:43:40 +0000
+@@ -38,7 +38,7 @@
+ MANFLAGS = 644
+
+ # target directories - where to install executables and man pages to
+-prefix = /usr/local
++prefix = /usr
+ BINDIR = $(prefix)/bin
+ MANEXT=1
+ MANDIR = $(prefix)/man/man$(MANEXT)
+@@ -61,6 +61,7 @@
+ CFLAGS = -O2 $(CFLAGS_NOOPT)
+ LFLAGS1 =
+ LFLAGS2 = -s
++LDADD = -lnatspec
+
+ # object file lists
+ OBJZ = zip.o zipfile.o zipup.o fileio.o util.o globals.o crypt.o ttyio.o \
+@@ -125,9 +126,9 @@
+ zipsman: $(ZIPS) $(ZIPMANUALs)
+
+ zip$E: $(OBJZ) $(OBJI) $(OBJA) $(LIB_BZ)
+- $(BIND) -o zip$E $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2)
++ $(BIND) -o zip$E $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2) $(LDADD)
+ zipnote$E: $(OBJN)
+- $(BIND) -o zipnote$E $(LFLAGS1) $(OBJN) $(LFLAGS2)
++ $(BIND) -o zipnote$E $(LFLAGS1) $(OBJN) $(LFLAGS2) $(LDADD)
+ zipcloak$E: $(OBJC) $(OCRCTB)
+ $(BIND) -o zipcloak$E $(LFLAGS1) $(OBJC) $(LFLAGS2)
+ zipsplit$E: $(OBJS)
+
+=== modified file 'unix/osdep.h'
+--- unix/osdep.h 2010-12-22 13:02:43 +0000
++++ unix/osdep.h 2010-12-22 15:45:29 +0000
+@@ -78,3 +78,6 @@
+ #if !defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME)
+ # define USE_EF_UT_TIME
+ #endif
++
++/* Set Windows code as archive type */
++# define OS_CODE 0xb00
+
+=== modified file 'unix/unix.c'
+--- unix/unix.c 2010-12-22 13:02:43 +0000
++++ unix/unix.c 2010-12-22 13:03:00 +0000
+@@ -14,6 +14,11 @@
+
+ #include <time.h>
+
++#ifdef UNIX
++# include <natspec.h>
++# include <locale.h>
++#endif
++
+ #if defined(MINIX) || defined(__mpexl)
+ # ifdef S_IWRITE
+ # undef S_IWRITE
+@@ -60,6 +65,7 @@
+
+ /* Local functions */
+ local char *readd OF((DIR *));
++local const char *oem_charset = NULL;
+
+
+ #ifdef NO_DIR /* for AT&T 3B1 */
+@@ -262,6 +268,16 @@
+ if (!pathput)
+ t = last(t, PATH_END);
+
++#ifdef UNIX
++ if (!oem_charset) {
++ setlocale(LC_CTYPE, "");
++ oem_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, "");
++ }
++ /* Convert to internal encoding */
++ if ((n = natspec_convert(t, oem_charset, 0, 0)) == NULL)
++ return NULL;
++ return n;
++#else
+ /* Malloc space for internal name and copy it */
+ if ((n = malloc(strlen(t) + 1)) == NULL)
+ return NULL;
+@@ -269,6 +285,7 @@
+
+ if (dosify)
+ msname(n);
++#endif
+
+ #ifdef EBCDIC
+ strtoasc(n, n); /* here because msname() needs native coding */
+@@ -289,8 +306,19 @@
+ {
+ char *x; /* external file name */
+
++#ifdef UNIX
++ if (!oem_charset) {
++ oem_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, "");
++ setlocale(LC_CTYPE, "");
++ }
++ /* Convert to internal encoding */
++ if ((x = natspec_convert(n, 0, oem_charset, 0)) == NULL)
++ return NULL;
++ return x;
++#else
+ if ((x = malloc(strlen(n) + 1 + PAD)) == NULL)
+ return NULL;
++#endif
+ #ifdef EBCDIC
+ strtoebc(x, n);
+ #else
+
+=== modified file 'zip.c'
+--- zip.c 2010-12-22 13:02:43 +0000
++++ zip.c 2010-12-22 13:03:00 +0000
+@@ -2025,6 +2025,7 @@
+ #endif /* ?MACOS */
+ {"J", "junk-sfx", o_NO_VALUE, o_NOT_NEGATABLE, 'J', "strip self extractor from archive"},
+ {"k", "DOS-names", o_NO_VALUE, o_NOT_NEGATABLE, 'k', "force use of 8.3 DOS names"},
++ {"K", "no DOS-names",o_NO_VALUE, o_NOT_NEGATABLE, 'K', "no use 8.3 DOS names"},
+ {"l", "to-crlf", o_NO_VALUE, o_NOT_NEGATABLE, 'l', "convert text file line ends - LF->CRLF"},
+ {"ll", "from-crlf", o_NO_VALUE, o_NOT_NEGATABLE, o_ll, "convert text file line ends - CRLF->LF"},
+ {"lf", "logfile-path",o_REQUIRED_VALUE, o_NOT_NEGATABLE, o_lf, "log to log file at path (default overwrite)"},
+@@ -2289,7 +2290,7 @@
+ dispose = 0; /* 1=remove files after put in zip file */
+ pathput = 1; /* 1=store path with name */
+ method = BEST; /* one of BEST, DEFLATE (only), or STORE (only) */
+- dosify = 0; /* 1=make new entries look like MSDOS */
++ dosify = 1; /* 1=make new entries look like MSDOS */
+ verbose = 0; /* 1=report oddities in zip file structure */
+ fix = 0; /* 1=fix the zip file */
+ adjust = 0; /* 1=adjust offsets for sfx'd file (keep preamble) */
+@@ -2859,6 +2860,8 @@
+ junk_sfx = 1; break;
+ case 'k': /* Make entries using DOS names (k for Katz) */
+ dosify = 1; break;
++ case 'K': /* Make entries using DOS names (K for Kompat) */
++ dosify = 0; break;
+ case 'l': /* Translate end-of-line */
+ translate_eol = 1; break;
+ case o_ll:
+
+=== modified file 'zipnote.c'
+--- zipnote.c 2010-12-22 13:02:43 +0000
++++ zipnote.c 2010-12-22 15:42:45 +0000
+@@ -21,6 +21,11 @@
+ #include "revision.h"
+ #include <signal.h>
+
++#ifdef UNIX
++# include <natspec.h>
++# include <locale.h>
++#endif
++
+ /* Calculate size of static line buffer used in write (-w) mode. */
+ #define WRBUFSIZ 2047
+ /* The line buffer size should be at least as large as FNMAX. */
+@@ -537,7 +542,13 @@
+ {
+ for (z = zfiles; z != NULL; z = z->nxt)
+ {
++#ifdef UNIX
++ char *oem_charset = NULL;
++ oem_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, "");
++ printf("%c %s\n", MARK, natspec_convert(z->zname, 0, oem_charset, 0));
++#else
+ printf("%c %s\n", MARK, z->zname);
++#endif
+ putclean(z->comment, z->com);
+ printf("%c%s\n", MARK, MARKE);
+ }
+
diff --git a/app-arch/zip/files/zip-3.0-no-crypt.patch b/app-arch/zip/files/zip-3.0-no-crypt.patch
new file mode 100644
index 000000000000..2858b51ec2c9
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-no-crypt.patch
@@ -0,0 +1,57 @@
+fix building when NO_CRYPT is used
+
+forward ported from zip-2.32
+
+http://bugs.gentoo.org/238398
+
+--- zip.c
++++ zip.c
+@@ -3452,6 +3452,9 @@ char **argv; /* command line tokens */
+
+ /* Key not yet specified. If needed, get/verify it now. */
+ if (key_needed) {
++#if !CRYPT
++ ZIPERR(ZE_PARMS, "encryption not supported");
++#else /* CRYPT */
+ if ((key = malloc(IZ_PWLEN+1)) == NULL) {
+ ZIPERR(ZE_MEM, "was getting encryption password");
+ }
+@@ -3478,6 +3481,7 @@ char **argv; /* command line tokens */
+ if (r) {
+ ZIPERR(ZE_PARMS, "password verification failed");
+ }
++#endif
+ }
+ if (key) {
+ /* if -P "" could get here */
+--- zipcloak.c
++++ zipcloak.c
+@@ -744,6 +744,28 @@ struct option_struct far options[] = {
+
+ int main OF((void));
+
++void zipmessage_nl(a, nl)
++ZCONST char *a;
++int nl;
++{
++}
++
++void zipmessage(a, b)
++ZCONST char *a, *b;
++{
++}
++
++int set_filetype(out_path)
++ char *out_path;
++{
++}
++
++int rename_split(temp_name, out_path)
++ char *temp_name;
++ char *out_path;
++{
++}
++
+ void zipwarn(msg1, msg2)
+ ZCONST char *msg1, *msg2;
+ {
diff --git a/app-arch/zip/files/zip-3.0-pic.patch b/app-arch/zip/files/zip-3.0-pic.patch
new file mode 100644
index 000000000000..b4c53de694f7
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-pic.patch
@@ -0,0 +1,15 @@
+if our toolchain generates PIC by default, then do not use the hand written
+assembly files as none of it is PIC friendly.
+
+--- unix/configure
++++ unix/configure
+@@ -29,6 +29,9 @@
+ echo Check if we can use asm code
+ OBJA=""
+ OCRCU8=""
++piclib="$(echo | $CPP -dM $CFLAGS - | grep -i __pic__)"
++echo "Checking if compiler wants to create pic code"
++[ "$piclib" == "" ] && \
+ if eval "$CPP match.S > _match.s 2>/dev/null"; then
+ if test ! -s _match.s || grep error < _match.s > /dev/null; then
+ :
diff --git a/app-arch/zip/files/zip-3.0-zipnote-freeze.patch b/app-arch/zip/files/zip-3.0-zipnote-freeze.patch
new file mode 100644
index 000000000000..cfe78f0a100a
--- /dev/null
+++ b/app-arch/zip/files/zip-3.0-zipnote-freeze.patch
@@ -0,0 +1,61 @@
+diff -dupr zip30-old/fileio.c zip30/fileio.c
+--- zip30-old/fileio.c 2008-05-28 20:13:24.000000000 +0200
++++ zip30/fileio.c 2012-06-12 17:30:29.794547493 +0200
+@@ -3502,7 +3502,7 @@ zwchar *local_to_wide_string(local_strin
+ if ((wc_string = (wchar_t *)malloc((wsize + 1) * sizeof(wchar_t))) == NULL) {
+ ZIPERR(ZE_MEM, "local_to_wide_string");
+ }
+- wsize = mbstowcs(wc_string, local_string, strlen(local_string) + 1);
++ wsize = mbstowcs(wc_string, local_string, wsize + 1);
+ wc_string[wsize] = (wchar_t) 0;
+
+ /* in case wchar_t is not zwchar */
+diff -dupr zip30-old/zipfile.c zip30/zipfile.c
+--- zip30/zipfile.c 2008-07-01 00:15:30.000000000 +0200
++++ zip30/zipfile.c 2012-06-10 01:59:42.571706181 +0200
+@@ -5406,6 +5406,8 @@ int putlocal(z, rewrite)
+ if (z->flg & UTF8_BIT) {
+ /* If this flag is set, then restore UTF-8 as path name */
+ use_uname = 1;
++ tempzn -= nam;
+ nam = strlen(z->uname);
++ tempzn += nam;
+ } else {
+ /* use extra field */
+ add_Unicode_Path_local_extra_field(z);
+@@ -5647,7 +5650,9 @@ int putcentral(z)
+ if (z->flg & UTF8_BIT) {
+ /* If this flag is set, then restore UTF-8 as path name */
+ use_uname = 1;
++ tempzn -= nam;
+ nam = strlen(z->uname);
++ tempzn += nam;
+ } else {
+ add_Unicode_Path_cen_extra_field(z);
+ }
+diff -dupr zip30/zipnote.c zip30/zipnote.c
+--- zip30/zipnote.c 2008-05-08 04:17:08.000000000 +0200
++++ zip30/zipnote.c 2012-06-10 02:33:36.372663528 +0200
+@@ -575,6 +575,13 @@ char **argv; /* command line
+ strcpy(z->iname, a+2);
+ #endif
+
++#ifdef UNICODE_SUPPORT
++#define UTF8_BIT (1 << 11)
++ if (using_utf8) {
++ z->uname = z->iname;
++ }
++#endif
++
+ /*
+ * Don't update z->nam here, we need the old value a little later.....
+ * The update is handled in zipcopy().
+@@ -661,7 +668,7 @@ char **argv; /* command line
+ if ((r = zipcopy(z)) != ZE_OK)
+ ziperr(r, "was copying an entry");
+ }
+- fclose(x);
++ fclose(in_file);
+
+ /* Write central directory and end of central directory with new comments */
+ if ((c = zftello(y)) == (zoff_t)-1) /* get start of central */
diff --git a/app-arch/zip/metadata.xml b/app-arch/zip/metadata.xml
new file mode 100644
index 000000000000..71d52343602a
--- /dev/null
+++ b/app-arch/zip/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <longdescription>Application that supports the Info Zip series of encryption.</longdescription>
+ <use>
+ <flag name="natspec">Use <pkg>dev-libs/libnatspec</pkg> to correctly decode non-ascii file names archived in Windows.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">infozip</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/zip/zip-2.32-r1.ebuild b/app-arch/zip/zip-2.32-r1.ebuild
new file mode 100644
index 000000000000..7d5eb0a73215
--- /dev/null
+++ b/app-arch/zip/zip-2.32-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit toolchain-funcs eutils flag-o-matic
+
+DESCRIPTION="Info ZIP (encryption support)"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="ftp://ftp.info-zip.org/pub/infozip/src/zip${PV//.}.tar.gz"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE="crypt"
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/zip-2.3-unix_configure-pic.patch
+ epatch "${FILESDIR}"/${PN}-2.31-exec-stack.patch
+ epatch "${FILESDIR}"/${PN}-2.32-build.patch
+}
+
+src_compile() {
+ tc-export CC CPP
+ use crypt || append-flags -DNO_CRYPT
+ append-lfs-flags
+ emake -f unix/Makefile generic || die
+}
+
+src_install() {
+ dobin zip zipnote zipsplit || die
+ doman man/zip.1
+ dosym zip.1 /usr/share/man/man1/zipnote.1
+ dosym zip.1 /usr/share/man/man1/zipsplit.1
+ if use crypt ; then
+ dobin zipcloak || die
+ dosym zip.1 /usr/share/man/man1/zipcloak.1
+ fi
+ dodoc BUGS CHANGES MANUAL README TODO WHATSNEW WHERE proginfo/*.txt
+}
diff --git a/app-arch/zip/zip-3.0-r1.ebuild b/app-arch/zip/zip-3.0-r1.ebuild
new file mode 100644
index 000000000000..739f4b6aafdf
--- /dev/null
+++ b/app-arch/zip/zip-3.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+inherit toolchain-funcs eutils flag-o-matic
+
+MY_P="${PN}${PV//.}"
+DESCRIPTION="Info ZIP (encryption support)"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="mirror://sourceforge/infozip/${MY_P}.zip"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux"
+IUSE="bzip2 crypt natspec unicode"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ natspec? ( dev-libs/libnatspec )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.0-no-crypt.patch #238398
+ epatch "${FILESDIR}"/${PN}-3.0-pic.patch
+ epatch "${FILESDIR}"/${PN}-3.0-exec-stack.patch
+ epatch "${FILESDIR}"/${PN}-3.0-build.patch
+ use natspec && epatch "${FILESDIR}"/${PN}-3.0-natspec.patch #275244
+}
+
+src_compile() {
+ use bzip2 || append-flags -DNO_BZIP2_SUPPORT
+ use crypt || append-flags -DNO_CRYPT
+ use unicode || append-flags -DNO_UNICODE_SUPPORT
+ emake \
+ CC="$(tc-getCC)" \
+ LOCAL_ZIP="${CFLAGS} ${CPPFLAGS}" \
+ -f unix/Makefile generic \
+ || die
+}
+
+src_install() {
+ dobin zip zipnote zipsplit || die
+ doman man/zip{,note,split}.1
+ if use crypt ; then
+ dobin zipcloak || die
+ doman man/zipcloak.1
+ fi
+ dodoc BUGS CHANGES README* TODO WHATSNEW WHERE proginfo/*.txt
+}
diff --git a/app-arch/zip/zip-3.0-r2.ebuild b/app-arch/zip/zip-3.0-r2.ebuild
new file mode 100644
index 000000000000..c7965cd8afc7
--- /dev/null
+++ b/app-arch/zip/zip-3.0-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+inherit toolchain-funcs eutils flag-o-matic
+
+MY_P="${PN}${PV//.}"
+DESCRIPTION="Info ZIP (encryption support)"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="mirror://sourceforge/infozip/${MY_P}.zip"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux"
+IUSE="bzip2 crypt natspec unicode"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ natspec? ( dev-libs/libnatspec )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.0-no-crypt.patch #238398
+ epatch "${FILESDIR}"/${PN}-3.0-pic.patch
+ epatch "${FILESDIR}"/${PN}-3.0-exec-stack.patch
+ epatch "${FILESDIR}"/${PN}-3.0-build.patch
+ use natspec && epatch "${FILESDIR}"/${PN}-3.0-natspec.patch #275244
+}
+
+src_configure() {
+ append-cppflags \
+ -DLARGE_FILE_SUPPORT \
+ -DUIDGID_NOT_16BIT \
+ -D$(usex bzip2 '' NO)BZIP2_SUPPORT \
+ -D$(usex crypt '' NO)CRYPT \
+ -D$(usex unicode '' NO)UNICODE_SUPPORT
+ # Third arg disables bzip2 logic as we handle it ourselves above.
+ sh ./unix/configure "$(tc-getCC)" "-I. -DUNIX ${CFLAGS} ${CPPFLAGS}" "${T}" || die
+ if use bzip2 ; then
+ sed -i -e "s:LFLAGS2=:&'-lbz2 ':" flags || die
+ fi
+}
+
+src_compile() {
+ emake \
+ CPP="$(tc-getCPP)" \
+ -f unix/Makefile generic
+}
+
+src_install() {
+ dobin zip zipnote zipsplit
+ doman man/zip{,note,split}.1
+ if use crypt ; then
+ dobin zipcloak
+ doman man/zipcloak.1
+ fi
+ dodoc BUGS CHANGES README* TODO WHATSNEW WHERE proginfo/*.txt
+}
diff --git a/app-arch/zip/zip-3.0-r3.ebuild b/app-arch/zip/zip-3.0-r3.ebuild
new file mode 100644
index 000000000000..ac5bf2612082
--- /dev/null
+++ b/app-arch/zip/zip-3.0-r3.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+inherit toolchain-funcs eutils flag-o-matic
+
+MY_P="${PN}${PV//.}"
+DESCRIPTION="Info ZIP (encryption support)"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="mirror://sourceforge/infozip/${MY_P}.zip"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux"
+IUSE="bzip2 crypt natspec unicode"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ natspec? ( dev-libs/libnatspec )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-crypt.patch #238398
+ epatch "${FILESDIR}"/${P}-pic.patch
+ epatch "${FILESDIR}"/${P}-exec-stack.patch #122849
+ epatch "${FILESDIR}"/${P}-build.patch #200995
+ epatch "${FILESDIR}"/${P}-zipnote-freeze.patch #322047
+ epatch "${FILESDIR}"/${P}-format-security.patch #512414
+ use natspec && epatch "${FILESDIR}"/${PN}-3.0-natspec.patch #275244
+}
+
+src_configure() {
+ append-cppflags \
+ -DLARGE_FILE_SUPPORT \
+ -DUIDGID_NOT_16BIT \
+ -D$(usex bzip2 '' NO)BZIP2_SUPPORT \
+ -D$(usex crypt '' NO)CRYPT \
+ -D$(usex unicode '' NO)UNICODE_SUPPORT
+ # Third arg disables bzip2 logic as we handle it ourselves above.
+ sh ./unix/configure "$(tc-getCC)" "-I. -DUNIX ${CFLAGS} ${CPPFLAGS}" "${T}" || die
+ if use bzip2 ; then
+ sed -i -e "s:LFLAGS2=:&'-lbz2 ':" flags || die
+ fi
+}
+
+src_compile() {
+ emake \
+ CPP="$(tc-getCPP)" \
+ -f unix/Makefile generic
+}
+
+src_install() {
+ dobin zip zipnote zipsplit
+ doman man/zip{,note,split}.1
+ if use crypt ; then
+ dobin zipcloak
+ doman man/zipcloak.1
+ fi
+ dodoc BUGS CHANGES README* TODO WHATSNEW WHERE proginfo/*.txt
+}
diff --git a/app-arch/zip/zip-3.0.ebuild b/app-arch/zip/zip-3.0.ebuild
new file mode 100644
index 000000000000..24708dc83140
--- /dev/null
+++ b/app-arch/zip/zip-3.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit toolchain-funcs eutils flag-o-matic
+
+MY_P="${PN}${PV//.}"
+DESCRIPTION="Info ZIP (encryption support)"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="mirror://sourceforge/infozip/${MY_P}.zip"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="bzip2 crypt unicode"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-3.0-no-crypt.patch #238398
+ epatch "${FILESDIR}"/${PN}-3.0-pic.patch
+ epatch "${FILESDIR}"/${PN}-3.0-exec-stack.patch
+ epatch "${FILESDIR}"/${PN}-3.0-build.patch
+}
+
+src_compile() {
+ use bzip2 || append-flags -DNO_BZIP2_SUPPORT
+ use crypt || append-flags -DNO_CRYPT
+ use unicode || append-flags -DNO_UNICODE_SUPPORT
+ emake \
+ CC="$(tc-getCC)" \
+ LOCAL_ZIP="${CFLAGS} ${CPPFLAGS}" \
+ -f unix/Makefile generic \
+ || die
+}
+
+src_install() {
+ dobin zip zipnote zipsplit || die
+ doman man/zip{,note,split}.1
+ if use crypt ; then
+ dobin zipcloak || die
+ doman man/zipcloak.1
+ fi
+ dodoc BUGS CHANGES README* TODO WHATSNEW WHERE proginfo/*.txt
+}