void-packages/srcpkgs/0ad/template

70 lines
2.4 KiB
Bash

# Template file for '0ad'
pkgname=0ad
version=0.0.26
revision=8
archs="x86_64* i686* aarch64* armv7l* ppc64le*"
hostmakedepends="pkg-config perl cmake python3 rust cargo yasm tar clang"
makedepends="SDL2-devel boost-devel gloox-devel libcurl-devel libenet-devel
libopenal-devel libpng-devel libsodium-devel libxml2-devel miniupnpc-devel
nspr-devel wxWidgets-gtk3-devel fmt-devel mozjs78-devel freetype-devel"
depends="${pkgname}-data"
short_desc="Historically-based real-time strategy game"
maintainer="Helmut Pozimski <helmut@pozimski.eu>"
license="GPL-2.0-or-later, CC-BY-SA-3.0, MPL-2.0, MIT"
homepage="https://play0ad.com"
distfiles="https://releases.wildfiregames.com/${pkgname}-${version}-alpha-unix-build.tar.xz
https://github.com/mozilla/gecko-dev/commit/74641307d32a59806b75cd2b8c7161aca50d5cb7.patch>1654457-virtualenv.patch"
checksum="2e1c6df7e3312e77c5f82788664cffc3a78d3bf60606c00039275e1d13c0ee4b
f18fa3adae7acb07a49148354b6804028e6c9d7344991622fb7c00f638173e03"
nocross="uses bundled third-party libraries that do not cross-compile"
lib32disabled=yes
skip_extraction="1654457-virtualenv.patch"
CXXFLAGS="-fpermissive"
# Use BFD linker to avoid erroneous detection of llvm pr8927 with *-musl
LDFLAGS="-fuse-ld=bfd"
export WX_CONFIG="wx-config-gtk3"
if [ "$XBPS_TARGET_LIBC" = musl ]; then
makedepends+=" libexecinfo-devel"
fi
post_patch() {
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
echo "TARGET_LINK_LIBRARIES(nvcore execinfo)" >> \
libraries/source/nvtt/src/src/nvcore/CMakeLists.txt
fi
cp ${FILESDIR}/python-3.11.patch libraries/source/spidermonkey/
cp ${XBPS_SRCDISTDIR}/${pkgname}-${version}/1654457-virtualenv.patch \
libraries/source/spidermonkey/
}
do_configure() {
export JOBS="${makejobs}"
cd ${wrksrc}/build/workspaces
./clean-workspaces.sh
}
do_build() {
export JOBS="${makejobs}"
cd ${wrksrc}/build/workspaces
./update-workspaces.sh --bindir=/usr/bin --libdir=/usr/lib/0ad \
--datadir=/usr/share/${pkgname}/data
cd ${wrksrc}
make config=release -C build/workspaces/gcc ${makejobs}
}
do_install() {
vbin binaries/system/pyrogenesis
vmkdir usr/lib/${pkgname}
vcopy binaries/system/*.so usr/lib/${pkgname}
vmkdir usr/share/${pkgname}/data
vcopy binaries/data/l10n usr/share/${pkgname}/data
vbin build/resources/${pkgname}.sh ${pkgname}
vinstall build/resources/${pkgname}.desktop 0644 usr/share/applications
vinstall build/resources/${pkgname}.png 0644 usr/share/pixmaps
vlicense LICENSE.txt
}