mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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) (From OE-Core rev: ffe1795dc6daf9999e1be858a4e97a4c2cf44526) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
From 99f6e1b0d68281b63218d6adfe68cd9e331ac5be Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 3 Sep 2018 10:50:08 -0700
|
||||
Subject: [PATCH] Fix syntax of a print() in the scons file to unbreak building
|
||||
with most recent scons version.
|
||||
|
||||
* SConstruct Use Python 3.0 valid syntax to make Scons 3.0.0 happy on both python
|
||||
3.0 and 2.7.
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://svn.apache.org/viewvc/serf/trunk/SConstruct?r1=1809132&r2=1811083&diff_format=h]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
SConstruct | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SConstruct b/SConstruct
|
||||
index 1670459..18a45fa 100644
|
||||
--- a/SConstruct
|
||||
+++ b/SConstruct
|
||||
@@ -184,7 +184,7 @@ CALLOUT_OKAY = not (env.GetOption('clean') or env.GetOption('help'))
|
||||
|
||||
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'])
|
||||
@@ -0,0 +1,27 @@
|
||||
From e51b4b37916dd20b13133cb7af16601b6bf3ace9 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 3 Sep 2018 10:54:54 -0700
|
||||
Subject: [PATCH] SConstruct: Fix path quoting for .def generator
|
||||
|
||||
Patch by: Martin Keller <m.keller{_AT_}codesys.com>
|
||||
Upstream-Status: Backport
|
||||
[https://svn.apache.org/viewvc/serf/trunk/SConstruct?r1=1807594&r2=1809132]
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
SConstruct | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SConstruct b/SConstruct
|
||||
index 18a45fa..571bdce 100644
|
||||
--- a/SConstruct
|
||||
+++ b/SConstruct
|
||||
@@ -160,7 +160,7 @@ env = Environment(variables=opts,
|
||||
|
||||
env.Append(BUILDERS = {
|
||||
'GenDef' :
|
||||
- Builder(action = sys.executable + ' build/gen_def.py $SOURCES > $TARGET',
|
||||
+ Builder(action = '"%s" "%s" $SOURCES > $TARGET' % (sys.executable, gen_def_script,),
|
||||
suffix='.def', src_suffix='.h')
|
||||
})
|
||||
|
||||
22
meta/recipes-support/serf/serf/0003-gen_def.patch
Normal file
22
meta/recipes-support/serf/serf/0003-gen_def.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
From 98e793d9f2250e7c1f9f1eb5dfd616a6a8829e9a Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 3 Sep 2018 11:12:27 -0700
|
||||
Subject: [PATCH] gen_def
|
||||
|
||||
---
|
||||
SConstruct | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/SConstruct b/SConstruct
|
||||
index 571bdce..877731e 100644
|
||||
--- a/SConstruct
|
||||
+++ b/SConstruct
|
||||
@@ -158,6 +158,8 @@ env = Environment(variables=opts,
|
||||
ENV = os.environ,
|
||||
)
|
||||
|
||||
+gen_def_script = env.File('build/gen_def.py').rstr()
|
||||
+
|
||||
env.Append(BUILDERS = {
|
||||
'GenDef' :
|
||||
Builder(action = '"%s" "%s" $SOURCES > $TARGET' % (sys.executable, gen_def_script,),
|
||||
@@ -0,0 +1,29 @@
|
||||
From 565211fd082ef653ca9c44a345350fc1451f5a0f Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 3 Sep 2018 11:12:38 -0700
|
||||
Subject: [PATCH] Follow-up to r1811083 fix building with scons 3.0.0 and
|
||||
Python3
|
||||
|
||||
* SConstruct: Append decode('utf-8) to FILE.get_contents() to avoid
|
||||
TypeError: cannot use a string pattern on a bytes-like object
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://svn.apache.org/viewvc/serf/trunk/SConstruct?r1=1811088&r2=1814604]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
SConstruct | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SConstruct b/SConstruct
|
||||
index 877731e..7678bb1 100644
|
||||
--- a/SConstruct
|
||||
+++ b/SConstruct
|
||||
@@ -169,7 +169,7 @@ env.Append(BUILDERS = {
|
||||
match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
|
||||
'SERF_MINOR_VERSION ([0-9]+).*'
|
||||
'SERF_PATCH_VERSION ([0-9]+)',
|
||||
- env.File('serf.h').get_contents(),
|
||||
+ env.File('serf.h').get_contents().decode('utf-8'),
|
||||
re.DOTALL)
|
||||
MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
|
||||
env.Append(MAJOR=str(MAJOR))
|
||||
@@ -1,7 +1,12 @@
|
||||
SUMMARY = "High-Performance Asynchronous HTTP Client Library"
|
||||
SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
|
||||
file://norpath.patch \
|
||||
file://env.patch"
|
||||
file://env.patch \
|
||||
file://0001-Fix-syntax-of-a-print-in-the-scons-file-to-unbreak-b.patch \
|
||||
file://0002-SConstruct-Fix-path-quoting-for-.def-generator.patch \
|
||||
file://0003-gen_def.patch \
|
||||
file://0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "370a6340ff20366ab088012cd13f2b57"
|
||||
SRC_URI[sha256sum] = "549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf7a87cc"
|
||||
|
||||
Reference in New Issue
Block a user