summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Wojdyla2021-09-04 18:27:12 +0200
committerMichal Wojdyla2021-09-04 18:27:12 +0200
commita4a2d4a7735b67336a6028ae0a0f364805d31d19 (patch)
tree04f59871677878897ddc90b99316d35a10ac9384
parentdc25792eb77803b7a5272813bd4e95c5d50920f0 (diff)
downloadaur-a4a2d4a7735b67336a6028ae0a0f364805d31d19.tar.gz
fix build
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD18
-rw-r--r--ordered.patch23
-rw-r--r--patch-klocale-kde.cpp.patch17
4 files changed, 58 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a4dc1afc7305..d2ba986e8a63 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = kdelibs
pkgdesc = KDE Core Libraries
pkgver = 4.14.38
- pkgrel = 4
+ pkgrel = 5
url = https://www.kde.org/
arch = x86_64
license = GPL
@@ -35,12 +35,15 @@ pkgbase = kdelibs
source = qt4.patch
source = kdelibs-no-kdewebkit.patch
source = kdelibs-openssl-1.1.patch
+ source = patch-klocale-kde.cpp.patch
+ source = ordered.patch
sha256sums = 37fd43a34e8118406e03a5d0e53f4a03c8aa50b219e8484a5d42349dc0f2c3fe
sha256sums = 0eed754cf3e9f41be5ea22314bf49cf5571b421d81b8f525287830bd1b9b684e
sha256sums = 877df7357360b70d9f7d6bc8c211f82fd8b00cc2eb34e9993ff6aae20faf1cad
sha256sums = ced10a9a83ff2a7f82edf51f6f399f8338b34ab5a589ef43637517d204843bea
sha256sums = 2df372f1bfcef1902349f9ca8820315030d39dd2bb769776b94fd3fcbf9621f5
sha256sums = 42f86279515bead6e9f89b1fc3ea58e0a648d41fae343de95297f995dedcdd71
+ sha256sums = e2e7cf3fe5c82d18609d51d4d224c17a55b0bac77c1fce5e32296381d34a14fa
+ sha256sums = 7b621b8c72ffd662e933601dc6cd7638270cfa2d6d36e0f2deb682dd37c442bd
pkgname = kdelibs
-
diff --git a/PKGBUILD b/PKGBUILD
index 3d1494252f44..533c0a38cb45 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,12 @@
-# $Id: PKGBUILD 317534 2018-02-26 03:02:27Z arojas $
-# Maintainer: Felix Yan <felixonmars@archlinux.org>
+# Contributor: Michal Wojdyla < micwoj9292 at gmail dot com >
+# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org
# Contributor: Pierre Schmitz <pierre@archlinux.de>
pkgname=kdelibs
pkgver=4.14.38
_kdeappver=17.08.3
-pkgrel=4
+pkgrel=5
pkgdesc="KDE Core Libraries"
arch=('x86_64')
url='https://www.kde.org/'
@@ -18,13 +18,16 @@ depends=('attica-qt4' 'libxss' 'libdbusmenu-qt4' 'polkit-qt4'
makedepends=('cmake' 'automoc4' 'avahi' 'libgl' 'mesa')
source=("https://download.kde.org/stable/applications/${_kdeappver}/src/$pkgname-$pkgver.tar.xz"
'kde-applications-menu.patch' 'archlinux-menu.patch' 'qt4.patch'
- 'kdelibs-no-kdewebkit.patch' 'kdelibs-openssl-1.1.patch')
+ 'kdelibs-no-kdewebkit.patch' 'kdelibs-openssl-1.1.patch'
+ 'patch-klocale-kde.cpp.patch' 'ordered.patch')
sha256sums=('37fd43a34e8118406e03a5d0e53f4a03c8aa50b219e8484a5d42349dc0f2c3fe'
'0eed754cf3e9f41be5ea22314bf49cf5571b421d81b8f525287830bd1b9b684e'
'877df7357360b70d9f7d6bc8c211f82fd8b00cc2eb34e9993ff6aae20faf1cad'
'ced10a9a83ff2a7f82edf51f6f399f8338b34ab5a589ef43637517d204843bea'
'2df372f1bfcef1902349f9ca8820315030d39dd2bb769776b94fd3fcbf9621f5'
- '42f86279515bead6e9f89b1fc3ea58e0a648d41fae343de95297f995dedcdd71')
+ '42f86279515bead6e9f89b1fc3ea58e0a648d41fae343de95297f995dedcdd71'
+ 'e2e7cf3fe5c82d18609d51d4d224c17a55b0bac77c1fce5e32296381d34a14fa'
+ '7b621b8c72ffd662e933601dc6cd7638270cfa2d6d36e0f2deb682dd37c442bd')
prepare() {
mkdir -p build
@@ -39,10 +42,15 @@ prepare() {
patch -p1 -i ../kdelibs-no-kdewebkit.patch
# fix build with openSSL 1.1 (OpenMandriva)
patch -p1 -i ../kdelibs-openssl-1.1.patch
+ # https://github.com/n0mAdiNs0mNiaC/RouterProject/commit/6f2c730e6c3319eb2daef860164cf97146eb5497
+ patch -p1 -i ../patch-klocale-kde.cpp.patch
+ # fix error: ordered comparison of pointer with integer zero
+ patch -p1 -i ../ordered.patch
}
build() {
cd build
+ CXXFLAGS="$CXXFLAGS -fpermissive -Wno-narrowing"
cmake ../$pkgname-$pkgver \
-DCMAKE_BUILD_TYPE=Release \
-DKDE4_BUILD_TESTS=OFF \
diff --git a/ordered.patch b/ordered.patch
new file mode 100644
index 000000000000..c29bbee45d88
--- /dev/null
+++ b/ordered.patch
@@ -0,0 +1,23 @@
+--- kdelibs-4.14.38/kio/kfile/kpropertiesdialog.cpp
++++ kdelibs-4.14.38/kio/kfile/kpropertiesdialog.cpp
+@@ -3306,7 +3306,7 @@
+
+ if (preferredTerminal == "konsole")
+ {
+- terminalCloseBool = (d->m_terminalOptionStr.contains( "--noclose" ) > 0);
++ terminalCloseBool = (0 != d->m_terminalOptionStr.contains( "--noclose" ));
+ w.terminalCloseCheck->setChecked(terminalCloseBool);
+ d->m_terminalOptionStr.remove( "--noclose");
+ }
+
+--- kdelibs-4.14.38/kio/kfile/kopenwithdialog.cpp
++++ kdelibs-4.14.38/kio/kfile/kopenwithdialog.cpp
+@@ -713,7 +713,7 @@
+ // ### indicate that default value was restored
+ d->terminal->setChecked(d->curService->terminal());
+ QString terminalOptions = d->curService->terminalOptions();
+- d->nocloseonexit->setChecked((terminalOptions.contains(QLatin1String("--noclose")) > 0));
++ d->nocloseonexit->setChecked((0 != terminalOptions.contains(QLatin1String("--noclose"))));
+ d->m_terminaldirty = false; // slotTerminalToggled changed it
+ }
+ }
diff --git a/patch-klocale-kde.cpp.patch b/patch-klocale-kde.cpp.patch
new file mode 100644
index 000000000000..686c14cb463a
--- /dev/null
+++ b/patch-klocale-kde.cpp.patch
@@ -0,0 +1,17 @@
+contains() returns bool or QBool, and clang7 picks the an
+overload that casts to void *, and then fails on the ordered
+comparison. Drop the strange comparison instead.
+
+--- kdelibs-4.14.38/kdecore/localization/klocale_kde.cpp.orig 2018-08-23 20:23:08 UTC
++++ kdelibs-4.14.38/kdecore/localization/klocale_kde.cpp
+@@ -2438,8 +2438,8 @@ QString KLocalePrivate::formatLocaleTime
+
+ bool KLocalePrivate::use12Clock() const
+ {
+- if ((timeFormat().contains(QString::fromLatin1("%I")) > 0) ||
+- (timeFormat().contains(QString::fromLatin1("%l")) > 0)) {
++ if (bool(timeFormat().contains(QString::fromLatin1("%I"))) ||
++ bool(timeFormat().contains(QString::fromLatin1("%l")))) {
+ return true;
+ } else {
+ return false; \ No newline at end of file