[pan] Gtk3 is now default build, Gtk2 is deprecated



commit 0ff10e703961e3051bffee46a81ca506fd19c684
Author: Dominique Dumont <dod debian org>
Date:   Sun Jan 9 18:35:42 2022 +0100

    Gtk3 is now default build, Gtk2 is deprecated

 .gitlab-ci.yml |  4 ++--
 README.org     |  3 ++-
 configure.ac   | 48 ++++++++++++++++++++++++------------------------
 3 files changed, 28 insertions(+), 27 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ec4fc70..32d01e2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -28,7 +28,7 @@ build-ubuntu-gtk2:
     - head -15 configure.ac
     - mkdir _build
     - cd _build
-    - ../autogen.sh --without-gtk3 --with-gnutls --with-dbus --with-gmime-crypto --without-gtkspell 
--enable-libnotify --enable-gkr --enable-manual
+    - ../autogen.sh --with-gtk2 --with-gnutls --with-dbus --with-gmime-crypto --without-gtkspell 
--enable-libnotify --enable-gkr --enable-manual
     - make
     - make distcheck
 
@@ -60,6 +60,6 @@ build-ubuntu-gtk3:
   script:
     - mkdir _build
     - cd _build
-    - ../autogen.sh --with-gtk3 --with-gnutls --with-dbus --with-gmime-crypto --with-gtkspell 
--enable-libnotify --enable-gkr --enable-manual
+    - ../autogen.sh --with-gnutls --with-dbus --with-gmime-crypto --with-gtkspell --enable-libnotify 
--enable-gkr --enable-manual
     - make
     - make dist
