summaryrefslogtreecommitdiff
path: root/media-gfx
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2017-07-12 23:24:29 +0100
committerBertrand Jacquin <bertrand@jacquin.bzh>2017-07-12 23:24:29 +0100
commitedd07b7a44b9caee0e00d9a7e107529327f28044 (patch)
treefc2c0b6f4b0d82f54ab3a44fd30ba355ca43b132 /media-gfx
parentdev-lang/php: Fix bad EPREFIX variable, drop kolab USE flag (diff)
downloadportage-edd07b7a44b9caee0e00d9a7e107529327f28044.tar.xz
media-gfx/wkhtmltopdf: Import from vanilla and make it depend on recommanded QT4 only
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/wkhtmltopdf/Manifest1
-rw-r--r--media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.4-build.patch21
-rw-r--r--media-gfx/wkhtmltopdf/metadata.xml11
-rw-r--r--media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.4.ebuild41
4 files changed, 74 insertions, 0 deletions
diff --git a/media-gfx/wkhtmltopdf/Manifest b/media-gfx/wkhtmltopdf/Manifest
new file mode 100644
index 00000000..2763af14
--- /dev/null
+++ b/media-gfx/wkhtmltopdf/Manifest
@@ -0,0 +1 @@
+DIST wkhtmltopdf-0.12.4.tar.gz 128695 SHA256 dd466f5c2504670459f3b8265de5697b9054f077e2f3e392e5172b5133080edf SHA512 6ec27453efdf32b97f6434a3eb5dd3d3470bbdccdbb4f997ff4234441c79960932e51d963e5d0d2d98bbf8b4f7ab2ed8835dbc1a35407a63815691b59217caa2 WHIRLPOOL 382c930e21e7136fe540b26afe86d53c74e6d97a70f87cd2138cc654ad65958f60cb11e76bf3e0a1aeb4f8bbc7671deae2e109058e9343d773684ec916d4aa8d
diff --git a/media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.4-build.patch b/media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.4-build.patch
new file mode 100644
index 00000000..0148f3b4
--- /dev/null
+++ b/media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.4-build.patch
@@ -0,0 +1,21 @@
+Fix build without patched Qt
+
+This was broken since 96b03ae.
+
+diff --git a/src/lib/multipageloader.cc b/src/lib/multipageloader.cc
+index 93dece8..456a857 100644
+--- a/src/lib/multipageloader.cc
++++ b/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/media-gfx/wkhtmltopdf/metadata.xml b/media-gfx/wkhtmltopdf/metadata.xml
new file mode 100644
index 00000000..8fb57a5f
--- /dev/null
+++ b/media-gfx/wkhtmltopdf/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>graphics@gentoo.org</email>
+ <name>Gentoo Graphics Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">wkhtmltopdf/wkhtmltopdf</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.4.ebuild b/media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.4.ebuild
new file mode 100644
index 00000000..50b7a59a
--- /dev/null
+++ b/media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.4.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit qmake-utils
+
+DESCRIPTION="Convert html to pdf (and various image formats) using webkit"
+HOMEPAGE="http://wkhtmltopdf.org/ https://github.com/wkhtmltopdf/wkhtmltopdf/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+RDEPEND="dev-qt/qtgui:4
+ dev-qt/qtwebkit:4
+ dev-qt/qtcore:4
+ dev-qt/qtsvg:4
+ dev-qt/qtxmlpatterns:4"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS CHANGELOG.md README.md )
+
+PATCHES=( "${FILESDIR}"/${P}-build.patch )
+
+src_prepare() {
+ default
+ sed -i "s:\(INSTALLBASE/\)lib:\1$(get_libdir):" src/lib/lib.pro || die
+}
+
+src_configure() {
+ eqmake4 INSTALLBASE=/usr
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install
+ use examples && dodoc -r examples
+ einstalldocs
+}