diff --git a/games-puzzle/biniax2/biniax2-1.30.recipe b/games-puzzle/biniax2/biniax2-1.30.recipe new file mode 100644 index 000000000..bec38f887 --- /dev/null +++ b/games-puzzle/biniax2/biniax2-1.30.recipe @@ -0,0 +1,59 @@ +SUMMARY="Logic game with arcade and tactics modes" +DESCRIPTION="Biniax-2 is a original and entertaining game. Takes a minute \ +to learn and gives you hours and hours of gameplay. Discover the different \ +Biniax-2 faces - for action heroes or careful strategists." +HOMEPAGE="http://biniax.com/" +COPYRIGHT="1991-2004 Silicon Graphics + 1997-2006 Sam Lantinga + 2005-2009 Jordan Tuzsuzov" +LICENSE="Zlib" +REVISION="1" +SOURCE_URI="http://www.tuzsuzov.com/biniax/biniax2-1.30-fullsrc.tar.gz" +CHECKSUM_SHA256="2c09f6f0a5fe453a409d990d72a964636ee91ca91daac99f0db861b8f42531bf" +SOURCE_DIR="" +PATCHES="biniax2-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + biniax2$secondaryArchSuffix = $portVersion + cmd:biniax2$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libSDL_1.2$secondaryArchSuffix + lib:libSDL_image_1.2$secondaryArchSuffix + lib:libSDL_mixer_1.2$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libSDL_1.2$secondaryArchSuffix + devel:libSDL_image_1.2$secondaryArchSuffix + devel:libSDL_mixer_1.2$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:make + cmd:gcc$secondaryArchSuffix + " + +PATCH() +{ + sed -i "s|data|$dataDir/biniax2|g" desktop/gfx.c desktop/snd.c +} + +BUILD() +{ + make $jobArgs +} + +INSTALL() +{ + mkdir -p $appsDir $dataDir/biniax2 + mv biniax2 $appsDir/Biniax2 + cp -rf data/* $dataDir/biniax2 + rm -f $dataDir/biniax2/Thumbs.db + + addAppDeskbarSymlink $appsDir/Biniax2 +} diff --git a/games-puzzle/biniax2/patches/biniax2-1.30.patchset b/games-puzzle/biniax2/patches/biniax2-1.30.patchset new file mode 100644 index 000000000..1723c36e4 --- /dev/null +++ b/games-puzzle/biniax2/patches/biniax2-1.30.patchset @@ -0,0 +1,42 @@ +From cc9d495228bfe5b1a3c34f7ec2829764a19d1410 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Fri, 1 Jan 2021 13:23:27 +0000 +Subject: Fix launch from Tracker/Deskbar + + +diff --git a/biniax.c b/biniax.c +old mode 100755 +new mode 100644 +index 886b692..9ca0bba +--- a/biniax.c ++++ b/biniax.c +@@ -50,6 +50,11 @@ INCLUDES + #include "game.h" + #include "lev.h" + #include "inc.h" ++ ++#ifdef __HAIKU__ ++#include ++#include ++#endif + + /* Global instance of GAME structure */ + BNX_GAME Game; +@@ -88,7 +93,13 @@ PROGRAM START + ******************************************************************************/ + + int main( int argc, char *argv[] ) +-{ ++{ ++ char *binpath = realpath(argv[0], NULL); ++ if (binpath != NULL) { ++ chdir(dirname(binpath)); ++ free(binpath); ++ } ++ + BNX_BOOL bquit = BNX_FALSE; + BNX_INT16 enterState = cStateMainMenu; + BNX_INT16 nmenu = 0; +-- +2.28.0 +