aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authormi <mi@FreeBSD.org>2015-02-25 09:30:49 +0800
committermi <mi@FreeBSD.org>2015-02-25 09:30:49 +0800
commit15de06a0e7da3b21abd6edc36b89740d9c691957 (patch)
tree50dcf1dda35a14eb25cb19cb1800d8842c6033e3 /textproc
parentf5be645ecf17c6f8ea27f8d6e6e993ace4db0eeb (diff)
downloadfreebsd-ports-gnome-15de06a0e7da3b21abd6edc36b89740d9c691957.tar.gz
freebsd-ports-gnome-15de06a0e7da3b21abd6edc36b89740d9c691957.tar.zst
freebsd-ports-gnome-15de06a0e7da3b21abd6edc36b89740d9c691957.zip
Use the 3.1 version of the dictionary, released in 2012. The latest
available code remains at 3.0. Install the data files directly -- instead of extracting them into WRKSRC first. Only install files actually used by the applications -- the distfiles also contain data, that is used to build the databases, but aren't used at runtime.
Diffstat (limited to 'textproc')
-rw-r--r--textproc/wordnet/Makefile18
-rw-r--r--textproc/wordnet/distinfo4
-rw-r--r--textproc/wordnet/files/Makefile1
-rw-r--r--textproc/wordnet/files/dict.Makefile22
-rw-r--r--textproc/wordnet/files/patch-src__wnb_25
-rw-r--r--textproc/wordnet/files/pkg-message.in2
-rw-r--r--textproc/wordnet/pkg-plist3
7 files changed, 21 insertions, 34 deletions
diff --git a/textproc/wordnet/Makefile b/textproc/wordnet/Makefile
index 124a79ce6f2e..40047921f1e5 100644
--- a/textproc/wordnet/Makefile
+++ b/textproc/wordnet/Makefile
@@ -3,13 +3,17 @@
PORTNAME= WordNet
PORTVERSION= 3.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= textproc
-MASTER_SITES= http://wordnetcode.princeton.edu/${PORTVERSION}/
+MASTER_SITES= http://wordnetcode.princeton.edu/${PORTVERSION}/:code \
+ http://wordnetcode.princeton.edu/:dict
+DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:code wn3.1.dict.tar.gz:dict
MAINTAINER= mi@aldan.algebra.com
COMMENT= Dictionaries and thesauri with devel. libraries (C, TCL) and browsers
+EXTRACT_ONLY= ${DISTFILES:M*code:S/:code//}
+EXTRACT_AFTER_ARGS=--exclude dict
USES= tcl uidfix tar:bzip2
SCRIPTS_ENV+= TCL_DVER=${TCL_VER} VER=${PORTVERSION}
MAKE_ENV+= TCL_DVER=${TCL_VER} VER=${PORTVERSION} STAGEDIR="${STAGEDIR}"
@@ -20,8 +24,16 @@ SUB_FILES= pkg-message
SUB_LIST+= TCL_VER=${TCL_VER}
post-patch:
- ${REINPLACE_CMD} -e 's,/usr/local/WordNet-2.1,${DATADIR},g' \
+ ${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},g' \
${WRKSRC}/src/wnb ${WRKSRC}/doc/man/*.?
${REINPLACE_CMD} -e 's, *\\n,\\n,' ${WRKSRC}/include/wn.h
+post-install:
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${TAR} -C ${STAGEDIR}${DATADIR} -x --no-same-owner \
+ --strip-components 1 \
+ -f ${_DISTDIR}${DISTFILES:M*dict:S/:dict//} \
+ `${SED} -n -e '/\.xbm/d' -e 's,^%%DATADIR%%/,dict/,p' ${PLIST}`
+ @${CAT} ${PKGMESSAGE}
+
.include <bsd.port.mk>
diff --git a/textproc/wordnet/distinfo b/textproc/wordnet/distinfo
index e94c33f0343c..bf249febd2c7 100644
--- a/textproc/wordnet/distinfo
+++ b/textproc/wordnet/distinfo
@@ -1,2 +1,4 @@
SHA256 (WordNet-3.0.tar.bz2) = 6c492d0c7b4a40e7674d088191d3aa11f373bb1da60762e098b8ee2dda96ef22
-SHA256 (WordNet-3.0.tar.bz2) = ab232433fb6828dcbf00bc213c12a8da79e80d70fed808d6cf85f79da5e91f2c
+SIZE (WordNet-3.0.tar.bz2) = 9060524
+SHA256 (wn3.1.dict.tar.gz) = 3f7d8be8ef6ecc7167d39b10d66954ec734280b5bdcd57f7d9eafe429d11c22a
+SIZE (wn3.1.dict.tar.gz) = 16358468
diff --git a/textproc/wordnet/files/Makefile b/textproc/wordnet/files/Makefile
index 0187599bde68..6c7a88b06e33 100644
--- a/textproc/wordnet/files/Makefile
+++ b/textproc/wordnet/files/Makefile
@@ -4,7 +4,6 @@ SUBDIR= include \
lib \
lib/wnres \
src \
- dict \
doc/man
.include <bsd.subdir.mk>
diff --git a/textproc/wordnet/files/dict.Makefile b/textproc/wordnet/files/dict.Makefile
deleted file mode 100644
index d3a90099cd7e..000000000000
--- a/textproc/wordnet/files/dict.Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-WN_INSTALLDIR= ${STAGEDIR}${PREFIX}/share/WordNet
-WN_FILES= adj.exc adv.exc cntlist cntlist.rev data.adj \
- data.adv data.noun data.verb frames.vrb index.adj \
- index.adv index.noun index.sense index.verb \
- noun.exc sentidx.vrb sents.vrb verb.Framestext verb.exc
-
-all: $(WN_FILES)
-
-${WN_INSTALLDIR}:
- mkdir -p ${WN_INSTALLDIR}
-
-.for f in ${WN_FILES}
-INSTALLED+= ${WN_INSTALLDIR}/$f
-
-${WN_INSTALLDIR}/$f: $f
- ${BSD_INSTALL_DATA} $f ${WN_INSTALLDIR}/$f
-.endfor
-
-install: ${WN_INSTALLDIR} ${INSTALLED}
-
-NO_OBJ= noobj
-.include <bsd.prog.mk>
diff --git a/textproc/wordnet/files/patch-src__wnb_2 b/textproc/wordnet/files/patch-src__wnb_2
index e5e0c5b16bb1..d993147a2004 100644
--- a/textproc/wordnet/files/patch-src__wnb_2
+++ b/textproc/wordnet/files/patch-src__wnb_2
@@ -12,7 +12,7 @@ dictionaries and the bitmap into ${PREFIX}/share/WordNet.
--- src/wnb Tue Jun 7 15:19:22 2005
+++ src/wnb Sun Jan 15 07:42:38 2006
-@@ -103,9 +100,15 @@
+@@ -103,9 +100,14 @@
if {$tcl_platform(platform) == "unix"} {
- if {[lsearch -exact [array names env] WNHOME] == -1} {
@@ -20,8 +20,7 @@ dictionaries and the bitmap into ${PREFIX}/share/WordNet.
- } else {
- set resourcedir "$env(WNHOME)/lib/wnres"
+ set resourcedirs {
-+ /usr/local/WordNet-3.0
-+ /usr/local/WordNet-3.0/lib/wnres
++ /usr/local/WordNet
+ }
+ if {[info exists env(WNHOME)]} {
+ lappend resourcedirs $env(WNHOME) $env(WNHOME)/lib/wnres
diff --git a/textproc/wordnet/files/pkg-message.in b/textproc/wordnet/files/pkg-message.in
index f1f0fb7fa796..98b306160cce 100644
--- a/textproc/wordnet/files/pkg-message.in
+++ b/textproc/wordnet/files/pkg-message.in
@@ -3,5 +3,5 @@
be installed. This dependency is not automatic, because there
are plenty of uses for WordNet on servers without X11.
- The command-line utilit ``wn'', for example, requires only Tcl.
+ The command-line utility ``wn'', for example, requires only Tcl.
diff --git a/textproc/wordnet/pkg-plist b/textproc/wordnet/pkg-plist
index bcbcad1927d9..3cb9265554c7 100644
--- a/textproc/wordnet/pkg-plist
+++ b/textproc/wordnet/pkg-plist
@@ -10,13 +10,11 @@ lib/libtclwn2.so
lib/tcl%%TCL_DVER%%/Wordnet/pkgIndex.tcl
%%DATADIR%%/adj.exc
%%DATADIR%%/adv.exc
-%%DATADIR%%/cntlist
%%DATADIR%%/cntlist.rev
%%DATADIR%%/data.adj
%%DATADIR%%/data.adv
%%DATADIR%%/data.noun
%%DATADIR%%/data.verb
-%%DATADIR%%/frames.vrb
%%DATADIR%%/index.adj
%%DATADIR%%/index.adv
%%DATADIR%%/index.noun
@@ -26,7 +24,6 @@ lib/tcl%%TCL_DVER%%/Wordnet/pkgIndex.tcl
%%DATADIR%%/sentidx.vrb
%%DATADIR%%/sents.vrb
%%DATADIR%%/verb.exc
-%%DATADIR%%/verb.Framestext
%%DATADIR%%/wn.xbm
man/man1/wn.1.gz
man/man1/wnb.1.gz