[vala/wip/meson: 406/406] meson: Add vapis



commit a3ab3d69e574683e2098382e97d787154ffec723
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Thu Aug 10 18:33:43 2017 +0200

    meson: Add vapis

 vapi/meson.build | 219 ++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 161 insertions(+), 58 deletions(-)
---
diff --git a/vapi/meson.build b/vapi/meson.build
index ca23b83a9..97896dd49 100644
--- a/vapi/meson.build
+++ b/vapi/meson.build
@@ -16,8 +16,6 @@ vapis = [
        'clutter-1.0.vapi',
        'clutter-gdk-1.0.deps',
        'clutter-gdk-1.0.vapi',
-       'clutter-gst-1.0.deps',
-       'clutter-gst-1.0.vapi',
        'clutter-gst-2.0.deps',
        'clutter-gst-2.0.vapi',
        'clutter-gst-3.0.deps',
@@ -55,10 +53,6 @@ vapis = [
        'gdl-1.0.vapi',
        'gdl-3.0.deps',
        'gdl-3.0.vapi',
-       'gdu.deps',
-       'gdu.vapi',
-       'gdu-gtk.deps',
-       'gdu-gtk.vapi',
        'gedit-2.20.vapi',
        'gedit-2.20.deps',
        'gio-2.0.vapi',
@@ -80,44 +74,6 @@ vapis = [
        'graphene-1.0.deps',
        'graphene-1.0.vapi',
        'gsl.vapi',
-       'gstreamer-0.10.deps',
-       'gstreamer-0.10.vapi',
-       'gstreamer-app-0.10.deps',
-       'gstreamer-app-0.10.vapi',
-       'gstreamer-audio-0.10.deps',
-       'gstreamer-audio-0.10.vapi',
-       'gstreamer-base-0.10.deps',
-       'gstreamer-base-0.10.vapi',
-       'gstreamer-cdda-0.10.deps',
-       'gstreamer-cdda-0.10.vapi',
-       'gstreamer-check-0.10.deps',
-       'gstreamer-check-0.10.vapi',
-       'gstreamer-controller-0.10.deps',
-       'gstreamer-controller-0.10.vapi',
-       'gstreamer-dataprotocol-0.10.deps',
-       'gstreamer-dataprotocol-0.10.vapi',
-       'gstreamer-fft-0.10.deps',
-       'gstreamer-fft-0.10.vapi',
-       'gstreamer-interfaces-0.10.deps',
-       'gstreamer-interfaces-0.10.vapi',
-       'gstreamer-net-0.10.deps',
-       'gstreamer-net-0.10.vapi',
-       'gstreamer-netbuffer-0.10.deps',
-       'gstreamer-netbuffer-0.10.vapi',
-       'gstreamer-pbutils-0.10.deps',
-       'gstreamer-pbutils-0.10.vapi',
-       'gstreamer-riff-0.10.deps',
-       'gstreamer-riff-0.10.vapi',
-       'gstreamer-rtp-0.10.deps',
-       'gstreamer-rtp-0.10.vapi',
-       'gstreamer-rtsp-0.10.deps',
-       'gstreamer-rtsp-0.10.vapi',
-       'gstreamer-sdp-0.10.deps',
-       'gstreamer-sdp-0.10.vapi',
-       'gstreamer-tag-0.10.deps',
-       'gstreamer-tag-0.10.vapi',
-       'gstreamer-video-0.10.deps',
-       'gstreamer-video-0.10.vapi',
        'gstreamer-1.0.vapi',
        'gstreamer-allocators-1.0.vapi',
        'gstreamer-allocators-1.0.deps',
@@ -189,10 +145,6 @@ vapis = [
        'libesmtp.vapi',
        'libftdi.deps',
        'libftdi.vapi',
-       'libgda-report-4.0.deps',
-       'libgda-report-4.0.vapi',
-       'libgda-4.0.deps',
-       'libgda-4.0.vapi',
        'libglade-2.0.deps',
        'libglade-2.0.vapi',
        'libgnome-2.0.vapi',
@@ -224,7 +176,6 @@ vapis = [
        'libpq.vapi',
        'libsexy.deps',
        'libsexy.vapi',
-       'libsoup-2.2.vapi',
        'libsoup-2.4.deps',
        'libsoup-2.4.vapi',
        'libusb.vapi',
@@ -239,8 +190,6 @@ vapis = [
        'linux.vapi',
        'loudmouth-1.0.vapi',
        'lua.vapi',
-       'mx-1.0.deps',
-       'mx-1.0.vapi',
        'mysql.vapi',
        'orc-0.4.vapi',
        'packagekit-glib2.deps',
@@ -263,10 +212,6 @@ vapis = [
        'rasqal.vapi',
        'rasqal.deps',
        'readline.vapi',
-       'rest-0.6.deps',
-       'rest-0.6.vapi',
-       'rest-extras-0.6.deps',
-       'rest-extras-0.6.vapi',
        'rest-0.7.deps',
        'rest-0.7.vapi',
        'rest-extras-0.7.deps',
@@ -286,9 +231,6 @@ vapis = [
        'taglib_c.vapi',
        'tiff.vapi',
        'tokyocabinet.vapi',
-       'tracker-indexer-module-1.0.vapi',
-       'twitter-glib-1.0.deps',
-       'twitter-glib-1.0.vapi',
        'udisks2.deps',
        'udisks2.vapi',
        'unique-1.0.deps',
@@ -313,3 +255,164 @@ vapis = [
 ]
 
 install_data(vapis, install_dir: join_paths('share', 'vala@0@'.format(vala_version_suffix), 'vapi'))
+
+gidl_bindings = [
+       'clutter-gtk-0.10',
+       'cogl-1.0',
+       'gconf-2.0',
+       'gdk-2.0',
+       'gdk-x11-2.0',
+       'gdk-x11-3.0',
+       'gdl-1.0',
+       'gdu',
+       'gdk-gtk',
+       'gio-unix-2.0',
+       'gnome-desktop-2.0',
+       'gnome-vfs-2.0',
+       'goocanvas',
+       'gstreamer-0.10',
+       'gstreamer-app-0.10',
+       'gstreamer-audio-0.10',
+       'gstreamer-base-0.10',
+       'gstreamer-cdda-0.10',
+       'gstreamer-check-0.10',
+       'gstreamer-controller-0.10',
+       'gstreamer-dataprotocol-0.10',
+       'gstreamer-fft-0.10',
+       'gstreamer-interfaces-0.10',
+       'gstreamer-net-0.10',
+       'gstreamer-netbuffer-0.10',
+       'gstreamer-pbutils-0.10',
+       'gstreamer-riff-0.10',
+       'gstreamer-rtp-0.10',
+       'gstreamer-rtsp-0.10',
+       'gstreamer-sdp-0.10',
+       'gstreamer-tag-0.10',
+       'gstreamer-video-0.10',
+       'gtk+-2.0',
+       'gtk+-3.0',
+       'gtk+-unix-print-2.0',
+       'gtk+-unix-print-3.0',
+       'gtk+-unix-print-4.0',
+       'gtksourceview-2.0',
+       'hildon-1',
+       'hildon-fm-2',
+       'libepc-1.0',
+       'libgda-4.0',
+       'libgda-report-4.0',
+       'libglade-2.0',
+       'libgnome-2.0',
+       'libgnome-menu',
+       'libgnomeui-2.0',
+       'libgsf-1',
+       'liboobs-1',
+       'libsexy',
+       'libsoup-2.2',
+       'libwnck-1.0',
+       'loudmouth-1.0',
+       'purple',
+       'rest-0.6',
+       'rest-extras-0.6',
+       'tracker-indexer-module-1.0',
+       'twitter-glib-1.0',
+       'unique-1.0',
+       'vte',
+       'webkit-1.0',
+]
+
+gir_bindings = [
+       # vapi-name, gir-namespace, custom.vala-exists, dependencies
+       ['atk', 'Atk-1.0', true, []],
+       ['atspi-2', 'Atspi-2.0', true, []],
+       ['clutter-1.0', 'Clutter-1.0', true, ['atk', 'cairo', 'pango', 'cogl-1.0', 'cogl-pango-1.0', 
'json-glib-1.0']],
+       ['clutter-gdk-1.0', 'ClutterGdk-1.0', false, ['clutter-1.0', 'gdk-3.0']],
+       ['clutter-gtk-1.0', 'ClutterGtk-1.0', true, []],
+       ['clutter-gst-2.0', 'ClutterGst-2.0', true, ['cogl-1.0', 'clutter-1.0', 'gstreamer-base-1.0', 
'gstreamer-video-1.0']],
+       ['clutter-gst-3.0', 'ClutterGst-3.0', true, ['cogl-1.0', 'clutter-1.0', 'gdk-pixbuf-2.0', 
'gstreamer-1.0', 'gstreamer-audio-1.0', 'gstreamer-base-1.0', 'gstreamer-pbutils-1.0', 
'gstreamer-video-1.0']],
+       ['clutter-x11-1.0', 'ClutterX11-1.0', false, ['clutter-1.0']],
+       ['cogl-pango-1.0', '', false, []],
+       ['gdk-3.0', '', true, ['gio-2.0']],
+       ['gdk-x11-3.0', '', true, ['gio-2.0', 'gdk-3.0', 'x11']],
+       ['gdk-pixbuf-2.0', '', false, []],
+       ['gdl-3.0', '', false, []],
+       ['geocode-glib-1.0', '', false, []],
+       ['gio-2.0', '', false, []],
+       ['gobject-introspection-1.0', '', false, []],
+       ['graphene-1.0', '', false, []],
+       ['gtk+-4.0', '', false, []],
+       ['gudev-1.0', '', false, []],
+       ['json-glib-1.0', '', false, []],
+       ['libgnome-menu-3.0', '', false, []],
+       ['libgrss', '', false, []],
+       ['libnotify', '', false, []],
+       ['libpeas-1.0', '', false, []],
+       ['libpeas-gtk-1.0', '', false, []],
+       ['libsoup-2.4', '', false, []],
+       ['libwnck-3.0', '', false, []],
+       ['mx-1.0', '', false, []],
+       ['packagekit-glib2', '', false, []],
+       ['pango', '', false, []],
+       ['pangocairo', '', false, []],
+       ['polkit-agent-1', '', false, []],
+       ['polkit-gobject-1', '', false, []],
+       ['poppler-glib', '', false, []],
+       ['rest-0.7', '', false, []],
+       ['rest-extras-0.7', '', false, []],
+       ['udisks2', '', false, []],
+       ['vte-2.90', '', false, []],
+       ['webkit2gtk-4.0', '', false, []],
+       ['webkit2gtk-web-extension-4.0', '', false, []],
+]
+
+gir_bindings = [
+       # GStreamer 1.0
+       ['gstreamer-1.0', 'Gst-1.0', true, []],
+       ['gstreamer-base-1.0', 'GstBase-1.0', true, ['gstreamer-1.0']],
+
+       ['gstreamer-allocators-1.0', 'GstAllocators-1.0', false, ['gstreamer-1.0', 'gstreamer-base-1.0']],
+       ['gstreamer-app-1.0', 'GstApp-1.0', false, ['gstreamer-1.0', 'gstreamer-base-1.0']],
+       ['gstreamer-audio-1.0', 'GstAudio-1.0', false, ['gstreamer-1.0', 'gstreamer-base-1.0']],
+       ['gstreamer-bad-allocators-1.0', 'GstBadAllocators-1.0', false, ['gstreamer-1.0', 
'gstreamer-base-1.0']],
+       ['gstreamer-check-1.0', 'GstCheck-1.0', true, ['gstreamer-1.0', 'gstreamer-base-1.0']],
+       ['gstreamer-controller-1.0', 'GstController-1.0', false, ['gstreamer-1.0', 'gstreamer-base-1.0']],
+#      ['gstreamer-fft-1.0', 'GstFft-1.0', true, ['gstreamer-1.0', 'gstreamer-base-1.0']],
+       ['gstreamer-net-1.0', 'GstNet-1.0', false, ['gstreamer-1.0', 'gstreamer-base-1.0', 'gio-2.0']],
+#      ['gstreamer-riff-1.0', 'GstRiff-1.0', false, ['gstreamer-1.0', 'gstreamer-base-1.0']],
+       ['gstreamer-rtp-1.0', 'GstRtp-1.0', false, ['gstreamer-1.0', 'gstreamer-base-1.0']],
+       ['gstreamer-sdp-1.0', 'GstSdp-1.0', false, ['gstreamer-1.0', 'gstreamer-base-1.0']],
+       ['gstreamer-tag-1.0', 'GstTag-1.0', false, ['gstreamer-1.0', 'gstreamer-base-1.0']],
+       ['gstreamer-video-1.0', 'GstVideo-1.0', true, ['gstreamer-1.0', 'gstreamer-base-1.0']],
+
+       ['gstreamer-pbutils-1.0', 'GstPbutils-1.0', false, ['gstreamer-1.0', 'gstreamer-base-1.0', 
'gstreamer-audio-1.0', 'gstreamer-video-1.0']],
+       ['gstreamer-player-1.0', 'GstPlayer-1.0', false, ['gstreamer-1.0', 'gstreamer-base-1.0', 
'gstreamer-video-1.0']],
+       ['gstreamer-rtsp-1.0', 'GstRtsp-1.0', false, ['gstreamer-1.0', 'gstreamer-base-1.0', 
'gstreamer-sdp-1.0', 'gio-2.0']],
+#      ['gstreamer-rtsp-server-1.0', 'GstRtspServer-1.0', false, ['gstreamer-1.0', 'gstreamer-base-1.0', 
'gstreamer-rtsp-1.0']],
+]
+
+gobject_introspection_dep = dependency('gobject-introspection-1.0', required: false)
+girdir = gobject_introspection_dep.get_pkgconfig_variable('girdir')
+
+metadatadir = join_paths(meson.current_source_dir(), 'metadata')
+vapigen_args = ['--metadatadir', metadatadir, '--vapidir', meson.current_source_dir()]
+
+foreach gir_vapi : gir_bindings
+       pkg_args = []
+       foreach pkg : gir_vapi[3]
+               pkg_args += ['--pkg', pkg]
+       endforeach
+       custom_target(gir_vapi[0],
+               output: '@0@.vapi'.format(gir_vapi[0]),
+               input: [
+                       join_paths(girdir, '@0@.gir'.format(gir_vapi[1])),
+                       gir_vapi[2] ? join_paths(metadatadir, '@0 -custom vala'.format(gir_vapi[1])) : '',
+               ],
+               command: [vapigen_exe,
+                       '--library', gir_vapi[0],
+                       vapigen_args,
+                       pkg_args,
+                       '@INPUT1@', '@INPUT0@',
+               ],
+#              install: true,
+#              install_dir: join_paths(get_option('datadir'), 'vala@0@'.format(vala_version_suffix), 'vapi'),
+       )
+endforeach


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]