mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
dhewm3: add recipe
This commit is contained in:
33
games-fps/dhewm3/additional-files/dhewm3.rdef.in
Normal file
33
games-fps/dhewm3/additional-files/dhewm3.rdef.in
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH | B_ARGV_ONLY;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = @MINOR@,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "dhewm3",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
|
||||
resource vector_icon {
|
||||
$"6E6369660302000602B0A5EA3C7F30BC3FEBB062CF4B1F614AA26A00930303FF"
|
||||
$"00000002000602AD25FE3D612ABD9FFEAD60864AE91349F1AD00F3A73BFFFF00"
|
||||
$"00040062080A0EEA6266E9FC48E7325AE46843E4685DE13858E0D253E0D220E4"
|
||||
$"CE21E79836EAC821F0C220EEC426EEC4700A07B59BB4F41F2041204525455344"
|
||||
$"56B59CD2D80A053E4C3E323A2C302C30590607362A4D52235020502050206468"
|
||||
$"23695A5F640A06602D592C542F54496153612F0A07D208CA3CD205B44CD3BDB3"
|
||||
$"01DC0A20DE0824DE0854D6F3CDE20A06DAD84ADAD830D9A62C7A2C7630765304"
|
||||
$"07E22E394847404F4651C187C5D3C2E8C7664757405C465C3A5C3957060A0201"
|
||||
$"0712402E400000000000003D2499440C494A6DB401178822040A020701020304"
|
||||
$"050600123D22AB0000000000003A36C742F846498E3801178A22040A00070102"
|
||||
$"0304050600123D22AB0000000000003D98903FE11A42000001178A22040A0107"
|
||||
$"01020304050600023D22AB0000000000003D98903FE11A4200000A0001071001"
|
||||
$"178822040A010107100117832204"
|
||||
};
|
||||
175
games-fps/dhewm3/dhewm3-1.5.1.recipe
Normal file
175
games-fps/dhewm3/dhewm3-1.5.1.recipe
Normal file
@@ -0,0 +1,175 @@
|
||||
SUMMARY="A Doom 3 GPL source modification"
|
||||
DESCRIPTION="dhewm3 is a source port of the original Doom3 (not Doom3 BFG, for that \
|
||||
you may want to try RBDoom3BFG). It's known to work on Windows, Linux, macOS, FreeBSD, \
|
||||
OpenBSD and AROS, but it should work on (or be easily portable to) any system that \
|
||||
supports OpenGL 1.4 with ARB shaders, SDL and OpenAL.
|
||||
|
||||
Compared to the original version of Doom3, dhewm3 has many bugfixes, supports \
|
||||
EAX-like sound effects on all operating systems and hardware (via OpenAL Softs EFX \
|
||||
support), has much better support for widescreen resolutions and has 64bit support.
|
||||
|
||||
Note that while the Doom3 source code has been released under GPL, you still need \
|
||||
to legally own the game and provide dhewm3 the game data to play."
|
||||
HOMEPAGE="https://dhewm3.org/"
|
||||
COPYRIGHT="
|
||||
2011-2019 dhewm3 teams, and contributors
|
||||
2004 id Software
|
||||
"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/dhewm/dhewm3/archive/${portVersion}_PRE1.tar.gz"
|
||||
CHECKSUM_SHA256="bb454cfdf6e698bac2c6b1cfca19d7b1381b8a59cfb8bc4d38b483b7ee23da47"
|
||||
SOURCE_DIR="dhewm3-${portVersion}_PRE1"
|
||||
#cdoom mod
|
||||
srcGitRev2="5070b8c7ec6f3a8ba1cb4123de37732f9cd9437f"
|
||||
SOURCE_URI_2="https://github.com/dhewm/dhewm3-sdk/archive/$srcGitRev2.tar.gz"
|
||||
CHECKSUM_SHA256_2="301d4114a11859fb7a0f9ee1ecae50a8de5ba6add0e3564b54af9b5b972ec710"
|
||||
SOURCE_DIR_2="dhewm3-sdk-$srcGitRev2"
|
||||
#rivensin mod
|
||||
srcGitRev3="b651f9dc1ddb958eaee3f0a1373fc4af7dce67e5"
|
||||
SOURCE_URI_3="https://github.com/dhewm/dhewm3-sdk/archive/$srcGitRev3.tar.gz"
|
||||
CHECKSUM_SHA256_3="334b2a882b05f00a8120ece8944974de0625f4dc439dd8b8505c358c04a7948a"
|
||||
SOURCE_DIR_3="dhewm3-sdk-$srcGitRev3"
|
||||
#denton mod
|
||||
srcGitRev4="aaec7be6276661d6c9e612de99ffe8af33828404"
|
||||
SOURCE_URI_4="https://github.com/dhewm/dhewm3-sdk/archive/$srcGitRev4.tar.gz"
|
||||
CHECKSUM_SHA256_4="16e6e3a67b6d9efe66cd3b6a4918f4d4b046aef21f83ed4c3125832634df7458"
|
||||
SOURCE_DIR_4="dhewm3-sdk-$srcGitRev4"
|
||||
#fitz mod
|
||||
srcGitRev5="6ebb6b8394c047dd042aec47fa79ddec2b901754"
|
||||
SOURCE_URI_5="https://github.com/dhewm/dhewm3-sdk/archive/$srcGitRev5.tar.gz"
|
||||
CHECKSUM_SHA256_5="12ed335709af159179e7d20e88a8f03b7481ace443315edb00c4a8d8df32b741"
|
||||
SOURCE_DIR_5="dhewm3-sdk-$srcGitRev5"
|
||||
#hardqore2 mod
|
||||
srcGitRev6="024a8683431e2b06847d585fc1e75968310b0548"
|
||||
SOURCE_URI_6="https://github.com/dhewm/dhewm3-sdk/archive/$srcGitRev6.tar.gz"
|
||||
CHECKSUM_SHA256_6="a5f62a616eba85a40af2cf6d029a032eb574a7b0f567fcfe005e04b7e6b42eb3"
|
||||
SOURCE_DIR_6="dhewm3-sdk-$srcGitRev6"
|
||||
#launcher
|
||||
srcGitRev7="d5157392c6f63ec82aaa715e74b364c284701536"
|
||||
SOURCE_URI_7="https://github.com/EXL/BeGameLauncher/archive/$srcGitRev7.tar.gz"
|
||||
CHECKSUM_SHA256_7="ef1c197be64590ba509c7cf6c6f758475ebcdac1d014e596e32d26b12b024f16"
|
||||
SOURCE_DIR_7="BeGameLauncher-$srcGitRev7"
|
||||
|
||||
PATCHES="dhewm3-$portVersion.patchset"
|
||||
PATCHES_2="dhewm3_mods-$portVersion.patchset"
|
||||
PATCHES_3="dhewm3_mods-$portVersion.patchset"
|
||||
PATCHES_4="dhewm3_mods-$portVersion.patchset"
|
||||
PATCHES_5="dhewm3_mods-$portVersion.patchset"
|
||||
PATCHES_6="dhewm3_mods-$portVersion.patchset"
|
||||
|
||||
ADDITIONAL_FILES="dhewm3.rdef.in"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
dhewm3$secondaryArchSuffix = $portVersion
|
||||
app:dhewm3
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libogg$secondaryArchSuffix
|
||||
lib:libopenal$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libvorbis$secondaryArchSuffix
|
||||
lib:libvorbisfile$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
devel:libopenal$secondaryArchSuffix
|
||||
devel:libSDL2_2.0$secondaryArchSuffix
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
devel:libvorbisfile$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:install
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake ../neo \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSDL2_INCLUDE_DIR=/system/$relativeIncludeDir/SDL2
|
||||
make $jobArgs
|
||||
cd ..
|
||||
|
||||
# build mod: classic doom
|
||||
mkdir -p build_cdoom
|
||||
cd build_cdoom
|
||||
cmake $sourceDir2 -DCMAKE_BUILD_TYPE=Release
|
||||
make $jobArgs
|
||||
cd ..
|
||||
# build mod: rivensin
|
||||
mkdir -p build_rivensin
|
||||
cd build_rivensin
|
||||
cmake $sourceDir3 -DCMAKE_BUILD_TYPE=Release
|
||||
make $jobArgs
|
||||
cd ..
|
||||
# build mod: dentonmod
|
||||
mkdir -p build_dentonmod
|
||||
cd build_dentonmod
|
||||
cmake $sourceDir4 -DCMAKE_BUILD_TYPE=Release
|
||||
make $jobArgs
|
||||
cd ..
|
||||
# build mod: fitz
|
||||
mkdir -p build_fitz
|
||||
cd build_fitz
|
||||
cmake $sourceDir5 -DCMAKE_BUILD_TYPE=Release
|
||||
make $jobArgs
|
||||
cd ..
|
||||
# build mod: hardqore2
|
||||
mkdir -p build_hardqore2
|
||||
cd build_hardqore2
|
||||
cmake $sourceDir6 -DCMAKE_BUILD_TYPE=Release
|
||||
make $jobArgs
|
||||
cd ..
|
||||
# build launcher
|
||||
mkdir -p build_launcher
|
||||
cd build_launcher
|
||||
cmake $sourceDir7 \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLAUNCHER=dhewm3
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/dhewm3/lib
|
||||
|
||||
cp build/dhewm3 $appsDir/dhewm3
|
||||
cp build/*.so $appsDir/dhewm3/lib
|
||||
cp build_{cdoom,rivensin,dentonmod,fitz,hardqore2}/*.so $appsDir/dhewm3/lib
|
||||
cp build_launcher/Dhewm3Launcher "$appsDir/dhewm3/dhewm3 Launcher"
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.dhewm3"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/dhewm3.rdef.in > build/dhewm3.rdef
|
||||
|
||||
addResourcesToBinaries build/dhewm3.rdef $appsDir/dhewm3/dhewm3
|
||||
addAppDeskbarSymlink "$appsDir/dhewm3/dhewm3 Launcher" "DOOM 3"
|
||||
}
|
||||
141
games-fps/dhewm3/patches/dhewm3-1.5.1.patchset
Normal file
141
games-fps/dhewm3/patches/dhewm3-1.5.1.patchset
Normal file
@@ -0,0 +1,141 @@
|
||||
From d67cdbebce674f27a6db45356d1c25ee9534825f Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 1 Nov 2019 15:54:40 +1000
|
||||
Subject: Fix for Haiku
|
||||
|
||||
|
||||
diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt
|
||||
index 194f34d..ad4f50d 100644
|
||||
--- a/neo/CMakeLists.txt
|
||||
+++ b/neo/CMakeLists.txt
|
||||
@@ -285,6 +285,12 @@ if(WIN32)
|
||||
)
|
||||
endif()
|
||||
|
||||
+if(HAIKU)
|
||||
+ set(sys_libs ${sys_libs}
|
||||
+ network
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
# fallback for cmake versions without GNUInstallDirs
|
||||
if(GNUINSTALLDIRS MATCHES "NOTFOUND")
|
||||
set(CMAKE_INSTALL_BINDIR "bin"
|
||||
diff --git a/neo/framework/minizip/ioapi.c b/neo/framework/minizip/ioapi.c
|
||||
index f59b904..499e29a 100644
|
||||
--- a/neo/framework/minizip/ioapi.c
|
||||
+++ b/neo/framework/minizip/ioapi.c
|
||||
@@ -17,7 +17,7 @@
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
-#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__OpenBSD__)
|
||||
+#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__OpenBSD__) || defined(__HAIKU__)
|
||||
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
|
||||
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
||||
#define FTELLO_FUNC(stream) ftello(stream)
|
||||
diff --git a/neo/idlib/Str.cpp b/neo/idlib/Str.cpp
|
||||
index b37e1a9..db74996 100644
|
||||
--- a/neo/idlib/Str.cpp
|
||||
+++ b/neo/idlib/Str.cpp
|
||||
@@ -224,7 +224,7 @@ int idStr::FindText( const char *str, const char *text, bool casesensitive, int
|
||||
}
|
||||
} else {
|
||||
for ( j = 0; text[j]; j++ ) {
|
||||
- if ( ::toupper( str[i+j] ) != ::toupper( text[j] ) ) {
|
||||
+ if ( toupper( str[i+j] ) != toupper( text[j] ) ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -302,7 +302,7 @@ bool idStr::Filter( const char *filter, const char *name, bool casesensitive ) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
- if ( ::toupper(*name) >= ::toupper(*filter) && ::toupper(*name) <= ::toupper(*(filter+2)) ) {
|
||||
+ if ( toupper(*name) >= toupper(*filter) && toupper(*name) <= toupper(*(filter+2)) ) {
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
@@ -315,7 +315,7 @@ bool idStr::Filter( const char *filter, const char *name, bool casesensitive ) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
- if ( ::toupper(*filter) == ::toupper(*name) ) {
|
||||
+ if ( toupper(*filter) == toupper(*name) ) {
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
@@ -342,7 +342,7 @@ bool idStr::Filter( const char *filter, const char *name, bool casesensitive ) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
- if ( ::toupper(*filter) != ::toupper(*name) ) {
|
||||
+ if ( toupper(*filter) != toupper(*name) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
diff --git a/neo/sys/platform.h b/neo/sys/platform.h
|
||||
index 2c4ce98..ef8e8a3 100644
|
||||
--- a/neo/sys/platform.h
|
||||
+++ b/neo/sys/platform.h
|
||||
@@ -134,7 +134,7 @@ If you have questions concerning this license or the applicable additional terms
|
||||
|
||||
|
||||
// Unix
|
||||
-#ifdef __unix__
|
||||
+#if defined(__unix__) || defined(__HAIKU__)
|
||||
|
||||
#define _alloca alloca
|
||||
#define _alloca16( x ) ((void *)((((uintptr_t)alloca( (x)+15 )) + 15) & ~15))
|
||||
diff --git a/neo/sys/posix/posix_net.cpp b/neo/sys/posix/posix_net.cpp
|
||||
index db83fa9..ec240e9 100644
|
||||
--- a/neo/sys/posix/posix_net.cpp
|
||||
+++ b/neo/sys/posix/posix_net.cpp
|
||||
@@ -273,6 +273,7 @@ NET_InitNetworking
|
||||
*/
|
||||
void Sys_InitNetworking(void)
|
||||
{
|
||||
+#ifndef __HAIKU__
|
||||
unsigned int ip, mask;
|
||||
struct ifaddrs *ifap, *ifp;
|
||||
|
||||
@@ -319,6 +320,7 @@ void Sys_InitNetworking(void)
|
||||
break;
|
||||
}
|
||||
freeifaddrs(ifap);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
2.23.0
|
||||
|
||||
|
||||
From dbcdc3950ccc91134934009b18ff63dedf9fee68 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sat, 2 Nov 2019 15:45:47 +1000
|
||||
Subject: Add env for base dir
|
||||
|
||||
|
||||
diff --git a/neo/sys/linux/main.cpp b/neo/sys/linux/main.cpp
|
||||
index 5e08e2d..3efde5b 100644
|
||||
--- a/neo/sys/linux/main.cpp
|
||||
+++ b/neo/sys/linux/main.cpp
|
||||
@@ -55,6 +55,14 @@ bool Sys_GetPath(sysPath_t type, idStr &path) {
|
||||
|
||||
switch(type) {
|
||||
case PATH_BASE:
|
||||
+#ifdef __HAIKU__
|
||||
+ s = getenv("BASE_GAMEDIR");
|
||||
+ if (s) {
|
||||
+ idStr::snPrintf(buf, sizeof(buf), "%s/", s);
|
||||
+ path = buf;
|
||||
+ return true;
|
||||
+ }
|
||||
+#endif
|
||||
if (stat(BUILD_DATADIR, &st) != -1 && S_ISDIR(st.st_mode)) {
|
||||
path = BUILD_DATADIR;
|
||||
return true;
|
||||
--
|
||||
2.23.0
|
||||
|
||||
62
games-fps/dhewm3/patches/dhewm3_mods-1.5.1.patchset
Normal file
62
games-fps/dhewm3/patches/dhewm3_mods-1.5.1.patchset
Normal file
@@ -0,0 +1,62 @@
|
||||
From 106b3d010ce2961f876d09886ed5a6d394eb123a Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 1 Nov 2019 18:49:10 +1000
|
||||
Subject: Fix build for Haiku
|
||||
|
||||
|
||||
diff --git a/idlib/Str.cpp b/idlib/Str.cpp
|
||||
index b37e1a9..db74996 100644
|
||||
--- a/idlib/Str.cpp
|
||||
+++ b/idlib/Str.cpp
|
||||
@@ -224,7 +224,7 @@ int idStr::FindText( const char *str, const char *text, bool casesensitive, int
|
||||
}
|
||||
} else {
|
||||
for ( j = 0; text[j]; j++ ) {
|
||||
- if ( ::toupper( str[i+j] ) != ::toupper( text[j] ) ) {
|
||||
+ if ( toupper( str[i+j] ) != toupper( text[j] ) ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -302,7 +302,7 @@ bool idStr::Filter( const char *filter, const char *name, bool casesensitive ) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
- if ( ::toupper(*name) >= ::toupper(*filter) && ::toupper(*name) <= ::toupper(*(filter+2)) ) {
|
||||
+ if ( toupper(*name) >= toupper(*filter) && toupper(*name) <= toupper(*(filter+2)) ) {
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
@@ -315,7 +315,7 @@ bool idStr::Filter( const char *filter, const char *name, bool casesensitive ) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
- if ( ::toupper(*filter) == ::toupper(*name) ) {
|
||||
+ if ( toupper(*filter) == toupper(*name) ) {
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
@@ -342,7 +342,7 @@ bool idStr::Filter( const char *filter, const char *name, bool casesensitive ) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
- if ( ::toupper(*filter) != ::toupper(*name) ) {
|
||||
+ if ( toupper(*filter) != toupper(*name) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
diff --git a/sys/platform.h b/sys/platform.h
|
||||
index 2c4ce98..ef8e8a3 100644
|
||||
--- a/sys/platform.h
|
||||
+++ b/sys/platform.h
|
||||
@@ -134,7 +134,7 @@ If you have questions concerning this license or the applicable additional terms
|
||||
|
||||
|
||||
// Unix
|
||||
-#ifdef __unix__
|
||||
+#if defined(__unix__) || defined(__HAIKU__)
|
||||
|
||||
#define _alloca alloca
|
||||
#define _alloca16( x ) ((void *)((((uintptr_t)alloca( (x)+15 )) + 15) & ~15))
|
||||
--
|
||||
2.23.0
|
||||
|
||||
Reference in New Issue
Block a user