void-packages/srcpkgs/root/template

80 lines
2.5 KiB
Bash

# Template file for 'root'
pkgname=root
version=6.30.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=libexec/root -Dbuiltin_gtest=OFF
-DGTEST_INCLUDE_DIRS=/usr/include/gtest/
-DGTEST_LIBRARIES=/usr/lib -DGTEST_MAIN_LIBRARIES=/usr/lib
-DGMOCK_INCLUDE_DIRS=/usr/include/gmock/
-DGMOCK_LIBRARIES=/usr/lib -DGMOCK_MAIN_LIBRARIES=/usr/lib
-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 gtest-devel"
depends="gcc"
short_desc="C++ framework for data processing created by CERN"
maintainer="Ben Jargowsky <benjar63@gmail.com>"
license="LGPL-2.1-or-later"
homepage="https://root.cern"
distfiles="https://root.cern/download/root_v${version}.source.tar.gz"
checksum=300db7ed1b678ed2fb9635ca675921a1945c7c2103da840033b493091f55700c
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"
if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
makedepends+=" libxcrypt-devel"
fi
case "$XBPS_TARGET_MACHINE" in
*-musl)
configure_args+=" -Dssl=OFF -Droot7=OFF -Droofit=OFF"
;;
esac
case "$XBPS_TARGET_MACHINE" in
i686*) configure_args+=" -DCMAKE_C_FLAGS=-g0 -DCMAKE_CXX_FLAGS=-g0" ;;
esac
post_install() {
rm -v ${DESTDIR}/usr/share/root/fonts/LICENSE
rm -v ${DESTDIR}/usr/share/root/fonts/[a-mt-z]*.ttf
vdoc "${FILESDIR}/README.voidlinux"
}
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
}
}