main/enchant: fix build with hunspell 1.4

This commit is contained in:
Natanael Copa 2016-09-06 19:30:30 +00:00
parent c27a88b02c
commit e8810f4ae3
2 changed files with 28 additions and 9 deletions

View File

@ -9,17 +9,19 @@ license="LGPL2+"
subpackages="$pkgname-dev $pkgname-doc"
depends=""
depends_dev="glib-dev"
makedepends="aspell-dev dbus-glib-dev hunspell-dev gettext-dev"
source="http://www.abisource.com/downloads/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz"
makedepends="aspell-dev dbus-glib-dev hunspell-dev gettext-dev file bash"
source="http://www.abisource.com/downloads/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz
hunspell-build-fix.patch"
_builddir="$srcdir/$pkgname-$pkgver"
builddir="$srcdir/$pkgname-$pkgver"
prepare() {
cd "$_builddir"
cd "$builddir"
update_config_sub || return 1
default_prepare
}
build() {
cd "$_builddir"
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
@ -30,9 +32,12 @@ build() {
}
package() {
cd "$_builddir"
cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
}
md5sums="de11011aff801dc61042828041fb59c7 enchant-1.6.0.tar.gz"
sha256sums="2fac9e7be7e9424b2c5570d8affe568db39f7572c10ed48d4e13cddf03f7097f enchant-1.6.0.tar.gz"
sha512sums="0ca1634bb783df51512df4abecc89abdadee6baf7330d6e5f90cc15d10779896a3521a1c079ecc07e4df4f7a018ce398cca9d0125a7845a314a059840ebc9137 enchant-1.6.0.tar.gz"
md5sums="de11011aff801dc61042828041fb59c7 enchant-1.6.0.tar.gz
1305a6c285b5970bb1ef0f033f49f329 hunspell-build-fix.patch"
sha256sums="2fac9e7be7e9424b2c5570d8affe568db39f7572c10ed48d4e13cddf03f7097f enchant-1.6.0.tar.gz
54e325f71959828f1f04e03cd33b9b80f0dfdc89b68859c08e51831052f1b346 hunspell-build-fix.patch"
sha512sums="0ca1634bb783df51512df4abecc89abdadee6baf7330d6e5f90cc15d10779896a3521a1c079ecc07e4df4f7a018ce398cca9d0125a7845a314a059840ebc9137 enchant-1.6.0.tar.gz
c0b7fd8fd00a81ea2c08ea7ce2bdffa826b5a3a0c06eacb818681f0f977d8e76c69f7938c10cdf71571cd1cbbf0e576d36fc74a41755fb570e047525195aeb99 hunspell-build-fix.patch"

View File

@ -0,0 +1,14 @@
diff -ru enchant-1.6.0-orig/src/myspell/myspell_checker.cpp enchant-1.6.0/src/myspell/myspell_checker.cpp
--- enchant-1.6.0-orig/src/myspell/myspell_checker.cpp 2016-04-18 12:25:00.094614256 +0100
+++ enchant-1.6.0/src/myspell/myspell_checker.cpp 2016-04-18 12:26:09.108569576 +0100
@@ -148,6 +148,10 @@
g_iconv_close(m_translate_out);
}
+#ifndef MAXWORDLEN
+# define MAXWORDLEN 100
+#endif
+
bool
MySpellChecker::checkWord(const char *utf8Word, size_t len)
{