# Template file for 'astyle'
pkgname=astyle
version=3.6.2
revision=2
build_style=cmake
short_desc="Free, fast and small formatter for C, C++, C#, and Java source code"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://astyle.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname/${pkgname}-${version}.tar.bz2"
checksum=f7e8e1ac4aa314a6645fa7016d882da381a8e1020c83462a2ca26cb25d8f3cbb

post_configure() {
	cmake_builddir=build-libs
	configure_args+=" -DBUILD_SHARED_LIBS=ON"
	do_configure
}

post_build() {
	ninja -C build-libs ${makejobs}
}

post_install() {
	DESTDIR=${DESTDIR} cmake -P ${wrksrc}/build-libs/cmake_install.cmake
	vinstall src/astyle.h 644 usr/include
	vlicense LICENSE.md
}
