From 3b08f674e3f771b49370edb144dab0958c8cf721 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 31 Aug 2021 08:59:54 +0100 Subject: gentoo resync : 31.08.2021 --- sci-physics/Manifest.gz | Bin 4192 -> 4192 bytes sci-physics/espresso/Manifest | 3 +- sci-physics/espresso/espresso-4.1.3.ebuild | 6 + .../espresso/files/espresso-4.1.3-gcc-11.patch | 37 +++ sci-physics/root/Manifest | 4 +- sci-physics/root/root-6.24.02-r1.ebuild | 323 --------------------- sci-physics/root/root-6.24.04.ebuild | 323 +++++++++++++++++++++ 7 files changed, 370 insertions(+), 326 deletions(-) create mode 100644 sci-physics/espresso/files/espresso-4.1.3-gcc-11.patch delete mode 100644 sci-physics/root/root-6.24.02-r1.ebuild create mode 100644 sci-physics/root/root-6.24.04.ebuild (limited to 'sci-physics') diff --git a/sci-physics/Manifest.gz b/sci-physics/Manifest.gz index 2f6e066c3550..4d73d4a58737 100644 Binary files a/sci-physics/Manifest.gz and b/sci-physics/Manifest.gz differ diff --git a/sci-physics/espresso/Manifest b/sci-physics/espresso/Manifest index 4d0b80204ec1..62b8f8d053fc 100644 --- a/sci-physics/espresso/Manifest +++ b/sci-physics/espresso/Manifest @@ -1,4 +1,5 @@ +AUX espresso-4.1.3-gcc-11.patch 1134 BLAKE2B 40072bba384002ab091427d3c358248fba4b0d581be4d56c37cd76406c6da7933016c878139ec6d67e64a45854eb2723712e8ea048013fb8551e196d95f969ff SHA512 c42abfea997a58e70cb79ad554b2a40fa28d844f4d5ed262cc8a7e4420aa5d6e55fd0349fe19cd3654a8b86335b85212ccc3fe927c7418742f4a2e3310ce8f96 DIST espresso-4.1.3.tar.gz 16947336 BLAKE2B 14d3513eda87f62a8473a0cac0c273b3590bf78ed48b96e76d10c106713f7bbd7d37de951bd3d9210062b34c02bd83a68f3aaf1ca8215ed1dcde590e4e99b113 SHA512 1fe82683eddb7bfd9bae6e446b0f42a50087d755995963905cd419473ad17b204f20049d0cf4af9264898dd6fee36f02744b38fa45cd0e33086374cf2aebd934 -EBUILD espresso-4.1.3.ebuild 2703 BLAKE2B f1b9f9798f07d6b5f64a23bccc1364609f05c2f1b9090ed478e208fc725f3e351bb0899414d2fea3d7a7dfb787fcb4f0e5c9436b520561b8021479971b743543 SHA512 c62e72e432146556e446616702251acb67142982100d4525fb323bd12de0f1cca8e53169b576de729d09e1964b92a2b06b96362fe70aeeff9bf5f326f54ed6df +EBUILD espresso-4.1.3.ebuild 2767 BLAKE2B 0ccf402e5234a75cf7c0b38eeb4d5e705a573e7ac08c734ca4cbc0230734646bb2ea17b0ad096fefe309a6387b5edf99e4168f586b2a675a0287f065821c7fe9 SHA512 576bb3bd73ba9b274b23c5df9bc6e20cdfaafbe3c6d1895dacb111f3bf29fa32eda3fe8ee1d85b7d120c49e9112ed0b6584628d4a164ca11ece980d8dea09c7a EBUILD espresso-9999.ebuild 2703 BLAKE2B f1b9f9798f07d6b5f64a23bccc1364609f05c2f1b9090ed478e208fc725f3e351bb0899414d2fea3d7a7dfb787fcb4f0e5c9436b520561b8021479971b743543 SHA512 c62e72e432146556e446616702251acb67142982100d4525fb323bd12de0f1cca8e53169b576de729d09e1964b92a2b06b96362fe70aeeff9bf5f326f54ed6df MISC metadata.xml 476 BLAKE2B 6c074886e03a8645cb40176234cfff18ec75c0c3faa9c72f2cce228cdcbb113eb870eb0aebde8c0c378aee65e54606addb114361255df082a00e4289cd9f0db1 SHA512 d50a5262cccf20c2949d76fbd7a17166985b018d7686deade58a2d748a91754f5691df28800f7d19f3c3f2a78755d3e90cf93f6273be849deea47ee9d7de0258 diff --git a/sci-physics/espresso/espresso-4.1.3.ebuild b/sci-physics/espresso/espresso-4.1.3.ebuild index 19e9be04e85a..4c60379b475a 100644 --- a/sci-physics/espresso/espresso-4.1.3.ebuild +++ b/sci-physics/espresso/espresso-4.1.3.ebuild @@ -49,6 +49,10 @@ DOCS=( AUTHORS NEWS README ChangeLog ) S="${WORKDIR}/${PN}" +PATCHES=( + "${FILESDIR}"/${P}-gcc-11.patch +) + src_prepare() { use cuda && cuda_src_prepare cmake_src_prepare @@ -79,6 +83,8 @@ src_install() { cmake_src_install + python_optimize + insinto /usr/share/${PN}/ doins "${BUILD_DIR}/myconfig-sample.hpp" diff --git a/sci-physics/espresso/files/espresso-4.1.3-gcc-11.patch b/sci-physics/espresso/files/espresso-4.1.3-gcc-11.patch new file mode 100644 index 000000000000..fcda88e9b8b8 --- /dev/null +++ b/sci-physics/espresso/files/espresso-4.1.3-gcc-11.patch @@ -0,0 +1,37 @@ +https://src.fedoraproject.org/rpms/espresso/blob/f34/f/espresso-gcc11.patch +--- a/src/core/communication.hpp ++++ b/src/core/communication.hpp +@@ -49,6 +49,8 @@ + * to \ref CALLBACK_LIST. + */ + ++#include ++ + #include "MpiCallbacks.hpp" + + /* Includes needed by callbacks. */ +diff --git a/src/script_interface/ParallelScriptInterface.hpp b/src/script_interface/ParallelScriptInterface.hpp +index c33e67d..02ad815 100644 +--- a/src/script_interface/ParallelScriptInterface.hpp ++++ b/src/script_interface/ParallelScriptInterface.hpp +@@ -23,6 +23,7 @@ + #define SCRIPT_INTERFACE_PARALLEL_SCRIPT_INTERFACE_HPP + + #include ++#include + + #include "MpiCallbacks.hpp" + #include "ScriptInterface.hpp" +diff --git a/src/utils/include/utils/NumeratedContainer.hpp b/src/utils/include/utils/NumeratedContainer.hpp +index 1d99098..1191a79 100644 +--- a/src/utils/include/utils/NumeratedContainer.hpp ++++ b/src/utils/include/utils/NumeratedContainer.hpp +@@ -24,6 +24,7 @@ + * Keep an enumerated list of T objects, managed by the class. + */ + ++#include + #include + #include + #include + diff --git a/sci-physics/root/Manifest b/sci-physics/root/Manifest index 5fa216ce04b9..364b1e5de006 100644 --- a/sci-physics/root/Manifest +++ b/sci-physics/root/Manifest @@ -1,8 +1,8 @@ AUX root-6.12.06_cling-runtime-sysroot.patch 989 BLAKE2B 8202cc8f2bf72cc25642d0a03ba26c3969069b291a6a22188879dbedbf0c3c496149f79f671d0eb51d81d0ee36565660d136b4741f5d018c2b05325ff08381f0 SHA512 c96dee9843da1051c54bd6870ef0a04714944ffe1f86800c9a51b8eb8ef84107d3315d3a708dcc0b651248af4bec362c7f31695514505045aeda9c793d40dc58 DIST root_v6.22.08.source.tar.gz 173079716 BLAKE2B 0b3c15dfedd0215334dcd59db133aa9097709996e0e9cc20a1ae96f954ee607cad314291148f78a31f24ba78dee84204e617e17a6ed8a390503b068e8120e9f3 SHA512 2355e20b8c4d7ad747c31956a3ad0f6e7b70039f3e6613182bd7c53d0e8776267ee85fc1d8aad9ed0d942e28f4124ad79a7dc1082bb1ea7974be2cb6a8a85b39 -DIST root_v6.24.02.source.tar.gz 185205849 BLAKE2B 2b8b7aaf6d1bf498a52f341128ee3202ae5166d6ad49d8a0a05da64d4ed2887b50c22e67a7ce694e85d4330a1002937e21a4746be0342a9e21631e4b88125535 SHA512 8ff64688c6c675e157a5db504f8347511752dd10142c70af677fde9396841eb0a76bb9ec43631e73c83b09f278e34706a5492e22db52b6c100578329cef3c461 +DIST root_v6.24.04.source.tar.gz 185202985 BLAKE2B 2624984bc612d8fe40957278bc9155c7cb572e38ede0310a1946ebc4b308df3e2d2bc0fa48d25b600935905e7fb3d3c4c232bf019b267781e51398d0f519436c SHA512 175edb81a3a6eac80ba3fe1115dadb1098672463246a1eab3fe821414adf64257b4c803a8e4c04eb7847133138c14cdcebd9be8bb26e46b2ea3bf44461a6f0e3 EBUILD root-6.22.08-r2.ebuild 7549 BLAKE2B bc4922e1df99554dcdb864aee4825abe01e0e082434bad558b7f08d95a68684b9971cc60dd83bbacbb3a3cffcae242ff599b6aad763216432fd1ec91054210ac SHA512 95c26e0f519cfc60e68e631e6798239ceb74ff879cc6fe6de8e5ca5f2b7622a2a1e3d3d1208a1c002a80bd2fa879a1886e7309dd6badc1124c9f4ebc71a36ed2 -EBUILD root-6.24.02-r1.ebuild 7788 BLAKE2B 1a95495c58a99a6293882f5aa183a79371e2591955dfca3fc14030c285de64794a88f66ac61b35fee72e92f7a9c0a33d77df2baaedb5f3180fd590feca756658 SHA512 843936f1a6a0748493165b963f64cd48d6cc44396cf070b790e43d3218854901ea743dfafcca5cc2a1fadcc84d313edbc6e496c805260ff002c09a64c853cf79 +EBUILD root-6.24.04.ebuild 7788 BLAKE2B 1a95495c58a99a6293882f5aa183a79371e2591955dfca3fc14030c285de64794a88f66ac61b35fee72e92f7a9c0a33d77df2baaedb5f3180fd590feca756658 SHA512 843936f1a6a0748493165b963f64cd48d6cc44396cf070b790e43d3218854901ea743dfafcca5cc2a1fadcc84d313edbc6e496c805260ff002c09a64c853cf79 EBUILD root-6.24.9999.ebuild 8259 BLAKE2B c1b814b1e90ec14576f17d3f611ebc95a32cae022c5b34b012a0ec29b03d7df6257a37717593023706397bd822f7803f40a6f9a47c3c3fa10f1ce8e5268168f8 SHA512 9c13e27417e84e806ccce0c0f3c3efc0962889da31df9ec098a8ccc51885e584c6f12dad1dc58b7b9fde95bf0fd9a31d6d34d7b882b58a3cdd1b1e618c9aee16 EBUILD root-9999.ebuild 8259 BLAKE2B c1b814b1e90ec14576f17d3f611ebc95a32cae022c5b34b012a0ec29b03d7df6257a37717593023706397bd822f7803f40a6f9a47c3c3fa10f1ce8e5268168f8 SHA512 9c13e27417e84e806ccce0c0f3c3efc0962889da31df9ec098a8ccc51885e584c6f12dad1dc58b7b9fde95bf0fd9a31d6d34d7b882b58a3cdd1b1e618c9aee16 MISC metadata.xml 3149 BLAKE2B 88e20041b72bc4507f253ea0b9096567f6a7c5c7f7bf6851adfb69c24aedb73fb68b2541538cd01fd51d944425c22f4b7154379ac70d851659efeaa1e3a07337 SHA512 65a82570e75f9b4b3e6f8d1e1cfd1aad5f3e2199843853392b51ea1e1f4dcc7ef6500196aa0f759726cb0d0e17be19055d8c9c87e745fa11d337acc2eaf5ce74 diff --git a/sci-physics/root/root-6.24.02-r1.ebuild b/sci-physics/root/root-6.24.02-r1.ebuild deleted file mode 100644 index 19bce3d18d03..000000000000 --- a/sci-physics/root/root-6.24.02-r1.ebuild +++ /dev/null @@ -1,323 +0,0 @@ -# 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_{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= - virtual/libcrypt:= - 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_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.04.ebuild b/sci-physics/root/root-6.24.04.ebuild new file mode 100644 index 000000000000..19bce3d18d03 --- /dev/null +++ b/sci-physics/root/root-6.24.04.ebuild @@ -0,0 +1,323 @@ +# 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_{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= + virtual/libcrypt:= + 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_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 +} -- cgit v1.2.3