From 85ede669ec7e50191fd336c0b29486a07a975ca5 Mon Sep 17 00:00:00 2001 From: OscarL Date: Tue, 16 May 2023 06:33:57 -0300 Subject: [PATCH] 54321: fine tunning. (#8649) - Fix black-screen when starting up from Deskbar link. - Simplified directory structure a bit. - Enable build on 64 bits. --- games-board/54321/54321-1.0.2001.11.16.recipe | 20 ++++++++---- .../patches/54321-1.0.2001.11.16.patchset | 31 ++++++++++--------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/games-board/54321/54321-1.0.2001.11.16.recipe b/games-board/54321/54321-1.0.2001.11.16.recipe index e1cbba27a..27640acae 100644 --- a/games-board/54321/54321-1.0.2001.11.16.recipe +++ b/games-board/54321/54321-1.0.2001.11.16.recipe @@ -5,20 +5,20 @@ extends them into three and four dimensions." HOMEPAGE="https://old.nklein.com/products/54321/" COPYRIGHT="2001 Patrick Stein" LICENSE="nklein" -REVISION="1" +REVISION="2" SOURCE_URI="$HOMEPAGE/1.0.2001.11.16/54321.tgz" CHECKSUM_SHA256="ff2bd7afec6d85d29fcf235875285520a4aa5b009c6a0dd7a56619821d79fddb" SOURCE_DIR="54321" PATCHES="54321-$portVersion.patchset" -ARCHITECTURES="?all x86_gcc2" +ARCHITECTURES="all" PROVIDES=" 54321 = $portVersion app:54321 = $portVersion " REQUIRES=" - haiku$secondaryArchSuffix + haiku lib:libpng16 lib:libSDL_1.2 lib:libSDL_image_1.2 @@ -26,7 +26,7 @@ REQUIRES=" " BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel + haiku_devel devel:libpng16 devel:libSDL_1.2 devel:libSDL_image_1.2 @@ -37,6 +37,12 @@ BUILD_PREREQUIRES=" cmd:make " +PATCH() +{ + # Patch "data" dir location. + sed -i 's|../../data|./data|g' code/* +} + BUILD() { make -f GNUmakefile ARCH=BeOS @@ -45,7 +51,9 @@ BUILD() INSTALL() { mkdir -p $appsDir/54321 - cp -R Release/* $appsDir/54321 + cp -R Release/data $appsDir/54321 + cp Release/bin/BeOS/54321 $appsDir/54321 + cp Release/README $appsDir/54321 - addAppDeskbarSymlink $appsDir/54321/bin/BeOS/54321 + addAppDeskbarSymlink $appsDir/54321/54321 } diff --git a/games-board/54321/patches/54321-1.0.2001.11.16.patchset b/games-board/54321/patches/54321-1.0.2001.11.16.patchset index d6b1c9570..a3515e18a 100644 --- a/games-board/54321/patches/54321-1.0.2001.11.16.patchset +++ b/games-board/54321/patches/54321-1.0.2001.11.16.patchset @@ -1,4 +1,4 @@ -From f134edeb7ab537bf10335a1081eba9bb21a02f27 Mon Sep 17 00:00:00 2001 +From f2cee8ff79449399429911743ce006d036bcc12d Mon Sep 17 00:00:00 2001 From: begasus Date: Sat, 22 Dec 2018 13:43:58 +0100 Subject: add the proper place to look for the SDL headers/libs @@ -22,10 +22,10 @@ index 2e1b65a..d02d976 100644 prog: Release/54321-$(ARCH) -- -2.19.1 +2.37.3 -From 7719307a888f8efa53c178f6589d2b1e884c22ab Mon Sep 17 00:00:00 2001 +From 300b9eefa2982dfd4701199cb014f151d569b160 Mon Sep 17 00:00:00 2001 From: begasus Date: Sat, 22 Dec 2018 13:47:06 +0100 Subject: use main() instead of SDL_main() @@ -45,10 +45,10 @@ index 9c28c76..f174994 100644 unsigned int initFlags = 0; initFlags |= SDL_INIT_VIDEO; -- -2.19.1 +2.37.3 -From 05898ad3d124d5d4cf8304a4008732d4228de54d Mon Sep 17 00:00:00 2001 +From 84a76fec21f0bfe6c85ff86e08e8c646a4890043 Mon Sep 17 00:00:00 2001 From: begasus Date: Sat, 22 Dec 2018 13:53:35 +0100 Subject: disable fullscreen on startup @@ -68,20 +68,21 @@ index f174994..15853be 100644 SDL_Surface* screen = ::SDL_SetVideoMode( -- -2.19.1 +2.37.3 -From 65e74c582f04594e7c5a9d5e5e525ccb06f85c72 Mon Sep 17 00:00:00 2001 -From: begasus -Date: Sat, 22 Dec 2018 13:55:58 +0100 -Subject: make it launch from Tracker +From 33daf7e7178d642f3005a8e52222fc1392226aaf Mon Sep 17 00:00:00 2001 +From: Oscar Lesta +Date: Tue, 16 May 2023 06:14:06 -0300 +Subject: Fix startup directory. +Fixes starting it up from Tracker/Deskbar. diff --git a/code/main.cpp b/code/main.cpp -index 15853be..3291e6d 100644 +index 15853be..0b957a6 100644 --- a/code/main.cpp +++ b/code/main.cpp -@@ -28,9 +28,16 @@ +@@ -28,9 +28,18 @@ #include "lifeView.h" #include "life.h" #include "lifeController.h" @@ -93,11 +94,13 @@ index 15853be..3291e6d 100644 main( int argc, char** argv ) { + #ifdef __HAIKU__ -+ chdir(dirname(argv[0])); ++ char path[PATH_MAX]; ++ realpath(argv[0], path); ++ chdir(dirname(path)); + #endif unsigned int initFlags = 0; initFlags |= SDL_INIT_VIDEO; initFlags |= SDL_INIT_AUDIO; -- -2.19.1 +2.37.3