mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
hunspell: added a recipe for version 1.3.3
This commit is contained in:
102
app-text/hunspell/hunspell-1.3.3.recipe
Normal file
102
app-text/hunspell/hunspell-1.3.3.recipe
Normal file
@@ -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
|
||||
"
|
||||
30
app-text/hunspell/patches/hunspell-1.3.3.patchset
Normal file
30
app-text/hunspell/patches/hunspell-1.3.3.patchset
Normal file
@@ -0,0 +1,30 @@
|
||||
From 0aa0f31df70d513ee575c8fbe852fff331d234f9 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
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 <string.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
-#include <limits>
|
||||
|
||||
#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<int>::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
|
||||
|
||||
Reference in New Issue
Block a user