pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

woof: Add ${PREFIX}/share/doom to WAD file search path



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <michael.baeuerle%stz-e.de@localhost>
Pushed By:	micha
Date:		Tue Apr 21 12:40:18 2020 +0200
Changeset:	e73517d7dc19a806888bb5b0344c65129ad1ff3e

Modified Files:
	woof/Makefile
	woof/TODO
	woof/distinfo
Added Files:
	woof/patches/patch-Source_d__iwad.c

Log Message:
woof: Add ${PREFIX}/share/doom to WAD file search path

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e73517d7dc19a806888bb5b0344c65129ad1ff3e

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 woof/Makefile                       | 11 +++++++++++
 woof/TODO                           |  2 +-
 woof/distinfo                       |  1 +
 woof/patches/patch-Source_d__iwad.c | 16 ++++++++++++++++
 4 files changed, 29 insertions(+), 1 deletion(-)

diffs:
diff --git a/woof/Makefile b/woof/Makefile
index 9c0535e244..08b63d01a3 100644
--- a/woof/Makefile
+++ b/woof/Makefile
@@ -18,6 +18,17 @@ CMAKE_ARGS+=	-G "Unix Makefiles" ..
 CONFIGURE_DIRS=	build
 WRKSRC=		${WRKDIR}/woof-${DISTNAME}
 
+# DOOMWADDIR is intentionally shared with other Doom packages
+DOOMWADDIR=	share/doom
+
+# Add DOOMWADDIR to search path
+SUBST_CLASSES+=		waddir
+SUBST_STAGE.waddir=	pre-configure
+SUBST_MESSAGE.waddir=	Preparing d_iwad.c file ...
+SUBST_FILES.waddir=	Source/d_iwad.c
+SUBST_SED.waddir=	-e 's,PKGSRC_PREFIX,"${PREFIX}",'
+SUBST_SED.waddir+=	-e 's,PKGSRC_DOOMWADDIR,"/${DOOMWADDIR}",'
+
 pre-configure:
 		cd ${WRKSRC}; mkdir build
 
diff --git a/woof/TODO b/woof/TODO
index 47d37020f3..0b38900aa7 100644
--- a/woof/TODO
+++ b/woof/TODO
@@ -1 +1 @@
-[ ] Add ${PREFIX}/share/doom directory to search list
+[X] Add ${PREFIX}/share/doom directory to search list
diff --git a/woof/distinfo b/woof/distinfo
index 7a6e4b875d..ea6b521c6f 100644
--- a/woof/distinfo
+++ b/woof/distinfo
@@ -4,3 +4,4 @@ SHA1 (woof_1.2.0.tar.gz) = 3680a312ed80f2229d59e94a49b7b13cd72aaaea
 RMD160 (woof_1.2.0.tar.gz) = 92a74545a0e5e7c5272783450a678e347a20305c
 SHA512 (woof_1.2.0.tar.gz) = 9672f6d2326eea8cc0027583489ad4cb817105e8a6a567e51ef49b777ca900099fb0f20357e86613532c6dd85dda81c138a421f47ac3a8442658f9642e1f66ff
 Size (woof_1.2.0.tar.gz) = 1875308 bytes
+SHA1 (patch-Source_d__iwad.c) = fc897f508e31653495bfed26152a7e6d70021089
diff --git a/woof/patches/patch-Source_d__iwad.c b/woof/patches/patch-Source_d__iwad.c
new file mode 100644
index 0000000000..5beeb3c71b
--- /dev/null
+++ b/woof/patches/patch-Source_d__iwad.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Add pkgsrc ${PREFIX}/share/doom to WAD file search path.
+
+--- Source/d_iwad.c.orig	2020-04-14 06:39:44.000000000 +0000
++++ Source/d_iwad.c
+@@ -442,6 +442,9 @@ static void AddXdgDirs(void)
+         env = "/usr/local/share:/usr/share";
+     }
+ 
++    // Add pkgsrc location for WADs
++    AddIWADPath(PKGSRC_PREFIX, PKGSRC_DOOMWADDIR);
++
+     // The "standard" location for IWADs on Unix that is supported by most
+     // source ports is /usr/share/games/doom - we support this through the
+     // XDG_DATA_DIRS mechanism, through which it can be overridden.


Home | Main Index | Thread Index | Old Index