# Template file for 'glog'
pkgname=glog
version=0.7.1
revision=1
build_style=cmake
configure_args="
 -DWITH_PKGCONFIG=ON"
makedepends="gflags-devel libunwind-devel"
checkdepends="gtest-devel"
short_desc="Logging library for C++"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://github.com/google/glog"
distfiles="https://github.com/google/glog/archive/v${version}.tar.gz"
checksum=00e4a87e87b7e7612f519a41e491f16623b12423620006f59f5688bfd8d13b08

if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
	makedepends+=" libucontext-devel"
	configure_args+=" -DPRINT_UNSYMBOLIZED_STACK_TRACES=OFF"
	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-lucontext"
fi

post_install() {
	vlicense COPYING
}

glog-devel_package() {
	short_desc+=" - development files"
	depends="${sourcepkg}>=${version}_${revision} gflags-devel
	 libunwind-devel"
	pkg_install() {
		vmove usr/include
		vmove "usr/lib/*.so"
		vmove usr/lib/pkgconfig
		vmove usr/lib/cmake
		vmove usr/share/glog/cmake
	}
}
