[gnome-software] build: Bump sysprof dependency and allow building as a subproject



commit 9df47ee07299e2eb3e83d3d2abf33740ed0c40ab
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Jul 7 11:53:07 2020 +0100

    build: Bump sysprof dependency and allow building as a subproject
    
    Bump the sysprof dependency to the new `libsysprof-capture-4.a`, which
    is what’s going to be maintained in future.
    
    Add subproject support, which will make the dependency management a bit
    easier while building, until the new version of sysprof is packaged
    widely.
    
    See https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/484#note_857679
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 lib/meson.build          |  2 +-
 meson.build              | 16 ++++++++++++++--
 subprojects/sysprof.wrap |  4 ++++
 3 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/lib/meson.build b/lib/meson.build
index 8e896163..0ef49367 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -33,7 +33,7 @@ librarydeps = [
   json_glib,
   libm,
   libsoup,
-  sysprof,
+  libsysprof_capture_dep,
   valgrind,
 ]
 
diff --git a/meson.build b/meson.build
index a44a2351..72e935e6 100644
--- a/meson.build
+++ b/meson.build
@@ -110,8 +110,20 @@ json_glib = dependency('json-glib-1.0', version : '>= 1.2.0')
 libm = cc.find_library('m', required: false)
 libsoup = dependency('libsoup-2.4', version : '>= 2.52.0')
 
-sysprof = dependency('sysprof-capture-3', required: get_option('sysprof'))
-conf.set('HAVE_SYSPROF', sysprof.found())
+libsysprof_capture_dep = dependency('sysprof-capture-4',
+  required: get_option('sysprof'),
+  default_options: [
+    'enable_examples=false',
+    'enable_gtk=false',
+    'enable_tests=false',
+    'enable_tools=false',
+    'libsysprof=false',
+    'with_sysprofd=none',
+    'help=false',
+  ],
+  fallback: ['sysprof', 'libsysprof_capture_dep'],
+)
+conf.set('HAVE_SYSPROF', libsysprof_capture_dep.found())
 
 if get_option('mogwai')
   mogwai_schedule_client = dependency('mogwai-schedule-client-0', version : '>= 0.2.0')
diff --git a/subprojects/sysprof.wrap b/subprojects/sysprof.wrap
new file mode 100644
index 00000000..8ee1f973
--- /dev/null
+++ b/subprojects/sysprof.wrap
@@ -0,0 +1,4 @@
+[wrap-git]
+directory=sysprof
+url=https://gitlab.gnome.org/GNOME/sysprof.git
+revision=555ec04e322ec979c84a7a21d09a5afd9c02f672


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