diff options
author | edwin <edwin@FreeBSD.org> | 2002-11-24 09:38:44 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2002-11-24 09:38:44 +0800 |
commit | c000042369a5fff02fa0cb488030cfd29777ad9f (patch) | |
tree | d13a2d64a222c315c41dd5b6ab39ee7b4c246ac9 /chinese | |
parent | b1f204df04028358cbfb9c978d4c6ae255221256 (diff) | |
download | freebsd-ports-gnome-c000042369a5fff02fa0cb488030cfd29777ad9f.tar.gz freebsd-ports-gnome-c000042369a5fff02fa0cb488030cfd29777ad9f.tar.zst freebsd-ports-gnome-c000042369a5fff02fa0cb488030cfd29777ad9f.zip |
Maintainer update for chinese/dictd: fix build problem
PR: ports/45651
Submitted by: Kuang-che Wu <kcwu@kcwu.dyndns.org>
Diffstat (limited to 'chinese')
-rw-r--r-- | chinese/dictd/Makefile | 11 | ||||
-rw-r--r-- | chinese/dictd/files/patch-Makefile.in | 10 | ||||
-rw-r--r-- | chinese/dictd/files/patch-dictfmt.c | 15 | ||||
-rw-r--r-- | chinese/dictd/files/patch-index.c | 90 |
4 files changed, 69 insertions, 57 deletions
diff --git a/chinese/dictd/Makefile b/chinese/dictd/Makefile index 47100328d7b7..6abec4ab7c0b 100644 --- a/chinese/dictd/Makefile +++ b/chinese/dictd/Makefile @@ -11,8 +11,17 @@ MAINTAINER= kcwu@ck.tp.edu.tw MASTERDIR= ${.CURDIR}/../../net/dictd EXTRA_PATCHES= ${.CURDIR}/files/patch-index.c \ - ${.CURDIR}/files/patch-libmaa::arg.c + ${.CURDIR}/files/patch-libmaa::arg.c \ + ${.CURDIR}/files/patch-dictfmt.c \ + ${.CURDIR}/files/patch-Makefile.in + +pre-install: + ${ECHO} "bin/dictfmt" > ${PLIST} + ${CAT} ${MASTERDIR}/pkg-plist >> ${PLIST} .include "${MASTERDIR}/Makefile" PKGNAMEPREFIX:= ${PKGNAMEPREFIX}tw- +ALL_TARGET+= dictfmt +INSTALL_TARGET+=install.dictfmt +PLIST= ${WRKDIR}/PLIST diff --git a/chinese/dictd/files/patch-Makefile.in b/chinese/dictd/files/patch-Makefile.in new file mode 100644 index 000000000000..4d4875806b50 --- /dev/null +++ b/chinese/dictd/files/patch-Makefile.in @@ -0,0 +1,10 @@ +--- Makefile.in.orig Sun Nov 24 02:01:29 2002 ++++ Makefile.in Sun Nov 24 02:01:44 2002 +@@ -154,7 +154,6 @@ + if test ! -d $(bindir); then $(INSTALL) -d 755 $(bindir); fi + if test ! -d $(man1_prefix); then $(INSTALL) -d 755 $(man1_prefix); fi + $(INSTALL_PROGRAM) dictfmt $(bindir) +- $(INSTALL_PROGRAM) dictfmt_index2suffix $(bindir) + $(INSTALL_DATA) dictfmt.1 $(man1_prefix)/dictfmt.1 + + install.dictd: dictd diff --git a/chinese/dictd/files/patch-dictfmt.c b/chinese/dictd/files/patch-dictfmt.c new file mode 100644 index 000000000000..6ed99b84a2b2 --- /dev/null +++ b/chinese/dictd/files/patch-dictfmt.c @@ -0,0 +1,15 @@ +--- dictfmt.c.orig Sun Nov 24 01:25:09 2002 ++++ dictfmt.c Sun Nov 24 01:25:23 2002 +@@ -208,6 +208,12 @@ + + while (src && src [0]){ + ch = *(const unsigned char *)src; ++ if((ch & 0x80) && *(src+1)) { ++ *dest++ = ch; ++ *dest++ = *(src+1); ++ src+=2; ++ continue; ++ } + + if (isspace (ch)){ + *dest++ = ' '; diff --git a/chinese/dictd/files/patch-index.c b/chinese/dictd/files/patch-index.c index a257941d1f46..23c0d93395ea 100644 --- a/chinese/dictd/files/patch-index.c +++ b/chinese/dictd/files/patch-index.c @@ -1,8 +1,30 @@ ---- index.c.orig Mon Apr 29 22:43:42 2002 -+++ index.c Fri Jul 19 05:23:01 2002 -@@ -120,6 +120,15 @@ - - /* FIXME. Optimize this inner loop. */ +--- index.c.orig Sun Nov 24 01:24:10 2002 ++++ index.c Sun Nov 24 01:24:21 2002 +@@ -91,6 +91,12 @@ + + for (; *src; ++src) { + c = * (const unsigned char *) src; ++ if((c & 0x80) && *(src+1)) { ++ *dest++ = c; ++ *dest++ = *(src+1); ++ src++; ++ continue; ++ } + + if (isspace( c )) { + *dest++ = ' '; +@@ -150,7 +156,7 @@ + isspacealnumtab_allchars['\t'] = isspacealnumtab_allchars['\n'] = 0; /* special */ + + for (i = 0; i <= UCHAR_MAX; i++){ +- if (islower (i) || (utf8_mode && i >= 0xC0)) ++ if (islower (i) || (utf8_mode && i >= 0xC0) || (i>=0x80)) + chartab[charcount++] = i; + } + +@@ -317,6 +326,15 @@ + + /* FIXME. Optimize this inner loop. */ while (*word && start < end && *start != '\t') { + if ((*start & 0x80) && start+1<end && start[1]!='\t') { + if(start[0]!=word[0]) @@ -13,59 +35,15 @@ + start+=2; + continue; + } - if (!isspacealnum(*start)) { + if (!dbindex -> isspacealnum[* (const unsigned char *) start]) { ++start; continue; -@@ -139,7 +148,11 @@ +@@ -359,6 +377,8 @@ + *start != '\t' && + !dbindex -> isspacealnum[* (const unsigned char *) start]) + { ++ if((*start & 0x80) && start[1]!='\t') ++ break; ++start; } - -- while (*start != '\t' && !isspacealnum(*start)) ++start; -+ while (*start != '\t' && !isspacealnum(*start)) -+ if((*start & 0x80) && start[1]!='\t') -+ break; -+ else -+ ++start; - PRINTF(DBG_SEARCH,(" result = %d\n", - *word ? 1 : ((*start != '\t') ? -1 : 0))); -@@ -315,7 +328,6 @@ - int count = 0; - dictWord *datum; - const char *previous = NULL; -- - while (pt && pt < database->index->end) { - if (!compare( word, pt, database->index->end )) { - if (!previous || altcompare(previous, pt, database->index->end)) { -@@ -643,6 +655,7 @@ - char tmp; - dictWord *datum; - -+ if(*word & 0x80) return count; - #define CHECK \ - if ((pt = dict_index_search(buf, database->index)) \ - && !compare(buf, pt, database->index->end)) { \ -@@ -724,6 +737,11 @@ - if (isspace( *(const unsigned char *)w )) { - *pt++ = ' '; - } else { -+ if((*w & 0x80) && *(w+1)) { -+ *pt++=*w++; -+ *pt++=*w; -+ continue; -+ } - if (!isalnum( *(const unsigned char *)w )) continue; - *pt++ = tolower(*w); - } -@@ -790,6 +808,11 @@ - = binary_search( buf, i->start, i->end ); - } - for (j = '0'; j <= '9'; j++) { -+ buf[0] = j; -+ buf[1] = '\0'; -+ i->optStart[j] = binary_search( buf, i->start, i->end ); -+ } -+ for (j = 0x80; j <= 255; j++) { - buf[0] = j; - buf[1] = '\0'; - i->optStart[j] = binary_search( buf, i->start, i->end ); |