Hello community,

here is the log from the commit of package xboxdrv for openSUSE:Factory checked 
in at 2017-11-30 12:45:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xboxdrv (Old)
 and      /work/SRC/openSUSE:Factory/.xboxdrv.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xboxdrv"

Thu Nov 30 12:45:45 2017 rev:5 rq:546400 version:0.8.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/xboxdrv/xboxdrv.changes  2017-02-21 
13:49:08.398574558 +0100
+++ /work/SRC/openSUSE:Factory/.xboxdrv.new/xboxdrv.changes     2017-11-30 
12:45:51.676893842 +0100
@@ -1,0 +2,8 @@
+Fri Nov 24 13:31:07 UTC 2017 - mplus...@suse.com
+
+- Fix building with python3 version of scons:
+  * xboxdrv-scons3.patch
+- Small cleanup with spec-clenaer 
+- Update dependencies for Factory 
+
+-------------------------------------------------------------------

New:
----
  xboxdrv-scons3.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xboxdrv.spec ++++++
--- /var/tmp/diff_new_pack.PEHRUJ/_old  2017-11-30 12:45:52.884849930 +0100
+++ /var/tmp/diff_new_pack.PEHRUJ/_new  2017-11-30 12:45:52.888849784 +0100
@@ -29,6 +29,8 @@
 Source3:        %{name}.service
 # PATCH-FIX-UPSTREAM xboxdrv-fix-delay.patch -- Fix 60 seconds delay, from 
https://github.com/xboxdrv/xboxdrv/pull/214
 Patch0:         %{name}-fix-delay.patch
+# PATCH-FIX-UPSTREAM xboxdrv-scons3.patch -- Fix build with python, from 
https://github.com/xboxdrv/xboxdrv/pull/240
+Patch1:         xboxdrv-scons3.patch
 BuildRequires:  gcc-c++
 BuildRequires:  pkgconfig
 BuildRequires:  scons
@@ -36,11 +38,12 @@
 BuildRequires:  pkgconfig(libudev)
 BuildRequires:  pkgconfig(libusb-1.0)
 BuildRequires:  pkgconfig(x11)
-Requires:       dbus-1-python
 %if 0%{?suse_version} > 1320
 BuildRequires:  libboost_headers-devel
+Requires:       python2-dbus-python
 %else
 BuildRequires:  boost-devel
+Requires:       dbus-1-python
 %endif
 
 %description
@@ -54,6 +57,7 @@
 %prep
 %setup -q -n %{name}-linux-%{version}
 %patch0 -p1
+%patch1 -p1
 cp -f %{SOURCE1} 50-xpad.conf
 cp -f %{SOURCE2} %{name}.conf
 cp -f %{SOURCE3} %{name}.service
@@ -92,7 +96,6 @@
 %service_del_postun %{name}.service
 
 %files
-%defattr(-,root,root)
 %doc AUTHORS COPYING NEWS PROTOCOL README.md TODO
 %config(noreplace) %{_sysconfdir}/%{name}.conf
 %dir %{_sysconfdir}/modprobe.d/

++++++ xboxdrv-scons3.patch ++++++
>From 17bd43a7d3ef86216abc36b42b4e6a1f70aa9979 Mon Sep 17 00:00:00 2001
From: xnick <xn...@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()

Reply via email to