[geany/geany-plugins] 3d02ec: Spellcheck: support new "enchant-2" package name

Enrico Tröger git-noreply at xxxxx
Sat Mar 17 14:43:26 UTC 2018


Branch:      refs/heads/master
Author:      Enrico Tröger <enrico.troeger at uvena.de>
Committer:   Enrico Tröger <enrico.troeger at uvena.de>
Date:        Sat, 17 Mar 2018 14:43:26 UTC
Commit:      3d02ec2a2b0d3ccfeb28503534b95e60861e6fe8
             https://github.com/geany/geany-plugins/commit/3d02ec2a2b0d3ccfeb28503534b95e60861e6fe8

Log Message:
-----------
Spellcheck: support new "enchant-2" package name

Fixes #728.


Modified Paths:
--------------
    build/spellcheck.m4

Modified: build/spellcheck.m4
31 lines changed, 24 insertions(+), 7 deletions(-)
===================================================================
@@ -2,17 +2,34 @@ AC_DEFUN([GP_CHECK_SPELLCHECK],
 [
     GP_ARG_DISABLE([spellcheck], [auto])
 
+    ENCHANT_PACKAGE_NAME=enchant-2
     ENCHANT_VERSION=1.3
     ENCHANT_VERSION_1_5=1.5
     ENCHANT_VERSION_2_0=2.0
-    PKG_CHECK_MODULES([ENCHANT_1_5], [enchant >= ${ENCHANT_VERSION_1_5}],
-                      have_enchant_1_5=yes,
-                      have_enchant_1_5=no)
-    PKG_CHECK_MODULES([ENCHANT_2_0], [enchant >= ${ENCHANT_VERSION_2_0}],
-                      have_enchant_2_0=yes,
-                      have_enchant_2_0=no)
+    ENCHANT_VERSION_2_2=2.2
+
+    # check for enchant package
+    PKG_CHECK_MODULES([ENCHANT_2_2], [${ENCHANT_PACKAGE_NAME} >= ${ENCHANT_VERSION_2_2}],
+                      have_enchant_2_2=yes,
+                      have_enchant_2_2=no)
+    if [[ x"$have_enchant_2_2" = "xyes" ]]; then
+        # we have got the new enchant-2 package
+        have_enchant_1_5=yes
+        have_enchant_2_0=yes
+    else
+        # check for old enchant package
+        PKG_CHECK_MODULES([ENCHANT_1_5], [enchant >= ${ENCHANT_VERSION_1_5}],
+                          have_enchant_1_5=yes,
+                          have_enchant_1_5=no)
+        PKG_CHECK_MODULES([ENCHANT_2_0], [enchant >= ${ENCHANT_VERSION_2_0}],
+                          have_enchant_2_0=yes,
+                          have_enchant_2_0=no)
+
+        ENCHANT_PACKAGE_NAME=enchant
+    fi
+
     GP_CHECK_PLUGIN_DEPS([spellcheck], [ENCHANT],
-                         [enchant >= ${ENCHANT_VERSION}])
+                         [${ENCHANT_PACKAGE_NAME} >= ${ENCHANT_VERSION}])
 
     AM_CONDITIONAL([HAVE_ENCHANT_1_5], [test "$have_enchant_1_5" = yes])
     AM_CONDITIONAL([HAVE_ENCHANT_2_0], [test "$have_enchant_2_0" = yes])



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list