[arch-commits] Commit in xrootd/trunk (PKGBUILD cxx17.patch)

Konstantin Gizdov kgizdov at archlinux.org
Mon Feb 24 17:28:37 UTC 2020


    Date: Monday, February 24, 2020 @ 17:28:36
  Author: kgizdov
Revision: 580664

upgpkg: xrootd 4.11.2-1

Added:
  xrootd/trunk/cxx17.patch
Modified:
  xrootd/trunk/PKGBUILD

-------------+
 PKGBUILD    |   21 ++++++++++++++++-----
 cxx17.patch |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-02-24 17:24:55 UTC (rev 580663)
+++ PKGBUILD	2020-02-24 17:28:36 UTC (rev 580664)
@@ -3,21 +3,28 @@
 # Contributor: Alex Pearce < alex at alexpearce dot me >
 pkgname=xrootd
 pkgdesc="Software framework for fast, low latency, scalable and fault tolerant data access."
-pkgver=4.11.1
+pkgver=4.11.2
 pkgrel=1
 arch=('x86_64')
 url="http://xrootd.org"
 license=('LGPL3')
-depends=('ceph' 'python' 'cppunit')
-makedepends=('ceph' 'cmake' 'python')
+depends=('ceph' 'curl' 'libxml2' 'openssl' 'perl' 'python')
+makedepends=('cmake')
 checkdepends=('cppunit')
-source=("${url}/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
-sha256sums=('87fa867168e5accc36a37cfe66a3b64f2cf2a91e2975b85adbf5efda6c9d7029')
+source=("${url}/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz"
+        'cxx17.patch')
+sha256sums=('4620824db97fcc37dc3dd26110da8e5c3aab1d8302e4921d4f32e83207060603'
+            '9cc3acec0753355772c0d0d9de40456aeb3f578c092c4fd3d38f6463d58d5103')
 
 get_pyver () {
     python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
 }
 
+prepare () {
+    cd "${srcdir}/${pkgbase}-${pkgver}"
+    patch -Np1 -i "${srcdir}/cxx17.patch"
+}
+
 build() {
     cd "${srcdir}/${pkgbase}-${pkgver}"
 
@@ -31,6 +38,7 @@
     cmake -DCMAKE_BUILD_TYPE:STRING=Release \
           -DCMAKE_INSTALL_LIBDIR:PATH=lib \
           -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+          -DCMAKE_CXX_STANDARD="17" \
           -DENABLE_TESTS=1 \
           -DXRD_PYTHON_REQ_VERSION=$(get_pyver) \
           "${srcdir}/${pkgbase}-${pkgver}"
@@ -65,4 +73,7 @@
 package() {
     cd "${srcdir}/build"
     make DESTDIR="${pkgdir}" install
+    # drop unneeded test bin & lib
+    rm "${pkgdir}/usr/bin/text-runner"
+    rm "${pkgdir}/usr/lib/libXrdClTests.so"
 }

Added: cxx17.patch
===================================================================
--- cxx17.patch	                        (rev 0)
+++ cxx17.patch	2020-02-24 17:28:36 UTC (rev 580664)
@@ -0,0 +1,54 @@
+diff --git a/bindings/python/setup.py.in b/bindings/python/setup.py.in
+index 74fbe36a6..6bedbead8 100644
+--- a/bindings/python/setup.py.in
++++ b/bindings/python/setup.py.in
+@@ -8,13 +8,13 @@ import subprocess
+ # Remove the "-Wstrict-prototypes" compiler option, which isn't valid for C++.
+ cfg_vars = sysconfig.get_config_vars()
+ opt = cfg_vars["OPT"]
+-cfg_vars["OPT"] = " ".join( flag for flag in opt.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++0x"
++cfg_vars["OPT"] = " ".join( flag for flag in opt.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++17"
+ 
+ cflags = cfg_vars["CFLAGS"]
+-cfg_vars["CFLAGS"] =  " ".join( flag for flag in cflags.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++0x"
++cfg_vars["CFLAGS"] =  " ".join( flag for flag in cflags.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++17"
+ 
+ py_cflags = cfg_vars["PY_CFLAGS"]
+-cfg_vars["PY_CFLAGS"] = " ".join( flag for flag in py_cflags.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++0x"
++cfg_vars["PY_CFLAGS"] = " ".join( flag for flag in py_cflags.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++17"
+ 
+ ccl=cfg_vars["CC"].split()
+ ccl[0]="${CMAKE_C_COMPILER}"
+diff --git a/cmake/XRootDOSDefs.cmake b/cmake/XRootDOSDefs.cmake
+index 4933fd13f..20d8c524b 100644
+--- a/cmake/XRootDOSDefs.cmake
++++ b/cmake/XRootDOSDefs.cmake
+@@ -21,13 +21,13 @@ add_definitions( -DUSE_LIBC_SEMAPHORE=${USE_LIBC_SEMAPHORE} )
+ #-------------------------------------------------------------------------------
+ # Enable c++0x / c++11
+ #-------------------------------------------------------------------------------
+-set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -DOPENSSL_NO_FILENAMES" )
++set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -DOPENSSL_NO_FILENAMES" )
+ 
+ #-------------------------------------------------------------------------------
+ # GCC
+ #-------------------------------------------------------------------------------
+ if( CMAKE_COMPILER_IS_GNUCXX )
+-  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" )
++  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17" )
+   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" )
+   #-----------------------------------------------------------------------------
+   # Set -Werror only for Debug (or undefined) build type or if we have been
+diff --git a/src/XrdSsi/XrdSsiAtomics.hh b/src/XrdSsi/XrdSsiAtomics.hh
+index ffe0a938e..ce23083e7 100644
+--- a/src/XrdSsi/XrdSsiAtomics.hh
++++ b/src/XrdSsi/XrdSsiAtomics.hh
+@@ -34,7 +34,7 @@
+ #undef NEED_ATOMIC_MUTEX
+ 
+ //-----------------------------------------------------------------------------
+-//! Use native atomics at the c11 or higher level (-std=c++0x -lstdc++)
++//! Use native atomics at the c11 or higher level (-std=c++17 -lstdc++)
+ //-----------------------------------------------------------------------------
+ #if __cplusplus >= 201103L
+ #include <atomic>



More information about the arch-commits mailing list