From 9d73ea897561901580eaa5e77d39c8617693e928 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 3 Jul 2018 11:00:20 -0400 Subject: [PATCH 1/5] ci: Update meson to 0.47.0 in docker image --- .gitlab-ci.yml | 2 +- .gitlab-ci/Dockerfile | 2 +- .gitlab-ci/run-docker.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e57122ece..5b9461328 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: registry.gitlab.gnome.org/gnome/glib/master:v5 +image: registry.gitlab.gnome.org/gnome/glib/master:v6 stages: - build diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile index 06944ae98..06d3a4ae3 100644 --- a/.gitlab-ci/Dockerfile +++ b/.gitlab-ci/Dockerfile @@ -48,7 +48,7 @@ RUN rm -rf $ANDROID_NDK_PATH COPY cross_file_mingw64.txt /opt -RUN pip3 install meson==0.46.1 +RUN pip3 install meson==0.47.0 ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh index 59b5c8d08..91d3042e7 100755 --- a/.gitlab-ci/run-docker.sh +++ b/.gitlab-ci/run-docker.sh @@ -2,7 +2,7 @@ set -e -TAG="registry.gitlab.gnome.org/gnome/glib/master:v5" +TAG="registry.gitlab.gnome.org/gnome/glib/master:v6" docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \ --file "Dockerfile" . From 543a9c4f3386df3f64f36101b52923103f008903 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 18 Jun 2018 09:47:39 -0400 Subject: [PATCH 2/5] ci: Fix dist-job missing gobject/gio documentation This requires meson >= 0.47.0 otherwise building the doc fails: https://github.com/mesonbuild/meson/issues/3379 While at it, no need to to pass --prefix --libdir to meson, other CIs don't have them. --- .gitlab-ci.yml | 4 ++-- meson.build | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5b9461328..399804002 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -120,10 +120,10 @@ dist-job: only: - tags script: - - meson --prefix /usr --libdir /usr/lib64 --buildtype release -Dgtk_doc=true -Dman=true _build . + - meson --buildtype release -Dgtk_doc=true -Dman=true _build - cd _build - ninja dist - - ninja glib-doc + - ninja glib-doc gobject-doc gio-doc - tar -c -f "glib-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/glib html - tar -c -f "gobject-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gobject html - tar -c -f "gio-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gio html diff --git a/meson.build b/meson.build index ef17ba309..6c3dcc6a5 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('glib', 'c', 'cpp', version : '2.57.1', - meson_version : '>= 0.46.1', + meson_version : '>= 0.47.0', default_options : [ 'buildtype=debugoptimized', 'warning_level=1', From 95fa229f34f8efdbe44091d1f3f9a87c3139bd52 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 3 Jul 2018 10:47:52 -0400 Subject: [PATCH 3/5] Meson: Fix warnings introduced in 0.47.0 --- gio/gdbus-2.0/codegen/meson.build | 3 +-- gio/tests/meson.build | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build index 54a86b0d6..af1bc9fb2 100644 --- a/gio/gdbus-2.0/codegen/meson.build +++ b/gio/gdbus-2.0/codegen/meson.build @@ -30,12 +30,11 @@ gdbus_codegen_built_files += configure_file(input : 'config.py.in', install_dir : codegen_dir, configuration : gdbus_codegen_conf) -blank_conf = configuration_data() 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_built_files += configure_file(input : f, output : f, install : true, install_dir : codegen_dir, - configuration : blank_conf) + copy : true) endforeach diff --git a/gio/tests/meson.build b/gio/tests/meson.build index be007fa1d..b3edc7c82 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -425,7 +425,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() # referenced by test.gresource.xml test_generated_txt = configure_file(input : 'test1.txt', output : 'test-generated.txt', - configuration : configuration_data(), + copy : true, install : false) exe = executable('resources', 'resources.c', test_gresource, From deccba2807bbb3af41d45fb858f6eb9e4c9eb7a4 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 3 Jul 2018 11:06:48 -0400 Subject: [PATCH 4/5] Meson: Use subdir_done() now that it has been fixed --- gio/fam/meson.build | 70 ++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/gio/fam/meson.build b/gio/fam/meson.build index fdbdd15c6..d24670a63 100644 --- a/gio/fam/meson.build +++ b/gio/fam/meson.build @@ -1,36 +1,36 @@ -# FIXME: We should use subdir_done() instead of if blocks, but it's broken in -# meson 0.46.1. See https://github.com/mesonbuild/meson/issues/3700. -if get_option('fam') - fam_dep = cc.find_library('fam') - fam_c_args = ['-DG_DISABLE_DEPRECATED'] + gio_c_args - if cc.has_function('FAMNoExists', dependencies : fam_dep) - fam_c_args += '-DHAVE_FAM_NO_EXISTS=1' - endif - - deps = [ - fam_dep, - libglib_dep, - libgobject_dep, - libgio_dep, - ] - - symbol_map = join_paths(meson.current_source_dir(), 'gfamfilemonitor.map') - fam_ldflags = cc.get_supported_link_arguments([ - '-Wl,--version-script,' + symbol_map, - '-Wl,-no-undefined', - ]) - - module = shared_module('giofam', 'gfamfilemonitor.c', - include_directories : [gmoduleinc], - dependencies : deps, - c_args : fam_c_args, - link_args : fam_ldflags, - link_depends : symbol_map, - install_dir : glib_giomodulesdir, - install : true, - ) - - if not meson.is_cross_build() - meson.add_install_script('../gio-querymodules-wrapper.py', gio_querymodules.full_path(), glib_giomodulesdir) - endif +if not get_option('fam') + subdir_done() +endif + +fam_dep = cc.find_library('fam') +fam_c_args = ['-DG_DISABLE_DEPRECATED'] + gio_c_args +if cc.has_function('FAMNoExists', dependencies : fam_dep) + fam_c_args += '-DHAVE_FAM_NO_EXISTS=1' +endif + +deps = [ + fam_dep, + libglib_dep, + libgobject_dep, + libgio_dep, +] + +symbol_map = join_paths(meson.current_source_dir(), 'gfamfilemonitor.map') +fam_ldflags = cc.get_supported_link_arguments([ + '-Wl,--version-script,' + symbol_map, + '-Wl,-no-undefined', +]) + +module = shared_module('giofam', 'gfamfilemonitor.c', + include_directories : [gmoduleinc], + dependencies : deps, + c_args : fam_c_args, + link_args : fam_ldflags, + link_depends : symbol_map, + install_dir : glib_giomodulesdir, + install : true, +) + +if not meson.is_cross_build() + meson.add_install_script('../gio-querymodules-wrapper.py', gio_querymodules.full_path(), glib_giomodulesdir) endif From ed8c74461f3cfb6efdf12251357c242879b99f35 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 3 Jul 2018 16:00:54 -0400 Subject: [PATCH 5/5] ci: Install meson 0.47.0 on Windows envs --- .gitlab-ci/test-msvc.bat | 1 + .gitlab-ci/test-msys2.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat index a62882de0..9b674f76e 100644 --- a/.gitlab-ci/test-msvc.bat +++ b/.gitlab-ci/test-msvc.bat @@ -5,6 +5,7 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary @echo on :: FIXME: make warnings fatal +pip3 install --upgrade --user meson==0.47.0 || goto :error meson _build || goto :error ninja -C _build || goto :error diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index 20c79e763..498cc27a6 100755 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -26,7 +26,7 @@ pacman --noconfirm -S --needed \ mkdir -p _ccache export CCACHE_BASEDIR="$(pwd)" export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache" -pip3 install --upgrade --user meson +pip3 install --upgrade --user meson==0.47.0 export PATH="$HOME/.local/bin:$PATH" export CFLAGS="-coverage -ftest-coverage -fprofile-arcs"