diff options
author | 2022-08-26 12:13:21 +0200 | |
---|---|---|
committer | 2022-08-26 13:12:55 +0200 | |
commit | 3e66c213565749c4cd61dcaced4aef984b75a11e (patch) | |
tree | 05574bddb81f57b1fd60e073d418d0216a701523 /sci-physics | |
parent | sci-physics/hepmc: add myself as a maintainer (diff) | |
download | gentoo-3e66c213565749c4cd61dcaced4aef984b75a11e.tar.gz gentoo-3e66c213565749c4cd61dcaced4aef984b75a11e.tar.bz2 gentoo-3e66c213565749c4cd61dcaced4aef984b75a11e.zip |
sci-physics/hepmc: add 2.06.11
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-physics')
-rw-r--r-- | sci-physics/hepmc/Manifest | 1 | ||||
-rw-r--r-- | sci-physics/hepmc/hepmc-2.06.11.ebuild | 95 |
2 files changed, 96 insertions, 0 deletions
diff --git a/sci-physics/hepmc/Manifest b/sci-physics/hepmc/Manifest index 956b4d3fc19a..80795b1f230c 100644 --- a/sci-physics/hepmc/Manifest +++ b/sci-physics/hepmc/Manifest @@ -1,2 +1,3 @@ DIST HepMC-2.06.09.tar.gz 4612637 BLAKE2B 6bbf1a6a8410b6717ddff29fc3643247582f7a61a05fd9e52a0b09f78bf75de587c1c55525f6a1367b306a26a4687ce55b64908c049d91bdb2db3d40467af62b SHA512 1030f31ad9d19d8ae184145a693c4a3092131f485e2ed89598b7172992a825ad9aa46fb44a9199a00c4a6bd7e163daead9452e9bc4fe32cb3b97351cf22906c4 DIST HepMC3-3.2.5.tar.gz 9217649 BLAKE2B 520e4621cdfa277376e94b87a070f23e6479867bbf696dc972e7496c54504c7da921932fbeaf7713cbaab18c72101ad3fa79396fe8ee1737180946696dcd1fbd SHA512 de60aaa686f6499c62112c265438b9ba41a7ed312b767ddc3409178b6e908e4fffd6a1153bd9f2929cf479074b14bcbec33d377f51a11cfcd4c67e45fc9bb2b9 +DIST hepmc2.06.11.tgz 4893958 BLAKE2B ac8eef250cb330a167c9e0f4bd1aaf8df82e0ffec3557ab5cdaf8bc5b0b7333d6a45f73710ce63abab52d2c5758d5663c15c2a7c940a09504b3ef2fd4517aa0b SHA512 81c100d4931e0e4de62c8ffd18cc06e7996a642fecc092892988bdc0dd0dc3c0f5b336e85f09ceb8f5e0e09456775ae5928d37daf28d82923476089bc0e910f2 diff --git a/sci-physics/hepmc/hepmc-2.06.11.ebuild b/sci-physics/hepmc/hepmc-2.06.11.ebuild new file mode 100644 index 000000000000..f75ed0d07cf6 --- /dev/null +++ b/sci-physics/hepmc/hepmc-2.06.11.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +MYP=HepMC-${PV} + +DESCRIPTION="Event Record for Monte Carlo Generators" +HOMEPAGE="https://hepmc.web.cern.ch/hepmc/" +SRC_URI="https://hepmc.web.cern.ch/hepmc/releases/hepmc${PV}.tgz" +S="${WORKDIR}/${MYP}" + +LICENSE="GPL-2" +SLOT="2" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="cm doc examples gev test" +RESTRICT="!test? ( test )" + +BDEPEND=" + doc? ( + app-doc/doxygen[dot] + dev-texlive/texlive-latex + dev-texlive/texlive-latexextra + dev-texlive/texlive-latexrecommended + )" + +# Block against old slot 0 +RDEPEND="!sci-physics/hepmc:0" + +src_prepare() { + cmake_src_prepare + + sed -i -e '/add_subdirectory(doc)/d' CMakeLists.txt || die + # CMake doc building broken + # gentoo doc directory + #sed -i \ + # -e "s:share/HepMC/doc:share/doc/${PF}:" \ + # doc/CMakeLists.txt || die + + # gentoo examples directory + sed -i \ + -e "s:share/HepMC:share/doc/${PF}:" \ + $(find examples -name CMakeLists.txt) || die + + # respect user's flags + sed -i \ + -e "s/-O -ansi -pedantic -Wall//g" \ + cmake/Modules/HepMCVariables.cmake || die + + # gentoo libdir love + sed -i \ + -e '/DESTINATION/s/lib/lib${LIB_SUFFIX}/g' \ + {src,fio}/CMakeLists.txt || die + + # remove targets if use flags not set + if ! use examples; then + sed -i -e '/add_subdirectory(examples)/d' CMakeLists.txt || die + fi + if ! use test; then + sed -i -e '/add_subdirectory(test)/d' CMakeLists.txt || die + fi + + # remove static libs + sed -i \ + -e '/(HepMC\(fio\|\)S/d' \ + -e '/TARGETS/s/HepMC\(fio\|\)S//' \ + {src,fio}/CMakeLists.txt || die +} + +src_configure() { + # use MeV over GeV and mm over cm + local mycmakeargs=( + -Dlength=$(usex cm CM MM) + -Dmomentum=$(usex gev GEV MEV) + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + if use doc; then + cd doc || die + ./buildDoc.sh || die + ./buildDoxygen.sh || die + HTML_DOCS=( doc/html/. ) + fi +} + +src_install() { + cmake_src_install + use doc && dodoc doc/*.pdf +} |