View | Details | Raw Unified | Return to bug 190349
Collapse All | Expand All

(-)archivers/unzip/Makefile (-54 / +59 lines)
Lines 3-17 Link Here
3
3
4
PORTNAME=	unzip
4
PORTNAME=	unzip
5
PORTVERSION=	6.0
5
PORTVERSION=	6.0
6
PORTREVISION=	1
6
PORTREVISION=	2
7
CATEGORIES?=	archivers
7
CATEGORIES=	archivers
8
MASTER_SITES=	SF/infozip/UnZip%206.x%20%28latest%29/UnZip%20${PORTVERSION}/:main \
8
MASTER_SITES=	SF/infozip/UnZip%206.x%20%28latest%29/UnZip%20${PORTVERSION}/:main \
9
		SF/infozip/UnZip%205.x%20and%20earlier/5.51/:unreduce
9
		SF/infozip/UnZip%205.x%20and%20earlier/5.51/:unreduce
10
DISTNAME=	${PORTNAME}60
10
DISTNAME=	${PORTNAME}60
11
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:main
11
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:main
12
12
13
MAINTAINER?=	ehaupt@FreeBSD.org
13
MAINTAINER=	ehaupt@FreeBSD.org
14
COMMENT?=	List, test, and extract compressed files in a ZIP archive
14
COMMENT=	List, test, and extract compressed files from a ZIP archive
15
15
16
LICENSE=	Info-ZIP
16
LICENSE=	Info-ZIP
17
LICENSE_NAME=	Info-ZIP license
17
LICENSE_NAME=	Info-ZIP license
Lines 18-25 Link Here
18
LICENSE_FILE=	${WRKSRC}/LICENSE
18
LICENSE_FILE=	${WRKSRC}/LICENSE
19
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
19
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
20
20
21
CONFLICTS?=	unzip-iconv-[0-9]* zh-unzip-[0-9]* ko-unzip-[0-9]* ru-unzip-[0-9]*
21
ALL_TARGET=	bsd
22
23
MAKEFILE=	unix/Makefile
22
MAKEFILE=	unix/Makefile
24
MAKE_ARGS=	LF2="${STRIP}"
23
MAKE_ARGS=	LF2="${STRIP}"
25
.if defined(INSTALL_AS_INFOUNZIP)
24
.if defined(INSTALL_AS_INFOUNZIP)
Lines 27-77 Link Here
27
.else
26
.else
28
UNZIP_NAME=	unzip
27
UNZIP_NAME=	unzip
29
.endif
28
.endif
30
PLIST_FILES=	bin/${UNZIP_NAME} bin/funzip bin/unzipsfx bin/zipgrep bin/zipinfo
31
PORTDOCS=	README WHERE
29
PORTDOCS=	README WHERE
32
MANPAGES=		${UNZIP_NAME}.1 funzip.1 unzipsfx.1 zipgrep.1 zipinfo.1
30
MANPAGES=	${UNZIP_NAME}.1 funzip.1 unzipsfx.1 zipgrep.1 zipinfo.1
31
PLIST_FILES=	bin/${UNZIP_NAME} bin/funzip bin/unzipsfx bin/zipgrep \
32
		bin/zipinfo
33
PLIST_FILES+=	${MANPAGES:C|^(.*)\.([1-9])$|man/man\2/\1.\2.gz|}
33
34
34
LOCAL_UNZIP=	${CFLAGS} -DACORN_FTYPE_NFS -DWILD_STOP_AT_DIR \
35
LOCAL_UNZIP=	${CFLAGS} -DACORN_FTYPE_NFS -DWILD_STOP_AT_DIR \
35
		-DUNICODE_SUPPORT -DUTF8_MAYBE_NATIVE -D_MBCS \
36
		-DUNICODE_SUPPORT -DUTF8_MAYBE_NATIVE -D_MBCS \
36
		-DLARGE_FILE_SUPPORT
37
		-DLARGE_FILE_SUPPORT
37
38
38
.if defined(WITH_UNZIP_UNREDUCE)
39
DISTFILES+=	unreduce_full.zip:unreduce
40
EXTRACT_ONLY+=	${DISTNAME}${EXTRACT_SUFX}
41
LOCAL_UNZIP+=	-DUSE_SMITH_CODE
42
.endif
43
44
.if defined(WITH_ICONV)
45
PATCH_SITES+=		${MASTER_SITE_LOCAL}
46
PATCH_SITE_SUBDIR=	nork
47
PATCHFILES+=		unzip60-alt-iconv-utf8.patch
48
PATCH_DIST_STRIP+=	-p1
49
USES=			iconv
50
CFLAGS+=		-I${LOCALBASE}/include -DNATIVE
51
MAKE_ARGS+=		LFLAGS1="-L${LOCALBASE}/lib ${ICONV_LIB}"
52
.endif
53
54
MAKE_ENV=	LOCAL_UNZIP="${LOCAL_UNZIP}" \
39
MAKE_ENV=	LOCAL_UNZIP="${LOCAL_UNZIP}" \
55
		D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2
40
		D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2
