mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-29 11:38:52 +02:00
127 lines
4.2 KiB
Bash
127 lines
4.2 KiB
Bash
SUMMARY="A free and open-source 3D real-time strategy game"
|
|
DESCRIPTION="Warzone 2100 was originally developed by Pumpkin Studios and published by Eidos Interactive.
|
|
In 1999, it was released commercially for Microsoft Windows and Sony PlayStation.
|
|
Pumpkin Studios ended their support for Warzone 2100 on January 5, 2000.
|
|
|
|
In 2004, after fan petition, Warzone's source code was released publicly under an open-source license.
|
|
It has been developed, maintained, and improved by the community ever since, under the banner of the 'Warzone 2100 Project'."
|
|
HOMEPAGE="https://wz2100.net/"
|
|
COPYRIGHT="
|
|
2004-2026 Warzone 2100 Project
|
|
1999-2000 Pumpkin Studios
|
|
"
|
|
LICENSE="GNU GPL v2"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/Warzone2100/warzone2100/releases/download/$portVersion/warzone2100_src.tar.xz"
|
|
CHECKSUM_SHA256="95ee4d5b88680ea1b1cf230b67ea84028e08a2458b84605ac9f7fb9eb97c4e37"
|
|
SOURCE_DIR="warzone2100"
|
|
SOURCE_URI_2="https://github.com/Warzone2100/data-terrain-high/releases/download/v3/high.wz#noarchive"
|
|
CHECKSUM_SHA256_2="a16a06c2a6b68e86a03934240880ec0b0fd72666606af3bf12ed5ffda7734f0e"
|
|
PATCHES="warzone2100-$portVersion.patchset"
|
|
ADDITIONAL_FILES="warzone2100.rdef.in"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
#SECONDARY_ARCHITECTURES="x86" #disabled for now, needs more patching to compile on x86
|
|
|
|
PROVIDES="
|
|
warzone2100$secondaryArchSuffix = $portVersion
|
|
cmd:warzone2100
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libcurl$secondaryArchSuffix
|
|
lib:libfreetype$secondaryArchSuffix
|
|
lib:libfribidi$secondaryArchSuffix
|
|
lib:libharfbuzz$secondaryArchSuffix
|
|
lib:libintl$secondaryArchSuffix
|
|
lib:libminiupnpc$secondaryArchSuffix
|
|
lib:libogg$secondaryArchSuffix
|
|
lib:libopenal$secondaryArchSuffix
|
|
lib:libopus$secondaryArchSuffix
|
|
lib:libpng16$secondaryArchSuffix
|
|
lib:libphysfs$secondaryArchSuffix
|
|
lib:libprotobuf$secondaryArchSuffix
|
|
lib:libSDL3$secondaryArchSuffix
|
|
lib:libsodium$secondaryArchSuffix
|
|
lib:libsqlite3$secondaryArchSuffix
|
|
lib:libtheoradec$secondaryArchSuffix
|
|
lib:libvorbis$secondaryArchSuffix
|
|
lib:libvorbisfile$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
lib:libzip$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
gcc${secondaryArchSuffix}_syslibs_devel
|
|
devel:libcurl$secondaryArchSuffix
|
|
devel:libfreetype$secondaryArchSuffix
|
|
devel:libfribidi$secondaryArchSuffix
|
|
devel:libharfbuzz$secondaryArchSuffix
|
|
devel:libminiupnpc$secondaryArchSuffix
|
|
devel:libogg$secondaryArchSuffix
|
|
devel:libopenal$secondaryArchSuffix
|
|
devel:libopus$secondaryArchSuffix
|
|
#devel:libopusfile$secondaryArchSuffix # Uses in-source one even when included
|
|
devel:libpng16$secondaryArchSuffix
|
|
devel:libprotobuf$secondaryArchSuffix
|
|
devel:libphysfs$secondaryArchSuffix
|
|
devel:libSDL3$secondaryArchSuffix
|
|
devel:libsodium$secondaryArchSuffix
|
|
devel:libsqlite3$secondaryArchSuffix
|
|
devel:libtheora$secondaryArchSuffix
|
|
devel:libvorbis$secondaryArchSuffix
|
|
devel:libvulkan$secondaryArchSuffix
|
|
devel:libzip$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:asciidoc # Optional, for documentation
|
|
cmd:basisu
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
#cmd:git # Optional, inclusion messes up config/settings dir
|
|
cmd:gettext
|
|
#cmd:glslc # Optional, for vulkan renderer (that won't compile)
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:zip
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cmake -Bbuild -S. $cmakeDirArgs \
|
|
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_EXE_LINKER_FLAGS="-lbsd -lnetwork" \
|
|
-DWZ_DOWNLOAD_PREBUILT_PACKAGES_ASSET_DIR=$sourceDir2
|
|
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
# Remove unneeded files
|
|
rm -rf $dataDir/{applications,icons,metainfo}
|
|
|
|
# Generate the rdef
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
local LONG_INFO="$SUMMARY"
|
|
sed \
|
|
-e "s|@MAJOR@|$MAJOR|" \
|
|
-e "s|@MIDDLE@|$MIDDLE|" \
|
|
-e "s|@MINOR@|$MINOR|" \
|
|
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
|
$portDir/additional-files/warzone2100.rdef.in > warzone2100.rdef
|
|
|
|
addResourcesToBinaries warzone2100.rdef $prefix/bin/warzone2100
|
|
|
|
# Make the app name uppercase then link it back in lowercase for cmd
|
|
mkdir -p $appsDir && mv $prefix/bin/warzone2100 $appsDir/"Warzone 2100"
|
|
ln -s $appsDir/"Warzone 2100" $prefix/bin/warzone2100
|
|
addAppDeskbarSymlink $appsDir/"Warzone 2100"
|
|
}
|