# Template file for 'crypto++'
pkgname=crypto++
version=820
revision=2
create_wrksrc=yes
build_style=gnu-makefile
make_build_args="PREFIX=/usr"
make_build_target="dynamic static libcryptopp.pc"
make_install_target="install-lib"
hostmakedepends="unzip"
short_desc="Free C++ class library of cryptographic schemes"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSL-1.0"
homepage="http://www.cryptopp.com/"
distfiles="http://www.cryptopp.com/cryptopp${version}.zip"
checksum=03f0e2242e11b9d19b28d0ec5a3fa8ed5cc7b27640e6bed365744f593e858058

CXXFLAGS="-DNDEBUG -fPIC"

if [ "$XBPS_CROSS" ]; then
	make_build_args+=" -f GNUmakefile-cross"
fi

post_extract() {
	sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile
}
post_install() {
	vlicense License.txt LICENSE
}

crypto++-devel_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/*.a
		vmove usr/lib/*.so
		vmove usr/lib/pkgconfig
	}
}
