Gentoo Archives: gentoo-commits

From: Guilherme Amadio <amadio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-physics/geant/
Date: Tue, 31 May 2022 06:53:55
Message-Id: 1653980012.62e8907e49884b9407e40ce2fa276cc31b1c9054.amadio@gentoo
1 commit: 62e8907e49884b9407e40ce2fa276cc31b1c9054
2 Author: Guilherme Amadio <amadio <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 30 12:58:07 2022 +0000
4 Commit: Guilherme Amadio <amadio <AT> gentoo <DOT> org>
5 CommitDate: Tue May 31 06:53:32 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62e8907e
7
8 sci-physics/geant: version bump to 4.11.0.2
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Guilherme Amadio <amadio <AT> gentoo.org>
12
13 sci-physics/geant/Manifest | 1 +
14 sci-physics/geant/geant-4.11.0.2.ebuild | 130 ++++++++++++++++++++++++++++++++
15 2 files changed, 131 insertions(+)
16
17 diff --git a/sci-physics/geant/Manifest b/sci-physics/geant/Manifest
18 index 6e963f1a0053..aaa545cb15e9 100644
19 --- a/sci-physics/geant/Manifest
20 +++ b/sci-physics/geant/Manifest
21 @@ -1,3 +1,4 @@
22 DIST geant4-v11.0.0.tar.gz 35605817 BLAKE2B c34ded976b88946973a5ea9e81d91e0510318ae25f29c631f46b0ee60a9a97d682375ba18e429773930b1ba7808989b9b7ef6affb8f2f1f220ec1c7bd069590c SHA512 52631043e4f1bce6cb33d822bedca5a384c4c7c8997473a548b4df4f3b1702d45fe6ef64647225e573995c63518e4ba39f82afb645b7daa89591a3127799498a
23 DIST geant4-v11.0.1.tar.gz 35643646 BLAKE2B 52af009440d70aa1547d07e4367266a4e02561d0d5d509399db94ce8dcf41d491085b8de908efee7fbe3e7324963f57c9e36e1beeed9a6cef42d327b2f2201a0 SHA512 d189e6aca04dfa6a7a371f2273105d7fb80719c9e1cade7c170ff350d22db5cb33cbfece4c1f8c4d5a374a048bb95f6e9fcd37b03a3a7c2d946e046c4ea608fa
24 +DIST geant4-v11.0.2.tar.gz 35636883 BLAKE2B f22c68cf4c4c9d68d24c98251198804d5790b500ed9077a06ffe5fcc7d84447befc15c93e57f725e68915ff97e7ce022c7f7f5678ceea593aacb231294affa3e SHA512 e7e98242787d1e37303dac54c763e659682adf5c86d30dcefb6c22a7360ba837591c11fb5787a56219461913db786e408f4a344e7ace8ca39cbb8b65b1e23ede
25 DIST geant4.10.07.p03.tar.gz 35756099 BLAKE2B 9e510d17173d280a24d2540d0e0f25f7337a410858c30e9281b937a8402cbc0acd022cc6f41cc3b88fec28b53fa8a266d79e90bfb6545f4ecffe0724e36183da SHA512 174e4f37ca977eff89bbd8f72f18ef5534db72d966665b9a837ed26acffa527d45741fd38fde460f0719c8962dc2ee33db1f3dfe065a7d0e74c148e4582c095c
26
27 diff --git a/sci-physics/geant/geant-4.11.0.2.ebuild b/sci-physics/geant/geant-4.11.0.2.ebuild
28 new file mode 100644
29 index 000000000000..cc96439dc51c
30 --- /dev/null
31 +++ b/sci-physics/geant/geant-4.11.0.2.ebuild
32 @@ -0,0 +1,130 @@
33 +# Copyright 1999-2022 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=8
37 +
38 +PYTHON_COMPAT=( python3_{8..10} )
39 +
40 +inherit cmake python-single-r1
41 +
42 +MY_P=${PN}$(ver_cut 1)-v$(ver_cut 2-4)
43 +
44 +case ${PV} in
45 +*_beta*)
46 + DOCS="ReleaseNotes/Beta.$(ver_cut 2-3)-*.txt"
47 + ;;
48 +*)
49 + if [[ $(ver_cut 4) -gt 0 ]]; then
50 + DOCS="ReleaseNotes/Patch.$(ver_cut 2-3)-*.txt"
51 + fi
52 + HTML_DOCS="ReleaseNotes/ReleaseNotes.$(ver_cut 2-3).html"
53 + ;;
54 +esac
55 +
56 +DESCRIPTION="Toolkit for simulation of passage of particles through matter"
57 +HOMEPAGE="https://geant4.web.cern.ch/"
58 +SRC_URI="https://geant4-data.web.cern.ch/geant4-data/releases/${MY_P}.tar.gz"
59 +
60 +LICENSE="geant4"
61 +SLOT="4"
62 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
63 +IUSE="+c++17 c++20 +data debug doc examples freetype gdml geant3 hdf5 inventor motif opengl
64 + python qt5 raytracerx static-libs tbb threads vtk"
65 +
66 +REQUIRED_USE="
67 + ^^ ( c++17 c++20 )
68 + inventor? ( opengl )
69 + motif? ( opengl )
70 + python? ( ${PYTHON_REQUIRED_USE} )
71 + qt5? ( opengl )
72 + tbb? ( threads )
73 + vtk? ( qt5 )
74 +"
75 +
76 +RDEPEND="
77 + dev-libs/expat
78 + >=sci-physics/clhep-2.4.5.1:2=[threads?]
79 + data? ( ~sci-physics/geant-data-4.11.0.0 )
80 + doc? ( app-doc/geant-docs )
81 + gdml? ( dev-libs/xerces-c )
82 + hdf5? ( sci-libs/hdf5[threads?] )
83 + inventor? ( media-libs/SoXt )
84 + motif? ( x11-libs/motif:0 )
85 + opengl? ( virtual/opengl )
86 + python? (
87 + ${PYTHON_DEPS}
88 + $(python_gen_cond_dep '
89 + dev-libs/boost:=[${PYTHON_USEDEP}]
90 + ')
91 + )
92 + qt5? (
93 + dev-qt/qt3d:5
94 + dev-qt/qtcore:5
95 + dev-qt/qtgui:5
96 + dev-qt/qtprintsupport:5
97 + dev-qt/qtwidgets:5
98 + opengl? ( dev-qt/qtopengl:5 )
99 + )
100 + raytracerx? (
101 + x11-libs/libX11
102 + x11-libs/libXmu
103 + )
104 + vtk? (
105 + sci-libs/vtk:=[qt5]
106 + )"
107 +
108 +S="${WORKDIR}/${MY_P}"
109 +
110 +src_configure() {
111 + local mycmakeargs=(
112 + -DCMAKE_INSTALL_DATADIR="${EPREFIX}/usr/share/geant4"
113 + -DCMAKE_CXX_STANDARD=$( (usev c++17 || usev c++20) | cut -c4-)
114 + -DGEANT4_BUILD_BUILTIN_BACKTRACE=$(usex debug)
115 + -DGEANT4_BUILD_MULTITHREADED=$(usex threads)
116 + -DGEANT4_BUILD_STORE_TRAJECTORY=OFF
117 + -DGEANT4_BUILD_TLS_MODEL=$(usex threads global-dynamic initial-exec)
118 + -DGEANT4_BUILD_VERBOSE_CODE=$(usex debug)
119 + -DGEANT4_INSTALL_DATA=OFF
120 + -DGEANT4_INSTALL_DATADIR="${EPREFIX}/usr/share/geant4/data"
121 + -DGEANT4_INSTALL_EXAMPLES=$(usex examples)
122 + -DGEANT4_INSTALL_PACKAGE_CACHE=OFF
123 + -DGEANT4_USE_FREETYPE=$(usex freetype)
124 + -DGEANT4_USE_G3TOG4=$(usex geant3)
125 + -DGEANT4_USE_GDML=$(usex gdml)
126 + -DGEANT4_USE_HDF5=$(usex hdf5)
127 + -DGEANT4_USE_INVENTOR=$(usex inventor)
128 + -DGEANT4_USE_OPENGL_X11=$(usex opengl)
129 + -DGEANT4_USE_PYTHON=$(usex python)
130 + -DGEANT4_USE_QT=$(usex qt5)
131 + -DGEANT4_USE_RAYTRACER_X11=$(usex raytracerx)
132 + -DGEANT4_USE_SYSTEM_CLHEP=ON
133 + -DGEANT4_USE_SYSTEM_EXPAT=ON
134 + -DGEANT4_USE_SYSTEM_ZLIB=ON
135 + -DGEANT4_USE_TBB=$(usex tbb)
136 + -DGEANT4_USE_XM=$(usex motif)
137 + -DGEANT4_USE_VTK=$(usex vtk)
138 + -DBUILD_STATIC_LIBS=$(usex static-libs)
139 + )
140 +
141 + if use python; then
142 + mycmakeargs+=(
143 + -DPYTHON_EXECUTABLE="${EPREFIX}/usr/bin/${EPYTHON}"
144 + -DCMAKE_INSTALL_PYTHONDIR="${EPREFIX}/usr/lib/${EPYTHON}/site-packages"
145 + )
146 + fi
147 +
148 + [ -v EXTRA_ECONF ] && mycmakeargs+=( ${EXTRA_ECONF} )
149 +
150 + cmake_src_configure
151 +}
152 +
153 +src_install() {
154 + # adjust clhep linking flags for system clhep
155 + # binmake.gmk is only useful for legacy build systems
156 + sed -i -e 's/-lG4clhep/-lCLHEP/' config/binmake.gmk || die
157 + cmake_src_install
158 + use python && python_optimize
159 + rm "${ED}"/usr/bin/*.{sh,csh} || die "failed to remove obsolete shell scripts"
160 +
161 + einstalldocs
162 +}