[glib-openssl/wip/tingping/meson] build: Initial Meson port
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-openssl/wip/tingping/meson] build: Initial Meson port
- Date: Tue, 7 Mar 2017 15:48:53 +0000 (UTC)
commit 1c0b41fbaabfe24657f43aa52f18975e048533f2
Author: Patrick Griffis <tingping tingping se>
Date: Tue Mar 7 10:48:05 2017 -0500
build: Initial Meson port
Still some TODOs but it builds on Linux
meson.build | 31 +++++++++++++++++++++++++++++++
meson_post_install.py | 13 +++++++++++++
po/meson.build | 3 +++
tls/base/meson.build | 17 +++++++++++++++++
tls/openssl/meson.build | 20 ++++++++++++++++++++
5 files changed, 84 insertions(+), 0 deletions(-)
---
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..1557940
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,31 @@
+project('glib-openssl', 'c',
+ version: '2.50.0',
+ meson_version: '>= 0.38.0'
+)
+
+gio = dependency('gio-2.0', version: '>= 2.46.0')
+giomoduledir = gio.get_pkgconfig_variable('giomoduledir')
+gio_querymodules = find_program('gio-querymodules')
+
+openssl = dependency('openssl')
+# TODO: Handle finding on Win32
+
+# TODO: Extra CFLAGS
+
+config_h = configuration_data()
+config_h.set_quoted('GETTEXT_PACKAGE', meson.project_name())
+config_h.set_quoted('LOCALE_DIR', join_paths(get_option('prefix'), get_option('localedir')))
+config_h.set('G_DISABLE_DEPRECATED', true)
+config_h.set_quoted('G_LOG_DOMAIN', 'GLib-OpenSSL')
+configure_file(
+ output: 'config.h',
+ configuration: config_h,
+)
+config_h_include = include_directories('.')
+
+subdir('tls/base')
+subdir('tls/openssl')
+# TODO: tests
+subdir('po')
+
+meson.add_install_script('meson_post_install.py')
\ No newline at end of file
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100755
index 0000000..97b1cc9
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+# Packagers handle this
+if 'DESTDIR' not in os.environ:
+ # post install scripts can't pass these so we must check again
+ ret = subprocess.check_output(('pkg-config', '--variable',
+ 'giomoduledir', 'gio-2.0'))
+ moduledir = ret.decode().strip()
+ print('Updating module cache in {}...'.format(moduledir))
+ subprocess.check_call(('gio-querymodules', moduledir))
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..b9d2d48
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,3 @@
+i18n = import('i18n')
+
+i18n.gettext(meson.project_name(), preset: 'glib')
\ No newline at end of file
diff --git a/tls/base/meson.build b/tls/base/meson.build
new file mode 100644
index 0000000..ea00062
--- /dev/null
+++ b/tls/base/meson.build
@@ -0,0 +1,17 @@
+tlsbase_sources = [
+ 'gtlsconnection-base.c',
+ 'gtlsinputstream-base.c',
+ 'gtlsoutputstream-base.c',
+]
+
+tlsbase = static_library('tlsbase',
+ tlsbase_sources,
+ dependencies: gio,
+ include_directories: config_h_include,
+)
+
+tlsbase_dep = declare_dependency(
+ link_with: tlsbase,
+ include_directories: include_directories('.'),
+ dependencies: gio,
+)
\ No newline at end of file
diff --git a/tls/openssl/meson.build b/tls/openssl/meson.build
new file mode 100644
index 0000000..cc0befa
--- /dev/null
+++ b/tls/openssl/meson.build
@@ -0,0 +1,20 @@
+gioopenssl_sources = [
+ 'openssl-module.c',
+ 'gtlsbackend-openssl.c',
+ 'gtlscertificate-openssl.c',
+ 'gtlsconnection-openssl.c',
+ 'gtlsserverconnection-openssl.c',
+ 'gtlsclientconnection-openssl.c',
+ 'gtlsdatabase-openssl.c',
+ 'gtlsfiledatabase-openssl.c',
+ 'gtlsbio.c',
+ 'openssl-util.c',
+]
+
+gioopenssl = shared_module('gioopenssl',
+ gioopenssl_sources,
+ dependencies: [tlsbase_dep, openssl],
+ include_directories: config_h_include,
+ install: true,
+ install_dir: giomoduledir,
+)
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]