summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/tuxpaint-stamps-path.patch
diff options
context:
space:
mode:
authorEric Bavier <bavier@member.fsf.org>2016-07-08 20:13:58 -0500
committerEric Bavier <bavier@member.fsf.org>2016-07-29 21:50:15 -0500
commit9b1ada4e818cfb6ab467ee9167188ffc46dda289 (patch)
tree0e8b5df3b7e6139d3b9ab5ac626b904bd0e1d1e7 /gnu/packages/patches/tuxpaint-stamps-path.patch
parent23319ed674ae4218c70749a206b329069dd2197c (diff)
gnu: Add Tux Paint.
* gnu/packages/games.scm (tuxpaint): New variable. * gnu/packages/patches/tuxpaint-stamps-path.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu/packages/patches/tuxpaint-stamps-path.patch')
-rw-r--r--gnu/packages/patches/tuxpaint-stamps-path.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/packages/patches/tuxpaint-stamps-path.patch b/gnu/packages/patches/tuxpaint-stamps-path.patch
new file mode 100644
index 0000000000..599a33c458
--- /dev/null
+++ b/gnu/packages/patches/tuxpaint-stamps-path.patch
@@ -0,0 +1,24 @@
+--- tuxpaint-0.9.22/src/tuxpaint.c
++++ tuxpaint-0.9.22/src/tuxpaint.c
+@@ -7474,11 +7474,21 @@
+ 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);
+ 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, ":");
++ }
++ }
+ #ifdef __APPLE__
+ load_stamp_dir(screen, "/Library/Application Support/TuxPaint/stamps");
+ #endif