View | Details | Raw Unified | Return to bug 90323
Collapse All | Expand All

(-)Makefile (-9 / +36 lines)
Lines 6-15 Link Here
6
#
6
#
7
7
8
PORTNAME=	WordNet
8
PORTNAME=	WordNet
9
PORTVERSION=	2.0
9
PORTVERSION=	2.1
10
CATEGORIES=	textproc
10
CATEGORIES=	textproc
11
MASTER_SITES=	ftp://ftp.cogsci.princeton.edu/pub/wordnet/${PORTVERSION}/ \
11
MASTER_SITES=	ftp://ftp.cogsci.princeton.edu/pub/wordnet/${PORTVERSION}/ \
12
		http://www.cogsci.princeton.edu/${PORTVERSION}/ \
12
		http://wordnet.princeton.edu/${PORTVERSION}/ \
13
		ftp://ftp.ims.uni-stuttgart.de/pub/WordNet/${PORTVERSION}/
13
		ftp://ftp.ims.uni-stuttgart.de/pub/WordNet/${PORTVERSION}/
14
14
15
MAINTAINER=	mi@aldan.algebra.com
15
MAINTAINER=	mi@aldan.algebra.com
Lines 19-25 Link Here
19
19
20
# The vendor packages up a lot of useless precompiled binaries
20
# The vendor packages up a lot of useless precompiled binaries
21
# for a few platforms with the source code. Do not extract them:
21
# for a few platforms with the source code. Do not extract them:
22
EXTRACT_AFTER_ARGS= | ${TAR} -xf - --exclude '*/bin/*' \
22
EXTRACT_AFTER_ARGS=	| ${TAR} -xf - --exclude '*/bin/*' \
23
		--exclude '*/lib/solaris/*' \
23
		--exclude '*/lib/solaris/*' \
24
		--exclude '*/lib/linux/*' \
24
		--exclude '*/lib/linux/*' \
25
		--exclude '*/lib/irix/*' \
25
		--exclude '*/lib/irix/*' \
Lines 33-49 Link Here
33
USE_REINPLACE=	yes
33
USE_REINPLACE=	yes
34
REINPLACE_ARGS=	-i ""
34
REINPLACE_ARGS=	-i ""
35
INSTALLS_SHLIB=	yes
35
INSTALLS_SHLIB=	yes
36
HAS_CONFIGURE=	yes
37
CONFIGURE_ARGS+=	--with-tcl=${LOCALBASE}/lib/tcl${TCL_DVER} --with-tk=${LOCALBASE}/lib/tk${TCL_DVER} --includedir=${PREFIX}/include/${LOCALPATH} --datadir=${PREFIX}/share/${LOCALPATH} --bindir=${PREFIX}/bin --libdir=${PREFIX}/lib
38
LOCALPATH=	${PORTNAME}-${PORTVERSION}
39
40
MAN1=		grind.1 \
41
		wn.1 \
42
		wnb.1 \
43
		wnintro.1
44
MAN3=		binsrch.3 morph.3 wnintro.3 wnsearch.3 wnutil.3
45
MAN5=		cntlist.5 lexnames.5 senseidx.5 wndb.5 wninput.5 wnintro.5
46
MAN7=		morphy.7 uniqbeg.7 wngloss.7 wngroups.7 wnintro.7 \
47
		wnlicens.7 wnpkgs.7 wnstats.7
36
48
37
post-patch:
49
post-patch:
38
	${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},g' \
50
	${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},g' \
39
		-e 's,_VER_,${PORTVERSION},g' ${WRKSRC}/include/wnconsts.h \
51
		-e 's,_VER_,${PORTVERSION},g' ${WRKSRC}/include/wn.h \
40
		${WRKSRC}/src/wnb/wnb
52
		${WRKSRC}/src/wnb
53
	${REINPLACE_CMD} -e 's,<malloc.h>,<stdlib.h>,g' \
54
		${WRKSRC}/lib/wnutil.c
55
	${REINPLACE_CMD} -e 's,<tk.h>,<tk${TCL_DVER}/tk.h>,g' \
56
		${WRKSRC}/src/tkAppInit.c ${WRKSRC}/src/stubs.c
41
57
42
.include <bsd.port.pre.mk>
58
.include <bsd.port.pre.mk>
43
59
44
.for s in 1 3 5 7
60
pre-install:
45
MAN$s!=		${MAKE} -f ${FILESDIR}/man.Makefile -V MAN$s
61
.if !defined(NOPORTDOCS)
46
.endfor
62
	${REINPLACE_CMD} -e 's,^htmldir = $$(prefix)/doc/html,htmldir = ${DOCSDIR}/html,g' \
