[pan/test2] Actually build with enchant-2 for GTK 3




commit 0ab3a75ef2eedf5e3676795c9b46880bba5cb91a
Author: Petr Kovar <pknbe volny cz>
Date:   Mon Dec 6 23:21:21 2021 +0100

    Actually build with enchant-2 for GTK 3
    
    CI: Don't bother trying to build with gtkspell-2.0 if enchant is
    no longer ailable on Ubuntu.

 .gitlab-ci.yml                | 9 ++++-----
 configure.ac                  | 3 ++-
 pan/gui/group-prefs-dialog.cc | 4 ++++
 3 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 037a0ec..ed48fa2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -20,8 +20,6 @@ build-ubuntu-gtk2:
         gcc
         libgtk2.0-dev
         libgmime-3.0-dev
-        libgtkspell-dev
-        libenchant-2-dev
         libnotify-dev
         gnome-keyring
         libgnutls28-dev
@@ -29,8 +27,9 @@ build-ubuntu-gtk2:
   script:
     - mkdir _build
     - cd _build
-    - ../autogen.sh --without-gtk3 --with-gnutls --with-dbus --with-gmime-crypto --with-gtkspell 
--enable-libnotify --enable-gkr --enable-manual
-    - make && make distcheck
+    - ../autogen.sh --without-gtk3 --with-gnutls --with-dbus --with-gmime-crypto --enable-libnotify 
--enable-gkr --enable-manual
+    - make
+    - make distcheck
 
 build-ubuntu-gtk3:
   image: ubuntu:rolling
@@ -52,10 +51,10 @@ build-ubuntu-gtk3:
         libgmime-3.0-dev
         libgnutls28-dev
         libgtk-3-dev
-        libgtkspell-dev
         libnotify-dev
         libsecret-1-dev
         libgtkspell3-3-dev
+        libenchant-2-dev
         yelp-tools
   script:
     - mkdir _build
diff --git a/configure.ac b/configure.ac
index a719895..f7bc179 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,7 @@ GTK3_REQUIRED=3.0.0
 GTKSPELL_REQUIRED=2.0.7
 GTKSPELL3_REQUIRED=2.0.16
 ENCHANT_REQUIRED=1.6.0
+ENCHANT2_REQUIRED=2.2.15
 GNUTLS_REQUIRED=3.0.0
 LIBNOTIFY_REQUIRED=0.4.1
 LIBGKR_REQUIRED=3.2.0
@@ -159,7 +160,7 @@ if test "x$want_gtk3" = "xyes" ; then
                     AC_DEFINE(HAVE_GTK,[1],[GTK+ 3 support])]
                     )
   if test "x$want_gtkspell" = "xyes" ; then
-    PKG_CHECK_MODULES([GTKSPELL], [gtkspell3-3.0 >= $GTKSPELL3_REQUIRED enchant >= $ENCHANT_REQUIRED],
+    PKG_CHECK_MODULES([GTKSPELL], [gtkspell3-3.0 >= $GTKSPELL3_REQUIRED enchant-2 >= $ENCHANT2_REQUIRED],
                       [
                       gtkspell_msg=yes
                       AC_DEFINE(HAVE_GTKSPELL,[1],[GtkSpell support for spellchecking])
diff --git a/pan/gui/group-prefs-dialog.cc b/pan/gui/group-prefs-dialog.cc
index 8bd07a8..5b9296a 100644
--- a/pan/gui/group-prefs-dialog.cc
+++ b/pan/gui/group-prefs-dialog.cc
@@ -22,8 +22,12 @@
 #include <glib.h>
 #include "gtk-compat.h"
 #ifdef HAVE_GTKSPELL
+#if GTKSPELL_VERSION == 3
+#include <enchant-2/enchant.h>
+#else
 #include <enchant/enchant.h>
 #endif
+#endif
 #include <pan/general/debug.h>
 #include <pan/general/macros.h>
 #include <pan/data/data.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]