void-packages/srcpkgs/poppler-qt5/template

70 lines
2.1 KiB
Bash

# Template file for 'poppler-qt5'
#
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/poppler"
# IT IS SPLIT TO AVOID A CYCLIC DEPENDENCY: qt5 -> cups -> poppler -> qt5.
#
pkgname=poppler-qt5
version=23.08.0
revision=1
build_style=cmake
configure_args="-DENABLE_UNSTABLE_API_ABI_HEADERS=ON -DENABLE_GLIB=OFF
-DENABLE_QT5=ON -DENABLE_UTILS=OFF -DENABLE_CPP=OFF -DENABLE_BOOST=OFF
-DENABLE_QT6=ON -DQT_HOST_PATH=/usr -DBUILD_MANUAL_TESTS=OFF
-DBUILD_QT5_TESTS=OFF -DBUILD_QT6_TESTS=OFF"
hostmakedepends="pkg-config qt5-devel qt6-base-devel"
makedepends="libpng-devel tiff-devel lcms2-devel libcurl-devel nss-devel
fontconfig-devel cairo-devel libopenjpeg2-devel qt5-devel qt6-base-devel
gpgmepp-devel"
short_desc="PDF rendering library - Qt5 bindings"
maintainer="Mohammed Anas <triallax@tutanota.com>"
license="GPL-2.0-or-later, GPL-3.0-or-later"
homepage="https://poppler.freedesktop.org"
changelog="https://gitlab.freedesktop.org/poppler/poppler/-/raw/master/NEWS"
distfiles="https://poppler.freedesktop.org/poppler-${version}.tar.xz"
checksum=4a4bf7fc903b9f1a2ab7d04b7c5d8220db9bc6261cc73fdb9a826dc272f49aa8
# fails to find a bunch of files
make_check=no
post_install() {
local f
rm -f ${DESTDIR}/usr/lib/libpoppler.*
for f in poppler-cairo poppler-splash poppler; do
rm -f ${DESTDIR}/usr/lib/pkgconfig/${f}.pc
done
for f in ${DESTDIR}/usr/include/poppler/*; do
case "$f" in
*/qt5 | */qt6) ;;
*)
rm -rf "$f" ;;
esac
done
}
poppler-qt5-devel_package() {
depends="qt5-devel poppler-devel>=${version}
${sourcepkg}-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include/poppler/qt5
vmove usr/lib/libpoppler-qt5.so
vmove usr/lib/pkgconfig/poppler-qt5.pc
}
}
poppler-qt6_package() {
short_desc="${short_desc/Qt5/Qt6}"
pkg_install() {
vmove "usr/lib/libpoppler-qt6.so.*"
}
}
poppler-qt6-devel_package() {
depends="poppler-devel>=${version} poppler-qt6-${version}_${revision}"
short_desc="${short_desc/Qt5/Qt6} - development files"
pkg_install() {
vmove usr/include/poppler/qt6
vmove usr/lib/libpoppler-qt6.so
vmove usr/lib/pkgconfig/poppler-qt6.pc
}
}