New package: wkhtmltopdf-0.12.4

Closes: #7972
This commit is contained in:
Jürgen Buchmüller 2017-12-17 13:02:17 +01:00
parent 2f2c6b6ee1
commit 0611e8fcde
4 changed files with 61 additions and 0 deletions

View File

@ -2899,6 +2899,7 @@ libArcus.so.3 libArcus-3.0.3_1
libgutenprint.so.2 gutenprint-5.2.12_1
libunbound.so.2 unbound-1.6.6_1
libmirage.so.11 libmirage-3.1.0_1
libwkhtmltox.so.0 wkhtmltopdf-0.12.4_1
libixml.so.10 libupnp1.8-1.8.2_1
libupnp.so.10 libupnp1.8-1.8.2_1
libevent_extra-2.1.so.6 libevent-2.1.8_3

1
srcpkgs/wkhtmltopdf-devel Symbolic link
View File

@ -0,0 +1 @@
wkhtmltopdf

View File

@ -0,0 +1,24 @@
https://github.com/wkhtmltopdf/wkhtmltopdf/commit/af95531eabb212ae16a9fb689bb25a767eb580bc
From af95531eabb212ae16a9fb689bb25a767eb580bc Mon Sep 17 00:00:00 2001
From: Ashish Kulkarni <kulkarni.ashish@gmail.com>
Date: Tue, 20 Dec 2016 17:53:46 +0530
Subject: [PATCH] fix build without patched Qt
This was broken since 96b03ae078b36122c48ec0ce9b164a24627c5312.
--- src/lib/multipageloader.cc
+++ src/lib/multipageloader.cc
@@ -213,10 +213,11 @@ ResourceObject::ResourceObject(MultiPageLoaderPrivate & mpl, const QUrl & u, con
}
webPage.setNetworkAccessManager(&networkAccessManager);
-
+#ifdef __EXTENSIVE_WKHTMLTOPDF_QT_HACK__
double devicePixelRatio = multiPageLoader.dpi / 96.; // The used version of WebKit always renders at 96 DPI when no zoom is applied. It does not fully support a device pixel ratio != 1 natively.
webPage.mainFrame()->setZoomFactor(devicePixelRatio * settings.zoomFactor); // Zoom in the page to achieve a higher DPI.
webPage.setDevicePixelRatio(devicePixelRatio); // Fix CSS media queries (does not affect anything else).
+#endif
}
/*!

View File

@ -0,0 +1,35 @@
# Template file for 'wkhtmltopdf'
pkgname=wkhtmltopdf
version=0.12.4
revision=1
build_style=qmake
hostmakedepends="qt5-qmake"
makedepends="qt5-xmlpatterns-devel qt5-svg-devel qt5-webkit-devel"
depends="qt5-svg"
short_desc="Convert HTML to PDF using Webkit"
maintainer="Piraty <piraty1@inbox.ru>"
license="LGPL-3"
homepage="https://wkhtmltopdf.org/"
distfiles="https://github.com/wkhtmltopdf/wkhtmltopdf/archive/${version}.tar.gz"
checksum=dd466f5c2504670459f3b8265de5697b9054f077e2f3e392e5172b5133080edf
if [ -n "$CROSS_BUILD" ]; then
hostmakedepends+=" ${makedepends}"
fi
post_install() {
mkdir -p $DESTDIR/usr
dirs="bin lib share include"
for dir in $dirs; do
mv $DESTDIR/$dir $DESTDIR/usr/$dir
done
}
wkhtmltopdf-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.so
}
}