summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Janda <felix.janda@posteo.de>2015-04-03 18:37:20 +0200
committerAnthony G. Basile <blueness@gentoo.org>2015-04-03 15:46:07 -0400
commit844d5ea2ea3bb6b2a9e04ae7bd59bc112e545fa5 (patch)
treed8405557ee6bcb033da5b43fefd6264b03b882a4
parent09c1db0d180591fc6b08a0b6d2fa23652814796e (diff)
downloadhardened-dev-844d5ea2ea3bb6b2a9e04ae7bd59bc112e545fa5.tar.gz
hardened-dev-844d5ea2ea3bb6b2a9e04ae7bd59bc112e545fa5.tar.bz2
hardened-dev-844d5ea2ea3bb6b2a9e04ae7bd59bc112e545fa5.tar.xz
hardened-dev-844d5ea2ea3bb6b2a9e04ae7bd59bc112e545fa5.zip
app-text/hunspell: Fix for missing error.h
-rw-r--r--app-text/hunspell/Manifest7
-rw-r--r--app-text/hunspell/files/hunspell-1.3-renameexes.patch135
-rw-r--r--app-text/hunspell/files/hunspell-1.3.2-static-lib.patch9
-rw-r--r--app-text/hunspell/files/hunspell-1.3.3-multibyte-chars.patch59
-rw-r--r--app-text/hunspell/files/hunspell-9999-error_h.patch37
-rw-r--r--app-text/hunspell/hunspell-1.3.3-r99.ebuild89
-rw-r--r--app-text/hunspell/metadata.xml5
7 files changed, 341 insertions, 0 deletions
diff --git a/app-text/hunspell/Manifest b/app-text/hunspell/Manifest
new file mode 100644
index 0000000..311f585
--- /dev/null
+++ b/app-text/hunspell/Manifest
@@ -0,0 +1,7 @@
+AUX hunspell-1.3-renameexes.patch 5337 SHA256 4cbeae9c782a2114d09d7920b1dfe355f37711ecd895d800a6b460bb87184f89 SHA512 26cab6d31a22c33e96a118e2b0905bd26e7d224737fab9f4d02f8ed4729032202de37b0d9e42500b0ba8912109bb47eec0e47ed712e9b3a082c9f8a24db52588 WHIRLPOOL 633f1204fa824bdb0507914e13894c7bf68a07438f86bd1baddb2ae884792487816cdda94214fcfff005080ebe9dd352282f38c9e5db86daef1bd04491ad1960
+AUX hunspell-1.3.2-static-lib.patch 451 SHA256 7259ea8f23a4d2717e85f62e3276cbcc23af292f6e77daddeb23bd93dbde0528 SHA512 923ff9f5cc7d32fba73755eaed537af43b95ee8050865c623f6552bcadee4acf9d23d2fcbdba1ffefe648fff05f92c5af5e4b067e31fc306d9258d64eba45ced WHIRLPOOL 1e1dc1cd8cc65d19c215c9ed13b366d84287d29d21cfd3d0d3c2467c7e656bf91c92567d12c6ac8a77f8dd2d902e60611d34e190d53026e04034efc84069fd1b
+AUX hunspell-1.3.3-multibyte-chars.patch 1866 SHA256 1a2f0c6fd79894fa5f556c1715bc4bd05f2409b1d778bc2f597e3d44dc64f457 SHA512 a5b3b2a7b93bf5c5cdf446ae4a85e88e6bf1244c05437df29734241507e715f18ca5967de708f20ab569b55c646f85f4277c1112c867321edfd105a946c7bf9c WHIRLPOOL df9418af8941e8cba06a6b4b63369324fbad358b4c4bface9385f720ac91881150cd832e3c0f5665bc35ae5cd02da9c978233d1254d0ff45370516db58997563
+AUX hunspell-9999-error_h.patch 881 SHA256 8755794dbe59cf8540b077866d1dd604dad950e80c19b5999d584f23cfc967bb SHA512 9ed53121f07f9735cf4383deee5bbaffce75f85cfd9b7df26e7067713da05d6fb3cf7e6dd617aa2420b2780e556fa39230d1cbf20eba833120f3cc80026e2957 WHIRLPOOL 03382d367a546d3d9649748ee3d67f4ee6d590b6f607092b3373e07a0da309abedf3c5f66ea6dba6756eda858cf208746ab91daeb3f04fb4268a65539ffad748
+DIST hunspell-1.3.3.tar.gz 986081 SHA256 a7b2c0de0e2ce17426821dc1ac8eb115029959b3ada9d80a81739fa19373246c SHA512 7599981d002a4a032c41c83f6287243a4942b0e25c408049a3ba86c16f63ce964800a3ac325ace0402b0d7256690c4a4151a66f19a8f58cc455af0498bb1af04 WHIRLPOOL c10f7f7b326ce886bd031da29e9e04a1f4a5914f24cbe75061ed539958e7a8efaa4d4ea16f2b17437c63d97d6f558a27c092bc43c9f56c75078667d5344402f8
+EBUILD hunspell-1.3.3-r99.ebuild 2566 SHA256 37fced96b540099f4cd94f6295ab3c47ef8806dbb6c3f959f1554dd8248e79a6 SHA512 f6870ec7ec8b2307996742987d971a3ac4a3d05006c606f3c386ae7385f10d150ea3837896267001e692db3a365f5aeb803cf645fe3ec1b2cbde8a6ccca1565a WHIRLPOOL 8e0201aed2cdd898a796e05e3e903abad95c733d3a4d08451f8cdc625498a58ce044cb6355acb12242f38fc60a19348afeec29ff728c807cea996e332a3fb96e
+MISC metadata.xml 208 SHA256 98f8aa3fb70533eeab6b09d5bc30bd8f649ec13d9b04363490082fb87bb6032e SHA512 d5a7f3cb2fe57f8d7783ba358068648b122d9f5de81a17bff61ce600e42b6487e6f7e2a62c8be95cc7021cb3ea88716824b1ad0565da922ea753bea2417b3d3d WHIRLPOOL e38a6cdef2acb3efdc182efde482593790f773ab3bb9b66cced3af47e4ab39368757e17c4352c6cacaefa338341db88c3bcc3ffcd32aabd7984c5b19051a7bb7
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 0000000..70c5b74
--- /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.2-static-lib.patch b/app-text/hunspell/files/hunspell-1.3.2-static-lib.patch
new file mode 100644
index 0000000..b6cc923
--- /dev/null
+++ b/app-text/hunspell/files/hunspell-1.3.2-static-lib.patch
@@ -0,0 +1,9 @@
+diff -urN hunspell-1.3.2.old/src/parsers/Makefile.am hunspell-1.3.2/src/parsers/Makefile.am
+--- hunspell-1.3.2.old/src/parsers/Makefile.am 2011-09-15 11:50:40.251441126 +0200
++++ hunspell-1.3.2/src/parsers/Makefile.am 2011-09-17 06:06:50.469615528 +0200
+@@ -1,4 +1,4 @@
+-lib_LIBRARIES=libparsers.a
++noinst_LIBRARIES=libparsers.a
+ libparsers_a_SOURCES=firstparser.cxx htmlparser.cxx \
+ latexparser.cxx manparser.cxx \
+ textparser.cxx
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 0000000..848bc8f
--- /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++) {
+
diff --git a/app-text/hunspell/files/hunspell-9999-error_h.patch b/app-text/hunspell/files/hunspell-9999-error_h.patch
new file mode 100644
index 0000000..9e1208f
--- /dev/null
+++ b/app-text/hunspell/files/hunspell-9999-error_h.patch
@@ -0,0 +1,37 @@
+http://sourceforge.net/p/hunspell/bugs/264/
+
+diff --git a/src/tools/munch.c b/src/tools/munch.c
+index 52e7c51..dd42fed 100644
+--- a/src/tools/munch.c
++++ b/src/tools/munch.c
+@@ -10,8 +10,10 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <limits.h>
+-#if defined(__linux__) && !defined(__ANDROID__)
++#if HAVE_ERROR_H
+ #include <error.h>
++#endif
++#if defined(__linux__) && !defined(__ANDROID__)
+ #include <errno.h>
+ #include <sys/mman.h>
+ #endif
+diff --git a/src/tools/unmunch.c b/src/tools/unmunch.c
+index c1d07a8..53915f5 100644
+--- a/src/tools/unmunch.c
++++ b/src/tools/unmunch.c
+@@ -11,8 +11,10 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+-#if defined(__linux__) && !defined(__ANDROID__)
++#if HAVE_ERROR_H
+ #include <error.h>
++#endif
++#if defined(__linux__) && !defined(__ANDROID__)
+ #include <errno.h>
+ #include <sys/mman.h>
+ #endif
+--
+2.0.5
+
diff --git a/app-text/hunspell/hunspell-1.3.3-r99.ebuild b/app-text/hunspell/hunspell-1.3.3-r99.ebuild
new file mode 100644
index 0000000..86989d1
--- /dev/null
+++ b/app-text/hunspell/hunspell-1.3.3-r99.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/hunspell/hunspell-1.3.3.ebuild,v 1.4 2014/12/02 20:49:12 maekke Exp $
+
+EAPI=5
+inherit eutils multilib autotools flag-o-matic versionator
+
+MY_P=${PN}-${PV/_beta/b}
+
+DESCRIPTION="Hunspell spell checker - an improved replacement for myspell in OOo"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+HOMEPAGE="http://hunspell.sourceforge.net/"
+
+SLOT="0"
+LICENSE="MPL-1.1 GPL-2 LGPL-2.1"
+IUSE="ncurses nls readline static-libs"
+KEYWORDS="~alpha ~amd64 arm hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+
+RDEPEND="
+ ncurses? ( sys-libs/ncurses )
+ readline? ( sys-libs/readline )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+# describe properly mi
+LANGS="af bg ca cs cy da de el en eo es et fo fr ga gl he hr hu ia id is it km
+ku lt lv mk ms nb nl nn pl pt pt_BR ro ru sk sl sq sv sw tn uk zu"
+
+DICT_DEP="app-dicts/myspell-en"
+for lang in ${LANGS}; do
+ if [[ ${lang} == de ]] ; then
+ DICT_DEP+=" linguas_de? (
+ || (
+ app-dicts/myspell-de
+ app-dicts/myspell-de-alt
+ )
+ )"
+ else
+ DICT_DEP+=" linguas_${lang}? ( app-dicts/myspell-${lang/pt_BR/pt-br} )"
+ fi
+ IUSE+=" linguas_${lang}"
+done
+PDEPEND="${DICT_DEP}"
+
+unset lang LANGS DICT_DEP
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=(
+ AUTHORS ChangeLog NEWS README THANKS TODO license.hunspell
+ AUTHORS.myspell README.myspell license.myspell
+)
+
+src_prepare() {
+ # Upstream package creates some executables which names are too generic
+ # to be placed in /usr/bin - this patch prefixes them with 'hunspell-'.
+ # It modifies a Makefile.am file, hence eautoreconf.
+ epatch "${FILESDIR}"/${PN}-1.3-renameexes.patch \
+ "${FILESDIR}"/${PN}-1.3.3-multibyte-chars.patch
+
+ epatch "${FILESDIR}"/${PN}-9999-error_h.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ # missing somehow, and I am too lazy to fix it properly
+ [[ ${CHOST} == *-darwin* ]] && append-libs -liconv
+
+ # I wanted to put the include files in /usr/include/hunspell.
+ # You can do that, libreoffice can find them anywhere, just
+ # ping me when you do so ; -- scarabeus
+ econf \
+ $(use_enable nls) \
+ $(use_with ncurses ui) \
+ $(use_with readline readline) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ prune_libtool_files --all
+
+ #342449
+ pushd "${ED}"/usr/$(get_libdir)/ >/dev/null
+ ln -s lib${PN}{-$(get_major_version).$(get_version_component_range 2).so.0.0.0,.so}
+ popd >/dev/null
+}
diff --git a/app-text/hunspell/metadata.xml b/app-text/hunspell/metadata.xml
new file mode 100644
index 0000000..4538a68
--- /dev/null
+++ b/app-text/hunspell/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>