From 4f52d528592c9ccab8076f27f7ea20a7869be278 Mon Sep 17 00:00:00 2001 From: Ben Jargowsky Date: Mon, 20 Dec 2021 23:55:36 -0500 Subject: [PATCH] New package: root-6.26.02 --- srcpkgs/python3-pyroot | 1 + srcpkgs/root-R | 1 + srcpkgs/root/INSTALL.msg | 3 ++ srcpkgs/root/patches/musl.patch | 21 +++++++++++ srcpkgs/root/template | 66 +++++++++++++++++++++++++++++++++ 5 files changed, 92 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 00000000000..93ca1422a8d --- /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 00000000000..93ca1422a8d --- /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 00000000000..4d92c4ced6b --- /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 00000000000..7605e91675a --- /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 00000000000..bfc8cb6d8a3 --- /dev/null +++ b/srcpkgs/root/template @@ -0,0 +1,66 @@ +# Template file for 'root' +pkgname=root +version=6.26.02 +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='libexec/root' + $(vopt_if root7 '-Droot7=ON -DCMAKE_CXX_STANDARD=17 -Dwebgui=ON') + -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=7ba96772271a726079506c5bf629c3ceb21bf0682567ed6145be30606d7cd9bb +build_options="fortran root7" +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 -v ${DESTDIR}/usr/share/root/fonts/LICENSE + rm -v ${DESTDIR}/usr/share/root/fonts/[a-mt-z]*.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 + } +}