diff options
Diffstat (limited to 'sci-physics/root')
-rw-r--r-- | sci-physics/root/Manifest | 7 | ||||
-rw-r--r-- | sci-physics/root/metadata.xml | 1 | ||||
-rw-r--r-- | sci-physics/root/root-6.24.00.ebuild | 317 | ||||
-rw-r--r-- | sci-physics/root/root-6.24.9999.ebuild | 336 | ||||
-rw-r--r-- | sci-physics/root/root-9999.ebuild | 19 |
5 files changed, 674 insertions, 6 deletions
diff --git a/sci-physics/root/Manifest b/sci-physics/root/Manifest index e070e1b41101..27af362494c4 100644 --- a/sci-physics/root/Manifest +++ b/sci-physics/root/Manifest @@ -1,7 +1,10 @@ AUX root-6.12.06_cling-runtime-sysroot.patch 989 BLAKE2B 8202cc8f2bf72cc25642d0a03ba26c3969069b291a6a22188879dbedbf0c3c496149f79f671d0eb51d81d0ee36565660d136b4741f5d018c2b05325ff08381f0 SHA512 c96dee9843da1051c54bd6870ef0a04714944ffe1f86800c9a51b8eb8ef84107d3315d3a708dcc0b651248af4bec362c7f31695514505045aeda9c793d40dc58 DIST root_v6.22.06.source.tar.gz 173073959 BLAKE2B 3db5e5ff73509a87d00aaba5a394c96aaddebac210ce692d10b9174f0bdff5dc5862c25c9ff66e481b9fda96684cfca45ab49824166404f59ad76edb3fbdddde SHA512 39b330f0cd594f06e30e33dd4b0fc86cfd076b006e5287ff61e577deaf76e63f2e5780b72f53c0770b7d2e28e6f61133ff54b5d905ec2ad845c8f00b10be6fb7 DIST root_v6.22.08.source.tar.gz 173079716 BLAKE2B 0b3c15dfedd0215334dcd59db133aa9097709996e0e9cc20a1ae96f954ee607cad314291148f78a31f24ba78dee84204e617e17a6ed8a390503b068e8120e9f3 SHA512 2355e20b8c4d7ad747c31956a3ad0f6e7b70039f3e6613182bd7c53d0e8776267ee85fc1d8aad9ed0d942e28f4124ad79a7dc1082bb1ea7974be2cb6a8a85b39 +DIST root_v6.24.00.source.tar.gz 185185756 BLAKE2B cf46534c0e9476a428291c65ec1456af10e47d830dd006aacf43307db11ad5732c357aabd09f4297276190d21fc18fdd6966f5f5e6cd437cc46878fa72fde260 SHA512 bba72cbe310c3ce9a64adc990aaeba6df970f17dc7132d2c3fdc83cc72d24973a3e15c02067a95870794e576e4065478d7a3ed52bfb8f0598294356a7fceff03 EBUILD root-6.22.06.ebuild 7525 BLAKE2B ee3341e24f9970c9fbe2358b2859148ccac84cb67fa96b56e21741f10d43bb26cff200437509ef9d7a084594d0b22b0d0866441a31352f10600d77772cfb5e87 SHA512 4d5f483eb06144a1a52b905e8012abc2563db862c7b6fa78d6ea8c329749e179985d676226214a165f94a72e2533ac6bc776bd980157c7430a80ab4f0df7fb0a EBUILD root-6.22.08.ebuild 7525 BLAKE2B 409206a9110827040b326947010340f2668ad137e67787eee269f875103166a7c96811dfede68d6bae03496071262919d2d2403ae3bde0a1f9c718595f5acaa6 SHA512 bc2ae7becf056c26cacda629bb6b05d970a0eb6c106f1caafda1e2a8be1ddc72f80509b56ec1cc5825f111ec3b93a22227aae396701b2b52c0a02669bfb8d84d -EBUILD root-9999.ebuild 7994 BLAKE2B c5cc6646627394518614ecc5b6c399fec63c89e69dc8e9cf8335b06be47bbb034806509580e9e57081e05da02523fe04932ff29d39754c709e954ef748fc589b SHA512 6b7cbbbe2395c8ff32ff0003d4b7d26d9e30bec26a1d5affe6ecb17e14c77ec427d923c469d733d2f41d302d6387ab3e8c777cc1b141e8efb3608857d0b2c66f -MISC metadata.xml 3060 BLAKE2B a08c5d2c54daba2c05984d23d1a912929ab94e40e0b72b17a804b442f7c5b2a2a1039485d529d14953c25261c7a8179d67c6790dab733cc7cee6c1ce0fb0d509 SHA512 6ca7f1940a92053a2c12412882a6b4e478758af94fae422e1ace6cc55cc25dea8117cb042f034a98db6993afba3726d4f4d9d983513ada940c14bc9d988abc26 +EBUILD root-6.24.00.ebuild 7764 BLAKE2B a19ed4e4982066eda95ca2b6b13b82f35ed4df3687d860aa56f6d0a9806e29d8e102c741f088f0515543f07a6f8bc0cb223bc0547d82b9e127e7df4dc3876e6e SHA512 e2dd91f6ad29439083ab004de532b9c58a0abbc4bacbf4905ac69cc5adffdc307ae49bfc68946b1ea40d2259bf95e4b1a3fb6ae720fac56d755524671506a427 +EBUILD root-6.24.9999.ebuild 8235 BLAKE2B d5ffdc4a4989ddccdb76aca2968e3e3af3373fd31723aae6122cb5b69f5e6a4206417e5c75f99b95bddaaccd9ab0ea0c42b5b6b9595f2c6645e7f320bcb39cca SHA512 ba4ad6c225689a2f76bc168d391833a222c4415107a45fa113acce6e5d39cb2de1c83cf1e435093a0c1497ed366e8ba13ab02802a3747b428465d76caf470860 +EBUILD root-9999.ebuild 8235 BLAKE2B d5ffdc4a4989ddccdb76aca2968e3e3af3373fd31723aae6122cb5b69f5e6a4206417e5c75f99b95bddaaccd9ab0ea0c42b5b6b9595f2c6645e7f320bcb39cca SHA512 ba4ad6c225689a2f76bc168d391833a222c4415107a45fa113acce6e5d39cb2de1c83cf1e435093a0c1497ed366e8ba13ab02802a3747b428465d76caf470860 +MISC metadata.xml 3149 BLAKE2B 88e20041b72bc4507f253ea0b9096567f6a7c5c7f7bf6851adfb69c24aedb73fb68b2541538cd01fd51d944425c22f4b7154379ac70d851659efeaa1e3a07337 SHA512 65a82570e75f9b4b3e6f8d1e1cfd1aad5f3e2199843853392b51ea1e1f4dcc7ef6500196aa0f759726cb0d0e17be19055d8c9c87e745fa11d337acc2eaf5ce74 diff --git a/sci-physics/root/metadata.xml b/sci-physics/root/metadata.xml index 453df091a133..15ba329fe27c 100644 --- a/sci-physics/root/metadata.xml +++ b/sci-physics/root/metadata.xml @@ -42,6 +42,7 @@ <flag name="tbb">Enable implicit multi-threading (IMT) with <pkg>dev-cpp/tbb</pkg></flag> <flag name="tmva">Built TMVA (ROOT's multi-variate analysis toolkit for machine learning)</flag> <flag name="unuran">Enable support for <pkg>sci-mathematics/unuran</pkg></flag> + <flag name="uring">Enable support for <pkg>sys-libs/liburing</pkg> in RNTuple</flag> <flag name="vc">Enable support for <pkg>dev-libs/vc</pkg> with VecCore</flag> <flag name="vmc">Built the Virtual Monte Carlo library</flag> <flag name="xrootd">Build the interface for <pkg>net-libs/xrootd</pkg> </flag> diff --git a/sci-physics/root/root-6.24.00.ebuild b/sci-physics/root/root-6.24.00.ebuild new file mode 100644 index 000000000000..9357a155802c --- /dev/null +++ b/sci-physics/root/root-6.24.00.ebuild @@ -0,0 +1,317 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# ninja does not work due to fortran +CMAKE_MAKEFILE_GENERATOR=emake +FORTRAN_NEEDED="fortran" +PYTHON_COMPAT=( python3_{7,8,9} ) + +inherit cmake cuda elisp-common fortran-2 prefix python-single-r1 toolchain-funcs + +DESCRIPTION="C++ data analysis framework and interpreter from CERN" +HOMEPAGE="https://root.cern" +SRC_URI="https://root.cern/download/${PN}_v${PV}.source.tar.gz" + +IUSE="+X aqua +asimage +c++11 c++14 c++17 cuda cudnn +davix debug emacs + +examples fits fftw fortran +gdml graphviz +gsl http libcxx +minuit + mpi mysql odbc +opengl oracle postgres prefix pythia6 pythia8 +python + qt5 R +roofit root7 shadow sqlite +ssl +tbb test +tmva +unuran uring + vc vmc +xml xrootd" +RESTRICT="!test? ( test )" + +SLOT="$(ver_cut 1-2)/$(ver_cut 3)" +LICENSE="LGPL-2.1 freedist MSttfEULA LGPL-3 libpng UoI-NCSA" +KEYWORDS="~amd64 ~x86" + +REQUIRED_USE=" + ^^ ( c++11 c++14 c++17 ) + cuda? ( tmva ) + cudnn? ( cuda ) + !X? ( !asimage !opengl !qt5 ) + davix? ( ssl xml ) + python? ( ${PYTHON_REQUIRED_USE} ) + qt5? ( root7 ) + root7? ( || ( c++14 c++17 ) ) + tmva? ( gsl ) + uring? ( root7 ) +" + +CDEPEND=" + app-arch/lz4 + app-arch/zstd + app-arch/xz-utils + fortran? ( dev-lang/cfortran ) + dev-cpp/nlohmann_json + dev-libs/libpcre:3 + dev-libs/xxhash + media-fonts/dejavu + media-libs/freetype:2 + media-libs/libpng:0= + sys-libs/ncurses:= + sys-libs/zlib + X? ( + x11-libs/libX11:0 + x11-libs/libXext:0 + x11-libs/libXft:0 + x11-libs/libXpm:0 + opengl? ( + media-libs/ftgl:0= + media-libs/glew:0= + virtual/opengl + virtual/glu + x11-libs/gl2ps:0= + ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwebengine:5[widgets] + ) + ) + asimage? ( media-libs/libafterimage[gif,jpeg,png,tiff] ) + cuda? ( >=dev-util/nvidia-cuda-toolkit-9.0 ) + cudnn? ( dev-libs/cudnn ) + davix? ( net-libs/davix ) + emacs? ( >=app-editors/emacs-23.1:* ) + fftw? ( sci-libs/fftw:3.0= ) + fits? ( sci-libs/cfitsio:0= ) + graphviz? ( media-gfx/graphviz ) + gsl? ( sci-libs/gsl:= ) + http? ( dev-libs/fcgi:0= ) + libcxx? ( sys-libs/libcxx ) + unuran? ( sci-mathematics/unuran:0= ) + minuit? ( !sci-libs/minuit ) + mpi? ( virtual/mpi ) + mysql? ( dev-db/mysql-connector-c ) + odbc? ( || ( dev-db/libiodbc dev-db/unixODBC ) ) + oracle? ( dev-db/oracle-instantclient-basic ) + postgres? ( dev-db/postgresql:= ) + pythia6? ( sci-physics/pythia:6 ) + pythia8? ( sci-physics/pythia:8 ) + python? ( ${PYTHON_DEPS} ) + R? ( dev-lang/R ) + shadow? ( sys-apps/shadow ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( dev-libs/openssl:0= ) + tbb? ( dev-cpp/tbb ) + tmva? ( + $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_MULTI_USEDEP}] + ') + ) + uring? ( sys-libs/liburing ) + vc? ( dev-libs/vc:= ) + xml? ( dev-libs/libxml2:2= ) + xrootd? ( net-libs/xrootd:0= ) +" + +DEPEND="${CDEPEND} + virtual/pkgconfig" + +RDEPEND="${CDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-6.12.06_cling-runtime-sysroot.patch +) + +pkg_setup() { + use fortran && fortran-2_pkg_setup + use python && python-single-r1_pkg_setup + + elog "There are extra options on packages not available in Gentoo." + elog "You can use the environment variable EXTRA_ECONF to enable" + elog "these packages. For example, for Vdt you would set:" + elog "EXTRA_ECONF=\"-Dbuiltin_vdt=ON -Dvdt=ON\"" +} + +src_prepare() { + use cuda && cuda_src_prepare + + cmake_src_prepare + + sed -i "/CLING_BUILD_PLUGINS/d" interpreter/CMakeLists.txt || die + + # CSS should use local images + sed -i -e 's,http://.*/,,' etc/html/ROOT.css || die "html sed failed" + + eapply_user +} + +# Note: ROOT uses bundled clang because it is patched and API-incompatible +# with vanilla clang. The patches enable the C++ interpreter to work. +# Since ROOT installs many files into /etc (>100MB in total) that don't +# really belong there, we install it into another directory to avoid +# making /etc too big. + +src_configure() { + local mycmakeargs=( + -DCMAKE_C_COMPILER=$(tc-getCC) + -DCMAKE_CXX_COMPILER=$(tc-getCXX) + -DCMAKE_CUDA_HOST_COMPILER=$(tc-getCXX) + -DCMAKE_C_FLAGS="${CFLAGS}" + -DCMAKE_CXX_FLAGS="${CXXFLAGS}" + -DCMAKE_CXX_STANDARD=$((usev c++11 || usev c++14 || usev c++17) | cut -c4-) + -DPYTHON_EXECUTABLE="${EPREFIX}/usr/bin/${EPYTHON}" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/${PN}/$(ver_cut 1-2)" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/${PN}/$(ver_cut 1-2)/share/man" + -DCMAKE_INSTALL_LIBDIR="lib" + -DDEFAULT_SYSROOT="${EPREFIX}" + -DCLING_BUILD_PLUGINS=OFF + -Dasserts=OFF + -Ddev=OFF + -Dexceptions=ON + -Dfail-on-missing=ON + -Dgnuinstall=OFF + -Dshared=ON + -Dsoversion=ON + -Dbuiltin_llvm=ON + -Dbuiltin_clang=ON + -Dbuiltin_cling=ON + -Dbuiltin_openui5=ON + -Dbuiltin_afterimage=OFF + -Dbuiltin_cfitsio=OFF + -Dbuiltin_davix=OFF + -Dbuiltin_fftw3=OFF + -Dbuiltin_freetype=OFF + -Dbuiltin_ftgl=OFF + -Dbuiltin_gl2ps=OFF + -Dbuiltin_glew=OFF + -Dbuiltin_gsl=OFF + -Dbuiltin_lz4=OFF + -Dbuiltin_lzma=OFF + -Dbuiltin_nlohmannjson=OFF + -Dbuiltin_openssl=OFF + -Dbuiltin_pcre=OFF + -Dbuiltin_tbb=OFF + -Dbuiltin_unuran=OFF + -Dbuiltin_vc=OFF + -Dbuiltin_vdt=OFF + -Dbuiltin_veccore=OFF + -Dbuiltin_xrootd=OFF + -Dbuiltin_xxhash=OFF + -Dbuiltin_zlib=OFF + -Dbuiltin_zstd=OFF + -Dalien=OFF + -Darrow=OFF + -Dasimage=$(usex asimage) + -Dccache=OFF # use ccache via portage + -Dcefweb=OFF + -Dclad=OFF + -Dcocoa=$(usex aqua) + -Dcuda=$(usex cuda) + -Dcudnn=$(usex cudnn) + -Dcxxmodules=OFF # requires clang, unstable + -Ddataframe=ON + -Ddavix=$(usex davix) + -Ddcache=OFF + -Ddistcc=OFF + -Dfcgi=$(usex http) + -Dfftw3=$(usex fftw) + -Dfitsio=$(usex fits) + -Dfortran=$(usex fortran) + -Dgdml=$(usex gdml) + -Dgfal=OFF + -Dgminimal=OFF + -Dgsl_shared=$(usex gsl) + -Dgviz=$(usex graphviz) + -Dhttp=$(usex http) + -Dimt=$(usex tbb) + -Dlibcxx=$(usex libcxx) + -Dmathmore=$(usex gsl) + -Dmemstat=OFF # deprecated + -Dminimal=OFF + -Dminuit2=$(usex minuit) + -Dminuit=$(usex minuit) + -Dmlp=$(usex tmva) + -Dmonalisa=OFF + -Dmpi=$(usex mpi) + -Dmysql=$(usex mysql) + -Dodbc=$(usex odbc) + -Dopengl=$(usex opengl) + -Doracle=$(usex oracle) + -Dpgsql=$(usex postgres) + -Dpyroot=$(usex python) # python was renamed to pyroot + -Dpyroot_legacy=OFF + -Dpythia6=$(usex pythia6) + -Dpythia8=$(usex pythia8) + -Dqt5web=$(usex qt5) + -Dr=$(usex R) + -Droofit=$(usex roofit) + -Droot7=$(usex root7) + -Drootbench=OFF + -Droottest=OFF + -Drpath=OFF + -Druntime_cxxmodules=OFF + -Dshadowpw=$(usex shadow) + -Dspectrum=ON + -Dsqlite=$(usex sqlite) + -Dssl=$(usex ssl) + -Dtcmalloc=OFF + -Dtest_distrdf_pyspark=OFF + -Dtesting=$(usex test) + -Dtmva=$(usex tmva) + -Dtmva-cpu=$(usex tmva) + -Dtmva-gpu=$(usex cuda) + -Dtmva-pymva=$(usex tmva) + -Dtmva-rmva=$(usex R) + -Dunuran=$(usex unuran) + -During=$(usex uring) + -Dvc=$(usex vc) + -Dvdt=OFF + -Dveccore=OFF + -Dvecgeom=OFF + -Dvmc=$(usex vmc) + -Dx11=$(usex X) + -Dxml=$(usex xml) + -Dxrootd=$(usex xrootd) + ${EXTRA_ECONF} + ) + + CMAKE_BUILD_TYPE=$(usex debug Debug Release) \ + cmake_src_configure +} + +src_compile() { + # needed for hsimple.root + addwrite /dev/random + cmake_src_compile +} + +src_install() { + cmake_src_install + + ROOTSYS=${EPREFIX}/usr/lib/${PN}/$(ver_cut 1-2) + ROOTENV="$((9999 - $(ver_cut 2)))${PN}-$(ver_cut 1-2)" + + cat > ${ROOTENV} <<- EOF || die + MANPATH="${ROOTSYS}/share/man" + PATH="${ROOTSYS}/bin" + ROOTPATH="${ROOTSYS}/bin" + LDPATH="${ROOTSYS}/lib" + EOF + + if use python; then + echo "PYTHONPATH=\"${ROOTSYS}/lib\"" >> ${ROOTENV} || die + fi + + doenvd ${ROOTENV} + + if use emacs; then + elisp-install ${PN}-$(ver_cut 1-2) "${BUILD_DIR}"/root-help.el + fi + + pushd "${D}/${ROOTSYS}" > /dev/null + + rm -r emacs bin/*.{csh,sh,fish} || die + + if ! use examples; then + rm -r tutorials || die + fi + + # create versioned symlinks for binaries + cd bin; + for exe in *; do + dosym "${exe}" "/usr/lib/${PN}/$(ver_cut 1-2)/bin/${exe}-$(ver_cut 1-2)" + done +} diff --git a/sci-physics/root/root-6.24.9999.ebuild b/sci-physics/root/root-6.24.9999.ebuild new file mode 100644 index 000000000000..dabb6bbd617f --- /dev/null +++ b/sci-physics/root/root-6.24.9999.ebuild @@ -0,0 +1,336 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# ninja does not work due to fortran +CMAKE_MAKEFILE_GENERATOR=emake +FORTRAN_NEEDED="fortran" +PYTHON_COMPAT=( python3_{7,8,9} ) + +inherit cmake cuda elisp-common fortran-2 prefix python-single-r1 toolchain-funcs + +DESCRIPTION="C++ data analysis framework and interpreter from CERN" +HOMEPAGE="https://root.cern" + +IUSE="+X aqua +asimage +c++11 c++14 c++17 cuda cudnn +davix debug emacs + +examples fits fftw fortran +gdml graphviz +gsl http libcxx +minuit + mpi mysql odbc +opengl oracle postgres prefix pythia6 pythia8 +python + qt5 R +roofit root7 shadow sqlite +ssl +tbb test +tmva +unuran uring + vc vmc +xml xrootd" +RESTRICT="!test? ( test )" + +if [[ ${PV} =~ "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/root-project/root.git" + if [[ ${PV} == "9999" ]]; then + SLOT="0" + else + SLOT="$(ver_cut 1-2)/$(ver_cut 3)" + EGIT_BRANCH="v$(ver_cut 1)-$(ver_cut 2)-00-patches" + fi +else + KEYWORDS="~amd64 ~x86" + SRC_URI="https://root.cern/download/${PN}_v${PV}.source.tar.gz" +fi + +LICENSE="LGPL-2.1 freedist MSttfEULA LGPL-3 libpng UoI-NCSA" + +REQUIRED_USE=" + ^^ ( c++11 c++14 c++17 ) + cuda? ( tmva ) + cudnn? ( cuda ) + !X? ( !asimage !opengl !qt5 ) + davix? ( ssl xml ) + python? ( ${PYTHON_REQUIRED_USE} ) + qt5? ( root7 ) + root7? ( || ( c++14 c++17 ) ) + tmva? ( gsl ) + uring? ( root7 ) +" + +CDEPEND=" + app-arch/lz4 + app-arch/zstd + app-arch/xz-utils + fortran? ( dev-lang/cfortran ) + dev-cpp/nlohmann_json + dev-libs/libpcre:3 + dev-libs/xxhash + media-fonts/dejavu + media-libs/freetype:2 + media-libs/libpng:0= + sys-libs/ncurses:= + sys-libs/zlib + X? ( + x11-libs/libX11:0 + x11-libs/libXext:0 + x11-libs/libXft:0 + x11-libs/libXpm:0 + opengl? ( + media-libs/ftgl:0= + media-libs/glew:0= + virtual/opengl + virtual/glu + x11-libs/gl2ps:0= + ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwebengine:5[widgets] + ) + ) + asimage? ( media-libs/libafterimage[gif,jpeg,png,tiff] ) + cuda? ( >=dev-util/nvidia-cuda-toolkit-9.0 ) + cudnn? ( dev-libs/cudnn ) + davix? ( net-libs/davix ) + emacs? ( >=app-editors/emacs-23.1:* ) + fftw? ( sci-libs/fftw:3.0= ) + fits? ( sci-libs/cfitsio:0= ) + graphviz? ( media-gfx/graphviz ) + gsl? ( sci-libs/gsl:= ) + http? ( dev-libs/fcgi:0= ) + libcxx? ( sys-libs/libcxx ) + unuran? ( sci-mathematics/unuran:0= ) + minuit? ( !sci-libs/minuit ) + mpi? ( virtual/mpi ) + mysql? ( dev-db/mysql-connector-c ) + odbc? ( || ( dev-db/libiodbc dev-db/unixODBC ) ) + oracle? ( dev-db/oracle-instantclient-basic ) + postgres? ( dev-db/postgresql:= ) + pythia6? ( sci-physics/pythia:6 ) + pythia8? ( sci-physics/pythia:8 ) + python? ( ${PYTHON_DEPS} ) + R? ( dev-lang/R ) + shadow? ( sys-apps/shadow ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( dev-libs/openssl:0= ) + tbb? ( dev-cpp/tbb ) + tmva? ( + $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_MULTI_USEDEP}] + ') + ) + uring? ( sys-libs/liburing ) + vc? ( dev-libs/vc:= ) + xml? ( dev-libs/libxml2:2= ) + xrootd? ( net-libs/xrootd:0= ) +" + +DEPEND="${CDEPEND} + virtual/pkgconfig" + +RDEPEND="${CDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-6.12.06_cling-runtime-sysroot.patch +) + +pkg_setup() { + use fortran && fortran-2_pkg_setup + use python && python-single-r1_pkg_setup + + elog "There are extra options on packages not available in Gentoo." + elog "You can use the environment variable EXTRA_ECONF to enable" + elog "these packages. For example, for Vdt you would set:" + elog "EXTRA_ECONF=\"-Dbuiltin_vdt=ON -Dvdt=ON\"" +} + +src_prepare() { + use cuda && cuda_src_prepare + + cmake_src_prepare + + sed -i "/CLING_BUILD_PLUGINS/d" interpreter/CMakeLists.txt || die + + # CSS should use local images + sed -i -e 's,http://.*/,,' etc/html/ROOT.css || die "html sed failed" + + eapply_user +} + +# Note: ROOT uses bundled clang because it is patched and API-incompatible +# with vanilla clang. The patches enable the C++ interpreter to work. +# Since ROOT installs many files into /etc (>100MB in total) that don't +# really belong there, we install it into another directory to avoid +# making /etc too big. + +src_configure() { + local mycmakeargs=( + -DCMAKE_C_COMPILER=$(tc-getCC) + -DCMAKE_CXX_COMPILER=$(tc-getCXX) + -DCMAKE_CUDA_HOST_COMPILER=$(tc-getCXX) + -DCMAKE_C_FLAGS="${CFLAGS}" + -DCMAKE_CXX_FLAGS="${CXXFLAGS}" + -DCMAKE_CXX_STANDARD=$((usev c++11 || usev c++14 || usev c++17) | cut -c4-) + -DPYTHON_EXECUTABLE="${EPREFIX}/usr/bin/${EPYTHON}" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/${PN}/$(ver_cut 1-2)" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/${PN}/$(ver_cut 1-2)/share/man" + -DCMAKE_INSTALL_LIBDIR="lib" + -DDEFAULT_SYSROOT="${EPREFIX}" + -DCLING_BUILD_PLUGINS=OFF + -Dasserts=OFF + -Ddev=OFF + -Dexceptions=ON + -Dfail-on-missing=ON + -Dgnuinstall=OFF + -Dshared=ON + -Dsoversion=ON + -Dbuiltin_llvm=ON + -Dbuiltin_clang=ON + -Dbuiltin_cling=ON + -Dbuiltin_openui5=ON + -Dbuiltin_afterimage=OFF + -Dbuiltin_cfitsio=OFF + -Dbuiltin_davix=OFF + -Dbuiltin_fftw3=OFF + -Dbuiltin_freetype=OFF + -Dbuiltin_ftgl=OFF + -Dbuiltin_gl2ps=OFF + -Dbuiltin_glew=OFF + -Dbuiltin_gsl=OFF + -Dbuiltin_lz4=OFF + -Dbuiltin_lzma=OFF + -Dbuiltin_nlohmannjson=OFF + -Dbuiltin_openssl=OFF + -Dbuiltin_pcre=OFF + -Dbuiltin_tbb=OFF + -Dbuiltin_unuran=OFF + -Dbuiltin_vc=OFF + -Dbuiltin_vdt=OFF + -Dbuiltin_veccore=OFF + -Dbuiltin_xrootd=OFF + -Dbuiltin_xxhash=OFF + -Dbuiltin_zlib=OFF + -Dbuiltin_zstd=OFF + -Dalien=OFF + -Darrow=OFF + -Dasimage=$(usex asimage) + -Dccache=OFF # use ccache via portage + -Dcefweb=OFF + -Dclad=OFF + -Dcocoa=$(usex aqua) + -Dcuda=$(usex cuda) + -Dcudnn=$(usex cudnn) + -Dcxxmodules=OFF # requires clang, unstable + -Ddataframe=ON + -Ddavix=$(usex davix) + -Ddcache=OFF + -Ddistcc=OFF + -Dfcgi=$(usex http) + -Dfftw3=$(usex fftw) + -Dfitsio=$(usex fits) + -Dfortran=$(usex fortran) + -Dgdml=$(usex gdml) + -Dgfal=OFF + -Dgminimal=OFF + -Dgsl_shared=$(usex gsl) + -Dgviz=$(usex graphviz) + -Dhttp=$(usex http) + -Dimt=$(usex tbb) + -Dlibcxx=$(usex libcxx) + -Dmathmore=$(usex gsl) + -Dmemstat=OFF # deprecated + -Dminimal=OFF + -Dminuit2=$(usex minuit) + -Dminuit=$(usex minuit) + -Dmlp=$(usex tmva) + -Dmonalisa=OFF + -Dmpi=$(usex mpi) + -Dmysql=$(usex mysql) + -Dodbc=$(usex odbc) + -Dopengl=$(usex opengl) + -Doracle=$(usex oracle) + -Dpgsql=$(usex postgres) + -Dpythia6=$(usex pythia6) + -Dpyroot=$(usex python) # python was renamed to pyroot + #-Dpyroot_legacy=OFF # set to ON to use legacy PyROOT (6.22 and later) + #-Dpyroot_experimental=OFF # set to ON to use new PyROOT (6.20 and earlier) + -Dpythia8=$(usex pythia8) + -Dqt5web=$(usex qt5) + -Dr=$(usex R) + -Droofit=$(usex roofit) + -Droot7=$(usex root7) + -Drootbench=OFF + -Droottest=OFF + -Drpath=OFF + -Druntime_cxxmodules=OFF + -Dshadowpw=$(usex shadow) + -Dspectrum=ON + -Dsqlite=$(usex sqlite) + -Dssl=$(usex ssl) + -Dtcmalloc=OFF + -Dtest_distrdf_pyspark=OFF + -Dtesting=$(usex test) + -Dtmva=$(usex tmva) + -Dtmva-cpu=$(usex tmva) + -Dtmva-gpu=$(usex cuda) + -Dtmva-pymva=$(usex tmva) + -Dtmva-rmva=$(usex R) + -Dunuran=$(usex unuran) + -During=$(usex uring) + -Dvc=$(usex vc) + -Dvdt=OFF + -Dveccore=OFF + -Dvecgeom=OFF + -Dvmc=$(usex vmc) + -Dx11=$(usex X) + -Dxml=$(usex xml) + -Dxrootd=$(usex xrootd) + ${EXTRA_ECONF} + ) + + CMAKE_BUILD_TYPE=$(usex debug Debug Release) \ + cmake_src_configure +} + +src_compile() { + # needed for hsimple.root + addwrite /dev/random + cmake_src_compile +} + +src_install() { + cmake_src_install + + ROOTSYS=${EPREFIX}/usr/lib/${PN}/$(ver_cut 1-2) + + if [[ ${PV} == "9999" ]]; then + ROOTENV="9900${PN}-git" + else + ROOTENV="$((9999 - $(ver_cut 2)))${PN}-$(ver_cut 1-2)-git" + fi + + cat > ${ROOTENV} <<- EOF || die + MANPATH="${ROOTSYS}/share/man" + PATH="${ROOTSYS}/bin" + ROOTPATH="${ROOTSYS}/bin" + LDPATH="${ROOTSYS}/lib" + EOF + + if use python; then + echo "PYTHONPATH=\"${ROOTSYS}/lib\"" >> ${ROOTENV} || die + fi + + doenvd ${ROOTENV} + + if use emacs; then + elisp-install ${PN}-$(ver_cut 1-2) "${BUILD_DIR}"/root-help.el + fi + + pushd "${D}/${ROOTSYS}" > /dev/null + + rm -r emacs bin/*.{csh,sh,fish} || die + + if ! use examples; then + rm -r tutorials || die + fi + + # create versioned symlinks for binaries + if [[ ! ${PV} == "9999" ]]; then + cd bin; + for exe in *; do + dosym "${exe}" "/usr/lib/${PN}/$(ver_cut 1-2)/bin/${exe}-$(ver_cut 1-2)" + done + fi +} diff --git a/sci-physics/root/root-9999.ebuild b/sci-physics/root/root-9999.ebuild index ea14149330d7..dabb6bbd617f 100644 --- a/sci-physics/root/root-9999.ebuild +++ b/sci-physics/root/root-9999.ebuild @@ -6,7 +6,7 @@ EAPI=7 # ninja does not work due to fortran CMAKE_MAKEFILE_GENERATOR=emake FORTRAN_NEEDED="fortran" -PYTHON_COMPAT=( python3_{7,8} ) +PYTHON_COMPAT=( python3_{7,8,9} ) inherit cmake cuda elisp-common fortran-2 prefix python-single-r1 toolchain-funcs @@ -16,8 +16,8 @@ HOMEPAGE="https://root.cern" IUSE="+X aqua +asimage +c++11 c++14 c++17 cuda cudnn +davix debug emacs +examples fits fftw fortran +gdml graphviz +gsl http libcxx +minuit mpi mysql odbc +opengl oracle postgres prefix pythia6 pythia8 +python - qt5 R +roofit root7 shadow sqlite +ssl +tbb test +tmva +unuran vc - vmc +xml xrootd" + qt5 R +roofit root7 shadow sqlite +ssl +tbb test +tmva +unuran uring + vc vmc +xml xrootd" RESTRICT="!test? ( test )" if [[ ${PV} =~ "9999" ]] ; then @@ -46,6 +46,7 @@ REQUIRED_USE=" qt5? ( root7 ) root7? ( || ( c++14 c++17 ) ) tmva? ( gsl ) + uring? ( root7 ) " CDEPEND=" @@ -53,6 +54,7 @@ CDEPEND=" app-arch/zstd app-arch/xz-utils fortran? ( dev-lang/cfortran ) + dev-cpp/nlohmann_json dev-libs/libpcre:3 dev-libs/xxhash media-fonts/dejavu @@ -103,12 +105,13 @@ CDEPEND=" shadow? ( sys-apps/shadow ) sqlite? ( dev-db/sqlite:3 ) ssl? ( dev-libs/openssl:0= ) - tbb? ( >=dev-cpp/tbb-2018 ) + tbb? ( dev-cpp/tbb ) tmva? ( $(python_gen_cond_dep ' dev-python/numpy[${PYTHON_MULTI_USEDEP}] ') ) + uring? ( sys-libs/liburing ) vc? ( dev-libs/vc:= ) xml? ( dev-libs/libxml2:2= ) xrootd? ( net-libs/xrootd:0= ) @@ -166,6 +169,8 @@ src_configure() { -DCMAKE_INSTALL_LIBDIR="lib" -DDEFAULT_SYSROOT="${EPREFIX}" -DCLING_BUILD_PLUGINS=OFF + -Dasserts=OFF + -Ddev=OFF -Dexceptions=ON -Dfail-on-missing=ON -Dgnuinstall=OFF @@ -173,6 +178,8 @@ src_configure() { -Dsoversion=ON -Dbuiltin_llvm=ON -Dbuiltin_clang=ON + -Dbuiltin_cling=ON + -Dbuiltin_openui5=ON -Dbuiltin_afterimage=OFF -Dbuiltin_cfitsio=OFF -Dbuiltin_davix=OFF @@ -184,6 +191,7 @@ src_configure() { -Dbuiltin_gsl=OFF -Dbuiltin_lz4=OFF -Dbuiltin_lzma=OFF + -Dbuiltin_nlohmannjson=OFF -Dbuiltin_openssl=OFF -Dbuiltin_pcre=OFF -Dbuiltin_tbb=OFF @@ -208,6 +216,7 @@ src_configure() { -Ddataframe=ON -Ddavix=$(usex davix) -Ddcache=OFF + -Ddistcc=OFF -Dfcgi=$(usex http) -Dfftw3=$(usex fftw) -Dfitsio=$(usex fits) @@ -251,6 +260,7 @@ src_configure() { -Dsqlite=$(usex sqlite) -Dssl=$(usex ssl) -Dtcmalloc=OFF + -Dtest_distrdf_pyspark=OFF -Dtesting=$(usex test) -Dtmva=$(usex tmva) -Dtmva-cpu=$(usex tmva) @@ -258,6 +268,7 @@ src_configure() { -Dtmva-pymva=$(usex tmva) -Dtmva-rmva=$(usex R) -Dunuran=$(usex unuran) + -During=$(usex uring) -Dvc=$(usex vc) -Dvdt=OFF -Dveccore=OFF |