From d3dca067cb9e21741d2c4719fdb34cc63595416c Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Thu, 21 Aug 2014 21:02:42 +0000 Subject: [PATCH] hunspell: added a recipe for version 1.3.3 --- app-text/hunspell/hunspell-1.3.3.recipe | 102 ++++++++++++++++++ .../hunspell/patches/hunspell-1.3.3.patchset | 30 ++++++ 2 files changed, 132 insertions(+) create mode 100644 app-text/hunspell/hunspell-1.3.3.recipe create mode 100644 app-text/hunspell/patches/hunspell-1.3.3.patchset diff --git a/app-text/hunspell/hunspell-1.3.3.recipe b/app-text/hunspell/hunspell-1.3.3.recipe new file mode 100644 index 000000000..569aad982 --- /dev/null +++ b/app-text/hunspell/hunspell-1.3.3.recipe @@ -0,0 +1,102 @@ +SUMMARY="Spellchecker, forked from myspell" +DESCRIPTION=" + Hunspell is a spell checker and morphological analyzer library and program + designed for languages with rich morphology and complex word compounding or + character encoding. + " +HOMEPAGE="http://hunspell.sourceforge.net/" +SRC_URI="http://downloads.sourceforge.net/hunspell/hunspell-$portVersion.tar.gz" +CHECKSUM_SHA256="a7b2c0de0e2ce17426821dc1ac8eb115029959b3ada9d80a81739fa19373246c" +LICENSE=" + GNU GPL v2 + GNU LGPL v2.1 + MPL v1.1 + " +COPYRIGHT=" + 2007-2011 Hunspell developers et al. + 2002-2008 László Németh (Hunspell) + 2001-2002 Kevin Hendricks (MySpell) + " +REVISION="1" +ARCHITECTURES="x86 x86_gcc2 x86_64" +SECONDARY_ARCHITECTURES="x86_gcc2 x86" + +PATCHES="hunspell-$portVersion.patchset" + +PROVIDES=" + $portName = $portVersion + lib:libhunspell_1.3$secondaryArchSuffix = $portVersion compat >= 1.3 + " +if [ -z $secondaryArchSuffix ]; then + PROVIDES="$PROVIDES + cmd:affixcompress = $portVersion + cmd:analyze = $portVersion + cmd:chmorph = $portVersion + cmd:hunspell = $portVersion + cmd:hunzip = $portVersion + cmd:hzip = $portVersion + cmd:ispellaff2myspell = $portVersion + cmd:makealias = $portVersion + cmd:munch = $portVersion + cmd:unmunch = $portVersion + cmd:wordforms = $portVersion + cmd:wordlist2hunspell = $portVersion + " +fi +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + " +BUILD_REQUIRES=" + " +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + cmd:libtoolize + cmd:aclocal + cmd:autoconf + cmd:automake + " + +BUILD() +{ + libtoolize --force --copy --install + aclocal -I m4 + autoconf + automake --add-missing + touch po/t-hu.gmo + touch po/t-it.gmo + runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install + + rm $libDir/charset.alias + if [ -n $secondaryArchSuffix ]; then + rm -rf $binDir + fi + + prepareInstalledDevelLibs libhunspell-1.3 + fixPkgconfig + + packageEntries devel $developDir +} + +TEST() +{ + make check +} + +# ----- devel package ------------------------------------------------------- + +PROVIDES_devel=" + hunspell${secondaryArchSuffix}_devel = $portVersion + devel:libhunspell_1.3$secondaryArchSuffix = $portVersion compat >= 1.3 + " +REQUIRES_devel=" + hunspell$secondaryArchSuffix == $portVersion base + " diff --git a/app-text/hunspell/patches/hunspell-1.3.3.patchset b/app-text/hunspell/patches/hunspell-1.3.3.patchset new file mode 100644 index 000000000..eb1308fa0 --- /dev/null +++ b/app-text/hunspell/patches/hunspell-1.3.3.patchset @@ -0,0 +1,30 @@ +From 0aa0f31df70d513ee575c8fbe852fff331d234f9 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 21 Aug 2014 17:41:26 +0000 +Subject: haiku gcc2 + + +diff --git a/src/hunspell/hashmgr.cxx b/src/hunspell/hashmgr.cxx +index 12adf42..0f04910 100644 +--- a/src/hunspell/hashmgr.cxx ++++ b/src/hunspell/hashmgr.cxx +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + + #include "hashmgr.hxx" + #include "csutil.hxx" +@@ -386,7 +385,7 @@ int HashMgr::load_tables(const char * tpath, const char * key) + + int nExtra = 5 + USERWORD; + +- if (tablesize <= 0 || (tablesize >= (std::numeric_limits::max() - 1 - nExtra) / int(sizeof(struct hentry *)))) { ++ if (tablesize <= 0 || (tablesize >= (INT_MAX - 1 - nExtra) / int(sizeof(struct hentry *)))) { + HUNSPELL_WARNING(stderr, "error: line 1: missing or bad word count in the dic file\n"); + delete dict; + return 4; +-- +1.8.3.4 +