mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-29 11:38:52 +02:00
123 lines
3.6 KiB
Bash
123 lines
3.6 KiB
Bash
SUMMARY="An Infinity Engine Emulator"
|
|
DESCRIPTION="GemRB (Game Engine Made with preRendered Background) \
|
|
is a new implementation of the original Infinity Engine \
|
|
(used in Baldur's Gate, Icewind Dale, Planescape: Torment etc.) \
|
|
to Linux/Unix, MacOS X, Windows (and Haiku) with some enhancements.
|
|
Original games' data is not included.
|
|
|
|
Haiku specific paths:
|
|
* /boot/system/settings/gemrb is where 'GemRB.cfg' is stored, edit this configuration file \
|
|
to point GemRB to the data of the game you want to play and to customize your GemRB setup.
|
|
* ~/config/settings/gemrb is the default folder for saves
|
|
* ~/config/cache/gemrb is the default folder for GemRB's log and temporary files"
|
|
HOMEPAGE="https://gemrb.org/"
|
|
COPYRIGHT="2003-2026 The GemRB Team"
|
|
LICENSE="MIT"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/gemrb/gemrb/archive/refs/tags/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="cf9528f5e2fcaf70a9addc02222ba58f9d814e7e1522a41000e0d4de19dbd3ae"
|
|
SOURCE_DIR="gemrb-$portVersion"
|
|
PATCHES="gemrb-$portVersion.patchset"
|
|
ADDITIONAL_FILES="gemrb.rdef.in"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
GLOBAL_WRITABLE_FILES="
|
|
settings/gemrb/GemRB.cfg keep-old
|
|
"
|
|
USER_SETTINGS_FILES="
|
|
settings/gemrb directory
|
|
"
|
|
|
|
PROVIDES="
|
|
gemrb$secondaryArchSuffix = $portVersion
|
|
cmd:extend2da.py = $portVersion
|
|
cmd:gemrb = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
cmd:python3 # GemRB needs it to run
|
|
lib:libfreetype$secondaryArchSuffix
|
|
lib:libiconv$secondaryArchSuffix
|
|
lib:libintl$secondaryArchSuffix
|
|
lib:libogg$secondaryArchSuffix
|
|
lib:libopenal$secondaryArchSuffix
|
|
lib:libpng16$secondaryArchSuffix
|
|
lib:libSDL2_2.0$secondaryArchSuffix
|
|
lib:libSDL2_mixer_2.0$secondaryArchSuffix
|
|
lib:libvorbis$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libfreetype$secondaryArchSuffix
|
|
devel:libiconv$secondaryArchSuffix
|
|
devel:libintl$secondaryArchSuffix
|
|
devel:libogg$secondaryArchSuffix
|
|
devel:libopenal$secondaryArchSuffix
|
|
devel:libpng16$secondaryArchSuffix
|
|
devel:libSDL2_2.0$secondaryArchSuffix
|
|
devel:libSDL2_mixer_2.0$secondaryArchSuffix
|
|
devel:libvlc$secondaryArchSuffix
|
|
devel:libvorbis$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:python3
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cmake -Bbuild -S. -Wno-dev \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=$prefix \
|
|
-DBIN_DIR=$prefix/bin \
|
|
-DDATA_DIR=$dataDir/gemrb \
|
|
-DMAN_DIR=$manDir/man6 \
|
|
-DSYSCONF_DIR=$settingsDir/gemrb \
|
|
-DDOC_DIR=$docDir
|
|
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
# Remove leftover CMake file
|
|
rm -f $dataDir/gemrb/override/bg1/CMakeLists.txt
|
|
|
|
# Remove extra cfg files and setup Haiku-specific config
|
|
rm -f $settingsDir/gemrb/GemRB.cfg.{sample,noinstall.sample}
|
|
|
|
# Edit Cache path
|
|
cachedir=$(finddir B_USER_CACHE_DIRECTORY)/gemrb
|
|
sed -i "s,.\/Cache2/,${cachedir},g" $settingsDir/gemrb/GemRB.cfg
|
|
|
|
# Edit Save path
|
|
savedir=$(finddir B_USER_SETTINGS_DIRECTORY)/gemrb
|
|
sed -i "s,#SavePath=\/mnt/windows/Programmi/Black Isle/BGII - SoA/,SavePath=${savedir},g" $settingsDir/gemrb/GemRB.cfg
|
|
|
|
# Generate the rdef
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
local MINOR="`echo "$portVersion" | cut -b5`"
|
|
sed \
|
|
-e "s|@MAJOR@|$MAJOR|" \
|
|
-e "s|@MIDDLE@|$MIDDLE|" \
|
|
-e "s|@MINOR@|$MINOR|" \
|
|
$portDir/additional-files/gemrb.rdef.in > gemrb.rdef
|
|
|
|
addResourcesToBinaries gemrb.rdef $prefix/bin/gemrb
|
|
|
|
# Make the app name uppercase then link it back in lowercase for cmd
|
|
mkdir -p $appsDir && mv $prefix/bin/gemrb $appsDir/GemRB
|
|
ln -s $appsDir/GemRB $prefix/bin/gemrb
|
|
addAppDeskbarSymlink $appsDir/GemRB
|
|
}
|