Update to 0.8.8.
I've switched the VM on and tested it succesfully on amd64 and i386. Network
play worked too on amd64. It didn't look like the gethostnameinfo-patch was
needed anymore but I'd appreciate some test reports about networking and if OA
works on macppc.
The two vm patches are from Toni Spets and actually for ioquake3 but they apply
for OA as well, thanks!
The site containing the engine tarball didn't seem too reliable so I decided to
mirror
it myself too.
--
Antti Harri
diff --git games/openarena/Makefile games/openarena/Makefile
index 8e7d2f7..33ccfcb 100644
--- games/openarena/Makefile
+++ games/openarena/Makefile
@@ -10,8 +10,8 @@ MULTI_PACKAGES = -main -server -data
CATEGORIES = games x11
-V = 0.8.5
-E_V = 0.8.1 # engine version
+V = 0.8.8
+E_V = ${V} # engine version
PKGNAME = openarena-${V}
PKGNAME-main = openarena-${V}
@@ -21,13 +21,14 @@ PKGNAME-data = openarena-data-${V}
PKG_ARCH-data = *
REVISION-data= 0
-DISTNAME = oa${V:S/.//g}
-DISTFILES = ${DISTNAME}.zip openarena-engine-${E_V}-1.tar.bz2
+DISTNAME = openarena-${V}
+DISTFILES = ${DISTNAME}.zip openarena-engine-source-${E_V}.tar.bz2:0
-MS_PREFIX = http://download.tuxfamily.org/openarena/rel/
HOMEPAGE = http://www.openarena.ws/
-MASTER_SITES = ${MS_PREFIX}/${V:S/.//g}/ \
- ${MS_PREFIX}/${E_V:S/.//g}/source/ \
+MS_PREFIX = http://download.tuxfamily.org/openarena/rel/
+MASTER_SITES = ${MS_PREFIX}${V:S/.//g}/ \
+ ${MS_PREFIX}${E_V:S/.//g}/source/
+MASTER_SITES0 =
http://files.poulsander.com/~poul19/public_files/oa/dev088/ \
http://openbsd.fi/distfiles/
# GPLv2 but contains software with other (free) licenses as well
@@ -37,22 +38,25 @@ PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB-main = GL c m pthread sndio ogg>=5 SDL>=7 vorbis>=7 \
- vorbisfile>=5
+ vorbisfile>=5 curl
WANTLIB-server = c m
LIB_DEPENDS-main = audio/libogg \
+ audio/libvorbis \
devel/sdl \
- audio/libvorbis
+ net/curl
RUN_DEPENDS-main = ${BASE_PKGPATH},-data
RUN_DEPENDS-server = ${BASE_PKGPATH},-data
-ALL_TARGET = release
USE_GMAKE = Yes
MAKE_FLAGS = USE_OPENAL=0 \
- BINEXT='' \
+ FULLBINEXT='' \
+ V=1 \
DEFAULT_BASEDIR=${LOCALBASE}/share/openarena
-WRKDIST = ${WRKDIR}/openarena-engine-${E_V}
+NO_REGRESS = Yes
+WRKDIST = ${WRKDIR}/openarena-engine-source-${E_V}
+ALL_TARGET = release
post-extract:
find ${WRKDIR} -name '*.orig' -print0 | xargs -0r rm -f
diff --git games/openarena/distinfo games/openarena/distinfo
index fa891e0..dfad2d2 100644
--- games/openarena/distinfo
+++ games/openarena/distinfo
@@ -1,10 +1,10 @@
-MD5 (oa085.zip) = NrxQRfKfzfOBENoPD1kpkw==
-MD5 (openarena-engine-0.8.1-1.tar.bz2) = TuaW6sxLA1D527VYjc10og==
-RMD160 (oa085.zip) = SH1bw959W+u4LB5/rvW4r9F9QfQ=
-RMD160 (openarena-engine-0.8.1-1.tar.bz2) = Ej6fcGIf2FY4XGynrQWAuBRU1oc=
-SHA1 (oa085.zip) = NOn0OMPBjXmMELKwZprU04qKTtY=
-SHA1 (openarena-engine-0.8.1-1.tar.bz2) = beNFwL69h+FAbLBxiVN9uZpCKAg=
-SHA256 (oa085.zip) = +NSSnwa9+LI8k098FFPzsxBuhRaS/eQHlUXmfFiOnEg=
-SHA256 (openarena-engine-0.8.1-1.tar.bz2) =
QwuptpHICFuUbgBPDMiQmVx/gpVJi9jIznRCk6hydNI=
-SIZE (oa085.zip) = 356536552
-SIZE (openarena-engine-0.8.1-1.tar.bz2) = 2951703
+MD5 (openarena-0.8.8.zip) = nzU9lteInDdzSdaSw5BeWw==
+MD5 (openarena-engine-source-0.8.8.tar.bz2) = ypsjm0d61njr94HhTObteg==
+RMD160 (openarena-0.8.8.zip) = 3sfEPCcnI16Xvhqzlo2IA/3XElE=
+RMD160 (openarena-engine-source-0.8.8.tar.bz2) = 6CPBhO/6y0Lp7NKq94nZVwIh6JY=
+SHA1 (openarena-0.8.8.zip) = N6tBmQs3RZgizowv5ZBgdhbh9tE=
+SHA1 (openarena-engine-source-0.8.8.tar.bz2) = ZPMzwpCxW2sOOBncEgs+yiZTNA4=
+SHA256 (openarena-0.8.8.zip) = Wo+vf1tR81GwoWGMBra5il8aZ1jx05gY3iyH3yoLrEo=
+SHA256 (openarena-engine-source-0.8.8.tar.bz2) =
lapQDLfkLlf7H223uXolQWj0+i42dtbNwzGAtp/eDnc=
+SIZE (openarena-0.8.8.zip) = 425189255
+SIZE (openarena-engine-source-0.8.8.tar.bz2) = 3777830
diff --git games/openarena/patches/patch-Makefile
games/openarena/patches/patch-Makefile
index e0fdec2..58b35ab 100644
--- games/openarena/patches/patch-Makefile
+++ games/openarena/patches/patch-Makefile
@@ -1,7 +1,7 @@
$OpenBSD: ports/games/openarena/patches/patch-Makefile,v 1.3 2010/05/27
03:47:28 jakemsr Exp $
---- Makefile.orig Sat Aug 9 13:22:37 2008
-+++ Makefile Mon May 3 04:26:35 2010
-@@ -143,13 +143,14 @@ endif
+--- Makefile.orig Tue Dec 13 00:48:49 2011
++++ Makefile Wed Mar 7 11:21:26 2012
+@@ -164,13 +164,14 @@ endif
#############################################################################
@@ -18,7 +18,7 @@ $OpenBSD: ports/games/openarena/patches/patch-Makefile,v 1.3
2010/05/27 03:47:28
ASMDIR=$(MOUNT_DIR)/asm
SYSDIR=$(MOUNT_DIR)/sys
GDIR=$(MOUNT_DIR)/game
-@@ -584,12 +585,11 @@ else # ifeq freebsd
+@@ -638,11 +639,11 @@ else # ifeq freebsd
ifeq ($(PLATFORM),openbsd)
@@ -27,63 +27,52 @@ $OpenBSD: ports/games/openarena/patches/patch-Makefile,v
1.3 2010/05/27 03:47:28
+ # Get the machine type
+ ARCH=$(shell uname -m)
--
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
-- -DUSE_ICON $(shell sdl-config --cflags)
-+ -DUSE_ICON -DARCH_STRING=\\\"${ARCH}\\\" $(shell sdl-config --cflags)
+- -DUSE_ICON
++ -DUSE_ICON -DARCH_STRING=\\\"${ARCH}\\\" -DMAP_ANONYMOUS=MAP_ANON
+ CLIENT_CFLAGS = $(SDL_CFLAGS)
+ SERVER_CFLAGS =
- ifeq ($(USE_OPENAL),1)
- BASE_CFLAGS += -DUSE_OPENAL
-@@ -603,8 +603,8 @@ ifeq ($(PLATFORM),openbsd)
+@@ -662,8 +663,7 @@ ifeq ($(PLATFORM),openbsd)
+ USE_CURL_DLOPEN=0
endif
- BASE_CFLAGS += -DNO_VM_COMPILED -I/usr/X11R6/include -I/usr/local/include
-- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 \
-- -march=pentium -fomit-frame-pointer -pipe -ffast-math \
-+ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG \
-+ -fomit-frame-pointer -pipe -ffast-math \
- -falign-loops=2 -falign-jumps=2 -falign-functions=2 \
- -funroll-loops -fstrength-reduce
- HAVE_VM_COMPILED=false
-@@ -615,16 +615,15 @@ ifeq ($(PLATFORM),openbsd)
- SHLIBCFLAGS=-fPIC
- SHLIBLDFLAGS=-shared $(LDFLAGS)
-
-- THREAD_LDFLAGS=-lpthread
-+ THREAD_LDFLAGS=-pthread
- LDFLAGS=-lm
-
-- CLIENT_LDFLAGS =
-+ CLIENT_LDFLAGS = $(shell sdl-config --libs) -lGL -lsndio
-
-- CLIENT_LDFLAGS += $(shell sdl-config --libs) -lGL
--
+- BASE_CFLAGS += -DNO_VM_COMPILED
+- HAVE_VM_COMPILED=false
++ HAVE_VM_COMPILED=true
+
+ SHLIBEXT=so
+ SHLIBNAME=.$(SHLIBEXT)
+@@ -675,11 +675,12 @@ ifeq ($(PLATFORM),openbsd)
+
+ CLIENT_LIBS =
+
+- CLIENT_LIBS += $(SDL_LIBS) -lGL
++ CLIENT_LIBS += $(SDL_LIBS) -lGL -lsndio
+
ifeq ($(USE_OPENAL),1)
-+ CLIENT_LDFLAGS += $(THREAD_LDFLAGS)
++ CLIENT_LIBS += $(THREAD_LIBS)
ifneq ($(USE_OPENAL_DLOPEN),1)
-- CLIENT_LDFLAGS += $(THREAD_LDFLAGS) -lossaudio -lopenal
-+ CLIENT_LDFLAGS += $(shell openal-config --libs)
+- CLIENT_LIBS += $(THREAD_LIBS) -lossaudio -lopenal
++ CLIENT_LIBS += $(shell openal-config --libs)
endif
endif
-@@ -781,13 +780,13 @@ endif #SunOS
- TARGETS =
+@@ -851,11 +852,11 @@ ifndef SHLIBNAME
+ endif
ifneq ($(BUILD_SERVER),0)
-- TARGETS += $(B)/oa_ded.$(ARCH)$(BINEXT)
-+ TARGETS += $(B)/openarena-server$(BINEXT)
+- TARGETS += $(B)/oa_ded$(FULLBINEXT)
++ TARGETS += $(B)/openarena-server$(FULLBINEXT)
endif
ifneq ($(BUILD_CLIENT),0)
-- TARGETS += $(B)/openarena.$(ARCH)$(BINEXT)
-+ TARGETS += $(B)/openarena-client$(BINEXT)
+- TARGETS += $(B)/openarena$(FULLBINEXT)
++ TARGETS += $(B)/openarena-client$(FULLBINEXT)
ifneq ($(BUILD_CLIENT_SMP),0)
-- TARGETS += $(B)/openarena-smp.$(ARCH)$(BINEXT)
-+ TARGETS += $(B)/openarena-smp$(BINEXT)
+ TARGETS += $(B)/openarena-smp$(FULLBINEXT)
endif
- endif
-
-@@ -1347,8 +1346,9 @@ Q3OBJ = \
+@@ -1471,8 +1472,9 @@ Q3OBJ = \
\
$(B)/client/sdl_gamma.o \
$(B)/client/sdl_input.o \
@@ -94,31 +83,25 @@ $OpenBSD: ports/games/openarena/patches/patch-Makefile,v
1.3 2010/05/27 03:47:28
$(B)/client/con_passive.o \
$(B)/client/con_log.o \
$(B)/client/sys_main.o
-@@ -1450,12 +1450,12 @@ Q3POBJ += \
+@@ -1597,7 +1599,7 @@ Q3POBJ += \
Q3POBJ_SMP += \
$(B)/clientsmp/sdl_glimp.o
--$(B)/openarena.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN)
-+$(B)/openarena-client$(BINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN)
- $(echo_cmd) "LD $@"
- $(Q)$(CC) -o $@ $(Q3OBJ) $(Q3POBJ) $(CLIENT_LDFLAGS) \
- $(LDFLAGS) $(LIBSDLMAIN)
-
--$(B)/openarena-smp.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN)
-+$(B)/openarena-smp$(BINEXT): $(Q3OBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN)
+-$(B)/openarena$(FULLBINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN)
++$(B)/openarena-client$(FULLBINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN)
$(echo_cmd) "LD $@"
- $(Q)$(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(CLIENT_LDFLAGS) \
- $(THREAD_LDFLAGS) $(LDFLAGS) $(LIBSDLMAIN)
-@@ -1582,7 +1582,7 @@ else
- $(B)/ded/con_tty.o
+ $(Q)$(CC) $(CLIENT_CFLAGS) $(CFLAGS) $(CLIENT_LDFLAGS) $(LDFLAGS) \
+ -o $@ $(Q3OBJ) $(Q3POBJ) \
+@@ -1756,7 +1758,7 @@ ifeq ($(PLATFORM),darwin)
+ $(B)/ded/sys_osx.o
endif
--$(B)/oa_ded.$(ARCH)$(BINEXT): $(Q3DOBJ)
-+$(B)/openarena-server$(BINEXT): $(Q3DOBJ)
+-$(B)/oa_ded$(FULLBINEXT): $(Q3DOBJ)
++$(B)/openarena-server$(FULLBINEXT): $(Q3DOBJ)
$(echo_cmd) "LD $@"
- $(Q)$(CC) -o $@ $(Q3DOBJ) $(LDFLAGS)
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(Q3DOBJ) $(LIBS)
-@@ -1899,6 +1899,9 @@ $(B)/client/%.o: $(SPEEXDIR)/%.c
+@@ -2076,6 +2078,9 @@ $(B)/client/%.o: $(ZDIR)/%.c
$(B)/client/%.o: $(RDIR)/%.c
$(DO_CC)
@@ -128,25 +111,21 @@ $OpenBSD: ports/games/openarena/patches/patch-Makefile,v
1.3 2010/05/27 03:47:28
$(B)/client/%.o: $(SDLDIR)/%.c
$(DO_CC)
-@@ -2037,17 +2040,17 @@ copyfiles: release
+@@ -2223,7 +2228,7 @@ copyfiles: release
-$(MKDIR) -p -m 0755 $(COPYDIR)/missionpack
ifneq ($(BUILD_CLIENT),0)
-- $(INSTALL) -s -m 0755 $(BR)/openarena.$(ARCH)$(BINEXT)
$(COPYDIR)/openarena.$(ARCH)$(BINEXT)
-+ $(INSTALL) -s -m 0755 $(BR)/openarena-client$(BINEXT)
$(COPYDIR)/openarena-client$(BINEXT)
+- $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/openarena$(FULLBINEXT)
$(COPYBINDIR)/openarena$(FULLBINEXT)
++ $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/openarena-client$(FULLBINEXT)
$(COPYBINDIR)/openarena-client$(FULLBINEXT)
endif
# Don't copy the SMP until it's working together with SDL.
- #ifneq ($(BUILD_CLIENT_SMP),0)
--# $(INSTALL) -s -m 0755 $(BR)/openarena-smp.$(ARCH)$(BINEXT)
$(COPYDIR)/openarena-smp.$(ARCH)$(BINEXT)
-+# $(INSTALL) -s -m 0755 $(BR)/openarena-smp$(BINEXT)
$(COPYDIR)/openarena-smp$(BINEXT)
- #endif
+@@ -2233,7 +2238,7 @@ endif
ifneq ($(BUILD_SERVER),0)
-- @if [ -f $(BR)/oa_ded.$(ARCH)$(BINEXT) ]; then \
-- $(INSTALL) -s -m 0755 $(BR)/oa_ded.$(ARCH)$(BINEXT)
$(COPYDIR)/oa_ded.$(ARCH)$(BINEXT); \
-+ @if [ -f $(BR)/openarena-server$(BINEXT) ]; then \
-+ $(INSTALL) -s -m 0755 $(BR)/openarena-server$(BINEXT)
$(COPYDIR)/openarena-server$(BINEXT); \
+ @if [ -f $(BR)/oa_ded$(FULLBINEXT) ]; then \
+- $(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/oa_ded$(FULLBINEXT)
$(COPYBINDIR)/oa_ded$(FULLBINEXT); \
++ $(INSTALL) $(STRIP_FLAG) -m 0755
$(BR)/openarena-server$(FULLBINEXT)
$(COPYBINDIR)/openarena-server$(FULLBINEXT); \
fi
endif
diff --git games/openarena/patches/patch-code_client_libmumblelink_c
games/openarena/patches/patch-code_client_libmumblelink_c
index 0aaa068..79e1c4f 100644
--- games/openarena/patches/patch-code_client_libmumblelink_c
+++ games/openarena/patches/patch-code_client_libmumblelink_c
@@ -1,7 +1,7 @@
$OpenBSD: ports/games/openarena/patches/patch-code_client_libmumblelink_c,v
1.1.1.1 2008/10/27 13:29:02 weerd Exp $
---- code/client/libmumblelink.c.orig Thu Aug 21 23:11:45 2008
-+++ code/client/libmumblelink.c Thu Aug 21 23:11:59 2008
-@@ -86,7 +86,11 @@ int mumble_link(const char* name)
+--- code/client/libmumblelink.c.orig Sat Dec 24 14:29:31 2011
++++ code/client/libmumblelink.c Tue Mar 6 22:44:31 2012
+@@ -101,7 +101,11 @@ int mumble_link(const char* name)
return 0;
snprintf(file, sizeof (file), "/MumbleLink.%d", getuid());
diff --git games/openarena/patches/patch-code_client_snd_dma_c
games/openarena/patches/patch-code_client_snd_dma_c
index 4b292c5..4375cf8 100644
--- games/openarena/patches/patch-code_client_snd_dma_c
+++ games/openarena/patches/patch-code_client_snd_dma_c
@@ -1,7 +1,7 @@
$OpenBSD: ports/games/openarena/patches/patch-code_client_snd_dma_c,v 1.1
2010/05/27 03:47:28 jakemsr Exp $
---- code/client/snd_dma.c.orig Mon May 3 05:44:09 2010
-+++ code/client/snd_dma.c Mon May 3 06:18:07 2010
-@@ -1221,7 +1221,6 @@ void S_Update_(void) {
+--- code/client/snd_dma.c.orig Sat Dec 24 14:29:31 2011
++++ code/client/snd_dma.c Tue Mar 6 22:44:31 2012
+@@ -1219,7 +1219,6 @@ void S_Update_(void) {
static float lastTime = 0.0f;
float ma, op;
float thisTime, sane;
@@ -9,7 +9,7 @@ $OpenBSD:
ports/games/openarena/patches/patch-code_client_snd_dma_c,v 1.1 2010/0
if ( !s_soundStarted || s_soundMuted ) {
return;
-@@ -1231,11 +1230,6 @@ void S_Update_(void) {
+@@ -1229,11 +1228,6 @@ void S_Update_(void) {
// Updates s_soundtime
S_GetSoundtime();
diff --git games/openarena/patches/patch-code_qcommon_net_ip_c
games/openarena/patches/patch-code_qcommon_net_ip_c
deleted file mode 100644
index 9512fc8..0000000
--- games/openarena/patches/patch-code_qcommon_net_ip_c
+++ /dev/null
@@ -1,25 +0,0 @@
-$OpenBSD: ports/games/openarena/patches/patch-code_qcommon_net_ip_c,v 1.1.1.1
2008/10/27 13:29:02 weerd Exp $
---- code/qcommon/net_ip.c.orig Sun Aug 31 14:36:07 2008
-+++ code/qcommon/net_ip.c Sun Aug 31 14:44:25 2008
-@@ -335,7 +335,21 @@ Sys_SockaddrToString
- */
- static void Sys_SockaddrToString(char *dest, int destlen, struct sockaddr
*input, int inputlen)
- {
-+/* OA's inputlen is incompatible with getnameinfo() on OpenBSD */
-+#ifdef __OpenBSD__
-+ struct sockaddr_in *s4;
-+ struct sockaddr_in6 *s6;
-+
-+ if (input->sa_family == AF_INET) {
-+ s4 = (struct sockaddr_in *)(input);
-+ inet_ntop(AF_INET, (void *)&(s4->sin_addr), dest, destlen);
-+ } else if (input->sa_family == AF_INET6) {
-+ s6 = (struct sockaddr_in6 *)(input);
-+ inet_ntop(AF_INET6, (void *)&(s6->sin6_addr), dest, destlen);
-+ }
-+#else
- getnameinfo(input, inputlen, dest, destlen, NULL, 0, NI_NUMERICHOST);
-+#endif
- }
-
- /*
diff --git games/openarena/patches/patch-code_qcommon_q_platform_h
games/openarena/patches/patch-code_qcommon_q_platform_h
index 9ca550b..c6b3d3f 100644
--- games/openarena/patches/patch-code_qcommon_q_platform_h
+++ games/openarena/patches/patch-code_qcommon_q_platform_h
@@ -1,7 +1,7 @@
$OpenBSD: ports/games/openarena/patches/patch-code_qcommon_q_platform_h,v
1.1.1.1 2008/10/27 13:29:02 weerd Exp $
---- code/qcommon/q_platform.h.orig Sun Jun 29 16:00:45 2008
-+++ code/qcommon/q_platform.h Fri Aug 22 21:20:21 2008
-@@ -170,7 +170,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+--- code/qcommon/q_platform.h.orig Sat Dec 24 14:29:32 2011
++++ code/qcommon/q_platform.h Tue Mar 6 22:44:31 2012
+@@ -209,7 +209,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
//=================================================================== BSD ===
@@ -10,7 +10,7 @@ $OpenBSD:
ports/games/openarena/patches/patch-code_qcommon_q_platform_h,v 1.1.1.
#include <sys/types.h>
#include <machine/endian.h>
-@@ -181,8 +181,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+@@ -220,8 +220,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
#if defined(__FreeBSD__)
#define OS_STRING "freebsd"
@@ -19,7 +19,7 @@ $OpenBSD:
ports/games/openarena/patches/patch-code_qcommon_q_platform_h,v 1.1.1.
#elif defined(__NetBSD__)
#define OS_STRING "netbsd"
#endif
-@@ -206,6 +204,29 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+@@ -247,6 +245,29 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
#endif
diff --git games/openarena/patches/patch-code_qcommon_q_shared_h
games/openarena/patches/patch-code_qcommon_q_shared_h
deleted file mode 100644
index 75f19c6..0000000
--- games/openarena/patches/patch-code_qcommon_q_shared_h
+++ /dev/null
@@ -1,15 +0,0 @@
-$OpenBSD: ports/games/openarena/patches/patch-code_qcommon_q_shared_h,v 1.1
2010/05/27 03:47:28 jakemsr Exp $
---- code/qcommon/q_shared.h.orig Mon May 3 04:41:00 2010
-+++ code/qcommon/q_shared.h Mon May 3 04:41:20 2010
-@@ -157,9 +157,9 @@ typedef int clipHandle_t;
- #define PAD(x,y) (((x)+(y)-1) & ~((y)-1))
-
- #ifdef __GNUC__
--#define ALIGN(x) __attribute__((aligned(x)))
-+#define QALIGN(x) __attribute__((aligned(x)))
- #else
--#define ALIGN(x)
-+#define QALIGN(x)
- #endif
-
- #ifndef NULL
diff --git games/openarena/patches/patch-code_qcommon_vm_interpreted_c
games/openarena/patches/patch-code_qcommon_vm_interpreted_c
deleted file mode 100644
index 607d606..0000000
--- games/openarena/patches/patch-code_qcommon_vm_interpreted_c
+++ /dev/null
@@ -1,23 +0,0 @@
-$OpenBSD: ports/games/openarena/patches/patch-code_qcommon_vm_interpreted_c,v
1.1 2009/02/03 19:48:42 kili Exp $
---- code/qcommon/vm_interpreted.c.orig Sat Aug 9 18:28:20 2008
-+++ code/qcommon/vm_interpreted.c Sat Jan 10 21:23:02 2009
-@@ -532,8 +532,8 @@ nextInstruction2:
-
- //VM_LogSyscalls( (int *)&image[ programStack + 4 ] );
- {
-- intptr_t* argptr = (intptr_t *)&image[
programStack + 4 ];
-- #if __WORDSIZE == 64
-+ intptr_t* argptr;
-+ #if LONG_BIT == 64
- // the vm has ints on the stack, we expect
- // longs so we have to convert it
- intptr_t argarr[16];
-@@ -542,6 +542,8 @@ nextInstruction2:
- argarr[i] = *(int*)&image[
programStack + 4 + 4*i ];
- }
- argptr = argarr;
-+ #else
-+ argptr = (intptr_t *)&image[
programStack + 4 ];
- #endif
- r = vm->systemCall( argptr );
- }
diff --git games/openarena/patches/patch-code_qcommon_vm_x86_64_c
games/openarena/patches/patch-code_qcommon_vm_x86_64_c
new file mode 100644
index 0000000..2489187
--- /dev/null
+++ games/openarena/patches/patch-code_qcommon_vm_x86_64_c
@@ -0,0 +1,24 @@
+$OpenBSD$
+
+ * Add PROT_READ to x86 and x86_64 VM mmap calls[1]
+
+[1] According to OpenBSD's mmap(2):
+
+BUGS
+ Due to a limitation of the current vm system (see uvm(9)), mapping
+ descriptors PROT_WRITE without also specifying PROT_READ is useless
+ (results in a segmentation fault when first accessing the mapping). This
+ means that such descriptors must be opened with O_RDWR, which requires
+ both read and write permissions on the underlying object.
+
+--- code/qcommon/vm_x86_64.c.orig Sat Dec 24 14:29:32 2011
++++ code/qcommon/vm_x86_64.c Sun Mar 11 15:22:24 2012
+@@ -445,7 +445,7 @@ void VM_Compile( vm_t *vm, vmHeader_t *header ) {
+ vm->codeLength = compiledOfs;
+
+ #ifdef VM_X86_64_MMAP
+- vm->codeBase = mmap(NULL, compiledOfs, PROT_WRITE,
MAP_SHARED|MAP_ANONYMOUS, -1, 0);
++ vm->codeBase = mmap(NULL, compiledOfs,
PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0);
+ if(vm->codeBase == MAP_FAILED)
+ Com_Error(ERR_FATAL, "VM_CompileX86_64: can't
mmap memory");
+ #elif __WIN64__
diff --git games/openarena/patches/patch-code_qcommon_vm_x86_c
games/openarena/patches/patch-code_qcommon_vm_x86_c
new file mode 100644
index 0000000..c68ca5a
--- /dev/null
+++ games/openarena/patches/patch-code_qcommon_vm_x86_c
@@ -0,0 +1,33 @@
+$OpenBSD$
+
+ * Add PROT_READ to x86 and x86_64 VM mmap calls[1]
+
+[1] According to OpenBSD's mmap(2):
+
+BUGS
+ Due to a limitation of the current vm system (see uvm(9)), mapping
+ descriptors PROT_WRITE without also specifying PROT_READ is useless
+ (results in a segmentation fault when first accessing the mapping). This
+ means that such descriptors must be opened with O_RDWR, which requires
+ both read and write permissions on the underlying object.
+
+--- code/qcommon/vm_x86.c.orig Sat Dec 24 14:29:32 2011
++++ code/qcommon/vm_x86.c Sun Mar 11 15:22:08 2012
+@@ -36,7 +36,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+
+ /* need this on NX enabled systems (i386 with PAE kernel or
+ * noexec32=on x86_64) */
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ #define VM_X86_MMAP
+ #endif
+
+@@ -1094,7 +1094,7 @@ void VM_Compile( vm_t *vm, vmHeader_t *header ) {
+ // copy to an exact size buffer on the hunk
+ vm->codeLength = compiledOfs;
+ #ifdef VM_X86_MMAP
+- vm->codeBase = mmap(NULL, compiledOfs, PROT_WRITE,
MAP_SHARED|MAP_ANONYMOUS, -1, 0);
++ vm->codeBase = mmap(NULL, compiledOfs, PROT_READ|PROT_WRITE,
MAP_SHARED|MAP_ANONYMOUS, -1, 0);
+ if(vm->codeBase == MAP_FAILED)
+ Com_Error(ERR_FATAL, "VM_CompileX86: can't mmap memory");
+ #elif _WIN32
diff --git games/openarena/patches/patch-code_renderer_tr_local_h
games/openarena/patches/patch-code_renderer_tr_local_h
deleted file mode 100644
index d24ad96..0000000
--- games/openarena/patches/patch-code_renderer_tr_local_h
+++ /dev/null
@@ -1,28 +0,0 @@
-$OpenBSD: ports/games/openarena/patches/patch-code_renderer_tr_local_h,v 1.1
2010/05/27 03:47:28 jakemsr Exp $
---- code/renderer/tr_local.h.orig Mon May 3 04:41:46 2010
-+++ code/renderer/tr_local.h Mon May 3 04:42:13 2010
-@@ -1302,16 +1302,16 @@ typedef struct stageVars
-
- typedef struct shaderCommands_s
- {
-- glIndex_t indexes[SHADER_MAX_INDEXES] ALIGN(16);
-- vec4_t xyz[SHADER_MAX_VERTEXES] ALIGN(16);
-- vec4_t normal[SHADER_MAX_VERTEXES] ALIGN(16);
-- vec2_t texCoords[SHADER_MAX_VERTEXES][2] ALIGN(16);
-- color4ub_t vertexColors[SHADER_MAX_VERTEXES] ALIGN(16);
-- int vertexDlightBits[SHADER_MAX_VERTEXES] ALIGN(16);
-+ glIndex_t indexes[SHADER_MAX_INDEXES] QALIGN(16);
-+ vec4_t xyz[SHADER_MAX_VERTEXES] QALIGN(16);
-+ vec4_t normal[SHADER_MAX_VERTEXES] QALIGN(16);
-+ vec2_t texCoords[SHADER_MAX_VERTEXES][2] QALIGN(16);
-+ color4ub_t vertexColors[SHADER_MAX_VERTEXES] QALIGN(16);
-+ int vertexDlightBits[SHADER_MAX_VERTEXES]
QALIGN(16);
-
-- stageVars_t svars ALIGN(16);
-+ stageVars_t svars QALIGN(16);
-
-- color4ub_t constantColor255[SHADER_MAX_VERTEXES] ALIGN(16);
-+ color4ub_t constantColor255[SHADER_MAX_VERTEXES] QALIGN(16);
-
- shader_t *shader;
- float shaderTime;
diff --git games/openarena/patches/patch-code_renderer_tr_surface_c
games/openarena/patches/patch-code_renderer_tr_surface_c
deleted file mode 100644
index b29f90c..0000000
--- games/openarena/patches/patch-code_renderer_tr_surface_c
+++ /dev/null
@@ -1,18 +0,0 @@
-$OpenBSD: ports/games/openarena/patches/patch-code_renderer_tr_surface_c,v 1.1
2010/05/27 03:47:28 jakemsr Exp $
---- code/renderer/tr_surface.c.orig Mon May 3 04:42:28 2010
-+++ code/renderer/tr_surface.c Mon May 3 04:42:47 2010
-@@ -615,10 +615,10 @@ static void LerpMeshVertexes_altivec(md3Surface_t *sur
- {
- short *oldXyz, *newXyz, *oldNormals, *newNormals;
- float *outXyz, *outNormal;
-- float oldXyzScale ALIGN(16);
-- float newXyzScale ALIGN(16);
-- float oldNormalScale ALIGN(16);
-- float newNormalScale ALIGN(16);
-+ float oldXyzScale QALIGN(16);
-+ float newXyzScale QALIGN(16);
-+ float oldNormalScale QALIGN(16);
-+ float newNormalScale QALIGN(16);
- int vertNum;
- unsigned lat, lng;
- int numVerts;
diff --git games/openarena/patches/patch-code_sys_sys_unix_c
games/openarena/patches/patch-code_sys_sys_unix_c
index aa80fa9..3b59558 100644
--- games/openarena/patches/patch-code_sys_sys_unix_c
+++ games/openarena/patches/patch-code_sys_sys_unix_c
@@ -1,7 +1,7 @@
$OpenBSD: ports/games/openarena/patches/patch-code_sys_sys_unix_c,v 1.1
2010/05/27 03:47:28 jakemsr Exp $
---- code/sys/sys_unix.c.orig Sat May 2 16:44:02 2009
-+++ code/sys/sys_unix.c Sat May 2 16:44:21 2009
-@@ -139,7 +139,7 @@ qboolean Sys_RandomBytes( byte *string, int len )
+--- code/sys/sys_unix.c.orig Sat Dec 24 14:29:36 2011
++++ code/sys/sys_unix.c Wed Mar 7 10:11:54 2012
+@@ -151,7 +151,7 @@ qboolean Sys_RandomBytes( byte *string, int len )
{
FILE *fp;
diff --git games/openarena/pkg/PLIST-data games/openarena/pkg/PLIST-data
index 540ace8..f958b12 100644
--- games/openarena/pkg/PLIST-data
+++ games/openarena/pkg/PLIST-data
@@ -9,5 +9,6 @@ share/openarena/baseoa/pak4-textures.pk3
share/openarena/baseoa/pak5-TA.pk3
share/openarena/baseoa/pak6-misc.pk3
share/openarena/baseoa/pak6-patch085.pk3
+share/openarena/baseoa/pak6-patch088.pk3
share/openarena/missionpack/
share/openarena/missionpack/mp-pak0.pk3