summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWorMzy Tykashi2017-12-05 13:04:43 +0000
committerWorMzy Tykashi2017-12-05 13:04:43 +0000
commita355e59ffde193b57e8446052d2e0f169f282434 (patch)
treefc93339d6a90f87500d2a3d3952548990e10120f
parente61bd1c50e52ee2994ba24a2fd4303d2473f1cf3 (diff)
downloadaur-a355e59ffde193b57e8446052d2e0f169f282434.tar.gz
Fix enchant-related build failure
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD15
-rw-r--r--enchant-2.1.patch29
3 files changed, 44 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 83462062b0f8..441d1358f00d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = abiword-gtk2
pkgdesc = Fully-featured word processor, GTk2, No plugins, Lite version
pkgver = 3.0.2
- pkgrel = 1
+ pkgrel = 2
url = http://www.abisource.com
arch = i686
arch = x86_64
@@ -18,7 +18,9 @@ pkgbase = abiword-gtk2
conflicts = abiword
conflicts = abiword-plugins
source = abiword-3.0.2.tar.gz::http://abisource.com/downloads/abiword/3.0.2/source/abiword-3.0.2.tar.gz
+ source = enchant-2.1.patch
sha256sums = afbfd458fd02989d8b0c6362ba8a4c14686d89666f54cfdb5501bd2090cf3522
+ sha256sums = 444dc2aadea3c80310a509b690097541573f6d2652c573d04da66a0f385fcfb2
pkgname = abiword-gtk2
diff --git a/PKGBUILD b/PKGBUILD
index 6b7d44630dc7..4ac90d4ba6cc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=abiword-gtk2
_pkgname=abiword
pkgver=3.0.2
-pkgrel=1
+pkgrel=2
pkgdesc='Fully-featured word processor, GTk2, No plugins, Lite version'
arch=('i686' 'x86_64')
license=('GPL')
@@ -12,8 +12,17 @@ depends=('fribidi' 'wv' 'librsvg' 'enchant' 'desktop-file-utils' 'gtk2' 'libxslt
makedepends=('pkgconfig' 'boost')
conflicts=('abiword' 'abiword-plugins')
url='http://www.abisource.com'
-source=("$_pkgname-$pkgver.tar.gz::http://abisource.com/downloads/$_pkgname/$pkgver/source/$_pkgname-$pkgver.tar.gz")
-sha256sums=('afbfd458fd02989d8b0c6362ba8a4c14686d89666f54cfdb5501bd2090cf3522')
+source=("$_pkgname-$pkgver.tar.gz::http://abisource.com/downloads/$_pkgname/$pkgver/source/$_pkgname-$pkgver.tar.gz"
+ enchant-2.1.patch)
+sha256sums=('afbfd458fd02989d8b0c6362ba8a4c14686d89666f54cfdb5501bd2090cf3522'
+ '444dc2aadea3c80310a509b690097541573f6d2652c573d04da66a0f385fcfb2')
+
+prepare() {
+ cd $_pkgname-$pkgver
+
+ # Replace deprecated enchant functions
+ patch -Np1 -i ../enchant-2.1.patch
+}
build() {
cd $_pkgname-$pkgver
diff --git a/enchant-2.1.patch b/enchant-2.1.patch
new file mode 100644
index 000000000000..010aac100908
--- /dev/null
+++ b/enchant-2.1.patch
@@ -0,0 +1,29 @@
+--- abiword-3.0.2/src/af/xap/xp/enchant_checker.cpp.orig 2013-04-07 13:53:03.000000000 +0000
++++ abiword-3.0.2/src/af/xap/xp/enchant_checker.cpp 2017-11-19 22:54:41.236180298 +0000
+@@ -127,7 +127,7 @@
+ pvSugg->addItem (ucszSugg);
+ }
+
+- enchant_dict_free_suggestions (m_dict, suggestions);
++ enchant_dict_free_string_list (m_dict, suggestions);
+ }
+
+ return pvSugg;
+@@ -139,7 +139,7 @@
+
+ if (word && len) {
+ UT_UTF8String utf8 (word, len);
+- enchant_dict_add_to_personal (m_dict, utf8.utf8_str(), utf8.byteLength());
++ enchant_dict_add (m_dict, utf8.utf8_str(), utf8.byteLength());
+ return true;
+ }
+ return false;
+@@ -150,7 +150,7 @@
+ UT_return_val_if_fail (m_dict, false);
+
+ UT_UTF8String ignore (toCorrect, toCorrectLen);
+- return enchant_dict_is_in_session (m_dict, ignore.utf8_str(), ignore.byteLength()) != 0;
++ return enchant_dict_is_added (m_dict, ignore.utf8_str(), ignore.byteLength()) != 0;
+ }
+
+ void EnchantChecker::ignoreWord (const UT_UCSChar *toCorrect, size_t toCorrectLen)