[arch-commits] Commit in websocketpp/trunk (PKGBUILD scons-python3.patch)
Antonio Rojas
arojas at archlinux.org
Sat Jul 27 09:02:14 UTC 2019
Date: Saturday, July 27, 2019 @ 09:02:14
Author: arojas
Revision: 493081
Fix build with python3 scons
Added:
websocketpp/trunk/scons-python3.patch
Modified:
websocketpp/trunk/PKGBUILD
---------------------+
PKGBUILD | 10 +++-
scons-python3.patch | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 112 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-07-27 08:45:59 UTC (rev 493080)
+++ PKGBUILD 2019-07-27 09:02:14 UTC (rev 493081)
@@ -18,9 +18,15 @@
'boost-libs: non C++11 environments support'
)
makedepends=('cmake' 'boost' 'boost-libs' 'scons')
-source=(${pkgname}-${pkgver}.tar.gz::https://github.com/zaphoyd/${pkgname}/archive/${pkgver}.tar.gz)
-sha512sums=('35e0261ed0285acf77d300768819bd380197de8acdf68223e2d7598481b9bfd69cb1653b435139771b1db6c16530c8d8cf9a887a8a6bba3fea126d0da4dbc13c')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/zaphoyd/${pkgname}/archive/${pkgver}.tar.gz scons-python3.patch)
+sha512sums=('35e0261ed0285acf77d300768819bd380197de8acdf68223e2d7598481b9bfd69cb1653b435139771b1db6c16530c8d8cf9a887a8a6bba3fea126d0da4dbc13c'
+ '410f51b0920ceba0cf597de5ef953fd4bc11ed440502455997d608dec7f3535e3212e929917c0f54e64914868e9fb3e76c75a39e916708a4d2d9d090d7ed1f41')
+prepare() {
+ cd $pkgname-$pkgver
+ patch -p1 -i ../scons-python3.patch # Fix build with python3 scons
+}
+
build() {
cd ${pkgname}-${pkgver}
WSPP_ENABLE_CPP11=1 \
Added: scons-python3.patch
===================================================================
--- scons-python3.patch (rev 0)
+++ scons-python3.patch 2019-07-27 09:02:14 UTC (rev 493081)
@@ -0,0 +1,104 @@
+--- websocketpp-0.8.1/SConstruct.orig 2019-07-27 08:46:48.227994968 +0000
++++ websocketpp-0.8.1/SConstruct 2019-07-27 08:47:33.128590838 +0000
+@@ -1,18 +1,18 @@
+-import os, sys, commands
++import os, sys, subprocess
+ env = Environment(ENV = os.environ)
+
+ # figure out a better way to configure this
+-if os.environ.has_key('CXX'):
++if os.environ.get('CXX'):
+ env['CXX'] = os.environ['CXX']
+
+-if os.environ.has_key('DEBUG'):
++if os.environ.get('DEBUG'):
+ env['DEBUG'] = os.environ['DEBUG']
+
+-if os.environ.has_key('CXXFLAGS'):
++if os.environ.get('CXXFLAGS'):
+ #env['CXXFLAGS'] = os.environ['CXXFLAGS']
+ env.Append(CXXFLAGS = os.environ['CXXFLAGS'])
+
+-if os.environ.has_key('LINKFLAGS'):
++if os.environ.get('LINKFLAGS'):
+ #env['LDFLAGS'] = os.environ['LDFLAGS']
+ env.Append(LINKFLAGS = os.environ['LINKFLAGS'])
+
+@@ -22,24 +22,24 @@
+ ## or set BOOST_INCLUDES and BOOST_LIBS if Boost comes with your OS distro e.g. and
+ ## needs BOOST_INCLUDES=/usr/include/boost and BOOST_LIBS=/usr/lib like Ubuntu.
+ ##
+-if os.environ.has_key('BOOSTROOT'):
++if os.environ.get('BOOSTROOT'):
+ os.environ['BOOST_ROOT'] = os.environ['BOOSTROOT']
+
+-if os.environ.has_key('BOOST_ROOT'):
++if os.environ.get('BOOST_ROOT'):
+ env['BOOST_INCLUDES'] = os.environ['BOOST_ROOT']
+ env['BOOST_LIBS'] = os.path.join(os.environ['BOOST_ROOT'], 'stage', 'lib')
+-elif os.environ.has_key('BOOST_INCLUDES') and os.environ.has_key('BOOST_LIBS'):
++elif os.environ.get('BOOST_INCLUDES') and os.environ.get('BOOST_LIBS'):
+ env['BOOST_INCLUDES'] = os.environ['BOOST_INCLUDES']
+ env['BOOST_LIBS'] = os.environ['BOOST_LIBS']
+ else:
+- raise SCons.Errors.UserError, "Neither BOOST_ROOT, nor BOOST_INCLUDES + BOOST_LIBS was set!"
++ raise SCons.Errors.UserError("Neither BOOST_ROOT, nor BOOST_INCLUDES + BOOST_LIBS was set!")
+
+ ## Custom OpenSSL
+-if os.environ.has_key('OPENSSL_PATH'):
++if os.environ.get('OPENSSL_PATH'):
+ env.Append(CPPPATH = os.path.join(os.environ['OPENSSL_PATH'], 'include'))
+ env.Append(LIBPATH = os.environ['OPENSSL_PATH'])
+
+-if os.environ.has_key('WSPP_ENABLE_CPP11'):
++if os.environ.get('WSPP_ENABLE_CPP11'):
+ env['WSPP_ENABLE_CPP11'] = True
+ else:
+ env['WSPP_ENABLE_CPP11'] = False
+@@ -84,7 +84,7 @@
+ env.Append(CCFLAGS = ['-Wall'])
+ #env['LINKFLAGS'] = ''
+ elif env['PLATFORM'] == 'darwin':
+- if not os.environ.has_key('CXX'):
++ if not os.environ.get('CXX'):
+ env['CXX'] = "clang++"
+ if env.has_key('DEBUG'):
+ env.Append(CCFLAGS = ['-g', '-O0'])
+@@ -157,15 +157,15 @@
+
+ if env_cpp11['CXX'].startswith('g++'):
+ # TODO: check g++ version
+- GCC_VERSION = commands.getoutput(env_cpp11['CXX'] + ' -dumpversion')
++ GCC_VERSION = subprocess.getoutput(env_cpp11['CXX'] + ' -dumpversion')
+
+ if GCC_VERSION > "4.4.0":
+- print "C++11 build environment partially enabled"
++ print ("C++11 build environment partially enabled")
+ env_cpp11.Append(WSPP_CPP11_ENABLED = "true",CXXFLAGS = ['-std=c++0x'],TOOLSET = ['g++'],CPPDEFINES = ['_WEBSOCKETPP_CPP11_STL_'])
+ else:
+- print "C++11 build environment is not supported on this version of G++"
++ print ("C++11 build environment is not supported on this version of G++")
+ elif env_cpp11['CXX'].startswith('clang++'):
+- print "C++11 build environment enabled"
++ print ("C++11 build environment enabled")
+ env.Append(CXXFLANGS = ['-stdlib=libc++'],LINKFLAGS=['-stdlib=libc++'])
+ env_cpp11.Append(WSPP_CPP11_ENABLED = "true",CXXFLAGS = ['-std=c++0x','-stdlib=libc++'],LINKFLAGS = ['-stdlib=libc++'],TOOLSET = ['clang++'],CPPDEFINES = ['_WEBSOCKETPP_CPP11_STL_'])
+
+@@ -172,14 +172,14 @@
+ # look for optional second boostroot compiled with clang's libc++ STL library
+ # this prevents warnings/errors when linking code built with two different
+ # incompatible STL libraries.
+- if os.environ.has_key('BOOST_ROOT_CPP11'):
++ if os.environ.get('BOOST_ROOT_CPP11'):
+ env_cpp11['BOOST_INCLUDES'] = os.environ['BOOST_ROOT_CPP11']
+ env_cpp11['BOOST_LIBS'] = os.path.join(os.environ['BOOST_ROOT_CPP11'], 'stage', 'lib')
+- elif os.environ.has_key('BOOST_INCLUDES_CPP11') and os.environ.has_key('BOOST_LIBS_CPP11'):
++ elif os.environ.get('BOOST_INCLUDES_CPP11') and os.environ.get('BOOST_LIBS_CPP11'):
+ env_cpp11['BOOST_INCLUDES'] = os.environ['BOOST_INCLUDES_CPP11']
+ env_cpp11['BOOST_LIBS'] = os.environ['BOOST_LIBS_CPP11']
+ else:
+- print "C++11 build environment disabled"
++ print ("C++11 build environment disabled")
+
+ # if the build system is known to allow the isystem modifier for library include
+ # values then use it for the boost libraries. Otherwise just add them to the
More information about the arch-commits
mailing list