diff --git a/common/shlibs b/common/shlibs index b2c6909f126..b5293d2ea5e 100644 --- a/common/shlibs +++ b/common/shlibs @@ -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 diff --git a/srcpkgs/wkhtmltopdf-devel b/srcpkgs/wkhtmltopdf-devel new file mode 120000 index 00000000000..c4f52b3313d --- /dev/null +++ b/srcpkgs/wkhtmltopdf-devel @@ -0,0 +1 @@ +wkhtmltopdf \ No newline at end of file diff --git a/srcpkgs/wkhtmltopdf/patches/fix-patched-qt.patch b/srcpkgs/wkhtmltopdf/patches/fix-patched-qt.patch new file mode 100644 index 00000000000..a18d0c0f7fe --- /dev/null +++ b/srcpkgs/wkhtmltopdf/patches/fix-patched-qt.patch @@ -0,0 +1,24 @@ +https://github.com/wkhtmltopdf/wkhtmltopdf/commit/af95531eabb212ae16a9fb689bb25a767eb580bc + +From af95531eabb212ae16a9fb689bb25a767eb580bc Mon Sep 17 00:00:00 2001 +From: Ashish Kulkarni +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 + } + + /*! diff --git a/srcpkgs/wkhtmltopdf/template b/srcpkgs/wkhtmltopdf/template new file mode 100644 index 00000000000..42356a852ed --- /dev/null +++ b/srcpkgs/wkhtmltopdf/template @@ -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 " +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 + } +}