[gnome-builder] data: use meson pkgconfig module to generate libide-1.0.pc



commit 23ade3bb0736ae7021340326e214967842e6d3f8
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jun 6 13:44:33 2017 -0700

    data: use meson pkgconfig module to generate libide-1.0.pc
    
    This was using configure_file() previously to stay compatible with
    autoconf .in files. This is no longer necessary and we can just switch
    to using the proper pkgconfig module in meson.

 data/libide-1.0.pc.in |   11 -----------
 data/meson.build      |   19 -------------------
 libide/meson.build    |   13 +++++++++++++
 3 files changed, 13 insertions(+), 30 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index cc9609d..6e8ce31 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -33,22 +33,3 @@ configure_file(
        install: true,
        install_dir: join_paths(get_option('datadir'), 'dbus-1', 'services'),
 )
-
-# pkg-config files.
-pkgpkgconfdir = join_paths(get_option('libdir'), 'gnome-builder', 'pkgconfig')
-
-pkgconf = configuration_data()
-pkgconf.set('prefix', get_option('prefix'))
-pkgconf.set('libdir', join_paths('${exec_prefix}', get_option('libdir')))
-pkgconf.set('VERSION', meson.project_version())
-
-# TODO: Use the pkgconfig module to generate these
-
-configure_file(
-       input: 'libide-1.0.pc.in',
-       output: 'libide-1.0.pc',
-       configuration: pkgconf,
-       install: true,
-       install_dir: pkgpkgconfdir,
-)
-
diff --git a/libide/meson.build b/libide/meson.build
index 093829c..241e51e 100644
--- a/libide/meson.build
+++ b/libide/meson.build
@@ -681,6 +681,19 @@ libide_plugin_dep = declare_dependency(
                          libjsonrpc_glib_dep ],
 )
 
+pkgg = import('pkgconfig')
+
+pkgg.generate(
+    libraries: [libide],
+      subdirs: [ 'gnome-builder-@0@/libide'.format(meson.project_version()) ],
+      version: meson.project_version(),
+         name: 'Libide',
+     filebase: 'libide-1.0',
+  description: 'Libide contains the components used to build the GNOME Builder IDE.',
+     requires: [ 'gtk+-3.0', 'gtksourceview-3.0', 'libdazzle-1.0', 'template-glib-1.0', 'jsonrpc-glib-1.0' ],
+  install_dir: join_paths(pkglibdir, 'pkgconfig'),
+)
+
 if get_option('with_introspection')
 
   libide_gir = gnome.generate_gir(libide,


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