mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-29 11:38:52 +02:00
Update OpenRCT2 to 0.5.0 (#13957)
This commit is contained in:
127
games-simulation/openrct2/openrct2-0.5.0.recipe
Normal file
127
games-simulation/openrct2/openrct2-0.5.0.recipe
Normal file
@@ -0,0 +1,127 @@
|
||||
SUMMARY="Open source re-implementation of RollerCoaster Tycoon 2"
|
||||
DESCRIPTION="OpenRCT2 is an open-source re-implementation of RollerCoaster Tycoon 2 by Chris Sawyer.
|
||||
The gameplay revolves around building and maintaining an amusement park containing attractions, shops and facilities.
|
||||
|
||||
OpenRCT2 requires the original files from RollerCoaster Tycoon 2 in order to play.
|
||||
If you have the original RollerCoaster Tycoon and its expansion packs, you can point \
|
||||
OpenRCT2 to these in order to play the original scenarios."
|
||||
HOMEPAGE="https://openrct2.io/"
|
||||
COPYRIGHT="2015-2026 OpenRCT2 team"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/OpenRCT2/OpenRCT2/archive/refs/tags/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="d9b2f34205c3fddc127be0623eae13c3e970917fa69714c861ec564c2d54d6d0"
|
||||
SOURCE_DIR="OpenRCT2-$portVersion"
|
||||
SOURCE_URI_2="https://github.com/OpenRCT2/title-sequences/releases/download/v0.4.26/title-sequences.zip"
|
||||
CHECKSUM_SHA256_2="dabb9787b1576342fca4dd9f64b3f8cfa04a7e6ce9c2bb9610f47b762905c858"
|
||||
SOURCE_URI_3="https://github.com/OpenRCT2/objects/releases/download/v1.7.9/objects.zip"
|
||||
CHECKSUM_SHA256_3="55461ed20c6e82f14e9a279cd844654b0264999bb94034d58fa912fdee26ead6"
|
||||
SOURCE_URI_4="https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v1.0.6/opensound.zip"
|
||||
CHECKSUM_SHA256_4="06b90f3e19c216752df441d551b26a9e3e1ba7755bdd2102504b73bf993608be"
|
||||
SOURCE_URI_5="https://github.com/OpenRCT2/OpenMusic/releases/download/v1.6.1/openmusic.zip"
|
||||
CHECKSUM_SHA256_5="994b350d3b180ee1cb9619fe27f7ebae3a1a5232840c4bd47a89f33fa89de1a1"
|
||||
PATCHES="openrct2-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="openrct2.rdef.in"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
openrct2$secondaryArchSuffix = $portVersion
|
||||
cmd:openrct2
|
||||
cmd:openrct2_cli
|
||||
lib:libopenrct2$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libflac$secondaryArchSuffix
|
||||
lib:libfontconfig$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libicuuc$secondaryArchSuffix
|
||||
lib:libogg$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libspeexdsp$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libvorbisfile$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
lib:libzip$secondaryArchSuffix
|
||||
lib:libzstd$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
nlohmann_json
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libflac$secondaryArchSuffix
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libicuuc$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libpsl$secondaryArchSuffix
|
||||
devel:libSDL2_2.0$secondaryArchSuffix
|
||||
devel:libspeexdsp$secondaryArchSuffix
|
||||
devel:libssh2$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libvorbisfile$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
devel:libzip$secondaryArchSuffix
|
||||
devel:libzstd$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
#cmd:ccache # Optional, to enable ccache during build
|
||||
#cmd:clang >= 19 # Needed to build with clang, 12 is too old, 19 is known to work
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export CXXFLAGS="-D_DEFAULT_SOURCE -D_BSD_SOURCE" LDFLAGS="-lbsd -lnetwork"
|
||||
|
||||
# Setup game assets
|
||||
mkdir -p $sourceDir/data/sequence && cp -r $sourceDir2/* $sourceDir/data/sequence
|
||||
mkdir -p $sourceDir/data/object && cp -r $sourceDir3/* $sourceDir/data/object
|
||||
cp -rt $sourceDir/data $sourceDir4/* $sourceDir5/*
|
||||
|
||||
# Add "-DCMAKE_CXX_COMPILER=clang++" to build with clang
|
||||
# korli suggests adding "-DDISABLE_OPENGL=1" to disable OpenGL-related
|
||||
# linker warnings when using gcc (OpenGL renderer is experimental anyway)
|
||||
cmake -Bbuild -S. $cmakeDirArgs \
|
||||
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
|
||||
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
# Needed to generate g2.dat
|
||||
make -C build install
|
||||
|
||||
# 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/openrct2.rdef.in > openrct2.rdef
|
||||
|
||||
addResourcesToBinaries openrct2.rdef $prefix/bin/openrct2
|
||||
|
||||
# Make the app name uppercase
|
||||
mkdir -p $appsDir && mv $prefix/bin/openrct2 $appsDir/OpenRCT2
|
||||
# Then link it back in lowercase for cmdline and to have man make sense
|
||||
ln -s $appsDir/OpenRCT2 $prefix/bin/openrct2
|
||||
addAppDeskbarSymlink $appsDir/OpenRCT2
|
||||
}
|
||||
Reference in New Issue
Block a user