# Template file for 'Maelstrom'
pkgname=Maelstrom
version=4.0.1
revision=1
build_style=cmake
configure_args="-DSTEAM=OFF -DUSE_VENDORED_SDL=OFF -DSTANDALONE_INSTALL=OFF"
makedepends="SDL3-devel"
short_desc="Guide your ship through the \"Maelstrom\" asteroid belt"
maintainer="orahcio <orahcio@gmail.com>"
license="Zlib"
homepage="https://www.libsdl.org/projects/Maelstrom/"
_physfs_commit="49cfd5fdd46f38b4c2611556b44ee9b0d308e162" # Maelstrom links this commit
_sdlnet_commit="5af3b068ea13f888be954801c0b8c17993811850" # idem
distfiles="https://github.com/libsdl-org/Maelstrom/archive/refs/tags/release-${version}.tar.gz>${pkgname}-${version}.tar.gz
	https://github.com/icculus/physfs/archive/${_physfs_commit}.tar.gz>physfs-${_physfs_commit}.tar.gz
	https://github.com/libsdl-org/SDL_net/archive/${_sdlnet_commit}.tar.gz>sdlnet-${_sdlnet_commit}.tar.gz"
checksum="ed4e5d84aa4a6d57a447d46d74d6641bac595b6d67ee5ab725f053300972574d
 4a7cef19b0794b2631a43e1b53edaf4f7aa75a139526d4abc866d20ecda87646
 3c382a676738207e2556793e724543a8b44b0b0b564c8af9bb3c04ceac7f9730"

skip_extraction="physfs-${_physfs_commit}.tar.gz sdlnet-${_sdlnet_commit}.tar.gz"

post_extract() {
	vsrcextract -C "${wrksrc}/external/physfs" physfs-${_physfs_commit}.tar.gz
	vsrcextract -C "${wrksrc}/external/SDL_net" sdlnet-${_sdlnet_commit}.tar.gz
}
