summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoranthraxx2017-10-15 00:00:50 +0200
committeranthraxx2017-10-15 00:00:50 +0200
commit8f3182ac7310a8b3a018b9672d3a74c884a33504 (patch)
treeea583ec240e9dd78ddf1330bb390c3fb376e247b
parent4a264dbc33449b5541c5c46c0c7e29d63d76cc22 (diff)
downloadaur-8f3182ac7310a8b3a018b9672d3a74c884a33504.tar.gz
upgpkg: xboxdrv 0.8.8-3 (adding 60sec-delay and scons-py3 patch)
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD14
-rw-r--r--fix-60-sec-delay.patch27
-rw-r--r--scons-py3.patch63
4 files changed, 106 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2669efb7f63..b1ff333fae6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Wed Jun 1 10:54:51 UTC 2016
pkgbase = xboxdrv
pkgdesc = Userspace gamepad driver for Linux
pkgver = 0.8.8
- pkgrel = 2
+ pkgrel = 3
url = http://pingus.seul.org/~grumbel/xboxdrv
arch = i686
arch = x86_64
@@ -16,13 +14,18 @@ pkgbase = xboxdrv
depends = dbus-glib
depends = libusb
depends = python2-dbus
+ depends = systemd
backup = etc/default/xboxdrv
source = xboxdrv-0.8.8.tar.gz::https://github.com/xboxdrv/xboxdrv/archive/v0.8.8.tar.gz
source = xboxdrv.service
source = xboxdrv.default
+ source = fix-60-sec-delay.patch
+ source = scons-py3.patch
sha512sums = 3f27856da211a14e27a84fa5919da7965262adc36da16c75eed9bae891098183b5751a3e707573b4ab64e69096ea74d455e8f64827c88b38b65af94cc13b34ad
sha512sums = f1a4e7b1a06e951c3a4f5bcdec5f14db542b34963950619f0d4b1ee324d64b18ca2f63642719ef65a63e424702fb0eb33e0259937906732e587b96a9582c2e6b
sha512sums = 4f6e9a12b208254e19daba477dd7787147a8b2c8a83007d92f8cfce6212c21ce3306f23a2669080f0e46986ca102ab08c262b42c678caf1a891326b4e2c40b5f
+ sha512sums = 58170b3f96f02e5ba0af5f6641482fb1c612ca70650e475d68b55c05a62ec0831033190b90e591d593fd6b25c2a155e6c4975f37eef1534245947156a5e3285f
+ sha512sums = b3a3bbb51fa1c4ad4dd898136c3bf7c0f13193bdd07bbcb5c8243edb747c68223fe8c5bd2fd578f6c2b18844827524abb0533ce98b6e0e60fe936597cdba811d
pkgname = xboxdrv
diff --git a/PKGBUILD b/PKGBUILD
index 828fc1c1def..45b57a8ccef 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,24 +4,30 @@
pkgname=xboxdrv
pkgver=0.8.8
-pkgrel=2
+pkgrel=3
pkgdesc='Userspace gamepad driver for Linux'
url='http://pingus.seul.org/~grumbel/xboxdrv'
arch=('i686' 'x86_64')
license=('GPL3')
-depends=('libx11' 'dbus-glib' 'libusb' 'python2-dbus')
+depends=('libx11' 'dbus-glib' 'libusb' 'python2-dbus' 'systemd')
makedepends=('scons' 'boost' 'pkg-config' 'libx11')
backup=("etc/default/${pkgname}")
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/xboxdrv/${pkgname}/archive/v${pkgver}.tar.gz
${pkgname}.service
- ${pkgname}.default)
+ ${pkgname}.default
+ fix-60-sec-delay.patch
+ scons-py3.patch)
sha512sums=('3f27856da211a14e27a84fa5919da7965262adc36da16c75eed9bae891098183b5751a3e707573b4ab64e69096ea74d455e8f64827c88b38b65af94cc13b34ad'
'f1a4e7b1a06e951c3a4f5bcdec5f14db542b34963950619f0d4b1ee324d64b18ca2f63642719ef65a63e424702fb0eb33e0259937906732e587b96a9582c2e6b'
- '4f6e9a12b208254e19daba477dd7787147a8b2c8a83007d92f8cfce6212c21ce3306f23a2669080f0e46986ca102ab08c262b42c678caf1a891326b4e2c40b5f')
+ '4f6e9a12b208254e19daba477dd7787147a8b2c8a83007d92f8cfce6212c21ce3306f23a2669080f0e46986ca102ab08c262b42c678caf1a891326b4e2c40b5f'
+ '58170b3f96f02e5ba0af5f6641482fb1c612ca70650e475d68b55c05a62ec0831033190b90e591d593fd6b25c2a155e6c4975f37eef1534245947156a5e3285f'
+ 'b3a3bbb51fa1c4ad4dd898136c3bf7c0f13193bdd07bbcb5c8243edb747c68223fe8c5bd2fd578f6c2b18844827524abb0533ce98b6e0e60fe936597cdba811d')
prepare() {
cd ${pkgname}-${pkgver}
sed 's|python|python2|g' -i examples/*.py
+ patch -p1 < "${srcdir}/fix-60-sec-delay.patch"
+ patch -p1 < "${srcdir}/scons-py3.patch"
}
build() {
diff --git a/fix-60-sec-delay.patch b/fix-60-sec-delay.patch
new file mode 100644
index 00000000000..da543d2cfa0
--- /dev/null
+++ b/fix-60-sec-delay.patch
@@ -0,0 +1,27 @@
+From 7326421eeaadbc2aeb3828628c2e65bb7be323a9 Mon Sep 17 00:00:00 2001
+From: buxit <buti@bux.at>
+Date: Wed, 2 Nov 2016 16:25:14 +0100
+Subject: [PATCH] fix 60 seconds delay
+
+use `libusb_handle_events_timeout_completed()` instead of `libusb_handle_events()`
+should fix #144
+---
+ src/usb_gsource.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/usb_gsource.cpp b/src/usb_gsource.cpp
+index 00bf1315..afb38f65 100644
+--- a/src/usb_gsource.cpp
++++ b/src/usb_gsource.cpp
+@@ -174,7 +174,10 @@ USBGSource::on_source_dispatch(GSource* source, GSourceFunc callback, gpointer u
+ gboolean
+ USBGSource::on_source()
+ {
+- libusb_handle_events(NULL);
++ struct timeval to;
++ to.tv_sec = 0;
++ to.tv_usec = 0;
++ libusb_handle_events_timeout_completed(NULL, &to, NULL);
+ return TRUE;
+ }
+
diff --git a/scons-py3.patch b/scons-py3.patch
new file mode 100644
index 00000000000..4aa6fa61931
--- /dev/null
+++ b/scons-py3.patch
@@ -0,0 +1,63 @@
+From 17bd43a7d3ef86216abc36b42b4e6a1f70aa9979 Mon Sep 17 00:00:00 2001
+From: xnick <xnick@users.noreply.github.com>
+Date: Thu, 12 Oct 2017 20:34:35 +0300
+Subject: [PATCH] Update SConstruct
+
+python3 compatible
+---
+ SConstruct | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 4cd79704..c0007054 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -19,7 +19,7 @@ def build_dbus_glue(target, source, env):
+ xml = re.sub(r"callback = \(([A-Za-z_]+)\) \(marshal_data \? marshal_data : cc->callback\);",
+ r"union { \1 fn; void* obj; } conv;\n "
+ "conv.obj = (marshal_data ? marshal_data : cc->callback);\n "
+- "callback = conv.fn;", xml)
++ "callback = conv.fn;", xml.decode('utf-8'))
+
+ with open(target[0].get_path(), "w") as f:
+ f.write(xml)
+@@ -29,10 +29,10 @@ def build_bin2h(target, source, env):
+ Takes a list of files and converts them into a C source that can be included
+ """
+ def c_escape(str):
+- return str.translate(string.maketrans("/.-", "___"))
++ return str.translate(bytes.maketrans(b"/.-", b"___"))
+
+- print target
+- print source
++ print(target)
++ print(source)
+ with open(target[0].get_path(), "w") as fout:
+ fout.write("// autogenerated by scons Bin2H builder, do not edit by hand!\n\n")
+
+@@ -45,8 +45,8 @@ def build_bin2h(target, source, env):
+ data = fin.read()
+ fout.write("// \"%s\"\n" % src.get_path())
+ fout.write("const char %s[] = {" % c_escape(src.get_path()))
+- bytes_arr = ["0x%02x" % ord(c) for c in data]
+- for i in xrange(len(bytes_arr)):
++ bytes_arr = ["0x%02x" % c for c in data]
++ for i in range(len(bytes_arr)):
+ if i % 13 == 0:
+ fout.write("\n ")
+ fout.write(bytes_arr[i])
+@@ -131,12 +131,12 @@ env.Append(CPPDEFINES = { 'PACKAGE_VERSION': "'\"%s\"'" % package_version })
+ conf = Configure(env)
+
+ if not conf.env['CXX']:
+- print "g++ must be installed!"
++ print('g++ must be installed!')
+ Exit(1)
+
+ # X11 checks
+ if not conf.CheckLibWithHeader('X11', 'X11/Xlib.h', 'C++'):
+- print 'libx11-dev must be installed!'
++ print('libx11-dev must be installed!')
+ Exit(1)
+
+ env = conf.Finish()