Files
haikuports/games-rpg/freedroidrpg/freedroidrpg-1.0.recipe
Joachim Mairböck 1304ee6339 freedroidrpg: bump to version 1.0
This should fix the data package for x86 (untested there).
2025-07-13 17:47:19 +02:00

164 lines
4.9 KiB
Bash

SUMMARY="A role playing game battling roboters"
DESCRIPTION="The game tells the story of a world destroyed by a conflict \
between robots and their human masters. Play as Tux in a quest to save the \
world from the murderous rebel bots who know no mercy. You get to choose \
which path you wish to follow, and freedom of choice is everywhere in the game.
FreedroidRPG features a real time combat system with melee and ranged \
weapons, fairly similar to the proprietary game Diablo. There is an \
innovative system of programs that can be run in order to take control of \
enemy robots, alter their behavior, or improve one's characteristics. You \
can use over 50 different kinds of items and fight countless enemies on your \
way to your destiny. An advanced dialog system provides story background and \
immersive role playing situations.
The game is complete, fully playable, and can provide about 10 hours of fun.
It is still being actively developed, and help is welcome in many areas. \
People having - or trying to acquire - programming, map editing, or writing \
skills will find FreedroidRPG to be an exciting, fast-moving project in which \
they can fully express their creativity."
HOMEPAGE="https://freedroid.org"
COPYRIGHT="2002-2023 The Freedroid team"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="ftp://ftp.osuosl.org/pub/freedroid/freedroidRPG-$portVersion/freedroidRPG-$portVersion.tar.gz"
CHECKSUM_SHA256="7995b70b594248ea14d1b4ef595397a60183031c99163b01c1a8a70ccef3bbcf"
PATCHES="freedroidrpg-$portVersion.patchset"
ADDITIONAL_FILES="freedroidrpg.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
freedroidrpg$secondaryArchSuffix = $portVersion
app:freedroidrpg = $portVersion
"
REQUIRES="
freedroidrpg_data == $portVersion
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libglew$secondaryArchSuffix
lib:libGLU$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libSDL_1.2$secondaryArchSuffix
lib:libSDL_gfx$secondaryArchSuffix
lib:libSDL_image_1.2$secondaryArchSuffix
lib:libSDL_mixer_1.2$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
SUMMARY_data="Data files for the game FreedroidRPG"
ARCHITECTURES_data="any"
PROVIDES_data="
freedroidrpg_data = $portVersion
"
REQUIRES_data="
haiku
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libGL$secondaryArchSuffix
devel:libglew$secondaryArchSuffix
devel:libGLU$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libSDL$secondaryArchSuffix
devel:libSDL_gfx$secondaryArchSuffix
devel:libSDL_image$secondaryArchSuffix
devel:libSDL_mixer$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:autoconf
cmd:automake
cmd:gawk
cmd:gcc$secondaryArchSuffix
cmd:gettext
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
cmd:which
"
PATCH()
{
sed -i 's/lua.h/..\/lua\/lua.h/g' src/*.c
sed -i 's/lua.h/..\/lua\/lua.h/g' src/*.h
sed -i 's/lauxlib.h/..\/lua\/lauxlib.h/g' src/*.c
sed -i 's/lauxlib.h/..\/lua\/lauxlib.h/g' src/*.h
sed -i 's/lualib.h/..\/lua\/lualib.h/g' src/*.c
sed -i 's/lualib.h/..\/lua\/lualib.h/g' src/*.h
}
BUILD()
{
echo "=== libtoolize"
libtoolize --force --copy --install
echo "=== aclocal"
aclocal
echo "=== automake"
automake --add-missing
echo "=== autoreconf"
autoreconf
echo "=== autoconf"
autoconf
echo "=== automake"
automake
local APPDIR="$appsDir/FreedroidRPG/"
export GLEW_CFLAGS=" " # workaround for broken pkg-config file
export GLEW_LIBS="-lGLEW"
./configure \
--prefix=$APPDIR \
--bindir=$APPDIR \
--sbindir=$APPDIR \
--datarootdir=$APPDIR \
--datadir=$APPDIR \
--mandir=$manDir \
--docdir=$docDir \
--disable-sdltest \
--with-embedded-lua \
--with-open-cmd=open
make $jobArgs
}
INSTALL()
{
make install
mv $appsDir/FreedroidRPG/freedroidRPG $appsDir/FreedroidRPG/FreedroidRPG
rm -rf $appsDir/FreedroidRPG/{applications,icons,metainfo}
packageEntries data $appsDir/FreedroidRPG/freedroidrpg
local APP_SIGNATURE="application/x-vnd.freedroidrpg"
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/freedroidrpg.rdef.in > $sourceDir/freedroidrpg.rdef
addResourcesToBinaries $sourceDir/freedroidrpg.rdef $appsDir/FreedroidRPG/FreedroidRPG
addAppDeskbarSymlink $appsDir/FreedroidRPG/FreedroidRPG
}