[gnome-software] build: Add option to enable/disable reviews



commit 86fddba1c182701d9021ee768079a8aa5a4c713f
Author: Joaquim Rocha <jrocha endless com>
Date:   Tue Mar 15 16:28:26 2016 +0100

    build: Add option to enable/disable reviews

 configure.ac            |    9 +++++++++
 src/plugins/Makefile.am |   10 ++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ef556fd..99110bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -221,6 +221,14 @@ AS_IF([test "x$enable_shell_extensions" = "xyes"], [
 ])
 AM_CONDITIONAL(HAVE_SHELL_EXTENSIONS, [test "x$enable_shell_extensions" = "xyes"])
 
+# Reviews
+AC_ARG_ENABLE(reviews,
+              [AS_HELP_STRING([--enable-reviews],
+                              [enable reviews [default=yes]])],,
+              enable_reviews=yes)
+AM_CONDITIONAL(HAVE_REVIEWS, [test "x$enable_reviews" = "xyes"])
+AC_DEFINE(HAVE_REVIEWS,1,[Build reviews])
+
 # 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=9
@@ -272,4 +280,5 @@ echo "
         XDG-APP support:           ${have_xdg_app}
         Steam support:             ${enable_steam}
         GNOME Shell ext. support:  ${enable_shell_extensions}
+        Reviews support:           ${enable_reviews}
 "
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index d302ad2..fc1280c 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -65,8 +65,10 @@ endif
 
 if HAVE_XDG_APP
 plugin_LTLIBRARIES += libgs_plugin_xdg_app.la
+if HAVE_REVIEWS
 plugin_LTLIBRARIES += libgs_plugin_xdg_app_reviews.la
-endif
+endif # HAVE_REVIEWS
+endif # HAVE_XDG_APP
 
 if HAVE_LIMBA
 plugin_LTLIBRARIES += libgs_plugin_limba.la
@@ -139,11 +141,13 @@ libgs_plugin_xdg_app_la_LIBADD = $(GS_PLUGIN_LIBS) $(XDG_APP_LIBS)
 libgs_plugin_xdg_app_la_LDFLAGS = -module -avoid-version
 libgs_plugin_xdg_app_la_CFLAGS = $(GS_PLUGIN_CFLAGS) $(WARN_CFLAGS)
 
+if HAVE_REVIEWS
 libgs_plugin_xdg_app_reviews_la_SOURCES = gs-plugin-xdg-app-reviews.c
 libgs_plugin_xdg_app_reviews_la_LIBADD = $(GS_PLUGIN_LIBS) $(JSON_GLIB_LIBS)
 libgs_plugin_xdg_app_reviews_la_LDFLAGS = -module -avoid-version
 libgs_plugin_xdg_app_reviews_la_CFLAGS = $(GS_PLUGIN_CFLAGS) $(WARN_CFLAGS)
-endif
+endif # HAVE_REVIEWS
+endif # HAVE_XDG_APP
 
 if HAVE_STEAM
 libgs_plugin_steam_la_SOURCES = gs-plugin-steam.c
@@ -186,11 +190,13 @@ libgs_plugin_hardcoded_blacklist_la_LIBADD = $(GS_PLUGIN_LIBS)
 libgs_plugin_hardcoded_blacklist_la_LDFLAGS = -module -avoid-version
 libgs_plugin_hardcoded_blacklist_la_CFLAGS = $(GS_PLUGIN_CFLAGS) $(WARN_CFLAGS)
 
+if HAVE_REVIEWS
 libgs_plugin_ubuntu_reviews_la_SOURCES =               \
        gs-plugin-ubuntu-reviews.c
 libgs_plugin_ubuntu_reviews_la_LIBADD = $(GS_PLUGIN_LIBS) $(SOUP_LIBS) $(JSON_GLIB_LIBS) $(SQLITE_LIBS)
 libgs_plugin_ubuntu_reviews_la_LDFLAGS = -module -avoid-version
 libgs_plugin_ubuntu_reviews_la_CFLAGS = $(GS_PLUGIN_CFLAGS) $(WARN_CFLAGS)
+endif # HAVE_REVIEWS
 
 libgs_plugin_packagekit_la_SOURCES =                   \
        gs-plugin-packagekit.c                          \


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