[arch-commits] Commit in (5 files)

Konstantin Gizdov kgizdov at archlinux.org
Fri Jul 24 15:41:17 UTC 2020


    Date: Friday, July 24, 2020 @ 15:41:16
  Author: kgizdov
Revision: 665165

initial release

Added:
  xrootd4/
  xrootd4/repos/
  xrootd4/trunk/
  xrootd4/trunk/PKGBUILD
  xrootd4/trunk/cxx17.patch

-------------+
 PKGBUILD    |   84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 cxx17.patch |   56 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 140 insertions(+)

Added: xrootd4/trunk/PKGBUILD
===================================================================
--- xrootd4/trunk/PKGBUILD	                        (rev 0)
+++ xrootd4/trunk/PKGBUILD	2020-07-24 15:41:16 UTC (rev 665165)
@@ -0,0 +1,84 @@
+# Maintainer: Konstantin Gizdov < arch at kge dot pw >
+# Contributor: Jan Kašpar < jan.kaspar at gmail dot com >
+# Contributor: Alex Pearce < alex at alexpearce dot me >
+_pkgname=xrootd
+pkgname="${_pkgname}4"
+pkgdesc="Software framework for fast, low latency, scalable and fault tolerant data access."
+pkgver=4.12.3
+pkgrel=3
+arch=('x86_64')
+url="https://xrootd.slac.stanford.edu/"
+license=('LGPL3')
+depends=('ceph' 'curl' 'libxml2' 'openssl' 'perl' 'python')
+makedepends=('cmake')
+checkdepends=('cppunit')
+source=("${url}/download/v${pkgver}/${_pkgname}-${pkgver}.tar.gz"
+        'cxx17.patch')
+sha256sums=('6f2ca1accc8d49d605706bb556777c753860bf46d845b1ee11393a5cb5987f15'
+            'ad423ea5c78c89e4f048da5c0ffd0fe263a3005e6de638077fbd770de89603eb')
+
+get_pyver () {
+    python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
+}
+
+prepare () {
+    cd "${srcdir}/${_pkgname}-${pkgver}"
+    patch -Np1 -i "${srcdir}/cxx17.patch"
+}
+
+build() {
+    cd "${srcdir}/${_pkgname}-${pkgver}"
+
+    # configure
+    mkdir -p "${srcdir}/build"
+    cd "${srcdir}/build"
+
+    CFLAGS="${CFLAGS}" \
+    CXXFLAGS="${CXXFLAGS}" \
+    LDFLAGS="${LDFLAGS}" \
+    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}/${_pkgname}-${pkgver}"
+
+    # build
+    make
+}
+
+check() {
+    cd "${srcdir}/build/tests"
+
+    # Check has significantly changed, to-be-updated
+    # ./common/text-runner ./XrdCephTests/libXrdCephTests.so "All Tests"
+
+    ##
+    # This requires a running XRootD server with multiIP DNS forwarder and local disk servers
+    # only run this if you have configured the env correctly,
+    # examples in https://github.com/xrootd/xrootd-test-suite
+    # sample environment can be configured like so:
+    # export XRDTEST_MAINSERVERURL=metaman.xrd.test
+    # or export XRDTEST_MAINSERVERURL=http://xrootd.cern.ch/
+    # export XRDTEST_DISKSERVERURL=srv1.xrd.test
+    # or export XRDTEST_DISKSERVERURL=http://xrootd.cern.ch/
+    # export XRDTEST_DATAPATH=/tests/test-files/
+    # export XRDTEST_LOCALFILE=/data/a048e67f-4397-4bb8-85eb-8d7e40d90763.dat
+    # or export XRDTEST_LOCALFILE=/tmp/accwe.root
+    # export XRDTEST_REMOTEFILE=${XRDTEST_MAINSERVERURL}${XRDTEST_DATAPATH}/a048e67f-4397-4bb8-85eb-8d7e40d90763.dat
+    # or export XRDTEST_MULTIIPSERVERURL=multiip.xrd.test
+    # ./common/text-runner ./XrdClTests/libXrdClTests.so "All Tests"
+}
+
+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"
+    install -d "${pkgdir}/usr/lib/cmake/XRootD"
+    mv "${pkgdir}/usr/share/xrootd/cmake/XRootDConfig.cmake" "${pkgdir}/usr/lib/cmake/XRootD"/
+    rm -rf "${pkgdir}/usr/share/xrootd/cmake"
+    ln -s "/usr/lib/cmake" "${pkgdir}/usr/share/xrootd/cmake"
+}

Added: xrootd4/trunk/cxx17.patch
===================================================================
--- xrootd4/trunk/cxx17.patch	                        (rev 0)
+++ xrootd4/trunk/cxx17.patch	2020-07-24 15:41:16 UTC (rev 665165)
@@ -0,0 +1,56 @@
+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,15 +8,15 @@
+ # 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"
+
+ # 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
+--- 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