summaryrefslogtreecommitdiff
path: root/chinese
diff options
context:
space:
mode:
authorJing-Tang Keith Jang <keith@FreeBSD.org>2000-11-07 04:50:24 +0000
committerJing-Tang Keith Jang <keith@FreeBSD.org>2000-11-07 04:50:24 +0000
commit4d10c5d235600d4c382393da3b398d852439b4ed (patch)
tree7daf9ad18f6381c22772d8753071fe41035311a1 /chinese
parentNew MASTER_SITES (diff)
New port: mkisofs
mkisofs is a pre-mastering program that generates binary ISO9660 filesystem image. Users can then write the image to devices like CD-R or CD-RW. This port can also generate Chinese Big5 filenames on Joliet filesystems. Use the -J option to activate it. Although it works flawlessly, further improvements are possible: 1. Accept GB(Simplified Chinese) filenames also. 2. Upgrade to mkisofs 1.13. 1.13 uses a better structure to manage I18N, which is (almost all) borrowed from Linux kernel's fs code.
Notes
Notes: svn path=/head/; revision=34867
Diffstat (limited to 'chinese')
-rw-r--r--chinese/Makefile1
-rw-r--r--chinese/mkisofs/Makefile32
-rw-r--r--chinese/mkisofs/distinfo2
-rw-r--r--chinese/mkisofs/files/patch-ab26
-rw-r--r--chinese/mkisofs/files/patch-ac26
-rw-r--r--chinese/mkisofs/files/patch-ad127
-rw-r--r--chinese/mkisofs/files/patch-ae19
-rw-r--r--chinese/mkisofs/pkg-comment1
-rw-r--r--chinese/mkisofs/pkg-descr7
-rw-r--r--chinese/mkisofs/pkg-plist4
10 files changed, 245 insertions, 0 deletions
diff --git a/chinese/Makefile b/chinese/Makefile
index 90f0bfbe6198..3c64ccac3f79 100644
--- a/chinese/Makefile
+++ b/chinese/Makefile
@@ -28,6 +28,7 @@
SUBDIR += linux-netscape47-communicator
SUBDIR += linux-netscape47-navigator
SUBDIR += lunar
+ SUBDIR += mkisofs
SUBDIR += moefonts-cid
SUBDIR += moettf
SUBDIR += mule-freewnn
diff --git a/chinese/mkisofs/Makefile b/chinese/mkisofs/Makefile
new file mode 100644
index 000000000000..d9afb02568d0
--- /dev/null
+++ b/chinese/mkisofs/Makefile
@@ -0,0 +1,32 @@
+# New ports collection makefile for: zh-mkisofs
+# Date created: 19 Oct 2000
+# Whom: Jing-Tang Keith Jang <keith@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= mkisofs
+PORTVERSION= 1.12b5
+CATEGORIES= chinese sysutils
+MASTER_SITES= ftp://freebsd.sinica.edu.tw/pub/keith/
+
+PATCH_SITES= ftp://freebsd.sinica.edu.tw/pub/keith/
+PATCHFILES= mkisofs-1.12b5.big5patch.gz
+
+MAINTAINER= keith@FreeBSD.org
+
+GNU_CONFIGURE= yes
+ALL_TARGET= World
+MAN8= mkisofs.8 isoinfo.8
+
+pre-configure:
+ ${PERL} -pi.orig -e 's:prefix = /usr/local:prefix = ${PREFIX}:' \
+ ${WRKSRC}/diag/Makefile.in
+
+post-build:
+ cd ${WRKSRC}/diag && make
+
+post-install:
+ cd ${WRKSRC}/diag && make install
+
+.include <bsd.port.mk>
diff --git a/chinese/mkisofs/distinfo b/chinese/mkisofs/distinfo
new file mode 100644
index 000000000000..2e522da31cad
--- /dev/null
+++ b/chinese/mkisofs/distinfo
@@ -0,0 +1,2 @@
+MD5 (mkisofs-1.12b5.tar.gz) = 176b5f7f2499d8f2b32e55befdd13f69
+MD5 (mkisofs-1.12b5.big5patch.gz) = 8aa012761b9bf7d6c4d79c7051028ff6
diff --git a/chinese/mkisofs/files/patch-ab b/chinese/mkisofs/files/patch-ab
new file mode 100644
index 000000000000..9210bf1f4027
--- /dev/null
+++ b/chinese/mkisofs/files/patch-ab
@@ -0,0 +1,26 @@
+--- include/mconfig.h.orig Mon Mar 1 18:42:26 1999
++++ include/mconfig.h Sat May 8 17:00:07 1999
+@@ -28,6 +28,10 @@
+ #ifndef _MCONFIG_H
+ #define _MCONFIG_H
+
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++# include <sys/param.h>
++#endif
++
+ /*
+ * This hack that is needed as long as VMS has no POSIX shell.
+ */
+@@ -77,6 +81,12 @@
+ /*
+ * Some magic that cannot (yet) be figured out with autoconf.
+ */
++
++#if (defined(BSD) && (BSD >= 199103))
++# ifndef HAVE_FLOCK
++# define HAVE_FLOCK
++# endif
++#endif
+
+ #ifdef sparc
+ # ifndef HAVE_LDSTUB
diff --git a/chinese/mkisofs/files/patch-ac b/chinese/mkisofs/files/patch-ac
new file mode 100644
index 000000000000..a07df689a280
--- /dev/null
+++ b/chinese/mkisofs/files/patch-ac
@@ -0,0 +1,26 @@
+--- defaults.h.orig Mon Oct 13 04:21:11 1997
++++ defaults.h Thu Dec 4 21:14:16 1997
+@@ -39,6 +39,22 @@
+ #define SYSTEM_ID_DEFAULT "AIX"
+ #endif
+
+-#ifndef SYSTEM_ID_DEFAULT
++#ifdef __linux__
+ #define SYSTEM_ID_DEFAULT "LINUX"
++#endif
++
++#ifdef __FreeBSD__
++#define SYSTEM_ID_DEFAULT "FreeBSD"
++#endif
++
++#ifdef __OpenBSD__
++#define SYSTEM_ID_DEFAULT "OpenBSD"
++#endif
++
++#ifdef __NetBSD__
++#define SYSTEM_ID_DEFAULT "NetBSD"
++#endif
++
++#ifndef SYSTEM_ID_DEFAULT
++#define SYSTEM_ID_DEFAULT "Unknown"
+ #endif
diff --git a/chinese/mkisofs/files/patch-ad b/chinese/mkisofs/files/patch-ad
new file mode 100644
index 000000000000..afc2c68edf2b
--- /dev/null
+++ b/chinese/mkisofs/files/patch-ad
@@ -0,0 +1,127 @@
+--- joliet.c.orig Fri Mar 3 15:33:48 2000
++++ joliet.c Fri Mar 3 15:54:48 2000
+@@ -78,6 +78,9 @@
+ #include <stdlib.h>
+ #include <time.h>
+
++/* Big5 to Unicode mapping table */
++#include "big52uni.h"
++
+ static int jpath_table_index;
+ static struct directory ** jpathlist;
+ static int next_jpath_index = 1;
+@@ -88,6 +91,9 @@
+ static void DECL(assign_joliet_directory_addresses, (struct directory * node));
+ static int jroot_gen __PR((void));
+
++static u_int16_t unicode_table[] = CHINESE_UNICODE;
++static u_int16_t big5_table[] = CHINESE_BIG5;
++
+ /*
+ * Function: convert_to_unicode
+ *
+@@ -101,6 +107,8 @@
+ unsigned char * tmpbuf;
+ int i;
+ int j;
++ int p;
++ u_int16_t code, unicode;
+
+ /*
+ * If we get a NULL pointer for the source, it means we have an inplace
+@@ -156,6 +164,31 @@
+ break;
+ }
+ }
++ /******//* big5 to unicode patch*/
++
++ if( tmpbuf[j] >= 0xA1 ){
++
++ /* **** 00 A4 00 A4 00 A4 00 E5 **** */
++ /* **** ¤¤ ¤å **** */
++ /* ***j=A4 A4 A4 E5 --> code=0xa4a4 ->find unicode **** */
++ /* **** 4E 2D 65 87 <--- result **** */
++
++ code = tmpbuf[j];
++ code = code << 8;
++ code += tmpbuf[j+1];
++ for (p=0;p<BIG5_TABLE_SIZE;p++) {
++ if (big5_table[p] == code){
++ unicode = unicode_table[p];
++ buffer[i] = unicode >> 8;
++ buffer[i+1] = unicode ;
++ j++;
++ break;
++ }
++ /*else {
++ return (u_int16_t)'?';
++ }*/
++ }
++ }
+ }
+
+ if( source == NULL )
+@@ -176,8 +209,48 @@
+ static int FDECL1(joliet_strlen, const char *, string)
+ {
+ int rtn;
++ unsigned char * tmpbuf;
++ int i;
++ int j;
++
++ int p;
++ u_int16_t code, unicode;
++ int tmpsize ;
+
+ rtn = strlen(string) << 1;
++ tmpsize = rtn;
++
++ tmpbuf = (u_char *)string;
++ tmpsize = rtn;
++ j=0;
++ for(i=0; i < tmpsize ; i += 2, j++)
++ {
++ /******//* big5 to unicode patch*/
++
++ if( tmpbuf[j] >= 0xA1 ){
++
++ /* **** 00 A4 00 A4 00 A4 00 E5 **** */
++ /* **** ¤¤ ¤å **** */
++ /* ***j=A4 A4 A4 E5 --> code=0xa4a4 ->find unicode **** */
++ /* **** 4E 2D 65 87 <--- result **** */
++
++ code = tmpbuf[j];
++ code = code << 8;
++ code += tmpbuf[j+1];
++ for (p=0;p<BIG5_TABLE_SIZE;p++) {
++ if (big5_table[p] == code){
++ tmpsize -= 2;
++ unicode = unicode_table[p];
++ j++;
++ break;
++ }
++ /*else {
++ return (u_int16_t)'?';
++ }
++ */
++ }
++ }
++ }
+
+ /*
+ * We do clamp the maximum length of a Joliet string to be the
+@@ -185,11 +258,11 @@
+ * bolix things up with very long paths. The Joliet specs say
+ * that the maximum length is 128 bytes, or 64 unicode characters.
+ */
+- if( rtn > 0x80)
++ if( tmpsize > 0x80)
+ {
+- rtn = 0x80;
++ tmpsize = 0x80;
+ }
+- return rtn;
++ return tmpsize;
+ }
+
+ /*
diff --git a/chinese/mkisofs/files/patch-ae b/chinese/mkisofs/files/patch-ae
new file mode 100644
index 000000000000..909db19512b5
--- /dev/null
+++ b/chinese/mkisofs/files/patch-ae
@@ -0,0 +1,19 @@
+--- name.c.orig Fri Mar 3 15:33:43 2000
++++ name.c Fri Mar 3 15:45:25 2000
+@@ -213,6 +213,7 @@
+ }
+ if(current_length < 30)
+ {
++/*
+ if( *pnt < 0 )
+ {
+ *result++ = '_';
+@@ -221,6 +222,8 @@
+ {
+ *result++ = (islower((unsigned char)*pnt) ? toupper((unsigned char)*pnt) : *pnt);
+ }
++*/
++ *result++ = *pnt;
+ }
+ }
+ else
diff --git a/chinese/mkisofs/pkg-comment b/chinese/mkisofs/pkg-comment
new file mode 100644
index 000000000000..70debf8df8dc
--- /dev/null
+++ b/chinese/mkisofs/pkg-comment
@@ -0,0 +1 @@
+Create ISO9660/JOLIET/Rock Ridge filesystems, Big5 compatible
diff --git a/chinese/mkisofs/pkg-descr b/chinese/mkisofs/pkg-descr
new file mode 100644
index 000000000000..fd309ebd1610
--- /dev/null
+++ b/chinese/mkisofs/pkg-descr
@@ -0,0 +1,7 @@
+mkisofs is effectively a pre-mastering program to generate the iso9660
+filesystem - it takes a snapshot of a given directory tree, and generates
+a binary image which will correspond to an iso9660 filesystem when written
+to a block device.
+
+This port can also generate Big5 filenames on Joliet filesystems. Use
+the -J option to activate it.
diff --git a/chinese/mkisofs/pkg-plist b/chinese/mkisofs/pkg-plist
new file mode 100644
index 000000000000..b3a036769e3d
--- /dev/null
+++ b/chinese/mkisofs/pkg-plist
@@ -0,0 +1,4 @@
+bin/mkisofs
+bin/isodump
+bin/isoinfo
+bin/isovfy