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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 899FD138334 for ; Sat, 23 Mar 2019 02:35:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4B73DE0969; Sat, 23 Mar 2019 02:35:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 11436E0969 for ; Sat, 23 Mar 2019 02:35:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 28DFF335C8E for ; Sat, 23 Mar 2019 02:35:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6B480554 for ; Sat, 23 Mar 2019 02:35:44 +0000 (UTC) From: "Benda XU" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Benda XU" Message-ID: <1553308536.811b7494b9b244f5dae0bb8cc822e09f6bdcc3c9.heroxbd@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-physics/root/, sci-physics/root/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-physics/root/files/root-6.16.00-disable-header-search.patch sci-physics/root/root-6.16.00-r1.ebuild X-VCS-Directories: sci-physics/root/ sci-physics/root/files/ X-VCS-Committer: heroxbd X-VCS-Committer-Name: Benda XU X-VCS-Revision: 811b7494b9b244f5dae0bb8cc822e09f6bdcc3c9 X-VCS-Branch: master Date: Sat, 23 Mar 2019 02:35:44 +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: 28ffcc2f-c5b7-4477-b319-11219869bde4 X-Archives-Hash: c5aa6c3d6b95881cd598834f8b88ed79 commit: 811b7494b9b244f5dae0bb8cc822e09f6bdcc3c9 Author: Benda Xu gentoo org> AuthorDate: Sat Mar 23 02:32:25 2019 +0000 Commit: Benda XU gentoo org> CommitDate: Sat Mar 23 02:35:36 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=811b7494 sci-physics/root: Remove header expansion logic from RootNewMacros.cmake. The fancy path expansion is not needed for Gentoo and actually causes runtime bugs, like Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState: Missing FileEntry for /var/tmp/portage/sci-physics/JSAP-479/work/JSAP-479/DataType/JPSimOutput.hh requested to autoload type JPSimTriggerInfoTree_t portage automatically removes PORTAGE_TMPDIR from rpath ELF fields. The same applies to rootcling headers. Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Benda Xu gentoo.org> .../files/root-6.16.00-disable-header-search.patch | 38 +++ sci-physics/root/root-6.16.00-r1.ebuild | 323 +++++++++++++++++++++ 2 files changed, 361 insertions(+) diff --git a/sci-physics/root/files/root-6.16.00-disable-header-search.patch b/sci-physics/root/files/root-6.16.00-disable-header-search.patch new file mode 100644 index 00000000000..06748eb6431 --- /dev/null +++ b/sci-physics/root/files/root-6.16.00-disable-header-search.patch @@ -0,0 +1,38 @@ +From: Benda Xu +Date: 2019-03-23 +Subject: Remove header expansion logic from module cmake helper. + +Description: ROOT module cmake helper by default expands header inclusion to +absolute path. In Gentoo, that will capture PORTAGE_TMPDIR resulting in various +runtime bugs. By removing this convolved logic, headers are untouched and become +more predictible for rootcling at runtime. + +Typical bug it solves: + + Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState: + Missing FileEntry for /var/tmp/portage/sci-physics/JSAP-479/work/JSAP-479/DataType/JPSimOutput.hh + requested to autoload type JPSimTruthTree_t + Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState: + Missing FileEntry for /var/tmp/portage/sci-physics/JSAP-479/work/JSAP-479/DataType/JPSimOutput.hh + requested to autoload type JPSimTriggerInfoTree_t + +Forwarded: No need. Gentoo specific. + +--- a/cmake/modules/RootNewMacros.cmake 2019-01-23 16:23:37.000000000 +0800 ++++ b/cmake/modules/RootNewMacros.cmake 2019-02-25 00:18:04.000000000 +0800 +@@ -250,14 +250,7 @@ function(ROOT_GENERATE_DICTIONARY dictio + list(APPEND headerfiles ${fp}) + list(APPEND _list_of_header_dependencies ${fp}) + else() +- find_file(headerFile ${fp} HINTS ${localinclude} ${incdirs} NO_DEFAULT_PATH) +- find_file(headerFile ${fp} NO_SYSTEM_ENVIRONMENT_PATH) +- if(headerFile) +- list(APPEND headerfiles ${headerFile}) +- list(APPEND _list_of_header_dependencies ${headerFile}) +- else() +- list(APPEND headerfiles ${fp}) +- endif() ++ list(APPEND headerfiles ${fp}) + unset(headerFile CACHE) + endif() + endforeach() diff --git a/sci-physics/root/root-6.16.00-r1.ebuild b/sci-physics/root/root-6.16.00-r1.ebuild new file mode 100644 index 00000000000..b6b7b6b7a01 --- /dev/null +++ b/sci-physics/root/root-6.16.00-r1.ebuild @@ -0,0 +1,323 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +CMAKE_BUILD_TYPE=Release +# ninja does not work due to fortran +CMAKE_MAKEFILE_GENERATOR=emake +FORTRAN_NEEDED="fortran" +PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} ) + +inherit cmake-utils cuda eapi7-ver elisp-common eutils fortran-2 \ + llvm 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 +davix emacs +examples + fits fftw fortran +gdml graphviz +gsl http jemalloc kerberos ldap + libcxx memstat +minuit mysql odbc +opengl oracle postgres prefix + pythia6 pythia8 +python qt5 R +roofit root7 shadow sqlite +ssl + table +tbb test +threads +tiff +tmva +unuran vc xinetd +xml xrootd + zeroconf" + +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 !c++17 ) + !X? ( !asimage !opengl !qt5 !tiff ) + davix? ( ssl xml ) + python? ( ${PYTHON_REQUIRED_USE} ) + qt5? ( root7 ) + root7? ( || ( c++14 c++17 ) ) + tmva? ( gsl ) +" + +CDEPEND=" + app-arch/lz4 + app-arch/xz-utils + fortran? ( dev-lang/cfortran ) + dev-libs/libpcre:3 + dev-libs/xxhash + media-fonts/dejavu + media-libs/freetype:2 + media-libs/libpng:0= + sys-devel/llvm:5= + 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?] + >=x11-wm/afterstep-2.2.11[gif,jpeg,png,tiff?] + ) ) + zeroconf? ( net-dns/avahi[mdnsresponder-compat] ) + cuda? ( >=dev-util/nvidia-cuda-toolkit-9.0 ) + davix? ( net-libs/davix ) + emacs? ( virtual/emacs ) + fftw? ( sci-libs/fftw:3.0= ) + fits? ( sci-libs/cfitsio:0= ) + graphviz? ( media-gfx/graphviz ) + gsl? ( sci-libs/gsl:= ) + http? ( dev-libs/fcgi:0= ) + jemalloc? ( dev-libs/jemalloc ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap:0= ) + libcxx? ( sys-libs/libcxx ) + unuran? ( sci-mathematics/unuran:0= ) + minuit? ( !sci-libs/minuit ) + 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? ( virtual/shadow ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( dev-libs/openssl:0= ) + tbb? ( >=dev-cpp/tbb-2018 ) + tmva? ( dev-python/numpy[${PYTHON_USEDEP}] ) + vc? ( dev-libs/vc:= ) + xml? ( dev-libs/libxml2:2= ) + xrootd? ( net-libs/xrootd:0= ) +" + +DEPEND="${CDEPEND} + virtual/pkgconfig" + +RDEPEND="${CDEPEND} + xinetd? ( sys-apps/xinetd )" + +PATCHES=( + "${FILESDIR}"/${PN}-6.12.06_cling-runtime-sysroot.patch + "${FILESDIR}"/${PN}-6.16.00-disable-header-search.patch +) + +pkg_setup() { + LLVM_MAX_SLOT=5 llvm_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() { + cmake-utils_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" + + hprefixify core/clingutils/CMakeLists.txt +} + +# 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_FLAGS="${CFLAGS}" + -DCMAKE_CXX_FLAGS="${CXXFLAGS}" + -DPYTHON_EXECUTABLE="${PYTHON}" + -DLLVM_CONFIG="$(type -P "${CHOST}-llvm-config")" + -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 + -Dexplicitlink=ON + -Dexceptions=ON + -Dfail-on-missing=ON + -Dgnuinstall=OFF + -Dshared=ON + -Dsoversion=ON + -Dbuiltin_llvm=OFF + -Dbuiltin_clang=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_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 + -Dx11=$(usex X) + -Dxft=$(usex X) + -Dafdsmgrd=OFF + -Dafs=OFF # not implemented + -Dalien=OFF + -Dasimage=$(usex asimage) + -Dastiff=$(usex tiff) + -Dbonjour=$(usex zeroconf) + -Dlibcxx=$(usex libcxx) + -Dccache=OFF # use ccache via portage + -Dcastor=OFF + -Dchirp=OFF + -Dclad=OFF + -Dcling=ON # cling=OFF is broken + -Dcocoa=$(usex aqua) + -Dcuda=$(usex cuda) + -Dcxx11=$(usex c++11) + -Dcxx14=$(usex c++14) + -Dcxx17=$(usex c++17) + -Dcxxmodules=OFF # requires clang, unstable + -Ddavix=$(usex davix) + -Ddcache=OFF + -Dfftw3=$(usex fftw) + -Dfitsio=$(usex fits) + -Dfortran=$(usex fortran) + -Dftgl=$(usex opengl) + -Dgdml=$(usex gdml) + -Dgenvector=ON # genvector=OFF ignored + -Dgeocad=OFF + -Dgfal=OFF + -Dgl2ps=$(usex opengl) + -Dglite=OFF # not implemented + -Dglobus=OFF + -Dgminimal=OFF + -Dgsl_shared=$(usex gsl) + -Dgviz=$(usex graphviz) + -Dhdfs=OFF + -Dhttp=$(usex http) + -Dimt=$(usex tbb) + -Djemalloc=$(usex jemalloc) + -Dkrb5=$(usex kerberos) + -Dldap=$(usex ldap) + -Dmathmore=$(usex gsl) + -Dmemstat=$(usex memstat) + -Dminimal=OFF + -Dminuit2=$(usex minuit) + -Dminuit=$(usex minuit) + -Dmonalisa=OFF + -Dmysql=$(usex mysql) + -Dodbc=$(usex odbc) + -Dopengl=$(usex opengl) + -Doracle=$(usex oracle) + -Dpch=ON # pch=OFF is broken + -Dpgsql=$(usex postgres) + -Dpythia6=$(usex pythia6) + -Dpythia8=$(usex pythia8) + -Dpython=$(usex python) + -Dqt5web=$(usex qt5) + -Dqtgsi=OFF + -Dqt=OFF + -Drfio=OFF + -Droofit=$(usex roofit) + -Droot7=$(usex root7) + -Drootbench=OFF + -Droottest=OFF + -Drpath=OFF + -Druby=OFF # deprecated and broken + -Druntime_cxxmodules=OFF # does not work yet + -Dr=$(usex R) + -Dsapdb=OFF # not implemented + -Dshadowpw=$(usex shadow) + -Dsqlite=$(usex sqlite) + -Dsrp=OFF # not implemented + -Dssl=$(usex ssl) + -Dtable=$(usex table) + -Dtcmalloc=OFF + -Dtesting=$(usex test) + -Dthread=$(usex threads) + -Dtmva=$(usex tmva) + -Dtmva-cpu=$(usex tmva) + -Dtmva-gpu=$(usex cuda) + -Dunuran=$(usex unuran) + -Dvc=$(usex vc) + -Dvdt=OFF + -Dveccore=OFF + -Dxml=$(usex xml) + -Dxrootd=$(usex xrootd) + ${EXTRA_ECONF} + ) + + cmake-utils_src_configure +} + +src_compile() { + # needed for hsimple.root + addwrite /dev/random + cmake-utils_src_compile +} + +src_install() { + cmake-utils_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 test 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 +}