[xdg-desktop-portal-gnome/gbsneto/libadwaita-again: 6/6] Revert "Drop libadwaita dependency for now"




commit 594246924050a65090c2b52f70d8728604e96e78
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Aug 13 17:55:06 2021 -0300

    Revert "Drop libadwaita dependency for now"
    
    This reverts commit 12dd1f51bc860542c29bf9f359e31faf2f9993a6.

 .gitignore                     | 2 ++
 .gitlab-ci.yml                 | 4 ++--
 src/meson.build                | 6 ++++++
 src/xdg-desktop-portal-gnome.c | 4 +++-
 subprojects/libadwaita.wrap    | 3 +++
 xdg-desktop-portal-gnome.doap  | 4 ++--
 6 files changed, 18 insertions(+), 5 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index dec5a77..c104686 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,5 @@ src/views/.dirstamp
 .gitlab
 .flatpak-builder
 **/*~
+/subprojects/*
+!/subprojects/libadwaita.wrap
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 73bd7f2..4917979 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,7 +14,7 @@ build-fedora:
   image: fedora:latest
   extends: .build-common
   before_script:
-    - dnf install -y 'dnf-command(builddep)' meson gtk4-devel
+    - dnf install -y 'dnf-command(builddep)' meson git gtk4-devel sassc
     - dnf builddep -y xdg-desktop-portal-gtk
 
 build-ubuntu:
@@ -25,5 +25,5 @@ build-ubuntu:
   before_script:
     - sed -i '/deb-src/s/^# //' /etc/apt/sources.list
     - apt-get update
-    - apt-get install -y meson libgtk-4-dev
+    - apt-get install -y meson git libgtk-4-dev sassc
     - apt-get build-dep -y xdg-desktop-portal-gtk
diff --git a/src/meson.build b/src/meson.build
index 6d2e476..e586a0f 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -56,6 +56,11 @@ config_h.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), mes
 built_sources += configure_file(output: 'config.h', configuration: config_h)
 
 # Sources
+libadwaita_dep = dependency(
+  'libadwaita-1',
+  fallback: ['libadwaita', 'libadwaita_dep'],
+  default_options: ['examples=false', 'introspection=disabled', 'tests=false', 'vapi=false'],
+)
 deps = [
   declare_dependency(sources: built_sources),
   meson.get_compiler('c').find_library('m'),
@@ -64,6 +69,7 @@ deps = [
   dependency('gio-unix-2.0'),
   dependency('gtk4', version: '>= 4.0'),
   dependency('gsettings-desktop-schemas'),
+  libadwaita_dep,
   xdg_desktop_portal_dep,
 ]
 
diff --git a/src/xdg-desktop-portal-gnome.c b/src/xdg-desktop-portal-gnome.c
index d704014..a285c59 100644
--- a/src/xdg-desktop-portal-gnome.c
+++ b/src/xdg-desktop-portal-gnome.c
@@ -31,7 +31,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#include <gtk/gtk.h>
+#include <adwaita.h>
 
 #include <gio/gio.h>
 #include <gio/gdesktopappinfo.h>
@@ -241,6 +241,8 @@ main (int argc, char *argv[])
                              NULL,
                              NULL);
 
+  adw_init ();
+
   g_main_loop_run (loop);
 
   g_bus_unown_name (owner_id);
diff --git a/subprojects/libadwaita.wrap b/subprojects/libadwaita.wrap
new file mode 100644
index 0000000..a0c0609
--- /dev/null
+++ b/subprojects/libadwaita.wrap
@@ -0,0 +1,3 @@
+[wrap-git]
+url = https://gitlab.gnome.org/GNOME/libadwaita.git
+revision = main
diff --git a/xdg-desktop-portal-gnome.doap b/xdg-desktop-portal-gnome.doap
index 11725d9..7a92cb5 100644
--- a/xdg-desktop-portal-gnome.doap
+++ b/xdg-desktop-portal-gnome.doap
@@ -8,8 +8,8 @@
   <description xml:lang="en">GNOME Desktop Portal</description>
   <shortdesc xml:lang="en">
     XDG Desktop Portal implementation for GNOME. It uses GNOME-specific APIs and
-    components, such as GNOME Shell, Mutter, and GNOME Settings Daemon, to
-    provide various portal features.
+    components, such as GNOME Shell, Mutter, GNOME Settings Daemon, and libadwaita,
+    to provide various portal features.
   </shortdesc>
   <!--
   <homepage rdf:resource="http://www.gnome.org/"; />


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