- Add more OPTIONS (allow building without X11 and without game).
This commit is contained in:
parent
ece6a326a1
commit
410bfadff0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=168501
3 changed files with 69 additions and 19 deletions
|
@ -13,33 +13,66 @@ MASTER_SITES= http://koti.mbnet.fi/~turol/sdlquake2/
|
|||
MAINTAINER= alepulver@FreeBSD.org
|
||||
COMMENT= Combination of R1Q2 and R1GL with SDL code from Quake2Forge
|
||||
|
||||
LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo \
|
||||
jpeg.9:${PORTSDIR}/graphics/jpeg \
|
||||
png.5:${PORTSDIR}/graphics/png
|
||||
LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo
|
||||
|
||||
USE_BZIP2= yes
|
||||
USE_GCC= 3.2+
|
||||
USE_GMAKE= yes
|
||||
USE_GL= yes
|
||||
USE_SDL= sdl
|
||||
|
||||
MAKE_ENV= LIBDIR="${LIBDIR}"
|
||||
OPTIONS= CLIENT "Build client" on \
|
||||
DEDICATED "Build dedicated server" on \
|
||||
GAME "Build main game modification" on
|
||||
|
||||
LIBDIR= ${PREFIX}/lib/${PORTNAME}
|
||||
MAKE_ENV= LIBDIR="${LIBDIR}"
|
||||
PLIST_SUB= LIBDIR=${LIBDIR:S/${PREFIX}\///}
|
||||
|
||||
|
||||
.include "${.CURDIR}/../quake2-data/Makefile.include"
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if defined(WITH_CLIENT)
|
||||
LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg \
|
||||
png.5:${PORTSDIR}/graphics/png
|
||||
USE_GL= yes
|
||||
USE_SDL= sdl
|
||||
MAKE_ENV+= BUILD_CLIENT=YES
|
||||
PLIST_SUB+= CLIENT=""
|
||||
.else
|
||||
PLIST_SUB+= CLIENT="@comment "
|
||||
.endif
|
||||
|
||||
.if defined(WITH_DEDICATED)
|
||||
MAKE_ENV+= BUILD_DEDICATED=YES
|
||||
PLIST_SUB+= DEDICATED=""
|
||||
.else
|
||||
PLIST_SUB+= DEDICATED="@comment "
|
||||
.endif
|
||||
|
||||
.if defined(WITH_GAME)
|
||||
MAKE_ENV+= BUILD_GAME=YES
|
||||
PLIST_SUB+= GAME=""
|
||||
.else
|
||||
PLIST_SUB+= GAME="@comment "
|
||||
.endif
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${LIBDIR}/baseq2
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/ref_sdlgl.so ${LIBDIR}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/baseq2/game.so ${LIBDIR}/baseq2
|
||||
.if defined(WITH_CLIENT)
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/quake2 ${PREFIX}/bin/${PORTNAME}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/ref_sdlgl.so ${LIBDIR}
|
||||
.endif
|
||||
.if defined(WITH_DEDICATED)
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/q2ded ${PREFIX}/bin/${PORTNAME}-ded
|
||||
.endif
|
||||
.if defined(WITH_GAME)
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/baseq2/game.so ${LIBDIR}/baseq2
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
@${ECHO_CMD}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
@${ECHO_CMD}
|
||||
|
||||
.include "${.CURDIR}/../quake2-data/Makefile.include"
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ./Makefile.orig Thu May 19 17:56:13 2005
|
||||
+++ ./Makefile Sun Feb 26 11:24:53 2006
|
||||
@@ -1,5 +1,18 @@
|
||||
--- Makefile.orig Thu May 19 17:56:13 2005
|
||||
+++ Makefile Sat Jul 22 16:05:33 2006
|
||||
@@ -1,9 +1,34 @@
|
||||
-CC:=gcc
|
||||
-CFLAGS:=-O3 -ffast-math -march=athlon-xp -g -Wall $(shell sdl-config --cflags)
|
||||
+CC?=gcc
|
||||
|
@ -21,7 +21,24 @@
|
|||
|
||||
GAMES:=baseq2
|
||||
|
||||
@@ -43,15 +56,14 @@
|
||||
-TARGETS:=quake2 q2ded ref_sdlgl.so $(foreach game, $(GAMES), $(game)/game.so)
|
||||
+TARGETS:=
|
||||
+
|
||||
+ifeq ($(strip $(BUILD_CLIENT)),YES)
|
||||
+TARGETS+=quake2 ref_sdlgl.so
|
||||
+endif
|
||||
+
|
||||
+ifeq ($(strip $(BUILD_DEDICATED)),YES)
|
||||
+TARGETS+=q2ded
|
||||
+endif
|
||||
+
|
||||
+ifeq ($(strip $(BUILD_GAME)),YES)
|
||||
+TARGETS+=$(foreach game, $(GAMES), $(game)/game.so)
|
||||
+endif
|
||||
|
||||
.PHONY: default all clean distclean
|
||||
|
||||
@@ -43,15 +68,14 @@
|
||||
@sed "s@^\(.*\)\.o:@$(dir $*)\1.o:@" < .depends/$*.d > .depends/$*.d.new
|
||||
@mv .depends/$*.d.new .depends/$*.d
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
bin/sdlquake2
|
||||
bin/sdlquake2-ded
|
||||
%%LIBDIR%%/baseq2/game.so
|
||||
%%LIBDIR%%/ref_sdlgl.so
|
||||
%%CLIENT%%bin/sdlquake2
|
||||
%%DEDICATED%%bin/sdlquake2-ded
|
||||
%%GAME%%%%LIBDIR%%/baseq2/game.so
|
||||
%%CLIENT%%%%LIBDIR%%/ref_sdlgl.so
|
||||
@dirrm %%LIBDIR%%/baseq2
|
||||
@dirrm %%LIBDIR%%
|
||||
|
|
Loading…
Reference in a new issue