summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2010-12-22 16:50:38 +0000
committerPeter Volkov <pva@gentoo.org>2010-12-22 16:50:38 +0000
commit36572fc378fc1620bb348885326ffecc9fd16381 (patch)
treeb9bb45eff71f9afc8011ac967d1c512d063165ce /app-arch/zip
parentAdded patch to use libnatspec to fix interoperability with Windows, bug #275244. (diff)
downloadhistorical-36572fc378fc1620bb348885326ffecc9fd16381.tar.gz
historical-36572fc378fc1620bb348885326ffecc9fd16381.tar.bz2
historical-36572fc378fc1620bb348885326ffecc9fd16381.zip
Added patch to use libnatspec to fix interoperability with Windows, bug #275244.
Package-Manager: portage-2.1.9.25/cvs/Linux x86_64
Diffstat (limited to 'app-arch/zip')
-rw-r--r--app-arch/zip/ChangeLog9
-rw-r--r--app-arch/zip/Manifest16
-rw-r--r--app-arch/zip/files/zip-3.0-natspec.patch214
-rw-r--r--app-arch/zip/metadata.xml7
-rw-r--r--app-arch/zip/zip-3.0-r1.ebuild51
5 files changed, 284 insertions, 13 deletions
diff --git a/app-arch/zip/ChangeLog b/app-arch/zip/ChangeLog
index fa87ccf59ead..84801a470c4d 100644
--- a/app-arch/zip/ChangeLog
+++ b/app-arch/zip/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-arch/zip
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/zip/ChangeLog,v 1.83 2010/01/01 19:47:40 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/zip/ChangeLog,v 1.84 2010/12/22 16:50:38 pva Exp $
+
+*zip-3.0-r1 (22 Dec 2010)
+
+ 22 Dec 2010; Peter Volkov <pva@gentoo.org> +zip-3.0-r1.ebuild,
+ +files/zip-3.0-natspec.patch:
+ Added patch to use libnatspec to fix interoperability with Windows, bug
+ #275244.
01 Jan 2010; Christian Faulhammer <fauli@gentoo.org> zip-3.0.ebuild:
Transfer Prefix keywords
diff --git a/app-arch/zip/Manifest b/app-arch/zip/Manifest
index d40c5d77ee82..ff8527d85ee7 100644
--- a/app-arch/zip/Manifest
+++ b/app-arch/zip/Manifest
@@ -1,23 +1,15 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX zip-2.3-unix_configure-pic.patch 444 RMD160 8fd81ff732abe0e6189cd593c98e0055a11dca36 SHA1 c08486c683a9a8d02dbb0d500f421b07c0bcc704 SHA256 3e348be7890f21280fceab6cb2a87f3020b08a31608ab93d1b5a53667760e556
AUX zip-2.31-exec-stack.patch 407 RMD160 a27f0112dbbda418feef97b66240442190e8b5d7 SHA1 3043e8150222749b6f05fc10f8ab1c15da21c8d0 SHA256 108686d8854096422bd4895690a37202aee66757d0d2b43afa16d9fb914cbb29
AUX zip-2.32-build.patch 2003 RMD160 3356051c53465fa70015818b6c8c364489bb5bf0 SHA1 34492ef0e226ff7912de01c9266580b148ff54f1 SHA256 3e4b94015c1448c8769d7154b308bd986e1d0e6e514da151d658d1b8ba3a774c
AUX zip-3.0-build.patch 923 RMD160 7790c9e283cfd7b121f7bf7bcfdaed355a0c6d46 SHA1 2ac8bcaa53f1f506c3743980f5852b696233c0ac SHA256 a66386c3a48019d8063a48c3610a28862412926f04a3b8f44662c6a87bb250f5
AUX zip-3.0-exec-stack.patch 548 RMD160 f05b881c81168f780301db44aaa51f317b460bb3 SHA1 a2b624a522a0d1fec1ab1d703dfabed5aa90850b SHA256 5e46b247107c71f34e00c93d27d9f5cf0812d1c8ffc171fc71addee715308ff5
+AUX zip-3.0-natspec.patch 6800 RMD160 0861559e9ca643ef513637246c4714914e50d24c SHA1 3280374b3f844306aa9a3468cba4b132d3249999 SHA256 999283d54dda78def1a21a023a5c2eb6a2f7ea407fab9718fb8334dcf2bc088a
AUX zip-3.0-no-crypt.patch 1108 RMD160 f7799807ae9ea0b65fa2bc6c735f7a99133bd6b8 SHA1 02d255e63f7a1c61d84b19e16b6565491fd5027a SHA256 e5bbe9ce46a3ab89e7dab3515cbe119c57f3330d289b7fca967c5da9b6844cff
AUX zip-3.0-pic.patch 499 RMD160 481d78e842bc08b776c90c4b2a9e13bfce0fcadb SHA1 624b216446ff7208701409b3027e84030ec95145 SHA256 5f64ef0fc1afc0256fdb3a503dda10de6c5df576b8bfad328de720c68f8b777a
DIST zip232.tar.gz 807180 RMD160 6b9326c8a60bc6bf08825e416140fd0ca8a6a7f1 SHA1 5bc562bf95d9aee0cb6625e6038898e1f191a4aa SHA256 d0d3743f732a9baa162f80d0c4567b9c545b41a3385825042113810f2a56eb2f
DIST zip30.zip 1287223 RMD160 88f34a3cc15ea153952289289f3d70f9a8a41f47 SHA1 4f244128ee8fa3fc07eedfee3d4ac634dcabd492 SHA256 7061ceac0407682b6dc54bb480347205f680f4e56cf34fe1423df2309f18968a
EBUILD zip-2.32-r1.ebuild 1188 RMD160 d6900f122f833e17b91b362f528bdc47da740dc8 SHA1 77d6ce5f5b6e80a5df604a0029892eecfb7a7d03 SHA256 c2055e9c02652dc728926d7fd5aace4673204b12abb155ccd0af1f11b1fd637d
+EBUILD zip-3.0-r1.ebuild 1354 RMD160 f2ec0dd72627f29a9c90b7136f5e38a45e0e1340 SHA1 f920960e1fbfbdc2a61c114e4ebee3bb91f27bfb SHA256 2c1992dae150e038d0b3872b25a8eebbb30774c2b1dd900b439ed44a3d8ab658
EBUILD zip-3.0.ebuild 1493 RMD160 a6f5657b1d431a59a3b8323ff1316b7e613bffcf SHA1 7e2df743717788ff78f4139ba7d07a81e65ef949 SHA256 9514836f62da469c48a8e7cf619b92aa8637140655274ce4c632064927119e43
-MISC ChangeLog 9288 RMD160 6c8a0b97168953486f9dabc4a2a1a71db3963fcf SHA1 c3f70dd7317c6bce6e950cecd73e61bf69ffe859 SHA256 28873406ffce25bc259124876a443dc69128473784ae5ac891124b8c498291db
-MISC metadata.xml 260 RMD160 43cb7ced9f55009bba29a4017d2ee88dab5ab83f SHA1 94674a402b77f6a586b2fc1ad889b8ac9e48b175 SHA256 b937624b5672a3a8f418d773a2dff2c4228888b64f40e2ca3350b3915b0e5319
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.11 (GNU/Linux)
-
-iEYEARECAAYFAks+UWIACgkQNQqtfCuFneM4cgCgg9yoR7dsH/DwASzuPF3Q8ZJE
-wUUAn0Y/R5X4u3xX6d4DsubPxESKbYOq
-=CUxH
------END PGP SIGNATURE-----
+MISC ChangeLog 9496 RMD160 bdc68ee7d918b01b37a20c57e5610119cc57a15b SHA1 db57f8122298e644deabf22b1621bf587d2cee3d SHA256 77b1843b51e0b7972cd1a1c1ecf8153cf94a4d4eddebddb7074965471dd46152
+MISC metadata.xml 512 RMD160 01272644c2909bf113b32f67fd807e81719c7f43 SHA1 7618d72fb43f2ca5dfb9411709a5108fc5804b52 SHA256 5c424ff41ef1ae2939d86b8cd8ba003a5cb60c812b4b0d7157dfbb52e3b9d674
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/metadata.xml b/app-arch/zip/metadata.xml
index 06294f3b668c..67dd82df9a3e 100644
--- a/app-arch/zip/metadata.xml
+++ b/app-arch/zip/metadata.xml
@@ -2,5 +2,12 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>base-system</herd>
+<maintainer restrict='natspec specifics'>
+ <email>pva@gentoo.org</email>
+ <name>Peter Volkov</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>
</pkgmetadata>
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..9e3f3809d0f9
--- /dev/null
+++ b/app-arch/zip/zip-3.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/zip/zip-3.0-r1.ebuild,v 1.1 2010/12/22 16:50:38 pva Exp $
+
+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="~amd64 ~x86"
+IUSE="bzip2 crypt natspec unicode"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )"
+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
+}