Files
haikuports/games-puzzle/pathological/pathological-1.1.3_17.recipe
OscarL 053368db2f pathological: fixes and recipe cleanups. (#11814)
- Use original .xm music files.
  We don't package .ogg files, so until we do (we need to convert them at build
  time), just drop that Debian patch.
- Fix startup from Tracker/Deskbar.
- This is now an "any" package (it is just a Python script after all).
  Drop usage and references to write_highscores{.c}. We're not Debian.
- Added a very simple icon (best I can do... I'm not fond of IOM's workflow/UI/UX).

Now Pathological is easy to find among Deskbar's Applications, and starts just fine
from Deskbar/Tracker (and from Terminal too).
2025-02-21 06:49:46 +00:00

120 lines
3.3 KiB
Bash

SUMMARY="A puzzle game consisting of marbles that roll along paths"
DESCRIPTION="Pathological is an enriched clone of the game Logical by Rainbow Arts. \
To solve a level, fill each wheel with four marbles of matching color.
Various board elements such as teleporters, switches, filters, etc., make the \
game interesting and challenging.
New levels can be created using your favorite text editor."
HOMEPAGE="http://pathological.sourceforge.net/"
COPYRIGHT="2003 John-Paul Gignac
2013 Debian Games Team
2013 Markus Koschany
Barry deFreese
Reiner Herrmann"
LICENSE="GNU GPL v2"
REVISION="3"
SOURCE_URI="https://salsa.debian.org/games-team/pathological/-/archive/debian/${portVersion/_/-}/pathological-debian-${portVersion/_/-}.tar.bz2"
CHECKSUM_SHA256="3a4ed34d9f1d70a918e0aff6ef48e598c80bf3f3cdea9430b96a2dd51cd3e20a"
SOURCE_DIR="pathological-debian-${portVersion/_/-}"
PATCHES="pathological-$portVersion.patchset"
ADDITIONAL_FILES="pathological.rdef.in"
ARCHITECTURES="any"
GLOBAL_WRITABLE_FILES="var/games/pathological_scores keep-old"
pythonVersion=3.10
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
PROVIDES="
pathological = $portVersion
app:Pathological = $portVersion
"
# Previously, this package was built for archs "all !x86_gcc2" / "x86".
REPLACES="
pathological_x86
"
REQUIRES="
haiku
pygame_$pythonPackage
cmd:python$pythonVersion
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:make
cmd:pngtopnm
cmd:ppmcolormask
cmd:pnmcomp
"
PATCH()
{
sed -i 's,\.pathological_scores,\config/settings/pathological_scores,g' pathological.py
}
BUILD()
{
# We only want to "make docs" (we have no use for "write-highscores.c")
make DESTDIR=$prefix \
BINDIR=$appsDir \
DATADIR=$dataDir/pathological \
DOCDIR=$docDir \
LIBDIR=$prefix/lib \
MANDIR=$manDir \
$jobArgs docs
}
# It might be simpler to either patch the Makefile for Haiku-only, or install fully manually here.
# For now, this works.
INSTALL()
{
mkdir -p $appsDir $dataDir/pathological
# We only want make to install the "platform-independent data", that actually includes the
# main (pathological.py) program, and nothing related to "write-highscores".
make DESTDIR=$prefix \
BINDIR=$appsDir \
DATADIR=$dataDir/pathological \
DOCDIR=$docDir \
LIBDIR=$prefix/lib \
MANDIR=$manDir \
install-indep install-scores
rm -rf $prefix/usr # pixmaps
entryPoint=$appsDir/Pathological
# We'll be calling the Python script directly, not via a .sh file:
rm $appsDir/pathological
mv $dataDir/pathological/pathological.py $entryPoint
# Resources and attributes:
local APP_SIGNATURE="application/x-vnd.pygame-pathological"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
MINOR=${MINOR%_*} # remove final "_xx"
local SHORT_INFO="Pathological"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@SHORT_INFO@|$SHORT_INFO|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/pathological.rdef.in > pathological.rdef
rc pathological.rdef
settype -t application/x-vnd.Be-elfexecutable $entryPoint
resattr -o $entryPoint pathological.rsrc
addAppDeskbarSymlink $entryPoint "Pathological"
}