47
MANCOMPRESSED=	maybe
63
		${WRKSRC}/doc/html/Makefile
64
	${REINPLACE_CMD} -e 's,^pdfdir = $$(prefix)/doc/pdf,pdfdir = ${DOCSDIR}/pdf,g' \
65
		${WRKSRC}/doc/pdf/Makefile
66
	${REINPLACE_CMD} -e 's,^psdir = $$(prefix)/doc/ps,psdir = ${DOCSDIR}/ps,g' \
67
		${WRKSRC}/doc/ps/Makefile
68
.endif
69
	${REINPLACE_CMD} -e 's,^mandir = $${prefix}/man,mandir = ${MANPREFIX}/man,g' \
70
		${WRKSRC}/doc/man/Makefile
71
	${REINPLACE_CMD} -e 's,^wnresdir = $$(prefix)/lib/wnres,wnresdir = ${DATADIR}/wnres,g' \
72
		${WRKSRC}/lib/wnres//Makefile
73
	${REINPLACE_CMD} -e 's,^dictdir = $$(prefix)/dict,dictdir = ${DATADIR}/dict,g' \
74
		${WRKSRC}/dict/Makefile
48
75
49
.include <bsd.port.post.mk>
76
.include <bsd.port.post.mk>
(-)distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
MD5 (WordNet-2.0.tar.gz) = 42faaf63f391bb1e13f59ca83490634d
1
MD5 (WordNet-2.1.tar.gz) = 081aa25baaccac602cebb61f6cb949e7
2
SIZE (WordNet-2.0.tar.gz) = 12847598
2
SHA256 (WordNet-2.1.tar.gz) = 8ed7ec24377d114c6db326a6f114d6e22afb85cc37f7f1386831b6d8f114784d
3
SIZE (WordNet-2.1.tar.gz) = 11441476
(-)pkg-plist (-36 / +103 lines)
Lines 1-40 Link Here
1
bin/wishwn
1
bin/wnb
2
bin/wnb
2
bin/wn
3
bin/wn
3
include/WordNet-%%VER%%/license.h
4
include/WordNet-%%VER%%/setutil.h
5
include/WordNet-%%VER%%/wn.h
4
include/WordNet-%%VER%%/wn.h
6
include/WordNet-%%VER%%/wnconsts.h
5
lib/libWN.a
7
include/WordNet-%%VER%%/wnglobal.h
6
%%DOCSDIR%%/html/binsrch.3WN.html
8
include/WordNet-%%VER%%/wnhelp.h
7
%%DOCSDIR%%/html/cntlist.5WN.html
9
include/WordNet-%%VER%%/wnrtl.h
8
%%DOCSDIR%%/html/grind.1WN.html
10
include/WordNet-%%VER%%/wntypes.h
9
%%DOCSDIR%%/html/lexnames.5WN.html
11
lib/libwn2.a
10
%%DOCSDIR%%/html/morph.3WN.html
12
lib/libwn2.so.0
11
%%DOCSDIR%%/html/morphy.7WN.html
13
lib/libwn2.so
12
%%DOCSDIR%%/html/senseidx.5WN.html
14
lib/libtclwn2.so.0
13
%%DOCSDIR%%/html/uniqbeg.7WN.html
15
lib/libtclwn2.so
14
%%DOCSDIR%%/html/wn.1WN.html
16
lib/tcl%%TCL_DVER%%/Wordnet/pkgIndex.tcl
15
%%DOCSDIR%%/html/wnb.1WN.html
17
share/WordNet-%%VER%%/adj.exc
16
%%DOCSDIR%%/html/wndb.5WN.html
18
share/WordNet-%%VER%%/adv.exc
17
%%DOCSDIR%%/html/wngloss.7WN.html
19
share/WordNet-%%VER%%/cntlist
18
%%DOCSDIR%%/html/wngroups.7WN.html
20
share/WordNet-%%VER%%/cntlist.rev
19
%%DOCSDIR%%/html/wninput.5WN.html
21
share/WordNet-%%VER%%/data.adj
20
%%DOCSDIR%%/html/wnintro.1WN.html
22
share/WordNet-%%VER%%/data.adv
21
%%DOCSDIR%%/html/wnintro.3WN.html
23
share/WordNet-%%VER%%/data.noun
22
%%DOCSDIR%%/html/wnintro.5WN.html
24
share/WordNet-%%VER%%/data.verb
23
%%DOCSDIR%%/html/wnintro.7WN.html
25
share/WordNet-%%VER%%/index.adj
24
%%DOCSDIR%%/html/wnlicens.7WN.html
26
share/WordNet-%%VER%%/index.adv
25
%%DOCSDIR%%/html/wnpkgs.7WN.html
27
share/WordNet-%%VER%%/index.noun
26
%%DOCSDIR%%/html/wnsearch.3WN.html
28
share/WordNet-%%VER%%/index.sense
27
%%DOCSDIR%%/html/wnstats.7WN.html
29
share/WordNet-%%VER%%/index.verb
28
%%DOCSDIR%%/html/wnutil.3WN.html
30
share/WordNet-%%VER%%/lexnames
29
%%DOCSDIR%%/pdf/binsrch.3.pdf
31
share/WordNet-%%VER%%/noun.exc
30
%%DOCSDIR%%/pdf/cntlist.5.pdf
32
share/WordNet-%%VER%%/sentidx.vrb
31
%%DOCSDIR%%/pdf/grind.1.pdf
33
share/WordNet-%%VER%%/sents.vrb
32
%%DOCSDIR%%/pdf/lexnames.5.pdf
34
share/WordNet-%%VER%%/verb.exc
33
%%DOCSDIR%%/pdf/morph.3.pdf
35
share/WordNet-%%VER%%/wnres/license.txt
34
%%DOCSDIR%%/pdf/morphy.7.pdf
36
share/WordNet-%%VER%%/wnres/wn.xbm
35
%%DOCSDIR%%/pdf/senseidx.5.pdf
36
%%DOCSDIR%%/pdf/uniqbeg.7.pdf
37
%%DOCSDIR%%/pdf/wn.1.pdf
38
%%DOCSDIR%%/pdf/wnb.1.pdf
39
%%DOCSDIR%%/pdf/wndb.5.pdf
40
%%DOCSDIR%%/pdf/wngloss.7.pdf
41
%%DOCSDIR%%/pdf/wngroups.7.pdf
42
%%DOCSDIR%%/pdf/wninput.5.pdf
43
%%DOCSDIR%%/pdf/wnintro.1.pdf
44
%%DOCSDIR%%/pdf/wnintro.3.pdf
45
%%DOCSDIR%%/pdf/wnintro.5.pdf
46
%%DOCSDIR%%/pdf/wnintro.7.pdf
47
%%DOCSDIR%%/pdf/wnlicens.7.pdf
48
%%DOCSDIR%%/pdf/wnpkgs.7.pdf
49
%%DOCSDIR%%/pdf/wnsearch.3.pdf
50
%%DOCSDIR%%/pdf/wnstats.7.pdf
51
%%DOCSDIR%%/pdf/wnutil.3.pdf
52
%%DOCSDIR%%/ps/binsrch.3.ps
53
%%DOCSDIR%%/ps/cntlist.5.ps
54
%%DOCSDIR%%/ps/grind.1.ps
55
%%DOCSDIR%%/ps/lexnames.5.ps
56
%%DOCSDIR%%/ps/morph.3.ps
57
%%DOCSDIR%%/ps/morphy.7.ps
58
%%DOCSDIR%%/ps/senseidx.5.ps
59
%%DOCSDIR%%/ps/uniqbeg.7.ps
60
%%DOCSDIR%%/ps/wn.1.ps
61
%%DOCSDIR%%/ps/wnb.1.ps
62
%%DOCSDIR%%/ps/wndb.5.ps
63
%%DOCSDIR%%/ps/wngloss.7.ps
64
%%DOCSDIR%%/ps/wngroups.7.ps
65
%%DOCSDIR%%/ps/wninput.5.ps
66
%%DOCSDIR%%/ps/wnintro.1.ps
67
%%DOCSDIR%%/ps/wnintro.3.ps
68
%%DOCSDIR%%/ps/wnintro.5.ps
69
%%DOCSDIR%%/ps/wnintro.7.ps
70
%%DOCSDIR%%/ps/wnlicens.7.ps
71
%%DOCSDIR%%/ps/wnpkgs.7.ps
72
%%DOCSDIR%%/ps/wnsearch.3.ps
73
%%DOCSDIR%%/ps/wnstats.7.ps
74
%%DOCSDIR%%/ps/wnutil.3.ps
75
%%DATADIR%%/wnres/license.txt
76
%%DATADIR%%/wnres/wn.xbm
77
%%DATADIR%%/wnres/wnb.man
78
%%DATADIR%%/wnres/wngloss.man
79
%%DATADIR%%/dict/adj.exc
80
%%DATADIR%%/dict/adv.exc
81
%%DATADIR%%/dict/cntlist
82
%%DATADIR%%/dict/cntlist.rev
83
%%DATADIR%%/dict/data.adj
84
%%DATADIR%%/dict/data.adv
85
%%DATADIR%%/dict/data.noun
86
%%DATADIR%%/dict/data.verb
87
%%DATADIR%%/dict/frames.vrb
88
%%DATADIR%%/dict/index.adj
89
%%DATADIR%%/dict/index.adv
90
%%DATADIR%%/dict/index.noun
91
%%DATADIR%%/dict/index.sense
92
%%DATADIR%%/dict/index.verb
93
%%DATADIR%%/dict/log.grind.2.1
94
%%DATADIR%%/dict/noun.exc
95
%%DATADIR%%/dict/sentidx.vrb
96
%%DATADIR%%/dict/sents.vrb
97
%%DATADIR%%/dict/verb.Framestext
98
%%DATADIR%%/dict/verb.exc
99
%%PORTDOCS%%@unexec rmdir %D/%%DOCSDIR%%/wnres 2>/dev/null || true
100
%%PORTDOCS%%@unexec rmdir %D/%%DOCSDIR%%/ps 2>/dev/null || true
101
%%PORTDOCS%%@unexec rmdir %D/%%DOCSDIR%%/pdf 2>/dev/null || true
102
%%PORTDOCS%%@unexec rmdir %D/%%DOCSDIR%%/html 2>/dev/null || true
103
%%PORTDOCS%%@dirrm %%DOCSDIR%%
37
@dirrm include/WordNet-%%VER%%
104
@dirrm include/WordNet-%%VER%%
38
@dirrm lib/tcl%%TCL_DVER%%/Wordnet
105
@dirrm %%DATADIR%%/wnres
39
@dirrm share/WordNet-%%VER%%/wnres
106
@dirrm %%DATADIR%%/dict
40
@dirrm share/WordNet-%%VER%%
107
@dirrm %%DATADIR%%
(-)files/Makefile (-8 lines)
Removed Link Here
1
# $FreeBSD: ports/textproc/wordnet/files/Makefile,v 1.1 2000/05/01 02:40:45 steve Exp $
2
3
SUBDIR=		include \
4
		dict \
