3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00
guix/gnu/packages/patches/tuxpaint-stamps-path.patch
Eric Bavier 9b1ada4e81
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.
2016-07-29 21:50:15 -05:00

24 lines
745 B
Diff

--- 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