# Template file for 'crypto++'
pkgname=crypto++
reverts="820_2"
version=8.9.0
revision=1
build_style=gnu-makefile
make_build_target="dynamic static libcryptopp.pc"
make_install_target="install-lib"
short_desc="Free C++ class library of cryptographic schemes"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSL-1.0"
homepage="http://www.cryptopp.com/"
distfiles="https://github.com/weidai11/cryptopp/archive/refs/tags/CRYPTOPP_${version//./_}.tar.gz"
checksum=ab5174b9b5c6236588e15a1aa1aaecb6658cdbe09501c7981ac8db276a24d9ab

CXXFLAGS="-DNDEBUG -fPIC"

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

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
	}
}
