OpenArena: bump commit, enable x86_64

This commit is contained in:
Sergei Reznikov
2018-10-09 14:35:37 +03:00
parent 5fae408659
commit 9d7c677643
2 changed files with 33 additions and 25 deletions

View File

@@ -6,27 +6,27 @@ HOMEPAGE="http://openarena.ws/"
COPYRIGHT="OpenArena Team"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://sourceforge.net/projects/oarena/files/src/openarena-engine-source-$portVersion.tar.bz2"
CHECKSUM_SHA256="95aa500cb7e42e57fb1f6db7b97a254168f4fa2e3676d6cdc33180b69fde0e77"
SOURCE_DIR="openarena-engine-source-$portVersion"
srcGitRev="e120f49e660aab5420e6acb3a5131992645f39c3"
SOURCE_URI="https://github.com/OpenArena/engine/archive/$srcGitRev.zip"
CHECKSUM_SHA256="5d92a0fab326bb5f80eb662e741add908bafc7b76ee023adf6846c86354b0d7c"
SOURCE_DIR="engine-$srcGitRev"
PATCHES="openarena-$portVersion.patchset"
ADDITIONAL_FILES="openarena.rdef"
ARCHITECTURES="!x86_gcc2 ?x86_64 ?x86"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
openarena = $portVersion
app:OpenArena
"
#mesa_swrast is necessary, as other renderers cause game to crash
REQUIRES="
haiku$secondaryArchSuffix
mesa${secondaryArchSuffix}_swrast
lib:libGL$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libSDL$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
lib:libxmp$secondaryArchSuffix
"
BUILD_REQUIRES="
@@ -38,6 +38,8 @@ BUILD_REQUIRES="
devel:libopenal$secondaryArchSuffix
devel:libSDL$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
devel:libxmp$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
@@ -50,7 +52,7 @@ BUILD_PREREQUIRES="
BUILD()
{
make $jobArgs USE_LOCAL_HEADERS=0
echo make $jobArgs USE_LOCAL_HEADERS=0
}
INSTALL()

View File

@@ -1,15 +1,15 @@
From 3f646808d8ff962babe62a461dd6408aa88a00d9 Mon Sep 17 00:00:00 2001
From 64bd2a7af5cda0dcc1409964d87420dca84d549b Mon Sep 17 00:00:00 2001
From: Mikolaj 'lich' Halber <lich@opmbx.org>
Date: Tue, 15 Dec 2015 05:13:14 +0000
Date: Tue, 9 Oct 2018 14:24:32 +0300
Subject: Added Haiku support
diff --git a/Makefile b/Makefile
index 493fd2c..672078f 100644
index 3aae339..518791f 100644
--- a/Makefile
+++ b/Makefile
@@ -820,7 +820,53 @@ ifeq ($(PLATFORM),sunos)
CLIENT_LIBS +=$(SDL_LIBS) -lGL -lX11 -lXext -liconv -lm
@@ -900,7 +900,53 @@ ifeq ($(PLATFORM),sunos)
RENDERER_LIBS = $(SDL_LIBS) -lGL
else # ifeq sunos
+#############################################################################
@@ -22,10 +22,10 @@ index 493fd2c..672078f 100644
+ endif
+
+ SHLIBEXT=so
+ SHLIBCFLAGS=-fno-PIC
+ SHLIBCFLAGS=-fPIC
+ SHLIBLDFLAGS=-shared $(LDFLAGS)
+ LDFLAGS=-lnetwork
+ BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -fno-PIC
+ BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -fPIC
+ CLIENT_CFLAGS =
+ CLIENT_CFLAGS += $(SDL_CFLAGS)
+ SERVER_CFLAGS =
@@ -62,19 +62,19 @@ index 493fd2c..672078f 100644
#############################################################################
# SETUP AND BUILD -- GENERIC
#############################################################################
@@ -839,6 +885,7 @@ endif #OpenBSD
@@ -919,6 +965,7 @@ endif #OpenBSD
endif #NetBSD
endif #IRIX
endif #SunOS
+endif #haiku
TARGETS =
ifndef CC
CC=gcc
diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c
index ce7a325..c335b43 100644
index 4ef3e34..0ea922e 100644
--- a/code/qcommon/net_ip.c
+++ b/code/qcommon/net_ip.c
@@ -1298,7 +1298,7 @@ static void NET_AddLocalAddress(char *ifname, struct sockaddr *addr, struct sock
@@ -1268,7 +1268,7 @@ static void NET_AddLocalAddress(char *ifname, struct sockaddr *addr, struct sock
}
}
@@ -84,10 +84,10 @@ index ce7a325..c335b43 100644
{
struct ifaddrs *ifap, *search;
diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h
index 1be979a..eed4064 100644
index 999dd39..9f89ab8 100644
--- a/code/qcommon/q_platform.h
+++ b/code/qcommon/q_platform.h
@@ -304,6 +304,23 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -324,6 +324,29 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
@@ -100,7 +100,13 @@ index 1be979a..eed4064 100644
+#define ID_INLINE inline
+#define PATH_SEP '/'
+
+#define ARCH_STRING "i386"
+#ifdef __i386__
+#define ARCH_STRING "x86"
+#elif defined __amd64__
+#undef idx64
+#define idx64 1
+#define ARCH_STRING "x86_64"
+#endif
+
+#define Q3_LITTLE_ENDIAN // HAIKU's i386 are always little endian
+
@@ -112,10 +118,10 @@ index 1be979a..eed4064 100644
//catch missing defines in above blocks
diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c
index 17015af..16d2f2d 100644
index d11ecf6..43f4d15 100644
--- a/code/sys/sys_unix.c
+++ b/code/sys/sys_unix.c
@@ -732,7 +732,7 @@ void Sys_PlatformInit( void )
@@ -964,7 +964,7 @@ void Sys_PlatformInit( void )
signal( SIGHUP, Sys_SigHandler );
signal( SIGQUIT, Sys_SigHandler );
signal( SIGTRAP, Sys_SigHandler );
@@ -125,5 +131,5 @@ index 17015af..16d2f2d 100644
stdinIsATTY = isatty( STDIN_FILENO ) &&
--
2.2.2
2.19.1