From 54ebc3739e7a456fb806a85e9ac7b2043508fa95 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 30 Dec 2022 16:12:32 +0000 Subject: [PATCH 1/3] ci: Add missing dependencies `libdbus-1-dev` is needed for the interfaces dir from `dbus-1.pc`, and `desktop-file-utils` is needed for `update-desktop-database`. These are needed due to updating Debian Unstable. Signed-off-by: Philip Withnall --- .gitlab-ci/debian-unstable.Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci/debian-unstable.Dockerfile b/.gitlab-ci/debian-unstable.Dockerfile index cf3a9b3..435fd68 100644 --- a/.gitlab-ci/debian-unstable.Dockerfile +++ b/.gitlab-ci/debian-unstable.Dockerfile @@ -1,6 +1,7 @@ FROM debian:unstable RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \ + desktop-file-utils \ gettext \ git \ gtk-doc-tools \ @@ -8,6 +9,7 @@ RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \ libadwaita-1-dev \ libaccountsservice-dev \ libappstream-dev \ + libdbus-1-dev \ libflatpak-dev \ libgirepository1.0-dev \ libglib2.0-dev \ From 6c96a5e7b69d43a16ada9bb69b3b3719986caa49 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 31 Aug 2022 10:54:52 +0200 Subject: [PATCH 2/3] build: Bump Meson dependency to 0.59.0 Required for switching to `gnome.post_install()` function with `update_desktop_database` kwarg. Even newer version is available in bullseye-backports in Debian so it should probably be fine. --- .gitlab-ci.yml | 2 +- .gitlab-ci/debian-unstable.Dockerfile | 2 +- meson.build | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a0870f7..088fafb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ cache: - _ccache/ variables: - DEBIAN_IMAGE: "registry.freedesktop.org/pwithnall/malcontent/debian-unstable:v3" + DEBIAN_IMAGE: "registry.freedesktop.org/pwithnall/malcontent/debian-unstable:v4" MESON_TEST_TIMEOUT_MULTIPLIER: 2 G_MESSAGES_DEBUG: all MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload" diff --git a/.gitlab-ci/debian-unstable.Dockerfile b/.gitlab-ci/debian-unstable.Dockerfile index 435fd68..226bdea 100644 --- a/.gitlab-ci/debian-unstable.Dockerfile +++ b/.gitlab-ci/debian-unstable.Dockerfile @@ -30,7 +30,7 @@ RUN locale-gen C.UTF-8 && /usr/sbin/update-locale LANG=C.UTF-8 ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 -RUN pip3 install meson==0.57.0 +RUN pip3 install meson==0.59.4 ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} diff --git a/meson.build b/meson.build index 9cd327d..10dd469 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('malcontent', 'c', version : '0.11.0', - meson_version : '>= 0.57.0', + meson_version : '>= 0.59.0', license: ['LGPL-2.1-or-later', 'GPL-2.0-or-later'], default_options : [ 'buildtype=debugoptimized', From 4d234c01ddc9177ba684fb3577bec8be91cf6c85 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 31 Aug 2022 06:20:30 +0200 Subject: [PATCH 3/3] =?UTF-8?q?build:=20Switch=20to=20Meson=E2=80=99s=20gn?= =?UTF-8?q?ome.post=5Finstall=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of using a custom post install script. This drops the GTK 3 dependency. Required bumping minimum Meson version to 0.59 for the `update_desktop_database` kwarg. https://mesonbuild.com/Gnome-module.html#gnomepost_install --- build-aux/meson_post_install.py | 18 ------------------ meson.build | 7 +++++-- 2 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 build-aux/meson_post_install.py diff --git a/build-aux/meson_post_install.py b/build-aux/meson_post_install.py deleted file mode 100644 index aefcadf..0000000 --- a/build-aux/meson_post_install.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -import os -import subprocess - -install_prefix = os.environ['MESON_INSTALL_PREFIX'] - -if not os.environ.get('DESTDIR'): - icon_cache_dir = os.path.join(install_prefix, 'share', 'icons', 'hicolor') - if os.path.exists(icon_cache_dir): - print('Updating icon cacheā€¦') - subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir]) - - desktop_database_dir = os.path.join(install_prefix, 'share', 'applications') - if os.path.exists(desktop_database_dir): - print('Updating desktop databaseā€¦') - subprocess.call(['update-desktop-database', '-q', desktop_database_dir]) diff --git a/meson.build b/meson.build index 10dd469..d6f65bf 100644 --- a/meson.build +++ b/meson.build @@ -146,8 +146,11 @@ endif subdir('malcontent-client') if get_option('ui').enabled() subdir('malcontent-control') + + gnome.post_install( + gtk_update_icon_cache: true, + update_desktop_database: true, + ) endif subdir('pam') subdir('po') - -meson.add_install_script('build-aux/meson_post_install.py')