Merge branch 'meson-version-policy' into 'main'

docs: Add a Meson version policy and bump Meson version in CI

Closes #2596

See merge request GNOME/glib!2641
This commit is contained in:
Philip Withnall 2022-05-10 11:43:41 +00:00
commit b18fec9f23
37 changed files with 121 additions and 142 deletions

View File

@ -10,15 +10,14 @@ cache:
- _ccache/
variables:
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v13"
COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v3"
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v9"
ANDROID_IMAGE: "registry.gitlab.gnome.org/gnome/glib/android-ndk:v6"
MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v5"
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v14"
COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v4"
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v10"
ANDROID_IMAGE: "registry.gitlab.gnome.org/gnome/glib/android-ndk:v7"
MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v6"
MESON_TEST_TIMEOUT_MULTIPLIER: 2
G_MESSAGES_DEBUG: all
MESON_COMMON_OPTIONS_NO_WARNING: "--buildtype debug --wrap-mode=nodownload"
MESON_COMMON_OPTIONS: "${MESON_COMMON_OPTIONS_NO_WARNING} --fatal-meson-warnings"
MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload --fatal-meson-warnings"
.only-default:
only:
@ -72,10 +71,7 @@ fedora-x86_64:
variables:
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
script:
# FIXME: Cannot use MESON_COMMON_OPTIONS here because meson warns about gtkdoc
# feature fully functional in 0.54, but we only depend on 0.52. So we cannot build
# with --fatal-meson-warnings.
- meson ${MESON_COMMON_OPTIONS_NO_WARNING}
- meson ${MESON_COMMON_OPTIONS}
--werror
--default-library=both
--prefix=$HOME/glib-installed
@ -326,7 +322,10 @@ vs2017-x64:
script:
# FIXME: These should use --wrap-mode=nodownload but the Windows CI machines
# arent currently set up for that.
- .gitlab-ci/test-msvc.bat ${MESON_COMMON_OPTIONS} --wrap-mode=default
- .gitlab-ci/test-msvc.bat ${MESON_COMMON_OPTIONS}
--wrap-mode=default
--python.platlibdir=C:\Python37\site-packages
--python.purelibdir=C:\Python37\site-packages
artifacts:
reports:
junit: "_build/${env:CI_JOB_NAME}-report.xml"
@ -351,7 +350,11 @@ vs2017-x64-static:
script:
# FIXME: These should use --wrap-mode=nodownload but the Windows CI machines
# arent currently set up for that.
- .gitlab-ci/test-msvc.bat ${MESON_COMMON_OPTIONS} --wrap-mode=default --default-library=static
- .gitlab-ci/test-msvc.bat ${MESON_COMMON_OPTIONS}
--wrap-mode=default
--default-library=static
--python.platlibdir=C:\Python37\site-packages
--python.purelibdir=C:\Python37\site-packages
artifacts:
reports:
junit: "_build/${env:CI_JOB_NAME}-report.xml"
@ -564,10 +567,7 @@ dist-job:
only:
- tags
script:
# FIXME: Cannot use MESON_COMMON_OPTIONS here because meson warns about gtkdoc
# feature fully functional in 0.54, but we only depend on 0.52. So we cannot build
# with --fatal-meson-warnings.
- meson ${MESON_COMMON_OPTIONS_NO_WARNING} --buildtype release -Dgtk_doc=true -Dman=true _build
- meson ${MESON_COMMON_OPTIONS} --buildtype release -Dgtk_doc=true -Dman=true _build
- cd _build
- ninja dist
- ninja glib-doc gobject-doc gio-doc

View File

@ -72,7 +72,7 @@ RUN rm -rf \
$ANDROID_NDK_PATH/sources/cxx-stl/llvm-libc++/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory \
$ANDROID_NDK_PATH
RUN pip3 install meson==0.52.0
RUN pip3 install meson==0.60.3
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}

View File

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

View File

@ -65,7 +65,7 @@ RUN locale-gen de_DE.UTF-8 \
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
RUN pip3 install meson==0.52.0
RUN pip3 install meson==0.60.3
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}

View File

