summaryrefslogtreecommitdiff
path: root/source/kde/patch
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2018-05-28 19:12:29 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 23:39:35 +0200
commit646a5c1cbfd95873950a87b5f75d52073a967023 (patch)
treeb8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/kde/patch
parentd31c50870d0bee042ce660e445c9294a59a3a65b (diff)
downloadcurrent-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/kde/patch')
-rw-r--r--source/kde/patch/calligra.patch6
-rw-r--r--source/kde/patch/calligra/boost-1.65.0.patch24
-rw-r--r--source/kde/patch/calligra/calligra.mariadb.diff33
-rw-r--r--source/kde/patch/k3b.patch9
-rw-r--r--source/kde/patch/k3b/k3b-ffmpeg3.patch138
-rw-r--r--source/kde/patch/k3b/k3b.narrowing.diff71
-rw-r--r--source/kde/patch/k3b/k3b.pointer.compare.diff29
-rw-r--r--source/kde/patch/kate.patch3
-rw-r--r--source/kde/patch/kate/kate4-fix_gcc7.patch54
-rw-r--r--source/kde/patch/kdeartwork.patch3
-rw-r--r--source/kde/patch/kdeartwork/kdeartwork.cmake.include.checkincludefiles.diff7
-rw-r--r--source/kde/patch/kdepimlibs.patch1
-rw-r--r--source/kde/patch/kdepimlibs/kdepimlibs.libical3.diff184
-rw-r--r--source/kde/patch/kdevelop-pg-qt.patch2
-rw-r--r--source/kde/patch/kdevelop-pg-qt/kdevelop-pg-qt.ftbfs.diff11
-rw-r--r--source/kde/patch/kdewebdev.patch2
-rw-r--r--source/kde/patch/kgamma.patch3
-rw-r--r--source/kde/patch/kgamma/kgamma.cmake.include.checkincludefiles.diff10
-rw-r--r--source/kde/patch/konsole.patch8
-rw-r--r--source/kde/patch/konsole/konsole.scrollup.diff43
-rw-r--r--source/kde/patch/konsole/konsole.term.is.konsole.diff22
-rw-r--r--source/kde/patch/kopete.patch3
-rw-r--r--source/kde/patch/kopete/kopete-gcc6.patch28
-rw-r--r--source/kde/patch/kuser.patch3
-rw-r--r--source/kde/patch/kuser/kuser.cmake.include.checkincludefiles.diff10
-rw-r--r--source/kde/patch/perlqt.patch3
-rw-r--r--source/kde/patch/perlqt/perlqt.gcc6.diff11
-rw-r--r--source/kde/patch/print-manager.patch1
-rw-r--r--source/kde/patch/print-manager/print-manager.fix.build.against.cups22.diff24
-rw-r--r--source/kde/patch/pykde4.patch5
-rw-r--r--source/kde/patch/pykde4/0003-Fix-build-with-sip-4.19.patch599
-rw-r--r--source/kde/patch/pykde4/Annotate-KAutoMount-as-Abstract.patch21
-rw-r--r--source/kde/patch/pykde4/fix_kpythonpluginfactory_build.diff26
-rw-r--r--source/kde/patch/pykde4/pykde4-4.14.3-checkstate-sip-4.19.5.patch24
-rw-r--r--source/kde/patch/pykde4/pykde4.solid.cmake.diff20
35 files changed, 1439 insertions, 2 deletions
diff --git a/source/kde/patch/calligra.patch b/source/kde/patch/calligra.patch
new file mode 100644
index 00000000..9e109851
--- /dev/null
+++ b/source/kde/patch/calligra.patch
@@ -0,0 +1,6 @@
+# Fix build with mariadb 10.2+:
+zcat $CWD/patch/calligra/calligra.mariadb.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Patch for boost 1.65.0+:
+zcat $CWD/patch/calligra/boost-1.65.0.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/source/kde/patch/calligra/boost-1.65.0.patch b/source/kde/patch/calligra/boost-1.65.0.patch
new file mode 100644
index 00000000..9f6a4066
--- /dev/null
+++ b/source/kde/patch/calligra/boost-1.65.0.patch
@@ -0,0 +1,24 @@
+diff -ru calligra-2.9.11.orig/gemini/desktopviewproxy.cpp calligra-2.9.11/gemini/desktopviewproxy.cpp
+--- calligra-2.9.11.orig/gemini/desktopviewproxy.cpp 2016-02-02 20:53:13.000000000 +0100
++++ calligra-2.9.11/gemini/desktopviewproxy.cpp 2017-08-27 17:54:48.900376022 +0200
+@@ -31,7 +31,7 @@
+ #include <krecentfilesaction.h>
+ #include <kactioncollection.h>
+
+-#include <boost/config/posix_features.hpp>
++#include <boost/config/detail/posix_features.hpp>
+ #include <KConfigGroup>
+
+ #include <KoMainWindow.h>
+diff -ru calligra-2.9.11.orig/krita/gemini/desktopviewproxy.cpp calligra-2.9.11/krita/gemini/desktopviewproxy.cpp
+--- calligra-2.9.11.orig/krita/gemini/desktopviewproxy.cpp 2016-02-02 20:53:14.000000000 +0100
++++ calligra-2.9.11/krita/gemini/desktopviewproxy.cpp 2017-08-27 17:53:54.964372389 +0200
+@@ -31,7 +31,7 @@
+ #include <krecentfilesaction.h>
+ #include <kactioncollection.h>
+
+-#include <boost/config/posix_features.hpp>
++#include <boost/config/detail/posix_features.hpp>
+
+ #include <KisMainWindow.h>
+ #include <KisImportExportManager.h>
diff --git a/source/kde/patch/calligra/calligra.mariadb.diff b/source/kde/patch/calligra/calligra.mariadb.diff
new file mode 100644
index 00000000..96006998
--- /dev/null
+++ b/source/kde/patch/calligra/calligra.mariadb.diff
@@ -0,0 +1,33 @@
+--- ./kexi/migration/mysql/mysqlmigrate.cpp.orig 2016-02-02 13:53:13.000000000 -0600
++++ ./kexi/migration/mysql/mysqlmigrate.cpp 2017-08-30 14:21:01.436709371 -0500
+@@ -42,7 +42,7 @@
+ #ifdef Q_WS_WIN
+ # undef _WIN32_WINNT // avoid redef.
+ #endif
+-#include <mysql_version.h>
++#include <mariadb_version.h>
+ #include <mysql.h>
+ #define BOOL bool
+
+--- ./kexi/kexidb/drivers/mysql/mysqldriver.cpp.orig 2016-02-02 13:53:13.000000000 -0600
++++ ./kexi/kexidb/drivers/mysql/mysqldriver.cpp 2017-08-30 14:20:24.858710150 -0500
+@@ -31,7 +31,7 @@
+ #include <QVariant>
+ #include <QFile>
+
+-#include <mysql_version.h>
++#include <mariadb_version.h>
+ #include <mysql.h>
+ #define BOOL bool
+
+--- ./kexi/kexidb/drivers/mysql/mysqlconnection_p.h.orig 2016-02-02 13:53:13.000000000 -0600
++++ ./kexi/kexidb/drivers/mysql/mysqlconnection_p.h 2017-08-30 14:20:24.861710150 -0500
+@@ -30,7 +30,7 @@
+ # endif
+ # include <my_global.h>
+ #endif
+-#include <mysql_version.h>
++#include <mariadb_version.h>
+ #include <mysql.h>
+
+ typedef struct st_mysql MYSQL;
diff --git a/source/kde/patch/k3b.patch b/source/kde/patch/k3b.patch
new file mode 100644
index 00000000..a96caa49
--- /dev/null
+++ b/source/kde/patch/k3b.patch
@@ -0,0 +1,9 @@
+# Patch for GCC 6+:
+zcat $CWD/patch/k3b/k3b.narrowing.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Patch for ffmpeg3:
+zcat $CWD/patch/k3b/k3b-ffmpeg3.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Fix error "ISO C++ forbids comparison between pointer and integer [-fpermissive]":
+zcat $CWD/patch/k3b/k3b.pointer.compare.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/source/kde/patch/k3b/k3b-ffmpeg3.patch b/source/kde/patch/k3b/k3b-ffmpeg3.patch
new file mode 100644
index 00000000..9c5ac420
--- /dev/null
+++ b/source/kde/patch/k3b/k3b-ffmpeg3.patch
@@ -0,0 +1,138 @@
+From 52d3d64863d2fab4128f524870851f18f5cae1fc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= <oldium.pro@seznam.cz>
+Date: Sat, 14 Feb 2015 15:31:07 +0100
+Subject: [PATCH] Fixed compilation with newer ffmpeg/libav.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Oldřich Jedlička <oldium.pro@seznam.cz>
+---
+ plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp | 60 ++++++++++++++++++++++++-----
+ 1 file changed, 50 insertions(+), 10 deletions(-)
+
+diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+index 5451fd3..2f80fd6 100644
+--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
++++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+@@ -86,8 +86,12 @@ public:
+ K3b::Msf length;
+
+ // for decoding. ffmpeg requires 16-byte alignment.
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++ ::AVFrame* frame;
++#else
+ char outputBuffer[AVCODEC_MAX_AUDIO_FRAME_SIZE + 15];
+ char* alignedOutputBuffer;
++#endif
+ char* outputBufferPos;
+ int outputBufferSize;
+ ::AVPacket packet;
+@@ -102,14 +106,29 @@ K3bFFMpegFile::K3bFFMpegFile( const QString& filename )
+ d = new Private;
+ d->formatContext = 0;
+ d->codec = 0;
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++# if LIBAVCODEC_BUILD < AV_VERSION_INT(55,28,1)
++ d->frame = avcodec_alloc_frame();
++# else
++ d->frame = av_frame_alloc();
++# endif
++#else
+ int offset = 0x10 - (reinterpret_cast<intptr_t>(&d->outputBuffer) & 0xf);
+ d->alignedOutputBuffer = &d->outputBuffer[offset];
++#endif
+ }
+
+
+ K3bFFMpegFile::~K3bFFMpegFile()
+ {
+ close();
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++# if LIBAVCODEC_BUILD < AV_VERSION_INT(55,28,1)
++ av_free(d->frame);
++# else
++ av_frame_free(&d->frame);
++# endif
++#endif
+ delete d;
+ }
+
+@@ -326,26 +345,36 @@ int K3bFFMpegFile::fillOutputBuffer()
+ return 0;
+ }
+
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++ int gotFrame = 0;
++ int len = ::avcodec_decode_audio4(
++#else
+ d->outputBufferPos = d->alignedOutputBuffer;
+ d->outputBufferSize = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+-
+-#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
++# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
+ int len = ::avcodec_decode_audio3(
+-#else
+-# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO2
+- int len = ::avcodec_decode_audio2(
+ # else
++# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO2
++ int len = ::avcodec_decode_audio2(
++# else
+ int len = ::avcodec_decode_audio(
++# endif
+ # endif
+ #endif
+
+ FFMPEG_CODEC(d->formatContext->streams[0]),
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++ d->frame,
++ &gotFrame,
++ &d->packet );
++#else
+ (short*)d->alignedOutputBuffer,
+ &d->outputBufferSize,
+-#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
++# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
+ &d->packet );
+-#else
++# else
+ d->packetData, d->packetSize );
++# endif
+ #endif
+
+ if( d->packetSize <= 0 || len < 0 )
+@@ -355,6 +384,17 @@ int K3bFFMpegFile::fillOutputBuffer()
+ return -1;
+ }
+
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++ if ( gotFrame ) {
++ d->outputBufferSize = ::av_samples_get_buffer_size(
++ NULL,
++ FFMPEG_CODEC(d->formatContext->streams[0])->channels,
++ d->frame->nb_samples,
++ FFMPEG_CODEC(d->formatContext->streams[0])->sample_fmt,
++ 1 );
++ d->outputBufferPos = reinterpret_cast<char*>( d->frame->data[0] );
++ }
++#endif
+ d->packetSize -= len;
+ d->packetData += len;
+ }
+@@ -420,9 +460,9 @@ K3bFFMpegFile* K3bFFMpegWrapper::open( const QString& filename ) const
+ // mp3 being one of them sadly. Most importantly: allow the libsndfile decoder to do
+ // its thing.
+ //
+- if( file->type() == CODEC_ID_WMAV1 ||
+- file->type() == CODEC_ID_WMAV2 ||
+- file->type() == CODEC_ID_AAC )
++ if( file->type() == AV_CODEC_ID_WMAV1 ||
++ file->type() == AV_CODEC_ID_WMAV2 ||
++ file->type() == AV_CODEC_ID_AAC )
+ #endif
+ return file;
+ }
+--
+2.0.5
+
diff --git a/source/kde/patch/k3b/k3b.narrowing.diff b/source/kde/patch/k3b/k3b.narrowing.diff
new file mode 100644
index 00000000..7a328394
--- /dev/null
+++ b/source/kde/patch/k3b/k3b.narrowing.diff
@@ -0,0 +1,71 @@
+--- k3b-2.0.3/libk3b/tools/k3bwavefilewriter.cpp.old 2016-05-14 12:33:15.000000000 -0400
++++ k3b-2.0.3/libk3b/tools/k3bwavefilewriter.cpp 2016-05-14 12:34:35.218389226 -0400
+@@ -111,17 +111,17 @@
+ {
+ static const char riffHeader[] =
+ {
+- 0x52, 0x49, 0x46, 0x46, // 0 "RIFF"
+- 0x00, 0x00, 0x00, 0x00, // 4 wavSize
+- 0x57, 0x41, 0x56, 0x45, // 8 "WAVE"
+- 0x66, 0x6d, 0x74, 0x20, // 12 "fmt "
+- 0x10, 0x00, 0x00, 0x00, // 16
+- 0x01, 0x00, 0x02, 0x00, // 20
+- 0x44, 0xac, 0x00, 0x00, // 24
+- 0x10, 0xb1, 0x02, 0x00, // 28
+- 0x04, 0x00, 0x10, 0x00, // 32
+- 0x64, 0x61, 0x74, 0x61, // 36 "data"
+- 0x00, 0x00, 0x00, 0x00 // 40 byteCount
++ (char)0x52, (char)0x49, (char)0x46, (char)0x46, // 0 "RIFF"
++ (char)0x00, (char)0x00, (char)0x00, (char)0x00, // 4 wavSize
++ (char)0x57, (char)0x41, (char)0x56, (char)0x45, // 8 "WAVE"
++ (char)0x66, (char)0x6d, (char)0x74, (char)0x20, // 12 "fmt "
++ (char)0x10, (char)0x00, (char)0x00, (char)0x00, // 16
++ (char)0x01, (char)0x00, (char)0x02, (char)0x00, // 20
++ (char)0x44, (char)0xac, (char)0x00, (char)0x00, // 24
++ (char)0x10, (char)0xb1, (char)0x02, (char)0x00, // 28
++ (char)0x04, (char)0x00, (char)0x10, (char)0x00, // 32
++ (char)0x64, (char)0x61, (char)0x74, (char)0x61, // 36 "data"
++ (char)0x00, (char)0x00, (char)0x00, (char)0x00 // 40 byteCount
+ };
+
+ m_outputStream.writeRawData( riffHeader, 44 );
+--- k3b-2.0.3/libk3b/projects/k3bcdrdaowriter.cpp.old 2014-11-04 13:37:31.000000000 -0500
++++ k3b-2.0.3/libk3b/projects/k3bcdrdaowriter.cpp 2016-05-14 12:41:13.769135417 -0400
+@@ -908,7 +908,7 @@
+
+ void K3b::CdrdaoWriter::parseCdrdaoMessage()
+ {
+- static const char msgSync[] = { 0xff, 0x00, 0xff, 0x00 };
++ static const char msgSync[] = { (char)0xff, (char)0x00, (char)0xff, (char)0x00 };
+ unsigned int avail = m_comSock->bytesAvailable();
+ unsigned int msgs = avail / ( sizeof(msgSync)+d->progressMsgSize );
+ unsigned int count = 0;
+--- k3b-2.0.3/plugins/encoder/external/k3bexternalencoder.cpp.old 2014-11-04 13:37:31.000000000 -0500
++++ k3b-2.0.3/plugins/encoder/external/k3bexternalencoder.cpp 2016-05-14 12:45:57.967902413 -0400
+@@ -39,17 +39,17 @@
+
+ static const char s_riffHeader[] =
+ {
+- 0x52, 0x49, 0x46, 0x46, // 0 "RIFF"
+- 0x00, 0x00, 0x00, 0x00, // 4 wavSize
+- 0x57, 0x41, 0x56, 0x45, // 8 "WAVE"
+- 0x66, 0x6d, 0x74, 0x20, // 12 "fmt "
+- 0x10, 0x00, 0x00, 0x00, // 16
+- 0x01, 0x00, 0x02, 0x00, // 20
+- 0x44, 0xac, 0x00, 0x00, // 24
+- 0x10, 0xb1, 0x02, 0x00, // 28
+- 0x04, 0x00, 0x10, 0x00, // 32
+- 0x64, 0x61, 0x74, 0x61, // 36 "data"
+- 0x00, 0x00, 0x00, 0x00 // 40 byteCount
++ (char)0x52, (char)0x49, (char)0x46, (char)0x46, // 0 "RIFF"
++ (char)0x00, (char)0x00, (char)0x00, (char)0x00, // 4 wavSize
++ (char)0x57, (char)0x41, (char)0x56, (char)0x45, // 8 "WAVE"
++ (char)0x66, (char)0x6d, (char)0x74, (char)0x20, // 12 "fmt "
++ (char)0x10, (char)0x00, (char)0x00, (char)0x00, // 16
++ (char)0x01, (char)0x00, (char)0x02, (char)0x00, // 20
++ (char)0x44, (char)0xac, (char)0x00, (char)0x00, // 24
++ (char)0x10, (char)0xb1, (char)0x02, (char)0x00, // 28
++ (char)0x04, (char)0x00, (char)0x10, (char)0x00, // 32
++ (char)0x64, (char)0x61, (char)0x74, (char)0x61, // 36 "data"
++ (char)0x00, (char)0x00, (char)0x00, (char)0x00 // 40 byteCount
+ };
diff --git a/source/kde/patch/k3b/k3b.pointer.compare.diff b/source/kde/patch/k3b/k3b.pointer.compare.diff
new file mode 100644
index 00000000..590fce7a
--- /dev/null
+++ b/source/kde/patch/k3b/k3b.pointer.compare.diff
@@ -0,0 +1,29 @@
+--- ./plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp.orig 2017-05-06 16:40:46.273796232 -0500
++++ ./plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp 2017-05-06 16:47:19.594787855 -0500
+@@ -261,7 +261,7 @@
+ AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "TITLE", NULL, 0 );
+ if( ade == NULL )
+ return QString();
+- if( ade->value != '\0' )
++ if( ade->value )
+ return QString::fromLocal8Bit( ade->value );
+ else
+ return QString();
+@@ -274,7 +274,7 @@
+ AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "ARTIST", NULL, 0 );
+ if( ade == NULL )
+ return QString();
+- if( ade->value != '\0' )
++ if( ade->value )
+ return QString::fromLocal8Bit( ade->value );
+ else
+ return QString();
+@@ -287,7 +287,7 @@
+ AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "COMMENT", NULL, 0 );
+ if( ade == NULL )
+ return QString();
+- if( ade->value != '\0' )
++ if( ade->value )
+ return QString::fromLocal8Bit( ade->value );
+ else
+ return QString();
diff --git a/source/kde/patch/kate.patch b/source/kde/patch/kate.patch
new file mode 100644
index 00000000..4810b315
--- /dev/null
+++ b/source/kde/patch/kate.patch
@@ -0,0 +1,3 @@
+# Fix build for gcc6+:
+zcat $CWD/patch/kate/kate4-fix_gcc7.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/source/kde/patch/kate/kate4-fix_gcc7.patch b/source/kde/patch/kate/kate4-fix_gcc7.patch
new file mode 100644
index 00000000..080a114f
--- /dev/null
+++ b/source/kde/patch/kate/kate4-fix_gcc7.patch
@@ -0,0 +1,54 @@
+--- a/part/search/kateregexp.cpp
++++ b/part/search/kateregexp.cpp
+@@ -96,7 +96,7 @@
+
+ case L'n':
+ stillMultiLine = true;
+- // FALLTROUGH
++ __attribute__((fallthrough));
+
+ default:
+ // copy "\?" unmodified
+@@ -164,7 +164,7 @@
+
+ case L'n':
+ stillMultiLine = true;
+- // FALLTROUGH
++ __attribute__((fallthrough));
+
+ default:
+ // copy "\?" unmodified
+--- a/part/view/kateview.cpp
++++ b/part/view/kateview.cpp
+@@ -310,7 +310,7 @@
+ if (factory())
+ factory()->removeClient (this);
+
+- KTextEditor::ViewBarContainer *viewBarContainer=qobject_cast<KTextEditor::ViewBarContainer*>( KateGlobal::self()->container() );
++ KTextEditor::ViewBarContainer *viewBarContainer=qobject_cast<KTextEditor::ViewBarContainer*>( KateGlobal::self()->container() );
+ if (viewBarContainer) {
+ viewBarContainer->deleteViewBarForView(this,KTextEditor::ViewBarContainer::BottomBar);
+ m_bottomViewBar=0;
+--- a/part/view/kateviewaccessible.h
++++ b/part/view/kateviewaccessible.h
+@@ -248,7 +248,8 @@
+
+ virtual int navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const
+ {
+- if ((relation == QAccessible::Child || QAccessible::FocusChild) && entry == KateCursorAccessible::ChildId) {
++ if ((relation == QAccessible::Child || relation == QAccessible::FocusChild) &&
++ entry == KateCursorAccessible::ChildId) {
+ *target = new KateCursorAccessible(view());
+ return KateCursorAccessible::ChildId;
+ }
+--- a/part/view/kateviewhelpers.cpp
++++ b/part/view/kateviewhelpers.cpp
+@@ -1703,7 +1703,7 @@
+ if (realLine > -1) {
+ if (m_viewInternal->cache()->viewLine(z).startCol() == 0) {
+ if (m_viRelLineNumbersOn && m_view->viInputMode()) {
+- int diff = abs(realLine - currentLine);
++ int diff = abs(static_cast<int>(realLine - currentLine));
+ if (diff > 0) {
+ p.drawText( lnX + m_maxCharWidth / 2, y, lnWidth - m_maxCharWidth, h,
+ Qt::TextDontClip|Qt::AlignRight|Qt::AlignVCenter, QString("%1").arg(diff) );
diff --git a/source/kde/patch/kdeartwork.patch b/source/kde/patch/kdeartwork.patch
new file mode 100644
index 00000000..c5ed525d
--- /dev/null
+++ b/source/kde/patch/kdeartwork.patch
@@ -0,0 +1,3 @@
+# Fix build:
+zcat $CWD/patch/kdeartwork/kdeartwork.cmake.include.checkincludefiles.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/source/kde/patch/kdeartwork/kdeartwork.cmake.include.checkincludefiles.diff b/source/kde/patch/kdeartwork/kdeartwork.cmake.include.checkincludefiles.diff
new file mode 100644
index 00000000..c265f5f0
--- /dev/null
+++ b/source/kde/patch/kdeartwork/kdeartwork.cmake.include.checkincludefiles.diff
@@ -0,0 +1,7 @@
+--- ./kscreensaver/xsavers/CMakeLists.txt.orig 2010-03-05 12:35:01.000000000 -0600
++++ ./kscreensaver/xsavers/CMakeLists.txt 2018-01-30 13:59:36.413760135 -0600
+@@ -1,3 +1,4 @@
++include(CheckIncludeFiles)
+ check_include_files(memory.h HAVE_MEMORY_H)
+ configure_file (config-xsavers.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-xsavers.h )
+
diff --git a/source/kde/patch/kdepimlibs.patch b/source/kde/patch/kdepimlibs.patch
new file mode 100644
index 00000000..2e9017c2
--- /dev/null
+++ b/source/kde/patch/kdepimlibs.patch
@@ -0,0 +1 @@
+zcat $CWD/patch/kdepimlibs/kdepimlibs.libical3.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/kde/patch/kdepimlibs/kdepimlibs.libical3.diff b/source/kde/patch/kdepimlibs/kdepimlibs.libical3.diff
new file mode 100644
index 00000000..c3b8caf8
--- /dev/null
+++ b/source/kde/patch/kdepimlibs/kdepimlibs.libical3.diff
@@ -0,0 +1,184 @@
+--- ./kcalcore/icalformat_p.cpp.orig 2015-06-24 07:43:14.000000000 -0500
++++ ./kcalcore/icalformat_p.cpp 2017-12-05 23:03:44.742261940 -0600
+@@ -2301,7 +2301,6 @@
+ t.second = 0;
+
+ t.is_date = 1;
+- t.is_utc = 0;
+ t.zone = 0;
+
+ return t;
+@@ -2322,8 +2321,7 @@
+ t.minute = datetime.time().minute();
+ t.second = datetime.time().second();
+ }
+- t.zone = 0; // zone is NOT set
+- t.is_utc = datetime.isUtc() ? 1 : 0;
++ t.zone = datetime.isUtc() ? icaltimezone_get_utc_timezone() : 0; // zone is NOT set
+
+ // _dumpIcaltime( t );
+
+@@ -2398,7 +2396,7 @@
+ }
+
+ KTimeZone ktz;
+- if (!t.is_utc) {
++ if (!icaltime_is_utc( t )) {
+ ktz = dt.timeZone();
+ }
+
+@@ -2431,7 +2429,7 @@
+ // _dumpIcaltime( t );
+
+ KDateTime::Spec timeSpec;
+- if (t.is_utc || t.zone == icaltimezone_get_utc_timezone()) {
++ if (icaltime_is_utc( t ) || t.zone == icaltimezone_get_utc_timezone()) {
+ timeSpec = KDateTime::UTC; // the time zone is UTC
+ utc = false; // no need to convert to UTC
+ } else {
+--- ./kcalcore/icaltimezones.cpp.orig 2015-06-24 07:43:14.000000000 -0500
++++ ./kcalcore/icaltimezones.cpp 2017-12-05 23:03:55.482262829 -0600
+@@ -54,7 +54,7 @@
+ {
+ return QDateTime(QDate(t.year, t.month, t.day),
+ QTime(t.hour, t.minute, t.second),
+- (t.is_utc ? Qt::UTC : Qt::LocalTime));
++ (icaltime_is_utc( t ) ? Qt::UTC : Qt::LocalTime));
+ }
+
+ // Maximum date for time zone data.
+@@ -81,7 +81,6 @@
+ t.second = local.time().second();
+ t.is_date = 0;
+ t.zone = 0;
+- t.is_utc = 0;
+ return t;
+ }
+
+@@ -886,7 +885,7 @@
+ case ICAL_LASTMODIFIED_PROPERTY:
+ {
+ const icaltimetype t = icalproperty_get_lastmodified(p);
+- if (t.is_utc) {
++ if (icaltime_is_utc( t )) {
+ data->d->lastModified = toQDateTime(t);
+ } else {
+ kDebug() << "LAST-MODIFIED not UTC";
+@@ -1259,7 +1258,7 @@
+ // Convert DTSTART to QDateTime, and from local time to UTC
+ const QDateTime localStart = toQDateTime(dtstart); // local time
+ dtstart.second -= prevOffset;
+- dtstart.is_utc = 1;
++ dtstart.zone = icaltimezone_get_utc_timezone();
+ const QDateTime utcStart = toQDateTime(icaltime_normalize(dtstart)); // UTC
+
+ transitions += utcStart;
+@@ -1286,13 +1285,13 @@
+ t.minute = dtstart.minute;
+ t.second = dtstart.second;
+ t.is_date = 0;
+- t.is_utc = 0; // dtstart is in local time
++ t.zone = 0; // dtstart is in local time
+ }
+ // RFC2445 states that RDATE must be in local time,
+ // but we support UTC as well to be safe.
+- if (!t.is_utc) {
++ if (!icaltime_is_utc( t )) {
+ t.second -= prevOffset; // convert to UTC
+- t.is_utc = 1;
++ t.zone = icaltimezone_get_utc_timezone();
+ t = icaltime_normalize(t);
+ }
+ transitions += toQDateTime(t);
+--- ./kcal/icalformat_p.cpp.orig 2015-06-24 07:43:14.000000000 -0500
++++ ./kcal/icalformat_p.cpp 2017-12-05 23:04:01.670263342 -0600
+@@ -2087,7 +2087,6 @@
+ t.second = 0;
+
+ t.is_date = 1;
+- t.is_utc = 0;
+ t.zone = 0;
+
+ return t;
+@@ -2106,8 +2105,7 @@
+ t.second = datetime.time().second();
+
+ t.is_date = 0;
+- t.zone = 0; // zone is NOT set
+- t.is_utc = datetime.isUtc() ? 1 : 0;
++ t.zone = datetime.isUtc() ? icaltimezone_get_utc_timezone() : 0;
+
+ // _dumpIcaltime( t );
+
+@@ -2174,7 +2172,7 @@
+ }
+
+ KTimeZone ktz;
+- if ( !t.is_utc ) {
++ if ( !icaltime_is_utc( t ) ) {
+ ktz = dt.timeZone();
+ }
+
+@@ -2207,7 +2205,7 @@
+ // _dumpIcaltime( t );
+
+ KDateTime::Spec timeSpec;
+- if ( t.is_utc || t.zone == icaltimezone_get_utc_timezone() ) {
++ if ( icaltime_is_utc( t ) || t.zone == icaltimezone_get_utc_timezone() ) {
+ timeSpec = KDateTime::UTC; // the time zone is UTC
+ utc = false; // no need to convert to UTC
+ } else {
+--- ./kcal/icaltimezones.cpp.orig 2015-06-24 07:43:14.000000000 -0500
++++ ./kcal/icaltimezones.cpp 2017-12-05 23:04:07.385263815 -0600
+@@ -50,7 +50,7 @@
+ {
+ return QDateTime( QDate( t.year, t.month, t.day ),
+ QTime( t.hour, t.minute, t.second ),
+- ( t.is_utc ? Qt::UTC : Qt::LocalTime ) );
++ ( icaltime_is_utc( t ) ? Qt::UTC : Qt::LocalTime ) );
+ }
+
+ // Maximum date for time zone data.
+@@ -77,7 +77,6 @@
+ t.second = local.time().second();
+ t.is_date = 0;
+ t.zone = 0;
+- t.is_utc = 0;
+ return t;
+ }
+
+@@ -787,7 +786,7 @@
+ case ICAL_LASTMODIFIED_PROPERTY:
+ {
+ icaltimetype t = icalproperty_get_lastmodified(p);
+- if ( t.is_utc ) {
++ if ( icaltime_is_utc( t ) ) {
+ data->d->lastModified = toQDateTime( t );
+ } else {
+ kDebug() << "LAST-MODIFIED not UTC";
+@@ -972,7 +971,7 @@
+ // Convert DTSTART to QDateTime, and from local time to UTC
+ QDateTime localStart = toQDateTime( dtstart ); // local time
+ dtstart.second -= prevOffset;
+- dtstart.is_utc = 1;
++ dtstart.zone = icaltimezone_get_utc_timezone();
+ QDateTime utcStart = toQDateTime( icaltime_normalize( dtstart ) ); // UTC
+
+ transitions += utcStart;
+@@ -999,13 +998,13 @@
+ t.minute = dtstart.minute;
+ t.second = dtstart.second;
+ t.is_date = 0;
+- t.is_utc = 0; // dtstart is in local time
++ t.zone = 0; // dtstart is in local time
+ }
+ // RFC2445 states that RDATE must be in local time,
+ // but we support UTC as well to be safe.
+- if ( !t.is_utc ) {
++ if ( !icaltime_is_utc( t ) ) {
+ t.second -= prevOffset; // convert to UTC
+- t.is_utc = 1;
++ t.zone = icaltimezone_get_utc_timezone();
+ t = icaltime_normalize( t );
+ }
+ transitions += toQDateTime( t );
diff --git a/source/kde/patch/kdevelop-pg-qt.patch b/source/kde/patch/kdevelop-pg-qt.patch
index 4f6f6234..279fcd4b 100644
--- a/source/kde/patch/kdevelop-pg-qt.patch
+++ b/source/kde/patch/kdevelop-pg-qt.patch
@@ -1,2 +1,2 @@
zcat $CWD/patch/kdevelop-pg-qt/0011-fix-some-warnings.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
-
+zcat $CWD/patch/kdevelop-pg-qt/kdevelop-pg-qt.ftbfs.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/kde/patch/kdevelop-pg-qt/kdevelop-pg-qt.ftbfs.diff b/source/kde/patch/kdevelop-pg-qt/kdevelop-pg-qt.ftbfs.diff
new file mode 100644
index 00000000..c18d1e4d
--- /dev/null
+++ b/source/kde/patch/kdevelop-pg-qt/kdevelop-pg-qt.ftbfs.diff
@@ -0,0 +1,11 @@
+--- ./kdev-pg/CMakeLists.txt.orig 2018-01-30 16:34:56.192631426 -0600
++++ ./kdev-pg/CMakeLists.txt 2018-01-30 16:37:04.178643391 -0600
+@@ -79,7 +79,7 @@
+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/kdev-pg-lexer.ll"
+ ${OPTIONAL_PARSER_HEADER_DEPENDENCY}
+ COMMAND ${FLEX_EXECUTABLE}
+- ARGS --nounistd -o"${CMAKE_CURRENT_BINARY_DIR}/kdev-pg-lexer.cc"
++ ARGS --yymore --nounistd -o"${CMAKE_CURRENT_BINARY_DIR}/kdev-pg-lexer.cc"
+ "${CMAKE_CURRENT_SOURCE_DIR}/kdev-pg-lexer.ll"
+ )
+
diff --git a/source/kde/patch/kdewebdev.patch b/source/kde/patch/kdewebdev.patch
index ccac0a79..2abc80be 100644
--- a/source/kde/patch/kdewebdev.patch
+++ b/source/kde/patch/kdewebdev.patch
@@ -1,5 +1,5 @@
# Make it find tidy:
zcat $CWD/patch/kdewebdev/include-tidy.patch.gz \
- | sed -e "s#/tmp/package-kdewebdev#${SLACK_KDE_BUILD_DIR}/${module}/package-kdewebdev#" \
+ | sed -e "s#/tmp/package-kdewebdev#${SLACK_KDE_BUILD_DIR}/${PKGNAME}/package-kdewebdev#" \
| patch -p0 --verbose \
|| { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/kde/patch/kgamma.patch b/source/kde/patch/kgamma.patch
new file mode 100644
index 00000000..1d681a2c
--- /dev/null
+++ b/source/kde/patch/kgamma.patch
@@ -0,0 +1,3 @@
+# Fix build:
+zcat $CWD/patch/kgamma/kgamma.cmake.include.checkincludefiles.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/source/kde/patch/kgamma/kgamma.cmake.include.checkincludefiles.diff b/source/kde/patch/kgamma/kgamma.cmake.include.checkincludefiles.diff
new file mode 100644
index 00000000..1af9c2cb
--- /dev/null
+++ b/source/kde/patch/kgamma/kgamma.cmake.include.checkincludefiles.diff
@@ -0,0 +1,10 @@
+--- ./CMakeLists.txt.orig 2014-10-09 02:07:16.000000000 -0500
++++ ./CMakeLists.txt 2018-01-29 22:34:52.281573013 -0600
+@@ -9,6 +9,7 @@
+ # X11_xf86vmode discovery is done by FindX11
+ macro_log_feature(X11_xf86vmode_FOUND "X11 Video Mode Extension (xf86vm)" "Required to build kgamma." "http://www.x.org" TRUE "" "")
+
++include(CheckIncludeFiles)
+ check_include_files(strstream HAVE_STRSTREAM_H)
+ configure_file(config-kgamma.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kgamma.h)
+
diff --git a/source/kde/patch/konsole.patch b/source/kde/patch/konsole.patch
new file mode 100644
index 00000000..286c7240
--- /dev/null
+++ b/source/kde/patch/konsole.patch
@@ -0,0 +1,8 @@
+# Fix scrollUp behavior:
+zcat $CWD/patch/konsole/konsole.scrollup.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+## We're not changing TERM to konsole after all. It's just the path of least
+## resistance to revert the terminfo change that broke it, since it's affecting
+## other systems as well (some of which we cannot patch).
+## Set default TERM=konsole:
+#zcat $CWD/patch/konsole/konsole.term.is.konsole.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/kde/patch/konsole/konsole.scrollup.diff b/source/kde/patch/konsole/konsole.scrollup.diff
new file mode 100644
index 00000000..c80a61ec
--- /dev/null
+++ b/source/kde/patch/konsole/konsole.scrollup.diff
@@ -0,0 +1,43 @@
+From 7ff23512fd6c6af1dba87083446f85baf75e9c71 Mon Sep 17 00:00:00 2001
+From: Kurt Hindenburg <kurt.hindenburg@gmail.com>
+Date: Sat, 1 Jul 2017 19:12:39 -0400
+Subject: Correct scrollUp behavior
+
+CSI S escape sequence (SU, scroll up) ignored if number of lines to
+scroll bigger than scrollable lines
+
+REVIEW: 130133
+BUG: 379318
+---
+ src/Screen.cpp | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/Screen.cpp b/src/Screen.cpp
+index 94841a9..15bd685 100644
+--- a/src/Screen.cpp
++++ b/src/Screen.cpp
+@@ -746,13 +746,18 @@ QRect Screen::lastScrolledRegion() const
+
+ void Screen::scrollUp(int from, int n)
+ {
+- if (n <= 0 || from + n > _bottomMargin) return;
++ if (n <= 0)
++ return;
++ if (from > _bottomMargin)
++ return;
++ if (from + n > _bottomMargin)
++ n = _bottomMargin + 1 - from;
+
+ _scrolledLines -= n;
+ _lastScrolledRegion = QRect(0, _topMargin, _columns - 1, (_bottomMargin - _topMargin));
+
+ //FIXME: make sure `topMargin', `bottomMargin', `from', `n' is in bounds.
+- moveImage(loc(0, from), loc(0, from + n), loc(_columns - 1, _bottomMargin));
++ moveImage(loc(0, from), loc(0, from + n), loc(_columns, _bottomMargin));
+ clearImage(loc(0, _bottomMargin - n + 1), loc(_columns - 1, _bottomMargin), ' ');
+ }
+
+--
+cgit v0.11.2
+
+
diff --git a/source/kde/patch/konsole/konsole.term.is.konsole.diff b/source/kde/patch/konsole/konsole.term.is.konsole.diff
new file mode 100644
index 00000000..edc7a49c
--- /dev/null
+++ b/source/kde/patch/konsole/konsole.term.is.konsole.diff
@@ -0,0 +1,22 @@
+--- ./src/Profile.cpp.orig 2014-10-31 23:17:02.000000000 -0500
++++ ./src/Profile.cpp 2018-04-01 13:08:59.412975556 -0500
+@@ -150,7 +150,7 @@
+ setProperty(Command, qgetenv("SHELL"));
+ setProperty(Arguments, QStringList() << qgetenv("SHELL"));
+ setProperty(Icon, "utilities-terminal");
+- setProperty(Environment, QStringList() << "TERM=xterm");
++ setProperty(Environment, QStringList() << "TERM=konsole");
+ setProperty(LocalTabTitleFormat, "%d : %n");
+ setProperty(RemoteTabTitleFormat, "(%u) %H");
+ setProperty(ShowTerminalSizeHint, true);
+--- ./src/Pty.cpp.orig 2014-10-31 23:17:02.000000000 -0500
++++ ./src/Pty.cpp 2018-04-01 13:08:52.282975632 -0500
+@@ -218,7 +218,7 @@
+
+ // extra safeguard to make sure $TERM is always set
+ if (!isTermEnvAdded) {
+- setEnv("TERM", "xterm");
++ setEnv("TERM", "konsole");
+ }
+ }
+
diff --git a/source/kde/patch/kopete.patch b/source/kde/patch/kopete.patch
new file mode 100644
index 00000000..8b0e2949
--- /dev/null
+++ b/source/kde/patch/kopete.patch
@@ -0,0 +1,3 @@
+# Fix compiling with gcc 7:
+zcat $CWD/patch/kopete/kopete-gcc6.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/source/kde/patch/kopete/kopete-gcc6.patch b/source/kde/patch/kopete/kopete-gcc6.patch
new file mode 100644
index 00000000..7a897113
--- /dev/null
+++ b/source/kde/patch/kopete/kopete-gcc6.patch
@@ -0,0 +1,28 @@
+From 9f994ba6950117cbbeefc6027fa0a52ce74932e2 Mon Sep 17 00:00:00 2001
+From: Peter Levine <plevine457@gmail.com>
+Date: Tue, 31 May 2016 17:40:42 +0200
+Subject: Fix compilation with GCC 6
+
+REVIEW: 128006
+BUG: 363053
+FIXED-IN: 16.04.2
+---
+ plugins/history2/history2logger.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/history2/history2logger.h b/plugins/history2/history2logger.h
+index 13f159a..8083526 100644
+--- a/plugins/history2/history2logger.h
++++ b/plugins/history2/history2logger.h
+@@ -94,7 +94,7 @@ public:
+ * from Kopete::Contact @param c in the given @param sens
+ */
+ QList<Kopete::Message> readMessages(int lines,
+- int offset=0, const Kopete::MetaContact *c=false, bool reverseOrder=true);
++ int offset=0, const Kopete::MetaContact *c=NULL, bool reverseOrder=true);
+
+ /**
+ * Same as the following, but for one date. I did'nt reuse the above function
+--
+cgit v0.11.2
+
diff --git a/source/kde/patch/kuser.patch b/source/kde/patch/kuser.patch
new file mode 100644
index 00000000..70edfd20
--- /dev/null
+++ b/source/kde/patch/kuser.patch
@@ -0,0 +1,3 @@
+# Fix build:
+zcat $CWD/patch/kuser/kuser.cmake.include.checkincludefiles.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/source/kde/patch/kuser/kuser.cmake.include.checkincludefiles.diff b/source/kde/patch/kuser/kuser.cmake.include.checkincludefiles.diff
new file mode 100644
index 00000000..264810f6
--- /dev/null
+++ b/source/kde/patch/kuser/kuser.cmake.include.checkincludefiles.diff
@@ -0,0 +1,10 @@
+--- ./CMakeLists.txt.orig 2013-08-03 23:22:20.000000000 -0500
++++ ./CMakeLists.txt 2018-01-30 14:37:52.197974764 -0600
+@@ -35,6 +35,7 @@
+ set(KU_FIRSTGID 500 CACHE STRING "First GID of normal users")
+ set(KU_USERPRIVATEGROUP true CACHE STRING "User private groups by default")
+
++include(CheckIncludeFiles)
+ check_include_files(shadow.h HAVE_SHADOW_H)
+ check_include_files(crypt.h HAVE_CRYPT_H)
+ check_include_files(sys/stat.h HAVE_SYS_STAT_H)
diff --git a/source/kde/patch/perlqt.patch b/source/kde/patch/perlqt.patch
new file mode 100644
index 00000000..b1aaf264
--- /dev/null
+++ b/source/kde/patch/perlqt.patch
@@ -0,0 +1,3 @@
+# Fix build:
+zcat $CWD/patch/perlqt/perlqt.gcc6.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/source/kde/patch/perlqt/perlqt.gcc6.diff b/source/kde/patch/perlqt/perlqt.gcc6.diff
new file mode 100644
index 00000000..9a6e42ea
--- /dev/null
+++ b/source/kde/patch/perlqt/perlqt.gcc6.diff
@@ -0,0 +1,11 @@
+--- ./qtcore/src/util.cpp.orig 2014-11-04 16:59:39.000000000 -0600
++++ ./qtcore/src/util.cpp 2017-10-04 22:25:36.055839800 -0500
+@@ -2251,7 +2251,7 @@
+ methcache.insert(mcid, new Smoke::ModuleIndex(mi));
+ }
+
+- static smokeperl_object nothis = { 0, 0, 0, false };
++ static smokeperl_object nothis = { 0, 0, 0, NULL };
+ smokeperl_object* call_this = 0;
+ if ( SvOK(sv_this) ) {
+ call_this = sv_obj_info( sv_this );
diff --git a/source/kde/patch/print-manager.patch b/source/kde/patch/print-manager.patch
new file mode 100644
index 00000000..46e0f2b9
--- /dev/null
+++ b/source/kde/patch/print-manager.patch
@@ -0,0 +1 @@
+zcat $CWD/patch/print-manager/print-manager.fix.build.against.cups22.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/kde/patch/print-manager/print-manager.fix.build.against.cups22.diff b/source/kde/patch/print-manager/print-manager.fix.build.against.cups22.diff
new file mode 100644
index 00000000..53010fba
--- /dev/null
+++ b/source/kde/patch/print-manager/print-manager.fix.build.against.cups22.diff
@@ -0,0 +1,24 @@
+From=20971e75934bc64627226d61565f68aff3c9b0000b Mon Sep 17 00:00:00 2001
+From: Rex Dieter <rdieter@math.unl.edu>
+Date: Mon, 12 Sep 2016 11:58:12 -0500
+Subject: [PATCH] fix FTBFS against cups-2.2
+
+cupsGetPPD2 moved to cups/ppd.h
+
+BUG: 366483
+FIXED-IN: 16.08.2
+---
+ libkcups/KCupsRequest.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libkcups/KCupsRequest.cpp b/libkcups/KCupsRequest.cpp
+index 39a5cf5..3625bec 100644
+--- a/libkcups/KCupsRequest.cpp
++++ b/libkcups/KCupsRequest.cpp
+@@ -29,6 +29,7 @@
+ #include <QStringBuilder>
+
+ #include <cups/adminutil.h>
++#include <cups/ppd.h>
+
+ #define CUPS_DATADIR "/usr/share/cups"
diff --git a/source/kde/patch/pykde4.patch b/source/kde/patch/pykde4.patch
new file mode 100644
index 00000000..97bad9af
--- /dev/null
+++ b/source/kde/patch/pykde4.patch
@@ -0,0 +1,5 @@
+zcat $CWD/patch/pykde4/pykde4.solid.cmake.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/pykde4/0003-Fix-build-with-sip-4.19.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/pykde4/fix_kpythonpluginfactory_build.diff.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/pykde4/Annotate-KAutoMount-as-Abstract.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/pykde4/pykde4-4.14.3-checkstate-sip-4.19.5.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/kde/patch/pykde4/0003-Fix-build-with-sip-4.19.patch b/source/kde/patch/pykde4/0003-Fix-build-with-sip-4.19.patch
new file mode 100644
index 00000000..61ef78df
--- /dev/null
+++ b/source/kde/patch/pykde4/0003-Fix-build-with-sip-4.19.patch
@@ -0,0 +1,599 @@
+From 2d1eadf5d0148c88cb4393993f0269e196cbe7b1 Mon Sep 17 00:00:00 2001
+From: Johannes Huber <johu@gentoo.org>
+Date: Mon, 9 Jan 2017 11:52:12 +0100
+Subject: [PATCH 3/3] Fix build with sip 4.19
+
+REVIEW: 129799
+---
+ sip/dnssd/remoteservice.sip | 10 +++++-----
+ sip/kdecore/kmimetype.sip | 10 +++++-----
+ sip/kdecore/ksharedconfig.sip | 4 ++--
+ sip/kdecore/ksycocaentry.sip | 10 +++++-----
+ sip/kdecore/typedefs.sip | 30 +++++++++++++++---------------
+ sip/kdeui/kcompletion.sip | 10 +++++-----
+ sip/kdeui/kxmlguibuilder.sip | 4 ++--
+ sip/kio/kservicegroup.sip | 10 +++++-----
+ sip/ktexteditor/markinterface.sip | 10 +++++-----
+ sip/phonon/objectdescription.sip | 10 +++++-----
+ sip/soprano/pluginmanager.sip | 30 +++++++++++++++---------------
+ 11 files changed, 69 insertions(+), 69 deletions(-)
+
+diff --git a/sip/dnssd/remoteservice.sip b/sip/dnssd/remoteservice.sip
+index 5c5397a..44db887 100644
+--- a/sip/dnssd/remoteservice.sip
++++ b/sip/dnssd/remoteservice.sip
+@@ -66,7 +66,7 @@ protected:
+ DNSSD::RemoteService::Ptr *t = new DNSSD::RemoteService::Ptr (sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromNewInstance(t->data(), sipClass_DNSSD_RemoteService, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromNewType(t->data(), sipType_DNSSD_RemoteService, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ delete t;
+@@ -88,7 +88,7 @@ protected:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_DNSSD_RemoteService, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_DNSSD_RemoteService, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -99,11 +99,11 @@ protected:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- DNSSD::RemoteService *t = reinterpret_cast<DNSSD::RemoteService *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_DNSSD_RemoteService, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ DNSSD::RemoteService *t = reinterpret_cast<DNSSD::RemoteService *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_DNSSD_RemoteService, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_DNSSD_RemoteService, state);
++ sipReleaseType(t, sipType_DNSSD_RemoteService, state);
+
+ delete ql;
+ return 0;
+@@ -113,7 +113,7 @@ protected:
+
+ ql->append(*tptr);
+
+- sipReleaseInstance(t, sipClass_DNSSD_RemoteService, state);
++ sipReleaseType(t, sipType_DNSSD_RemoteService, state);
+ }
+
+ *sipCppPtr = ql;
+diff --git a/sip/kdecore/kmimetype.sip b/sip/kdecore/kmimetype.sip
+index b2d21f7..2945210 100644
+--- a/sip/kdecore/kmimetype.sip
++++ b/sip/kdecore/kmimetype.sip
+@@ -100,7 +100,7 @@ public:
+ KMimeType::Ptr *t = new KMimeType::Ptr (sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromNewInstance(t->data(), sipClass_KMimeType, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromNewType(t->data(), sipType_KMimeType, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ delete t;
+@@ -122,7 +122,7 @@ public:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_KMimeType, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_KMimeType, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -133,11 +133,11 @@ public:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- KMimeType *t = reinterpret_cast<KMimeType *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_KMimeType, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ KMimeType *t = reinterpret_cast<KMimeType *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_KMimeType, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_KMimeType, state);
++ sipReleaseType(t, sipType_KMimeType, state);
+
+ delete ql;
+ return 0;
+@@ -147,7 +147,7 @@ public:
+
+ ql->append(*tptr);
+
+- sipReleaseInstance(t, sipClass_KMimeType, state);
++ sipReleaseType(t, sipType_KMimeType, state);
+ }
+
+ *sipCppPtr = ql;
+diff --git a/sip/kdecore/ksharedconfig.sip b/sip/kdecore/ksharedconfig.sip
+index 54b1599..9442d80 100644
+--- a/sip/kdecore/ksharedconfig.sip
++++ b/sip/kdecore/ksharedconfig.sip
+@@ -65,7 +65,7 @@ typedef KSharedConfig::Ptr KSharedConfigPtr;
+ KSharedConfigPtr kcpp = *sipCpp;
+ KSharedConfig *ksc = kcpp.data ();
+ ksc->ref.ref();
+- PyObject *pyKsc = sipConvertFromInstance(ksc, sipClass_KSharedConfig, sipTransferObj);
++ PyObject *pyKsc = sipConvertFromType(ksc, sipType_KSharedConfig, sipTransferObj);
+ return pyKsc;
+ %End
+
+@@ -74,7 +74,7 @@ typedef KSharedConfig::Ptr KSharedConfigPtr;
+ return 1;
+
+ int state;
+- KSharedConfig* ksc = (KSharedConfig *)sipConvertToInstance(sipPy, sipClass_KSharedConfig, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr);
++ KSharedConfig* ksc = (KSharedConfig *)sipConvertToType(sipPy, sipType_KSharedConfig, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr);
+ *sipCppPtr = new KSharedConfigPtr (ksc);
+ ksc->ref.deref();
+ return sipGetState(sipTransferObj);
+diff --git a/sip/kdecore/ksycocaentry.sip b/sip/kdecore/ksycocaentry.sip
+index 4632e4a..ceb85fa 100644
+--- a/sip/kdecore/ksycocaentry.sip
++++ b/sip/kdecore/ksycocaentry.sip
+@@ -83,7 +83,7 @@ private:
+ KSycocaEntry::Ptr *t = new KSycocaEntry::Ptr (sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromNewInstance(t->data(), sipClass_KSycocaEntry, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromNewType(t->data(), sipType_KSycocaEntry, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ delete t;
+@@ -105,7 +105,7 @@ private:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_KSycocaEntry, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_KSycocaEntry, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -116,11 +116,11 @@ private:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- KSycocaEntry *t = reinterpret_cast<KSycocaEntry *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_KSycocaEntry, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ KSycocaEntry *t = reinterpret_cast<KSycocaEntry *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_KSycocaEntry, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_KSycocaEntry, state);
++ sipReleaseType(t, sipType_KSycocaEntry, state);
+
+ delete ql;
+ return 0;
+@@ -130,7 +130,7 @@ private:
+
+ ql->append(*tptr);
+
+- sipReleaseInstance(t, sipClass_KSycocaEntry, state);
++ sipReleaseType(t, sipType_KSycocaEntry, state);
+ }
+
+ *sipCppPtr = ql;
+diff --git a/sip/kdecore/typedefs.sip b/sip/kdecore/typedefs.sip
+index af53f85..23956b7 100644
+--- a/sip/kdecore/typedefs.sip
++++ b/sip/kdecore/typedefs.sip
+@@ -397,8 +397,8 @@ template <TYPE1,TYPE2>
+ TYPE1 *t1 = new TYPE1(i.key());
+ TYPE2 *t2 = new TYPE2(i.value());
+
+- PyObject *t1obj = sipConvertFromNewInstance(t1, sipClass_TYPE1, sipTransferObj);
+- PyObject *t2obj = sipConvertFromNewInstance(t2, sipClass_TYPE2, sipTransferObj);
++ PyObject *t1obj = sipConvertFromNewType(t1, sipType_TYPE1, sipTransferObj);
++ PyObject *t2obj = sipConvertFromNewType(t2, sipType_TYPE2, sipTransferObj);
+
+ if (t1obj == NULL || t2obj == NULL || PyDict_SetItem(d, t1obj, t2obj) < 0)
+ {
+@@ -438,10 +438,10 @@ template <TYPE1,TYPE2>
+
+ while (PyDict_Next(sipPy, &i, &t1obj, &t2obj))
+ {
+- if (!sipCanConvertToInstance(t1obj, sipClass_TYPE1, SIP_NOT_NONE))
++ if (!sipCanConvertToType(t1obj, sipType_TYPE1, SIP_NOT_NONE))
+ return 0;
+
+- if (!sipCanConvertToInstance(t2obj, sipClass_TYPE2, SIP_NOT_NONE))
++ if (!sipCanConvertToType(t2obj, sipType_TYPE2, SIP_NOT_NONE))
+ return 0;
+ }
+
+@@ -454,13 +454,13 @@ template <TYPE1,TYPE2>
+ {
+ int state1, state2;
+
+- TYPE1 *t1 = reinterpret_cast<TYPE1 *>(sipConvertToInstance(t1obj, sipClass_TYPE1, sipTransferObj, SIP_NOT_NONE, &state1, sipIsErr));
+- TYPE2 *t2 = reinterpret_cast<TYPE2 *>(sipConvertToInstance(t2obj, sipClass_TYPE2, sipTransferObj, SIP_NOT_NONE, &state2, sipIsErr));
++ TYPE1 *t1 = reinterpret_cast<TYPE1 *>(sipConvertToType(t1obj, sipType_TYPE1, sipTransferObj, SIP_NOT_NONE, &state1, sipIsErr));
++ TYPE2 *t2 = reinterpret_cast<TYPE2 *>(sipConvertToType(t2obj, sipType_TYPE2, sipTransferObj, SIP_NOT_NONE, &state2, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t1, sipClass_TYPE1, state1);
+- sipReleaseInstance(t2, sipClass_TYPE2, state2);
++ sipReleaseType(t1, sipType_TYPE1, state1);
++ sipReleaseType(t2, sipType_TYPE2, state2);
+
+ delete qm;
+ return 0;
+@@ -468,8 +468,8 @@ template <TYPE1,TYPE2>
+
+ qm->insert(*t1, *t2);
+
+- sipReleaseInstance(t1, sipClass_TYPE1, state1);
+- sipReleaseInstance(t2, sipClass_TYPE2, state2);
++ sipReleaseType(t1, sipType_TYPE1, state1);
++ sipReleaseType(t2, sipType_TYPE2, state2);
+ }
+
+ *sipCppPtr = qm;
+@@ -669,7 +669,7 @@ template <TYPE*>
+ TYPE *t = (TYPE *)(sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromNewInstance(t, sipClass_TYPE, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromNewType(t, sipType_TYPE, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ delete t;
+@@ -691,7 +691,7 @@ template <TYPE*>
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -702,11 +702,11 @@ template <TYPE*>
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_TYPE, state);
++ sipReleaseType(t, sipType_TYPE, state);
+
+ delete qv;
+ return 0;
+@@ -714,7 +714,7 @@ template <TYPE*>
+
+ qv->append(t);
+
+- sipReleaseInstance(t, sipClass_TYPE, state);
++ sipReleaseType(t, sipType_TYPE, state);
+ }
+
+ *sipCppPtr = qv;
+diff --git a/sip/kdeui/kcompletion.sip b/sip/kdeui/kcompletion.sip
+index f1d327f..938506a 100644
+--- a/sip/kdeui/kcompletion.sip
++++ b/sip/kdeui/kcompletion.sip
+@@ -176,7 +176,7 @@ public:
+ #else
+ PyObject *kobj = PyInt_FromLong((int)i.key());
+ #endif
+- PyObject *tobj = sipConvertFromNewInstance(t, sipClass_KShortcut, sipTransferObj);
++ PyObject *tobj = sipConvertFromNewType(t, sipType_KShortcut, sipTransferObj);
+
+ if (kobj == NULL || tobj == NULL || PyDict_SetItem(d, kobj, tobj) < 0)
+ {
+@@ -213,7 +213,7 @@ public:
+ return 0;
+
+ while (PyDict_Next(sipPy, &i, &kobj, &tobj))
+- if (!sipCanConvertToInstance(tobj, sipClass_KShortcut, SIP_NOT_NONE))
++ if (!sipCanConvertToType(tobj, sipType_KShortcut, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -229,11 +229,11 @@ public:
+ #else
+ int k = PyInt_AsLong(kobj);
+ #endif
+- KShortcut *t = reinterpret_cast<KShortcut *>(sipConvertToInstance(tobj, sipClass_KShortcut, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ KShortcut *t = reinterpret_cast<KShortcut *>(sipConvertToType(tobj, sipType_KShortcut, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_KShortcut, state);
++ sipReleaseType(t, sipType_KShortcut, state);
+
+ delete qm;
+ return 0;
+@@ -241,7 +241,7 @@ public:
+
+ qm->insert((KCompletionBase::KeyBindingType)k, *t);
+
+- sipReleaseInstance(t, sipClass_KShortcut, state);
++ sipReleaseType(t, sipType_KShortcut, state);
+ }
+
+ *sipCppPtr = qm;
+diff --git a/sip/kdeui/kxmlguibuilder.sip b/sip/kdeui/kxmlguibuilder.sip
+index 41ae2aa..e4cf187 100644
+--- a/sip/kdeui/kxmlguibuilder.sip
++++ b/sip/kdeui/kxmlguibuilder.sip
+@@ -49,10 +49,10 @@ QAction *containerAction;
+ PyObject *pyWidget;
+ PyObject *pyContainerAction;
+
+- if ((pyWidget = sipConvertFromNewInstance(res, sipClass_QWidget, NULL)) == NULL)
++ if ((pyWidget = sipConvertFromNewType(res, sipType_QWidget, NULL)) == NULL)
+ return NULL;
+
+- if ((pyContainerAction = sipConvertFromNewInstance(containerAction, sipClass_QAction, NULL)) == NULL)
++ if ((pyContainerAction = sipConvertFromNewType(containerAction, sipType_QAction, NULL)) == NULL)
+ return NULL;
+
+ sipRes = Py_BuildValue ("NN", pyWidget, pyContainerAction);
+diff --git a/sip/kio/kservicegroup.sip b/sip/kio/kservicegroup.sip
+index a1ef981..1ddce37 100644
+--- a/sip/kio/kservicegroup.sip
++++ b/sip/kio/kservicegroup.sip
+@@ -151,7 +151,7 @@ public:
+ KServiceGroup::SPtr *t = new KServiceGroup::SPtr (sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromNewInstance(t->data(), sipClass_KServiceGroup, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromNewType(t->data(), sipType_KServiceGroup, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ delete t;
+@@ -173,7 +173,7 @@ public:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_KServiceGroup, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_KServiceGroup, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -184,11 +184,11 @@ public:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- KServiceGroup *t = reinterpret_cast<KServiceGroup *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_KServiceGroup, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ KServiceGroup *t = reinterpret_cast<KServiceGroup *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_KServiceGroup, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_KServiceGroup, state);
++ sipReleaseType(t, sipType_KServiceGroup, state);
+
+ delete ql;
+ return 0;
+@@ -198,7 +198,7 @@ public:
+
+ ql->append(*tptr);
+
+- sipReleaseInstance(t, sipClass_KServiceGroup, state);
++ sipReleaseType(t, sipType_KServiceGroup, state);
+ }
+
+ *sipCppPtr = ql;
+diff --git a/sip/ktexteditor/markinterface.sip b/sip/ktexteditor/markinterface.sip
+index d9b0ec9..888c506 100644
+--- a/sip/ktexteditor/markinterface.sip
++++ b/sip/ktexteditor/markinterface.sip
+@@ -158,7 +158,7 @@ signals:
+ #else
+ PyObject *t1obj = PyInt_FromLong ((long)t1);
+ #endif
+- PyObject *t2obj = sipConvertFromNewInstance(t2, sipClass_KTextEditor_Mark, sipTransferObj);
++ PyObject *t2obj = sipConvertFromNewType(t2, sipType_KTextEditor_Mark, sipTransferObj);
+
+ if (t2obj == NULL || PyDict_SetItem(d, t1obj, t2obj) < 0)
+ {
+@@ -203,7 +203,7 @@ signals:
+ #endif
+ return 0;
+
+- if (!sipCanConvertToInstance(t2obj, sipClass_KTextEditor_Mark, SIP_NOT_NONE))
++ if (!sipCanConvertToType(t2obj, sipType_KTextEditor_Mark, SIP_NOT_NONE))
+ return 0;
+ }
+
+@@ -221,11 +221,11 @@ signals:
+ #else
+ int t1 = PyInt_AS_LONG (t1obj);
+ #endif
+- KTextEditor::Mark *t2 = reinterpret_cast<KTextEditor::Mark *>(sipConvertToInstance(t2obj, sipClass_KTextEditor_Mark, sipTransferObj, SIP_NOT_NONE, &state2, sipIsErr));
++ KTextEditor::Mark *t2 = reinterpret_cast<KTextEditor::Mark *>(sipConvertToType(t2obj, sipType_KTextEditor_Mark, sipTransferObj, SIP_NOT_NONE, &state2, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t2, sipClass_KTextEditor_Mark, state2);
++ sipReleaseType(t2, sipType_KTextEditor_Mark, state2);
+
+ delete qm;
+ return 0;
+@@ -233,7 +233,7 @@ signals:
+
+ qm->insert(t1, t2);
+
+- sipReleaseInstance(t2, sipClass_KTextEditor_Mark, state2);
++ sipReleaseType(t2, sipType_KTextEditor_Mark, state2);
+ }
+
+ *sipCppPtr = qm;
+diff --git a/sip/phonon/objectdescription.sip b/sip/phonon/objectdescription.sip
+index 2b86d5e..015b2ef 100644
+--- a/sip/phonon/objectdescription.sip
++++ b/sip/phonon/objectdescription.sip
+@@ -116,7 +116,7 @@ void registerMetaTypes ();
+ DNSSD::RemoteService::Ptr *t = new Phonon::ObjectDescription (sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromNewInstance(t->data(), sipClass_DNSSD_RemoteService, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromNewType(t->data(), sipType_DNSSD_RemoteService, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ delete t;
+@@ -138,7 +138,7 @@ void registerMetaTypes ();
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_DNSSD_RemoteService, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_DNSSD_RemoteService, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -149,11 +149,11 @@ void registerMetaTypes ();
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- DNSSD::RemoteService *t = reinterpret_cast<DNSSD::RemoteService *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_DNSSD_RemoteService, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ DNSSD::RemoteService *t = reinterpret_cast<DNSSD::RemoteService *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_DNSSD_RemoteService, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_DNSSD_RemoteService, state);
++ sipReleaseType(t, sipType_DNSSD_RemoteService, state);
+
+ delete ql;
+ return 0;
+@@ -163,7 +163,7 @@ void registerMetaTypes ();
+
+ ql->append(*tptr);
+
+- sipReleaseInstance(t, sipClass_DNSSD_RemoteService, state);
++ sipReleaseType(t, sipType_DNSSD_RemoteService, state);
+ }
+
+ *sipCppPtr = ql;
+diff --git a/sip/soprano/pluginmanager.sip b/sip/soprano/pluginmanager.sip
+index c2be1c3..fe990f8 100644
+--- a/sip/soprano/pluginmanager.sip
++++ b/sip/soprano/pluginmanager.sip
+@@ -73,7 +73,7 @@ public:
+ Soprano::Backend* t = const_cast<Soprano::Backend*>(sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromInstance(t, sipClass_Soprano_Backend, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromType(t, sipType_Soprano_Backend, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ return NULL;
+@@ -93,7 +93,7 @@ public:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_Soprano_Backend, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_Soprano_Backend, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -104,18 +104,18 @@ public:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- const Soprano::Backend*t = reinterpret_cast<const Soprano::Backend*>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_Soprano_Backend, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ const Soprano::Backend*t = reinterpret_cast<const Soprano::Backend*>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_Soprano_Backend, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(const_cast<Soprano::Backend*>(t), sipClass_Soprano_Backend, state);
++ sipReleaseType(const_cast<Soprano::Backend*>(t), sipType_Soprano_Backend, state);
+
+ delete ql;
+ return 0;
+ }
+ ql->append(t);
+
+- sipReleaseInstance(const_cast<Soprano::Backend*>(t), sipClass_Soprano_Backend, state);
++ sipReleaseType(const_cast<Soprano::Backend*>(t), sipType_Soprano_Backend, state);
+ }
+
+ *sipCppPtr = ql;
+@@ -144,7 +144,7 @@ public:
+ Soprano::Parser* t = const_cast<Soprano::Parser*>(sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromInstance(t, sipClass_Soprano_Parser, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromType(t, sipType_Soprano_Parser, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ return NULL;
+@@ -164,7 +164,7 @@ public:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_Soprano_Parser, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_Soprano_Parser, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -175,18 +175,18 @@ public:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- const Soprano::Parser*t = reinterpret_cast<const Soprano::Parser*>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_Soprano_Parser, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ const Soprano::Parser*t = reinterpret_cast<const Soprano::Parser*>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_Soprano_Parser, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(const_cast<Soprano::Parser*>(t), sipClass_Soprano_Parser, state);
++ sipReleaseType(const_cast<Soprano::Parser*>(t), sipType_Soprano_Parser, state);
+
+ delete ql;
+ return 0;
+ }
+ ql->append(t);
+
+- sipReleaseInstance(const_cast<Soprano::Parser*>(t), sipClass_Soprano_Parser, state);
++ sipReleaseType(const_cast<Soprano::Parser*>(t), sipType_Soprano_Parser, state);
+ }
+
+ *sipCppPtr = ql;
+@@ -215,7 +215,7 @@ public:
+ Soprano::Serializer* t = const_cast<Soprano::Serializer*>(sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromInstance(t, sipClass_Soprano_Serializer, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromType(t, sipType_Soprano_Serializer, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ return NULL;
+@@ -235,7 +235,7 @@ public:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_Soprano_Serializer, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_Soprano_Serializer, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -246,18 +246,18 @@ public:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- const Soprano::Serializer*t = reinterpret_cast<const Soprano::Serializer*>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_Soprano_Serializer, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ const Soprano::Serializer*t = reinterpret_cast<const Soprano::Serializer*>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_Soprano_Serializer, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(const_cast<Soprano::Serializer*>(t), sipClass_Soprano_Serializer, state);
++ sipReleaseType(const_cast<Soprano::Serializer*>(t), sipType_Soprano_Serializer, state);
+
+ delete ql;
+ return 0;
+ }
+ ql->append(t);
+
+- sipReleaseInstance(const_cast<Soprano::Serializer*>(t), sipClass_Soprano_Serializer, state);
++ sipReleaseType(const_cast<Soprano::Serializer*>(t), sipType_Soprano_Serializer, state);
+ }
+
+ *sipCppPtr = ql;
+--
+2.9.3
+
diff --git a/source/kde/patch/pykde4/Annotate-KAutoMount-as-Abstract.patch b/source/kde/patch/pykde4/Annotate-KAutoMount-as-Abstract.patch
new file mode 100644
index 00000000..1cee8e79
--- /dev/null
+++ b/source/kde/patch/pykde4/Annotate-KAutoMount-as-Abstract.patch
@@ -0,0 +1,21 @@
+diff -ur pykde4-4.14.3.old/sip/kio/kautomount.sip pykde4-4.14.3/sip/kio/kautomount.sip
+--- pykde4-4.14.3.old/sip/kio/kautomount.sip 2014-08-14 22:17:11.000000000 +0200
++++ pykde4-4.14.3/sip/kio/kautomount.sip 2017-02-25 19:17:16.511589230 +0100
+@@ -20,7 +20,7 @@
+ // along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+-class KAutoMount : QObject
++class KAutoMount : QObject /Abstract/
+ {
+ %TypeHeaderCode
+ #include <kautomount.h>
+@@ -42,7 +42,7 @@
+ // KAutoMount
+
+
+-class KAutoUnmount : QObject
++class KAutoUnmount : QObject /Abstract/
+ {
+ %TypeHeaderCode
+ #include <kautomount.h>
diff --git a/source/kde/patch/pykde4/fix_kpythonpluginfactory_build.diff b/source/kde/patch/pykde4/fix_kpythonpluginfactory_build.diff
new file mode 100644
index 00000000..71f5928c
--- /dev/null
+++ b/source/kde/patch/pykde4/fix_kpythonpluginfactory_build.diff
@@ -0,0 +1,26 @@
+From: Modestas Vainius <modax@debian.org>
+Subject: Include Python.h first as Qt includes steal "slots" keyword
+Forwarded: no
+Origin: vendor
+Last-Update: 2008-12-05
+
+Index: pykde4-4.9.80/kpythonpluginfactory/kpythonpluginfactory.cpp
+===================================================================
+--- pykde4-4.9.80.orig/kpythonpluginfactory/kpythonpluginfactory.cpp 2012-11-14 16:14:05.000000000 +0000
++++ pykde4-4.9.80/kpythonpluginfactory/kpythonpluginfactory.cpp 2012-11-19 17:23:32.497203781 +0000
+@@ -18,6 +18,7 @@
+ Boston, MA 02111-1307, USA.
+ */
+
++#include <Python.h>
+ #include <QtCore/QCoreApplication>
+ #include <QFileInfo>
+ #include <QDir>
+@@ -25,7 +26,6 @@
+ #include <klibloader.h>
+ #include <kstandarddirs.h>
+ #include <kcmodule.h>
+-#include <Python.h>
+ #include <kcomponentdata.h>
+ #include <kdebug.h>
+
diff --git a/source/kde/patch/pykde4/pykde4-4.14.3-checkstate-sip-4.19.5.patch b/source/kde/patch/pykde4/pykde4-4.14.3-checkstate-sip-4.19.5.patch
new file mode 100644
index 00000000..ffc5384d
--- /dev/null
+++ b/source/kde/patch/pykde4/pykde4-4.14.3-checkstate-sip-4.19.5.patch
@@ -0,0 +1,24 @@
+diff -up pykde4-4.14.3/sip/kdeui/kfontchooser.sip.me pykde4-4.14.3/sip/kdeui/kfontchooser.sip
+--- pykde4-4.14.3/sip/kdeui/kfontchooser.sip.me 2018-01-17 13:16:50.738465947 +0100
++++ pykde4-4.14.3/sip/kdeui/kfontchooser.sip 2018-01-17 13:28:24.665226258 +0100
+@@ -59,7 +59,7 @@ public:
+
+ typedef QFlags<KFontChooser::DisplayFlag> DisplayFlags;
+
+- explicit KFontChooser (QWidget* parent /TransferThis/ = 0, const KFontChooser::DisplayFlags& flags = KFontChooser::DisplayFrame, const QStringList& fontList = QStringList(), int visibleListSize = 8, Qt::CheckState* sizeIsRelativeState = 0) [(QWidget* = 0, const KFontChooser::DisplayFlags& = KFontChooser::DisplayFrame, const QStringList& = QStringList(), int = 8, Qt::CheckState* = 0)];
++ explicit KFontChooser (QWidget* parent /TransferThis/ = 0, const KFontChooser::DisplayFlags& flags = KFontChooser::DisplayFrame, const QStringList& fontList = QStringList(), int visibleListSize = 8, Qt::CheckState sizeIsRelativeState = Qt::Unchecked) [(QWidget* = 0, const KFontChooser::DisplayFlags& = KFontChooser::DisplayFrame, const QStringList& = QStringList(), int = 8, Qt::CheckState* = 0)];
+ %MethodCode
+ Py_BEGIN_ALLOW_THREADS
+ sipCpp = new sipKFontChooser (a0, *a1, *a2, a3, &a4);
+diff -up pykde4-4.14.3/sip/kdeui/kfontdialog.sip.me pykde4-4.14.3/sip/kdeui/kfontdialog.sip
+--- pykde4-4.14.3/sip/kdeui/kfontdialog.sip.me 2018-01-17 13:18:31.112670465 +0100
++++ pykde4-4.14.3/sip/kdeui/kfontdialog.sip 2018-01-17 13:28:00.121154351 +0100
+@@ -28,7 +28,7 @@ class KFontDialog : KDialog
+
+
+ public:
+- explicit KFontDialog (QWidget* parent /TransferThis/ = 0, const KFontChooser::DisplayFlags& flags = KFontChooser::NoDisplayFlags, const QStringList& fontlist = QStringList(), Qt::CheckState* sizeIsRelativeState = 0) [(QWidget* = 0, const KFontChooser::DisplayFlags& = KFontChooser::NoDisplayFlags, const QStringList& = QStringList(), Qt::CheckState* = 0)];
++ explicit KFontDialog (QWidget* parent /TransferThis/ = 0, const KFontChooser::DisplayFlags& flags = KFontChooser::NoDisplayFlags, const QStringList& fontlist = QStringList(), Qt::CheckState sizeIsRelativeState = Qt::Unchecked) [(QWidget* = 0, const KFontChooser::DisplayFlags& = KFontChooser::NoDisplayFlags, const QStringList& = QStringList(), Qt::CheckState* = 0)];
+ %MethodCode
+ Py_BEGIN_ALLOW_THREADS
+ sipCpp= new sipKFontDialog (a0, *a1, *a2, &a3);
diff --git a/source/kde/patch/pykde4/pykde4.solid.cmake.diff b/source/kde/patch/pykde4/pykde4.solid.cmake.diff
new file mode 100644
index 00000000..e4f6cdc7
--- /dev/null
+++ b/source/kde/patch/pykde4/pykde4.solid.cmake.diff
@@ -0,0 +1,20 @@
+--- ./CMakeLists.txt.orig 2014-08-14 15:17:11.000000000 -0500
++++ ./CMakeLists.txt 2016-09-07 14:32:28.115226093 -0500
+@@ -166,7 +166,7 @@
+
+ file(GLOB kio_files_sip sip/kio/*.sip)
+ set(SIP_EXTRA_FILES_DEPEND ${kio_files_sip})
+-add_sip_python_module(PyKDE4.kio sip/kio/kiomod.sip ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS})
++add_sip_python_module(PyKDE4.kio sip/kio/kiomod.sip ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_SOLID_LIBS})
+
+ file(GLOB kutils_files_sip sip/kutils/*.sip)
+ set(SIP_EXTRA_FILES_DEPEND ${kutils_files_sip})
+@@ -190,7 +190,7 @@
+
+ file(GLOB dnssd_files_sip sip/dnssd/*.sip)
+ set(SIP_EXTRA_FILES_DEPEND ${dnssd_files_sip})
+-add_sip_python_module(PyKDE4.dnssd sip/dnssd/dnssdmod.sip ${KDE4_KDNSSD_LIBS} ${QT_QTCORE_LIBRARY})
++add_sip_python_module(PyKDE4.dnssd sip/dnssd/dnssdmod.sip ${KDE4_KDNSSD_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY})
+
+ file(GLOB phonon_files_sip sip/phonon/*.sip)
+ set(SIP_EXTRA_FILES_DEPEND ${phonon_files_sip})