aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2012-11-22 19:20:33 +0800
committerdanfe <danfe@FreeBSD.org>2012-11-22 19:20:33 +0800
commit86a1495116079f423fdec3fe2c967c730f791aca (patch)
treec2ccaac933b95743d207a4e7f4e3b534aeb92806
parent8690f4062a9f52195856a42e5a65b489efa93766 (diff)
downloadfreebsd-ports-gnome-86a1495116079f423fdec3fe2c967c730f791aca.tar.gz
freebsd-ports-gnome-86a1495116079f423fdec3fe2c967c730f791aca.tar.zst
freebsd-ports-gnome-86a1495116079f423fdec3fe2c967c730f791aca.zip
- Do not require absolute paths for 3rd-party IWADs: search DOOMWADDIR only
if specified file name does not contain any slashes (that is, now there is a difference between `-iwad plutonia.wad' and `-iwad ./plutonia.wad') - Utilize per-architecture feature of new OPTIONS framework Feature safe: yes
-rw-r--r--games/doomlegacy/Makefile18
1 files changed, 7 insertions, 11 deletions
diff --git a/games/doomlegacy/Makefile b/games/doomlegacy/Makefile
index 5e7573dab248..093ddc67b068 100644
--- a/games/doomlegacy/Makefile
+++ b/games/doomlegacy/Makefile
@@ -31,13 +31,8 @@ PORTDOCS= *
SVN_REV= 845
OPTIONS_DEFINE= DOCS
-
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "i386"
-OPTIONS_DEFINE+= ASM
-OPTIONS_DEFAULT= ASM
-.endif
+OPTIONS_DEFINE_i386= ASM
+OPTIONS_DEFAULT_i386= ASM
.include <bsd.port.options.mk>
@@ -57,9 +52,10 @@ post-patch: .SILENT
${WRKSRC}/z_zone.c
# Adjust config and save games directory name to be less ambiguous
${REINPLACE_CMD} -e 's|\.legacy|.${PORTNAME}|' ${WRKSRC}/doomdef.h
-# Change default value of DOOMWADDIR
- ${REINPLACE_CMD} -e 's,\(doomwaddir = \)"\.",\1"${DMDIR}", ; \
- 1306,1309d' ${WRKSRC}/d_main.c
+# Change default value of DOOMWADDIR; better support for relative paths
+ ${REINPLACE_CMD} -e 's|\(doomwaddir = \)"\."|\1"${DMDIR}"| ; \
+ 1306,1309d' -e "s|s\[0\] ==[^)]*|strchr(s, '/')|" \
+ ${WRKSRC}/d_main.c
# Remove broken dependency file (wrong paths inside) and a copy of GPL
${RM} ${WRKSRC}/sdl.dep ; ${TOUCH} ${WRKSRC}/sdl.dep
${RM} ${WRKSRC}/_doc/LICENSE.txt
@@ -73,4 +69,4 @@ do-install:
.endif
.include "${.CURDIR}/../doom-data/Makefile.include"
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>