aboutsummaryrefslogtreecommitdiff
path: root/games/heretic
diff options
context:
space:
mode:
authorOliver Lehmann <oliver@FreeBSD.org>2006-12-31 10:59:27 +0000
committerOliver Lehmann <oliver@FreeBSD.org>2006-12-31 10:59:27 +0000
commitc433050bc5e3cad377943336fb2d64d308b145e3 (patch)
tree14f289b70f9696f30a39a13709fac7981b325449 /games/heretic
parentb619d79db190982d7b3b11b3e29492502372ab72 (diff)
downloadports-c433050bc5e3cad377943336fb2d64d308b145e3.tar.gz
ports-c433050bc5e3cad377943336fb2d64d308b145e3.zip
fix for amd64 (compiled, but segfaulted)
fix build with FASTX11 OPTIONify bump PORTREVISION
Notes
Notes: svn path=/head/; revision=181127
Diffstat (limited to 'games/heretic')
-rw-r--r--games/heretic/Makefile39
-rw-r--r--games/heretic/files/patch-graphics-i_x11_fast.c16
-rw-r--r--games/heretic/files/patch-r_things.c11
3 files changed, 48 insertions, 18 deletions
diff --git a/games/heretic/Makefile b/games/heretic/Makefile
index 352b557a646d..a91b6f871ca4 100644
--- a/games/heretic/Makefile
+++ b/games/heretic/Makefile
@@ -7,15 +7,11 @@
PORTNAME= heretic
PORTVERSION= 1.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= games
MASTER_SITES= http://heretic.linuxgames.com/heretic/src/:source \
http://heretic.linuxgames.com/wad/:wad
DISTNAME= gl${PORTNAME}-${PORTVERSION}
-.if !defined(WITHOUT_WAD)
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:source heretic_share.wad.gz:wad
-EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
-.endif
MAINTAINER= oliver@FreeBSD.org
COMMENT= Unix source-port of the famous Heretic game by id Software
@@ -24,8 +20,22 @@ USE_X_PREFIX= yes
USE_GMAKE= yes
MAKE_ENV= PTHREAD_LIBS=${PTHREAD_LIBS}
+OPTIONS= X11 "Use X11" on \
+ FASTX11 "Use FastX11" off \
+ SDL "Use SDL" off \
+ WAD "With shareware WAD" on
+
+.include <bsd.port.pre.mk>
+
+.if (defined(WITH_X11) && (defined(WITH_FASTX11) || defined(WITH_SDL))) || \
+ (defined(WITH_FASTX11) && (defined(WITH_X11) || defined(WITH_SDL)))
+IGNORE= you must only define X11, xor FASTX11, xor SDL
+.endif
+
+.if defined(WITH_X11)
ALL_TARGET= x11
BINARY= xheretic
+.endif
.if defined(WITH_FASTX11)
ALL_TARGET= fastx11
@@ -39,21 +49,14 @@ BINARY= sdlheretic
CFLAGS+= `${SDL_CONFIG} --cflags`
.endif
-.if defined(WITHOUT_WAD)
-PLIST_SUB= WAD:="@comment "
-.else
+.if defined(WITH_WAD)
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:source heretic_share.wad.gz:wad
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
PLIST_SUB= WAD:=""
+.else
+PLIST_SUB= WAD:="@comment "
.endif
-pre-everything::
- @${ECHO} ""
- @${ECHO} "You may use the following build options:"
- @${ECHO} ""
- @${ECHO} " WITH_FASTX11=yes Use FastX11 support"
- @${ECHO} " WITH_SDL=yes Use SDL."
- @${ECHO} " WITHOUT_WAD=yes Don't install the wad file."
- @${ECHO} ""
-
post-extract:
.if !defined(WITHOUT_WAD)
@${GZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/heretic_share.wad.gz \
@@ -73,4 +76,4 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/doc/* ${PREFIX}/share/doc/heretic
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/games/heretic/files/patch-graphics-i_x11_fast.c b/games/heretic/files/patch-graphics-i_x11_fast.c
new file mode 100644
index 000000000000..4d4fcc7d7178
--- /dev/null
+++ b/games/heretic/files/patch-graphics-i_x11_fast.c
@@ -0,0 +1,16 @@
+--- graphics/i_x11_fast.c.orig Fri Dec 29 20:03:37 2006
++++ graphics/i_x11_fast.c Fri Dec 29 20:03:59 2006
+@@ -201,13 +201,9 @@
+ /* This is an ugly PC-ism. Better switch to XLookupKeysym() ? */
+ case XK_KP_Insert: rc = '0'; break;
+ case XK_KP_End: rc = '1'; break;
+- case XK_KP_Down: rc = '2'; break;
+ case XK_KP_Page_Down: rc = '3'; break;
+- case XK_KP_Left: rc = '4'; break;
+ case XK_KP_Begin: rc = '5'; break;
+- case XK_KP_Right: rc = '6'; break;
+ case XK_KP_Home: rc = '7'; break;
+- case XK_KP_Up: rc = '8'; break;
+ case XK_KP_Page_Up: rc = '9'; break;
+
+ case XK_Shift_L:
diff --git a/games/heretic/files/patch-r_things.c b/games/heretic/files/patch-r_things.c
new file mode 100644
index 000000000000..32d15a2484cb
--- /dev/null
+++ b/games/heretic/files/patch-r_things.c
@@ -0,0 +1,11 @@
+--- r_things.c.orig Thu Jan 27 00:49:35 2000
++++ r_things.c Fri Dec 29 20:57:02 2006
+@@ -144,7 +144,7 @@
+ while (*check != NULL)
+ check++;
+
+- numsprites = check-namelist;
++ numsprites = 128;
+
+ if (!numsprites)
+ return;