5
		src \
6
		man
7
8
.include <bsd.subdir.mk>
(-)files/dict.Makefile (-23 lines)
Removed Link Here
1
WN_INSTALLDIR=	${PREFIX}/share/WordNet-${VER}
2
WN_FILES=	data.noun data.verb data.adj data.adv index.noun \
3
		index.verb index.adj index.adv noun.exc verb.exc \
4
		adj.exc adv.exc index.sense cntlist.rev \
5
		cntlist lexnames sentidx.vrb sents.vrb
6
7
all: $(WN_FILES)
8
9
${WN_INSTALLDIR}:
10
	mkdir -p ${WN_INSTALLDIR}
11
12
.for f in ${WN_FILES}
13
INSTALLED+=	${WN_INSTALLDIR}/$f
14
15
${WN_INSTALLDIR}/$f: $f
16
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} \
17
		$f ${WN_INSTALLDIR}/$f
18
.endfor
19
20
install: ${WN_INSTALLDIR} ${INSTALLED}
21
22
NOOBJ=  noobj
23
.include <bsd.prog.mk>
(-)files/include.Makefile (-17 lines)
Removed Link Here
1
WN_INSTALLDIR = ${PREFIX}/include/WordNet-${VER}
2
3
WN_FILES=	license.h setutil.h wn.h wnconsts.h wnglobal.h \
4
		wnhelp.h wnrtl.h wntypes.h
