[vte/wip/egmont/bidi: 4/104] BiDi basic infrastructure



commit a772c9e52a134b20240cda20ae5fc226fa1a1c03
Author: Egmont Koblinger <egmont gmail com>
Date:   Fri Aug 17 18:43:19 2018 +0200

    BiDi basic infrastructure

 meson.build       | 9 +++++++++
 meson_options.txt | 7 +++++++
 src/debug.cc      | 1 +
 src/debug.h       | 1 +
 src/vtegtk.cc     | 6 ++++++
 5 files changed, 24 insertions(+)
---
diff --git a/meson.build b/meson.build
index 3760b3f8..451195b9 100644
--- a/meson.build
+++ b/meson.build
@@ -34,6 +34,7 @@ project(
 gtk3_req_version          = '3.8.0'
 gtk4_req_version          = '4.0.0'
 
+fribidi_req_version       = '1.0.0'
 gio_req_version           = '2.40.0'
 glib_req_version          = '2.40.0'
 gnutls_req_version        = '3.2.7'
@@ -109,6 +110,7 @@ config_h = configuration_data()
 config_h.set_quoted('GETTEXT_PACKAGE', vte_gettext_domain)
 config_h.set_quoted('VERSION', vte_version)
 config_h.set('VTE_DEBUG', enable_debug)
+config_h.set('WITH_FRIBIDI', get_option('fribidi'))
 config_h.set('WITH_GNUTLS', get_option('gnutls'))
 config_h.set('WITH_ICONV', get_option('iconv'))
 
@@ -373,6 +375,12 @@ pcre2_dep    = dependency('libpcre2-8', version: '>=' + pcre2_req_version)
 pthreads_dep = dependency('threads')
 zlib_dep     = dependency('zlib')
 
+if get_option('fribidi')
+  fribidi_dep = dependency('fribidi', version: '>=' + fribidi_req_version)
+else
+  fribidi_dep = dependency('', required: false)
+endif
+
 if get_option('gnutls')
   gnutls_dep = dependency('gnutls', version: '>=' + gnutls_req_version)
 else
@@ -443,6 +451,7 @@ output += '\n'
 output += '  Coverage:     ' + get_option('b_coverage').to_string() + '\n'
 output += '  Debug:        ' + enable_debug.to_string() + '\n'
 output += '  Docs:         ' + get_option('docs').to_string() + '\n'
+output += '  FRIBIDI:      ' + get_option('fribidi').to_string() + '\n'
 output += '  GNUTLS:       ' + get_option('gnutls').to_string() + '\n'
 output += '  GTK+ 3.0:     ' + get_option('gtk3').to_string() + '\n'
 output += '  GTK+ 4.0:     ' + get_option('gtk4').to_string() + '\n'
diff --git a/meson_options.txt b/meson_options.txt
index b8a11a84..d29c66a3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -34,6 +34,13 @@ option(
   description: 'Enable GObject Introspection',
 )
 
+option(
+  'fribidi',
+  type: 'boolean',
+  value: true,
+  description: 'Enable FriBidi support',
+)
+
 option(
   'gnutls',
   type: 'boolean',
diff --git a/src/debug.cc b/src/debug.cc
index 5d88833b..afbd7413 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -57,6 +57,7 @@ _vte_debug_init(void)
     { "hyperlink",    VTE_DEBUG_HYPERLINK    },
     { "modes",        VTE_DEBUG_MODES        },
     { "emulation",    VTE_DEBUG_EMULATION    },
+    { "bidi",         VTE_DEBUG_BIDI         },
   };
 
   _vte_debug_flags = g_parse_debug_string (g_getenv("VTE_DEBUG"),
diff --git a/src/debug.h b/src/debug.h
index 41c3665d..92d9d0f9 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -64,6 +64,7 @@ typedef enum {
         VTE_DEBUG_HYPERLINK     = 1 << 24,
         VTE_DEBUG_MODES         = 1 << 25,
         VTE_DEBUG_EMULATION     = 1 << 26,
+        VTE_DEBUG_BIDI          = 1 << 27,
 } VteDebugFlags;
 
 void _vte_debug_init(void);
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index c47a5c4a..e6556f22 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -1698,6 +1698,12 @@ vte_get_features (void)
                 "+GNUTLS"
 #else
                 "-GNUTLS"
+#endif
+                " "
+#ifdef WITH_FRIBIDI
+                "+BIDI"
+#else
+                "-BIDI"
 #endif
                 ;
 }


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