diff options
author | manu <manu@pkgsrc.org> | 2017-06-23 07:12:19 +0000 |
---|---|---|
committer | manu <manu@pkgsrc.org> | 2017-06-23 07:12:19 +0000 |
commit | d355e1188df513da249fba603ab7287925db92ae (patch) | |
tree | 12f09637eb217b541ad1e938e89fffb79b1861be /converters | |
parent | 9ae614b844b77410e8fd6f8dbaa3a6dd94dfbf91 (diff) | |
download | pkgsrc-d355e1188df513da249fba603ab7287925db92ae.tar.gz |
Add wkhtmltopdf 0.12.4
wkhtmltopdf and wkhtmltoimage are open source (LGPLv3) command line
tools to render HTML into PDF and various image formats using the
Qt WebKit rendering engine. These run entirely "headless" and do
not require a display or display service.
Diffstat (limited to 'converters')
-rw-r--r-- | converters/Makefile | 3 | ||||
-rw-r--r-- | converters/wkhtmltopdf/DESCR | 4 | ||||
-rw-r--r-- | converters/wkhtmltopdf/Makefile | 63 | ||||
-rw-r--r-- | converters/wkhtmltopdf/PLIST | 8 | ||||
-rw-r--r-- | converters/wkhtmltopdf/distinfo | 9 | ||||
-rw-r--r-- | converters/wkhtmltopdf/patches/patch-qt_config.tests_mac_dwarf2.test | 28 | ||||
-rw-r--r-- | converters/wkhtmltopdf/patches/patch-qt_configure | 37 | ||||
-rw-r--r-- | converters/wkhtmltopdf/patches/patch-qt_mkspecs_netbsd-g++_qmake.conf | 30 |
8 files changed, 181 insertions, 1 deletions
diff --git a/converters/Makefile b/converters/Makefile index ba93a97cd92..ada32fe8f67 100644 --- a/converters/Makefile +++ b/converters/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.154 2017/05/28 13:25:53 mef Exp $ +# $NetBSD: Makefile,v 1.155 2017/06/23 07:12:19 manu Exp $ # COMMENT= Document format and character code converters @@ -127,6 +127,7 @@ SUBDIR+= txt2pdbdoc SUBDIR+= unix2dos SUBDIR+= uudeview SUBDIR+= uulib +SUBDIR+= wkhtmltopdf SUBDIR+= wv SUBDIR+= wv2 SUBDIR+= xdeview diff --git a/converters/wkhtmltopdf/DESCR b/converters/wkhtmltopdf/DESCR new file mode 100644 index 00000000000..e6e79c713c4 --- /dev/null +++ b/converters/wkhtmltopdf/DESCR @@ -0,0 +1,4 @@ +wkhtmltopdf and wkhtmltoimage are open source (LGPLv3) command line +tools to render HTML into PDF and various image formats using the +Qt WebKit rendering engine. These run entirely "headless" and do +not require a display or display service. diff --git a/converters/wkhtmltopdf/Makefile b/converters/wkhtmltopdf/Makefile new file mode 100644 index 00000000000..99dfddda97d --- /dev/null +++ b/converters/wkhtmltopdf/Makefile @@ -0,0 +1,63 @@ +# $NetBSD: Makefile,v 1.1 2017/06/23 07:12:19 manu Exp $ + +DISTNAME= wkhtmltox-0.12.4 +PKGNAME= wkhtmltopdf-0.12.4 +MASTER_SITES= ${MASTER_SITE_GITHUB:=wkhtmltopdf/} +GITHUB_PROJECT= wkhtmltopdf +GITHUB_RELEASE= ${PKGVERSION_NOREV} +EXTRACT_SUFX= .tar.bz2 + +CATEGORIES= www print converters +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://wkhtmltopdf.org/ +COMMENT= Command line tools to render HTML into PDF +LICENSE= gnu-lgpl-v3 + +USE_LANGUAGES+= c c++ +USE_TOOLS+= perl +#USE_LIBTOOL= yes +CHECK_SHLIBS_SUPPORTED= no # until libtool + +SUBST_CLASSES+= x11 +SUBST_MESSAGE.x11= Fixing x11 options. +SUBST_STAGE.x11= pre-configure +SUBST_FILES.x11+= qt/mkspecs/netbsd-g++/qmake.conf +SUBST_SED.x11= -e 's,@X11BASE@,${X11BASE},g' + + +do-configure: + for f in `find ${WRKSRC} -type f -name '*.py' -print`; do \ + cp $$f $$f.orig && \ + sed '1s|^#!.*$$|#!${PYTHONBIN}|' $$f.orig > $$f; \ + done + +do-build: + cd ${WRKSRC} && ${PYTHONBIN} scripts/build.py posix-local -debug + +WKHTMLTOX_BUILD=${WRKSRC}/static-build/posix-local-dbg/${DISTNAME} +WKHTMLTOX_BIN=${DESTDIR}${PREFIX}/bin +WKHTMLTOX_DATA=${DESTDIR}${PREFIX}/include/wkhtmltox +WKHTMLTOX_LIB=${DESTDIR}${PREFIX}/lib +do-install: + ${INSTALL_PROGRAM_DIR} ${WKHTMLTOX_BIN} +.for b in bin/wkhtmltoimage bin/wkhtmltopdf + ${INSTALL_PROGRAM} ${WKHTMLTOX_BUILD}/${b} ${WKHTMLTOX_BIN} +.endfor + ${INSTALL_DATA_DIR} ${WKHTMLTOX_DATA} +.for h in include/wkhtmltox/image.h include/wkhtmltox/pdf.h + ${INSTALL_DATA} ${WKHTMLTOX_BUILD}/${h} ${WKHTMLTOX_DATA} +.endfor + ${INSTALL_LIB_DIR} ${WKHTMLTOX_LIB} +.for l in lib/libwkhtmltox.so.0.12.4 + ${INSTALL_LIB} ${WKHTMLTOX_BUILD}/${l} ${WKHTMLTOX_LIB} +.endfor + cd ${WKHTMLTOX_LIB} && \ + ln -sf libwkhtmltox.so.0.12.4 libwkhtmltox.so.0.1 && \ + ln -sf libwkhtmltox.so.0.12.4 libwkhtmltox.so.0 + +.include "../../lang/python/application.mk" +.include "../../graphics/png/buildlink3.mk" +.include "../../security/openssl/buildlink3.mk" +.include "../../x11/libX11/buildlink3.mk" +.include "../../mk/jpeg.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/converters/wkhtmltopdf/PLIST b/converters/wkhtmltopdf/PLIST new file mode 100644 index 00000000000..1aee074a9d6 --- /dev/null +++ b/converters/wkhtmltopdf/PLIST @@ -0,0 +1,8 @@ +@comment $NetBSD: PLIST,v 1.1 2017/06/23 07:12:19 manu Exp $ +bin/wkhtmltoimage +bin/wkhtmltopdf +include/wkhtmltox/image.h +include/wkhtmltox/pdf.h +lib/libwkhtmltox.so.0.12.4 +lib/libwkhtmltox.so.0.1 +lib/libwkhtmltox.so.0 diff --git a/converters/wkhtmltopdf/distinfo b/converters/wkhtmltopdf/distinfo new file mode 100644 index 00000000000..607fe8ebf00 --- /dev/null +++ b/converters/wkhtmltopdf/distinfo @@ -0,0 +1,9 @@ +$NetBSD: distinfo,v 1.1 2017/06/23 07:12:19 manu Exp $ + +SHA1 (wkhtmltox-0.12.4.tar.bz2) = 6a0ca9b01d5e37af3fb451bbd934afff43cf26ae +RMD160 (wkhtmltox-0.12.4.tar.bz2) = 665abd76618cdfac27585e62caa52b33d09990fa +SHA512 (wkhtmltox-0.12.4.tar.bz2) = 1526c6138d6276d0f6188737a67848b8ae9c16016c119eb00bbdaf7159464f8799c53ca9a997ea40eea4c2d1cadc35a10607564949fd39a3b7b7e6745a3dbdcb +Size (wkhtmltox-0.12.4.tar.bz2) = 36355721 bytes +SHA1 (patch-qt_config.tests_mac_dwarf2.test) = efabd53a31dc69feac1bc2767c801fab5514a447 +SHA1 (patch-qt_configure) = e13eb806e11a88a20650fc62d38d162145eaabae +SHA1 (patch-qt_mkspecs_netbsd-g++_qmake.conf) = 508b1f25735d3a8f29a1da08a988f608186751bf diff --git a/converters/wkhtmltopdf/patches/patch-qt_config.tests_mac_dwarf2.test b/converters/wkhtmltopdf/patches/patch-qt_config.tests_mac_dwarf2.test new file mode 100644 index 00000000000..c8e5f2df1bc --- /dev/null +++ b/converters/wkhtmltopdf/patches/patch-qt_config.tests_mac_dwarf2.test @@ -0,0 +1,28 @@ +$NetBSD: patch-qt_config.tests_mac_dwarf2.test,v 1.1 2017/06/23 07:12:19 manu Exp $ + +Fix == operator in shell script + +--- qt/config.tests/mac/dwarf2.test.orig 2017-06-20 10:23:31.000000000 +0200 ++++ qt/config.tests/mac/dwarf2.test 2017-06-20 10:23:51.000000000 +0200 +@@ -40,9 +40,9 @@ + # Test for xcode 2.4.0, which has a broken implementation of DWARF + "$COMPILER" $WORKDIR/xcodeversion.cpp $CXXFLAGS $LFLAGS -o xcodeversion -framework Carbon; + ./xcodeversion + +-if [ "$?" == "1" ]; then ++if [ "$?" = "1" ]; then + DWARF2_SUPPORT_BROKEN=yes + fi + + rm xcodeversion +@@ -51,9 +51,9 @@ + if [ "$DWARF2_SUPPORT" != "yes" ]; then + [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols disabled." + exit 0 + else +- if [ "$DWARF2_SUPPORT_BROKEN" == "yes" ]; then ++ if [ "$DWARF2_SUPPORT_BROKEN" = "yes" ]; then + [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols disabled." + exit 0 + else + [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols enabled." diff --git a/converters/wkhtmltopdf/patches/patch-qt_configure b/converters/wkhtmltopdf/patches/patch-qt_configure new file mode 100644 index 00000000000..d00dec9df1b --- /dev/null +++ b/converters/wkhtmltopdf/patches/patch-qt_configure @@ -0,0 +1,37 @@ +$NetBSD: patch-qt_configure,v 1.1 2017/06/23 07:12:19 manu Exp $ + +Fix == operator in shell script + +--- qt/configure.orig 2017-06-20 10:22:29.000000000 +0200 ++++ qt/configure 2017-06-20 10:23:03.000000000 +0200 +@@ -3570,9 +3570,9 @@ + # with the default mkspec. The 10.4u SDK does not support gcc 4.2. + if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then + # get the darwin version. 10.0.0 and up means snow leopard. + VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'` +- if [ "$VERSION" -gt 9 ] && [ `basename "$CFG_SDK"` == "MacOSX10.4u.sdk" ] && [ "$PLATFORM" == "macx-g++" ]; then ++ if [ "$VERSION" -gt 9 ] && [ `basename "$CFG_SDK"` = "MacOSX10.4u.sdk" ] && [ "$PLATFORM" = "macx-g++" ]; then + echo + echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. " + echo + fi +@@ -7202,17 +7202,17 @@ + + # select Carbon on 10.4 Tiger. + if [ "$PLATFORM_MAC" = "yes" ]; then + VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'` +- if [ "$VERSION" == 8 ]; then ++ if [ "$VERSION" = 8 ]; then + CFG_MAC_COCOA="no"; + CFG_MAC_CARBON="yes"; + fi + fi + + # select Carbon when using the 10.4u SDK + if [ "$PLATFORM_MAC" = "yes" ] && [ -n "$CFG_SDK" ]; then +- if [ `basename "$CFG_SDK"` == "MacOSX10.4u.sdk" ]; then ++ if [ `basename "$CFG_SDK"` = "MacOSX10.4u.sdk" ]; then + echo "Carbon on"; + CFG_MAC_COCOA="no"; + CFG_MAC_CARBON="yes"; + fi diff --git a/converters/wkhtmltopdf/patches/patch-qt_mkspecs_netbsd-g++_qmake.conf b/converters/wkhtmltopdf/patches/patch-qt_mkspecs_netbsd-g++_qmake.conf new file mode 100644 index 00000000000..71a761ddf8d --- /dev/null +++ b/converters/wkhtmltopdf/patches/patch-qt_mkspecs_netbsd-g++_qmake.conf @@ -0,0 +1,30 @@ +$NetBSD: patch-qt_mkspecs_netbsd-g++_qmake.conf,v 1.1 2017/06/23 07:12:19 manu Exp $ + +Use /usr/X11R7 instead of /usr/X11R6 + +--- qt/mkspecs/netbsd-g++/qmake.conf.orig 2016-08-23 06:13:29.000000000 +0000 ++++ qt/mkspecs/netbsd-g++/qmake.conf 2017-06-22 00:00:14.000000000 +0000 +@@ -37,19 +37,19 @@ + QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD + + QMAKE_INCDIR = /usr/local/include + QMAKE_LIBDIR = /usr/local/lib +-QMAKE_INCDIR_X11 = /usr/X11R6/include +-QMAKE_LIBDIR_X11 = /usr/X11R6/lib ++QMAKE_INCDIR_X11 = @X11BASE@/include ++QMAKE_LIBDIR_X11 = @X11BASE@/lib + QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] + QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] +-QMAKE_INCDIR_OPENGL = /usr/X11R6/include +-QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib ++QMAKE_INCDIR_OPENGL = @X11BASE@/include ++QMAKE_LIBDIR_OPENGL = @X11BASE@/lib + + QMAKE_LINK = g++ + QMAKE_LINK_SHLIB = g++ + QMAKE_LINK_C = gcc + QMAKE_LINK_C_SHLIB = gcc + QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $$QMAKE_LFLAGS_SHLIB $(LFLAGS) $$QMAKE_LFLAGS -o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS) + QMAKE_LFLAGS = + QMAKE_LFLAGS_RELEASE = + QMAKE_LFLAGS_DEBUG = |