From 722a82bc18cb48ad82c68a406649459a948fb5d1 Mon Sep 17 00:00:00 2001 From: Kjell Ahlstedt Date: Sun, 22 Aug 2021 19:03:43 +0200 Subject: Require meson >= 0.54.0 --- .github/workflows/meson-clang-10.yml | 9 +++++---- .github/workflows/meson-gcc-9.yml | 9 +++++---- docs/docs/reference/meson.build | 14 +++----------- meson.build | 8 ++------ 4 files changed, 15 insertions(+), 25 deletions(-) diff --git a/.github/workflows/meson-clang-10.yml b/.github/workflows/meson-clang-10.yml index af19f31..31274d5 100644 --- a/.github/workflows/meson-clang-10.yml +++ b/.github/workflows/meson-clang-10.yml @@ -14,13 +14,14 @@ jobs: # Prevent blocking apt install on a question during configuring of tzdata. export ENV DEBIAN_FRONTEND=noninteractive sudo apt update - sudo apt install mm-common clang-10 meson ninja-build python3-setuptools --yes + sudo apt install mm-common clang-10 ninja-build python3-setuptools python3-pip --yes + # Ubuntu 20.04 contains meson 0.53.2, but libsigc++ requires meson >= 0.54.0. + # Install it with pip3 instead of apt. + sudo pip3 install "meson>=0.54.0" export CXX=clang++-10 meson -Dwarnings=fatal _build cd _build - # Meson from 0.54.0 understands "meson compile". - # Ubuntu 20.04 uses meson 0.53.2. - ninja + meson compile - name: Test run: | cd _build diff --git a/.github/workflows/meson-gcc-9.yml b/.github/workflows/meson-gcc-9.yml index f472d97..29518a9 100644 --- a/.github/workflows/meson-gcc-9.yml +++ b/.github/workflows/meson-gcc-9.yml @@ -14,13 +14,14 @@ jobs: # Prevent blocking apt install on a question during configuring of tzdata. export ENV DEBIAN_FRONTEND=noninteractive sudo apt update - sudo apt install mm-common g++-9 meson ninja-build python3-setuptools --yes + sudo apt install mm-common g++-9 ninja-build python3-setuptools python3-pip --yes + # Ubuntu 20.04 contains meson 0.53.2, but libsigc++ requires meson >= 0.54.0. + # Install it with pip3 instead of apt. + sudo pip3 install "meson>=0.54.0" export CXX=g++-9 meson -Dwarnings=fatal _build cd _build - # Meson from 0.54.0 understands "meson compile". - # Ubuntu 20.04 uses meson 0.53.2. - ninja + meson compile - name: Test run: | cd _build diff --git a/docs/docs/reference/meson.build b/docs/docs/reference/meson.build index 33aac27..397e975 100644 --- a/docs/docs/reference/meson.build +++ b/docs/docs/reference/meson.build @@ -18,17 +18,7 @@ docinstall_flags = [] foreach module : tag_file_modules depmod = dependency(module, required: false) if depmod.found() - if meson.version().version_compare('>=0.54.0') - doxytagfile = depmod.get_variable(pkgconfig: 'doxytagfile', internal: 'doxytagfile', default_value: '') - htmlrefpub = depmod.get_variable(pkgconfig: 'htmlrefpub', internal: 'htmlrefpub', default_value: '') - htmlrefdir = depmod.get_variable(pkgconfig: 'htmlrefdir', internal: 'htmlrefdir', default_value: '') - else - # TODO: Remove the possibility to build with meson.version() < 0.54.0 - # when >= 0.54.0 is available in GitHub's CI (continuous integration). - doxytagfile = depmod.get_variable(pkgconfig: 'doxytagfile', default_value: '') - htmlrefpub = depmod.get_variable(pkgconfig: 'htmlrefpub', default_value: '') - htmlrefdir = depmod.get_variable(pkgconfig: 'htmlrefdir', default_value: '') - endif + doxytagfile = depmod.get_variable(pkgconfig: 'doxytagfile', internal: 'doxytagfile', default_value: '') if doxytagfile != '' if depmod.type_name() == 'internal' # Subprojects must build their tag files before doxygen is called. @@ -38,6 +28,8 @@ foreach module : tag_file_modules doxygen_tag_targets += subproject(module).get_variable('global_tag_file_target') endif endif + htmlrefpub = depmod.get_variable(pkgconfig: 'htmlrefpub', internal: 'htmlrefpub', default_value: '') + htmlrefdir = depmod.get_variable(pkgconfig: 'htmlrefdir', internal: 'htmlrefdir', default_value: '') if htmlrefpub == '' htmlrefpub = htmlrefdir elif htmlrefdir == '' diff --git a/meson.build b/meson.build index 281e901..343ccd2 100644 --- a/meson.build +++ b/meson.build @@ -7,12 +7,9 @@ project('libsigc++', 'cpp', 'cpp_std=c++17', 'warning_level=0', ], - meson_version: '>= 0.51.0', # required for dep.get_variable() + meson_version: '>= 0.54.0', # required for meson.override_dependency() + # and dep.get_variable(internal:) ) -#TODO: Require meson_version: '>= 0.54.0' when it's available -# in GitHub's CI (continuous integration). -# meson_version() >= 0.54.0 is necessary if sigc++ is a subproject, -# or if mm-common is a subproject of sigc++. sigcxx_api_version = '3.0' sigcxx_pcname = 'sigc++-' + sigcxx_api_version @@ -148,7 +145,6 @@ sys.exit(os.path.isfile("@0@")) endif # Check if perl is required and available. -# Done now, when the doc_reference script is available. doc_perl_prop = run_command( python3, doc_reference, 'get_script_property', '', # MMDOCTOOLDIR is not used -- cgit v1.2.1