5
6
all: $(WN_FILES)
7
8
${WN_INSTALLDIR}:
9
	mkdir -p ${WN_INSTALLDIR}
10
11
install: ${WN_INSTALLDIR}
12
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
13
		${WN_FILES} ${WN_INSTALLDIR}/
14
15
NOOBJ=		noobj
16
17
.include <bsd.prog.mk>
(-)files/man.Makefile (-10 lines)
Removed Link Here
1
MANDIR=		${PREFIX}/man/man
2
3
MAN1=		wn.1 wnb.1 wnintro.1
4
MAN3=		binsrch.3 morph.3 wnintro.3 wnsearch.3 wnutil.3
5
MAN5=		cntlist.5 lexnames.5 senseidx.5 \
6
		wndb.5 wninput.5 wnintro.5
7
MAN7=		morphy.7 uniqbeg.7 wngloss.7 wngroups.7 wnintro.7 \
8
		wnlicens.7 wnpkgs.7 wnstats.7
9
10
.include <bsd.prog.mk>
(-)files/patch-aa (-15 lines)
Removed Link Here
1
--- include/wnconsts.h	Fri Feb 27 13:54:53 1998
2
+++ include/wnconsts.h	Sat Feb 26 16:11:51 2000
3
@@ -15,6 +15,10 @@
4
 /* Platform specific path and filename specifications */
