aboutsummaryrefslogtreecommitdiff
path: root/games/openarena
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2010-12-01 13:27:08 +0000
committerPav Lucistnik <pav@FreeBSD.org>2010-12-01 13:27:08 +0000
commit547ff04a5686166f4ac6c64ceb26870d4b0722cf (patch)
tree1183390ebb633e8f71d8d263ad8c77e34e539be3 /games/openarena
parente8d0d5cbbba0bfd92945a23f9df9ebf1f2151bb5 (diff)
downloadports-547ff04a5686166f4ac6c64ceb26870d4b0722cf.tar.gz
ports-547ff04a5686166f4ac6c64ceb26870d4b0722cf.zip
Notes
Diffstat (limited to 'games/openarena')
-rw-r--r--games/openarena/Makefile8
-rw-r--r--games/openarena/distinfo5
-rw-r--r--games/openarena/files/patch-Makefile125
-rw-r--r--games/openarena/files/patch-code-qcommon-vm_x86.c29
4 files changed, 45 insertions, 122 deletions
diff --git a/games/openarena/Makefile b/games/openarena/Makefile
index 32c70f1ad858..7561c8c1f86d 100644
--- a/games/openarena/Makefile
+++ b/games/openarena/Makefile
@@ -7,10 +7,10 @@
PORTNAME= openarena
PORTVERSION= 0.8.5
-DISTVERSION= 1.36_SVN1783+${PORTVERSION}
-PORTREVISION= 0
+DISTVERSION= 1.36_SVN1788+${PORTVERSION}
+PORTREVISION= 1
MASTER_SITES= http://files.poulsander.com/~poul19/public_files/oa/dev081/
-DISTNAME= ${PORTNAME}-engine-source-0.8.x-15
+DISTNAME= ${PORTNAME}-engine-source-0.8.x-18
MAINTAINER= kamikaze@bsdforen.de
COMMENT= Quake3 total conversion based on the ioquake3 engine
@@ -28,5 +28,7 @@ Q3SERVER= oa_ded
Q3TOOLS=
Q3BASE= baseoa
Q3DIR= ${DATADIR}
+# No icon included with OpenArena
+Q3ICON=
.include "../ioquake3/Makefile"
diff --git a/games/openarena/distinfo b/games/openarena/distinfo
index 3224bdd8bace..5c3865fcb163 100644
--- a/games/openarena/distinfo
+++ b/games/openarena/distinfo
@@ -1,3 +1,2 @@
-MD5 (openarena-engine-source-0.8.x-15.tar.bz2) = 868a6d0dca1579a0cbc05192b9cdc70d
-SHA256 (openarena-engine-source-0.8.x-15.tar.bz2) = fc274de6cc4a6a880618d38267d4453fdb3125fc8587b08e6ea51dd137a88650
-SIZE (openarena-engine-source-0.8.x-15.tar.bz2) = 8080759
+SHA256 (openarena-engine-source-0.8.x-18.tar.bz2) = 77180d70af00134b3cfbc51a3c1371f99665e2f073b2ec5fdbf08f6c93ae1c24
+SIZE (openarena-engine-source-0.8.x-18.tar.bz2) = 7211834
diff --git a/games/openarena/files/patch-Makefile b/games/openarena/files/patch-Makefile
index 9e052bf5e580..4767cfb2e5dd 100644
--- a/games/openarena/files/patch-Makefile
+++ b/games/openarena/files/patch-Makefile
@@ -1,126 +1,19 @@
---- Makefile.orig 2010-04-24 23:29:15.000000000 +0200
-+++ Makefile 2010-05-22 00:10:08.000000000 +0200
-@@ -561,45 +561,22 @@
+--- Makefile.orig 2010-07-02 21:50:49.000000000 +0200
++++ Makefile 2010-11-27 14:39:09.000000000 +0100
+@@ -561,9 +561,16 @@
ifeq ($(PLATFORM),freebsd)
-- ifneq (,$(findstring alpha,$(shell uname -m)))
-- ARCH=axp
-- else #default to i386
-- ARCH=i386
-- endif #alpha test
+ # system integration
+ ifndef DEFAULT_LIBDIR
+ DEFAULT_LIBDIR = /usr/local/lib/ioquake3
+ endif
-
-- BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
-- -DUSE_ICON
-+ # flags
-+ BASE_CFLAGS = $(shell env MACHINE_ARCH=$(ARCH) make -f /dev/null -VCFLAGS) \
-+ -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
++
+ # 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
+ -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
CLIENT_CFLAGS = $(SDL_CFLAGS)
SERVER_CFLAGS =
-+ HAVE_VM_COMPILED = true
-
-- ifeq ($(USE_OPENAL),1)
-- CLIENT_CFLAGS += -DUSE_OPENAL
-- ifeq ($(USE_OPENAL_DLOPEN),1)
-- CLIENT_CFLAGS += -DUSE_OPENAL_DLOPEN
-- endif
-- endif
--
-- ifeq ($(USE_CODEC_VORBIS),1)
-- CLIENT_CFLAGS += -DUSE_CODEC_VORBIS
-- endif
--
-- OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer
--
-- ifeq ($(ARCH),axp)
-- BASE_CFLAGS += -DNO_VM_COMPILED
-- OPTIMIZEVM += -fexpensive-optimizations
-- else
-- ifeq ($(ARCH),i386)
-- OPTIMIZEVM += -mtune=pentiumpro \
-- -march=pentium -pipe -falign-loops=2 -falign-jumps=2 \
-- -falign-functions=2 -funroll-loops -fstrength-reduce
-- HAVE_VM_COMPILED=true
-- else
-- BASE_CFLAGS += -DNO_VM_COMPILED
-- endif
-- endif
--
-- OPTIMIZE = $(OPTIMIZEVM) -ffast-math
-+ OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer -ffast-math
-+ OPTIMIZE = $(OPTIMIZEVM)
-
- SHLIBEXT=so
- SHLIBCFLAGS=-fPIC
-@@ -613,17 +590,40 @@
-
- CLIENT_LIBS += $(SDL_LIBS) -lGL
-
-+ # optional features/libraries
- ifeq ($(USE_OPENAL),1)
-- ifneq ($(USE_OPENAL_DLOPEN),1)
-+ CLIENT_CFLAGS += -DUSE_OPENAL
-+ ifeq ($(USE_OPENAL_DLOPEN),1)
-+ CLIENT_CFLAGS += -DUSE_OPENAL_DLOPEN
- CLIENT_LIBS += $(THREAD_LIBS) -lopenal
- endif
- endif
-
-+ ifeq ($(USE_CURL),1)
-+ CLIENT_CFLAGS += -DUSE_CURL
-+ ifeq ($(USE_CURL_DLOPEN),1)
-+ CLIENT_CFLAGS += -DUSE_CURL_DLOPEN
-+ CLIENT_LIBS += -lcurl
-+ endif
-+ endif
-+
- ifeq ($(USE_CODEC_VORBIS),1)
-- ifeq ($(PLATFORM),mingw32)
-- CLIENT_LIBS += $(LIBSDIR)/win32/libvorbisfile.a $(LIBSDIR)/win32/libvorbis.a $(LIBSDIR)/win32/libogg.a
-- else
-- CLIENT_LIBS += -lvorbisfile -lvorbis -logg
-+ CLIENT_CFLAGS += -DUSE_CODEC_VORBIS
-+ endif
-+
-+ ifeq ($(USE_CODEC_VORBIS),1)
-+ CLIENT_LIBS += -lvorbisfile -lvorbis -logg
-+ endif
-+
-+ # cross-compiling tweaks
-+ ifeq ($(ARCH),i386)
-+ ifeq ($(CROSS_COMPILING),1)
-+ BASE_CFLAGS += -m32
-+ endif
-+ endif
-+ ifeq ($(ARCH),amd64)
-+ ifeq ($(CROSS_COMPILING),1)
-+ BASE_CFLAGS += -m64
- endif
- endif
-
-@@ -1555,6 +1555,9 @@
- ifeq ($(ARCH),x86_64)
- Q3OBJ += $(B)/client/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o
- endif
-+ ifeq ($(ARCH),amd64)
-+ Q3OBJ += $(B)/client/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o
-+ endif
- ifeq ($(ARCH),ppc)
- Q3OBJ += $(B)/client/vm_powerpc.o $(B)/client/vm_powerpc_asm.o
- endif
-@@ -1720,6 +1723,9 @@
- ifeq ($(ARCH),x86_64)
- Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/ded/vm_x86_64_assembler.o
- endif
-+ ifeq ($(ARCH),amd64)
-+ Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/ded/vm_x86_64_assembler.o
-+ endif
- ifeq ($(ARCH),ppc)
- Q3DOBJ += $(B)/ded/vm_powerpc.o $(B)/ded/vm_powerpc_asm.o
- endif
diff --git a/games/openarena/files/patch-code-qcommon-vm_x86.c b/games/openarena/files/patch-code-qcommon-vm_x86.c
new file mode 100644
index 000000000000..a24661785255
--- /dev/null
+++ b/games/openarena/files/patch-code-qcommon-vm_x86.c
@@ -0,0 +1,29 @@
+--- code/qcommon/vm_x86.c.orig 2008-08-18 01:22:06.000000000 +0200
++++ code/qcommon/vm_x86.c 2010-11-27 14:01:33.000000000 +0100
+@@ -36,7 +36,25 @@
+
+ /* need this on NX enabled systems (i386 with PAE kernel or
+ * noexec32=on x86_64) */
+-#ifdef __linux__
++// Rambetter's note: I'm adding the test for __FreeBSD__ in addition to the [already
++// existing] test for __linux__. Here is why. I own a 32 bit FreeBSD 8.0 server with
++// a PAE kernel. Without VM_X86_MMAP, ioq3ded segfaults shortly after starting
++// (this should come as no surprise). With VM_X86_MMAP, ioq3ded runs very smoothly.
++// So, at a very minimum, we need to set VM_X86_MMAP for FreeBSD PAE kernels.
++// Now, I also happen to own a 32 bit FreeBSD 7.1 server with just the standard kernel
++// (non-PAE). I have run ioq3ded successfully on it with and without VM_X86_MMAP for many
++// months. So, in the case of non-PAE FreeBSD, we can go either way - use VM_X86_MMAP or
++// not use it. The absolute safest fix to this problem is to only set VM_X86_MMAP on
++// PAE FreeBSD kernels (in addition to Linux); however, I don't know of a way to detect
++// the PAE kernel easily. Therefore, since using VM_X86_MMAP won't break anything on
++// non-PAE kernels [apparently], we'll just use it all the time on FreeBSD 32 bit.
++// Now, you may ask the question: Why not change the entire test for just __unix__?
++// Unfortunately I cannot say anything about this because I don't have access to every
++// other system that has __unix__ defined, so I cannot possibly test all those cases to
++// make sure things work. We'll just leave it with __linux__ and __FreeBSD__ to be safe.
++// If someone with a different flavor of UNIX running a PAE kernel has this problem too,
++// they can report the bug and we will adjust the line below accordingly.
++#if defined(__linux__) || defined(__FreeBSD__)
+ #define VM_X86_MMAP
+ #endif
+