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
README.md
22
README.md
|
@ -22,17 +22,17 @@
|
||||||
|
|
||||||
Package Name | Required Version
|
Package Name | Required Version
|
||||||
:--- |---:|
|
:--- |---:|
|
||||||
meson | 0.50
|
meson | 0.56
|
||||||
valac | 0.48
|
valac | 0.48
|
||||||
libglib-2.0-dev | 2.30
|
libglib-2.0-dev | 2.30
|
||||||
libjson-glib-dev | 1.4.4
|
libjson-glib-dev | 1.4.4
|
||||||
libxml2-dev | 2.9.10
|
libxml2-dev | 2.9.10
|
||||||
libgee-0.8-dev | 0.8.5
|
libgee-0.8-dev | 0.8.5
|
||||||
libsoup2.4-dev | 2.64
|
libsoup2.4-dev | 2.64
|
||||||
libgtk-4-dev | 4.3.0
|
libgtk-4-dev | 4.3.0
|
||||||
libadwaita-1.0-dev | 1.2.0
|
libadwaita-1.0-dev | 1.2.0
|
||||||
libsecret-1-dev | 0.20
|
libsecret-1-dev | 0.20
|
||||||
|
|
||||||
|
|
||||||
2. Run `install.sh` in the project directory. The app will launch automatically on success.
|
2. Run `install.sh` in the project directory. The app will launch automatically on success.
|
||||||
|
|
||||||
|
|
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(
|
test(
|
||||||
'Validate appstream file',
|
'Validate appstream file',
|
||||||
appstream_util,
|
appstream_util,
|
||||||
args: ['validate', appstream_file],
|
args: ['validate-relax', appstream_file],
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
13
meson.build
13
meson.build
|
@ -2,7 +2,7 @@ project(
|
||||||
'dev.geopjr.tooth',
|
'dev.geopjr.tooth',
|
||||||
['c', 'vala'],
|
['c', 'vala'],
|
||||||
version: '2.1.0',
|
version: '2.1.0',
|
||||||
meson_version: '>= 0.59.0',
|
meson_version: '>= 0.56.0',
|
||||||
default_options: [
|
default_options: [
|
||||||
'warning_level=2',
|
'warning_level=2',
|
||||||
'werror=false',
|
'werror=false',
|
||||||
|
@ -153,8 +153,15 @@ executable(
|
||||||
subdir('data')
|
subdir('data')
|
||||||
subdir('po')
|
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,
|
glib_compile_schemas: true,
|
||||||
gtk_update_icon_cache: true,
|
gtk_update_icon_cache: true,
|
||||||
update_desktop_database: true,
|
update_desktop_database: true,
|
||||||
)
|
)
|
||||||
|
else
|
||||||
|
meson.add_install_script('build-aux/meson_post_install.py')
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in a new issue