mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 05:28:53 +02:00
128 lines
3.7 KiB
Bash
128 lines
3.7 KiB
Bash
SUMMARY="O A.D. - Game"
|
|
DESCRIPTION="A free, open-source, Real-Time Strategy (RTS) game."
|
|
HOMEPAGE="https://play0ad.com/"
|
|
COPYRIGHT="Wildfire Games"
|
|
LICENSE="0ADLicense"
|
|
REVISION="1"
|
|
SOURCE_URI="https://releases.wildfiregames.com/0ad-${portVersion/\~/-}-unix-build.tar.gz"
|
|
CHECKSUM_SHA256="7659155d3c85c053d6a2f50a07ea7ba69d2ee3337c9b56b78b226f60a3276014"
|
|
SOURCE_DIR="0ad-${portVersion/\~/-}"
|
|
PATCHES="0ad-${portVersion/\~/-}.patch"
|
|
|
|
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
|
|
SECONDARY_ARCHITECTURES="?x86"
|
|
|
|
PROVIDES="
|
|
0ad$secondaryArchSuffix = $portVersion
|
|
app:0ad$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libcurl$secondaryArchSuffix
|
|
lib:libnspr4$secondaryArchSuffix
|
|
lib:libogg$secondaryArchSuffix
|
|
lib:libopenal$secondaryArchSuffix
|
|
lib:libpng$secondaryArchSuffix
|
|
libsdl2$secondaryArchSuffix
|
|
lib:libvorbis$secondaryArchSuffix
|
|
lib:libxml2$secondaryArchSuffix
|
|
lib:libzlib$secondaryArchSuffix
|
|
lib:libminiupnpc$secondaryArchSuffix
|
|
lib:libiconv$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
lib:libsodium$secondaryArchSuffix
|
|
lib:libgloox$secondaryArchSuffix
|
|
lib:libicui18n$secondaryArchSuffix >= 57
|
|
lib:libicuuc$secondaryArchSuffix >= 57
|
|
boost169$secondaryArchSuffix
|
|
lib:libenet$secondaryArchSuffix
|
|
lib:libiconv$secondaryArchSuffix
|
|
mesa$secondaryArchSuffix
|
|
0ad_data == $portVersion
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
boost169${secondaryArchSuffix}_devel
|
|
devel:libsdl2$secondaryArchSuffix
|
|
devel:libxml2$secondaryArchSuffix
|
|
devel:libnspr4$secondaryArchSuffix
|
|
devel:libicudata$secondaryArchSuffix
|
|
devel:libicui18n$secondaryArchSuffix
|
|
devel:libicuio$secondaryArchSuffix
|
|
devel:libicutest$secondaryArchSuffix
|
|
devel:libicutu$secondaryArchSuffix
|
|
devel:libicuuc$secondaryArchSuffix
|
|
devel:libiconv$secondaryArchSuffix
|
|
devel:libplc4$secondaryArchSuffix
|
|
devel:libplds4$secondaryArchSuffix
|
|
devel:libenet$secondaryArchSuffix
|
|
devel:libgloox$secondaryArchSuffix
|
|
devel:libminiupnpc$secondaryArchSuffix
|
|
devel:libsodium$secondaryArchSuffix
|
|
devel:libGL$secondaryArchSuffix
|
|
devel:libcurl$secondaryArchSuffix
|
|
devel:libopenal$secondaryArchSuffix
|
|
devel:libvorbis$secondaryArchSuffix
|
|
devel:libpng$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_PREREQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:g++$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:perl
|
|
cmd:patch
|
|
cmd:python
|
|
cmd:cmake
|
|
cmd:xargs
|
|
cmd:awk
|
|
cmd:which
|
|
cmd:cat
|
|
cmd:sed
|
|
"
|
|
|
|
PATCH()
|
|
{
|
|
# HACK: The patch provided for premake4 in the patch file does not apply correctly.
|
|
sed -i 's|linkoptions { "-rdynamic" }|linkoptions { "-Wl,--export-dynamic" }|g' build/premake/premake4/premake4.lua
|
|
sed -i 's|-rdynamic|-Wl,--export-dynamic|g' build/premake/premake4/build/gmake.unix/Premake4.make
|
|
sed -i 's|-ldl| |g' build/premake/premake4/build/gmake.unix/Premake4.make
|
|
}
|
|
|
|
BUILD()
|
|
{
|
|
cd "build/workspaces/"
|
|
./update-workspaces.sh --disable-atlas --minimal-flags --without-pch --datadir=$dataDir/0ad $jobArgs
|
|
|
|
cd gcc
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
mkdir -p $appsDir
|
|
mkdir -p $appsDir/0ad
|
|
|
|
mkdir -p $dataDir
|
|
mkdir -p $dataDir/0ad
|
|
|
|
cp -R binaries/data/* $dataDir/0ad
|
|
cp -R binaries/system/* $appsDir/0ad
|
|
|
|
# HACK: I don't know of a better way to do this but 0 A.D. expects the exact library name "libminiupnpc.so.16".
|
|
# The Miniupnpc API 17 only has a single breaking change over API 16 and that only appears to apply on Windows.
|
|
# See http://miniupnp.free.fr/files/changelog.php?file=miniupnpc-2.1.tar.gz for more information.
|
|
# HaikuPorts does not have a recipe for miniupnpc API 16.
|
|
ln -s /system/lib/x86/libminiupnpc.so.17 $appsDir/0ad/libminiupnpc.so.16
|
|
|
|
addAppDeskbarSymlink $appsDir/0ad/pyrogenesis "0 A.D."
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
binaries/system/test -libdir "./binaries/system"
|
|
}
|