pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/converters/wkhtmltopdf Fix the build on NetBSD-9.0
details: https://anonhg.NetBSD.org/pkgsrc/rev/d46287a94183
branches: trunk
changeset: 428062:d46287a94183
user: manu <manu%pkgsrc.org@localhost>
date: Fri Apr 24 09:35:16 2020 +0000
description:
Fix the build on NetBSD-9.0
diffstat:
converters/wkhtmltopdf/Makefile | 7 +-
converters/wkhtmltopdf/distinfo | 17 +-
converters/wkhtmltopdf/patches/patch-qt_configure | 18 +-
converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslcertificate.cpp | 50 +
converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslcertificate_p.h | 13 +
converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslkey.cpp | 13 +
converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslkey_p.h | 13 +
converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslsocket_openssl.cpp | 37 +
converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslsocket_openssl_p.h | 13 +
converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslsocket_openssl_symbols.cpp | 300 ++++++++++
converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslsocket_openssl_symbols_p.h | 136 ++++
converters/wkhtmltopdf/patches/patch-qt_src_xmlpatterns_api_qcoloroutput_p.h | 15 +
converters/wkhtmltopdf/patches/patch-src_image_image.pro | 9 +-
converters/wkhtmltopdf/patches/patch-src_pdf_pdf.pro | 9 +-
14 files changed, 638 insertions(+), 12 deletions(-)
diffs (truncated from 761 to 300 lines):
diff -r ff6e53da73b7 -r d46287a94183 converters/wkhtmltopdf/Makefile
--- a/converters/wkhtmltopdf/Makefile Fri Apr 24 09:25:19 2020 +0000
+++ b/converters/wkhtmltopdf/Makefile Fri Apr 24 09:35:16 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.9 2020/01/18 21:48:55 jperkin Exp $
+# $NetBSD: Makefile,v 1.10 2020/04/24 09:35:16 manu Exp $
DISTNAME= wkhtmltox-0.12.4
PKGNAME= wkhtmltopdf-0.12.4
-PKGREVISION= 5
+PKGREVISION= 6
MASTER_SITES= ${MASTER_SITE_GITHUB:=wkhtmltopdf/}
GITHUB_PROJECT= wkhtmltopdf
GITHUB_RELEASE= ${PKGVERSION_NOREV}
@@ -16,9 +16,10 @@
USE_LANGUAGES+= c c++ gnu++98
USE_TOOLS+= perl
-#USE_LIBTOOL= yes
+PYTHON_VERSIONS_ACCEPTED= 27
BUILDLINK_TRANSFORM+= opt:-std=gnu++11:-std=gnu++98
+CXXFLAGS+= -std=gnu++98
SUBST_CLASSES+= x11
SUBST_MESSAGE.x11= Fixing x11 options.
diff -r ff6e53da73b7 -r d46287a94183 converters/wkhtmltopdf/distinfo
--- a/converters/wkhtmltopdf/distinfo Fri Apr 24 09:25:19 2020 +0000
+++ b/converters/wkhtmltopdf/distinfo Fri Apr 24 09:35:16 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2017/09/10 19:58:36 joerg Exp $
+$NetBSD: distinfo,v 1.3 2020/04/24 09:35:16 manu Exp $
SHA1 (wkhtmltox-0.12.4.tar.bz2) = 6a0ca9b01d5e37af3fb451bbd934afff43cf26ae
RMD160 (wkhtmltox-0.12.4.tar.bz2) = 665abd76618cdfac27585e62caa52b33d09990fa
@@ -10,7 +10,7 @@
SHA1 (patch-qt_config.tests_unix_libpng_libpng.pro) = be0dead445dbbfeef9bc2a816ef5efd85aba0411
SHA1 (patch-qt_config.tests_x11_mitshm_mitshm.pro) = 5a411a67f6a99f87a9f22698a2a6e1e01b1a38e7
SHA1 (patch-qt_config.tests_x11_xrender_xrender.pro) = a1120252f1f6b289caafa3835e2f2d42be69446c
-SHA1 (patch-qt_configure) = e13eb806e11a88a20650fc62d38d162145eaabae
+SHA1 (patch-qt_configure) = 823e039d8fc8da6d2518301413dcf8195021c3e2
SHA1 (patch-qt_mkspecs_netbsd-g++_qmake.conf) = 508b1f25735d3a8f29a1da08a988f608186751bf
SHA1 (patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_bytecompiler_BytecodeGenerator.cpp) = b8ef0623e9cd666d708295c006b5e72693ac715e
SHA1 (patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_heap_MarkedSpace.cpp) = 79ad51f005e68156d2e339d0d925fc79ab79f059
@@ -27,7 +27,16 @@
SHA1 (patch-qt_src_3rdparty_webkit_Source_WebCore_dom_Element.cpp) = 776c988688af27ebbcd43a75b40515a13b48b9d5
SHA1 (patch-qt_src_3rdparty_webkit_Source_WebCore_html_HTMLImageElement.cpp) = 1dfde3ad2e0d30026e0cd2c62f5f959aeace394c
SHA1 (patch-qt_src_3rdparty_webkit_Source_WebCore_platform_DefaultLocalizationStrategy.cpp) = d510329e032f0e7362802ea23b19528d5ecdcc81
+SHA1 (patch-qt_src_network_ssl_qsslcertificate.cpp) = c6caf40e63c6bb10444361f52401d55f397e85a4
+SHA1 (patch-qt_src_network_ssl_qsslcertificate_p.h) = 6ab163f9bae77176b38aa2bc2ea0ba1897751eb7
+SHA1 (patch-qt_src_network_ssl_qsslkey.cpp) = faff8d9970bed9a141e6eb7c341efa9ba8ed7c37
+SHA1 (patch-qt_src_network_ssl_qsslkey_p.h) = af3c29385073a24f4dae133c14d90d29a3205a79
+SHA1 (patch-qt_src_network_ssl_qsslsocket_openssl.cpp) = c6f20bfa60f5bdd53dc7764c053d51d69c8edbe8
+SHA1 (patch-qt_src_network_ssl_qsslsocket_openssl_p.h) = 3c26fd2196297dc5b6ae4f67232b2d5538dc25af
+SHA1 (patch-qt_src_network_ssl_qsslsocket_openssl_symbols.cpp) = a1f73de1bb07d9e87296a1d52e5a8e3133c3b8da
+SHA1 (patch-qt_src_network_ssl_qsslsocket_openssl_symbols_p.h) = fb7c20333199a00cc233a4a7ccbc29894eb806c1
SHA1 (patch-qt_src_plugins_platforms_xlib_xlib.pro) = 18516ea36e61c57d2acc3f5fa06890ab7a88fbe6
-SHA1 (patch-src_image_image.pro) = d33d1676608ebe663bc7c0dd43a2b71b478da7a6
+SHA1 (patch-qt_src_xmlpatterns_api_qcoloroutput_p.h) = d196f51a8168d335a00d3663418cab27f6076ca9
+SHA1 (patch-src_image_image.pro) = 1684d98030a1f163a905f8216629f09f453771eb
SHA1 (patch-src_lib_lib.pro) = a3b1958c2bc63b79a195325cb226de37eecc17a0
-SHA1 (patch-src_pdf_pdf.pro) = e46a2a14aa3540b3128182f9938c5e64f9b39b8c
+SHA1 (patch-src_pdf_pdf.pro) = 54d60872137de6b7d6188a2ca1260bccd170c3a9
diff -r ff6e53da73b7 -r d46287a94183 converters/wkhtmltopdf/patches/patch-qt_configure
--- a/converters/wkhtmltopdf/patches/patch-qt_configure Fri Apr 24 09:25:19 2020 +0000
+++ b/converters/wkhtmltopdf/patches/patch-qt_configure Fri Apr 24 09:35:16 2020 +0000
@@ -1,9 +1,10 @@
-$NetBSD: patch-qt_configure,v 1.1 2017/06/23 07:12:19 manu Exp $
+$NetBSD: patch-qt_configure,v 1.2 2020/04/24 09:35:17 manu Exp $
Fix == operator in shell script
+Allow building with recent GCC
---- qt/configure.orig 2017-06-20 10:22:29.000000000 +0200
-+++ qt/configure 2017-06-20 10:23:03.000000000 +0200
+--- qt/configure.orig 2016-08-23 06:13:28.000000000 +0000
++++ qt/configure 2020-04-20 09:06:51.824967933 +0000
@@ -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
@@ -35,3 +36,14 @@
CFG_MAC_COCOA="no";
CFG_MAC_CARBON="yes";
fi
+@@ -7733,9 +7733,9 @@
+ ;;
+ *-g++*)
+ # Check gcc's version
+ case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
+- 5*|4*|3.4*)
++ 9*|8*|7*|6*|5*|4*|3.4*)
+ ;;
+ 3.3*)
+ canBuildWebKit="no"
+ ;;
diff -r ff6e53da73b7 -r d46287a94183 converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslcertificate.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslcertificate.cpp Fri Apr 24 09:35:16 2020 +0000
@@ -0,0 +1,50 @@
+--- qt/src/network/ssl/qsslcertificate.cpp.orig 2016-08-23 08:13:31.000000000 +0200
++++ qt/src/network/ssl/qsslcertificate.cpp 2020-04-23 17:34:53.378239752 +0200
+@@ -260,9 +260,9 @@
+ {
+ QMutexLocker lock(QMutexPool::globalInstanceGet(d.data()));
+ if (d->versionString.isEmpty() && d->x509)
+ d->versionString =
+- QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->version)) + 1);
++ QByteArray::number(qlonglong(X509_get_version(d->x509)) + 1);
+
+ return d->versionString;
+ }
+
+@@ -275,9 +275,9 @@
+ QByteArray QSslCertificate::serialNumber() const
+ {
+ QMutexLocker lock(QMutexPool::globalInstanceGet(d.data()));
+ if (d->serialNumberString.isEmpty() && d->x509) {
+- ASN1_INTEGER *serialNumber = d->x509->cert_info->serialNumber;
++ ASN1_INTEGER *serialNumber = X509_get_serialNumber(d->x509);
+ // if we cannot convert to a long, just output the hexadecimal number
+ if (serialNumber->length > 4) {
+ QByteArray hexString;
+ hexString.reserve(serialNumber->length * 3);
+@@ -488,21 +488,21 @@
+
+ QSslKey key;
+
+ key.d->type = QSsl::PublicKey;
+- X509_PUBKEY *xkey = d->x509->cert_info->key;
++ X509_PUBKEY *xkey = X509_get_X509_PUBKEY(d->x509);
+ EVP_PKEY *pkey = q_X509_PUBKEY_get(xkey);
+ Q_ASSERT(pkey);
+
+- if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_RSA) {
++ if (q_EVP_PKEY_type(EVP_PKEY_id(pkey)) == EVP_PKEY_RSA) {
+ key.d->rsa = q_EVP_PKEY_get1_RSA(pkey);
+ key.d->algorithm = QSsl::Rsa;
+ key.d->isNull = false;
+- } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA) {
++ } else if (q_EVP_PKEY_type(EVP_PKEY_id(pkey)) == EVP_PKEY_DSA) {
+ key.d->dsa = q_EVP_PKEY_get1_DSA(pkey);
+ key.d->algorithm = QSsl::Dsa;
+ key.d->isNull = false;
+- } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DH) {
++ } else if (q_EVP_PKEY_type(EVP_PKEY_id(pkey)) == EVP_PKEY_DH) {
+ // DH unsupported
+ } else {
+ // error?
+ }
diff -r ff6e53da73b7 -r d46287a94183 converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslcertificate_p.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslcertificate_p.h Fri Apr 24 09:35:16 2020 +0000
@@ -0,0 +1,13 @@
+--- qt/src/network/ssl/qsslcertificate_p.h.orig 2016-08-23 08:13:31.000000000 +0200
++++ qt/src/network/ssl/qsslcertificate_p.h 2020-04-23 17:34:53.413950571 +0200
+@@ -42,8 +42,10 @@
+
+ #ifndef QSSLCERTIFICATE_P_H
+ #define QSSLCERTIFICATE_P_H
+
++#define OPENSSL_API_COMPAT 0x10000000L
++
+ #include "qsslcertificate.h"
+
+ //
+ // W A R N I N G
diff -r ff6e53da73b7 -r d46287a94183 converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslkey.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslkey.cpp Fri Apr 24 09:35:16 2020 +0000
@@ -0,0 +1,13 @@
+--- qt/src/network/ssl/qsslkey.cpp.orig 2016-08-23 08:13:31.000000000 +0200
++++ qt/src/network/ssl/qsslkey.cpp 2020-04-23 17:34:53.449790782 +0200
+@@ -321,9 +321,9 @@
+ {
+ if (d->isNull)
+ return -1;
+ return (d->algorithm == QSsl::Rsa)
+- ? q_BN_num_bits(d->rsa->n) : q_BN_num_bits(d->dsa->p);
++ ? BN_num_bits(RSA_get0_n(d->rsa)) : BN_num_bits(DSA_get0_p(d->dsa));
+ }
+
+ /*!
+ Returns the type of the key (i.e., PublicKey or PrivateKey).
diff -r ff6e53da73b7 -r d46287a94183 converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslkey_p.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslkey_p.h Fri Apr 24 09:35:16 2020 +0000
@@ -0,0 +1,13 @@
+--- qt/src/network/ssl/qsslkey_p.h.orig 2016-08-23 08:13:31.000000000 +0200
++++ qt/src/network/ssl/qsslkey_p.h 2020-04-23 17:34:53.485308089 +0200
+@@ -42,8 +42,10 @@
+
+ #ifndef QSSLKEY_P_H
+ #define QSSLKEY_P_H
+
++#define OPENSSL_API_COMPAT 0x10000000L
++
+ #include "qsslkey.h"
+
+ //
+ // W A R N I N G
diff -r ff6e53da73b7 -r d46287a94183 converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslsocket_openssl.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslsocket_openssl.cpp Fri Apr 24 09:35:16 2020 +0000
@@ -0,0 +1,37 @@
+--- qt/src/network/ssl/qsslsocket_openssl.cpp.orig 2016-08-23 08:13:31.000000000 +0200
++++ qt/src/network/ssl/qsslsocket_openssl.cpp 2020-04-23 17:34:53.522272791 +0200
+@@ -221,10 +221,10 @@
+ if (descriptionList.at(4).startsWith(QLatin1String("Enc=")))
+ ciph.d->encryptionMethod = descriptionList.at(4).mid(4);
+ ciph.d->exportable = (descriptionList.size() > 6 && descriptionList.at(6) == QLatin1String("export"));
+
+- ciph.d->bits = cipher->strength_bits;
+- ciph.d->supportedBits = cipher->alg_bits;
++ ciph.d->bits = SSL_CIPHER_get_bits(cipher, NULL);
++ ciph.d->supportedBits = SSL_CIPHER_get_bits(cipher, NULL);
+
+ }
+ return ciph;
+ }
+@@ -362,9 +362,9 @@
+ // certificates mixed with valid ones.
+ //
+ // See also: QSslContext::fromConfiguration()
+ if (caCertificate.expiryDate() >= QDateTime::currentDateTime()) {
+- q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle());
++ q_X509_STORE_add_cert(SSL_CTX_get_cert_store(ctx), (X509 *)caCertificate.handle());
+ }
+ }
+
+ if (s_loadRootCertsOnDemand && allowRootCertOnDemandLoading) {
+@@ -658,9 +658,9 @@
+
+ STACK_OF(SSL_CIPHER) *supportedCiphers = q_SSL_get_ciphers(mySsl);
+ for (int i = 0; i < q_sk_SSL_CIPHER_num(supportedCiphers); ++i) {
+ if (SSL_CIPHER *cipher = q_sk_SSL_CIPHER_value(supportedCiphers, i)) {
+- if (cipher->valid) {
++ if (1 /* cipher->valid */) {
+ QSslCipher ciph = QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher);
+ if (!ciph.isNull()) {
+ if (!ciph.name().toLower().startsWith(QLatin1String("adh")))
+ ciphers << ciph;
diff -r ff6e53da73b7 -r d46287a94183 converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslsocket_openssl_p.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslsocket_openssl_p.h Fri Apr 24 09:35:16 2020 +0000
@@ -0,0 +1,13 @@
+--- qt/src/network/ssl/qsslsocket_openssl_p.h.orig 2016-08-23 08:13:31.000000000 +0200
++++ qt/src/network/ssl/qsslsocket_openssl_p.h 2020-04-23 17:34:53.558228832 +0200
+@@ -53,8 +53,10 @@
+ //
+ // We mean it.
+ //
+
++#define OPENSSL_API_COMPAT 0x10000000L
++
+ #include "qsslsocket_p.h"
+
+ #ifdef Q_OS_WIN
+ #include <qt_windows.h>
diff -r ff6e53da73b7 -r d46287a94183 converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslsocket_openssl_symbols.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/converters/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslsocket_openssl_symbols.cpp Fri Apr 24 09:35:16 2020 +0000
@@ -0,0 +1,300 @@
+--- qt/src/network/ssl/qsslsocket_openssl_symbols.cpp.orig 2016-08-23 08:13:31.000000000 +0200
++++ qt/src/network/ssl/qsslsocket_openssl_symbols.cpp 2020-04-24 02:04:11.900228983 +0200
+@@ -116,11 +116,13 @@
+ DEFINEFUNC3(int, BIO_read, BIO *a, a, void *b, b, int c, c, return -1, return)
+ DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
+ DEFINEFUNC3(int, BIO_write, BIO *a, a, const void *b, b, int c, c, return -1, return)
+ DEFINEFUNC(int, BN_num_bits, const BIGNUM *a, a, return 0, return)
++#if OPENSSL_VERSION_NUMBER < 0x10101000L
+ DEFINEFUNC(int, CRYPTO_num_locks, DUMMYARG, DUMMYARG, return 0, return)
+ DEFINEFUNC(void, CRYPTO_set_locking_callback, void (*a)(int, int, const char *, int), a, return, DUMMYARG)
+ DEFINEFUNC(void, CRYPTO_set_id_callback, unsigned long (*a)(), a, return, DUMMYARG)
++#endif
+ DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
+ DEFINEFUNC(void, DSA_free, DSA *a, a, return, DUMMYARG)
+ #if OPENSSL_VERSION_NUMBER < 0x00908000L
+ DEFINEFUNC3(X509 *, d2i_X509, X509 **a, a, unsigned char **b, b, long c, c, return 0, return)
+@@ -156,14 +158,21 @@
+ DEFINEFUNC2(int, PEM_write_bio_RSA_PUBKEY, BIO *a, a, RSA *b, b, return 0, return)
+ DEFINEFUNC2(void, RAND_seed, const void *a, a, int b, b, return, DUMMYARG)
+ DEFINEFUNC(int, RAND_status, void, DUMMYARG, return -1, return)
+ DEFINEFUNC(void, RSA_free, RSA *a, a, return, DUMMYARG)
++#if OPENSSL_VERSION_NUMBER >= 0x10101000L
++DEFINEFUNC(int, OPENSSL_sk_num, STACK *a, a, return -1, return)
++DEFINEFUNC2(void, OPENSSL_sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
++DEFINEFUNC(void, OPENSSL_sk_free, _STACK *a, a, return, DUMMYARG)
++DEFINEFUNC2(void *, OPENSSL_sk_value, STACK *a, a, int b, b, return 0, return)
++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L
+ DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
+ DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
+-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG)
+ DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return 0, return)
+ #else
++DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
++DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
+ DEFINEFUNC(void, sk_free, STACK *a, a, return, DUMMYARG)
+ DEFINEFUNC2(char *, sk_value, STACK *a, a, int b, b, return 0, return)
+ #endif
Home |
Main Index |
Thread Index |
Old Index