Revert "build: Use fs.copyfile() instead of configure_file()"

This reverts commit 19353017a7.

The freedesktop SDK, which is used by gnome-build-meta, only has Meson
0.63. Bumping GLib’s Meson dependency to 0.64 means that, at the moment,
GLib is not buildable in gnome-build-meta and hence can’t be tested in
nightly pipelines against other projects, etc.

That’s bad for testing GLib.

It’s arguably bad that we’re restricted to using an older version of
Meson than shipped by Debian Testing, but that’s a separate discussion
to be had.

Revert the Meson 0.64 dependency until the freedesktop SDK ships Meson ≥
0.64. This also means reverting the simplifications to use of
`gnome.mkenum_simple()`.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3077#note_1601064
This commit is contained in:
Philip Withnall 2022-11-24 12:09:55 +00:00
parent b646b1cab7
commit b4231844a2
5 changed files with 24 additions and 25 deletions

View File

@ -155,7 +155,11 @@ if get_option('gtk_doc')
command : [concat_files_helper, '@OUTPUT@', '@INPUT@'],
)
fs.copyfile(platform_file, 'gio-docs-platform.xml')
configure_file(
output : 'gio-docs-platform.xml',
input : platform_file,
copy : true,
)
content_files = [
'overview.xml',

View File

@ -28,17 +28,18 @@ meson.override_find_program('gdbus-codegen', gdbus_codegen)
codegen_dir = join_paths(glib_datadir, 'glib-2.0', 'codegen')
gdbus_codegen_depend_files = configure_file(input : 'config.py.in',
gdbus_codegen_built_files = []
gdbus_codegen_built_files += configure_file(input : 'config.py.in',
output : 'config.py',
install_dir : codegen_dir,
install_tag : 'bin-devel',
configuration : gdbus_codegen_conf)
gdbus_codegen_depends = []
foreach f : gdbus_codegen_files
# Copy these into the builddir so that gdbus-codegen can be used uninstalled
# and then install it too so that it can be used after installation
gdbus_codegen_depends += fs.copyfile(f,
install_dir : codegen_dir,
install_tag : 'bin-devel')
gdbus_codegen_built_files += configure_file(input : f, output : f,
install_dir : codegen_dir,
install_tag : 'bin-devel',
copy : true)
endforeach

View File

@ -240,8 +240,7 @@ xdp_dbus_generated = custom_target('xdp-dbus',
'org.freedesktop.portal.ProxyResolver.xml',
'org.freedesktop.portal.Trash.xml'],
output : ['xdp-dbus.h', 'xdp-dbus.c'],
depends : gdbus_codegen_depends,
depend_files : gdbus_codegen_depend_files,
depend_files : gdbus_codegen_built_files,
command : [python, gdbus_codegen,
'--interface-prefix', 'org.freedesktop.portal.',
'--output-directory', '@OUTDIR@',
@ -253,8 +252,7 @@ xdp_dbus_generated = custom_target('xdp-dbus',
gdbus_daemon_generated = custom_target('gdbus-daemon-generated',
input : ['dbus-daemon.xml'],
output : ['gdbus-daemon-generated.h', 'gdbus-daemon-generated.c'],
depends : gdbus_codegen_depends,
depend_files : gdbus_codegen_depend_files,
depend_files : gdbus_codegen_built_files,
command : [python, gdbus_codegen,
'--interface-prefix', 'org.',
'--output-directory', '@OUTDIR@',

View File

@ -308,8 +308,7 @@ if host_machine.system() != 'windows'
input : ['test-codegen.xml'],
output : ['gdbus-test-codegen-generated.h',
'gdbus-test-codegen-generated.c'],
depends : gdbus_codegen_depends,
depend_files : gdbus_codegen_depend_files,
depend_files : gdbus_codegen_built_files,
command : [python, gdbus_codegen,
'--interface-prefix', 'org.project.',
'--output-directory', '@OUTDIR@',
@ -325,8 +324,7 @@ if host_machine.system() != 'windows'
input : ['test-codegen.xml'],
output : ['gdbus-test-codegen-generated-min-required-2-64.h',
'gdbus-test-codegen-generated-min-required-2-64.c'],
depends : gdbus_codegen_depends,
depend_files : gdbus_codegen_depend_files,
depend_files : gdbus_codegen_built_files,
command : [python, gdbus_codegen,
'--glib-min-required', '2.64',
'--interface-prefix', 'org.project.',
@ -342,8 +340,7 @@ if host_machine.system() != 'windows'
custom_target('gdbus-test-codegen-generated-interface-info-h',
input : ['test-codegen.xml'],
output : ['gdbus-test-codegen-generated-interface-info.h'],
depends : gdbus_codegen_depends,
depend_files : gdbus_codegen_depend_files,
depend_files : gdbus_codegen_built_files,
command : [python, gdbus_codegen,
'--interface-info-header',
annotate_args,
@ -352,8 +349,7 @@ if host_machine.system() != 'windows'
custom_target('gdbus-test-codegen-generated-interface-info-c',
input : ['test-codegen.xml'],
output : ['gdbus-test-codegen-generated-interface-info.c'],
depends : gdbus_codegen_depends,
depend_files : gdbus_codegen_depend_files,
depend_files : gdbus_codegen_built_files,
command : [python, gdbus_codegen,
'--interface-info-body',
annotate_args,
@ -461,8 +457,7 @@ if host_machine.system() != 'windows'
input : ['../org.freedesktop.portal.Documents.xml'],
output : ['fake-document-portal-generated.h',
'fake-document-portal-generated.c'],
depends : gdbus_codegen_depends,
depend_files : gdbus_codegen_depend_files,
depend_files : gdbus_codegen_built_files,
command : [python, gdbus_codegen,
'--interface-prefix', 'org.freedesktop.portal.',
'--output-directory', '@OUTDIR@',
@ -742,9 +737,6 @@ if not meson.is_cross_build()
output : ['gresource-big-test.txt'],
command : [python, '@INPUT0@', '@OUTPUT@'])
# referenced by test.gresource.xml
test_generated_txt = fs.copyfile('test1.txt', 'test-generated.txt')
test_gresource = custom_target('test.gresource',
input : 'test.gresource.xml',
output : 'test.gresource',
@ -755,7 +747,6 @@ if not meson.is_cross_build()
'--sourcedir=' + meson.current_build_dir(),
'--internal',
'@INPUT@'],
depends: test_generated_txt,
install_dir : installed_tests_execdir,
install_tag : 'tests',
install : installed_tests_enabled)
@ -825,6 +816,12 @@ if not meson.is_cross_build()
'--manual-register',
'@INPUT@'])
# referenced by test.gresource.xml
test_generated_txt = configure_file(input : 'test1.txt',
output : 'test-generated.txt',
copy : true,
)
resources_extra_sources = [
test_gresource,
test_resources_c,

View File

@ -2360,7 +2360,6 @@ if want_systemtap and enable_dtrace
enable_systemtap = true
endif
fs = import('fs')
pkg = import('pkgconfig')
windows = import('windows')
subdir('tools')