Files
haikuports/games-strategy/freeciv/freeciv-2.5.9.recipe
2018-08-09 10:27:19 +02:00

121 lines
3.6 KiB
Bash

SUMMARY="A free Civilization-like game"
DESCRIPTION="Freeciv is a free Civilization-like game, primarily \
for X under Unix. It has support for multiplayer games locally or \
over a network, and an AI which gives most people a run for their money.
Freeciv aims to be mostly rule-compatible with Civilization II [tm], \
published by Sid Meier and Microprose [tm]. A few rules are different \
where we think it makes more sense, and we have lots and lots of \
adjustable parameters to make customizing games possible.
Freeciv has been implemented completely independently of Civilization; \
you do not need to own Civilization to play Freeciv."
HOMEPAGE="http://www.freeciv.org"
COPYRIGHT="1996-2017 The Freeciv Team"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://downloads.sourceforge.net/project/freeciv/Freeciv%202.5/$portVersion/freeciv-$portVersion.tar.bz2"
CHECKSUM_SHA256="b83c73585ae80898b27379984f936591b51422c9caccb94880fa16030c975928"
PATCHES="freeciv-$portVersion.patchset"
ADDITIONAL_FILES="freeciv.rdef.in"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
GLOBAL_WRITABLE_FILES="
settings/freeciv/database.lua keep-old
"
PROVIDES="
freeciv$secondaryArchSuffix = $portVersion
app:freeciv$secondaryArchSuffix = $portVersion
cmd:freeciv_manual$secondaryArchSuffix
cmd:freeciv_sdl$secondaryArchSuffix
cmd:freeciv_server$secondaryArchSuffix
lib:libfreeciv$secondaryArchSuffix
lib:libfreeciv_srv$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:liblua$secondaryArchSuffix
lib:liblzma$secondaryArchSuffix
lib:libreadline$secondaryArchSuffix
lib:libsdl_1.2$secondaryArchSuffix
lib:libsdl_gfx$secondaryArchSuffix
lib:libsdl_image_1.2$secondaryArchSuffix
lib:libsdl_mixer_1.2$secondaryArchSuffix
lib:libsdl_ttf_2.0$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libbz2$secondaryArchSuffix
devel:libcurl$secondaryArchSuffix
devel:libfreetype$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:liblua$secondaryArchSuffix >= 5.2
devel:liblzma$secondaryArchSuffix
devel:libreadline$secondaryArchSuffix
devel:libsdl$secondaryArchSuffix
devel:libsdl_gfx$secondaryArchSuffix
devel:libsdl_image$secondaryArchSuffix
devel:libsdl_mixer$secondaryArchSuffix
devel:libsdl_ttf$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:gettext$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtool
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
autoreconf -fi
runConfigure ./configure --datarootdir=$dataRootDir --datadir=$dataDir \
--enable-client=sdl --enable-fcmp=no --enable-sys-lua --enable-shared \
--enable-aimodules
make $jobArgs
}
INSTALL()
{
make install
mkdir -p $appsDir
mv $binDir/freeciv-sdl $appsDir/Freeciv
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local INTERNAL="0"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@INTERNAL@|$INTERNAL|" \
$portDir/additional-files/freeciv.rdef.in > freeciv.rdef
addResourcesToBinaries freeciv.rdef \
$appsDir/Freeciv
addAppDeskbarSymlink $appsDir/Freeciv
mv $prefix/share/* $dataRootDir
rmdir $prefix/share
rm -f $libDir/*.a $libDir/*.la
}