From 58a85a58e26c23d4dd4bbe280f022cfa291dc0ea Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Thu, 31 Oct 2019 21:30:22 +1000 Subject: [PATCH] GZDoom: bump version, add launcher --- ...zdoom-3.6.0.recipe => gzdoom-3.8.2.recipe} | 27 +++++--- ...m-3.6.0.patchset => gzdoom-3.8.2.patchset} | 63 +++++++++++++++---- 2 files changed, 71 insertions(+), 19 deletions(-) rename games-fps/gzdoom/{gzdoom-3.6.0.recipe => gzdoom-3.8.2.recipe} (83%) rename games-fps/gzdoom/patches/{gzdoom-3.6.0.patchset => gzdoom-3.8.2.patchset} (56%) diff --git a/games-fps/gzdoom/gzdoom-3.6.0.recipe b/games-fps/gzdoom/gzdoom-3.8.2.recipe similarity index 83% rename from games-fps/gzdoom/gzdoom-3.6.0.recipe rename to games-fps/gzdoom/gzdoom-3.8.2.recipe index fc970d1ea..74825985f 100644 --- a/games-fps/gzdoom/gzdoom-3.6.0.recipe +++ b/games-fps/gzdoom/gzdoom-3.8.2.recipe @@ -1,4 +1,4 @@ -SUMMARY="A modder-friendly OpenGL source port based on the DOOM engine" +SUMMARY="Advanced Doom source port with OpenGL support" DESCRIPTION="Consider all these features that ZDoom has that are not found in \ the standard Doom originally released by id: @@ -36,18 +36,22 @@ for an authentic "oldschool" flavor. * Walk over/under monsters and other things." HOMEPAGE="https://zdoom.org/" COPYRIGHT=" - 1998-2018 ZDoom + GZDoom teams, and contributors + 1998-2019 ZDoom + GZDoom teams, and contributors 1997 id Software, Raven Software, and contributors " LICENSE="GNU GPL v3" REVISION="1" SOURCE_URI="https://zdoom.org/files/gzdoom/src/gzdoom-src-g${portVersion}_legacy.zip" -CHECKSUM_SHA256="dfd745f5f77f6e86ba40eadad63450e491d9decc7956307716541d9ea3509a4a" +CHECKSUM_SHA256="0c3af7b0af6b59f1ecbcc50e4fc0f70d6b1a33f554f63998a421bbc4da2913e6" SOURCE_DIR="gzdoom-g${portVersion}_legacy" +srcGitRev2="f6ab178af2c85df04d8cc34b61f90ebf1502ed1f" +SOURCE_URI_2="https://github.com/EXL/BeGameLauncher/archive/$srcGitRev2.tar.gz" +CHECKSUM_SHA256_2="45b42bb906e7ad1d94819fd18140505ab517ba78b3b593c3315f29bb391cf1ee" +SOURCE_DIR_2="BeGameLauncher-$srcGitRev2" PATCHES="gzdoom-$portVersion.patchset" ADDITIONAL_FILES="gzdoom.rdef.in" -ARCHITECTURES="!x86_gcc2 ?x86 x86_64" +ARCHITECTURES="!x86_gcc2 x86_64" SECONDARY_ARCHITECTURES="x86" PROVIDES=" @@ -56,7 +60,6 @@ PROVIDES=" " REQUIRES=" haiku$secondaryArchSuffix -# lib:libbzip2$secondaryArchSuffix lib:libfluidsynth$secondaryArchSuffix lib:libGL$secondaryArchSuffix lib:libgme$secondaryArchSuffix @@ -68,7 +71,6 @@ REQUIRES=" BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel -# devel:libbzip2$secondaryArchSuffix # cmake: Could NOT find BZip2 devel:libfluidsynth$secondaryArchSuffix devel:libGL$secondaryArchSuffix devel:libgme$secondaryArchSuffix @@ -93,13 +95,24 @@ BUILD() -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="-D_GNU_SOURCE -D_BSD_SOURCE" make $jobArgs + + cd $sourceDir2 + mkdir -p build + cd build + cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DLAUNCHER=gzdoom + make $jobArgs } INSTALL() { mkdir -p $appsDir/GZDoom + cp build/gzdoom $appsDir/GZDoom/GZDoom cp build/*.pk3 $appsDir/GZDoom + cp $sourceDir2/build/GZDoomLauncher $appsDir/GZDoom + local APP_SIGNATURE="application/x-vnd.gzdoom" local MAJOR="`echo "$portVersion" | cut -d. -f1`" local MIDDLE="`echo "$portVersion" | cut -d. -f2`" @@ -115,5 +128,5 @@ INSTALL() $portDir/additional-files/gzdoom.rdef.in > gzdoom.rdef addResourcesToBinaries gzdoom.rdef $appsDir/GZDoom/GZDoom - addAppDeskbarSymlink $appsDir/GZDoom/GZDoom + addAppDeskbarSymlink $appsDir/GZDoom/GZDoomLauncher "GZDoom" } diff --git a/games-fps/gzdoom/patches/gzdoom-3.6.0.patchset b/games-fps/gzdoom/patches/gzdoom-3.8.2.patchset similarity index 56% rename from games-fps/gzdoom/patches/gzdoom-3.6.0.patchset rename to games-fps/gzdoom/patches/gzdoom-3.8.2.patchset index 780e5ca10..116b85416 100644 --- a/games-fps/gzdoom/patches/gzdoom-3.6.0.patchset +++ b/games-fps/gzdoom/patches/gzdoom-3.8.2.patchset @@ -1,14 +1,14 @@ -From ebd669cc76f8352ff1999d5558fa64332ae7b1fa Mon Sep 17 00:00:00 2001 -From: Sergei Reznikov -Date: Fri, 12 Oct 2018 13:14:10 +0300 +From c66d4ac662840af459b64a77aaa998867d1cf5c7 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Wed, 30 Oct 2019 21:24:04 +1000 Subject: Haiku fixes diff --git a/CMakeLists.txt b/CMakeLists.txt -index 032dbb1..70c9c47 100644 +index 092dcb5..fff3c08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -251,6 +251,13 @@ else() +@@ -281,6 +281,13 @@ else() endif( APPLE ) endif() @@ -23,10 +23,10 @@ index 032dbb1..70c9c47 100644 set( CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} ${REL_LINKER_FLAGS}" ) set( CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} ${REL_LINKER_FLAGS}" ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 2e29a22..3a107a8 100644 +index 21bf74b..b784624 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -404,7 +404,7 @@ endif() +@@ -405,7 +405,7 @@ endif() CHECK_CXX_SOURCE_COMPILES("thread_local int i; int main() { i = 0; }" HAVE_THREAD_LOCAL) @@ -49,10 +49,10 @@ index 4bfbb78..405444e 100644 #define IntGetProcAddress(name) SDL_GL_GetProcAddress((const char*)name) //#define IntGetProcAddress(name) PosixGetProcAddress((const GLubyte*)name) diff --git a/src/posix/i_system.h b/src/posix/i_system.h -index 7f468f1..d1e0169 100644 +index 1fc528e..6baae1b 100644 --- a/src/posix/i_system.h +++ b/src/posix/i_system.h -@@ -159,6 +159,7 @@ inline const char *I_FindName(findstate_t *fileinfo) +@@ -147,6 +147,7 @@ inline const char *I_FindName(findstate_t *fileinfo) #define FA_DIREC 8 #define FA_ARCH 16 @@ -60,13 +60,52 @@ index 7f468f1..d1e0169 100644 static inline char *strlwr(char *str) { char *ptr = str; -@@ -169,5 +170,5 @@ static inline char *strlwr(char *str) +@@ -157,6 +158,7 @@ static inline char *strlwr(char *str) } return str; } -- +#endif + + inline int I_GetNumaNodeCount() { return 1; } + inline int I_GetNumaNodeThreadCount(int numaNode) { return std::max(std::thread::hardware_concurrency(), 1); } +diff --git a/tools/re2c/src/util/c99_stdint.h b/tools/re2c/src/util/c99_stdint.h +index 5718604..e2c76df 100644 +--- a/tools/re2c/src/util/c99_stdint.h ++++ b/tools/re2c/src/util/c99_stdint.h +@@ -7,6 +7,10 @@ + #include "config.h" + #endif + ++#ifdef __HAIKU__ ++#define HAVE_STDINT_H 1 ++#endif ++ + #if HAVE_STDINT_H + # include + #else // HAVE_STDINT_H +-- +2.23.0 + + +From 962e2c5f581da68cacd0d588ae7bcd2c7f17d12c Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Thu, 31 Oct 2019 21:22:03 +1000 +Subject: Fix GAME_DIR for Haiku + + +diff --git a/src/version.h b/src/version.h +index 63f3500..64339a3 100644 +--- a/src/version.h ++++ b/src/version.h +@@ -99,6 +99,8 @@ const char *GetVersionString(); + + #if defined(__APPLE__) || defined(_WIN32) + #define GAME_DIR GAMENAME ++#elif defined(__HAIKU__) ++#define GAME_DIR "config/settings/" GAMENAME + #else + #define GAME_DIR ".config/" GAMENAMELOWERCASE #endif -- -2.19.1 +2.23.0