[gtk+] build: Add dependency fallbacks for libs with meson ports
- From: Nirbheek Chauhan <nirbheekc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] build: Add dependency fallbacks for libs with meson ports
- Date: Mon, 11 Sep 2017 18:55:16 +0000 (UTC)
commit aa3e8ee097d477446cbe8d5a94c8e4dc8cef8cbb
Author: Nirbheek Chauhan <nirbheek centricular com>
Date: Thu Sep 7 23:53:41 2017 +0530
build: Add dependency fallbacks for libs with meson ports
With these changes gtk+ builds for me using fallbacks for all libraries
with fallbacks available. Needs the following changes:
https://github.com/ebassi/graphene/pull/109 (graphene)
https://bugzilla.gnome.org/show_bug.cgi?id=787414 (pango)
https://github.com/mesonbuild/meson/pull/2291 (will be in meson 0.42.1)
https://bugzilla.gnome.org/show_bug.cgi?id=787416
gdk/meson.build | 1 +
gtk/meson.build | 1 +
meson.build | 34 ++++++++++++++++++++++++----------
subprojects/gdk-pixbuf.wrap | 5 +++++
subprojects/glib.wrap | 5 +++++
subprojects/pango.wrap | 5 +++++
6 files changed, 41 insertions(+), 10 deletions(-)
---
diff --git a/gdk/meson.build b/gdk/meson.build
index f9afe72..16a1a37 100644
--- a/gdk/meson.build
+++ b/gdk/meson.build
@@ -156,6 +156,7 @@ gdk_deps = [
pango_dep,
cairogobj_dep,
glib_dep,
+ gobject_dep,
epoxy_dep,
fontconfig_dep,
giounix_dep,
diff --git a/gtk/meson.build b/gtk/meson.build
index cb04e90..20b0410 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -814,6 +814,7 @@ gtk_deps = [
gmodule_dep,
giounix_dep,
glib_dep,
+ gobject_dep,
atkbridge_dep,
pangocairo_dep,
pango_dep,
diff --git a/meson.build b/meson.build
index 0b1df53..55dcdba 100644
--- a/meson.build
+++ b/meson.build
@@ -3,7 +3,9 @@ project('gtk+-4.0', 'c',
default_options: [
'buildtype=debugoptimized',
'warning_level=1',
- 'c_std=c99',
+ # We only need c99, but glib needs GNU-specific features
+ # https://github.com/mesonbuild/meson/issues/2289
+ 'c_std=gnu99',
],
meson_version : '>= 0.40.0',
license: 'LGPLv2.1+')
@@ -313,18 +315,27 @@ gtkinc = include_directories('gtk')
testinc = include_directories('tests')
# Dependencies
-glib_dep = dependency('glib-2.0', version: glib_req)
-giounix_dep = dependency('gio-unix-2.0', version: glib_req, required: false)
-pango_dep = dependency('pango', version: pango_req)
-pangoft_dep = dependency('pangoft2', required: wayland_enabled or x11_enabled)
+glib_dep = dependency('glib-2.0', version: glib_req,
+ fallback : ['glib', 'libglib_dep'])
+gobject_dep = dependency('gobject-2.0', version: glib_req,
+ fallback : ['glib', 'libgobject_dep'])
+giounix_dep = dependency('gio-unix-2.0', version: glib_req, required: false,
+ fallback : ['glib', 'libgio_dep'])
+gmodule_dep = dependency('gmodule-2.0', version: glib_req,
+ fallback : ['glib', 'libgmodule_dep'])
cairo_dep = dependency('cairo', version: cairo_req)
-pangocairo_dep = dependency('pangocairo', version: cairo_req)
cairogobj_dep = dependency('cairo-gobject', version: cairo_req)
-pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req)
+pango_dep = dependency('pango', version: pango_req,
+ fallback : ['pango', 'libpango_dep'])
+pangoft_dep = dependency('pangoft2', required: wayland_enabled or x11_enabled,
+ fallback : ['pango', 'libpangoft2_dep'])
+pangocairo_dep = dependency('pangocairo', version: cairo_req,
+ fallback : ['pango', 'libpangocairo_dep'])
+pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req,
+ fallback : ['gdk-pixbuf', 'gdkpixbuf_dep'])
epoxy_dep = dependency('epoxy', version: epoxy_req,
fallback: ['libepoxy', 'libepoxy_dep'])
atk_dep = dependency('atk', version: atk_req)
-gmodule_dep = dependency('gmodule-2.0', version: glib_req)
harfbuzz_dep = dependency('harfbuzz', version: '>= 0.9', required: false)
xkbdep = dependency('xkbcommon', version: xkbcommon_req)
graphene_dep = dependency('graphene-gobject-1.0', version: graphene_req,
@@ -483,8 +494,11 @@ if win32_enabled
backend_immodules += ['ime']
endif
-# Check for bind_textdomain_codeset, including -lintl if GLib brings it in
-if cc.has_function('bind_textdomain_codeset', dependencies: glib_dep)
+# Check for bind_textdomain_codeset, including -lintl if GLib brings it in by
+# doing the same check as glib. We can't check that by linking to glib because
+# it might be a subproject and hence not built yet.
+libintl_dep = cc.find_library('intl', required : false)
+if cc.has_function('bind_textdomain_codeset', dependencies: libintl_dep)
cdata.set('HAVE_BIND_TEXTDOMAIN_CODESET', 1)
endif
diff --git a/subprojects/gdk-pixbuf.wrap b/subprojects/gdk-pixbuf.wrap
new file mode 100644
index 0000000..1d251c5
--- /dev/null
+++ b/subprojects/gdk-pixbuf.wrap
@@ -0,0 +1,5 @@
+[wrap-git]
+directory=gdk-pixbuf
+url=https://git.gnome.org/browse/gdk-pixbuf
+push-url=ssh://git.gnome.org/git/gdk-pixbuf
+revision=origin/master
diff --git a/subprojects/glib.wrap b/subprojects/glib.wrap
new file mode 100644
index 0000000..17aa35a
--- /dev/null
+++ b/subprojects/glib.wrap
@@ -0,0 +1,5 @@
+[wrap-git]
+directory=glib
+url=https://git.gnome.org/browse/glib
+push-url=ssh://git.gnome.org/git/glib
+revision=origin/master
diff --git a/subprojects/pango.wrap b/subprojects/pango.wrap
new file mode 100644
index 0000000..e7bc173
--- /dev/null
+++ b/subprojects/pango.wrap
@@ -0,0 +1,5 @@
+[wrap-git]
+directory=pango
+url=https://git.gnome.org/browse/pango
+push-url=ssh://git.gnome.org/git/pango
+revision=origin/master
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]