56
41
57
.ifdef USE_UNZIP
42
.ifdef USE_UNZIP
58
.error You have `USE_UNZIP' variable defined either in environment or in make(1) arguments. Please undefine and try again.
43
.error You have "USE_UNZIP" variable defined in environment or in \
44
	make(1) arguments. Please undefine and try again.
59
.endif
45
.endif
60
46
61
OPTIONS_DEFINE=	DOCS
47
OPTIONS_DEFINE=		DOCS ICONV
48
OPTIONS_RADIO=		RG1
49
OPTIONS_RADIO_RG1=	CHINESE KOREAN RUSSIAN
62
50
63
.include <bsd.port.pre.mk>
51
RG1_DESC=		Localization
52
CHINESE_DESC=		Chinese language support
53
KOREAN_DESC=		Korean language support
54
RUSSIAN_DESC=		CP866 and KOI8-R support
64
55
65
.if ${ARCH} == "i386"
56
ICONV_USES=		iconv
57
58
.include <bsd.port.options.mk>
59
60
.if ${ARCH} == i386
66
ALL_TARGET=	freebsd
61
ALL_TARGET=	freebsd
67
.else
68
ALL_TARGET=	bsd
69
.endif
62
.endif
70
63
71
.for m in ${MANPAGES}
64
.if ${PORT_OPTIONS:MICONV}
72
PLIST_FILES+=	man/man1/${m}.gz
65
CFLAGS+=	-I${LOCALBASE}/include -DNATIVE
73
.endfor
66
MAKE_ARGS+=	LFLAGS1="-L${LOCALBASE}/lib ${ICONV_LIB}"
67
EXTRA_PATCHES+=	${FILESDIR}/extra-iconv-patch-unix_unix.c \
68
		${FILESDIR}/extra-iconv-patch-unix_unxcfg.h \
69
		${FILESDIR}/extra-iconv-patch-unzip.c \
70
		${FILESDIR}/extra-iconv-patch-unzpriv.h \
71
		${FILESDIR}/extra-iconv-patch-zipinfo.c
72
.endif
74
73
74
.if ${PORT_OPTIONS:MCHINESE}
75
CATEGORES+=	chinese
76
EXTRA_PATCHES+=	${FILESDIR}/extra-zh-patch-fileio.c
77
.endif
78
79
.if ${PORT_OPTIONS:MKOREAN}
80
CATEGORIES+=	korean
81
EXTRA_PATCHES+=	${FILESDIR}/extra-ko-patch-fileio.c \
82
		${FILESDIR}/extra-ko-patch-unzip.c \
83
		${FILESDIR}/extra-ko-patch-unzip.h
84
.endif
85
86
.if ${PORT_OPTIONS:MRUSSIAN}
87
CATEGORIES+=	russian
88
EXTRA_PATCHES+=	${FILESDIR}/extra-ru-patch-ebcdic.h
89
.endif
90
75
.if !defined(INSTALL_AS_INFOUNZIP)
91
.if !defined(INSTALL_AS_INFOUNZIP)
76
pre-fetch:
92
pre-fetch:
77
	@${ECHO} ""
93
	@${ECHO} ""
Lines 79-107 Link Here
79
	@${ECHO} ""
95
	@${ECHO} ""
80
.endif
96
.endif
81
97
82
.if defined(WITH_UNZIP_UNREDUCE)
83
pre-build:
84
	@(cd ${BUILD_WRKSRC}; ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} CFLAGS="${CFLAGS}" unzip)
85
	@(cd ${WRKSRC}; \
86
		./unzip -o ${_DISTDIR}unreduce_full.zip; \
87
		${MV} unreduce_full.c unreduce.c)
88
	@(cd ${BUILD_WRKSRC}; ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} clean)
89
.endif
90
91
do-install:
98
do-install:
92
	${INSTALL_PROGRAM} ${WRKSRC}/unzip ${STAGEDIR}${PREFIX}/bin/${UNZIP_NAME}
99
	${INSTALL_PROGRAM} ${WRKSRC}/unzip \
93
.for f in funzip unzipsfx
100
		${STAGEDIR}${PREFIX}/bin/${UNZIP_NAME}
94
	${INSTALL_PROGRAM} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin
101
	cd ${WRKSRC} && \
95
.endfor
102
		${INSTALL_PROGRAM} funzip unzipsfx ${STAGEDIR}${PREFIX}/bin
96
	${LN} -sf ${UNZIP_NAME} ${STAGEDIR}${PREFIX}/bin/zipinfo
103
	${LN} -sf ${UNZIP_NAME} ${STAGEDIR}${PREFIX}/bin/zipinfo
97
	${INSTALL_SCRIPT} ${WRKSRC}/unix/zipgrep ${STAGEDIR}${PREFIX}/bin
104
	${INSTALL_SCRIPT} ${WRKSRC}/unix/zipgrep ${STAGEDIR}${PREFIX}/bin
98
	${INSTALL_MAN} ${WRKSRC}/man/unzip.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/${UNZIP_NAME}.1
105
	${INSTALL_MAN} ${WRKSRC}/man/unzip.1 \
99
.for f in ${MANPAGES:Nunzip.1:Ninfo-unzip.1}
106
		${STAGEDIR}${MAN1PREFIX}/man/man1/${UNZIP_NAME}.1
100
	${INSTALL_MAN} ${WRKSRC}/man/${f} ${STAGEDIR}${MAN1PREFIX}/man/man1
107
	cd ${WRKSRC}/man && ${INSTALL_MAN} ${MANPAGES:Nunzip.1:Ninfo-unzip.1} \
101
.endfor
108
		${STAGEDIR}${MAN1PREFIX}/man/man1
102
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
109
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
103
.for f in ${PORTDOCS}
110
	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
104
	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
105
.endfor
106
111
107
.include <bsd.port.post.mk>
112
.include <bsd.port.mk>
(-)archivers/unzip/distinfo (-4 lines)
Lines 1-6 Link Here
1
SHA256 (unzip60.tar.gz) = 036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37
1
SHA256 (unzip60.tar.gz) = 036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37
2
SIZE (unzip60.tar.gz) = 1376845
2
SIZE (unzip60.tar.gz) = 1376845
3
SHA256 (unreduce_full.zip) = 1f4d93d2250dc1a1d1d2b8aac09d9989d4f9dd2cb0967373bf41fdf5f108cec1
4
SIZE (unreduce_full.zip) = 2849
5
SHA256 (unzip60-alt-iconv-utf8.patch) = 6abf9d5e538b948ddb43f11000162348ce46ac0fa93826e6c8edae4ffa488f00
6
SIZE (unzip60-alt-iconv-utf8.patch) = 13369
(-)archivers/unzip/files/extra-iconv-patch-unix_unix.c (+103 lines)
Line 0 Link Here
1
--- unix/unix.c.orig	2009-01-23 23:31:26 UTC
2
+++ unix/unix.c
3
@@ -30,6 +30,9 @@
4
 #define UNZIP_INTERNAL
5
 #include "unzip.h"
6
 
7
+#include <iconv.h>
8
+#include <langinfo.h>
9
+
10
 #ifdef SCO_XENIX
11
 #  define SYSNDIR
12
 #else  /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */
13
@@ -1874,3 +1877,90 @@ static void qlfix(__G__ ef_ptr, ef_len)
14
     }
15
 }
16
 #endif /* QLZIP */
17
+
18
+
19
+typedef struct {
20
+    char *local_charset;
21
+    char *archive_charset;
22
+} CHARSET_MAP;
23
+
24
+/* A mapping of local <-> archive charsets used by default to convert filenames
25
+ * of DOS/Windows Zip archives. Currently very basic. */
26
+static CHARSET_MAP dos_charset_map[] = {
27
+    { "ANSI_X3.4-1968", "CP850" },
28
+    { "ISO-8859-1", "CP850" },
29
+    { "CP1252", "CP850" },
30
+    { "UTF-8", "CP866" },
31
+    { "KOI8-R", "CP866" },
32
+    { "KOI8-U", "CP866" },
33
+    { "ISO-8859-5", "CP866" }
34
+};
35
+
36
+char OEM_CP[MAX_CP_NAME] = "";
37
+char ISO_CP[MAX_CP_NAME] = "";
38
+
39
+/* Try to guess the default value of OEM_CP based on the current locale.
40
+ * ISO_CP is left alone for now. */
41
+void init_conversion_charsets()
42
+{
43
+    const char *local_charset;
44
+    int i;
45
+
46
+    /* Make a guess only if OEM_CP not already set. */ 
47
+    if(*OEM_CP == '\0') {
48
+    	local_charset = nl_langinfo(CODESET);
49
+    	for(i = 0; i < sizeof(dos_charset_map)/sizeof(CHARSET_MAP); i++)
50
+    		if(!strcasecmp(local_charset, dos_charset_map[i].local_charset)) {
51
+    			strncpy(OEM_CP, dos_charset_map[i].archive_charset,
52
+    					sizeof(OEM_CP));
53
+    			break;
54
+    		}
55
+    }
56
+}
57
+
58
+/* Convert a string from one encoding to the current locale using iconv().
59
+ * Be as non-intrusive as possible. If error is encountered during covertion
60
+ * just leave the string intact. */
61
+static void charset_to_intern(char *string, char *from_charset)
62
+{
63
+    iconv_t cd;
64
+    char *s,*d, *buf;
65
+    size_t slen, dlen, buflen;
66
+    const char *local_charset;
67
+
68
+    if(*from_charset == '\0')
69
+    	return;
70
+
71
+    buf = NULL;
72
+    local_charset = nl_langinfo(CODESET);
73
+
74
+    if((cd = iconv_open(local_charset, from_charset)) == (iconv_t)-1)
75
+        return;
76
+
77
+    slen = strlen(string);
78
+    s = string;
79
+    dlen = buflen = 2*slen;
80
+    d = buf = malloc(buflen + 1);
81
+    if(!d)
82
+    	goto cleanup;
83
+    bzero(buf,buflen);
84
+    if(iconv(cd, &s, &slen, &d, &dlen) == (size_t)-1)
85
+    	goto cleanup;
86
+    strncpy(string, buf, buflen);
87
+    
88
+    cleanup:
89
+    free(buf);
90
+    iconv_close(cd);
91
+}
92
+
93
+/* Convert a string from OEM_CP to the current locale charset. */
94
+inline void oem_intern(char *string)
95
+{
96
+    charset_to_intern(string, OEM_CP);
97
+}
98
+
99
+/* Convert a string from ISO_CP to the current locale charset. */
100
+inline void iso_intern(char *string)
101
+{
102
+    charset_to_intern(string, ISO_CP);
103
+}
(-)archivers/unzip/files/extra-iconv-patch-unix_unxcfg.h (+33 lines)
Line 0 Link Here
1
--- unix/unxcfg.h.orig	2009-04-16 18:36:12 UTC
2
+++ unix/unxcfg.h
3
@@ -227,4 +227,30 @@ typedef struct stat z_stat;
4
 /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */
5
 /*    and notfirstcall are used by do_wild().                          */
6
 
7
+
8
+#define MAX_CP_NAME 25 
9
+   
10
+#ifdef SETLOCALE
11
+#  undef SETLOCALE
12
+#endif
13
+#define SETLOCALE(category, locale) setlocale(category, locale)
14
+#include <locale.h>
15
+   
16
+#ifdef _ISO_INTERN
17
+#  undef _ISO_INTERN
18
+#endif
19
+#define _ISO_INTERN(str1) iso_intern(str1)
20
+
21
+#ifdef _OEM_INTERN
22
+#  undef _OEM_INTERN
23
+#endif
24
+#ifndef IZ_OEM2ISO_ARRAY
25
+#  define IZ_OEM2ISO_ARRAY
26
+#endif
27
+#define _OEM_INTERN(str1) oem_intern(str1)
28
+
29
+void iso_intern(char *);
30
+void oem_intern(char *);
31
+void init_conversion_charsets(void);
32
+   
33
 #endif /* !__unxcfg_h */
(-)archivers/unzip/files/extra-iconv-patch-unzip.c (+137 lines)
Line 0 Link Here
1
--- unzip.c.orig	2009-04-16 18:26:52 UTC
2
+++ unzip.c
3
@@ -327,11 +327,21 @@ static ZCONST char Far ZipInfoUsageLine2
4
   -2  just filenames but allow -h/-t/-z  -l  long Unix \"ls -l\" format\n\
5
                                          -v  verbose, multi-page format\n";
6
 
7
+#ifndef UNIX
8
 static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\
9
   -h  print header line       -t  print totals for listed files or for all\n\
10
   -z  print zipfile comment   -T  print file times in sortable decimal format\
11
 \n  -C  be case-insensitive   %s\
12
   -x  exclude filenames that follow from listing\n";
13
+#else /* UNIX */
14
+static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\
15
+  -h  print header line       -t  print totals for listed files or for all\n\
16
+  -z  print zipfile comment  %c-T%c print file times in sortable decimal format\
17
+\n %c-C%c be case-insensitive   %s\
18
+  -x  exclude filenames that follow from listing\n\
19
+  -O CHARSET  specify a character encoding for DOS, Windows and OS/2 archives\n\
20
+  -I CHARSET  specify a character encoding for UNIX and other archives\n";
21
+#endif /* !UNIX */
22
 #ifdef MORE
23
    static ZCONST char Far ZipInfoUsageLine4[] =
24
      "  -M  page output through built-in \"more\"\n";
25
@@ -665,6 +675,17 @@ modifiers:\n\
26
   -U  use escapes for all non-ASCII Unicode  -UU ignore any Unicode fields\n\
27
   -C  match filenames case-insensitively     -L  make (some) names \
28
 lowercase\n %-42s  -V  retain VMS version numbers\n%s";
29
+#elif (defined UNIX)
30
+static ZCONST char Far UnzipUsageLine4[] = "\
31
+modifiers:\n\
32
+  -n  never overwrite existing files         -q  quiet mode (-qq => quieter)\n\
33
+  -o  overwrite files WITHOUT prompting      -a  auto-convert any text files\n\
34
+  -j  junk paths (do not make directories)   -aa treat ALL files as text\n\
35
+  -U  use escapes for all non-ASCII Unicode  -UU ignore any Unicode fields\n\
36
+  -C  match filenames case-insensitively     -L  make (some) names \
37
+lowercase\n %-42s  -V  retain VMS version numbers\n%s\
38
+  -O CHARSET  specify a character encoding for DOS, Windows and OS/2 archives\n\
39
+  -I CHARSET  specify a character encoding for UNIX and other archives\n\n";
40
 #else /* !VMS */
41
 static ZCONST char Far UnzipUsageLine4[] = "\
42
 modifiers:\n\
43
@@ -803,6 +824,10 @@ int unzip(__G__ argc, argv)
44
 #endif /* UNICODE_SUPPORT */
45
 
46
 
47
+#ifdef UNIX
48
+    init_conversion_charsets();
49
+#endif
50
+
51
 #if (defined(__IBMC__) && defined(__DEBUG_ALLOC__))
52
     extern void DebugMalloc(void);
53
 
54
@@ -1336,6 +1361,11 @@ int uz_opts(__G__ pargc, pargv)
55
     argc = *pargc;
56
     argv = *pargv;
57
 
58
+#ifdef UNIX
59
+    extern char OEM_CP[MAX_CP_NAME];
60
+    extern char ISO_CP[MAX_CP_NAME];
61
+#endif
62
+    
63
     while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) {
64
         s = *argv + 1;
65
         while ((c = *s++) != 0) {    /* "!= 0":  prevent Turbo C warning */
66
@@ -1517,6 +1547,35 @@ int uz_opts(__G__ pargc, pargv)
67
                     }
68
                     break;
69
 #endif  /* MACOS */
70
+#ifdef UNIX
71
+    			case ('I'):
72
+                    if (negative) {
73
+                        Info(slide, 0x401, ((char *)slide,
74
+                          "error:  encodings can't be negated"));
75
+                        return(PK_PARAM);
76
+    				} else {
77
+    					if(*s) { /* Handle the -Icharset case */
78
+    						/* Assume that charsets can't start with a dash to spot arguments misuse */
79
+    						if(*s == '-') { 
80
+    	                        Info(slide, 0x401, ((char *)slide,
81
+        		                  "error:  a valid character encoding should follow the -I argument"));
82
+    	                        return(PK_PARAM); 
83
+    						}
84
+    						strncpy(ISO_CP, s, sizeof(ISO_CP));
85
+    					} else { /* -I charset */
86
+    						++argv;
87
+    						if(!(--argc > 0 && *argv != NULL && **argv != '-')) {
88
+    	                        Info(slide, 0x401, ((char *)slide,
89
+        		                  "error:  a valid character encoding should follow the -I argument"));
90
+    	                        return(PK_PARAM); 
91
+    						}
92
+    						s = *argv;
93
+    						strncpy(ISO_CP, s, sizeof(ISO_CP));
94
+    					}
95
+    					while(*(++s)); /* No params straight after charset name */
96
+    				}
97
+    				break;
98
+#endif /* ?UNIX */
99
                 case ('j'):    /* junk pathnames/directory structure */
100
                     if (negative)
101
                         uO.jflag = FALSE, negative = 0;
102
@@ -1592,6 +1651,35 @@ int uz_opts(__G__ pargc, pargv)
103
                     } else
104
                         ++uO.overwrite_all;
105
                     break;
106
+#ifdef UNIX
107
+    			case ('O'):
108
+                    if (negative) {
109
+                        Info(slide, 0x401, ((char *)slide,
110
+                          "error:  encodings can't be negated"));
111
+                        return(PK_PARAM);
112
+    				} else {
113
+    					if(*s) { /* Handle the -Ocharset case */
114
+    						/* Assume that charsets can't start with a dash to spot arguments misuse */
115
+    						if(*s == '-') { 
116
+    	                        Info(slide, 0x401, ((char *)slide,
117
+        		                  "error:  a valid character encoding should follow the -I argument"));
118
+    	                        return(PK_PARAM); 
119
+    						}
120
+    						strncpy(OEM_CP, s, sizeof(OEM_CP));
121
+    					} else { /* -O charset */
122
+    						++argv;
123
+    						if(!(--argc > 0 && *argv != NULL && **argv != '-')) {
124
+    	                        Info(slide, 0x401, ((char *)slide,
125
+        		                  "error:  a valid character encoding should follow the -O argument"));
126
+    	                        return(PK_PARAM); 
127
+    						}
128
+    						s = *argv;
129
+    						strncpy(OEM_CP, s, sizeof(OEM_CP));
130
+    					}
131
+    					while(*(++s)); /* No params straight after charset name */
132
+    				}
133
+    				break;
134
+#endif /* ?UNIX */
135
                 case ('p'):    /* pipes:  extract to stdout, no messages */
136
                     if (negative) {
137
                         uO.cflag = FALSE;
(-)archivers/unzip/files/extra-iconv-patch-unzpriv.h (+11 lines)
Line 0 Link Here
1
--- unzpriv.h.orig	2009-04-19 23:59:26 UTC
2
+++ unzpriv.h
3
@@ -3008,7 +3008,7 @@ char    *GetLoadPath     OF((__GPRO));  
4
          !(((islochdr) || (isuxatt)) && \
5
            ((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \
6
         (hostnum) == FS_HPFS_ || \
7
-        ((hostnum) == FS_NTFS_ && (hostver) == 50)) { \
8
+        ((hostnum) == FS_NTFS_ /* && (hostver) == 50 */ )) { \
9
         _OEM_INTERN((string)); \
10
     } else { \
11
         _ISO_INTERN((string)); \
(-)archivers/unzip/files/extra-iconv-patch-zipinfo.c (+85 lines)
Line 0 Link Here
1
--- zipinfo.c.orig	2009-02-08 17:04:30 UTC
2
+++ zipinfo.c
3
@@ -457,6 +457,10 @@ int zi_opts(__G__ pargc, pargv)
4
     int    tflag_slm=TRUE, tflag_2v=FALSE;
5
     int    explicit_h=FALSE, explicit_t=FALSE;
6
 
7
+#ifdef UNIX
8
+    extern char OEM_CP[MAX_CP_NAME];
9
+    extern char ISO_CP[MAX_CP_NAME];
10
+#endif
11
 
12
 #ifdef MACOS
13
     uO.lflag = LFLAG;         /* reset default on each call */
14
@@ -501,6 +505,35 @@ int zi_opts(__G__ pargc, pargv)
15
                             uO.lflag = 0;
16
                     }
17
                     break;
18
+#ifdef UNIX
19
+    			case ('I'):
20
+                    if (negative) {
21
+                        Info(slide, 0x401, ((char *)slide,
22
+                          "error:  encodings can't be negated"));
23
+                        return(PK_PARAM);
24
+    				} else {
25
+    					if(*s) { /* Handle the -Icharset case */
26
+    						/* Assume that charsets can't start with a dash to spot arguments misuse */
27
+    						if(*s == '-') { 
28
+    	                        Info(slide, 0x401, ((char *)slide,
29
+        		                  "error:  a valid character encoding should follow the -I argument"));
30
+    	                        return(PK_PARAM); 
31
+    						}
32
+    						strncpy(ISO_CP, s, sizeof(ISO_CP));
33
+    					} else { /* -I charset */
34
+    						++argv;
35
+    						if(!(--argc > 0 && *argv != NULL && **argv != '-')) {
36
+    	                        Info(slide, 0x401, ((char *)slide,
37
+        		                  "error:  a valid character encoding should follow the -I argument"));
38
+    	                        return(PK_PARAM); 
39
+    						}
40
+    						s = *argv;
41
+    						strncpy(ISO_CP, s, sizeof(ISO_CP));
42
+    					}
43
+    					while(*(++s)); /* No params straight after charset name */
44
+    				}
45
+    				break;
46
+#endif /* ?UNIX */
47
                 case 'l':      /* longer form of "ls -l" type listing */
48
                     if (negative)
49
                         uO.lflag = -2, negative = 0;
50
@@ -521,6 +554,35 @@ int zi_opts(__G__ pargc, pargv)
51
                         G.M_flag = TRUE;
52
                     break;
53
 #endif
54
+#ifdef UNIX
55
+    			case ('O'):
56
+                    if (negative) {
57
+                        Info(slide, 0x401, ((char *)slide,
58
+                          "error:  encodings can't be negated"));
59
+                        return(PK_PARAM);
60
+    				} else {
61
+    					if(*s) { /* Handle the -Ocharset case */
62
+    						/* Assume that charsets can't start with a dash to spot arguments misuse */
63
+    						if(*s == '-') { 
64
+    	                        Info(slide, 0x401, ((char *)slide,
65
+        		                  "error:  a valid character encoding should follow the -I argument"));
66
+    	                        return(PK_PARAM); 
67
+    						}
68
+    						strncpy(OEM_CP, s, sizeof(OEM_CP));
69
+    					} else { /* -O charset */
70
+    						++argv;
71
+    						if(!(--argc > 0 && *argv != NULL && **argv != '-')) {
72
+    	                        Info(slide, 0x401, ((char *)slide,
73
+        		                  "error:  a valid character encoding should follow the -O argument"));
74
+    	                        return(PK_PARAM); 
75
+    						}
76
+    						s = *argv;
77
+    						strncpy(OEM_CP, s, sizeof(OEM_CP));
78
+    					}
79
+    					while(*(++s)); /* No params straight after charset name */
80
+    				}
81
+    				break;
82
+#endif /* ?UNIX */
83
                 case 's':      /* default:  shorter "ls -l" type listing */
84
                     if (negative)
85
                         uO.lflag = -2, negative = 0;
(-)archivers/unzip/files/extra-ko-patch-fileio.c (+14 lines)
Line 0 Link Here
1
--- fileio.c.orig	2009-04-20 00:03:44 UTC
2
+++ fileio.c
3
@@ -2240,8 +2240,9 @@ int do_string(__G__ length, option)   /*
4
 
5
         /* translate the Zip entry filename coded in host-dependent "extended
6
            ASCII" into the compiler's (system's) internal text code page */
7
-        Ext_ASCII_TO_Native(G.filename, G.pInfo->hostnum, G.pInfo->hostver,
8
-                            G.pInfo->HasUxAtt, (option == DS_FN_L));
9
+	if (!uO.dotflag)
10
+	    Ext_ASCII_TO_Native(G.filename, G.pInfo->hostnum, G.pInfo->hostver,
11
+				G.pInfo->HasUxAtt, (option == DS_FN_L));
12
 
13
         if (G.pInfo->lcflag)      /* replace with lowercase filename */
14
             STRLOWER(G.filename, G.filename);
(-)archivers/unzip/files/extra-ko-patch-unzip.c (+25 lines)
Line 0 Link Here
1
--- unzip.c.orig	2009-04-16 18:26:52 UTC
2
+++ unzip.c
3
@@ -664,7 +664,8 @@ modifiers:\n\
4
   -j  junk paths (do not make directories)   -aa treat ALL files as text\n\
5
   -U  use escapes for all non-ASCII Unicode  -UU ignore any Unicode fields\n\
6
   -C  match filenames case-insensitively     -L  make (some) names \
7
-lowercase\n %-42s  -V  retain VMS version numbers\n%s";
8
+lowercase\n %-42s  -V  retain VMS version numbers\n\
9
+                                             -.  don't translate filenames\n%s";
10
 #else /* !VMS */
11
 static ZCONST char Far UnzipUsageLine4[] = "\
12
 modifiers:\n\
13
@@ -1829,6 +1830,12 @@ int uz_opts(__G__ pargc, pargv)
14
                         ++uO.cflxflag;
15
                     break;
16
 #endif /* UNIX */
17
+                case ('.'):
18
+                    if (negative)
19
+                        uO.dotflag = FALSE, negative = 0;
20
+                    else
21
+                        uO.dotflag = TRUE;
22
+                    break;
23
                 default:
24
                     error = TRUE;
25
                     break;
(-)archivers/unzip/files/extra-ko-patch-unzip.h (+10 lines)
Line 0 Link Here
1
--- unzip.h.orig	2009-02-15 18:12:54 UTC
2
+++ unzip.h
3
@@ -559,6 +559,7 @@ typedef struct _UzpOpts {
4
 #ifdef UNIX
5
     int cflxflag;       /* -^: allow control chars in extracted filenames */
6
 #endif
7
+    int dotflag;	/* -.: don't translate filenames to local charset */
8
 #endif /* !FUNZIP */
9
 } UzpOpts;
10
 
(-)archivers/unzip/files/extra-ru-patch-ebcdic.h (+78 lines)
Line 0 Link Here
1
--- ebcdic.h.orig	2008-03-21 12:04:22 UTC
2
+++ ebcdic.h
3
@@ -237,43 +237,43 @@ ZCONST uch ascii[] = {
4
 
5
 #ifdef IZ_ISO2OEM_ARRAY
6
 ZCONST uch Far iso2oem_850[] = {
7
-    0x3F, 0x3F, 0x27, 0x9F, 0x22, 0x2E, 0xC5, 0xCE,  /* 80 - 87 */
8
-    0x5E, 0x25, 0x53, 0x3C, 0x4F, 0x3F, 0x3F, 0x3F,  /* 88 - 8F */
9
-    0x3F, 0x27, 0x27, 0x22, 0x22, 0x07, 0x2D, 0x2D,  /* 90 - 97 */
10
-    0x7E, 0x54, 0x73, 0x3E, 0x6F, 0x3F, 0x3F, 0x59,  /* 98 - 9F */
11
-    0xFF, 0xAD, 0xBD, 0x9C, 0xCF, 0xBE, 0xDD, 0xF5,  /* A0 - A7 */
12
-    0xF9, 0xB8, 0xA6, 0xAE, 0xAA, 0xF0, 0xA9, 0xEE,  /* A8 - AF */
13
-    0xF8, 0xF1, 0xFD, 0xFC, 0xEF, 0xE6, 0xF4, 0xFA,  /* B0 - B7 */
14
-    0xF7, 0xFB, 0xA7, 0xAF, 0xAC, 0xAB, 0xF3, 0xA8,  /* B8 - BF */
15
-    0xB7, 0xB5, 0xB6, 0xC7, 0x8E, 0x8F, 0x92, 0x80,  /* C0 - C7 */
16
-    0xD4, 0x90, 0xD2, 0xD3, 0xDE, 0xD6, 0xD7, 0xD8,  /* C8 - CF */
17
-    0xD1, 0xA5, 0xE3, 0xE0, 0xE2, 0xE5, 0x99, 0x9E,  /* D0 - D7 */
18
-    0x9D, 0xEB, 0xE9, 0xEA, 0x9A, 0xED, 0xE8, 0xE1,  /* D8 - DF */
19
-    0x85, 0xA0, 0x83, 0xC6, 0x84, 0x86, 0x91, 0x87,  /* E0 - E7 */
20
-    0x8A, 0x82, 0x88, 0x89, 0x8D, 0xA1, 0x8C, 0x8B,  /* E8 - EF */
21
-    0xD0, 0xA4, 0x95, 0xA2, 0x93, 0xE4, 0x94, 0xF6,  /* F0 - F7 */
22
-    0x9B, 0x97, 0xA3, 0x96, 0x81, 0xEC, 0xE7, 0x98   /* F8 - FF */
23
+   0xC4, 0xB3, 0xDA, 0xBF, 0xC0, 0xD9, 0xC3, 0xB4,  /* 80 - 87 */
24
+   0xC2, 0xC1, 0xC5, 0xDF, 0xDC, 0xDB, 0xDD, 0xDE,  /* 88 - 8F */
25
+   0xB0, 0xB1, 0xB2, 0x40, 0xFE, 0xF9, 0xFB, 0x40,  /* 90 - 97 */
26
+   0x66, 0x02, 0xFF, 0x0D, 0xF8, 0x02, 0xFA, 0x0D,  /* 98 - 9F */
27
+   0xCD, 0xBA, 0xD5, 0xF1, 0xD6, 0xC9, 0xB8, 0xB7,  /* A0 - A7 */
28
+   0xBB, 0xD4, 0xD3, 0xC8, 0xBE, 0xBD, 0xBC, 0xC6,  /* A8 - AF */
29
+   0xC7, 0xCC, 0xB5, 0xF0, 0xB6, 0xB9, 0xD1, 0xD2,  /* B0 - B7 */
30
+   0xCB, 0xCF, 0xD0, 0xCA, 0xD8, 0xD7, 0xCE, 0xBF,  /* B8 - BF */
31
+   0xEE, 0xA0, 0xA1, 0xE6, 0xA4, 0xA5, 0xE4, 0xA3,  /* C0 - C7 */
32
+   0xE5, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE,  /* C8 - CF */
33
+   0xAF, 0xEF, 0xE0, 0xE1, 0xE2, 0xE3, 0xA6, 0xA2,  /* D0 - D7 */
34
+   0xEC, 0xEB, 0xA7, 0xE8, 0xED, 0xE9, 0xE7, 0xEA,  /* D8 - DF */
35
+   0x9E, 0x80, 0x81, 0x96, 0x84, 0x85, 0x94, 0x83,  /* E0 - E7 */
36
+   0x95, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E,  /* E8 - EF */
37
+   0x8F, 0x9F, 0x90, 0x91, 0x92, 0x93, 0x86, 0x82,  /* F0 - F7 */
38
+   0x9C, 0x9B, 0x87, 0x98, 0x9D, 0x99, 0x97, 0x9A,  /* F8 - FF */
39
 };
40
 #endif /* IZ_ISO2OEM_ARRAY */
41
 
42
 #ifdef IZ_OEM2ISO_ARRAY
43
 ZCONST uch Far oem2iso_850[] = {
44
-    0xC7, 0xFC, 0xE9, 0xE2, 0xE4, 0xE0, 0xE5, 0xE7,  /* 80 - 87 */
45
-    0xEA, 0xEB, 0xE8, 0xEF, 0xEE, 0xEC, 0xC4, 0xC5,  /* 88 - 8F */
46
-    0xC9, 0xE6, 0xC6, 0xF4, 0xF6, 0xF2, 0xFB, 0xF9,  /* 90 - 97 */
47
-    0xFF, 0xD6, 0xDC, 0xF8, 0xA3, 0xD8, 0xD7, 0x83,  /* 98 - 9F */
48
-    0xE1, 0xED, 0xF3, 0xFA, 0xF1, 0xD1, 0xAA, 0xBA,  /* A0 - A7 */
49
-    0xBF, 0xAE, 0xAC, 0xBD, 0xBC, 0xA1, 0xAB, 0xBB,  /* A8 - AF */
50
-    0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xC1, 0xC2, 0xC0,  /* B0 - B7 */
51
-    0xA9, 0xA6, 0xA6, 0x2B, 0x2B, 0xA2, 0xA5, 0x2B,  /* B8 - BF */
52
-    0x2B, 0x2D, 0x2D, 0x2B, 0x2D, 0x2B, 0xE3, 0xC3,  /* C0 - C7 */
53
-    0x2B, 0x2B, 0x2D, 0x2D, 0xA6, 0x2D, 0x2B, 0xA4,  /* C8 - CF */
54
-    0xF0, 0xD0, 0xCA, 0xCB, 0xC8, 0x69, 0xCD, 0xCE,  /* D0 - D7 */
55
-    0xCF, 0x2B, 0x2B, 0xA6, 0x5F, 0xA6, 0xCC, 0xAF,  /* D8 - DF */
56
-    0xD3, 0xDF, 0xD4, 0xD2, 0xF5, 0xD5, 0xB5, 0xFE,  /* E0 - E7 */
57
-    0xDE, 0xDA, 0xDB, 0xD9, 0xFD, 0xDD, 0xAF, 0xB4,  /* E8 - EF */
58
-    0xAD, 0xB1, 0x3D, 0xBE, 0xB6, 0xA7, 0xF7, 0xB8,  /* F0 - F7 */
59
-    0xB0, 0xA8, 0xB7, 0xB9, 0xB3, 0xB2, 0xA6, 0xA0   /* F8 - FF */
60
+   0xE1, 0xE2, 0xF7, 0xE7, 0xE4, 0xE5, 0xF6, 0xFA,  /* 80 - 87 */
61
+   0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0,  /* 88 - 8F */
62
+   0xF2, 0xF3, 0xF4, 0xF5, 0xE6, 0xE8, 0xE3, 0xFE,  /* 90 - 97 */
63
+   0xFB, 0xFD, 0xFF, 0xF9, 0xF8, 0xFC, 0xE0, 0xF1,  /* 98 - 9F */
64
+   0xC1, 0xC2, 0xD7, 0xC7, 0xC4, 0xC5, 0xD6, 0xDA,  /* A0 - A7 */
65
+   0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0,  /* A8 - AF */
66
+   0x90, 0x91, 0x92, 0x81, 0x87, 0xB2, 0xB4, 0xA7,  /* B0 - B7 */
67
+   0xA6, 0xB5, 0xA1, 0xA8, 0xAE, 0xAD, 0xAC, 0x83,  /* B8 - BF */
68
+   0x84, 0x89, 0x88, 0x86, 0x80, 0x8A, 0xAF, 0xB0,  /* C0 - C7 */
69
+   0xAB, 0xA5, 0xBB, 0xB8, 0xB1, 0xA0, 0xBE, 0xB9,  /* C8 - CF */
70
+   0xBA, 0xB6, 0xB7, 0xAA, 0xA9, 0xA2, 0xA4, 0xBD,  /* D0 - D7 */
71
+   0xBC, 0x85, 0x82, 0x8D, 0x8C, 0x8E, 0x8F, 0x8B,  /* D8 - DF */
72
+   0xD2, 0xD3, 0xD4, 0xD5, 0xC6, 0xC8, 0xC3, 0xDE,  /* E0 - E7 */
73
+   0xDB, 0xDD, 0xDF, 0xD9, 0xD8, 0xDC, 0xC0, 0xD1,  /* E8 - EF */
74
+   0xB3, 0xA3, 0x90, 0x91, 0x92, 0x93, 0x86, 0x82,  /* F0 - F7 */
75
+   0x9C, 0x95, 0x9E, 0x96, 0x9D, 0x99, 0x94, 0x9A,  /* F8 - FF */
76
 };
77
 #endif /* IZ_OEM2ISO_ARRAY */
78
 
(-)archivers/unzip/files/extra-zh-patch-fileio.c (+14 lines)
Line 0 Link Here
1
--- fileio.c.orig	2009-04-20 00:03:44 UTC
2
+++ fileio.c
3
@@ -2240,8 +2240,11 @@ int do_string(__G__ length, option)   /*
4
 
5
         /* translate the Zip entry filename coded in host-dependent "extended
6
            ASCII" into the compiler's (system's) internal text code page */
7
+#if 0
8
+/* cnoize is lazy to read it carefully */
9
         Ext_ASCII_TO_Native(G.filename, G.pInfo->hostnum, G.pInfo->hostver,
10
                             G.pInfo->HasUxAtt, (option == DS_FN_L));
11
+#endif
12
 
13
         if (G.pInfo->lcflag)      /* replace with lowercase filename */
14
             STRLOWER(G.filename, G.filename);
(-)archivers/unzip/files/patch-aa (-28 lines)
Lines 1-28 Link Here
1
--- unix/Makefile.orig	2009-01-19 01:41:18.000000000 +0300
2
+++ unix/Makefile	2009-10-26 13:15:47.000000000 +0300
3
@@ -42,12 +42,12 @@
4
 # such as -DDOSWILD).
5
 
6
 # UnZip flags
7
-CC = cc#	try using "gcc" target rather than changing this (CC and LD
8
+CC ?= cc#	try using "gcc" target rather than changing this (CC and LD
9
 LD = $(CC)#	must match, else "unresolved symbol:  ___main" is possible)
10
 AS = as
11
 LOC = $(D_USE_BZ2) $(LOCAL_UNZIP)
12
 AF = $(LOC)
13
-CFLAGS = -O
14
+#CFLAGS = -O
15
 CF_NOOPT = -I. -I$(IZ_BZIP2) -DUNIX $(LOC)
16
 CF = $(CFLAGS) $(CF_NOOPT)
17
 LFLAGS1 =
18
@@ -763,8 +763,8 @@
19
 # FreeBSD on Intel:
20
 freebsd:		unix_make
21
 	@echo 'NOTE:  use bsd target for non-Intel FreeBSD compiles (if any).'
22
-	$(MAKE) unzips CC=gcc LD=gcc AS=gcc\
23
-	 CFLAGS="-O3 -Wall -DASM_CRC -DBSD"\
24
+	$(MAKE) unzips CC="$(CC)" LD="$(CC)" AS="$(CC)"\
25
+	 CF="$(CF) -Wall -DASM_CRC -DBSD"\
26
 	 AF="-Di386 $(AF)" CRCA_O=crc_gcc$O
27
 
28
 # Generic BSDish Unix gcc.  ``The -O3 only works with later versions of gcc;
(-)archivers/unzip/files/patch-ab (-11 lines)
Lines 1-11 Link Here
1
--- unix/unix.c.orig	2009-01-24 02:31:26.000000000 +0300
2
+++ unix/unix.c	2009-10-26 13:22:08.000000000 +0300
3
@@ -610,7 +610,7 @@
4
                  * else allow 8-bit characters (e.g. UTF-8) in filenames:
5
                  */
6
                 if (uO.cflxflag ||
7
-                    (isprint(workch) || (128 <= workch && workch <= 254)))
8
+		    (isprint(workch) || (128 <= workch && workch <= 255)))
9
                     *pp++ = (char)workch;
10
         } /* end switch */
11
 
(-)archivers/unzip/files/patch-consts.h (+14 lines)
Line 0 Link Here
1
--- consts.h.orig	2002-03-23 15:52:48 UTC
2
+++ consts.h
3
@@ -34,9 +34,9 @@ ZCONST char Far CentSigMsg[] =
4
   "error:  expected central file header signature not found (file #%lu).\n";
5
 ZCONST char Far SeekMsg[] =
6
   "error [%s]:  attempt to seek before beginning of zipfile\n%s";
7
-ZCONST char Far FilenameNotMatched[] = "caution: filename not matched:  %s\n";
8
+ZCONST char Far FilenameNotMatched[] = "caution: filename not matched:  %.512s\n";
9
 ZCONST char Far ExclFilenameNotMatched[] =
10
-  "caution: excluded filename not matched:  %s\n";
11
+  "caution: excluded filename not matched:  %.512s\n";
12
 
13
 #ifdef VMS
14
   ZCONST char Far ReportMsg[] = "\
(-)archivers/unzip/files/patch-contsts.h (-14 lines)
Lines 1-14 Link Here
1
--- unzip-5.52.orig/consts.h
2
+++ consts.h
3
@@ -34,9 +34,9 @@
4
   "error:  expected central file header signature not found (file #%lu).\n";
5
 ZCONST char Far SeekMsg[] =
6
   "error [%s]:  attempt to seek before beginning of zipfile\n%s";
7
-ZCONST char Far FilenameNotMatched[] = "caution: filename not matched:  %s\n";
8
+ZCONST char Far FilenameNotMatched[] = "caution: filename not matched:  %.512s\n";
9
 ZCONST char Far ExclFilenameNotMatched[] =
10
-  "caution: excluded filename not matched:  %s\n";
11
+  "caution: excluded filename not matched:  %.512s\n";
12
 
13
 #ifdef VMS
14
   ZCONST char Far ReportMsg[] = "\
(-)archivers/unzip/files/patch-process.c (-3 / +3 lines)
Lines 1-6 Link Here
1
--- process.c.orig	2009-03-06 04:25:10.000000000 +0300
1
--- process.c.orig	2009-03-06 01:25:10 UTC
2
+++ process.c	2009-10-26 16:08:15.000000000 +0300
2
+++ process.c
3
@@ -101,10 +101,10 @@
3
@@ -101,10 +101,10 @@ static ZCONST char Far CannotAllocateBuf
4
    /* do_seekable() strings */
4
    /* do_seekable() strings */
5
 # ifdef UNIX
5
 # ifdef UNIX
6
    static ZCONST char Far CannotFindZipfileDirMsg[] =
6
    static ZCONST char Far CannotFindZipfileDirMsg[] =
(-)archivers/unzip/files/patch-unix_Makefile (+28 lines)
Line 0 Link Here
1
--- unix/Makefile.orig	2009-01-18 22:41:18 UTC
2
+++ unix/Makefile
3
@@ -42,12 +42,12 @@
4
 # such as -DDOSWILD).
5
 
6
 # UnZip flags
7
-CC = cc#	try using "gcc" target rather than changing this (CC and LD
8
+CC ?= cc#	try using "gcc" target rather than changing this (CC and LD
9
 LD = $(CC)#	must match, else "unresolved symbol:  ___main" is possible)
10
 AS = as
11
 LOC = $(D_USE_BZ2) $(LOCAL_UNZIP)
12
 AF = $(LOC)
13
-CFLAGS = -O
14
+#CFLAGS = -O
15
 CF_NOOPT = -I. -I$(IZ_BZIP2) -DUNIX $(LOC)
16
 CF = $(CFLAGS) $(CF_NOOPT)
17
 LFLAGS1 =
18
@@ -763,8 +763,8 @@ dnix:		unix_make
19
 # FreeBSD on Intel:
20
 freebsd:		unix_make
21
 	@echo 'NOTE:  use bsd target for non-Intel FreeBSD compiles (if any).'
22
-	$(MAKE) unzips CC=gcc LD=gcc AS=gcc\
23
-	 CFLAGS="-O3 -Wall -DASM_CRC -DBSD"\
24
+	$(MAKE) unzips CC="$(CC)" LD="$(CC)" AS="$(CC)"\
25
+	 CF="$(CF) -Wall -DASM_CRC -DBSD"\
26
 	 AF="-Di386 $(AF)" CRCA_O=crc_gcc$O
27
 
28
 # Generic BSDish Unix gcc.  ``The -O3 only works with later versions of gcc;
(-)archivers/unzip/files/patch-unix_unix.c (+11 lines)
Line 0 Link Here
1
--- unix/unix.c.orig	2009-01-23 23:31:26 UTC
2
+++ unix/unix.c
3
@@ -610,7 +610,7 @@ int mapname(__G__ renamed)
4
                  * else allow 8-bit characters (e.g. UTF-8) in filenames:
5
                  */
6
                 if (uO.cflxflag ||
7
-                    (isprint(workch) || (128 <= workch && workch <= 254)))
8
+		    (isprint(workch) || (128 <= workch && workch <= 255)))
9
                     *pp++ = (char)workch;
10
         } /* end switch */
11
 

Return to bug 190349