[gedit-plugins] charmap: enable only if the gucharmap library is installed



commit 3d215c49c4fe738aa341c8f39120a0ff0c99bd22
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Tue Aug 5 14:56:40 2014 +0200

    charmap: enable only if the gucharmap library is installed

 configure.ac                |   15 ++++++++++++++-
 plugins/charmap/Makefile.am |    2 +-
 2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d3a462a..f519198 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,7 +90,7 @@ AC_ARG_ENABLE([verify-all],
 C_PLUGINS="bookmarks drawspaces wordcompletion"
 
 # Python plugins that don't need special dependencies, besides python
-PY_PLUGINS="bracketcompletion charmap codecomment colorpicker colorschemer commander dashboard joinlines 
multiedit smartspaces textsize"
+PY_PLUGINS="bracketcompletion codecomment colorpicker colorschemer commander dashboard joinlines multiedit 
smartspaces textsize"
 
 PLUGINS="$C_PLUGINS"
 disabled_plugins=""
@@ -161,6 +161,18 @@ then
        fi
 
        # ================================================================
+       # Charmap (Gucharmap)
+       # ================================================================
+       if `$PYTHON -c "import gi; gi.require_version('Gucharmap', '2.90')" 2>/dev/null`;
+       then
+               have_gucharmap=yes
+               PLUGINS="$PLUGINS charmap"
+       else
+               have_gucharmap=no
+               disabled_plugins="$disabled_plugins charmap (gucharmap not found)"
+       fi
+
+       # ================================================================
        # Git (libgit2-glib)
        # ================================================================
        LIBGIT2_GLIB_REQUIRED=0.0.6
@@ -180,6 +192,7 @@ fi
 
 AM_CONDITIONAL([ENABLE_SYNCTEX], test "x$have_synctex" = "xyes")
 AM_CONDITIONAL([ENABLE_TERMINAL], test "x$have_vte" = "xyes")
+AM_CONDITIONAL([ENABLE_CHARMAP], test "x$have_gucharmap" = "xyes")
 AM_CONDITIONAL([ENABLE_GIT], test "x$have_git2" = "xyes")
 
 AC_SUBST(PLUGINS)
diff --git a/plugins/charmap/Makefile.am b/plugins/charmap/Makefile.am
index 8ce7f0b..ab43553 100644
--- a/plugins/charmap/Makefile.am
+++ b/plugins/charmap/Makefile.am
@@ -1,4 +1,4 @@
-if ENABLE_PYTHON
+if ENABLE_CHARMAP
 plugins_charmapdir = $(plugindir)/charmap
 plugins_charmap_PYTHON =                       \
        plugins/charmap/charmap/__init__.py     \


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