[gnome-terminal/wip/inigomartinez/meson: 1/2] build: Port to meson build system
- From: Iñigo Martínez <inigomartinez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal/wip/inigomartinez/meson: 1/2] build: Port to meson build system
- Date: Sat, 5 Aug 2017 17:00:17 +0000 (UTC)
commit 2f4d2373ab1bd292fcb77e0d424bd03380b019a1
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Mon Jul 10 19:41:21 2017 +0200
build: Port to meson build system
Makefile.am | 4 +
help/Makefile.am | 2 +
help/meson.build | 63 +++++++
meson.build | 317 ++++++++++++++++++++++++++++++++
meson_options.txt | 9 +
meson_post_install.py | 10 +
po/meson.build | 1 +
src/Makefile.am | 1 +
src/gnome-terminal-server.service.in | 8 +
src/meson.build | 332 ++++++++++++++++++++++++++++++++++
src/nautilus.map | 8 +
src/org.gnome.Terminal.service.in | 4 +
12 files changed, 759 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index e4195b8..93e5525 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,6 +47,10 @@ EXTRA_DIST = \
ChangeLog.pre-2-23 \
ChangeLog.README \
HACKING \
+ meson.build \
+ meson_options.txt \
+ meson_post_install.py \
+ po/meson.build \
$(NULL)
CLEANFILES = \
diff --git a/help/Makefile.am b/help/Makefile.am
index 2f7aff4..ab63564 100644
--- a/help/Makefile.am
+++ b/help/Makefile.am
@@ -46,4 +46,6 @@ HELP_FILES = \
HELP_LINGUAS = ca cs de el es fi fr gl hu ko pt_BR ru sv
+EXTRA_DIST = meson.build
+
-include $(top_srcdir)/git.mk
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 0000000..5c44311
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,63 @@
+sources = [
+ 'adv-keyboard-shortcuts.page',
+ 'app-colors.page',
+ 'app-cursor.page',
+ 'app-fonts.page',
+ 'app-fullscreen.page',
+ 'app-terminal-sizes.page',
+ 'app-zoom.page',
+ 'gs-execute-commands.page',
+ 'gs-tabs.page',
+ 'index.page',
+ 'introduction.page',
+ 'legal.xml',
+ 'overview.page',
+ 'pref.page',
+ 'pref-bell.page',
+ 'pref-custom-exit.page',
+ 'pref-custom-command.page',
+ 'pref-encoding.page',
+ 'pref-keyboard-access.page',
+ 'pref-menubar.page',
+ 'pref-profiles.page',
+ 'pref-profile-char-width.page',
+ 'pref-profile-encoding.page',
+ 'pref-scrolling.page',
+ 'pref-tab-window.page',
+ 'pref-user-input.page',
+ 'profile.page',
+ 'prob-reset.page',
+ 'txt-copy-paste.page',
+ 'txt-links.page',
+ 'txt-search.page',
+ 'txt-select-text.page'
+]
+
+media = [
+ 'figures/gnome-terminal.png',
+ 'figures/gnome-terminal-icon.png'
+]
+
+linguas = [
+ 'ca',
+ 'cs',
+ 'de',
+ 'el',
+ 'es',
+ 'fi',
+ 'fr',
+ 'gl',
+ 'hu',
+ 'ko',
+ 'pt_BR',
+ 'ru',
+ 'sv'
+]
+
+gnome.yelp(
+ gt_name,
+ sources: sources,
+ media: media,
+ symlink_media: true,
+ languages: linguas
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..a72b049
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,317 @@
+project(
+ 'GNOME Terminal', 'c',
+ version: '3.25.2',
+ license: 'GPL3+',
+ default_options: [
+ 'buildtype=debugoptimized',
+ 'warning_level=1'
+ ],
+ meson_version: '>= 0.41.0'
+)
+
+gt_name = 'gnome-terminal'
+
+gt_version = meson.project_version()
+version_array = gt_version.split('.')
+gt_major_version = version_array[0].to_int()
+gt_minor_version = version_array[1].to_int()
+gt_micro_version = version_array[2].to_int()
+if version_array.length() > 3
+ gt_extra_version = version_array[3].to_int()
+endif
+
+gt_prefix = get_option('prefix')
+gt_bindir = join_paths(gt_prefix, get_option('bindir'))
+gt_datadir = join_paths(gt_prefix, get_option('datadir'))
+gt_libdir = join_paths(gt_prefix, get_option('libdir'))
+gt_libexecdir = join_paths(gt_prefix, get_option('libexecdir'))
+gt_localedir = join_paths(gt_prefix, get_option('localedir'))
+
+gt_pkgdatadir = join_paths(gt_datadir, gt_name)
+
+gt_debug = get_option('buildtype').contains('debug')
+
+cc = meson.get_compiler('c')
+
+config_h = configuration_data()
+
+# Debugging
+config_h.set('ENABLE_DEBUG', gt_debug)
+
+# Distribution specifics
+config_h.set('ENABLE_DISTRO_PACKAGING', get_option('enable-distro-packaging'),
+ description: 'Define if building a distro package')
+
+os_check = run_command(find_program('grep'), 'ID', '/etc/os-release')
+config_h.set('HAVE_UBUNTU', os_check.stdout().contains('ubuntu'),
+ description: 'Define if building under ubuntu')
+
+# package
+set_defines = [
+ ['PACKAGE', gt_name],
+ ['PACKAGE_BUGREPORT', 'http://bugzilla.gnome.org/enter_bug.cgi?product=' + gt_name],
+ ['PACKAGE_NAME', meson.project_name()],
+ ['PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), gt_version)],
+ ['PACKAGE_TARNAME', gt_name],
+ ['PACKAGE_URL', 'https://wiki.gnome.org/Apps/Terminal'],
+ ['PACKAGE_VERSION', gt_version],
+ ['VERSION', gt_version],
+ # i18n
+ ['GETTEXT_PACKAGE', gt_name]
+]
+
+foreach define: set_defines
+ config_h.set_quoted(define[0], define[1])
+endforeach
+
+# headers
+check_headers = [
+ ['HAVE_DLFCN_H', 'dlfcn.h'],
+ ['HAVE_INTTYPES_H', 'inttypes.h'],
+ ['HAVE_LOCALE_H', 'locale.h'],
+ ['HAVE_MEMORY_H', 'memory.h'],
+ ['HAVE_STDINT_H', 'stdint.h'],
+ ['HAVE_STDLIB_H', 'stdlib.h'],
+ ['HAVE_STRINGS_H', 'strings.h'],
+ ['HAVE_STRING_H', 'string.h'],
+ ['HAVE_SYS_STAT_H', 'sys/stat.h'],
+ ['HAVE_SYS_TYPES_H', 'sys/types.h'],
+ ['HAVE_UNISTD_H', 'unistd.h']
+]
+
+foreach header: check_headers
+ config_h.set(header[0], cc.has_header(header[1]))
+endforeach
+
+# functions
+check_functions = [
+ # i18n
+ ['HAVE_DCGETTEXT', 'dcgettext'],
+ ['HAVE_GETTEXT', 'gettext']
+]
+
+if host_machine.system().contains('darwin')
+ check_functions += [
+ ['HAVE_CFLOCALECOPYCURRENT', 'CFLocaleCopyCurrent'],
+ ['HAVE_CFPREFERENCESCOPYAPPVALUE', 'CFPreferencesCopyAppValue']
+ ]
+endif
+
+foreach func: check_functions
+ config_h.set(func[0], cc.has_function(func[1]))
+endforeach
+
+# symbols
+check_symbols = [
+ ['HAVE_BIND_TEXTDOMAIN_CODESET', 'libintl.h', 'bind_textdomain_codeset'],
+ ['HAVE_LC_MESSAGES', 'locale.h', 'LC_MESSAGES']
+]
+
+foreach symbol: check_symbols
+ config_h.set(symbol[0], cc.has_header_symbol(symbol[1], symbol[2]))
+endforeach
+
+# compiler flags
+common_flags = ['-DHAVE_CONFIG_H']
+warn_flags = []
+
+if gt_debug
+ test_cflags = [
+ '-fdiagnostics-show-option',
+ '-fno-common',
+ '-fno-strict-aliasing',
+ '-fstack-protector',
+ '-fstack-protector-strong',
+ '-fvisibility=hidden',
+ '-pipe',
+ '-Waggregate-return',
+ '-Wcast-align',
+ '-Wendif-labels',
+ '-Werror=declaration-after-statement',
+ '-Werror=format=2',
+ '-Werror=implicit-function-declaration',
+ '-Werror=init-self',
+ '-Werror=missing-include-dirs',
+ '-Werror=missing-prototypes',
+ '-Werror=pointer-arith',
+ '-Wfloat-equal',
+ '-Wformat-signedness',
+ '-Wlogical-op',
+ '-Wmissing-declarations',
+ '-Wmissing-include-dirs',
+ '-Wmissing-format-attribute',
+ '-Wmissing-noreturn',
+ '-Wnested-externs',
+ '-Wno-missing-field-initializers',
+ '-Wno-switch-enum',
+ '-Wno-unused-parameter',
+ '-Wold-style-definition',
+ '-Wpacked',
+ '-Wshadow',
+ '-Wstrict-aliasing=2',
+ '-Wstrict-prototypes',
+ '-Wundef',
+ '-Wunsafe-loop-optimizations',
+ '-Wwrite-strings'
+ ]
+
+ foreach cflag: test_cflags
+ if cc.has_argument(cflag)
+ warn_flags += [cflag]
+ endif
+ endforeach
+endif
+
+add_project_arguments(common_flags, language: 'c')
+
+platform_deps = []
+
+gdk_dep = dependency('gdk-3.0', required: false)
+targets = gdk_dep.get_pkgconfig_variable('targets')
+if targets.contains('x11')
+ platform_deps += dependency('x11')
+endif
+
+if targets.contains('win32') or targets.contains('quartz')
+ message('unsupported GDK backend')
+endif
+
+gio_req_version = '>= 2.34.0'
+
+vte_dep = dependency('vte-2.91', version: '>= 0.49.2')
+glib_dep = dependency('glib-2.0', version: '>= 2.42.0')
+gio_dep = dependency('gio-2.0', version: gio_req_version)
+gio_unix_dep = dependency('gio-unix-2.0', version: gio_req_version)
+gtk_dep = dependency('gtk+-3.0', version: '>= 3.12.0')
+dconf_dep = dependency('dconf', version: '>= 0.14.0')
+uuid_dep = dependency('uuid')
+
+# DBus
+dbus_interface_dir = get_option('with-dbus-interface-dir').strip()
+if dbus_interface_dir == ''
+ dbus_interface_dir = join_paths(gt_datadir, 'dbus-1', 'interfaces')
+endif
+
+dbus_service_dir = get_option('with-dbus-service-dir').strip()
+if dbus_service_dir == ''
+ dbus_service_dir = join_paths(gt_datadir, 'dbus-1', 'services')
+endif
+
+# GNOME Shell search provider
+enable_search_provider = get_option('enable-search-provider')
+if enable_search_provider
+ search_provider_iface = join_paths(dbus_interface_dir, 'org.gnome.ShellSearchProvider2.xml')
+ res = run_command(find_program('test'), '-e', search_provider_iface)
+ assert(res.returncode() == 0, 'gnome-shell search provider requested but interface definition file not
found')
+endif
+
+config_h.set('ENABLE_SEARCH_PROVIDER', enable_search_provider,
+ description: 'Define to enable gnome-shell search provider')
+
+# Vala
+enable_gterminal = get_option('enable-gterminal')
+if enable_gterminal
+ vala_req_version = '>= 0.26'
+ error_str = 'vala compiler ' + vala_req_version + ' is required for gterminal support. Try
-Denable-gterminal=false'
+
+ assert(add_languages('vala', required: false), error_str)
+ valac_version = meson.get_compiler('vala').version()
+ assert(valac_version.version_compare(vala_req_version), error_str)
+
+ have_vala_0_31 = valac_version.version_compare('>= 0.31.1')
+endif
+
+# GConf-GSettings Migration
+enable_migration = get_option('enable-migration')
+config_h.set('ENABLE_MIGRATION', enable_migration,
+ description: 'Define to 1 to enable prefs migration from GConf to GSettings')
+
+# Nautilus extension
+nautilus_dir = get_option('with-nautilus-dir').strip()
+
+enable_nautilus_extension = get_option('enable-nautilus-extension')
+if enable_nautilus_extension and nautilus_dir == ''
+ nautilus_dir = join_paths(gt_libdir, 'nautilus', 'extensions-3.0')
+endif
+
+configure_file(
+ output: 'config.h',
+ configuration: config_h
+)
+
+gnome = import('gnome')
+i18n = import('i18n')
+pkg = import('pkgconfig')
+
+top_inc = include_directories('.')
+
+po_dir = join_paths(meson.source_root(), 'po')
+
+intltool_merge = find_program('intltool-merge')
+intltool_cache = join_paths(po_dir, '.intltool-merge-cache')
+intltool_desktop_cmd = [intltool_merge, '-d', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+intltool_xml_cmd = [intltool_merge, '-x', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+
+desktop_conf = configuration_data()
+desktop_conf.set('VERSION', gt_version)
+
+desktop = 'org.gnome.Terminal.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: join_paths(gt_datadir, 'applications')
+)
+
+appdata_xml = 'org.gnome.Terminal.appdata.xml'
+
+custom_target(
+ appdata_xml,
+ input: appdata_xml + '.in',
+ output: appdata_xml,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(gt_datadir, 'metainfo')
+)
+
+nautilus_xml = 'org.gnome.Terminal.Nautilus.metainfo.xml'
+
+custom_target(
+ nautilus_xml,
+ input: nautilus_xml + '.in',
+ output: nautilus_xml,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(gt_datadir, 'metainfo')
+)
+
+if get_option('enable-schemas-compile')
+ meson.add_install_script('meson_post_install.py')
+endif
+
+subdir('src')
+subdir('po')
+subdir('help')
+
+output = '\ngnome-terminal-' + gt_version + ':\n\n'
+output += ' prefix: ' + gt_prefix + '\n'
+output += ' source code location: ' + meson.source_root() + '\n'
+output += ' compiler: ' + cc.get_id() + '\n'
+output += ' gterminal: ' + enable_gterminal.to_string() + '\n'
+output += ' DBus interface dir: ' + dbus_interface_dir + '\n'
+output += ' DBus service dir: ' + dbus_service_dir + '\n'
+output += ' Debug: ' + gt_debug.to_string() + '\n'
+output += ' Prefs migration: ' + enable_migration.to_string() + '\n'
+output += ' Search provider: ' + enable_search_provider.to_string() + '\n'
+output += ' Nautilus extension: ' + enable_nautilus_extension.to_string() + '\n'
+output += ' Nautilus extension dir: ' + nautilus_dir
+message(output)
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..b7dcee2
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,9 @@
+option('enable-distro-packaging', type: 'boolean', value: false, description: 'Enable when building a distro
package')
+option('enable-schemas-compile', type: 'boolean', value: true, description: 'Enable regeneration of
gschemas.compiled on install')
+option('with-dbus-interface-dir', type: 'string', value: '', description: 'dbus interace file directory')
+option('with-dbus-service-dir', type: 'string', value: '', description: 'dbus service file directory')
+option('enable-search-provider', type: 'boolean', value: true, description: 'Enable gnome-shell search
provider')
+option('enable-gterminal', type: 'boolean', value: true, description: 'Enable gterminal')
+option('enable-migration', type: 'boolean', value: true, description: 'Enable prefs migration from GConf to
GSettings')
+option('with-nautilus-dir', type: 'string', value: '', description: 'Nautilus extensions directory')
+option('enable-nautilus-extension', type: 'boolean', value: true, description: 'Enable nautilus extension')
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 0000000..ee5bd7b
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas')
+
+if not os.environ.get('DESTDIR'):
+ print('Compiling gsettings schemas...')
+ subprocess.call(['glib-compile-schemas', schemadir])
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..470d71d
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext(gt_name, preset: 'glib')
diff --git a/src/Makefile.am b/src/Makefile.am
index aa63b7b..1d21fe8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -429,6 +429,7 @@ EXTRA_DIST = \
preferences.ui \
profile-preferences.ui \
terminal.common.css \
+ meson.build \
$(about_DATA) \
$(uimanager_DATA) \
$(builder_DATA) \
diff --git a/src/gnome-terminal-server.service.in b/src/gnome-terminal-server.service.in
new file mode 100644
index 0000000..3bf6a8c
--- /dev/null
+++ b/src/gnome-terminal-server.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=GNOME Terminal Server
+
+[Service]
+KillMode=process
+Type=dbus
+BusName=org.gnome.Terminal
+ExecStart=@libexecdir@/gnome-terminal-server
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..8a8262d
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,332 @@
+service_conf = configuration_data()
+service_conf.set('libexecdir', gt_libexecdir)
+
+service = 'org.gnome.Terminal.service'
+
+configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: dbus_service_dir,
+ configuration: service_conf
+)
+
+service = 'gnome-terminal-server.service'
+
+configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: join_paths(gt_libdir, 'systemd', 'user'),
+ configuration: service_conf
+)
+
+install_data(
+ 'org.gnome.Terminal.gschema.xml',
+ install_dir: join_paths(gt_datadir, 'glib-2.0', 'schemas')
+)
+
+enum_headers = files('terminal-enums.h')
+
+enum = 'terminal-type-builtins'
+
+gt_enums = gnome.mkenums(
+ enum,
+ sources: enum_headers,
+ c_template: enum + '.c.template',
+ h_template: enum + '.h.template'
+)
+
+service = 'org.gnome.Terminal'
+namespace = 'Terminal'
+
+gt_gdbus = gnome.gdbus_codegen(
+ 'terminal-gdbus-generated',
+ service + '.xml',
+ interface_prefix: service,
+ namespace: namespace,
+ object_manager: true
+)
+
+gt_deps = platform_deps + [
+ dconf_dep,
+ gio_dep,
+ glib_dep,
+ gtk_dep,
+ uuid_dep,
+ vte_dep,
+ dependency('gsettings-desktop-schemas', version: '>= 0.1.0'),
+ dependency('libpcre2-8', version: '>= 10.00'),
+ dependency('threads')
+]
+
+# gnome-terminal-server
+sources = files(
+ 'eggshell.c',
+ 'profile-editor.c',
+ 'server.c',
+ 'terminal-accels.c',
+ 'terminal-app.c',
+ 'terminal-debug.c',
+ 'terminal-encoding.c',
+ 'terminal-gdbus.c',
+ 'terminal-icon-button.c',
+ 'terminal-info-bar.c',
+ 'terminal-i18n.c',
+ 'terminal-mdi-container.c',
+ 'terminal-notebook.c',
+ 'terminal-prefs.c',
+ 'terminal-profiles-list.c',
+ 'terminal-settings-list.c',
+ 'terminal-screen.c',
+ 'terminal-screen-container.c',
+ 'terminal-search-popover.c',
+ 'terminal-tab-label.c',
+ 'terminal-tabs-menu.c',
+ 'terminal-util.c',
+ 'terminal-window.c'
+)
+
+if enable_search_provider
+ sources += files('terminal-search-provider.c')
+
+ search_provider = 'terminal-search-provider-gdbus-generated'
+
+ sources += gnome.gdbus_codegen(
+ search_provider,
+ search_provider_iface,
+ interface_prefix: 'org.gnome.Shell',
+ namespace: namespace
+ )
+
+ install_data(
+ 'gnome-terminal-search-provider.ini',
+ install_dir: join_paths(gt_datadir, 'gnome-shell', 'search-providers')
+ )
+endif
+
+marshal = 'terminal-marshal'
+
+sources += gnome.genmarshal(
+ marshal,
+ sources: marshal + '.list',
+ prefix: '_terminal_marshal',
+ internal: true
+)
+
+resource_data = files(
+ 'preferences.ui',
+ 'profile-preferences.ui',
+ 'search-popover.ui',
+ 'terminal-menus.ui',
+ 'terminal-window.ui',
+ 'terminal.about',
+ 'terminal.common.css',
+ 'terminal.xml'
+)
+
+sources += gnome.compile_resources(
+ 'terminal-resources',
+ 'terminal.gresource.xml',
+ source_dir: '.',
+ c_name: 'terminal',
+ dependencies: resource_data,
+ export: true
+)
+
+version_conf = configuration_data()
+version_conf.set('TERMINAL_MAJOR_VERSION', gt_major_version)
+version_conf.set('TERMINAL_MINOR_VERSION', gt_minor_version)
+version_conf.set('TERMINAL_MICRO_VERSION', gt_micro_version)
+
+version = 'terminal-version.h'
+
+sources += configure_file(
+ input: version + '.in',
+ output: version,
+ configuration: version_conf
+)
+
+cflags = warn_flags + [
+ '-DTERMINAL_COMPILATION',
+ '-DTERM_LIBEXECDIR="@0@"'.format(gt_libexecdir),
+ '-DTERM_LOCALEDIR="@0@"'.format(gt_localedir)
+]
+
+executable(
+ gt_name + '-server',
+ sources + [gt_enums, gt_gdbus],
+ include_directories: top_inc,
+ dependencies: gt_deps,
+ c_args: cflags,
+ install: true,
+ install_dir: gt_libexecdir
+)
+
+# Legacy terminal client
+sources = files(
+ 'terminal.c',
+ 'terminal-client-utils.c',
+ 'terminal-debug.c',
+ 'terminal-i18n.c',
+ 'terminal-options.c',
+ 'terminal-profiles-list.c',
+ 'terminal-settings-list.c'
+)
+
+cflags = warn_flags + [
+ '-DTERMINAL_COMPILATION',
+ '-DTERMINAL_CLIENT',
+ '-DTERM_DATADIR="@0@"'.format(gt_datadir),
+ '-DTERM_LOCALEDIR="@0@"'.format(gt_localedir),
+ '-DTERM_PKGDATADIR="@0@"'.format(gt_pkgdatadir)
+]
+
+executable(
+ gt_name,
+ sources + [gt_enums, gt_gdbus],
+ include_directories: top_inc,
+ dependencies: gt_deps,
+ c_args: cflags,
+ install: true,
+ install_dir: gt_bindir
+)
+
+# Checks
+test_name = 'terminal-regex'
+
+exe = executable(
+ test_name,
+ test_name + '.c',
+ include_directories: top_inc,
+ c_args: warn_flags + ['-DTERMINAL_REGEX_MAIN'],
+ dependencies: gt_deps
+)
+
+test(test_name, exe)
+
+# Terminal client
+if enable_gterminal
+ sources = files(
+ 'gterminal.vala',
+ 'client.vapi',
+ 'config.vapi',
+ 'profiles.vapi',
+ 'terminal-client-utils.c',
+ 'terminal-debug.c',
+ 'terminal-profiles-list.c',
+ 'terminal-settings-list.c'
+ )
+
+ deps = platform_deps + [
+ dconf_dep,
+ gio_dep,
+ gio_unix_dep,
+ glib_dep,
+ gtk_dep,
+ # FIXME: use of uuid dependency on vala fails due to missing vapi file
+ # https://github.com/mesonbuild/meson/issues/1195
+ # https://github.com/mesonbuild/meson/issues/1923
+ #uuid_dep
+ ]
+
+ cflags = [
+ '-DTERMINAL_COMPILATION',
+ '-DTERMINAL_CLIENT',
+ '-DLOCALEDIR="@0@"'.format(gt_localedir),
+ '-DGETTEXT_PACKAGE="@0@"'.format(gt_name)
+ ]
+
+ # See bug #710862 about -Wsuggest-attribute=format
+ test_cflags = [
+ '-Wno-cast-qual',
+ '-Wno-format-nonliteral',
+ '-Wno-suggest-attribute=format',
+ '-Wno-unused-but-set-variable',
+ '-Wno-unused-function',
+ '-Wno-unused-variable',
+ '-Wno-write-strings'
+ ]
+
+ foreach cflag: test_cflags
+ if cc.has_argument(cflag)
+ cflags += [cflag]
+ endif
+ endforeach
+
+ executable(
+ 'gterminal',
+ sources + [gt_enums],
+ include_directories: top_inc,
+ dependencies: deps,
+ # FIXME: uuid include path should be removed
+ c_args: cflags + ['-I/usr/include/uuid'],
+ vala_args: '--pkg=posix',
+ # FIXME: uuid lib should be removed
+ link_args: '-luuid'
+ )
+endif
+
+# Pref migrator
+if enable_migration
+ sources = files(
+ 'migration.c',
+ 'terminal-debug.c',
+ 'terminal-profiles-list.c',
+ 'terminal-settings-list.c'
+ )
+
+ deps = [
+ dconf_dep,
+ gio_dep,
+ uuid_dep,
+ vte_dep,
+ dependency('gconf-2.0', version: '>= 2.31.3')
+ ]
+
+ executable(
+ gt_name + '-migration',
+ sources + [gt_enums],
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: warn_flags,
+ install: true,
+ install_dir: gt_libexecdir
+ )
+endif
+
+# Nautilus extension
+if enable_nautilus_extension
+ sources = files(
+ 'terminal-client-utils.c',
+ 'terminal-i18n.c',
+ 'terminal-nautilus.c'
+ )
+
+ deps = [
+ gio_dep,
+ gio_unix_dep,
+ dependency('libnautilus-extension', version: '>= 3.0.0')
+ ]
+
+ symbol_map = 'nautilus.map'
+
+ ldflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), symbol_map)
+
+ ldflags = []
+ if host_machine.system().contains('linux') and cc.has_argument(ldflag)
+ ldflags += ldflag
+ endif
+
+ shared_module(
+ 'terminal-nautilus',
+ sources: sources + [gt_enums, gt_gdbus],
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: warn_flags + ['-DTERM_LOCALEDIR="@0@"'.format(gt_localedir)],
+ link_args: ldflags,
+ link_depends: symbol_map,
+ install: true,
+ install_dir: nautilus_dir
+ )
+endif
diff --git a/src/nautilus.map b/src/nautilus.map
new file mode 100644
index 0000000..3fdc8f7
--- /dev/null
+++ b/src/nautilus.map
@@ -0,0 +1,8 @@
+{
+global:
+ nautilus_module_initialize;
+ nautilus_module_shutdown;
+ nautilus_module_list_types;
+local:
+ *;
+};
diff --git a/src/org.gnome.Terminal.service.in b/src/org.gnome.Terminal.service.in
new file mode 100644
index 0000000..91715fc
--- /dev/null
+++ b/src/org.gnome.Terminal.service.in
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=org.gnome.Terminal
+SystemdService=gnome-terminal-server.service
+Exec=@libexecdir@/gnome-terminal-server
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]