1 |
bicatali 08/09/23 11:02:00 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: geant-4.9.1_p03.ebuild |
5 |
Log: |
6 |
Version bump. Closing bug #238132. |
7 |
(Portage version: 2.2_rc8/cvs/Linux 2.6.25-gentoo-r7 x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.16 sci-physics/geant/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-physics/geant/ChangeLog?rev=1.16&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-physics/geant/ChangeLog?rev=1.16&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-physics/geant/ChangeLog?r1=1.15&r2=1.16 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sci-physics/geant/ChangeLog,v |
19 |
retrieving revision 1.15 |
20 |
retrieving revision 1.16 |
21 |
diff -u -r1.15 -r1.16 |
22 |
--- ChangeLog 6 Aug 2008 16:19:10 -0000 1.15 |
23 |
+++ ChangeLog 23 Sep 2008 11:01:59 -0000 1.16 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for sci-physics/geant |
26 |
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sci-physics/geant/ChangeLog,v 1.15 2008/08/06 16:19:10 ulm Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/geant/ChangeLog,v 1.16 2008/09/23 11:01:59 bicatali Exp $ |
29 |
+ |
30 |
+*geant-4.9.1_p03 (23 Sep 2008) |
31 |
+ |
32 |
+ 23 Sep 2008; Sébastien Fabbro <bicatali@g.o> |
33 |
+ +geant-4.9.1_p03.ebuild: |
34 |
+ Version bump. Closing bug #238132. |
35 |
|
36 |
06 Aug 2008; Ulrich Mueller <ulm@g.o> metadata.xml: |
37 |
Add USE flag description to metadata wrt GLEP 56. |
38 |
|
39 |
|
40 |
|
41 |
1.1 sci-physics/geant/geant-4.9.1_p03.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-physics/geant/geant-4.9.1_p03.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-physics/geant/geant-4.9.1_p03.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: geant-4.9.1_p03.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2008 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/sci-physics/geant/geant-4.9.1_p03.ebuild,v 1.1 2008/09/23 11:01:59 bicatali Exp $ |
51 |
|
52 |
EAPI="1" |
53 |
|
54 |
inherit eutils fortran multilib versionator toolchain-funcs |
55 |
|
56 |
PV1=$(get_version_component_range 1 ${PV}) |
57 |
PV2=$(get_version_component_range 2 ${PV}) |
58 |
PV3=$(get_version_component_range 3 ${PV}) |
59 |
MY_P=${PN}$(replace_version_separator 3 .) |
60 |
|
61 |
DESCRIPTION="CERN's detector description and simulation Tool" |
62 |
HOMEPAGE="http://www.geant4.org/" |
63 |
|
64 |
SRC_COM="http://geant4.web.cern.ch/geant4/support/source" |
65 |
SRC_URI="${SRC_COM}/${MY_P}.tar.gz" |
66 |
GEANT4_DATA="G4NDL.3.12 |
67 |
G4EMLOW.5.1 |
68 |
G4RadioactiveDecay.3.2 |
69 |
PhotonEvaporation.2.0 |
70 |
G4ABLA.3.0" |
71 |
for d in ${GEANT4_DATA}; do |
72 |
SRC_URI="${SRC_URI} data? ( ${SRC_COM}/${d}.tar.gz )" |
73 |
done |
74 |
|
75 |
LICENSE="geant4" |
76 |
SLOT="4" |
77 |
KEYWORDS="~amd64 ~hppa ~sparc ~x86" |
78 |
IUSE="athena +data dawn debug examples gdml geant3 global minimal +motif |
79 |
+opengl openinventor +raytracerx static +vrml zlib" |
80 |
|
81 |
DEPEND="sci-physics/clhep |
82 |
motif? ( x11-libs/openmotif ) |
83 |
athena? ( x11-libs/libXaw ) |
84 |
openinventor? ( media-libs/openinventor ) |
85 |
raytracerx? ( x11-libs/libX11 x11-libs/libXmu ) |
86 |
opengl? ( virtual/opengl |
87 |
athena? ( x11-libs/Xaw3d ) ) |
88 |
gdml? ( dev-libs/xerces-c ) |
89 |
geant3? ( sci-physics/geant:3 ) |
90 |
dawn? ( media-gfx/dawn )" |
91 |
|
92 |
S="${WORKDIR}/${MY_P}" |
93 |
|
94 |
pkg_setup() { |
95 |
FORTRAN="gfortran g77 ifc" |
96 |
use geant3 && fortran_pkg_setup |
97 |
eval unset ${!G4*} |
98 |
} |
99 |
|
100 |
src_unpack() { |
101 |
unpack ${A} |
102 |
cd "${S}" |
103 |
|
104 |
# propagate user's flags. |
105 |
sed -i \ |
106 |
-e "/CXXFLAGS[[:space:]]*.=[[:space:]]-O2/s:=.*:= ${CXXFLAGS}:" \ |
107 |
-e "/FCFLAGS[[:space:]]*.=[[:space:]]-O2/s:=.*:= ${FFLAGS:--O2}:" \ |
108 |
-e "/CCFLAGS[[:space:]]*.=[[:space:]]-O2/s:=.*:= ${CFLAGS}:" \ |
109 |
config/sys/Linux*gmk || die "flag substitution failed" |
110 |
|
111 |
# fix forced lib directory |
112 |
sed -i \ |
113 |
-e 's:$(G4LIB)/$(G4SYSTEM):$(G4LIB):g' \ |
114 |
config/binmake.gmk || die "sed binmake.gmk failed" |
115 |
sed -i \ |
116 |
-e '/$(G4LIB)\/$(G4SYSTEM)/d' \ |
117 |
config/architecture.gmk || die "sed architecture.gmk failed" |
118 |
sed -i \ |
119 |
-e 's:$(G4LIB)/$(G4SYSTEM):$(G4TMP):g' \ |
120 |
config/common.gmk || die "sed common.gmk failed" |
121 |
sed -i \ |
122 |
-e 's:$(G4LIB)/$(G4SYSTEM):$(G4TMP):g' \ |
123 |
-e 's:$(G4BIN)/$(G4SYSTEM):$(G4TMP):g' \ |
124 |
-e 's:$(G4TMP)/$(G4SYSTEM):$(G4TMP):g' \ |
125 |
source/GNUmakefile || die "sed GNUmakefile failed" |
126 |
sed -i \ |
127 |
-e 's:$(G4LIB)/$(G4SYSTEM):$(G4TMP):g' \ |
128 |
config/globlib.gmk || die "sed globlib.gmk failed" |
129 |
} |
130 |
|
131 |
src_compile() { |
132 |
export GEANT4_DIR="/usr/share/${PN}${PV1}" |
133 |
# where to put compiled libraries; |
134 |
# we set env var G4LIB in src_install() |
135 |
# to avoid confusing make |
136 |
export GEANT4_LIBDIR=/usr/$(get_libdir)/${PN}${PV1} |
137 |
|
138 |
# these should always to be set |
139 |
[[ $(tc-getCXX) = ic*c ]] && export G4SYSTEM=Linux-icc \ |
140 |
|| export G4SYSTEM=Linux-g++ |
141 |
export G4INSTALL="${S}" |
142 |
export G4INCLUDE="${D}/usr/include/${PN}" |
143 |
export CLHEP_BASE_DIR=/usr |
144 |
|
145 |
# parse USE; just set flags of drivers to build, G4*_USE_* vars are set |
146 |
# later automatically for G4*_BUILD_*_DRIVER |
147 |
use minimal && export G4UI_NONE=y \ |
148 |
&& export G4VIS_NONE=y |
149 |
|
150 |
use motif && export G4UI_BUILD_XM_SESSION=y |
151 |
use athena && export G4UI_BUILD_XAW_SESSION=y |
152 |
|
153 |
use dawn && export G4VIS_BUILD_DAWN_DRIVER=y |
154 |
use raytracerx && export G4VIS_BUILD_RAYTRACERX_DRIVER=y |
155 |
use openinventor && export G4VIS_BUILD_OI_DRIVER=y |
156 |
use opengl && export G4VIS_BUILD_OPENGLX_DRIVER=y |
157 |
use opengl && use motif && export G4VIS_BUILD_OPENGLXM_DRIVER=y |
158 |
|
159 |
use geant3 && export G4LIB_BUILD_G3TOG4=y |
160 |
use zlib && export G4LIB_BUILD_ZLIB=y |
161 |
use vrml && export G4VIS_BUILD_VRML_DRIVER=y \ |
162 |
&& export G4VIS_BUILD_VRMLFILE_DRIVER=y |
163 |
|
164 |
use data && export G4DATA="${GEANT4_DIR}/data" |
165 |
use debug && export G4DEBUG=y || export G4OPTIMIZE=y |
166 |
|
167 |
# switch to see compiling flags |
168 |
export CPPVERBOSE=y |
169 |
|
170 |
# if shared libs are built, the script will also build static libs |
171 |
# with pic flags |
172 |
# avoid that by building it twice and removing temporary objects |
173 |
cd "${S}/source/" |
174 |
export G4LIB_BUILD_SHARED=y |
175 |
emake || die "Building shared geant failed" |
176 |
|
177 |
if use global; then |
178 |
export G4LIB_USE_GRANULAR=y |
179 |
emake global || die "Building global libraries failed" |
180 |
emake || die "Rebuilding shared geant failed" |
181 |
fi |
182 |
|
183 |
if use static; then |
184 |
rm -rf tmp |
185 |
export G4LIB_BUILD_STATIC=y ; unset G4LIB_BUILD_SHARED |
186 |
emake || die "Building static geant failed" |
187 |
fi |
188 |
} |
189 |
|
190 |
g4_create_env_script() { |
191 |
# we need to change some variables to the final values since we hide these |
192 |
# from make during the compile |
193 |
export G4INSTALL=${GEANT4_DIR} |
194 |
export G4LIB=${GEANT4_LIBDIR} |
195 |
export G4INCLUDE=${G4INCLUDE/${D}/} |
196 |
export G4WORKDIR=\${HOME}/${PN}${PV1} |
197 |
|
198 |
local g4env=99${PN}${PV1} |
199 |
cat <<-EOF > ${g4env} |
200 |
LDPATH=${G4LIB} |
201 |
CLHEP_BASE_DIR=${CLHEP_BASE_DIR} |
202 |
EOF |
203 |
|
204 |
# detailed data file locations |
205 |
if $(use data); then |
206 |
export G4LEVELGAMMADATA="${G4DATA}/PhotonEvaporation2.0" |
207 |
export G4RADIOACTIVEDATA="${G4DATA}/RadioactiveDecay3.2" |
208 |
export G4LEDATA="${G4DATA}/G4EMLOW5.1" |
209 |
export G4NEUTRONHPCROSSSECTIONS="${G4DATA}/G4NDL3.12" |
210 |
fi |
211 |
|
212 |
# read env variables defined upto now |
213 |
printenv | grep ^G4 | uniq >> ${g4env} |
214 |
# define env vars for capabilities we can build into user projects |
215 |
printenv | uniq | \ |
216 |
sed -n -e '/^G4/s:BUILD\(.*\)_DRIVER:USE\1:gp' >> ${g4env} |
217 |
doenvd ${g4env} || die "Installing environment scripts failed " |
218 |
} |
219 |
|
220 |
src_install() { |
221 |
# install headers via make since we want them in a single directory |
222 |
cd "${S}/source/" |
223 |
einfo "Installing Geant4 headers" |
224 |
emake includes || die 'Installing headers failed' |
225 |
cd "${S}" |
226 |
|
227 |
# but install libraries and Geant library tool manually |
228 |
einfo "Installing Geant4 libraries" |
229 |
insinto ${GEANT4_LIBDIR} |
230 |
doins tmp/*.so || die |
231 |
doins tmp/libname.map || die |
232 |
if use static; then |
233 |
doins tmp/*.a || die |
234 |
fi |
235 |
exeinto ${GEANT4_LIBDIR} |
236 |
doexe tmp/liblist || die |
237 |
|
238 |
g4_create_env_script |
239 |
|
240 |
# configs |
241 |
insinto ${GEANT4_DIR} |
242 |
doins -r config || die |
243 |
|
244 |
# install data |
245 |
if use data; then |
246 |
einfo "Installing Geant4 data" |
247 |
insinto ${G4DATA} |
248 |
pushd "${WORKDIR}" > /dev/null |
249 |
for d in ${GEANT4_DATA}; do |
250 |
local p=${d/.} |
251 |
doins -r *${p/G4} || die "installing data ${d} failed" |
252 |
done |
253 |
popd > /dev/null |
254 |
fi |
255 |
|
256 |
# doc and examples |
257 |
insinto /usr/share/doc/${PF} |
258 |
local mypv="${PV1}.${PV2}.${PV3}" |
259 |
doins ReleaseNotes/ReleaseNotes${mypv}.html |
260 |
[[ -e ReleaseNotes/Patch${mypv}-1.txt ]] && \ |
261 |
dodoc ReleaseNotes/Patch${mypv}-*.txt |
262 |
|
263 |
use examples && doins -r examples |
264 |
|
265 |
# TODO: g4py will probably need a split ebuild since it seems to |
266 |
# rely on on geant4 existence. |
267 |
# TODO: momo with momo or java flag, and check java stuff |
268 |
} |
269 |
|
270 |
pkg_postinst() { |
271 |
elog "Geant4 projects are by default build in \$HOME/geant4." |
272 |
elog "If you want to change, set \$G4WORKDIR to another directory." |
273 |
} |