# Description: Utility that does structural, content-preserving transformations on PDF files
# URL: http://qpdf.sourceforge.net/
# Maintainer: Juergen Daubert, jue at crux dot nu
# Depends on: libjpeg-turbo openssl zlib
# Optional: gnutls libidn2

name=qpdf
version=11.9.0
release=1
source=(http://downloads.sourceforge.net/project/$name/$name/$version/$name-$version.tar.gz)

build() {
	cmake -S $name-$version -B build -G Ninja \
		-D CMAKE_INSTALL_PREFIX=/usr \
		-D CMAKE_INSTALL_LIBDIR=/usr/lib \
		-D CMAKE_BUILD_TYPE=Release \
		-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS"

	cmake --build build -j ${JOBS:-1}
	DESTDIR=$PKG cmake --install build

	rm -r $PKG/usr/share/doc
}
