[libpeas] Remove support for gjs-based Javascript plugins



commit 730edb65d6da0ebd0bd7065aeb9435b31d304b08
Author: Garrett Regier <garrettregier gmail com>
Date:   Tue Nov 12 23:56:39 2013 -0800

    Remove support for gjs-based Javascript plugins
    
    There have been changes to the gjs bindings and as the issue
    has only recently been noticed it is assumed that support for
    them is not highly desired.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711356

 .gitignore                                         |    7 -
 configure.ac                                       |   44 +--
 libpeas/peas-extension-base.c                      |    4 +-
 loaders/Makefile.am                                |    4 -
 loaders/gjs/Makefile.am                            |   25 --
 loaders/gjs/peas-extension-gjs.c                   |  427 --------------------
 loaders/gjs/peas-extension-gjs.h                   |   60 ---
 loaders/gjs/peas-plugin-loader-gjs.c               |  396 ------------------
 loaders/gjs/peas-plugin-loader-gjs.h               |   55 ---
 peas-demo/peas-demo.c                              |    1 -
 peas-demo/plugins/Makefile.am                      |    4 -
 peas-demo/plugins/gjshello/Makefile.am             |    7 -
 peas-demo/plugins/gjshello/gjshello.js             |   36 --
 peas-demo/plugins/gjshello/gjshello.plugin         |    8 -
 tests/libpeas/Makefile.am                          |    6 -
 tests/libpeas/extension-gjs.c                      |   57 ---
 tests/libpeas/plugins/Makefile.am                  |   13 +-
 .../plugins/extension-gjs-nonexistent.plugin       |    8 -
 tests/libpeas/plugins/extension-js/Makefile.am     |   31 --
 .../plugins/extension-js/extension-js.plugin       |    8 -
 tests/libpeas/plugins/extension-seed/Makefile.am   |    8 +
 .../extension-seed.gschema.xml}                    |    2 +-
 .../extension-seed.js}                             |    0
 .../plugins/extension-seed/extension-seed.plugin   |    8 +
 24 files changed, 25 insertions(+), 1194 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c749a1c..e080ec9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -75,18 +75,11 @@ Makefile.in
 /tests/*/vgdump-*
 /tests/libpeas/engine
 /tests/libpeas/extension-c
-/tests/libpeas/extension-gjs
 /tests/libpeas/extension-python
 /tests/libpeas/extension-python3
 /tests/libpeas/extension-seed
 /tests/libpeas/extension-set
 /tests/libpeas/plugin-info
-/tests/libpeas/plugins/extension-js/extension-gjs.gschema.xml
-/tests/libpeas/plugins/extension-js/extension-gjs.js
-/tests/libpeas/plugins/extension-js/extension-gjs.plugin
-/tests/libpeas/plugins/extension-js/extension-seed.gschema.xml
-/tests/libpeas/plugins/extension-js/extension-seed.js
-/tests/libpeas/plugins/extension-js/extension-seed.plugin
 /tests/libpeas/plugins/extension-python/extension-python.gschema.xml
 /tests/libpeas/plugins/extension-python/extension-python.plugin
 /tests/libpeas/plugins/extension-python/extension-python.py
diff --git a/configure.ac b/configure.ac
index d2b862b..2c3ba51 100644
--- a/configure.ac
+++ b/configure.ac
@@ -268,43 +268,6 @@ fi
 AM_CONDITIONAL([ENABLE_SEED],[test "x$found_seed" = "xyes"])
 
 dnl ================================================================
-dnl GJS Javascript Engine
-dnl ================================================================
-
-GJS_REQUIRED=1.37.1
-
-AC_ARG_ENABLE(gjs,
-             AS_HELP_STRING([--enable-gjs],[Enable GJS support]),
-             [enable_gjs=$enableval],
-             [enable_gjs=auto])
-
-AC_MSG_CHECKING([for GJS JS availability.])
-
-if test "x$enable_gjs" = "xno"; then
-       found_gjs="no (disabled, use --enable-gjs to enable)"
-else
-       PKG_CHECK_EXISTS([gjs-internals-1.0 >= $GJS_REQUIRED],
-                        [found_gjs=yes],
-                        [found_gjs=no])
-fi
-
-if test "$enable_gjs" = "yes" -a "$found_gjs" = "no"; then
-       AC_MSG_ERROR([You need to have gjs-internals-1.0 >= $GJS_REQUIRED installed to build libpeas])
-fi
-AC_MSG_RESULT([$found_gjs])
-
-if test "$found_gjs" = "yes"; then
-       GJS_CFLAGS=`$PKG_CONFIG --cflags gjs-internals-1.0`
-       GJS_LIBS=`$PKG_CONFIG --libs gjs-internals-1.0`
-       AC_SUBST(GJS_CFLAGS)
-       AC_SUBST(GJS_LIBS)
-
-       AC_DEFINE(ENABLE_GJS,1,[Define to compile with GJS support])
-fi
-
-AM_CONDITIONAL([ENABLE_GJS],[test "x$found_gjs" = "xyes"])
-
-dnl ================================================================
 dnl Python
 dnl ================================================================
 
@@ -474,7 +437,6 @@ docs/reference/version.xml
 libpeas/Makefile
 libpeas-gtk/Makefile
 loaders/Makefile
-loaders/gjs/Makefile
 loaders/python/Makefile
 loaders/python3/Makefile
 loaders/seed/Makefile
@@ -485,7 +447,6 @@ data/libpeas-1.0.pc
 data/libpeas-gtk-1.0.pc
 peas-demo/Makefile
 peas-demo/plugins/Makefile
-peas-demo/plugins/gjshello/Makefile
 peas-demo/plugins/helloworld/Makefile
 peas-demo/plugins/pythonhello/Makefile
 peas-demo/plugins/secondtime/Makefile
@@ -495,8 +456,8 @@ tests/Makefile
 tests/libpeas/Makefile
 tests/libpeas/plugins/Makefile
 tests/libpeas/plugins/extension-c/Makefile
-tests/libpeas/plugins/extension-js/Makefile
 tests/libpeas/plugins/extension-python/Makefile
+tests/libpeas/plugins/extension-seed/Makefile
 tests/libpeas/introspection/Makefile
 tests/libpeas/testing/Makefile
 tests/libpeas-gtk/Makefile
@@ -531,6 +492,5 @@ Languages support:
 
         Python 2 support              : ${found_python2}
         Python 3 support              : ${found_python3}
-        Javascript support (Seed)     : ${found_seed}
-        Javascript support (GJS)      : ${found_gjs}
+        Seed Javascript support       : ${found_seed}
 "
diff --git a/libpeas/peas-extension-base.c b/libpeas/peas-extension-base.c
index dccface..882862b 100644
--- a/libpeas/peas-extension-base.c
+++ b/libpeas/peas-extension-base.c
@@ -37,8 +37,8 @@
  * access the related #PeasPluginInfo, and especially the location where all
  * the data of your plugin lives.
  *
- * Non-C extensions will usually not inherit from this class: Python, Seed
- * and GJS plugins automatically get a "plugin_info" attribute that serves
+ * Non-C extensions will usually not inherit from this class: Python and
+ * Seed plugins automatically get a "plugin_info" attribute that serves
  * the same purpose.
  **/
 
