summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2017-09-30 10:20:13 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2017-09-30 10:21:49 +0200
commit849b2089f3afbb6339245cdee27afa216ded3614 (patch)
tree73b4ad1c5918f1b5807ea455c80a89b647e542b3
parentc46f2cf95ea862fe334381addf71d9c97e442646 (diff)
downloadgentoo-849b2089f3afbb6339245cdee27afa216ded3614.tar.gz
gentoo-849b2089f3afbb6339245cdee27afa216ded3614.tar.xz
media-gfx/wkhtmltopdf: Add missing USE-dep
Also fixing GCC6 build warning. Reported-by: Andreas Schürch <nativemad@gentoo.org> Gentoo-bug: 631724 Package-Manager: Portage-2.3.10, Repoman-2.3.3
-rw-r--r--media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.4-gcc6-warn.patch33
-rw-r--r--media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.4-r1.ebuild50
2 files changed, 83 insertions, 0 deletions
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 00000000000..83f862677a6
--- /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/wkhtmltopdf-0.12.4-r1.ebuild b/media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.4-r1.ebuild
new file mode 100644
index 00000000000..26b0e472f39
--- /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
+}