# Template file for 'rr'
pkgname=rr
version=5.0.0
revision=1
build_style=cmake
configure_args="-DCMAKE_SYSTEM_PROCESSOR=${XBPS_TARGET_MACHINE} -DBUILD_TESTS=OFF"
only_for_archs="i686 x86_64"
hostmakedepends="pkg-config python"
makedepends="python-pexpect zlib-devel capnproto-devel"
short_desc="Nondeterministic debugger"
maintainer="Spencer Hill <spencernh77@gmail.com>"
license="MIT, BSD"
homepage="http://rr-project.org/"
distfiles="https://github.com/mozilla/${pkgname}/archive/${version}.tar.gz"
checksum=95ab26671f39ffe58ed00a1bd3e211781804b010d73339d6ce7a4b1d0a6815ca
nopie=yes

case "$XBPS_MACHINE" in
	x86_64*) hostmakedepends+=" gcc-multilib" ;;
esac

pre_configure() {
	export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
	export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}"
}

post_install() {
	vlicense LICENSE
}
