diff options
author | Matt Turner <mattst88@gentoo.org> | 2023-04-13 17:48:37 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2023-04-13 17:51:08 -0400 |
commit | ab5363f73570630e4d1b02ba218a8051c366e3db (patch) | |
tree | 2c6b869dd6c07cc00898edfe2dd3eaa6a8dc8fa2 /media-gfx/gnome-screenshot | |
parent | dev-libs/libgit2-glib: Fix build without Python native-symlinks (diff) | |
download | gentoo-ab5363f73570630e4d1b02ba218a8051c366e3db.tar.gz gentoo-ab5363f73570630e4d1b02ba218a8051c366e3db.tar.bz2 gentoo-ab5363f73570630e4d1b02ba218a8051c366e3db.zip |
media-gfx/gnome-screenshot: Fix build without Python native-symlinks
Closes: https://bugs.gentoo.org/829593
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'media-gfx/gnome-screenshot')
-rw-r--r-- | media-gfx/gnome-screenshot/files/gnome-screenshot-41.0-build-Use-GNOME-module-post_install.patch | 72 | ||||
-rw-r--r-- | media-gfx/gnome-screenshot/gnome-screenshot-41.0.ebuild | 3 |
2 files changed, 74 insertions, 1 deletions
diff --git a/media-gfx/gnome-screenshot/files/gnome-screenshot-41.0-build-Use-GNOME-module-post_install.patch b/media-gfx/gnome-screenshot/files/gnome-screenshot-41.0-build-Use-GNOME-module-post_install.patch new file mode 100644 index 000000000000..85142224aca1 --- /dev/null +++ b/media-gfx/gnome-screenshot/files/gnome-screenshot-41.0-build-Use-GNOME-module-post_install.patch @@ -0,0 +1,72 @@ +https://gitlab.gnome.org/GNOME/gnome-screenshot/-/merge_requests/67 + +From a25d8f7da4d4dd5b94549362f9a439351495edff Mon Sep 17 00:00:00 2001 +From: Matt Turner <mattst88@gmail.com> +Date: Tue, 23 Aug 2022 21:10:09 -0400 +Subject: [PATCH] build: Use GNOME module post_install() + +--- + build-aux/postinstall.py | 27 --------------------------- + meson.build | 8 ++++++-- + 2 files changed, 6 insertions(+), 29 deletions(-) + delete mode 100755 build-aux/postinstall.py + +diff --git a/build-aux/postinstall.py b/build-aux/postinstall.py +deleted file mode 100755 +index 81afb18..0000000 +--- a/build-aux/postinstall.py ++++ /dev/null +@@ -1,27 +0,0 @@ +-#!/usr/bin/env python3 +- +-import os +-import subprocess +- +-prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local') +-datadir = os.path.join(prefix, 'share') +- +-# Packaging tools define DESTDIR and this isn't needed for them +-if 'DESTDIR' not in os.environ: +- print('Updating icon cache...') +- icon_cache_dir = os.path.join(datadir, 'icons', 'hicolor') +- if not os.path.exists(icon_cache_dir): +- os.makedirs(icon_cache_dir) +- subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir]) +- +- print('Updating desktop database...') +- desktop_database_dir = os.path.join(datadir, 'applications') +- if not os.path.exists(desktop_database_dir): +- os.makedirs(desktop_database_dir) +- subprocess.call(['update-desktop-database', '-q', desktop_database_dir]) +- +- print('Compiling GSettings schemas...') +- schemas_dir = os.path.join(datadir, 'glib-2.0', 'schemas') +- if not os.path.exists(schemas_dir): +- os.makedirs(schemas_dir) +- subprocess.call(['glib-compile-schemas', schemas_dir]) +diff --git a/meson.build b/meson.build +index 3f2f393..dcb0b46 100644 +--- a/meson.build ++++ b/meson.build +@@ -3,7 +3,7 @@ project( + 'c', + version: '41.0', + license: 'GPLv2+', +- meson_version: '>= 0.50.0', ++ meson_version: '>= 0.59.0', + default_options: [ + 'buildtype=debugoptimized', + 'warning_level=1', +@@ -63,4 +63,8 @@ subdir('data') + subdir('src') + subdir('po') + +-meson.add_install_script('build-aux/postinstall.py') ++gnome.post_install( ++ glib_compile_schemas: true, ++ gtk_update_icon_cache: true, ++ update_desktop_database: true, ++) +-- +2.39.2 + diff --git a/media-gfx/gnome-screenshot/gnome-screenshot-41.0.ebuild b/media-gfx/gnome-screenshot/gnome-screenshot-41.0.ebuild index 536f83cf2dfb..36815cc827c0 100644 --- a/media-gfx/gnome-screenshot/gnome-screenshot-41.0.ebuild +++ b/media-gfx/gnome-screenshot/gnome-screenshot-41.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -38,6 +38,7 @@ PATCHES=( "${FILESDIR}"/${PN}-40.0-fix-hidpi.patch "${FILESDIR}"/${P}-fix-meson-0.61-build.patch + "${FILESDIR}"/${P}-build-Use-GNOME-module-post_install.patch ) DOC_CONTENTS="${P} saves screenshots in ~/Pictures/ and defaults to |