Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2003 21:17:13 +0800 (CST)
From:      Statue <statue@freebsd.sinica.edu.tw>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/50817: New port: chinese/oxford
Message-ID:  <20030411131713.73A787A9@freebsd.sinica.edu.tw>
Resent-Message-ID: <200304111320.h3BDKCut004070@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         50817
>Category:       ports
>Synopsis:       New port: chinese/oxford
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 11 06:20:12 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Statue
>Release:        FreeBSD 4.7-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD freebsd.sinica.edu.tw 4.7-PRERELEASE FreeBSD 4.7-PRERELEASE #2: Mon Sep 9 10:45:46 CST 2002 ycheng@freebsd.sinica.edu.tw:/usr/src/sys/compile/GENERIC i386


	
>Description:

oxford is a English to Chinese(GB) dictionary, written in Perl.

WWW: http://igloo.its.unimelb.edu.au/Blowfish/
	
>How-To-Repeat:
	
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	oxford/
#	oxford/Makefile
#	oxford/distinfo
#	oxford/files
#	oxford/pkg-descr
#	oxford/pkg-plist
#	oxford/files/oxford
#
echo c - oxford/
mkdir -p oxford/ > /dev/null 2>&1
echo x - oxford/Makefile
sed 's/^X//' >oxford/Makefile << 'END-of-oxford/Makefile'
X# New ports collection makefile for:	oxford
X# Date created:		30 Dec 2002
X# Whom:			Shen Chuan-Hsing <statue@freebsd.sinica.edu.tw>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	oxford
XPORTVERSION=	0.1
XCATEGORIES=	chinese
XMASTER_SITES=	ftp://igloo.its.unimelb.edu.au/pub/Oxford_Dictionary/ \
X		ftp://freebsd.sinica.edu.tw/pub/statue/oxford/
XDISTFILES=	a.zip b.zip c.zip d.zip e.zip f.zip g.zip h.zip i.zip \
X		j.zip k.zip l.zip m.zip n.zip o.zip p.zip q.zip r.zip \
X		s.zip t.zip u.zip v.zip w.zip x.zip y.zip z.zip
X
XMAINTAINER=	statue@freebsd.sinica.edu.tw
XCOMMENT=	A English to Chinese(GB) dictionary
X
XDIST_SUBDIR=	oxford
XUSE_ZIP=	yes
XNO_BUILD=	yes
X
Xdo-install:
X	${MKDIR} ${LOCALBASE}/share/oxford
X	${INSTALL_DATA} ${WRKDIR}/*.dic ${LOCALBASE}/share/oxford
X	${MKDIR} ${LOCALBASE}/bin
X	${INSTALL} ${FILESDIR}/oxford ${LOCALBASE}/bin
X
X.include <bsd.port.mk>
END-of-oxford/Makefile
echo x - oxford/distinfo
sed 's/^X//' >oxford/distinfo << 'END-of-oxford/distinfo'
XMD5 (oxford/a.zip) = 0eab106b761f30f3cca18344c787c64c
XMD5 (oxford/b.zip) = 9071b8ff177f3d302f14dc7989c656cd
XMD5 (oxford/c.zip) = 07ce46603773e09cb83d12371db388e6
XMD5 (oxford/d.zip) = 50331fad576839b11a19c152fbbb7643
XMD5 (oxford/e.zip) = 0656fbddacb6e3aa3a8d28f26d5f611d
XMD5 (oxford/f.zip) = 284a9f8403e5aea05fab55b35923258e
XMD5 (oxford/g.zip) = c32d73be27cd195572bf1cdfc72f6d1f
XMD5 (oxford/h.zip) = 64a32629f5eb9fe8061b4bc01a443460
XMD5 (oxford/i.zip) = 5b4f478b06fc2bf46067a1c28d69feef
XMD5 (oxford/j.zip) = 6f7efc408858371dbfa96040d1462000
XMD5 (oxford/k.zip) = 94e8bdfb528a42eeb37a1ca0d03fdea4
XMD5 (oxford/l.zip) = d4e9fbf4fd621135dd1d50b75572b907
XMD5 (oxford/m.zip) = 30925a266884e2fd4d60c2723cb3a6be
XMD5 (oxford/n.zip) = f0af8db1cde3c5f8356e70f48c1c63cd
XMD5 (oxford/o.zip) = 54b395eecd66120a6d3c3214510f7c63
XMD5 (oxford/p.zip) = d1199b355db34ab5a42a8103dec46dfc
XMD5 (oxford/q.zip) = f2ef63c1fb9745ed53dd6150d39f853f
XMD5 (oxford/r.zip) = 608f46772ee687727a6e3dd8d6f63ac0
XMD5 (oxford/s.zip) = 22008cd3c119c45e027e263328f995da
XMD5 (oxford/t.zip) = 15d8c14ce4868aef41e53a1a44a52ba0
XMD5 (oxford/u.zip) = a939a0103a029f3b822c31713de7ea1c
XMD5 (oxford/v.zip) = 16667399589d275c08670739ccd66eb0
XMD5 (oxford/w.zip) = 1b511d3e8dc7b9bcf9feac1227c14c9f
XMD5 (oxford/x.zip) = c4d36c7214a09deb42ceb1d3b99909ab
XMD5 (oxford/y.zip) = 2b2576849d53bd8e4f58f56a66acb88f
XMD5 (oxford/z.zip) = 167ceb288ce608d62cea92b688dfd683
END-of-oxford/distinfo
echo c - oxford/files
mkdir -p oxford/files > /dev/null 2>&1
echo x - oxford/pkg-descr
sed 's/^X//' >oxford/pkg-descr << 'END-of-oxford/pkg-descr'
Xoxford is a English to Chinese dictionary, written in Perl.
X
XWWW: http://igloo.its.unimelb.edu.au/Blowfish/
END-of-oxford/pkg-descr
echo x - oxford/pkg-plist
sed 's/^X//' >oxford/pkg-plist << 'END-of-oxford/pkg-plist'
Xbin/oxford
Xshare/oxford/a.dic
Xshare/oxford/b.dic
Xshare/oxford/c.dic
Xshare/oxford/d.dic
Xshare/oxford/e.dic
Xshare/oxford/f.dic
Xshare/oxford/g.dic
Xshare/oxford/h.dic
Xshare/oxford/i.dic
Xshare/oxford/j.dic
Xshare/oxford/k.dic
Xshare/oxford/l.dic
Xshare/oxford/m.dic
Xshare/oxford/n.dic
Xshare/oxford/o.dic
Xshare/oxford/p.dic
Xshare/oxford/q.dic
Xshare/oxford/r.dic
Xshare/oxford/s.dic
Xshare/oxford/t.dic
Xshare/oxford/u.dic
Xshare/oxford/v.dic
Xshare/oxford/w.dic
Xshare/oxford/x.dic
Xshare/oxford/y.dic
Xshare/oxford/z.dic
X@dirrm share/oxford
END-of-oxford/pkg-plist
echo x - oxford/files/oxford
sed 's/^X//' >oxford/files/oxford << 'END-of-oxford/files/oxford'
X#!/usr/bin/perl
X
X$prefix="/usr/local";
X
X# modify file path below if needed
X$dicpath="$prefix/share/oxford/";
X$flag=0;
X
X# accept 4 parameters
X$input="$ARGV[0]";
Xif ( $ARGV[1] ) { $input = $input." $ARGV[1]"; }
Xif ( $ARGV[2] ) { $input = $input." $ARGV[2]"; }
Xif ( $ARGV[3] ) { $input = $input." $ARGV[3]"; }
X
X# no argument
Xif ( ! $input )
X{
X  print "Input your word/phrase please: ";
X  $input=<STDIN>;
X  chop($input);
X} 
X
Xif( $input )
X{
X  $index=`echo $input | cut -c1 | tr "[A-Z]" "[a-z]"`;
X  chop($index);
X  $dicfilename=$dicpath."$index.dic";
X
X  open ( FHHH, $dicfilename )
X    or die("Dictionary perl script");
X
X  print "Searching Word: [ $input ]\n";
X
X  while ( <FHHH> )
X  {
X    if ( /^$input/i )
X    {
X       print $_;
X       print "\n";
X       $flag=1;
X       $matchline=1;
X    }
X    else
X    {
X       if ( $matchline eq 1 )
X       {      
X          # print explanations
X           print $_; 
X           print "\n";
X           $matchline = 0;
X       }
X    }
X  }
X  if ( $flag eq 0 )
X  {
X     print "not found.\n";
X  }
X}  # end of else of if ( ! $input )
END-of-oxford/files/oxford
exit

	


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030411131713.73A787A9>