xdg-user-dirs-gtk: 0.11 → 0.14

- Port to Meson.
- Correct license according to `meson.build` file.
- Clarify the comment that the `bindtextdomain` replacement is to find translations for `dgettext("xdg-user-dirs", …)`.

https://gitlab.gnome.org/GNOME/xdg-user-dirs-gtk/-/compare/0.11...0.14
This commit is contained in:
Jan Tojnar 2025-01-18 02:17:33 +00:00
parent 3d80561071
commit a29cb611a5

View File

@ -2,9 +2,8 @@
stdenv,
lib,
fetchurl,
fetchpatch,
autoreconfHook,
intltool,
meson,
ninja,
pkg-config,
xdg-user-dirs,
wrapGAppsHook3,
@ -14,36 +13,30 @@
stdenv.mkDerivation (finalAttrs: {
pname = "xdg-user-dirs-gtk";
version = "0.11";
version = "0.14";
src = fetchurl {
url = "mirror://gnome/sources/xdg-user-dirs-gtk/${lib.versions.majorMinor finalAttrs.version}/xdg-user-dirs-gtk-${finalAttrs.version}.tar.xz";
hash = "sha256-U0vVY9PA4/jcvzV4y4qw5J07pByWbUd8ivlDg2QSHn0=";
hash = "sha256-U3++FCskc27XiU5KAfaf11jLbHpnejgoeVKdIX9KKHM=";
};
patches = [
# Fix cross: ./configure: line 7633: no: command not found
(fetchpatch {
url = "https://salsa.debian.org/gnome-team/xdg-user-dirs-gtk/-/raw/b047b613d5f18aebe8e9bca4e0a82b75b2d1f8c4/debian/patches/fix-pkg-config-cross-compilation.patch";
hash = "sha256-QHq8hlX0SS+T6jtagMs9qApJCWFG1PHxftzoID2Nag4=";
})
];
nativeBuildInputs = [
autoreconfHook
intltool
meson
ninja
pkg-config
xdg-user-dirs # for AC_PATH_PROG
xdg-user-dirs
wrapGAppsHook3
];
buildInputs = [ gtk3 ];
postPatch = ''
# Fetch translations from correct localedir.
# Fetch “xdg-user-dirs” translations from correct localedir.
substituteInPlace update.c --replace-fail \
'bindtextdomain ("xdg-user-dirs", GLIBLOCALEDIR);' \
'bindtextdomain ("xdg-user-dirs", "${xdg-user-dirs}/share/locale");'
patchShebangs meson_custom_install_desktop_file.sh
'';
preFixup = ''
@ -57,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
meta = {
homepage = "https://gitlab.gnome.org/GNOME/xdg-user-dirs-gtk";
description = "Companion to xdg-user-dirs that integrates it into the GNOME desktop and GTK applications";
license = lib.licenses.gpl2Only;
license = lib.licenses.gpl2Plus;
maintainers = lib.teams.gnome.members;
platforms = lib.platforms.unix;
mainProgram = "xdg-user-dirs-gtk-update";