5
 
6
 #ifdef UNIX
7
 #define DICTDIR         "/dict"
8
-#define DEFAULTPATH	"/usr/local/WordNet-_VER_/dict"
9
-#define DEFAULTBIN      "/usr/local/WordNet-_VER_/bin"
10
+#ifndef DEFAULTPATH
11
+#define DEFAULTPATH	"/usr/local/share/WordNet-_VER_"
12
+#endif
13
+#ifndef DEFAULTBIN
14
+#define DEFAULTBIN      "/usr/local/bin"
15
+#endif
(-)files/patch-ab (-7 lines)
Removed Link Here
1
--- src/lib/wnutil.c	Thu Feb 19 12:15:09 1998
2
+++ src/lib/wnutil.c	Sat Feb 26 16:14:08 2000
3
@@ -10,3 +10,3 @@
4
 #ifdef UNIX
5
-#include <malloc.h>
6
+#include <stdlib.h>
7
 #endif
(-)files/patch-ac (-68 lines)
Removed Link Here
1
--- src/wnb/stubs.c	Fri Nov 14 17:01:44 1997
2
+++ src/wnb/stubs.c	Sat Feb 26 20:09:19 2000
3
@@ -24,3 +24,2 @@
4
 #include <tcl.h>
5
-#include <tk.h>
6
 #include <wn.h>
