void-packages/srcpkgs/poppler-qt5/template

68 lines
2.0 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=22.12.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"
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"
short_desc="PDF rendering library - Qt5 bindings"
maintainer="Orphaned <orphan@voidlinux.org>"
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="${homepage}/poppler-${version}.tar.xz"
checksum=d9aa9cacdfbd0f8e98fc2b3bb008e645597ed480685757c3e7bc74b4278d15c0
# 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
}
}