diff --git a/.gitignore b/.gitignore index e69de29..ddabda0 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +WordNet-3.0.tar.bz2 +/wn3.1.dict.tar.gz diff --git a/.rpmlint b/.rpmlint new file mode 100644 index 0000000..878a9a6 --- /dev/null +++ b/.rpmlint @@ -0,0 +1,2 @@ +from Config import * +addFilter("spelling-error .* (Synsets|synsets|Tk)"); diff --git a/sources b/sources new file mode 100644 index 0000000..908cb7d --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (WordNet-3.0.tar.bz2) = 2d0f94114da276a40c954d52b234355e64e9422d6431580558d4c7f1c574902aa7d31660a157aca0ca1954aabad3779de610c9c49f9511d419136d4c13b3e7f0 +SHA512 (wn3.1.dict.tar.gz) = 16dca17a87026d8a0b7b4758219cd21a869c3ef3da23ce7875924546f2eacac4c2f376cb271b798b2c458fe8c078fb43d681356e3d9beef40f4bd88d3579394f diff --git a/wordnet-3.0-CVE-2008-2149.patch b/wordnet-3.0-CVE-2008-2149.patch new file mode 100644 index 0000000..42660c1 --- /dev/null +++ b/wordnet-3.0-CVE-2008-2149.patch @@ -0,0 +1,12 @@ +--- wordnet-3.0.orig/src/wn.c ++++ wordnet-3.0/src/wn.c +@@ -206,7 +206,8 @@ + outsenses += do_search(av[1], optptr->pos, optptr->search, + whichsense, optptr->label); + } else { +- sprintf(tmpbuf, "wn: invalid search option: %s\n", av[j]); ++ /* Fix CVE-2008-2149: buffer overflows Andreas Tille */ ++ sprintf(tmpbuf, "wn: invalid search option: %.200s\n", av[j]); + display_message(tmpbuf); + errcount++; + } diff --git a/wordnet-3.0-CVE-2008-3908.patch b/wordnet-3.0-CVE-2008-3908.patch new file mode 100644 index 0000000..de430c3 --- /dev/null +++ b/wordnet-3.0-CVE-2008-3908.patch @@ -0,0 +1,732 @@ +diff --git a/lib/binsrch.c b/lib/binsrch.c +index 85436f3..8b71216 100644 +--- a/lib/binsrch.c ++++ b/lib/binsrch.c +@@ -28,7 +28,7 @@ char *read_index(long offset, FILE *fp) { + char *linep; + + linep = line; +- line[0] = '0'; ++ line[0] = '\0'; + + fseek( fp, offset, SEEK_SET ); + fgets(linep, LINE_LEN, fp); +@@ -58,6 +58,8 @@ char *bin_search(char *searchkey, FILE *fp) + last_bin_search_offset = ftell( fp ); + fgets(linep, LINE_LEN, fp); + length = (int)(strchr(linep, ' ') - linep); ++ if (length > (sizeof(key) - 1)) ++ return(NULL); + strncpy(key, linep, length); + key[length] = '\0'; + if(strcmp(key, searchkey) < 0) { +@@ -110,6 +112,8 @@ static int bin_search_key(char *searchkey, FILE *fp) + line[length++] = c; + if (getc(fp) == EOF) { /* only 1 line in file */ + length = (int)(strchr(linep, ' ') - linep); ++ if (length > (sizeof(key) - 1)) ++ return(0); + strncpy(key, linep, length); + key[length] = '\0'; + if(strcmp(key, searchkey) > 0) { +@@ -132,6 +136,8 @@ static int bin_search_key(char *searchkey, FILE *fp) + if (fgets(linep, LINE_LEN, fp) != NULL) { + offset2 = ftell(fp); /* offset at start of next line */ + length = (int)(strchr(linep, ' ') - linep); ++ if (length > (sizeof(key) - 1)) ++ return(0); + strncpy(key, linep, length); + key[length] = '\0'; + if(strcmp(key, searchkey) < 0) { /* further in file */ +diff --git a/lib/morph.c b/lib/morph.c +index 0cff594..ea4b4f8 100644 +--- a/lib/morph.c ++++ b/lib/morph.c +@@ -51,24 +51,24 @@ static struct { + char *str; + int strlen; + } prepositions[NUMPREPS] = { +- "to", 2, +- "at", 2, +- "of", 2, +- "on", 2, +- "off", 3, +- "in", 2, +- "out", 3, +- "up", 2, +- "down", 4, +- "from", 4, +- "with", 4, +- "into", 4, +- "for", 3, +- "about", 5, +- "between", 7, ++ { "to", 2 }, ++ { "at", 2 }, ++ { "of", 2 }, ++ { "on", 2 }, ++ { "off", 3 }, ++ { "in", 2 }, ++ { "out", 3 }, ++ { "up", 2 }, ++ { "down", 4 }, ++ { "from", 4 }, ++ { "with", 4 }, ++ { "into", 4 }, ++ { "for", 3 }, ++ { "about", 5 }, ++ { "between", 7 } + }; + +-static FILE *exc_fps[NUMPARTS + 1]; ++static FILE *exc_fps[NUMPARTS]; + + static int do_init(); + static int strend(char *, char *); +@@ -100,7 +100,7 @@ int re_morphinit(void) + { + int i; + +- for (i = 1; i <= NUMPARTS; i++) { ++ for (i = 0; i < NUMPARTS; i++) { + if (exc_fps[i] != NULL) { + fclose(exc_fps[i]); exc_fps[i] = NULL; + } +@@ -144,18 +144,19 @@ static int do_init(void) + } else + sprintf(searchdir, DEFAULTPATH); + #else +- if ((env = getenv("WNSEARCHDIR")) != NULL) +- strcpy(searchdir, env); +- else if ((env = getenv("WNHOME")) != NULL) +- sprintf(searchdir, "%s%s", env, DICTDIR); +- else ++ if ((env = getenv("WNSEARCHDIR")) != NULL) { ++ snprintf(searchdir, sizeof(searchdir), "%s", env); ++ } else if ((env = getenv("WNHOME")) != NULL) { ++ snprintf(searchdir, sizeof(searchdir), "%s%s", env, DICTDIR); ++ } else { + strcpy(searchdir, DEFAULTPATH); ++ } + #endif + +- for (i = 1; i <= NUMPARTS; i++) { +- sprintf(fname, EXCFILE, searchdir, partnames[i]); ++ for (i = 0; i < NUMPARTS; i++) { ++ snprintf(fname, sizeof(fname), EXCFILE, searchdir, partnames[i+1]); + if ((exc_fps[i] = fopen(fname, "r")) == NULL) { +- sprintf(msgbuf, ++ snprintf(msgbuf, sizeof(msgbuf), + "WordNet library error: Can't open exception file(%s)\n\n", + fname); + display_message(msgbuf); +@@ -178,13 +179,16 @@ char *morphstr(char *origstr, int pos) + int prep; + char *end_idx1, *end_idx2; + char *append; +- ++ + if (pos == SATELLITE) + pos = ADJ; + + /* First time through for this string */ + + if (origstr != NULL) { ++ if (strlen(origstr) > WORDBUF - 1) ++ return(NULL); ++ + /* Assume string hasn't had spaces substitued with '_' */ + strtolower(strsubst(strcpy(str, origstr), ' ', '_')); + searchstr[0] = '\0'; +@@ -232,7 +236,7 @@ char *morphstr(char *origstr, int pos) + if (end_idx < 0) return(NULL); /* shouldn't do this */ + strncpy(word, str + st_idx, end_idx - st_idx); + word[end_idx - st_idx] = '\0'; +- if(tmp = morphword(word, pos)) ++ if ((tmp = morphword(word, pos)) != NULL) + strcat(searchstr,tmp); + else + strcat(searchstr,word); +@@ -240,7 +244,7 @@ char *morphstr(char *origstr, int pos) + st_idx = end_idx + 1; + } + +- if(tmp = morphword(strcpy(word, str + st_idx), pos)) ++ if ((tmp = morphword(strcpy(word, str + st_idx), pos)) != NULL) + strcat(searchstr,tmp); + else + strcat(searchstr,word); +@@ -270,16 +274,15 @@ char *morphword(char *word, int pos) + { + int offset, cnt; + int i; +- static char retval[WORDBUF]; +- char *tmp, tmpbuf[WORDBUF], *end; +- +- sprintf(retval,""); +- sprintf(tmpbuf, ""); +- end = ""; +- ++ static char retval[WORDBUF] = ""; ++ char *tmp, tmpbuf[WORDBUF] = "", *end = ""; ++ + if(word == NULL) + return(NULL); + ++ if (strlen(word) > WORDBUF - 1) ++ return(NULL); ++ + /* first look for word on exception list */ + + if((tmp = exc_lookup(word, pos)) != NULL) +@@ -335,7 +338,10 @@ static char *wordbase(char *word, int ender) + { + char *pt1; + static char copy[WORDBUF]; +- ++ ++ if (strlen(word) > WORDBUF - 1) ++ return(NULL); ++ + strcpy(copy, word); + if(strend(copy,sufx[ender])) { + pt1=strchr(copy,'\0'); +@@ -368,13 +374,14 @@ static char *exc_lookup(char *word, int pos) + { + static char line[WORDBUF], *beglp, *endlp; + char *excline; +- int found = 0; + + if (exc_fps[pos] == NULL) + return(NULL); + + /* first time through load line from exception file */ + if(word != NULL){ ++ if (strlen(word) > WORDBUF - 1) ++ return(NULL); + if ((excline = bin_search(word, exc_fps[pos])) != NULL) { + strcpy(line, excline); + endlp = strchr(line,' '); +@@ -403,6 +410,9 @@ static char *morphprep(char *s) + char word[WORDBUF], end[WORDBUF]; + static char retval[WORDBUF]; + ++ if (strlen(s) > WORDBUF - 1) ++ return (NULL); ++ + /* Assume that the verb is the first word in the phrase. Strip it + off, check for validity, then try various morphs with the + rest of the phrase tacked on, trying to find a match. */ +@@ -410,7 +420,7 @@ static char *morphprep(char *s) + rest = strchr(s, '_'); + last = strrchr(s, '_'); + if (rest != last) { /* more than 2 words */ +- if (lastwd = morphword(last + 1, NOUN)) { ++ if ((lastwd = morphword(last + 1, NOUN)) != NULL) { + strncpy(end, rest, last - rest + 1); + end[last-rest+1] = '\0'; + strcat(end, lastwd); +diff --git a/lib/search.c b/lib/search.c +index 1cdedc3..bc781cd 100644 +--- a/lib/search.c ++++ b/lib/search.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "wn.h" + +@@ -119,33 +120,22 @@ IndexPtr parse_index(long offset, int dbase, char *line) { + if ( !line ) + line = read_index( offset, indexfps[dbase] ); + +- idx = (IndexPtr)malloc(sizeof(Index)); ++ idx = (IndexPtr)calloc(1, sizeof(Index)); + assert(idx); + + /* set offset of entry in index file */ + idx->idxoffset = offset; + +- idx->wd='\0'; +- idx->pos='\0'; +- idx->off_cnt=0; +- idx->tagged_cnt = 0; +- idx->sense_cnt=0; +- idx->offset='\0'; +- idx->ptruse_cnt=0; +- idx->ptruse='\0'; +- + /* get the word */ + ptrtok=strtok(line," \n"); + +- idx->wd = malloc(strlen(ptrtok) + 1); ++ idx->wd = strdup(ptrtok); + assert(idx->wd); +- strcpy(idx->wd, ptrtok); + + /* get the part of speech */ + ptrtok=strtok(NULL," \n"); +- idx->pos = malloc(strlen(ptrtok) + 1); ++ idx->pos = strdup(ptrtok); + assert(idx->pos); +- strcpy(idx->pos, ptrtok); + + /* get the collins count */ + ptrtok=strtok(NULL," \n"); +@@ -154,7 +144,12 @@ IndexPtr parse_index(long offset, int dbase, char *line) { + /* get the number of pointers types */ + ptrtok=strtok(NULL," \n"); + idx->ptruse_cnt = atoi(ptrtok); +- ++ ++ if (idx->ptruse_cnt < 0 || (unsigned int)idx->ptruse_cnt > UINT_MAX/sizeof(int)) { ++ free_index(idx); ++ return(NULL); ++ } ++ + if (idx->ptruse_cnt) { + idx->ptruse = (int *) malloc(idx->ptruse_cnt * (sizeof(int))); + assert(idx->ptruse); +@@ -173,9 +168,14 @@ IndexPtr parse_index(long offset, int dbase, char *line) { + /* get the number of senses that are tagged */ + ptrtok=strtok(NULL," \n"); + idx->tagged_cnt = atoi(ptrtok); +- ++ ++ if (idx->off_cnt < 0 || (unsigned long)idx->off_cnt > ULONG_MAX/sizeof(long)) { ++ free_index(idx); ++ return(NULL); ++ } ++ + /* make space for the offsets */ +- idx->offset = (long *) malloc(idx->off_cnt * (sizeof(long))); ++ idx->offset = (unsigned long *) malloc(idx->off_cnt * sizeof(long)); + assert(idx->offset); + + /* get the offsets */ +@@ -197,15 +197,21 @@ IndexPtr getindex(char *searchstr, int dbase) + char strings[MAX_FORMS][WORDBUF]; /* vector of search strings */ + static IndexPtr offsets[MAX_FORMS]; + static int offset; +- ++ + /* This works like strrok(): if passed with a non-null string, + prepare vector of search strings and offsets. If string + is null, look at current list of offsets and return next + one, or NULL if no more alternatives for this word. */ + + if (searchstr != NULL) { +- +- offset = 0; ++ /* Bail out if the input is too long for us to handle */ ++ if (strlen(searchstr) > (WORDBUF - 1)) { ++ strcpy(msgbuf, "WordNet library error: search term is too long\n"); ++ display_message(msgbuf); ++ return(NULL); ++ } ++ ++ offset = 0; + strtolower(searchstr); + for (i = 0; i < MAX_FORMS; i++) { + strcpy(strings[i], searchstr); +@@ -229,11 +235,11 @@ IndexPtr getindex(char *searchstr, int dbase) + /* Get offset of first entry. Then eliminate duplicates + and get offsets of unique strings. */ + +- if (strings[0][0] != NULL) ++ if (strings[0] != NULL) + offsets[0] = index_lookup(strings[0], dbase); + + for (i = 1; i < MAX_FORMS; i++) +- if ((strings[i][0]) != NULL && (strcmp(strings[0], strings[i]))) ++ if (strings[i] != NULL && (strcmp(strings[0], strings[i]))) + offsets[i] = index_lookup(strings[i], dbase); + } + +@@ -272,7 +278,7 @@ SynsetPtr read_synset(int dbase, long boffset, char *word) + SynsetPtr parse_synset(FILE *fp, int dbase, char *word) + { + static char line[LINEBUF]; +- char tbuf[SMLINEBUF]; ++ char tbuf[SMLINEBUF] = ""; + char *ptrtok; + char *tmpptr; + int foundpert = 0; +@@ -286,33 +292,11 @@ SynsetPtr parse_synset(FILE *fp, int dbase, char *word) + if ((tmpptr = fgets(line, LINEBUF, fp)) == NULL) + return(NULL); + +- synptr = (SynsetPtr)malloc(sizeof(Synset)); ++ synptr = (SynsetPtr)calloc(1, sizeof(Synset)); + assert(synptr); +- +- synptr->hereiam = 0; ++ + synptr->sstype = DONT_KNOW; +- synptr->fnum = 0; +- synptr->pos = '\0'; +- synptr->wcount = 0; +- synptr->words = '\0'; +- synptr->whichword = 0; +- synptr->ptrcount = 0; +- synptr->ptrtyp = '\0'; +- synptr->ptroff = '\0'; +- synptr->ppos = '\0'; +- synptr->pto = '\0'; +- synptr->pfrm = '\0'; +- synptr->fcount = 0; +- synptr->frmid = '\0'; +- synptr->frmto = '\0'; +- synptr->defn = '\0'; +- synptr->key = 0; +- synptr->nextss = NULL; +- synptr->nextform = NULL; + synptr->searchtype = -1; +- synptr->ptrlist = NULL; +- synptr->headword = NULL; +- synptr->headsense = 0; + + ptrtok = line; + +@@ -322,7 +306,7 @@ SynsetPtr parse_synset(FILE *fp, int dbase, char *word) + + /* sanity check - make sure starting file offset matches first field */ + if (synptr->hereiam != loc) { +- sprintf(msgbuf, "WordNet library error: no synset at location %d\n", ++ sprintf(msgbuf, "WordNet library error: no synset at location %ld\n", + loc); + display_message(msgbuf); + free(synptr); +@@ -335,16 +319,20 @@ SynsetPtr parse_synset(FILE *fp, int dbase, char *word) + + /* looking at POS */ + ptrtok = strtok(NULL, " \n"); +- synptr->pos = malloc(strlen(ptrtok) + 1); ++ synptr->pos = strdup(ptrtok); + assert(synptr->pos); +- strcpy(synptr->pos, ptrtok); + if (getsstype(synptr->pos) == SATELLITE) + synptr->sstype = INDIRECT_ANT; + + /* looking at numwords */ + ptrtok = strtok(NULL, " \n"); + synptr->wcount = strtol(ptrtok, NULL, 16); +- ++ ++ if (synptr->wcount < 0 || (unsigned int)synptr->wcount > UINT_MAX/sizeof(char *)) { ++ free_syns(synptr); ++ return(NULL); ++ } ++ + synptr->words = (char **)malloc(synptr->wcount * sizeof(char *)); + assert(synptr->words); + synptr->wnsns = (int *)malloc(synptr->wcount * sizeof(int)); +@@ -354,9 +342,8 @@ SynsetPtr parse_synset(FILE *fp, int dbase, char *word) + + for (i = 0; i < synptr->wcount; i++) { + ptrtok = strtok(NULL, " \n"); +- synptr->words[i] = malloc(strlen(ptrtok) + 1); ++ synptr->words[i] = strdup(ptrtok); + assert(synptr->words[i]); +- strcpy(synptr->words[i], ptrtok); + + /* is this the word we're looking for? */ + +@@ -371,6 +358,12 @@ SynsetPtr parse_synset(FILE *fp, int dbase, char *word) + ptrtok = strtok(NULL," \n"); + synptr->ptrcount = atoi(ptrtok); + ++ /* Should we check for long here as well? */ ++ if (synptr->ptrcount < 0 || (unsigned int)synptr->ptrcount > UINT_MAX/sizeof(int)) { ++ free_syns(synptr); ++ return(NULL); ++ } ++ + if (synptr->ptrcount) { + + /* alloc storage for the pointers */ +@@ -455,21 +448,23 @@ SynsetPtr parse_synset(FILE *fp, int dbase, char *word) + ptrtok = strtok(NULL," \n"); + if (ptrtok) { + ptrtok = strtok(NULL," \n"); +- sprintf(tbuf, ""); + while (ptrtok != NULL) { ++ if (strlen(ptrtok) + strlen(tbuf) + 1 + 1 > sizeof(tbuf)) { ++ free_syns(synptr); ++ return(NULL); ++ } + strcat(tbuf,ptrtok); + ptrtok = strtok(NULL, " \n"); + if(ptrtok) + strcat(tbuf," "); + } +- assert((1 + strlen(tbuf)) < sizeof(tbuf)); +- synptr->defn = malloc(strlen(tbuf) + 4); ++ synptr->defn = malloc(strlen(tbuf) + 3); + assert(synptr->defn); + sprintf(synptr->defn,"(%s)",tbuf); + } + + if (keyindexfp) { /* we have unique keys */ +- sprintf(tmpbuf, "%c:%8.8d", partchars[dbase], synptr->hereiam); ++ sprintf(tmpbuf, "%c:%8.8ld", partchars[dbase], synptr->hereiam); + synptr->key = GetKeyForOffset(tmpbuf); + } + +@@ -635,7 +630,7 @@ static void traceptrs(SynsetPtr synptr, int ptrtyp, int dbase, int depth) + + if ((ptrtyp == PERTPTR || ptrtyp == PPLPTR) && + synptr->pto[i] != 0) { +- sprintf(tbuf, " (Sense %d)\n", ++ snprintf(tbuf, sizeof(tbuf), " (Sense %d)\n", + cursyn->wnsns[synptr->pto[i] - 1]); + printsynset(prefix, cursyn, tbuf, DEFOFF, synptr->pto[i], + SKIP_ANTS, PRINT_MARKER); +@@ -656,7 +651,7 @@ static void traceptrs(SynsetPtr synptr, int ptrtyp, int dbase, int depth) + traceptrs(cursyn, HYPERPTR, getpos(cursyn->pos), 0); + } + } else if (ptrtyp == ANTPTR && dbase != ADJ && synptr->pto[i] != 0) { +- sprintf(tbuf, " (Sense %d)\n", ++ snprintf(tbuf, sizeof(tbuf), " (Sense %d)\n", + cursyn->wnsns[synptr->pto[i] - 1]); + printsynset(prefix, cursyn, tbuf, DEFOFF, synptr->pto[i], + SKIP_ANTS, PRINT_MARKER); +@@ -817,7 +812,7 @@ static void tracenomins(SynsetPtr synptr, int dbase) + + cursyn = read_synset(synptr->ppos[i], synptr->ptroff[i], ""); + +- sprintf(tbuf, "#%d\n", ++ snprintf(tbuf, sizeof(tbuf), "#%d\n", + cursyn->wnsns[synptr->pto[i] - 1]); + printsynset(prefix, cursyn, tbuf, DEFOFF, synptr->pto[i], + SKIP_ANTS, SKIP_MARKER); +@@ -989,12 +984,12 @@ void getexample(char *offset, char *wd) + char sentbuf[512]; + + if (vsentfilefp != NULL) { +- if (line = bin_search(offset, vsentfilefp)) { ++ if ((line = bin_search(offset, vsentfilefp)) != NULL) { + while(*line != ' ') + line++; + + printbuffer(" EX: "); +- sprintf(sentbuf, line, wd); ++ snprintf(sentbuf, sizeof(sentbuf), line, wd); + printbuffer(sentbuf); + } + } +@@ -1011,7 +1006,7 @@ int findexample(SynsetPtr synptr) + if (vidxfilefp != NULL) { + wdnum = synptr->whichword - 1; + +- sprintf(tbuf,"%s%%%-1.1d:%-2.2d:%-2.2d::", ++ snprintf(tbuf, sizeof(tbuf), "%s%%%-1.1d:%-2.2d:%-2.2d::", + synptr->words[wdnum], + getpos(synptr->pos), + synptr->fnum, +@@ -1124,7 +1119,7 @@ static void freq_word(IndexPtr index) + if (cnt >= 17 && cnt <= 32) familiar = 6; + if (cnt > 32 ) familiar = 7; + +- sprintf(tmpbuf, ++ snprintf(tmpbuf, sizeof(tmpbuf), + "\n%s used as %s is %s (polysemy count = %d)\n", + index->wd, a_an[getpos(index->pos)], freqcats[familiar], cnt); + printbuffer(tmpbuf); +@@ -1147,6 +1142,9 @@ void wngrep (char *word_passed, int pos) { + } + rewind(inputfile); + ++ if (strlen(word_passed) + 1 > sizeof(word)) ++ return; ++ + strcpy (word, word_passed); + ToLowerCase(word); /* map to lower case for index file search */ + strsubst (word, ' ', '_'); /* replace spaces with underscores */ +@@ -1169,7 +1167,7 @@ void wngrep (char *word_passed, int pos) { + ((line[loc + wordlen] == '-') || (line[loc + wordlen] == '_'))) + ) { + strsubst (line, '_', ' '); +- sprintf (tmpbuf, "%s\n", line); ++ snprintf (tmpbuf, sizeof(tmpbuf), "%s\n", line); + printbuffer (tmpbuf); + break; + } +@@ -1570,7 +1568,8 @@ char *findtheinfo(char *searchstr, int dbase, int ptrtyp, int whichsense) + bufstart[0] = '\n'; + bufstart++; + } +- strncpy(bufstart, tmpbuf, strlen(tmpbuf)); ++ /* Don't include the \0 */ ++ memcpy(bufstart, tmpbuf, strlen(tmpbuf)); + bufstart = searchbuffer + strlen(searchbuffer); + } + } +@@ -1683,9 +1682,8 @@ SynsetPtr traceptrs_ds(SynsetPtr synptr, int ptrtyp, int dbase, int depth) + cursyn = read_synset(synptr->ppos[i], + synptr->ptroff[i], + ""); +- synptr->headword = malloc(strlen(cursyn->words[0]) + 1); ++ synptr->headword = strdup(cursyn->words[0]); + assert(synptr->headword); +- strcpy(synptr->headword, cursyn->words[0]); + synptr->headsense = cursyn->lexid[0]; + free_synset(cursyn); + break; +@@ -2013,7 +2011,7 @@ static int getsearchsense(SynsetPtr synptr, int whichword) + strsubst(strcpy(wdbuf, synptr->words[whichword - 1]), ' ', '_'); + strtolower(wdbuf); + +- if (idx = index_lookup(wdbuf, getpos(synptr->pos))) { ++ if ((idx = index_lookup(wdbuf, getpos(synptr->pos))) != NULL) { + for (i = 0; i < idx->off_cnt; i++) + if (idx->offset[i] == synptr->hereiam) { + free_index(idx); +@@ -2037,7 +2035,7 @@ static void printsynset(char *head, SynsetPtr synptr, char *tail, int definition + by flags */ + + if (offsetflag) /* print synset offset */ +- sprintf(tbuf + strlen(tbuf),"{%8.8d} ", synptr->hereiam); ++ sprintf(tbuf + strlen(tbuf),"{%8.8ld} ", synptr->hereiam); + if (fileinfoflag) { /* print lexicographer file information */ + sprintf(tbuf + strlen(tbuf), "<%s> ", lexfiles[synptr->fnum]); + prlexid = 1; /* print lexicographer id after word */ +@@ -2072,7 +2070,7 @@ static void printantsynset(SynsetPtr synptr, char *tail, int anttype, int defini + tbuf[0] = '\0'; + + if (offsetflag) +- sprintf(tbuf,"{%8.8d} ", synptr->hereiam); ++ sprintf(tbuf,"{%8.8ld} ", synptr->hereiam); + if (fileinfoflag) { + sprintf(tbuf + strlen(tbuf),"<%s> ", lexfiles[synptr->fnum]); + prlexid = 1; +diff --git a/lib/wnutil.c b/lib/wnutil.c +index 5ee5d76..7b7948a 100644 +--- a/lib/wnutil.c ++++ b/lib/wnutil.c +@@ -48,7 +48,7 @@ int wninit(void) + char *env; + + if (!done) { +- if (env = getenv("WNDBVERSION")) { ++ if ((env = getenv("WNDBVERSION")) != NULL) { + wnrelease = strdup(env); /* set release */ + assert(wnrelease); + } +@@ -70,7 +70,7 @@ int re_wninit(void) + + closefps(); + +- if (env = getenv("WNDBVERSION")) { ++ if ((env = getenv("WNDBVERSION")) != NULL) { + wnrelease = strdup(env); /* set release */ + assert(wnrelease); + } +@@ -149,25 +149,25 @@ static int do_init(void) + sprintf(searchdir, DEFAULTPATH); + #else + if ((env = getenv("WNSEARCHDIR")) != NULL) +- strcpy(searchdir, env); ++ snprintf(searchdir, sizeof(searchdir), "%s", env); + else if ((env = getenv("WNHOME")) != NULL) +- sprintf(searchdir, "%s%s", env, DICTDIR); ++ snprintf(searchdir, sizeof(searchdir), "%s%s", env, DICTDIR); + else + strcpy(searchdir, DEFAULTPATH); + #endif + + for (i = 1; i < NUMPARTS + 1; i++) { +- sprintf(tmpbuf, DATAFILE, searchdir, partnames[i]); ++ snprintf(tmpbuf, sizeof(tmpbuf), DATAFILE, searchdir, partnames[i]); + if((datafps[i] = fopen(tmpbuf, "r")) == NULL) { +- sprintf(msgbuf, ++ snprintf(msgbuf, sizeof(msgbuf), + "WordNet library error: Can't open datafile(%s)\n", + tmpbuf); + display_message(msgbuf); + openerr = -1; + } +- sprintf(tmpbuf, INDEXFILE, searchdir, partnames[i]); ++ snprintf(tmpbuf, sizeof(tmpbuf), INDEXFILE, searchdir, partnames[i]); + if((indexfps[i] = fopen(tmpbuf, "r")) == NULL) { +- sprintf(msgbuf, ++ snprintf(msgbuf, sizeof(msgbuf), + "WordNet library error: Can't open indexfile(%s)\n", + tmpbuf); + display_message(msgbuf); +@@ -178,35 +178,35 @@ static int do_init(void) + /* This file isn't used by the library and doesn't have to + be present. No error is reported if the open fails. */ + +- sprintf(tmpbuf, SENSEIDXFILE, searchdir); ++ snprintf(tmpbuf, sizeof(tmpbuf), SENSEIDXFILE, searchdir); + sensefp = fopen(tmpbuf, "r"); + + /* If this file isn't present, the runtime code will skip printint out + the number of times each sense was tagged. */ + +- sprintf(tmpbuf, CNTLISTFILE, searchdir); ++ snprintf(tmpbuf, sizeof(tmpbuf), CNTLISTFILE, searchdir); + cntlistfp = fopen(tmpbuf, "r"); + + /* This file doesn't have to be present. No error is reported if the + open fails. */ + +- sprintf(tmpbuf, KEYIDXFILE, searchdir); ++ snprintf(tmpbuf, sizeof(tmpbuf), KEYIDXFILE, searchdir); + keyindexfp = fopen(tmpbuf, "r"); + +- sprintf(tmpbuf, REVKEYIDXFILE, searchdir); ++ snprintf(tmpbuf, sizeof(tmpbuf), REVKEYIDXFILE, searchdir); + revkeyindexfp = fopen(tmpbuf, "r"); + +- sprintf(tmpbuf, VRBSENTFILE, searchdir); ++ snprintf(tmpbuf, sizeof(tmpbuf), VRBSENTFILE, searchdir); + if ((vsentfilefp = fopen(tmpbuf, "r")) == NULL) { +- sprintf(msgbuf, ++ snprintf(msgbuf, sizeof(msgbuf), + "WordNet library warning: Can't open verb example sentence file(%s)\n", + tmpbuf); + display_message(msgbuf); + } + +- sprintf(tmpbuf, VRBIDXFILE, searchdir); ++ snprintf(tmpbuf, sizeof(tmpbuf), VRBIDXFILE, searchdir); + if ((vidxfilefp = fopen(tmpbuf, "r")) == NULL) { +- sprintf(msgbuf, ++ snprintf(msgbuf, sizeof(msgbuf), + "WordNet library warning: Can't open verb example sentence index file(%s)\n", + tmpbuf); + display_message(msgbuf); +diff --git a/src/wn.c b/src/wn.c +index ddb27aa..5c6a255 100644 +--- a/src/wn.c ++++ b/src/wn.c +@@ -129,7 +129,7 @@ static void printusage(), printlicense(), + printsearches(char *, int, unsigned long); + static int error_message(char *); + +-main(int argc,char *argv[]) ++int main(int argc,char *argv[]) + { + display_message = error_message; + +@@ -225,14 +225,14 @@ static int do_search(char *searchword, int pos, int search, int whichsense, + printf("\n%s of %s %s\n%s", + label, partnames[pos], searchword, outbuf); + +- if (morphword = morphstr(searchword, pos)) ++ if ((morphword = morphstr(searchword, pos)) != NULL) + do { + outbuf = findtheinfo(morphword, pos, search, whichsense); + totsenses += wnresults.printcnt; + if (strlen(outbuf) > 0) + printf("\n%s of %s %s\n%s", + label, partnames[pos], morphword, outbuf); +- } while (morphword = morphstr(NULL, pos)); ++ } while ((morphword = morphstr(NULL, pos)) != NULL); + + return(totsenses); + } diff --git a/wordnet-3.0-Pass-compilation-with-Werror-format-security.patch b/wordnet-3.0-Pass-compilation-with-Werror-format-security.patch new file mode 100644 index 0000000..9e37774 --- /dev/null +++ b/wordnet-3.0-Pass-compilation-with-Werror-format-security.patch @@ -0,0 +1,55 @@ +From ab6d29e9056173145cf49ebf9804e6caf2f870ea Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 4 Dec 2013 15:58:30 +0100 +Subject: [PATCH] Pass compilation with -Werror=format-security +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + + +Signed-off-by: Petr Písař +--- + lib/binsrch.c | 4 ++-- + src/wn.c | 3 +-- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/lib/binsrch.c b/lib/binsrch.c +index 8b71216..6b17325 100644 +--- a/lib/binsrch.c ++++ b/lib/binsrch.c +@@ -193,7 +193,7 @@ char *replace_line(char *new_line, char *searchkey, FILE *fp) + copyfile(fp, tfp); + if (fseek(fp, offset, 0) == -1) + return(NULL); /* could not seek to offset */ +- fprintf(fp, new_line); /* write line */ ++ fputs(new_line, fp); /* write line */ + rewind(tfp); + copyfile(tfp, fp); + +@@ -220,7 +220,7 @@ char *insert_line(char *new_line, char *searchkey, FILE *fp) + copyfile(fp, tfp); + if (fseek(fp, offset, 0) == -1) + return(NULL); /* could not seek to offset */ +- fprintf(fp, new_line); /* write line */ ++ fputs(new_line, fp); /* write line */ + rewind(tfp); + copyfile(tfp, fp); + +diff --git a/src/wn.c b/src/wn.c +index 6870a60..7eef283 100644 +--- a/src/wn.c ++++ b/src/wn.c +@@ -284,8 +284,7 @@ static void printsearches(char *word, int dbase, unsigned long search) + printf("\t"); + printf(searchstr[j].template, + partchars[dbase], partchars[dbase]); +- printf(searchstr[j].helpstr); +- printf("\n"); ++ printf("%s\n", searchstr[j].helpstr); + } + } + +-- +1.8.3.1 + diff --git a/wordnet-3.0-error_message.patch b/wordnet-3.0-error_message.patch new file mode 100644 index 0000000..d5a7359 --- /dev/null +++ b/wordnet-3.0-error_message.patch @@ -0,0 +1,12 @@ +diff --git a/src/wn.c b/src/wn.c +index ddb27aa..b160392 100644 +--- a/src/wn.c ++++ b/src/wn.c +@@ -344,7 +344,7 @@ static int getoptidx(char *searchtype) + + static int error_message(char *msg) + { +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + return(0); + } diff --git a/wordnet-3.0-fix_man.patch b/wordnet-3.0-fix_man.patch new file mode 100644 index 0000000..21d5f40 --- /dev/null +++ b/wordnet-3.0-fix_man.patch @@ -0,0 +1,1246 @@ +diff -upNr WordNet-3.0.orig/doc/man/binsrch.3 WordNet-3.0/doc/man/binsrch.3 +--- WordNet-3.0.orig/doc/man/binsrch.3 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/binsrch.3 2009-01-18 03:31:02.000000000 +0100 +@@ -1,8 +1,8 @@ + '\" t + .\" $Id$ +-.TH BINSRCH 3WN "Dec 2006" "WordNet 3.0" "WordNet\(tm Library Functions" ++.TH BINSRCH 3 "Dec 2006" "WordNet 3.0" "WordNet\(tm Library Functions" + .SH NAME +-bin_search, copyfile, replace_line, insert_line ++bin_search, copyfile, replace_line, insert_line \- general purpose functions for performing a binary search + .SH SYNOPSIS + .LP + \fBchar *bin_search(char *key, FILE *fp);\fP +@@ -53,11 +53,11 @@ The maximum line length in a file is 25K + If there are no additional fields after the search key, the key must + be followed by at least one space before the newline character. + .SH SEE ALSO +-.BR wnintro (3WN), +-.BR morph (3WN), +-.BR wnsearch (3WN), +-.BR wnutil (3WN), +-.BR wnintro (5WN). ++.BR wnintro (3), ++.BR morph (3), ++.BR wnsearch (3), ++.BR wnutil (3), ++.BR wnintro (5). + .SH WARNINGS + \fBbinsearch(\|)\fP returns a pointer to a static character buffer. + The returned string should be copied by the caller if the results need +diff -upNr WordNet-3.0.orig/doc/man/cntlist.5 WordNet-3.0/doc/man/cntlist.5 +--- WordNet-3.0.orig/doc/man/cntlist.5 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/cntlist.5 2009-01-18 03:31:02.000000000 +0100 +@@ -1,7 +1,7 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH CNTLIST 5WN "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" ++.TH CNTLIST 5 "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" + .SH NAME + cntlist \- file listing number of times each tagged sense occurs in a + semantic concordance, sorted most to least frequently tagged +@@ -20,7 +20,7 @@ in the concordance's cntlist file. + In the WordNet database, words are assigned sense numbers based on + frequency of use in semantically tagged corpora. The cntlist file used + by +-.BR grind (1WN) ++.BR grind (1) + to build the WordNet database and assign the sense numbers is a union + of the cntlist files from the various semantic concordances that were + formerly released by Princeton University. This +@@ -87,6 +87,6 @@ User's default browser options. + file of combined semantic concordance \fBcntlist\fP files. Used to + assign sense numbers in WordNet database + .SH SEE ALSO +-.BR grind (1WN), +-.BR wnintro (5WN), +-.BR senseidx (5WN). ++.BR grind (1), ++.BR wnintro (5), ++.BR senseidx (5). +diff -upNr WordNet-3.0.orig/doc/man/grind.1 WordNet-3.0/doc/man/grind.1 +--- WordNet-3.0.orig/doc/man/grind.1 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/grind.1 2009-01-18 03:31:02.000000000 +0100 +@@ -24,7 +24,7 @@ Each input lexicographer file consists o + (\fIsynsets\fP) for one part of speech. Although the basic synset + syntax is the same for all of the parts of speech, some parts of the + syntax only apply to a particular part of speech. See +-.BR wninput (5WN) ++.BR wninput (5) + for a description of the input file format. + + Each \fIfilename\fP specified is of the form: +@@ -42,7 +42,7 @@ where \fIpathname\fP is optional and \fI + files, for example \fBnoun.animal\fP and \fBnoun.plant\fP. One or + more input files, in any combination of syntactic categories, may be + specified. See +-.BR lexnames (5WN) ++.BR lexnames (5) + for a list of the lexicographer files used to build the complete + WordNet database. + .SS Output Files +@@ -60,7 +60,7 @@ _ + .TE + + See +-.BR wndb (5WN) ++.BR wndb (5) + for a description of the database file formats. + + Each time \fBgrind(\|)\fP is run, any existing database files are +@@ -133,16 +133,16 @@ lexicographer files to use to build data + file of combined semantic concordance \fBcntlist\fP files. Used to + assign sense numbers in WordNet database + .SH SEE ALSO +-.BR cntlist (5WN), +-.BR lexnames (5WN), +-.BR senseidx (5WN), +-.BR wndb (5WN), +-.BR wninput (5WN), +-.BR uniqbeg (7WN), +-.BR wngloss (7WN). ++.BR cntlist (5), ++.BR lexnames (5), ++.BR senseidx (5), ++.BR wndb (5), ++.BR wninput (5), ++.BR uniqbeg (7), ++.BR wngloss (7). + .SH DIAGNOSTICS + Exit status is normally 0. +-Exit status is -1 if non-specific error occurs. ++Exit status is \-1 if non-specific error occurs. + If syntactic or structural errors exist, exit status is number of + errors detected. + .TP +diff -upNr WordNet-3.0.orig/doc/man/lexnames.5 WordNet-3.0/doc/man/lexnames.5 +--- WordNet-3.0.orig/doc/man/lexnames.5 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/lexnames.5 2009-01-18 03:31:02.000000000 +0100 +@@ -1,17 +1,17 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH LEXNAMES 5WN "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" ++.TH LEXNAMES 5 "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" + .SH NAME +-List of WordNet lexicographer file names and numbers ++lexnames \- List of WordNet lexicographer file names and numbers + .SH DESCRIPTION + During WordNet development synsets are organized into forty-five + lexicographer files based on syntactic category and logical groupings. +-.BR grind (1WN) ++.BR grind (1) + processes these files and produces a database suitable for use with + the WordNet library, interface code, and other applications. The + format of the lexicographer files is described in +-.BR wninput (5WN). ++.BR wninput (5). + + A file number corresponds to each lexicographer file. File numbers + are encoded in several parts of the WordNet system as an efficient way +@@ -117,7 +117,7 @@ Base directory for WordNet. Default is + .B lexnames + list of lexicographer file names and numbers + .SH SEE ALSO +-.BR grind (1WN), +-.BR wnintro (5WN), +-.BR wndb (5WN), +-.BR wninput (5WN). ++.BR grind (1), ++.BR wnintro (5), ++.BR wndb (5), ++.BR wninput (5). +diff -upNr WordNet-3.0.orig/doc/man/Makefile WordNet-3.0/doc/man/Makefile +--- WordNet-3.0.orig/doc/man/Makefile 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/Makefile 2009-01-18 03:33:59.000000000 +0100 +@@ -134,7 +134,7 @@ sbindir = ${exec_prefix}/sbin + sharedstatedir = ${prefix}/com + sysconfdir = ${prefix}/etc + target_alias = +-man_MANS = binsrch.3 cntlist.5 grind.1 lexnames.5 morph.3 morphy.7 senseidx.5 uniqbeg.7 wn.1 wnb.1 wndb.5 wngloss.7 wngroups.7 wninput.5 wnintro.1 wnintro.3 wnintro.5 wnintro.7 wnlicens.7 wnpkgs.7 wnsearch.3 wnstats.7 wnutil.3 ++man_MANS = binsrch.3 cntlist.5 grind.1 lexnames.5 morph.3 morphy.7 senseidx.5 uniqbeg.7 wn.1 wnb.1 wndb.5 wngloss.7 wngroups.7 wninput.5 wnintro.1 wnintro.3 wnintro.5 wnintro.7 wnlicens.7 wnpkgs.7 wnsearch.3 wnstats.7 wnutil.3 wishwn.1 + all: all-am + + .SUFFIXES: +diff -upNr WordNet-3.0.orig/doc/man/morph.3 WordNet-3.0/doc/man/morph.3 +--- WordNet-3.0.orig/doc/man/morph.3 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/morph.3 2009-01-18 03:31:02.000000000 +0100 +@@ -1,8 +1,8 @@ + '\" t + .\" $Id$ +-.TH MORPH 3WN "Dec 2006" "WordNet 3.0" "WordNet\(tm Library Functions" ++.TH MORPH 3 "Dec 2006" "WordNet 3.0" "WordNet\(tm Library Functions" + .SH NAME +-morphinit, re_morphinit, morphstr, morphword ++morphinit, re_morphinit, morphstr, morphword \- WordNet morphological processor functions + .SH SYNOPSIS + .LP + \fB#include "wn.h"\fP +@@ -67,7 +67,7 @@ is called by + and is not intended to be called directly by an application. + Applications wishing to use WordNet and/or the morphological functions + must call \fBwninit(\|)\fP at the start of the program. See +-.BR wnutil (3WN) ++.BR wnutil (3) + for more information. + + \fIorigstr\fP may be either a word or a collocation formed by joining +@@ -93,10 +93,10 @@ If + is passed, it is treated by \fBmorphstr(\|)\fP as + .SB ADJECTIVE. + .SH SEE ALSO +-.BR wnintro (3WN), +-.BR wnsearch (3WN), +-.BR wndb (5WN), +-.BR morphy (7WN). ++.BR wnintro (3), ++.BR wnsearch (3), ++.BR wndb (5), ++.BR morphy (7). + + .SH WARNINGS + Passing an invalid part of speech will result in a core dump. +diff -upNr WordNet-3.0.orig/doc/man/morphy.7 WordNet-3.0/doc/man/morphy.7 +--- WordNet-3.0.orig/doc/man/morphy.7 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/morphy.7 2009-01-18 03:31:02.000000000 +0100 +@@ -1,7 +1,7 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH MORPHY 7WN "Dec 2006" "WordNet 3.0" "WordNet\(tm" ++.TH MORPHY 7 "Dec 2006" "WordNet 3.0" "WordNet\(tm" + .SH NAME + morphy \- discussion of WordNet's morphological processing + .SH DESCRIPTION +@@ -39,7 +39,7 @@ is returned. A transformation to a vali + if the base form of the string is not in WordNet. + + The morphological functions are found in the WordNet library. See +-.BR morph (3WN) ++.BR morph (3) + for information on using these functions. + .SS Rules of Detachment + The following table shows the rules of detachment used by Morphy. If +@@ -82,7 +82,7 @@ algorithmic manner. Each line of an exc + inflected form of a word or collocation, followed by one or more base + forms. The list is kept in alphabetical order and a binary search is + used to find words in these lists. See +-.BR wndb (5WN) ++.BR wndb (5) + for information on the format of the exception list files. + .SS Single Words + In general, single words are relatively easy to process. Morphy first +@@ -172,9 +172,9 @@ Base directory for WordNet. Default is + .B \fIpos\fP.exc + morphology exception lists + .SH SEE ALSO +-.BR wn (1WN), +-.BR wnb (1WN), +-.BR binsrch (3WN), +-.BR morph (3WN), +-.BR wndb (5WN), +-.BR wninput (7WN). ++.BR wn (1), ++.BR wnb (1), ++.BR binsrch (3), ++.BR morph (3), ++.BR wndb (5), ++.BR wninput (7). +diff -upNr WordNet-3.0.orig/doc/man/prologdb.5 WordNet-3.0/doc/man/prologdb.5 +--- WordNet-3.0.orig/doc/man/prologdb.5 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/prologdb.5 2009-01-18 03:31:02.000000000 +0100 +@@ -1,6 +1,6 @@ + .\" $Id$ + .tr ~ +-.TH PROLOGDB 5WN "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" ++.TH PROLOGDB 5 "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" + .SH NAME + wn_\*.pl \- description of Prolog database files + .SH DESCRIPTION +@@ -14,9 +14,9 @@ WordNet relation giving the user the abi + of the database that they are interested. + + See \fBFILES\fP, below, for a list of the database files and +-.BR wndb (5WN) ++.BR wndb (5) + and +-.BR wninput (5WN) ++.BR wninput (5) + for detailed descriptions of the various WordNet relations (referred to + as \fIoperators\fP in this manual page). + .SS File Format +@@ -205,7 +205,7 @@ all words in a synset. The operator is + A \fIsynset_id\fP is a nine byte field in which the first + byte defines the syntactic category of the synset and the remaining + eight bytes are a \fIsynset_offset\fP, as defined in +-.BR wndb (5WN), ++.BR wndb (5), + indicating the byte offset in the \fBdata.\fP\fIpos\fP file that + corresponds to the syntactic category. + +@@ -226,7 +226,7 @@ synset, from left to right, beginning wi + lexical WordNet relations \fIw_num\fP may be 0, indicating that the + relation holds for all words in the synset indicated by the preceding + \fIsynset_id\fP. See +-.BR wninput (5WN) ++.BR wninput (5) + for a discussion of semantic and lexical relations. + + \fIss_type\fP is a one character code indicating the synset type: +@@ -251,7 +251,7 @@ the lexicographer, with spaces replaced + \fIword\fP is immediately followed by a syntactic marker if one was + specified in the lexicographer file. A syntactic marker is appended, + in parentheses, onto \fIword\fP without any intervening spaces. See +-.BR wninput (5WN) ++.BR wninput (5) + for a list of the syntactic markers for adjectives. + + Each synset has a \fIgloss\fP that may contain a definition, one or +@@ -265,7 +265,7 @@ the synset. If non-zero, the frame appl + synset. + + In WordNet, sense numbers are assigned as described in +-.BR wndb (5WN). ++.BR wndb (5). + \fItag_count\fP is the number of times the sense was tagged in the + Semantic Concordances, and \fB0\fP if it was not instantiated. + .SH NOTES +@@ -338,7 +338,7 @@ pertainym pointers + .B wn_fr.pl + frame pointers + .SH SEE ALSO +-.BR wndb (5WN), +-.BR wninput (5WN), +-.BR wngroups (7WN), +-.BR wnpkgs (7WN). ++.BR wndb (5), ++.BR wninput (5), ++.BR wngroups (7), ++.BR wnpkgs (7). +diff -upNr WordNet-3.0.orig/doc/man/senseidx.5 WordNet-3.0/doc/man/senseidx.5 +--- WordNet-3.0.orig/doc/man/senseidx.5 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/senseidx.5 2009-01-18 03:31:02.000000000 +0100 +@@ -1,7 +1,7 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH SENSEIDX 5WN "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" ++.TH SENSEIDX 5 "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" + .SH NAME + index.sense, sense.idx \- WordNet's sense index + .SH DESCRIPTION +@@ -31,10 +31,10 @@ Using the sense index and a \fIsense_key + obtained. A mapping from noun \fIsense_key\fPs in WordNet 1.6 to + corresponding 2.0 \fIsense_key\fPs is provided with version 2.0, + and is described in +-.BR sensemap (5WN). ++.BR sensemap (5). + + See +-.BR wndb (5WN) ++.BR wndb (5) + for a thorough discussion of the WordNet database files. + .SS File Format + The sense index file lists all of the senses in the WordNet database +@@ -66,7 +66,7 @@ structure containing the parsed synset i + \fIsense_number\fP is a decimal integer indicating the sense number of + the word, within the part of speech encoded in \fIsense_key\fP, in the + WordNet database. See +-.BR wndb (5WN) ++.BR wndb (5) + for information about how sense numbers are assigned. + + \fItag_cnt\fP represents the decimal number of times the sense is +@@ -98,7 +98,7 @@ below for a listing of the numbers corre + \fIlex_filenum\fP is a two digit decimal integer representing the + name of the lexicographer file containing the synset for the sense. + See +-.BR lexnames (5WN) ++.BR lexnames (5) + for the list of lexicographer file names and their corresponding numbers. + + \fIlex_id\fP is a two digit decimal integer that, when appended onto +@@ -109,7 +109,7 @@ there is no requirement that the numbers + \fB00\fP. Note that a value of \fB00\fP is the default, and therefore + is not present in lexicographer files. Only non-default \fIlex_id\fP + values must be explicitly assigned in lexicographer files. See +-.BR wninput (5WN) ++.BR wninput (5) + for information on the format of lexicographer files. + + \fIhead_word\fP is only present if the sense is in an adjective +@@ -155,10 +155,10 @@ Base directory for WordNet. Default is + .B index.sense + sense index + .SH SEE ALSO +-.BR binsrch (3WN), +-.BR wnsearch (3WN), +-.BR lexnames (5WN), +-.BR wnintro (5WN), +-.BR sensemap (5WN), +-.BR wndb (5WN), +-.BR wninput (5WN). ++.BR binsrch (3), ++.BR wnsearch (3), ++.BR lexnames (5), ++.BR wnintro (5), ++.BR sensemap (5), ++.BR wndb (5), ++.BR wninput (5). +diff -upNr WordNet-3.0.orig/doc/man/uniqbeg.7 WordNet-3.0/doc/man/uniqbeg.7 +--- WordNet-3.0.orig/doc/man/uniqbeg.7 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/uniqbeg.7 2009-01-18 03:31:02.000000000 +0100 +@@ -1,6 +1,6 @@ + '\" t + .\" $Id$ +-.TH UNIQBEG 7WN "Dec 2006" "WordNet 3.0" "WordNet\(tm" ++.TH UNIQBEG 7 "Dec 2006" "WordNet 3.0" "WordNet\(tm" + .SH NAME + uniqbeg \- unique beginners for noun hierarchies + .SH DESCRIPTION +@@ -22,7 +22,7 @@ The lexicographer files are not included + .B noun.Tops + unique beginners for nouns + .SH SEE ALSO +-.BR wndb (5WN), +-.BR wninput (5WN), +-.BR wnintro (7WN), +-.BR wngloss (7WN). ++.BR wndb (5), ++.BR wninput (5), ++.BR wnintro (7), ++.BR wngloss (7). +diff -upNr WordNet-3.0.orig/doc/man/wn.1 WordNet-3.0/doc/man/wn.1 +--- WordNet-3.0.orig/doc/man/wn.1 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wn.1 2009-01-18 03:31:02.000000000 +0100 +@@ -1,7 +1,7 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH WN 1WN "Dec 2006" "WordNet 3.0" "WordNet\(tm User Commands" ++.TH WN 1 "Dec 2006" "WordNet 3.0" "WordNet\(tm User Commands" + .SH NAME + wn \- command line interface to WordNet lexical database + .SH SYNOPSIS +@@ -214,7 +214,7 @@ Verb senses can be grouped by similarity + than ordered by frequency of use. The \fB\-simsv\fP search prints all + senses that are close in meaning together, with a line of dashes + indicating the end of a group. See +-.BR wngroups (7WN) ++.BR wngroups (7) + for a discussion of how senses are grouped. + + The \fB\-over\fP search displays an overview of all the senses of the +@@ -326,15 +326,15 @@ files of sentences illustrating the use + .B \fIpos\fP.exc + morphology exception lists + .SH SEE ALSO +-.BR wnintro (1WN), +-.BR wnb (1WN), +-.BR wnintro (3WN), +-.BR lexnames (5WN), +-.BR senseidx (5WN) +-.BR wndb (5WN), +-.BR wninput (5WN), +-.BR morphy (7WN), +-.BR wngloss (7WN), +-.BR wngroups (7WN). ++.BR wnintro (1), ++.BR wnb (1), ++.BR wnintro (3), ++.BR lexnames (5), ++.BR senseidx (5) ++.BR wndb (5), ++.BR wninput (5), ++.BR morphy (7), ++.BR wngloss (7), ++.BR wngroups (7). + .SH BUGS + Please report bugs to wordnet@princeton.edu. +diff -upNr WordNet-3.0.orig/doc/man/wnb.1 WordNet-3.0/doc/man/wnb.1 +--- WordNet-3.0.orig/doc/man/wnb.1 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wnb.1 2009-01-18 03:31:02.000000000 +0100 +@@ -1,7 +1,7 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH WNB 1WN "Dec 2006" "WordNet 3.0" "WordNet\(tm User Commands" ++.TH WNB 1 "Dec 2006" "WordNet 3.0" "WordNet\(tm User Commands" + .SH NAME + wnb \- WordNet window-based browser interface + .SH SYNOPSIS +@@ -271,7 +271,7 @@ these options will be used as the user d + Display this manual page. + .IP "Help on WordNet terminology" + Display the +-.BR wngloss (7WN) ++.BR wngloss (7) + manual page. + .IP "Display the WordNet license" + Display the WordNet copyright notice and license agreement. +@@ -353,7 +353,7 @@ than ordered by frequency of use. When + similarity"\fP search is selected, senses that are close + in meaning are printed together, with a line of dashes indicating the + end of a group. See +-.BR wngroups (7WN) ++.BR wngroups (7) + for a discussion how senses are grouped. + + The output of the \fB"Derivationally Related Forms"\fP +@@ -447,15 +447,15 @@ files of sentences illustrating the use + .B \fIpos\fP.exc + morphology exception lists + .SH SEE ALSO +-.BR wnintro (1WN), +-.BR wn (1WN), +-.BR wnintro (3WN), +-.BR lexnames (5WN), +-.BR senseidx (5WN), +-.BR wndb (5WN), +-.BR wninput (5WN), +-.BR morphy (7WN), +-.BR wngloss (7WN), +-.BR wngroups (7WN). ++.BR wnintro (1), ++.BR wn (1), ++.BR wnintro (3), ++.BR lexnames (5), ++.BR senseidx (5), ++.BR wndb (5), ++.BR wninput (5), ++.BR morphy (7), ++.BR wngloss (7), ++.BR wngroups (7). + .SH BUGS + Please reports bugs to wordnet@princeton.edu. +diff -upNr WordNet-3.0.orig/doc/man/wndb.5 WordNet-3.0/doc/man/wndb.5 +--- WordNet-3.0.orig/doc/man/wndb.5 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wndb.5 2009-01-18 03:31:02.000000000 +0100 +@@ -1,7 +1,7 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH WNDB 5WN "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" ++.TH WNDB 5 "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" + .SH NAME + index.noun, data.noun, index.verb, data.verb, index.adj, data.adj, index.adv, data.adv \- WordNet database files + .LP +@@ -25,7 +25,7 @@ Words in the index file are in lower cas + were entered in the lexicographer files. This folds various + orthographic representations of the word into one line enabling + database searches to be case insensitive. See +-.BR wninput (5WN) ++.BR wninput (5) + for a detailed description of the lexicographer files + + A data file for a syntactic category contains information +@@ -51,7 +51,7 @@ newline character. Fields enclosed in i + not be present. + + See +-.BR wngloss (7WN) ++.BR wngloss (7) + for a glossary of WordNet terminology and a discussion of the + database's content and logical organization. + .SS Index File Format +@@ -96,7 +96,7 @@ containing it. + .I ptr_symbol + A space separated list of \fIp_cnt\fP different types of pointers that + \fIlemma\fP has in all synsets containing it. See +-.BR wninput (5WN) ++.BR wninput (5) + for a list of \fIpointer_symbol\fPs. If all senses of \fIlemma\fP + have no pointers, this field is omitted and \fIp_cnt\fP is \fB0\fP. + .TP 15 +@@ -115,7 +115,7 @@ different sense of \fIlemma\fP in WordNe + 8 digit, zero-filled decimal integer that can be used with + .BR fseek (3) + to read a synset from the data file. When passed to +-.BR read_synset (3WN) ++.BR read_synset (3) + along with the syntactic category, a data structure containing the + parsed synset is returned. + .SS Data File Format +@@ -137,7 +137,7 @@ integer. + .I lex_filenum + Two digit decimal integer corresponding to the lexicographer file name + containing the synset. See +-.BR lexnames (5WN) ++.BR lexnames (5) + for the list of filenames and their corresponding numbers. + .TP 15 + .I ss_type +@@ -166,7 +166,7 @@ lower-case forms. In \fBdata.adj\fP, a + syntactic marker if one was specified in the lexicographer file. A + syntactic marker is appended, in parentheses, onto \fIword\fP without + any intervening spaces. See +-.BR wninput (5WN) ++.BR wninput (5) + for a list of the syntactic markers for adjectives. + .TP 15 + .I lex_id +@@ -210,7 +210,7 @@ relation holds. Word numbers are assign + a synset, from left to right, beginning with \fB1\fP. + + See +-.BR wninput (5WN) ++.BR wninput (5) + for a list of \fIpointer_symbol\fPs, and semantic and lexical pointer + classifications. + .TP 15 +@@ -232,7 +232,7 @@ pointers, if this number is \fB00\fP, \f + word indicated. Word numbers are assigned as described for pointers. + Each \fIf_num~~w_num\fP pair is preceded by a \fB+\fP. + See +-.BR wninput (5WN) ++.BR wninput (5) + for the text of the generic sentence frames. + .TP + .I gloss +@@ -250,11 +250,11 @@ entry in the \fBindex.\fIpos\fR files in + in the list have been tagged. + + The +-.BR cntlist (5WN) ++.BR cntlist (5) + file provided with the database lists the number of times each sense + is tagged in the semantic concordances. The data from \fBcntlist\fP + is used by +-.BR grind (1WN) ++.BR grind (1) + to order the senses of each word. When the \fBindex\fP.\fIpos\fP + files are generated, the \fIsynset_offset\fPs are output in sense + number order, with sense 1 first in the list. Senses with the same +@@ -275,7 +275,7 @@ generated from a machine-readable dictio + that are not in WordNet. Also, for many of the inflected forms, base + forms could be easily derived using the standard rules of detachment + programmed into Morphy (See +-.BR morph (7WN)). ++.BR morph (7)). + These anomalies are allowed to remain in the exception list files, + as they do no harm. + +@@ -290,7 +290,7 @@ the line is the text of a template examp + used as a placeholder in the text for the verb. Both files are sorted + alphabetically so that the \fIsense_key\fP and template sentence + number can be used as indices, via +-.BR binsrch (3WN), ++.BR binsrch (3), + into the appropriate file. + + When a request for +@@ -306,7 +306,7 @@ represents all of the word senses and sy + The \fIword\fP, \fIlex_id\fP, and \fIlex_filenum\fP fields together + uniquely identify each word sense in WordNet. These can be encoded in + a \fIsense_key\fP as described in +-.BR senseidx (5WN). ++.BR senseidx (5). + Each synset in the database can be uniquely identified by combining + the \fIsynset_offset\fP for the synset with a code for the syntactic + category (since it is possible for synsets in different +@@ -316,7 +316,7 @@ The WordNet system provide both command + interfaces to the database. Both interfaces utilize a common library + of search and morphology code. The source code for the library and + interfaces is included in the WordNet package. See +-.BR wnintro (3WN) ++.BR wnintro (3) + for an overview of the WordNet source code. + .SH ENVIRONMENT VARIABLES (UNIX) + .TP 20 +@@ -346,17 +346,17 @@ files of sentences illustrating the use + .B \fIpos\fP.exc + morphology exception lists + .SH SEE ALSO +-.BR grind (1WN), +-.BR wn (1WN), +-.BR wnb (1WN), +-.BR wnintro (3WN), +-.BR binsrch (3WN), +-.BR wnintro (5WN), +-.BR cntlist (5WN), +-.BR lexnames (5WN), +-.BR senseidx (5WN), +-.BR wninput (5WN), +-.BR morphy (7WN), +-.BR wngloss (7WN), +-.BR wngroups (7WN), +-.BR wnstats (7WN). ++.BR grind (1), ++.BR wn (1), ++.BR wnb (1), ++.BR wnintro (3), ++.BR binsrch (3), ++.BR wnintro (5), ++.BR cntlist (5), ++.BR lexnames (5), ++.BR senseidx (5), ++.BR wninput (5), ++.BR morphy (7), ++.BR wngloss (7), ++.BR wngroups (7), ++.BR wnstats (7). +diff -upNr WordNet-3.0.orig/doc/man/wngloss.7 WordNet-3.0/doc/man/wngloss.7 +--- WordNet-3.0.orig/doc/man/wngloss.7 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wngloss.7 2009-01-18 03:31:02.000000000 +0100 +@@ -1,7 +1,7 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH WNGLOSS 7WN "Dec 2006" "WordNet 3.0" "WordNet\(tm" ++.TH WNGLOSS 7 "Dec 2006" "WordNet 3.0" "WordNet\(tm" + .SH NAME + wngloss \- glossary of terms used in WordNet system + .SH DESCRIPTION +@@ -26,12 +26,12 @@ these files into a database, and search + display information from the database. The lexicographer files + organize nouns, verbs, adjectives and adverbs into groups of synonyms, + and describe relations between synonym groups. +-.BR grind (1WN) ++.BR grind (1) + converts the lexicographer files into a database that encodes the + relations between the synonym groups. The different interfaces to the + WordNet database utilize a common library of search routines to + display these relations. Note that the lexicographer files and +-.BR grind (1WN) ++.BR grind (1) + program are not generally distributed. + + .SS Database Organization +@@ -77,7 +77,7 @@ antonyms; therefore the synset for an ad + lexical pointer to the adjective from which it is derived. + + See +-.BR wndb (5WN) ++.BR wndb (5) + for a detailed description of the database files and how the data are + represented. + .SH GLOSSARY OF TERMS +@@ -107,7 +107,7 @@ inflections are added. + .TP 25 + .B basic synset + Syntactically, same as \fBsynset\fP. Term is used in +-.BR wninput (5WN) ++.BR wninput (5) + to help explain differences in entering synsets in lexicographer + files. + .TP 25 +@@ -269,7 +269,7 @@ Information necessary to find a sense in + sense key combines a \fBlemma\fP field and codes for the synset type, + lexicographer id, lexicographer file number, and information about a + satellite's \fBhead synset\fP, if required. See +-.BR senseidx (5WN) ++.BR senseidx (5) + for a description of the format of a sense key. + .TP 25 + .B subordinate +diff -upNr WordNet-3.0.orig/doc/man/wngroups.7 WordNet-3.0/doc/man/wngroups.7 +--- WordNet-3.0.orig/doc/man/wngroups.7 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wngroups.7 2009-01-18 03:31:02.000000000 +0100 +@@ -1,7 +1,7 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH WNGROUPS 7WN "Dec 2006" "WordNet 3.0" "WordNet\(tm" ++.TH WNGROUPS 7 "Dec 2006" "WordNet 3.0" "WordNet\(tm" + .SH NAME + wngroups \- discussion of WordNet search code to group similar verb senses + .SH DESCRIPTION +@@ -34,10 +34,10 @@ verb sense keys and sentence frame numbe + .B sents.vrb + example sentence frames + .SH SEE ALSO +-.BR wn (1WN), +-.BR wnb (1WN), +-.BR senseidx (5WN), +-.BR wnsearch (3WN), +-.BR wndb (5WN), +-.BR wnintro (7WN). ++.BR wn (1), ++.BR wnb (1), ++.BR senseidx (5), ++.BR wnsearch (3), ++.BR wndb (5), ++.BR wnintro (7). + +diff -upNr WordNet-3.0.orig/doc/man/wninput.5 WordNet-3.0/doc/man/wninput.5 +--- WordNet-3.0.orig/doc/man/wninput.5 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wninput.5 2009-01-18 03:31:02.000000000 +0100 +@@ -1,11 +1,11 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH WNINPUT 5WN "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" ++.TH WNINPUT 5 "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" + .SH NAME + noun.\fIsuffix\fP, verb.\fIsuffix\fP, adj.\fIsuffix\fP, adv.\fIsuffix\fP \- + WordNet lexicographer files that are input to +-.BR grind (1WN) ++.BR grind (1) + .SH DESCRIPTION + WordNet's source files are written by lexicographers. They are the + product of a detailed relational analysis of lexical semantics: a +@@ -36,7 +36,7 @@ satellite synsets. Adverbs generally po + which they are derived. + + See +-.BR wngloss (7WN) ++.BR wngloss (7) + for a glossary of WordNet terminology and a discussion of the + database's content and logical organization. + .SS Lexicographer File Names +@@ -50,7 +50,7 @@ where \fIpos\fP is either \fBnoun\fP, \f + \fBadv\fP. \fIsuffix\fP may be used to organize groups of synsets + into different files, for example \fBnoun.animal\fP and + \fBnoun.plant\fP. See +-.BR lexnames (5WN) ++.BR lexnames (5) + for a list of lexicographer file names that are used in building + WordNet. + .SS Pointers +@@ -148,7 +148,7 @@ The \fIpointer_symbol\fPs for adverbs ar + Many pointer types are reflexive, meaning that if a synset contains a + pointer to another synset, the other synset should contain a + corresponding reflexive pointer. +-.BR grind (1WN) ++.BR grind (1) + automatically inserts missing reflexive pointers for the following + pointer types: + +@@ -178,7 +178,7 @@ synset can be used. For some verb sense + illustrating actual uses of the verb are provided. (See + .SB "Verb Example Sentences" + in +-.BR wndb (5WN).) ++.BR wndb (5).) + Whenever there is no example sentence, the generic sentence frames + specified by the lexicographer are used. The generic sentence frames + are entered in a synset as a comma-separated list of integer frame +@@ -247,7 +247,6 @@ relations between all the words in the s + + For verbs, the basic synset syntax is defined as follows: + +-.KS + .RS + .nf + \fB{\fP \fI~~words~~pointers~~frames~~\fP \fB(\fP ~\fIgloss~\fP \fB)~~}\fR +@@ -268,7 +267,6 @@ form: + \fB]\fR + .fi + .RE +-.KE + + Each adjective cluster is enclosed in square brackets, and may have + one or more parts. Each part consists of a head synset and optional +@@ -279,7 +277,7 @@ bracket following the last synset. Head + the syntax of basic synsets, however a "Similar to" pointer must be + specified in a head synset for each of its satellite synsets. Most + adjective clusters contain two antonymous parts. See +-.BR wngloss (7WN) ++.BR wngloss (7) + for a discussion of adjective clusters, and + .SB "Special Adjective Syntax" + for more information on adjective cluster syntax. +@@ -347,7 +345,7 @@ brackets used to enclose it are treated + define an adjective cluster. Only one word can be specified in each + word/pointer set, and any number of pointers may be included. A + synset can have any number of word/pointer sets. Each is treated by +-.BR grind (1WN) ++.BR grind (1) + essentially as a \fIword\fP, so they all must appear + before any synset \fIpointers\fP representing semantic relations. + +@@ -500,12 +498,12 @@ Sample adverb synsets: + .fi + .RE + .SH SEE ALSO +-.BR grind (1WN), +-.BR wnintro (5WN), +-.BR lexnames (5WN), +-.BR wndb (5WN), +-.BR uniqbeg (7WN), +-.BR wngloss (7WN). ++.BR grind (1), ++.BR wnintro (5), ++.BR lexnames (5), ++.BR wndb (5), ++.BR uniqbeg (7), ++.BR wngloss (7). + .LP + Fellbaum, C. (1998), ed. + \fI"WordNet: An Electronic Lexical Database"\fP. +diff -upNr WordNet-3.0.orig/doc/man/wnintro.1 WordNet-3.0/doc/man/wnintro.1 +--- WordNet-3.0.orig/doc/man/wnintro.1 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wnintro.1 2009-01-18 03:31:02.000000000 +0100 +@@ -1,7 +1,7 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH WNINTRO 1WN "Dec 2006" "WordNet 3.0" "WordNet\(tm User Commands" ++.TH WNINTRO 1 "Dec 2006" "WordNet 3.0" "WordNet\(tm User Commands" + .SH NAME + wnintro \- WordNet user commands + .SH SYNOPSIS +@@ -15,9 +15,9 @@ pages that describe commands available w + packages. + + The WordNet interfaces +-.BR wn (1WN) ++.BR wn (1) + and +-.BR wnb (1WN) ++.BR wnb (1) + allow the user to search the WordNet database and display the + information textually. + .SH ENVIRONMENT VARIABLES (UNIX) +@@ -35,12 +35,12 @@ Default is \fBWNHOME/dict\fP. + Base directory for WordNet. Default is + \fBC:\eProgram~Files\eWordNet\e3.0\fP. + .SH SEE ALSO +-.BR grind (1WN), +-.BR wn (1WN), +-.BR wnb (1WN), +-.BR wnintro (3WN), +-.BR wnintro (5WN), +-.BR wnintro (7WN). ++.BR grind (1), ++.BR wn (1), ++.BR wnb (1), ++.BR wnintro (3), ++.BR wnintro (5), ++.BR wnintro (7). + .LP + Fellbaum, C. (1998), ed. + \fI"WordNet: An Electronic Lexical Database"\fP. +diff -upNr WordNet-3.0.orig/doc/man/wnintro.3 WordNet-3.0/doc/man/wnintro.3 +--- WordNet-3.0.orig/doc/man/wnintro.3 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wnintro.3 2009-01-18 03:31:02.000000000 +0100 +@@ -1,7 +1,7 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH WNINTRO 3WN "Dec 2006" "WordNet 3.0" "WordNet\(tm Library Functions" ++.TH WNINTRO 3 "Dec 2006" "WordNet 3.0" "WordNet\(tm Library Functions" + .SH NAME + wnintro \- introduction to WordNet library functions + .SH DESCRIPTION +@@ -15,16 +15,16 @@ center box ; + l | l | l. + \fBCategory\fP \fBManual Page\fP \fBObject File\fP + _ +-Database Search wnsearch (3WN) search.o +-Morphology morph (3WN) morph.o +-Misc. Utility wnutil (3WN) wnutil.o +-Binary Search binsrch (3WN) binsrch.o ++Database Search wnsearch (3) search.o ++Morphology morph (3) morph.o ++Misc. Utility wnutil (3) wnutil.o ++Binary Search binsrch (3) binsrch.o + .TE + + The WordNet library is used by all of the searching interfaces + provided with the various WordNet packages. Additional programs in + the system, such as +-.BR grind (1WN), ++.BR grind (1), + also use functions in this library. + + The WordNet library is provided in both source and binary forms (on +@@ -212,11 +212,11 @@ use any WordNet library functions. + .SH NOTES + All library functions that access the database files expect the files + to be open. The function +-.BR wninit (3WN) ++.BR wninit (3) + must be called before other database access functions such as +-.BR findtheinfo (3WN) ++.BR findtheinfo (3) + or +-.BR read_synset (3WN). ++.BR read_synset (3). + + Inclusion of the header file \fBwn.h\fP is necessary. + +@@ -265,13 +265,13 @@ WordNet library (Windows) + .B include + header files for use with WordNet library + .SH SEE ALSO +-.BR wnintro (1WN), +-.BR binsrch (3WN), +-.BR morph (3WN), +-.BR wnsearch (3WN), +-.BR wnutil (3WN), +-.BR wnintro (5WN), +-.BR wnintro (7WN). ++.BR wnintro (1), ++.BR binsrch (3), ++.BR morph (3), ++.BR wnsearch (3), ++.BR wnutil (3), ++.BR wnintro (5), ++.BR wnintro (7). + + Fellbaum, C. (1998), ed. + \fI"WordNet: An Electronic Lexical Database"\fP. +diff -upNr WordNet-3.0.orig/doc/man/wnintro.5 WordNet-3.0/doc/man/wnintro.5 +--- WordNet-3.0.orig/doc/man/wnintro.5 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wnintro.5 2009-01-18 03:31:02.000000000 +0100 +@@ -1,7 +1,7 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH WNINTRO 5WN "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" ++.TH WNINTRO 5 "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" + .SH NAME + wnintro \- introduction to descriptions of WordNet file formats + .SH SYNOPSIS +@@ -36,17 +36,17 @@ field names are consistently defined. F + files contain one or more \fIsynset_offset\fP fields. In each case, + the definition of \fIsynset_offset\fP is identical. + .SH SEE ALSO +-.BR wnintro (1WN), +-.BR wnintro (3WN), +-.BR cntlist (5WN), +-.BR lexnames (5WN), +-.BR prologdb (5WN), +-.BR senseidx (5WN), +-.BR sensemap (5WN), +-.BR wndb (5WN), +-.BR wninput (5WN), +-.BR wnintro (7WN), +-.BR wngloss (7WN). ++.BR wnintro (1), ++.BR wnintro (3), ++.BR cntlist (5), ++.BR lexnames (5), ++.BR prologdb (5), ++.BR senseidx (5), ++.BR sensemap (5), ++.BR wndb (5), ++.BR wninput (5), ++.BR wnintro (7), ++.BR wngloss (7). + .LP + Fellbaum, C. (1998), ed. + \fI"WordNet: An Electronic Lexical Database"\fP. +diff -upNr WordNet-3.0.orig/doc/man/wnintro.7 WordNet-3.0/doc/man/wnintro.7 +--- WordNet-3.0.orig/doc/man/wnintro.7 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wnintro.7 2009-01-18 03:31:02.000000000 +0100 +@@ -1,7 +1,7 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH WNINTRO 7WN "Dec 2006" "WordNet 3.0" "Miscellaneous WordNet\(tm Topics" ++.TH WNINTRO 7 "Dec 2006" "WordNet 3.0" "Miscellaneous WordNet\(tm Topics" + .SH NAME + wnintro \- introduction to miscellaneous WordNet information + .SH SYNOPSIS +@@ -24,16 +24,16 @@ This section of the \fIWordNet Reference + that describe various topics related to WordNet and the semantic + concordances, and a glossary of terms. + .SH SEE ALSO +-.BR wnintro (1WN), +-.BR wnintro (3WN), +-.BR wnintro (5WN), +-.BR morphy (7WN), +-.BR uniqbeg (7WN), +-.BR wngroups (7WN), +-.BR wnlicens (7WN), +-.BR wnpkgs (7WN), +-.BR wnstats (7WN), +-.BR wngloss (7WN). ++.BR wnintro (1), ++.BR wnintro (3), ++.BR wnintro (5), ++.BR morphy (7), ++.BR uniqbeg (7), ++.BR wngroups (7), ++.BR wnlicens (7), ++.BR wnpkgs (7), ++.BR wnstats (7), ++.BR wngloss (7). + .LP + Fellbaum, C. (1998), ed. + \fI"WordNet: An Electronic Lexical Database"\fP. +diff -upNr WordNet-3.0.orig/doc/man/wnlicens.7 WordNet-3.0/doc/man/wnlicens.7 +--- WordNet-3.0.orig/doc/man/wnlicens.7 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wnlicens.7 2009-01-18 03:31:02.000000000 +0100 +@@ -1,6 +1,6 @@ + '\" t + .\" $Id$ +-.TH WNLICENS 7WN "Dec 2006" "WordNet 3.0" "WordNet\(tm" ++.TH WNLICENS 7 "Dec 2006" "WordNet 3.0" "WordNet\(tm" + .SH NAME + wnlicens \- text of WordNet license + .SH DESCRIPTION +diff -upNr WordNet-3.0.orig/doc/man/wnpkgs.7 WordNet-3.0/doc/man/wnpkgs.7 +--- WordNet-3.0.orig/doc/man/wnpkgs.7 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wnpkgs.7 2009-01-18 03:31:02.000000000 +0100 +@@ -1,7 +1,7 @@ + '\" t + .\" $Id$ + .tr ~ +-.TH WNPKGS 7WN "Dec 2006" "WordNet 3.0" "WordNet\(tm" ++.TH WNPKGS 7 "Dec 2006" "WordNet 3.0" "WordNet\(tm" + .SH NAME + wnpkgs \- description of various WordNet system packages + .SH DESCRIPTION +@@ -65,13 +65,13 @@ files. As with the Prolog database, thi + in compressed tar format, but the files are also in ASCII. + .SH NOTES + The lexicographer files and +-.BR grind (1WN) ++.BR grind (1) + program are not generally distributed. + + All of the packages described above may not be available at the time + of release of the 3.0 database package. + .SH SEE ALSO +-.BR wnintro (1WN), +-.BR wnintro (3WN), +-.BR wnintro (5WN), +-.BR wnintro (7WN). ++.BR wnintro (1), ++.BR wnintro (3), ++.BR wnintro (5), ++.BR wnintro (7). +diff -upNr WordNet-3.0.orig/doc/man/wnsearch.3 WordNet-3.0/doc/man/wnsearch.3 +--- WordNet-3.0.orig/doc/man/wnsearch.3 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wnsearch.3 2009-01-18 03:31:02.000000000 +0100 +@@ -1,8 +1,8 @@ + '\" t + .\" $Id$ +-.TH WNSEARCH 3WN "Dec 2006" "WordNet 3.0" "WordNet\(tm Library Functions" ++.TH WNSEARCH 3 "Dec 2006" "WordNet 3.0" "WordNet\(tm Library Functions" + .SH NAME +-findtheinfo, findtheinfo_ds, is_defined, in_wn, index_lookup, parse_index, getindex, read_synset, parse_synset, free_syns, free_synset, free_index, traceptrs_ds, do_trace ++findtheinfo, findtheinfo_ds, is_defined, in_wn, index_lookup, parse_index, getindex, read_synset, parse_synset, free_syns, free_synset, free_index, traceptrs_ds, do_trace \- functions for searching the WordNet database + .SH SYNOPSIS + .LP + \fB#include "wn.h" +@@ -224,7 +224,7 @@ through the \fInextform\fP pointer of th + There is no extensive description of what each search type is or the + results returned. Using the WordNet interface, examining the source + code, and reading +-.BR wndb (5WN) ++.BR wndb (5) + are the best ways to see what types of searches are available and the + data returned for each. + +@@ -277,9 +277,9 @@ OVERVIEW 31 \fIn/a\fP Show all synsets f + CLASSIF_CATEGORY 32 ;c Show domain topic + CLASSIF_USAGE 33 ;u Show domain usage + CLASSIF_REGIONAL 34 ;r Show domain region +-CLASS_CATEGORY 35 -c Show domain terms for topic +-CLASS_USAGE 36 -u Show domain terms for usage +-CLASS_REGIONAL 37 -r Show domain terms for region ++CLASS_CATEGORY 35 \-c Show domain terms for topic ++CLASS_USAGE 36 \-u Show domain terms for usage ++CLASS_REGIONAL 37 \-r Show domain terms for region + INSTANCE 38 @i Instance of + INSTANCES 39 \(api Show instances + .TE +@@ -301,7 +301,7 @@ OVERVIEW + .SH NOTES + Applications that use WordNet and/or the morphological functions + must call \fBwninit(\|)\fP at the start of the program. See +-.BR wnutil (3WN) ++.BR wnutil (3) + for more information. + + In all function calls, \fIsearchstr\fP may be either a word or a +@@ -317,14 +317,14 @@ The \fIsearchds\fP field is set by \fBfi + The \fIpos\fP passed to \fBtraceptrs_ds(\|)\fP is not used. + + .SH SEE ALSO +-.BR wn (1WN), +-.BR wnb (1WN), +-.BR wnintro (3WN), +-.BR binsrch (3WN), ++.BR wn (1), ++.BR wnb (1), ++.BR wnintro (3), ++.BR binsrch (3), + .BR malloc (3), +-.BR morph (3WN), +-.BR wnutil (3WN), +-.BR wnintro (5WN). ++.BR morph (3), ++.BR wnutil (3), ++.BR wnintro (5). + .SH WARNINGS + \fBparse_synset(\|)\fP must find an exact match between the + \fIsearchstr\fP passed and a word in the synset to set +diff -upNr WordNet-3.0.orig/doc/man/wnstats.7 WordNet-3.0/doc/man/wnstats.7 +--- WordNet-3.0.orig/doc/man/wnstats.7 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wnstats.7 2009-01-18 03:31:02.000000000 +0100 +@@ -1,6 +1,6 @@ + '\" t + .\" $Id$ +-.TH WNSTATS 7WN "Dec 2006" "WordNet 3.0" "WordNet\(tm" ++.TH WNSTATS 7 "Dec 2006" "WordNet 3.0" "WordNet\(tm" + .SH NAME + wnstats \- WordNet 3.0 database statistics + .SH DESCRIPTION +diff -upNr WordNet-3.0.orig/doc/man/wnutil.3 WordNet-3.0/doc/man/wnutil.3 +--- WordNet-3.0.orig/doc/man/wnutil.3 2009-01-18 03:29:55.000000000 +0100 ++++ WordNet-3.0/doc/man/wnutil.3 2009-01-18 03:31:02.000000000 +0100 +@@ -1,11 +1,11 @@ + '\" t + .\" $Id$ +-.TH WNUTIL 3WN "Dec 2006" "WordNet 3.0" "WordNet\(tm Library Functions" ++.TH WNUTIL 3 "Dec 2006" "WordNet 3.0" "WordNet\(tm Library Functions" + .SH NAME + wninit, re_wninit, cntwords, strtolower, ToLowerCase, strsubst, + getptrtype, getpos, getsstype, StrToPos, GetSynsetForSense, + GetDataOffset, GetPolyCount, WNSnsToStr, +-GetValidIndexPointer, GetWNSense, GetSenseIndex, default_display_message ++GetValidIndexPointer, GetWNSense, GetSenseIndex, default_display_message \- utility functions used by the interface code + .SH SYNOPSIS + .LP + \fB#include "wn.h"\fP +@@ -28,7 +28,7 @@ GetValidIndexPointer, GetWNSense, GetSen + .LP + \fBint getsstype(char *ss_type);\fP + .LP +-\fBint StrToPos(char \**pos);\fP ++\fBint StrToPos(char **pos);\fP + .LP + \fBSynsetPtr GetSynsetForSense(char *sense_key);\fP + .LP +@@ -95,7 +95,7 @@ returns resulting string. + .B getptrtype(\|) + returns the integer \fIptr_type\fP corresponding to the pointer + character passed in \fIptr_symbol\fP. See +-.BR wnsearch (3WN) ++.BR wnsearch (3) + for a table of pointer symbols and types. + + .B getpos(\|) +@@ -136,7 +136,7 @@ returns sense key encoding for \fIsense_ + + .B GetValidIndexPointer(\|) + returns the Index structure for \fIword\fP in \fIpos\fP. Calls +-.BR morphstr (3WN) ++.BR morphstr (3) + to find a valid base form if \fIword\fP is inflected. + + .B GetWNSense(\|) +@@ -165,11 +165,11 @@ description of what each search type is + Using the WordNet interface is the best way to see what types of + searches are available, and the data returned for each. + .SH SEE ALSO +-.BR wnintro (3WN), +-.BR wnsearch (3WN), +-.BR morph (3WN), +-.BR wnintro (5WN), +-.BR wnintro (7WN). ++.BR wnintro (3), ++.BR wnsearch (3), ++.BR morph (3), ++.BR wnintro (5), ++.BR wnintro (7). + + .SH WARNINGS + Error checking on passed arguments is not rigorous. Passing diff --git a/wordnet-3.0-fix_resourcedir_path.patch b/wordnet-3.0-fix_resourcedir_path.patch new file mode 100644 index 0000000..b31c42c --- /dev/null +++ b/wordnet-3.0-fix_resourcedir_path.patch @@ -0,0 +1,12 @@ +diff -urNad wordnet-3.0/src/wnb.orig wordnet-3.0/src/wnb +--- wordnet-3.0/src/wnb.orig 2005-06-07 21:19:22.000000000 +0200 ++++ wordnet-3.0/src/wnb 2006-01-08 13:54:23.537621328 +0100 +@@ -103,7 +103,7 @@ + + if {$tcl_platform(platform) == "unix"} { + if {[lsearch -exact [array names env] WNHOME] == -1} { +- set resourcedir "/usr/local/WordNet-3.0/lib/wnres" ++ set resourcedir "/usr/share/wordnet-3.0/lib/wnres" + } else { + set resourcedir "$env(WNHOME)/lib/wnres" + } diff --git a/wordnet-3.0-libtool.patch b/wordnet-3.0-libtool.patch new file mode 100644 index 0000000..7d5610a --- /dev/null +++ b/wordnet-3.0-libtool.patch @@ -0,0 +1,26 @@ +diff -up WordNet-3.0/configure.ac.orig WordNet-3.0/configure.ac +--- WordNet-3.0/configure.ac.orig 2009-05-27 11:57:53.000000000 +0200 ++++ WordNet-3.0/configure.ac 2009-05-27 11:58:30.000000000 +0200 +@@ -8,7 +8,8 @@ AC_CONFIG_HEADER([config.h]) + + # Checks for programs. + AC_PROG_CC +-AC_PROG_RANLIB ++AM_PROG_CC_C_O ++AC_PROG_LIBTOOL + AC_PROG_INSTALL + + # Checks for header files. +diff -up WordNet-3.0/lib/Makefile.am.orig WordNet-3.0/lib/Makefile.am +--- WordNet-3.0/lib/Makefile.am.orig 2009-05-27 11:58:03.000000000 +0200 ++++ WordNet-3.0/lib/Makefile.am 2009-05-27 11:59:35.000000000 +0200 +@@ -1,5 +1,6 @@ +-lib_LIBRARIES = libWN.a +-libWN_a_SOURCES = binsrch.c morph.c search.c wnglobal.c wnhelp.c wnrtl.c wnutil.c +-libWN_a_CPPFLAGS = $(INCLUDES) ++lib_LTLIBRARIES = libWN.la ++libWN_la_SOURCES = binsrch.c morph.c search.c wnglobal.c wnhelp.c wnrtl.c wnutil.c ++libWN_la_CPPFLAGS = $(INCLUDES) ++libWN_la_LDFLAGS = -version-number 3:0:0 + INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include + SUBDIRS = wnres diff --git a/wordnet-3.0-src_stubs_c.patch b/wordnet-3.0-src_stubs_c.patch new file mode 100644 index 0000000..29c42de --- /dev/null +++ b/wordnet-3.0-src_stubs_c.patch @@ -0,0 +1,12 @@ +diff -urNad wordnet-3.0/src/stubs.c.orig wordnet-3.0/src/stubs.c +--- wordnet-3.0/src/stubs.c.orig 2007-01-04 18:47:55.000000000 +0100 ++++ wordnet-3.0/src/stubs.c 2007-01-20 19:01:19.000000000 +0100 +@@ -14,7 +14,7 @@ + #include + #include + +-static char *Id = "$Id: stubs.c,v 1.7 2005/04/29 19:01:57 wn Exp $"; ++static const char Id[] = "$Id: stubs.c,v 1.7 2005/04/29 19:01:57 wn Exp $"; + + static char resultbuf[SEARCHBUF]; + diff --git a/wordnet-3.0-use_system_tk_headers.patch b/wordnet-3.0-use_system_tk_headers.patch new file mode 100644 index 0000000..29f5acd --- /dev/null +++ b/wordnet-3.0-use_system_tk_headers.patch @@ -0,0 +1,49 @@ +diff -up WordNet-3.0/include/Makefile.am.BAD WordNet-3.0/include/Makefile.am +--- WordNet-3.0/include/Makefile.am.BAD 2009-02-18 13:59:09.000000000 -0500 ++++ WordNet-3.0/include/Makefile.am 2009-02-18 13:59:12.000000000 -0500 +@@ -1,2 +1 @@ + include_HEADERS = wn.h +-SUBDIRS = tk +diff -up WordNet-3.0/include/Makefile.in.BAD WordNet-3.0/include/Makefile.in +--- WordNet-3.0/include/Makefile.in.BAD 2009-02-18 13:59:28.000000000 -0500 ++++ WordNet-3.0/include/Makefile.in 2009-02-18 13:59:32.000000000 -0500 +@@ -147,7 +147,6 @@ sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ + include_HEADERS = wn.h +-SUBDIRS = tk + all: all-recursive + + .SUFFIXES: +diff -up WordNet-3.0/configure.ac.BAD WordNet-3.0/configure.ac +--- WordNet-3.0/configure.ac.BAD 2009-02-18 14:02:54.000000000 -0500 ++++ WordNet-3.0/configure.ac 2009-02-18 14:03:15.000000000 -0500 +@@ -47,7 +47,7 @@ AC_DEFINE_UNQUOTED(DEFAULTPATH, ["$ac_pr + # This doesn't do anything + AC_CONFIG_COMMANDS([default]) + +-AC_CONFIG_FILES(Makefile dict/Makefile doc/Makefile doc/html/Makefile doc/man/Makefile doc/pdf/Makefile doc/ps/Makefile include/Makefile include/tk/Makefile ++AC_CONFIG_FILES(Makefile dict/Makefile doc/Makefile doc/html/Makefile doc/man/Makefile doc/pdf/Makefile doc/ps/Makefile include/Makefile + src/Makefile lib/Makefile lib/wnres/Makefile) + + AC_OUTPUT +diff -up WordNet-3.0/configure.BAD WordNet-3.0/configure +--- WordNet-3.0/configure.BAD 2009-02-18 14:02:35.000000000 -0500 ++++ WordNet-3.0/configure 2009-02-18 14:02:45.000000000 -0500 +@@ -4296,7 +4296,7 @@ _ACEOF + ac_config_commands="$ac_config_commands default" + + +- ac_config_files="$ac_config_files Makefile dict/Makefile doc/Makefile doc/html/Makefile doc/man/Makefile doc/pdf/Makefile doc/ps/Makefile include/Makefile include/tk/Makefile src/Makefile lib/Makefile lib/wnres/Makefile" ++ ac_config_files="$ac_config_files Makefile dict/Makefile doc/Makefile doc/html/Makefile doc/man/Makefile doc/pdf/Makefile doc/ps/Makefile include/Makefile src/Makefile lib/Makefile lib/wnres/Makefile" + + + cat >confcache <<\_ACEOF +@@ -4856,7 +4856,6 @@ do + "doc/pdf/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/pdf/Makefile" ;; + "doc/ps/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/ps/Makefile" ;; + "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; +- "include/tk/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/tk/Makefile" ;; + "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "lib/wnres/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/wnres/Makefile" ;; diff --git a/wordnet-3.0-wishwn_manpage.patch b/wordnet-3.0-wishwn_manpage.patch new file mode 100644 index 0000000..3b6aad3 --- /dev/null +++ b/wordnet-3.0-wishwn_manpage.patch @@ -0,0 +1,48 @@ +diff -up WordNet-3.0/doc/man/wishwn.1.orig WordNet-3.0/doc/man/wishwn.1 +--- WordNet-3.0/doc/man/wishwn.1.orig 2009-01-14 00:47:21.000000000 +0100 ++++ WordNet-3.0/doc/man/wishwn.1 2009-01-14 00:47:43.000000000 +0100 +@@ -0,0 +1,44 @@ ++.\" Copyright (c) 2001 Andreas Tille ++.\" ++.\" This manual page is free software; you can redistribute it and/or modify ++.\" it under the terms of the GNU General Public License as published by ++.\" the Free Software Foundation; either version 2 of the License, or ++.\" (at your option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, ++.\" but WITHOUT ANY WARRANTY; without even the implied warranty of ++.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++.\" GNU General Public License for more details. ++.\" ++.\" You should have received a copy of the GNU General Public License ++.\" along with this program; if not, write to the Free Software ++.\" Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++.\" ++.\" This manual page is written especially for Debian Linux. ++.\" ++.TH WISHWN 1 "May 2001" "Debian Project" "Debian GNU/Linux" ++.SH NAME ++wishwn \- default version of the Tcl_AppInit procedure for wnb(1) ++ ++.SH SYNOPSIS ++it is intended to be run from wnb (see wnb.1) ++ ++.SH DESCRIPTION ++ ++Provides a default version of the Tcl_AppInit procedure for ++use in wish and similar Tk-based applications. ++ ++Acts as a gateway between Tcl and the Wordnet C library. It ++contains stubs for all the commands added to the default Tcl and Tk set ++for this Wordnet application, as well as the routine that initializes them. ++ ++.SH SEE ALSO ++.BR wn (1), ++.BR wnb (1). ++ ++.SH AUTHOR ++.B wishwn ++was written by the authors of wordnet 1.6. ++.PP ++This manual page was created by Andreas Tille ++for the Debian GNU/Linux system. Feel free to improve this! diff --git a/wordnet.spec b/wordnet.spec new file mode 100644 index 0000000..57acde0 --- /dev/null +++ b/wordnet.spec @@ -0,0 +1,277 @@ +Name: wordnet +Version: 3.0 +Release: 38%{?dist} +Summary: A lexical database for the English language + +License: MIT and GPLv2+ +URL: http://wordnet.princeton.edu/ +Source0: http://wordnetcode.princeton.edu/%{version}/WordNet-%{version}.tar.bz2 +# Updated database +Source1: http://wordnetcode.princeton.edu/wn3.1.dict.tar.gz +Patch0: wordnet-3.0-CVE-2008-2149.patch +Patch1: wordnet-3.0-CVE-2008-3908.patch +Patch2: wordnet-3.0-fix_man.patch +Patch3: wordnet-3.0-fix_resourcedir_path.patch +Patch4: wordnet-3.0-src_stubs_c.patch +# wordnet-3.0-wishwn_manpage.patch is GPLv2+ +Patch5: wordnet-3.0-wishwn_manpage.patch +Patch6: wordnet-3.0-use_system_tk_headers.patch +Patch7: wordnet-3.0-libtool.patch +# Bug #585206 +Patch8: wordnet-3.0-error_message.patch +# Bug #1037386 +Patch9: wordnet-3.0-Pass-compilation-with-Werror-format-security.patch +BuildRequires: automake >= 1.8 +BuildRequires: coreutils +BuildRequires: gcc +BuildRequires: gzip +BuildRequires: libtool +BuildRequires: make +BuildRequires: tar +BuildRequires: tcl-devel +BuildRequires: tk-devel + +%description +WordNet is a large lexical database of English, developed under the direction +of George A. Miller. Nouns, verbs, adjectives and adverbs are grouped into sets +of cognitive synonyms (synsets), each expressing a distinct concept. Synsets +are interlinked by means of conceptual-semantic and lexical relations. The +resulting network of meaningfully related words and concepts can be navigated +with the browser. WordNet is also freely and publicly available for download. +WordNet's structure makes it a useful tool for computational linguistics and +natural language processing. + + +%package browser +Summary: Tk browser for WordNet +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: font(:lang=en) + +%description browser +This package contains graphical browser for WordNet database. + + +%package devel +Summary: The development libraries and header files for WordNet +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains the libraries and header files required to create +applications based on WordNet. + + +%package doc +Summary: Manual pages for WordNet in alternative formats +BuildArch: noarch + +%description doc +This package contains manual pages for WordNet package in HTML, PDF, +and PostScript format. + + +%prep +%setup -q -n WordNet-%{version} +%patch0 -p1 -b .cve-2008-2149 +%patch1 -p1 -b .cve-2008-3908 +%patch2 -p1 -b .fix_man +%patch3 -p1 -b .fix_resourcedir_path +%patch4 -p1 -b .src_stubs_c +%patch5 -p1 -b .wishwn_manpage +sed -e '/man_MANS/ s/$/ wishwn.1/' -i doc/man/Makefile.am +%patch6 -p1 -b .use_system_tk_headers +%patch7 -p1 -b .libtool +%patch8 -p1 -b .error_message +%patch9 -p1 -b .format +# delete the include/tk dir, since we do not use the included tk headers +rm -rf include/tk +# Update a database +tar -xozf %{SOURCE1} +# Remove database byproducts brought by the database update +rm -rf dict/dbfiles + + +%build +libtoolize && aclocal +autoupdate +autoreconf -i +%if 0%{?fedora} >= 21 || 0%{?rhel} > 7 +export CFLAGS="%{?optflags} -DUSE_INTERP_RESULT" +export CXXFLAGS="%{?optflags} -DUSE_INTERP_RESULT" +%endif #0%{?fedora} >= 21 || 0%{?rhel} > 7 +%configure --enable-static=no --prefix=%{_datadir}/wordnet-%{version}/ +make %{?_smp_mflags} + + +%install +make install DESTDIR=$RPM_BUILD_ROOT +# delete the libWN.la files (reasoning in the packaging guidelines) +rm -f $RPM_BUILD_ROOT%{_libdir}/libWN.la +# Remove duplicate copies of docs installed by make install +rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/doc +# Remove useless Makefiles installed by %%doc +rm -rf doc/{html,ps,pdf}/Makefile* + + +%ldconfig_scriptlets + +%files +%doc AUTHORS COPYING ChangeLog README +%{_bindir}/wn +%{_mandir}/man1/grind.1.gz +%{_mandir}/man1/wn.1.gz +%{_mandir}/man1/wnintro.1.gz +%{_mandir}/man5/*.5.gz +%{_mandir}/man7/*.7.gz +%{_datadir}/%{name}-%{version}/ +%exclude %{_datadir}/%{name}-%{version}/lib/wnres/ +%{_libdir}/libWN.so.* + +%files browser +%{_bindir}/wishwn +%{_bindir}/wnb +%{_mandir}/man1/wishwn.1.gz +%{_mandir}/man1/wnb.1.gz +%{_datadir}/%{name}-%{version}/lib/wnres/ + +%files devel +%{_mandir}/man3/*.3.gz +%{_includedir}/wn.h +%{_libdir}/libWN.so + +%files doc +%doc COPYING doc/{html,ps,pdf} + + +%changelog +* Wed Jul 29 2020 Fedora Release Engineering - 3.0-38 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jan 31 2020 Fedora Release Engineering - 3.0-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Jul 27 2019 Fedora Release Engineering - 3.0-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 03 2019 Fedora Release Engineering - 3.0-35 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 3.0-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Mar 23 2018 Petr Pisar - 3.0-33 +- Modernize spec file +- Update database to version 3.1 + +* Fri Feb 09 2018 Fedora Release Engineering - 3.0-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jan 24 2018 Merlin Mathesius - 3.0-31 +- Cleanup spec file conditionals + +* Thu Aug 03 2017 Fedora Release Engineering - 3.0-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 3.0-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 3.0-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Feb 05 2016 Fedora Release Engineering - 3.0-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 3.0-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Aug 18 2014 Fedora Release Engineering - 3.0-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 3.0-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat May 31 2014 Björn Esser - 3.0-23 +- fix build with tcl-8.6 (#1102111) +- append `-DUSE_INTERP_RESULT` to C[XX]FLAGS on Fedora >= 21 + +* Wed May 21 2014 Jaroslav Škarvada - 3.0-22 +- Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86 + +* Wed Dec 04 2013 Petr Pisar - 3.0-21 +- Pass compilation with -Werror=format-security (bug #1037386) + +* Sun Aug 04 2013 Fedora Release Engineering - 3.0-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Feb 15 2013 Fedora Release Engineering - 3.0-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Sep 06 2012 Petr Pisar - 3.0-18 +- wnb requires a font to start +- Move Tk browser to sub-package wordnet-browser +- Move alternative manual pages to wordnet-doc package +- Do not package INSTALL instructions and correct URL +- Modernize spec file + +* Sun Jul 22 2012 Fedora Release Engineering - 3.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 3.0-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Feb 07 2011 Fedora Release Engineering - 3.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Nov 29 2010 Petr Pisar - 3.0-14 +- Remove Makefiles from documentation clashing in multiarch installation + (#658118). + +* Fri Apr 30 2010 Petr Pisar - 3.0-13 +- Add GPLv2+ license tag because wishwn(1) manual page is GPLv2+-licensed. + +* Wed Apr 28 2010 Petr Pisar - 3.0-12 +- Devel subpackages requires tcl-devel and tk-devel. +- Install wishwn(1) manual page + +* Mon Apr 26 2010 Petr Pisar - 3.0-11 +- Fix error message printing (#585206) +- Fix Source0 URL and Summary typo +- Remove libX11-devel and libXft-devel BuildRequires as they are inherited + from tk-devel. Keep tcl-devel as tcl.h is included directly. + +* Mon Jul 27 2009 Fedora Release Engineering - 3.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jun 10 2009 Caolan McNamara - 3.0-9 +- Fixed fedora BZ 504957 - references to non-existing dirs in wnb + +* Wed May 27 2009 Steven Fernandez - 3.0-8 +- Fixed issues with the doc files duplication and ownership + +* Wed May 27 2009 Steven Fernandez - 3.0-7 +- Modified the %%files sections for both packages to only include the link in + the devel package and the .so in the main package. +- Added %%pre and %%post sections + +* Wed May 27 2009 Steven Fernandez - 3.0-6 +- Added commands to build only shared libs and remove libtool's .la files + before packaging + +* Tue May 19 2009 Steven Fernandez - 3.0-5 +- Added the libtool patch to build libWN.so dynamic lib + +* Wed Feb 18 2009 Steven Fernandez - 3.0-4 +- Added Tom 'spot' Callaway's patch to not include the tk.h and tkDecls.h from + the upstream source, but instead rely on system tk headers + +* Sun Jan 18 2009 Steven Fernandez - 3.0-3 +- renamed rpm from WordNet to wordnet to be more consistent with other distos +- split the devel package +- borrowed more patches from the debian package + +* Tue Jan 13 2009 Steven Fernandez - 3.0-2 +- patch to fix CVE-2008-3908 +- Added the wishwn man page from the debian wordnet package + +* Sat Nov 29 2008 Steven Fernandez - 3.0-1 +- First build for Fedora 10 +