[mutter/wip/chergert/sysprof-4-abi] build: bump ABI to sysprof-capture-4



commit 3283bed9dfb6573df8dfab31d8c1b1f9cd7df98d
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jul 4 12:01:28 2020 -0700

    build: bump ABI to sysprof-capture-4
    
    GLib will now be linking against sysprof-capture-4.a. To support that,
    sysprof had to remove the GLib dependency from sysprof-capture-4 which
    had the side-effect of breaking ABi.
    
    This bumps the dependency and includes a fallback to compile just the
    libsysprof-capture-4.a using a subproject wrap.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1352

 meson.build              | 15 ++++++++++++++-
 src/meson.build          |  8 ++++++--
 subprojects/sysprof.wrap |  4 ++++
 3 files changed, 24 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 26a00eaf9a..a3068f2e32 100644
--- a/meson.build
+++ b/meson.build
@@ -279,7 +279,20 @@ endif
 
 have_profiler = get_option('profiler')
 if have_profiler
-  sysprof_dep = dependency('sysprof-capture-3', version: sysprof_req)
+  # libsysprof-capture support
+  sysprof_dep = dependency('sysprof-capture-4',
+    required: true,
+    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'],
+  )
 endif
 
 required_functions = [
diff --git a/src/meson.build b/src/meson.build
index ae286526e6..0ba29e9a7b 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -748,8 +748,12 @@ if have_profiler
     'backends/meta-profiler.h',
   ]
 
-  sysprof_dbus_interfaces_dir = join_paths(sysprof_dep.get_pkgconfig_variable('datadir'), 'dbus-1', 
'interfaces')
-  sysprof3_dbus_file = join_paths(sysprof_dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml')
+  if sysprof_dep.type_name() == 'pkgconfig'
+    sysprof_dbus_interfaces_dir = join_paths(sysprof_dep.get_pkgconfig_variable('datadir'), 'dbus-1', 
'interfaces')
+    sysprof3_dbus_file = join_paths(sysprof_dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml')
+  else
+    sysprof3_dbus_file = org_gnome_Sysprof3_Profiler_xml
+  endif
 
   dbus_sysprof3_profiler_built_sources = gnome.gdbus_codegen('meta-dbus-sysprof3-profiler',
       sysprof3_dbus_file,
diff --git a/subprojects/sysprof.wrap b/subprojects/sysprof.wrap
new file mode 100644
index 0000000000..b1cff4b09f
--- /dev/null
+++ b/subprojects/sysprof.wrap
@@ -0,0 +1,4 @@
+[wrap-git]
+directory=sysprof
+url=https://gitlab.gnome.org/GNOME/sysprof.git
+revision=master


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