[gnome-keyring/wip/nielsdg/meson] fixup! Support Meson build system




commit 71c96d4ea38e05581f6cc6bc58666f457e256f12
Author: Jan Tojnar <jtojnar gmail com>
Date:   Sun May 22 13:44:28 2022 +0200

    fixup! Support Meson build system

 daemon/meson.build |  4 +++-
 meson.build        | 17 +++++++++++------
 pam/meson.build    |  1 +
 tool/meson.build   | 15 +++++++++++++--
 4 files changed, 28 insertions(+), 9 deletions(-)
---
diff --git a/daemon/meson.build b/daemon/meson.build
index 7b3bdf66..309b54e2 100644
--- a/daemon/meson.build
+++ b/daemon/meson.build
@@ -56,6 +56,8 @@ desktop_input_files = [
   'gnome-keyring-ssh.desktop.in.in',
 ]
 
+autostartdir = join_paths(get_option('sysconfdir'), 'xdg', 'autostart')
+
 foreach desktop_input_file : desktop_input_files
   i18n.merge_file(
     input: configure_file(
@@ -70,7 +72,7 @@ foreach desktop_input_file : desktop_input_files
     type: 'desktop',
     po_dir: po_dir,
     install: true,
-    install_dir: get_option('datadir') / 'applications',
+    install_dir: autostartdir,
   )
 endforeach
 
diff --git a/meson.build b/meson.build
index 5575f201..283b3ee5 100644
--- a/meson.build
+++ b/meson.build
@@ -1,17 +1,18 @@
 project('gnome-keyring', 'c',
-  version: '3.34.0',
-  meson_version: '>= 0.49',
+  version: '42.0',
+  meson_version: '>= 0.61',
 )
 
 gnome = import('gnome')
 i18n = import('i18n')
 
 # Version
-gkr_major_version = meson.project_version().split('.')[0]
+gkr_major_version = '3'
 
 # Common variables
 cc = meson.get_compiler('c')
 gkr_prefix = get_option('prefix')
+gkr_bindir = gkr_prefix / get_option('bindir')
 config_h_inc = include_directories('.')
 po_dir = meson.current_source_dir() / 'po'
 source_root = meson.current_source_dir()
@@ -25,13 +26,13 @@ gmodule_dep = dependency('gmodule-no-export-2.0')
 gobject_dep = dependency('gobject-2.0')
 threads_dep = dependency('threads')
 gck_dep = dependency('gck-1', version: '>= 3.3.4')
-gcr_ui_dep = dependency('gcr-ui-3', version: '>= 3.5.3')
-gcr_base_dep = dependency('gcr-base-3', version: '>= 3.5.3')
+gcr_dep = dependency('gcr-3', version: '>= 3.27.90')
+gcr_base_dep = dependency('gcr-base-3', version: '>= 3.27.90')
 libgcrypt_dep = dependency('libgcrypt', version: '>= 1.2.2')
 libcap_ng_dep = dependency('libcap-ng', required: false)
 p11_kit_dep = dependency('p11-kit-1')
 
-selinux_dep = dependency('selinux', required: get_option('selinux'))
+selinux_dep = dependency('libselinux', required: get_option('selinux'))
 
 if get_option('ssh-agent')
   ssh_agent_bin = find_program('ssh-agent')
@@ -101,3 +102,7 @@ if get_option('pam')
   subdir('pam')
 endif
 subdir('docs')
+
+gnome.post_install(
+  glib_compile_schemas: true,
+)
diff --git a/pam/meson.build b/pam/meson.build
index 66eeb13c..81a88db9 100644
--- a/pam/meson.build
+++ b/pam/meson.build
@@ -19,6 +19,7 @@ libpam_gkr_cflags = [
 
 libpam_gkr = shared_library('pam_gnome_keyring',
   libpam_gkr_sources,
+  name_prefix: '',
   c_args: libpam_gkr_cflags,
   dependencies: libpam_gkr_deps,
   include_directories: config_h_inc,
diff --git a/tool/meson.build b/tool/meson.build
index 2049ff7c..cc56a348 100644
--- a/tool/meson.build
+++ b/tool/meson.build
@@ -9,12 +9,23 @@ gnome_keyring_tool_deps = [
   glib_dep,
   gck_dep,
   gcr_base_dep,
-  gcr_ui_dep,
+  gcr_dep,
   libegg_dep,
 ]
 
-gnome_keyring_tool = executable('gnome-keyring-@0@'.format(gkr_major_version),
+gnome_keyring_tool_name = f'gnome-keyring-@gkr_major_version@'
+gnome_keyring_tool = executable(
+  gnome_keyring_tool_name,
   gnome_keyring_tool_sources,
   dependencies: gnome_keyring_tool_deps,
   include_directories: config_h_inc,
+  install: true,
+  install_dir: gkr_bindir,
+)
+
+# Install a link from gnome-keyring > gnome-keyring-@gkr_major_version@ to maintain compatibility
+install_symlink(
+  'gnome-keyring',
+  pointing_to: gnome_keyring_tool_name,
+  install_dir: gkr_bindir,
 )


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