7
@@ -37,5 +36,4 @@
8
 int wn_findvalidsearches (ClientData clientData, Tcl_Interp *interp, 
9
-   int argc, char *argv[]) {
10
+   int argc, Tcl_Obj *objv[]) {
11
    unsigned int bitfield;
12
-   static char bitfieldstr[32];
13
    char *morph;
14
@@ -43,9 +41,10 @@
15
    if (argc != 3) {
16
-      interp -> result = 
17
-         "usage: findvalidsearches searchword partofspeechnum";
18
+      Tcl_WrongNumArgs(interp, 1, objv,
19
+         "findvalidsearches searchword partofspeechnum");
20
       return TCL_ERROR;
21
    }
22
-   pos = atoi (argv[2]);
23
-   bitfield = is_defined (argv[1], pos);
24
-   if ((morph = morphstr (argv[1], pos)) != NULL) {
25
+   if (Tcl_GetIntFromObj(interp, objv[2], &pos) != TCL_OK)
26
+      return TCL_ERROR;
27
+   bitfield = is_defined (Tcl_GetString(objv[1]), pos);
28
+   if ((morph = morphstr (Tcl_GetString(objv[1]), pos)) != NULL) {
29
       do {
30
@@ -54,4 +53,3 @@
31
    }
32
-   sprintf (bitfieldstr, "%u", bitfield);
33
-   interp -> result = bitfieldstr;
34
+   Tcl_SetObjResult(interp, Tcl_NewIntObj(bitfield));
35
    return TCL_OK;
36
@@ -67,14 +65,11 @@
37
 int wn_bit (ClientData clientData, Tcl_Interp *interp,
38
-   int argc, char *argv[]) {
39
-   unsigned int bitfield;
40
-   static char bitfieldstr[32];
41
+   int argc, Tcl_Obj *objv[]) {
42
    int whichbit;
43
    if (argc != 2) {
44
-      interp -> result = "usage: bit bitnum";
45
+      Tcl_WrongNumArgs(interp, 1, objv, "bitnum");
46
       return TCL_ERROR;
47
    }
48
-   whichbit = atoi (argv[1]);
49
-   bitfield = bit (whichbit);
50
-   sprintf (bitfieldstr, "%u", bitfield);
51
-   interp -> result = bitfieldstr;
52
+   if (Tcl_GetIntFromObj(interp, objv[1], &whichbit) != TCL_OK)
53
+	return TCL_ERROR;
54
+   Tcl_SetObjResult(interp, Tcl_NewIntObj(bit(whichbit)));
55
    return TCL_OK;
56
@@ -275,5 +270,5 @@
57
    wninit ();
58
-   Tcl_CreateCommand (interp, "findvalidsearches", (void *) 
59
+   Tcl_CreateObjCommand (interp, "findvalidsearches", (void *) 
60
       wn_findvalidsearches, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
61
-   Tcl_CreateCommand (interp, "bit", (void *) wn_bit, (ClientData) NULL, 
62
+   Tcl_CreateObjCommand (interp, "bit", (void *) wn_bit, (ClientData) NULL, 
63
       (Tcl_CmdDeleteProc *) NULL);
64
@@ -295,3 +290,3 @@
65
       (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
66
-   return TCL_OK;
67
+   return Tcl_PkgProvide(interp, "Wordnet", "2.0");
68
 }
(-)files/patch-ad (-9 lines)
Removed Link Here
1
--- src/wnb/wnb	Sun Feb 22 12:49:56 1998
2
+++ src/wnb/wnb	Sat Feb 26 19:52:42 2000
3
@@ -629,2 +626,6 @@
4
          -text "Based upon an earlier X Window version by\nBrian Gustafson."] \
5
+      [label .aboutbox.top.right.textmi \
6
+         -anchor w \
7
+         -justify left \
8
+         -text "Tuned for Tcl8.x and ported to FreeBSD by\nMikhail Teterin."] \
9
       [label .aboutbox.top.right.text5 \
(-)files/patch-ae (-37 lines)
Removed Link Here
1
--- src/lib/search.c	Tue Jul 15 10:41:55 2003
2
+++ src/lib/search.c	Tue Feb 17 15:59:53 2004
3
@@ -331,5 +331,5 @@
4
     /* sanity check - make sure starting file offset matches first field */
5
     if (synptr->hereiam != loc) {
6
-	sprintf(msgbuf, "WordNet library error: no synset at location %d\n",
7
+	sprintf(msgbuf, "WordNet library error: no synset at location %ld\n",
8
 		loc);
9
 	display_message(msgbuf);
10
@@ -464,5 +464,5 @@
11
     if (ptrtok) {
12
 	ptrtok = strtok(NULL," \n");
13
-	sprintf(tbuf, "");
14
+	tbuf[0] = '\0';
15
 	while (ptrtok != NULL) {
16
 	    strcat(tbuf,ptrtok);
17
@@ -478,5 +478,5 @@
18
 
19
     if (keyindexfp) { 		/* we have unique keys */
20
-	sprintf(tmpbuf, "%c:%8.8d", partchars[dbase], synptr->hereiam);
21
+	sprintf(tmpbuf, "%c:%8.8ld", partchars[dbase], synptr->hereiam);
22
 	synptr->key = GetKeyForOffset(tmpbuf);
23
     }
24
@@ -2350,5 +2350,5 @@
25
 
26
     if (offsetflag)		/* print synset offset */
27
-	sprintf(tbuf + strlen(tbuf),"{%8.8d} ", synptr->hereiam);
28
+	sprintf(tbuf + strlen(tbuf),"{%8.8ld} ", synptr->hereiam);
29
     if (fileinfoflag) {		/* print lexicographer file information */
30
 	sprintf(tbuf + strlen(tbuf), "<%s> ", lexfiles[synptr->fnum]);
31
@@ -2385,5 +2385,5 @@
32
 
33
     if (offsetflag)
34
-	sprintf(tbuf,"{%8.8d} ", synptr->hereiam);
35
+	sprintf(tbuf,"{%8.8ld} ", synptr->hereiam);
36
     if (fileinfoflag) {
37
 	sprintf(tbuf + strlen(tbuf),"<%s> ", lexfiles[synptr->fnum]);
(-)files/patch-ag (-7 lines)
Removed Link Here
1
--- src/wnb/wnb	Tue Aug 20 11:54:54 2002
2
+++ src/wnb/wnb	Tue Aug 20 11:57:02 2002
3
@@ -99,3 +96,3 @@
4
    if {[lsearch -exact [array names env] WNHOME] == -1} {
5
-	set resourcedir "/usr/local/WordNet-2.0/lib/wnres"
6
+	set resourcedir "/usr/local/share/WordNet-2.0/wnres"
7
    } else {
(-)files/patch-ah (-86 lines)
Removed Link Here
1
--- src/lib/morph.c	Tue Jul 15 10:41:55 2003
2
+++ src/lib/morph.c	Tue Feb 17 15:50:51 2004
3
@@ -45,27 +45,28 @@
4
 static char msgbuf[256];
5
 
6
-#define NUMPREPS	15
7
 
8
 static struct {
9
     char *str;
10
     int strlen;
11
-} prepositions[NUMPREPS] = {
12
-    "to", 2,
13
-    "at", 2,
14
-    "of", 2,
15
-    "on", 2,
16
-    "off", 3,
17
-    "in", 2,
18
-    "out", 3,
19
-    "up", 2,
20
-    "down", 4,
21
-    "from", 4,
22
-    "with", 4,
23
-    "into", 4,
24
-    "for", 3,
25
-    "about", 5,
26
-    "between", 7,
27
+} prepositions[] = {
28
+    { "to", 2 },
29
+    { "at", 2 },
30
+    { "of", 2 },
31
+    { "on", 2 },
32
+    { "off", 3 },
33
+    { "in", 2 },
34
+    { "out", 3 },
35
+    { "up", 2 },
36
+    { "down", 4 },
37
+    { "from", 4 },
38
+    { "with", 4 },
39
+    { "into", 4 },
40
+    { "for", 3 },
41
+    { "about", 5 },
42
+    { "between", 7 }
43
 };
44
 
45
+#define NUMPREPS	sizeof(prepositions)/sizeof(prepositions[0])
46
+
47
 static FILE *exc_fps[NUMPARTS + 1];
48
 
49
@@ -207,5 +208,6 @@
50
 		strncpy(word, str + st_idx, end_idx - st_idx);
51
 		word[end_idx - st_idx] = '\0';
52
-		if(tmp = morphword(word, pos))
53
+		tmp = morphword(word, pos);
54
+		if(tmp)
55
 		    strcat(searchstr,tmp);
56
 		else
57
@@ -215,5 +217,6 @@
58
 	    }
59
 	    
60
-	    if(tmp = morphword(strcpy(word, str + st_idx), pos)) 
61
+	    tmp = morphword(strcpy(word, str + st_idx), pos);
62
+	    if(tmp)
63
 		strcat(searchstr,tmp);
64
 	    else
65
@@ -248,6 +251,5 @@
66
     char *tmp, tmpbuf[WORDBUF], *end;
67
     
68
-    sprintf(retval,"");
69
-    sprintf(tmpbuf, "");
70
+    retval[0] = tmpbuf[0] = '\0';
71
     end = "";
72
     
73
@@ -343,5 +345,4 @@
74
     static char line[WORDBUF], *beglp, *endlp;
75
     char *excline;
76
-    int found = 0;
77
 
78
     if (exc_fps[pos] == NULL)
79
@@ -385,5 +386,6 @@
80
     last = strrchr(s, '_');
81
     if (rest != last) {		/* more than 2 words */
82
-	if (lastwd = morphword(last + 1, NOUN)) {
83
+	lastwd = morphword(last + 1, NOUN);
84
+	if (lastwd) {
85
 	    strncpy(end, rest, last - rest + 1);
86
 	    end[last-rest+1] = '\0';
(-)files/patch-include-wn.h (+13 lines)
Added Link Here
1
--- include/wn.h.orig	Thu Jul  7 02:48:44 2005
2
+++ include/wn.h	Fri Oct 14 13:31:18 2005
3
@@ -30,7 +30,9 @@
4
 #define CNTLISTFILE     "%s\\cntlist.rev"
5
 #else
6
 #define DICTDIR         "/dict"
7
-#define DEFAULTPATH	"/usr/local/WordNet-2.1/dict"
8
+#ifndef DEFAULTPATH
9
+#define DEFAULTPATH    "/usr/local/share/WordNet-_VER_"
10
+#endif
11
 #define DATAFILE	"%s/data.%s"
12
 #define INDEXFILE	"%s/index.%s"
13
 #define SENSEIDXFILE	"%s/index.sense"
(-)files/src.Makefile (-3 lines)
Removed Link Here
1
SUBDIR=		lib wn wnb
2
3
.include <bsd.subdir.mk>
(-)files/src.lib.Makefile (-15 lines)
Removed Link Here
1
SRCS=		binsrch.c morph.c search.c setutil.c wnglobal.c \
2
		wnhelp.c wnrtl.c wnutil.c
3
4
CFLAGS+=	-DUNIX -DDEFAULTPATH="\"${PREFIX}/share/WordNet-${VER}\"" \
5
		-DDEFAULTBIN="\"${PREFIX}/bin\""
6
7
CFLAGS+=	-I${.CURDIR}/../../include
8
9
LIB=		wn2
10
SHLIB_MAJOR=	0
11
NOPROFILE=	True
12
13
LIBDIR=		${PREFIX}/lib
14
15
.include <bsd.lib.mk>
(-)files/src.wn.Makefile (-12 lines)
Removed Link Here
1
PROG=		wn
2
NOMAN=		True	# man pages installed separately
3
4
CFLAGS+=	-DUNIX -DDEFAULTPATH="\"${PREFIX}/share/WordNet-${VER}\"" \
5
		-DDEFAULTBIN="\"${PREFIX}/bin\""
6
7
CFLAGS+=	-I${.CURDIR}/../../include
8
LDADD+=		-L../lib -lwn2
9
10
BINDIR=		${PREFIX}/bin
11
12
.include <bsd.prog.mk>
(-)files/src.wnb.Makefile (-38 lines)
Removed Link Here
1
PREFIX?=	/usr/local
2
TCL_DVER?=	8.4
3
TCL_VER=	${TCL_DVER:S/.//g}
4
TCL_INCDIR?=	${PREFIX}/include/tcl${TCL_DVER}
5
6
CFLAGS+=	-DUNIX -DDEFAULTPATH="\"${PREFIX}/share/WordNet-${VER}\"" \
7
		-DDEFAULTBIN="\"${PREFIX}/bin\""
8
9
CFLAGS+=	-I${.CURDIR}/../../include -I$(TCL_INCDIR)
10
11
LDADD=		-L../lib -lwn2 -L${PREFIX}/lib -ltcl${TCL_VER} -ltk${TCL_VER}
12
13
SHLIB_NAME=	libtclwn2.so.0
14
SRCS=		stubs.c
15
16
all: pkgIndex.tcl
17
18
pkgIndex.tcl:
19
	echo "package ifneeded Wordnet ${VER} [list load \
20
		[file join ${PREFIX}/lib ${SHLIB_NAME}] Wordnet]" \
21
			> pkgIndex.tcl
22
23
LIBDIR=		${PREFIX}/lib
24
RESDIR=		${PREFIX}/share/WordNet-${VER}/wnres
25
26
${LIBDIR} ${RESDIR} ${LIBDIR}/tcl${TCL_DVER}/Wordnet:
27
	mkdir -p ${.TARGET}
28
29
beforeinstall: ${LIBDIR} ${RESDIR} ${LIBDIR}/tcl${TCL_DVER}/Wordnet
30
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
31
		pkgIndex.tcl ${LIBDIR}/tcl${TCL_DVER}/Wordnet
32
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
33
		${.CURDIR}/../lib/wnres/license.txt \
34
		${.CURDIR}/../lib/wnres/*.xbm ${RESDIR}
35
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 755 \
36
		wnb ${PREFIX}/bin
37
38
.include <bsd.lib.mk>
(-)scripts/configure (-23 lines)
Removed Link Here
1
#!/bin/sh
2
for mf in ${FILESDIR}/*Makefile ; do \
3
	dir=${WRKSRC}/`basename $mf | sed -e s%Makefile%% -e 's%\.%/%g'` ; \
4
	test -f ${dir}Makefile.orig && continue
5
	mv ${dir}Makefile ${dir}Makefile.orig ; \
6
	cp -p $mf ${dir}Makefile ; \
7
done
8
9
patch -d ${WRKSRC}/src/wnb -p << EOPATCH
10
Configuring the wnb script to call the right wish-binary directly
11
--- wnb	Sun Feb 22 12:49:56 1998
12
+++ wnb	Sat Feb 26 17:41:06 2000
13
@@ -1,6 +1,3 @@
14
-#!/bin/sh 
15
-# the following line is evaluated by sh but ignored by tcl \\
16
-wishwn "\$0" "\$@" &
17
-# the following line is evaluated by sh but ignored by tcl \\
18
-exec true
19
-# the preceding lines make this script self-executing on unix systems
20
+#!${PREFIX}/bin/wish${TCL_DVER}
21
+
22
+package require Wordnet
23
EOPATCH

Return to bug 90323