# Template file for 'passwordsafe'
pkgname=passwordsafe
version=1.13.0
revision=2
wrksrc="pwsafe-${version}"
build_style=cmake
build_helper=cmake-wxWidgets-gtk3
# build process uses perl to generate core_st.cpp and zip to generate help files
hostmakedepends="perl zip pkg-config gettext"
makedepends="wxWidgets-gtk3-devel libXt-devel libXtst-devel libxerces-c-devel libuuid-devel
 libykpers-devel qrencode-devel openssl-devel libcurl-devel file-devel"
checkdepends="gtest-devel"
short_desc="Simple & Secure Password Management"
maintainer="Rui Abreu Ferreira <raf-ep@gmx.com>"
license="Artistic-2.0"
homepage="https://pwsafe.org"
distfiles="https://github.com/pwsafe/pwsafe/archive/${version}.tar.gz"
checksum=8962edf57b7f901d9ed23496c8ec387a4f186855976e8ac98f2dd55560c82ebe

if [ "$XBPS_CHECK_PKGS" ]; then
	configure_args+=" -DNO_GTEST=OFF"
else
	configure_args+=" -DNO_GTEST=ON"
fi

pre_configure() {
	# ykpers-1 includes are hardcoded, add cross base
	vsed -e "s|-I\(/usr/include/ykpers-1\)|-I${XBPS_CROSS_BASE}\1|" -i CMakeLists.txt
}

post_install() {
	vlicense LICENSE
	vdoc docs/config.txt
}
