Исправлена локализация unzip

atratsevskiy
Alexander Tratsevskiy 9 years ago
parent 04a88f66d2
commit b24eecc33a

@ -1 +1 @@
DIST unzip60.tar.gz 1376845 SHA256 036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37
DIST unzip60.tar.gz 1376845 SHA256 036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37 SHA512 0694e403ebc57b37218e00ec1a406cae5cc9c5b52b6798e0d4590840b6cdbf9ddc0d9471f67af783e960f8fa2e620394d51384257dca23d06bcd90224a80ce5d WHIRLPOOL eab32d6d0ab100d302b608658a3ae290d3dad4beddccebaf6cb6527102bb238f751ec6482dea68ae62474005de89f11f9e0cf1b1e12bee2ca5a2336a3c0c9808

@ -1,18 +1,47 @@
diff -pur unzip-5.52-orig/unix/Makefile unzip-5.52/unix/Makefile
--- unzip-5.52-orig/unix/Makefile 2007-07-30 11:40:15 +0400
+++ unzip-5.52/unix/Makefile 2007-07-30 12:03:54 +0400
@@ -52,7 +52,7 @@
diff -pur unzip60orig/unix/configure unzip60/unix/configure
--- unzip60orig/unix/configure 2009-04-16 23:25:12.000000000 +0400
+++ unzip60/unix/configure 2010-11-26 19:07:43.000000000 +0300
@@ -17,7 +17,7 @@ CFLAGSR=${CFLAGS}
IZ_BZIP2=${3}
CFLAGS="${CFLAGS} -I. -DUNIX"
LFLAGS1=""
-LFLAGS2="-s"
+LFLAGS2="-l natspec"
LN="ln -s"
CFLAGS_OPT=''
diff -pur unzip60orig/unix/Makefile unzip60/unix/Makefile
--- unzip60orig/unix/Makefile 2009-01-19 01:41:18.000000000 +0300
+++ unzip60/unix/Makefile 2010-11-29 14:25:58.461000001 +0300
@@ -45,14 +45,14 @@
CC = cc# try using "gcc" target rather than changing this (CC and LD
LD = $(CC)# must match, else "unresolved symbol: ___main" is possible)
AS = as
-LOC = $(D_USE_BZ2) $(LOCAL_UNZIP)
+LOC = $(D_USE_BZ2) -DNO_SETLOCALE $(LOCAL_UNZIP)
AF = $(LOC)
CFLAGS = -O
CF_NOOPT = -I. -I$(IZ_BZIP2) -DUNIX $(LOC)
CF = $(CFLAGS) $(CF_NOOPT)
LFLAGS1 =
LF = -o unzip$E $(LFLAGS1)
-LF2 = -s
+LF2 = -l natspec
# UnZipSFX flags
SL = -o unzipsfx$E $(LFLAGS1)
diff -pur unzip-5.52-orig/unix/unix.c unzip-5.52/unix/unix.c
--- unzip-5.52-orig/unix/unix.c 2007-07-30 11:40:15 +0400
+++ unzip-5.52/unix/unix.c 2007-07-30 12:23:42 +0400
@@ -121,7 +121,7 @@ INSTALL_PROGRAM = $(INSTALL)
INSTALL_D = mkdir -p
# on some systems, manext=l and MANDIR=/usr/man/man$(manext) may be appropriate
manext = 1
-prefix = /usr/local
+prefix = /usr
BINDIR = $(prefix)/bin# where to install executables
MANDIR = $(prefix)/man/man$(manext)# where to install man pages
INSTALLEDBIN = $(BINDIR)/funzip$E $(BINDIR)/unzip$E $(BINDIR)/unzipsfx$E \
diff -pur unzip60orig/unix/unix.c unzip60/unix/unix.c
--- unzip60orig/unix/unix.c 2009-01-24 02:31:26.000000000 +0300
+++ unzip60/unix/unix.c 2010-11-26 16:58:35.000000000 +0300
@@ -30,6 +30,9 @@
#define UNZIP_INTERNAL
#include "unzip.h"
@ -23,7 +52,7 @@ diff -pur unzip-5.52-orig/unix/unix.c unzip-5.52/unix/unix.c
#ifdef SCO_XENIX
# define SYSNDIR
#else /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */
@@ -1666,3 +1669,44 @@ static void qlfix(__G__ ef_ptr, ef_len)
@@ -1874,3 +1877,44 @@ static void qlfix(__G__ ef_ptr, ef_len)
}
}
#endif /* QLZIP */
@ -68,10 +97,10 @@ diff -pur unzip-5.52-orig/unix/unix.c unzip-5.52/unix/unix.c
+ strncpy(string, buf, FILNAMSIZ);
+ free (buf);
+}
diff -pur unzip-5.52-orig/unix/unxcfg.h unzip-5.52/unix/unxcfg.h
--- unzip-5.52-orig/unix/unxcfg.h 2005-01-05 03:54:22 +0300
+++ unzip-5.52/unix/unxcfg.h 2007-07-30 12:06:17 +0400
@@ -141,4 +141,30 @@
diff -pur unzip60orig/unix/unxcfg.h unzip60/unix/unxcfg.h
--- unzip60orig/unix/unxcfg.h 2009-04-16 22:36:12.000000000 +0400
+++ unzip60/unix/unxcfg.h 2010-11-26 16:58:35.000000000 +0300
@@ -227,4 +227,30 @@ typedef struct stat z_stat;
/* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */
/* and notfirstcall are used by do_wild(). */
@ -102,10 +131,10 @@ diff -pur unzip-5.52-orig/unix/unxcfg.h unzip-5.52/unix/unxcfg.h
+void init_conversion_charsets(void);
+
#endif /* !__unxcfg_h */
diff -pur unzip-5.52-orig/unzip.c unzip-5.52/unzip.c
--- unzip-5.52-orig/unzip.c 2005-02-27 07:37:14 +0300
+++ unzip-5.52/unzip.c 2007-07-30 11:40:28 +0400
@@ -331,7 +331,9 @@
diff -pur unzip60orig/unzip.c unzip60/unzip.c
--- unzip60orig/unzip.c 2009-04-16 22:26:52.000000000 +0400
+++ unzip60/unzip.c 2010-11-26 16:58:35.000000000 +0300
@@ -331,7 +331,9 @@ static ZCONST char Far ZipInfoUsageLine3
-h print header line -t print totals for listed files or for all\n\
-z print zipfile comment -T print file times in sortable decimal format\
\n -C be case-insensitive %s\
@ -116,7 +145,7 @@ diff -pur unzip-5.52-orig/unzip.c unzip-5.52/unzip.c
#ifdef MORE
static ZCONST char Far ZipInfoUsageLine4[] =
" -M page output through built-in \"more\"\n";
@@ -570,8 +572,7 @@
@@ -570,8 +572,7 @@ Send bug reports using //www.info-zip.or
#else /* !VMS */
# ifdef COPYRIGHT_CLEAN
static ZCONST char Far UnzipUsageLine1[] = "\
@ -126,7 +155,7 @@ diff -pur unzip-5.52-orig/unzip.c unzip-5.52/unzip.c
\n\n";
# else
static ZCONST char Far UnzipUsageLine1[] = "\
@@ -673,7 +674,9 @@
@@ -673,7 +674,9 @@ modifiers:\n\
-j junk paths (do not make directories) -aa treat ALL files as text\n\
-U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\
-C match filenames case-insensitively -L make (some) names \
@ -137,7 +166,7 @@ diff -pur unzip-5.52-orig/unzip.c unzip-5.52/unzip.c
#endif /* ?VMS */
#else /* !UNICODE_SUPPORT */
#ifdef VMS
@@ -692,7 +695,9 @@
@@ -692,7 +695,9 @@ modifiers:\n\
-o overwrite files WITHOUT prompting -a auto-convert any text files\n\
-j junk paths (do not make directories) -aa treat ALL files as text\n\
-C match filenames case-insensitively -L make (some) names \
@ -148,9 +177,9 @@ diff -pur unzip-5.52-orig/unzip.c unzip-5.52/unzip.c
#endif /* ?VMS */
#endif /* ?UNICODE_SUPPORT */
@@ -668,6 +690,10 @@ int unzip(__G__ argc, argv)
@@ -803,6 +808,10 @@ int unzip(__G__ argc, argv)
#endif /* UNICODE_SUPPORT */
SETLOCALE(LC_CTYPE,"");
+#ifdef UNIX
+ init_conversion_charsets();
@ -159,7 +188,7 @@ diff -pur unzip-5.52-orig/unzip.c unzip-5.52/unzip.c
#if (defined(__IBMC__) && defined(__DEBUG_ALLOC__))
extern void DebugMalloc(void);
@@ -1089,6 +1115,11 @@ int uz_opts(__G__ pargc, pargv)
@@ -1336,6 +1345,11 @@ int uz_opts(__G__ pargc, pargv)
argc = *pargc;
argv = *pargv;
@ -171,7 +200,7 @@ diff -pur unzip-5.52-orig/unzip.c unzip-5.52/unzip.c
while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) {
s = *argv + 1;
while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */
@@ -1252,6 +1283,35 @@ int uz_opts(__G__ pargc, pargv)
@@ -1517,6 +1531,35 @@ int uz_opts(__G__ pargc, pargv)
}
break;
#endif /* MACOS */
@ -207,7 +236,7 @@ diff -pur unzip-5.52-orig/unzip.c unzip-5.52/unzip.c
case ('j'): /* junk pathnames/directory structure */
if (negative)
uO.jflag = FALSE, negative = 0;
@@ -1327,6 +1387,35 @@ int uz_opts(__G__ pargc, pargv)
@@ -1592,6 +1635,35 @@ int uz_opts(__G__ pargc, pargv)
} else
++uO.overwrite_all;
break;
@ -243,10 +272,10 @@ diff -pur unzip-5.52-orig/unzip.c unzip-5.52/unzip.c
case ('p'): /* pipes: extract to stdout, no messages */
if (negative) {
uO.cflag = FALSE;
diff -pur unzip-5.52-orig/unzpriv.h unzip-5.52/unzpriv.h
--- unzip-5.52-orig/unzpriv.h 2007-07-30 11:40:15 +0400
+++ unzip-5.52/unzpriv.h 2007-07-30 11:40:28 +0400
@@ -2564,7 +2566,7 @@ char *GetLoadPath OF((__GPRO));
diff -pur unzip60orig/unzpriv.h unzip60/unzpriv.h
--- unzip60orig/unzpriv.h 2009-04-20 03:59:26.000000000 +0400
+++ unzip60/unzpriv.h 2010-11-26 16:58:35.000000000 +0300
@@ -3008,7 +3008,7 @@ char *GetLoadPath OF((__GPRO));
!(((islochdr) || (isuxatt)) && \
((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \
(hostnum) == FS_HPFS_ || \
@ -255,10 +284,10 @@ diff -pur unzip-5.52-orig/unzpriv.h unzip-5.52/unzpriv.h
_OEM_INTERN((string)); \
} else { \
_ISO_INTERN((string)); \
diff -pur unzip-5.52-orig/zipinfo.c unzip-5.52/zipinfo.c
--- unzip-5.52-orig/zipinfo.c 2005-01-27 04:02:16 +0300
+++ unzip-5.52/zipinfo.c 2007-07-30 11:40:28 +0400
@@ -447,6 +447,10 @@ int zi_opts(__G__ pargc, pargv)
diff -pur unzip60orig/zipinfo.c unzip60/zipinfo.c
--- unzip60orig/zipinfo.c 2009-02-08 20:04:30.000000000 +0300
+++ unzip60/zipinfo.c 2010-11-26 16:58:35.000000000 +0300
@@ -457,6 +457,10 @@ int zi_opts(__G__ pargc, pargv)
int tflag_slm=TRUE, tflag_2v=FALSE;
int explicit_h=FALSE, explicit_t=FALSE;
@ -269,7 +298,7 @@ diff -pur unzip-5.52-orig/zipinfo.c unzip-5.52/zipinfo.c
#ifdef MACOS
uO.lflag = LFLAG; /* reset default on each call */
@@ -491,6 +495,35 @@ int zi_opts(__G__ pargc, pargv)
@@ -501,6 +505,35 @@ int zi_opts(__G__ pargc, pargv)
uO.lflag = 0;
}
break;
@ -305,7 +334,7 @@ diff -pur unzip-5.52-orig/zipinfo.c unzip-5.52/zipinfo.c
case 'l': /* longer form of "ls -l" type listing */
if (negative)
uO.lflag = -2, negative = 0;
@@ -511,6 +544,35 @@ int zi_opts(__G__ pargc, pargv)
@@ -521,6 +554,35 @@ int zi_opts(__G__ pargc, pargv)
G.M_flag = TRUE;
break;
#endif
@ -340,4 +369,4 @@ diff -pur unzip-5.52-orig/zipinfo.c unzip-5.52/zipinfo.c
+#endif /* ?UNIX */
case 's': /* default: shorter "ls -l" type listing */
if (negative)
uO.lflag = -2, negative = 0;
uO.lflag = -2, negative = 0;

@ -27,7 +27,7 @@ src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/${P}-no-exec-stack.patch
use natspec && epatch "${FILESDIR}"/${P}-alt-natspec.patch
use natspec && epatch "${FILESDIR}"/${P}-natspec.patch
sed -i \
-e '/^CFLAGS/d' \
-e '/CFLAGS/s:-O[0-9]\?:$(CFLAGS) $(CPPFLAGS):' \
Loading…
Cancel
Save