summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/gzdoom-search-in-installed-share.patch
diff options
context:
space:
mode:
authorMarius Bakke <[email protected]>2018-02-20 17:36:56 +0100
committerMarius Bakke <[email protected]>2018-02-20 17:36:56 +0100
commit7f69459aca16756f35f08049c64a1bd77d23f33e (patch)
tree1d267fb62feab89de5d97582672540cbaa37392c /gnu/packages/patches/gzdoom-search-in-installed-share.patch
parent4a82722a658220ec1e10f9f2d5d77407d38db90e (diff)
parentb1989c12501e880afab62d3ff961791906fef350 (diff)
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches/gzdoom-search-in-installed-share.patch')
-rw-r--r--gnu/packages/patches/gzdoom-search-in-installed-share.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/gnu/packages/patches/gzdoom-search-in-installed-share.patch b/gnu/packages/patches/gzdoom-search-in-installed-share.patch
new file mode 100644
index 0000000000..f312686566
--- /dev/null
+++ b/gnu/packages/patches/gzdoom-search-in-installed-share.patch
@@ -0,0 +1,23 @@
+Lookup gzdoom pk3 files in the installed directory in
+addition to the path that is stored in ~/.config/gzdoom/.
+
+Simply replacing the hardcoded /usr/share would leave the
+configfile pointing to outdated guix builds, which could get
+garbage collected and break the gzdoom installation.
+This ensures that the files installed with the corresponding
+build will be used.
+
+--- /src/d_main.cpp 2018-01-16 22:13:09.700602781 +0200
++++ /src/d_main.cpp 2018-01-16 22:22:36.560617961 +0200
+@@ -1716,6 +1716,11 @@
+ return wad;
+ }
+
++ mysnprintf (wad, countof(wad), "%s/%s", GUIX_OUT_PK3, file);
++ if (DirEntryExists (wad)) {
++ return wad;
++ }
++
+ if (GameConfig != NULL && GameConfig->SetSection ("FileSearch.Directories"))
+ {
+ const char *key;