diff options
author | alepulver <alepulver@FreeBSD.org> | 2006-07-23 02:53:38 +0800 |
---|---|---|
committer | alepulver <alepulver@FreeBSD.org> | 2006-07-23 02:53:38 +0800 |
commit | b5ede14f1d647856dc026425f23c08a9836cf607 (patch) | |
tree | 4079f23bbd4942376cd9df33371f9cd68c790419 /games/r1q2 | |
parent | 12960be57171bf657eb8a2d8617c82fa32c6e962 (diff) | |
download | freebsd-ports-gnome-b5ede14f1d647856dc026425f23c08a9836cf607.tar.gz freebsd-ports-gnome-b5ede14f1d647856dc026425f23c08a9836cf607.tar.zst freebsd-ports-gnome-b5ede14f1d647856dc026425f23c08a9836cf607.zip |
- Add more OPTIONS (allow selecting more components to build or not).
- Fix pkg-plist (missing entry).
- Bump PORTREVISION.
Diffstat (limited to 'games/r1q2')
-rw-r--r-- | games/r1q2/Makefile | 72 | ||||
-rw-r--r-- | games/r1q2/files/patch-Makefile | 34 | ||||
-rw-r--r-- | games/r1q2/pkg-plist | 9 |
3 files changed, 85 insertions, 30 deletions
diff --git a/games/r1q2/Makefile b/games/r1q2/Makefile index 883ad45bf100..4318b9b6acc5 100644 --- a/games/r1q2/Makefile +++ b/games/r1q2/Makefile @@ -7,6 +7,7 @@ PORTNAME= r1q2 PORTVERSION= 6557 +PORTREVISION= 1 CATEGORIES= games MASTER_SITES= http://www.r1ch.net/stuff/r1q2/src/ DISTNAME= ${PORTNAME}-b${PORTVERSION}-src @@ -19,19 +20,19 @@ PATCH_DIST_STRIP= -p1 MAINTAINER= alepulver@FreeBSD.org COMMENT= Enhaced Quake II client/server focusing on stability -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_ZIP= yes USE_GCC= 3.2+ USE_GMAKE= yes -USE_GL= yes NO_WRKSUBDIR= yes -OPTIONS= DEDICATED "Build dedicated server" on \ +OPTIONS= CLIENT "Build OpenGL client" on \ + DEDICATED "Build dedicated server" on \ + GAME "Build main game modification" on \ + GLX "Build OpenGL renderer" on \ HTTP "Enable HTTP download support" on \ - OPENAL "Ebable OpenAL support" on \ + OPENAL "Enable OpenAL support" on \ OPTIMIZED_CFLAGS "Enable compilation optimizations" on \ SDL "Build SDL client" on \ SDLGL "Build SDL OpenGL renderer" on @@ -47,13 +48,50 @@ LIBDIR= ${PREFIX}/lib/${PORTNAME} .include <bsd.port.pre.mk> +.if !defined(WITHOUT_CLIENT) || !defined(WITHOUT_GLX) +USE_GL= yes +.endif + +.if !defined(WITHOUT_SDL) && !defined(WITHOUT_SDLGL) +USE_SDL= sdl +.endif + +.if !defined(WITHOUT_GLX) || !defined(WITHOUT_SDLGL) +LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg \ + png.5:${PORTSDIR}/graphics/png +.endif + +.if !defined(WITHOUT_CLIENT) +MAKE_ENV+= BUILD_CLIENT=YES +PLIST_SUB+= CLIENT="" +R1Q2_BIN+= r1q2 +.else +PLIST_SUB+= CLIENT="@comment " +.endif + .if !defined(WITHOUT_DEDICATED) MAKE_ENV+= BUILD_DEDICATED=YES PLIST_SUB+= DEDICATED="" +R1Q2_BIN+= r1q2ded .else PLIST_SUB+= DEDICATED="@comment " .endif +.if !defined(WITHOUT_GAME) +MAKE_ENV+= BUILD_GAME=YES +PLIST_SUB+= GAME="" +.else +PLIST_SUB+= GAME="@comment " +.endif + +.if !defined(WITHOUT_GLX) +MAKE_ENV+= BUILD_GLX=YES +PLIST_SUB+= GLX="" +R1Q2_REF+= r1gl +.else +PLIST_SUB+= GLX="@comment " +.endif + .if !defined(WITHOUT_HTTP) LIB_DEPENDS+= curl.3:${PORTSDIR}/ftp/curl MAKE_ENV+= WITH_HTTP_DOWNLOAD_SUPPORT=YES @@ -68,13 +106,10 @@ MAKE_ENV+= WITH_OPENAL_SUPPORT=YES MAKE_ENV+= OPTIMIZED_CFLAGS=YES .endif -.if !defined(WITHOUT_SDL) && !defined(WITHOUT_SDLGL) -USE_SDL= sdl -.endif - .if !defined(WITHOUT_SDL) MAKE_ENV+= BUILD_SDL=YES PLIST_SUB+= SDL="" +R1Q2_BIN+= r1q2-sdl .else PLIST_SUB+= SDL="@comment " .endif @@ -82,6 +117,7 @@ PLIST_SUB+= SDL="@comment " .if !defined(WITHOUT_SDLGL) MAKE_ENV+= BUILD_SDLGL=YES PLIST_SUB+= SDLGL="" +R1Q2_REF+= r1sdl .else PLIST_SUB+= SDLGL="@comment " .endif @@ -93,16 +129,16 @@ post-patch: .endif do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/quake2/${PORTNAME} ${PREFIX}/bin -.if !defined(WITHOUT_SDL) - ${INSTALL_PROGRAM} ${WRKSRC}/quake2/${PORTNAME}-sdl ${PREFIX}/bin -.endif +.for f in ${R1Q2_BIN} + ${INSTALL_PROGRAM} ${WRKSRC}/quake2/${f} ${PREFIX}/bin +.endfor ${MKDIR} ${LIBDIR}/baseq2 - ${INSTALL_PROGRAM} ${WRKSRC}/quake2/ref_r1gl.so ${LIBDIR} -.if !defined(WITHOUT_SDLGL) - ${INSTALL_PROGRAM} ${WRKSRC}/quake2/ref_r1sdl.so ${LIBDIR} -.endif +.for f in ${R1Q2_REF} + ${INSTALL_PROGRAM} ${WRKSRC}/quake2/ref_${f}.so ${LIBDIR} +.endfor +.if !defined(WITHOUT_GAME) ${INSTALL_PROGRAM} ${WRKSRC}/quake2/baseq2/game.so ${LIBDIR}/baseq2 +.endif .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/readme.txt ${WRKSRC}/r1q2.txt ${DOCSDIR} diff --git a/games/r1q2/files/patch-Makefile b/games/r1q2/files/patch-Makefile index f5b9c58c7722..687d485294b7 100644 --- a/games/r1q2/files/patch-Makefile +++ b/games/r1q2/files/patch-Makefile @@ -1,6 +1,12 @@ ---- ./Makefile.orig Wed May 17 22:21:33 2006 -+++ ./Makefile Wed May 17 22:47:04 2006 -@@ -21,25 +21,25 @@ +--- Makefile.orig Sat Jul 22 13:50:12 2006 ++++ Makefile Sat Jul 22 14:08:33 2006 +@@ -16,30 +16,30 @@ + #===============================# + # Game Library # + #===============================# +-BUILD_GAME=YES ++#BUILD_GAME=YES + #===============================# # Quake 2 dedicated server only # #===============================# @@ -81,16 +87,28 @@ SDLGLCFLAGS=$(SDLCFLAGS) -DOPENGL SDLGLLDFLAGS=$(SDLLDFLAGS) -@@ -122,7 +125,7 @@ - $(BINDIR)/ref_r1gl.$(SHLIBEXT) - +@@ -118,11 +121,16 @@ + # SETUP AND BUILD + ############################################################################# + +-TARGETS=$(BINDIR)/r1q2 \ +- $(BINDIR)/ref_r1gl.$(SHLIBEXT) +- ++ifeq ($(strip $(BUILD_CLIENT)),YES) ++TARGETS+=$(BINDIR)/r1q2 ++endif ++ ++ifeq ($(strip $(BUILD_GLX)),YES) ++TARGETS+=$(BINDIR)/ref_r1gl.$(SHLIBEXT) ++endif ++ ifeq ($(strip $(BUILD_GAME)),YES) - TARGETS+=$(BINDIR)/baseq2/game$(ARCH).$(SHLIBEXT) -+ TARGETS+=$(BINDIR)/baseq2/game.$(SHLIBEXT) ++TARGETS+=$(BINDIR)/baseq2/game.$(SHLIBEXT) endif ifeq ($(strip $(BUILD_DEDICATED)),YES) -@@ -618,7 +621,7 @@ +@@ -618,7 +626,7 @@ $(BUILDDIR)/objects/game/p_weapon.o \ $(BUILDDIR)/objects/game/m_flash.o diff --git a/games/r1q2/pkg-plist b/games/r1q2/pkg-plist index df88f1a4ec89..842928a6c347 100644 --- a/games/r1q2/pkg-plist +++ b/games/r1q2/pkg-plist @@ -1,10 +1,11 @@ -bin/r1q2 +%%CLIENT%%bin/r1q2 +%%DEDICATED%%bin/r1q2ded %%SDL%%bin/r1q2-sdl -%%LIBDIR%%/baseq2/game.so -%%LIBDIR%%/ref_r1gl.so +%%GAME%%%%LIBDIR%%/baseq2/game.so +%%GLX%%%%LIBDIR%%/ref_r1gl.so %%SDLGL%%%%LIBDIR%%/ref_r1sdl.so %%PORTDOCS%%%%DOCSDIR%%/r1q2.txt %%PORTDOCS%%%%DOCSDIR%%/readme.txt -%%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrm %%LIBDIR%%/baseq2 @dirrm %%LIBDIR%% +%%PORTDOCS%%@dirrm %%DOCSDIR%% |