# Template file for 'jack_capture'
pkgname=jack_capture
version=0.9.73
revision=1
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="jack-devel libsndfile-devel lame-devel liblo-devel"
short_desc="Record sound files with jack"
maintainer="newbluemoon <blaumolch@mailbox.org>"
license="GPL-2.0-or-later"
homepage="https://github.com/kmatheussen/jack_capture"
distfiles="https://github.com/kmatheussen/${pkgname}/archive/${version}.tar.gz"
checksum=21afb0257ed7437708cc9e5bec2f6299599461b7eec8bf66967d8ecadb0751de
CFLAGS+=" -D__USE_GNU"

case "$XBPS_TARGET_MACHINE" in
	armv6l*)
		makedepends+=" libatomic-devel"
		LDFLAGS+=" -latomic"
		;;
esac

pre_build() {
	sed -i -e "s/^CC=gcc/CC=$CC/" -e "s/^CPP=g++/CPP=$CXX/" Makefile
	sed -i -e "s/gcc/$CC/" gen_das_config_h.sh gen_setformat_c.sh
}
