845187
From 9bad0a2d5e35fdd2d89efedae1298d7c3dd158a3 Mon Sep 17 00:00:00 2001
845187
From: David King <amigadave@amigadave.com>
845187
Date: Tue, 21 Dec 2021 10:09:29 +0000
845187
Subject: [PATCH 1/3] meson: Remove missing reftests
845187
845187
Removed from autotools build in commit
845187
93e1f7f1ec709325fe9b0554b92add06ad988ae8.
845187
---
845187
 testsuite/reftests/meson.build | 7 -------
845187
 1 file changed, 7 deletions(-)
845187
845187
diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build
845187
index 9bfe1bb698..b4bf6784cc 100644
845187
--- a/testsuite/reftests/meson.build
845187
+++ b/testsuite/reftests/meson.build
845187
@@ -291,9 +291,6 @@ test_data = [
845187
   'label-text-shadow-clipping.css',
845187
   'label-text-shadow-clipping.ref.ui',
845187
   'label-text-shadow-clipping.ui',
845187
-  'label-text-shadow-changes-modify-clip.css',
845187
-  'label-text-shadow-changes-modify-clip.ref.ui',
845187
-  'label-text-shadow-changes-modify-clip.ui',
845187
   'label-width-chars-dont-shrink.ref.ui',
845187
   'label-width-chars-dont-shrink.ui',
845187
   'label-wrap-justify.ref.ui',
845187
@@ -405,10 +402,6 @@ test_data = [
845187
   'textview-margins.ui',
845187
   'textview-tags.ref.ui',
845187
   'textview-tags.ui',
845187
-  'toplevel-vs-popup.ref.ui',
845187
-  'toplevel-vs-popup.ui',
845187
-  'treeview-crash-too-wide.ref.ui',
845187
-  'treeview-crash-too-wide.ui',
845187
   'treeview-fixed-height.css',
845187
   'treeview-fixed-height.ref.ui',
845187
   'treeview-fixed-height.ui',
845187
-- 
845187
2.33.1
845187
845187
845187
From 2b566f0633a740cca2b30941231f0507de873002 Mon Sep 17 00:00:00 2001
845187
From: David King <amigadave@amigadave.com>
845187
Date: Tue, 21 Dec 2021 11:10:37 +0000
845187
Subject: [PATCH 2/3] meson: Install example schema XML
845187
845187
---
845187
 examples/application10/meson.build | 4 +++-
845187
 examples/application5/meson.build  | 4 +++-
845187
 examples/application6/meson.build  | 4 +++-
845187
 examples/application7/meson.build  | 4 +++-
845187
 examples/application8/meson.build  | 4 +++-
845187
 examples/application9/meson.build  | 4 +++-
845187
 6 files changed, 18 insertions(+), 6 deletions(-)
845187
845187
diff --git a/examples/application10/meson.build b/examples/application10/meson.build
845187
index ce842ae794..417a64155e 100644
845187
--- a/examples/application10/meson.build
845187
+++ b/examples/application10/meson.build
845187
@@ -5,7 +5,7 @@ app10_resources = gnome.compile_resources(
845187
   source_dir: '.'
845187
 )
845187
 
845187
-app10_schemas = gnome.compile_schemas()
845187
+app10_schemas = gnome.compile_schemas(depend_files: files(['org.gtk.exampleapp.gschema.xml']))
845187
 
845187
 
845187
 app10 = executable(
845187
@@ -21,3 +21,5 @@ app10 = executable(
845187
   app10_schemas,
845187
   dependencies: libgtk_dep
845187
 )
845187
+
845187
+install_data('org.gtk.exampleapp.gschema.xml', install_dir: gtk_schemasdir)
845187
diff --git a/examples/application5/meson.build b/examples/application5/meson.build
845187
index f0fed1ca59..8ecb41948e 100644
845187
--- a/examples/application5/meson.build
845187
+++ b/examples/application5/meson.build
845187
@@ -5,7 +5,7 @@ app5_resources = gnome.compile_resources(
845187
   source_dir: '.'
845187
 )
845187
 
845187
-app5_schemas = gnome.compile_schemas()
845187
+app5_schemas = gnome.compile_schemas(depend_files: files(['org.gtk.exampleapp.gschema.xml']))
845187
 
845187
 
845187
 app5 = executable(
845187
@@ -19,3 +19,5 @@ app5 = executable(
845187
   app5_schemas,
845187
   dependencies: libgtk_dep
845187
 )
845187
+
845187
+install_data('org.gtk.exampleapp.gschema.xml', install_dir: gtk_schemasdir)
845187
diff --git a/examples/application6/meson.build b/examples/application6/meson.build
845187
index 2d923f35a3..8a172e2e26 100644
845187
--- a/examples/application6/meson.build
845187
+++ b/examples/application6/meson.build
845187
@@ -5,7 +5,7 @@ app6_resources = gnome.compile_resources(
845187
   source_dir: '.'
845187
 )
845187
 
845187
-app6_schemas = gnome.compile_schemas()
845187
+app6_schemas = gnome.compile_schemas(depend_files: files(['org.gtk.exampleapp.gschema.xml']))
845187
 
845187
 
845187
 app6 = executable(
845187
@@ -21,3 +21,5 @@ app6 = executable(
845187
   app6_schemas,
845187
   dependencies: libgtk_dep
845187
 )
845187
+
845187
+install_data('org.gtk.exampleapp.gschema.xml', install_dir: gtk_schemasdir)
845187
diff --git a/examples/application7/meson.build b/examples/application7/meson.build
845187
index cc32f36ad0..4c46221085 100644
845187
--- a/examples/application7/meson.build
845187
+++ b/examples/application7/meson.build
845187
@@ -5,7 +5,7 @@ app7_resources = gnome.compile_resources(
845187
   source_dir: '.'
845187
 )
845187
 
845187
-app7_schemas = gnome.compile_schemas()
845187
+app7_schemas = gnome.compile_schemas(depend_files: files(['org.gtk.exampleapp.gschema.xml']))
845187
 
845187
 
845187
 app7 = executable(
845187
@@ -21,3 +21,5 @@ app7 = executable(
845187
   app7_schemas,
845187
   dependencies: libgtk_dep
845187
 )
845187
+
845187
+install_data('org.gtk.exampleapp.gschema.xml', install_dir: gtk_schemasdir)
845187
diff --git a/examples/application8/meson.build b/examples/application8/meson.build
845187
index 1192f4d688..ee49034d2b 100644
845187
--- a/examples/application8/meson.build
845187
+++ b/examples/application8/meson.build
845187
@@ -5,7 +5,7 @@ app8_resources = gnome.compile_resources(
845187
   source_dir: '.'
845187
 )
845187
 
845187
-app8_schemas = gnome.compile_schemas()
845187
+app8_schemas = gnome.compile_schemas(depend_files: files(['org.gtk.exampleapp.gschema.xml']))
845187
 
845187
 
845187
 app8 = executable(
845187
@@ -21,3 +21,5 @@ app8 = executable(
845187
   app8_schemas,
845187
   dependencies: libgtk_dep
845187
 )
845187
+
845187
+install_data('org.gtk.exampleapp.gschema.xml', install_dir: gtk_schemasdir)
845187
diff --git a/examples/application9/meson.build b/examples/application9/meson.build
845187
index fccee738cb..46b77c4d17 100644
845187
--- a/examples/application9/meson.build
845187
+++ b/examples/application9/meson.build
845187
@@ -5,7 +5,7 @@ app9_resources = gnome.compile_resources(
845187
   source_dir: '.'
845187
 )
845187
 
845187
-app9_schemas = gnome.compile_schemas()
845187
+app9_schemas = gnome.compile_schemas(depend_files: files(['org.gtk.exampleapp.gschema.xml']))
845187
 
845187
 
845187
 app9 = executable(
845187
@@ -21,3 +21,5 @@ app9 = executable(
845187
   app9_schemas,
845187
   dependencies: libgtk_dep
845187
 )
845187
+
845187
+install_data('org.gtk.exampleapp.gschema.xml', install_dir: gtk_schemasdir)
845187
-- 
845187
2.33.1
845187
845187
845187
From e36849e6a397bc7e0356bd51583d79f821f9c3db Mon Sep 17 00:00:00 2001
845187
From: David King <amigadave@amigadave.com>
845187
Date: Tue, 21 Dec 2021 14:04:40 +0000
845187
Subject: [PATCH 3/3] Revert "meson: simplify builtin_immodules build option"
845187
845187
This reverts commit 749a58ab26bc01381d66ccefdd3aa42a34353e70.
845187
845187
This maintains feature parity with the autotools build.
845187
---
845187
 gtk/meson.build           |  2 +-
845187
 meson.build               | 30 ++++++++++++++++++++++++------
845187
 meson_options.txt         |  4 ++--
845187
 modules/input/meson.build |  2 +-
845187
 4 files changed, 28 insertions(+), 10 deletions(-)
845187
845187
diff --git a/gtk/meson.build b/gtk/meson.build
845187
index 9754686cca..12aa7db5c3 100644
845187
--- a/gtk/meson.build
845187
+++ b/gtk/meson.build
845187
@@ -959,7 +959,7 @@ foreach l: immodules
845187
   cond = l.get(2, true)
845187
   cflags = l.get(3, [])
845187
 
845187
-  if cond and builtin_immodules
845187
+  if cond and (builtin_immodules.contains(name) or builtin_all_immodules)
845187
     gtk_cargs += ['-DINCLUDE_IM_@0@'.format(name.underscorify())]
845187
     mod = static_library('staticimmodule-@0@'.format(name),
845187
                          sources + gtk_dep_sources,
845187
diff --git a/meson.build b/meson.build
845187
index 16d1597116..15cca3de15 100644
845187
--- a/meson.build
845187
+++ b/meson.build
845187
@@ -499,6 +499,8 @@ else
845187
   cdata.set_quoted('ISO_CODES_PREFIX', get_option('prefix'))
845187
 endif
845187
 
845187
+backend_immodules = []
845187
+
845187
 pc_gdk_extra_libs = []
845187
 
845187
 cairo_found_type = cairo_dep.type_name()
845187
@@ -554,6 +556,7 @@ if wayland_enabled
845187
   wlprotocolsdep = dependency('wayland-protocols', version: wayland_proto_req)
845187
   wlcursordep    = dependency('wayland-cursor', version: wayland_req)
845187
   wlegldep       = dependency('wayland-egl')
845187
+  backend_immodules += ['wayland']
845187
 
845187
   wayland_pkgs = [
845187
     'wayland-client', wayland_req,
845187
@@ -578,6 +581,8 @@ if x11_enabled
845187
   fontconfig_dep = dependency('fontconfig', fallback: ['fontconfig', 'fontconfig_dep'])
845187
   atkbridge_dep  = dependency('atk-bridge-2.0', version: at_spi2_atk_req)
845187
 
845187
+  backend_immodules += ['xim']
845187
+
845187
   x11_pkgs = ['fontconfig', 'x11', 'xext', 'xi', 'xrandr']
845187
 
845187
   if xcursor_dep.found()
845187
@@ -656,10 +661,12 @@ endif
845187
 
845187
 if broadway_enabled
845187
   pc_gdk_extra_libs += ['-lz']
845187
+  backend_immodules += ['broadway']
845187
 endif
845187
 
845187
 if quartz_enabled
845187
   pc_gdk_extra_libs += ['-Wl,-framework,Cocoa', '-Wl,-framework,Carbon', '-Wl,-framework,CoreGraphics']
845187
+  backend_immodules += ['quartz']
845187
 endif
845187
 
845187
 extra_demo_ldflags = []
845187
@@ -674,6 +681,7 @@ if win32_enabled
845187
     pc_gdk_extra_libs += ['-Wl,-luuid']
845187
   endif
845187
   pc_gdk_extra_libs += ['-lwinmm', '-ldwmapi', '-lsetupapi', '-lcfgmgr32']
845187
+  backend_immodules += ['ime']
845187
 
845187
   # Check whether libepoxy is built with EGL support on Windows
845187
   win32_has_egl = epoxy_dep.get_variable(
845187
@@ -684,20 +692,30 @@ endif
845187
 
845187
 # IMModules stuff-unfortunately we need to put items here
845187
 # as they can be built as modules or built directly into GTK
845187
+builtin_all_immodules = false
845187
+
845187
 builtin_modules_opt = get_option('builtin_immodules')
845187
-if builtin_modules_opt == 'auto'
845187
+builtin_immodules = []
845187
+
845187
+if builtin_modules_opt == ''
845187
   if os_win32
845187
     # Current MSVC projects build all immodules directly into GTK by default,
845187
     # as does the mingw autotools build
845187
     message('IMModules are built into GTK for MSVC builds by default')
845187
-    builtin_immodules = true
845187
+    builtin_immodules = ['all']
845187
   else
845187
-    builtin_immodules = false
845187
+    builtin_immodules = ['none']
845187
   endif
845187
-elif builtin_modules_opt == 'yes'
845187
-  builtin_immodules = true
845187
 else
845187
-  builtin_immodules = false
845187
+  builtin_immodules = builtin_modules_opt.split(',')
845187
+endif
845187
+
845187
+if builtin_immodules.contains('none')
845187
+  builtin_immodules = []
845187
+elif builtin_immodules.contains('all')
845187
+  builtin_all_immodules = true
845187
+elif builtin_immodules.contains('backend')
845187
+  builtin_immodules += backend_immodules
845187
 endif
845187
 
845187
 proto_sources = [
845187
diff --git a/meson_options.txt b/meson_options.txt
845187
index 1ca55b1467..94099aa01e 100644
845187
--- a/meson_options.txt
845187
+++ b/meson_options.txt
845187
@@ -45,5 +45,5 @@ option('installed_tests', type: 'boolean', value: 'false',
845187
   description : 'enable installed tests')
845187
 
845187
 # input modules
845187
-option('builtin_immodules', type: 'combo', choices : ['yes', 'no', 'auto'],
845187
-       value: 'auto', description: 'Build immodules into GTK so/DLL')
845187
+option('builtin_immodules', type: 'string',
845187
+       value: '', description: 'Build specified immodules into GTK so/DLL (comma-separated list), "all", "none" or "backend"')
845187
diff --git a/modules/input/meson.build b/modules/input/meson.build
845187
index 7b201af894..95534b05ec 100644
845187
--- a/modules/input/meson.build
845187
+++ b/modules/input/meson.build
845187
@@ -7,7 +7,7 @@ foreach l: immodules
845187
   cond = l.get(2, true)
845187
   cflags = l.get(3, [])
845187
 
845187
-  if cond and not builtin_immodules
845187
+  if cond and not (builtin_immodules.contains(name) or builtin_all_immodules)
845187
     shared_module('im-@0@'.format(name),
845187
                   immod_sources,
845187
                   c_args: common_cflags + cflags,
845187
-- 
845187
2.33.1
845187