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