[arch-commits] Commit in websocketpp/trunk (PKGBUILD scons-python3.patch)

Levente Polyak anthraxx at archlinux.org
Sun May 17 12:03:13 UTC 2020


    Date: Sunday, May 17, 2020 @ 12:03:12
  Author: anthraxx
Revision: 628244

upgpkg: websocketpp 0.8.2-1

Modified:
  websocketpp/trunk/PKGBUILD
Deleted:
  websocketpp/trunk/scons-python3.patch

---------------------+
 PKGBUILD            |   36 +++++++----------
 scons-python3.patch |  104 --------------------------------------------------
 2 files changed, 16 insertions(+), 124 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-05-17 11:12:06 UTC (rev 628243)
+++ PKGBUILD	2020-05-17 12:03:12 UTC (rev 628244)
@@ -5,7 +5,7 @@
 # Contributor: MTsoul
 
 pkgname=websocketpp
-pkgver=0.8.1
+pkgver=0.8.2
 pkgrel=1
 pkgdesc='C++/Boost Asio based websocket client/server library'
 url='https://www.zaphoyd.com/websocketpp/'
@@ -17,40 +17,36 @@
   'boost: non C++11 environments support'
   '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 scons-python3.patch)
-sha512sums=('35e0261ed0285acf77d300768819bd380197de8acdf68223e2d7598481b9bfd69cb1653b435139771b1db6c16530c8d8cf9a887a8a6bba3fea126d0da4dbc13c'
-            '410f51b0920ceba0cf597de5ef953fd4bc11ed440502455997d608dec7f3535e3212e929917c0f54e64914868e9fb3e76c75a39e916708a4d2d9d090d7ed1f41')
+makedepends=('cmake' 'boost' 'boost-libs' 'boost' 'zlib' 'openssl')
+source=(https://github.com/zaphoyd/${pkgname}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
+sha512sums=('b2afc63edb69ce81a3a6c06b3d857b3e8820f0e22300ac32bb20ab30ff07bd58bd5ada3e526ed8ab52de934e0e3a26cad2118b0e68ecf3e5e9e8d7101348fd06')
+b2sums=('dacee33832f493d465afe208f9edea1393414a22c8db8f8c86b8f913521d0d8d68b95673a2e82b7479acfbab1ac541eda2d713a55d5de387b3879461d5884df7')
 
 prepare() {
-  cd $pkgname-$pkgver
-  patch -p1 -i ../scons-python3.patch # Fix build with python3 scons
+  cd ${pkgname}-${pkgver}
+  sed 's|"${WEBSOCKETPP_BOOST_LIBS}"|${WEBSOCKETPP_BOOST_LIBS}|' -i CMakeLists.txt
 }
 
 build() {
   cd ${pkgname}-${pkgver}
-  WSPP_ENABLE_CPP11=1 \
-    BOOST_LIBS=/usr/lib \
-    BOOST_INCLUDES=/usr/include/boost \
-    scons "${MAKEFLAGS}"
-  (cd build
-    cmake -DCMAKE_INSTALL_PREFIX=/usr ..
-  )
+  cmake -B build \
+    -DCMAKE_BUILD_TYPE=None \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DENABLE_CPP11=ON \
+    -DBUILD_TESTS=ON
+  make -C build
 }
 
 check() {
   cd ${pkgname}-${pkgver}
-  WSPP_ENABLE_CPP11=1 \
-    BOOST_LIBS=/usr/lib \
-    BOOST_INCLUDES=/usr/include/boost \
-    scons test
+  make -C build test
 }
 
 package() {
   cd ${pkgname}-${pkgver}
   make -C build DESTDIR="${pkgdir}" install
-  install -Dm 644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-  install -Dm 644 readme.md "${pkgdir}/usr/share/doc/${pkgname}/README"
+  install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -Dm 644 readme.md -t "${pkgdir}/usr/share/doc/${pkgname}"
 }
 
 # vim: ts=2 sw=2 et:

Deleted: scons-python3.patch
===================================================================
--- scons-python3.patch	2020-05-17 11:12:06 UTC (rev 628243)
+++ scons-python3.patch	2020-05-17 12:03:12 UTC (rev 628244)
@@ -1,104 +0,0 @@
---- 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