git » kate.git » commit 6368ac9

Upstream release

author Felix Yan
2016-08-21 02:37:04 UTC
committer Felix Yan
2016-08-21 02:37:04 UTC
parent 6bf010f62e2c6a61a6e5e521980a021c26c6f502

Upstream release

PKGBUILD +4 -9
kdebug-363297.patch +0 -103

diff --git a/PKGBUILD b/PKGBUILD
index d71c48a..392ab3b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,22 +5,17 @@
 pkgbase=kate
 pkgname=('kwrite'
          'kate')
-pkgver=16.04.3
+pkgver=16.08.0
 pkgrel=1
 arch=('i686' 'x86_64')
 license=('GPL' 'LGPL' 'FDL')
 makedepends=('extra-cmake-modules' 'kdoctools' 'python' 'plasma-framework' 'knewstuff' 'ktexteditor'
              'threadweaver' 'kitemmodels' 'kactivities')
-source=("http://download.kde.org/stable/applications/${pkgver}/src/${pkgbase}-${pkgver}.tar.xz" kdebug-363297.patch)
-sha1sums=('82fd6f223cea420302a7de892400f2bc916e9251'
-          '1efebf617f8407a5b2d58338ea8860fbe86cdf90')
+source=("http://download.kde.org/stable/applications/${pkgver}/src/${pkgbase}-${pkgver}.tar.xz")
+sha1sums=('8df18af96e3e33d38573123a35f8fccb095e269d')
 
 prepare() {
   mkdir -p build
-
-# Fix opening file:// url's http://bugs.kde.org/show_bug.cgi?id=363297
-  cd $pkgbase-$pkgver
-  patch -p1 -i ../kdebug-363297.patch
 }
 
 build() {
@@ -28,7 +23,7 @@ build() {
   cmake ../${pkgbase}-${pkgver} \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DCMAKE_INSTALL_LIBDIR=lib \
+    -DKDE_INSTALL_LIBDIR=lib \
     -DSYSCONF_INSTALL_DIR=/etc \
     -DBUILD_TESTING=OFF
   make
diff --git a/kdebug-363297.patch b/kdebug-363297.patch
deleted file mode 100644
index 2bcf9f6..0000000
--- a/kdebug-363297.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/urlinfo.h.orig	2016-04-30 21:08:20.000000000 +0000
-+++ b/urlinfo.h	2016-05-29 16:12:59.684139033 +0000
-@@ -25,38 +25,79 @@
- #include <QRegularExpression>
- #include <QString>
- 
--// Represents a file to be opened, consisting of its URL and the cursor to jump to.
--struct UrlInfo
-+/**
-+ * Represents a file to be opened, consisting of its URL and the cursor to jump to.
-+ */
-+class UrlInfo
- {
--    // Parses a file path argument and determines its line number and column and full path
-+public:
-+    /**
-+     * Parses a file path argument and determines its line number and column and full path
-+     * @param path path passed on e.g. command line to parse into an URL
-+     */
-     UrlInfo(QString path)
-         : cursor(KTextEditor::Cursor::invalid())
-     {
--        // convert to an url
--        const QRegularExpression withProtocol(QStringLiteral("^[a-zA-Z]+://")); // TODO: remove after Qt supports this on its own
--        if (withProtocol.match(path).hasMatch()) {
--            url = QUrl::fromUserInput(path);
--        } else {
-+        /**
-+         * construct url:
-+         *   - make relative paths absolute using the current working directory
-+         *   - prefer local file, if in doubt!
-+         */
-+        url = QUrl::fromUserInput(path, QDir::currentPath(), QUrl::AssumeLocalFile);
-+
-+        /**
-+         * in some cases, this will fail, e.g. if you have line/column specs like test.c:10:1
-+         * => fallback: assume a local file and just convert it to an url
-+         */
-+        if (!url.isValid()) {
-+            /**
-+             * create absolute file path, we will e.g. pass this over dbus to other processes
-+             */
-             url = QUrl::fromLocalFile(QDir::current().absoluteFilePath(path));
-         }
- 
--        if (url.isLocalFile() && !QFile::exists(path)) {
--            // Allow opening specific lines in documents, like mydoc.cpp:10
--            // also supports columns, i.e. mydoc.cpp:10:42
--            static const QRegularExpression pattern(QStringLiteral(":(\\d+)(?::(\\d+))?$"));
--            const auto match = pattern.match(path);
--            if (match.isValid()) {
--                path.chop(match.capturedLength());
--                int line = match.captured(1).toInt() - 1;
--                // don't use an invalid column when the line is valid
--                int column = qMax(0, match.captured(2).toInt() - 1);
--                url = QUrl::fromLocalFile(QDir::current().absoluteFilePath(path));
--                cursor = {line, column};
--            }
-+        /**
-+         * Allow opening specific lines in documents, like mydoc.cpp:10
-+         * also supports columns, i.e. mydoc.cpp:10:42
-+         * ignores trailing colons, as compile errors often use that format
-+         */
-+        if (url.isLocalFile() && !QFile::exists(url.toLocalFile())) {
-+            /**
-+             * update path from url, might have been file://...
-+             */
-+            path = url.toLocalFile();
-+
-+            /**
-+             * try to match the line/colum spec, else we are done here
-+             */
-+            const auto match = QRegularExpression(QStringLiteral(":(\\d+)(?::(\\d+))?:?$")).match(path);
-+            if (!match.isValid())
-+                return;
-+
-+            /**
-+             * cut away the line/column specification from the path and update the url
-+             */
-+            path.chop(match.capturedLength());
-+            url = QUrl::fromLocalFile(path);
-+
-+            /**
-+             * set right cursor position
-+             */
-+            int line = match.captured(1).toInt() - 1;
-+            // don't use an invalid column when the line is valid
-+            int column = qMax(0, match.captured(2).toInt() - 1);
-+            cursor = {line, column};
-         }
-     }
- 
-+    /**
-+     * url computed out of the passed path
-+     */
-     QUrl url;
-+
-+    /**
-+     * initial cursor position, if any found inside the path as line/colum specification at the end
-+     */
-     KTextEditor::Cursor cursor;
- };
-