summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-text/hunspell/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-text/hunspell/files')
-rw-r--r--app-text/hunspell/files/hunspell-1.3-renameexes.patch135
-rw-r--r--app-text/hunspell/files/hunspell-1.3.3-multibyte-chars.patch59
2 files changed, 194 insertions, 0 deletions
diff --git a/app-text/hunspell/files/hunspell-1.3-renameexes.patch b/app-text/hunspell/files/hunspell-1.3-renameexes.patch
new file mode 100644
index 000000000000..70c5b748edba
--- /dev/null
+++ b/app-text/hunspell/files/hunspell-1.3-renameexes.patch
@@ -0,0 +1,135 @@
+=== modified file 'src/tools/Makefile.am'
+--- src/tools/Makefile.am 2011-05-24 15:55:29 +0000
++++ src/tools/Makefile.am 2011-05-24 15:58:36 +0000
+@@ -1,4 +1,4 @@
+-bin_PROGRAMS=analyze chmorph hunspell munch unmunch hzip hunzip
++bin_PROGRAMS=hunspell-analyze hunspell-chmorph hunspell hunspell-munch hunspell-unmunch hzip hunzip
+
+ INCLUDES=-I${top_srcdir}/src/hunspell -I${top_srcdir}/src/parsers
+
+@@ -6,8 +6,8 @@
+ hunzip_SOURCES=hunzip.cxx
+ hunzip_LDADD = ../hunspell/libhunspell-1.3.la
+
+-munch_SOURCES=munch.c munch.h
+-unmunch_SOURCES=unmunch.c unmunch.h
++hunspell_munch_SOURCES=munch.c munch.h
++hunspell_unmunch_SOURCES=unmunch.c unmunch.h
+
+ example_SOURCES=example.cxx
+ example_LDADD = ../hunspell/libhunspell-1.3.la
+@@ -16,11 +16,11 @@
+ hunspell_LDADD = @LIBINTL@ @LIBICONV@ ../parsers/libparsers.a \
+ ../hunspell/libhunspell-1.3.la @CURSESLIB@ @READLINELIB@
+
+-analyze_SOURCES=analyze.cxx
+-analyze_LDADD = ../hunspell/libhunspell-1.3.la
++hunspell_analyze_SOURCES=analyze.cxx
++hunspell_analyze_LDADD = ../hunspell/libhunspell-1.3.la
+
+-chmorph_SOURCES=chmorph.cxx
+-chmorph_LDADD = ../parsers/libparsers.a ../hunspell/libhunspell-1.3.la
++hunspell_chmorph_SOURCES=chmorph.cxx
++hunspell_chmorph_LDADD = ../parsers/libparsers.a ../hunspell/libhunspell-1.3.la
+
+ noinst_PROGRAMS=example
+
+
+=== modified file 'src/tools/chmorph.cxx'
+--- src/tools/chmorph.cxx 2011-05-24 15:55:29 +0000
++++ src/tools/chmorph.cxx 2011-05-24 16:00:54 +0000
+@@ -19,11 +19,11 @@
+ for (int i = 1; i < 6; i++)
+ if (!argv[i]) {
+ fprintf(stderr,
+- "chmorph - change affixes by morphological analysis and generation\n"
+- "correct syntax is:\nchmorph affix_file "
++ "hunspell-chmorph - change affixes by morphological analysis and generation\n"
++ "correct syntax is:\nhunspell-chmorph affix_file "
+ "dictionary_file file_to_convert STRING1 STRING2\n"
+ "STRINGS may be arbitrary parts of the morphological descriptions\n"
+- "example: chmorph hu.aff hu.dic hu.txt SG_2 SG_3 "
++ "example: hunspell-chmorph hu.aff hu.dic hu.txt SG_2 SG_3 "
+ " (convert informal Hungarian second person texts to formal third person texts)\n");
+ exit(1);
+ }
+
+=== modified file 'src/tools/example.cxx'
+--- src/tools/example.cxx 2011-05-24 15:55:29 +0000
++++ src/tools/example.cxx 2011-05-24 15:55:37 +0000
+@@ -17,8 +17,8 @@
+ /* first parse the command line options */
+
+ if (argc < 4) {
+- fprintf(stderr,"example (now it works with more dictionary files):\n");
+- fprintf(stderr,"example affix_file dictionary_file(s) file_of_words_to_check\n");
++ fprintf(stderr,"hunspell-example (now it works with more dictionary files):\n");
++ fprintf(stderr,"hunspell-example affix_file dictionary_file(s) file_of_words_to_check\n");
+ exit(1);
+ }
+
+
+=== modified file 'src/tools/munch.c'
+--- src/tools/munch.c 2011-05-24 15:55:29 +0000
++++ src/tools/munch.c 2011-05-24 15:55:37 +0000
+@@ -42,14 +42,14 @@
+ wf = mystrdup(argv[1]);
+ } else {
+ fprintf(stderr,"correct syntax is:\n");
+- fprintf(stderr,"munch word_list_file affix_file\n");
++ fprintf(stderr,"hunspell-munch word_list_file affix_file\n");
+ exit(1);
+ }
+ if (argv[2]) {
+ af = mystrdup(argv[2]);
+ } else {
+ fprintf(stderr,"correct syntax is:\n");
+- fprintf(stderr,"munch word_list_file affix_file\n");
++ fprintf(stderr,"hunspell-munch word_list_file affix_file\n");
+ exit(1);
+ }
+
+
+=== modified file 'src/tools/unmunch.c'
+--- src/tools/unmunch.c 2011-05-24 15:55:29 +0000
++++ src/tools/unmunch.c 2011-05-24 15:55:37 +0000
+@@ -39,14 +39,14 @@
+ wf = mystrdup(argv[1]);
+ } else {
+ fprintf(stderr,"correct syntax is:\n");
+- fprintf(stderr,"unmunch dic_file affix_file\n");
++ fprintf(stderr,"hunspell-unmunch dic_file affix_file\n");
+ exit(1);
+ }
+ if (argv[2]) {
+ af = mystrdup(argv[2]);
+ } else {
+ fprintf(stderr,"correct syntax is:\n");
+- fprintf(stderr,"unmunch dic_file affix_file\n");
++ fprintf(stderr,"hunspell-unmunch dic_file affix_file\n");
+ exit(1);
+ }
+
+
+=== modified file 'tests/test.sh'
+--- tests/test.sh 2011-05-24 15:55:29 +0000
++++ tests/test.sh 2011-05-24 15:55:37 +0000
+@@ -34,7 +34,7 @@
+ shopt -s expand_aliases
+
+ alias hunspell='../libtool --mode=execute -dlopen ../src/hunspell/.libs/libhunspell*.la ../src/tools/hunspell'
+-alias analyze='../libtool --mode=execute -dlopen ../src/hunspell/.libs/libhunspell*.la ../src/tools/analyze'
++alias analyze='../libtool --mode=execute -dlopen ../src/hunspell/.libs/libhunspell*.la ../src/tools/hunspell-analyze'
+
+ if [ "$VALGRIND" != "" ]; then
+ rm -f $TEMPDIR/test.pid*
+@@ -43,7 +43,7 @@
+ fi
+
+ alias hunspell='../libtool --mode=execute -dlopen ../src/hunspell/.libs/libhunspell*.la valgrind --tool=$VALGRIND --leak-check=yes --show-reachable=yes --log-file=$TEMPDIR/test.pid ../src/tools/hunspell'
+- alias analyze='../libtool --mode=execute -dlopen ../src/hunspell/.libs/libhunspell*.la valgrind --tool=$VALGRIND --leak-check=yes --show-reachable=yes --log-file=$TEMPDIR/test.pid ../src/tools/analyze'
++ alias analyze='../libtool --mode=execute -dlopen ../src/hunspell/.libs/libhunspell*.la valgrind --tool=$VALGRIND --leak-check=yes --show-reachable=yes --log-file=$TEMPDIR/test.pid ../src/tools/hunspell-analyze'
+ fi
+
+ # Tests good words
+
diff --git a/app-text/hunspell/files/hunspell-1.3.3-multibyte-chars.patch b/app-text/hunspell/files/hunspell-1.3.3-multibyte-chars.patch
new file mode 100644
index 000000000000..848bc8fe8950
--- /dev/null
+++ b/app-text/hunspell/files/hunspell-1.3.3-multibyte-chars.patch
@@ -0,0 +1,59 @@
+http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7781#31
+https://bugs.gentoo.org/518740
+
+--- src/tools/hunspell.cxx
++++ src/tools/hunspell.cxx
+@@ -710,13 +748,22 @@ if (pos >= 0) {
+ fflush(stdout);
+ } else {
+ char ** wlst = NULL;
+- int ns = pMS[d]->suggest(&wlst, token);
++ int byte_offset = parser->get_tokenpos() + pos;
++ int char_offset = 0;
++ if (strcmp(io_enc, "UTF-8") == 0) {
++ for (int i = 0; i < byte_offset; i++) {
++ if ((buf[i] & 0xc0) != 0x80)
++ char_offset++;
++ }
++ } else {
++ char_offset = byte_offset;
++ }
++ int ns = pMS[d]->suggest(&wlst, chenc(token, io_enc, dic_enc[d]));
+ if (ns == 0) {
+- fprintf(stdout,"# %s %d", token,
+- parser->get_tokenpos() + pos);
++ fprintf(stdout,"# %s %d", token, char_offset);
+ } else {
+ fprintf(stdout,"& %s %d %d: ", token, ns,
+- parser->get_tokenpos() + pos);
++ char_offset);
+ fprintf(stdout,"%s", chenc(wlst[0], dic_enc[d], io_enc));
+ }
+ for (int j = 1; j < ns; j++) {
+@@ -745,13 +792,23 @@ if (pos >= 0) {
+ if (root) free(root);
+ } else {
+ char ** wlst = NULL;
++ int byte_offset = parser->get_tokenpos() + pos;
++ int char_offset = 0;
++ if (strcmp(io_enc, "UTF-8") == 0) {
++ for (int i = 0; i < byte_offset; i++) {
++ if ((buf[i] & 0xc0) != 0x80)
++ char_offset++;
++ }
++ } else {
++ char_offset = byte_offset;
++ }
+ int ns = pMS[d]->suggest(&wlst, chenc(token, io_enc, dic_enc[d]));
+ if (ns == 0) {
+ fprintf(stdout,"# %s %d", chenc(token, io_enc, ui_enc),
+- parser->get_tokenpos() + pos);
++ char_offset);
+ } else {
+ fprintf(stdout,"& %s %d %d: ", chenc(token, io_enc, ui_enc), ns,
+- parser->get_tokenpos() + pos);
++ char_offset);
+ fprintf(stdout,"%s", chenc(wlst[0], dic_enc[d], ui_enc));
+ }
+ for (int j = 1; j < ns; j++) {
+