Upgrade from 2.1 to 3.0. It appears, the bulk of the changes went into

the word databases, for the software is almost completely unmodified.

Depened only on Tcl. Tk is needed for the GUI-browser wnb only, and
should not prevent X11-less servers from using WordNet. pkg-message
is set up to inform the user, that they need Tk present for wnb to
function.
This commit is contained in:
Mikhail Teterin 2007-05-28 18:43:00 +00:00
parent 07ea49481a
commit 27db40cf8d
9 changed files with 36 additions and 36 deletions

View file

@ -6,8 +6,7 @@
#
PORTNAME= WordNet
PORTVERSION= 2.1
PORTREVISION= 1
PORTVERSION= 3.0
CATEGORIES= textproc
MASTER_SITES= ftp://ftp.cogsci.princeton.edu/pub/wordnet/${PORTVERSION}/ \
http://wordnet.princeton.edu/${PORTVERSION}/
@ -15,22 +14,24 @@ MASTER_SITES= ftp://ftp.cogsci.princeton.edu/pub/wordnet/${PORTVERSION}/ \
MAINTAINER= mi@aldan.algebra.com
COMMENT= Dictionaries and thesauri with devel. libraries (C, TCL) and browsers
LIB_DEPENDS= tk${TCL_VER}:${PORTSDIR}/x11-toolkits/tk${TCL_VER}
TCL_DVER?= 8.4
TCL_VER= ${TCL_DVER:C/\.//}
SCRIPTS_ENV+= TCL_DVER=${TCL_DVER} VER=${PORTVERSION}
MAKE_ENV+= TCL_DVER=${TCL_DVER} VER=${PORTVERSION}
PLIST_SUB+= TCL_DVER=${TCL_DVER} VER=${PORTVERSION}
USE_TCL= yes
SCRIPTS_ENV+= TCL_DVER=${TCL_VER} VER=${PORTVERSION}
MAKE_ENV+= TCL_DVER=${TCL_VER} VER=${PORTVERSION}
PLIST_SUB+= TCL_DVER=${TCL_VER} VER=${PORTVERSION}
USE_BZIP2= yes
REINPLACE_ARGS= -i ""
INSTALLS_SHLIB= yes
SUB_FILES= pkg-message
SUB_LIST+= TCL_VER=${TCL_VER}
post-patch:
${REINPLACE_CMD} -e 's,/usr/local/WordNet-2.1,${DATADIR},g' \
${WRKSRC}/src/wnb ${WRKSRC}/doc/man/*.?
${REINPLACE_CMD} -e 's, *\\n,\\n,' ${WRKSRC}/include/wn.h
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.pre.mk>
.for s in 1 3 5 7

View file

@ -1,3 +1,3 @@
MD5 (WordNet-2.1.tar.bz2) = 2f22fae591f60877cd803f57b3bd43cc
SHA256 (WordNet-2.1.tar.bz2) = 9f05fc60ce8272c7129f829078614882b7a53e20664dd5e38948bd3e497e0224
SIZE (WordNet-2.1.tar.bz2) = 9004994
MD5 (WordNet-3.0.tar.bz2) = 3ce821b8b45aaab91854d5248a23766c
SHA256 (WordNet-3.0.tar.bz2) = ab232433fb6828dcbf00bc213c12a8da79e80d70fed808d6cf85f79da5e91f2c
SIZE (WordNet-3.0.tar.bz2) = 9060694

View file

@ -1,12 +1,12 @@
--- src/stubs.c Wed Jul 6 14:49:05 2005
+++ src/stubs.c Sun Jan 15 07:16:57 2006
--- src/stubs.c Thu Jan 4 12:47:55 2007
+++ src/stubs.c Mon May 28 14:16:28 2007
@@ -12,8 +12,7 @@
#include <string.h>
#include <tcl.h>
-#include <tk.h>
#include <wn.h>
-static Id = "$Id: stubs.c,v 1.7 2005/04/29 19:01:57 wn Exp $";
-static char *Id = "$Id: stubs.c,v 1.7 2005/04/29 19:01:57 wn Exp $";
+__FBSDID("$Id: stubs.c,v 1.7 2005/04/29 19:01:57 wn Exp $");
static char resultbuf[SEARCHBUF];
@ -198,7 +198,7 @@
+
/* This is a callback function invoked by the WordNet search engine every so
** often, to allow the interface to respond to events (especially the pressing
@@ -217,5 +242,6 @@
@@ -217,5 +243,6 @@
*/
-void tkwn_doevents (void) {
@ -206,7 +206,7 @@
+tkwn_doevents (void) {
while (Tcl_DoOneEvent (TCL_WINDOW_EVENTS | TCL_DONT_WAIT) != 0) {}
}
@@ -226,5 +252,6 @@
@@ -226,5 +253,6 @@
*/
-int tkwn_displayerror (char *msg) {
@ -214,14 +214,14 @@
+tkwn_displayerror (const char *msg) {
#ifdef _WINDOWS
MessageBeep (MB_ICONEXCLAMATION);
@@ -232,5 +259,5 @@
@@ -232,5 +260,5 @@
MB_ICONEXCLAMATION | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND);
#else
- fprintf (stderr, "%s", msg);
+ fputs(msg, stderr);
#endif
return -1;
@@ -246,25 +273,26 @@
@@ -246,25 +274,26 @@
display_message = tkwn_displayerror;
wninit ();
- Tcl_CreateCommand (interp, "findvalidsearches", (void *)

View file

@ -3,8 +3,8 @@
@@ -17,5 +17,5 @@
#include "wn.h"
-static char *Id = "$Id: search.c,v 1.165 2005/02/24 15:36:00 wn Exp $";
+__FBSDID("$Id: search.c,v 1.165 2005/02/24 15:36:00 wn Exp $");
-static char *Id = "$Id: search.c,v 1.166 2006/11/14 20:52:45 wn Exp $";
+__FBSDID("$Id: search.c,v 1.166 2006/11/14 20:52:45 wn Exp $");
/* For adjectives, indicates synset type */
@@ -45,12 +45,12 @@

View file

@ -3,8 +3,8 @@
@@ -19,7 +19,7 @@
#endif
-static char *Id = "$Id: morph.c,v 1.66 2005/03/18 18:14:24 wn Exp $";
+__FBSDID("$Id: morph.c,v 1.66 2005/03/18 18:14:24 wn Exp $");
-static char *Id = "$Id: morph.c,v 1.67 2006/11/14 21:00:23 wn Exp $";
+__FBSDID("$Id: morph.c,v 1.67 2006/11/14 21:00:23 wn Exp $");
-static char *sufx[] ={
+static const char *sufx[] ={

View file

@ -1,13 +1,5 @@
--- include/wn.h Wed Jul 6 14:48:44 2005
+++ include/wn.h Wed Dec 21 17:24:58 2005
@@ -31,5 +31,7 @@
#else
#define DICTDIR "/dict"
+#ifndef DEFAULTPATH
#define DEFAULTPATH "/usr/local/WordNet-2.1/dict"
+#endif
#define DATAFILE "%s/data.%s"
#define INDEXFILE "%s/index.%s"
@@ -152,12 +154,12 @@
#define IMMED_POSTNOMINAL IPADJ

View file

@ -16,12 +16,12 @@ dictionaries and the bitmap into ${PREFIX}/share/WordNet.
if {$tcl_platform(platform) == "unix"} {
- if {[lsearch -exact [array names env] WNHOME] == -1} {
- set resourcedir "/usr/local/WordNet-2.1/lib/wnres"
- set resourcedir "/usr/local/WordNet-3.0/lib/wnres"
- } else {
- set resourcedir "$env(WNHOME)/lib/wnres"
+ set resourcedirs {
+ /usr/local/WordNet-2.1
+ /usr/local/WordNet-2.1/lib/wnres
+ /usr/local/WordNet-3.0
+ /usr/local/WordNet-3.0/lib/wnres
+ }
+ if {[info exists env(WNHOME)]} {
+ lappend resourcedirs $env(WNHOME) $env(WNHOME)/lib/wnres

View file

@ -3,8 +3,8 @@
@@ -11,9 +11,9 @@
#endif
-char *wnrelease = "2.1";
+const char *wnrelease = "2.1";
-char *wnrelease = "3.0";
+const char *wnrelease = "3.0";
/* Lexicographer file names and numbers */

View file

@ -0,0 +1,7 @@
For the GUI word-browser ``wnb'' to function, Tk-%%TCL_VER%% must
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.