summaryrefslogtreecommitdiff
path: root/media-gfx/wkhtmltopdf
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-gfx/wkhtmltopdf
reinit the tree, so we can have metadata
Diffstat (limited to 'media-gfx/wkhtmltopdf')
-rw-r--r--media-gfx/wkhtmltopdf/Manifest7
-rw-r--r--media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.4-build.patch21
-rw-r--r--media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.4-gcc6-warn.patch33
-rw-r--r--media-gfx/wkhtmltopdf/metadata.xml11
-rw-r--r--media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.4-r1.ebuild50
5 files changed, 122 insertions, 0 deletions
diff --git a/media-gfx/wkhtmltopdf/Manifest b/media-gfx/wkhtmltopdf/Manifest
new file mode 100644
index 000000000000..fbb1294b9c12
--- /dev/null
+++ b/media-gfx/wkhtmltopdf/Manifest
@@ -0,0 +1,7 @@
+AUX wkhtmltopdf-0.12.4-build.patch 883 SHA256 f72bac4ec155a7cfe9d4481488930c08075837630346ade677079655f7dc59f8 SHA512 679196b89343bade3b8846bc7913c5ebf9d9badb63ffb3de6797a9bdb14e83806cdc0771354bfa9e633bda9c6934d65cbcc7b4f585a31499565a8c6777e1370e WHIRLPOOL b1d7407ae87c8d86839dfb522e95390ed7626b935c18bc85ca6c7409f66542fa383e5c2abc7a5210d96eda16bddaf08755ddc56fa3833ba4543f92b092376441
+AUX wkhtmltopdf-0.12.4-gcc6-warn.patch 1271 SHA256 155e380c56ec2a3ed4ed6aaf6fed64870181008e7ee360aee1c4bd9bfb8605ec SHA512 af4282d023e2da3ab5ba2e7475b3bfa476fc1c9507e2af2db407ff99312cbae60b41846e13564c3b55b670caecd072f6c996348dbbc68528e6a798b3068f6058 WHIRLPOOL b62c627dc557a06c319c54f0230871922f550e49dc1f714a1ec2d08c451c65505c5dab96b37c52c5ce1d91231116125c6ab38a6880aa8c4492fdf0bd53c1e6e6
+DIST wkhtmltopdf-0.12.4.tar.gz 128695 SHA256 dd466f5c2504670459f3b8265de5697b9054f077e2f3e392e5172b5133080edf SHA512 6ec27453efdf32b97f6434a3eb5dd3d3470bbdccdbb4f997ff4234441c79960932e51d963e5d0d2d98bbf8b4f7ab2ed8835dbc1a35407a63815691b59217caa2 WHIRLPOOL 382c930e21e7136fe540b26afe86d53c74e6d97a70f87cd2138cc654ad65958f60cb11e76bf3e0a1aeb4f8bbc7671deae2e109058e9343d773684ec916d4aa8d
+EBUILD wkhtmltopdf-0.12.4-r1.ebuild 1011 SHA256 d5e7889406c33ed0b24d2135dbed96fd6b58857aec98471ed97b91ca90185094 SHA512 ac76c9b09621fb465a8d6caa05c4406259dd81373541bf9b80a4b8b90d72ef95dc61fb58af5953918923b055bdccee398fa878e95e1511c0d11d5111f33e3bcb WHIRLPOOL 44e3a63d01bd3ea2c721af6e1afc56ece2149f536e42a5c218cc852c22ecec3309505060d8f3d5a03b4e7ab9d9b95904ec119406e34695cddcfb5b2307097205
+MISC ChangeLog 2558 SHA256 8dd0d153f4a2617126996d0f40a23870e7f447b7a243e56dd99762716cda065d SHA512 b419d40a66209362ba2970a8c5e343c84de473e63a94ef6dbe221d0bb97abe19afb6095a1f41c74da96d9d8197db3f170404cbe96f370e024c58160a87bf5469 WHIRLPOOL 396d0e329057469be31cdcfbdb44bf28866c65cc003eea9a65780202017c0a99a60918c5f4c93212a9ef0a4cdc7b07a500acb9604f0f22ba52c8dddb833eedf3
+MISC ChangeLog-2015 1349 SHA256 5dab0bee97824a230977232e5b2dc4bb4a5ee94c0f6fbff03f2b2430361b7be2 SHA512 c97dfd5cef30ea62c301b81766a285ee40611b5cf823dcb8e20a068e472bbe1e188031ef08a6ab4491d71129f33c1823f0e70b3131c4c402c43b27a543b8c6b5 WHIRLPOOL b13ae45be9da8cbc9c23e08d4974a7fa9b6a3145818d0c733e3dbcdf2901e4f7e0fd72f8ce9af03f22bc7452d617024e06fabea2fa9a7ac8c2ec4185c0879318
+MISC metadata.xml 347 SHA256 a2e7eb7796d0dd6962867ca206666fba6641491258e6a5380d66ffc9b93466d2 SHA512 b642c6b896856dca084c706f397b6fed8537b126105356365ec0eb14fc6bd51229fece832800f2ab18d8d64a1f22c4015d2fa6467d067ffc58c001af6e216828 WHIRLPOOL a120b69cbd37ec16cf066ad5a97d8c961341f7c94667820a4f1ad5432938c33a6b32e52580c1680b436baa5c45701b13ba89540f7fcb95950f4b74342d453ec6
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 000000000000..0148f3b42948
--- /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/files/wkhtmltopdf-0.12.4-gcc6-warn.patch b/media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.4-gcc6-warn.patch
new file mode 100644
index 000000000000..83f862677a67
--- /dev/null
+++ b/media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.4-gcc6-warn.patch
@@ -0,0 +1,33 @@
+From c7a709f3d9b7628d5416e45c365901381beef7cc Mon Sep 17 00:00:00 2001
+From: Ashish Kulkarni <kulkarni.ashish@gmail.com>
+Date: Tue, 20 Dec 2016 17:57:26 +0530
+Subject: [PATCH] fix compilation warning with GCC 6.2
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+../lib/pdfsettings.cc: In function ‘QString wkhtmltopdf::settings::unitRealToStr(const UnitReal&, bool*)’:
+../lib/pdfsettings.cc:308:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
+ if (ok) *ok=false; break;
+ ^~
+../lib/pdfsettings.cc:308:22: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
+ if (ok) *ok=false; break;
+ ^~~~~
+---
+ src/lib/pdfsettings.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/pdfsettings.cc b/src/lib/pdfsettings.cc
+index e3c62526..b339ec10 100644
+--- a/src/lib/pdfsettings.cc
++++ b/src/lib/pdfsettings.cc
+@@ -305,7 +305,8 @@ QString unitRealToStr(const UnitReal & ur, bool * ok) {
+ case QPrinter::Point: c = "pt"; break;
+ case QPrinter::Millimeter: c = "mm"; break;
+ default:
+- if (ok) *ok=false; break;
++ if (ok) *ok=false;
++ return "";
+ }
+ return QString("%1%2").arg(ur.first).arg(c);
+ }
diff --git a/media-gfx/wkhtmltopdf/metadata.xml b/media-gfx/wkhtmltopdf/metadata.xml
new file mode 100644
index 000000000000..8fb57a5f0bfa
--- /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-r1.ebuild b/media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.4-r1.ebuild
new file mode 100644
index 000000000000..26b0e472f391
--- /dev/null
+++ b/media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.4-r1.ebuild
@@ -0,0 +1,50 @@
+# 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="https://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/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwebkit:5[printsupport]
+ dev-qt/qtwidgets:5
+"
+DEPEND="${RDEPEND}
+ dev-qt/qtxmlpatterns:5
+"
+
+DOCS=( AUTHORS CHANGELOG.md README.md )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-gcc6-warn.patch
+)
+
+src_prepare() {
+ default
+ sed -i "s:\(INSTALLBASE/\)lib:\1$(get_libdir):" src/lib/lib.pro || die
+}
+
+src_configure() {
+ eqmake5 INSTALLBASE=/usr
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install
+ use examples && dodoc -r examples
+ einstalldocs
+}