[meld: 1/2] build: Use GNOME module post_install()




commit b6b403f4a99140c2ac08f069c57bb5265c46e624
Author: Matt Turner <mattst88 gmail com>
Date:   Fri Oct 7 21:28:09 2022 -0400

    build: Use GNOME module post_install()

 meson.build           |  8 +++++++-
 meson_post_install.py | 13 +------------
 2 files changed, 8 insertions(+), 13 deletions(-)
---
diff --git a/meson.build b/meson.build
index eea1336e..a782eb7b 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
 project(
   'meld',
   version: '3.22.0',
-  meson_version: '>= 0.49.0',
+  meson_version: '>= 0.59.0',
 )
 
 python = import('python')
@@ -54,4 +54,10 @@ subdir('data')
 subdir('help')
 subdir('po')
 
+gnome.post_install(
+  glib_compile_schemas: true,
+  gtk_update_icon_cache: true,
+  update_desktop_database: true,
+)
+
 meson.add_install_script('meson_post_install.py', get_option('byte-compile') ? python3.get_install_dir() : 
'')
diff --git a/meson_post_install.py b/meson_post_install.py
index 79bc1ac5..36db8a74 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -2,18 +2,7 @@
 
 import sys
 from compileall import compile_dir
-from os import environ, path
-from subprocess import call
-
-if not environ.get('DESTDIR', ''):
-    PREFIX = environ.get('MESON_INSTALL_PREFIX', '/usr/local')
-    DATA_DIR = path.join(PREFIX, 'share')
-    print('Updating icon cache...')
-    call(['gtk-update-icon-cache', '-qtf', path.join(DATA_DIR, 'icons', 'hicolor')])
-    print("Compiling new schemas")
-    call(["glib-compile-schemas", path.join(DATA_DIR, 'glib-2.0', 'schemas')])
-    print("Updating desktop database")
-    call(["update-desktop-database", path.join(DATA_DIR, 'applications')])
+from os import path
 
 # Byte-compilation is enabled by passing the site-packages path to this script
 if len(sys.argv) > 1:


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