Source: abiword
Version: 3.0.2-10
Severity: important
Tags: patch
Control: block 947979 by -1

Hello,

Could you please switch from enchant(1) to the enchant-2 library?

We are trying to get rid of enchant(1) for the bullseye release.

The attached patch should fix this

Kind regards,
Laurent Bigonville

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.5.0-1-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_WARN
Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_BE:fr (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: SELinux: enabled - Mode: Permissive - Policy name: refpolicy
diff -Nru abiword-3.0.2/debian/control abiword-3.0.2/debian/control
--- abiword-3.0.2/debian/control        2020-04-02 14:46:29.000000000 +0200
+++ abiword-3.0.2/debian/control        2020-04-14 15:22:12.000000000 +0200
@@ -13,7 +13,7 @@
                libchamplain-gtk-0.12-dev,
                libebook1.2-dev (>= 3.8.5),
                libical-dev (>= 3.0),
-               libenchant-dev,
+               libenchant-2-dev,
                libfribidi-dev,
                libgcrypt20-dev,
                libgirepository1.0-dev,
diff -Nru abiword-3.0.2/debian/patches/enchant2.patch 
abiword-3.0.2/debian/patches/enchant2.patch
--- abiword-3.0.2/debian/patches/enchant2.patch 1970-01-01 01:00:00.000000000 
+0100
+++ abiword-3.0.2/debian/patches/enchant2.patch 2020-04-14 15:24:39.000000000 
+0200
@@ -0,0 +1,40 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -94,7 +94,7 @@ xp_pkgs="
+ "
+ 
+ # optional deps
+-enchant_req='enchant >= 1.2.0'
++enchant_req='enchant-2 >= 1.2.0'
+ gio_req='gio-2.0'
+ goffice_req='libgoffice-0.10 >= 0.10.0'
+ 
+--- a/src/af/xap/xp/enchant_checker.cpp
++++ b/src/af/xap/xp/enchant_checker.cpp
+@@ -127,7 +127,7 @@ EnchantChecker::_suggestWord (const UT_U
+                               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 (co
+ 
+       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
+       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)
diff -Nru abiword-3.0.2/debian/patches/series 
abiword-3.0.2/debian/patches/series
--- abiword-3.0.2/debian/patches/series 2020-04-02 14:46:29.000000000 +0200
+++ abiword-3.0.2/debian/patches/series 2020-04-14 15:21:47.000000000 +0200
@@ -11,3 +11,4 @@
 libical3.diff
 build-Don-t-check-for-libecal.patch
 git_build_fix.patch
+enchant2.patch

Reply via email to