[vala/wip/meson: 34/38] meson: Add initial build support
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/meson: 34/38] meson: Add initial build support
- Date: Mon, 9 Sep 2019 06:05:57 +0000 (UTC)
commit 03b6fcb263519e146dae2ffe7790a8fd9cde511f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Feb 10 19:58:46 2019 +0100
meson: Add initial build support
ccode/meson.build | 72 +++++++++
codegen/meson.build | 49 ++++++
compiler/meson.build | 19 +++
config.h.meson | 28 ++++
doc/meson.build | 61 ++++++++
gee/meson.build | 33 ++++
gobject-introspection/meson.build | 45 ++++++
libvaladoc/meson.build | 158 +++++++++++++++++++
meson.build | 164 +++++++++++++++++++
meson_options.txt | 9 ++
unversioned-install.sh | 13 ++
vala/meson.build | 200 +++++++++++++++++++++++
valadoc/doclets/devhelp/meson.build | 12 ++
valadoc/doclets/gtkdoc/meson.build | 16 ++
valadoc/doclets/html/meson.build | 12 ++
valadoc/doclets/meson.build | 3 +
valadoc/icons/meson.build | 38 +++++
valadoc/meson.build | 22 +++
vapi/meson.build | 270 ++++++++++++++++++++++++++++++++
vapigen/meson.build | 46 ++++++
vapigen/vala-gen-introspect/meson.build | 9 ++
21 files changed, 1279 insertions(+)
---
diff --git a/ccode/meson.build b/ccode/meson.build
new file mode 100644
index 000000000..11adae37b
--- /dev/null
+++ b/ccode/meson.build
@@ -0,0 +1,72 @@
+valaccode_sources = files(
+ 'valaccodeassignment.vala',
+ 'valaccodebinaryexpression.vala',
+ 'valaccodeblock.vala',
+ 'valaccodebreakstatement.vala',
+ 'valaccodecasestatement.vala',
+ 'valaccodecastexpression.vala',
+ 'valaccodecommaexpression.vala',
+ 'valaccodecomment.vala',
+ 'valaccodeconditionalexpression.vala',
+ 'valaccodeconstant.vala',
+ 'valaccodecontinuestatement.vala',
+ 'valaccodedeclaration.vala',
+ 'valaccodedeclarator.vala',
+ 'valaccodedefine.vala',
+ 'valaccodedostatement.vala',
+ 'valaccodeelementaccess.vala',
+ 'valaccodeemptystatement.vala',
+ 'valaccodeenum.vala',
+ 'valaccodeenumvalue.vala',
+ 'valaccodeexpressionstatement.vala',
+ 'valaccodeexpression.vala',
+ 'valaccodefile.vala',
+ 'valaccodeforstatement.vala',
+ 'valaccodefragment.vala',
+ 'valaccodefunctioncall.vala',
+ 'valaccodefunctiondeclarator.vala',
+ 'valaccodefunction.vala',
+ 'valaccodeggnucsection.vala',
+ 'valaccodegotostatement.vala',
+ 'valaccodeidentifier.vala',
+ 'valaccodeifsection.vala',
+ 'valaccodeifstatement.vala',
+ 'valaccodeincludedirective.vala',
+ 'valaccodeinitializerlist.vala',
+ 'valaccodeinvalidexpression.vala',
+ 'valaccodelabel.vala',
+ 'valaccodelinedirective.vala',
+ 'valaccodemacroreplacement.vala',
+ 'valaccodememberaccess.vala',
+ 'valaccodemodifiers.vala',
+ 'valaccodenewline.vala',
+ 'valaccodenode.vala',
+ 'valaccodeoncesection.vala',
+ 'valaccodeparameter.vala',
+ 'valaccodeparenthesizedexpression.vala',
+ 'valaccodereturnstatement.vala',
+ 'valaccodestatement.vala',
+ 'valaccodestruct.vala',
+ 'valaccodeswitchstatement.vala',
+ 'valaccodetypedefinition.vala',
+ 'valaccodeunaryexpression.vala',
+ 'valaccodevariabledeclarator.vala',
+ 'valaccodewhilestatement.vala',
+ 'valaccodewriter.vala'
+)
+
+valaccode_lib = static_library(
+ 'valaccode',
+ valaccode_sources,
+ dependencies: [gobject_dep, valagee_dep, valacore_dep],
+ install: false,
+ vala_args: ['--use-header'],
+ vala_header: 'valaccode.h',
+ vala_vapi: 'valaccode.vapi',
+)
+
+valaccode_dep = declare_dependency(
+ link_with: [valaccode_lib],
+ dependencies: [valagee_dep],
+ include_directories: include_directories('.'),
+)
diff --git a/codegen/meson.build b/codegen/meson.build
new file mode 100644
index 000000000..89fdc1d48
--- /dev/null
+++ b/codegen/meson.build
@@ -0,0 +1,49 @@
+valacodegen_sources = files(
+ 'valaccode.vala',
+ 'valaccodearraymodule.vala',
+ 'valaccodeassignmentmodule.vala',
+ 'valaccodeattribute.vala',
+ 'valaccodebasemodule.vala',
+ 'valaccodecompiler.vala',
+ 'valaccodecontrolflowmodule.vala',
+ 'valaccodedelegatemodule.vala',
+ 'valaccodememberaccessmodule.vala',
+ 'valaccodemethodcallmodule.vala',
+ 'valaccodemethodmodule.vala',
+ 'valaccodestructmodule.vala',
+ 'valaclassregisterfunction.vala',
+ 'valactype.vala',
+ 'valaenumregisterfunction.vala',
+ 'valagasyncmodule.vala',
+ 'valagdbusclientmodule.vala',
+ 'valagdbusmodule.vala',
+ 'valagdbusservermodule.vala',
+ 'valagerrormodule.vala',
+ 'valagirwriter.vala',
+ 'valagobjectmodule.vala',
+ 'valagsignalmodule.vala',
+ 'valagtkmodule.vala',
+ 'valagtypemodule.vala',
+ 'valagvariantmodule.vala',
+ 'valainterfaceregisterfunction.vala',
+ 'valastructregisterfunction.vala',
+ 'valatyperegisterfunction.vala',
+)
+
+valacodegen_lib = shared_library(
+ 'valacodegen',
+ valacodegen_sources,
+ dependencies: [gobject_dep, valacore_dep, valaccode_dep],
+ install_rpath: pkglibdir,
+ install_dir: pkglibdir,
+ install: [ true, false, false ],
+ vala_args: ['--use-header'],
+ vala_header: 'valacodegen.h',
+ vala_vapi: 'valacodegen.vapi',
+)
+
+valacodegen_dep = declare_dependency(
+ link_with: [valacodegen_lib],
+ dependencies: [valacore_dep, valaccode_dep],
+ include_directories: include_directories('.'),
+)
diff --git a/compiler/meson.build b/compiler/meson.build
new file mode 100644
index 000000000..25e934ee8
--- /dev/null
+++ b/compiler/meson.build
@@ -0,0 +1,19 @@
+valac_sources = files(
+ 'valacompiler.vala',
+)
+
+valac_name = 'valac@0@'.format(vala_version_suffix)
+
+valac_exe = executable(
+ valac_name,
+ valac_sources,
+ dependencies: [glib_dep, valacodegen_dep],
+ install: true,
+)
+
+vala_name = 'vala@0@'.format(vala_version_suffix)
+
+# https://github.com/mesonbuild/meson/issues/1602
+meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@; ln -fs --relative @1@
valac'.format(join_paths(get_option('prefix'), get_option('bindir')), valac_name))
+meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@; ln -fs --relative @1@
@2@'.format(join_paths(get_option('prefix'), get_option('bindir')), valac_name, vala_name))
+meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@; ln -fs --relative @1@
vala'.format(join_paths(get_option('prefix'), get_option('bindir')), valac_name))
diff --git a/config.h.meson b/config.h.meson
new file mode 100644
index 000000000..f98435ef2
--- /dev/null
+++ b/config.h.meson
@@ -0,0 +1,28 @@
+/* Name of package */
+#mesondefine PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#mesondefine PACKAGE_BUGREPORT
+
+#mesondefine PACKAGE_DATADIR
+
+/* Define to the full name of this package. */
+#mesondefine PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#mesondefine PACKAGE_STRING
+
+/* Define to the suffix of this package */
+#mesondefine PACKAGE_SUFFIX
+
+/* Define to the one symbol short name of this package. */
+#mesondefine PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#mesondefine PACKAGE_URL
+
+/* Define to the version of this package. */
+#mesondefine PACKAGE_VERSION
+
+/* Version number of package */
+#mesondefine VERSION
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 000000000..f0487a987
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,61 @@
+help2man = find_program('help2man', required: false)
+if help2man.found()
+ # https://github.com/mesonbuild/meson/issues/1550
+ man_1_dir = join_paths(get_option('mandir'), 'man1')
+ custom_target('vala-gen-introspect.1',
+ output: 'vala-gen-introspect.1',
+ command: [help2man,
+ '--include', join_paths(meson.current_source_dir(), 'vala-gen-introspect.h2m'),
+ '--no-info', '--output=@OUTPUT@', vala_gen_introspect_sh
+ ],
+ install: true,
+ install_dir: man_1_dir,
+ )
+ custom_target('valac.1',
+ output: 'valac.1',
+ command: [help2man,
+ '--include', join_paths(meson.current_source_dir(), 'valac.h2m'),
+ '--no-info', '--output=@OUTPUT@', valac_exe
+ ],
+ install: true,
+ install_dir: man_1_dir,
+ )
+ custom_target('vapigen.1',
+ output: 'vapigen.1',
+ command: [help2man,
+ '--include', join_paths(meson.current_source_dir(), 'vapigen.h2m'),
+ '--no-info', '--output=@OUTPUT@', vapigen_exe
+ ],
+ install: true,
+ install_dir: man_1_dir,
+ )
+ if valadoc_enabled
+ custom_target('valadoc.1',
+ output: 'valadoc.1',
+ command: [help2man,
+ '--include', join_paths(meson.current_source_dir(), 'valadoc.h2m'),
+ '--no-info', '--output=@OUTPUT@', valadoc_exe
+ ],
+ install: true,
+ install_dir: man_1_dir,
+ )
+ endif
+else
+ manpages = files(
+ 'vala-gen-introspect.1',
+ 'valac.1',
+ 'vapigen.1',
+ )
+ if valadoc_enabled
+ manpages += files('valadoc.1')
+ endif
+ install_man(manpages)
+endif
+
+# https://github.com/mesonbuild/meson/issues/1602
+meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@/man1; ln -fs --relative vala-gen-introspect.1
@1@'.format(join_paths(get_option('prefix'), get_option('mandir')),
'vala-gen-introspect@0@.1'.format(vala_version_suffix)))
+meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@/man1; ln -fs --relative valac.1
@1@'.format(join_paths(get_option('prefix'), get_option('mandir')), 'valac@0@.1'.format(vala_version_suffix)))
+meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@/man1; ln -fs --relative vapigen.1
@1@'.format(join_paths(get_option('prefix'), get_option('mandir')),
'vapigen@0@.1'.format(vala_version_suffix)))
+if valadoc_enabled
+ meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@/man1; ln -fs --relative valadoc.1
@1@'.format(join_paths(get_option('prefix'), get_option('mandir')),
'valadoc@0@.1'.format(vala_version_suffix)))
+endif
diff --git a/gee/meson.build b/gee/meson.build
new file mode 100644
index 000000000..abfdf0b02
--- /dev/null
+++ b/gee/meson.build
@@ -0,0 +1,33 @@
+valagee_sources = files(
+ 'arraylist.vala',
+ 'collection.vala',
+ 'hashmap.vala',
+ 'hashset.vala',
+ 'iterable.vala',
+ 'iterator.vala',
+ 'list.vala',
+ 'mapiterator.vala',
+ 'map.vala',
+ 'set.vala',
+ 'timsort.vala',
+)
+
+valagee_lib = static_library(
+ 'valagee',
+ valagee_sources,
+ dependencies: [gobject_dep],
+ install: [ false, true, false ],
+ install_dir: [
+ false,
+ join_paths (get_option('includedir'), 'vala@0@'.format (vala_version_suffix)),
+ false
+ ],
+ vala_args: ['--use-header'],
+ vala_header: 'valagee.h',
+ vala_vapi: 'gee.vapi',
+)
+
+valagee_dep = declare_dependency(
+ link_with: [valagee_lib],
+ include_directories: include_directories('.', '..'),
+)
diff --git a/gobject-introspection/meson.build b/gobject-introspection/meson.build
new file mode 100644
index 000000000..5bf20ce08
--- /dev/null
+++ b/gobject-introspection/meson.build
@@ -0,0 +1,45 @@
+gidl_sources = files(
+ 'gidlmodule.c',
+ 'gidlnode.c',
+ 'gidlparser.c',
+ 'gmetadata.c',
+)
+
+gidl_lib = static_library('gidl',
+ gidl_sources,
+ dependencies: [gobject_dep, gmodule_dep])
+
+gidl_dep = declare_dependency(
+ link_with: [gidl_lib],
+ include_directories: include_directories('.'),
+)
+
+flex = find_program('flex')
+bison = find_program('bison')
+
+lgen = generator(flex,
+ output: '@PLAINNAME@.c',
+ arguments: ['-o', '@OUTPUT@', '@INPUT@'])
+
+lfiles = lgen.process('scannerlexer.l')
+
+pgen = generator(bison,
+ output: ['@BASENAME@.c', '@BASENAME@.h'],
+ arguments: ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@'],
+)
+
+pfiles = pgen.process('scannerparser.y')
+
+gen_introspect_sources = files(
+ 'gidlwriter.c',
+ 'scanner.c',
+)
+
+gen_introspect_name = 'gen-introspect@0@'.format(vala_version_suffix)
+
+gen_introspect_exe = executable(gen_introspect_name,
+ [gen_introspect_sources, lfiles, pfiles],
+ install: true,
+ install_dir: pkglibdir,
+ dependencies: [gobject_dep, gmodule_dep, gidl_dep],
+)
diff --git a/libvaladoc/meson.build b/libvaladoc/meson.build
new file mode 100644
index 000000000..f08258ad3
--- /dev/null
+++ b/libvaladoc/meson.build
@@ -0,0 +1,158 @@
+libvaladoc_sources = files(
+ 'ctyperesolver.vala',
+ 'devhelp-markupwriter.vala',
+ 'doclet.vala',
+ 'errorreporter.vala',
+ 'filehelper.vala',
+ 'gtkdocmarkupwriter.vala',
+ 'gtkdocrenderer.vala',
+ 'gvc-compat.c',
+ 'markupwriter.vala',
+ 'moduleloader.vala',
+ 'settings.vala',
+ 'api/array.vala',
+ 'api/attribute.vala',
+ 'api/callable.vala',
+ 'api/childsymbolregistrar.vala',
+ 'api/class.vala',
+ 'api/constant.vala',
+ 'api/delegate.vala',
+ 'api/enum.vala',
+ 'api/enumvalue.vala',
+ 'api/errorcode.vala',
+ 'api/errordomain.vala',
+ 'api/field.vala',
+ 'api/formalparameter.vala',
+ 'api/girsourcecomment.vala',
+ 'api/interface.vala',
+ 'api/item.vala',
+ 'api/method.vala',
+ 'api/namespace.vala',
+ 'api/node.vala',
+ 'api/nodetype.vala',
+ 'api/ownership.vala',
+ 'api/package.vala',
+ 'api/pointer.vala',
+ 'api/property.vala',
+ 'api/propertyaccessor.vala',
+ 'api/signal.vala',
+ 'api/signaturebuilder.vala',
+ 'api/sourcecomment.vala',
+ 'api/sourcefile.vala',
+ 'api/struct.vala',
+ 'api/symbol.vala',
+ 'api/tree.vala',
+ 'api/typeparameter.vala',
+ 'api/typereference.vala',
+ 'api/typesymbol.vala',
+ 'api/visitor.vala',
+ 'charts/chart.vala',
+ 'charts/chartfactory.vala',
+ 'charts/hierarchychart.vala',
+ 'charts/simplechartfactory.vala',
+ 'content/block.vala',
+ 'content/blockcontent.vala',
+ 'content/comment.vala',
+ 'content/contentelement.vala',
+ 'content/contentfactory.vala',
+ 'content/contentrenderer.vala',
+ 'content/contentvisitor.vala',
+ 'content/embedded.vala',
+ 'content/headline.vala',
+ 'content/inline.vala',
+ 'content/inlinecontent.vala',
+ 'content/inlinetaglet.vala',
+ 'content/link.vala',
+ 'content/list.vala',
+ 'content/listitem.vala',
+ 'content/note.vala',
+ 'content/page.vala',
+ 'content/paragraph.vala',
+ 'content/resourcelocator.vala',
+ 'content/run.vala',
+ 'content/sourcecode.vala',
+ 'content/styleattributes.vala',
+ 'content/symbollink.vala',
+ 'content/table.vala',
+ 'content/tablecell.vala',
+ 'content/tablerow.vala',
+ 'content/taglet.vala',
+ 'content/text.vala',
+ 'content/warning.vala',
+ 'content/wikilink.vala',
+ 'documentation/commentscanner.vala',
+ 'documentation/documentationparser.vala',
+ 'documentation/documentation.vala',
+ 'documentation/girmetadata.vala',
+ 'documentation/gtkdoccommentparser.vala',
+ 'documentation/gtkdoccommentscanner.vala',
+ 'documentation/gtkdocmarkdownparser.vala',
+ 'documentation/gtkdocmarkdownscanner.vala',
+ 'documentation/importerhelper.vala',
+ 'documentation/wikiscanner.vala',
+ 'documentation/wiki.vala',
+ 'highlighter/codescanner.vala',
+ 'highlighter/codetoken.vala',
+ 'highlighter/highlighter.vala',
+ 'highlighter/scanner.vala',
+ 'highlighter/xmlscanner.vala',
+ 'html/basicdoclet.vala',
+ 'html/cssclassresolver.vala',
+ 'html/htmlchartfactory.vala',
+ 'html/htmlmarkupwriter.vala',
+ 'html/htmlrenderer.vala',
+ 'html/linkhelper.vala',
+ 'importer/documentationimporter.vala',
+ 'importer/girdocumentationimporter.vala',
+ 'importer/internalidregistrar.vala',
+ 'importer/valadocdocumentationimporterscanner.vala',
+ 'importer/valadocdocumentationimporter.vala',
+ 'parser/manyrule.vala',
+ 'parser/oneofrule.vala',
+ 'parser/optionalrule.vala',
+ 'parser/parser.vala',
+ 'parser/parsercallback.vala',
+ 'parser/rule.vala',
+ 'parser/scanner.vala',
+ 'parser/sequencerule.vala',
+ 'parser/stubrule.vala',
+ 'parser/token.vala',
+ 'parser/tokentype.vala',
+ 'taglets/tagletdeprecated.vala',
+ 'taglets/tagletinheritdoc.vala',
+ 'taglets/tagletinit.vala',
+ 'taglets/tagletlink.vala',
+ 'taglets/tagletparam.vala',
+ 'taglets/tagletreturn.vala',
+ 'taglets/tagletsee.vala',
+ 'taglets/tagletsince.vala',
+ 'taglets/tagletthrows.vala',
+)
+
+libvaladoc_lib = shared_library(
+ 'valadoc@0@'.format(vala_version_suffix),
+ libvaladoc_sources,
+ dependencies: [gmodule_dep, valacore_dep, valacodegen_dep, libgvc_dep],
+ version: '0.0.0',
+ install: true,
+ install_dir: [
+ true,
+ join_paths (get_option('includedir'), 'valadoc@0@'.format (vala_version_suffix)),
+ true
+ ],
+ c_args: ['-DPACKAGE_VALADOC_LIBDIR="@0@"'.format(join_paths(get_option('prefix'),
get_option('libdir'), 'valadoc@0@'.format (vala_version_suffix)))],
+ vala_args: ['--use-header'],
+ vala_header: 'valadoc.h',
+ vala_vapi: 'valadoc@0@.vapi'.format(vala_version_suffix),
+)
+
+libvaladoc_dep = declare_dependency(link_with: [libvaladoc_lib], dependencies: [gmodule_dep, valacore_dep,
libgvc_dep], include_directories: include_directories('.'))
+
+configure_file(input: 'valadoc.deps.in', output: 'valadoc@0@.deps'.format(vala_version_suffix),
configuration: pkgconf)
+
+configure_file(
+ input: 'valadoc.pc.in',
+ output: 'valadoc@0@.pc'.format(vala_version_suffix),
+ configuration: pkgconf,
+ install_dir: pkg_install_dir,
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 000000000..2dea08c28
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,164 @@
+project('vala',
+ 'c', 'vala',
+ version: '0.47.0',
+ meson_version: '>= 0.49',
+ license: 'LGPL2.1'
+)
+
+cc = meson.get_compiler('c')
+
+vala_version = meson.project_version()
+version_array = vala_version.split('.')
+vala_api_version = '0.48'
+vala_version_suffix = '-@0@'.format(vala_api_version)
+
+# Minimal required version for an initial build
+vala_version_required = '0.16.1'
+valac = meson.get_compiler('vala')
+if not valac.version().version_compare('>= @0@'.format(vala_version_required))
+ error('valac >= @0@ required!'.format(vala_version_required))
+endif
+if not valac.version().version_compare('>= @0@'.format(vala_version))
+ warning('Proper bootstrap build with valac >= @0@ is required!!!'.format(vala_version))
+endif
+
+pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'vala@0@'.format(vala_version_suffix))
+pkglibdir = join_paths(get_option('prefix'), get_option('libdir'), 'vala@0@'.format(vala_version_suffix))
+
+
+conf = configuration_data()
+conf.set_quoted('PACKAGE', meson.project_name())
+conf.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.gnome.org/GNOME/vala/issues')
+conf.set_quoted('PACKAGE_DATADIR', pkgdatadir)
+conf.set_quoted('PACKAGE_NAME', meson.project_name())
+conf.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), vala_version))
+conf.set_quoted('PACKAGE_SUFFIX', vala_version_suffix)
+conf.set_quoted('PACKAGE_TARNAME', meson.project_name())
+conf.set_quoted('PACKAGE_URL', 'https://wiki.gnome.org/Projects/Vala')
+conf.set_quoted('PACKAGE_VERSION', vala_version)
+conf.set_quoted('VERSION', vala_version)
+conf.set_quoted('API_VERSION', vala_api_version)
+conf.set_quoted('BUILD_VERSION', vala_version)
+configure_file(input: 'config.h.meson', output: 'config.h', configuration: conf)
+
+pkgconf = configuration_data()
+pkgconf.set('prefix', get_option('prefix'))
+pkgconf.set('exec_prefix', '${prefix}')
+pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
+pkgconf.set('bindir', '${exec_prefix}/@0@'.format(get_option('bindir')))
+pkgconf.set('datarootdir', '${prefix}/@0@'.format(get_option('datadir')))
+pkgconf.set('datadir', '${datarootdir}')
+pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
+pkgconf.set('pkgdatadir', '${datarootdir}/vala@0@'.format(vala_version_suffix))
+pkgconf.set('pkglibdir', '${exec_prefix}/@0@'.format(get_option('libdir'),
'vala@0@'.format(vala_version_suffix)))
+pkgconf.set('pkgdocdatadir', '${datarootdir}/valadoc@0@'.format(vala_version_suffix))
+pkgconf.set('pkgdoclibdir', '${exec_prefix}/@0@'.format(get_option('libdir'),
'valadoc@0@'.format(vala_version_suffix)))
+pkgconf.set('PACKAGE_SUFFIX', vala_version_suffix)
+pkgconf.set('VERSION', vala_version)
+pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
+
+configure_file(
+ input: 'libvala.pc.in',
+ output: 'libvala@0@.pc'.format(vala_version_suffix),
+ configuration: pkgconf,
+ install_dir: pkg_install_dir
+)
+
+versionconf = configuration_data()
+versionconf.set('VALA_MAJOR_VERSION', version_array[0])
+versionconf.set('VALA_MINOR_VERSION', version_array[1])
+versionconf.set('VALA_MICRO_VERSION', version_array[2])
+versionconf.set('API_VERSION', vala_api_version)
+# https://github.com/mesonbuild/meson/issues/688
+versionconf.set('PACKAGE_VERSION', '@VCS_TAG@')
+
+add_project_arguments([
+ '--disable-version-header',
+ '--vapidir', join_paths(meson.source_root(), 'vapi'),
+ '--pkg', 'config',
+ ],
+ language: 'vala'
+)
+
+if valac.version().version_compare('>= 0.25.1')
+ add_project_arguments(['--hide-internal'], language: 'vala')
+endif
+
+if valac.version().version_compare('>= 0.39.6')
+ add_project_arguments(['--abi-stability'], language: 'vala')
+endif
+
+test_cflags = [
+ '-Werror=init-self',
+ '-Werror=implicit',
+ '-Werror=pointer-arith',
+ '-Werror=redundant-decls',
+ '-Werror=return-type',
+ '-Werror=sequence-point',
+ '-Werror=uninitialized',
+ '-Werror=int-to-pointer-cast',
+ '-Werror=pointer-to-int-cast',
+ '-Wformat=2',
+ '-Werror=format-security',
+ '-Werror=format-nonliteral',
+ '-Werror=int-conversion',
+ '-Werror=duplicated-branches',
+ '-Werror=duplicated-cond',
+ '-Werror=declaration-after-statement',
+ '-Werror=maybe-uninitialized',
+ '-Werror=missing-prototypes',
+ '-Werror=strict-prototypes',
+ '-Werror=enum-conversion',
+]
+supported_test_cflags = cc.get_supported_arguments(test_cflags)
+
+add_project_arguments([
+ '-Wno-discarded-qualifiers',
+ '-Wno-incompatible-pointer-types',
+ '-Wno-unused',
+ '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_48',
+ '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_48',
+ ],
+ language: 'c',
+)
+
+glib_version_required = '2.48'
+libgvc_version_required = '2.16'
+
+valadoc_enabled = get_option('valadoc')
+
+glib_dep = dependency('glib-2.0', version: '>= @0@'.format(glib_version_required))
+gobject_dep = dependency('gobject-2.0', version: '>= @0@'.format(glib_version_required))
+gmodule_dep = dependency('gmodule-2.0', version: '>= @0@'.format(glib_version_required))
+libgvc_dep = dependency('libgvc', version: '>= @0@'.format(libgvc_version_required), required:
valadoc_enabled)
+
+# Check for CGraph support of libgvc
+if valadoc_enabled and cc.run('''#include <gvc.h>
+ int main(void) {
+ #ifdef WITH_CGRAPH
+ return 0;
+ #else
+ return -1;
+ #endif
+ }''',
+ dependencies: libgvc_dep).returncode() == 0
+ add_project_arguments('-D', 'WITH_CGRAPH', language: 'vala')
+endif
+
+subdir('gobject-introspection')
+subdir('gee')
+subdir('vala')
+subdir('ccode')
+subdir('codegen')
+subdir('compiler')
+subdir('vapigen')
+subdir('vapi')
+
+if valadoc_enabled
+ subdir('libvaladoc')
+ subdir('valadoc')
+endif
+
+subdir('doc')
+
+install_data('vala.m4', install_dir: join_paths('share', 'aclocal'))
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 000000000..8522d0121
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,9 @@
+# Optional dependencies
+option('valadoc', type: 'boolean', value : 'true',
+ description : 'Enable build of libvaladoc and valadoc')
+
+# Documentation
+option('documentation', type: 'boolean', value: 'false',
+ description : 'Build API reference and tools documentation')
+option('man-pages', type: 'boolean', value: 'false',
+ description : 'Build man pages for installed tools')
diff --git a/unversioned-install.sh b/unversioned-install.sh
new file mode 100644
index 000000000..fcc91783f
--- /dev/null
+++ b/unversioned-install.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+cd "${DESTDIR}/${MESON_INSTALL_PREFIX}/mydir"
+ln -s -f "${DESTDIR}/${MESON_INSTALL_PREFIX}/mydir"
+touch "${DESTDIR}/${MESON_INSTALL_PREFIX}/mydir/file.dat"
+
+install-exec-hook:
+ cd $(DESTDIR)$(bindir) && $(LN_S) -f vapigen@PACKAGE_SUFFIX@$(EXEEXT) vapigen$(EXEEXT)
+ cd $(DESTDIR)$(bindir) && $(LN_S) -f vapicheck@PACKAGE_SUFFIX@$(EXEEXT) vapicheck$(EXEEXT)
+
+install-data-hook:
+ cd $(DESTDIR)$(pkgconfigdir) && $(LN_S) -f vapigen@PACKAGE_SUFFIX@.pc vapigen.pc
+
diff --git a/vala/meson.build b/vala/meson.build
new file mode 100644
index 000000000..4ef686c58
--- /dev/null
+++ b/vala/meson.build
@@ -0,0 +1,200 @@
+valacore_sources = files(
+ 'valaaddressofexpression.vala',
+ 'valaarraycopymethod.vala',
+ 'valaarraycreationexpression.vala',
+ 'valaarraylengthfield.vala',
+ 'valaarraymovemethod.vala',
+ 'valaarrayresizemethod.vala',
+ 'valaarraytype.vala',
+ 'valaassignment.vala',
+ 'valaattribute.vala',
+ 'valabaseaccess.vala',
+ 'valabasicblock.vala',
+ 'valabinaryexpression.vala',
+ 'valablock.vala',
+ 'valabooleanliteral.vala',
+ 'valabooleantype.vala',
+ 'valabreakstatement.vala',
+ 'valacallable.vala',
+ 'valacallabletype.vala',
+ 'valacastexpression.vala',
+ 'valacatchclause.vala',
+ 'valacharacterliteral.vala',
+ 'valaclasstype.vala',
+ 'valaclass.vala',
+ 'valacodecontext.vala',
+ 'valacodegenerator.vala',
+ 'valacodenode.vala',
+ 'valacodevisitor.vala',
+ 'valacodewriter.vala',
+ 'valacomment.vala',
+ 'valaconditionalexpression.vala',
+ 'valaconstant.vala',
+ 'valaconstructor.vala',
+ 'valacontinuestatement.vala',
+ 'valacreationmethod.vala',
+ 'valadatatype.vala',
+ 'valadeclarationstatement.vala',
+ 'valadelegatetype.vala',
+ 'valadelegate.vala',
+ 'valadeletestatement.vala',
+ 'valadestructor.vala',
+ 'valadostatement.vala',
+ 'valadynamicmethod.vala',
+ 'valadynamicproperty.vala',
+ 'valadynamicsignal.vala',
+ 'valaelementaccess.vala',
+ 'valaemptystatement.vala',
+ 'valaenum.vala',
+ 'valaenumvaluetype.vala',
+ 'valaenumvalue.vala',
+ 'valaerrorcode.vala',
+ 'valaerrordomain.vala',
+ 'valaerrortype.vala',
+ 'valaexpressionstatement.vala',
+ 'valaexpression.vala',
+ 'valafieldprototype.vala',
+ 'valafield.vala',
+ 'valafloatingtype.vala',
+ 'valaflowanalyzer.vala',
+ 'valaforeachstatement.vala',
+ 'valaforstatement.vala',
+ 'valagenerictype.vala',
+ 'valagenieparser.vala',
+ 'valageniescanner.vala',
+ 'valagenietokentype.vala',
+ 'valagircomment.vala',
+ 'valagirparser.vala',
+ 'valaifstatement.vala',
+ 'valainitializerlist.vala',
+ 'valaintegerliteral.vala',
+ 'valaintegertype.vala',
+ 'valainterfacetype.vala',
+ 'valainterface.vala',
+ 'valainvalidtype.vala',
+ 'valalambdaexpression.vala',
+ 'valaliteral.vala',
+ 'valalocalvariable.vala',
+ 'valalockable.vala',
+ 'valalockstatement.vala',
+ 'valaloop.vala',
+ 'valamarkupreader.vala',
+ 'valamemberaccess.vala',
+ 'valamemberinitializer.vala',
+ 'valamethodcall.vala',
+ 'valamethodtype.vala',
+ 'valamethod.vala',
+ 'valanamedargument.vala',
+ 'valanamespace.vala',
+ 'valanullliteral.vala',
+ 'valanulltype.vala',
+ 'valaobjectcreationexpression.vala',
+ 'valaobjecttypesymbol.vala',
+ 'valaobjecttype.vala',
+ 'valaparameter.vala',
+ 'valaparser.vala',
+ 'valaphifunction.vala',
+ 'valapointerindirection.vala',
+ 'valapointertype.vala',
+ 'valapostfixexpression.vala',
+ 'valaprofile.vala',
+ 'valapropertyaccessor.vala',
+ 'valaproperty.vala',
+ 'valapropertyprototype.vala',
+ 'valarealliteral.vala',
+ 'valareferencetransferexpression.vala',
+ 'valareferencetype.vala',
+ 'valaregexliteral.vala',
+ 'valareport.vala',
+ 'valareturnstatement.vala',
+ 'valascanner.vala',
+ 'valascope.vala',
+ 'valasemanticanalyzer.vala',
+ 'valasignaltype.vala',
+ 'valasignal.vala',
+ 'valasizeofexpression.vala',
+ 'valasliceexpression.vala',
+ 'valasourcefile.vala',
+ 'valasourcelocation.vala',
+ 'valasourcereference.vala',
+ 'valastatementlist.vala',
+ 'valastatement.vala',
+ 'valastringliteral.vala',
+ 'valastruct.vala',
+ 'valastructvaluetype.vala',
+ 'valasubroutine.vala',
+ 'valaswitchlabel.vala',
+ 'valaswitchsection.vala',
+ 'valaswitchstatement.vala',
+ 'valasymbolresolver.vala',
+ 'valasymbol.vala',
+ 'valatargetvalue.vala',
+ 'valatemplate.vala',
+ 'valathrowstatement.vala',
+ 'valatokentype.vala',
+ 'valatrystatement.vala',
+ 'valatuple.vala',
+ 'valatypecheck.vala',
+ 'valatypeofexpression.vala',
+ 'valatypeparameter.vala',
+ 'valatypesymbol.vala',
+ 'valaunaryexpression.vala',
+ 'valaunlockstatement.vala',
+ 'valaunresolvedsymbol.vala',
+ 'valaunresolvedtype.vala',
+ 'valausedattr.vala',
+ 'valausingdirective.vala',
+ 'valavaluetype.vala',
+ 'valavariable.vala',
+ 'valaversionattribute.vala',
+ 'valavoidtype.vala',
+ 'valawhilestatement.vala',
+ 'valayieldstatement.vala',
+)
+
+# https://github.com/mesonbuild/meson/issues/688
+valaversion_source = vcs_tag(
+ input: configure_file(
+ input: 'valaversion.vala.in',
+ output: 'valaversion.vala.in',
+ configuration: versionconf,
+ ),
+ output: 'valaversion.vala',
+)
+
+valacore_lib = shared_library(
+ 'vala@0@'.format(vala_version_suffix),
+ valacore_sources,
+ valaversion_source,
+ dependencies: [gobject_dep, gmodule_dep, valagee_dep],
+ version: '0.0.0',
+ install: true,
+ vala_args: ['--use-header'],
+ vala_header: 'vala.h',
+ vala_vapi: 'vala.vapi',
+ install_dir: [
+ true,
+ join_paths (get_option('includedir'), 'vala@0@'.format (vala_version_suffix)),
+ false
+ ],
+)
+
+valacore_dep = declare_dependency(
+ link_with: [valacore_lib],
+ dependencies: [valagee_dep],
+ include_directories: include_directories('.', '..'),
+)
+
+custom_target(
+ 'libvala@0@.vapi'.format(vala_version_suffix),
+ command: [
+ find_program('cat'),
+ join_paths(meson.build_root(), 'gee', 'gee.vapi'),
+ join_paths(meson.current_build_dir(), 'vala.vapi'),
+ ],
+ depends: [valagee_lib, valacore_lib],
+ capture: true,
+ install: true,
+ install_dir: join_paths('share', 'vala', 'vapi'),
+ output: 'libvala@0@.vapi'.format(vala_version_suffix),
+)
diff --git a/valadoc/doclets/devhelp/meson.build b/valadoc/doclets/devhelp/meson.build
new file mode 100644
index 000000000..2164c7e87
--- /dev/null
+++ b/valadoc/doclets/devhelp/meson.build
@@ -0,0 +1,12 @@
+doclet_devhelp_sources = files(
+ 'doclet.vala',
+)
+
+shared_module(
+ 'doclet',
+ doclet_devhelp_sources,
+ dependencies: [gobject_dep, libvaladoc_dep],
+ install: true,
+ install_dir: join_paths(get_option('libdir'), 'valadoc@0@'.format (vala_version_suffix), 'doclets',
'devhelp'),
+ c_args: ['-DPACKAGE_VALADOC_ICONDIR="@0@"'.format(join_paths(get_option('prefix'),
get_option('datadir'), 'valadoc@0@'.format (vala_version_suffix), 'icons'))],
+)
diff --git a/valadoc/doclets/gtkdoc/meson.build b/valadoc/doclets/gtkdoc/meson.build
new file mode 100644
index 000000000..ccf567cdc
--- /dev/null
+++ b/valadoc/doclets/gtkdoc/meson.build
@@ -0,0 +1,16 @@
+doclet_gtkdoc_sources = files(
+ 'commentconverter.vala',
+ 'dbus.vala',
+ 'doclet.vala',
+ 'gcomment.vala',
+ 'generator.vala',
+ 'utils.vala',
+)
+
+shared_module(
+ 'doclet',
+ doclet_gtkdoc_sources,
+ dependencies: [gobject_dep, libvaladoc_dep],
+ install: true,
+ install_dir: join_paths(get_option('libdir'), 'valadoc@0@'.format (vala_version_suffix), 'doclets',
'gtkdoc'),
+)
diff --git a/valadoc/doclets/html/meson.build b/valadoc/doclets/html/meson.build
new file mode 100644
index 000000000..6c1020b54
--- /dev/null
+++ b/valadoc/doclets/html/meson.build
@@ -0,0 +1,12 @@
+doclet_html_sources = files(
+ 'doclet.vala',
+)
+
+shared_module(
+ 'doclet',
+ doclet_html_sources,
+ dependencies: [gobject_dep, libvaladoc_dep],
+ install: true,
+ install_dir: join_paths(get_option('libdir'), 'valadoc@0@'.format (vala_version_suffix), 'doclets',
'html'),
+ c_args: ['-DPACKAGE_VALADOC_ICONDIR="@0@"'.format(join_paths(get_option('prefix'),
get_option('datadir'), 'valadoc@0@'.format (vala_version_suffix), 'icons'))],
+)
diff --git a/valadoc/doclets/meson.build b/valadoc/doclets/meson.build
new file mode 100644
index 000000000..a3bf048d2
--- /dev/null
+++ b/valadoc/doclets/meson.build
@@ -0,0 +1,3 @@
+subdir('devhelp')
+subdir('gtkdoc')
+subdir('html')
diff --git a/valadoc/icons/meson.build b/valadoc/icons/meson.build
new file mode 100644
index 000000000..fb5b5dd03
--- /dev/null
+++ b/valadoc/icons/meson.build
@@ -0,0 +1,38 @@
+valadoc_data = files(
+ 'abstractclass.png',
+ 'abstractmethod.png',
+ 'abstractproperty.png',
+ 'class.png',
+ 'coll_close.png',
+ 'coll_open.png',
+ 'constant.png',
+ 'constructor.png',
+ 'delegate.png',
+ 'devhelpstyle.css',
+ 'enum.png',
+ 'enumvalue.png',
+ 'errorcode.png',
+ 'errordomain.png',
+ 'field.png',
+ 'interface.png',
+ 'method.png',
+ 'namespace.png',
+ 'package.png',
+ 'packages.png',
+ 'property.png',
+ 'scripts.js',
+ 'signal.png',
+ 'staticmethod.png',
+ 'struct.png',
+ 'style.css',
+ 'tip.png',
+ 'virtualmethod.png',
+ 'virtualproperty.png',
+ 'warning.png',
+ 'wikistyle.css',
+)
+
+install_data(
+ valadoc_data,
+ install_dir: join_paths('share', 'valadoc@0@'.format (vala_version_suffix), 'icons'),
+)
diff --git a/valadoc/meson.build b/valadoc/meson.build
new file mode 100644
index 000000000..46de4975a
--- /dev/null
+++ b/valadoc/meson.build
@@ -0,0 +1,22 @@
+valadoc_sources = files(
+ 'girwriter.vala',
+ 'initializerbuilder.vala',
+ 'symbolresolver.vala',
+ 'treebuilder.vala',
+ 'valadoc.vala',
+)
+
+valadoc_name = 'valadoc@0@'.format(vala_version_suffix)
+
+valadoc_exe = executable(
+ valadoc_name,
+ valadoc_sources,
+ dependencies: [gobject_dep, valacodegen_dep, libvaladoc_dep],
+ install: true,
+)
+
+# https://github.com/mesonbuild/meson/issues/1602
+meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@; ln -fs --relative @1@
valadoc'.format(join_paths(get_option('prefix'), get_option('bindir')), valadoc_name))
+
+subdir('doclets')
+subdir('icons')
diff --git a/vapi/meson.build b/vapi/meson.build
new file mode 100644
index 000000000..6e5e7825e
--- /dev/null
+++ b/vapi/meson.build
@@ -0,0 +1,270 @@
+vapis = files(
+ 'alsa.vapi',
+ 'alsa.deps',
+ 'atk.vapi',
+ 'atspi-2.vapi',
+ 'atspi-2.deps',
+ 'avahi-client.vapi',
+ 'avahi-gobject.deps',
+ 'avahi-gobject.vapi',
+ 'bzlib.vapi',
+ 'cairo.vapi',
+ 'cairo-xcb.deps',
+ 'cairo-xcb.vapi',
+ 'ccss-1.vapi',
+ 'clutter-1.0.deps',
+ 'clutter-1.0.vapi',
+ 'clutter-gdk-1.0.deps',
+ 'clutter-gdk-1.0.vapi',
+ 'clutter-gst-2.0.deps',
+ 'clutter-gst-2.0.vapi',
+ 'clutter-gst-3.0.deps',
+ 'clutter-gst-3.0.vapi',
+ 'clutter-gtk-0.10.deps',
+ 'clutter-gtk-0.10.vapi',
+ 'clutter-gtk-1.0.deps',
+ 'clutter-gtk-1.0.vapi',
+ 'clutter-x11-1.0.deps',
+ 'clutter-x11-1.0.vapi',
+ 'cogl-1.0.vapi',
+ 'cogl-1.0.deps',
+ 'cogl-pango-1.0.vapi',
+ 'cogl-pango-1.0.deps',
+ 'curses.vapi',
+ 'dbus-glib-1.vapi',
+ 'enchant.vapi',
+ 'fuse.deps',
+ 'fuse.vapi',
+ 'gconf-2.0.vapi',
+ 'geocode-glib-1.0.deps',
+ 'geocode-glib-1.0.vapi',
+ 'glib-2.0.vapi',
+ 'gdesktopenums-3.0.vapi',
+ 'gdk-2.0.deps',
+ 'gdk-2.0.vapi',
+ 'gdk-3.0.deps',
+ 'gdk-3.0.vapi',
+ 'gdk-pixbuf-2.0.deps',
+ 'gdk-pixbuf-2.0.vapi',
+ 'gdk-x11-2.0.deps',
+ 'gdk-x11-2.0.vapi',
+ 'gdk-x11-3.0.deps',
+ 'gdk-x11-3.0.vapi',
+ 'gdl-1.0.deps',
+ 'gdl-1.0.vapi',
+ 'gdl-3.0.deps',
+ 'gdl-3.0.vapi',
+ 'gedit-2.20.vapi',
+ 'gedit-2.20.deps',
+ 'gio-2.0.vapi',
+ 'gio-unix-2.0.deps',
+ 'gio-unix-2.0.vapi',
+ 'gio-windows-2.0.deps',
+ 'gio-windows-2.0.vapi',
+ 'gmodule-2.0.vapi',
+ 'gnet-2.0.deps',
+ 'gnet-2.0.vapi',
+ 'gnome-desktop-2.0.deps',
+ 'gnome-desktop-2.0.vapi',
+ 'gnome-desktop-3.0.deps',
+ 'gnome-desktop-3.0.vapi',
+ 'gnome-vfs-2.0.vapi',
+ 'gnutls.vapi',
+ 'gobject-2.0.vapi',
+ 'gobject-introspection-1.0.vapi',
+ 'goocanvas.deps',
+ 'goocanvas.vapi',
+ 'goocanvas-2.0.deps',
+ 'goocanvas-2.0.vapi',
+ 'graphene-gobject-1.0.deps',
+ 'graphene-gobject-1.0.vapi',
+ 'gsl.vapi',
+ 'gstreamer-1.0.vapi',
+ 'gstreamer-allocators-1.0.vapi',
+ 'gstreamer-allocators-1.0.deps',
+ 'gstreamer-app-1.0.vapi',
+ 'gstreamer-app-1.0.deps',
+ 'gstreamer-audio-1.0.vapi',
+ 'gstreamer-audio-1.0.deps',
+ 'gstreamer-bad-allocators-1.0.deps',
+ 'gstreamer-bad-allocators-1.0.vapi',
+ 'gstreamer-base-1.0.vapi',
+ 'gstreamer-base-1.0.deps',
+ 'gstreamer-check-1.0.vapi',
+ 'gstreamer-check-1.0.deps',
+ 'gstreamer-controller-1.0.vapi',
+ 'gstreamer-controller-1.0.deps',
+ 'gstreamer-fft-1.0.vapi',
+ 'gstreamer-fft-1.0.deps',
+ 'gstreamer-net-1.0.vapi',
+ 'gstreamer-net-1.0.deps',
+ 'gstreamer-pbutils-1.0.vapi',
+ 'gstreamer-pbutils-1.0.deps',
+ 'gstreamer-player-1.0.vapi',
+ 'gstreamer-player-1.0.deps',
+ 'gstreamer-riff-1.0.deps',
+ 'gstreamer-riff-1.0.vapi',
+ 'gstreamer-rtp-1.0.vapi',
+ 'gstreamer-rtp-1.0.deps',
+ 'gstreamer-rtsp-1.0.vapi',
+ 'gstreamer-rtsp-1.0.deps',
+ 'gstreamer-rtsp-server-1.0.vapi',
+ 'gstreamer-rtsp-server-1.0.deps',
+ 'gstreamer-sdp-1.0.vapi',
+ 'gstreamer-sdp-1.0.deps',
+ 'gstreamer-tag-1.0.vapi',
+ 'gstreamer-tag-1.0.deps',
+ 'gstreamer-video-1.0.vapi',
+ 'gstreamer-video-1.0.deps',
+ 'gstreamer-webrtc-1.0.vapi',
+ 'gstreamer-webrtc-1.0.deps',
+ 'gst-editing-services-1.0.vapi',
+ 'gst-editing-services-1.0.deps',
+ 'gtk+-2.0.deps',
+ 'gtk+-2.0.vapi',
+ 'gtk+-3.0.deps',
+ 'gtk+-3.0.vapi',
+ 'gtk+-unix-print-2.0.deps',
+ 'gtk+-unix-print-2.0.vapi',
+ 'gtk+-unix-print-3.0.deps',
+ 'gtk+-unix-print-3.0.vapi',
+ 'gtk4.deps',
+ 'gtk4.vapi',
+ 'gtk4-unix-print.deps',
+ 'gtk4-unix-print.vapi',
+ 'gtkmozembed.deps',
+ 'gtkmozembed.vapi',
+ 'gtksourceview-2.0.deps',
+ 'gtksourceview-2.0.vapi',
+ 'gudev-1.0.deps',
+ 'gudev-1.0.vapi',
+ 'hal.deps',
+ 'hal.vapi',
+ 'hildon-1.deps',
+ 'hildon-1.vapi',
+ 'hildon-fm-2.deps',
+ 'hildon-fm-2.vapi',
+ 'javascriptcoregtk-4.0.vapi',
+ 'json-glib-1.0.deps',
+ 'json-glib-1.0.vapi',
+ 'libarchive.deps',
+ 'libarchive.vapi',
+ 'libbonoboui-2.0.vapi',
+ 'libdaemon.vapi',
+ 'libepc-1.0.vapi',
+ 'libesmtp.vapi',
+ 'libftdi.deps',
+ 'libftdi.vapi',
+ 'libgeoclue-2.0.vapi',
+ 'libgeoclue-2.0.deps',
+ 'libglade-2.0.deps',
+ 'libglade-2.0.vapi',
+ 'libgnome-2.0.vapi',
+ 'libgnome-menu.vapi',
+ 'libgnome-menu-3.0.deps',
+ 'libgnome-menu-3.0.vapi',
+ 'libgnomeui-2.0.deps',
+ 'libgnomeui-2.0.vapi',
+ 'libgrss.deps',
+ 'libgrss.vapi',
+ 'libgsf-1.deps',
+ 'libgsf-1.vapi',
+ 'libgvc.vapi',
+ 'libmagic.vapi',
+ 'libnl-1.vapi',
+ 'libnl-2.0.deps',
+ 'libnl-2.0.vapi',
+ 'libnl-3.0.deps',
+ 'libnl-3.0.vapi',
+ 'libnotify.deps',
+ 'libnotify.vapi',
+ 'liboobs-1.vapi',
+ 'libosso.vapi',
+ 'libpanelapplet-2.0.deps',
+ 'libpanelapplet-2.0.vapi',
+ 'libpeas-1.0.deps',
+ 'libpeas-1.0.vapi',
+ 'libpeas-gtk-1.0.deps',
+ 'libpeas-gtk-1.0.vapi',
+ 'libpq.vapi',
+ 'libsexy.deps',
+ 'libsexy.vapi',
+ 'libsoup-2.4.deps',
+ 'libsoup-2.4.vapi',
+ 'libusb.vapi',
+ 'libusb-1.0.deps',
+ 'libusb-1.0.vapi',
+ 'libwnck-1.0.deps',
+ 'libwnck-1.0.vapi',
+ 'libwnck-3.0.deps',
+ 'libwnck-3.0.vapi',
+ 'libxml-2.0.vapi',
+ 'linux.deps',
+ 'linux.vapi',
+ 'loudmouth-1.0.vapi',
+ 'lua.vapi',
+ 'mysql.vapi',
+ 'orc-0.4.vapi',
+ 'packagekit-glib2.deps',
+ 'packagekit-glib2.vapi',
+ 'pango.deps',
+ 'pango.vapi',
+ 'pangocairo.deps',
+ 'pangocairo.vapi',
+ 'pixman-1.vapi',
+ 'polkit-agent-1.deps',
+ 'polkit-agent-1.vapi',
+ 'polkit-gobject-1.deps',
+ 'polkit-gobject-1.vapi',
+ 'poppler-glib.deps',
+ 'poppler-glib.vapi',
+ 'posix.vapi',
+ 'purple.deps',
+ 'purple.vapi',
+ 'raptor.vapi',
+ 'rasqal.vapi',
+ 'rasqal.deps',
+ 'readline.vapi',
+ 'rest-0.7.deps',
+ 'rest-0.7.vapi',
+ 'rest-extras-0.7.deps',
+ 'rest-extras-0.7.vapi',
+ 'sdl.vapi',
+ 'sdl-gfx.vapi',
+ 'sdl-gfx.deps',
+ 'sdl-image.vapi',
+ 'sdl-image.deps',
+ 'sdl-mixer.vapi',
+ 'sdl-mixer.deps',
+ 'sdl-net.vapi',
+ 'sdl-net.deps',
+ 'sdl-ttf.vapi',
+ 'sdl-ttf.deps',
+ 'sqlite3.vapi',
+ 'taglib_c.vapi',
+ 'tiff.vapi',
+ 'tokyocabinet.vapi',
+ 'udisks2.deps',
+ 'udisks2.vapi',
+ 'unique-1.0.deps',
+ 'unique-1.0.vapi',
+ 'v4l2.vapi',
+ 'webkit-1.0.deps',
+ 'webkit-1.0.vapi',
+ 'webkit2gtk-4.0.vapi',
+ 'webkit2gtk-4.0.deps',
+ 'webkit2gtk-web-extension-4.0.vapi',
+ 'webkit2gtk-web-extension-4.0.deps',
+ 'x11.vapi',
+ 'xcb.vapi',
+ 'xcb-icccm.vapi',
+ 'xcb-icccm.deps',
+ 'xtst.vapi',
+ 'xtst.deps',
+ 'zlib.vapi',
+)
+
+install_data(
+ vapis,
+ install_dir: join_paths('share', 'vala@0@'.format(vala_version_suffix), 'vapi'),
+)
diff --git a/vapigen/meson.build b/vapigen/meson.build
new file mode 100644
index 000000000..df3e18c5a
--- /dev/null
+++ b/vapigen/meson.build
@@ -0,0 +1,46 @@
+vapigen_sources = files(
+ 'valagidlparser.vala',
+ 'valavapigen.vala',
+)
+
+vapigen_name = 'vapigen@0@'.format(vala_version_suffix)
+
+vapigen_exe = executable(
+ vapigen_name,
+ vapigen_sources,
+ dependencies: [glib_dep, valagee_dep, valacore_dep, gidl_dep],
+ install: true,
+ vala_args: ['--pkg', 'gidl', '--vapidir', join_paths(meson.source_root(), 'gobject-introspection')],
+)
+
+# https://github.com/mesonbuild/meson/issues/1602
+meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@; ln -fs --relative @1@
vapigen'.format(join_paths(get_option('prefix'), get_option('bindir')), vapigen_name))
+
+vapicheck_sources = files(
+ 'valavapicheck.vala',
+)
+
+vapicheck_name = 'vapicheck@0@'.format(vala_version_suffix)
+
+executable(
+ vapicheck_name,
+ vapicheck_sources,
+ dependencies: [glib_dep, valagee_dep, valacore_dep, gidl_dep],
+ install: true,
+ vala_args: ['--pkg', 'gidl', '--vapidir', join_paths(meson.source_root(), 'gobject-introspection')],
+)
+
+# https://github.com/mesonbuild/meson/issues/1602
+meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@; ln -fs --relative @1@
vapicheck'.format(join_paths(get_option('prefix'), get_option('bindir')), vapicheck_name))
+
+configure_file(
+ input: 'vapigen.pc.in',
+ output: 'vapigen@0@.pc'.format(vala_version_suffix),
+ configuration: pkgconf,
+ install_dir: pkg_install_dir,
+)
+
+install_data('vapigen.m4', install_dir: join_paths('share', 'aclocal'))
+install_data('Makefile.vapigen', install_dir: join_paths('share', 'vala'))
+
+subdir('vala-gen-introspect')
diff --git a/vapigen/vala-gen-introspect/meson.build b/vapigen/vala-gen-introspect/meson.build
new file mode 100644
index 000000000..79ab97379
--- /dev/null
+++ b/vapigen/vala-gen-introspect/meson.build
@@ -0,0 +1,9 @@
+vala_gen_introspect_sh = configure_file(
+ input: 'vala-gen-introspect.in',
+ output: 'vala-gen-introspect@0@'.format(vala_version_suffix),
+ configuration: pkgconf,
+ install_dir: get_option('bindir'),
+)
+
+# https://github.com/mesonbuild/meson/issues/1602
+meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@; ln -fs @1@
vala-gen-introspect'.format(join_paths(get_option('prefix'), get_option('bindir')),
'vala-gen-introspect@0@'.format(vala_version_suffix)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]