[arch-commits] Commit in kate/repos (6 files)

Antonio Rojas arojas at archlinux.org
Sun May 29 16:25:03 UTC 2016


    Date: Sunday, May 29, 2016 @ 18:25:02
  Author: arojas
Revision: 268735

archrelease: copy trunk to extra-i686, extra-x86_64

Added:
  kate/repos/extra-i686/PKGBUILD
    (from rev 268734, kate/trunk/PKGBUILD)
  kate/repos/extra-i686/kdebug-363297.patch
    (from rev 268734, kate/trunk/kdebug-363297.patch)
  kate/repos/extra-x86_64/PKGBUILD
    (from rev 268734, kate/trunk/PKGBUILD)
  kate/repos/extra-x86_64/kdebug-363297.patch
    (from rev 268734, kate/trunk/kdebug-363297.patch)
Deleted:
  kate/repos/extra-i686/PKGBUILD
  kate/repos/extra-x86_64/PKGBUILD

----------------------------------+
 /PKGBUILD                        |  144 +++++++++++++++++++++++++++++++++++++
 extra-i686/PKGBUILD              |   68 -----------------
 extra-i686/kdebug-363297.patch   |  103 ++++++++++++++++++++++++++
 extra-x86_64/PKGBUILD            |   68 -----------------
 extra-x86_64/kdebug-363297.patch |  103 ++++++++++++++++++++++++++
 5 files changed, 350 insertions(+), 136 deletions(-)

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2016-05-29 16:24:26 UTC (rev 268734)
+++ extra-i686/PKGBUILD	2016-05-29 16:25:02 UTC (rev 268735)
@@ -1,68 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-# Contributor: Andrea Scarpino <andrea at archlinux.org>
-
-pkgbase=kate
-pkgname=('kwrite'
-         'kate')
-pkgver=16.04.1
-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")
-sha1sums=('ba9a31b7293f9b31f55090287804a8d0e9196a36')
-
-prepare() {
-  mkdir -p build
-}
-
-build() {
-  cd build
-  cmake ../${pkgbase}-${pkgver} \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DCMAKE_INSTALL_PREFIX=/usr \
-    -DCMAKE_INSTALL_LIBDIR=lib \
-    -DSYSCONF_INSTALL_DIR=/etc \
-    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-    -DBUILD_TESTING=OFF
-  make
-}
-
-package_kwrite() {
-  pkgdesc="Text Editor"
-  groups=('kde-applications' 'kdebase')
-  url="http://www.kde.org/applications/utilities/kwrite/"
-  depends=('ktexteditor' 'kded' 'kactivities' 'hicolor-icon-theme')
-  replaces=('kdebase-kwrite')
-  conflicts=('kdebase-kwrite')
-  provides=('kdebase-kwrite')
-
-  cd build/kwrite
-  make DESTDIR="${pkgdir}" install
-
-  cd ../../build/doc/kwrite
-  make DESTDIR="${pkgdir}" install
-}
-
-package_kate() {
-  pkgdesc="Advanced Text Editor"
-  groups=('kde-applications' 'kdebase')
-  url="http://www.kde.org/applications/utilities/kate/"
-  depends=('knewstuff' 'ktexteditor' 'threadweaver' 'kded' 'kitemmodels' 'kactivities' 'hicolor-icon-theme')
-  replaces=('kdesdk-kate')
-  conflicts=('kdesdk-kate')
-  provides=('kdesdk-kate')
-  optdepends=('konsole: open a terminal in Kate')
-
-  cd build/kate
-  make DESTDIR="${pkgdir}" install
-
-  cd ../../build/doc/kate
-  make DESTDIR="${pkgdir}" install
-
-  cd ../../../build/addons
-  make DESTDIR="${pkgdir}" install
-}

