abiword: use enchant2.

Also remove gtk3 build option, we don't want to use gtk2.
This commit is contained in:
Érico Nogueira 2021-04-27 15:16:45 -03:00
parent 71401d19f6
commit 9160a19b83
2 changed files with 69 additions and 8 deletions

View file

@ -0,0 +1,60 @@
Upstream: https://gitlab.gnome.org/World/AbiWord/-/commit/ae05e92df5a5d6151641622c83d35a6fdba47b1f
Adapted to change configure directly instead of configure.ac
From ae05e92df5a5d6151641622c83d35a6fdba47b1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= <hub@figuiere.net>
Date: Fri, 22 Nov 2019 20:02:52 -0500
Subject: [PATCH] Require enchant 2 now
---
configure.ac | 2 +-
src/af/xap/xp/enchant_checker.cpp | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index fdc3076..308b87b 100755
--- a/configure
+++ b/configure
@@ -4200,7 +4200,7 @@ xp_pkgs="
"
# optional deps
-enchant_req='enchant >= 1.2.0'
+enchant_req='enchant-2'
gio_req='gio-2.0'
goffice_req='libgoffice-0.10 >= 0.10.0'
diff --git a/src/af/xap/xp/enchant_checker.cpp b/src/af/xap/xp/enchant_checker.cpp
index ed97c1fb9f..5f64852412 100644
--- a/src/af/xap/xp/enchant_checker.cpp
+++ b/src/af/xap/xp/enchant_checker.cpp
@@ -127,7 +127,7 @@ EnchantChecker::_suggestWord (const UT_UCSChar *ucszWord, size_t len)
pvSugg->addItem (ucszSugg);
}
- enchant_dict_free_suggestions (m_dict, suggestions);
+ enchant_dict_free_string_list(m_dict, suggestions);
}
return pvSugg;
@@ -139,7 +139,7 @@ bool EnchantChecker::addToCustomDict (const UT_UCSChar *word, size_t len)
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 @@ bool EnchantChecker::isIgnored (const UT_UCSChar *toCorrect, size_t toCorrectLen
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)
--
GitLab

View file

@ -1,17 +1,16 @@
# Template file for 'abiword'
pkgname=abiword
version=3.0.4
revision=1
revision=2
build_style=gnu-configure
configure_args="--enable-plugins --enable-clipart --enable-templates
$(vopt_if gtk3 '--with-gtk3' '--with-gtk2')
$(vopt_enable goffice)"
--with-gtk3 $(vopt_enable goffice)"
hostmakedepends="automake libtool flex pkg-config"
makedepends="libjpeg-turbo-devel libpng-devel fribidi-devel libgsf-devel
enchant-devel librsvg-devel wv-devel boost-devel libxslt-devel
enchant2-devel librsvg-devel wv-devel boost-devel libxslt-devel
libwmf-devel libchamplain-devel redland-devel libical-devel
libgcrypt-devel harfbuzz-devel $(vopt_if goffice goffice-devel)
$(vopt_if gtk3 'gtk+3-devel' 'gtk+-devel')"
gtk+3-devel"
depends="hicolor-icon-theme desktop-file-utils"
short_desc="Free word processing program similar to Microsoft(R) Word"
maintainer="Orphaned <orphan@voidlinux.org>"
@ -19,8 +18,10 @@ license="GPL-2.0-or-later"
homepage="http://www.abisource.com/"
distfiles="${homepage}/downloads/${pkgname}/${version}/source/${pkgname}-${version}.tar.gz"
checksum=e93096cb192e5bc19d62e180fc5eda643206465315a710113ae5036bc2a1a5d7
build_options="gtk3 goffice"
build_options_default="gtk3 goffice"
patch_args=-Np1
build_options="goffice"
build_options_default="goffice"
CXXFLAGS="-std=c++11"
@ -31,7 +32,7 @@ libabiword_package() {
}
}
abiword-devel_package() {
depends="fribidi-devel libgsf-devel wv-devel enchant-devel gtk+3-devel
depends="fribidi-devel libgsf-devel wv-devel enchant2-devel gtk+3-devel
librsvg-devel libabiword>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {