virtualpkgs should be declared as "virtual?foo". This makes "./xbps-src show-build-deps" suceed on pkgs that had `depends="libGL"`.
60 lines
2.2 KiB
Bash
60 lines
2.2 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.13
|
|
_titles_version=0.1.2
|
|
version=0.2.5
|
|
revision=1
|
|
build_style=cmake
|
|
configure_args="$(vopt_if multiplayer "" "-DDISABLE_HTTP_TWITCH=1 -DDISABLE_NETWORK=1")"
|
|
hostmakedepends="pkg-config unzip"
|
|
makedepends="SDL2-devel fontconfig-devel freetype-devel libzip-devel
|
|
libpng-devel speexdsp-devel jansson-devel icu-devel zlib-devel
|
|
$(vopt_if multiplayer libcurl-devel) $(vopt_if multiplayer libressl-devel)"
|
|
depends="OpenRCT2-data"
|
|
short_desc="Open source re-implementation of RollerCoaster Tycoon 2"
|
|
maintainer="klardotsh <josh@klar.sh>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="https://openrct2.io"
|
|
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-sequence-v${_titles_version}.zip"
|
|
checksum="@b2ecc30000b2b33732a630b18c0b5b5e85352e2075ff02e33609dc34087e6235
|
|
0279874ad5a4c07f1fca5c62d2d5c3aa12bd849d7b643e3c7d93cfda88df7c6a
|
|
dcb1648739b351e857e2d19fed1626bec561d5e9f4b49201568f42c475ee7e61"
|
|
skip_extraction="objects.zip title-sequence-v${_titles_version}.zip"
|
|
|
|
build_options="multiplayer"
|
|
build_options_default="multiplayer"
|
|
desc_option_multiplayer="Enable multiplayer 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}"
|
|
mkdir -p data/object data/title
|
|
unzip -qd data/object "${_srcdir}/objects.zip"
|
|
unzip -qd data/title "${_srcdir}/title-sequence-v${_titles_version}.zip"
|
|
}
|
|
|
|
OpenRCT2-data_package() {
|
|
short_desc+=" - data files"
|
|
archs=noarch
|
|
pkg_install() {
|
|
vmove usr/share/openrct2
|
|
}
|
|
}
|