From cf3ba0dac97aa32adfcdaf676534ff07d7cdefd9 Mon Sep 17 00:00:00 2001 From: Ben Jargowsky Date: Tue, 4 Jan 2022 16:11:43 -0800 Subject: [PATCH 1/2] New package: R-cran-RInside-0.2.16 --- common/shlibs | 4 ++++ srcpkgs/R-cran-RInside/template | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 srcpkgs/R-cran-RInside/template diff --git a/common/shlibs b/common/shlibs index 999d3ad714b8..6307602fec1b 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4097,3 +4097,7 @@ libkmailconfirmbeforedeleting.so.5 kdepim-addons-21.08.3_1 libkaddressbookprivate.so.5 kaddressbook-21.08.3_1 libcodec2.so.1.0 codec2-1.0.1_1 libx86emu.so.3 libx86emu-3.4_1 +libRInside.so R-cran-RInside-0.2.16_1 +libXrdUtils.so.2 root-6.24.06_1 +libXrdClient.so.2 root-6.24.06_1 +libXrdCl.so.2 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 0aff4e2e3404cc9c534532b3b59b90ac43d7f8da Mon Sep 17 00:00:00 2001 From: Ben Jargowsky Date: Mon, 20 Dec 2021 23:55:36 -0500 Subject: [PATCH 2/2] New package: root-6.24.06 --- srcpkgs/root/patches/musl.patch | 424 ++++++++++++++++++++++++++++++++ srcpkgs/root/template | 25 ++ 2 files changed, 449 insertions(+) create mode 100644 srcpkgs/root/patches/musl.patch create mode 100644 srcpkgs/root/template 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..a98cfd29a2d2 --- /dev/null +++ b/srcpkgs/root/template @@ -0,0 +1,25 @@ +# 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 $(vopt_if r '-Dr=ON')" +case "$XBPS_TARGET_MACHINE" in + *-musl) + configure_args+=" -Dssl=OFF -Dxrootd=OFF" + ;; +esac +hostmakedepends="git" +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 $(vopt_if python 'python3-devel python3-numpy') $(vopt_if fortran gcc-fortran) $(vopt_if r 'R-cran-Rcpp R-cran-RInside')" +depends="gcc" +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="python fortran r" +build_options_default="python fortran" +python_version=3