# Template file for 'hydrogen'
pkgname=hydrogen
version=1.0.0
revision=1
build_style=cmake
# Our flags has -g already, DEBUG=ON will add -O0
configure_args="-DWANT_DEBUG=OFF"
hostmakedepends="pkg-config qt5-host-tools qt5-devel qt5-tools"
makedepends="libsndfile-devel libarchive-devel liblrdf-devel
 pulseaudio-devel jack-devel qt5-devel qt5-xmlpatterns-devel
 qt5-tools-devel ladspa-sdk liblo-devel libcppunit-devel"
depends="desktop-file-utils"
short_desc="Advanced drum machine"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://www.hydrogen-music.org/"
distfiles="https://github.com/hydrogen-music/hydrogen/archive/${version}.tar.gz"
checksum=c4eac296a0d20578c274faf7816cf35c16ed43b634d91d2d19686bf9bbfeb970

post_patch() {
	vsed -i '/INSTALL/s,"data,"/usr/share/hydrogen/data,' \
		data/i18n/CMakeLists.txt

	# Liberation
	# Change to list with free licensed drumkits only
	sed -i -e 's|[www.]*hydrogen-music[.]org/feeds/drumkit_list[.]php|repo.parabola.nu/other/hydrogen-libre/feeds/drumkit_list.php|'\
	$(grep -rlI '[www.]*hydrogen-music[.]org/feeds/drumkit_list[.]php')
}

do_check() {
	H2_HOME=$wrksrc ./build/src/tests/tests
}

post_install() {
	rm -rf $DESTDIR/usr/include
}
