shithub: choc

Download patch

ref: 293b22549c00c996f3c88e00365c78a4ad980b64
parent: 8b6cfbfc6c934923b3c2c16e5e7e5a74d5d238e1
author: William Breathitt Gray <vilhelm.gray@gmail.com>
date: Thu Jun 25 08:59:45 EDT 2020

Add support for /usr/share/doom IWAD search path (#1297)

* Add support for /usr/share/doom IWAD search path

Some Linux distros such as Gentoo have deprecated the /usr/share/games
directory. IWADs are typically installed under the /usr/share directory
for these distros.

* Update documentation about /usr/share/doom IWAD location

--- a/man/INSTALL.template
+++ b/man/INSTALL.template
@@ -199,7 +199,9 @@
  * Put the file into one of the following directories:
 
      $HOME/.local/share/games/doom
+     /usr/share/doom
      /usr/share/games/doom
+     /usr/local/share/doom
      /usr/local/share/games/doom
 
  * Set the environment variable DOOMWADDIR to specify the path to a
--- a/man/iwad_paths.man
+++ b/man/iwad_paths.man
@@ -35,7 +35,8 @@
 using the \fBXDG_DATA_HOME\fR environment variable (see the XDG Base Directory
 Specification).
 .TP
-\fB/usr/local/share/games/doom, /usr/share/games/doom\fR
+\fB/usr/local/share/doom, /usr/local/share/games/doom, /usr/share/doom,
+/usr/share/games/doom\fR
 System-wide locations that can be accessed by all users. The path
 \fB/usr/share/games/doom\fR is a standard path that is supported by most
 Doom source ports. These paths can be overridden using the \fBXDG_DATA_DIRS\fR
--- a/src/d_iwad.c
+++ b/src/d_iwad.c
@@ -657,6 +657,7 @@
     // source ports is /usr/share/games/doom - we support this through the
     // XDG_DATA_DIRS mechanism, through which it can be overridden.
     AddIWADPath(env, "/games/doom");
+    AddIWADPath(env, "/doom");
 
     // The convention set by RBDOOM-3-BFG is to install Doom 3: BFG
     // Edition into this directory, under which includes the Doom