summaryrefslogtreecommitdiffstats
path: root/chinese/dictd-database
diff options
context:
space:
mode:
authorvanilla <vanilla@FreeBSD.org>2002-07-20 11:08:11 +0000
committervanilla <vanilla@FreeBSD.org>2002-07-20 11:08:11 +0000
commit42ea3d87d434beb3b3bfd892e9b4c93c5d5a8bb2 (patch)
tree384c768bbe2275ecf7bc00d0e7dbcc9b9f43b348 /chinese/dictd-database
parent50a7ae5ca6fb120f720a53c7a17d2ac74f1f5692 (diff)
downloadFreeBSD-ports-42ea3d87d434beb3b3bfd892e9b4c93c5d5a8bb2.zip
FreeBSD-ports-42ea3d87d434beb3b3bfd892e9b4c93c5d5a8bb2.tar.gz
Add a patch for handle cedict.
PR: ports/40738 Submitted by: Kuang-che Wu <kcwu@kcwu.dyndns.org> Approved by: maintainer.
Diffstat (limited to 'chinese/dictd-database')
-rw-r--r--chinese/dictd-database/Makefile1
-rw-r--r--chinese/dictd-database/files/patch-aa14
-rw-r--r--chinese/dictd-database/files/patch-make-rawdata.pl26
3 files changed, 39 insertions, 2 deletions
diff --git a/chinese/dictd-database/Makefile b/chinese/dictd-database/Makefile
index cd7feba..767fcc8 100644
--- a/chinese/dictd-database/Makefile
+++ b/chinese/dictd-database/Makefile
@@ -7,6 +7,7 @@
PORTNAME= dictd-database
PORTVERSION= 1.2.1
+PORTREVISION= 1
CATEGORIES= chinese textproc
MASTER_SITES= ftp://freebsd.sinica.edu.tw/pub/statue/dictd-database/
DISTNAME= dict-zh-${PORTVERSION}
diff --git a/chinese/dictd-database/files/patch-aa b/chinese/dictd-database/files/patch-aa
index c2de74e..89edb7d 100644
--- a/chinese/dictd-database/files/patch-aa
+++ b/chinese/dictd-database/files/patch-aa
@@ -1,5 +1,5 @@
---- Makefile.in.orig Sun Apr 2 00:43:40 2000
-+++ Makefile.in Sun Oct 14 10:52:13 2001
+--- Makefile.in.orig Wed Nov 28 02:53:55 2001
++++ Makefile.in Fri Jul 19 02:15:58 2002
@@ -75,7 +75,7 @@
(cd $$subdir && $(MAKE)) || exit 1; \
done
@@ -8,3 +8,13 @@
+all:: $(EXES) db
db :: rawdata $(DATABASES)
+
+@@ -110,6 +110,8 @@
+ ./dictfmt -p -u http://www.mandarintools.com/cedict.html \
+ -s "Chinese to English dictionary" \
+ cedict < data/cedict.txt ; \
++ env LANG=C sort cedict.index > cedict.index.tmp ; \
++ mv cedict.index.tmp cedict.index; \
+ if [ "$(DICTZIP)" != "cat" ]; then \
+ dictzip cedict.dict; \
+ fi
diff --git a/chinese/dictd-database/files/patch-make-rawdata.pl b/chinese/dictd-database/files/patch-make-rawdata.pl
new file mode 100644
index 0000000..6678cd0
--- /dev/null
+++ b/chinese/dictd-database/files/patch-make-rawdata.pl
@@ -0,0 +1,26 @@
+--- make-rawdata.pl.orig Fri Jul 19 02:04:15 2002
++++ make-rawdata.pl Fri Jul 19 02:04:50 2002
+@@ -111,7 +111,7 @@
+
+ sub cedict {
+
+- open ( FILE, "data/cedict.utf8") ;
++ open ( FILE, "data/cedict.b5") ;
+ @RawData = <FILE> ;
+ close (FILE) ;
+
+@@ -121,12 +121,12 @@
+ print TXT <<__END ;
+ %h 00-database-info
+ %d
+-English to Chinese Dictionary º~­^¦r¨å
++Chinese to English Dictionary º~­^¦r¨å
+ CEDICT January 17, 2001; Copyright 2000-01
+ __END
+
+ foreach $data (@RawData) {
+- $data =~ s/(.*) \[(.*)\] \/(.*)\//%h $1\n%d\n$3\n/g ;
++ $data =~ s/(.*) \[(.*)\] \/(.*)\//%h $1\n%d\n[$2]\n$3\n/g ;
+ $data =~ s/\//\n/g ;
+ print TXT $data ;
+ }
OpenPOWER on IntegriCloud