diff --git a/loaders/Makefile.am b/loaders/Makefile.am
index dd5ac86..dc9cb45 100644
--- a/loaders/Makefile.am
+++ b/loaders/Makefile.am
@@ -1,9 +1,5 @@
 SUBDIRS =
 
-if ENABLE_GJS
-SUBDIRS += gjs
-endif
-
 if ENABLE_PYTHON2
 SUBDIRS += python
 endif
diff --git a/peas-demo/peas-demo.c b/peas-demo/peas-demo.c
index 50c6a0f..d01031d 100644
--- a/peas-demo/peas-demo.c
+++ b/peas-demo/peas-demo.c
@@ -124,7 +124,6 @@ main (int    argc,
   peas_engine_add_search_path (engine, plugin_dir, plugin_dir);
   g_free (plugin_dir);
 
-  peas_engine_enable_loader (engine, "gjs");
   peas_engine_enable_loader (engine, "python3");
   peas_engine_enable_loader (engine, "seed");
 
diff --git a/peas-demo/plugins/Makefile.am b/peas-demo/plugins/Makefile.am
index d9ea866..5aa1cf4 100644
--- a/peas-demo/plugins/Makefile.am
+++ b/peas-demo/plugins/Makefile.am
@@ -1,9 +1,5 @@
 SUBDIRS = helloworld secondtime
 
-if ENABLE_GJS
-SUBDIRS += gjshello
-endif
-
 if ENABLE_PYTHON3
 SUBDIRS += pythonhello
 endif
diff --git a/tests/libpeas/Makefile.am b/tests/libpeas/Makefile.am
index 1917bde..35d3465 100644
--- a/tests/libpeas/Makefile.am
+++ b/tests/libpeas/Makefile.am
@@ -25,12 +25,6 @@ TEST_PROGS += \
        extension-set   \
        plugin-info
 
-if ENABLE_GJS
-TEST_PROGS            += extension-gjs
-extension_gjs_CFLAGS   = $(GJS_CFLAGS)
-extension_gjs_LDADD    = $(LDADD) $(GJS_LIBS)
-endif
-
 if ENABLE_PYTHON2
 TEST_PROGS               += extension-python
 extension_python_SOURCES  = extension-py.c
diff --git a/tests/libpeas/plugins/Makefile.am b/tests/libpeas/plugins/Makefile.am
index 00d28e4..396a18a 100644
--- a/tests/libpeas/plugins/Makefile.am
+++ b/tests/libpeas/plugins/Makefile.am
@@ -2,14 +2,6 @@ include $(top_srcdir)/tests/Makefile.plugin
 
 SUBDIRS = extension-c
 
-if ENABLE_GJS
-SUBDIRS += extension-js
-else
-if ENABLE_SEED
-SUBDIRS += extension-js
-endif
-endif
-
 if ENABLE_PYTHON3
 SUBDIRS += extension-python
 else
@@ -18,10 +10,13 @@ SUBDIRS += extension-python
 endif
 endif
 
+if ENABLE_SEED
+SUBDIRS += extension-seed
+endif
+
 noinst_PLUGIN = \
        disabled-loader.plugin                  \
        extension-c-nonexistent.plugin          \
-       extension-gjs-nonexistent.plugin        \
        extension-python-nonexistent.plugin     \
        extension-python3-nonexistent.plugin    \
        extension-seed-nonexistent.plugin       \
diff --git a/tests/libpeas/plugins/extension-seed/Makefile.am 
b/tests/libpeas/plugins/extension-seed/Makefile.am
new file mode 100644
index 0000000..8462f69
--- /dev/null
+++ b/tests/libpeas/plugins/extension-seed/Makefile.am
@@ -0,0 +1,8 @@
+include $(top_srcdir)/tests/Makefile.plugin
+
+noinst_PLUGIN = \
+       extension-seed.gschema.xml      \
+       extension-seed.js               \
+       extension-seed.plugin
+
+EXTRA_DIST = $(noinst_PLUGIN)
diff --git a/tests/libpeas/plugins/extension-js/extension-js.gschema.xml 
b/tests/libpeas/plugins/extension-seed/extension-seed.gschema.xml
similarity index 70%
rename from tests/libpeas/plugins/extension-js/extension-js.gschema.xml
rename to tests/libpeas/plugins/extension-seed/extension-seed.gschema.xml
index 043a6ee..bd1e6aa 100644
--- a/tests/libpeas/plugins/extension-js/extension-js.gschema.xml
+++ b/tests/libpeas/plugins/extension-seed/extension-seed.gschema.xml
@@ -1,5 +1,5 @@
 <schemalist>
-  <schema id="extension-JS_LOADER" path="/org/gnome/libpeas/tests/extension-JS_LOADER/">
+  <schema id="extension-seed" path="/org/gnome/libpeas/tests/extension-seed/">
     <key name="a-setting" type="s">
       <default>'Blah'</default>
       <summary>Just a setting.</summary>
diff --git a/tests/libpeas/plugins/extension-js/extension-js.js 
b/tests/libpeas/plugins/extension-seed/extension-seed.js
similarity index 100%
rename from tests/libpeas/plugins/extension-js/extension-js.js
rename to tests/libpeas/plugins/extension-seed/extension-seed.js
diff --git a/tests/libpeas/plugins/extension-seed/extension-seed.plugin 
b/tests/libpeas/plugins/extension-seed/extension-seed.plugin
new file mode 100644
index 0000000..a5de4fe
--- /dev/null
+++ b/tests/libpeas/plugins/extension-seed/extension-seed.plugin
@@ -0,0 +1,8 @@
+[Plugin]
+Module=extension-seed
+Loader=seed
+Name=Extension seed
+Description=This plugin is for the seed PeasExtension tests.
+Authors=Garrett Regier
+Copyright=Copyright © 2011 Garrett Regier
+Website=http://live.gnome.org/Libpeas


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