Copied: kate/repos/extra-i686/PKGBUILD (from rev 268734, kate/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD	                        (rev 0)
+++ extra-i686/PKGBUILD	2016-05-29 16:25:02 UTC (rev 268735)
@@ -0,0 +1,72 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+
+pkgbase=kate
+pkgname=('kwrite'
+         'kate')
+pkgver=16.04.1
+pkgrel=2
+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=('ba9a31b7293f9b31f55090287804a8d0e9196a36'
+          '1efebf617f8407a5b2d58338ea8860fbe86cdf90')
+
+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() {
+  cd build
+  cmake ../${pkgbase}-${pkgver} \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib \
+    -DSYSCONF_INSTALL_DIR=/etc \
+    -DBUILD_TESTING=OFF
+  make
+}
+
+package_kwrite() {
+  pkgdesc="Text Editor"
+  groups=('kde-applications' 'kdebase')
+  url="http://www.kde.org/applications/utilities/kwrite/"
+  depends=('ktexteditor' 'kded' 'kactivities' 'hicolor-icon-theme')
+  replaces=('kdebase-kwrite')
+  conflicts=('kdebase-kwrite')
+  provides=('kdebase-kwrite')
+
+  cd build/kwrite
+  make DESTDIR="${pkgdir}" install
+
+  cd ../../build/doc/kwrite
+  make DESTDIR="${pkgdir}" install
+}
+
+package_kate() {
+  pkgdesc="Advanced Text Editor"
+  groups=('kde-applications' 'kdebase')
+  url="http://www.kde.org/applications/utilities/kate/"
+  depends=('knewstuff' 'ktexteditor' 'threadweaver' 'kded' 'kitemmodels' 'kactivities' 'hicolor-icon-theme')
+  replaces=('kdesdk-kate')
+  conflicts=('kdesdk-kate')
+  provides=('kdesdk-kate')
+  optdepends=('konsole: open a terminal in Kate')
+
+  cd build/kate
+  make DESTDIR="${pkgdir}" install
+
+  cd ../../build/doc/kate
+  make DESTDIR="${pkgdir}" install
+
+  cd ../../../build/addons
+  make DESTDIR="${pkgdir}" install
+}

Copied: kate/repos/extra-i686/kdebug-363297.patch (from rev 268734, kate/trunk/kdebug-363297.patch)
===================================================================
--- extra-i686/kdebug-363297.patch	                        (rev 0)
+++ extra-i686/kdebug-363297.patch	2016-05-29 16:25:02 UTC (rev 268735)
@@ -0,0 +1,103 @@
+--- 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;
+ };
+ 

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2016-05-29 16:24:26 UTC (rev 268734)
+++ extra-x86_64/PKGBUILD	2016-05-29 16:25:02 UTC (rev 268735)
@@ -1,68 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-# Contributor: Andrea Scarpino <andrea at archlinux.org>
-
-pkgbase=kate
-pkgname=('kwrite'
-         'kate')
-pkgver=16.04.1
-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")
-sha1sums=('ba9a31b7293f9b31f55090287804a8d0e9196a36')
-
-prepare() {
-  mkdir -p build
-}
-
-build() {
-  cd build
-  cmake ../${pkgbase}-${pkgver} \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DCMAKE_INSTALL_PREFIX=/usr \
-    -DCMAKE_INSTALL_LIBDIR=lib \
-    -DSYSCONF_INSTALL_DIR=/etc \
-    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-    -DBUILD_TESTING=OFF
-  make
-}
-
-package_kwrite() {
-  pkgdesc="Text Editor"
-  groups=('kde-applications' 'kdebase')
-  url="http://www.kde.org/applications/utilities/kwrite/"
-  depends=('ktexteditor' 'kded' 'kactivities' 'hicolor-icon-theme')
-  replaces=('kdebase-kwrite')
-  conflicts=('kdebase-kwrite')
-  provides=('kdebase-kwrite')
-
-  cd build/kwrite
-  make DESTDIR="${pkgdir}" install
-
-  cd ../../build/doc/kwrite
-  make DESTDIR="${pkgdir}" install
-}
-
-package_kate() {
-  pkgdesc="Advanced Text Editor"
-  groups=('kde-applications' 'kdebase')
-  url="http://www.kde.org/applications/utilities/kate/"
-  depends=('knewstuff' 'ktexteditor' 'threadweaver' 'kded' 'kitemmodels' 'kactivities' 'hicolor-icon-theme')
-  replaces=('kdesdk-kate')
-  conflicts=('kdesdk-kate')
-  provides=('kdesdk-kate')
-  optdepends=('konsole: open a terminal in Kate')
-
-  cd build/kate
-  make DESTDIR="${pkgdir}" install
-
-  cd ../../build/doc/kate
-  make DESTDIR="${pkgdir}" install
-
-  cd ../../../build/addons
-  make DESTDIR="${pkgdir}" install
-}

Copied: kate/repos/extra-x86_64/PKGBUILD (from rev 268734, kate/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD	                        (rev 0)
+++ extra-x86_64/PKGBUILD	2016-05-29 16:25:02 UTC (rev 268735)
@@ -0,0 +1,72 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+
+pkgbase=kate
+pkgname=('kwrite'
+         'kate')
+pkgver=16.04.1
+pkgrel=2
+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=('ba9a31b7293f9b31f55090287804a8d0e9196a36'
+          '1efebf617f8407a5b2d58338ea8860fbe86cdf90')
+
+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() {
+  cd build
+  cmake ../${pkgbase}-${pkgver} \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib \
+    -DSYSCONF_INSTALL_DIR=/etc \
+    -DBUILD_TESTING=OFF
+  make
+}
+
+package_kwrite() {
+  pkgdesc="Text Editor"
+  groups=('kde-applications' 'kdebase')
+  url="http://www.kde.org/applications/utilities/kwrite/"
+  depends=('ktexteditor' 'kded' 'kactivities' 'hicolor-icon-theme')
+  replaces=('kdebase-kwrite')
+  conflicts=('kdebase-kwrite')
+  provides=('kdebase-kwrite')
+
+  cd build/kwrite
+  make DESTDIR="${pkgdir}" install
+
+  cd ../../build/doc/kwrite
+  make DESTDIR="${pkgdir}" install
+}
+
+package_kate() {
+  pkgdesc="Advanced Text Editor"
+  groups=('kde-applications' 'kdebase')
+  url="http://www.kde.org/applications/utilities/kate/"
+  depends=('knewstuff' 'ktexteditor' 'threadweaver' 'kded' 'kitemmodels' 'kactivities' 'hicolor-icon-theme')
+  replaces=('kdesdk-kate')
+  conflicts=('kdesdk-kate')
+  provides=('kdesdk-kate')
+  optdepends=('konsole: open a terminal in Kate')
+
+  cd build/kate
+  make DESTDIR="${pkgdir}" install
+
+  cd ../../build/doc/kate
+  make DESTDIR="${pkgdir}" install
+
+  cd ../../../build/addons
+  make DESTDIR="${pkgdir}" install
+}

Copied: kate/repos/extra-x86_64/kdebug-363297.patch (from rev 268734, kate/trunk/kdebug-363297.patch)
===================================================================
--- extra-x86_64/kdebug-363297.patch	                        (rev 0)
+++ extra-x86_64/kdebug-363297.patch	2016-05-29 16:25:02 UTC (rev 268735)
@@ -0,0 +1,103 @@
+--- 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;
+ };
+ 



More information about the arch-commits mailing list