mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Openarena: add recipe and patch for version 0.8.8
This commit is contained in:
38
games-action/openarena/additional-files/openarena.rdef
Normal file
38
games-action/openarena/additional-files/openarena.rdef
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH | B_ARGV_ONLY;
|
||||
|
||||
resource app_version {
|
||||
major = 0,
|
||||
middle = 7,
|
||||
minor = 4,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "OpenArena",
|
||||
long_info = "An open-source replacement for Quake 3 Arena."
|
||||
};
|
||||
|
||||
resource app_signature "application/x-vnd.openarena";
|
||||
|
||||
resource vector_icon {
|
||||
$"6E636966010500060A04C3F4C39AC2C6C13EC3F4BE86C522C13E0A04C3F4C39A"
|
||||
$"C2C6C13EC3F4BE86C522C13E060AAECE0EC7BFCA9ACBA1CA9ACBA1CA9ACAE5CA"
|
||||
$"46CA72C99FC3FBB464BD84C9A5BC54CAA0BD11CA4CBC54CAA0C036BEFFC9BD3F"
|
||||
$"CA29BEFFC9BDC3FBB829C8F6C9B7C8F6C9B7C89CCA23060AAECE0EC7BFCA9ACB"
|
||||
$"A1CA9ACBA1CA9ACAE5CA46CA72C99FC3FBB464BD84C9A5BC54CAA0BD11CA4CBC"
|
||||
$"54CAA0C036BEFFC9BD3FCA29BEFFC9BDC3FBB829C8F6C9B7C8F6C9B7C89CCA23"
|
||||
$"020AC3E82BCC5B2BBB752BB49CBD59B49CBA0EB49CC03CC0DAC331B9DEC2A4C0"
|
||||
$"DAC331C181C0E6C181C0E6BA66C090B52EBC8EB490BEC7B5DDBA1DC3E8B7AEBB"
|
||||
$"C6B7AECC0AB7AED2A2BC8ED22FBA4AD314BECDC675C0E5CD7642C675C0E5C71B"
|
||||
$"C32EC71BC32ECE05C29BD335BD59D335C037D335BA0E020AC3E82BCC5B2BBB75"
|
||||
$"2BB49CBD59B49CBA0EB49CC03CC0DAC331B9DEC2A4C0DAC331C181C0E6C181C0"
|
||||
$"E6BA66C090B52EBC8EB490BEC7B5DDBA1DC3E8B7AEBBC6B7AECC0AB7AED2A2BC"
|
||||
$"8ED22FBA4AD314BECDC675C0E5CD7642C675C0E5C71BC32EC71BC32ECE05C29B"
|
||||
$"D335BD59D335C037D335BA0E060A000100023F533F0000000000003F533FC357"
|
||||
$"1E451C630A000101123F533F0000000000003F533FC3571E451C630117800004"
|
||||
$"0A000102023F533F0000000000003F533FC3571E451C630A000103123F533F00"
|
||||
$"00000000003F533FC3571E451C6301178000040A000104023F533F0000000000"
|
||||
$"003F533FC3571E451C630A000105123F533F0000000000003F533FC3571E451C"
|
||||
$"630117800004"
|
||||
};
|
||||
61
games-action/openarena/openarena-0.8.8.recipe
Normal file
61
games-action/openarena/openarena-0.8.8.recipe
Normal file
@@ -0,0 +1,61 @@
|
||||
SUMMARY="Open-source replacement for Quake 3 Arena"
|
||||
DESCRIPTION="OpenArena is a free and open-source first-person shooter (FPS) computer game based \
|
||||
heavily on the Quake III Arena-style deathmatch. The OpenArena project was established on August \
|
||||
19, 2005, the day after the id Tech 3 GPL source code was released."
|
||||
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"
|
||||
SOURCE_DIR="openarena-engine-source-$portVersion"
|
||||
CHECKSUM_SHA256="95aa500cb7e42e57fb1f6db7b97a254168f4fa2e3676d6cdc33180b69fde0e77"
|
||||
PATCHES="openarena-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86_64 ?x86"
|
||||
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
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libglu$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
devel:libopenal$secondaryArchSuffix
|
||||
devel:libSDL$secondaryArchSuffix
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:install
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:which
|
||||
"
|
||||
BUILD()
|
||||
{
|
||||
make $jobArgs USE_LOCAL_HEADERS=0
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build/release*
|
||||
mkdir -p $appsDir/OpenArena
|
||||
cp openarena* $appsDir/OpenArena/OpenArena
|
||||
cp oa_ded* $appsDir/OpenArena/OpenArena_dedicated
|
||||
addResourcesToBinaries $portDir/additional-files/openarena.rdef $appsDir/OpenArena/OpenArena
|
||||
addAppDeskbarSymlink $appsDir/OpenArena/OpenArena OpenArena
|
||||
}
|
||||
129
games-action/openarena/patches/openarena-0.8.8.patchset
Normal file
129
games-action/openarena/patches/openarena-0.8.8.patchset
Normal file
@@ -0,0 +1,129 @@
|
||||
From 3f646808d8ff962babe62a461dd6408aa88a00d9 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj 'lich' Halber <lich@opmbx.org>
|
||||
Date: Tue, 15 Dec 2015 05:13:14 +0000
|
||||
Subject: Added Haiku support
|
||||
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 493fd2c..672078f 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -820,7 +820,53 @@ ifeq ($(PLATFORM),sunos)
|
||||
CLIENT_LIBS +=$(SDL_LIBS) -lGL -lX11 -lXext -liconv -lm
|
||||
|
||||
else # ifeq sunos
|
||||
+#############################################################################
|
||||
+# SETUP AND BUILD -- HAIKU
|
||||
+#############################################################################
|
||||
+ifeq ($(PLATFORM),haiku)
|
||||
+
|
||||
+ ifeq ($(shell uname -m), BePC)
|
||||
+ ARCH=i386
|
||||
+ endif
|
||||
+
|
||||
+ SHLIBEXT=so
|
||||
+ SHLIBCFLAGS=-fno-PIC
|
||||
+ SHLIBLDFLAGS=-shared $(LDFLAGS)
|
||||
+ LDFLAGS=-lnetwork
|
||||
+ BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -fno-PIC
|
||||
+ CLIENT_CFLAGS =
|
||||
+ CLIENT_CFLAGS += $(SDL_CFLAGS)
|
||||
+ SERVER_CFLAGS =
|
||||
+ LIB=
|
||||
+ CLIENT_LIBS=$(SDL_LIBS) -lGL
|
||||
+ USE_CODEC_VORBIS = 1
|
||||
+ HAVE_VM_COMPILED=true
|
||||
+
|
||||
+ BUILD_CLIENT = 1
|
||||
+ BUILD_GAME_QVM = 0
|
||||
+ BASE_CFLAGS+=-D_BSD_SOURCE -DUSE_ICON
|
||||
+ ifeq ($(USE_OPENAL),1)
|
||||
+ CLIENT_CFLAGS += -DUSE_OPENAL
|
||||
+ ifeq ($(USE_OPENAL_DLOPEN),1)
|
||||
+ CLIENT_CFLAGS += -DUSE_OPENAL_DLOPEN
|
||||
+ endif
|
||||
+ endif
|
||||
+
|
||||
+ ifeq ($(USE_CURL),1)
|
||||
+ CLIENT_CFLAGS += -DUSE_CURL
|
||||
+ ifeq ($(USE_CURL_DLOPEN),1)
|
||||
+ CLIENT_CFLAGS += -DUSE_CURL_DLOPEN
|
||||
+ endif
|
||||
+ endif
|
||||
+
|
||||
+
|
||||
+ ifeq ($(USE_CODEC_VORBIS),1)
|
||||
+ CLIENT_CFLAGS += -DUSE_CODEC_VORBIS
|
||||
+ CLIENT_LIBS += -lvorbisfile -lvorbis -logg
|
||||
+ endif
|
||||
+
|
||||
|
||||
+else # ifeq haiku
|
||||
#############################################################################
|
||||
# SETUP AND BUILD -- GENERIC
|
||||
#############################################################################
|
||||
@@ -839,6 +885,7 @@ endif #OpenBSD
|
||||
endif #NetBSD
|
||||
endif #IRIX
|
||||
endif #SunOS
|
||||
+endif #haiku
|
||||
|
||||
TARGETS =
|
||||
|
||||
diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c
|
||||
index ce7a325..c335b43 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
|
||||
}
|
||||
}
|
||||
|
||||
-#if defined(__linux__) || defined(MACOSX) || defined(__BSD__)
|
||||
+#if defined(__linux__) || defined(MACOSX) || defined(__BSD__) || defined(__HAIKU__)
|
||||
static void NET_GetLocalAddress(void)
|
||||
{
|
||||
struct ifaddrs *ifap, *search;
|
||||
diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h
|
||||
index 1be979a..eed4064 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
|
||||
|
||||
#endif
|
||||
|
||||
+//================================================================== HAIKU ===
|
||||
+
|
||||
+#ifdef __HAIKU__
|
||||
+
|
||||
+#include <endian.h>
|
||||
+#define OS_STRING "HAIKU"
|
||||
+#define ID_INLINE inline
|
||||
+#define PATH_SEP '/'
|
||||
+
|
||||
+#define ARCH_STRING "i386"
|
||||
+
|
||||
+#define Q3_LITTLE_ENDIAN // HAIKU's i386 are always little endian
|
||||
+
|
||||
+#define DLL_EXT ".so"
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
//===========================================================================
|
||||
|
||||
//catch missing defines in above blocks
|
||||
diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c
|
||||
index 17015af..16d2f2d 100644
|
||||
--- a/code/sys/sys_unix.c
|
||||
+++ b/code/sys/sys_unix.c
|
||||
@@ -732,7 +732,7 @@ void Sys_PlatformInit( void )
|
||||
signal( SIGHUP, Sys_SigHandler );
|
||||
signal( SIGQUIT, Sys_SigHandler );
|
||||
signal( SIGTRAP, Sys_SigHandler );
|
||||
- signal( SIGIOT, Sys_SigHandler );
|
||||
+ signal( SIGABRT, Sys_SigHandler );
|
||||
signal( SIGBUS, Sys_SigHandler );
|
||||
|
||||
stdinIsATTY = isatty( STDIN_FILENO ) &&
|
||||
--
|
||||
2.2.2
|
||||
|
||||
32
games-action/openarena_data/openarena_data-0.8.8.recipe
Normal file
32
games-action/openarena_data/openarena_data-0.8.8.recipe
Normal file
@@ -0,0 +1,32 @@
|
||||
SUMMARY="Open-source replacement for Quake 3 Arena (data files)"
|
||||
DESCRIPTION="OpenArena is a free and open-source first-person shooter (FPS) computer game based \
|
||||
heavily on the Quake III Arena-style deathmatch. The OpenArena project was established on August \
|
||||
19, 2005, the day after the id Tech 3 GPL source code was released."
|
||||
HOMEPAGE="http://openarena.ws/"
|
||||
COPYRIGHT="OpenArena Team"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://freefr.dl.sourceforge.net/project/oarena/openarena-$portVersion.zip"
|
||||
SOURCE_DIR="openarena-$portVersion"
|
||||
CHECKSUM_SHA256="5a8faf7f5b51f351b0a1618c06b6b98a5f1a6758f1d39818de2c87df2a0bac4a"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
DISABLE_SOURCE_PACKAGE=yes
|
||||
|
||||
PROVIDES="
|
||||
openarena_data = $portVersion
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
true
|
||||
}
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/OpenArena
|
||||
cp -r $sourceDir/baseoa $sourceDir/missionpack $appsDir/OpenArena/
|
||||
}
|
||||
Reference in New Issue
Block a user