@ -73,7 +73,7 @@ RUN dnf -y update \
make \
&& dnf clean all
RUN pip3 install meson==0.52.1
RUN pip3 install meson==0.60.3
# Set /etc/machine-id as its needed for some D-Bus tests
RUN systemd-machine-id-setup

View File

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

View File

@ -12,7 +12,7 @@ for %%x in (%*) do (
set args=%args:~1%
:: FIXME: make warnings fatal
pip3 install --upgrade --user meson==0.52.0 || goto :error
pip3 install --upgrade --user meson==0.60.3 || goto :error
meson %args% _build || goto :error
ninja -C _build || goto :error

View File

@ -31,7 +31,7 @@ CCACHE_BASEDIR="$(pwd)"
CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
export CCACHE_BASEDIR CCACHE_DIR
pip3 install --upgrade --user meson==0.52.0
pip3 install --upgrade --user meson==0.60.3
PATH="$(cygpath "$USERPROFILE")/.local/bin:$HOME/.local/bin:$PATH"
CFLAGS="-coverage -ftest-coverage -fprofile-arcs"

View File

@ -24,7 +24,9 @@ information.) Information about pkg-config can be found at:
http://www.freedesktop.org/software/pkgconfig/
Meson (http://mesonbuild.com/) is also required.
Meson (http://mesonbuild.com/) is also required. If your distribution does not
package a new enough version of Meson, it can be [installed using
`pip`](https://mesonbuild.com/Getting-meson.html#installing-meson-with-pip).
In order to implement conversions between character sets,
GLib requires an implementation of the standard iconv() routine.

30
docs/meson-version.md Normal file
View File

@ -0,0 +1,30 @@
Meson version policy
===
Aims
---
* Stable versions of GLib should be buildable from source on the majority of
systems which are still supported by their vendors, without requiring the
user to manually build a number of dependencies
* Unstable versions of GLib should be able to take advantage of newer build
system features where they would make maintenance of GLib easier, without
prejudicing the other aims
Policy
---
* Stable branches of GLib will not change their Meson dependency after the
first release of that stable series
* Unstable branches of GLib can bump their Meson dependency if
- at least that version of Meson currently available in Debian Testing; or
- the Python version required by the new Meson dependency is available in
Debian Stable *and* the oldest currently-supported Ubuntu LTS
* The version of Meson used by GLib should be pinned and pre-installed in the
CI `Dockerfile`s so that GLib is guaranteed to be built against the expected
version
The reasoning behind allowing a version bump if the Python which Meson depends
on is available in Debian Stable is that its [straightforward to install a more
recent Meson version using
`pip`](https://mesonbuild.com/Getting-meson.html#installing-meson-with-pip).

View File

@ -47,9 +47,6 @@ gtkdoc_common_scan_args = [
]
if get_option('gtk_doc')
if not meson.version().version_compare('>=0.52.0')
error('Building documentation requires Meson >= 0.52.0.')
endif
# Check we have the minimum gtk-doc version required. Older versions won't
# generate correct documentation.
dependency('gtk-doc', version : '>=1.32.1',

View File

@ -1,9 +0,0 @@
#!/usr/bin/env python3
import os
import subprocess
import sys
if not os.environ.get("DESTDIR"):
print("GIO module cache creation...")
subprocess.call([sys.argv[1], sys.argv[2]])

View File

@ -774,7 +774,7 @@ if have_bash
bash_comp_inst_dir = ''
if bash_comp_dep.found()
bash_comp_dir_override = bash_comp_dep.version().version_compare('>= 2.10') ? ['datadir', get_option('datadir')] : ['prefix', get_option('prefix')]
bash_comp_inst_dir = bash_comp_dep.get_pkgconfig_variable('completionsdir', define_variable: bash_comp_dir_override)
bash_comp_inst_dir = bash_comp_dep.get_variable('completionsdir', pkgconfig_define: bash_comp_dir_override)
endif
if bash_comp_inst_dir == ''
@ -829,17 +829,12 @@ schemas_subdir = join_paths('glib-2.0', 'schemas')
libgio_dep = declare_dependency(link_with : libgio,
dependencies : [libgmodule_dep, libgobject_dep, gioenumtypes_dep],
include_directories : [gioinc])
# Work around variables kwarg requiring Meson 0.56
if meson.version().version_compare('>=0.56.0')
libgio_dep = declare_dependency(dependencies: libgio_dep,
include_directories : [gioinc],
variables : [
'schemasdir=' + join_paths(glib_datadir, schemas_subdir),
'giomoduledir=' + glib_giomodulesdir,
]
],
)
endif
pkg.generate(libgio,
requires : ['glib-2.0', 'gobject-2.0'],
@ -861,11 +856,7 @@ pkg.generate(libgio,
name : 'GIO',
description : 'glib I/O library',
)
if meson.version().version_compare('>=0.54.0')
meson.override_dependency('gio-2.0', libgio_dep)
endif
if host_system == 'windows'
pkg.generate(requires : ['gobject-2.0', 'gmodule-no-export-2.0', 'gio-2.0'],
@ -876,9 +867,7 @@ if host_system == 'windows'
name : 'GIO Windows specific APIs',
description : 'Windows specific headers for glib I/O library',
)
if meson.version().version_compare('>=0.54.0')
meson.override_dependency('gio-windows-2.0', libgio_dep)
endif
else
pkg.generate(requires : ['gobject-2.0', 'gio-2.0'],
subdirs : ['gio-unix-2.0'],
@ -888,10 +877,8 @@ else
name : 'GIO unix specific APIs',
description : 'unix specific headers for glib I/O library',
)
if meson.version().version_compare('>=0.54.0')
meson.override_dependency('gio-unix-2.0', libgio_dep)
endif
endif
if host_system == 'windows'
# Hack till https://github.com/mesonbuild/meson/issues/2324 is fixed
@ -991,7 +978,7 @@ glib_compile_resources = executable('glib-compile-resources',
# Cannot override those programs in cross compilation case because they are
# native executables that cannot be run on the build machine.
# See https://gitlab.gnome.org/GNOME/glib/issues/1859.
if not meson.is_cross_build()
if not meson.can_run_host_binaries()
meson.override_find_program('glib-compile-schemas', glib_compile_schemas)
meson.override_find_program('glib-compile-resources', glib_compile_resources)
meson.override_find_program('gio-querymodules', gio_querymodules)

View File

@ -603,7 +603,7 @@ if installed_tests_enabled
endforeach
endif
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
compiler_type = '--compiler=@0@'.format(cc.get_id())
@ -830,7 +830,7 @@ foreach test_name, extra_args : gio_tests
foreach var, value : installed_tests_env
envs += '@0@=@1@'.format(var, value)
endforeach
test_env_override = '@0@ @1@ '.format(env_program.path(), ' '.join(envs))
test_env_override = '@0@ @1@ '.format(env_program.full_path(), ' '.join(envs))
endif
test_conf.set('env', test_env_override)
configure_file(

View File

@ -71,7 +71,7 @@ int main ()
gl_cv_cc_double_expbit0_word = -1
gl_cv_cc_double_expbit0_bit = -1
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(double_exponent_test,
name : 'where to find the exponent in a \'double\'')
if run_result.compiled() and run_result.returncode() == 0

View File

@ -76,7 +76,7 @@ int main()
return result;
}'''
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(frexp_test,
name : 'frexp works',
dependencies : [libm])

View File

@ -104,7 +104,7 @@ int main()
}
'''
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(frexpl_test,
name : 'frexpl works',
dependencies : [libm])

View File

@ -33,7 +33,7 @@ int main()
}
'''
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(ldexpl_test,
name : 'ldexpl works',
dependencies : [libm])

View File

@ -79,7 +79,7 @@ glibc_printf_directive_a_test = '''
int main () { return 0; }
'''
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(printf_directive_a_test,
name : 'printf supports the \'a\' and \'A\' directives')
gl_cv_func_printf_directive_a = run_result.compiled() and run_result.returncode() == 0

View File

@ -29,7 +29,7 @@ int main ()
}
'''
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(printf_directive_f_test,
name : 'printf supports the \'F\' directive')
gl_cv_func_printf_directive_f = run_result.compiled() and run_result.returncode() == 0

View File

@ -62,7 +62,7 @@ int main ()
}
'''
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(printf_directive_ls_test,
name : 'printf supports the \'ls\' directive')
gl_cv_func_printf_directive_ls = run_result.compiled() and run_result.returncode() == 0

View File

@ -54,7 +54,7 @@ int main()
}
'''
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(printf_enomem_test,
name : 'printf survives out-of-memory conditions')
gl_cv_func_printf_enomem = run_result.compiled() and run_result.returncode() == 0

View File

@ -20,7 +20,7 @@ int main ()
return 0;
}'''
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(printf_flag_grouping_test,
name : 'printf supports the grouping flag')
gl_cv_func_printf_flag_grouping = run_result.compiled() and run_result.returncode() == 0

View File

@ -22,7 +22,7 @@ int main ()
}
'''
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(printf_flag_leftadjust_test,
name : 'printf supports the left-adjust flag correctly')
gl_cv_func_printf_flag_leftadjust = run_result.compiled() and run_result.returncode() == 0

View File

@ -23,7 +23,7 @@ int main ()
}
'''
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(printf_flag_zero_test,
name : 'printf supports the zero flag correctly')
gl_cv_func_printf_flag_zero = run_result.compiled() and run_result.returncode() == 0

View File

@ -77,7 +77,7 @@ int main ()
}
'''
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(printf_infinite_double_test,
name : 'printf supports infinite \'double\' arguments')
gl_cv_func_printf_infinite = run_result.compiled() and run_result.returncode() == 0

View File

@ -167,7 +167,7 @@ int main ()
'''
if gl_cv_func_printf_long_double
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(printf_infinite_long_double_test,
name : 'printf supports infinite \'long double\' arguments')
gl_cv_func_printf_infinite_long_double = (run_result.compiled() and run_result.returncode() == 0)

View File

@ -30,7 +30,7 @@ int main ()
}
'''
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(printf_long_double_test,
name : 'printf supports \'long double\' arguments')
gl_cv_func_printf_long_double = run_result.compiled() and run_result.returncode() == 0

View File

@ -37,7 +37,7 @@ int main ()
}
'''
if not meson.is_cross_build() or meson.has_exe_wrapper()
if meson.can_run_host_binaries()
run_result = cc.run(printf_precision_test,
name : 'printf supports large precisions')
gl_cv_func_printf_precision = run_result.compiled() and run_result.returncode() == 0

View File

@ -401,17 +401,14 @@ pkg.generate(libglib,
name : 'GLib',
description : 'C Utility Library',
)
if meson.version().version_compare('>=0.54.0')
meson.override_dependency('glib-2.0', libglib_dep)
endif
# On Windows, glib needs a spawn helper for g_spawn* API
if host_system == 'windows'
if host_machine.cpu_family() == 'x86'
executable('gspawn-win32-helper', 'gspawn-win32-helper.c',
install : true,
gui_app : true,
win_subsystem : 'windows',
include_directories : configinc,
dependencies : [libglib_dep])
executable('gspawn-win32-helper-console', 'gspawn-win32-helper.c',
@ -422,7 +419,7 @@ if host_system == 'windows'
else
executable('gspawn-win64-helper', 'gspawn-win32-helper.c',
install : true,
gui_app : true,
win_subsystem : 'windows',
include_directories : configinc,
dependencies : [libglib_dep])
executable('gspawn-win64-helper-console', 'gspawn-win32-helper.c',
@ -453,11 +450,9 @@ configure_file(
install_data('glib_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb'))
# This is needed to make gdb find glib_gdb.py
if meson.version().version_compare('>=0.58')
env = environment()
env.prepend('PYTHONPATH', meson.current_source_dir())
meson.add_devenv(env)
endif
gdb_conf = configuration_data()
gdb_conf.set('datadir', glib_datadir)

View File

@ -315,7 +315,7 @@ executable('testing-helper', 'testing-helper.c',
)
# some testing of gtester functionality
if not meson.is_cross_build() and host_system != 'windows'
if meson.can_run_host_binaries() and host_system != 'windows'
xmllint = find_program('xmllint', required: false)
if xmllint.found()
tmpsample_xml = custom_target('tmpsample.xml',

View File

@ -25,7 +25,7 @@ if g_module_impl == 'G_MODULE_IMPL_DL'
if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
message('Building for MSVC: assuming that symbols are prefixed with underscore')
g_module_need_uscore = 1
elif meson.has_exe_wrapper()
elif meson.can_run_host_binaries()
# FIXME: communicate result via stdout instead of return value, so non-0 return is not printed in bold red
rres = cc.run(dlopen_dlsym_test_code,
dependencies : libdl_dep,
@ -126,11 +126,9 @@ libgmodule_dep = declare_dependency(link_with : libgmodule,
include_directories : [gmoduleinc],
dependencies : [libglib_dep])
if meson.version().version_compare('>=0.54.0')
meson.override_dependency('gmodule-no-export-2.0', libgmodule_dep)
meson.override_dependency('gmodule-export-2.0', libgmodule_dep)
meson.override_dependency('gmodule-2.0', libgmodule_dep)
endif
if build_tests
subdir('tests')

View File

@ -150,10 +150,7 @@ pkg.generate(libgobject,
libgobject_dep = declare_dependency(link_with : libgobject,
include_directories : [gobjectinc],
dependencies : [libglib_dep, glib_enumtypes_dep])
if meson.version().version_compare('>=0.54.0')
meson.override_dependency('gobject-2.0', libgobject_dep)
endif
executable('gobject-query', 'gobject-query.c',
install : true,
@ -171,11 +168,9 @@ configure_file(
)
# This is needed to make gdb find gobject_gdb.py
if meson.version().version_compare('>=0.58')
env = environment()
env.prepend('PYTHONPATH', meson.current_source_dir())
meson.add_devenv(env)
endif
if enable_systemtap
gobject_stp = configure_file(input : 'gobject.stp.in',

View File

@ -34,7 +34,4 @@ pkg.generate(libgthread,
)
libgthread_dep = declare_dependency(link_with : libgthread)
if meson.version().version_compare('>=0.54.0')
meson.override_dependency('gthread-2.0', libgthread_dep)
endif

View File

@ -1,7 +1,7 @@
project('glib', 'c', 'cpp',
version : '2.73.0',
# NOTE: We keep this pinned at 0.52 because that's what Debian Stable ships
meson_version : '>= 0.52.0',
# NOTE: See the policy in docs/meson-version.md before changing the Meson dependency
meson_version : '>= 0.60.0',
default_options : [
'buildtype=debugoptimized',
'warning_level=3',
@ -12,7 +12,7 @@ project('glib', 'c', 'cpp',
cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp')
cc_can_run = not meson.is_cross_build() or meson.has_exe_wrapper()
cc_can_run = meson.can_run_host_binaries()
if cc.get_argument_syntax() == 'msvc'
# Ignore several spurious warnings for things glib does very commonly
@ -100,7 +100,7 @@ installed_tests_template = files('template.test.in')
installed_tests_template_tap = files('template-tap.test.in')
# Dont build the tests unless we can run them (either natively, in an exe wrapper, or by installing them for later use)
build_tests = get_option('tests') and (not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper()) or installed_tests_enabled)
build_tests = get_option('tests') and (meson.can_run_host_binaries() or installed_tests_enabled)
add_project_arguments('-D_GNU_SOURCE', language: 'c')
@ -662,19 +662,6 @@ if host_system != 'windows' and cc.has_function('stpcpy', prefix : '#include <st
glib_conf.set('HAVE_STPCPY', 1)
endif
# When building for Android-20 and earlier, require Meson 0.54.2 or newer.
# This is needed, because Meson build versions prior to 0.54.2 return false
# positive for stpcpy has_function check when building for legacy Android.
if host_system == 'android'
android_is_older = cc.compiles('''#if __ANDROID_API__ >= 21
#error Android is 21 or newer
#endif''')
if android_is_older and meson.version().version_compare('< 0.54.2')
error('Compiling for <Android-21 requires Meson 0.54.2 or newer')
endif
endif
if cc.has_function('memalign', prefix: '#include <stdlib.h>\n#include <malloc.h>')
glib_conf.set('HAVE_MEMALIGN', 1)
endif
@ -1047,7 +1034,7 @@ main(void)
have_good_vsnprintf = true
endif
else
have_good_vsnprintf = meson.get_cross_property('have_c99_vsnprintf', false)
have_good_vsnprintf = meson.get_external_property('have_c99_vsnprintf', false)
glib_conf.set('HAVE_C99_VSNPRINTF', have_good_vsnprintf)
endif
@ -1095,7 +1082,7 @@ main(void)
have_good_snprintf = true
endif
else
have_good_snprintf = meson.get_cross_property('have_c99_snprintf', false)
have_good_snprintf = meson.get_external_property('have_c99_snprintf', false)
glib_conf.set('HAVE_C99_SNPRINTF', have_good_snprintf)
endif
@ -1122,7 +1109,7 @@ main (void)
have_good_printf = true
endif
else
have_good_printf = meson.get_cross_property('have_unix98_printf', false)
have_good_printf = meson.get_external_property('have_unix98_printf', false)
glib_conf.set('HAVE_UNIX98_PRINTF', have_good_printf)
endif
endif
@ -1716,7 +1703,7 @@ if cc_can_run
rres = cc.run(va_list_val_copy_prog, name : 'va_lists can be copied as values')
glib_va_val_copy = rres.compiled() and rres.returncode() == 0
else
glib_va_val_copy = meson.get_cross_property('va_val_copy', true)
glib_va_val_copy = meson.get_external_property('va_val_copy', true)
endif
if not glib_va_val_copy
glib_vacopy = glib_vacopy + '\n#define G_VA_COPY_AS_ARRAY 1'
@ -1995,7 +1982,7 @@ if cc_can_run
rres = cc.run(stack_grows_check_prog, name : 'stack grows check')
growing_stack = rres.compiled() and rres.returncode() == 0
else
growing_stack = meson.get_cross_property('growing_stack', false)
growing_stack = meson.get_external_property('growing_stack', false)
endif
glibconfig_conf.set10('G_HAVE_GROWING_STACK', growing_stack)
@ -2214,7 +2201,7 @@ if cc.has_function('strlcpy')
if rres.compiled() and rres.returncode() == 0
glib_conf.set('HAVE_STRLCPY', 1)
endif
elif meson.get_cross_property('have_strlcpy', false)
elif meson.get_external_property('have_strlcpy', false)
glib_conf.set('HAVE_STRLCPY', 1)
endif
endif
@ -2271,7 +2258,7 @@ if cc_can_run
rres = cc.run(cmdline_test_code, name : '/proc/self/cmdline')
have_proc_self_cmdline = rres.compiled() and rres.returncode() == 0
else
have_proc_self_cmdline = meson.get_cross_property('have_proc_self_cmdline', false)
have_proc_self_cmdline = meson.get_external_property('have_proc_self_cmdline', false)
endif
glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline)

