Lines 25-31
done
Link Here
|
25 |
LICENSE="geant4" |
25 |
LICENSE="geant4" |
26 |
SLOT="4" |
26 |
SLOT="4" |
27 |
KEYWORDS="~amd64 ~x86" |
27 |
KEYWORDS="~amd64 ~x86" |
28 |
IUSE="athena +data dawn debug examples gdml geant3 minimal +motif |
28 |
IUSE="athena +data dawn debug examples gdml geant3 minimal motif |
29 |
+opengl openinventor +raytracerx +vrml zlib" |
29 |
+opengl openinventor +raytracerx +vrml zlib" |
30 |
|
30 |
|
31 |
DEPEND="sci-physics/clhep |
31 |
DEPEND="sci-physics/clhep |
Lines 92-104
g4w_use() {
Link Here
|
92 |
} |
92 |
} |
93 |
|
93 |
|
94 |
src_compile() { |
94 |
src_compile() { |
95 |
GEANT4_DATA_DIR=/usr/share/${PN} |
95 |
GEANT4_DIR=/usr/share/${PN} |
96 |
# The Configure shell script saves its options |
96 |
# The Configure shell script saves its options |
97 |
# in .config/bin/*/config.sh |
97 |
# in .config/bin/*/config.sh |
98 |
|
98 |
|
99 |
local myconf="$(g4vis_use opengl openglx)" |
99 |
local myconf="$(g4vis_use opengl openglx)" |
100 |
use opengl && myconf="${glconf} $(g4vis_use motif openglxm)" |
100 |
use opengl && myconf="${glconf} $(g4vis_use motif openglxm)" |
101 |
use data && myconf="${myconf} -D g4data=${GEANT_DATA_DIR}" |
101 |
DATA="${GEANT4_DIR}/data" |
|
|
102 |
use data && myconf="${myconf} |
103 |
-D g4levelgammadata=${DATA}/PhotonEvaporation2.0 |
104 |
-D g4radioactivedata=${DATA}/RadioactiveDecay3.2 |
105 |
-D g4ledata=${DATA}/G4EMLOW5.1 |
106 |
-D g4neutronhpcrosssections=${DATA}/G4NDL3.12 |
107 |
-D g4abladata=${DATA}/G4ABLA3.0" |
102 |
|
108 |
|
103 |
# switch to see compiling flags |
109 |
# switch to see compiling flags |
104 |
export CPPVERBOSE=y |
110 |
export CPPVERBOSE=y |
Lines 142-154
src_compile() {
Link Here
|
142 |
-D g4lib_build_static=n \ |
148 |
-D g4lib_build_static=n \ |
143 |
|| die "Building shared geant failed" |
149 |
|| die "Building shared geant failed" |
144 |
|
150 |
|
145 |
rm -rf tmp |
151 |
# rm -rf tmp |
146 |
|
152 |
# |
147 |
./Configure \ |
153 |
# ./Configure \ |
148 |
-deO -build \ |
154 |
# -deO -build \ |
149 |
-D g4lib_build_shared=n \ |
155 |
# -D g4lib_build_shared=n \ |
150 |
-D g4lib_build_static=y \ |
156 |
# -D g4lib_build_static=y \ |
151 |
|| die "Building shared geant failed" |
157 |
# || die "Building shared geant failed" |
152 |
} |
158 |
} |
153 |
|
159 |
|
154 |
src_install() { |
160 |
src_install() { |
Lines 159-176
src_install() {
Link Here
|
159 |
./Configure \ |
165 |
./Configure \ |
160 |
|| die "Final install failed" |
166 |
|| die "Final install failed" |
161 |
|
167 |
|
162 |
insinto ${GEANT4_DATA_DIR} |
168 |
insinto ${GEANT4_DIR} |
163 |
sed -i \ |
169 |
sed -i \ |
164 |
-e "s:${S}:${GEANT4_DATA_DIR}:g" \ |
170 |
-e "s:${S}:${GEANT4_DIR}:g" \ |
165 |
-e "s:${D}:/:g" \ |
171 |
-e "s:${D}:/:g" \ |
166 |
env.*sh |
172 |
env.*sh |
167 |
doins env.*sh || die "failed installing shell scripts" |
173 |
doins env.*sh || die "failed installing shell scripts" |
168 |
doins -r config |
174 |
doins -r config |
|
|
175 |
insinto "${GEANT4_DIR}/data" |
169 |
if use data; then |
176 |
if use data; then |
170 |
cd "${WORKDIR}" |
177 |
cd "${WORKDIR}" |
171 |
for d in ${GEANT4_DATA}; do |
178 |
# give an explicit list of data dirs since the archive names don't |
172 |
doins -r ${d/.} || die "installing data ${d} failed" |
179 |
# always match the content |
|
|
180 |
for d in "G4NDL3.12 G4EMLOW5.1 RadioactiveDecay3.2 PhotonEvaporation2.0 G4ABLA3.0"; do |
181 |
doins -r ${d} || die "installing data ${d} failed" |
173 |
done |
182 |
done |
|
|
183 |
cd "${S}" |
174 |
fi |
184 |
fi |
175 |
|
185 |
|
176 |
# doc and examples |
186 |
# doc and examples |
Lines 188-196
src_install() {
Link Here
|
188 |
|
198 |
|
189 |
pkg_postinst() { |
199 |
pkg_postinst() { |
190 |
elog "You can set the Geant4 environment variables" |
200 |
elog "You can set the Geant4 environment variables" |
191 |
elog "from ${ROOT}${GEANT4_DATA_DIR} shell scripts." |
201 |
elog "from ${ROOT}${GEANT4_DIR} shell scripts." |
192 |
elog "Ex: for bash" |
202 |
elog "Ex: for bash" |
193 |
elog " source ${ROOT}${GEANT4_DATA_DIR}/env.sh" |
203 |
elog " source ${ROOT}${GEANT4_DIR}/env.sh" |
194 |
elog |
204 |
elog |
195 |
elog "Help us to improve the ebuild and dependencies in" |
205 |
elog "Help us to improve the ebuild and dependencies in" |
196 |
elog "http://bugs.gentoo.org/show_bug.cgi?id=212221" |
206 |
elog "http://bugs.gentoo.org/show_bug.cgi?id=212221" |