[gnome-software/wip/hughsie/flatpak] Make the webapp support optional



commit 2cac60c53dd7b5253b33cc39f743c3c69081de2d
Author: Richard Hughes <richard hughsie com>
Date:   Fri Jul 22 15:41:55 2016 +0100

    Make the webapp support optional

 configure.ac            |    8 ++++++++
 src/gs-self-test.c      |    4 ++++
 src/plugins/Makefile.am |    5 ++++-
 3 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ae005bc..d474b31 100644
--- a/configure.ac
+++ b/configure.ac
@@ -333,6 +333,13 @@ AS_IF([test "x$enable_ubuntu_reviews" = "xyes"], [
 AM_CONDITIONAL(HAVE_UBUNTU_REVIEWS, [test "x$enable_ubuntu_reviews" = "xyes"])
 AC_DEFINE(HAVE_UBUNTU_REVIEWS,1,[Build Ubuntu reviews])
 
+# Webapps
+AC_ARG_ENABLE(webapps,
+              [AS_HELP_STRING([--enable-webapps],
+                              [enable webapps [default=yes]])],,
+              enable_webapps=yes)
+AM_CONDITIONAL(HAVE_WEBAPPS, [test "x$enable_webapps" = "xyes"])
+
 # this refers to the gnome-software plugin API version
 # this is not in any way related to a package or soname version
 GS_PLUGIN_API_VERSION=11
@@ -392,5 +399,6 @@ echo "
         Steam support:             ${enable_steam}
         GNOME Shell ext. support:  ${enable_shell_extensions}
         ODRS support:              ${enable_odrs}
+        Webapps support:           ${enable_webapps}
         Ubuntu Reviews support:    ${enable_ubuntu_reviews}
 "
diff --git a/src/gs-self-test.c b/src/gs-self-test.c
index 6f6150f..56ab380 100644
--- a/src/gs-self-test.c
+++ b/src/gs-self-test.c
@@ -518,6 +518,10 @@ gs_plugin_loader_webapps_func (GsPluginLoader *plugin_loader)
        g_autoptr(GError) error = NULL;
        g_autoptr(GsApp) app = NULL;
 
+       /* no epiphany, abort */
+       if (!gs_plugin_loader_get_enabled (plugin_loader, "epiphany"))
+               return;
+
        /* a webapp with a local icon */
        app = gs_app_new ("arachne.desktop");
        gs_app_set_kind (app, AS_APP_KIND_WEB_APP);
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 75abf3d..f021cae 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -43,7 +43,6 @@ plugin_LTLIBRARIES =                                  \
        libgs_plugin_provenance-license.la              \
        libgs_plugin_repos.la                           \
        libgs_plugin_fedora-tagger-usage.la             \
-       libgs_plugin_epiphany.la                        \
        libgs_plugin_icons.la                           \
        libgs_plugin_snap.la                            \
        libgs_plugin_ubuntuone.la
@@ -62,6 +61,10 @@ plugin_LTLIBRARIES +=                                        \
        libgs_plugin_packagekit.la
 endif
 
+if HAVE_WEBAPPS
+plugin_LTLIBRARIES += libgs_plugin_epiphany.la
+endif
+
 if HAVE_UBUNTU_REVIEWS
 plugin_LTLIBRARIES += libgs_plugin_ubuntu-reviews.la
 endif


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