1
0
Fork 0

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
This commit is contained in:
Christian Hergert 2020-07-04 12:01:28 -07:00
parent ca64a308eb
commit 2c08eb6d16
4 changed files with 27 additions and 5 deletions

1
.gitignore vendored
View file

@ -103,3 +103,4 @@ doc/reference/meta.types
.dirstamp .dirstamp
**/tags.* **/tags.*
build/ build/
subprojects/sysprof/

View file

@ -1,6 +1,6 @@
project('mutter', 'c', project('mutter', 'c',
version: '3.37.3', version: '3.37.3',
meson_version: '>= 0.50.0', meson_version: '>= 0.51.0',
license: 'GPLv2+' license: 'GPLv2+'
) )
@ -53,7 +53,7 @@ gbm_req = '>= 10.3'
libpipewire_req = '>= 0.3.0' libpipewire_req = '>= 0.3.0'
# profiler requirements # profiler requirements
sysprof_req = '>= 3.35.2' sysprof_req = '>= 3.37.2'
gnome = import('gnome') gnome = import('gnome')
pkg = import('pkgconfig') pkg = import('pkgconfig')
@ -279,7 +279,20 @@ endif
have_profiler = get_option('profiler') have_profiler = get_option('profiler')
if have_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 endif
required_functions = [ required_functions = [

View file

@ -748,9 +748,13 @@ if have_profiler
'backends/meta-profiler.h', 'backends/meta-profiler.h',
] ]
sysprof_dbus_interfaces_dir = join_paths(sysprof_dep.get_pkgconfig_variable('datadir'), 'dbus-1', 'interfaces') if sysprof_dep.type_name() == 'pkgconfig'
sysprof3_dbus_file = join_paths(sysprof_dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml') sysprof_dbus_interfaces_dir = join_paths(sysprof_dep.get_pkgconfig_variable('datadir'), 'dbus-1', 'interfaces')
else
sysprof_dbus_interfaces_dir = join_paths(meson.source_root(), 'subprojects', 'sysprof', 'src')
endif
sysprof3_dbus_file = join_paths(sysprof_dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml')
dbus_sysprof3_profiler_built_sources = gnome.gdbus_codegen('meta-dbus-sysprof3-profiler', dbus_sysprof3_profiler_built_sources = gnome.gdbus_codegen('meta-dbus-sysprof3-profiler',
sysprof3_dbus_file, sysprof3_dbus_file,
interface_prefix: 'org.gnome.', interface_prefix: 'org.gnome.',

4
subprojects/sysprof.wrap Normal file
View file

@ -0,0 +1,4 @@
[wrap-git]
directory=sysprof
url=https://gitlab.gnome.org/GNOME/sysprof.git
revision=cae28263ff5dd4a510d82f3dc2e3a3b3d9b386fb