libmypaint: fix build (#424557)

`dev` output unchanged (verified by `diffoscope`).

`out` output still contains all the translation files,
with no obvious encoding issues i spotted. Slight
deviations in the metadata, but should be fine.

Fixing the build with modern gettext requires replacing the obsolete glib gettext.
Fixing the build with modern autoconf requires making IT_PROG_INTLTOOL
unconditional, hence the indent changes in the patch.

authored by Grimmauld and committed by GitHub 30737ada 8287b291

+47 -5
+37
pkgs/by-name/li/libmypaint/0001-configure-use-regular-GETTEXT-unconditionally.patch
···
··· 1 + From dd663ee7bf6a2ff7dd47fc360ac7cd44c83039d0 Mon Sep 17 00:00:00 2001 2 + From: Grimmauld <Grimmauld@grimmauld.de> 3 + Date: Sat, 12 Jul 2025 12:46:58 +0200 4 + Subject: [PATCH] configure: use regular GETTEXT unconditionally 5 + 6 + Modern autoconf breaks when `IT_PROG_INTLTOOL` is conditional [1]. 7 + 8 + `glib` gettext is obsolete and broken, so switch to regular gettext instead. 9 + This also needs to be unconditional. 10 + 11 + To achieve unconditional directives, indentation needs to be removed 12 + as indentation is part of the syntax. 13 + 14 + [1] https://github.com/mypaint/libmypaint/issues/178 15 + --- 16 + configure.ac | 5 +++-- 17 + 1 file changed, 3 insertions(+), 2 deletions(-) 18 + 19 + diff --git a/configure.ac b/configure.ac 20 + index 416d9fe..9479db9 100644 21 + --- a/configure.ac 22 + +++ b/configure.ac 23 + @@ -248,8 +248,9 @@ if test "x$enable_i18n" != "xno"; then 24 + AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", 25 + [The prefix for our gettext translation domains.]) 26 + AC_SUBST(GETTEXT_PACKAGE) 27 + - IT_PROG_INTLTOOL 28 + - AM_GLIB_GNU_GETTEXT 29 + +IT_PROG_INTLTOOL 30 + +AM_GNU_GETTEXT([external]) 31 + +AM_GNU_GETTEXT_VERSION([0.21]) 32 + 33 + dnl Debian: stdlib 34 + dnl Windows, and OSX: -lintl 35 + -- 36 + 2.49.0 37 +
+10 -5
pkgs/by-name/li/libmypaint/package.nix
··· 1 { 2 lib, 3 stdenv, 4 - autoconf, 5 - automake, 6 fetchFromGitHub, 7 glib, 8 intltool, ··· 10 libtool, 11 pkg-config, 12 python3, 13 }: 14 15 stdenv.mkDerivation rec { ··· 28 sha256 = "1ppgpmnhph9h8ayx9776f79a0bxbdszfw9c6bw7c3ffy2yk40178"; 29 }; 30 31 strictDeps = true; 32 33 nativeBuildInputs = [ 34 - autoconf 35 - automake 36 - glib # AM_GLIB_GNU_GETTEXT 37 intltool 38 libtool 39 pkg-config
··· 1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 glib, 6 intltool, ··· 8 libtool, 9 pkg-config, 10 python3, 11 + gettext, 12 + autoreconfHook, 13 }: 14 15 stdenv.mkDerivation rec { ··· 28 sha256 = "1ppgpmnhph9h8ayx9776f79a0bxbdszfw9c6bw7c3ffy2yk40178"; 29 }; 30 31 + patches = [ 32 + # glib gettext macros are broken/obsolete, 33 + # so we patch libmypaint to use regular gettext instead. 34 + ./0001-configure-use-regular-GETTEXT-unconditionally.patch 35 + ]; 36 + 37 strictDeps = true; 38 39 nativeBuildInputs = [ 40 + autoreconfHook 41 + gettext 42 intltool 43 libtool 44 pkg-config