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

Konstantin Gizdov kgizdov at archlinux.org
Thu Jul 23 21:26:21 UTC 2020


    Date: Thursday, July 23, 2020 @ 21:26:21
  Author: kgizdov
Revision: 665106

upgpkg: xrootd 5.0.0-1

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

--------------------------+
 PKGBUILD                 |   19 +++++++++++-------
 add_missing_header.patch |   27 ++++++++++++++++++++++++++
 cxx17.patch              |   46 +++++++++++++++++++++++++++++++++------------
 3 files changed, 73 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-23 21:06:33 UTC (rev 665105)
+++ PKGBUILD	2020-07-23 21:26:21 UTC (rev 665106)
@@ -3,18 +3,22 @@
 # 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.12.3
-pkgrel=2
+pkgver=5.0.0
+pkgrel=1
 arch=('x86_64')
 url="https://xrootd.slac.stanford.edu/"
 license=('LGPL3')
-depends=('ceph' 'curl' 'libxml2' 'openssl' 'perl' 'python')
+depends=('ceph' 'curl' 'json-c' 'libxml2' 'openssl' 'perl' 'python')
 makedepends=('cmake')
 checkdepends=('cppunit')
-source=("${url}/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz"
-        'cxx17.patch')
-sha256sums=('6f2ca1accc8d49d605706bb556777c753860bf46d845b1ee11393a5cb5987f15'
-            'ad423ea5c78c89e4f048da5c0ffd0fe263a3005e6de638077fbd770de89603eb')
+source=(
+    "${url}/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz"
+    'cxx17.patch'
+    'add_missing_header.patch'
+)
+sha256sums=('cb5ae36e3ed3015691b9d3884ea863c5772658d6af7c35f19b6b7233e2a11359'
+            '828de400b8fef40a80b9eadb8198fdfe7c991515a466045b699425df2f681817'
+            '68eac594d8d3b15c1e4d8522c4422a26c9a51c9206d3a88fedf00d4e9599d455')
 
 get_pyver () {
     python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
@@ -23,6 +27,7 @@
 prepare () {
     cd "${srcdir}/${pkgbase}-${pkgver}"
     patch -Np1 -i "${srcdir}/cxx17.patch"
+    patch -Np1 -i "${srcdir}/add_missing_header.patch"
 }
 
 build() {

Added: add_missing_header.patch
===================================================================
--- add_missing_header.patch	                        (rev 0)
+++ add_missing_header.patch	2020-07-23 21:26:21 UTC (rev 665106)
@@ -0,0 +1,27 @@
+diff --git a/src/Xrd/XrdConfig.cc b/src/Xrd/XrdConfig.cc
+index 1be14323e..4b6d9caec 100644
+--- a/src/Xrd/XrdConfig.cc
++++ b/src/Xrd/XrdConfig.cc
+@@ -46,6 +46,7 @@
+ #include <sys/resource.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/socket.h>
+ #include <sys/un.h>
+
+ #include "XrdVersion.hh"
+@@ -793,12 +794,12 @@ int XrdConfig::ConfigXeq(char *var, XrdOucStream &Config, XrdSysError *eDest)
+
+ int XrdConfig::ASocket(const char *path, const char *fname, mode_t mode)
+ {
+-   struct sockaddr_un unix;
++   struct sockaddr_un my_local_unix;
+    int  plen = strlen(path), flen = strlen(fname);
+
+ // Make sure we can fit everything in our buffer
+ //
+-   if ((plen + flen + 3) > (int)sizeof(unix.sun_path))
++   if ((plen + flen + 3) > (int)sizeof(my_local_unix.sun_path))
+       {Log.Emsg("Config", "admin path", path, "too long");
+        return 1;
+       }

Modified: cxx17.patch
===================================================================
--- cxx17.patch	2020-07-23 21:06:33 UTC (rev 665105)
+++ cxx17.patch	2020-07-23 21:26:21 UTC (rev 665106)
@@ -1,33 +1,36 @@
 diff --git a/bindings/python/setup.py.in b/bindings/python/setup.py.in
-index 74fbe36a6..6bedbead8 100644
+index cea13f3a9..dcfc46b05 100644
 --- a/bindings/python/setup.py.in
 +++ b/bindings/python/setup.py.in
-@@ -8,15 +8,15 @@
+@@ -8,15 +8,15 @@ 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"
-
+-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"
+ 
  # pypy doesn't define PY_CFLAGS so skip it if it's missing
  if "PY_CFLAGS" in cfg_vars:
    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
+index cf733e4fe..c749813c6 100644
 --- a/cmake/XRootDOSDefs.cmake
 +++ b/cmake/XRootDOSDefs.cmake
-@@ -21,13 +21,13 @@ add_definitions( -DUSE_LIBC_SEMAPHORE=${USE_LIBC_SEMAPHORE} )
+@@ -19,15 +19,15 @@ endif()
+ add_definitions( -DUSE_LIBC_SEMAPHORE=${USE_LIBC_SEMAPHORE} )
+ 
  #-------------------------------------------------------------------------------
- # Enable c++0x / c++11
+-# Enable c++0x / c++11
++# Enable c++1y / c++17
  #-------------------------------------------------------------------------------
 -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" )
@@ -42,10 +45,10 @@
    #-----------------------------------------------------------------------------
    # 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
+index 817cacf13..45889d2f8 100644
 --- a/src/XrdSsi/XrdSsiAtomics.hh
 +++ b/src/XrdSsi/XrdSsiAtomics.hh
-@@ -34,7 +34,7 @@
+@@ -34,12 +34,12 @@
  #undef NEED_ATOMIC_MUTEX
  
  //-----------------------------------------------------------------------------
@@ -54,3 +57,22 @@
  //-----------------------------------------------------------------------------
  #if __cplusplus >= 201103L
  #include <atomic>
+ #define Atomic(type)    std::atomic<type>
+-#define Atomic_IMP "C++11"
++#define Atomic_IMP "C++17"
+ #define Atomic_BEG(x)
+ #define Atomic_DEC(x)          x.fetch_sub(1,std::memory_order_relaxed)
+ #define Atomic_GET(x)          x.load(std::memory_order_relaxed)
+diff --git a/tests/XrdClTests/tls/CMakeLists.txt b/tests/XrdClTests/tls/CMakeLists.txt
+index bf6ee2317..f9ce03ca0 100644
+--- a/tests/XrdClTests/tls/CMakeLists.txt
++++ b/tests/XrdClTests/tls/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ 
+ include( XRootDCommon )
+ 
+-set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" )
++set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17" )
+ 
+ #-------------------------------------------------------------------------------
+ # xrdcopy



More information about the arch-commits mailing list