Date: Sunday, December 6, 2020 @ 22:32:47 Author: jelle Revision: 771296
FS#68081 Fix build with Qt 5.15 Fix build with Qt 5.15 and Boost and add FULL RELRO. Added: swift/trunk/swift-4.0.2-boost-1.69-compatibility.patch swift/trunk/swift-4.0.2-qt-5.11-compatibility.patch swift/trunk/swift-4.0.2-qt-5.15-compatibility.patch Modified: swift/trunk/PKGBUILD --------------------------------------------+ PKGBUILD | 20 ++++--- swift-4.0.2-boost-1.69-compatibility.patch | 77 +++++++++++++++++++++++++++ swift-4.0.2-qt-5.11-compatibility.patch | 35 ++++++++++++ swift-4.0.2-qt-5.15-compatibility.patch | 10 +++ 4 files changed, 135 insertions(+), 7 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2020-12-06 22:31:17 UTC (rev 771295) +++ PKGBUILD 2020-12-06 22:32:47 UTC (rev 771296) @@ -13,21 +13,27 @@ makedepends=('python2' 'openssl' 'boost' 'qt5-base' 'qt5-multimedia' 'qt5-webkit' 'qt5-x11extras' 'qt5-tools' 'qt5-svg') source=("http://swift.im/downloads/releases/$pkgbase-$pkgver/$pkgbase-$pkgver.tar.gz" - "build-fix.patch") + 'swift-4.0.2-boost-1.69-compatibility.patch' + 'swift-4.0.2-qt-5.11-compatibility.patch' + 'swift-4.0.2-qt-5.15-compatibility.patch') sha256sums=('1c7c9fb981ecb9b589890c36523dbbabde2f0a708f71a66eb71e9526bf8e0a70' - 'f1b710245c5630aea585378875b334aa05dea7cb85a80f156e8494d1d5ad9a47') + 'd166362c146f859ec89c535f8676ac12c6e51e281e6c88c5e36b25e4ea5655d1' + '7970844d39c38ff6d36c2d1e26c145495ff8f5a5a31a399467eca66854dc3e67' + '18feef21870b0f441a6fb0faf7b35a826cfec4fe4a1d717bbb1c373a8c1ccb95') # Those options need to be consistent between each scons invocation. -_scons_options='max_jobs=1 optimize=1 debug=0 swiften_dll=1' +_scons_options=(max_jobs=1 optimize=1 debug=0 swiften_dll=1 cflags="${CPPFLAGS} ${CFLAGS}" cxxflags="${CPPFLAGS} ${CFLAGS}" linkflags="${LDFLAGS}") prepare() { cd $pkgbase-$pkgver - patch -p1 <"$srcdir"/build-fix.patch + patch -p1 -i ../swift-4.0.2-boost-1.69-compatibility.patch + patch -p1 -i ../swift-4.0.2-qt-5.11-compatibility.patch + patch -p1 -i ../swift-4.0.2-qt-5.15-compatibility.patch } build() { cd $pkgbase-$pkgver - ./scons $_scons_options Swift Swiften + ./scons "${_scons_options[@]}" Swift Swiften } package_swift-im() { @@ -36,7 +42,7 @@ 'qt5-x11extras' 'qt5-svg' 'libxss' 'hicolor-icon-theme') cd $pkgbase-$pkgver - ./scons $_scons_options SWIFT_INSTALLDIR="$pkgdir"/usr/ "$pkgdir"/usr/ + ./scons "${_scons_options[@]}" SWIFT_INSTALLDIR="$pkgdir"/usr/ "$pkgdir"/usr/ } package_swiften() { @@ -44,5 +50,5 @@ depends=('boost-libs' 'libxml2' 'libidn' 'avahi' 'openssl') cd $pkgbase-$pkgver - ./scons $_scons_options SWIFTEN_INSTALLDIR="$pkgdir"/usr/ "$pkgdir"/usr/ + ./scons "${_scons_options[@]}" SWIFTEN_INSTALLDIR="$pkgdir"/usr/ "$pkgdir"/usr/ } Added: swift-4.0.2-boost-1.69-compatibility.patch =================================================================== --- swift-4.0.2-boost-1.69-compatibility.patch (rev 0) +++ swift-4.0.2-boost-1.69-compatibility.patch 2020-12-06 22:32:47 UTC (rev 771296) @@ -0,0 +1,77 @@ +From a21993d750396d755717df21e331df87af8a0c6a Mon Sep 17 00:00:00 2001 +From: Bruce Stephens <bruce.steph...@isode.com> +Date: Wed, 9 Jan 2019 16:21:20 +0000 +Subject: [PATCH] Don't assume that tribool has an implicit bool conversion + +In boost 1.68.0 the conversion is implicit, but in 1.69.0 it's +explicit and we must explicitly call it. + +Change-Id: I24eb78be7510c89b88342d28c539cad4977f99fd +--- + Swiften/Network/PlatformNATTraversalWorker.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Swiften/Network/PlatformNATTraversalWorker.cpp b/Swiften/Network/PlatformNATTraversalWorker.cpp +index f56de0b78b..eaa13b30d3 100644 +--- a/Swiften/Network/PlatformNATTraversalWorker.cpp ++++ b/Swiften/Network/PlatformNATTraversalWorker.cpp +@@ -157,7 +157,7 @@ NATTraversalInterface* PlatformNATTraversalWorker::getNATTraversalInterface() co + miniUPnPInterface = new MiniUPnPInterface(); + miniUPnPSupported = miniUPnPInterface->isAvailable(); + } +- SWIFT_LOG(debug) << "UPnP NAT traversal supported: " << miniUPnPSupported << std::endl; ++ SWIFT_LOG(debug) << "UPnP NAT traversal supported: " << static_cast<bool>(miniUPnPSupported) << std::endl; + if (miniUPnPSupported) { + return miniUPnPInterface; + } +@@ -168,7 +168,7 @@ NATTraversalInterface* PlatformNATTraversalWorker::getNATTraversalInterface() co + natPMPInterface = new NATPMPInterface(); + natPMPSupported = natPMPInterface->isAvailable(); + } +- SWIFT_LOG(debug) << "NAT-PMP NAT traversal supported: " << natPMPSupported << std::endl; ++ SWIFT_LOG(debug) << "NAT-PMP NAT traversal supported: " << static_cast<bool>(natPMPSupported) << std::endl; + if (natPMPSupported) { + return natPMPInterface; + } +From bb3bd8a32b220b9c1ffd566da00bcd0ba546156c Mon Sep 17 00:00:00 2001 +From: Miroslaw Stein <miroslaw.st...@isode.com> +Date: Fri, 18 Jan 2019 14:30:24 +0000 +Subject: [PATCH] Avoid deprecated boost endianess include + +As of Boost 1.69.0, boost/detail/endian.h is deprecated in favour of +boost/predef/other/endian.h, and BOOST_(LITTLE|BIG)_ENDIAN by +BOOST_ENDIAN_(LITTLE|BIG)_BYTE. + +Test-Information: + +Unit tests pass on Debian 9 + +Change-Id: If7076c559a4e35219ff97603f50b80cfbe05b29b +--- + Swiften/Base/Platform.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Swiften/Base/Platform.h b/Swiften/Base/Platform.h +index 4deba2bdda..22dff30b14 100644 +--- a/Swiften/Base/Platform.h ++++ b/Swiften/Base/Platform.h +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2010 Isode Limited. ++ * Copyright (c) 2010-2019 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ +@@ -43,9 +43,9 @@ + #endif + + // Endianness +-#include <boost/detail/endian.hpp> +-#if defined(BOOST_LITTLE_ENDIAN) ++#include <boost/predef/other/endian.h> ++#if defined(BOOST_ENDIAN_LITTLE_BYTE) + #define SWIFTEN_LITTLE_ENDIAN +-#elif defined(BOOST_BIG_ENDIAN) ++#elif defined(BOOST_ENDIAN_BIG_BYTE) + #define SWIFTEN_BIG_ENDIAN + #endif Added: swift-4.0.2-qt-5.11-compatibility.patch =================================================================== --- swift-4.0.2-qt-5.11-compatibility.patch (rev 0) +++ swift-4.0.2-qt-5.11-compatibility.patch 2020-12-06 22:32:47 UTC (rev 771296) @@ -0,0 +1,35 @@ +From 1d18148c86377787a8c77042b12ea66f20cb2ca9 Mon Sep 17 00:00:00 2001 +From: Tobias Markmann <t...@ayena.de> +Date: Thu, 21 Jun 2018 13:04:56 +0200 +Subject: Add missing include for QAbstractItemModel + +This fixes building Swift with Qt 5.11. + +Test-Information: + +Builds and tests pass on macOS 10.13.5 with Qt 5.11.0. + +Change-Id: I1be2cd081d8a520ec38ab7cca5ada0d7fc39b777 + +diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.h b/Swift/QtUI/UserSearch/QtUserSearchWindow.h +index 0714ac1..fe536ab 100644 +--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.h ++++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.h +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2010-2016 Isode Limited. ++ * Copyright (c) 2010-2018 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ +@@ -8,6 +8,7 @@ + + #include <set> + ++#include <QAbstractItemModel> + #include <QWizard> + + #include <Swiften/Base/Override.h> +-- +cgit v0.10.2-6-g49f6 + Added: swift-4.0.2-qt-5.15-compatibility.patch =================================================================== --- swift-4.0.2-qt-5.15-compatibility.patch (rev 0) +++ swift-4.0.2-qt-5.15-compatibility.patch 2020-12-06 22:32:47 UTC (rev 771296) @@ -0,0 +1,10 @@ +--- a/Swift/QtUI/Roster/GroupItemDelegate.cpp ++++ b/Swift/QtUI/Roster/GroupItemDelegate.cpp +@@ -7,6 +7,7 @@ + #include <Swift/QtUI/Roster/GroupItemDelegate.h> + + #include <QPainter> ++#include <QPainterPath> + #include <QPen> + #include <QtDebug> +