Files
haikuports/games-arcade/sdlpop/sdlpop-1.20.recipe
Gerasim Troeglazov 2e29357e5a SDLPoP: bump version
2020-05-03 14:42:41 +10:00

84 lines
2.2 KiB
Bash

SUMMARY="An open-source port of Prince of Persia"
DESCRIPTION="SDLPoP is an open-source port of Prince of Persia that runs natively on Windows and Linux. \
It is based on a disassembly of the DOS version, and uses SDL."
HOMEPAGE="https://www.princed.org/"
COPYRIGHT="Dávid Nagy"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/NagyD/SDLPoP/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="dbb75398dee2224bcee648602ad23e469b936a2b7ea962a8a01b091b989f25b6"
SOURCE_DIR="SDLPoP-$portVersion"
PATCHES="sdlpop-$portVersion.patchset"
ADDITIONAL_FILES="sdlpop.rdef.in"
ARCHITECTURES="!x86_gcc2 x86_64 ?x86"
SECONDARY_ARCHITECTURES="x86"
GLOBAL_WRITABLE_FILES="
settings/SDLPoP/SDLPoP.ini keep-old
settings/SDLPoP/SDLPoP.cfg keep-old
"
PROVIDES="
sdlpop$secondaryArchSuffix = $portVersion
app:SDLPop$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libSDL2_2.0$secondaryArchSuffix
lib:libSDL2_image_2.0${secondaryArchSuffix}
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libGL$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
devel:libSDL2_2.0$secondaryArchSuffix
devel:libSDL2_image_2.0$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cd src
make $jobArgs
}
INSTALL()
{
mkdir -p $appsDir/SDLPoP $settingsDir/SDLPoP
cp -rf data doc mods $appsDir/SDLPoP
cp prince "$appsDir/SDLPoP/Prince of Persia"
cp SDLPoP.ini $settingsDir/SDLPoP
touch $settingsDir/SDLPoP/SDLPoP.cfg
ln -s $settingsDir/SDLPoP/SDLPoP.cfg \
$appsDir/SDLPoP/SDLPoP.cfg
ln -s $settingsDir/SDLPoP/SDLPoP.ini \
$appsDir/SDLPoP/SDLPoP.ini
local APP_SIGNATURE="application/x-vnd.sdlpop"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="0"
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|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/sdlpop.rdef.in > $sourceDir/sdlpop.rdef
addResourcesToBinaries $sourceDir/sdlpop.rdef \
"$appsDir/SDLPoP/Prince of Persia"
addAppDeskbarSymlink "$appsDir/SDLPoP/Prince of Persia"
}