# Template file for 'boomerang'
pkgname=boomerang
version=0.5.2
revision=2
build_style=cmake
configure_args="-DBOOMERANG_BUILD_REGRESSION_TESTS=FALSE"
make_check_target="check"
hostmakedepends="flex qt5-devel python3"
makedepends="qt5-devel capstone-devel"
short_desc="General, open source machine code decompiler"
maintainer="Piraty <mail@piraty.dev>"
license="BSD-3-Clause"
homepage="https://github.com/BoomerangDecompiler/boomerang"
distfiles="https://github.com/BoomerangDecompiler/boomerang/archive/v${version}.tar.gz"
checksum=1d2c9c2f5de1a3e1d5fe3879e82bca268d1c49e6ba3d0a7848695f18c594384d
make_check=no #https://github.com/BoomerangDecompiler/boomerang/issues/277

pre_configure() {
	# Fails to build w/ qt5-5.15.0 because of deprecated functions warnings
	vsed -i cmake-scripts/boomerang-flags.cmake \
		-e "s;-Werror;;"
}

post_install() {
	vlicense LICENSE.TERMS
	rm ${DESTDIR}/usr/share/boomerang/LICENSE.TERMS
}
