aboutsummaryrefslogtreecommitdiff
path: root/converters/wkhtmltopdf
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2011-03-21 20:25:57 +0000
committerMartin Matuska <mm@FreeBSD.org>2011-03-21 20:25:57 +0000
commit5b6e7b05497ae159c543b6afd311bb32f2b13dc9 (patch)
tree5873733d4bd3d9eaa8046d3a34f6c93c400105d3 /converters/wkhtmltopdf
parentd6fa7a4544336aa40d2eeea25a867feae7eee542 (diff)
downloadports-5b6e7b05497ae159c543b6afd311bb32f2b13dc9.tar.gz
ports-5b6e7b05497ae159c543b6afd311bb32f2b13dc9.zip
Simple shell utility to convert html to pdf using a custom static build
of qt and the webkit rendering engine. Features of the static version: * Convert web pages into PDF documents using webkit * Adding headers and footers * TOC generation * Batch mode conversions * XServer is not required (however the X11 client libs must be installed) WWW: http://code.google.com/p/wkhtmltopdf/
Notes
Notes: svn path=/head/; revision=271420
Diffstat (limited to 'converters/wkhtmltopdf')
-rw-r--r--converters/wkhtmltopdf/Makefile86
-rw-r--r--converters/wkhtmltopdf/distinfo4
-rw-r--r--converters/wkhtmltopdf/pkg-descr11
-rw-r--r--converters/wkhtmltopdf/pkg-message3
-rw-r--r--converters/wkhtmltopdf/pkg-plist21
5 files changed, 125 insertions, 0 deletions
diff --git a/converters/wkhtmltopdf/Makefile b/converters/wkhtmltopdf/Makefile
new file mode 100644
index 000000000000..117338ffa7d2
--- /dev/null
+++ b/converters/wkhtmltopdf/Makefile
@@ -0,0 +1,86 @@
+# New ports collection makefile for: tnef
+# Date created: 21 March 2010
+# Whom: Martin Matuska <mm@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= wkhtmltopdf
+DISTVERSION= 0.10.0_rc2
+CATEGORIES= converters
+MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}:wkhtmltopdf \
+ ${MASTER_SITE_LOCAL}
+MASTER_SITE_SUBDIR= mm
+DISTFILES= ${DISTNAME}.tar.bz2:wkhtmltopdf \
+ wkhtml2pdf-wkhtmltopdf-qt-${WKQTVERSION}.tar.bz2
+
+MAINTAINER= mm@FreeBSD.org
+COMMENT= HTML to PDF converter
+
+LIB_DEPENDS+= fontconfig:${PORTSDIR}/x11-fonts/fontconfig \
+ freetype:${PORTSDIR}/print/freetype2 \
+ jpeg:${PORTSDIR}/graphics/jpeg \
+ png:${PORTSDIR}/graphics/png \
+ mng:${PORTSDIR}/graphics/libmng \
+ tiff:${PORTSDIR}/graphics/tiff
+
+WRKSRC= ${WRKDIR}/qt-${PORTNAME}-qt
+INSTALL_WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
+
+WKQTVERSION= 1806ef3b
+USE_XORG= x11 xext xrender
+USE_PERL5_BUILD= yes
+USE_LDCONFIG= yes
+USE_GMAKE= yes
+HAS_CONFIGURE= yes
+MAKE_JOBS_SAFE= yes
+
+OPTIONS= BUNDLED_LIBS "Use Qt-bundled jpeg, mng, png and tiff" off
+
+CONFIGURE_ARGS= -prefix ${WRKDIR}/wkqt \
+ -release -static -fast -exceptions -no-accessibility -no-stl \
+ -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite \
+ -no-sql-sqlite2 -no-qt3support -xmlpatterns -no-phonon \
+ -no-phonon-backend -webkit -no-scripttools -no-mmx -no-3dnow -no-sse \
+ -no-sse2 -system-zlib -qt-gif \
+ -graphicssystem raster -opensource -confirm-license \
+ -nomake tools -nomake examples -nomake demos -nomake docs \
+ -nomake translations -no-opengl -no-dbus -no-multimedia -openssl \
+ -no-declarative -largefile -rpath -no-nis -no-cups -no-iconv -no-pch \
+ -no-gtkstyle -no-nas-sound -no-sm -no-xshape -no-xinerama -no-xcursor \
+ -no-xfixes -no-xrandr -no-mitshm -no-xinput -no-xkb -no-glib -no-openvg \
+ -no-opengl -no-xsync -no-audio-backend -no-sse3 -no-ssse3 -no-sse4.1 \
+ -no-sse4.2
+
+MAKE_ARGS+= INSTALL_ROOT="${PREFIX}"
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_BUNDLED_LIBS)
+CONFIGURE_ARGS+= -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg
+.else
+LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg \
+ png:${PORTSDIR}/graphics/png \
+ mng:${PORTSDIR}/graphics/libmng \
+ tiff:${PORTSDIR}/graphics/tiff
+CONFIGURE_ARGS+= -system-libtiff -system-libpng -system-libmng \
+ -system-libjpeg
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|/usr/X11R6/include|${LOCALBASE}/include/X11|g' \
+ -e 's|/usr/X11R6/lib|${LOCALBASE}/lib|g' \
+ ${WRKSRC}/mkspecs/freebsd-g++/qmake.conf
+
+post-build:
+ @cd ${WRKSRC} && \
+ ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET} \
+ INSTALL_ROOT=
+ @cd ${WRKDIR}/${PORTNAME}-${DISTVERSION} && ${WRKDIR}/wkqt/bin/qmake && \
+ ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}
+
+post-install:
+ @${STRIP_CMD} ${PREFIX}/bin/wkhtmltopdf ${PREFIX}/bin/wkhtmltoimage
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/converters/wkhtmltopdf/distinfo b/converters/wkhtmltopdf/distinfo
new file mode 100644
index 000000000000..848235e99799
--- /dev/null
+++ b/converters/wkhtmltopdf/distinfo
@@ -0,0 +1,4 @@
+SHA256 (wkhtmltopdf-0.10.0_rc2.tar.bz2) = 3df9a81f0b4823ab3b0ba60e218b206a264bcf810b078fd543e266295b577a5a
+SIZE (wkhtmltopdf-0.10.0_rc2.tar.bz2) = 107680
+SHA256 (wkhtml2pdf-wkhtmltopdf-qt-1806ef3b.tar.bz2) = 044dc96e6da5827d25f41f7a916fc52aa87aff9b5cd33bed0b7b75d386a5b08b
+SIZE (wkhtml2pdf-wkhtmltopdf-qt-1806ef3b.tar.bz2) = 122812086
diff --git a/converters/wkhtmltopdf/pkg-descr b/converters/wkhtmltopdf/pkg-descr
new file mode 100644
index 000000000000..cd0dd9084293
--- /dev/null
+++ b/converters/wkhtmltopdf/pkg-descr
@@ -0,0 +1,11 @@
+Simple shell utility to convert html to pdf using a custom static build
+of qt and the webkit rendering engine.
+
+Features of the static version:
+* Convert web pages into PDF documents using webkit
+* Adding headers and footers
+* TOC generation
+* Batch mode conversions
+* XServer is not required (however the X11 client libs must be installed)
+
+WWW: http://code.google.com/p/wkhtmltopdf/
diff --git a/converters/wkhtmltopdf/pkg-message b/converters/wkhtmltopdf/pkg-message
new file mode 100644
index 000000000000..11c3ec67b750
--- /dev/null
+++ b/converters/wkhtmltopdf/pkg-message
@@ -0,0 +1,3 @@
+
+For proper functionality you may need to install the following port(s):
+x11-fonts/webfonts
diff --git a/converters/wkhtmltopdf/pkg-plist b/converters/wkhtmltopdf/pkg-plist
new file mode 100644
index 000000000000..d43fa508f0e2
--- /dev/null
+++ b/converters/wkhtmltopdf/pkg-plist
@@ -0,0 +1,21 @@
+bin/wkhtmltopdf
+bin/wkhtmltoimage
+include/wkhtmltox/converter.hh
+include/wkhtmltox/dllbegin.inc
+include/wkhtmltox/dllend.inc
+include/wkhtmltox/image.h
+include/wkhtmltox/imageconverter.hh
+include/wkhtmltox/imagesettings.hh
+include/wkhtmltox/loadsettings.hh
+include/wkhtmltox/multipageloader.hh
+include/wkhtmltox/pdf.h
+include/wkhtmltox/pdfconverter.hh
+include/wkhtmltox/pdfsettings.hh
+include/wkhtmltox/settings.hh
+include/wkhtmltox/utilities.hh
+include/wkhtmltox/websettings.hh
+lib/libwkhtmltox.so
+lib/libwkhtmltox.so.0
+lib/libwkhtmltox.so.0.10
+lib/libwkhtmltox.so.0.10.0
+@dirrm include/wkhtmltox