View File

@ -1,11 +1,11 @@
[wrap-file]
directory = pcre-8.37
source_url = https://sourceforge.net/projects/pcre/files/pcre/8.37/pcre-8.37.tar.bz2
source_filename = pcre-8.37.tar.bz2
source_hash = 51679ea8006ce31379fb0860e46dd86665d864b5020fc9cd19e71260eef4789d
patch_filename = pcre_8.37-4_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/pcre_8.37-4/get_patch
patch_hash = c957f42da6f6378300eb8a18f4a5cccdb8e2aada51a703cac842982f9f785399
directory = pcre-8.45
source_url = https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.bz2
source_filename = pcre-8.45.tar.bz2
source_hash = 4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8
patch_filename = pcre_8.45-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/pcre_8.45-1/get_patch
patch_hash = 821f9b0e5578c5b3983434465de93e30ddfceb92e331a0c9110aba6bf0634ffa
[provide]
libpcre = pcre_dep

View File

@ -46,7 +46,7 @@ test_extra_programs = {
if host_machine.system() == 'windows'
test_extra_programs += {
'spawn-test-win32-gui' : {'gui_app' : true}
'spawn-test-win32-gui' : {'win_subsystem' : 'windows'}
}
endif
@ -119,6 +119,6 @@ foreach program_name, extra_args : test_extra_programs
dependencies : common_deps + extra_args.get('dependencies', []),
install_dir : installed_tests_execdir,
install : install,
gui_app : extra_args.get('gui_app', false),
win_subsystem : extra_args.get('win_subsystem', 'console'),
)
endforeach