[gnome-characters/bilelmoussaoui/ui-cleanup] build: use a subproject as a fallback for libhandy




commit 45fb00765c0d09de1fce50f4e53129a10f777e8e
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date:   Fri Feb 12 13:53:14 2021 +0100

    build: use a subproject as a fallback for libhandy

 .gitlab-ci.yml            |  2 +-
 meson.build               | 16 +++++++++++++++-
 subprojects/libhandy.wrap |  4 ++++
 3 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4683960..acce1ec 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,7 +25,7 @@ fedora:latest:
     stage: cross_environment
     before_script:
         - dnf upgrade -y
-        - dnf install -y 'dnf-command(builddep)' redhat-rpm-config libhandy1-devel
+        - dnf install -y 'dnf-command(builddep)' redhat-rpm-config git
         - dnf builddep -y gnome-characters
     script:
         - meson _build .
diff --git a/meson.build b/meson.build
index d607f99..24f82f4 100644
--- a/meson.build
+++ b/meson.build
@@ -45,11 +45,25 @@ assert(cc.links(libunistring_src, name: 'libunistring support', args: '-lunistri
 # Just check that gjs-1.0 is present and recent enough
 dependency('gjs-1.0', version: '>= 1.50')
 
+
+libhandy = dependency ('libhandy-1', version: '>= 1.1', required: false)
+if not libhandy.found()
+  libhandy = subproject(
+    'libhandy',
+    default_options: [
+      'examples=false',
+      'glade_catalog=disabled',
+      'tests=false',
+      'vapi=false',
+    ]
+  )
+endif
+
 libgc_deps = [
   dependency('gio-2.0'),
   dependency('gtk+-3.0'),
   dependency('pango'),
-  dependency('libhandy-1', version: '>= 1.1'),
+  libhandy,
   declare_dependency(link_args: '-lunistring')
 ]
 
diff --git a/subprojects/libhandy.wrap b/subprojects/libhandy.wrap
new file mode 100644
index 0000000..6179455
--- /dev/null
+++ b/subprojects/libhandy.wrap
@@ -0,0 +1,4 @@
+[wrap-git]
+directory=libhandy
+url=https://gitlab.gnome.org/GNOME/libhandy.git
+revision=1.1.90


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]