mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
hunspell: bump to 1.4.2, rename analyze, chmorph and {un,}munch. (#867)
Gentoo renames four utilities (analyze, chmorph, munch, unmunch) by adding a hunspell- prefix to their names, to avoid having too generic names. So let's follow Gentoo, using their patch ;-) Also remove any empty data/locale/*/LC_MESSAGES dirs (hu & it). Also added 1.5.4 and 1.6.0 which both fail to build.
This commit is contained in:
@@ -11,8 +11,13 @@ LICENSE="GNU GPL v2
|
||||
MPL v1.1"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/hunspell/hunspell/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="270a5e5296246d6d851f082e246468c6789658b2b07081df486e1e0cd66d5993"
|
||||
SOURCE_FILENAME="hunspell-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="b6a0b23d083e0130f8c561cca8c980814ba65740ccfa52f47159f9141089946d"
|
||||
PATCHES="hunspell-$portVersion.patchset"
|
||||
SOURCE_FILENAME_2="hunspell-1.4.0-renameexes.patch"
|
||||
srcGitRev_2="59fa121f0ded94266f99bd840e2b4e640272f689"
|
||||
SOURCE_URI_2="https://gitweb.gentoo.org/repo/gentoo.git/plain/app-text/hunspell/files/$SOURCE_FILENAME_2?id=$srcGitRev_2#noarchive"
|
||||
CHECKSUM_SHA256_2="18359f057a814db6d37b2394b397461a03f6af616d21c4f98fc8019e52a88b88"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86_gcc2 x86"
|
||||
@@ -21,15 +26,15 @@ PROVIDES="
|
||||
$portName = $portVersion
|
||||
lib:libhunspell_${portVersion%.*}$secondaryArchSuffix = 0.0.0
|
||||
cmd:affixcompress$secondaryArchSuffix = $portVersion
|
||||
cmd:analyze$secondaryArchSuffix = $portVersion
|
||||
cmd:chmorph$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell_analyze$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell_chmorph$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell_munch$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell_unmunch$secondaryArchSuffix = $portVersion
|
||||
cmd:hunzip$secondaryArchSuffix = $portVersion
|
||||
cmd:hzip$secondaryArchSuffix = $portVersion
|
||||
cmd:ispellaff2myspell$secondaryArchSuffix = $portVersion
|
||||
cmd:makealias$secondaryArchSuffix = $portVersion
|
||||
cmd:munch$secondaryArchSuffix = $portVersion
|
||||
cmd:unmunch$secondaryArchSuffix = $portVersion
|
||||
cmd:wordforms$secondaryArchSuffix = $portVersion
|
||||
cmd:wordlist2hunspell$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
@@ -58,6 +63,11 @@ BUILD_PREREQUIRES="
|
||||
cmd:make
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
patch -p1 -i $sourceDir2/$SOURCE_FILENAME_2
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
libtoolize --force --copy --install
|
||||
@@ -73,6 +83,10 @@ INSTALL()
|
||||
make install
|
||||
|
||||
rm $libDir/charset.alias $libDir/*.la
|
||||
|
||||
# remove any existing (but empty) data/locale/*/LC_MESSAGES directory
|
||||
rmdir $dataDir/locale/*/LC_MESSAGES $dataDir/locale/* || true
|
||||
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
rm -rf $dataDir $documentationDir
|
||||
maybe_manDir_man3=
|
||||
109
app-text/hunspell/hunspell-1.5.4.recipe
Normal file
109
app-text/hunspell/hunspell-1.5.4.recipe
Normal file
@@ -0,0 +1,109 @@
|
||||
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="https://hunspell.github.io/"
|
||||
COPYRIGHT="2007-2016 Hunspell developers et al.
|
||||
2002-2008 László Németh (Hunspell)
|
||||
2001-2002 Kevin Hendricks (MySpell)"
|
||||
LICENSE="GNU GPL v2
|
||||
GNU LGPL v2.1
|
||||
MPL v1.1"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/hunspell/hunspell/archive/v$portVersion.tar.gz"
|
||||
SOURCE_FILENAME="hunspell-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="852c01a2e3b87eb1f2adb5261466608ba79f1f950202e18a2a1735de5098fc59"
|
||||
PATCHES="hunspell-$portVersion.patchset"
|
||||
|
||||
SOURCE_FILENAME_2="hunspell-1.5.0-renameexes.patch"
|
||||
srcGitRev_2="f3a2e939f24bc4369f26c10019588db46a576c80"
|
||||
SOURCE_URI_2="https://gitweb.gentoo.org/repo/gentoo.git/plain/app-text/hunspell/files/$SOURCE_FILENAME_2?id=$srcGitRev_2#noarchive"
|
||||
CHECKSUM_SHA256_2="274a5632519986abd7824266dafa2e2073f3634df0a81efb72101b8cd9e8a94f"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 !x86 !x86_64"
|
||||
SECONDARY_ARCHITECTURES="!x86_gcc2 !x86"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
lib:libhunspell_${portVersion%.*}$secondaryArchSuffix = 0.0.0
|
||||
cmd:affixcompress$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell_analyze$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell_chmorph$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell_munch$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell_unmunch$secondaryArchSuffix = $portVersion
|
||||
cmd:hunzip$secondaryArchSuffix = $portVersion
|
||||
cmd:hzip$secondaryArchSuffix = $portVersion
|
||||
cmd:ispellaff2myspell$secondaryArchSuffix = $portVersion
|
||||
cmd:makealias$secondaryArchSuffix = $portVersion
|
||||
cmd:wordforms$secondaryArchSuffix = $portVersion
|
||||
cmd:wordlist2hunspell$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
hunspell${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libhunspell_${portVersion%.*}$secondaryArchSuffix = 0.0.0
|
||||
"
|
||||
REQUIRES_devel="
|
||||
hunspell$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:automake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
patch -p1 -i $sourceDir2/$SOURCE_FILENAME_2
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
libtoolize --force --copy --install
|
||||
aclocal -I m4
|
||||
autoconf
|
||||
automake --add-missing
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
rm $libDir/charset.alias $libDir/*.la
|
||||
|
||||
# remove any existing (but empty) data/locale/*/LC_MESSAGES directory
|
||||
rmdir $dataDir/locale/*/LC_MESSAGES $dataDir/locale/* || true
|
||||
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
rm -rf $dataDir $documentationDir
|
||||
maybe_manDir_man3=
|
||||
else
|
||||
maybe_manDir_man3=$manDir/man3
|
||||
fi
|
||||
|
||||
prepareInstalledDevelLibs libhunspell-${portVersion%.*}
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$maybe_manDir_man3
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
109
app-text/hunspell/hunspell-1.6.0.recipe
Normal file
109
app-text/hunspell/hunspell-1.6.0.recipe
Normal file
@@ -0,0 +1,109 @@
|
||||
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="https://hunspell.github.io/"
|
||||
COPYRIGHT="2007-2016 Hunspell developers et al.
|
||||
2002-2008 László Németh (Hunspell)
|
||||
2001-2002 Kevin Hendricks (MySpell)"
|
||||
LICENSE="GNU GPL v2
|
||||
GNU LGPL v2.1
|
||||
MPL v1.1"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/hunspell/hunspell/archive/v$portVersion.tar.gz"
|
||||
SOURCE_FILENAME="hunspell-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="512e7d2ee69dad0b35ca011076405e56e0f10963a02d4859dbcc4faf53ca68e2"
|
||||
PATCHES="hunspell-$portVersion.patchset"
|
||||
|
||||
SOURCE_FILENAME_2="hunspell-1.6.0-renameexes.patch"
|
||||
srcGitRev_2="5a4a9178064530f81ab0872bf262e16b0d60cb57"
|
||||
SOURCE_URI_2="https://gitweb.gentoo.org/repo/gentoo.git/plain/app-text/hunspell/files/$SOURCE_FILENAME_2?id=$srcGitRev_2#noarchive"
|
||||
CHECKSUM_SHA256_2="ce11943935aac39c5e038fabfff01d2f30450b73c3cb62005675f209cce66036"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 !x86 !x86_64"
|
||||
SECONDARY_ARCHITECTURES="!x86_gcc2 !x86"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
lib:libhunspell_${portVersion%.*}$secondaryArchSuffix = 0.0.0
|
||||
cmd:affixcompress$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell_analyze$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell_chmorph$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell_munch$secondaryArchSuffix = $portVersion
|
||||
cmd:hunspell_unmunch$secondaryArchSuffix = $portVersion
|
||||
cmd:hunzip$secondaryArchSuffix = $portVersion
|
||||
cmd:hzip$secondaryArchSuffix = $portVersion
|
||||
cmd:ispellaff2myspell$secondaryArchSuffix = $portVersion
|
||||
cmd:makealias$secondaryArchSuffix = $portVersion
|
||||
cmd:wordforms$secondaryArchSuffix = $portVersion
|
||||
cmd:wordlist2hunspell$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
hunspell${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libhunspell_${portVersion%.*}$secondaryArchSuffix = 0.0.0
|
||||
"
|
||||
REQUIRES_devel="
|
||||
hunspell$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:automake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
patch -p1 -i $sourceDir2/$SOURCE_FILENAME_2
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
libtoolize --force --copy --install
|
||||
aclocal -I m4
|
||||
autoconf
|
||||
automake --add-missing
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
rm $libDir/charset.alias $libDir/*.la
|
||||
|
||||
# remove any existing (but empty) data/locale/*/LC_MESSAGES directory
|
||||
rmdir $dataDir/locale/*/LC_MESSAGES $dataDir/locale/* || true
|
||||
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
rm -rf $dataDir $documentationDir
|
||||
maybe_manDir_man3=
|
||||
else
|
||||
maybe_manDir_man3=$manDir/man3
|
||||
fi
|
||||
|
||||
prepareInstalledDevelLibs libhunspell-${portVersion%.*}
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$maybe_manDir_man3
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
30
app-text/hunspell/patches/hunspell-1.5.4.patchset
Normal file
30
app-text/hunspell/patches/hunspell-1.5.4.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 0d5dbf5..7fd4e08 100644
|
||||
--- a/src/hunspell/hashmgr.cxx
|
||||
+++ b/src/hunspell/hashmgr.cxx
|
||||
@@ -75,7 +75,6 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
-#include <limits>
|
||||
#include <sstream>
|
||||
|
||||
#include "hashmgr.hxx"
|
||||
@@ -506,7 +505,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) /
|
||||
+ (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");
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
30
app-text/hunspell/patches/hunspell-1.6.0.patchset
Normal file
30
app-text/hunspell/patches/hunspell-1.6.0.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 1de1690..7d5519d 100644
|
||||
--- a/src/hunspell/hashmgr.cxx
|
||||
+++ b/src/hunspell/hashmgr.cxx
|
||||
@@ -75,7 +75,6 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
-#include <limits>
|
||||
#include <sstream>
|
||||
|
||||
#include "hashmgr.hxx"
|
||||
@@ -506,7 +505,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) /
|
||||
+ (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");
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user