Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hex_a_hop: Add recipe #8392

Merged
merged 1 commit into from Apr 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
66 changes: 66 additions & 0 deletions games-puzzle/hex_a_hop/hex_a_hop-1.1.0.recipe
@@ -0,0 +1,66 @@
SUMMARY="Puzzle games based on hexagonal tiles"
DESCRIPTION="Hex-a-Hop is a hexagonal tile-based puzzle game with one simple \
goal: destroy all green tiles! There are infinite undos and no time limits -- \
you just have to find a way to destroy all the green tiles and step on a safe \
tile at the end.

As you progress through the game, more types of tiles are introduced which \
make things more difficult and interesting as you progress through the many \
levels. You can use the infinite undo feature to retrace your steps if you \
make a mistake."
HOMEPAGE="https://hexahop.sourceforge.net"
COPYRIGHT="2005-2007 Tom Beaumont"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://downloads.sourceforge.net/project/hexahop/$portVersion/hex-a-hop-$portVersion.tar.gz"
CHECKSUM_SHA256="80bf19d936a8430cab5bc468ee6827c38052e026c609eb7ece16317e7932a0d6"
SOURCE_DIR="hex-a-hop-$portVersion"
PATCHES="hex_a_hop-$portVersion.patchset"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
hex_a_hop$secondaryArchSuffix = $portVersion
app:hex_a_hop = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libSDL_1.2$secondaryArchSuffix
lib:libSDL_mixer_1.2$secondaryArchSuffix
lib:libSDL_ttf_2.0$secondaryArchSuffix
"

BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libSDL_1.2$secondaryArchSuffix
devel:libSDL_mixer_1.2$secondaryArchSuffix
devel:libSDL_ttf_2.0$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoheader
cmd:autoreconf
cmd:automake
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:libtoolize
cmd:make
"

BUILD()
{
libtoolize -fci
autoreconf -vfi
automake --add-missing
runConfigure --omit-dirs "binDir dataRootDir" \
./configure --bindir=$appsDir
make $jobArgs
}

INSTALL()
{
make install
mv $appsDir/hex-a-hop $appsDir/Hex-a-hop
addAppDeskbarSymlink $appsDir/Hex-a-hop
}
22 changes: 22 additions & 0 deletions games-puzzle/hex_a_hop/patches/hex_a_hop-1.1.0.patchset
@@ -0,0 +1,22 @@
From fccb2a855d87c11f6c02d2f9a133b84e46954b62 Mon Sep 17 00:00:00 2001
From: Julius Enriquez <win8linux@gmail.com>
Date: Sun, 16 Apr 2023 23:44:23 +0800
Subject: hex_a_hop: Change save path to proper Haiku location


diff --git a/src/hex_puzzzle.cpp b/src/hex_puzzzle.cpp
index fa3ca93..dc025da 100644
--- a/src/hex_puzzzle.cpp
+++ b/src/hex_puzzzle.cpp
@@ -98,7 +98,7 @@ FILE *file_open( const char *file, const char *flags )
if (home)
{
char save_path[PATH_MAX];
- snprintf(save_path, sizeof(save_path), "%s/.hex-a-hop", home);
+ snprintf(save_path, sizeof(save_path), "%s/config/settings/hex-a-hop", home);
if (!strchr(flags, 'r'))
if (mkdir(save_path, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != -1)
printf("Creating directory \"%s\"\n", (const char *)save_path);
--
2.37.3