aboutsummaryrefslogtreecommitdiffstats
path: root/games/uhexen
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2005-05-04 15:49:29 +0800
committerdanfe <danfe@FreeBSD.org>2005-05-04 15:49:29 +0800
commit0dbae531d17ccedfb5f6eda1cb5aa6c3ad2c9624 (patch)
tree7195cbd0d29a6cc29d68e999d910d5746cd625a6 /games/uhexen
parentbeab9b30a10d06961cea957cb236cff14d6e2e95 (diff)
downloadfreebsd-ports-gnome-0dbae531d17ccedfb5f6eda1cb5aa6c3ad2c9624.tar.gz
freebsd-ports-gnome-0dbae531d17ccedfb5f6eda1cb5aa6c3ad2c9624.tar.zst
freebsd-ports-gnome-0dbae531d17ccedfb5f6eda1cb5aa6c3ad2c9624.zip
- WITH_NOWAD -> not WITH_WAD as this is preferred scheme
- Add a patch that adds the `-nograb' command line option which disables the input grabbing done by SDL when run in windowed mode [1] - Add dependency on `audio/timidity' so in-game music works again - Bump PORTREVISION Obtained from: http://roman.mainer.de/uhexen/
Diffstat (limited to 'games/uhexen')
-rw-r--r--games/uhexen/Makefile15
-rw-r--r--games/uhexen/files/patch-src::i_sdlvideo.c43
2 files changed, 53 insertions, 5 deletions
diff --git a/games/uhexen/Makefile b/games/uhexen/Makefile
index 28eb6c89a9ab..ec189df9bb4d 100644
--- a/games/uhexen/Makefile
+++ b/games/uhexen/Makefile
@@ -7,7 +7,7 @@
PORTNAME= uhexen
PORTVERSION= 0.601
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= games
MASTER_SITES= http://uhexen.sourceforge.net/
DISTNAME= ${PORTNAME}-latest
@@ -19,11 +19,12 @@ USE_SDL= mixer sdl
USE_X_PREFIX= yes
USE_GMAKE= yes
-OPTIONS= NOWAD "Do not install demo-version WAD file" off
+OPTIONS= WAD "Install demo-version WAD file" on \
+ MUSIC "Enable support for in-game music" on
.include <bsd.port.pre.mk>
-.if !defined(WITH_NOWAD)
+.if defined(WITH_WAD)
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} hexen.zip
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
EXTRACT_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
@@ -32,13 +33,17 @@ PLIST_SUB= WAD=""
PLIST_SUB= WAD="@comment "
.endif
+.if defined(WITH_MUSIC)
+RUN_DEPENDS+= ${LOCALBASE}/lib/timidity/goemon.cfg:${PORTSDIR}/audio/timidity
+.endif
+
PLIST_FILES= bin/uhexen %%DATADIR%%/.keep_me %%WAD%%%%DATADIR%%/hexen.wad
PLIST_DIRS= %%DATADIR%%
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
post-extract:
-.if !defined(WITH_NOWAD)
+.if defined(WITH_WAD)
@${LOCALBASE}/bin/unzip -qo ${_DISTDIR}/hexen.zip \
-d ${WRKSRC}
.endif
@@ -46,7 +51,7 @@ post-extract:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/uhexen ${PREFIX}/bin
@${MKDIR} ${DATADIR}
-.if !defined(WITH_NOWAD)
+.if defined(WITH_WAD)
${INSTALL_DATA} ${WRKSRC}/hexen.wad ${DATADIR}
.endif
@${TOUCH} ${DATADIR}/.keep_me
diff --git a/games/uhexen/files/patch-src::i_sdlvideo.c b/games/uhexen/files/patch-src::i_sdlvideo.c
new file mode 100644
index 000000000000..4451b30fc4f2
--- /dev/null
+++ b/games/uhexen/files/patch-src::i_sdlvideo.c
@@ -0,0 +1,43 @@
+--- src/i_sdlvideo.c.orig Tue Dec 4 17:08:44 2001
++++ src/i_sdlvideo.c Tue Sep 21 22:27:07 2004
+@@ -32,6 +32,7 @@
+
+ int mouse_scale_factor;
+ int save_buttons;
++int grab_input;
+
+ extern int usemouse;
+
+@@ -460,7 +461,13 @@
+ success:
+ if (WMAvailable) {
+ SDL_WM_SetCaption("U-Hexen 0.6",NULL);
+- SDL_WM_GrabInput(SDL_GRAB_ON);
++ if(M_CheckParm("-nograb")) {
++ grab_input = 0;
++ }
++ else {
++ grab_input = 1;
++ SDL_WM_GrabInput(SDL_GRAB_ON);
++ }
+ }
+ SDL_WarpMouse(SDLWidth/2,SDLHeight/2);
+ SDL_ShowCursor(SDL_DISABLE);
+@@ -470,7 +477,7 @@
+ void VSDL_ShutdownGraphics(void)
+ {
+ if (WMAvailable) {
+- SDL_WM_GrabInput(SDL_GRAB_OFF);
++ if(grab_input == 1) SDL_WM_GrabInput(SDL_GRAB_OFF);
+ }
+ }
+
+@@ -599,7 +606,7 @@
+ if (Event.motion.x==SDLWidth/2 && Event.motion.y==SDLHeight/2) break;
+ if ((event.data2=(Event.motion.xrel)*mouse_scale_factor) ||
+ (event.data3=(-Event.motion.yrel)*mouse_scale_factor)) {
+- SDL_WarpMouse(SDLWidth/2,SDLHeight/2);
++ if(grab_input == 1) SDL_WarpMouse(SDLWidth/2,SDLHeight/2);
+ event.type=ev_mouse;
+ H2_PostEvent(&event);
+ }