summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/serf/serf
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-09-03 11:16:19 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-06 10:36:31 +0100
commit052e6676a45d0c4d31236dbaf0053a240f9f1289 (patch)
treea440eb41c9cecc00d016a4b99d12c533715fa67b /meta/recipes-support/serf/serf
parent74feaddda3b7cd5b3ab18d2f25bf5ef9581c9c47 (diff)
downloadpoky-052e6676a45d0c4d31236dbaf0053a240f9f1289.tar.gz
serf: Fix Sconstruct build with python 3.7
These patches will be needed to build serf on hosts with python 3.7+ (From OE-Core rev: ab0be544b392bbd6cb1dc91edd5fe8563d7de393) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/serf/serf')
-rw-r--r--meta/recipes-support/serf/serf/0001-Fix-syntax-of-a-print-in-the-scons-file-to-unbreak-b.patch29
-rw-r--r--meta/recipes-support/serf/serf/0002-SConstruct-Fix-path-quoting-for-.def-generator.patch27
-rw-r--r--meta/recipes-support/serf/serf/0003-gen_def.patch22
-rw-r--r--meta/recipes-support/serf/serf/0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch29
4 files changed, 107 insertions, 0 deletions
diff --git a/meta/recipes-support/serf/serf/0001-Fix-syntax-of-a-print-in-the-scons-file-to-unbreak-b.patch b/meta/recipes-support/serf/serf/0001-Fix-syntax-of-a-print-in-the-scons-file-to-unbreak-b.patch
new file mode 100644
index 0000000000..4a5832ac1a
--- /dev/null
+++ b/meta/recipes-support/serf/serf/0001-Fix-syntax-of-a-print-in-the-scons-file-to-unbreak-b.patch
@@ -0,0 +1,29 @@
1From 99f6e1b0d68281b63218d6adfe68cd9e331ac5be Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 3 Sep 2018 10:50:08 -0700
4Subject: [PATCH] Fix syntax of a print() in the scons file to unbreak building
5 with most recent scons version.
6
7* SConstruct Use Python 3.0 valid syntax to make Scons 3.0.0 happy on both python
8 3.0 and 2.7.
9
10Upstream-Status: Backport
11[https://svn.apache.org/viewvc/serf/trunk/SConstruct?r1=1809132&r2=1811083&diff_format=h]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 SConstruct | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/SConstruct b/SConstruct
18index 1670459..18a45fa 100644
19--- a/SConstruct
20+++ b/SConstruct
21@@ -184,7 +184,7 @@ CALLOUT_OKAY = not (env.GetOption('clean') or env.GetOption('help'))
22
23 unknown = opts.UnknownVariables()
24 if unknown:
25- print 'Warning: Used unknown variables:', ', '.join(unknown.keys())
26+ print('Warning: Used unknown variables:', ', '.join(unknown.keys()))
27
28 apr = str(env['APR'])
29 apu = str(env['APU'])
diff --git a/meta/recipes-support/serf/serf/0002-SConstruct-Fix-path-quoting-for-.def-generator.patch b/meta/recipes-support/serf/serf/0002-SConstruct-Fix-path-quoting-for-.def-generator.patch
new file mode 100644
index 0000000000..cec881ee1c
--- /dev/null
+++ b/meta/recipes-support/serf/serf/0002-SConstruct-Fix-path-quoting-for-.def-generator.patch
@@ -0,0 +1,27 @@
1From e51b4b37916dd20b13133cb7af16601b6bf3ace9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 3 Sep 2018 10:54:54 -0700
4Subject: [PATCH] SConstruct: Fix path quoting for .def generator
5
6Patch by: Martin Keller <m.keller{_AT_}codesys.com>
7Upstream-Status: Backport
8[https://svn.apache.org/viewvc/serf/trunk/SConstruct?r1=1807594&r2=1809132]
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 SConstruct | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/SConstruct b/SConstruct
16index 18a45fa..571bdce 100644
17--- a/SConstruct
18+++ b/SConstruct
19@@ -160,7 +160,7 @@ env = Environment(variables=opts,
20
21 env.Append(BUILDERS = {
22 'GenDef' :
23- Builder(action = sys.executable + ' build/gen_def.py $SOURCES > $TARGET',
24+ Builder(action = '"%s" "%s" $SOURCES > $TARGET' % (sys.executable, gen_def_script,),
25 suffix='.def', src_suffix='.h')
26 })
27
diff --git a/meta/recipes-support/serf/serf/0003-gen_def.patch b/meta/recipes-support/serf/serf/0003-gen_def.patch
new file mode 100644
index 0000000000..e37e9034b0
--- /dev/null
+++ b/meta/recipes-support/serf/serf/0003-gen_def.patch
@@ -0,0 +1,22 @@
1From 98e793d9f2250e7c1f9f1eb5dfd616a6a8829e9a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 3 Sep 2018 11:12:27 -0700
4Subject: [PATCH] gen_def
5
6---
7 SConstruct | 2 ++
8 1 file changed, 2 insertions(+)
9
10diff --git a/SConstruct b/SConstruct
11index 571bdce..877731e 100644
12--- a/SConstruct
13+++ b/SConstruct
14@@ -158,6 +158,8 @@ env = Environment(variables=opts,
15 ENV = os.environ,
16 )
17
18+gen_def_script = env.File('build/gen_def.py').rstr()
19+
20 env.Append(BUILDERS = {
21 'GenDef' :
22 Builder(action = '"%s" "%s" $SOURCES > $TARGET' % (sys.executable, gen_def_script,),
diff --git a/meta/recipes-support/serf/serf/0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch b/meta/recipes-support/serf/serf/0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch
new file mode 100644
index 0000000000..02fa9e3a06
--- /dev/null
+++ b/meta/recipes-support/serf/serf/0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch
@@ -0,0 +1,29 @@
1From 565211fd082ef653ca9c44a345350fc1451f5a0f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 3 Sep 2018 11:12:38 -0700
4Subject: [PATCH] Follow-up to r1811083 fix building with scons 3.0.0 and
5 Python3
6
7* SConstruct: Append decode('utf-8) to FILE.get_contents() to avoid
8 TypeError: cannot use a string pattern on a bytes-like object
9
10Upstream-Status: Backport
11[https://svn.apache.org/viewvc/serf/trunk/SConstruct?r1=1811088&r2=1814604]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 SConstruct | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/SConstruct b/SConstruct
18index 877731e..7678bb1 100644
19--- a/SConstruct
20+++ b/SConstruct
21@@ -169,7 +169,7 @@ env.Append(BUILDERS = {
22 match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
23 'SERF_MINOR_VERSION ([0-9]+).*'
24 'SERF_PATCH_VERSION ([0-9]+)',
25- env.File('serf.h').get_contents(),
26+ env.File('serf.h').get_contents().decode('utf-8'),
27 re.DOTALL)
28 MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
29 env.Append(MAJOR=str(MAJOR))