[gtk/gtk-3-24-meson: 26/89] meson: Fix Broadway builds



commit 1418d8f0f1daaf18a3b40dcc06218f0e12a414fc
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Mar 13 16:27:36 2019 +0800

    meson: Fix Broadway builds
    
    Make sure the source files are in line with GTK+-3.x Broadway backend
    sources.

 gdk/broadway/gen-c-array.py | 21 +++++++++++++++++++++
 gdk/broadway/meson.build    |  7 ++++---
 gtk/meson.build             |  4 ----
 3 files changed, 25 insertions(+), 7 deletions(-)
---
diff --git a/gdk/broadway/gen-c-array.py b/gdk/broadway/gen-c-array.py
new file mode 100644
index 0000000000..afffda34e5
--- /dev/null
+++ b/gdk/broadway/gen-c-array.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+
+import argparse
+import sys
+
+parser = argparse.ArgumentParser()
+parser.add_argument('--array-name', help='The name of the array variable')
+parser.add_argument('--output', metavar='FILE', help='Output file',
+                    type=argparse.FileType('w'),
+                    default=sys.stdout)
+parser.add_argument('input', metavar='FILE', help='The input file',
+                    type=argparse.FileType('r'))
+
+args = parser.parse_args()
+
+args.output.write('static const char {}[] = {{\n'.format(args.array_name))
+for line in args.input:
+    for ch in line:
+        args.output.write('  0x{:02x},\n'.format(ord(ch)))
+
+args.output.write('};')
diff --git a/gdk/broadway/meson.build b/gdk/broadway/meson.build
index 57e3488786..1e2e3044af 100644
--- a/gdk/broadway/meson.build
+++ b/gdk/broadway/meson.build
@@ -19,9 +19,10 @@ gdk_broadway_sources = files(
 
 gdk_broadway_public_headers = files(
   'gdkbroadwaydisplay.h',
-  'gdkbroadwaysurface.h',
+  'gdkbroadwaywindow.h',
   'gdkbroadwaycursor.h',
   'gdkbroadwaymonitor.h',
+  'gdkbroadwayvisual.h',
 )
 
 # Broadway backend headers aren't installed it seems
@@ -67,11 +68,11 @@ libgdk_broadway = static_library('gdk-broadway',
 
 # gtk4-broadwayd
 
-broadwayd_syslib = os_win32 ? find_library('ws2_32') : shmlib
+broadwayd_syslib = os_win32 ? cc.find_library('ws2_32') : shmlib
 
 executable('broadwayd',
   clienthtml_h, broadwayjs_h,
-  'broadwayd.c', 'broadway-server.c', 'broadway-output.c',
+  'broadwayd.c', 'broadway-server.c', 'broadway-buffer.c', 'broadway-output.c',
   include_directories: [confinc, gdkinc, include_directories('.')],
   c_args: ['-DGDK_COMPILATION', '-DG_LOG_DOMAIN="Gdk"', ],
   dependencies : [broadwayd_syslib, gdk_deps],
diff --git a/gtk/meson.build b/gtk/meson.build
index bb4f179149..f392b20db9 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -836,10 +836,6 @@ if wayland_enabled
   gtk_sources += gtk_use_wayland_sources
 endif
 
-if broadway_enabled
-  gtk_sources += ['gtkimcontextbroadway.c']
-endif
-
 if win32_enabled
   gtk_cargs += []
   gtk_sources += gtk_use_win32_sources


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