diff options
author | crees <crees@FreeBSD.org> | 2011-12-13 05:05:02 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2011-12-13 05:05:02 +0800 |
commit | 1236d1e4eafdbc631823536f7413747a8c892a3c (patch) | |
tree | 1d4ca4ed9c4eb64ec8331a37b0ee45bccf77e892 /games/ioquake3 | |
parent | 8f3ce8d858d3d616bb5fcbe2d3e6885dcdf16a63 (diff) | |
download | freebsd-ports-gnome-1236d1e4eafdbc631823536f7413747a8c892a3c.tar.gz freebsd-ports-gnome-1236d1e4eafdbc631823536f7413747a8c892a3c.tar.zst freebsd-ports-gnome-1236d1e4eafdbc631823536f7413747a8c892a3c.zip |
ioquake3:
- Allow slave ports to turn off some options
- Add modular renderer support for slaves
- Add WITH_DEBUG support
- Always check against non-default options so that they can be overridden
(e.g. for BATCH mode)
- Add pkg-config build dependency
ioquake3-devel, iourbanterror, openarena:
- Fix CURL support
- Link libraries instead of using dlopen
ioquake3-devel, iourbanterror:
- Update SVN snapshot r2064 to r2194
- Improved UDP download speed
- New protocol version 71
- Reduced VOIP latency
- Modular rendering system
- Added r_mode -2 for using display resolution
- Clang support
openarena:
- Switch from engine src dist 21 to 22 (both r1910 based)
openarena-oax:
- Update to B50
iourbanterror, openarena:
- Clean up plist
- Disable GAMELIBS option
PR: ports/162301
Submitted by: Dominic Fandrey <kamikaze@bsdforen.de> (maintainer)
Feature safe: yes
Diffstat (limited to 'games/ioquake3')
-rw-r--r-- | games/ioquake3/Makefile | 83 | ||||
-rw-r--r-- | games/ioquake3/files/patch-Makefile | 126 | ||||
-rw-r--r-- | games/ioquake3/files/patch-README | 4 | ||||
-rw-r--r-- | games/ioquake3/files/patch-code-client-cl_curl.h | 12 | ||||
-rw-r--r-- | games/ioquake3/files/patch-code-sys-sys_unix.c | 2 | ||||
-rw-r--r-- | games/ioquake3/pkg-plist | 3 |
6 files changed, 164 insertions, 66 deletions
diff --git a/games/ioquake3/Makefile b/games/ioquake3/Makefile index 87a2c1745ef3..4ca12bc91fcf 100644 --- a/games/ioquake3/Makefile +++ b/games/ioquake3/Makefile @@ -7,33 +7,40 @@ PORTNAME?= ioquake3 DISTVERSION?= 1.36 -PORTREVISION?= 7 +PORTREVISION?= 8 CATEGORIES= games MASTER_SITES?= http://ioquake3.org/files/${DISTVERSION}/ +# Using zip this way enables slaves to override it. +EXTRACT_SUFX?= .zip MAINTAINER?= kamikaze@bsdforen.de COMMENT?= Cleaned-up and enhanced version of Quake 3 -USE_ZIP?= yes -# Allow slave ports to turn off zip. -.if ${USE_ZIP} == "no" -.undef USE_ZIP -.endif +BUILD_DEPENDS+= pkg-config:${PORTSDIR}/devel/pkg-config + USE_GMAKE= yes OPTIONS+= CLIENT "Build client" on \ - GAMELIBS "Build game libraries" off \ DEDICATED "Build dedicated server" on \ CURL "Enable cURL for http/ftp download" on \ OPENAL "Enable OpenAL audio output" on \ MUMBLE "Enable Mumble support (no dependencies)" on \ VORBIS "Enable Ogg Vorbis support" on +.if !defined(NO_GAMELIBS) +OPTIONS+= GAMELIBS "Build game libraries" off +.endif +.if defined(HAS_DLRENDERER) +OPTIONS+= DLRENDERER "Build dynamically loaded renderer" on +.else +WITHOUT_DLRENDERER= yes +.endif MAKE_ARGS+= DEFAULT_BASEDIR="${Q3DIR}" \ DEFAULT_LIBDIR="${LIBDIR}" \ HOMEPATH="${HOMEPATH}" \ VERSION="${DISTVERSION}" \ - ARCH="${ARCH}" + ARCH="${ARCH}" \ + USE_LOCAL_HEADERS=0 PLIST_SUB+= LIBDIR="${LIBDIR:S/${PREFIX}\///}" \ ARCH="${ARCH}" \ BINSUFFIX="${BINSUFFIX}" @@ -41,7 +48,7 @@ ALL_TARGET= release MAKE_JOBS_SAFE= yes LIBDIR= ${PREFIX}/lib/${PORTNAME} -BUILDDIR= ${WRKSRC}/build/release-${OPSYS:L}-${ARCH} +BUILDDIR= ${WRKSRC}/build/${ALL_TARGET}-${OPSYS:L}-${ARCH} BINSUFFIX?= HOMEPATH?= /.${PORTNAME} Q3CLIENT?= ioquake3 @@ -53,6 +60,7 @@ Q3TOOLS?= q3asm \ Q3BASE?= baseq3 \ missionpack Q3ICON?= ${PREFIX}/share/pixmaps/quake3.xpm +Q3RENDERER?= renderer_opengl1_${ARCH} Q3INSTALL?= ONLY_FOR_ARCHS= amd64 i386 @@ -63,17 +71,28 @@ MACHINE_ARCH= ${ARCH} .include <bsd.port.options.mk> +.if defined(NO_GAMELIBS) && defined(WITH_GAMELIBS) +IGNORE= does not support WITH_GAMELIBS +.endif +.if !defined(HAS_DLRENDERER) && defined(WITH_DLRENDERER) +IGNORE= does not support WITH_DLRENDERER +.endif + +.if defined(WITH_DEBUG) +ALL_TARGET= debug +.endif + .if !defined(DESKTOP_ENTRIES) -.if defined(WITH_CLIENT) +. if !defined(WITHOUT_CLIENT) DESKTOP_ENTRIES+= "${Q3CLIENT} ${DISTVERSION}" "${COMMENT}" \ "${Q3ICON}" \ "${Q3CLIENT}${BINSUFFIX}" "Application;Game;" false -.endif -.if defined(WITH_SMP) +. endif +. if defined(WITH_SMP) DESKTOP_ENTRIES+= "${Q3CLIENT} ${DISTVERSION} SMP" "${COMMENT}" \ "${Q3ICON}" \ "${Q3CLIENT}-smp${BINSUFFIX}" "Application;Game;" false -.endif +. endif .endif .if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) && \ @@ -81,37 +100,43 @@ DESKTOP_ENTRIES+= "${Q3CLIENT} ${DISTVERSION} SMP" "${COMMENT}" \ IGNORE= needs at least one of CLIENT, DEDICATED and SMP options .endif -.if defined(WITH_CLIENT) || defined(WITH_SMP) +.if !defined(WITHOUT_CLIENT) || defined(WITH_SMP) # cURL -.if defined(WITH_CURL) +.if !defined(WITHOUT_CURL) LIB_DEPENDS+= curl.6:${PORTSDIR}/ftp/curl -#MAKE_ARGS+= USE_CURL_DLOPEN=0 +MAKE_ARGS+= USE_CURL=1 USE_CURL_DLOPEN=0 .else MAKE_ARGS+= USE_CURL=0 .endif # OpenAL -.if defined(WITH_OPENAL) +.if !defined(WITHOUT_OPENAL) USE_OPENAL= al +MAKE_ARGS+= USE_OPENAL=1 USE_OPENAL_DLOPEN=0 .else MAKE_ARGS+= USE_OPENAL=0 .endif # SDL USE_SDL= sdl # Vorbis -.if defined(WITH_VORBIS) +.if !defined(WITHOUT_VORBIS) LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis MAKE_ARGS+= USE_CODEC_VORBIS=1 +.else +MAKE_ARGS+= USE_CODEC_VORBIS=0 .endif # Mumble -.if defined(WITH_MUMBLE) +.if !defined(WITHOUT_MUMBLE) MAKE_ARGS+= USE_MUMBLE=1 .else MAKE_ARGS+= USE_MUMBLE=0 .endif +.else +# Features that aren't installed without a client +WITHOUT_DLRENDERER= yes .endif # SMP is only built with CLIENT. -.if defined(WITH_CLIENT) || defined(WITH_SMP) +.if !defined(WITHOUT_CLIENT) || defined(WITH_SMP) MAKE_ARGS+= BUILD_CLIENT=1 PLIST_SUB+= CLIENT="" Q3BIN+= ${Q3CLIENT} @@ -120,7 +145,7 @@ MAKE_ARGS+= BUILD_CLIENT=0 PLIST_SUB+= CLIENT="@comment " .endif -.if defined(WITH_DEDICATED) +.if !defined(WITHOUT_DEDICATED) MAKE_ARGS+= BUILD_SERVER=1 PLIST_SUB+= DEDICATED="" Q3BIN+= ${Q3SERVER} @@ -146,6 +171,14 @@ MAKE_ARGS+= BUILD_CLIENT_SMP=0 PLIST_SUB+= SMP="@comment " .endif +.if !defined(WITHOUT_DLRENDERER) +PLIST_SUB+= DLRENDERER="" +MAKE_ARGS+= USE_RENDERER_DLOPEN=1 +.else +MAKE_ARGS+= USE_RENDERER_DLOPEN=0 +PLIST_SUB+= DLRENDERER="@comment " +.endif + do-install: ${Q3INSTALL} .for bin in ${Q3BIN} ${INSTALL_PROGRAM} ${BUILDDIR}/${bin}.${ARCH} \ @@ -155,10 +188,16 @@ do-install: ${Q3INSTALL} ${INSTALL_PROGRAM} ${BUILDDIR}/tools/${bin} \ ${PREFIX}/bin/${bin}${BINSUFFIX} .endfor +.if !defined(WITHOUT_DLRENDERER) +.for renderer in ${Q3RENDERER} + ${MKDIR} ${LIBDIR} + ${INSTALL_LIB} ${BUILDDIR}/${renderer}.so ${LIBDIR} +.endfor +.endif .if defined(WITH_GAMELIBS) .for dir in ${Q3BASE} ${MKDIR} ${LIBDIR}/${dir} - ${INSTALL_PROGRAM} ${BUILDDIR}/${dir}/*.so ${LIBDIR}/${dir} + ${INSTALL_LIB} ${BUILDDIR}/${dir}/*.so ${LIBDIR}/${dir} .endfor .endif .if !defined(NOPORTDOCS) diff --git a/games/ioquake3/files/patch-Makefile b/games/ioquake3/files/patch-Makefile index 1c144a0948aa..ca1190284c67 100644 --- a/games/ioquake3/files/patch-Makefile +++ b/games/ioquake3/files/patch-Makefile @@ -1,6 +1,15 @@ --- Makefile.orig 2009-04-22 20:54:48.000000000 +0200 -+++ Makefile 2009-12-08 11:38:10.000000000 +0100 -@@ -521,15 +521,22 @@ ++++ Makefile 2011-11-04 20:42:56.000000000 +0100 +@@ -187,6 +187,8 @@ + # FIXME: introduce CLIENT_CFLAGS + SDL_CFLAGS=$(shell pkg-config --cflags sdl|sed 's/-Dmain=SDL_main//') + SDL_LIBS=$(shell pkg-config --libs sdl) ++ VORBIS_CFLAGS=$(shell pkg-config --silence-errors --cflags vorbis vorbisfile) ++ VORBIS_LIBS=$(shell pkg-config --silence-errors --libs vorbis vorbisfile) + endif + + # version info +@@ -521,44 +523,25 @@ ifeq ($(PLATFORM),freebsd) @@ -13,29 +22,18 @@ - - BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ - -DUSE_ICON $(shell sdl-config --cflags) -+ ifndef HOMEPATH -+ HOMEPATH = /.ioquake3 -+ endif -+ -+ ifndef DEFAULT_LIBDIR -+ DEFAULT_LIBDIR = /usr/local/lib/ioquake3 -+ endif -+ -+ BASE_CFLAGS = $(shell env MACHINE_ARCH=$(ARCH) make -f /dev/null -VCFLAGS) \ -+ -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ -+ -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON \ -+ -DHOMEPATH=\\\"$(HOMEPATH)\\\" \ -+ -DDEFAULT_LIBDIR=\\\"$(DEFAULT_LIBDIR)\\\" -+ CLIENT_CFLAGS = $(SDL_CFLAGS) -+ SERVER_CFLAGS = -+ HAVE_VM_COMPILED = true - - ifeq ($(USE_OPENAL),1) - BASE_CFLAGS += -DUSE_OPENAL -@@ -542,24 +549,6 @@ - BASE_CFLAGS += -DUSE_CODEC_VORBIS - endif - +- +- ifeq ($(USE_OPENAL),1) +- BASE_CFLAGS += -DUSE_OPENAL +- ifeq ($(USE_OPENAL_DLOPEN),1) +- BASE_CFLAGS += -DUSE_OPENAL_DLOPEN +- endif +- endif +- +- ifeq ($(USE_CODEC_VORBIS),1) +- BASE_CFLAGS += -DUSE_CODEC_VORBIS +- endif +- - ifeq ($(ARCH),axp) - BASE_CFLAGS += -DNO_VM_COMPILED - RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \ @@ -51,16 +49,71 @@ - BASE_CFLAGS += -DNO_VM_COMPILED - endif - endif -- ++ ifndef HOMEPATH ++ HOMEPATH = /.ioquake3 ++ endif ++ ++ ifndef DEFAULT_LIBDIR ++ DEFAULT_LIBDIR = /usr/local/lib/ioquake3 ++ endif ++ ++ # flags ++ BASE_CFLAGS = $(shell env MACHINE_ARCH=$(ARCH) make -f /dev/null -VCFLAGS) \ ++ -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ ++ -DHOMEPATH=\\\"$(HOMEPATH)\\\" \ ++ -DDEFAULT_LIBDIR=\\\"$(DEFAULT_LIBDIR)\\\" \ ++ -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON ++ CLIENT_CFLAGS += $(SDL_CFLAGS) ++ HAVE_VM_COMPILED = true + - DEBUG_CFLAGS=$(BASE_CFLAGS) -g -- ++ OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer ++ OPTIMIZE = $(OPTIMIZEVM) -ffast-math + SHLIBEXT=so SHLIBCFLAGS=-fPIC - SHLIBLDFLAGS=-shared $(LDFLAGS) -@@ -582,6 +571,27 @@ - CLIENT_LIBS += -lvorbisfile -lvorbis -logg +@@ -568,20 +551,52 @@ + # don't need -ldl (FreeBSD) + LIBS=-lm + +- CLIENT_LIBS = +- +- CLIENT_LIBS += $(shell sdl-config --libs) -lGL ++ CLIENT_LIBS = $(SDL_LIBS) -lGL + ++ # optional features/libraries + ifeq ($(USE_OPENAL),1) +- ifneq ($(USE_OPENAL_DLOPEN),1) +- CLIENT_LIBS += $(THREAD_LIBS) -lopenal ++ CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS) ++ CLIENT_CFLAGS += -DUSE_OPENAL ++ ifneq ($(USE_LOCAL_HEADERS),1) ++ CLIENT_CFLAGS += $(OPENAL_CFLAGS) ++ endif ++ endif ++ ++ ifeq ($(USE_CURL),1) ++ CLIENT_LIBS += $(CURL_LIBS) ++ CLIENT_CFLAGS += -DUSE_CURL ++ ifneq ($(USE_LOCAL_HEADERS),1) ++ CLIENT_CFLAGS += $(CURL_CFLAGS) + endif endif + ifeq ($(USE_CODEC_VORBIS),1) +- CLIENT_LIBS += -lvorbisfile -lvorbis -logg ++ CLIENT_LIBS += $(VORBIS_LIBS) ++ CLIENT_CFLAGS += -DUSE_CODEC_VORBIS ++ ifneq ($(USE_LOCAL_HEADERS),1) ++ CLIENT_CFLAGS += $(VORBIS_CFLAGS) ++ endif + endif + ++ ifeq ($(BUILD_CLIENT),1) ++ BASE_CFLAGS += $(CLIENT_CFLAGS) ++ endif ++ ++ # cross-compiling tweaks + ifeq ($(ARCH),i386) + ifeq ($(CROSS_COMPILING),1) + BASE_CFLAGS += -m32 @@ -72,20 +125,13 @@ + endif + endif + -+ ifeq ($(BUILD_CLIENT),1) -+ BASE_CFLAGS += $(CLIENT_CFLAGS) -+ endif -+ -+ RELEASE_CFLAGS = $(BASE_CFLAGS) -DNDEBUG -O3 -fomit-frame-pointer \ -+ -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ -+ -funroll-loops -fstrength-reduce -+ ++ RELEASE_CFLAGS = $(BASE_CFLAGS) + DEBUG_CFLAGS = $(BASE_CFLAGS) -g + else # ifeq freebsd ############################################################################# -@@ -1442,6 +1452,9 @@ +@@ -1442,6 +1457,9 @@ ifeq ($(ARCH),x86_64) Q3OBJ += $(B)/client/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o endif @@ -95,7 +141,7 @@ ifeq ($(ARCH),ppc) Q3OBJ += $(B)/client/vm_powerpc.o $(B)/client/vm_powerpc_asm.o endif -@@ -1591,6 +1604,9 @@ +@@ -1591,6 +1609,9 @@ ifeq ($(ARCH),x86_64) Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/ded/vm_x86_64_assembler.o endif diff --git a/games/ioquake3/files/patch-README b/games/ioquake3/files/patch-README index ceadc1ac55f5..cc92efbf4a5d 100644 --- a/games/ioquake3/files/patch-README +++ b/games/ioquake3/files/patch-README @@ -1,5 +1,5 @@ ---- README.orig 2009-08-30 23:34:03.000000000 +0200 -+++ README 2009-08-31 00:05:03.000000000 +0200 +--- README.orig 2009-04-08 05:36:16.000000000 +0200 ++++ README 2011-10-27 13:13:59.000000000 +0200 @@ -79,6 +79,8 @@ CFLAGS - use this for custom CFLAGS V - set to show cc command line when building diff --git a/games/ioquake3/files/patch-code-client-cl_curl.h b/games/ioquake3/files/patch-code-client-cl_curl.h new file mode 100644 index 000000000000..ca97eb61347d --- /dev/null +++ b/games/ioquake3/files/patch-code-client-cl_curl.h @@ -0,0 +1,12 @@ +--- code/client/cl_curl.h.orig 2011-11-03 10:16:32.000000000 +0100 ++++ code/client/cl_curl.h 2011-11-03 10:16:56.000000000 +0100 +@@ -34,8 +34,7 @@ + #elif defined(MACOS_X) + #define DEFAULT_CURL_LIB "libcurl.dylib" + #else +-#define DEFAULT_CURL_LIB "libcurl.so.4" +-#define ALTERNATE_CURL_LIB "libcurl.so.3" ++#define DEFAULT_CURL_LIB "libcurl.so" + #endif + + #ifdef USE_LOCAL_HEADERS diff --git a/games/ioquake3/files/patch-code-sys-sys_unix.c b/games/ioquake3/files/patch-code-sys-sys_unix.c index 278e50d47614..e6b5219879b0 100644 --- a/games/ioquake3/files/patch-code-sys-sys_unix.c +++ b/games/ioquake3/files/patch-code-sys-sys_unix.c @@ -1,5 +1,5 @@ --- code/sys/sys_unix.c.orig 2008-11-11 00:55:22.000000000 +0100 -+++ code/sys/sys_unix.c 2009-12-08 10:54:22.000000000 +0100 ++++ code/sys/sys_unix.c 2011-10-27 13:11:15.000000000 +0200 @@ -53,7 +53,9 @@ if( ( p = getenv( "HOME" ) ) != NULL ) { diff --git a/games/ioquake3/pkg-plist b/games/ioquake3/pkg-plist index 35792a4f0460..28ba1453d551 100644 --- a/games/ioquake3/pkg-plist +++ b/games/ioquake3/pkg-plist @@ -5,6 +5,7 @@ bin/q3asm%%BINSUFFIX%% bin/q3cpp%%BINSUFFIX%% bin/q3lcc%%BINSUFFIX%% bin/q3rcc%%BINSUFFIX%% +%%DLRENDERER%%%%LIBDIR%%/renderer_opengl1_%%ARCH%%.so %%GAMELIBS%%%%LIBDIR%%/baseq3/cgame%%ARCH%%.so %%GAMELIBS%%%%LIBDIR%%/baseq3/qagame%%ARCH%%.so %%GAMELIBS%%%%LIBDIR%%/baseq3/ui%%ARCH%%.so @@ -14,5 +15,5 @@ bin/q3rcc%%BINSUFFIX%% %%PORTDOCS%%%%DOCSDIR%%/README %%GAMELIBS%%@dirrm %%LIBDIR%%/missionpack %%GAMELIBS%%@dirrm %%LIBDIR%%/baseq3 -%%GAMELIBS%%@dirrm %%LIBDIR%% +@dirrmtry %%LIBDIR%% %%PORTDOCS%%@dirrm %%DOCSDIR%% |