[vte] build: Port to meson build system
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] build: Port to meson build system
- Date: Sun, 14 Apr 2019 19:12:31 +0000 (UTC)
commit 7566ad673a12d26293b0a74dd3cb3e5f3d22ed49
Author: Christian Persch <chpe src gnome org>
Date: Sun Apr 14 21:11:43 2019 +0200
build: Port to meson build system
Based on a patch by Iñigo Martínez.
Drop the glade catalogue, which was unmaintained.
Remove the config.h define for the default terminfo name to use,
and just hardcode it.
https://gitlab.gnome.org/GNOME/vte/issues/78
Makefile.am | 48 -
Makefile.meson | 48 +
autogen.sh | 16 -
bindings/Makefile.am | 13 -
bindings/gir/Makefile.am | 34 -
bindings/gir/meson.build | 38 +
bindings/vala/Makefile.am | 98 ---
bindings/vala/meson.build | 98 +++
configure.ac | 485 ----------
doc/Makefile.am | 11 -
doc/reference/Makefile.am | 168 ----
doc/reference/check-doc-coverage.sh | 50 --
doc/reference/check-doc-syntax.sh | 12 -
doc/reference/meson.build | 108 +++
git.mk | 333 -------
glade/Makefile.am | 43 -
.../hicolor_actions_16x16_widget-vte-terminal.png | Bin 644 -> 0 bytes
.../hicolor_actions_22x22_widget-vte-terminal.png | Bin 901 -> 0 bytes
glade/vte.xml.in.in | 45 -
m4/attributes.m4 | 289 ------
m4/ax_cxx_compile_stdcxx.m4 | 980 ---------------------
meson.build | 406 +++++++++
meson_options.txt | 70 ++
perf/Makefile.am | 16 -
po/{POTFILES.in => POTFILES} | 0
po/POTFILES.skip | 7 -
po/meson.build | 21 +
src/Makefile.am | 451 ----------
src/app/Makefile.am | 58 --
src/app/app.cc | 2 -
src/app/meson.build | 56 ++
src/meson.build | 475 ++++++++++
src/pty.cc | 6 +-
src/test-vte-sh.sh | 7 +-
src/{vte.gresource.xml.in => vte.gresource.xml} | 0
src/vte/meson.build | 70 ++
src/vtegtk.cc | 2 -
vte.pc.in | 11 -
38 files changed, 1397 insertions(+), 3178 deletions(-)
---
diff --git a/Makefile.meson b/Makefile.meson
new file mode 100644
index 00000000..a7b97472
--- /dev/null
+++ b/Makefile.meson
@@ -0,0 +1,48 @@
+# Copyright © 2019 Christian Persch
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library. If not, see <https://www.gnu.org/licenses/>.
+
+srcdir=@srcdir@
+builddir=@builddir@
+vte_gtk3_api_version = @vte_gtk3_api_version@
+vte_gtk4_api_version = @vte_gtk4_api_version@
+
+#
+
+NTHREADS = 1
+NJOBS = -j$(NTHREADS)
+NINJA = ninja $(NJOBS)
+
+#
+
+all:
+ $(NINJA)
+
+check:
+ MESON_TESTTHREADS=$(NTHREADS) $(NINJA) test
+
+clean:
+ $(NINJA) clean
+
+coverage:
+ $(NINJA) coverage
+
+doc:
+ $(NINJA) vte-$(vte_gtk3_api_version)-doc
+
+install:
+ $(NINJA) install
+
+uninstall:
+ $(NINJA) uninstall
diff --git a/bindings/gir/meson.build b/bindings/gir/meson.build
new file mode 100644
index 00000000..dba5a2db
--- /dev/null
+++ b/bindings/gir/meson.build
@@ -0,0 +1,38 @@
+# Copyright © 2018, 2019 Iñigo Martínez
+# Copyright © 2019 Christian Persch
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library. If not, see <https://www.gnu.org/licenses/>.
+
+gir_dep = dependency('gobject-introspection-1.0', version: '>= 0.9.0')
+
+if get_option('gtk3')
+ libvte_gtk3_gir_includes = [
+ 'Gdk-3.0',
+ 'Gtk-3.0',
+ 'Pango-1.0',
+ ]
+
+ libvte_gtk3_gir = gnome.generate_gir(
+ libvte_gtk3,
+ sources: libvte_gtk3_public_headers + libvte_common_doc_sources,
+ includes: libvte_gtk3_gir_includes,
+ dependencies: libvte_gtk3_dep,
+ extra_args: '-DVTE_COMPILATION',
+ nsversion: vte_gtk3_api_version,
+ namespace: 'Vte',
+ export_packages: vte_gtk3_api_name,
+ header: 'vte' / 'vte.h',
+ install: true,
+ )
+endif
diff --git a/bindings/vala/meson.build b/bindings/vala/meson.build
new file mode 100644
index 00000000..db848e86
--- /dev/null
+++ b/bindings/vala/meson.build
@@ -0,0 +1,98 @@
+# Copyright © 2018, 2019 Iñigo Martínez
+# Copyright © 2019 Christian Persch
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library. If not, see <https://www.gnu.org/licenses/>.
+
+assert(get_option('gir'), 'gir is required for vala support')
+assert(get_option('gtk3'), 'vala support only available for gtk3')
+
+add_languages('vala', required: true)
+
+valac = meson.get_compiler('vala')
+assert(valac.version().version_compare('>= 0.24.0'), 'vala >= 0.24 required')
+
+posix_dep = valac.find_library('posix')
+
+libvte_gtk3_vapi_deps = [
+ 'gio-2.0',
+ 'glib-2.0',
+ 'pango',
+ 'gtk+-3.0',
+]
+
+libvte_gtk3_vapi_dep = gnome.generate_vapi(
+ vte_gtk3_api_name,
+ sources: libvte_gtk3_gir[0],
+ packages: libvte_gtk3_vapi_deps,
+ install: true,
+)
+
+# Vala test application
+
+vapp_resource_data = files(
+ 'app.ui',
+ 'search-popover.ui',
+)
+
+vapp_resource_sources = gnome.compile_resources(
+ 'appresources',
+ 'app.gresource.xml',
+ c_name: 'app',
+ dependencies: vapp_resource_data,
+ export: true,
+)
+
+vapp_sources = vapp_resource_sources + files(
+ 'config.vapi',
+ 'app.vala'
+)
+
+vapp_cflags = [
+ '-Wno-unused-but-set-variable',
+ '-Wno-unused-variable',
+]
+
+vapp_valaflags = []
+
+if valac.version().version_compare('>= 0.31.1')
+ vapp_valaflags += '--disable-since-check'
+endif
+
+if gtk3_dep.version().version_compare('>= 3.16')
+ vapp_valaflags += '--define=GTK_3_16'
+endif
+
+vapp_incs = [
+ top_inc,
+ src_inc,
+ vte_inc,
+]
+
+vapp_deps = [
+ gio_dep,
+ glib_dep,
+ gtk3_dep,
+ libvte_gtk3_vapi_dep,
+ posix_dep,
+]
+
+vapp = executable(
+ 'vala-test',
+ sources: vapp_sources,
+ include_directories: vapp_incs,
+ dependencies: vapp_deps,
+ c_args: vapp_cflags,
+ vala_args: vapp_valaflags,
+ install: false,
+)
diff --git a/doc/reference/meson.build b/doc/reference/meson.build
new file mode 100644
index 00000000..88cd671f
--- /dev/null
+++ b/doc/reference/meson.build
@@ -0,0 +1,108 @@
+# Copyright © 2018, 2019 Iñigo Martínez
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library. If not, see <https://www.gnu.org/licenses/>.
+
+# Meson insufficiency! Would be so much easier to just make this
+# (vte_gtk3_sources - vte_gtk3_public_headers).filter('.h'), but
+# but there is no array subtraction or filtering. Or just allow listing the
+# headers that we DO want to get scanned.
+# So instead just list all the headers here again... :-(
+
+private_headers = [
+ 'buffer.h',
+ 'caps.hh',
+ 'cell.hh',
+ 'config.h',
+ 'debug.h',
+ 'keymap.h',
+ 'marshal.h',
+ 'modes.hh',
+ 'modes-ecma.hh',
+ 'modes-private.hh',
+ 'parser.hh',
+ 'parser-arg.hh',
+ 'parser-c01.hh',
+ 'parser-charset.hh',
+ 'parser-charset-tables.hh',
+ 'parser-cmd.hh',
+ 'parser-csi.hh',
+ 'parser-dcs.hh',
+ 'parser-esc.hh',
+ 'parser-glue.hh',
+ 'parser-osc.hh',
+ 'parser-reply.hh',
+ 'parser-string.hh',
+ 'ring.hh',
+ 'tabstops.hh',
+ 'vteconv.h',
+ 'vtedraw.h',
+ 'vteinternal.hh',
+ 'vterowdata.hh',
+ 'vtestream-base.h',
+ 'vtestream-file.h',
+ 'vtestream.h',
+ 'vtetypebuiltins.h',
+ 'vteunistr.h',
+]
+
+scan_args = [
+ '--deprecated-guards="VTE_DISABLE_DEPRECATED"',
+ '--ignore-decorators=_VTE_GNUC_NONNULL\s*\([^)]*\)',
+]
+
+glib_prefix = glib_dep.get_pkgconfig_variable('prefix')
+
+version_conf = configuration_data()
+version_conf.set('VERSION', vte_version)
+
+content_files = configure_file(
+ input: 'version.xml.in',
+ output: '@BASENAME@',
+ configuration: version_conf
+)
+
+if get_option('gtk3')
+ gtk3_prefix = gtk3_dep.get_pkgconfig_variable('prefix')
+
+ fixxref_args = [
+ '--html-dir=' + (vte_prefix / gnome.gtkdoc_html_dir(vte_gtk3_api_name)),
+ '--extra-dir=' + (glib_prefix / gnome.gtkdoc_html_dir('glib')),
+ '--extra-dir=' + (glib_prefix / gnome.gtkdoc_html_dir('gio')),
+ '--extra-dir=' + (gtk3_prefix / gnome.gtkdoc_html_dir('gdk')),
+ '--extra-dir=' + (gtk3_prefix / gnome.gtkdoc_html_dir('gdk-pixbuf')),
+ '--extra-dir=' + (gtk3_prefix / gnome.gtkdoc_html_dir('gtk')),
+ ]
+
+ gnome.gtkdoc(
+ 'vte',
+ main_xml: 'vte-docs.xml',
+ module_version: vte_api_version,
+ src_dir: [src_inc, vte_inc],
+ ignore_headers: private_headers,
+ include_directories: top_inc,
+ dependencies: libvte_gtk3_dep,
+ c_args: '-DVTE_COMPILATION',
+ namespace: 'vte',
+ scan_args: scan_args,
+ mkdb_args: '--source-suffixes=h,hh,c,cc',
+ fixxref_args: fixxref_args,
+ gobject_typesfile: 'vte.types',
+ content_files: content_files,
+ install: true,
+ )
+endif
+
+if get_option('gtk4')
+ assert(false, 'not yet supported')
+endif
diff --git a/meson.build b/meson.build
new file mode 100644
index 00000000..61539b74
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,406 @@
+# Copyright © 2018, 2019 Iñigo Martínez
+# Copyright © 2019 Christian Persch
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library. If not, see <https://www.gnu.org/licenses/>.
+
+project(
+ 'vte',
+ ['c', 'cpp'],
+ version: '0.57.0',
+ license: ['LGPL-3.0-or-later', 'GPL-3.0-or-later'],
+ default_options: [
+ 'buildtype=release',
+ 'c_std=gnu11',
+ 'cpp_std=gnu++17',
+ ],
+ meson_version: '>= 0.49.0',
+)
+
+# Requirements
+
+gtk3_req_version = '3.8.0'
+gtk4_req_version = '4.0.0'
+
+gio_req_version = '2.40.0'
+glib_req_version = '2.40.0'
+gnutls_req_version = '3.2.7'
+pango_req_version = '1.22.0'
+pcre2_req_version = '10.21'
+
+# API
+
+vte_api_major_version = 2
+vte_api_minor_version = 91
+vte_api_version = '@0@.@1@'.format(vte_api_major_version, vte_api_minor_version)
+vte_api_name = 'vte-@0@.@1@'.format(vte_api_major_version, vte_api_minor_version)
+
+vte_gtk3_api_version = '@0@.@1@'.format(vte_api_major_version, vte_api_minor_version)
+vte_gtk4_api_version = '@0@.@1@'.format(vte_api_major_version + 1, vte_api_minor_version)
+
+vte_gtk3_api_name = 'vte-' + vte_gtk3_api_version
+vte_gtk4_api_name = 'vte-' + vte_gtk4_api_version
+
+vte_gtk3_api_path = vte_gtk3_api_name / 'vte'
+vte_gtk4_api_path = vte_gtk4_api_name / 'vte'
+
+# Library versioning
+
+vte_version = meson.project_version()
+version_array = vte_version.split('.')
+vte_major_version = version_array[0].to_int()
+vte_minor_version = version_array[1].to_int()
+vte_micro_version = version_array[2].to_int()
+
+libvte_soversion = 0
+
+lt_revision = (vte_minor_version.is_odd() ? 0 : vte_micro_version)
+lt_age = vte_minor_version * 100 + vte_micro_version - lt_revision
+lt_current = vte_major_version + lt_age
+
+libvte_gtk3_soversion = '@0@.@1@.@2@'.format(libvte_soversion, lt_current, lt_revision)
+libvte_gtk4_soversion = libvte_soversion.to_string()
+
+# i18n
+
+vte_gettext_domain = vte_api_name
+
+# Directories
+
+vte_datadir = get_option('datadir')
+vte_includedir = get_option('includedir')
+vte_libexecdir = get_option('libexecdir')
+vte_localedir = get_option('localedir')
+vte_prefix = get_option('prefix')
+vte_sysconfdir = get_option('sysconfdir')
+
+# Debug
+
+enable_debug = get_option('debugg') or get_option('buildtype').contains('debug')
+
+# Meson modules
+
+gnome = import('gnome')
+pkg = import('pkgconfig')
+
+# Compilers
+
+cc = meson.get_compiler('c')
+cxx = meson.get_compiler('cpp')
+
+top_inc = include_directories('.')
+
+# Start config.h
+
+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_GNUTLS', get_option('gnutls'))
+config_h.set('WITH_ICONV', get_option('iconv'))
+
+# FIXME AC_USE_SYSTEM_EXTENSIONS also supported non-gnu systems
+config_h.set10('_GNU_SOURCE', true)
+
+# Check headers
+
+check_headers = [
+ 'locale.h',
+ 'pty.h',
+ 'stropts.h',
+ 'sys/resource.h',
+ 'sys/select.h',
+ 'sys/syslimits.h',
+ 'sys/termios.h',
+ 'sys/types.h',
+ 'sys/wait.h',
+ 'termios.h',
+ 'util.h',
+ 'wchar.h',
+]
+
+foreach header: check_headers
+ config_h.set('HAVE_' + header.underscorify().to_upper(), cxx.has_header(header))
+endforeach
+
+# Check for symbols
+
+check_symbols_required = [
+ ['TIOCGWINSZ', 'sys/ioctl.h'],
+]
+
+foreach symbol: check_symbols_required
+ assert(cxx.has_header_symbol(symbol[1], symbol[0]), symbol[0] + ' not found')
+endforeach
+
+# Check for functions
+
+check_functions_required = [
+ 'fork',
+ 'grantpt',
+ 'posix_openpt',
+ 'ptsname',
+ 'tcgetattr',
+ 'unlockpt',
+]
+
+foreach func: check_functions_required
+ assert(cxx.has_function(func), func + ' not found')
+endforeach
+
+check_functions = [
+ # Misc PTY handling functions
+ 'cfmakeraw',
+ 'getpgid',
+ 'setpgid',
+ 'setsid',
+ 'tcsetattr',
+ # Misc I/O routines.
+ 'explicit_bzero',
+ 'pread',
+ 'pwrite',
+ # Misc string routines.
+ 'strchrnul',
+ # for vtespawn
+ 'fdwalk',
+]
+
+foreach func: check_functions
+ config_h.set('HAVE_' + func.underscorify().to_upper(), cxx.has_function(func))
+endforeach
+
+# Math functions
+
+libm_dep = cxx.find_library('m')
+
+check_math_functions_required = [
+ 'ceil',
+ 'floor',
+]
+
+foreach func: check_math_functions_required
+ assert(cxx.has_function(func, dependencies: libm_dep), func + ' not found')
+endforeach
+
+check_math_functions = [
+ 'round',
+]
+
+foreach func: check_math_functions
+ config_h.set('HAVE_' + func.underscorify().to_upper(), cxx.has_function(func, dependencies: libm_dep))
+endforeach
+
+# Compiler
+
+# Meson has a misfeature where it allows the user to override the -std option
+# for the C/C++ compiler. Disallow that.
+
+assert(get_option('c_std') == 'gnu11', 'cannot override C std version')
+assert(get_option('cpp_std') == 'gnu++17', 'cannot override C++ std version')
+
+# Compiler flags
+
+compiler_flags_common = [
+ '-Wall',
+ '-Wextra',
+ '-Wcast-align',
+ '-Wendif-labels',
+ '-Werror=declaration-after-statement',
+ '-Werror=implicit-function-declaration',
+ '-Werror=init-self',
+ '-Werror=missing-include-dirs',
+ '-Werror=missing-prototypes',
+ '-Werror=pointer-arith',
+ '-Wfloat-equal',
+ '-Wlogical-op',
+ '-Wmisleading-indentation',
+ '-Wmissing-declarations',
+ '-Wmissing-format-attribute',
+ '-Wmissing-include-dirs',
+ '-Wmissing-noreturn',
+ '-Wno-address-of-packed-member',
+ '-Wno-deprecated-declarations',
+ '-Wno-missing-field-initializers',
+ '-Wno-packed',
+ '-Wno-switch-enum',
+ '-Wno-unused-parameter',
+ '-Wshadow',
+ '-Wsign-compare',
+ '-Wstrict-aliasing=2',
+ '-Wundef',
+ '-Wuninitialized',
+ '-Wunsafe-loop-optimizations',
+ '-Wvla',
+ '-Wwrite-strings',
+ '-fdiagnostics-show-option',
+ '-fno-common',
+ '-fno-semantic-interposition',
+ '-fstack-protector',
+ '-fstack-protector-strong',
+]
+
+# These are currently needed but the code should be fixed instead
+compiler_flags_common_undesirable = [
+ '-fno-strict-aliasing'
+]
+
+compiler_flags_c_only = [
+ '-Waggregate-return',
+ '-Wimplicit',
+ '-Wimplicit-fallthrough=3',
+ '-Wnested-externs',
+ '-Wold-style-definition',
+ '-Wstrict-prototypes',
+]
+
+compiler_flags_cxx_only = [
+ '-Wimplicit-fallthrough=5',
+ '-Wstrict-null-sentinel',
+]
+
+compiler_flags_cxx_required = [
+ '-fno-exceptions',
+ '-fno-rtti',
+ '-fvisibility-inlines-hidden',
+ '-fvisibility=hidden',
+]
+
+global_cflags = cc.get_supported_arguments(compiler_flags_common +
+ compiler_flags_common_undesirable +
+ compiler_flags_c_only)
+global_cxxflags = cxx.get_supported_arguments(compiler_flags_common +
+ compiler_flags_common_undesirable +
+ compiler_flags_cxx_only +
+ compiler_flags_cxx_required)
+
+foreach flag: compiler_flags_cxx_required
+ assert(cxx.has_argument(flag), flag + ' is required but not supported')
+endforeach
+
+
+# Meson problem: GCC only accepts the latter 2 options of the 3 below
+# if the first is *also* passed, which doesn't work with get_supported_arguments()
+# above. So just add these unconditionally, since all compilers we support
+# accept these flags.
+
+compiler_flags_format_warnings = [
+ '-Werror=format=2',
+ '-Werror=format-nonliteral',
+ '-Werror=format-security',
+]
+
+global_cflags += compiler_flags_format_warnings
+global_cxxflags += compiler_flags_format_warnings
+
+# ... and now make these flags the default
+
+add_project_arguments(global_cflags, language: 'c')
+add_project_arguments(global_cxxflags, language: 'cpp')
+
+# Linker flags
+
+linker_flags = [
+ '-Wl,-Bsymbolic-functions'
+]
+
+foreach flag: linker_flags
+ assert(cc.has_link_argument(flag), flag + ' is required but not supported')
+ add_project_link_arguments(flag, language: 'c')
+
+ assert(cxx.has_link_argument(flag), flag + ' is required but not supported')
+ add_project_link_arguments(flag, language: 'cpp')
+endforeach
+
+# Dependencies
+
+gio_dep = dependency('gio-2.0', version: '>=' + gio_req_version)
+glib_dep = dependency('glib-2.0', version: '>=' + glib_req_version)
+gobject_dep = dependency('gobject-2.0')
+pango_dep = dependency('pango', version: '>=' + pango_req_version)
+pcre2_dep = dependency('libpcre2-8', version: '>=' + pcre2_req_version)
+pthreads_dep = dependency('threads')
+zlib_dep = dependency('zlib')
+
+if get_option('gnutls')
+ gnutls_dep = dependency('gnutls', version: '>=' + gnutls_req_version)
+else
+ gnutls_dep = dependency('', required: false)
+endif
+
+if get_option('gtk3')
+ gtk3_dep = dependency('gtk+-3.0', version: '>=' + gtk3_req_version)
+else
+ gtk3_dep = dependency('', required: false)
+endif
+
+if get_option('gtk4')
+ gtk4_dep = dependency('gtk+-4.0', version: '>=' + gtk4_req_version)
+else
+ gtk4_dep = dependency('', required: false)
+endif
+
+# Write config.h
+
+configure_file(
+ output: 'config.h',
+ configuration: config_h,
+)
+
+# Subdirs
+
+subdir('src')
+subdir('bindings')
+subdir('po')
+
+if get_option('docs')
+ subdir('doc/reference')
+endif
+
+# Simple compat Makefile
+
+makefile_conf = configuration_data()
+makefile_conf.set('srcdir', meson.current_source_dir())
+makefile_conf.set('builddir', meson.current_build_dir())
+makefile_conf.set('vte_gtk3_api_version', vte_gtk3_api_version)
+makefile_conf.set('vte_gtk4_api_version', vte_gtk4_api_version)
+
+configure_file(
+ input: 'Makefile.meson',
+ output: '@BASENAME@',
+ configuration: makefile_conf,
+)
+
+# Summary
+
+output = '\n'
+output += 'Configuration for VTE:\n\n'
+output += ' Version: ' + vte_version + '\n'
+output += '\n'
+output += ' C compiler: ' + cc.get_id() + '\n'
+output += ' C++ compiler: ' + cxx.get_id() + '\n'
+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 += ' 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'
+output += ' IConv: ' + get_option('iconv').to_string() + '\n'
+output += ' GIR: ' + get_option('gir').to_string() + '\n'
+output += ' Vala: ' + get_option('vapi').to_string() + '\n'
+output += '\n'
+output += ' Prefix: ' + get_option('prefix') + '\n'
+message(output)
+
+# Done
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 00000000..b8a11a84
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,70 @@
+# Copyright © 2018, 2019 Iñigo Martínez
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library. If not, see <https://www.gnu.org/licenses/>.
+
+option(
+ 'debugg', # for some reason, 'debug' is "reserved"
+ type: 'boolean',
+ value: false,
+ description: 'Enable extra debugging functionality',
+)
+
+option(
+ 'docs',
+ type: 'boolean',
+ value: false,
+ description: 'Enable documentation',
+)
+
+option(
+ 'gir',
+ type: 'boolean',
+ value: true,
+ description: 'Enable GObject Introspection',
+)
+
+option(
+ 'gnutls',
+ type: 'boolean',
+ value: true,
+ description: 'Enable GNUTLS support',
+)
+
+option(
+ 'gtk3',
+ type: 'boolean',
+ value: true,
+ description: 'Enable GTK+ 3.0 widget',
+)
+
+option(
+ 'gtk4',
+ type: 'boolean',
+ value: false,
+ description: 'Enable GTK+ 4.0 widget',
+)
+
+option(
+ 'iconv',
+ type: 'boolean',
+ value: true,
+ description: 'Enable legacy charset support using iconv',
+)
+
+option(
+ 'vapi', # would use 'vala' but that name is reserved
+ type: 'boolean',
+ value: true,
+ description: 'Enable Vala bindings',
+)
diff --git a/po/POTFILES.in b/po/POTFILES
similarity index 100%
rename from po/POTFILES.in
rename to po/POTFILES
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 00000000..14ca4dde
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,21 @@
+# Copyright © 2018, 2019 Iñigo Martínez
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library. If not, see <https://www.gnu.org/licenses/>.
+
+i18n = import('i18n')
+
+i18n.gettext(
+ vte_gettext_domain,
+ preset: 'glib',
+)
diff --git a/src/app/app.cc b/src/app/app.cc
index 81193a07..495bdcfa 100644
--- a/src/app/app.cc
+++ b/src/app/app.cc
@@ -2182,9 +2182,7 @@ main(int argc,
setlocale(LC_ALL, "");
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
-#ifdef HAVE_DECL_BIND_TEXTDOMAIN_CODESET
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-#endif
/* Not interested in silly debug spew, bug #749195 */
if (g_getenv("G_ENABLE_DIAGNOSTIC") == nullptr)
diff --git a/src/app/meson.build b/src/app/meson.build
new file mode 100644
index 00000000..f09a9391
--- /dev/null
+++ b/src/app/meson.build
@@ -0,0 +1,56 @@
+# Copyright © 2018, 2019 Iñigo Martínez
+# Copyright © 2019 Christian Persch
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library. If not, see <https://www.gnu.org/licenses/>.
+
+app_sources = files(
+ 'app.cc',
+)
+
+app_resource_data = files(
+ 'appmenu.ui',
+ 'search-popover.ui',
+ 'window.ui',
+)
+
+app_common_cppflags = [
+ '-DG_LOG_DOMAIN="VTE"',
+ '-DLOCALEDIR="@0@"'.format(vte_prefix / vte_localedir),
+]
+
+app_common_deps = [
+ pcre2_dep,
+]
+
+if get_option('gtk3')
+
+ app_gtk3_resource_sources = gnome.compile_resources(
+ 'resources.cc',
+ 'app.gresource.xml',
+ c_name: 'app',
+ dependencies: app_resource_data,
+ )
+
+ app_gtk3_sources = app_sources + app_gtk3_resource_sources
+ app_gtk3_deps = app_common_deps + [libvte_gtk3_dep]
+
+ app_gtk3 = executable(
+ 'vte-' + vte_gtk3_api_version,
+ app_gtk3_sources,
+ dependencies: app_gtk3_deps,
+ cpp_args: app_common_cppflags,
+ include_directories: top_inc,
+ install: true,
+ )
+endif
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 00000000..5ebc9231
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,475 @@
+# Copyright © 2018, 2019 Iñigo Martínez
+# Copyright © 2019 Christian Persch
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library. If not, see <https://www.gnu.org/licenses/>.
+
+subdir('vte')
+
+src_inc = include_directories('.')
+
+debug_sources = files(
+ 'debug.cc',
+ 'debug.h',
+)
+
+modes_sources = files(
+ 'modes-ecma.hh',
+ 'modes-private.hh',
+ 'modes.hh',
+)
+
+parser_sources = files(
+ 'parser-arg.hh',
+ 'parser-c01.hh',
+ 'parser-charset-tables.hh',
+ 'parser-charset.hh',
+ 'parser-cmd.hh',
+ 'parser-csi.hh',
+ 'parser-dcs.hh',
+ 'parser-decsgr.hh',
+ 'parser-esc.hh',
+ 'parser-glue.hh',
+ 'parser-osc.hh',
+ 'parser-reply.hh',
+ 'parser-sci.hh',
+ 'parser-sgr.hh',
+ 'parser-string.hh',
+ 'parser.cc',
+ 'parser.hh',
+)
+
+utf8_sources = files(
+ 'utf8.cc',
+ 'utf8.hh',
+)
+
+libvte_common_sources = debug_sources + modes_sources + parser_sources + utf8_sources + files(
+ 'attr.hh',
+ 'buffer.h',
+ 'caps.hh',
+ 'cell.hh',
+ 'chunk.cc',
+ 'chunk.hh',
+ 'color-triple.hh',
+ 'keymap.cc',
+ 'keymap.h',
+ 'pty.cc',
+ 'reaper.cc',
+ 'reaper.hh',
+ 'refptr.hh',
+ 'ring.cc',
+ 'ring.hh',
+ 'utf8.cc',
+ 'utf8.hh',
+ 'vte.cc',
+ 'vteaccess.cc',
+ 'vteaccess.h',
+ 'vtedefines.hh',
+ 'vtedraw.cc',
+ 'vtedraw.hh',
+ 'vtegtk.cc',
+ 'vtegtk.hh',
+ 'vteinternal.hh',
+ 'vtepcre2.h',
+ 'vtepty-private.h',
+ 'vteregex.cc',
+ 'vteregexinternal.hh',
+ 'vterowdata.cc',
+ 'vterowdata.hh',
+ 'vteseq.cc',
+ 'vtespawn.cc',
+ 'vtespawn.hh',
+ 'vtestream-base.h',
+ 'vtestream-file.h',
+ 'vtestream.cc',
+ 'vtestream.h',
+ 'vtetypes.cc',
+ 'vtetypes.hh',
+ 'vteunistr.cc',
+ 'vteunistr.h',
+ 'vteutils.cc',
+ 'vteutils.h',
+ 'widget.cc',
+ 'widget.hh',
+)
+
+libvte_common_doc_sources = files(
+ # These file contain gtk-doc comments to be extracted for docs and gir
+ 'pty.cc',
+ 'vtegtk.cc',
+)
+
+# FIXMEchpe this should use files('...') (allowed as per docs, afaict), but that crashes meson
+generate_box_drawing = find_program('box_drawing_generate.sh')
+
+libvte_common_sources += custom_target(
+ 'box-drawing',
+ input: 'box_drawing.txt',
+ output: 'box_drawing.h',
+ capture: true,
+ command: [generate_box_drawing, '@INPUT@'],
+ install: false,
+)
+
+libvte_common_sources += gnome.compile_resources(
+ 'vteresources',
+ 'vte.gresource.xml',
+ c_name: '_vte',
+)
+
+libvte_common_sources += gnome.genmarshal(
+ 'marshal',
+ sources: 'marshal.list',
+ prefix: '_vte_marshal',
+ internal: true,
+)
+
+libvte_common_public_deps = [
+ gio_dep,
+ glib_dep,
+ gobject_dep,
+ pango_dep,
+]
+
+libvte_common_deps = libvte_common_public_deps + [
+ gnutls_dep,
+ pcre2_dep,
+ libm_dep,
+ pthreads_dep,
+ zlib_dep,
+]
+
+incs = [
+ top_inc,
+ vte_inc,
+]
+
+libvte_common_cppflags = [
+ '-DG_LOG_DOMAIN="VTE"',
+ '-DLOCALEDIR="@0@"'.format(vte_prefix / vte_localedir),
+ '-DGLIB_DISABLE_DEPRECATION_WARNINGS',
+ '-DVTE_COMPILATION',
+ '-UPARSER_INCLUDE_NOP',
+]
+
+if get_option('gtk3')
+ libvte_gtk3_sources = libvte_common_sources + libvte_gtk3_public_headers + libvte_gtk3_enum_sources
+ libvte_gtk3_deps = libvte_common_deps + [gtk3_dep]
+ libvte_gtk3_public_deps = libvte_common_public_deps + [gtk3_dep]
+
+ libvte_gtk3 = shared_library(
+ vte_gtk3_api_name,
+ sources: libvte_gtk3_sources,
+ version: libvte_gtk3_soversion,
+ include_directories: incs,
+ dependencies: libvte_gtk3_deps,
+ cpp_args: libvte_common_cppflags,
+ install: true,
+ )
+
+ libvte_gtk3_dep = declare_dependency(
+ sources: libvte_gtk3_public_headers,
+ include_directories: [src_inc, vte_inc],
+ dependencies: libvte_gtk3_deps,
+ link_with: libvte_gtk3
+ )
+
+ pkg.generate(
+ libvte_gtk3,
+ version: vte_version,
+ name: 'vte',
+ description: 'VTE widget for GTK+ 3.0',
+ filebase: vte_gtk3_api_name,
+ subdirs: vte_gtk3_api_name,
+ requires: libvte_gtk3_public_deps,
+ variables: 'exec_prefix=${prefix}',
+ )
+endif
+
+## Tests
+
+# cat
+
+parser_cat_sources = parser_sources + utf8_sources + debug_sources + files(
+ 'parser-cat.cc'
+)
+
+parser_cat = executable(
+ 'parser-cat',
+ parser_cat_sources,
+ dependencies: [glib_dep],
+ cpp_args: ['-DPARSER_INCLUDE_NOP'],
+ include_directories: top_inc,
+ install: false,
+)
+
+# dumpkeys
+
+dumpkeys_sources = files(
+ 'dumpkeys.c'
+)
+
+dumpkeys = executable(
+ 'dumpkeys',
+ sources: dumpkeys_sources,
+ dependencies: [glib_dep],
+ include_directories: top_inc,
+ install: false,
+)
+
+# mev
+
+mev_sources = files(
+ 'mev.c'
+)
+
+mev = executable(
+ 'mev',
+ sources: mev_sources,
+ dependencies: [glib_dep],
+ include_directories: top_inc,
+ install: false,
+)
+
+# slowcat
+
+slowcat_sources = files(
+ 'slowcat.c'
+)
+
+slowcat = executable(
+ 'slowcat',
+ sources: slowcat_sources,
+ dependencies: [glib_dep],
+ include_directories: top_inc,
+ install: false,
+)
+
+# reflect
+
+reflect_sources = files(
+ 'reflect.c'
+)
+
+reflect_textview = executable(
+ 'reflect-textview',
+ sources: reflect_sources,
+ dependencies: [gtk3_dep],
+ c_args: ['-DUSE_TEXT_VIEW'],
+ include_directories: top_inc,
+ install: false,
+)
+
+reflect_vte = executable(
+ 'reflect-vte',
+ sources: reflect_sources,
+ dependencies: [gtk3_dep, libvte_gtk3_dep],
+ c_args: ['-DUSE_VTE'],
+ include_directories: top_inc,
+ install: false,
+)
+
+# xticker
+
+xticker_sources = files(
+ 'xticker.c'
+)
+
+xticker = executable(
+ 'xticker',
+ sources: xticker_sources,
+ dependencies: [glib_dep],
+ include_directories: top_inc,
+ install: false,
+)
+
+# Unit tests
+
+test_modes_sources = modes_sources + files(
+ 'modes-test.cc',
+)
+
+test_modes = executable(
+ 'test-modes',
+ sources: test_modes_sources,
+ dependencies: [glib_dep],
+ include_directories: top_inc,
+ install: false,
+)
+
+test_parser_sources = parser_sources + files(
+ 'parser-test.cc',
+)
+
+test_parser = executable(
+ 'test-parser',
+ sources: test_parser_sources,
+ dependencies: [glib_dep],
+ cpp_args: ['-DPARSER_INCLUDE_NOP'],
+ include_directories: top_inc,
+ install: false,
+)
+
+test_reaper_sources = debug_sources + files(
+ 'reaper.cc',
+ 'reaper.hh'
+)
+
+test_reaper = executable(
+ 'test-reaper',
+ sources: test_reaper_sources,
+ dependencies: [gobject_dep],
+ cpp_args: ['-DMAIN'],
+ include_directories: top_inc,
+ install: false,
+)
+
+test_refptr_sources = files(
+ 'refptr-test.cc',
+ 'refptr.hh'
+)
+
+test_refptr = executable(
+ 'test-refptr',
+ sources: test_refptr_sources,
+ dependencies: [glib_dep, gobject_dep],
+ include_directories: top_inc,
+ install: false,
+)
+
+test_tabstops_sources = files(
+ 'tabstops-test.cc',
+ 'tabstops.hh'
+)
+
+test_stream_sources = files(
+ 'vtestream-base.h',
+ 'vtestream-file.h',
+ 'vtestream.cc',
+ 'vtestream.h',
+ 'vteutils.cc',
+ 'vteutils.h',
+)
+
+test_stream = executable(
+ 'test-stream',
+ sources: test_stream_sources,
+ dependencies: [gio_dep, gnutls_dep, zlib_dep],
+ cpp_args: ['-DVTESTREAM_MAIN'],
+ include_directories: top_inc,
+ install: false,
+)
+
+test_tabstops = executable(
+ 'test-tabstops',
+ sources: test_tabstops_sources,
+ dependencies: [glib_dep],
+ include_directories: top_inc,
+ install: false,
+)
+
+test_utf8_sources = utf8_sources + files(
+ 'utf8-test.cc',
+)
+
+test_utf8 = executable(
+ 'test-utf8',
+ sources: test_utf8_sources,
+ dependencies: [glib_dep],
+ include_directories: top_inc,
+ install: false,
+)
+
+test_vtetypes_sources = files(
+ 'vtetypes.cc',
+ 'vtetypes.hh',
+)
+
+test_vtetypes = executable(
+ 'test-vtetypes',
+ sources: test_vtetypes_sources,
+ dependencies: [glib_dep, pango_dep, gtk3_dep],
+ cpp_args: ['-DMAIN'],
+ include_directories: top_inc,
+ install: false,
+)
+
+test_env = [
+ 'VTE_DEBUG=0'
+]
+
+# apparently there is no way to get a name back from an executable(), so it this ugly way
+test_units = [
+ ['modes', test_modes],
+ ['parser', test_parser],
+ ['reaper', test_reaper],
+ ['refptr', test_refptr],
+ ['stream', test_stream],
+ ['tabstops', test_tabstops],
+ ['utf8', test_utf8],
+ ['vtetypes', test_vtetypes],
+]
+
+foreach test: test_units
+ test(
+ test[0],
+ test[1],
+ env: test_env,
+ )
+endforeach
+
+test_script_env = test_env + [
+ # srcdir is needed for the vte.sh test
+ 'srcdir=@0@'.format(meson.current_source_dir()),
+]
+
+test_scripts = [
+ ['doc syntax', 'check-doc-syntax.sh'],
+]
+
+foreach test: test_scripts
+ test(
+ test[0],
+ files(test[1]),
+ env: test_script_env,
+ )
+endforeach
+
+test_scripts_interactive = [
+ ['vte.sh', 'test-vte-sh.sh', files('vte.sh')],
+]
+
+# vte.sh needs to be run in an interactive shell, but there is way to
+# specify that in test(), except by running bash itself explicitly with -i.
+bash = find_program('bash')
+
+foreach test: test_scripts_interactive
+ test(
+ test[0],
+ bash,
+ args: ['-i', files(test[1]), test[2]],
+ env: test_script_env,
+ )
+endforeach
+
+# Shell integration
+
+install_data(
+ 'vte.sh',
+ install_dir: vte_sysconfdir / 'profile.d',
+)
+
+# Demo application
+
+subdir('app')
diff --git a/src/pty.cc b/src/pty.cc
index aa03c5a5..50a8818a 100644
--- a/src/pty.cc
+++ b/src/pty.cc
@@ -76,6 +76,8 @@
#define VTE_VERSION_NUMERIC ((VTE_MAJOR_VERSION) * 10000 + (VTE_MINOR_VERSION) * 100 + (VTE_MICRO_VERSION))
+#define VTE_TERMINFO_NAME "xterm-256color"
+
#if !GLIB_CHECK_VERSION(2, 42, 0)
#define G_PARAM_EXPLICIT_NOTIFY 0
#endif
@@ -229,7 +231,7 @@ vte_pty_child_setup (VtePty *pty)
/* Now set the TERM environment variable */
/* FIXME: Setting environment here seems to have no effect, the merged envp2 will override on exec.
* By the way, we'd need to set the one from there, if any. */
- g_setenv("TERM", VTE_DEFAULT_TERM, TRUE);
+ g_setenv("TERM", VTE_TERMINFO_NAME, TRUE);
char version[7];
g_snprintf (version, sizeof (version), "%u", VTE_VERSION_NUMERIC);
@@ -279,7 +281,7 @@ __vte_pty_merge_environ (char **envp,
}
/* Make sure the one in envp overrides the default. */
- g_hash_table_replace (table, g_strdup ("TERM"), g_strdup (VTE_DEFAULT_TERM));
+ g_hash_table_replace (table, g_strdup ("TERM"), g_strdup (VTE_TERMINFO_NAME));
if (envp != NULL) {
for (i = 0; envp[i] != NULL; i++) {
diff --git a/src/test-vte-sh.sh b/src/test-vte-sh.sh
index 13bc7dd8..331a38c1 100755
--- a/src/test-vte-sh.sh
+++ b/src/test-vte-sh.sh
@@ -1,4 +1,3 @@
-#!/usr/bin/env bash
# Copyright © 2013 Christian Persch
#
# This program is free software; you can redistribute it and/or modify
@@ -15,13 +14,14 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-set -ei
+set -e
export VTE_VERSION=9999
-source $srcdir/vte.sh
+source "$1" || exit 126
check_urlencode() (
+ set -e
input=$(echo -ne "$1")
encoded=$(__vte_urlencode "$input")
if test "$encoded" != "$2"; then
@@ -29,7 +29,6 @@ check_urlencode() (
echo "Input : \"$input\""
echo "Output : \"$encoded\""
echo "Expected: \"$2\""
- exit 1
fi
)
diff --git a/src/vte.gresource.xml.in b/src/vte.gresource.xml
similarity index 100%
rename from src/vte.gresource.xml.in
rename to src/vte.gresource.xml
diff --git a/src/vte/meson.build b/src/vte/meson.build
new file mode 100644
index 00000000..20ddabce
--- /dev/null
+++ b/src/vte/meson.build
@@ -0,0 +1,70 @@
+# Copyright © 2018, 2019 Iñigo Martínez
+# Copyright © 2019 Christian Persch
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library. If not, see <https://www.gnu.org/licenses/>.
+
+vte_inc = include_directories('.')
+
+libvte_common_enum_headers = files(
+ # These files contain enums to be extracted by glib-mkenums
+ 'vtedeprecated.h',
+ 'vteenums.h',
+)
+
+libvte_gtk3_enum_sources = gnome.mkenums(
+ 'vtetypebuiltins.h',
+ sources: libvte_common_enum_headers,
+ c_template: '../vtetypebuiltins.cc.template',
+ h_template: '../vtetypebuiltins.h.template',
+ install_header: true,
+ install_dir: vte_includedir / vte_gtk3_api_path
+)
+
+libvte_common_public_headers = files(
+ 'vte.h',
+ 'vtedeprecated.h',
+ 'vteenums.h',
+ 'vteglobals.h',
+ 'vtemacros.h',
+ 'vtepty.h',
+ 'vteregex.h',
+ 'vteterminal.h',
+)
+
+vteversion_conf = configuration_data()
+vteversion_conf.set('VTE_MAJOR_VERSION', vte_major_version)
+vteversion_conf.set('VTE_MINOR_VERSION', vte_minor_version)
+vteversion_conf.set('VTE_MICRO_VERSION', vte_micro_version)
+
+libvte_version_headers = configure_file(
+ input: 'vteversion.h.in',
+ output: '@BASENAME@',
+ configuration: vteversion_conf,
+ install: false,
+)
+
+if get_option('gtk3')
+ libvte_gtk3_public_headers = libvte_common_public_headers + [libvte_version_headers]
+
+ install_headers(
+ libvte_gtk3_public_headers,
+ subdir: vte_gtk3_api_path
+ )
+
+ # BUG! Due to meson bug, this header cannot be installed with the rule above. Instead,
+ # use the install_header attribute in the mkenums call, and add the header afterwards
+ # to the list.
+ libvte_gtk3_public_headers += libvte_gtk3_enum_sources[1]
+
+endif
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index ea8b3208..998456aa 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -682,9 +682,7 @@ vte_terminal_class_init(VteTerminalClass *klass)
_VTE_DEBUG_IF (VTE_DEBUG_UPDATES) gdk_window_set_debug_updates(TRUE);
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
-#ifdef HAVE_DECL_BIND_TEXTDOMAIN_CODESET
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-#endif
gobject_class = G_OBJECT_CLASS(klass);
widget_class = GTK_WIDGET_CLASS(klass);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]