diff --git a/README.org b/README.org
index 5eaa26c..87badc3 100644
--- a/README.org
+++ b/README.org
@@ -72,7 +72,7 @@ Pan requires these libraries:
 
 - [[http://developer.gnome.org/glib/][GLib]] 2.17.6 or higher
   (optionally GLib 2.26.0 or higher to support multiple Pan instances)
-- [[http://www.gtk.org/][GTK+]] 2.16.0 or higher (optionally GTK+ 3.0.0 or higher)
+- [[http://www.gtk.org/][GTK+]] 3.0.0 or higher (GTk2 support is deprecated)
 - [[http://spruce.sourceforge.net/gmime/][GMime]] 3.0.0 or higher (optionally with PGP cryptography support)
 
 The following libraries add extra features but are optional:
@@ -97,6 +97,7 @@ The following librairies are deprecated and will be removed in future
 releases:
 
 - [[https://gitlab.gnome.org/GNOME/gmime][GMime]] 2.6.20 or higher (optionally with PGP cryptography support)
+- Gtk2
 
 Run the following command to get a list of all options that you can
 enable or disable at configure (or autogen) time:
diff --git a/configure.ac b/configure.ac
index 17588fa..78ac988 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,9 +150,20 @@ AC_ARG_WITH([gtkspell],
 
 dnl GTK+ 3, GtkSpell 3, and Enchant support
 gtk_msg=no
-AC_ARG_WITH([gtk3],
-  AS_HELP_STRING([--with-gtk3],[enable GTK+ 3 support (normally: no)]), [want_gtk3=$withval], [want_gtk3=no])
-if test "x$want_gtk3" = "xyes" ; then
+AC_ARG_WITH([gtk2],
+  AS_HELP_STRING([--with-gtk2],[enable GTK 2 support (deprecated, normally: no)]), [want_gtk2=$withval], 
[want_gtk2=no])
+if test "x$want_gtk2" = "xyes" ; then
+   if test "x$want_gtkspell" = "xyes" ; then
+   PKG_CHECK_MODULES([GTKSPELL],[gtkspell-2.0 >= $GTKSPELL_REQUIRED enchant >= $ENCHANT_REQUIRED],
+                      [GTKSPELL_VER=`pkg-config --modversion gtkspell-2.0 enchant | xargs`
+                      gtkspell_msg="yes ($GTKSPELL_VER)"
+                      AC_DEFINE(HAVE_GTKSPELL,[1],[GtkSpell support for spellchecking])
+                      AC_DEFINE(GTKSPELL_VERSION,[2],[GtkSpell API version])],
+                      [gtkspell_msg=no
+                      AC_MSG_RESULT(no)])
+   fi
+   PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= $GTK_REQUIRED, gthread-2.0])
+else
   PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= $GTK3_REQUIRED],
                     [GTK_VER=`pkg-config --modversion gtk+-3.0`
                     gtk_msg="yes ($GTK_VER)"
@@ -167,17 +178,6 @@ if test "x$want_gtk3" = "xyes" ; then
                       [gtkspell_msg=no
                       AC_MSG_RESULT(no)])
   fi
-else
-   if test "x$want_gtkspell" = "xyes" ; then
-   PKG_CHECK_MODULES([GTKSPELL],[gtkspell-2.0 >= $GTKSPELL_REQUIRED enchant >= $ENCHANT_REQUIRED],
-                      [GTKSPELL_VER=`pkg-config --modversion gtkspell-2.0 enchant | xargs`
-                      gtkspell_msg="yes ($GTKSPELL_VER)"
-                      AC_DEFINE(HAVE_GTKSPELL,[1],[GtkSpell support for spellchecking])
-                      AC_DEFINE(GTKSPELL_VERSION,[2],[GtkSpell API version])],
-                      [gtkspell_msg=no
-                      AC_MSG_RESULT(no)])
-   fi
-   PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= $GTK_REQUIRED, gthread-2.0])
 fi
 
 AC_SUBST(ENCHANT_CFLAGS)
@@ -186,11 +186,11 @@ AC_SUBST(ENCHANT_LIBS)
 dnl WebKitGTK+ support
 AC_ARG_WITH([webkit],
   AS_HELP_STRING([--with-webkit],[enable WebKitGTK+ support (experimental, normally: no)]), 
[want_webkit=$withval], [want_webkit=no])
-if test "x$want_gtk3" = "xyes" ; then
+if test "x$want_gtk2" = "xyes" ; then
   if test "x$want_webkit" = "xyes" ; then
-    PKG_CHECK_MODULES([WEBKITGTK],[webkitgtk-3.0 >= $WEBKIT_REQUIRED],
+    PKG_CHECK_MODULES([WEBKITGTK], [webkitgtk-1.0 >= $WEBKIT_REQUIRED],
     [
-    AC_DEFINE(HAVE_WEBKIT,[1],[WebKit support (3.0) for embedded HTML])
+    AC_DEFINE(HAVE_WEBKIT,[1],[WebKit support (1.0) for embedded HTML])
     ],
     [
     AC_MSG_RESULT(no)
@@ -198,9 +198,9 @@ if test "x$want_gtk3" = "xyes" ; then
   fi
 else
   if test "x$want_webkit" = "xyes" ; then
-    PKG_CHECK_MODULES([WEBKITGTK], [webkitgtk-1.0 >= $WEBKIT_REQUIRED],
+    PKG_CHECK_MODULES([WEBKITGTK],[webkitgtk-3.0 >= $WEBKIT_REQUIRED],
     [
-    AC_DEFINE(HAVE_WEBKIT,[1],[WebKit support (1.0) for embedded HTML])
+    AC_DEFINE(HAVE_WEBKIT,[1],[WebKit support (3.0) for embedded HTML])
     ],
     [
     AC_MSG_RESULT(no)
@@ -241,16 +241,16 @@ dnl Check for libsecret and gcr (GTK+ 3 only) or GNOME Keyring if user-enabled f
 AC_ARG_ENABLE([gkr],
   AS_HELP_STRING([--enable-gkr],[enable GNOME Keyring or libsecret support (normally: 
no)]),[enable_gkr=$enableval],[enable_gkr=no])
 if test "x$enable_gkr" = "xyes" ; then
-  if test "x$want_gtk3" = "xyes" ; then
-    PKG_CHECK_MODULES([LIBGNOME_KEYRING_1],[libsecret-1 >= $LIBSECRET_REQUIRED gcr-3 >= $GCR_REQUIRED],
-    [LIBSECRET_VER=`pkg-config --modversion libsecret-1 gcr-3 | xargs`
+  if test "x$want_gtk2" = "xyes" ; then
+    PKG_CHECK_MODULES([LIBGNOME_KEYRING_1],[gnome-keyring-1 >= $LIBGKR_REQUIRED],
+    [LIBSECRET_VER=`pkg-config --modversion gnome-keyring-1`
     gkr_msg="yes ($LIBSECRET_VER)"
     AC_DEFINE(HAVE_GKR,[1],[GNOME Keyring or libsecret support for password storage])],
     [gkr_msg=no
     AC_MSG_RESULT(no)])
   else
-    PKG_CHECK_MODULES([LIBGNOME_KEYRING_1],[gnome-keyring-1 >= $LIBGKR_REQUIRED],
-    [LIBSECRET_VER=`pkg-config --modversion gnome-keyring-1`
+    PKG_CHECK_MODULES([LIBGNOME_KEYRING_1],[libsecret-1 >= $LIBSECRET_REQUIRED gcr-3 >= $GCR_REQUIRED],
+    [LIBSECRET_VER=`pkg-config --modversion libsecret-1 gcr-3 | xargs`
     gkr_msg="yes ($LIBSECRET_VER)"
     AC_DEFINE(HAVE_GKR,[1],[GNOME Keyring or libsecret support for password storage])],
     [gkr_msg=no


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