diff options
author | chinsan <chinsan@FreeBSD.org> | 2007-12-17 04:41:25 +0800 |
---|---|---|
committer | chinsan <chinsan@FreeBSD.org> | 2007-12-17 04:41:25 +0800 |
commit | 94a259dbdc4910f81e38f0410c9ae4f5ab6245b9 (patch) | |
tree | c1a1cbe1b5356dc4342ec7471b2edc680e9bb246 /chinese/pyDict | |
parent | 737320c80603b18d0030047d74c1bb49f6fa2c8f (diff) | |
download | freebsd-ports-gnome-94a259dbdc4910f81e38f0410c9ae4f5ab6245b9.tar.gz freebsd-ports-gnome-94a259dbdc4910f81e38f0410c9ae4f5ab6245b9.tar.zst freebsd-ports-gnome-94a259dbdc4910f81e38f0410c9ae4f5ab6245b9.zip |
- Fix $DISPLAY issue under console environment with python 2.3.
http://www.python.org/dev/peps/pep-0263/
- Bump PORTREVISION.
- Add NOPORTDOCS knob.
- Pass maintainership to submitter.
PR: ports/117863
Submitted by: Sunry Chen <sunrychen _at_ gmail.com>
Diffstat (limited to 'chinese/pyDict')
-rw-r--r-- | chinese/pyDict/Makefile | 15 | ||||
-rw-r--r-- | chinese/pyDict/files/patch-dict.py | 50 | ||||
-rw-r--r-- | chinese/pyDict/pkg-descr | 2 | ||||
-rw-r--r-- | chinese/pyDict/pkg-plist | 8 |
4 files changed, 66 insertions, 9 deletions
diff --git a/chinese/pyDict/Makefile b/chinese/pyDict/Makefile index 716b05af667c..952cd6dea227 100644 --- a/chinese/pyDict/Makefile +++ b/chinese/pyDict/Makefile @@ -7,17 +7,20 @@ PORTNAME= pyDict PORTVERSION= 0.2.6.3 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= chinese -MASTER_SITES= ftp://freebsd.sinica.edu.tw/pub/statue/pyDict/ +MASTER_SITES= LOCAL/chinsan/pyDict/ \ + http://www.525183.com/freebsd/pyDict/ \ + http://www.chinatinco.com/freebsd/pyDict/ \ + http://525183.serverbox.org/freebsd/pyDict/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= sunrychen@gmail.com COMMENT= A Chinese <-> English dictionary, under both console and X11 RUN_DEPENDS= ${LOCALBASE}/include/pygtk/pygtk.h:${PORTSDIR}/x11-toolkits/py-gtk \ ${X11BASE}/lib/X11/fonts/TrueType/bsmi00lp.ttf:${PORTSDIR}/chinese/arphicttf -USE_X_PREFIX= yes +USE_XLIB= yes WRKSRC= ${WRKDIR}/dict NO_BUILD= yes @@ -29,7 +32,7 @@ SUB_FILES= pkg-message .include <bsd.port.pre.mk> -do-patch: +pre-patch: ${REINPLACE_CMD} -e 's,/bin/grep,${GREP},g' \ -e 's,--after-context=20,-A 20,g' \ -e 's,/usr/X11R6,${PREFIX},g' ${WRKSRC}/dict.py @@ -38,8 +41,10 @@ do-install: @${MKDIR} ${DICTDIR} @${INSTALL_DATA} ${WRKSRC}/[a-z].lib ${WRKSRC}/dict.xpm ${WRKSRC}/yaba.xpm ${WRKSRC}/HELP ${DICTDIR} @${INSTALL_DATA} ${FILESDIR}/gtkrc.zh_TW.big5.sample ${DICTDIR} +.if !defined(NOPORTDOCS) @${MKDIR} ${DOCDIR} @${INSTALL_DATA} ${WRKSRC}/CHANGELOG ${WRKSRC}/COPYING ${WRKSRC}/README ${DOCDIR} +.endif @${INSTALL_SCRIPT} ${WRKSRC}/dict.py ${PREFIX}/bin/pydict post-install: diff --git a/chinese/pyDict/files/patch-dict.py b/chinese/pyDict/files/patch-dict.py new file mode 100644 index 000000000000..731397e038df --- /dev/null +++ b/chinese/pyDict/files/patch-dict.py @@ -0,0 +1,50 @@ +--- ./dict.py.orig Wed Oct 17 22:02:16 2007 ++++ ./dict.py Tue Nov 6 18:28:47 2007 +@@ -1,4 +1,5 @@ + #!/usr/bin/env python ++# -*- coding: big5 -*- + #------------------------------------------------- + # this is a program that utilize the library of xdict. + # Made by Daniel Gau <r90057@im.ntu.edu.tw> +@@ -322,16 +323,17 @@ + """Get the word this object describes.""" + return self.word + +-from gtk import * +-from GDK import * ++prop = [" "," "," ","<<形容詞>>","<<副詞>>","art. ","<<連接詞>>","int. ","<<名詞>>"," "," ","num. ", "prep. "," ","pron. ","<<動詞>>","<<助動詞>>","<<非及物動詞>>","<<及物動詞>>","vbl. "," ","st. ", "pr. ","<<過去分詞>>","<<複數>>","ing. "," ","<<形容詞>>","<<副詞>>","pla. ","pn. "," "] ++ + from string import split,replace,strip,lstrip,find,lower +-import GtkExtra + import sys,os,string ++if os.environ.has_key('DISPLAY') and len(sys.argv) == 1: ++ from gtk import * ++ from GDK import * ++ import GtkExtra + + +-prop = [" "," "," ","<<形容詞>>","<<副詞>>","art. ","<<連接詞>>","int. ","<<名詞>>"," "," ","num. ", "prep. "," ","pron. ","<<動詞>>","<<助動詞>>","<<非及物動詞>>","<<及物動詞>>","vbl. "," ","st. ", "pr. ","<<過去分詞>>","<<複數>>","ing. "," ","<<形容詞>>","<<副詞>>","pla. ","pn. "," "] +- +-class Pref(GtkDialog): ++ class Pref(GtkDialog): + def __init__(self,modal=TRUE,app=None): + GtkDialog.__init__(self) + self.connect("destroy", self.quit) +@@ -482,7 +484,7 @@ + def quit(self,w=None,event=None): + self.hide() + +-class HelpDialog(GtkDialog): ++ class HelpDialog(GtkDialog): + def __init__(self,modal=TRUE,file=None): + GtkDialog.__init__(self) + self.set_title("pyDict Help") +@@ -542,7 +544,7 @@ + self.quit() + + +-class App(GtkWindow): ++ class App(GtkWindow): + def __init__(self): + GtkWindow.__init__(self,WINDOW_TOPLEVEL) + self.create_vars() diff --git a/chinese/pyDict/pkg-descr b/chinese/pyDict/pkg-descr index 33db46f5a03e..defce21cd9bf 100644 --- a/chinese/pyDict/pkg-descr +++ b/chinese/pyDict/pkg-descr @@ -4,3 +4,5 @@ data is prepared by TurboLinux in simplified Chinese, then converted to traditional Chinese by CLE(Chinese Linux Extension) team. Author: Daniel Gau <plateau@pagic.net> + +WWW: http://sourceforge.net/projects/pydict/ diff --git a/chinese/pyDict/pkg-plist b/chinese/pyDict/pkg-plist index 6bb7d07a79ce..dfe459a1ea07 100644 --- a/chinese/pyDict/pkg-plist +++ b/chinese/pyDict/pkg-plist @@ -29,8 +29,8 @@ lib/X11/pyDict/x.lib lib/X11/pyDict/y.lib lib/X11/pyDict/yaba.xpm lib/X11/pyDict/z.lib -share/doc/pyDict/CHANGELOG -share/doc/pyDict/COPYING -share/doc/pyDict/README +%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG +%%PORTDOCS%%%%DOCSDIR%%/COPYING +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrm lib/X11/pyDict -@dirrm share/doc/pyDict |