[gsettings-desktop-schemas: 1/2] meson: Use configure_file to create pkgconfig file



commit 2f3d0ecfb9e60c8b903f8794608df7c34b21b047
Author: Jeremy Bicha <jbicha ubuntu com>
Date:   Wed Jan 16 06:35:45 2019 -0500

    meson: Use configure_file to create pkgconfig file
    
    meson's pkgconfig module forces libdir to be included in the .pc file.
    Including libdir breaking multiarch/multilib since we want to install
    to the architecture-independent /usr/share/pkgconfig/ .
    
    Therefore, we have to use configure_file (which is very similar to
    what we did with autotools anyway).
    
    Closes: https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/issues/8

 meson.build | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/meson.build b/meson.build
index 488c227..c30b046 100644
--- a/meson.build
+++ b/meson.build
@@ -29,13 +29,17 @@ schemasdir = join_paths(datadir, 'glib-2.0/schemas')
 gnome = import('gnome')
 
 # Generate pc file
-pkg = import('pkgconfig')
-
-pkg.generate(name: gsettings_desktop_schemas_name,
-             subdirs: gsettings_desktop_schemas_name,
-             install_dir: join_paths(datadir, 'pkgconfig'),
-             version: gsettings_desktop_schemas_version,
-             description: 'Shared GSettings schemas for the desktop, including helper headers')
+# Can't use pkgconfig helper https://github.com/mesonbuild/meson/issues/2253
+conf = configuration_data()
+conf.set('prefix', prefix)
+conf.set('VERSION', meson.project_version())
+conf.set('includedir', includedir)
+
+pkg = configure_file(configuration: conf,
+                     input: 'gsettings-desktop-schemas.pc.in',
+                     install: true,
+                     install_dir: join_paths(datadir, 'pkgconfig'),
+                     output: 'gsettings-desktop-schemas.pc')
 
 glib_mkenums = find_program('glib-mkenums')
 


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