~fabrixxm/confy-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Use meson gnome module for post install steps

Details
Message ID
<20240513191004.208753-1-michaelgrahamevans@gmail.com>
DKIM signature
pass
Download raw message
Patch: +7 -24
---
The current postinstall script calls gtk-update-icon-cache by name,
which refers to the GTK 3 version of the command. Using meson
gnome.post_install will use gtk4-update-icon-cache when appropriate.

Contributed as a part of the effort to eliminate GTK 3 dependencies from
Nixpkgs (https://github.com/NixOS/nixpkgs/issues/302605).

 build-aux/meson/postinstall.py | 21 ---------------------
 meson.build                    | 10 +++++++---
 2 files changed, 7 insertions(+), 24 deletions(-)
 delete mode 100755 build-aux/meson/postinstall.py

diff --git a/build-aux/meson/postinstall.py b/build-aux/meson/postinstall.py
deleted file mode 100755
index 6a3ea97..0000000
--- a/build-aux/meson/postinstall.py
@@ -1,21 +0,0 @@
#!/usr/bin/env python3

from os import environ, path
from subprocess import call

prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local')
datadir = path.join(prefix, 'share')
destdir = environ.get('DESTDIR', '')

# Package managers set this so we don't need to run
if not destdir:
    print('Updating icon cache...')
    call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')])

    print('Updating desktop database...')
    call(['update-desktop-database', '-q', path.join(datadir, 'applications')])

    print('Compiling GSettings schemas...')
    call(['glib-compile-schemas', path.join(datadir, 'glib-2.0', 'schemas')])


diff --git a/meson.build b/meson.build
index b2c599f..52de237 100644
--- a/meson.build
+++ b/meson.build
@@ -1,15 +1,19 @@
project('confy',  
          version: '0.7.1',
    meson_version: '>= 0.58.0',
    meson_version: '>= 0.59.0',
  default_options: [ 'warning_level=2',
                   ],
)

i18n = import('i18n')

gnome = import('gnome')

subdir('data')
subdir('src')
subdir('po')

meson.add_install_script('build-aux/meson/postinstall.py')
gnome.post_install(
  glib_compile_schemas: true,
  gtk_update_icon_cache: true,
  update_desktop_database: true,
)
-- 
2.45.0
Details
Message ID
<3f5e46e2d6cac99e7d244be2b8ba1758c11068de.camel@kirgroup.net>
In-Reply-To
<20240513191004.208753-1-michaelgrahamevans@gmail.com> (view parent)
DKIM signature
pass
Download raw message
Merged, thank you!

(I have to do the same on my other projects now :) )
Reply to thread Export thread (mbox)