69 lines
2.4 KiB
Bash
69 lines
2.4 KiB
Bash
# Template file for 'OpenRCT2'
|
|
# based on https://raw.githubusercontent.com/AluisioASG/void-packages/openrct2/srcpkgs/OpenRCT2/template
|
|
# and https://github.com/void-linux/void-packages/issues/1014#issuecomment-417372421
|
|
pkgname=OpenRCT2
|
|
_objects_version=1.0.21
|
|
_titles_version=0.1.2c
|
|
version=0.3.3
|
|
revision=2
|
|
build_style=cmake
|
|
configure_args="
|
|
-DOPENRCT2_VERSION_TAG=${version}
|
|
-DDOWNLOAD_TITLE_SEQUENCES=0
|
|
-DDOWNLOAD_OBJECTS=0
|
|
-DDISABLE_DISCORD_RPC=1
|
|
-DDISABLE_GOOGLE_BENCHMARK=1
|
|
$(vopt_if multiplayer '' '-DDISABLE_NETWORK=1')
|
|
$(vopt_if scripting '-DENABLE_SCRIPTING=1' '')"
|
|
make_build_target="all g2"
|
|
hostmakedepends="pkg-config unzip"
|
|
makedepends="SDL2-devel fontconfig-devel freetype-devel libzip-devel
|
|
libpng-devel speexdsp-devel icu-devel zlib-devel json-c++
|
|
$(vopt_if multiplayer 'libcurl-devel openssl-devel')
|
|
$(vopt_if scripting duktape-devel)"
|
|
depends="zenity"
|
|
short_desc="Open source re-implementation of RollerCoaster Tycoon 2"
|
|
maintainer="klardotsh <josh@klar.sh>"
|
|
license="GPL-3.0-or-later, CC-BY-SA-4.0"
|
|
homepage="https://openrct2.io"
|
|
# use title-sequences.zip to match CMakeLists instruction
|
|
distfiles="https://github.com/OpenRCT2/OpenRCT2/archive/v${version}.tar.gz
|
|
https://github.com/OpenRCT2/objects/releases/download/v${_objects_version}/objects.zip
|
|
https://github.com/OpenRCT2/title-sequences/releases/download/v${_titles_version}/title-sequences.zip"
|
|
checksum="71f9d1ae8477e1e9881a6f9759bddac71346e8ba42238d22514ae3d872b54fd2
|
|
b081f885311f9afebc41d9dd4a68b7db4cf736eb815c04e307e1a426f08cfa35
|
|
5284333fa501270835b5f0cf420cb52155742335f5658d7889ea35d136b52517"
|
|
skip_extraction="objects.zip title-sequences.zip"
|
|
|
|
replaces="OpenRCT2-data>=0"
|
|
|
|
CXXFLAGS="-DNDEBUG"
|
|
|
|
build_options="multiplayer scripting"
|
|
build_options_default="multiplayer scripting"
|
|
desc_option_multiplayer="Enable multiplayer support"
|
|
desc_option_scripting="Enable script / plugin support"
|
|
|
|
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
|
|
broken="not yet implemented"
|
|
fi
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
hostmakedepends+=" OpenRCT2"
|
|
CXXFLAGS+=" -DHAVE_IMMINTRIN_H=false -DSDL_DISABLE_IMMINTRIN_H=1"
|
|
fi
|
|
|
|
pre_configure() {
|
|
if [ "$CROSS_BUILD" ]; then
|
|
sed -i -e 's#COMMAND ./openrct2#COMMAND openrct2#g' CMakeLists.txt
|
|
fi
|
|
}
|
|
|
|
post_extract() {
|
|
_srcdir="${XBPS_SRCDISTDIR}/${pkgname}-${version}"
|
|
unzip -qd data/object "${_srcdir}/objects.zip"
|
|
unzip -qd data/sequence "${_srcdir}/title-sequences.zip"
|
|
|
|
vsed -i CMakeLists.txt -e "s; -Werror;;"
|
|
}
|