From e42c02d2d2084519ee604a4952e9720d080772fe Mon Sep 17 00:00:00 2001 From: bill-auger Date: Wed, 21 Apr 2021 12:49:57 -0400 Subject: [quassel]: rebuild against latest icu --- libre/quassel/PKGBUILD | 33 +++++++-- libre/quassel/quassel-0.13.1-qt5.14.patch | 118 ++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+), 7 deletions(-) create mode 100644 libre/quassel/quassel-0.13.1-qt5.14.patch diff --git a/libre/quassel/PKGBUILD b/libre/quassel/PKGBUILD index abd0d2d3c..3802c9964 100644 --- a/libre/quassel/PKGBUILD +++ b/libre/quassel/PKGBUILD @@ -2,6 +2,9 @@ # Contributor: Vesa Kaihlavirta # Maintainer: bill-auger +# parabola changes and rationale: +# - repalce qt5-webengine with qt5-webkit (for URL previews) + pkgbase=quassel pkgname=('quassel-core' @@ -9,18 +12,20 @@ pkgname=('quassel-core' 'quassel-client-small' 'quassel-monolithic') pkgver=0.13.1 -pkgrel=2 +pkgrel=4 pkgrel+=.parabola1 pkgdesc="Next-generation distributed IRC client" arch=('x86_64') arch+=('armv7h' 'i686') url="https://quassel-irc.org/" license=('GPL') -makedepends=('qt5-base' 'qt5-tools' 'qt5-webkit' 'qca-qt5' 'qt5-script' +makedepends=('qt5-base' 'qt5-tools' 'qt5-webengine' 'qca-qt5' 'qt5-script' 'qt5-multimedia' 'knotifyconfig' 'sonnet' 'libldap' 'cmake' 'extra-cmake-modules' 'python' 'hicolor-icon-theme') +makedepends=(${makedepends[*]/qt5-webengine/qt5-webkit}) source=(https://quassel-irc.org/pub/$pkgbase-$pkgver.tar.bz2 0001-qtui-Set-desktop-file-name.patch + quassel-0.13.1-qt5.14.patch search-duck.patch $pkgbase.service $pkgbase.sysusers @@ -28,6 +33,7 @@ source=(https://quassel-irc.org/pub/$pkgbase-$pkgver.tar.bz2 $pkgbase.conf) sha256sums=('48efee9778743b1db9f44efb91d1c913104db01190c57f2ff57483c39a97e855' '695ff3b605ea62ccfdf9ec4b9e6ffa74f3e2c0ac81402d51a74d263c47886c92' + '3d43f498df04db59a5199e0a81b8fd7ac37ef46fffb0c69ab5a17bcafb6d8c65' '3d90a7edfa2b2e27e5f56b25f7583585efbcd35219c04a3bf138d9fe9bb9eab2' '5dbe20290f3361b9b7a74a52905137e76b656976febf2d31082a2276f9dcde7f' '3c72441a99e2668c6a8a751fa07beeb44f937576c8a1b5f615e4a55f841d93d9' @@ -37,6 +43,7 @@ sha256sums=('48efee9778743b1db9f44efb91d1c913104db01190c57f2ff57483c39a97e855' prepare() { cd $pkgbase-$pkgver patch -Np1 -i ../0001-qtui-Set-desktop-file-name.patch + patch -Np1 -i ../quassel-0.13.1-qt5.14.patch patch -Np1 -i ../search-duck.patch } @@ -109,29 +116,41 @@ backup=(etc/conf.d/quassel) } package_quassel-client() { -pkgdesc="Next-generation distributed IRC client - client only (with webkit)" -depends=('qt5-base' 'qt5-webkit' 'qt5-multimedia' 'knotifyconfig' +pkgdesc="Next-generation distributed IRC client - client only" +pkgdesc+=" (with webkit HTML rendering)" +depends=('qt5-base' 'qt5-webengine' 'qt5-multimedia' 'knotifyconfig' 'hicolor-icon-theme') +depends=(${depends[*]/qt5-webengine/qt5-webkit}) +optdepends=('perl: for builtin /exec scripts') conflicts=('quassel-monolithic' 'quassel-client-small') _install client + install -Dm644 $pkgbase-$pkgver/data/quasselclient.appdata.xml "$pkgdir/usr/share/metainfo/quasselclient.appdata.xml" } package_quassel-client-small() { pkgdesc="Next-generation distributed IRC client - client only, reduced deps" depends=('qt5-base' 'qt5-svg' 'sonnet' 'hicolor-icon-theme') +optdepends=('perl: for builtin /exec scripts') conflicts=('quassel-monolithic' 'quassel-client') replaces=('quassel-remote') _install client-small + + # Ignore package by AppStream to avoid duplicated IDs + echo 'X-AppStream-Ignore=true' >> "$pkgdir/usr/share/applications/quasselclient.desktop" } package_quassel-monolithic() { -pkgdesc="Next-generation distributed IRC client - complete standalone (with webkit)" -depends=('qt5-base' 'qt5-webkit' 'qt5-multimedia' 'qt5-script' 'qca-qt5' +pkgdesc="Next-generation distributed IRC client - monolithic" +pkgdesc+=" (with webkit HTML rendering)" +depends=('qt5-base' 'qt5-webengine' 'qt5-multimedia' 'qt5-script' 'qca-qt5' 'knotifyconfig' 'libldap' 'hicolor-icon-theme') -optdepends=('postgresql: PostgreSQL database support') +depends=(${depends[*]/qt5-webengine/qt5-webkit}) +optdepends=('perl: for builtin /exec scripts' + 'postgresql: PostgreSQL database support') conflicts=('quassel-client' 'quassel-client-small') _install monolithic + install -Dm644 $pkgbase-$pkgver/data/quassel.appdata.xml "$pkgdir/usr/share/metainfo/quassel.appdata.xml" } diff --git a/libre/quassel/quassel-0.13.1-qt5.14.patch b/libre/quassel/quassel-0.13.1-qt5.14.patch new file mode 100644 index 000000000..f0305ea53 --- /dev/null +++ b/libre/quassel/quassel-0.13.1-qt5.14.patch @@ -0,0 +1,118 @@ +commit c90702bdbc43fc542d7df6d5ec4b321912ca0035 +Author: Manuel Nickschas +Date: Tue Jan 7 18:34:54 2020 +0100 + + common: Disable enum type stream operators for Qt >= 5.14 + + Starting from version 5.14, Qt provides stream operators for enum + types, which collide with the ones we ship in types.h. Disable + Quassel's stream operators when compiling against Qt 5.14 or later. + + Add a unit test that ensures that enum serialization honors the width + of the underlying type. + +diff --git a/src/common/types.h b/src/common/types.h +index 467d9fb2..c4b9f364 100644 +--- a/src/common/types.h ++++ b/src/common/types.h +@@ -140,6 +140,7 @@ Q_DECLARE_METATYPE(QHostAddress) + typedef QList MsgIdList; + typedef QList BufferIdList; + ++#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + /** + * Catch-all stream serialization operator for enum types. + * +@@ -169,6 +170,7 @@ QDataStream &operator>>(QDataStream &in, T &value) { + value = static_cast(v); + return in; + } ++#endif + + // Exceptions + +diff --git a/src/common/typestest.cpp b/src/common/typestest.cpp +new file mode 100644 +index 00000000..04031c29 +--- /dev/null ++++ b/src/common/typestest.cpp +@@ -0,0 +1,79 @@ ++/*************************************************************************** ++ * Copyright (C) 2005-2020 by the Quassel Project * ++ * devel@quassel-irc.org * ++ * * ++ * This program is free software; you can redistribute it and/or modify * ++ * it under the terms of the GNU General Public License as published by * ++ * the Free Software Foundation; either version 2 of the License, or * ++ * (at your option) version 3. * ++ * * ++ * This program is distributed in the hope that it will be useful, * ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of * ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * ++ * GNU General Public License for more details. * ++ * * ++ * You should have received a copy of the GNU General Public License * ++ * along with this program; if not, write to the * ++ * Free Software Foundation, Inc., * ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ++ ***************************************************************************/ ++ ++#include ++ ++#include ++#include ++#include ++ ++#include "testglobal.h" ++#include "types.h" ++ ++using namespace ::testing; ++ ++class EnumHolder ++{ ++ Q_GADGET ++ ++public: ++ enum class Enum16 : uint16_t {}; ++ enum class Enum32 : uint32_t {}; ++ ++ enum class EnumQt16 : uint16_t {}; ++ Q_ENUM(EnumQt16) ++ enum class EnumQt32 : uint32_t {}; ++ Q_ENUM(EnumQt32) ++}; ++ ++// Verify that enums are (de)serialized as their underlying type ++TEST(TypesTest, enumSerialization) ++{ ++ QByteArray data; ++ QDataStream out(&data, QIODevice::WriteOnly); ++ ++ // Serialize ++ out << EnumHolder::Enum16(0xabcd); ++ ASSERT_THAT(data.size(), Eq(2)); ++ out << EnumHolder::Enum32(0x123456); ++ ASSERT_THAT(data.size(), Eq(6)); ++ out << EnumHolder::EnumQt16(0x4321); ++ ASSERT_THAT(data.size(), Eq(8)); ++ out << EnumHolder::Enum32(0xfedcba); ++ ASSERT_THAT(data.size(), Eq(12)); ++ ASSERT_THAT(out.status(), Eq(QDataStream::Status::Ok)); ++ ++ // Deserialize ++ QDataStream in(data); ++ EnumHolder::Enum16 enum16; ++ EnumHolder::Enum32 enum32; ++ EnumHolder::EnumQt16 enumQt16; ++ EnumHolder::EnumQt32 enumQt32; ++ in >> enum16 >> enum32 >> enumQt16 >> enumQt32; ++ ASSERT_THAT(in.status(), Eq(QDataStream::Status::Ok)); ++ EXPECT_TRUE(in.atEnd()); ++ ++ EXPECT_THAT((int)enum16, Eq(0xabcd)); ++ EXPECT_THAT((int)enum32, Eq(0x123456)); ++ EXPECT_THAT((int)enumQt16, Eq(0x4321)); ++ EXPECT_THAT((int)enumQt32, Eq(0xfedcba)); ++} ++ ++#include "typestest.moc" -- cgit v1.2.2