void-packages/srcpkgs/glog/template

45 lines
1.2 KiB
Bash

# Template file for 'glog'
pkgname=glog
version=0.6.0
revision=1
build_style=cmake
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=8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" libucontext-devel"
configure_args+=" -DPRINT_UNSYMBOLIZED_STACK_TRACES=OFF"
fi
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES='-latomic'"
fi
case "$XBPS_TARGET_MACHINE" in
ppc64*-musl) configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES='-lucontext'";;
ppc*-musl) configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES='-latomic -lucontext'";;
esac
post_install() {
vlicense COPYING
}
glog-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision} gflags-devel"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/lib/cmake
vmove usr/share/glog/cmake
}
}