diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2020-04-22 21:16:08 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2020-04-23 16:32:10 -0400 |
commit | d01a387475e2665275a6cd6b0059bf91121b8300 (patch) | |
tree | be0ebaca7c7390e97b340d4b51cd36367bc74ed9 | |
parent | ec00edd941953626ac027810f747847f68a71000 (diff) | |
download | gobject-introspection-d01a387475e2665275a6cd6b0059bf91121b8300.tar.gz |
Meson: Override gobject-introspection-1.0 dependency
When gobject-introspection-1.0 pkg-config is not found on the system,
Meson can fallback to configure g-i as subproject and needs a dependency
object to replace the pc file.
The dependency file needs to ensure that typelibs are created before
compiling any other gir and provide the girdir for files within build
directory. It also need to provide glib dependencies required to compile
girs.
Bump Meson version to 0.54.0 to use meson.override_dependency().
-rw-r--r-- | .gitlab-ci.yml | 4 | ||||
-rw-r--r-- | .gitlab-ci/Dockerfile | 2 | ||||
-rw-r--r-- | .gitlab-ci/minimal.Dockerfile | 2 | ||||
-rwxr-xr-x | .gitlab-ci/run-docker-minimal.sh | 2 | ||||
-rwxr-xr-x | .gitlab-ci/run-docker.sh | 2 | ||||
-rw-r--r-- | .gitlab-ci/test-msvc.bat | 2 | ||||
-rw-r--r-- | .gitlab-ci/test-msys2-meson.sh | 2 | ||||
-rw-r--r-- | meson.build | 15 |
8 files changed, 22 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 16a8f3bb..2b1b9d4d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ stages: - build - deploy -image: registry.gitlab.gnome.org/gnome/gobject-introspection:v6 +image: registry.gitlab.gnome.org/gnome/gobject-introspection:v7 cache: paths: @@ -36,7 +36,7 @@ fedora-x86_64-meson: - public fedora-x86_64-subprojects: - image: registry.gitlab.gnome.org/gnome/gobject-introspection:min-v1 + image: registry.gitlab.gnome.org/gnome/gobject-introspection:min-v2 stage: build variables: CCACHE_BASEDIR: "${CI_PROJECT_DIR}" diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile index 0dec6700..61c5fe41 100644 --- a/.gitlab-ci/Dockerfile +++ b/.gitlab-ci/Dockerfile @@ -48,7 +48,7 @@ RUN dnf -y install \ zlib-devel \ && dnf clean all -RUN pip3 install meson==0.50.1 +RUN pip3 install meson==0.54.0 ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} diff --git a/.gitlab-ci/minimal.Dockerfile b/.gitlab-ci/minimal.Dockerfile index b33aa64b..e4d1f821 100644 --- a/.gitlab-ci/minimal.Dockerfile +++ b/.gitlab-ci/minimal.Dockerfile @@ -15,7 +15,7 @@ RUN dnf -y install \ libmount-devel \ && dnf clean all -RUN pip3 install meson==0.52.0 +RUN pip3 install meson==0.54.0 ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} diff --git a/.gitlab-ci/run-docker-minimal.sh b/.gitlab-ci/run-docker-minimal.sh index 36b2d376..9588f288 100755 --- a/.gitlab-ci/run-docker-minimal.sh +++ b/.gitlab-ci/run-docker-minimal.sh @@ -2,7 +2,7 @@ set -e -TAG="registry.gitlab.gnome.org/gnome/gobject-introspection:min-v1" +TAG="registry.gitlab.gnome.org/gnome/gobject-introspection:min-v2" sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \ --file "minimal.Dockerfile" . diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh index 5d29002c..8e6a04ab 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/gobject-introspection:v6" +TAG="registry.gitlab.gnome.org/gnome/gobject-introspection:v7" sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \ --file "Dockerfile" . diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat index a2ee44b2..d8eaa776 100644 --- a/.gitlab-ci/test-msvc.bat +++ b/.gitlab-ci/test-msvc.bat @@ -9,7 +9,7 @@ py -3 -c "import urllib.request, sys; urllib.request.urlretrieve(*sys.argv[1:])" SET PATH=%CD%;%CD%\win_flex_bison;%PATH% -pip3 install --upgrade --user meson==0.50.1 || goto :error +pip3 install --upgrade --user meson==0.54.0 || goto :error meson _build || goto :error ninja -C _build || goto :error diff --git a/.gitlab-ci/test-msys2-meson.sh b/.gitlab-ci/test-msys2-meson.sh index 9f145e5b..9c607b29 100644 --- a/.gitlab-ci/test-msys2-meson.sh +++ b/.gitlab-ci/test-msys2-meson.sh @@ -31,7 +31,7 @@ pacman --noconfirm -S --needed \ export CCACHE_BASEDIR="${CI_PROJECT_DIR}" export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache" -pip3 install --upgrade --user meson==0.50.1 flake8 +pip3 install --upgrade --user meson==0.54.0 flake8 export PATH="$HOME/.local/bin:$PATH" export CFLAGS="-Werror" diff --git a/meson.build b/meson.build index 3d22dd55..f6f62444 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('gobject-introspection', 'c', version: '1.64.1', - meson_version: '>= 0.50.1', + meson_version: '>= 0.54.0', default_options: [ 'warning_level=1', 'buildtype=debugoptimized', @@ -264,3 +264,16 @@ configure_file( configuration: pkgconfig_conf, install_dir: join_paths(get_option('libdir'), 'pkgconfig'), ) + +# Dependency object used by Meson's GNOME module. This dependency variable must +# be named girepo_dep for backward compatibility with projects that where already +# using that name as fallback: dependency('gobject-introspection-1.0', +# fallback : ['gobject-introspection', 'girepo_dep']) +girepo_dep = declare_dependency( + sources: typelibs, + dependencies: girepo_dep, + variables: { + 'girdir': meson.current_build_dir() / 'gir', + }, +) +meson.override_dependency('gobject-introspection-1.0', girepo_dep) |