From 5f534f21e525d04613f964ae476cf0dbbd33eb3c Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Tue, 18 Jun 2019 23:35:50 +0200 Subject: [PATCH] openclaw: fix install the game crashes on exit, playable, background music works. --- .../openclaw/openclaw-1.0.3_20181104.recipe | 30 ++++++++++--- .../patches/openclaw-1.0.3_20181104.patchset | 45 +++++++++++++++++++ 2 files changed, 68 insertions(+), 7 deletions(-) create mode 100644 games-arcade/openclaw/patches/openclaw-1.0.3_20181104.patchset diff --git a/games-arcade/openclaw/openclaw-1.0.3_20181104.recipe b/games-arcade/openclaw/openclaw-1.0.3_20181104.recipe index 90572d28f..fd1004ae5 100644 --- a/games-arcade/openclaw/openclaw-1.0.3_20181104.recipe +++ b/games-arcade/openclaw/openclaw-1.0.3_20181104.recipe @@ -17,17 +17,17 @@ SOURCE_URI="https://github.com/pjasicek/OpenClaw/archive/$srcGitRev.tar.gz" CHECKSUM_SHA256="9521811f572ca6c61288628cc32ff86f9c7a455afa09387232282f936a531845" SOURCE_FILENAME="openclaw-$portVersion-$srcGitRev.tar.gz" SOURCE_DIR="OpenClaw-$srcGitRev" +SOURCE_URI_2="https://github.com/pjasicek/OpenClaw/releases/download/v0.0/openclaw_1.0-1.deb#noarchive" +CHECKSUM_SHA256_2="0e5cde1cb6f3113afb9255f89816f6716d33f03e305ea8a75853d0c5abdd58b1" +PATCHES="openclaw-$portVersion.patchset" ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64" -commandBinDir=$binDir -if [ "$targetArchitecture" = x86_gcc2 ]; then -commandBinDir=$prefix/bin SECONDARY_ARCHITECTURES="?x86" -fi +DISABLE_SOURCE_PACKAGE="yes" PROVIDES=" openclaw$secondaryArchSuffix = $portVersion - cmd:openclaw = $portVersion + app:openclaw = $portVersion " REQUIRES=" haiku$secondaryArchSuffix @@ -49,9 +49,12 @@ BUILD_REQUIRES=" devel:libtinyxml$secondaryArchSuffix " BUILD_PREREQUIRES=" + cmd:ar cmd:cmake cmd:g++$secondaryArchSuffix cmd:make + cmd:tar + cmd:xz " BUILD() @@ -64,6 +67,19 @@ BUILD() INSTALL() { - mkdir -p $commandBinDir - cp Build_Release/openclaw $commandBinDir + mkdir -p $appsDir + cp Build_Release/openclaw $appsDir/ + + mkdir -p $dataDir/openclaw/ + cp Build_Release/clacon.ttf $dataDir/openclaw/ + cp Build_Release/ASSETS.ZIP $dataDir/openclaw/ + cp Build_Release/console02.tga $dataDir/openclaw/ + cp Build_Release/SAVES.XML $dataDir/openclaw/ + cp Build_Release/config.xml $dataDir/openclaw/ + + ar x $sourceDir2/openclaw_1.0-1.deb + tar xf data.tar.xz ./usr/share/openclaw/CLAW.REZ + mv ./usr/share/openclaw/CLAW.REZ $dataDir/openclaw/ + + addAppDeskbarSymlink $appsDir/openclaw OpenClaw } diff --git a/games-arcade/openclaw/patches/openclaw-1.0.3_20181104.patchset b/games-arcade/openclaw/patches/openclaw-1.0.3_20181104.patchset new file mode 100644 index 000000000..57ab96d19 --- /dev/null +++ b/games-arcade/openclaw/patches/openclaw-1.0.3_20181104.patchset @@ -0,0 +1,45 @@ +From 15d5a88358db65cc1a3aefe96d1e96450f77f657 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Tue, 18 Jun 2019 23:17:52 +0200 +Subject: user directory for Haiku + + +diff --git a/OpenClaw/Engine/GameApp/MainLoop.cpp b/OpenClaw/Engine/GameApp/MainLoop.cpp +index e66c44b..0d6c651 100644 +--- a/OpenClaw/Engine/GameApp/MainLoop.cpp ++++ b/OpenClaw/Engine/GameApp/MainLoop.cpp +@@ -20,6 +20,8 @@ int RunGameEngine(int argc, char** argv) + userDirectory = "/sdcard/claw/"; + #elif defined(__WINDOWS__) + userDirectory = ""; ++#elif defined(__HAIKU__) ++ userDirectory = "/system/data/openclaw/"; + #else + const char* homedir; + +-- +2.21.0 + + +From 24c244b1dabef015bd4c05510086d66741b1b236 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Tue, 18 Jun 2019 23:22:40 +0200 +Subject: assets folder + + +diff --git a/Build_Release/config.xml b/Build_Release/config.xml +index 3cbe35b..24af3d9 100644 +--- a/Build_Release/config.xml ++++ b/Build_Release/config.xml +@@ -22,7 +22,7 @@ + + + +- ++ /system/data/openclaw/ + CLAW.REZ + ASSETS.ZIP + 150 +-- +2.21.0 +