Files
haikuports/games-engines/solarus/solarus-1.6.5.recipe
2026-01-28 11:00:34 +01:00

129 lines
3.9 KiB
Bash

SUMMARY="An ARPG game engine"
DESCRIPTION="A lightweight, free and open-source game engine for Action-RPGs
* A 2D game engine written in C++, and executing games made in Lua.
* Specifically designed with 16-bit classic Action-RPGs in mind.
* Available on multiple platforms.
* Completely free and open-source, under GPL v3 License."
HOMEPAGE="http://solarus-games.org"
COPYRIGHT="2006-2021 Christopho and the Solarus team"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://gitlab.com/solarus-games/solarus/-/archive/v$portVersion/solarus-v$portVersion.tar.gz"
CHECKSUM_SHA256="88a434757e711529aa672f865fe9bc8c268bce0408dc4c31db4312c2250df20b"
SOURCE_DIR="solarus-v$portVersion"
ADDITIONAL_FILES="solarus.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
solarus$secondaryArchSuffix = $portVersion
app:Solarus
cmd:solarus = $portVersion
cmd:solarus_launcher = $portVersion
cmd:solarus_run = $portVersion
lib:libsolarus$secondaryArchSuffix = $libVersionCompat
lib:libsolarus_gui$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libluajit_5.1$secondaryArchSuffix
lib:libmodplug$secondaryArchSuffix >= 1.0
lib:libogg$secondaryArchSuffix
lib:libopenal$secondaryArchSuffix
lib:libphysfs$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libSDL2_2.0$secondaryArchSuffix
lib:libSDL2_image_2.0$secondaryArchSuffix
lib:libSDL2_ttf_2.0$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
"
PROVIDES_devel="
solarus${secondaryArchSuffix}_devel = $portVersion
devel:libsolarus$secondaryArchSuffix = $libVersionCompat
devel:libsolarus_gui$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
solarus$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
glm${secondaryArchSuffix}_devel
devel:libluajit_5.1$secondaryArchSuffix
devel:libmodplug$secondaryArchSuffix >= 1.0
devel:libogg$secondaryArchSuffix
devel:libopenal$secondaryArchSuffix
devel:libphysfs$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libSDL2_2.0$secondaryArchSuffix
devel:libSDL2_image_2.0$secondaryArchSuffix
devel:libSDL2_ttf_2.0$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:lrelease$secondaryArchSuffix
cmd:make
"
BUILD()
{
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$prefix" \
-DSOLARUS_GUI_SHARE_INSTALL_DESTINATION=$dataDir/Qt5 \
-DSOLARUS_HEADERS_INSTALL_DESTINATION=$includeDir \
-DSOLARUS_LIBRARY_INSTALL_DESTINATION=$libDir \
-DSOLARUS_MANUAL_INSTALL_DESTINATION=$manDir \
-DSOLARUS_SHARE_INSTALL_DESTINATION=$dataDir \
-DSOLARUS_WRITE_DIR=$settingsDir \
-DSOLARUS_TESTS=OFF
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLibs libsolarus \
libsolarus-gui
packageEntries devel \
$developDir
# we are not linux
rm -rf $dataDir/{applications,icons,metainfo,pixmaps}
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local APP_NAME="Solarus"
local LONG_INFO="$SUMMARY"
local APP_SIGNATURE="application/x-vnd.solarus"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
-e "s|@APP_NAME@|$APP_NAME|" \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
$portDir/additional-files/solarus.rdef.in > solarus.rdef
addResourcesToBinaries solarus.rdef $prefix/bin/solarus-launcher
addAppDeskbarSymlink $prefix/bin/solarus-launcher Solarus
}