aboutsummaryrefslogtreecommitdiff
path: root/games/xtux
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2003-05-15 19:47:55 +0000
committerEric Anholt <anholt@FreeBSD.org>2003-05-15 19:47:55 +0000
commit9dd3782cc9a4149d426510fd63ba3033729aea27 (patch)
tree0f1e88c7be05f3552b6acdd2a79ef5a8fa06f166 /games/xtux
parentc652592b580ad767b5ad4caf7dfa948c63fb4edf (diff)
downloadports-9dd3782cc9a4149d426510fd63ba3033729aea27.tar.gz
ports-9dd3782cc9a4149d426510fd63ba3033729aea27.zip
Notes
Diffstat (limited to 'games/xtux')
-rw-r--r--games/xtux/Makefile52
-rw-r--r--games/xtux/files/patch-aa50
-rw-r--r--games/xtux/files/patch-ac9
-rw-r--r--games/xtux/files/patch-ad12
-rw-r--r--games/xtux/files/patch-ae11
-rw-r--r--games/xtux/files/patch-af7
6 files changed, 79 insertions, 62 deletions
diff --git a/games/xtux/Makefile b/games/xtux/Makefile
index ecef2207fcc3..2e627eae4a74 100644
--- a/games/xtux/Makefile
+++ b/games/xtux/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xtux
PORTVERSION= 2003.03.06
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -15,42 +16,51 @@ DISTNAME= ${PORTNAME}-src-${PORTVERSION:S/.//g}
MAINTAINER= ports@FreeBSD.org
COMMENT= Humorous Arcade game for X
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
USE_X_PREFIX= yes
-USE_GMAKE= yes
USE_XPM= yes
-CFLAGS+= -DDATADIR=\\\"${PREFIX}/share/xtux\\\"
-WRKSRC= ${WRKDIR}/xtux
+USE_REINPLACE= yes
+USE_GMAKE= yes
+MAKE_ENV= CPP="${CC} -E"
+
+CFLAGS+= -DDATADIR=\\\"${DATADIR}\\\"
+
+post-patch:
+ @${FIND} ${WRKSRC}/src -name "Makefile" | ${XARGS} ${REINPLACE_CMD} -e \
+ 's|^CC|#CC|g ; \
+ s|^CFLAGS|#CFLAGS|g ; \
+ s|^CPP|#CPP|g ; \
+ s|^MAKE|#MAKE|g ; \
+ s|/usr/X11R6|$${X11BASE}|g'
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xtux ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/tux_serv ${PREFIX}/bin
- @strip ${PREFIX}/bin/xtux ${PREFIX}/bin/tux_serv
- @${MKDIR} ${PREFIX}/share/xtux/demos
- @${MKDIR} ${PREFIX}/share/xtux/images/entities
- @${MKDIR} ${PREFIX}/share/xtux/images/events
- @${MKDIR} ${PREFIX}/share/xtux/images/items
- @${MKDIR} ${PREFIX}/share/xtux/images/weapons
- @${MKDIR} ${PREFIX}/share/xtux/images/tiles
- @${MKDIR} ${PREFIX}/share/xtux/maps
+ @${MKDIR} ${DATADIR}/demos
+ @${MKDIR} ${DATADIR}/images/entities
+ @${MKDIR} ${DATADIR}/images/events
+ @${MKDIR} ${DATADIR}/images/items
+ @${MKDIR} ${DATADIR}/images/weapons
+ @${MKDIR} ${DATADIR}/images/tiles
+ @${MKDIR} ${DATADIR}/maps
- ${INSTALL_DATA} ${WRKSRC}/data/*.table ${PREFIX}/share/xtux
+ ${INSTALL_DATA} ${WRKSRC}/data/*.table ${DATADIR}
.for file in ascii.txt bios entities weapons
- ${INSTALL_DATA} ${WRKSRC}/data/${file} ${PREFIX}/share/xtux
+ ${INSTALL_DATA} ${WRKSRC}/data/${file} ${DATADIR}
.endfor
.for dir in entities events items weapons tiles .
${INSTALL_DATA} ${WRKSRC}/data/images/${dir}/*.xpm \
- ${PREFIX}/share/xtux/images/${dir}
+ ${DATADIR}/images/${dir}
.endfor
- ${INSTALL_DATA} ${WRKSRC}/data/demos/*.xtdem \
- ${PREFIX}/share/xtux/demos
- ${INSTALL_DATA} ${WRKSRC}/data/maps/*.map \
- ${PREFIX}/share/xtux/maps
+ ${INSTALL_DATA} ${WRKSRC}/data/demos/*.xtdem ${DATADIR}/demos
+ ${INSTALL_DATA} ${WRKSRC}/data/maps/*.map ${DATADIR}/maps
.if !defined(NOPORTDOCS)
- @${MKDIR} ${PREFIX}/share/doc/xtux
- ${INSTALL_DATA} ${WRKSRC}/doc/* ${PREFIX}/share/doc/xtux
- ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/xtux
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif
.include <bsd.port.mk>
diff --git a/games/xtux/files/patch-aa b/games/xtux/files/patch-aa
index c06b409340eb..ccf272f92490 100644
--- a/games/xtux/files/patch-aa
+++ b/games/xtux/files/patch-aa
@@ -1,5 +1,5 @@
---- Makefile.orig Sun Nov 19 12:52:12 2000
-+++ Makefile Tue Feb 6 09:35:36 2001
+--- Makefile.orig Wed Feb 5 00:59:01 2003
++++ Makefile Thu May 15 19:59:20 2003
@@ -5,7 +5,7 @@
#============================================================#
@@ -9,11 +9,49 @@
#Eg you might want to put the data files here......
#DATADIR = /usr/share/games/xtux
-@@ -14,7 +14,7 @@
- SV_SRC_DIR = src/server
+@@ -15,36 +15,36 @@
CL_SRC_DIR = src/client
+ GZ_SRC_DIR = src/ggz
-MAKE = @make -C
-+MAKE = @gmake -C
++#MAKE = @make -C
+
+ all: common ggz client server
+
+ clean:
+- $(MAKE) $(CM_SRC_DIR) clean
+- $(MAKE) $(SV_SRC_DIR) clean
+- $(MAKE) $(CL_SRC_DIR) clean
+- $(MAKE) $(GZ_SRC_DIR) clean
++ $(MAKE) -C $(CM_SRC_DIR) clean
++ $(MAKE) -C $(SV_SRC_DIR) clean
++ $(MAKE) -C $(CL_SRC_DIR) clean
++ $(MAKE) -C $(GZ_SRC_DIR) clean
+
+ common:
+ @echo
+ @echo " ************* Building COMMON lib *************"
+ @echo
+- $(MAKE) $(CM_SRC_DIR) $(MFLAGS)
++ $(MAKE) -C $(CM_SRC_DIR) $(MFLAGS)
+ server:
+ @echo
+ @echo " ************* Building SERVER *************"
+ @echo
+- $(MAKE) $(SV_SRC_DIR) $(MFLAGS)
++ $(MAKE) -C $(SV_SRC_DIR) $(MFLAGS)
+
+ client:
+ @echo
+ @echo " ************* Building CLIENT *************"
+ @echo
+- $(MAKE) $(CL_SRC_DIR) $(MFLAGS)
++ $(MAKE) -C $(CL_SRC_DIR) $(MFLAGS)
+
+ ggz:
+ @echo
+ @echo " ************* Building GGZ *************"
+ @echo
+- $(MAKE) $(GZ_SRC_DIR) $(MFLAGS)
++ $(MAKE) -C $(GZ_SRC_DIR) $(MFLAGS)
- all: common client server
diff --git a/games/xtux/files/patch-ac b/games/xtux/files/patch-ac
deleted file mode 100644
index c8d2079ff050..000000000000
--- a/games/xtux/files/patch-ac
+++ /dev/null
@@ -1,9 +0,0 @@
---- src/common/Makefile.orig Sun Feb 4 11:57:32 2001
-+++ src/common/Makefile Tue Feb 6 09:42:15 2001
-@@ -1,7 +1,6 @@
- # Makefile for stuff that's common between server & client.
-
- CC = gcc
--CFLAGS = -g -Wall -O2 -DDATADIR=\"$(DATADIR)\"
- AR = ar
- RANLIB = ranlib
diff --git a/games/xtux/files/patch-ad b/games/xtux/files/patch-ad
deleted file mode 100644
index d3905d579de9..000000000000
--- a/games/xtux/files/patch-ad
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/client/Makefile.orig Sun Nov 19 12:53:00 2000
-+++ src/client/Makefile Sat Dec 23 07:53:09 2000
-@@ -20,9 +20,6 @@
- # Where to put the XTux client binary.
- BINARY = $(TOPLEVEL_PATH)/xtux
-
--# Flags used when compiling
--CFLAGS = -g -Wall -O2 -DDATADIR=\"$(DATADIR)\"
--
- # Paths to header files
- X11_INC = -I$(X11_PATH)/include
- COMMON_INC = -I$(COMMON_PATH)
diff --git a/games/xtux/files/patch-ae b/games/xtux/files/patch-ae
deleted file mode 100644
index 0fa151df6d66..000000000000
--- a/games/xtux/files/patch-ae
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/server/Makefile.orig Sun Nov 19 12:51:56 2000
-+++ src/server/Makefile Sat Dec 23 07:53:27 2000
-@@ -16,9 +16,6 @@
- # Where to put the XTux client binary.
- BINARY = $(TOPLEVEL_PATH)/tux_serv
-
--# Flags used when compiling
--CFLAGS = -g -Wall -O2 -DDATADIR=\"$(DATADIR)\"
--
- # Paths to header files
- COMMON_INC = -I$(COMMON_PATH)
diff --git a/games/xtux/files/patch-af b/games/xtux/files/patch-af
index 422a5c3738dd..43177909f8ed 100644
--- a/games/xtux/files/patch-af
+++ b/games/xtux/files/patch-af
@@ -1,8 +1,9 @@
---- src/common/timing.c.orig Fri May 9 15:21:25 2003
-+++ src/common/timing.c Fri May 9 15:35:10 2003
-@@ -1,6 +1,11 @@
+--- src/common/timing.c.orig Mon Feb 17 12:10:07 2003
++++ src/common/timing.c Thu May 15 20:03:11 2003
+@@ -1,6 +1,12 @@
#include <sys/time.h>
#include <unistd.h>
++#include <sys/param.h>
+#if __FreeBSD_version >= 500000
#include <stdint.h>
+#else