diff options
author | Alejandro Pulver <alepulver@FreeBSD.org> | 2008-08-10 20:07:19 +0000 |
---|---|---|
committer | Alejandro Pulver <alepulver@FreeBSD.org> | 2008-08-10 20:07:19 +0000 |
commit | e3fa52cddcb39b36c94e04bee63607fa94e647c4 (patch) | |
tree | 94c1c25655d317c5e5ece8b88628408bcc3c1c0b /games/evq3 | |
parent | f8098bf1aaa6b5d7bf4f1f9a1668bf1bd8579ec9 (diff) | |
download | ports-e3fa52cddcb39b36c94e04bee63607fa94e647c4.tar.gz ports-e3fa52cddcb39b36c94e04bee63607fa94e647c4.zip |
Notes
Diffstat (limited to 'games/evq3')
32 files changed, 513 insertions, 753 deletions
diff --git a/games/evq3/Makefile b/games/evq3/Makefile index 76fa680b1b6d..cc870e16e6a8 100644 --- a/games/evq3/Makefile +++ b/games/evq3/Makefile @@ -6,13 +6,14 @@ # PORTNAME= evq3 -PORTVERSION= 1.0a -PORTREVISION= 4 +PORTVERSION= 1.3.20080810 CATEGORIES= games -MASTER_SITES= http://evolution.quakedev.com/dev/evq3/ -DISTNAME= ${PORTNAME}-final-src -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ - pak-${PORTNAME}.pk3 +MASTER_SITES= http://evolution.quakedev.com/dev/evq3/:pak \ + ${MASTER_SITE_LOCAL:S|$|:src|} +MASTER_SITE_SUBDIR= alepulver +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:src \ + pak-evq3.pk3:pak \ + pak-5evq3.pk3:src EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= alepulver@FreeBSD.org @@ -21,90 +22,146 @@ COMMENT= The Marriage of XreaL and Icculus.org Q3 w/ Improvements LIB_DEPENDS= freetype.9:${PORTSDIR}/print/freetype2 \ vorbis.4:${PORTSDIR}/audio/libvorbis -USE_ZIP= yes +USE_BZIP2= yes USE_DOS2UNIX= yes -USE_GL= gl -USE_XORG= xxf86dga -USE_SCONS= yes -SCONS_ARGS= warnings=0 -NO_WRKSUBDIR= yes - -OPTIONS= GAMELIBS "Build game libraries (when not mandatory)" off \ - LUA "Enable Lua support (for scripting)" off \ +USE_GMAKE= yes +ALL_TARGET= release +WRKSRC= ${WRKDIR}/${PORTNAME} + +OPTIONS= CLIENT "Build client" on \ + CURL "Enable curl support" on \ + CURL_DLOPEN "Enable dynamic loading of curl" on \ + GAMELIBS "Build game libraries (when not mandatory)" off \ + DEDICATED "Build dedicated server" on \ + OPENAL "Enable OpenAL (3D sound) support" off \ + OPENAL_DLOPEN "Enable dynamic loading of OpenAL" off \ OPTIMIZED_CFLAGS "Enable compilation optimizations" on \ - SDL "Use SDL for audio instead of OSS" off \ - SIMD "Enable CPU optimizations (sse/3dnow)" on \ - SMP "Build with SMP (threading) support" off - -CFLAGS+= -DDATADIR='"\"${Q3DIR}\""' -DLIBDIR='"\"${LIBDIR}\""' + SMP "Build SMP (threaded) client" on \ + VOIP "Enable Voice Over IP" off \ + VORBIS "Enable Ogg Vorbis codec support" on +MAKE_ENV= DEFAULT_BASEDIR="${Q3DIR}" LIBDIR="${LIBDIR}" \ + PTHREAD_LIBS="${PTHREAD_LIBS}" PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}" LIBDIR= ${PREFIX}/lib/${PORTNAME} -VM_ARCHS= i386 amd64 powerpc +VM_ARCHS= amd64 i386 powerpc .include "${.CURDIR}/../quake3-data/Makefile.include" .include <bsd.port.pre.mk> +.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) && \ + defined(WITHOUT_SMP) +IGNORE= needs at least one of CLIENT, DEDICATED and SMP options +.endif + .for i in ${ARCH} . if ${VM_ARCHS:M${i}} != "" HAVE_VM_COMPILED= yes . endif .endfor -.if defined(WITH_GAMELIBS) || !defined(HAVE_VM_COMPILED) -SCONS_ARGS+= gamelibs=1 -PLIST_SUB+= GAMELIBS="" -.else -PLIST_SUB+= GAMELIBS="@comment " +.if defined(HAVE_VM_COMPILED) +MAKE_ENV+= HAVE_VM_COMPILED=true .endif -.if defined(WITH_LUA) -USE_LUA= 5.0 -SCONS_ARGS+= lua=1 -CPPPATH= ${LOCALBASE}/include ${LUA_INCDIR} -LIBPATH= ${LOCALBASE}/lib ${LUA_LIBDIR} +.if !defined(WITHOUT_CLIENT) || !defined(WITHOUT_SMP) +# curl +. if defined(WITH_CURL) +LIB_DEPENDS+= curl.4:${PORTSDIR}/ftp/curl +MAKE_ENV+= USE_CURL=1 +. if defined(WITH_CURL_DLOPEN) +MAKE_ENV+= USE_CURL_DLOPEN=1 +. endif +. endif +# OpenAL +. if defined(WITH_OPENAL) +LIB_DEPENDS+= openal.0:${PORTSDIR}/audio/openal +MAKE_ENV+= USE_OPENAL=1 +. if defined(WITH_OPENAL_DLOPEN) +MAKE_ENV+= USE_OPENAL_DLOPEN=1 +. endif +. endif +# SDL +USE_SDL= sdl +# VOIP +. if defined(WITH_VOIP) +LIB_DEPENDS+= speex.1:${PORTSDIR}/audio/speex +MAKE_ENV+= USE_VOIP=1 +. endif +# Vorbis +. if defined(WITH_VORBIS) +LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis +MAKE_ENV+= USE_CODEC_VORBIS=1 +. endif .endif -.if defined(WITHOUT_OPTIMIZED_CFLAGS) -SCONS_ARGS+= optimize=0 +.if !defined(WITHOUT_CLIENT) +MAKE_ENV+= BUILD_CLIENT=1 +PLIST_SUB+= CLIENT="" +Q3BIN+= evq3 +.else +PLIST_SUB+= CLIENT="@comment " .endif -.if defined(WITH_SDL) -USE_SDL+= sdl -SCONS_ARGS+= sound=sdl +.if !defined(WITHOUT_DEDICATED) +MAKE_ENV+= BUILD_SERVER=1 +PLIST_SUB+= DEDICATED="" +Q3BIN+= evq3ded .else -SCONS_ARGS+= sound=oss +PLIST_SUB+= DEDICATED="@comment " .endif -.if !defined(WITHOUT_SIMD) && !defined(PACKAGE_BUILDING) -.if ${MACHINE_CPU:Msse} != "" -SCONS_ARGS+= simd=sse -.elif ${MACHINE_CPU:M3dnow} != "" -SCONS_ARGS+= simd=3dnow +.if defined(WITH_GAMELIBS) || !defined(HAVE_VM_COMPILED) +MAKE_ENV+= BUILD_GAME_SO=1 +PLIST_SUB+= GAMELIBS="" +.else +PLIST_SUB+= GAMELIBS="@comment " .endif + +.if !defined(WITHOUT_OPTIMIZED_CFLAGS) +MAKE_ENV+= USE_OPTIMIZED_CFLAGS=1 .endif -.if defined(WITH_SMP) -SCONS_ARGS+= smp=1 +.if !defined(WITHOUT_SMP) +MAKE_ENV+= BUILD_CLIENT_SMP=1 +PLIST_SUB+= SMP="" +Q3BIN+= evq3-smp +.else +PLIST_SUB+= SMP="@comment " .endif post-patch: - @${REINPLACE_CMD} -e 's|botlib\.log|/dev/null|' \ - ${WRKSRC}/engine/botlib/be_interface.c +# Do not log debug output of bots (can be enabled with "homedir"/"gamedir"). + @${REINPLACE_CMD} -e 's|"botlib\.log"|"/dev/null"|' \ + ${WRKSRC}/code/botlib/be_interface.c do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/quake3 ${PREFIX}/bin/${PORTNAME} - ${INSTALL_PROGRAM} ${WRKSRC}/quake3-server ${PREFIX}/bin/${PORTNAME}-server ${MKDIR} ${LIBDIR}/baseq3 - ${INSTALL_DATA} ${DISTDIR}/pak-evq3.pk3 ${LIBDIR}/baseq3 + ${INSTALL_DATA} ${DISTDIR}/pak-evq3.pk3 ${DISTDIR}/pak-5evq3.pk3 \ + ${LIBDIR}/baseq3 +.for bin in ${Q3BIN} + ${INSTALL_PROGRAM} ${WRKSRC}/build/release/${bin} ${PREFIX}/bin +.endfor .if defined(WITH_GAMELIBS) || !defined(HAVE_VM_COMPILED) - ${INSTALL_PROGRAM} ${WRKSRC}/baseq3/*.so ${LIBDIR}/baseq3 +. for dir in baseq3 missionpack + ${MKDIR} ${LIBDIR}/${dir} + ${INSTALL_PROGRAM} ${WRKSRC}/build/release/${dir}/*.so ${LIBDIR}/${dir} +. endfor .endif .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} - cd ${WRKSRC} && ${INSTALL_DATA} ChangeLog.txt FEATURES.txt ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} .endif +maint-gen-distfile: + @if [ -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \ + ${ECHO_CMD} "ERROR: the distfile already exists."; \ + ${FALSE}; \ + fi + svn export svn://70.86.44.154/evolution/trunk/evq3 ${PORTNAME} + tar cjf ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ${PORTNAME} + ${RM} -rf ${PORTNAME} + .include <bsd.port.post.mk> diff --git a/games/evq3/distinfo b/games/evq3/distinfo index f49e46fdbbf1..817b031ab612 100644 --- a/games/evq3/distinfo +++ b/games/evq3/distinfo @@ -1,6 +1,9 @@ -MD5 (evq3-final-src.zip) = 54e0d7b4daafdcd5cf7f3319f725da1c -SHA256 (evq3-final-src.zip) = 33ece0a56eafa4dd6efab1c5f10a4bdd1a3b145ebf33b43fc06d18c3125dffef -SIZE (evq3-final-src.zip) = 3042231 +MD5 (evq3-1.3.20080810.tar.bz2) = 2d0eab746f9b1b781c807ed42a09a213 +SHA256 (evq3-1.3.20080810.tar.bz2) = e8b5abb757dd3afe185c82059cd1918e68af7ab1e4327523641aab800aa47214 +SIZE (evq3-1.3.20080810.tar.bz2) = 3334512 MD5 (pak-evq3.pk3) = 3ee963f2fa58bd36eb2538c1b2252753 SHA256 (pak-evq3.pk3) = 7d812e608b1117e28b427123a4546b9cc11fb68bb7097d52b58af42fb2a1d9f2 SIZE (pak-evq3.pk3) = 142174 +MD5 (pak-5evq3.pk3) = d1979c1f6202fe05d15f2501222edb2c +SHA256 (pak-5evq3.pk3) = 9a878f288fcec2e61964c7f3c28a55777695a4fc683d9e2d8d54ad3585ff85fa +SIZE (pak-5evq3.pk3) = 97738 diff --git a/games/evq3/files/patch-Makefile b/games/evq3/files/patch-Makefile new file mode 100644 index 000000000000..7eeb7f9bc508 --- /dev/null +++ b/games/evq3/files/patch-Makefile @@ -0,0 +1,348 @@ +--- ./Makefile.orig 2008-06-11 23:35:55.000000000 -0300 ++++ ./Makefile 2008-06-27 20:31:07.000000000 -0300 +@@ -23,29 +23,6 @@ + endif + endif + +-ifndef BUILD_STANDALONE +- BUILD_STANDALONE = +-endif +-ifndef BUILD_CLIENT +- BUILD_CLIENT = +-endif +-ifndef BUILD_CLIENT_SMP +- BUILD_CLIENT_SMP = +-endif +-ifndef BUILD_SERVER +- BUILD_SERVER = +-endif +-ifndef BUILD_GAME_SO +- BUILD_GAME_SO = +-endif +-ifndef BUILD_GAME_QVM +- BUILD_GAME_QVM = +-endif +- +-ifneq ($(PLATFORM),darwin) +- BUILD_CLIENT_SMP = 0 +-endif +- + ############################################################################# + # + # If you require a different configuration from the defaults below, create a +@@ -97,50 +74,25 @@ + GENERATE_DEPENDENCIES=1 + endif + +-ifndef USE_OPENAL +-USE_OPENAL=1 +-endif +- +-ifndef USE_OPENAL_DLOPEN +- ifeq ($(PLATFORM),mingw32) +- USE_OPENAL_DLOPEN=1 +- else +- USE_OPENAL_DLOPEN=0 +- endif +-endif +- +-ifndef USE_CURL +-USE_CURL=1 +-endif +- +-ifndef USE_CURL_DLOPEN +- ifeq ($(PLATFORM),mingw32) +- USE_CURL_DLOPEN=0 +- else +- USE_CURL_DLOPEN=1 +- endif +-endif +- +-ifndef USE_CODEC_VORBIS +-USE_CODEC_VORBIS=0 +-endif +- +-ifndef USE_MUMBLE +-USE_MUMBLE=1 +-endif +- +-ifndef USE_VOIP +-USE_VOIP=1 +-endif +- +-ifndef USE_LOCAL_HEADERS +-USE_LOCAL_HEADERS=1 +-endif ++BUILD_STANDALONE=0 ++BUILD_CLIENT?=0 ++BUILD_CLIENT_SMP?=0 ++BUILD_SERVER?=0 ++BUILD_GAME_SO?=0 ++BUILD_GAME_QVM=0 ++USE_OPENAL?=0 ++USE_OPENAL_DLOPEN?=0 ++USE_CURL?=0 ++USE_CURL_DLOPEN?=0 ++USE_CODEC_VORBIS?=0 ++USE_MUMBLE=0 ++USE_VOIP?=0 ++USE_LOCAL_HEADERS=0 + + ############################################################################# + +-BD=$(BUILD_DIR)/debug-$(PLATFORM)-$(ARCH) +-BR=$(BUILD_DIR)/release-$(PLATFORM)-$(ARCH) ++BD=$(BUILD_DIR)/debug ++BR=$(BUILD_DIR)/release + CDIR=$(MOUNT_DIR)/client + SDIR=$(MOUNT_DIR)/server + RDIR=$(MOUNT_DIR)/renderer +@@ -493,15 +445,11 @@ + + ifeq ($(PLATFORM),freebsd) + +- ifneq (,$(findstring alpha,$(shell uname -m))) +- ARCH=axp +- else #default to i386 +- ARCH=i386 +- endif #alpha test +- ++ BASE_CFLAGS = -DARCH='\"$(ARCH)\"' -I$(LOCALBASE)/include -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ ++ -DLIBDIR='\"$(LIBDIR)\"' -DUSE_ICON $(shell sdl-config --cflags) + +- BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ +- -DUSE_ICON $(shell sdl-config --cflags) ++ DEBUG_CFLAGS=$(BASE_CFLAGS) -g ++ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -pipe + + ifeq ($(USE_OPENAL),1) + BASE_CFLAGS += -DUSE_OPENAL +@@ -514,23 +462,18 @@ + BASE_CFLAGS += -DUSE_CODEC_VORBIS + endif + +- ifeq ($(ARCH),axp) +- BASE_CFLAGS += -DNO_VM_COMPILED +- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \ +- -fomit-frame-pointer -fexpensive-optimizations +- else +- ifeq ($(ARCH),i386) +- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro \ +- -march=pentium -fomit-frame-pointer -pipe -ffast-math \ +- -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ +- -funroll-loops -fstrength-reduce +- HAVE_VM_COMPILED=true +- else +- BASE_CFLAGS += -DNO_VM_COMPILED +- endif ++ ifeq ($(USE_OPTIMIZED_CFLAGS),1) ++ RELEASE_CFLAGS+=-O3 -ffast-math -funroll-loops -fomit-frame-pointer \ ++ -fexpensive-optimizations ++ ifeq ($(ARCH),i386) ++ RELEASE_CFLAGS+=-falign-loops=2 -falign-jumps=2 -falign-functions=2 \ ++ -fstrength-reduce ++ endif + endif + +- DEBUG_CFLAGS=$(BASE_CFLAGS) -g ++ ifneq ($(HAVE_VM_COMPILED),true) ++ BASE_CFLAGS += -DNO_VM_COMPILED ++ endif + + SHLIBEXT=so + SHLIBCFLAGS=-fPIC +@@ -540,13 +483,23 @@ + # don't need -ldl (FreeBSD) + LDFLAGS=-lm + +- CLIENT_LDFLAGS = ++ CLIENT_LDFLAGS = -L$(LOCALBASE)/lib + + CLIENT_LDFLAGS += $(shell sdl-config --libs) -lGL + + ifeq ($(USE_OPENAL),1) ++ CLIENT_LDFLAGS += $(THREAD_LDFLAGS) + ifneq ($(USE_OPENAL_DLOPEN),1) +- CLIENT_LDFLAGS += $(THREAD_LDFLAGS) -lopenal ++ CLIENT_LDFLAGS += -lopenal ++ endif ++ endif ++ ++ ifeq ($(USE_CURL),1) ++ BASE_CFLAGS += -DUSE_CURL=1 ++ ifneq ($(USE_CURL_DLOPEN),1) ++ CLIENT_LDFLAGS += -lcurl ++ else ++ BASE_CFLAGS += -DUSE_CURL_DLOPEN=1 + endif + endif + +@@ -759,24 +712,24 @@ + TARGETS = + + ifneq ($(BUILD_SERVER),0) +- TARGETS += $(B)/evq3ded.$(ARCH)$(BINEXT) ++ TARGETS += $(B)/evq3ded$(BINEXT) + endif + + ifneq ($(BUILD_CLIENT),0) +- TARGETS += $(B)/evq3.$(ARCH)$(BINEXT) ++ TARGETS += $(B)/evq3$(BINEXT) + ifneq ($(BUILD_CLIENT_SMP),0) +- TARGETS += $(B)/evq3-smp.$(ARCH)$(BINEXT) ++ TARGETS += $(B)/evq3-smp$(BINEXT) + endif + endif + + ifneq ($(BUILD_GAME_SO),0) + TARGETS += \ +- $(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) \ +- $(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) \ +- $(B)/baseq3/ui$(ARCH).$(SHLIBEXT) \ +- $(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) \ +- $(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) \ +- $(B)/missionpack/ui$(ARCH).$(SHLIBEXT) ++ $(B)/baseq3/cgame.$(SHLIBEXT) \ ++ $(B)/baseq3/qagame.$(SHLIBEXT) \ ++ $(B)/baseq3/ui.$(SHLIBEXT) \ ++ $(B)/missionpack/cgame.$(SHLIBEXT) \ ++ $(B)/missionpack/qagame.$(SHLIBEXT) \ ++ $(B)/missionpack/ui.$(SHLIBEXT) + endif + + ifneq ($(BUILD_GAME_QVM),0) +@@ -1388,9 +1341,15 @@ + ifeq ($(ARCH),x86) + Q3OBJ += $(B)/client/vm_x86.o + endif ++ ifeq ($(ARCH),amd64) ++ Q3OBJ += $(B)/client/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o ++ endif + ifeq ($(ARCH),x86_64) + Q3OBJ += $(B)/client/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o + endif ++ ifeq ($(ARCH),powerpc) ++ Q3OBJ += $(B)/client/vm_ppc.o ++ endif + ifeq ($(ARCH),ppc) + Q3OBJ += $(B)/client/vm_ppc.o + endif +@@ -1416,12 +1375,12 @@ + Q3POBJ_SMP += \ + $(B)/clientsmp/sdl_glimp.o + +-$(B)/evq3.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN) ++$(B)/evq3$(BINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN) + $(echo_cmd) "LD $@" + $(Q)$(CC) -o $@ $(Q3OBJ) $(Q3POBJ) $(CLIENT_LDFLAGS) \ + $(LDFLAGS) $(LIBSDLMAIN) + +-$(B)/evq3-smp.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN) ++$(B)/evq3-smp$(BINEXT): $(Q3OBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN) + $(echo_cmd) "LD $@" + $(Q)$(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(CLIENT_LDFLAGS) \ + $(THREAD_LDFLAGS) $(LDFLAGS) $(LIBSDLMAIN) +@@ -1529,9 +1488,15 @@ + ifeq ($(ARCH),x86) + Q3DOBJ += $(B)/ded/vm_x86.o + endif ++ ifeq ($(ARCH),amd64) ++ Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o ++ endif + ifeq ($(ARCH),x86_64) + Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o + endif ++ ifeq ($(ARCH),powerpc) ++ Q3DOBJ += $(B)/ded/vm_ppc.o ++ endif + ifeq ($(ARCH),ppc) + Q3DOBJ += $(B)/ded/vm_ppc.o + endif +@@ -1548,7 +1513,7 @@ + $(B)/ded/con_tty.o + endif + +-$(B)/evq3ded.$(ARCH)$(BINEXT): $(Q3DOBJ) ++$(B)/evq3ded$(BINEXT): $(Q3DOBJ) + $(echo_cmd) "LD $@" + $(Q)$(CC) -o $@ $(Q3DOBJ) $(LDFLAGS) + +@@ -1588,7 +1553,7 @@ + Q3CGOBJ = $(Q3CGOBJ_) $(B)/baseq3/cgame/cg_syscalls.o + Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm) + +-$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT): $(Q3CGOBJ) ++$(B)/baseq3/cgame.$(SHLIBEXT): $(Q3CGOBJ) + $(echo_cmd) "LD $@" + $(Q)$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ) + +@@ -1632,7 +1597,7 @@ + MPCGOBJ = $(MPCGOBJ_) $(B)/missionpack/cgame/cg_syscalls.o + MPCGVMOBJ = $(MPCGOBJ_:%.o=%.asm) + +-$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT): $(MPCGOBJ) ++$(B)/missionpack/cgame.$(SHLIBEXT): $(MPCGOBJ) + $(echo_cmd) "LD $@" + $(Q)$(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ) + +@@ -1685,7 +1650,7 @@ + Q3GOBJ = $(Q3GOBJ_) $(B)/baseq3/game/g_syscalls.o + Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm) + +-$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT): $(Q3GOBJ) ++$(B)/baseq3/qagame.$(SHLIBEXT): $(Q3GOBJ) + $(echo_cmd) "LD $@" + $(Q)$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ) + +@@ -1736,7 +1701,7 @@ + MPGOBJ = $(MPGOBJ_) $(B)/missionpack/game/g_syscalls.o + MPGVMOBJ = $(MPGOBJ_:%.o=%.asm) + +-$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT): $(MPGOBJ) ++$(B)/missionpack/qagame.$(SHLIBEXT): $(MPGOBJ) + $(echo_cmd) "LD $@" + $(Q)$(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ) + +@@ -1799,7 +1764,7 @@ + Q3UIOBJ = $(Q3UIOBJ_) $(B)/missionpack/ui/ui_syscalls.o + Q3UIVMOBJ = $(Q3UIOBJ_:%.o=%.asm) + +-$(B)/baseq3/ui$(ARCH).$(SHLIBEXT): $(Q3UIOBJ) ++$(B)/baseq3/ui.$(SHLIBEXT): $(Q3UIOBJ) + $(echo_cmd) "LD $@" + $(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ) + +@@ -1827,7 +1792,7 @@ + MPUIOBJ = $(MPUIOBJ_) $(B)/missionpack/ui/ui_syscalls.o + MPUIVMOBJ = $(MPUIOBJ_:%.o=%.asm) + +-$(B)/missionpack/ui$(ARCH).$(SHLIBEXT): $(MPUIOBJ) ++$(B)/missionpack/ui.$(SHLIBEXT): $(MPUIOBJ) + $(echo_cmd) "LD $@" + $(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ) + +@@ -2018,18 +1983,18 @@ + endif + + ifneq ($(BUILD_GAME_SO),0) +- $(INSTALL) -s -m 0755 $(BR)/baseq3/cgame$(ARCH).$(SHLIBEXT) \ ++ $(INSTALL) -s -m 0755 $(BR)/baseq3/cgame.$(SHLIBEXT) \ + $(COPYDIR)/baseq3/. +- $(INSTALL) -s -m 0755 $(BR)/baseq3/qagame$(ARCH).$(SHLIBEXT) \ ++ $(INSTALL) -s -m 0755 $(BR)/baseq3/qagame.$(SHLIBEXT) \ + $(COPYDIR)/baseq3/. +- $(INSTALL) -s -m 0755 $(BR)/baseq3/ui$(ARCH).$(SHLIBEXT) \ ++ $(INSTALL) -s -m 0755 $(BR)/baseq3/ui.$(SHLIBEXT) \ + $(COPYDIR)/baseq3/. + -$(MKDIR) -p -m 0755 $(COPYDIR)/missionpack +- $(INSTALL) -s -m 0755 $(BR)/missionpack/cgame$(ARCH).$(SHLIBEXT) \ ++ $(INSTALL) -s -m 0755 $(BR)/missionpack/cgame.$(SHLIBEXT) \ + $(COPYDIR)/missionpack/. +- $(INSTALL) -s -m 0755 $(BR)/missionpack/qagame$(ARCH).$(SHLIBEXT) \ ++ $(INSTALL) -s -m 0755 $(BR)/missionpack/qagame.$(SHLIBEXT) \ + $(COPYDIR)/missionpack/. +- $(INSTALL) -s -m 0755 $(BR)/missionpack/ui$(ARCH).$(SHLIBEXT) \ ++ $(INSTALL) -s -m 0755 $(BR)/missionpack/ui.$(SHLIBEXT) \ + $(COPYDIR)/missionpack/. + endif + diff --git a/games/evq3/files/patch-SConscript_cgame b/games/evq3/files/patch-SConscript_cgame deleted file mode 100644 index c8791ad9d5fb..000000000000 --- a/games/evq3/files/patch-SConscript_cgame +++ /dev/null @@ -1,15 +0,0 @@ ---- ./SConscript_cgame.orig Mon Apr 16 17:45:23 2007 -+++ ./SConscript_cgame Mon Apr 16 17:45:23 2007 -@@ -36,10 +36,6 @@ - - cgame_env = env.Copy() - --if env['arch'] == 'linux-i386': -- cgame_env.SharedLibrary('cgame', [cgame_src, dll_src], LIBS=['m']) -- cgame_env.InstallAs('#baseq3/cgamei386.so', 'libcgame.so') -- --elif env['arch'] == 'linux-x86_64': -+if sys.platform != 'win32': - cgame_env.SharedLibrary('cgame', [cgame_src, dll_src], LIBS=['m']) -- cgame_env.InstallAs('#baseq3/cgamex86_64.so', 'libcgame.so') -+ cgame_env.InstallAs('#baseq3/cgame.so', 'libcgame.so') diff --git a/games/evq3/files/patch-SConscript_game b/games/evq3/files/patch-SConscript_game deleted file mode 100644 index 2db8b2a67ec7..000000000000 --- a/games/evq3/files/patch-SConscript_game +++ /dev/null @@ -1,23 +0,0 @@ ---- SConscript_game.orig Fri Apr 20 18:09:05 2007 -+++ SConscript_game Fri Apr 20 18:10:16 2007 -@@ -79,16 +79,10 @@ - - game_env = env.Copy() - --if env['arch'] == 'linux-i386': -- if env['lua'] == 1: -+if sys.platform != 'win32': -+ if env['lua'] != 0: - game_env.Append(CCFLAGS='-DLUA') -- game_env.Append(CCFLAGS='-Ilua/include') -- game_env.SharedLibrary('game', [game_src, dll_src, lua_src], LIBS=['m']) -+ game_env.SharedLibrary('game', [game_src, dll_src], LIBS=['m', 'lua']) - else: - game_env.SharedLibrary('game', [game_src, dll_src], LIBS=['m']) -- game_env.InstallAs('#baseq3/qagamei386.so', 'libgame.so') -- --elif env['arch'] == 'linux-x86_64': -- game_env.SharedLibrary('game', [game_src, dll_src], LIBS=['m']) -- game_env.InstallAs('#baseq3/qagamex86_64.so', 'libgame.so') -- -+ game_env.InstallAs('#baseq3/qagame.so', 'libgame.so') diff --git a/games/evq3/files/patch-SConscript_quake3 b/games/evq3/files/patch-SConscript_quake3 deleted file mode 100644 index 4ce53f8ced65..000000000000 --- a/games/evq3/files/patch-SConscript_quake3 +++ /dev/null @@ -1,52 +0,0 @@ ---- SConscript_quake3.orig Mon Jun 4 23:40:27 2007 -+++ SConscript_quake3 Mon Jun 4 23:44:57 2007 -@@ -1,4 +1,4 @@ --import os, string, sys -+import os, string, sys, fnmatch - - Import('env') - -@@ -169,25 +169,29 @@ - quake3_env.Append(CCFLAGS='-DBOTLIB') - quake3_env.Append(CCFLAGS='-DC_ONLY') - --if env['arch'] == 'linux-i386': -- quake3_env.Append(LIBPATH='/usr/X11R6/lib') -+if sys.platform != 'win32': - quake3_env.Append(LIBS=['X11', 'Xext', 'Xxf86dga', 'Xxf86vm']) -- quake3_env.Append(LIBS=['dl', 'm']) -+ quake3_env.Append(LIBS=['m', 'vorbisfile']) -+ -+ # The "dl" library is needed on Linux -+ if fnmatch.fnmatch(sys.platform, 'linux*'): -+ quake3_env.Append(LIBS=['dl']) - -- if env['vm'] == 1: -- vm_src += ['engine/qcommon/vm_x86.c'] -+ if env['vm'] != 0 and env['vm_archs'].count(env['arch']) > 0: -+ vm_src += ['engine/qcommon/vm_' + env['arch'] + '.c'] - else: -- quake3_env.Append(CCFLAGS='-DDLL_ONLY') -- -- if env['smp'] == 1: -+ quake3_env.Append(CCFLAGS='-DNO_VM_COMPILED') -+ -+ if env['smp'] != 0: - quake3_env.Append(CCFLAGS='-DSMP') - quake3_env.Append(LIBS=['pthread']) - - if env['sound'] == 'oss': -- quake3_env.Program('quake3.x86', [quake3_src, unix_src, linux_src, vm_src, 'engine/unix/linux_snd.c']) -+ quake3_env.Program('quake3', [quake3_src, unix_src, linux_src, vm_src, 'engine/unix/linux_snd.c']) - else: -- quake3_env.Append(CCFLAGS='`sdl-config --cflags`') -- quake3_env.Append(LINKFLAGS='`sdl-config --libs`') -- quake3_env.Program('quake3.x86', [quake3_src, unix_src, linux_src, vm_src, 'engine/unix/sdl_snd.c']) -- -- quake3_env.Install('#', 'quake3.x86') -+ quake3_env.Append(CCFLAGS='-DUSE_SDL_SOUND') -+ quake3_env.ParseConfig('sdl-config --cflags') -+ quake3_env.ParseConfig('sdl-config --libs') -+ quake3_env.Program('quake3', [quake3_src, unix_src, linux_src, vm_src, 'engine/unix/sdl_snd.c']) -+ -+ quake3_env.Install('#', 'quake3') diff --git a/games/evq3/files/patch-SConscript_quake3-server b/games/evq3/files/patch-SConscript_quake3-server deleted file mode 100644 index baec1f19f2df..000000000000 --- a/games/evq3/files/patch-SConscript_quake3-server +++ /dev/null @@ -1,59 +0,0 @@ ---- SConscript_quake3-server.orig Mon Jun 4 23:40:27 2007 -+++ SConscript_quake3-server Mon Jun 4 23:45:22 2007 -@@ -1,4 +1,4 @@ --import os, string, sys -+import os, string, sys, fnmatch - - Import('env') - -@@ -30,8 +30,8 @@ - 'engine/server/sv_net_chan.c', - 'engine/server/sv_snapshot.c', - 'engine/server/sv_world.c', --'engine/game/q_math.c', --'engine/game/q_shared.c', -+'engine/qcommon/q_math.c', -+'engine/qcommon/q_shared.c', - 'engine/qcommon/unzip.c', - 'engine/botlib/be_aas_bspq3.c', - 'engine/botlib/be_aas_cluster.c', -@@ -70,7 +70,7 @@ - ] - - linux_src = [ --'engine/unix/linux_common.c', -+#'engine/unix/linux_common.c', - 'engine/unix/linux_signals.c'] - - vm_src = [ -@@ -82,18 +82,17 @@ - quake3_server_env.Append(CCFLAGS='-DC_ONLY') - quake3_server_env.Append(CCFLAGS='-DDEDICATED') - --if env['arch'] == 'linux-i386': -- if env['vm'] == 1: -- vm_src += ['engine/qcommon/vm_x86.c'] -+if sys.platform != 'win32': -+ quake3_server_env.Append(LIBS=['m']) -+ -+ # The "dl" library is needed on Linux -+ if fnmatch.fnmatch(sys.platform, 'linux*'): -+ quake3_server_env.Append(LIBS=['dl']) -+ -+ if env['vm'] != 0 and env['vm_archs'].count(env['arch']) > 0: -+ vm_src += ['engine/qcommon/vm_' + env['arch'] + '.c'] - else: -- quake3_server_env.Append(CCFLAGS='-DDLL_ONLY') -+ quake3_server_env.Append(CCFLAGS='-DNO_VM_COMPILED') - -- quake3_server_env.Append(LIBS=['dl', 'm']) -- quake3_server_env.Program('quake3-server.x86', [quake3_server_src, unix_src, linux_src, vm_src]) -- quake3_server_env.Install('#', 'quake3-server.x86') -- --elif env['arch'] == 'linux-x86_64': -- quake3_server_env.Append(CCFLAGS='-DDLL_ONLY') -- quake3_server_env.Append(LIBS=['dl', 'm']) -- quake3_server_env.Program('quake3-server.x86_64', [quake3_server_src, unix_src, linux_src, vm_src]) -- quake3_server_env.Install('#', 'quake3-server.x86_64') -+ quake3_server_env.Program('quake3-server', [quake3_server_src, unix_src, linux_src, vm_src]) -+ quake3_server_env.Install('#', 'quake3-server') diff --git a/games/evq3/files/patch-SConscript_ui b/games/evq3/files/patch-SConscript_ui deleted file mode 100644 index 1f1e38a3f2c9..000000000000 --- a/games/evq3/files/patch-SConscript_ui +++ /dev/null @@ -1,23 +0,0 @@ ---- SConscript_ui.orig Fri Apr 20 16:56:15 2007 -+++ SConscript_ui Fri Apr 20 17:03:27 2007 -@@ -8,7 +8,6 @@ - 'engine/q3_ui/ui_addbots.c', - 'engine/q3_ui/ui_atoms.c', - 'engine/q3_ui/ui_cdkey.c', --'engine/q3_ui/ui_cinematics.c', - 'engine/q3_ui/ui_confirm.c', - 'engine/q3_ui/ui_connect.c', - 'engine/q3_ui/ui_controls2.c', -@@ -60,10 +59,6 @@ - - ui_env = env.Copy() - --if env['arch'] == 'linux-i386': -- ui_env.SharedLibrary('ui', [ui_src, dll_src], LIBS=['m']) -- ui_env.InstallAs('#baseq3/uii386.so', 'libui.so') -- --elif env['arch'] == 'linux-x86_64': -+if sys.platform != 'win32': - ui_env.SharedLibrary('ui', [ui_src, dll_src], LIBS=['m']) -- ui_env.InstallAs('#baseq3/uix86_64.so', 'libui.so') -+ ui_env.InstallAs('#baseq3/ui.so', 'libui.so') diff --git a/games/evq3/files/patch-SConstruct b/games/evq3/files/patch-SConstruct deleted file mode 100644 index 876826fe530e..000000000000 --- a/games/evq3/files/patch-SConstruct +++ /dev/null @@ -1,106 +0,0 @@ ---- SConstruct.orig Wed May 2 01:54:48 2007 -+++ SConstruct Wed May 2 01:59:33 2007 -@@ -1,4 +1,4 @@ --import os, string, sys -+import os, string, sys, commands, fnmatch - import SCons - import SCons.Errors - -@@ -6,7 +6,10 @@ - # Set configuration options - # - opts = Options('quake3.conf') --opts.Add(EnumOption('arch', 'Choose architecture to build for', 'linux-i386', allowed_values=('linux-i386', 'linux-x86_64'))) -+opts.Add('CC', 'C compiler') -+opts.Add('CCFLAGS', 'C compiler flags', Split('')) -+opts.Add('CPPPATH', 'Compiler include path', Split('')) -+opts.Add('LIBPATH', 'Linker library path', Split('')) - opts.Add(EnumOption('warnings', 'Choose warnings level', '1', allowed_values=('0', '1', '2'))) - opts.Add(EnumOption('debug', 'Set to >= 1 to build for debug', '0', allowed_values=('0', '1', '2', '3'))) - opts.Add(EnumOption('optimize', 'Set to >= 1 to build with general optimizations', '2', allowed_values=('0', '1', '2', '3', '4', '5', '6'))) -@@ -15,6 +18,7 @@ - opts.Add(BoolOption('lua', 'Set to 1 to compile qagame with Lua scripting support', 0)) - opts.Add(BoolOption('vm', 'Set to 1 to compile engine with virtual machine support', 1)) - opts.Add(BoolOption('smp', 'Set to 1 to compile engine with symetric multiprocessor support', 0)) -+opts.Add(BoolOption('gamelibs', 'Set to 1 to compile .so game libraries (cgame, game and ui) when they are not needed (i.e. when "vm" is 1 and supported for current arch)', 0)) - - # - # Initialize compiler environment base -@@ -24,15 +28,33 @@ - else: - env = Environment(ENV = {'PATH' : os.environ['PATH']}, options = opts) - --Help(opts.GenerateHelpText(env)) -+ # Some values need to be splitten -+ env['CCFLAGS'] = Split(env['CCFLAGS']) -+ env['CPPPATH'] = Split(env['CPPPATH']) -+ env['LIBPATH'] = Split(env['LIBPATH']) - -+ # Supported VM architectures (Linux) -+ env['vm_archs'] = ['x86', 'x86_64', 'ppc'] -+ env['arch'] = commands.getoutput('uname -m') -+ -+ # Equivalent arch names in FreeBSD -+ if fnmatch.fnmatch(sys.platform, 'freebsd*'): -+ vm_archs_freebsd = {'i386' : 'x86', 'amd64' : 'x86_64', 'powerpc' : 'ppc'} -+ if vm_archs_freebsd.has_key(env['arch']): -+ env['arch'] = vm_archs_freebsd[env['arch']] -+ -+ # Build game libraries if VM is not supported in current arch -+ if env['vm_archs'].count(env['arch']) == 0 or env['vm'] == 0: -+ env['gamelibs'] = 1 -+ -+Help(opts.GenerateHelpText(env)) - - # - # Set common compiler flags - # - print 'compiling for architecture ', env['arch'] - --env.Append(CCFLAGS = '-pipe -fsigned-char') -+env.Append(CCFLAGS = Split('-pipe -fsigned-char')) - - if env['warnings'] == '1': - env.Append(CCFLAGS = '-Wall') -@@ -45,7 +67,7 @@ - env.Append(CCFLAGS = '-DNDEBUG') - - if env['optimize'] != '0': -- env.Append(CCFLAGS = '-O${optimize} -ffast-math -fno-strict-aliasing -funroll-loops') -+ env.Append(CCFLAGS = Split('-O${optimize} -ffast-math -fno-strict-aliasing -funroll-loops')) - - if env['simd'] == 'sse': - env.Append(CCFLAGS = '-DSIMD_SSE') -@@ -54,15 +76,12 @@ - - conf = Configure(env) - --if sys.platform == 'linux2' or sys.platform == 'linux-i386': -+# The "dl" library is needed on Linux -+if fnmatch.fnmatch(sys.platform, 'linux*'): - if not conf.CheckLib('dl', autoadd=0): - print 'Did not find libdl.a, exiting!' - Exit(1) - --if not conf.CheckLib('m', autoadd=0): -- print 'Did not find libm.a or m.lib, exiting!' -- Exit(1) -- - env = conf.Finish() - - # Save options -@@ -70,8 +89,10 @@ - - Export('env') - --SConscript('SConscript_quake3-server', build_dir='build/quake3-server', duplicate=0) - SConscript('SConscript_quake3', build_dir='build/quake3', duplicate=0) --SConscript('SConscript_cgame', build_dir='build/cgame', duplicate=0) --SConscript('SConscript_game', build_dir='build/game', duplicate=0) --SConscript('SConscript_ui', build_dir='build/ui', duplicate=0) -+SConscript('SConscript_quake3-server', build_dir='build/quake3-server', duplicate=0) -+ -+if env['gamelibs'] != 0: -+ SConscript('SConscript_cgame', build_dir='build/cgame', duplicate=0) -+ SConscript('SConscript_game', build_dir='build/game', duplicate=0) -+ SConscript('SConscript_ui', build_dir='build/ui', duplicate=0) diff --git a/games/evq3/files/patch-code__qcommon__files.c b/games/evq3/files/patch-code__qcommon__files.c new file mode 100644 index 000000000000..54a1964bb30e --- /dev/null +++ b/games/evq3/files/patch-code__qcommon__files.c @@ -0,0 +1,26 @@ +--- ./code/qcommon/files.c.orig 2008-06-11 18:33:07.000000000 -0300 ++++ ./code/qcommon/files.c 2008-06-27 20:35:32.000000000 -0300 +@@ -2732,6 +2732,7 @@ + if (fs_basepath->string[0]) { + FS_AddGameDirectory( fs_basepath->string, gameName ); + } ++ FS_AddGameDirectory( LIBDIR, gameName ); + // fs_homepath is somewhat particular to *nix systems, only add if relevant + + #ifdef MACOS_X +@@ -2751,6 +2752,7 @@ + if (fs_basepath->string[0]) { + FS_AddGameDirectory(fs_basepath->string, fs_basegame->string); + } ++ FS_AddGameDirectory(LIBDIR, fs_basegame->string); + if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { + FS_AddGameDirectory(fs_homepath->string, fs_basegame->string); + } +@@ -2761,6 +2763,7 @@ + if (fs_basepath->string[0]) { + FS_AddGameDirectory(fs_basepath->string, fs_gamedirvar->string); + } ++ FS_AddGameDirectory(LIBDIR, fs_gamedirvar->string); + if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { + FS_AddGameDirectory(fs_homepath->string, fs_gamedirvar->string); + } diff --git a/games/evq3/files/patch-code__qcommon__q_platform.h b/games/evq3/files/patch-code__qcommon__q_platform.h new file mode 100644 index 000000000000..debf9384f521 --- /dev/null +++ b/games/evq3/files/patch-code__qcommon__q_platform.h @@ -0,0 +1,15 @@ +--- ./code/qcommon/q_platform.h.orig 2008-06-11 18:33:07.000000000 -0300 ++++ ./code/qcommon/q_platform.h 2008-06-27 20:26:36.000000000 -0300 +@@ -194,11 +194,7 @@ + #define ID_INLINE inline + #define PATH_SEP '/' + +-#ifdef __i386__ +-#define ARCH_STRING "i386" +-#elif defined __axp__ +-#define ARCH_STRING "alpha" +-#endif ++#define ARCH_STRING ARCH + + #if BYTE_ORDER == BIG_ENDIAN + #define Q3_BIG_ENDIAN diff --git a/games/evq3/files/patch-engine__client__cl_curl.c b/games/evq3/files/patch-engine__client__cl_curl.c deleted file mode 100644 index d6d5ca8e2ca2..000000000000 --- a/games/evq3/files/patch-engine__client__cl_curl.c +++ /dev/null @@ -1,20 +0,0 @@ ---- ./engine/client/cl_curl.c.orig Sat Mar 31 20:25:28 2007 -+++ ./engine/client/cl_curl.c Mon Apr 16 23:56:57 2007 -@@ -41,7 +41,7 @@ - #define SYMLOAD(x,y) GetProcAddress(x,y) - #define OBJFREE(x) FreeLibrary(x) - --#elif defined __linux__ || defined __FreeBSD__ || defined MACOS_X || defined __sun -+#elif defined __unix__ || defined MACOS_X || defined __sun - #include <dlfcn.h> - #define OBJTYPE void * - #define OBJLOAD(x) dlopen(x, RTLD_LAZY | RTLD_GLOBAL) -@@ -52,7 +52,7 @@ - #error "Your platform has no lib loading code or it is disabled" - #endif - --#if defined __linux__ || defined __FreeBSD__ || defined MACOS_X -+#if defined __unix__ || defined MACOS_X - #include <unistd.h> - #include <sys/types.h> - #endif diff --git a/games/evq3/files/patch-engine__client__qal.c b/games/evq3/files/patch-engine__client__qal.c deleted file mode 100644 index 2f513df8e634..000000000000 --- a/games/evq3/files/patch-engine__client__qal.c +++ /dev/null @@ -1,20 +0,0 @@ ---- ./engine/client/qal.c.orig Sat Mar 31 20:25:28 2007 -+++ ./engine/client/qal.c Mon Apr 16 23:57:10 2007 -@@ -44,7 +44,7 @@ - #define SYMLOAD(x,y) GetProcAddress(x,y) - #define OBJFREE(x) FreeLibrary(x) - --#elif defined __linux__ || defined __FreeBSD__ || defined MACOS_X || defined __sun -+#elif defined __unix__ || defined MACOS_X || defined __sun - #include <dlfcn.h> - #define OBJTYPE void * - #define OBJLOAD(x) dlopen(x, RTLD_LAZY | RTLD_GLOBAL) -@@ -55,7 +55,7 @@ - #error "Your platform has no lib loading code or it is disabled" - #endif - --#if defined __linux__ || defined __FreeBSD__ || defined MACOS_X -+#if defined __unix__ || defined MACOS_X - #include <unistd.h> - #include <sys/types.h> - #endif diff --git a/games/evq3/files/patch-engine__qcommon__common.c b/games/evq3/files/patch-engine__qcommon__common.c deleted file mode 100644 index e0ae33cbca70..000000000000 --- a/games/evq3/files/patch-engine__qcommon__common.c +++ /dev/null @@ -1,10 +0,0 @@ ---- engine/qcommon/common.c.orig Thu Apr 19 21:42:48 2007 -+++ engine/qcommon/common.c Thu Apr 19 21:49:46 2007 -@@ -23,6 +23,7 @@ - - #include "q_shared.h" - #include "qcommon.h" -+#include <sys/types.h> - #include <setjmp.h> - - int demo_protocols[] = diff --git a/games/evq3/files/patch-engine__qcommon__files.c b/games/evq3/files/patch-engine__qcommon__files.c deleted file mode 100644 index 3bfdac621e1f..000000000000 --- a/games/evq3/files/patch-engine__qcommon__files.c +++ /dev/null @@ -1,34 +0,0 @@ ---- engine/qcommon/files.c.orig Fri Apr 20 16:29:25 2007 -+++ engine/qcommon/files.c Fri Apr 20 16:50:00 2007 -@@ -2798,6 +2798,7 @@ - fs_debug = Cvar_Get( "fs_debug", "0", 0 ); - fs_copyfiles = Cvar_Get( "fs_copyfiles", "0", CVAR_INIT ); - fs_cdpath = Cvar_Get ("fs_cdpath", Sys_DefaultCDPath(), CVAR_INIT ); -+ Sys_SetDefaultInstallPath(DATADIR); - fs_basepath = Cvar_Get ("fs_basepath", Sys_DefaultInstallPath(), CVAR_INIT ); - fs_basegame = Cvar_Get ("fs_basegame", "", CVAR_INIT ); - homePath = Sys_DefaultHomePath(); -@@ -2815,6 +2816,7 @@ - if (fs_basepath->string[0]) { - FS_AddGameDirectory( fs_basepath->string, gameName ); - } -+ FS_AddGameDirectory( LIBDIR, gameName ); - // fs_homepath is somewhat particular to *nix systems, only add if relevant - // NOTE: same filtering below for mods and basegame - if (fs_basepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { -@@ -2829,6 +2831,7 @@ - if (fs_basepath->string[0]) { - FS_AddGameDirectory(fs_basepath->string, fs_basegame->string); - } -+ FS_AddGameDirectory(LIBDIR, fs_basegame->string); - if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { - FS_AddGameDirectory(fs_homepath->string, fs_basegame->string); - } -@@ -2842,6 +2845,7 @@ - if (fs_basepath->string[0]) { - FS_AddGameDirectory(fs_basepath->string, fs_gamedirvar->string); - } -+ FS_AddGameDirectory(LIBDIR, fs_basegame->string); - if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { - FS_AddGameDirectory(fs_homepath->string, fs_gamedirvar->string); - } diff --git a/games/evq3/files/patch-engine__qcommon__q_math.c b/games/evq3/files/patch-engine__qcommon__q_math.c deleted file mode 100644 index f90e3b1c1abe..000000000000 --- a/games/evq3/files/patch-engine__qcommon__q_math.c +++ /dev/null @@ -1,20 +0,0 @@ ---- ./engine/qcommon/q_math.c.orig Tue Apr 3 21:05:30 2007 -+++ ./engine/qcommon/q_math.c Mon Apr 16 23:57:25 2007 -@@ -651,7 +651,7 @@ - y = y * (threehalfs - (x2 * y * y)); // 1st iteration - // y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed - #ifndef Q3_VM --#ifdef __linux__ -+#ifdef __unix__ - assert(!isnan(y)); // bk010122 - FPE? - #endif - #endif -@@ -819,7 +819,7 @@ - } - - --#if !( (defined __linux__ || __FreeBSD__) && (defined __i386__) && (!defined C_ONLY)) // rb010123 -+#if !( (defined __unix__) && (defined __i386__) && (!defined C_ONLY)) // rb010123 - - #if defined __LCC__ || defined C_ONLY || !id386 || defined __VECTORC - diff --git a/games/evq3/files/patch-engine__qcommon__q_platform.h b/games/evq3/files/patch-engine__qcommon__q_platform.h deleted file mode 100644 index a20cb022c20f..000000000000 --- a/games/evq3/files/patch-engine__qcommon__q_platform.h +++ /dev/null @@ -1,18 +0,0 @@ ---- ./engine/qcommon/q_platform.h.orig Sat Dec 16 17:45:12 2006 -+++ ./engine/qcommon/q_platform.h Sun Apr 22 17:08:47 2007 -@@ -178,8 +178,14 @@ - - #ifdef __i386__ - #define ARCH_STRING "i386" --#elif defined __axp__ -+#elif defined __alpha__ - #define ARCH_STRING "alpha" -+#elif defined __amd64__ -+#define ARCH_STRING "amd64" -+#elif defined __sparc64__ -+#define ARCH_STRING "sparc64" -+#else -+#define ARCH_STRING "unknown" - #endif - - #if BYTE_ORDER == BIG_ENDIAN diff --git a/games/evq3/files/patch-engine__qcommon__vm_x86.c b/games/evq3/files/patch-engine__qcommon__vm_x86.c deleted file mode 100644 index d5b3b259f358..000000000000 --- a/games/evq3/files/patch-engine__qcommon__vm_x86.c +++ /dev/null @@ -1,12 +0,0 @@ ---- ./engine/qcommon/vm_x86.c.orig Sat Dec 16 17:45:12 2006 -+++ ./engine/qcommon/vm_x86.c Tue Apr 17 00:09:12 2007 -@@ -62,7 +62,9 @@ - - static int *instructionPointers = NULL; - -+#ifndef __FreeBSD__ - #define FTOL_PTR -+#endif - - #ifdef _MSC_VER - diff --git a/games/evq3/files/patch-engine__renderer__qgl.h b/games/evq3/files/patch-engine__renderer__qgl.h deleted file mode 100644 index 5ace9a68199e..000000000000 --- a/games/evq3/files/patch-engine__renderer__qgl.h +++ /dev/null @@ -1,40 +0,0 @@ ---- ./engine/renderer/qgl.h.orig Sun Mar 25 16:56:34 2007 -+++ ./engine/renderer/qgl.h Mon Apr 16 23:58:33 2007 -@@ -45,7 +45,7 @@ - - #include "macosx_glimp.h" - --#elif defined( __linux__ ) -+#elif defined( __unix__ ) - - #include <GL/gl.h> - #include <GL/glx.h> -@@ -325,7 +325,7 @@ - //=========================================================================== - - // non-windows systems will just redefine qgl* to gl* --#if !defined( _WIN32 ) && !defined(MACOS_X) && !defined( __linux__ ) && !defined( __FreeBSD__ ) // rb010123 -+#if !defined( _WIN32 ) && !defined(MACOS_X) && !defined( __unix__ ) // rb010123 - - #include "qgl_linked.h" - -@@ -712,7 +712,7 @@ - - #endif // _WIN32 - --#if ( (defined __linux__ ) || (defined __FreeBSD__ ) ) // rb010123 -+#ifdef __unix__ // rb010123 - - //FX Mesa Functions - // bk001129 - from cvs1.17 (mkv) -@@ -733,8 +733,8 @@ - extern void (*qglXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, GLuint mask ); - extern void (*qglXSwapBuffers)( Display *dpy, GLXDrawable drawable ); - --#endif // __linux__ || __FreeBSD__ // rb010123 -+#endif // __unix__ // rb010123 - --#endif // _WIN32 && __linux__ -+#endif // _WIN32 && __unix__ - - #endif diff --git a/games/evq3/files/patch-engine__renderer__tr_init.c b/games/evq3/files/patch-engine__renderer__tr_init.c deleted file mode 100644 index 1b5ea73ec1f3..000000000000 --- a/games/evq3/files/patch-engine__renderer__tr_init.c +++ /dev/null @@ -1,11 +0,0 @@ ---- ./engine/renderer/tr_init.c.orig Tue Apr 3 15:02:50 2007 -+++ ./engine/renderer/tr_init.c Mon Apr 16 23:58:43 2007 -@@ -1108,7 +1108,7 @@ - r_simpleMipMaps = ri.Cvar_Get("r_simpleMipMaps", "1", CVAR_ARCHIVE | CVAR_LATCH); - r_uiFullScreen = ri.Cvar_Get("r_uifullscreen", "0", 0); - r_subdivisions = ri.Cvar_Get("r_subdivisions", "4", CVAR_ARCHIVE | CVAR_LATCH); --#if (defined(MACOS_X) || defined(__linux__)) && defined(SMP) -+#if (defined(MACOS_X) || defined(__unix__)) && defined(SMP) - // Default to using SMP on Mac OS X or Linux if we have multiple processors - r_smp = ri.Cvar_Get("r_smp", Sys_ProcessorCount() > 1 ? "1" : "0", CVAR_ARCHIVE | CVAR_LATCH); - #else diff --git a/games/evq3/files/patch-engine__renderer__tr_local.h b/games/evq3/files/patch-engine__renderer__tr_local.h deleted file mode 100644 index f3d0e78ddabd..000000000000 --- a/games/evq3/files/patch-engine__renderer__tr_local.h +++ /dev/null @@ -1,11 +0,0 @@ ---- ./engine/renderer/tr_local.h.orig Tue Apr 3 14:30:38 2007 -+++ ./engine/renderer/tr_local.h Mon Apr 16 23:58:54 2007 -@@ -33,7 +33,7 @@ - typedef unsigned int glIndex_t; - - // fast float to int conversion --#if id386 && !( (defined __linux__ || defined __FreeBSD__ ) && (defined __i386__ ) ) // rb010123 -+#if id386 && !( (defined __unix__ ) && (defined __i386__ ) ) // rb010123 - long myftol(float f); - #else - #define myftol(x) ((int)(x)) diff --git a/games/evq3/files/patch-engine__renderer__tr_shade_calc.c b/games/evq3/files/patch-engine__renderer__tr_shade_calc.c deleted file mode 100644 index 7a2ca765c089..000000000000 --- a/games/evq3/files/patch-engine__renderer__tr_shade_calc.c +++ /dev/null @@ -1,11 +0,0 @@ ---- ./engine/renderer/tr_shade_calc.c.orig Thu Mar 29 18:53:40 2007 -+++ ./engine/renderer/tr_shade_calc.c Mon Apr 16 23:59:03 2007 -@@ -1645,7 +1645,7 @@ - } - } - --#if id386 && !( (defined __linux__ || defined __FreeBSD__ ) && (defined __i386__ ) ) // rb010123 -+#if id386 && !( (defined __unix__ ) && (defined __i386__ ) ) // rb010123 - - long myftol(float f) - { diff --git a/games/evq3/files/patch-engine__splines__q_shared.h b/games/evq3/files/patch-engine__splines__q_shared.h deleted file mode 100644 index 5a6d3fe6b12b..000000000000 --- a/games/evq3/files/patch-engine__splines__q_shared.h +++ /dev/null @@ -1,11 +0,0 @@ ---- ./engine/splines/q_shared.h.orig Thu Feb 22 18:28:58 2007 -+++ ./engine/splines/q_shared.h Mon Apr 16 23:59:20 2007 -@@ -189,7 +189,7 @@ - - // the mac compiler can't handle >32k of locals, so we - // just waste space and make big arrays static... --#ifdef __linux__ -+#ifdef __unix__ - - // bk001205 - from Makefile - #define stricmp strcasecmp diff --git a/games/evq3/files/patch-engine__splines__q_shared.hpp b/games/evq3/files/patch-engine__splines__q_shared.hpp deleted file mode 100644 index 2cfbab2ee5c7..000000000000 --- a/games/evq3/files/patch-engine__splines__q_shared.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- ./engine/splines/q_shared.hpp.orig Thu Feb 22 18:28:58 2007 -+++ ./engine/splines/q_shared.hpp Mon Apr 16 23:59:30 2007 -@@ -189,7 +189,7 @@ - - // the mac compiler can't handle >32k of locals, so we - // just waste space and make big arrays static... --#ifdef __linux__ -+#ifdef __unix__ - - // bk001205 - from Makefile - #define stricmp strcasecmp diff --git a/games/evq3/files/patch-engine__unix__linux_glimp.c b/games/evq3/files/patch-engine__unix__linux_glimp.c deleted file mode 100644 index d644afd9acde..000000000000 --- a/games/evq3/files/patch-engine__unix__linux_glimp.c +++ /dev/null @@ -1,11 +0,0 @@ ---- engine/unix/linux_glimp.c.orig Fri Apr 20 15:49:55 2007 -+++ engine/unix/linux_glimp.c Fri Apr 20 15:54:09 2007 -@@ -2116,7 +2116,7 @@ - // bk010216 - added stubs for non-Linux UNIXes here - // FIXME - use NO_JOYSTICK or something else generic - --#if (defined( __FreeBSD__ ) || defined( __sun)) // rb010123 -+#if defined( __sun) // rb010123 - void IN_StartupJoystick( void ) {} - void IN_JoyMove( void ) {} - #endif diff --git a/games/evq3/files/patch-engine__unix__linux_joystick.c b/games/evq3/files/patch-engine__unix__linux_joystick.c deleted file mode 100644 index 5cd1e21f5fd8..000000000000 --- a/games/evq3/files/patch-engine__unix__linux_joystick.c +++ /dev/null @@ -1,85 +0,0 @@ ---- engine/unix/linux_joystick.c.orig Fri Apr 20 15:49:05 2007 -+++ engine/unix/linux_joystick.c Fri Apr 20 15:49:05 2007 -@@ -32,7 +32,11 @@ - - #if !USE_SDL_VIDEO - -+#ifdef __linux__ - #include <linux/joystick.h> -+#elif defined(__FreeBSD__) -+#include <sys/joystick.h> -+#endif - #include <sys/types.h> - #include <fcntl.h> - #include <sys/ioctl.h> -@@ -83,19 +87,26 @@ - for( i = 0; i < 4; i++ ) { - char filename[PATH_MAX]; - -+#ifdef __linux__ - snprintf( filename, PATH_MAX, "/dev/js%d", i ); -+#elif defined(__FreeBSD__) -+ snprintf( filename, PATH_MAX, "/dev/joy%d", i ); -+#endif - - joy_fd = open( filename, O_RDONLY | O_NONBLOCK ); - - if( joy_fd != -1 ) { -+#ifdef __linux__ - struct js_event event; - char axes = 0; - char buttons = 0; - char name[128]; - int n = -1; -+#endif - - Com_Printf( "Joystick %s found\n", filename ); - -+#ifdef __linux__ - /* Get rid of initialization messages. */ - do { - n = read( joy_fd, &event, sizeof( event ) ); -@@ -117,6 +128,7 @@ - Com_Printf( "Name: %s\n", name ); - Com_Printf( "Axes: %d\n", axes ); - Com_Printf( "Buttons: %d\n", buttons ); -+#endif - - /* Our work here is done. */ - return; -@@ -144,10 +156,15 @@ - unsigned int axes = 0; - int i = 0; - -+#ifdef __FreeBSD__ -+ struct joystick event; -+#endif -+ - if( joy_fd == -1 ) { - return; - } - -+#ifdef __linux__ - /* Empty the queue, dispatching button presses immediately - * and updating the instantaneous state for the axes. - */ -@@ -177,6 +194,19 @@ - - } while( 1 ); - -+#elif defined(__FreeBSD__) -+ /* -+ * FreeBSD does not fully support multi-buttoned joysticks. -+ */ -+ if (read(joy_fd, &event, sizeof(struct joystick)) != -1) { -+ if (event.b1) -+ Sys_QueEvent(0, SE_KEY, K_JOY1, 1, 0, NULL); -+ if (event.b2) -+ Sys_QueEvent(0, SE_KEY, K_JOY2, 1, 0, NULL); -+ axes_state[0] = event.x; -+ axes_state[1] = event.y; -+ } -+#endif - - /* Translate our instantaneous state to bits. */ - for( i = 0; i < 16; i++ ) { diff --git a/games/evq3/files/patch-engine__unix__linux_qgl.c b/games/evq3/files/patch-engine__unix__linux_qgl.c deleted file mode 100644 index 577458e68a64..000000000000 --- a/games/evq3/files/patch-engine__unix__linux_qgl.c +++ /dev/null @@ -1,13 +0,0 @@ ---- engine/unix/linux_qgl.c.orig Fri Apr 20 15:49:55 2007 -+++ engine/unix/linux_qgl.c Fri Apr 20 15:52:28 2007 -@@ -2672,8 +2672,10 @@ - // placing a short delay before libGL is unloaded works around the problem. - // This delay is changable via the r_GLlibCoolDownMsec cvar (nice name - // huh?), and it defaults to 0. For me, 500 seems to work. -+#if 0 - if( r_GLlibCoolDownMsec->integer ) - usleep( r_GLlibCoolDownMsec->integer * 1000 ); -+#endif - - #if USE_SDL_VIDEO - SDL_QuitSubSystem(SDL_INIT_VIDEO); diff --git a/games/evq3/files/patch-engine__unix__linux_snd.c b/games/evq3/files/patch-engine__unix__linux_snd.c deleted file mode 100644 index 5a5466c0b622..000000000000 --- a/games/evq3/files/patch-engine__unix__linux_snd.c +++ /dev/null @@ -1,14 +0,0 @@ ---- ./engine/unix/linux_snd.c.orig Sat Dec 16 17:32:42 2006 -+++ ./engine/unix/linux_snd.c Mon Apr 16 23:59:59 2007 -@@ -32,9 +32,8 @@ - #include <sys/wait.h> - #ifdef __linux__ // rb0101023 - guard this - #include <linux/soundcard.h> --#endif --#ifdef __FreeBSD__ // rb0101023 - added --#include <sys/soundcard.h> -+#else -+#include <sys/soundcard.h> // rb0101023 - added - #endif - #include <stdio.h> - diff --git a/games/evq3/files/patch-engine__unix__unix_glw.h b/games/evq3/files/patch-engine__unix__unix_glw.h deleted file mode 100644 index f21d11dba48e..000000000000 --- a/games/evq3/files/patch-engine__unix__unix_glw.h +++ /dev/null @@ -1,11 +0,0 @@ ---- ./engine/unix/unix_glw.h.orig Sat Dec 16 17:32:42 2006 -+++ ./engine/unix/unix_glw.h Tue Apr 17 00:00:09 2007 -@@ -19,7 +19,7 @@ - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - =========================================================================== - */ --#if !( defined __linux__ || defined __FreeBSD__ || defined __sun || defined MACOS_X ) -+#if !( defined __unix__ || defined __sun || defined MACOS_X ) - #error You should include this file only on Linux/FreeBSD/Solaris platforms - #endif - diff --git a/games/evq3/files/patch-engine__unix__unix_main.c b/games/evq3/files/patch-engine__unix__unix_main.c deleted file mode 100644 index f279c3e1513f..000000000000 --- a/games/evq3/files/patch-engine__unix__unix_main.c +++ /dev/null @@ -1,33 +0,0 @@ ---- engine/unix/unix_main.c.orig Fri Apr 20 23:34:22 2007 -+++ engine/unix/unix_main.c Fri Apr 20 23:43:23 2007 -@@ -765,6 +765,7 @@ - void (*dllEntry)( intptr_t (*syscallptr)(intptr_t, ...) ); - char curpath[MAX_OSPATH]; - char fname[MAX_OSPATH]; -+ char *libpath; - char *basepath; - char *homepath; - char *pwdpath; -@@ -776,10 +777,11 @@ - assert( name ); - - getcwd(curpath, sizeof(curpath)); -- snprintf (fname, sizeof(fname), "%s" ARCH_STRING DLL_EXT, name); -+ snprintf (fname, sizeof(fname), "%s" DLL_EXT, name); - - // TODO: use fs_searchpaths from files.c - pwdpath = Sys_Cwd(); -+ libpath = LIBDIR; - basepath = Cvar_VariableString( "fs_basepath" ); - homepath = Cvar_VariableString( "fs_homepath" ); - cdpath = Cvar_VariableString( "fs_cdpath" ); -@@ -789,6 +791,9 @@ - - if(!libHandle && homepath) - libHandle = try_dlopen(homepath, gamedir, fname, fqpath); -+ -+ if(!libHandle && libpath) -+ libHandle = try_dlopen(libpath, gamedir, fname, fqpath); - - if(!libHandle && basepath) - libHandle = try_dlopen(basepath, gamedir, fname, fqpath); diff --git a/games/evq3/files/patch-engine__unix__unix_shared.c b/games/evq3/files/patch-engine__unix__unix_shared.c deleted file mode 100644 index b3cdaa1e09dd..000000000000 --- a/games/evq3/files/patch-engine__unix__unix_shared.c +++ /dev/null @@ -1,20 +0,0 @@ ---- ./engine/unix/unix_shared.c.orig Sat Mar 31 20:25:26 2007 -+++ ./engine/unix/unix_shared.c Tue Apr 17 00:00:39 2007 -@@ -76,7 +76,7 @@ - return curtime; - } - --#if (defined(__linux__) || defined(__FreeBSD__) || defined(__sun)) && !defined(DEDICATED) -+#if (defined(__unix__) || defined(__sun)) && !defined(DEDICATED) - /* - ================ - Sys_XTimeToSysTime -@@ -441,7 +441,7 @@ - return p->pw_name; - } - --#if defined(__linux__) || defined(__FreeBSD__) -+#ifdef __unix__ - // TTimo - // sysconf() in libc, POSIX.1 compliant - unsigned int Sys_ProcessorCount(void) diff --git a/games/evq3/pkg-plist b/games/evq3/pkg-plist index 09d06afa5f06..9b1c72560d07 100644 --- a/games/evq3/pkg-plist +++ b/games/evq3/pkg-plist @@ -1,11 +1,16 @@ -bin/evq3 -bin/evq3-server -%%GAMELIBS%%%%LIBDIR%%/baseq3/cgame.so +%%CLIENT%%bin/evq3 +%%SMP%%bin/evq3-smp +%%DEDICATED%%bin/evq3ded +%%LIBDIR%%/baseq3/pak-5evq3.pk3 %%LIBDIR%%/baseq3/pak-evq3.pk3 +%%GAMELIBS%%%%LIBDIR%%/baseq3/cgame.so %%GAMELIBS%%%%LIBDIR%%/baseq3/qagame.so %%GAMELIBS%%%%LIBDIR%%/baseq3/ui.so -%%PORTDOCS%%%%DOCSDIR%%/ChangeLog.txt -%%PORTDOCS%%%%DOCSDIR%%/FEATURES.txt +%%GAMELIBS%%%%LIBDIR%%/missionpack/cgame.so +%%GAMELIBS%%%%LIBDIR%%/missionpack/qagame.so +%%GAMELIBS%%%%LIBDIR%%/missionpack/ui.so +%%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%@dirrm %%DOCSDIR%% +%%GAMELIBS%%@dirrm %%LIBDIR%%/missionpack @dirrm %%LIBDIR%%/baseq3 @dirrm %%LIBDIR%% |