Merge branch 'wip/pwithnall/meson-0.64' into 'main'

build: Bump Meson dependency to 0.64.0

See merge request GNOME/glib!3077
This commit is contained in:
Xavier Claessens 2022-11-23 11:48:51 +00:00
commit 6dd5c5002a
13 changed files with 45 additions and 41 deletions

View File

@ -11,10 +11,10 @@ cache:
- _ccache/ - _ccache/
variables: variables:
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v19" FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v20"
COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v7" COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v8"
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v14" DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v15"
MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v9" MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v10"
MESON_TEST_TIMEOUT_MULTIPLIER: 4 MESON_TEST_TIMEOUT_MULTIPLIER: 4
G_MESSAGES_DEBUG: all G_MESSAGES_DEBUG: all
MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload --fatal-meson-warnings" MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload --fatal-meson-warnings"
@ -439,6 +439,9 @@ freebsd-12-x86_64:
LANG: C.UTF-8 LANG: C.UTF-8
before_script: before_script:
- bash .gitlab-ci/show-execution-environment.sh - bash .gitlab-ci/show-execution-environment.sh
- python3 -m ensurepip --user
- /var/tmp/gitlab_runner/.local/bin/pip3 install --user meson==0.64.0
- export PATH=/var/tmp/gitlab_runner/.local/bin:$PATH
script: script:
# We cannot use -Wl,--no-undefined because GLib uses 'environ' variable. # We cannot use -Wl,--no-undefined because GLib uses 'environ' variable.
# FreeBSD supports xattr, but its API is different from Linux xattr. # FreeBSD supports xattr, but its API is different from Linux xattr.
@ -472,6 +475,9 @@ freebsd-13-x86_64:
LANG: C.UTF-8 LANG: C.UTF-8
before_script: before_script:
- bash .gitlab-ci/show-execution-environment.sh - bash .gitlab-ci/show-execution-environment.sh
- python3 -m ensurepip --user
- /var/tmp/gitlab_runner/.local/bin/pip3 install --user meson==0.64.0
- export PATH=/var/tmp/gitlab_runner/.local/bin:$PATH
script: script:
- meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build - meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build
- ninja -C _build - ninja -C _build
@ -503,7 +509,7 @@ macos:
CFLAGS: '-Wno-overlength-strings' CFLAGS: '-Wno-overlength-strings'
before_script: before_script:
- bash .gitlab-ci/show-execution-environment.sh - bash .gitlab-ci/show-execution-environment.sh
- pip3 install --user meson==0.60.1 - pip3 install --user meson==0.64.0
- pip3 install --user ninja - pip3 install --user ninja
- export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH - export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH
script: script:

View File

@ -1,4 +1,4 @@
FROM registry.gitlab.gnome.org/gnome/glib/fedora:v18 FROM registry.gitlab.gnome.org/gnome/glib/fedora:v20
ARG COVERITY_SCAN_PROJECT_NAME ARG COVERITY_SCAN_PROJECT_NAME
ARG COVERITY_SCAN_TOKEN ARG COVERITY_SCAN_TOKEN

View File

@ -66,7 +66,7 @@ RUN locale-gen de_DE.UTF-8 \
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
RUN pip3 install meson==0.60.3 RUN pip3 install meson==0.64.0
# FIXME: Once we use Debian Bookworm, we can just install the `reuse` package # FIXME: Once we use Debian Bookworm, we can just install the `reuse` package
RUN pip3 install reuse==1.0.0 RUN pip3 install reuse==1.0.0

View File

@ -74,7 +74,7 @@ RUN dnf -y update \
make \ make \
&& dnf clean all && dnf clean all
RUN pip3 install meson==0.60.3 RUN pip3 install meson==0.64.0
COPY install-gitlab-cobertura-tools.sh . COPY install-gitlab-cobertura-tools.sh .
RUN ./install-gitlab-cobertura-tools.sh RUN ./install-gitlab-cobertura-tools.sh

View File

@ -57,7 +57,7 @@ RUN dnf -y install \
WORKDIR /opt WORKDIR /opt
COPY cross_file_mingw64.txt /opt COPY cross_file_mingw64.txt /opt
RUN pip3 install meson==0.60.3 RUN pip3 install meson==0.64.0
ARG HOST_USER_ID=5555 ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID} ENV HOST_USER_ID ${HOST_USER_ID}

View File

