[arch-commits] Commit in libcontentaction/trunk (PKGBUILD py3.patch)
Felix Yan
felixonmars at archlinux.org
Sun Feb 24 18:49:45 UTC 2019
Date: Sunday, February 24, 2019 @ 18:49:44
Author: felixonmars
Revision: 435543
upgpkg: libcontentaction 0.3.8-1
Added:
libcontentaction/trunk/py3.patch
Modified:
libcontentaction/trunk/PKGBUILD
-----------+
PKGBUILD | 22 ++++++++++++----------
py3.patch | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 10 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-02-24 18:40:41 UTC (rev 435542)
+++ PKGBUILD 2019-02-24 18:49:44 UTC (rev 435543)
@@ -1,24 +1,26 @@
# Maintainer: Felix Yan <felixonmars at archlinux.org>
pkgname=libcontentaction
-pkgver=0.2.6
-pkgrel=3
+pkgver=0.3.8
+pkgrel=1
pkgdesc="Library for associating content with actions"
arch=('x86_64')
url="https://git.merproject.org/mer-core/libcontentaction"
license=('LGPL')
depends=('qt5-systems' 'mlite')
-makedepends=('git' 'qt5-tools' 'python2')
-source=("git+https://git.merproject.org/mer-core/libcontentaction.git#tag=$pkgver")
-sha512sums=('SKIP')
+makedepends=('python' 'qt5-tools')
+source=("https://git.merproject.org/mer-core/libcontentaction/-/archive/$pkgver/libcontentaction-$pkgver.tar.bz2"
+ py3.patch)
+sha512sums=('4f0cec2eb42776ba1eeb41ac3597b771ea575f8b33b298f64e6d2c2057c501014a87d82c20219406ec2e8bbc1fe83313a5d68165159e9edf2295cfcb2e5ae862'
+ 'dc808f1e5ab507ca222556b2f199df59120e8cf7810bcec6a74e7b4e5292a4a5ceaff958f6893aa3ce4dc752b3adf0e92b759a8e9ee4045a0701a71f012c8d79')
prepare() {
- cd libcontentaction
- find . -name '*.py' -o -name 'gen-regexps' -type f -exec sed -i 's@^#!.*python$@#!/usr/bin/python2@' {} +
+ cd libcontentaction-$pkgver
+ patch -p1 -i ../py3.patch
}
build() {
- cd libcontentaction
+ cd libcontentaction-$pkgver
qmake-qt5
make
@@ -25,9 +27,9 @@
}
package() {
- cd libcontentaction
+ cd libcontentaction-$pkgver
- make INSTALL_ROOT="${pkgdir}" install
+ make INSTALL_ROOT="$pkgdir" install
# Remove tests
rm -r "$pkgdir/opt"
Added: py3.patch
===================================================================
--- py3.patch (rev 0)
+++ py3.patch 2019-02-24 18:49:44 UTC (rev 435543)
@@ -0,0 +1,37 @@
+diff --git a/data/gen-regexps b/data/gen-regexps
+index 7a8bfc0..f563794 100755
+--- a/data/gen-regexps
++++ b/data/gen-regexps
+@@ -49,8 +49,8 @@ def rx_opt (rx):
+ return rx_repeat (rx, 0, 1)
+
+ def rx_output (rx, name):
+- print "s/@%s@/%s/g\n" % (name,
+- rx.replace('\\', '\\\\').replace('/', '\\/').replace('"', '\"').replace('&', '\&'))
++ print("s/@%s@/%s/g\n" % (name,
++ rx.replace('\\', '\\\\').replace('/', '\\/').replace('"', '\"').replace('&', '\&')))
+
+ ## Phone numbers
+
+diff --git a/data/regextest2.py b/data/regextest2.py
+index 35ad8b3..43b4a93 100644
+--- a/data/regextest2.py
++++ b/data/regextest2.py
+@@ -32,7 +32,7 @@ class LocalRegexTest (unittest.TestCase):
+ parts = self.__spec.split (self.__delimiter)
+ text = "".join (parts)
+ expected = [ parts[i] for i in range (1, len (parts), 2) ]
+- result = map (lambda m: m.group(0), re.finditer (self.__regex, text))
++ result = list (map (lambda m: m.group(0), re.finditer (self.__regex, text)))
+ self.assertEquals (result, expected)
+
+
+@@ -96,7 +96,7 @@ def static_counter_gen ():
+ while True:
+ k += 1
+ yield k
+-static_counter = static_counter_gen ().next
++static_counter = lambda: next(static_counter_gen ())
+
+
+ rxt_regex = None
More information about the arch-commits
mailing list