[gnome-software] build: Allow hardcoded-popular plugin to be disabled



commit 9a00b563a94d9e0af16defd4b70dd62d8b9a533f
Author: Philip Withnall <withnall endlessm com>
Date:   Fri May 31 17:07:17 2019 +0100

    build: Allow hardcoded-popular plugin to be disabled
    
    Distros might want to completely control the list of popular apps, and
    since all the API and metadata is set up to make the list additive
    (removing things from it is hard), we need a way to be able to disable
    the hardcoded plugin.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 meson_options.txt        |  1 +
 plugins/core/meson.build | 32 +++++++++++++++++---------------
 2 files changed, 18 insertions(+), 15 deletions(-)
---
diff --git a/meson_options.txt b/meson_options.txt
index 99f28f6d..daf5bca4 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -16,3 +16,4 @@ option('snap', type : 'boolean', value : false, description : 'enable Snap suppo
 option('external_appstream', type : 'boolean', value : false, description : 'enable external AppStream 
support')
 option('valgrind', type : 'boolean', value : true, description : 'enable Valgrind debugging integration')
 option('gtk_doc', type : 'boolean', value : true, description : 'enable API reference')
+option('hardcoded_popular', type : 'boolean', value : true, description : 'enable hardcoded-popular apps 
plugin')
diff --git a/plugins/core/meson.build b/plugins/core/meson.build
index 0c935b46..3920f61e 100644
--- a/plugins/core/meson.build
+++ b/plugins/core/meson.build
@@ -173,21 +173,23 @@ shared_module(
   ]
 )
 
-shared_module(
-  'gs_plugin_hardcoded-popular',
-  sources : 'gs-plugin-hardcoded-popular.c',
-  include_directories : [
-    include_directories('../..'),
-    include_directories('../../lib'),
-  ],
-  install : true,
-  install_dir: plugin_dir,
-  c_args : cargs,
-  dependencies : plugin_libs,
-  link_with : [
-    libgnomesoftware
-  ]
-)
+if get_option('hardcoded_popular')
+  shared_module(
+    'gs_plugin_hardcoded-popular',
+    sources : 'gs-plugin-hardcoded-popular.c',
+    include_directories : [
+      include_directories('../..'),
+      include_directories('../../lib'),
+    ],
+    install : true,
+    install_dir: plugin_dir,
+    c_args : cargs,
+    dependencies : plugin_libs,
+    link_with : [
+      libgnomesoftware
+    ]
+  )
+endif
 
 shared_module(
   'gs_plugin_hardcoded-featured',


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