mirror of
https://github.com/TakeV-Lambda/Tooth.git
synced 2024-11-21 22:44:25 +00:00
fix(meson): add support for 0.56.0 (#26)
* meson: depend on 0.56 instead of 0.59 * data/Meson: Relax appstream validation requirement Co-authored-by: Chris Talbot <chris@talbothome.com> Co-authored-by: maryjane <maryjane@disroot.org>
This commit is contained in:
parent
37b5c7376e
commit
b6d9b9478d
4 changed files with 42 additions and 15 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
Package Name | Required Version
|
||||
:--- |---:|
|
||||
meson | 0.50
|
||||
meson | 0.56
|
||||
valac | 0.48
|
||||
libglib-2.0-dev | 2.30
|
||||
libjson-glib-dev | 1.4.4
|
||||
|
|
20
build-aux/meson_post_install.py
Normal file
20
build-aux/meson_post_install.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
|
||||
data_dir = os.path.join(prefix, 'share')
|
||||
icon_dir = os.path.join(data_dir, 'icons', 'hicolor')
|
||||
app_dir = os.path.join(data_dir, 'applications')
|
||||
schema_dir = os.path.join(data_dir, 'glib-2.0', 'schemas')
|
||||
|
||||
if not os.environ.get('DESTDIR'):
|
||||
print('Compiling gsettings schemas...')
|
||||
subprocess.call (['glib-compile-schemas', schema_dir])
|
||||
|
||||
print('Update icon cache...')
|
||||
subprocess.call(['gtk-update-icon-cache', '-f', '-t', icon_dir])
|
||||
|
||||
print('Updating desktop database...')
|
||||
subprocess.call(['update-desktop-database', '-q', app_dir])
|
|
@ -50,6 +50,6 @@ if appstream_util.found()
|
|||
test(
|
||||
'Validate appstream file',
|
||||
appstream_util,
|
||||
args: ['validate', appstream_file],
|
||||
args: ['validate-relax', appstream_file],
|
||||
)
|
||||
endif
|
||||
|
|
13
meson.build
13
meson.build
|
@ -2,7 +2,7 @@ project(
|
|||
'dev.geopjr.tooth',
|
||||
['c', 'vala'],
|
||||
version: '2.1.0',
|
||||
meson_version: '>= 0.59.0',
|
||||
meson_version: '>= 0.56.0',
|
||||
default_options: [
|
||||
'warning_level=2',
|
||||
'werror=false',
|
||||
|
@ -153,8 +153,15 @@ executable(
|
|||
subdir('data')
|
||||
subdir('po')
|
||||
|
||||
gnome.post_install(
|
||||
# gnome.post_install() is available since meson 0.59.0
|
||||
# Distributions use their own tooling (e.g. postinst, triggers, etc)
|
||||
# so it is okay if the post_install() is not run on distro builds
|
||||
if meson.version().version_compare('>=0.59.0')
|
||||
gnome.post_install(
|
||||
glib_compile_schemas: true,
|
||||
gtk_update_icon_cache: true,
|
||||
update_desktop_database: true,
|
||||
)
|
||||
)
|
||||
else
|
||||
meson.add_install_script('build-aux/meson_post_install.py')
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue