Various portability fixes. Fix library path for the final binaries. Bump

revision.
This commit is contained in:
joerg 2017-09-10 19:58:36 +00:00
parent 0eaca2bd7f
commit 60e5c33f16
26 changed files with 597 additions and 7 deletions

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.1 2017/06/23 07:12:19 manu Exp $ # $NetBSD: Makefile,v 1.2 2017/09/10 19:58:36 joerg Exp $
DISTNAME= wkhtmltox-0.12.4 DISTNAME= wkhtmltox-0.12.4
PKGNAME= wkhtmltopdf-0.12.4 PKGNAME= wkhtmltopdf-0.12.4
PKGREVISION= 1
MASTER_SITES= ${MASTER_SITE_GITHUB:=wkhtmltopdf/} MASTER_SITES= ${MASTER_SITE_GITHUB:=wkhtmltopdf/}
GITHUB_PROJECT= wkhtmltopdf GITHUB_PROJECT= wkhtmltopdf
GITHUB_RELEASE= ${PKGVERSION_NOREV} GITHUB_RELEASE= ${PKGVERSION_NOREV}
@ -13,10 +14,9 @@ HOMEPAGE= https://wkhtmltopdf.org/
COMMENT= Command line tools to render HTML into PDF COMMENT= Command line tools to render HTML into PDF
LICENSE= gnu-lgpl-v3 LICENSE= gnu-lgpl-v3
USE_LANGUAGES+= c c++ USE_LANGUAGES+= c c++ gnu++11
USE_TOOLS+= perl USE_TOOLS+= perl
#USE_LIBTOOL= yes #USE_LIBTOOL= yes
CHECK_SHLIBS_SUPPORTED= no # until libtool
SUBST_CLASSES+= x11 SUBST_CLASSES+= x11
SUBST_MESSAGE.x11= Fixing x11 options. SUBST_MESSAGE.x11= Fixing x11 options.
@ -32,7 +32,8 @@ do-configure:
done done
do-build: do-build:
cd ${WRKSRC} && ${PYTHONBIN} scripts/build.py posix-local -debug cd ${WRKSRC} && \
${PKGSRC_SETENV} ${MAKE_ENV} ${PYTHONBIN} scripts/build.py posix-local -debug
WKHTMLTOX_BUILD=${WRKSRC}/static-build/posix-local-dbg/${DISTNAME} WKHTMLTOX_BUILD=${WRKSRC}/static-build/posix-local-dbg/${DISTNAME}
WKHTMLTOX_BIN=${DESTDIR}${PREFIX}/bin WKHTMLTOX_BIN=${DESTDIR}${PREFIX}/bin
@ -55,9 +56,11 @@ do-install:
ln -sf libwkhtmltox.so.0.12.4 libwkhtmltox.so.0.1 && \ ln -sf libwkhtmltox.so.0.12.4 libwkhtmltox.so.0.1 && \
ln -sf libwkhtmltox.so.0.12.4 libwkhtmltox.so.0 ln -sf libwkhtmltox.so.0.12.4 libwkhtmltox.so.0
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../lang/python/application.mk" .include "../../lang/python/application.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../graphics/png/buildlink3.mk" .include "../../graphics/png/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk" .include "../../security/openssl/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk" .include "../../x11/libXext/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk" .include "../../x11/libXrender/buildlink3.mk"
.include "../../mk/bsd.pkg.mk" .include "../../mk/bsd.pkg.mk"

View file

@ -1,9 +1,33 @@
$NetBSD: distinfo,v 1.1 2017/06/23 07:12:19 manu Exp $ $NetBSD: distinfo,v 1.2 2017/09/10 19:58:36 joerg Exp $
SHA1 (wkhtmltox-0.12.4.tar.bz2) = 6a0ca9b01d5e37af3fb451bbd934afff43cf26ae SHA1 (wkhtmltox-0.12.4.tar.bz2) = 6a0ca9b01d5e37af3fb451bbd934afff43cf26ae
RMD160 (wkhtmltox-0.12.4.tar.bz2) = 665abd76618cdfac27585e62caa52b33d09990fa RMD160 (wkhtmltox-0.12.4.tar.bz2) = 665abd76618cdfac27585e62caa52b33d09990fa
SHA512 (wkhtmltox-0.12.4.tar.bz2) = 1526c6138d6276d0f6188737a67848b8ae9c16016c119eb00bbdaf7159464f8799c53ca9a997ea40eea4c2d1cadc35a10607564949fd39a3b7b7e6745a3dbdcb SHA512 (wkhtmltox-0.12.4.tar.bz2) = 1526c6138d6276d0f6188737a67848b8ae9c16016c119eb00bbdaf7159464f8799c53ca9a997ea40eea4c2d1cadc35a10607564949fd39a3b7b7e6745a3dbdcb
Size (wkhtmltox-0.12.4.tar.bz2) = 36355721 bytes Size (wkhtmltox-0.12.4.tar.bz2) = 36355721 bytes
SHA1 (patch-qt_config.tests_mac_dwarf2.test) = efabd53a31dc69feac1bc2767c801fab5514a447 SHA1 (patch-qt_config.tests_mac_dwarf2.test) = efabd53a31dc69feac1bc2767c801fab5514a447
SHA1 (patch-qt_config.tests_unix_freetype_freetype.pro) = 9db2892dd438581307b70ce73c62de721f91ab67
SHA1 (patch-qt_config.tests_unix_libjpeg_libjpeg.pro) = 5012c36257fb1f2cef7f086e93b885030406d7b9
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) = e13eb806e11a88a20650fc62d38d162145eaabae
SHA1 (patch-qt_mkspecs_netbsd-g++_qmake.conf) = 508b1f25735d3a8f29a1da08a988f608186751bf 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
SHA1 (patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_heap_MarkedSpace.h) = d2af081598a049e33fb7b61cecf6163ec1986166
SHA1 (patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_parser_JSParser.cpp) = 5cb93130dc74d039944700afbe0a78a3825cf0a4
SHA1 (patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_runtime_Identifier.cpp) = a82582dd815b63cb7e6c15d3adb40cf1f216fde4
SHA1 (patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_runtime_JSONObject.cpp) = e49fc03256fde8a615e984921874dda9b8f2f7a4
SHA1 (patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_runtime_StringPrototype.cpp) = e5041f4cb61d57cc71b83be761b8b5f9402e92c9
SHA1 (patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_wtf_Atomics.h) = 88580505164ab1b3961c70296a26f1dca4502728
SHA1 (patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_wtf_HashSet.h) = 979b874cf3d47fe9568b82f78eb1dd66b065513e
SHA1 (patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_wtf_ThreadSafeRefCounted.h) = 674e895fb9ae64376c2d88e62596db332cbf961a
SHA1 (patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_wtf_text_AtomicString.cpp) = 5ec061aab070a3ac4d6680ccfe2f9cfcb0fbdf9a
SHA1 (patch-qt_src_3rdparty_webkit_Source_WebCore_dom_DocumentMarkerController.cpp) = db09ecbfd0488fe13ff7dc9e785f420e00ba6162
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_plugins_platforms_xlib_xlib.pro) = 18516ea36e61c57d2acc3f5fa06890ab7a88fbe6
SHA1 (patch-src_image_image.pro) = d33d1676608ebe663bc7c0dd43a2b71b478da7a6
SHA1 (patch-src_lib_lib.pro) = a3b1958c2bc63b79a195325cb226de37eecc17a0
SHA1 (patch-src_pdf_pdf.pro) = e46a2a14aa3540b3128182f9938c5e64f9b39b8c

View file

@ -0,0 +1,11 @@
$NetBSD: patch-qt_config.tests_unix_freetype_freetype.pro,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/config.tests/unix/freetype/freetype.pro.orig 2017-09-10 11:24:46.252716190 +0000
+++ qt/config.tests/unix/freetype/freetype.pro
@@ -1,5 +1,5 @@
SOURCES = freetype.cpp
CONFIG += x11
CONFIG -= qt
-LIBS += -lfreetype
+LIBS += ${COMPILER_RPATH_FLAG}${X11PREFIX}/lib -lfreetype
include(freetype.pri)

View file

@ -0,0 +1,10 @@
$NetBSD: patch-qt_config.tests_unix_libjpeg_libjpeg.pro,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/config.tests/unix/libjpeg/libjpeg.pro.orig 2017-09-10 11:25:23.534649648 +0000
+++ qt/config.tests/unix/libjpeg/libjpeg.pro
@@ -1,4 +1,4 @@
SOURCES = libjpeg.cpp
CONFIG -= qt dylib
mac:CONFIG -= app_bundle
-LIBS += -ljpeg
+LIBS += ${COMPILER_RPATH_FLAG}${PREFIX}/lib -ljpeg

View file

@ -0,0 +1,10 @@
$NetBSD: patch-qt_config.tests_unix_libpng_libpng.pro,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/config.tests/unix/libpng/libpng.pro.orig 2017-09-10 11:25:06.276114904 +0000
+++ qt/config.tests/unix/libpng/libpng.pro
@@ -1,4 +1,4 @@
SOURCES = libpng.cpp
CONFIG -= qt dylib
mac:CONFIG -= app_bundle
-LIBS += -lpng
+LIBS += ${COMPILER_RPATH_FLAG}${PREFIX}/lib -lpng

View file

@ -0,0 +1,11 @@
$NetBSD: patch-qt_config.tests_x11_mitshm_mitshm.pro,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/config.tests/x11/mitshm/mitshm.pro.orig 2017-09-10 11:24:26.728648117 +0000
+++ qt/config.tests/x11/mitshm/mitshm.pro
@@ -1,5 +1,5 @@
SOURCES = mitshm.cpp
CONFIG += x11
CONFIG -= qt
-LIBS += -lXext
+LIBS += ${COMPILER_RPATH_FLAG}${X11PREFIX}/lib -lXext
hpux*:DEFINES+=Q_OS_HPUX

View file

@ -0,0 +1,10 @@
$NetBSD: patch-qt_config.tests_x11_xrender_xrender.pro,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/config.tests/x11/xrender/xrender.pro.orig 2017-09-10 11:25:41.279541527 +0000
+++ qt/config.tests/x11/xrender/xrender.pro
@@ -1,4 +1,4 @@
SOURCES = xrender.cpp
CONFIG += x11
CONFIG -= qt
-LIBS += -lXrender
+LIBS += ${COMPILER_RPATH_FLAG}${X11PREFIX}/lib -lXrender

View file

@ -0,0 +1,25 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_bytecompiler_BytecodeGenerator.cpp,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp.orig 2017-09-09 19:18:57.033156793 +0000
+++ qt/src/3rdparty/webkit/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
@@ -2058,9 +2058,9 @@ RegisterID* BytecodeGenerator::emitCatch
{
m_usesExceptions = true;
#if ENABLE(JIT)
- HandlerInfo info = { start->bind(0, 0), end->bind(0, 0), instructions().size(), m_dynamicScopeDepth + m_baseScopeDepth, CodeLocationLabel() };
+ HandlerInfo info = { (uint32_t)start->bind(0, 0), (uint32_t)end->bind(0, 0), (uint32_t)instructions().size(), (uint32_t)(m_dynamicScopeDepth + m_baseScopeDepth, CodeLocationLabel()) };
#else
- HandlerInfo info = { start->bind(0, 0), end->bind(0, 0), instructions().size(), m_dynamicScopeDepth + m_baseScopeDepth };
+ HandlerInfo info = { (uint32_t)start->bind(0, 0), (uint32_t)end->bind(0, 0), (uint32_t)instructions().size(), (uint32_t)(m_dynamicScopeDepth + m_baseScopeDepth) };
#endif
m_codeBlock->addExceptionHandler(info);
@@ -2107,7 +2107,7 @@ void BytecodeGenerator::emitPushNewScope
void BytecodeGenerator::beginSwitch(RegisterID* scrutineeRegister, SwitchInfo::SwitchType type)
{
- SwitchInfo info = { instructions().size(), type };
+ SwitchInfo info = { (uint32_t)instructions().size(), type };
switch (type) {
case SwitchInfo::SwitchImmediate:
emitOpcode(op_switch_imm);

View file

@ -0,0 +1,37 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_heap_MarkedSpace.cpp,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/JavaScriptCore/heap/MarkedSpace.cpp.orig 2016-08-23 06:13:30.000000000 +0000
+++ qt/src/3rdparty/webkit/Source/JavaScriptCore/heap/MarkedSpace.cpp
@@ -124,8 +124,8 @@ void MarkedSpace::sweep()
size_t MarkedSpace::objectCount() const
{
size_t result = 0;
- BlockIterator end = m_blocks.end();
- for (BlockIterator it = m_blocks.begin(); it != end; ++it)
+ ConstBlockIterator end = m_blocks.end();
+ for (ConstBlockIterator it = m_blocks.begin(); it != end; ++it)
result += (*it)->markCount();
return result;
}
@@ -133,8 +133,8 @@ size_t MarkedSpace::objectCount() const
size_t MarkedSpace::size() const
{
size_t result = 0;
- BlockIterator end = m_blocks.end();
- for (BlockIterator it = m_blocks.begin(); it != end; ++it)
+ ConstBlockIterator end = m_blocks.end();
+ for (ConstBlockIterator it = m_blocks.begin(); it != end; ++it)
result += (*it)->size();
return result;
}
@@ -142,8 +142,8 @@ size_t MarkedSpace::size() const
size_t MarkedSpace::capacity() const
{
size_t result = 0;
- BlockIterator end = m_blocks.end();
- for (BlockIterator it = m_blocks.begin(); it != end; ++it)
+ ConstBlockIterator end = m_blocks.end();
+ for (ConstBlockIterator it = m_blocks.begin(); it != end; ++it)
result += (*it)->capacity();
return result;
}

View file

@ -0,0 +1,12 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_heap_MarkedSpace.h,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/JavaScriptCore/heap/MarkedSpace.h.orig 2016-08-23 06:13:30.000000000 +0000
+++ qt/src/3rdparty/webkit/Source/JavaScriptCore/heap/MarkedSpace.h
@@ -92,6 +92,7 @@ namespace JSC {
static const size_t impreciseCount = impreciseCutoff / impreciseStep - 1;
typedef HashSet<MarkedBlock*>::iterator BlockIterator;
+ typedef HashSet<MarkedBlock*>::const_iterator ConstBlockIterator;
struct SizeClass {
SizeClass();

View file

@ -0,0 +1,15 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_parser_JSParser.cpp,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/JavaScriptCore/parser/JSParser.cpp.orig 2016-08-23 06:13:30.000000000 +0000
+++ qt/src/3rdparty/webkit/Source/JavaScriptCore/parser/JSParser.cpp
@@ -453,8 +453,8 @@ private:
void copyCapturedVariablesToVector(const IdentifierSet& capturedVariables, Vector<RefPtr<StringImpl> >& vector)
{
- IdentifierSet::iterator end = capturedVariables.end();
- for (IdentifierSet::iterator it = capturedVariables.begin(); it != end; ++it) {
+ IdentifierSet::const_iterator end = capturedVariables.end();
+ for (IdentifierSet::const_iterator it = capturedVariables.begin(); it != end; ++it) {
if (m_declaredVariables.contains(*it))
continue;
vector.append(*it);

View file

@ -0,0 +1,13 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_runtime_Identifier.cpp,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/JavaScriptCore/runtime/Identifier.cpp.orig 2017-09-09 19:16:30.554645837 +0000
+++ qt/src/3rdparty/webkit/Source/JavaScriptCore/runtime/Identifier.cpp
@@ -222,7 +222,7 @@ PassRefPtr<StringImpl> Identifier::add(J
}
if (!length)
return StringImpl::empty();
- UCharBuffer buf = {s, length};
+ UCharBuffer buf = {s, (unsigned)length};
pair<HashSet<StringImpl*>::iterator, bool> addResult = globalData->identifierTable->add<UCharBuffer, IdentifierUCharBufferTranslator>(buf);
// If the string is newly-translated, then we need to adopt it.

View file

@ -0,0 +1,13 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_runtime_JSONObject.cpp,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSONObject.cpp.orig 2017-09-09 19:17:09.419224855 +0000
+++ qt/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSONObject.cpp
@@ -335,7 +335,7 @@ void Stringifier::appendQuotedString(USt
default:
static const char hexDigits[] = "0123456789abcdef";
UChar ch = data[i];
- UChar hex[] = { '\\', 'u', hexDigits[(ch >> 12) & 0xF], hexDigits[(ch >> 8) & 0xF], hexDigits[(ch >> 4) & 0xF], hexDigits[ch & 0xF] };
+ UChar hex[] = { '\\', 'u', (UChar)hexDigits[(ch >> 12) & 0xF], (UChar)hexDigits[(ch >> 8) & 0xF], (UChar)hexDigits[(ch >> 4) & 0xF], (UChar)hexDigits[ch & 0xF] };
builder.append(hex, WTF_ARRAY_LENGTH(hex));
break;
}

View file

@ -0,0 +1,13 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_runtime_StringPrototype.cpp,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/JavaScriptCore/runtime/StringPrototype.cpp.orig 2017-09-09 19:28:11.632218057 +0000
+++ qt/src/3rdparty/webkit/Source/JavaScriptCore/runtime/StringPrototype.cpp
@@ -463,7 +463,7 @@ EncodedJSValue JSC_HOST_CALL stringProto
}
size_t matchEnd = matchPos + matchLen;
- int ovector[2] = { matchPos, matchEnd };
+ int ovector[2] = { (int)matchPos, (int)matchEnd };
return JSValue::encode(jsString(exec, source.substringSharingImpl(0, matchPos), substituteBackreferences(replacementString, source, ovector, 0), source.substringSharingImpl(matchEnd)));
}

View file

@ -0,0 +1,41 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_wtf_Atomics.h,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Atomics.h.orig 2016-08-23 06:13:30.000000000 +0000
+++ qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Atomics.h
@@ -69,6 +69,8 @@
#include <cutils/atomic.h>
#elif OS(QNX)
#include <atomic.h>
+#elif __cplusplus >= 201103L
+#include <atomic>
#elif COMPILER(GCC) && !OS(SYMBIAN)
#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
#include <ext/atomicity.h>
@@ -106,6 +108,11 @@ inline int atomicDecrement(int volatile*
inline int atomicIncrement(int volatile* addend) { return (int) atomic_add_value((unsigned int volatile*)addend, 1); }
inline int atomicDecrement(int volatile* addend) { return (int) atomic_sub_value((unsigned int volatile*)addend, 1); }
+#elif __cplusplus >= 201103L
+#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
+inline int atomicIncrement(std::atomic<int> * addend) { return *addend++; }
+inline int atomicDecrement(std::atomic<int> * addend) { return *addend--; }
+
#elif COMPILER(GCC) && !CPU(SPARC64) && !OS(SYMBIAN) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
@@ -114,9 +121,15 @@ inline int atomicDecrement(int volatile*
#endif
+#if !OS(DARWIN) && __cplusplus >= 201103L
+typedef std::atomic<int> atomic_int;
+#else
+typedef int volatile atomic_int;
+#endif
} // namespace WTF
#if USE(LOCKFREE_THREADSAFEREFCOUNTED)
+using WTF::atomic_int;
using WTF::atomicDecrement;
using WTF::atomicIncrement;
#endif

View file

@ -0,0 +1,104 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_wtf_HashSet.h,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h.orig 2016-08-23 06:13:30.000000000 +0000
+++ qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h
@@ -49,7 +49,7 @@ namespace WTF {
HashFunctions, ValueTraits, ValueTraits> HashTableType;
public:
- typedef HashTableConstIteratorAdapter<HashTableType, ValueType> iterator;
+ typedef HashTableIteratorAdapter<HashTableType, ValueType> iterator;
typedef HashTableConstIteratorAdapter<HashTableType, ValueType> const_iterator;
void swap(HashSet&);
@@ -58,10 +58,14 @@ namespace WTF {
int capacity() const;
bool isEmpty() const;
- iterator begin() const;
- iterator end() const;
+ iterator begin();
+ iterator end();
- iterator find(const ValueType&) const;
+ const_iterator begin() const;
+ const_iterator end() const;
+
+ iterator find(const ValueType&);
+ const_iterator find(const ValueType&) const;
bool contains(const ValueType&) const;
// An alternate version of find() that finds the object by hashing and comparing
@@ -69,7 +73,8 @@ namespace WTF {
// must have the following function members:
// static unsigned hash(const T&);
// static bool equal(const ValueType&, const T&);
- template<typename T, typename HashTranslator> iterator find(const T&) const;
+ template<typename T, typename HashTranslator> iterator find(const T&);
+ template<typename T, typename HashTranslator> const_iterator find(const T&) const;
template<typename T, typename HashTranslator> bool contains(const T&) const;
// The return value is a pair of an interator to the new value's location,
@@ -142,19 +147,37 @@ namespace WTF {
}
template<typename T, typename U, typename V>
- inline typename HashSet<T, U, V>::iterator HashSet<T, U, V>::begin() const
+ inline typename HashSet<T, U, V>::iterator HashSet<T, U, V>::begin()
{
return m_impl.begin();
}
template<typename T, typename U, typename V>
- inline typename HashSet<T, U, V>::iterator HashSet<T, U, V>::end() const
+ inline typename HashSet<T, U, V>::const_iterator HashSet<T, U, V>::begin() const
+ {
+ return m_impl.begin();
+ }
+
+ template<typename T, typename U, typename V>
+ inline typename HashSet<T, U, V>::iterator HashSet<T, U, V>::end()
{
return m_impl.end();
}
template<typename T, typename U, typename V>
- inline typename HashSet<T, U, V>::iterator HashSet<T, U, V>::find(const ValueType& value) const
+ inline typename HashSet<T, U, V>::const_iterator HashSet<T, U, V>::end() const
+ {
+ return m_impl.end();
+ }
+
+ template<typename T, typename U, typename V>
+ inline typename HashSet<T, U, V>::iterator HashSet<T, U, V>::find(const ValueType& value)
+ {
+ return m_impl.find(value);
+ }
+
+ template<typename T, typename U, typename V>
+ inline typename HashSet<T, U, V>::const_iterator HashSet<T, U, V>::find(const ValueType& value) const
{
return m_impl.find(value);
}
@@ -168,10 +191,21 @@ namespace WTF {
template<typename Value, typename HashFunctions, typename Traits>
template<typename T, typename HashTranslator>
typename HashSet<Value, HashFunctions, Traits>::iterator
+ inline HashSet<Value, HashFunctions, Traits>::find(const T& value)
+ {
+ typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter;
+ return m_impl.template find<T, Adapter>(value);
+
+ }
+
+ template<typename Value, typename HashFunctions, typename Traits>
+ template<typename T, typename HashTranslator>
+ typename HashSet<Value, HashFunctions, Traits>::const_iterator
inline HashSet<Value, HashFunctions, Traits>::find(const T& value) const
{
typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter;
return m_impl.template find<T, Adapter>(value);
+
}
template<typename Value, typename HashFunctions, typename Traits>

View file

@ -0,0 +1,22 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_wtf_ThreadSafeRefCounted.h,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/ThreadSafeRefCounted.h.orig 2016-08-23 06:13:30.000000000 +0000
+++ qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/ThreadSafeRefCounted.h
@@ -96,7 +96,7 @@ public:
#if !USE(LOCKFREE_THREADSAFEREFCOUNTED)
MutexLocker locker(m_mutex);
#endif
- return static_cast<int const volatile &>(m_refCount);
+ return m_refCount;
}
protected:
@@ -126,7 +126,7 @@ private:
template<class T>
friend class CrossThreadRefCounted;
- int m_refCount;
+ atomic_int m_refCount;
#if !USE(LOCKFREE_THREADSAFEREFCOUNTED)
mutable Mutex m_mutex;
#endif

View file

@ -0,0 +1,13 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_JavaScriptCore_wtf_text_AtomicString.cpp,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/AtomicString.cpp.orig 2017-09-09 19:11:52.085626521 +0000
+++ qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/AtomicString.cpp
@@ -294,7 +294,7 @@ PassRefPtr<StringImpl> AtomicString::add
if (!s)
return 0;
- int length = 0;
+ unsigned length = 0;
while (s[length] != UChar(0))
length++;

View file

@ -0,0 +1,13 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_WebCore_dom_DocumentMarkerController.cpp,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/WebCore/dom/DocumentMarkerController.cpp.orig 2017-09-09 19:31:56.627182081 +0000
+++ qt/src/3rdparty/webkit/Source/WebCore/dom/DocumentMarkerController.cpp
@@ -59,7 +59,7 @@ void DocumentMarkerController::addMarker
for (TextIterator markedText(range); !markedText.atEnd(); markedText.advance()) {
RefPtr<Range> textPiece = markedText.range();
int exception = 0;
- DocumentMarker marker = {type, textPiece->startOffset(exception), textPiece->endOffset(exception), description, false};
+ DocumentMarker marker = {type, (unsigned)textPiece->startOffset(exception), (unsigned)textPiece->endOffset(exception), description, false};
addMarker(textPiece->startContainer(exception), marker);
}
}

View file

@ -0,0 +1,13 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_WebCore_dom_Element.cpp,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/WebCore/dom/Element.cpp.orig 2016-08-23 06:13:30.000000000 +0000
+++ qt/src/3rdparty/webkit/Source/WebCore/dom/Element.cpp
@@ -1080,7 +1080,7 @@ void Element::recalcStyle(StyleChange ch
{
// Ref currentStyle in case it would otherwise be deleted when setRenderStyle() is called.
RefPtr<RenderStyle> currentStyle(renderStyle());
- bool hasParentStyle = parentNodeForRenderingAndStyle() ? parentNodeForRenderingAndStyle()->renderStyle() : false;
+ bool hasParentStyle = parentNodeForRenderingAndStyle() ? parentNodeForRenderingAndStyle()->renderStyle() != NULL : false;
bool hasDirectAdjacentRules = currentStyle && currentStyle->childrenAffectedByDirectAdjacentRules();
bool hasIndirectAdjacentRules = currentStyle && currentStyle->childrenAffectedByForwardPositionalRules();

View file

@ -0,0 +1,13 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_WebCore_html_HTMLImageElement.cpp,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp.orig 2016-08-23 06:13:30.000000000 +0000
+++ qt/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp
@@ -74,7 +74,7 @@ PassRefPtr<HTMLImageElement> HTMLImageEl
RefPtr<HTMLImageElement> image = adoptRef(new HTMLImageElement(imgTag, document));
if (optionalWidth)
image->setWidth(*optionalWidth);
- if (optionalHeight > 0)
+ if (optionalHeight)
image->setHeight(*optionalHeight);
return image.release();
}

View file

@ -0,0 +1,112 @@
$NetBSD: patch-qt_src_3rdparty_webkit_Source_WebCore_platform_DefaultLocalizationStrategy.cpp,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/3rdparty/webkit/Source/WebCore/platform/DefaultLocalizationStrategy.cpp.orig 2017-09-09 19:39:31.656799184 +0000
+++ qt/src/3rdparty/webkit/Source/WebCore/platform/DefaultLocalizationStrategy.cpp
@@ -48,12 +48,12 @@ namespace WebCore {
// 2) It doesn't handle the %2$d syntax.
// Note that because |format| is used as the second parameter to va_start, it cannot be a reference
// type according to section 18.7/3 of the C++ N1905 standard.
-static String formatLocalizedString(String format, ...)
+static String formatLocalizedString(String *format, ...)
{
#if USE(CF)
va_list arguments;
va_start(arguments, format);
- RetainPtr<CFStringRef> formatCFString(AdoptCF, format.createCFString());
+ RetainPtr<CFStringRef> formatCFString(AdoptCF, format->createCFString());
RetainPtr<CFStringRef> result(AdoptCF, CFStringCreateWithFormatAndArguments(0, 0, formatCFString.get(), arguments));
va_end(arguments);
return result.get();
@@ -61,12 +61,12 @@ static String formatLocalizedString(Stri
va_list arguments;
va_start(arguments, format);
QString result;
- result.vsprintf(format.latin1().data(), arguments);
+ result.vsprintf(format->latin1().data(), arguments);
va_end(arguments);
return result;
#else
notImplemented();
- return format;
+ return *format;
#endif
}
@@ -322,7 +322,8 @@ String DefaultLocalizationStrategy::cont
#else
#if USE(CF)
RetainPtr<CFStringRef> selectedCFString(AdoptCF, truncatedStringForLookupMenuItem(selectedString).createCFString());
- return formatLocalizedString(WEB_UI_STRING("Look Up “%@”", "Look Up context menu item with selected word"), selectedCFString.get());
+ String fmt(WEB_UI_STRING("Look Up “%@”", "Look Up context menu item with selected word"));
+ return formatLocalizedString(&fmt, selectedCFString.get());
#else
return WEB_UI_STRING("Look Up “<selection>”", "Look Up context menu item with selected word").replace("<selection>", truncatedStringForLookupMenuItem(selectedString));
#endif
@@ -683,7 +684,8 @@ String DefaultLocalizationStrategy::cras
String DefaultLocalizationStrategy::multipleFileUploadText(unsigned numberOfFiles)
{
- return formatLocalizedString(WEB_UI_STRING("%d files", "Label to describe the number of files selected in a file upload control that allows multiple files"), numberOfFiles);
+ String fmt(WEB_UI_STRING("%d files", "Label to describe the number of files selected in a file upload control that allows multiple files"));
+ return formatLocalizedString(&fmt, numberOfFiles);
}
String DefaultLocalizationStrategy::unknownFileSizeText()
@@ -727,7 +729,8 @@ String DefaultLocalizationStrategy::keyg
String DefaultLocalizationStrategy::keygenKeychainItemName(const String& host)
{
RetainPtr<CFStringRef> hostCFString(AdoptCF, host.createCFString());
- return formatLocalizedString(WEB_UI_STRING("Key from %@", "Name of keychain key generated by the KEYGEN tag"), hostCFString.get());
+ String fmt(WEB_UI_STRING("Key from %@", "Name of keychain key generated by the KEYGEN tag"));
+ return formatLocalizedString(fmt, hostCFString.get());
}
#endif
@@ -748,13 +751,16 @@ String DefaultLocalizationStrategy::imag
RetainPtr<CFNumberRef> height(AdoptCF, CFNumberCreate(0, kCFNumberIntType, &heightInt));
RetainPtr<CFStringRef> heightString(AdoptCF, CFNumberFormatterCreateStringWithNumber(0, formatter.get(), height.get()));
- return formatLocalizedString(WEB_UI_STRING("%@ %@×%@ pixels", "window title for a standalone image (uses multiplication symbol, not x)"), filenameCFString.get(), widthString.get(), heightString.get());
+ String fmt(WEB_UI_STRING("%@ %@×%@ pixels", "window title for a standalone image (uses multiplication symbol, not x)"));
+ return formatLocalizedString(&fmt, filenameCFString.get(), widthString.get(), heightString.get());
#else
RetainPtr<CFStringRef> filenameCFString(AdoptCF, filename.createCFString());
- return formatLocalizedString(WEB_UI_STRING("%@ %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), filenameCFString.get(), size.width(), size.height());
+ String fmt(WEB_UI_STRING("%@ %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"));
+ return formatLocalizedString(&fmt, filenameCFString.get(), size.width(), size.height());
#endif
#else
- return formatLocalizedString(WEB_UI_STRING("<filename> %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), size.width(), size.height()).replace("<filename>", filename);
+ String fmt(WEB_UI_STRING("<filename> %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"));
+ return formatLocalizedString(&fmt, size.width(), size.height()).replace("<filename>", filename);
#endif
}
@@ -869,13 +875,20 @@ String DefaultLocalizationStrategy::loca
int minutes = (seconds / 60) % 60;
seconds %= 60;
- if (days)
- return formatLocalizedString(WEB_UI_STRING("%1$d days %2$d hours %3$d minutes %4$d seconds", "accessibility help text for media controller time value >= 1 day"), days, hours, minutes, seconds);
- if (hours)
- return formatLocalizedString(WEB_UI_STRING("%1$d hours %2$d minutes %3$d seconds", "accessibility help text for media controller time value >= 60 minutes"), hours, minutes, seconds);
- if (minutes)
- return formatLocalizedString(WEB_UI_STRING("%1$d minutes %2$d seconds", "accessibility help text for media controller time value >= 60 seconds"), minutes, seconds);
- return formatLocalizedString(WEB_UI_STRING("%1$d seconds", "accessibility help text for media controller time value < 60 seconds"), seconds);
+ if (days) {
+ String fmt(WEB_UI_STRING("%1$d days %2$d hours %3$d minutes %4$d seconds", "accessibility help text for media controller time value >= 1 day"));
+ return formatLocalizedString(&fmt, days, hours, minutes, seconds);
+ }
+ if (hours) {
+ String fmt(WEB_UI_STRING("%1$d hours %2$d minutes %3$d seconds", "accessibility help text for media controller time value >= 60 minutes"));
+ return formatLocalizedString(&fmt, hours, minutes, seconds);
+ }
+ if (minutes) {
+ String fmt(WEB_UI_STRING("%1$d minutes %2$d seconds", "accessibility help text for media controller time value >= 60 seconds"));
+ return formatLocalizedString(&fmt, minutes, seconds);
+ }
+ String fmt(WEB_UI_STRING("%1$d seconds", "accessibility help text for media controller time value < 60 seconds"));
+ return formatLocalizedString(&fmt, seconds);
}
String DefaultLocalizationStrategy::validationMessageValueMissingText()

View file

@ -0,0 +1,13 @@
$NetBSD: patch-qt_src_plugins_platforms_xlib_xlib.pro,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- qt/src/plugins/platforms/xlib/xlib.pro.orig 2017-09-10 11:24:02.421497627 +0000
+++ qt/src/plugins/platforms/xlib/xlib.pro
@@ -30,7 +30,7 @@ HEADERS = \
qxlibdisplay.h \
qxlibnativeinterface.h
-LIBS += -lX11 -lXext
+LIBS += ${COMPILER_RPATH_FLAG}${X11PREFIX}/lib -lX11 -lXext
mac {
LIBS += -L/usr/X11/lib -lz -framework Carbon

View file

@ -0,0 +1,13 @@
$NetBSD: patch-src_image_image.pro,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- src/image/image.pro.orig 2017-09-10 15:04:52.049437840 +0000
+++ src/image/image.pro
@@ -15,6 +15,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with wkhtmltopdf. If not, see <http:#www.gnu.org/licenses/>.
+LIBS+= ${COMPILER_RPATH_FLAG}${X11PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib
+
include(../../common.pri)
TEMPLATE = app

View file

@ -0,0 +1,13 @@
$NetBSD: patch-src_lib_lib.pro,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- src/lib/lib.pro.orig 2017-09-10 12:16:27.317023665 +0000
+++ src/lib/lib.pro
@@ -18,6 +18,8 @@
TEMPLATE = lib
CONFIG += dll
+LIBS+= ${COMPILER_RPATH_FLAG}${X11PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib
+
include(../../common.pri)
include(lib.pri)

View file

@ -0,0 +1,13 @@
$NetBSD: patch-src_pdf_pdf.pro,v 1.1 2017/09/10 19:58:36 joerg Exp $
--- src/pdf/pdf.pro.orig 2017-09-10 12:26:34.883613832 +0000
+++ src/pdf/pdf.pro
@@ -23,6 +23,8 @@ DESTDIR = ../../bin
DEPENDPATH += . ../shared
INCLUDEPATH += . ../shared
+LIBS+= ${COMPILER_RPATH_FLAG}${X11PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib
+
unix {
man.path=$$INSTALLBASE/share/man/man1
man.extra=LD_LIBRARY_PATH=../../bin/ ../../bin/wkhtmltopdf --manpage | gzip > $(INSTALL_ROOT)$$INSTALLBASE/share/man/man1/wkhtmltopdf.1.gz