1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-12 01:50:46 +02:00
guix/gnu/packages/patches/tuxpaint-stamps-path.patch
Eric Bavier 58573ce258
gnu: Update tuxpaint.
And related packages tuxpaint-stamps and tuxpaint-config.

* gnu/packages/games.scm (tuxpaint): Update to 0.9.34.
[native-inputs]: Add imagemagick.
[inputs]: Add libimagequant and pango.  Use SDL2.
[arguments]: Use gexps.
[home-page]: Replace with redirection.
(tuxpaint-stamps): Update to 2024.10.25.  Use copy-build-system.
(tuxpaint-config): Update to 0.0.25.
[native-inputs]: Add pkg-config.
[inputs]: Add libunibreak and pango.
* gnu/packages/patches/tuxpaint-stamps-path.patch: Adapt to latest source.

Change-Id: I815b4982226bc6533c45074869d6bac1d0b4fbf9
Signed-off-by: Andreas Enge <andreas@enge.fr>
2025-06-15 20:37:38 +02:00

28 lines
885 B
Diff

This patch allows tuxpaint to load stamps from multiple sources, and allows
Guix's packages to remain loosely coupled.
--- tuxpaint-0.9.34/src/tuxpaint.c
+++ tuxpaint-0.9.34/src/tuxpaint.c
@@ -9426,12 +9426,22 @@
static void load_stamps(SDL_Surface *screen)
{
char *homedirdir = get_fname("stamps", DIR_DATA);
+ char *stamps_path = getenv("TUXPAINT_STAMPS_PATH");
default_stamp_size = compute_default_scale_factor(1.0);
load_stamp_dir(screen, homedirdir);
#ifndef __ANDROID__
load_stamp_dir(screen, DATA_PREFIX "stamps");
+ /* Load any stamps in TUXPAINT_STAMPS_PATH */
+ if (stamps_path) {
+ char *token;
+ token = strtok(stamps_path, ":");
+ while (token != NULL) {
+ load_stamp_dir(screen, token);
+ token = strtok(NULL, ":");
+ }
+ }
#else
load_stamp_dir(screen, "stamps/animals");
load_stamp_dir(screen, "stamps/cartoon/tux");