From c5481a125eb849f27749e8046470c2650918adc7 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 9 Jun 2020 15:46:32 +0100 Subject: [PATCH 1/4] Add libcloudproviders as a fallback subproject We require a new version of libcloudproviders so that we can enable it in our CI pipeline. --- meson.build | 12 ++++++++++-- subprojects/libcloudproviders.wrap | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 subprojects/libcloudproviders.wrap diff --git a/meson.build b/meson.build index 9d9e4e37b2..3453551c36 100644 --- a/meson.build +++ b/meson.build @@ -37,7 +37,7 @@ wayland_proto_req = '>= 1.20' wayland_req = '>= 1.14.91' graphene_req = '>= 1.9.1' epoxy_req = '>= 1.4' -cloudproviders_req = '>= 0.2.5' +cloudproviders_req = '>= 0.3.1' xkbcommon_req = '>= 0.2.0' gnome = import('gnome') @@ -666,7 +666,15 @@ endif cloudproviders_enabled = get_option('cloudproviders') if cloudproviders_enabled - cloudproviders_dep = dependency('cloudproviders', required: true) + cloudproviders_dep = dependency('cloudproviders', + version: cloudproviders_req, + fallback: [ + 'libcloudproviders', + 'libcloudproviders_dep', + ], + default_options: [ + 'vapigen=false', + ]) if cloudproviders_dep.found() cdata.set('HAVE_CLOUDPROVIDERS', cloudproviders_dep.found()) else diff --git a/subprojects/libcloudproviders.wrap b/subprojects/libcloudproviders.wrap new file mode 100644 index 0000000000..2b47d8cad6 --- /dev/null +++ b/subprojects/libcloudproviders.wrap @@ -0,0 +1,4 @@ +[wrap-git] +directory=libcloudproviders +url=https://gitlab.gnome.org/World/libcloudproviders.git +revision=master From d243c6d7f9b4eeb9a1f0a25ac8d0a3ce3f6488b6 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 8 Jun 2020 11:37:29 +0100 Subject: [PATCH 2/4] ci: Enable libcloudproviders support We ended up breaking the build when it's enabled, so we should test the feature in our CI pipeline. --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a97f203c63..74c19d642f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,6 +18,7 @@ stages: variables: COMMON_MESON_FLAGS: "--fatal-meson-warnings --werror" BACKEND_FLAGS: "-Dx11-backend=true -Dwayland-backend=true -Dbroadway-backend=true -Dvulkan=yes" + FEATURE_FLAGS: "-Dcloudproviders=true" MESON_TEST_TIMEOUT_MULTIPLIER: 2 FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v17" FLATPAK_IMAGE: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master" @@ -70,7 +71,7 @@ fedora-x86_64: variables: EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both" script: - - meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} + - meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS} -Dprofiler=true _build - ninja -C _build @@ -84,7 +85,7 @@ release-build: variables: EXTRA_MESON_FLAGS: "--buildtype=release" script: - - meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} + - meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS} _build - ninja -C _build - .gitlab-ci/run-tests.sh _build x11 From 12c38c1d57dea889441bdfaaf5c438e2a6bbcbf0 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 17 Jun 2020 20:49:57 +0100 Subject: [PATCH 3/4] Use the appropriate include for libcloudproviders Libcloudproviders has a single header entry point, so we shouldn't include a sub-header. Additionally, the include path provided by the pkg-config file is: -I${includedir}/cloudproviders So the include directive should be: #include The fact that it worked until now was an accident caused by the blanket: -I${includedir} we get for free; it broke the build when using libcloudproviders as a subproject. --- gtk/gtksidebarrow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtksidebarrow.c b/gtk/gtksidebarrow.c index 0a2749a122..fbd90b66bb 100644 --- a/gtk/gtksidebarrow.c +++ b/gtk/gtksidebarrow.c @@ -30,7 +30,7 @@ #include "gtkspinner.h" #ifdef HAVE_CLOUDPROVIDERS -#include +#include #endif struct _GtkSidebarRow From e5d6bb68ce390a330fe3fdab72f7f9858a21eff5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 17 Jun 2020 16:19:55 -0400 Subject: [PATCH 4/4] Fix another cloudprovider include --- gtk/gtkplacessidebar.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index 2dc9c42116..f016612ef0 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -25,9 +25,7 @@ #include #ifdef HAVE_CLOUDPROVIDERS -#include -#include -#include +#include #endif #include "gtkplacessidebarprivate.h"