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 61e35731da00a07e994e6707d8ad175abd36d11e 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..f2c889304283 --- /dev/null +++ b/srcpkgs/xrootd/template @@ -0,0 +1,17 @@ +# Template file for 'xrootd' +pkgname=xrootd +version=5.4.1 +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=c0e7bb1a992f1dac68790d0ffaf051c4c52c79491feab42c6db3fbd50b462a39 + +if [ "$XBPS_TARGET_LIBC" = musl ]; then + configure_args="-DCMAKE_EXE_LINKER_FLAGS=-lexecinfo" + makedepends+=" libexecinfo-devel" +fi From 1de63e66b2cbabfb2cc95f597d070740c7947e23 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 f6a76dfd1f0ea1ad1203895d70f58b34a0ff74ee 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 | 424 ++++++++++++++++++++++++++++++++ srcpkgs/root/template | 94 +++++++ 5 files changed, 523 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..cd0a2a46dbef --- /dev/null +++ b/srcpkgs/root/patches/musl.patch @@ -0,0 +1,424 @@ +diff --git a/core/base/inc/Varargs.h b/core/base/inc/Varargs.h +index 525f1f64a6..30983e0124 100644 +--- a/core/base/inc/Varargs.h ++++ b/core/base/inc/Varargs.h +@@ -44,12 +44,10 @@ + #endif + + #if !defined(R__VA_COPY) +-# if defined(__GNUC__) && !defined(__FreeBSD__) +-# define R__VA_COPY(to, from) __va_copy((to), (from)) ++# if defined(va_copy) ++# define R__VA_COPY(to, from) va_copy((to), (from)) + # elif defined(__va_copy) + # define R__VA_COPY(to, from) __va_copy((to), (from)) +-# elif defined(va_copy) +-# define R__VA_COPY(to, from) va_copy((to), (from)) + # elif defined(_WIN32) && _MSC_VER < 1310 + # define R__VA_COPY(to, from) (*(to) = *(from)) + # else +diff --git a/core/clib/src/mmapsup.c b/core/clib/src/mmapsup.c +index 6017afd91b..daf0109977 100644 +--- a/core/clib/src/mmapsup.c ++++ b/core/clib/src/mmapsup.c +@@ -42,13 +42,6 @@ typedef char* caddr_t; + #include + #endif /* __CYGWIN__ */ + +-#if defined(R__LINUX) && !defined(R__GLIBC) && !defined(__CYGWIN__) \ +- || (defined(__CYGWIN__) && (CYGWIN_VERSION_API_MAJOR > 0 || CYGWIN_VERSION_API_MINOR < 213)) +-extern size_t getpagesize PARAMS ((void)); +-#else +-extern int getpagesize PARAMS ((void)); +-#endif +- + #ifndef SEEK_SET + #define SEEK_SET 0 + #endif +diff --git a/core/clib/src/mvalloc.c b/core/clib/src/mvalloc.c +index ef0fdc8196..e062c2d20d 100644 +--- a/core/clib/src/mvalloc.c ++++ b/core/clib/src/mvalloc.c +@@ -29,13 +29,6 @@ Boston, MA 02111-1307, USA. */ + #include + #endif /* __CYGWIN__ */ + +-#if defined(R__LINUX) && !defined(R__GLIBC) && !defined(__CYGWIN__) \ +- || (defined(__CYGWIN__) && (CYGWIN_VERSION_API_MAJOR > 0 || CYGWIN_VERSION_API_MINOR < 213)) +-extern size_t getpagesize PARAMS ((void)); +-#else +-extern int getpagesize PARAMS ((void)); +-#endif +- + #ifdef VMS + #undef _SC_PAGE_SIZE + #undef _SC_PAGESIZE +diff --git a/core/unix/src/TUnixSystem.cxx b/core/unix/src/TUnixSystem.cxx +index 25dfe1cf87..7f92c1146f 100644 +--- a/core/unix/src/TUnixSystem.cxx ++++ b/core/unix/src/TUnixSystem.cxx +@@ -148,17 +148,6 @@ + # define UTMP_NO_ADDR + #endif + +-#if (defined(R__AIX) && !defined(_AIX43)) || \ +- (defined(R__SUNGCC3) && !defined(__arch64__)) +-# define USE_SIZE_T +-#elif defined(R__GLIBC) || defined(R__FBSD) || \ +- (defined(R__SUNGCC3) && defined(__arch64__)) || \ +- defined(R__OBSD) || defined(MAC_OS_X_VERSION_10_4) || \ +- (defined(R__AIX) && defined(_AIX43)) || \ +- (defined(R__SOLARIS) && defined(_SOCKLEN_T)) +-# define USE_SOCKLEN_T +-#endif +- + #if defined(R__LYNXOS) + extern "C" { + extern int putenv(const char *); +@@ -214,7 +203,6 @@ extern "C" { + + // FPE handling includes + #if (defined(R__LINUX) && !defined(R__WINGCC)) +-#include + #include + #include // for prctl() function used in StackTrace() + #endif +@@ -3074,13 +3062,7 @@ TInetAddress TUnixSystem::GetHostByName(const char *hostname) + TInetAddress TUnixSystem::GetSockName(int sock) + { + struct sockaddr addr; +-#if defined(USE_SIZE_T) +- size_t len = sizeof(addr); +-#elif defined(USE_SOCKLEN_T) + socklen_t len = sizeof(addr); +-#else +- int len = sizeof(addr); +-#endif + + TInetAddress ia; + if (getsockname(sock, &addr, &len) == -1) { +@@ -3110,13 +3092,7 @@ TInetAddress TUnixSystem::GetSockName(int sock) + TInetAddress TUnixSystem::GetPeerName(int sock) + { + struct sockaddr addr; +-#if defined(USE_SIZE_T) +- size_t len = sizeof(addr); +-#elif defined(USE_SOCKLEN_T) + socklen_t len = sizeof(addr); +-#else +- int len = sizeof(addr); +-#endif + + TInetAddress ia; + if (getpeername(sock, &addr, &len) == -1) { +@@ -3483,13 +3459,7 @@ int TUnixSystem::GetSockOpt(int sock, int opt, int *val) + { + if (sock < 0) return -1; + +-#if defined(USE_SOCKLEN_T) || defined(_AIX43) + socklen_t optlen = sizeof(*val); +-#elif defined(USE_SIZE_T) +- size_t optlen = sizeof(*val); +-#else +- int optlen = sizeof(*val); +-#endif + + switch (opt) { + case kSendBuffer: +diff --git a/interpreter/cling/lib/Interpreter/Interpreter.cpp b/interpreter/cling/lib/Interpreter/Interpreter.cpp +index d061f04e4b..e6dca5dd90 100644 +--- a/interpreter/cling/lib/Interpreter/Interpreter.cpp ++++ b/interpreter/cling/lib/Interpreter/Interpreter.cpp +@@ -453,7 +453,7 @@ namespace cling { + + // Intercept all atexit calls, as the Interpreter and functions will be long + // gone when the -native- versions invoke them. +-#if defined(__linux__) ++#if defined(__GLIBC__) + const char* LinkageCxx = "extern \"C++\""; + const char* Attr = LangOpts.CPlusPlus ? " throw () " : ""; + #else +diff --git a/io/io/src/TMapFile.cxx b/io/io/src/TMapFile.cxx +index 7fbad8621f..fddd5a9e95 100644 +--- a/io/io/src/TMapFile.cxx ++++ b/io/io/src/TMapFile.cxx +@@ -107,9 +107,7 @@ robust Streamer mechanism I opted for 3). + #include + #include + #include +-#if defined(R__HPUX) || \ +- defined (R__SOLARIS) || defined(R__AIX) || defined(R__HIUX) || \ +- __GLIBC_MINOR__ > 0 ++#ifndef WIN32 + union semun { + int val; // value for SETVAL + struct semid_ds *buf; // buffer for IPC_STAT & IPC_SET +diff --git a/math/mathcore/inc/TMath.h b/math/mathcore/inc/TMath.h +index 55bbdbf1df..eea42c55a7 100644 +--- a/math/mathcore/inc/TMath.h ++++ b/math/mathcore/inc/TMath.h +@@ -577,63 +577,13 @@ struct Limits { + // Trig and other functions + + #include ++#include + + #if defined(R__WIN32) && !defined(__CINT__) + # ifndef finite + # define finite _finite + # endif + #endif +-#if defined(R__AIX) || defined(R__SOLARIS_CC50) || \ +- defined(R__HPUX11) || defined(R__GLIBC) || \ +- (defined(R__MACOSX) ) +-// math functions are defined inline so we have to include them here +-# include +-# ifdef R__SOLARIS_CC50 +- extern "C" { int finite(double); } +-# endif +-// # if defined(R__GLIBC) && defined(__STRICT_ANSI__) +-// # ifndef finite +-// # define finite __finite +-// # endif +-// # ifndef isnan +-// # define isnan __isnan +-// # endif +-// # endif +-#else +-// don't want to include complete +-extern "C" { +- extern double sin(double); +- extern double cos(double); +- extern double tan(double); +- extern double sinh(double); +- extern double cosh(double); +- extern double tanh(double); +- extern double asin(double); +- extern double acos(double); +- extern double atan(double); +- extern double atan2(double, double); +- extern double sqrt(double); +- extern double exp(double); +- extern double pow(double, double); +- extern double log(double); +- extern double log10(double); +-#ifndef R__WIN32 +-# if !defined(finite) +- extern int finite(double); +-# endif +-# if !defined(isnan) +- extern int isnan(double); +-# endif +- extern double ldexp(double, int); +- extern double ceil(double); +- extern double floor(double); +-#else +- _CRTIMP double ldexp(double, int); +- _CRTIMP double ceil(double); +- _CRTIMP double floor(double); +-#endif +-} +-#endif + + //////////////////////////////////////////////////////////////////////////////// + inline Double_t TMath::Sin(Double_t x) +diff --git a/math/mathcore/src/triangle.c b/math/mathcore/src/triangle.c +index e1990a9484..58d47cfdc9 100644 +--- a/math/mathcore/src/triangle.c ++++ b/math/mathcore/src/triangle.c +@@ -324,7 +324,7 @@ + #include + #endif /* CPU86 */ + #ifdef LINUX +-#include ++#include + #endif /* LINUX */ + #ifdef TRILIBRARY + #include "triangle.h" +@@ -4867,7 +4867,7 @@ void exactinit() + REAL check, lastcheck; + int every_other; + #ifdef LINUX +- int cword; ++ fenv_t fenv; + #endif /* LINUX */ + + #ifdef CPU86 +@@ -4879,13 +4879,13 @@ void exactinit() + #endif /* CPU86 */ + #ifdef LINUX + #ifdef SINGLE +- /* cword = 4223; */ +- cword = 4210; /* set FPU control word for single precision */ ++ /* fenv.__control_word = 4223; */ ++ fenv.__control_word = 4210; /* set FPU control word for single precision */ + #else /* not SINGLE */ +- /* cword = 4735; */ +- cword = 4722; /* set FPU control word for double precision */ ++ /* fenv.__control_word = 4735; */ ++ fenv.__control_word = 4722; /* set FPU control word for double precision */ + #endif /* not SINGLE */ +- _FPU_SETCW(cword); ++ fesetenv(&fenv); + #endif /* LINUX */ + + every_other = 1; +diff --git a/net/rpdutils/src/daemon.cxx b/net/rpdutils/src/daemon.cxx +index 9bdb4294a5..0d25986dc4 100644 +--- a/net/rpdutils/src/daemon.cxx ++++ b/net/rpdutils/src/daemon.cxx +@@ -24,9 +24,7 @@ + #include + #include + #include +-#if defined(__sun) || defined(__sgi) +-# include +-#endif ++#include + + #if defined(__linux__) && !defined(linux) + # define linux +@@ -44,15 +42,6 @@ + # define NOFILE 0 + #endif + +-#if defined(__hpux) +-#define USE_SIGCHLD +-#endif +- +-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) +-#define USE_SIGCHLD +-#define SIGCLD SIGCHLD +-#endif +- + #if defined(linux) || defined(__hpux) || defined(__sun) || defined(__sgi) || \ + defined(_AIX) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ + defined(__APPLE__) || defined(__MACH__) || \ +@@ -69,23 +58,16 @@ namespace ROOT { + + extern ErrorHandler_t gErrSys; + +-#if defined(USE_SIGCHLD) + //////////////////////////////////////////////////////////////////////////////// + + static void SigChild(int) + { +- int pid; +-#if defined(__hpux) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ +- defined(__APPLE__) ++ int pid; + int status; +-#else +- union wait status; +-#endif + + while ((pid = wait3(&status, WNOHANG, 0)) > 0) + ; + } +-#endif + + //////////////////////////////////////////////////////////////////////////////// + /// Detach a daemon process from login session context. +@@ -208,15 +190,7 @@ out: + // and execute the wait3() system call. + + if (ignsigcld) { +-#ifdef USE_SIGCHLD +- signal(SIGCLD, SigChild); +-#else +-#if defined(__sun) +- sigignore(SIGCHLD); +-#else +- signal(SIGCLD, SIG_IGN); +-#endif +-#endif ++ signal(SIGCHLD, SigChild); + } + } + +diff --git a/net/rpdutils/src/net.cxx b/net/rpdutils/src/net.cxx +index d258e71e62..b532848985 100644 +--- a/net/rpdutils/src/net.cxx ++++ b/net/rpdutils/src/net.cxx +@@ -31,17 +31,6 @@ + #include + #include + +-#if (defined(R__AIX) && !defined(_AIX43)) || \ +- (defined(R__SUNGCC3) && !defined(__arch64__)) +-# define USE_SIZE_T +-#elif defined(R__GLIBC) || defined(R__FBSD) || \ +- (defined(R__SUNGCC3) && defined(__arch64__)) || \ +- defined(R__OBSD) || defined(MAC_OS_X_VERSION_10_4) || \ +- (defined(R__AIX) && defined(_AIX43)) || \ +- (defined(R__SOLARIS) && defined(_SOCKLEN_T)) +-# define USE_SOCKLEN_T +-#endif +- + #include "rpdp.h" + #include "rpderr.h" + +@@ -357,13 +346,7 @@ int NetRecv(char *msg, int max) + + int NetOpen(int inetdflag, EService service) + { +-#if defined(USE_SIZE_T) +- size_t clilen = sizeof(gTcpCliAddr); +-#elif defined(USE_SOCKLEN_T) + socklen_t clilen = sizeof(gTcpCliAddr); +-#else +- int clilen = sizeof(gTcpCliAddr); +-#endif + + if (inetdflag) { + +@@ -588,13 +571,7 @@ void NetSetOptions(EService serv, int sock, int tcpwindowsize) + ErrorInfo("NetSetOptions: set SO_RCVBUF %d", val); + + if (gDebug > 0) { +-#if defined(USE_SIZE_T) +- size_t optlen = sizeof(val); +-#elif defined(USE_SOCKLEN_T) + socklen_t optlen = sizeof(val); +-#else +- int optlen = sizeof(val); +-#endif + if (serv == kROOTD) { + getsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char*)&val, &optlen); + ErrorInfo("NetSetOptions: get TCP_NODELAY: %d", val); +diff --git a/net/rpdutils/src/netpar.cxx b/net/rpdutils/src/netpar.cxx +index 00f759a6c9..a781ca9658 100644 +--- a/net/rpdutils/src/netpar.cxx ++++ b/net/rpdutils/src/netpar.cxx +@@ -37,17 +37,6 @@ + #include + #endif + +-#if (defined(R__AIX) && !defined(_AIX43)) || \ +- (defined(R__SUNGCC3) && !defined(__arch64__)) +-# define USE_SIZE_T +-#elif defined(R__GLIBC) || defined(R__FBSD) || \ +- (defined(R__SUNGCC3) && defined(__arch64__)) || \ +- defined(R__OBSD) || defined(MAC_OS_X_VERSION_10_4) || \ +- (defined(R__AIX) && defined(_AIX43)) || \ +- (defined(R__SOLARIS) && defined(_SOCKLEN_T)) +-# define USE_SOCKLEN_T +-#endif +- + #include "rpdp.h" + + extern int gDebug; +@@ -201,13 +190,7 @@ int NetParOpen(int port, int size) + struct sockaddr_in remote_addr; + memset(&remote_addr, 0, sizeof(remote_addr)); + +-#if defined(USE_SIZE_T) +- size_t remlen = sizeof(remote_addr); +-#elif defined(USE_SOCKLEN_T) + socklen_t remlen = sizeof(remote_addr); +-#else +- int remlen = sizeof(remote_addr); +-#endif + + if (!getpeername(NetGetSockFd(), (struct sockaddr *)&remote_addr, &remlen)) { + remote_addr.sin_family = AF_INET; diff --git a/srcpkgs/root/template b/srcpkgs/root/template new file mode 100644 index 000000000000..aa77f9e49bc0 --- /dev/null +++ b/srcpkgs/root/template @@ -0,0 +1,94 @@ +# Template file for 'root' +pkgname=root +version=6.24.06 +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 + 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=907f69f4baca1e4f30eeb4979598ca7599b6aa803ca046e80e25b6bbaa0ef522 +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 + } +}