@ -12,7 +12,7 @@ for %%x in (%*) do (
set args=%args:~1% set args=%args:~1%
:: FIXME: make warnings fatal :: FIXME: make warnings fatal
pip3 install --upgrade --user meson==0.60.3 || goto :error pip3 install --upgrade --user meson==0.64.0 || goto :error
meson %args% _build || goto :error meson %args% _build || goto :error
python .gitlab-ci/check-missing-install-tag.py _build || goto :error python .gitlab-ci/check-missing-install-tag.py _build || goto :error
ninja -C _build || goto :error ninja -C _build || goto :error

View File

@ -26,7 +26,7 @@ CCACHE_BASEDIR="$(pwd)"
CCACHE_DIR="${CCACHE_BASEDIR}/_ccache" CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
export CCACHE_BASEDIR CCACHE_DIR export CCACHE_BASEDIR CCACHE_DIR
pip3 install --upgrade --user meson==0.60.3 pip3 install --upgrade --user meson==0.64.0
PATH="$(cygpath "$USERPROFILE")/.local/bin:$HOME/.local/bin:$PATH" PATH="$(cygpath "$USERPROFILE")/.local/bin:$HOME/.local/bin:$PATH"
DIR="$(pwd)" DIR="$(pwd)"

View File

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

View File

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

View File

@ -240,7 +240,8 @@ xdp_dbus_generated = custom_target('xdp-dbus',
'org.freedesktop.portal.ProxyResolver.xml', 'org.freedesktop.portal.ProxyResolver.xml',
'org.freedesktop.portal.Trash.xml'], 'org.freedesktop.portal.Trash.xml'],
output : ['xdp-dbus.h', 'xdp-dbus.c'], output : ['xdp-dbus.h', 'xdp-dbus.c'],
depend_files : gdbus_codegen_built_files, depends : gdbus_codegen_depends,
depend_files : gdbus_codegen_depend_files,
command : [python, gdbus_codegen, command : [python, gdbus_codegen,
'--interface-prefix', 'org.freedesktop.portal.', '--interface-prefix', 'org.freedesktop.portal.',
'--output-directory', '@OUTDIR@', '--output-directory', '@OUTDIR@',
@ -252,7 +253,8 @@ xdp_dbus_generated = custom_target('xdp-dbus',
gdbus_daemon_generated = custom_target('gdbus-daemon-generated', gdbus_daemon_generated = custom_target('gdbus-daemon-generated',
input : ['dbus-daemon.xml'], input : ['dbus-daemon.xml'],
output : ['gdbus-daemon-generated.h', 'gdbus-daemon-generated.c'], output : ['gdbus-daemon-generated.h', 'gdbus-daemon-generated.c'],
depend_files : gdbus_codegen_built_files, depends : gdbus_codegen_depends,
depend_files : gdbus_codegen_depend_files,
command : [python, gdbus_codegen, command : [python, gdbus_codegen,
'--interface-prefix', 'org.', '--interface-prefix', 'org.',
'--output-directory', '@OUTDIR@', '--output-directory', '@OUTDIR@',
@ -877,9 +879,7 @@ libgio_dep = declare_dependency(link_with : libgio,
pkg.generate(libgio, pkg.generate(libgio,
requires : ['glib-2.0', 'gobject-2.0'], requires : ['glib-2.0', 'gobject-2.0'],
variables : ['datadir=' + join_paths('${prefix}', get_option('datadir')), variables : ['schemasdir=' + join_paths('${datadir}', schemas_subdir),
'schemasdir=' + join_paths('${datadir}', schemas_subdir),
'bindir=' + join_paths('${prefix}', get_option('bindir')),
'giomoduledir=' + pkgconfig_giomodulesdir, 'giomoduledir=' + pkgconfig_giomodulesdir,
'gio=' + join_paths('${bindir}', 'gio'), 'gio=' + join_paths('${bindir}', 'gio'),
'gio_querymodules=@0@'.format(pkgconfig_multiarch_bindir / 'gio-querymodules'), 'gio_querymodules=@0@'.format(pkgconfig_multiarch_bindir / 'gio-querymodules'),

View File

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

View File

@ -438,8 +438,7 @@ pkg.generate(libglib,
libraries_private : [win32_ldflags], libraries_private : [win32_ldflags],
subdirs : ['glib-2.0'], subdirs : ['glib-2.0'],
extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags, extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')), variables : ['glib_genmarshal=' + join_paths('${bindir}', 'glib-genmarshal'),
'glib_genmarshal=' + join_paths('${bindir}', 'glib-genmarshal'),
'gobject_query=' + join_paths('${bindir}', 'gobject-query'), 'gobject_query=' + join_paths('${bindir}', 'gobject-query'),
'glib_mkenums=' + join_paths('${bindir}', 'glib-mkenums')], 'glib_mkenums=' + join_paths('${bindir}', 'glib-mkenums')],
version : glib_version, version : glib_version,

View File

@ -1,7 +1,7 @@
project('glib', 'c', project('glib', 'c',
version : '2.75.1', version : '2.75.1',
# NOTE: See the policy in docs/meson-version.md before changing the Meson dependency # NOTE: See the policy in docs/meson-version.md before changing the Meson dependency
meson_version : '>= 0.60.0', meson_version : '>= 0.64.0',
default_options : [ default_options : [
'buildtype=debugoptimized', 'buildtype=debugoptimized',
'warning_level=3', 'warning_level=3',
@ -2360,6 +2360,7 @@ if want_systemtap and enable_dtrace
enable_systemtap = true enable_systemtap = true
endif endif
fs = import('fs')
pkg = import('pkgconfig') pkg = import('pkgconfig')
windows = import('windows') windows = import('windows')
subdir('tools') subdir('tools')