From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4F6FD15800F for ; Mon, 13 Feb 2023 09:56:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 76DEAE07DB; Mon, 13 Feb 2023 09:56:51 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 56E48E07DB for ; Mon, 13 Feb 2023 09:56:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 25F1D33BDD0 for ; Mon, 13 Feb 2023 09:56:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 22A098AB for ; Mon, 13 Feb 2023 09:56:47 +0000 (UTC) From: "Guilherme Amadio" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Guilherme Amadio" Message-ID: <1676282165.4cf3d9955693efdf7c3f4f4fcff869886fbae6d8.amadio@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-physics/root/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-physics/root/root-9999.ebuild X-VCS-Directories: sci-physics/root/ X-VCS-Committer: amadio X-VCS-Committer-Name: Guilherme Amadio X-VCS-Revision: 4cf3d9955693efdf7c3f4f4fcff869886fbae6d8 X-VCS-Branch: master Date: Mon, 13 Feb 2023 09:56:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e6181dd9-6b5f-4fd8-9e40-9948aeb2dd07 X-Archives-Hash: afc413a96db66a912f03f0f11d344633 commit: 4cf3d9955693efdf7c3f4f4fcff869886fbae6d8 Author: Guilherme Amadio gentoo org> AuthorDate: Thu Feb 9 13:45:35 2023 +0000 Commit: Guilherme Amadio gentoo org> CommitDate: Mon Feb 13 09:56:05 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4cf3d995 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 gentoo.org> sci-physics/root/root-9999.ebuild | 146 ++++++++++++++++++-------------------- 1 file 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." }