# Template file for 'Cataclysm-DDA' pkgname=Cataclysm-DDA version=0.E revision=4 build_style=cmake configure_args="-DRELEASE=1 $(vopt_bool backtrace BACKTRACE) -DUSE_HOME_DIR=1 -DPREFIX=/usr" make_cmd=make hostmakedepends="gettext pkg-config" makedepends="$(vopt_if tiles 'SDL2_image-devel SDL2_mixer-devel SDL2_ttf-devel freetype-devel') ncurses-devel" depends="Cataclysm-DDA-data>=${version}_${revision}" short_desc="Turn-based survival game set in a post-apocalyptic world" maintainer="John " license="CC-BY-SA-3.0, CC-BY-3.0" homepage="https://cataclysmdda.org/" distfiles="https://github.com/CleverRaven/Cataclysm-DDA/archive/${version}.tar.gz https://github.com/catchorg/Catch2/releases/download/v2.13.10/catch.hpp" checksum="b0af9a9292929e17332edcea770bca9a91f1d08ea47726d78a47e09281a42fa3 3725c0f0a75f376a5005dde31ead0feb8f7da7507644c201b814443de8355170" skip_extraction="catch.hpp" make_check=no # needs tap++.h build_options="tiles backtrace" build_options_default="tiles" export CMAKE_GENERATOR="Unix Makefiles" case $XBPS_TARGET_MACHINE in *-musl);; *) build_options_default+=" backtrace";; esac subpackages="" if [ "$build_option_tiles" ]; then subpackages+=" Cataclysm-DDA-tiles" fi subpackages+=" Cataclysm-DDA-data" post_extract() { _srcdir="${XBPS_SRCDISTDIR}/${pkgname}-${version}" cp ${_srcdir}/catch.hpp tests/catch/catch.hpp } post_configure() { if [ "$build_option_tiles" ]; then local cmake_builddir=build-tiles local fprefix=$wrksrc/build-tiles/build CFLAGS="${CFLAGS} -ffile-prefix-map=$fprefix=." CXXFLAGS="${CXXFLAGS} -ffile-prefix-map=$fprefix=." configure_args+=" -DTILES=ON -DSOUND=ON" do_configure fi } post_build() { if [ "$build_option_tiles" ]; then local cmake_builddir=build-tiles do_build fi } post_install() { if [ "$build_option_tiles" ]; then local cmake_builddir=build-tiles do_install fi } Cataclysm-DDA-tiles_package() { short_desc+=" - SDL tiles version" depends="Cataclysm-DDA-data" replaces="Cataclysm-DDA-tiles-data>=0" pkg_install() { vmove usr/bin/cataclysm-tiles vmove usr/share/cataclysm-dda/gfx vmove usr/share/cataclysm-dda/sound } } Cataclysm-DDA-data_package() { short_desc+=" - data files" pkg_install() { vmove usr/share } }