aboutsummaryrefslogtreecommitdiff
path: root/chinese
diff options
context:
space:
mode:
authorYing-Chieh Liao <ijliao@FreeBSD.org>2004-08-02 02:45:15 +0000
committerYing-Chieh Liao <ijliao@FreeBSD.org>2004-08-02 02:45:15 +0000
commit1fb72910425c88790898664ef801bdaa99f12535 (patch)
tree6d4fae75709c2bab07bb989cb767ebf422cee979 /chinese
parentd5138d4f5ec27137be8b8e52728a789507a2886f (diff)
downloadports-1fb72910425c88790898664ef801bdaa99f12535.tar.gz
ports-1fb72910425c88790898664ef801bdaa99f12535.zip
Notes
Diffstat (limited to 'chinese')
-rw-r--r--chinese/Makefile1
-rw-r--r--chinese/unrar/Makefile17
-rw-r--r--chinese/unrar/files/patch-arcread.cpp27
-rw-r--r--chinese/unrar/files/patch-unicode.cpp18
4 files changed, 63 insertions, 0 deletions
diff --git a/chinese/Makefile b/chinese/Makefile
index 06ce874e7c4b..2d44a09c7be9 100644
--- a/chinese/Makefile
+++ b/chinese/Makefile
@@ -111,6 +111,7 @@
SUBDIR += tocps
SUBDIR += ttf2pt1
SUBDIR += ttfm
+ SUBDIR += unrar
SUBDIR += unzip
SUBDIR += ve
SUBDIR += vflib
diff --git a/chinese/unrar/Makefile b/chinese/unrar/Makefile
new file mode 100644
index 000000000000..d9ef056b47d8
--- /dev/null
+++ b/chinese/unrar/Makefile
@@ -0,0 +1,17 @@
+# New ports collection makefile for: zh-unrar
+# Date created: 1 Auguest 2004
+# Whom: Shen Chuan-Hsing <statue@freebsd.sinica.edu.tw>
+#
+# $FreeBSD$
+#
+
+CATEGORIES= chinese
+
+MAINTAINER= ports@FreeBSD.org
+
+MASTERDIR= ${.CURDIR}/../../archivers/unrar
+
+EXTRA_PATCHES= ${.CURDIR}/files/patch-arcread.cpp \
+ ${.CURDIR}/files/patch-unicode.cpp
+
+.include "${MASTERDIR}/Makefile"
diff --git a/chinese/unrar/files/patch-arcread.cpp b/chinese/unrar/files/patch-arcread.cpp
new file mode 100644
index 000000000000..e8c8c9b7210a
--- /dev/null
+++ b/chinese/unrar/files/patch-arcread.cpp
@@ -0,0 +1,27 @@
+--- arcread.cpp.orig Sun Aug 1 01:55:38 2004
++++ arcread.cpp Sun Aug 1 01:57:56 2004
+@@ -540,6 +540,7 @@
+
+ void Archive::ConvertUnknownHeader()
+ {
++ int big5=0;
+ if (NewLhd.UnpVer<20 && (NewLhd.FileAttr & 0x10))
+ NewLhd.Flags|=LHD_DIRECTORY;
+ if (NewLhd.HostOS>=HOST_MAX)
+@@ -551,6 +552,16 @@
+ }
+ for (char *s=NewLhd.FileName;*s!=0;s=charnext(s))
+ {
++ if (big5==1) /* skip Big5 second byte */
++ {
++ big5=0;
++ continue;
++ }
++ if ((byte)*s>127) /* Big5 first byte */
++ {
++ big5=1;
++ continue;
++ }
+ if (*s=='/' || *s=='\\')
+ *s=CPATHDIVIDER;
+ #if defined(_APPLE) && !defined(UNICODE_SUPPORTED)
diff --git a/chinese/unrar/files/patch-unicode.cpp b/chinese/unrar/files/patch-unicode.cpp
new file mode 100644
index 000000000000..9bd86779924a
--- /dev/null
+++ b/chinese/unrar/files/patch-unicode.cpp
@@ -0,0 +1,18 @@
+--- unicode.cpp.orig Sun Aug 1 01:54:23 2004
++++ unicode.cpp Sun Aug 1 01:54:56 2004
+@@ -2,6 +2,7 @@
+
+ void WideToChar(const wchar *Src,char *Dest,int DestSize)
+ {
++#if 0 /* patch for chinese filename */
+ #ifdef _WIN_32
+ WideCharToMultiByte(CP_ACP,0,Src,-1,Dest,DestSize,NULL,NULL);
+ #else
+@@ -18,6 +19,7 @@
+ if (Src[I]==0)
+ break;
+ }
++#endif
+ #endif
+ #endif
+ #endif