From f90d29dc69906483e18d77e1319c36d0e62765a8 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 24 Aug 2017 16:49:02 -0300 Subject: [PATCH] meson: Install missing .pc/lib/gapi XML files (#32) --- atk/generated/meson.build | 8 +++++++- atk/meson.build | 7 +++++-- cairo/meson.build | 3 +++ gdk/generated/meson.build | 12 +++++++++--- gdk/meson.build | 9 +++++++-- gio/generated/meson.build | 7 +++++++ gio/meson.build | 11 ++++++++--- glib/meson.build | 7 ++++++- gtk/generated/meson.build | 8 +++++++- gtk/meson.build | 13 +++++++++---- meson.build | 8 ++++++-- pango/generated/meson.build | 9 ++++++++- pango/meson.build | 9 ++++++--- 13 files changed, 88 insertions(+), 23 deletions(-) diff --git a/atk/generated/meson.build b/atk/generated/meson.build index 8cc1ad5b1..23819a454 100644 --- a/atk/generated/meson.build +++ b/atk/generated/meson.build @@ -118,5 +118,11 @@ source_gen = custom_target('atk_generated', output: generated_sources, ) +api_xml = custom_target(pkg + '_api_xml', + input: raw_api_fname, + output: pkg + '-api.xml', + command: [generate_api, '--fakeglue'], + depends: [source_gen], + install: true, + install_dir: gapi_xml_installdir) atk_api_includes = join_paths(meson.current_build_dir(), 'atk-api.xml') - diff --git a/atk/meson.build b/atk/meson.build index bacf1d99e..354fa9735 100644 --- a/atk/meson.build +++ b/atk/meson.build @@ -1,7 +1,8 @@ snk = join_paths(meson.current_source_dir(), '..', 'gtk-sharp.snk') -assembly_name = 'atk-sharp' +pkg = 'atk' -raw_api_fname = join_paths(meson.current_source_dir(), 'atk-api.raw') +assembly_name = pkg + '-sharp' +raw_api_fname = join_paths(meson.current_source_dir(), pkg + '-api.raw') metadata_fname = join_paths(meson.current_source_dir(), 'Atk.metadata') glueincludes = 'atk/atk.h' gluefile = join_paths(meson.current_build_dir(), 'generate.c') @@ -26,6 +27,8 @@ sources = [ atk_sharp = library(assembly_name, source_gen, sources, cs_args: ['-unsafe', '-keyfile:' + snk], link_with: glib_sharp, + install: true, + install_dir: lib_install_dir ) gluegen = custom_target('atkgluegen', diff --git a/cairo/meson.build b/cairo/meson.build index 4c1a2f08d..bb7c16cbd 100644 --- a/cairo/meson.build +++ b/cairo/meson.build @@ -65,8 +65,11 @@ sources = [ cairo_sharp = library(assembly_name, sources, cs_args: ['-keyfile:' + snk], + install: true, + install_dir: lib_install_dir ) install_infos += [assembly_name, cairo_sharp.full_path()] cairo_sharp_dep = declare_dependency(link_with: cairo_sharp) cairo_api_includes = join_paths(meson.current_source_dir(), 'cairo-api.xml') +install_data(cairo_api_includes, install_dir: gapi_xml_installdir) diff --git a/gdk/generated/meson.build b/gdk/generated/meson.build index 89956fab3..87a0d0c54 100644 --- a/gdk/generated/meson.build +++ b/gdk/generated/meson.build @@ -192,8 +192,7 @@ generated_sources = [ 'GLib_GLibSharp.GSourceFuncNative.cs', ] -source_gen = [] -source_gen += [custom_target(assembly_name + 'codegen', +source_gen = custom_target(assembly_name + 'codegen', input: raw_api_fname, output: generated_sources, command: [ @@ -215,6 +214,13 @@ source_gen += [custom_target(assembly_name + 'codegen', '--glue-libname', gluefile, '--schema', schema, ], - depends: [gapi_codegen, gapi_fixup])] + depends: [gapi_codegen, gapi_fixup]) +api_xml = custom_target(pkg + '_api_xml', + input: raw_api_fname, + output: pkg + '-api.xml', + command: [generate_api, '--fakeglue'], + depends: [source_gen], + install: true, + install_dir: gapi_xml_installdir) gdk_api_includes = join_paths(meson.current_build_dir(), 'gdk-api.xml') diff --git a/gdk/meson.build b/gdk/meson.build index 16eb4dd48..036f145a5 100644 --- a/gdk/meson.build +++ b/gdk/meson.build @@ -1,5 +1,6 @@ snk = join_paths(meson.current_source_dir(), '..', 'gtk-sharp.snk') -assembly_name = 'gdk-sharp' +pkg = 'gdk' +assembly_name = pkg + '-sharp' symbols = join_paths(meson.current_source_dir(), 'gdk-symbols.xml') raw_api_fname = join_paths(meson.current_source_dir(), 'gdk-api.raw') @@ -13,7 +14,9 @@ configure_file(input: assembly_name + '.dll.config.in', configure_file(input: assembly_name + '-3.0.pc.in', output: assembly_name + '-3.0.pc', - configuration : version_data) + configuration : version_data, + install_dir: pkg_install_dir, + install: true) subdir('generated') @@ -64,6 +67,8 @@ sources = [ gdk_sharp = library(assembly_name, source_gen, sources, cs_args: ['-unsafe', '-keyfile:' + snk], link_with: [glib_sharp, pango_sharp, cairo_sharp, gio_sharp], + install: true, + install_dir: lib_install_dir ) install_infos += [assembly_name, gdk_sharp.full_path()] diff --git a/gio/generated/meson.build b/gio/generated/meson.build index 53b615858..2dd0c90aa 100644 --- a/gio/generated/meson.build +++ b/gio/generated/meson.build @@ -415,4 +415,11 @@ source_gen = custom_target('gio_generated', output: generated_sources, ) +api_xml = custom_target(pkg + '_api_xml', + input: raw_api_fname, + output: pkg + '-api.xml', + command: [generate_api, '--fakeglue'], + depends: [source_gen], + install: true, + install_dir: gapi_xml_installdir) gio_api_includes = join_paths(meson.current_build_dir(), 'gio-api.xml') diff --git a/gio/meson.build b/gio/meson.build index b74d454a0..55021dcd6 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -1,7 +1,8 @@ snk = join_paths(meson.current_source_dir(), '..', 'gtk-sharp.snk') -assembly_name = 'gio-sharp' +pkg = 'gio' +assembly_name = pkg + '-sharp' -raw_api_fname = join_paths(meson.current_source_dir(), 'gio-api.raw') +raw_api_fname = join_paths(meson.current_source_dir(), pkg + '-api.raw') metadata_fname = join_paths(meson.current_source_dir(), 'Gio.metadata') glueincludes = 'gio/gio.h' gluefile = join_paths(meson.current_build_dir(), 'generate.c') @@ -12,7 +13,9 @@ configure_file(input: assembly_name + '.dll.config.in', configure_file(input: assembly_name + '-3.0.pc.in', output: assembly_name + '-3.0.pc', - configuration : version_data) + configuration : version_data, + install_dir: pkg_install_dir, + install: true) subdir('generated') @@ -30,6 +33,8 @@ sources = [ gio_sharp = library(assembly_name, source_gen, sources, cs_args: ['-unsafe', '-keyfile:' + snk], link_with: glib_sharp, + install: true, + install_dir: lib_install_dir ) gluegen = custom_target('giogluegen', diff --git a/glib/meson.build b/glib/meson.build index 1cae0f906..00e8634c6 100644 --- a/glib/meson.build +++ b/glib/meson.build @@ -7,7 +7,9 @@ configure_file(input: 'glib-sharp.dll.config.in', configure_file(input: 'glib-sharp-3.0.pc.in', output: 'glib-sharp-3.0.pc', - configuration : version_data) + configuration : version_data, + install_dir: pkg_install_dir, + install: true) policy_data = configuration_data() policy_data.set('ASSEMBLY_NAME', assembly_name) @@ -90,9 +92,12 @@ sources = [ glib_sharp = library(assembly_name, sources, cs_args: ['-unsafe', '-keyfile:' + snk], + install: true, + install_dir: lib_install_dir ) install_infos += [assembly_name, glib_sharp.full_path()] glib_sharp_dep = declare_dependency(link_with: glib_sharp) glib_api_includes = join_paths(meson.current_source_dir(), 'glib-api.xml') +install_data(glib_api_includes, install_dir: gapi_xml_installdir) diff --git a/gtk/generated/meson.build b/gtk/generated/meson.build index 7ba67889f..b76825b56 100644 --- a/gtk/generated/meson.build +++ b/gtk/generated/meson.build @@ -1084,5 +1084,11 @@ source_gen = custom_target(assembly_name + 'codegen', ], depends: [gapi_codegen, gapi_fixup]) +api_xml = custom_target(pkg + '_api_xml', + input: raw_api_fname, + output: pkg + '-api.xml', + command: [generate_api, '--fakeglue'], + depends: [source_gen], + install: true, + install_dir: gapi_xml_installdir) gtk_api_includes = join_paths(meson.current_build_dir(), 'gtk-api.xml') - diff --git a/gtk/meson.build b/gtk/meson.build index 349d033d5..4ff478712 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -1,8 +1,9 @@ snk = join_paths(meson.current_source_dir(), '..', 'gtk-sharp.snk') -assembly_name = 'gtk-sharp' -symbols = join_paths(meson.current_source_dir(), 'gtk-symbols.xml') +pkg = 'gtk' +assembly_name = pkg + '-sharp' +symbols = join_paths(meson.current_source_dir(), pkg + '-symbols.xml') -raw_api_fname = join_paths(meson.current_source_dir(), 'gtk-api.raw') +raw_api_fname = join_paths(meson.current_source_dir(), pkg + '-api.raw') metadata_fname = join_paths(meson.current_source_dir(), 'Gtk.metadata') glueincludes = 'gtk/gtk.h' gluefile = join_paths(meson.current_build_dir(), 'generate.c') @@ -13,7 +14,9 @@ configure_file(input: assembly_name + '.dll.config.in', configure_file(input: assembly_name + '-3.0.pc.in', output: assembly_name + '-3.0.pc', - configuration : version_data) + configuration : version_data, + install_dir: pkg_install_dir, + install: true) subdir('generated') @@ -134,6 +137,8 @@ gtk_sharp = library(assembly_name, source_gen, sources, link_with: [glib_sharp, pango_sharp, cairo_sharp, gio_sharp, atk_sharp, gdk_sharp], + install: true, + install_dir: lib_install_dir ) gluegen = custom_target('gtkgluegen', diff --git a/meson.build b/meson.build index 889475c49..73b9e223f 100644 --- a/meson.build +++ b/meson.build @@ -58,13 +58,17 @@ remap_dl_data = configuration_data() remap_dl_data.set('LIB_PREFIX', lib_prefix) remap_dl_data.set('LIB_SUFFIX', lib_suffix) +pkg_version = meson.project_name() + '-3.0' version_data = configuration_data() version_data.set('VERSION', meson.project_version()) -version_data.set('PACKAGE_VERSION', meson.project_name() + '-3.0') +version_data.set('PACKAGE_VERSION', pkg_version) install_infos = [] -schema = join_paths(meson.current_source_dir(), 'gapi.xsd') +lib_install_dir = join_paths(get_option('libdir'), 'mono', pkg_version) +pkg_install_dir = join_paths(get_option('libdir'), 'pkgconfig') +gapi_xml_installdir = join_paths(get_option('datadir'), 'gapi-3.0') +schema = join_paths(meson.current_source_dir(), 'gapi.xsd') subdir('parser') subdir('generator') subdir('glib') diff --git a/pango/generated/meson.build b/pango/generated/meson.build index 13b4d13c0..eb9801e55 100644 --- a/pango/generated/meson.build +++ b/pango/generated/meson.build @@ -133,4 +133,11 @@ source_gen = custom_target('pango_generated', output: generated_sources, ) -pango_api_includes = join_paths(meson.current_build_dir(), 'pango-api.xml') +api_xml = custom_target(pkg + '_api_xml', + input: raw_api_fname, + output: pkg + '-api.xml', + command: [generate_api, '--fakeglue'], + depends: [source_gen], + install: true, + install_dir: gapi_xml_installdir) +pango_api_includes = join_paths(meson.current_build_dir(), pkg + '-api.xml') diff --git a/pango/meson.build b/pango/meson.build index bdb82e1b9..bd51f3efc 100644 --- a/pango/meson.build +++ b/pango/meson.build @@ -1,7 +1,8 @@ snk = join_paths(meson.current_source_dir(), '..', 'gtk-sharp.snk') -assembly_name = 'pango-sharp' +pkg = 'pango' +assembly_name = pkg + '-sharp' glueincludes = 'pango/pango.h' -raw_api_fname = join_paths(meson.current_source_dir(), 'pango-api.raw') +raw_api_fname = join_paths(meson.current_source_dir(), pkg + '-api.raw') metadata_fname = join_paths(meson.current_source_dir(), 'Pango.metadata') gluefile = join_paths(meson.current_build_dir(), 'generate.c') @@ -60,7 +61,9 @@ sources = [ pango_sharp = library(assembly_name, source_gen, sources, cs_args: ['-unsafe', '-keyfile:' + snk], - link_with: [glib_sharp, cairo_sharp] + link_with: [glib_sharp, cairo_sharp], + install: true, + install_dir: lib_install_dir ) gluegen = custom_target('pangogluegen',