diff options
author | Guilherme Amadio <amadio@gentoo.org> | 2023-02-09 14:45:35 +0100 |
---|---|---|
committer | Guilherme Amadio <amadio@gentoo.org> | 2023-02-13 10:56:05 +0100 |
commit | 4cf3d9955693efdf7c3f4f4fcff869886fbae6d8 (patch) | |
tree | d2dfa50f8cbba7bb7ab76cc674165df0a38cc04e /sci-physics/root | |
parent | sci-physics/root: update metadata.xml (diff) | |
download | gentoo-4cf3d9955693efdf7c3f4f4fcff869886fbae6d8.tar.gz gentoo-4cf3d9955693efdf7c3f4f4fcff869886fbae6d8.tar.bz2 gentoo-4cf3d9955693efdf7c3f4f4fcff869886fbae6d8.zip |
sci-physics/root: update live ebuild
- Better follow FHS
- Enable support for Python 3.11
- Change default to -Druntime_cxxmodules=ON
- Update with newly introduced build options (this is to avoid
changes in defaults affecting ebuilds).
- Drop emacs USE flag
- Add jupyter USE flag for installing dependencies needed for
enbling the C++ Jupyter notebooks provided by ROOT
- Update REQUIRED_USE for bug #882483
Bug: https://bugs.gentoo.org/666222
Bug: https://bugs.gentoo.org/882483
Signed-off-by: Guilherme Amadio <amadio@gentoo.org>
Diffstat (limited to 'sci-physics/root')
-rw-r--r-- | sci-physics/root/root-9999.ebuild | 146 |
1 files changed, 69 insertions, 77 deletions
diff --git a/sci-physics/root/root-9999.ebuild b/sci-physics/root/root-9999.ebuild index bff12a2d4081..84fee8efa756 100644 --- a/sci-physics/root/root-9999.ebuild +++ b/sci-physics/root/root-9999.ebuild @@ -6,18 +6,17 @@ EAPI=8 # ninja does not work due to fortran CMAKE_MAKEFILE_GENERATOR=emake FORTRAN_NEEDED="fortran" -PYTHON_COMPAT=( python3_{9..10} ) +PYTHON_COMPAT=( python3_{9..11} ) -inherit cmake cuda elisp-common fortran-2 python-single-r1 toolchain-funcs +inherit cmake cuda fortran-2 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" +IUSE="+X aqua +asimage c++14 +c++17 cuda cudnn +davix debug +examples + fits fftw fortran +gdml graphviz +gsl http jupyter libcxx +minuit mpi + mysql odbc +opengl oracle postgres pythia6 pythia8 +python qt5 R +roofit + +root7 shadow sqlite +ssl +tbb test +tmva +unuran uring vc +xml xrootd" RESTRICT="test" PROPERTIES="test_network" @@ -25,13 +24,13 @@ if [[ ${PV} =~ "9999" ]] ; then inherit git-r3 EGIT_REPO_URI="https://github.com/root-project/root.git" if [[ ${PV} == "9999" ]]; then - SLOT="0" + SLOT="6/9999" else - SLOT="$(ver_cut 1-2)/$(ver_cut 3)" + SLOT="6/$(ver_cut 1-3)" EGIT_BRANCH="v$(ver_cut 1)-$(ver_cut 2)-00-patches" fi else - SLOT="$(ver_cut 1-2)/$(ver_cut 3)" + SLOT="6/$(ver_cut 1-3)" KEYWORDS="~amd64 ~x86" SRC_URI="https://root.cern/download/${PN}_v${PV}.source.tar.gz" fi @@ -39,15 +38,15 @@ fi LICENSE="LGPL-2.1 freedist MSttfEULA LGPL-3 libpng UoI-NCSA" REQUIRED_USE=" - ^^ ( c++11 c++14 c++17 ) + ^^ ( 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 ) + root7? ( || ( c++17 ) ) + tmva? ( gsl python ) uring? ( root7 ) " @@ -87,7 +86,6 @@ CDEPEND=" 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 ) @@ -128,7 +126,13 @@ CDEPEND=" DEPEND="${CDEPEND} virtual/pkgconfig" -RDEPEND="${CDEPEND}" +RDEPEND="${CDEPEND} + $(python_gen_cond_dep ' + dev-python/jupyter[${PYTHON_USEDEP}] + dev-python/notebook[${PYTHON_USEDEP}] + dev-python/metakernel[${PYTHON_USEDEP}] + ') +" PATCHES=( "${FILESDIR}"/${PN}-6.12.06_cling-runtime-sysroot.patch @@ -159,9 +163,6 @@ src_prepare() { # 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=( @@ -170,18 +171,38 @@ src_configure() { -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-) + -DCMAKE_CXX_STANDARD=$( (usev c++14 || usev c++17) | cut -c4-) + # set build type flags to empty to avoid overriding CXXFLAGS + -UCMAKE_C_FLAGS_RELEASE + -UCMAKE_C_FLAGS_RELWITHDEBINFO + -UCMAKE_CXX_FLAGS_RELEASE + -UCMAKE_CXX_FLAGS_RELWITHDEBINFO + # enable debug info in LLVM as well with USE=debug + -DLLVM_BUILD_TYPE=$(usex debug RelWithDebInfo Release) -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}" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DCMAKE_INSTALL_CMAKEDIR="$(get_libdir)/cmake/ROOT" + -DCMAKE_INSTALL_DATADIR="share/root" + -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}" + -DCMAKE_INSTALL_FONTDIR="share/fonts/root" + -DCMAKE_INSTALL_INCLUDEDIR="include/root" + -DCMAKE_INSTALL_LIBDIR="$(get_libdir)/root" + -DCMAKE_INSTALL_PYTHONDIR="${EPREFIX}/usr/lib/${EPYTHON}/site-packages" + -DCMAKE_INSTALL_SRCDIR="${EPREFIX}/usr/src/debug/${CATEGORY}/${PF}" + -DCMAKE_INSTALL_SYSCONFDIR="share/root" + -DCMAKE_INSTALL_TUTDIR="share/root/tutorials" -DCLING_BUILD_PLUGINS=OFF - -Dasserts=OFF + -Dasan=OFF + -Dasserts=$(usex debug) + -Dccache=OFF # use ccache via portage + -Dcoverage=OFF -Ddev=OFF + -Ddistcc=OFF -Dexceptions=ON -Dfail-on-missing=ON - -Dgnuinstall=OFF + -Dgnuinstall=ON + -Dgminimal=OFF -Dshared=ON -Dsoversion=ON -Dbuiltin_llvm=ON @@ -198,6 +219,7 @@ src_configure() { -Dbuiltin_gl2ps=OFF -Dbuiltin_glew=OFF -Dbuiltin_gsl=OFF + -Dbuiltin_gtest=OFF -Dbuiltin_lz4=OFF -Dbuiltin_lzma=OFF -Dbuiltin_nlohmannjson=OFF @@ -213,37 +235,32 @@ src_configure() { -Dbuiltin_zeromq=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 + -Ddaos=OFF # not in gentoo -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) + -Djemalloc=OFF -Dlibcxx=$(usex libcxx) -Dmathmore=$(usex gsl) - -Dmemstat=OFF # deprecated - -Dminimal=OFF - -Dminuit2=$(usex minuit) -Dminuit=$(usex minuit) + -Dminuit2=$(usex minuit) -Dmlp=$(usex tmva) -Dmonalisa=OFF -Dmpi=$(usex mpi) @@ -252,21 +269,21 @@ src_configure() { -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) + -Dpyroot_legacy=OFF + -Dpythia6=$(usex pythia6) -Dpythia8=$(usex pythia8) -Dqt5web=$(usex qt5) -Dqt6web=OFF -Dr=$(usex R) -Droofit=$(usex roofit) -Droofit_multiprocess=OFF + -Droofit_hs3_ryml=OFF -Droot7=$(usex root7) -Drootbench=OFF -Droottest=OFF -Drpath=OFF - -Druntime_cxxmodules=OFF + -Druntime_cxxmodules=ON -Dshadowpw=$(usex shadow) -Dspectrum=ON -Dsqlite=$(usex sqlite) @@ -287,64 +304,39 @@ src_configure() { -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 + # Needs to be here, otherwise gets overriden by cmake.eclass + DCMAKE_BUILD_TYPE=$(usex debug RelWithDebInfo Release) cmake_src_configure } 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" + newenvd - 99root <<- EOF || die + LDPATH="${EPREFIX}/usr/$(get_libdir)/root" EOF - if use python; then - echo "PYTHONPATH=\"${ROOTSYS}/lib\"" >> ${ROOTENV} || die - fi + pushd "${ED}/usr" > /dev/null - doenvd ${ROOTENV} + rm bin/*.{csh,sh,fish} || die - if use emacs; then - elisp-install ${PN}-$(ver_cut 1-2) "${BUILD_DIR}"/root-help.el + if ! use examples; then + rm -r share/root/tutorials || die fi - pushd "${D}/${ROOTSYS}" > /dev/null - - rm -r emacs bin/*.{csh,sh,fish} || die + popd - if ! use examples; then - rm -r tutorials || die - fi + use python && python_optimize +} - # 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 +pkg_postinst() { + einfo "Please note that from now on (specifically since sci-physics/root-6.28.00)," + einfo "ROOT is more closely following FHS (see https://bugs.gentoo.org/666222)." + einfo "Due to this, it will no longer be possible to install multiple concurrent" + einfo "versions of ROOT in Gentoo, since that would now cause file collisions." } |