diff options
author | vanilla <vanilla@FreeBSD.org> | 2003-04-27 09:12:01 +0800 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2003-04-27 09:12:01 +0800 |
commit | 5345011f0367e7f2b971e3a966bb1501dcdc0dfd (patch) | |
tree | ca8c36f4834e436091c311d050b28a1684ac1bab /chinese/oxford | |
parent | 8bcdaf3445bd86d372e3575f426b65ca0cf4bb88 (diff) | |
download | freebsd-ports-graphics-5345011f0367e7f2b971e3a966bb1501dcdc0dfd.tar.gz freebsd-ports-graphics-5345011f0367e7f2b971e3a966bb1501dcdc0dfd.tar.zst freebsd-ports-graphics-5345011f0367e7f2b971e3a966bb1501dcdc0dfd.zip |
Add oxford 0.1, a English to Chinese(GB) dictionary.
PR: 50817
Submitted by: Shen Chuan-Hsing <statue@freebsd.sinica.edu.tw>
Diffstat (limited to 'chinese/oxford')
-rw-r--r-- | chinese/oxford/Makefile | 30 | ||||
-rw-r--r-- | chinese/oxford/distinfo | 26 | ||||
-rw-r--r-- | chinese/oxford/files/oxford | 58 | ||||
-rw-r--r-- | chinese/oxford/pkg-descr | 3 | ||||
-rw-r--r-- | chinese/oxford/pkg-plist | 28 |
5 files changed, 145 insertions, 0 deletions
diff --git a/chinese/oxford/Makefile b/chinese/oxford/Makefile new file mode 100644 index 00000000000..ae522403543 --- /dev/null +++ b/chinese/oxford/Makefile @@ -0,0 +1,30 @@ +# New ports collection makefile for: oxford +# Date created: 30 Dec 2002 +# Whom: Shen Chuan-Hsing <statue@freebsd.sinica.edu.tw> +# +# $FreeBSD$ +# + +PORTNAME= oxford +PORTVERSION= 0.1 +CATEGORIES= chinese +MASTER_SITES= ftp://igloo.its.unimelb.edu.au/pub/Oxford_Dictionary/ \ + ftp://freebsd.sinica.edu.tw/pub/statue/oxford/ +DISTFILES= a.zip b.zip c.zip d.zip e.zip f.zip g.zip h.zip i.zip \ + j.zip k.zip l.zip m.zip n.zip o.zip p.zip q.zip r.zip \ + s.zip t.zip u.zip v.zip w.zip x.zip y.zip z.zip + +MAINTAINER= statue@freebsd.sinica.edu.tw +COMMENT= A English to Chinese(GB) dictionary + +DIST_SUBDIR= oxford +USE_ZIP= yes +NO_BUILD= yes + +do-install: + ${MKDIR} ${LOCALBASE}/share/oxford + ${INSTALL_DATA} ${WRKDIR}/*.dic ${LOCALBASE}/share/oxford + ${MKDIR} ${LOCALBASE}/bin + ${INSTALL} ${FILESDIR}/oxford ${LOCALBASE}/bin + +.include <bsd.port.mk> diff --git a/chinese/oxford/distinfo b/chinese/oxford/distinfo new file mode 100644 index 00000000000..1f0d24d6c76 --- /dev/null +++ b/chinese/oxford/distinfo @@ -0,0 +1,26 @@ +MD5 (oxford/a.zip) = 0eab106b761f30f3cca18344c787c64c +MD5 (oxford/b.zip) = 9071b8ff177f3d302f14dc7989c656cd +MD5 (oxford/c.zip) = 07ce46603773e09cb83d12371db388e6 +MD5 (oxford/d.zip) = 50331fad576839b11a19c152fbbb7643 +MD5 (oxford/e.zip) = 0656fbddacb6e3aa3a8d28f26d5f611d +MD5 (oxford/f.zip) = 284a9f8403e5aea05fab55b35923258e +MD5 (oxford/g.zip) = c32d73be27cd195572bf1cdfc72f6d1f +MD5 (oxford/h.zip) = 64a32629f5eb9fe8061b4bc01a443460 +MD5 (oxford/i.zip) = 5b4f478b06fc2bf46067a1c28d69feef +MD5 (oxford/j.zip) = 6f7efc408858371dbfa96040d1462000 +MD5 (oxford/k.zip) = 94e8bdfb528a42eeb37a1ca0d03fdea4 +MD5 (oxford/l.zip) = d4e9fbf4fd621135dd1d50b75572b907 +MD5 (oxford/m.zip) = 30925a266884e2fd4d60c2723cb3a6be +MD5 (oxford/n.zip) = f0af8db1cde3c5f8356e70f48c1c63cd +MD5 (oxford/o.zip) = 54b395eecd66120a6d3c3214510f7c63 +MD5 (oxford/p.zip) = d1199b355db34ab5a42a8103dec46dfc +MD5 (oxford/q.zip) = f2ef63c1fb9745ed53dd6150d39f853f +MD5 (oxford/r.zip) = 608f46772ee687727a6e3dd8d6f63ac0 +MD5 (oxford/s.zip) = 22008cd3c119c45e027e263328f995da +MD5 (oxford/t.zip) = 15d8c14ce4868aef41e53a1a44a52ba0 +MD5 (oxford/u.zip) = a939a0103a029f3b822c31713de7ea1c +MD5 (oxford/v.zip) = 16667399589d275c08670739ccd66eb0 +MD5 (oxford/w.zip) = 1b511d3e8dc7b9bcf9feac1227c14c9f +MD5 (oxford/x.zip) = c4d36c7214a09deb42ceb1d3b99909ab +MD5 (oxford/y.zip) = 2b2576849d53bd8e4f58f56a66acb88f +MD5 (oxford/z.zip) = 167ceb288ce608d62cea92b688dfd683 diff --git a/chinese/oxford/files/oxford b/chinese/oxford/files/oxford new file mode 100644 index 00000000000..4479635d79d --- /dev/null +++ b/chinese/oxford/files/oxford @@ -0,0 +1,58 @@ +#!/usr/bin/perl + +$prefix="/usr/local"; + +# modify file path below if needed +$dicpath="$prefix/share/oxford/"; +$flag=0; + +# accept 4 parameters +$input="$ARGV[0]"; +if ( $ARGV[1] ) { $input = $input." $ARGV[1]"; } +if ( $ARGV[2] ) { $input = $input." $ARGV[2]"; } +if ( $ARGV[3] ) { $input = $input." $ARGV[3]"; } + +# no argument +if ( ! $input ) +{ + print "Input your word/phrase please: "; + $input=<STDIN>; + chop($input); +} + +if( $input ) +{ + $index=`echo $input | cut -c1 | tr "[A-Z]" "[a-z]"`; + chop($index); + $dicfilename=$dicpath."$index.dic"; + + open ( FHHH, $dicfilename ) + or die("Dictionary perl script"); + + print "Searching Word: [ $input ]\n"; + + while ( <FHHH> ) + { + if ( /^$input/i ) + { + print $_; + print "\n"; + $flag=1; + $matchline=1; + } + else + { + if ( $matchline eq 1 ) + { + # print explanations + print $_; + print "\n"; + $matchline = 0; + } + } + } + if ( $flag eq 0 ) + { + print "not found.\n"; + } +} # end of else of if ( ! $input ) diff --git a/chinese/oxford/pkg-descr b/chinese/oxford/pkg-descr new file mode 100644 index 00000000000..2d94bba4f8c --- /dev/null +++ b/chinese/oxford/pkg-descr @@ -0,0 +1,3 @@ +oxford is a English to Chinese dictionary, written in Perl. + +WWW: http://igloo.its.unimelb.edu.au/Blowfish/ diff --git a/chinese/oxford/pkg-plist b/chinese/oxford/pkg-plist new file mode 100644 index 00000000000..1f6c02fbdb3 --- /dev/null +++ b/chinese/oxford/pkg-plist @@ -0,0 +1,28 @@ +bin/oxford +share/oxford/a.dic +share/oxford/b.dic +share/oxford/c.dic +share/oxford/d.dic +share/oxford/e.dic +share/oxford/f.dic +share/oxford/g.dic +share/oxford/h.dic +share/oxford/i.dic +share/oxford/j.dic +share/oxford/k.dic +share/oxford/l.dic +share/oxford/m.dic +share/oxford/n.dic +share/oxford/o.dic +share/oxford/p.dic +share/oxford/q.dic +share/oxford/r.dic +share/oxford/s.dic +share/oxford/t.dic +share/oxford/u.dic +share/oxford/v.dic +share/oxford/w.dic +share/oxford/x.dic +share/oxford/y.dic +share/oxford/z.dic +@dirrm share/oxford |