diff options
author | Alejandro Pulver <alepulver@FreeBSD.org> | 2006-06-04 21:51:37 +0000 |
---|---|---|
committer | Alejandro Pulver <alepulver@FreeBSD.org> | 2006-06-04 21:51:37 +0000 |
commit | 3a4da27158a70d91b6db79b5bd046cccc907e0ca (patch) | |
tree | b9065ebd7767ef9f7c78852bb13d18bb8a4efe51 /games/quake3 | |
parent | 38fb034a53d3fa9dc55792b9d32653cfb9e934cd (diff) | |
download | ports-3a4da27158a70d91b6db79b5bd046cccc907e0ca.tar.gz ports-3a4da27158a70d91b6db79b5bd046cccc907e0ca.zip |
Notes
Diffstat (limited to 'games/quake3')
-rw-r--r-- | games/quake3/Makefile | 19 | ||||
-rw-r--r-- | games/quake3/files/patch-code-unix-Makefile | 114 |
2 files changed, 75 insertions, 58 deletions
diff --git a/games/quake3/Makefile b/games/quake3/Makefile index f1e660b4410c..79438e899814 100644 --- a/games/quake3/Makefile +++ b/games/quake3/Makefile @@ -37,11 +37,12 @@ PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}" LIBDIR= ${PREFIX}/lib/${PORTNAME} REALVERSION= 1.32b +VM_ARCHS= i386 powerpc .include <bsd.port.pre.mk> -.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) \ - && defined(WITHOUT_SMP) +.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) && \ + defined(WITHOUT_SMP) IGNORE= needs at least one of CLIENT, DEDICATED and SMP options .endif @@ -49,6 +50,16 @@ IGNORE= needs at least one of CLIENT, DEDICATED and SMP options BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm .endif +.for i in ${ARCH} +. if ${VM_ARCHS:M${i}} != "" +HAVE_VM_COMPILED= yes +. endif +.endfor + +.if !defined(HAVE_VM_COMPILED) +MAKE_ENV+= DLL_ONLY=true +.endif + .if !defined(WITHOUT_CLIENT) || !defined(WITHOUT_SMP) USE_GL= yes .endif @@ -69,7 +80,7 @@ Q3BIN+= q3ded PLIST_SUB+= DEDICATED="@comment " .endif -.if defined(WITH_GAMELIBS) || (${ARCH} != "i386" && ${ARCH} != "powerpc") +.if defined(WITH_GAMELIBS) || !defined(HAVE_VM_COMPILED) MAKE_ENV+= GAMELIBS=YES PLIST_SUB+= GAMELIBS="" .else @@ -101,7 +112,7 @@ do-install: .for bin in ${Q3BIN} ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${bin} ${PREFIX}/bin .endfor -.if defined(WITH_GAMELIBS) || (${ARCH} != "i386" && ${ARCH} != "powerpc") +.if defined(WITH_GAMELIBS) || !defined(HAVE_VM_COMPILED) .for dir in baseq3 missionpack ${MKDIR} ${LIBDIR}/${dir} ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${dir}/*.so ${LIBDIR}/${dir} diff --git a/games/quake3/files/patch-code-unix-Makefile b/games/quake3/files/patch-code-unix-Makefile index 6d2d8b31dc2c..e9c97bb1023c 100644 --- a/games/quake3/files/patch-code-unix-Makefile +++ b/games/quake3/files/patch-code-unix-Makefile @@ -1,14 +1,6 @@ ---- ./code/unix/Makefile.orig Wed May 31 18:55:11 2006 -+++ ./code/unix/Makefile Wed May 31 18:55:13 2006 -@@ -19,6 +19,7 @@ - - PLATFORM=$(shell uname|tr A-Z a-z) - PLATFORM_RELEASE=$(shell uname -r) -+ARCH=$(shell uname -m) - - ### - ### These paths are where you probably want to change things -@@ -34,7 +35,7 @@ +--- code/unix/Makefile.orig Sun Jun 4 18:13:21 2006 ++++ code/unix/Makefile Sun Jun 4 18:14:42 2006 +@@ -34,7 +34,7 @@ # Build name # BUILD_NAME=$(BUILD_NAME) @@ -17,7 +9,7 @@ -@@ -46,8 +47,8 @@ +@@ -46,8 +46,8 @@ BASEQ3_DIR=$(BDIR)/baseq3 @@ -28,7 +20,7 @@ CDIR=$(MOUNT_DIR)/client SDIR=$(MOUNT_DIR)/server RDIR=$(MOUNT_DIR)/renderer -@@ -76,7 +77,7 @@ +@@ -76,7 +76,7 @@ ############################################################################# ## Defaults @@ -37,7 +29,7 @@ # bk010215 - TODO - add all defaults / kill Ryan -@@ -136,7 +137,7 @@ +@@ -136,7 +136,7 @@ ifeq ($(ARCH),ppc) NEWPGCC=/loki/global/ppc/bin/gcc CC=$(NEWPGCC) @@ -46,7 +38,7 @@ else #NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc # bk001205 #NEWPGCC=/loki/global/x86/bin/gcc -@@ -146,9 +147,9 @@ +@@ -146,9 +146,9 @@ # TTimo: legacy RELEASE_CFLAGS # NOTE: the -fomit-frame-pointer option leads to an unstable binary on my test box if it was built on the main box # but building on the Mdk 7.2 baseline seems to work @@ -58,7 +50,7 @@ endif endif -@@ -162,7 +163,7 @@ +@@ -162,7 +162,7 @@ RANLIB=ranlib THREAD_LDFLAGS=-lpthread @@ -67,7 +59,7 @@ GLLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm ifeq ($(ARCH),axp) -@@ -197,33 +198,35 @@ +@@ -197,33 +197,29 @@ ifeq ($(PLATFORM),freebsd) @@ -113,18 +105,12 @@ -NEWPGCC=/home/raistllin/src/gcc/build/install/bin/gcc -CC=$(shell if [ -f $(NEWPGCC) ]; then echo $(NEWPGCC); else echo pgcc; fi ) -RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing - fstrength-reduce -+ifneq ($(ARCH),i386) -+ ifneq ($(ARCH),ppc) -+DLL_ONLY=true -+ endif -+endif -+ +ifeq ($(DLL_ONLY),true) +BASE_CFLAGS += -DDLL_ONLY endif LIBEXT=a -@@ -235,25 +238,37 @@ +@@ -235,25 +231,33 @@ ARFLAGS=ar rv RANLIB=ranlib @@ -162,10 +148,6 @@ +TARGETS+=$(B)/quake3-smp +endif + -+ifeq ($(DLL_ONLY),true) -+GAMELIBS=yes -+endif -+ +ifdef GAMELIBS +TARGETS+=\ + $(B)/baseq3/cgame.$(SHLIBEXT) \ @@ -177,7 +159,7 @@ endif else # ifeq freebsd -@@ -283,7 +298,7 @@ +@@ -283,7 +287,7 @@ ARFLAGS=ar rv RANLIB=ranlib @@ -186,7 +168,7 @@ GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm TARGETS=$(B)/sgiquake3 \ -@@ -310,9 +325,9 @@ +@@ -310,9 +314,9 @@ RANLIB=ranlib ifeq ($(PLATFORM),freebsd) @@ -198,7 +180,7 @@ endif # ifeq freebsd TARGETS=\ -@@ -348,7 +363,7 @@ +@@ -348,7 +352,7 @@ $(MAKE) targets B=$(BR) CFLAGS="$(RELEASE_CFLAGS)" #Build both debug and release builds @@ -207,7 +189,7 @@ targets:makedirs $(TARGETS) -@@ -516,20 +531,6 @@ +@@ -516,20 +520,6 @@ $(B)/client/unix_net.o \ $(B)/client/unix_shared.o \ \ @@ -228,7 +210,7 @@ # $(B)/client/q_parse.o \ # $(B)/client/math_quaternion.o \ # $(B)/client/util_str.o \ -@@ -541,7 +542,9 @@ +@@ -541,10 +531,12 @@ # $(B)/client/q_shared.o \ ifeq ($(ARCH),i386) @@ -238,8 +220,12 @@ + endif endif - ifeq ($(ARCH),ppc) -@@ -559,10 +562,24 @@ +- ifeq ($(ARCH),ppc) ++ ifeq ($(ARCH),powerpc) + ifeq ($(DLL_ONLY),false) + Q3OBJ += $(B)/client/vm_ppc.o + endif +@@ -559,10 +551,24 @@ $(B)/client/linux_qgl.o \ $(B)/client/linux_glimp.o \ $(B)/client/linux_snd.o \ @@ -267,7 +253,7 @@ else ifeq ($(PLATFORM),irix) Q3POBJ=\ -@@ -578,7 +595,6 @@ +@@ -578,7 +584,6 @@ $(B)/client/linux_common.o \ $(B)/client/linux_qgl.o \ $(B)/client/linux_glimp.o \ @@ -275,7 +261,7 @@ $(B)/client/linux_snd.o \ $(B)/client/snd_mixa.o \ $(B)/client/matha.o \ -@@ -587,7 +603,6 @@ +@@ -587,7 +592,6 @@ $(B)/client/linux_common.o \ $(B)/client/linux_qgl.o \ $(B)/client/linux_glimp_smp.o \ @@ -283,7 +269,7 @@ $(B)/client/linux_snd.o \ $(B)/client/snd_mixa.o \ $(B)/client/matha.o -@@ -602,12 +617,12 @@ +@@ -602,12 +606,12 @@ endif #FreeBSD endif #IRIX @@ -298,7 +284,7 @@ $(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(GLLDFLAGS) \ $(THREAD_LDFLAGS) $(LDFLAGS) -@@ -754,10 +769,10 @@ +@@ -754,10 +758,10 @@ $(B)/client/linux_common.o : $(UDIR)/linux_common.c; $(DO_CC) $(B)/client/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) $(GL_CFLAGS) $(B)/client/linux_glimp_smp.o : $(UDIR)/linux_glimp.c; $(DO_SMP_CC) $(GL_CFLAGS) @@ -310,7 +296,16 @@ $(B)/client/snd_mixa.o : $(UDIR)/snd_mixa.s; $(DO_AS) $(B)/client/matha.o : $(UDIR)/matha.s; $(DO_AS) -@@ -912,13 +927,17 @@ +@@ -767,7 +771,7 @@ + $(B)/client/vm_x86.o : $(CMDIR)/vm_x86.c; $(DO_CC) + endif + +-ifeq ($(ARCH),ppc) ++ifeq ($(ARCH),powerpc) + ifeq ($(DLL_ONLY),false) + $(B)/client/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_CC) + endif +@@ -912,22 +916,26 @@ $(B)/ded/unix_main.o \ $(B)/ded/unix_net.o \ $(B)/ded/unix_shared.o \ @@ -328,8 +323,10 @@ + endif endif - ifeq ($(ARCH),ppc) -@@ -927,7 +946,7 @@ +-ifeq ($(ARCH),ppc) ++ifeq ($(ARCH),powerpc) + ifeq ($(DLL_ONLY),false) + Q3DOBJ += $(B)/ded/vm_ppc.o endif endif @@ -338,7 +335,7 @@ $(CC) -o $@ $(Q3DOBJ) $(LDFLAGS) $(B)/ded/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_DED_CC) -@@ -988,6 +1007,7 @@ +@@ -988,6 +996,7 @@ $(B)/ded/unix_main.o : $(UDIR)/unix_main.c; $(DO_DED_CC) $(B)/ded/unix_net.o : $(UDIR)/unix_net.c; $(DO_DED_CC) $(B)/ded/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_DED_CC) @@ -346,7 +343,16 @@ $(B)/ded/null_client.o : $(NDIR)/null_client.c; $(DO_DED_CC) $(B)/ded/null_input.o : $(NDIR)/null_input.c; $(DO_DED_CC) $(B)/ded/null_snddma.o : $(NDIR)/null_snddma.c; $(DO_DED_CC) -@@ -1068,7 +1088,7 @@ +@@ -1001,7 +1010,7 @@ + $(B)/ded/snapvector.o : $(UDIR)/snapvector.nasm; $(DO_NASM) + endif + +-ifeq ($(ARCH),ppc) ++ifeq ($(ARCH),powerpc) + ifeq ($(DLL_ONLY),false) + $(B)/ded/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_DED_CC) + endif +@@ -1068,7 +1077,7 @@ $(B)/baseq3/cgame/q_math.o \ $(B)/baseq3/cgame/q_shared.o @@ -355,7 +361,7 @@ $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ) $(B)/baseq3/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) -@@ -1128,7 +1148,7 @@ +@@ -1128,7 +1137,7 @@ $(B)/missionpack/cgame/q_shared.o \ $(B)/missionpack/cgame/ui_shared.o @@ -364,7 +370,7 @@ $(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ) $(B)/missionpack/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) -DMISSIONPACK -@@ -1200,7 +1220,7 @@ +@@ -1200,7 +1209,7 @@ $(B)/baseq3/game/q_math.o \ $(B)/baseq3/game/q_shared.o @@ -373,7 +379,7 @@ $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ) $(B)/baseq3/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC) -@@ -1278,7 +1298,7 @@ +@@ -1278,7 +1287,7 @@ $(B)/missionpack/game/q_math.o \ $(B)/missionpack/game/q_shared.o @@ -382,7 +388,7 @@ $(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ) $(B)/missionpack/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC) -DMISSIONPACK -@@ -1367,7 +1387,7 @@ +@@ -1367,7 +1376,7 @@ $(B)/baseq3/ui/q_math.o \ $(B)/baseq3/ui/q_shared.o @@ -391,7 +397,7 @@ $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ) $(B)/baseq3/ui/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) -@@ -1410,7 +1430,7 @@ +@@ -1410,7 +1419,7 @@ $(B)/baseq3/ui/ui_startserver.o : $(Q3UIDIR)/ui_startserver.c; $(DO_SHLIB_CC) $(B)/baseq3/ui/ui_team.o : $(Q3UIDIR)/ui_team.c; $(DO_SHLIB_CC) $(B)/baseq3/ui/ui_teamorders.o : $(Q3UIDIR)/ui_teamorders.c; $(DO_SHLIB_CC) @@ -400,7 +406,7 @@ $(B)/baseq3/ui/ui_video.o : $(Q3UIDIR)/ui_video.c; $(DO_SHLIB_CC) # bk001205 - these wre the only SHLIB compiles in 1.17 -@@ -1450,7 +1470,7 @@ +@@ -1450,7 +1459,7 @@ # $(B)/missionpack/ui/q_math.o \ # $(B)/missionpack/ui/q_shared.o @@ -409,7 +415,7 @@ $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ) $(B)/missionpack/ui/ui_atoms.o : $(UIDIR)/ui_atoms.c; $(DO_SHLIB_CC) -DMISSIONPACK -@@ -1613,23 +1633,8 @@ +@@ -1613,23 +1622,8 @@ $(B)/q3static/unix_net.o \ $(B)/q3static/unix_shared.o \ \ @@ -433,7 +439,7 @@ $(B)/q3static/linux_snd.o \ $(B)/q3static/snd_mixa.o \ $(B)/q3static/matha.o -@@ -1779,7 +1784,6 @@ +@@ -1779,7 +1773,6 @@ $(B)/q3static/unix_net.o : $(UDIR)/unix_net.c; $(DO_CC) -DQ3_STATIC $(B)/q3static/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_CC) -DQ3_STATIC $(B)/q3static/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) -DQ3_STATIC @@ -441,7 +447,7 @@ $(B)/q3static/linux_qgl.o : $(UDIR)/linux_qgl.c; $(DO_CC) -DQ3_STATIC $(B)/q3static/linux_input.o : $(UDIR)/linux_input.c; $(DO_CC) -DQ3_STATIC $(B)/q3static/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC) -DQ3_STATIC -@@ -2020,7 +2024,7 @@ +@@ -2020,7 +2013,7 @@ @@ -450,7 +456,7 @@ $(CC) $(CFLAGS) -o $@ $(Q3SOBJ) $(GLLDFLAGS) $(LDFLAGS) -@@ -2059,9 +2063,9 @@ +@@ -2059,9 +2052,9 @@ copyfiles: -mkdirhier $(COPYDIR) |