build: Replace deprecated meson functions
Replace deprecated functions with their direct replacements: - dep.get_pkgconfig_variable() → dep.get_variable() - prg.path() → prg.full_path() - source/build_root() → project_source/build_root() In one case we need meson.global_source_root() that was only added in meson 0.58, so bump the requirement to that. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2077>
This commit is contained in:
parent
0d3894c471
commit
daf729de11
@ -41,8 +41,8 @@ configure_file(
|
||||
gnome.gtkdoc('shell',
|
||||
main_sgml: 'shell-docs.sgml',
|
||||
src_dir: [
|
||||
join_paths(meson.source_root(), 'src'),
|
||||
join_paths(meson.build_root(), 'src')
|
||||
join_paths(meson.project_source_root(), 'src'),
|
||||
join_paths(meson.project_build_root(), 'src')
|
||||
],
|
||||
scan_args: [
|
||||
'--ignore-headers=' + ' '.join(private_headers + exclude_directories)
|
||||
|
@ -12,8 +12,8 @@ configure_file(
|
||||
gnome.gtkdoc('st',
|
||||
main_sgml: 'st-docs.sgml',
|
||||
src_dir: [
|
||||
join_paths(meson.source_root(), 'src', 'st'),
|
||||
join_paths(meson.build_root(), 'src', 'st')
|
||||
join_paths(meson.project_source_root(), 'src', 'st'),
|
||||
join_paths(meson.project_build_root(), 'src', 'st')
|
||||
],
|
||||
scan_args: [
|
||||
'--ignore-headers=' + ' '.join(private_headers),
|
||||
|
@ -27,7 +27,7 @@ foreach service, dir : dbus_services
|
||||
|
||||
serviceconf = configuration_data()
|
||||
serviceconf.set('service', service)
|
||||
serviceconf.set('gjs', gjs.path())
|
||||
serviceconf.set('gjs', gjs.full_path())
|
||||
serviceconf.set('pkgdatadir', pkgdatadir)
|
||||
|
||||
configure_file(
|
||||
|
10
meson.build
10
meson.build
@ -1,6 +1,6 @@
|
||||
project('gnome-shell', 'c',
|
||||
version: '41.0',
|
||||
meson_version: '>= 0.53.0',
|
||||
meson_version: '>= 0.58.0',
|
||||
license: 'GPLv2+'
|
||||
)
|
||||
|
||||
@ -65,7 +65,7 @@ servicedir = join_paths(datadir, 'dbus-1', 'services')
|
||||
|
||||
keybindings_dep = dependency('gnome-keybindings', required: false)
|
||||
if keybindings_dep.found()
|
||||
keysdir = keybindings_dep.get_pkgconfig_variable('keysdir', define_variable: ['datadir', datadir])
|
||||
keysdir = keybindings_dep.get_variable('keysdir', pkgconfig_define: ['datadir', datadir])
|
||||
else
|
||||
keysdir = join_paths(datadir, 'gnome-control-center', 'keybindings')
|
||||
endif
|
||||
@ -117,8 +117,8 @@ endif
|
||||
if get_option('systemd')
|
||||
libsystemd_dep = dependency('libsystemd')
|
||||
systemd_dep = dependency('systemd')
|
||||
systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
|
||||
define_variable: ['prefix', prefix])
|
||||
systemduserunitdir = systemd_dep.get_variable('systemduserunitdir',
|
||||
pkgconfig_define: ['prefix', prefix])
|
||||
have_systemd = true
|
||||
else
|
||||
libsystemd_dep = []
|
||||
@ -136,7 +136,7 @@ if get_option('man')
|
||||
endif
|
||||
endif
|
||||
|
||||
mutter_typelibdir = mutter_dep.get_pkgconfig_variable('typelibdir')
|
||||
mutter_typelibdir = mutter_dep.get_variable('typelibdir')
|
||||
python = find_program('python3')
|
||||
gjs = find_program('gjs')
|
||||
|
||||
|
@ -13,7 +13,7 @@ script_data.set('libdir', libdir)
|
||||
script_data.set('libexecdir', libexecdir)
|
||||
script_data.set('pkgdatadir', pkgdatadir)
|
||||
script_data.set('pkglibdir', pkglibdir)
|
||||
script_data.set('PYTHON', python.path())
|
||||
script_data.set('PYTHON', python.full_path())
|
||||
script_data.set('VERSION', meson.project_version())
|
||||
|
||||
script_tools = ['gnome-shell-perf-tool']
|
||||
|
@ -153,7 +153,7 @@ st_enums = gnome.mkenums_simple('st-enum-types',
|
||||
|
||||
st_gir_sources = st_sources + st_headers + st_enums
|
||||
|
||||
data_to_c = find_program(meson.source_root() + '/src/data-to-c.pl')
|
||||
data_to_c = find_program(meson.project_source_root() + '/src/data-to-c.pl')
|
||||
|
||||
glsl_sources = custom_target('scroll-view-fade-glsl',
|
||||
input: ['st-scroll-view-fade.glsl'],
|
||||
@ -165,8 +165,8 @@ glsl_sources = custom_target('scroll-view-fade-glsl',
|
||||
st_nogir_sources = [glsl_sources]
|
||||
|
||||
st_cflags = [
|
||||
'-I@0@/src'.format(meson.source_root()),
|
||||
'-I@0@'.format(meson.build_root()),
|
||||
'-I@0@/src'.format(meson.project_source_root()),
|
||||
'-I@0@'.format(meson.project_build_root()),
|
||||
'-DPREFIX="@0@"'.format(prefix),
|
||||
'-DLIBDIR="@0@"'.format(libdir),
|
||||
'-DG_LOG_DOMAIN="St"',
|
||||
|
@ -9,7 +9,7 @@ endif
|
||||
launcherconf.set('prefix', prefix)
|
||||
launcherconf.set('libdir', libdir)
|
||||
launcherconf.set('pkgdatadir', pkgdatadir)
|
||||
launcherconf.set('gjs', gjs.path())
|
||||
launcherconf.set('gjs', gjs.full_path())
|
||||
|
||||
configure_file(
|
||||
input: prgname + '.in',
|
||||
|
@ -1,6 +1,6 @@
|
||||
project('gnome-extensions-app',
|
||||
version: '41.0',
|
||||
meson_version: '>= 0.53.0',
|
||||
meson_version: '>= 0.58.0',
|
||||
license: 'GPLv2+'
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
project('gnome-extensions-tool', 'c',
|
||||
version: '41.0',
|
||||
meson_version: '>= 0.53.0',
|
||||
meson_version: '>= 0.58.0',
|
||||
license: 'GPLv2+'
|
||||
)
|
||||
|
||||
@ -36,13 +36,13 @@ cc = meson.get_compiler('c')
|
||||
|
||||
bash_completion = dependency('bash-completion', required: get_option('bash_completion'))
|
||||
|
||||
po_dir = meson.source_root() + '/po'
|
||||
po_dir = meson.global_source_root() + '/po'
|
||||
|
||||
subdir('src')
|
||||
|
||||
if bash_completion.found()
|
||||
install_data('completion/bash/gnome-extensions',
|
||||
install_dir: bash_completion.get_pkgconfig_variable('completionsdir', define_variable: ['datadir', datadir])
|
||||
install_dir: bash_completion.get_variable('completionsdir', pkgconfig_define: ['datadir', datadir])
|
||||
)
|
||||
endif
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
project('shew', 'c',
|
||||
version: '41.0',
|
||||
meson_version: '>= 0.53.0',
|
||||
meson_version: '>= 0.58.0',
|
||||
license: 'LGPLv2+',
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ run_test = configure_file(
|
||||
)
|
||||
|
||||
testenv = environment()
|
||||
testenv.set('GSETTINGS_SCHEMA_DIR', join_paths(meson.build_root(), 'data'))
|
||||
testenv.set('GSETTINGS_SCHEMA_DIR', join_paths(meson.project_build_root(), 'data'))
|
||||
|
||||
tests = [
|
||||
'highlighter',
|
||||
|
Loading…
Reference in New Issue
Block a user