aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2008-02-05 16:42:35 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2008-02-05 16:42:35 +0000
commit08632f5ca546203897da17ec36c2032374c48e19 (patch)
tree91732ee33d9f63ef5b4a305735dc64f2b252ce8f /games
parentda050fcef67aaa4508c0fbce025a5eef6b3e96c0 (diff)
downloadports-08632f5ca546203897da17ec36c2032374c48e19.tar.gz
ports-08632f5ca546203897da17ec36c2032374c48e19.zip
Notes
Diffstat (limited to 'games')
-rw-r--r--games/odamex/Makefile24
-rw-r--r--games/odamex/files/patch-Makefile56
-rw-r--r--games/odamex/files/patch-odalaunch__Makefile18
-rw-r--r--games/odamex/pkg-plist1
4 files changed, 95 insertions, 4 deletions
diff --git a/games/odamex/Makefile b/games/odamex/Makefile
index 511468386149..d61afaad1b4c 100644
--- a/games/odamex/Makefile
+++ b/games/odamex/Makefile
@@ -18,17 +18,33 @@ USE_BZIP2= yes
USE_GMAKE= yes
USE_SDL= sdl mixer
+OPTIONS= LAUNCHER "Enable GUI launcher program" off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_LAUNCHER)
+USE_WX= 2.6+
+MAKE_ENV+= WXRC_CMD="${WXRC_CMD}" WITH_LAUNCHER=yes
+PLIST_SUB+= LAUNCHER=""
+.else
+PLIST_SUB+= LAUNCHER="@comment "
+.endif
+
post-patch:
- @${REINPLACE_CMD} -e 's|g++|${CXX}|; s|-DUNIX|${CFLAGS} &|; \
- s|sdl11-config|sdl-config|; s|/usr/X11R6|${LOCALBASE}|' \
- ${WRKSRC}/${MAKEFILE}
@${REINPLACE_CMD} -e 's|%%DMDIR%%|${DMDIR}|; \
s|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/client/src/d_main.cpp
+.if defined(WITH_LAUNCHER)
+ @${REINPLACE_CMD} -e 's|\./odamex|odamex|' \
+ ${WRKSRC}/odalaunch/src/misc.cpp
+.endif
do-install:
.for f in odamaster odamex odasrv
${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin
.endfor
+.if defined(WITH_LAUNCHER)
+ ${INSTALL_PROGRAM} ${WRKSRC}/odalaunch/odalaunch ${PREFIX}/bin
+.endif
${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/odamex.wad ${DATADIR}
.if !defined(NOPORTDOCS)
@@ -38,4 +54,4 @@ do-install:
.include "${.CURDIR}/../doom-data/Makefile.include"
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/games/odamex/files/patch-Makefile b/games/odamex/files/patch-Makefile
new file mode 100644
index 000000000000..17100f4a77db
--- /dev/null
+++ b/games/odamex/files/patch-Makefile
@@ -0,0 +1,56 @@
+--- ./Makefile.orig Sun Nov 4 12:21:20 2007
++++ ./Makefile Sun Feb 3 20:48:01 2008
+@@ -3,8 +3,8 @@
+ OBJDIR = obj
+ # denis - fixme - remove mkdir -p
+ MKDIR = mkdir -p
+-CC = g++
+-LD = g++
++CC = $(CXX)
++LD = $(CC)
+ INSTALL = cp
+ DEUTEX = deutex
+
+@@ -62,7 +62,7 @@
+ DEUTEX_FLAGS = -rgb 0 255 255
+
+ # Platform and sdl-config flags
+-X11_LFLAGS = -L/usr/X11R6/lib -lX11
++X11_LFLAGS = -L$(LOCALBASE)/lib -lX11
+
+ SDL_CFLAGS_COMMAND = sdl-config --cflags
+ SDL_LFLAGS_COMMAND = sdl-config --libs
+@@ -85,8 +85,8 @@
+
+ ifeq ($(strip $(freebsd)), true)
+ ifeq ($(SDL_CFLAGS),)
+-SDL_CFLAGS_COMMAND = sdl11-config --cflags
+-SDL_LFLAGS_COMMAND = sdl11-config --libs
++SDL_CFLAGS_COMMAND = $(SDL_CONFIG) --cflags
++SDL_LFLAGS_COMMAND = $(SDL_CONFIG) --libs
+ SDL_CFLAGS = $(shell $(SDL_CFLAGS_COMMAND))
+ SDL_LFLAGS = $(shell $(SDL_LFLAGS_COMMAND)) $(X11_LFLAGS)
+ endif
+@@ -173,7 +173,7 @@
+ TARGETS = $(SERVER_TARGET) $(CLIENT_TARGET) $(MASTER_TARGET) $(WADFILE_TARGET)
+
+ # denis - fixme - cflags are quite messy, but removing these is a very delicate act, also use -Wall -Werror
+-CFLAGS = $(CFLAGS_PLATFORM) -DNOASM -Icommon -g -Wall -O2
++CFLAGS += $(CFLAGS_PLATFORM) -DNOASM -Icommon -g -Wall -O2
+ LFLAGS = $(LFLAGS_PLATFORM)
+
+ CFLAGS_RELEASE = $(CFLAGS_PLATFORM) -DNOASM -Icommon -O3
+@@ -209,7 +209,12 @@
+ # denis - end fixme
+
+ # All
+-all: $(SERVER_TARGET) $(CLIENT_TARGET) $(MASTER_TARGET) $(WADFILE_TARGET)
++all: $(SERVER_TARGET) $(CLIENT_TARGET) $(MASTER_TARGET) $(WADFILE_TARGET) launcher
++
++launcher:
++ifdef WITH_LAUNCHER
++ $(MAKE) -C odalaunch odalaunch
++endif
+
+ # Common for server
+ $(OBJDIR)/$(COMMON_DIR)/server_%.o: $(COMMON_DIR)/%.cpp $(COMMON_HEADERS) $(SERVER_HEADERS)
diff --git a/games/odamex/files/patch-odalaunch__Makefile b/games/odamex/files/patch-odalaunch__Makefile
new file mode 100644
index 000000000000..f7cc7cf8d61a
--- /dev/null
+++ b/games/odamex/files/patch-odalaunch__Makefile
@@ -0,0 +1,18 @@
+--- ./odalaunch/Makefile.orig Sun Nov 4 12:21:16 2007
++++ ./odalaunch/Makefile Sun Feb 3 20:42:50 2008
+@@ -9,11 +9,11 @@
+
+ HEADERS = src/*.h
+
+-CC = g++
+-LD = g++
++CC = $(CXX)
++LD = $(CC)
+
+-WXCONFIG = wx-config
+-WXRC = wxrc
++WXCONFIG = $(WX_CONFIG)
++WXRC = $(WXRC_CMD)
+ CFLAGS = $(shell $(WXCONFIG) --cflags) -g
+ LFLAGS = $(shell $(WXCONFIG) --libs) -g
+
diff --git a/games/odamex/pkg-plist b/games/odamex/pkg-plist
index c3909b249137..7d4f30f0a33c 100644
--- a/games/odamex/pkg-plist
+++ b/games/odamex/pkg-plist
@@ -1,3 +1,4 @@
+%%LAUNCHER%%bin/odalaunch
bin/odamaster
bin/odamex
bin/odasrv