From c7f5d45c84c7514edd9bc3e701fdab4b5004d893 Mon Sep 17 00:00:00 2001 From: Ben Jargowsky Date: Tue, 4 Jan 2022 16:11:43 -0800 Subject: [PATCH 1/4] New package: R-cran-RInside-0.2.16 --- common/shlibs | 16 ++++++++++++++++ srcpkgs/R-cran-RInside/template | 12 ++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 srcpkgs/R-cran-RInside/template diff --git a/common/shlibs b/common/shlibs index 5096ab5dad6b..84dd818ebfb3 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4117,3 +4117,19 @@ libspatialite.so.7 libspatialite-5.0.1_1 mod_spatialite.so.7 libspatialite-5.0.1_1 libSvtAv1Enc.so.0 libsvt-av1-0.9.0_1 libSvtAv1Dec.so.0 libsvt-av1-0.9.0_1 +libRInside.so R-cran-RInside-0.2.16_1 +libXrdUtils.so.3 xrootd-5.4.0_1 +libXrdCl.so.3 xrootd-5.4.0_1 +libXrdServer.so.3 xrootd-5.4.0_1 +libXrdCrypto.so.2 xrootd-5.4.0_1 +libXrdPosix.so.3 xrootd-5.4.0_1 +libXrdHttpUtils.so.2 xrootd-5.4.0_1 +libXrdSsiLib.so.2 xrootd-5.4.0_1 +libXrdCryptoLite.so.2 xrootd-5.4.0_1 +libCore.so root-6.24.06_1 +libTree.so root-6.24.06_1 +libRIO.so root-6.24.06_1 +libMatrix.so root-6.24.06_1 +libThread.so root-6.24.06_1 +libTMVA.so root-6.24.06_1 +libMathCore.so root-6.24.06_1 diff --git a/srcpkgs/R-cran-RInside/template b/srcpkgs/R-cran-RInside/template new file mode 100644 index 000000000000..c15b30293151 --- /dev/null +++ b/srcpkgs/R-cran-RInside/template @@ -0,0 +1,12 @@ +# Template file for 'R-cran-RInside' +pkgname=R-cran-RInside +version=0.2.16 +revision=1 +build_style=R-cran +makedepends="R-cran-Rcpp" +short_desc="C++ classes to embed R in C++ (and C) applications" +maintainer="Ben Jargowsky " +license="GPL-2.0-or-later" +homepage="https://CRAN.R-project.org/package=RInside" +checksum=7ae4ade128ea05f37068d59e610822ff0b277f9d39d8900f7eb31759ad5a2a0e +shlib_provides="libRInside.so" From be84c80544802639b1df49e23cca65673995b7da Mon Sep 17 00:00:00 2001 From: Ben Jargowsky Date: Tue, 11 Jan 2022 12:36:46 -0800 Subject: [PATCH 2/4] New package: xrootd-5.4.0 --- srcpkgs/xrootd/patches/musl.patch | 227 ++++++++++++++++++++++++++++++ srcpkgs/xrootd/template | 17 +++ 2 files changed, 244 insertions(+) create mode 100644 srcpkgs/xrootd/patches/musl.patch create mode 100644 srcpkgs/xrootd/template diff --git a/srcpkgs/xrootd/patches/musl.patch b/srcpkgs/xrootd/patches/musl.patch new file mode 100644 index 000000000000..7dccd97d6c45 --- /dev/null +++ b/srcpkgs/xrootd/patches/musl.patch @@ -0,0 +1,227 @@ +diff --git a/src/Xrd/XrdConfig.hh b/src/Xrd/XrdConfig.hh +index a06ad462f..702403d82 100644 +--- a/src/Xrd/XrdConfig.hh ++++ b/src/Xrd/XrdConfig.hh +@@ -34,6 +34,11 @@ + #include "Xrd/XrdProtLoad.hh" + #include "Xrd/XrdProtocol.hh" + ++#if defined(__linux__) && !defined(__GLIBC__) ++#define __NEED_mode_t ++#include ++#endif ++ + class XrdSysError; + class XrdTcpMonInfo; + class XrdNetSecurity; +diff --git a/src/XrdAcc/XrdAccGroups.cc b/src/XrdAcc/XrdAccGroups.cc +index e663fdd35..14c3b19d6 100644 +--- a/src/XrdAcc/XrdAccGroups.cc ++++ b/src/XrdAcc/XrdAccGroups.cc +@@ -46,6 +46,14 @@ + #include "XrdAcc/XrdAccGroups.hh" + #include "XrdAcc/XrdAccPrivs.hh" + ++#if defined(__linux__) && !defined(__GLIBC__) ++int innetgr(const char *netgroup, const char *host, const char *user, ++ const char *domain) ++{ ++ return 0; ++} ++#endif ++ + // Additionally, this routine does not support a user in more than + // NGROUPS_MAX groups. This is a standard unix limit defined in limits.h. + +diff --git a/src/XrdCl/XrdClFileStateHandler.hh b/src/XrdCl/XrdClFileStateHandler.hh +index 9f9d8b91f..5ff49cbbc 100644 +--- a/src/XrdCl/XrdClFileStateHandler.hh ++++ b/src/XrdCl/XrdClFileStateHandler.hh +@@ -42,6 +42,12 @@ + #include + #include + ++#if defined(__linux__) && !defined(__GLIBC__) ++#define __NEED_suseconds_t ++#define __NEED_struct_timeval ++#include ++#endif ++ + namespace + { + class PgReadHandler; +diff --git a/src/XrdCl/XrdClMonitor.hh b/src/XrdCl/XrdClMonitor.hh +index 2fc753777..d22c3c275 100644 +--- a/src/XrdCl/XrdClMonitor.hh ++++ b/src/XrdCl/XrdClMonitor.hh +@@ -43,6 +43,12 @@ + + #include "XrdCl/XrdClFileSystem.hh" + ++#if defined(__linux__) && !defined(__GLIBC__) ++#define __NEED_suseconds_t ++#define __NEED_struct_timeval ++#include ++#endif ++ + namespace XrdCl + { + class URL; +diff --git a/src/XrdNet/XrdNetSecurity.cc b/src/XrdNet/XrdNetSecurity.cc +index 0f8451127..e39b1ef4b 100644 +--- a/src/XrdNet/XrdNetSecurity.cc ++++ b/src/XrdNet/XrdNetSecurity.cc +@@ -40,12 +40,14 @@ + #include + #include + #include ++#include "XrdSys/XrdWin32.hh" ++#endif ++#if WIN32 || defined(__linux__) && !defined(__GLIBC__) + int innetgr(const char *netgroup, const char *host, const char *user, + const char *domain) + { + return 0; + } +-#include "XrdSys/XrdWin32.hh" + #endif + + #include "XrdNet/XrdNetAddr.hh" +diff --git a/src/XrdPosix/XrdPosix.cc b/src/XrdPosix/XrdPosix.cc +index 0f32dc2ee..b6dea957f 100644 +--- a/src/XrdPosix/XrdPosix.cc ++++ b/src/XrdPosix/XrdPosix.cc +@@ -37,6 +37,9 @@ + #include + #include + #include ++#if defined(__linux__) && !defined(_IO_ERR_SEEN) ++#include ++#endif + + #include "XrdSys/XrdSysHeaders.hh" + #include "XrdPosix/XrdPosixLinkage.hh" +@@ -311,8 +314,12 @@ size_t XrdPosix_Fread(void *ptr, size_t size, size_t nitems, FILE *stream) + if (bytes > 0 && size) rc = bytes/size; + #ifndef SUNX86 + #if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) ++#ifdef _IO_ERR_SEEN + else if (bytes < 0) stream->_flags |= _IO_ERR_SEEN; + else stream->_flags |= _IO_EOF_SEEN; ++#else ++ else if (bytes < 0) __fseterr(stream); ++#endif + #elif defined(__APPLE__) || defined(__FreeBSD__) + else if (bytes < 0) stream->_flags |= __SEOF; + else stream->_flags |= __SERR; +@@ -482,7 +489,11 @@ size_t XrdPosix_Fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream + if (bytes > 0 && size) rc = bytes/size; + #ifndef SUNX86 + #if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) ++#ifdef _IO_ERR_SEEN + else stream->_flags |= _IO_ERR_SEEN; ++#else ++ else __fseterr(stream); ++#endif + #elif defined(__APPLE__) || defined(__FreeBSD__) + else stream->_flags |= __SERR; + #else +diff --git a/src/XrdPosix/XrdPosixLinkage.hh b/src/XrdPosix/XrdPosixLinkage.hh +index 903153252..b5cc6d4b4 100644 +--- a/src/XrdPosix/XrdPosixLinkage.hh ++++ b/src/XrdPosix/XrdPosixLinkage.hh +@@ -40,6 +40,7 @@ + #include + + #include "XrdPosix/XrdPosixOsDep.hh" ++#include "XrdPosix/XrdPosixXrootd.hh" + #include "XrdSys/XrdSysPlatform.hh" + + /******************************************************************************/ +diff --git a/src/XrdPosix/XrdPosixMap.hh b/src/XrdPosix/XrdPosixMap.hh +index ac2da483a..a15602787 100644 +--- a/src/XrdPosix/XrdPosixMap.hh ++++ b/src/XrdPosix/XrdPosixMap.hh +@@ -36,6 +36,11 @@ + #include "XrdCl/XrdClFileSystem.hh" + #include "XrdCl/XrdClXRootDResponses.hh" + ++#if defined(__linux__) && !defined(__GLIBC__) ++#define __NEED_dev_t ++#include ++#endif ++ + class XrdPosixMap + { + public: +diff --git a/src/XrdPosix/XrdPosixPreload.cc b/src/XrdPosix/XrdPosixPreload.cc +index 867b73479..d967c53b3 100644 +--- a/src/XrdPosix/XrdPosixPreload.cc ++++ b/src/XrdPosix/XrdPosixPreload.cc +@@ -42,6 +42,22 @@ + + #include "XrdPosix/XrdPosixExtern.hh" + ++#ifdef creat64 ++#undef creat64 ++#undef fseeko64 ++#undef ftello64 ++#undef ftruncate64 ++#undef lseek64 ++#undef open64 ++#undef pread64 ++#undef pwrite64 ++#undef readdir64 ++#undef readdir64_r ++#undef statfs64 ++#undef statvfs64 ++#undef truncate64 ++#endif ++ + /******************************************************************************/ + /* G l o b a l D e c l a r a t i o n s */ + /******************************************************************************/ +diff --git a/src/XrdSys/XrdSysPlatform.hh b/src/XrdSys/XrdSysPlatform.hh +index a1ac544ad..eaeaeabac 100644 +--- a/src/XrdSys/XrdSysPlatform.hh ++++ b/src/XrdSys/XrdSysPlatform.hh +@@ -241,16 +241,8 @@ extern "C" + #if defined(_AIX) || \ + (defined(XR__SUNGCC3) && !defined(__arch64__)) + # define SOCKLEN_t size_t +-#elif defined(XR__GLIBC) || \ +- defined(__FreeBSD__) || \ +- (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) || \ +- (defined(XR__SUNGCC3) && defined(__arch64__)) || defined(__APPLE__) || \ +- (defined(__sun) && defined(_SOCKLEN_T)) +-# ifndef SOCKLEN_t +-# define SOCKLEN_t socklen_t +-# endif + #elif !defined(SOCKLEN_t) +-# define SOCKLEN_t int ++# define SOCKLEN_t socklen_t + #endif + + #ifdef _LP64 +diff --git a/src/XrdSys/XrdSysPthread.hh b/src/XrdSys/XrdSysPthread.hh +index 17f8fd0be..78741a7dc 100644 +--- a/src/XrdSys/XrdSysPthread.hh ++++ b/src/XrdSys/XrdSysPthread.hh +@@ -351,7 +351,7 @@ enum PrefType {prefWR=1}; + + XrdSysRWLock(PrefType ptype) + { +-#ifdef __linux__ ++#ifdef __GLIBC__ + pthread_rwlockattr_t attr; + pthread_rwlockattr_setkind_np(&attr, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); +@@ -367,7 +367,7 @@ enum PrefType {prefWR=1}; + inline void ReInitialize(PrefType ptype) + { + pthread_rwlock_destroy(&lock); +-#ifdef __linux__ ++#ifdef __GLIBC__ + pthread_rwlockattr_t attr; + pthread_rwlockattr_setkind_np(&attr, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); diff --git a/srcpkgs/xrootd/template b/srcpkgs/xrootd/template new file mode 100644 index 000000000000..9cb4d7af9c3a --- /dev/null +++ b/srcpkgs/xrootd/template @@ -0,0 +1,17 @@ +# Template file for 'xrootd' +pkgname=xrootd +version=5.4.2 +revision=1 +build_style=cmake +makedepends="zlib-devel openssl-devel libuuid-devel readline-devel" +short_desc="Low latency, scalable and fault tolerant access to data" +maintainer="Ben Jargowsky " +license="LGPL-3.0-or-later" +homepage="https://xrootd.slac.stanford.edu" +distfiles="http://xrootd.org/download/v${version}/xrootd-${version}.tar.gz" +checksum=d868ba5d8b71ec38f7a113d2d8f3e25bbcedc1bc23d21bba1686ddfdb2b900c1 + +if [ "$XBPS_TARGET_LIBC" = musl ]; then + configure_args="-DCMAKE_EXE_LINKER_FLAGS=-lexecinfo" + makedepends+=" libexecinfo-devel" +fi From 34f4aea74d4ed328959122e7cf230d9e6c30407f Mon Sep 17 00:00:00 2001 From: Ben Jargowsky Date: Tue, 11 Jan 2022 12:38:46 -0800 Subject: [PATCH 3/4] New package: libvdt-0.4.3 --- srcpkgs/libvdt-devel | 1 + srcpkgs/libvdt/template | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 120000 srcpkgs/libvdt-devel create mode 100644 srcpkgs/libvdt/template diff --git a/srcpkgs/libvdt-devel b/srcpkgs/libvdt-devel new file mode 120000 index 000000000000..4bf35cfc4ed5 --- /dev/null +++ b/srcpkgs/libvdt-devel @@ -0,0 +1 @@ +./libvdt \ No newline at end of file diff --git a/srcpkgs/libvdt/template b/srcpkgs/libvdt/template new file mode 100644 index 000000000000..3caa629d6eb2 --- /dev/null +++ b/srcpkgs/libvdt/template @@ -0,0 +1,28 @@ +# Template file for 'libvdt' +pkgname=libvdt +version=0.4.3 +revision=1 +wrksrc="vdt-${version}" +build_style=cmake +case "$XBPS_TARGET_MACHINE" in + aarch64*|arm*) + configure_args="-DSSE=OFF -DNEON=OFF" + make_cmd=make + export CMAKE_GENERATOR="Unix Makefiles" + ;; +esac +hostmakedepends="python3" +short_desc="Collection of fast and inline implementations of mathematical functions" +maintainer="Ben Jargowsky " +license="LGPL-3.0-or-later" +homepage="https://github.com/dpiparo/vdt" +distfiles="https://github.com/dpiparo/vdt/archive/refs/tags/v${version}.tar.gz" +checksum=705674612ebb5c182b65a8f61f4d173eb7fe7cdeee2235b402541a492e08ace1 + +libvdt-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + } +} From 323ccd95f9fb2cbeb895c49c3023ab91bbc454b1 Mon Sep 17 00:00:00 2001 From: Ben Jargowsky Date: Mon, 20 Dec 2021 23:55:36 -0500 Subject: [PATCH 4/4] New package: root-6.24.06 --- srcpkgs/python3-pyroot | 1 + srcpkgs/root-R | 1 + srcpkgs/root/INSTALL.msg | 3 ++ srcpkgs/root/patches/musl.patch | 21 ++++++++ srcpkgs/root/template | 95 +++++++++++++++++++++++++++++++++ 5 files changed, 121 insertions(+) create mode 120000 srcpkgs/python3-pyroot create mode 120000 srcpkgs/root-R create mode 100644 srcpkgs/root/INSTALL.msg create mode 100644 srcpkgs/root/patches/musl.patch create mode 100644 srcpkgs/root/template diff --git a/srcpkgs/python3-pyroot b/srcpkgs/python3-pyroot new file mode 120000 index 000000000000..9f64bd473b46 --- /dev/null +++ b/srcpkgs/python3-pyroot @@ -0,0 +1 @@ +./root \ No newline at end of file diff --git a/srcpkgs/root-R b/srcpkgs/root-R new file mode 120000 index 000000000000..9f64bd473b46 --- /dev/null +++ b/srcpkgs/root-R @@ -0,0 +1 @@ +./root \ No newline at end of file diff --git a/srcpkgs/root/INSTALL.msg b/srcpkgs/root/INSTALL.msg new file mode 100644 index 000000000000..4d92c4ced6bc --- /dev/null +++ b/srcpkgs/root/INSTALL.msg @@ -0,0 +1,3 @@ +Before using ROOT, source 'thisroot.sh' to set up environmental variables. + +$ source /usr/bin/thisroot.sh # also available: thisroot.{csh,fish} diff --git a/srcpkgs/root/patches/musl.patch b/srcpkgs/root/patches/musl.patch new file mode 100644 index 000000000000..7605e91675a3 --- /dev/null +++ b/srcpkgs/root/patches/musl.patch @@ -0,0 +1,21 @@ +diff --git a/core/thread/src/TPosixThread.cxx b/core/thread/src/TPosixThread.cxx +index 1e879c1c3a..4e1245baeb 100644 +--- a/core/thread/src/TPosixThread.cxx ++++ b/core/thread/src/TPosixThread.cxx +@@ -37,13 +37,13 @@ Int_t TPosixThread::Run(TThread *th, const int affinity) + pthread_attr_init(attr); + + if (affinity >= 0) { +- #ifdef R__MACOSX +- Warning("Run", "Affinity setting not yet implemented on MacOS"); +- #else ++ #ifdef __GLIBC__ + cpu_set_t cpuset; + CPU_ZERO(&cpuset); + CPU_SET(affinity, &cpuset); + pthread_attr_setaffinity_np(attr, sizeof(cpu_set_t), &cpuset); ++ #else ++ Warning("Run", "Affinity setting not yet implemented on this platform"); + #endif + } + diff --git a/srcpkgs/root/template b/srcpkgs/root/template new file mode 100644 index 000000000000..81af7e68acc8 --- /dev/null +++ b/srcpkgs/root/template @@ -0,0 +1,95 @@ +# Template file for 'root' +pkgname=root +version=6.26.00 +revision=1 +# Only i686 and x86_64 seem to be officially supported +archs="i686* x86_64*" +build_style=cmake +configure_args="-Dgnuinstall=ON -Druntime_cxxmodules=OFF + -Dclad=OFF $(vopt_if fortran '-Dfortran=ON') + -DXROOTD_XrdCl_LIBRARY=/usr/lib/libXrdCl.so.3 + -DCMAKE_INSTALL_LIBDIR=/usr/lib/root -Dr=ON + -DCMAKE_INSTALL_SYSCONFDIR='../etc/root' + -DCMAKE_INSTALL_PYTHONDIR=${py3_sitelib/'usr/'}" +hostmakedepends="gcc-fortran" +makedepends="libX11-devel libXpm-devel libXft-devel libXext-devel + openssl-devel libpng-devel readline-devel tbb-devel liblz4-devel + pcre-devel xxHash-devel libzstd-devel liblzma-devel libvdt-devel + libxml2-devel python3-devel python3-numpy R-cran-Rcpp R-cran-RInside + xrootd" +depends="gcc" +case "$XBPS_TARGET_MACHINE" in + *-musl) + configure_args+=" -Dssl=OFF" + ;; +esac +short_desc="C++ framework for data processing created by CERN" +maintainer="Ben Jargowsky " +license="LGPL-2.1-or-later" +homepage="https://root.cern" +distfiles="https://root.cern/download/root_v${version}.source.tar.gz" +checksum=5fb9be71fdf0c0b5e5951f89c2f03fcb5e74291d043f6240fb86f5ca977d4b31 +build_options="fortran" +build_options_default="fortran" +python_version=3 +shlib_provides="libCore.so libTree.so libRIO.so libMatrix.so libThread.so + libTMVA.so libMathCore.so" + +post_install() { + rm ${DESTDIR}/usr/share/root/fonts/LICENSE + rm ${DESTDIR}/usr/share/root/fonts/arialbd.ttf + rm ${DESTDIR}/usr/share/root/fonts/arialbi.ttf + rm ${DESTDIR}/usr/share/root/fonts/ariali.ttf + rm ${DESTDIR}/usr/share/root/fonts/arial.ttf + rm ${DESTDIR}/usr/share/root/fonts/ariblk.ttf + rm ${DESTDIR}/usr/share/root/fonts/comicbd.ttf + rm ${DESTDIR}/usr/share/root/fonts/comic.ttf + rm ${DESTDIR}/usr/share/root/fonts/courbd.ttf + rm ${DESTDIR}/usr/share/root/fonts/courbi.ttf + rm ${DESTDIR}/usr/share/root/fonts/couri.ttf + rm ${DESTDIR}/usr/share/root/fonts/cour.ttf + rm ${DESTDIR}/usr/share/root/fonts/georgiab.ttf + rm ${DESTDIR}/usr/share/root/fonts/georgiai.ttf + rm ${DESTDIR}/usr/share/root/fonts/georgia.ttf + rm ${DESTDIR}/usr/share/root/fonts/georgiaz.ttf + rm ${DESTDIR}/usr/share/root/fonts/impact.ttf + rm ${DESTDIR}/usr/share/root/fonts/monotype.ttf + rm ${DESTDIR}/usr/share/root/fonts/timesbd.ttf + rm ${DESTDIR}/usr/share/root/fonts/timesbi.ttf + rm ${DESTDIR}/usr/share/root/fonts/timesi.ttf + rm ${DESTDIR}/usr/share/root/fonts/times.ttf + rm ${DESTDIR}/usr/share/root/fonts/trebucbd.ttf + rm ${DESTDIR}/usr/share/root/fonts/trebucbi.ttf + rm ${DESTDIR}/usr/share/root/fonts/trebucit.ttf + rm ${DESTDIR}/usr/share/root/fonts/trebuc.ttf + rm ${DESTDIR}/usr/share/root/fonts/verdanab.ttf + rm ${DESTDIR}/usr/share/root/fonts/verdanai.ttf + rm ${DESTDIR}/usr/share/root/fonts/verdana.ttf + rm ${DESTDIR}/usr/share/root/fonts/verdanaz.ttf + rm ${DESTDIR}/usr/share/root/fonts/webdings.ttf + rm ${DESTDIR}/usr/share/root/fonts/wingding.ttf +} + +python3-pyroot_package() { + short_desc="Python interface to ROOT" + depends="root>=${version}_${revision} python3" + pkg_install() { + vmove ${py3_sitelib} + } +} +root-R_package() { + short_desc="ROOT interface to R" + depends="root>=${version}_${revision}" + pkg_install() { + vmove usr/include/root/RExports.h + vmove usr/include/root/TRDataFrame.h + vmove usr/include/root/TRFunctionExport.h + vmove usr/include/root/TRFunctionImport.h + vmove usr/include/root/TRInterface.h + vmove usr/include/root/TRInternalFunction.h + vmove usr/include/root/TRObject.h + vmove usr/lib/root/libRInterface.so + vmove usr/lib/root/libRMVA.so + vmove usr/lib/root/libRtools.so + } +}