[libsoup/wip/meson] Build GObject introspection files for libsoup



commit f7dc05769e3cff90d29b16dc9647ccf0e7f21817
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Oct 18 10:43:14 2017 +0200

    Build GObject introspection files for libsoup

 libsoup/meson.build |  185 ++++++++++++++++++++++++++++++++++++++++++++++----
 meson_options.txt   |    6 ++
 2 files changed, 176 insertions(+), 15 deletions(-)
---
diff --git a/libsoup/meson.build b/libsoup/meson.build
index 3c6d391..6136bcf 100644
--- a/libsoup/meson.build
+++ b/libsoup/meson.build
@@ -174,28 +174,183 @@ libsoup_c_args  = ['-DHAVE_CONFIG_H']
 libsoup_c_args += ['-DG_LOG_DOMAIN="libsoup"']
 libsoup_c_args += ['-DLIBSOUP_COMPILATION']
 
+deps = [
+  glib_dep,
+  libxml_dep,
+  sqlite_dep,
+  platform_deps
+]
+
 libsoup = library('soup-@0@'.format(apiversion), soup_sources,
-    soupenum_h, soupenum_c, tlddata,
-    version : libversion,
-    soversion : soversion,
-    c_args : libsoup_c_args,
-    include_directories : [configinc],
-    install : true,
-    dependencies : [glib_dep, libxml_dep, sqlite_dep, platform_deps]
-  )
+  soupenum_h, soupenum_c, tlddata,
+  version : libversion,
+  soversion : soversion,
+  c_args : libsoup_c_args,
+  include_directories : [configinc],
+  install : true,
+  dependencies : deps
+)
 
 libsoup_dep = declare_dependency(link_with : libsoup,
-    include_directories : configinc)
+  include_directories : configinc)
 
 if cdata.get('BUILD_LIBSOUP_GNOME')
   includedir = 'libsoup-gnome-@0@/libsoup'.format(apiversion)
   install_headers(soup_gnome_headers, subdir : includedir)
 
   libsoup_gnome = library('soup-gnome-@0@'.format(apiversion), soup_gnome_sources,
-      version : libversion,
-      soversion : soversion,
-      c_args : libsoup_c_args,
-      include_directories : [configinc],
-      install : true,
-      dependencies : [glib_dep, libxml_dep, sqlite_dep, libsoup_dep])
+    version : libversion,
+    soversion : soversion,
+    c_args : libsoup_c_args,
+    include_directories : [configinc],
+    install : true,
+    dependencies : deps + [libsoup_dep])
+endif
+
+if get_option('enable-introspection')
+  soup_introspection_sources = [
+    'soup-address.c',
+    'soup-address.h',
+    'soup-auth-basic.c',
+    'soup-auth.c',
+    'soup-auth-digest.c',
+    'soup-auth-domain-basic.c',
+    'soup-auth-domain-basic.h',
+    'soup-auth-domain.c',
+    'soup-auth-domain-digest.c',
+    'soup-auth-domain-digest.h',
+    'soup-auth-domain.h',
+    'soup-auth.h',
+    'soup-auth-manager.c',
+    'soup-auth-manager.h',
+    'soup-auth-negotiate.c',
+    'soup-auth-ntlm.c',
+    'soup-autocleanups.h',
+    'soup-body-input-stream.c',
+    'soup-body-output-stream.c',
+    'soup-cache.c',
+    'soup-cache-client-input-stream.c',
+    'soup-cache.h',
+    'soup-cache-input-stream.c',
+    'soup-client-input-stream.c',
+    'soup-connection-auth.c',
+    'soup-connection.c',
+    'soup-content-decoder.c',
+    'soup-content-decoder.h',
+    'soup-content-processor.c',
+    'soup-content-sniffer.c',
+    'soup-content-sniffer.h',
+    'soup-content-sniffer-stream.c',
+    'soup-converter-wrapper.c',
+    'soup-cookie.c',
+    'soup-cookie.h',
+    'soup-cookie-jar.c',
+    'soup-cookie-jar-db.c',
+    'soup-cookie-jar-db.h',
+    'soup-cookie-jar.h',
+    'soup-cookie-jar-text.c',
+    'soup-cookie-jar-text.h',
+    'soup-date.c',
+    'soup-date.h',
+    'soup-directory-input-stream.c',
+    'soup-filter-input-stream.c',
+    'soup-form.c',
+    'soup-form.h',
+    'soup-headers.c',
+    'soup-headers.h',
+    'soup-init.c',
+    'soup-io-stream.c',
+    'soup-logger.c',
+    'soup-logger.h',
+    'soup-message-body.c',
+    'soup-message-body.h',
+    'soup-message.c',
+    'soup-message-client-io.c',
+    'soup-message.h',
+    'soup-message-headers.c',
+    'soup-message-headers.h',
+    'soup-message-io.c',
+    'soup-message-queue.c',
+    'soup-message-server-io.c',
+    'soup-method.c',
+    'soup-method.h',
+    'soup-misc.c',
+    'soup-misc.h',
+    'soup-multipart.c',
+    'soup-multipart.h',
+    'soup-multipart-input-stream.c',
+    'soup-multipart-input-stream.h',
+    'soup-password-manager.c',
+    'soup-password-manager.h',
+    'soup-path-map.c',
+    'soup-portability.h',
+    'soup-proxy-resolver.c',
+    'soup-proxy-resolver-default.c',
+    'soup-proxy-resolver-default.h',
+    'soup-proxy-resolver-wrapper.c',
+    'soup-proxy-uri-resolver.c',
+    'soup-proxy-uri-resolver.h',
+    'soup-request.c',
+    'soup-request-data.c',
+    'soup-request-data.h',
+    'soup-requester.c',
+    'soup-requester.h',
+    'soup-request-file.c',
+    'soup-request-file.h',
+    'soup-request.h',
+    'soup-request-http.c',
+    'soup-request-http.h',
+    'soup-server.c',
+    'soup-server.h',
+    'soup-session-async.c',
+    'soup-session-async.h',
+    'soup-session.c',
+    'soup-session-feature.c',
+    'soup-session-feature.h',
+    'soup-session.h',
+    'soup-session-sync.c',
+    'soup-session-sync.h',
+    'soup-socket.c',
+    'soup-socket.h',
+    'soup-socket-properties.c',
+    'soup-status.c',
+    'soup-status.h',
+    'soup-tld.c',
+    'soup-tld.h',
+    'soup-types.h',
+    'soup-uri.c',
+    'soup-uri.h',
+    'soup-value-utils.c',
+    'soup-value-utils.h',
+    'soup-version.c',
+    'soup-websocket.c',
+    'soup-websocket-connection.c',
+    'soup-websocket-connection.h',
+    'soup-websocket.h',
+    'soup-xmlrpc.c',
+    'soup-xmlrpc.h',
+    'soup-xmlrpc-old.c',
+    'soup-xmlrpc-old.h',
+  ]
+
+  gir_args = libsoup_c_args + [
+    '-DLIBSOUP_USE_UNSTABLE_REQUEST_API',
+    '--c-include=libsoup/soup.h'
+    ]
+
+  soup_gir = gnome.generate_gir(libsoup,
+    sources : soup_introspection_sources + [ soupenum_h, soupenum_c ],
+    nsversion : '2.4',
+    namespace : 'Soup',
+    symbol_prefix : 'soup_',
+    identifier_prefix : 'Soup',
+    export_packages : 'libsoup-2.4',
+    extra_args : gir_args,
+    dependencies : deps,
+    includes : [
+      'Gio-2.0',
+    ],
+    link_with : libsoup,
+    install : true,
+  )
 endif
diff --git a/meson_options.txt b/meson_options.txt
index 38bab47..4295665 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -33,3 +33,9 @@ option('enable-gnome',
   value : true,
   description : 'Build libsoup with GNOME support'
 )
+
+option('enable-introspection',
+  type : 'boolean',
+  value : true,
+  description : 'Build GObject Introspection data'
+)


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