From 4f956698b64ac6eb8e5e8b7d143ceb11f1133814 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Wed, 15 May 2019 13:09:25 +0200 Subject: build: Add meson build support This adds support for meson as an alternative build system. --- doc/manual/meson.build | 75 +++++++++++++++++++++++++++++++++++++++++++++++ doc/manual/sysdir.xml.in | 1 + doc/manual/userdir.xml.in | 1 + doc/manual/version.xml.in | 1 + 4 files changed, 78 insertions(+) create mode 100644 doc/manual/meson.build create mode 100644 doc/manual/sysdir.xml.in create mode 100644 doc/manual/userdir.xml.in create mode 100644 doc/manual/version.xml.in (limited to 'doc') diff --git a/doc/manual/meson.build b/doc/manual/meson.build new file mode 100644 index 0000000..2214b75 --- /dev/null +++ b/doc/manual/meson.build @@ -0,0 +1,75 @@ +ignore_headers = [ + 'private.h', + 'pkcs11.h', + 'conf.h', + 'debug.h', + 'dict.h', + 'filter.h', + 'log.h', + 'mock.h', + 'modules.h', + 'pkcs11.h', + 'pkcs11i.h', + 'pkcs11x.h', + 'private.h', + 'client.h', + 'proxy.h', + 'rpc.h', + 'rpc-message.h', + 'util.h', + 'virtual.h', + 'virtual-fixed.h', + 'array.h', + 'compat.h' +] + +content_files = [ + 'p11-kit-config.xml', + 'p11-kit-sharing.xml', + 'p11-kit-devel.xml', + 'p11-kit-proxy.xml', + 'p11-kit-trust.xml', + 'p11-kit-remoting.xml', + 'p11-kit.xml', + 'pkcs11.conf.xml', + 'trust.xml', + 'annotation-glossary.xml' +] + +configure_file( + input: 'version.xml.in', + output: '@BASENAME@', + configuration: {'VERSION', meson.project_version()}) + +configure_file( + input: 'userdir.xml.in', + output: '@BASENAME@', + configuration: {'p11_user_config', p11_user_config}) + +configure_file( + input: 'sysdir.xml.in', + output: '@BASENAME@', + configuration: {'p11_system_config', p11_system_config}) + +glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix') +fixxref_args = [ + '--html-dir=' + (prefix / gnome.gtkdoc_html_dir(meson.project_name())), + '--extra-dir=' + (glib_prefix / gnome.gtkdoc_html_dir('glib')), +] + +gnome.gtkdoc('p11-kit', + main_xml: 'p11-kit-docs.xml', + namespace: 'p11_kit', + src_dir: 'p11-kit', + dependencies: libffi_deps + dlopen_deps, + scan_args: [ + '--ignore-headers=' + ' '.join(ignore_headers), + '--rebuild-types', + '--deprecated-guards="P11_KIT_DISABLE_DEPRECATED"' + ], + scanobjs_args: [ + '--version' + ], + content_files: content_files, + fixxref_args: fixxref_args, + install: true) diff --git a/doc/manual/sysdir.xml.in b/doc/manual/sysdir.xml.in new file mode 100644 index 0000000..8310c65 --- /dev/null +++ b/doc/manual/sysdir.xml.in @@ -0,0 +1 @@ +@p11_system_config@ diff --git a/doc/manual/userdir.xml.in b/doc/manual/userdir.xml.in new file mode 100644 index 0000000..4e9eea4 --- /dev/null +++ b/doc/manual/userdir.xml.in @@ -0,0 +1 @@ +@p11_user_config@ diff --git a/doc/manual/version.xml.in b/doc/manual/version.xml.in new file mode 100644 index 0000000..d78bda9 --- /dev/null +++ b/doc/manual/version.xml.in @@ -0,0 +1 @@ +@VERSION@ -- cgit v1.1