summary refs log tree commit diff
path: root/gnu/packages/patches/serf-python3.patch
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-12-19 21:59:03 +0100
committerMarius Bakke <marius@gnu.org>2020-12-19 22:53:00 +0100
commitf6f6e1efeecd553c3af4c31695b17fb69849967b (patch)
treea474f9d3269fa864efe3090936e70b8805778459 /gnu/packages/patches/serf-python3.patch
parentae7033ff5ff1d0d2571d808d40add0dd8e97bf8a (diff)
downloadguix-f6f6e1efeecd553c3af4c31695b17fb69849967b.tar.gz
gnu: serf: Build with Python 3.
* gnu/packages/patches/serf-python3.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/web.scm (serf)[source](patches): New field.
[arguments]: Remove #:scons.
Diffstat (limited to 'gnu/packages/patches/serf-python3.patch')
-rw-r--r--gnu/packages/patches/serf-python3.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/packages/patches/serf-python3.patch b/gnu/packages/patches/serf-python3.patch
new file mode 100644
index 0000000000..636f51ed1e
--- /dev/null
+++ b/gnu/packages/patches/serf-python3.patch
@@ -0,0 +1,29 @@
+Fix build with Python 3 scons.
+
+Patch taken from Arch Linux:
+https://github.com/archlinux/svntogit-packages/blob/packages/serf/trunk/scons-python3.patch
+
+--- serf-1.3.9/SConstruct.orig	2019-07-26 17:49:30.910189251 +0000
++++ serf-1.3.9/SConstruct	2019-07-26 17:49:54.073821735 +0000
+@@ -163,9 +163,9 @@
+               suffix='.def', src_suffix='.h')
+   })
+ 
+-match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
+-                  'SERF_MINOR_VERSION ([0-9]+).*'
+-                  'SERF_PATCH_VERSION ([0-9]+)',
++match = re.search(b'SERF_MAJOR_VERSION ([0-9]+).*'
++                  b'SERF_MINOR_VERSION ([0-9]+).*'
++                  b'SERF_PATCH_VERSION ([0-9]+)',
+                   env.File('serf.h').get_contents(),
+                   re.DOTALL)
+ MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
+@@ -183,7 +183,7 @@
+ 
+ unknown = opts.UnknownVariables()
+ if unknown:
+-  print 'Warning: Used unknown variables:', ', '.join(unknown.keys())
++  print ('Warning: Used unknown variables:', ', '.join(unknown.keys()))
+ 
+ apr = str(env['APR'])
+ apu = str(env['APU'])