mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
hex_a_hop: Add recipe (#8392)
hex_a_hop: Fix SDL deps, remove unnecessary folder hex_a_hop: Change save path hex_a_hop: Remove mkdir, HTTPS homepage, rename binary Co-authored-by: Julius C. Enriquez <win8linux@github.com>
This commit is contained in:
66
games-puzzle/hex_a_hop/hex_a_hop-1.1.0.recipe
Normal file
66
games-puzzle/hex_a_hop/hex_a_hop-1.1.0.recipe
Normal file
@@ -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
games-puzzle/hex_a_hop/patches/hex_a_hop-1.1.0.patchset
Normal file
22
games-puzzle/hex_a_hop/patches/hex_a_hop-1.1.0.patchset
Normal file
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user