ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/root.spec
Revision: 1.173
Committed: Tue Jul 7 19:06:50 2009 UTC (15 years, 9 months ago) by dlange
Branch: MAIN
CVS Tags: apFor320v0, sm090708e, sm090708d, CMSSW_3_1_1, dl090707
Changes since 1.172: +7 -5 lines
Log Message:
restore head

File Contents

# User Rev Content
1 elmer 1.144 ### RPM lcg root 5.22.00a
2 dlange 1.57 ## INITENV +PATH PYTHONPATH %i/lib/python
3     ## INITENV SET ROOTSYS %i
4 ratnik 1.106 #Source: cvs://:pserver:cvs@root.cern.ch:2401/user/cvs?passwd=Ah<Z&tag=-rv%(echo %realversion | tr . -)&module=root&output=/%{n}_v%{realversion}.source.tar.gz
5 elmer 1.144 Source: ftp://root.cern.ch/%n/%{n}_v%{realversion}.source.tar.gz
6 muzaffar 1.165 %define closingbrace )
7     %define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo flase;; esac)
8 elmer 1.96
9 elmer 1.155 Patch0: root-5.18-00-libpng
10 elmer 1.141 Patch1: root-5.21-04-CINT-maxlongline
11     Patch2: root-5.22-00-TMVA-shut-the-hell-up-for-once
12 elmer 1.148 Patch3: root-5.22-00a-TMVA-shut-the-hell-up-again
13     Patch4: root-5.22-00a-CINTFunctional
14 elmer 1.149 Patch5: root-5.22-00a-TClass
15 elmer 1.150 Patch6: root-5.22-00a-fireworks-graf3d-gui
16 dlange 1.151 Patch7: root-5.22-00a-Reflex-Class
17 dlange 1.152 Patch8: root-5.22-00a-Cintex
18     Patch9: root-5.22-00a-roofit-silence-static-printout
19 elmer 1.155 Patch10: root-5.22-00a-TMVA-just-shut-the-hell-up
20 dlange 1.156 Patch11: root-5.22-00a-th1
21     Patch12: root-5.22-00a-smatrix
22     Patch13: root-5.22-00a-fireworks1
23 dlange 1.157 Patch14: root-5.22-00a-Reflex-gendict_selclass
24     Patch15: root-5.22-00a-MatrixInversion
25 elmer 1.159 Patch16: root-5.22-00a-gcc44
26 dlange 1.160 Patch17: root-5.22-00a-fireworks2
27     Patch18: root-5.22-00a-fireworks3
28     Patch19: root-5.22-00a-TBranchElement
29 dlange 1.162 Patch20: root-5.22-00a-tmplt
30     Patch21: root-5.22-00a-TBranchElement_TStreamerInfo
31 elmer 1.167 Patch22: root-5.22-00a-gcc43-array-bounds-dictionary-workaround
32 dlange 1.173 Patch23: root-5.22-00a-CINT-dict-init-speedup
33     Patch24: root-5.22-00a-fireworks4
34 elmer 1.98
35     %define cpu %(echo %cmsplatf | cut -d_ -f2)
36     %define pythonv %(echo $PYTHON_VERSION | cut -d. -f1,2)
37    
38 ratnik 1.106 Requires: gccxml gsl castor libjpg dcap pcre python
39 dlange 1.103
40 muzaffar 1.164 %if "%online" != "true"
41 elmer 1.145 Requires: qt openssl mysql libpng zlib libungif xrootd
42 dlange 1.103 %else
43     %define skiplibtiff true
44     %endif
45    
46     %if "%cpu" == "amd64"
47     %define skiplibtiff true
48     %endif
49    
50     %if "%skiplibtiff" != "true"
51 elmer 1.98 Requires: libtiff
52     %endif
53 eulisse 1.25
54 eulisse 1.1 %prep
55     %setup -n root
56 ratnik 1.106 %patch0 -p1
57     %patch1 -p1
58 elmer 1.141 %patch2 -p1
59 elmer 1.148 %patch3 -p1
60     %patch4 -p1
61 elmer 1.149 %patch5 -p1
62 elmer 1.150 %patch6 -p1
63 dlange 1.154 %patch7 -p0
64     %patch8 -p0
65     %patch9 -p1
66 elmer 1.155 %patch10 -p1
67 dlange 1.156 %patch11 -p1
68     %patch12 -p1
69     %patch13 -p1
70 dlange 1.157 %patch14 -p0
71     %patch15 -p0
72 elmer 1.167 # patch16 is compiler version dependent, see below
73 dlange 1.160 %patch17 -p1
74     %patch18 -p1
75     %patch19 -p0
76 dlange 1.162 %patch20 -p0
77     %patch21 -p0
78 dlange 1.161 # work around patch issue...
79     rm graf3d/gl/src/gl2ps.c
80 elmer 1.167 # patch22 is compiler version dependent, see below
81 dlange 1.173 # patch23 is (for now) only applied for gcc4.3, see below
82     # doesn't work at the moment %patch24 -p1
83 dlange 1.160
84 elmer 1.159 case %gccver in
85 dlange 1.173 4.3.*)
86 elmer 1.167 %patch22 -p1
87 dlange 1.173 %patch23 -p1
88 elmer 1.168 ;;
89 dlange 1.173 4.4.*)
90 elmer 1.159 %patch16 -p1
91     ;;
92     esac
93 dlange 1.157
94 eulisse 1.1 %build
95 andreasp 1.163
96 eulisse 1.1 mkdir -p %i
97 elmer 1.14 export ROOTSYS=%_builddir/root
98 dlange 1.103
99 muzaffar 1.164 %if "%online" == "true"
100 ratnik 1.111 # Build without mysql, and use system qt.
101     # Also skip xrootd and odbc for online case:
102    
103 muzaffar 1.164 EXTRA_CONFIG_ARGS="--with-f77=/usr
104 ratnik 1.111 --disable-mysql
105     --disable-xrootd
106     --disable-odbc
107 muzaffar 1.164 --disable-qt --disable-qtgsi"
108 dlange 1.103 %else
109 muzaffar 1.164 EXTRA_CONFIG_ARGS="--with-f77=${GCC_ROOT}
110 elmer 1.145 --with-xrootd=$XROOTD_ROOT
111 ratnik 1.106 --enable-mysql --with-mysql-libdir=${MYSQL_ROOT}/lib --with-mysql-incdir=${MYSQL_ROOT}/include
112     --enable-qt --with-qt-libdir=${QT_ROOT}/lib --with-qt-incdir=${QT_ROOT}/include
113     --with-ssl-incdir=${OPENSSL_ROOT}/include
114 muzaffar 1.164 --with-ssl-libdir=${OPENSSL_ROOT}/lib
115     --enable-qtgsi"
116 dlange 1.103 %endif
117    
118 muzaffar 1.164 CONFIG_ARGS="--enable-table
119 eulisse 1.20 --disable-builtin-pcre
120     --disable-builtin-freetype
121     --disable-builtin-zlib
122 elmer 1.98 --with-gccxml=${GCCXML_ROOT}
123 ratnik 1.79 --enable-python --with-python-libdir=${PYTHON_ROOT}/lib --with-python-incdir=${PYTHON_ROOT}/include/python2.4
124 eulisse 1.2 --enable-explicitlink
125 eulisse 1.20 --enable-mathmore
126 eulisse 1.2 --enable-reflex
127     --enable-cintex
128     --enable-minuit2
129 eulisse 1.7 --enable-roofit
130 elmer 1.98 --disable-ldap
131 gowdy 1.143 --disable-krb5
132 eulisse 1.34 --with-gsl-incdir=${GSL_ROOT}/include
133     --with-gsl-libdir=${GSL_ROOT}/lib
134 elmer 1.59 --with-dcap-libdir=${DCAP_ROOT}/lib
135 elmer 1.98 --with-dcap-incdir=${DCAP_ROOT}/include
136     --disable-pgsql
137 dlange 1.103 --disable-xml ${EXTRA_CONFIG_ARGS}"
138 elmer 1.98
139 elmer 1.141 #case %gccver in
140     # 4.*)
141     # CONFIG_ARGS="$CONFIG_ARGS --disable-cern"
142     # ;;
143     #esac
144 elmer 1.84
145 elmer 1.54 case $(uname)-$(uname -p) in
146 eulisse 1.2 Linux-x86_64)
147 elmer 1.141 ./configure linuxx8664gcc $CONFIG_ARGS --with-shift-libdir=${CASTOR_ROOT}/lib --with-shift-incdir=${CASTOR_ROOT}/include/shift --disable-astiff;;
148 elmer 1.54 Linux-i*86)
149 dlange 1.110 ./configure linux $CONFIG_ARGS --with-shift-libdir=${CASTOR_ROOT}/lib --with-shift-incdir=${CASTOR_ROOT}/include/shift;;
150 elmer 1.11 Darwin*)
151 andreasp 1.163 ./configure macosx $CONFIG_ARGS --disable-rfio --disable-builtin_afterimage ;;
152 elmer 1.54 Linux-ppc64*)
153 elmer 1.98 ./configure linux $CONFIG_ARGS --disable-rfio;;
154 eulisse 1.1 esac
155 eulisse 1.2
156 eulisse 1.147 case %cmsplatf in
157     osx*)
158     makeopts=
159     ;;
160     *)
161     makeopts="%makeprocesses"
162     ;;
163     esac
164    
165     make $makeopts
166 eulisse 1.20 make cintdlls
167 eulisse 1.147
168 eulisse 1.1 %install
169     # Override installers if we are using GNU fileutils cp. On OS X
170     # ROOT's INSTALL is defined to "cp -pPR", which only works with
171     # the system cp (/bin/cp). If you have fileutils on fink, you
172     # lose. Check which one is getting picked up and select syntax
173     # accordingly. (FIXME: do we need to check that -P is accepted?)
174     if (cp --help | grep -e '-P.*--parents') >/dev/null 2>&1; then
175     cp="cp -dpR"
176     else
177     cp="cp -pPR"
178     fi
179    
180 dlange 1.57 export ROOTSYS=%i
181 eulisse 1.5 make INSTALL="$cp" INSTALLDATA="$cp" install
182 dlange 1.57 mkdir -p $ROOTSYS/lib/python
183 elmer 1.141 cp -r cint/reflex/python/genreflex $ROOTSYS/lib/python
184 eulisse 1.35 #
185 elmer 1.98
186     # SCRAM ToolBox toolfile
187     mkdir -p %i/etc/scram.d
188     # rootcore toolfile
189     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootcore
190     <doc type=BuildSystem::ToolDoc version=1.0>
191     <Tool name=rootcore version=%v>
192     <info url="http://root.cern.ch/root/"></info>
193 muzaffar 1.153 <lib name=Tree>
194     <lib name=Net>
195     <lib name=Thread>
196     <lib name=MathCore>
197     <lib name=RIO>
198     <lib name=Core>
199 elmer 1.98 <lib name=Cint>
200     <Client>
201     <Environment name=ROOTCORE_BASE default="%i"></Environment>
202     <Environment name=LIBDIR default="$ROOTCORE_BASE/lib"></Environment>
203     <Environment name=INCLUDE default="$ROOTCORE_BASE/include"></Environment>
204     <Environment name=INCLUDE default="$ROOTCORE_BASE/cint"></Environment>
205     </Client>
206     <use name=sockets>
207     <use name=pcre>
208     <use name=zlib>
209     <Runtime name=PATH value="$ROOTCORE_BASE/bin" type=path>
210     <Runtime name=ROOTSYS value="$ROOTCORE_BASE/">
211     <Runtime name=PYTHONPATH value="$ROOTCORE_BASE/lib" type=path>
212     </Tool>
213     EOF_TOOLFILE
214    
215 elmer 1.121 # root toolfile, alias for rootphysics. Using rootphysics is preferred.
216 elmer 1.98 cat << \EOF_TOOLFILE >%i/etc/scram.d/root
217     <doc type=BuildSystem::ToolDoc version=1.0>
218     <Tool name=root version=%v>
219     <info url="http://root.cern.ch/root/"></info>
220 elmer 1.121 <use name=rootphysics>
221     </Tool>
222     EOF_TOOLFILE
223    
224     # roothistmatrix toolfile
225     cat << \EOF_TOOLFILE >%i/etc/scram.d/roothistmatrix
226     <doc type=BuildSystem::ToolDoc version=1.0>
227     <Tool name=roothistmatrix version=%v>
228     <info url="http://root.cern.ch/root/"></info>
229 elmer 1.98 <lib name=Hist>
230     <lib name=Matrix>
231 elmer 1.121 <use name=ROOTCore>
232     </Tool>
233     EOF_TOOLFILE
234    
235 muzaffar 1.158 # rootgpad toolfile
236     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootgpad
237     <doc type=BuildSystem::ToolDoc version=1.0>
238     <Tool name=rootgpad version=%v>
239     <info url="http://root.cern.ch/root/"></info>
240     <lib name=Gpad>
241     <lib name=Graf>
242     <use name=roothistmatrix>
243     </Tool>
244     EOF_TOOLFILE
245    
246 elmer 1.121 # rootphysics toolfile
247     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootphysics
248     <doc type=BuildSystem::ToolDoc version=1.0>
249     <Tool name=rootphysics version=%v>
250     <info url="http://root.cern.ch/root/"></info>
251 elmer 1.98 <lib name=Physics>
252 elmer 1.121 <use name=roothistmatrix>
253 elmer 1.98 </Tool>
254     EOF_TOOLFILE
255    
256 elmer 1.121 # rootgraphics toolfile, identical to old "root" toolfile
257     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootgraphics
258 elmer 1.120 <doc type=BuildSystem::ToolDoc version=1.0>
259 elmer 1.121 <Tool name=rootgraphics version=%v>
260 elmer 1.120 <info url="http://root.cern.ch/root/"></info>
261 elmer 1.121 <lib name=TreePlayer>
262     <lib name=Graf3d>
263     <lib name=Postscript>
264 muzaffar 1.158 <use name=rootgpad>
265 elmer 1.120 </Tool>
266     EOF_TOOLFILE
267    
268 elmer 1.98 # rootcintex toolfile
269     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootcintex
270     <doc type=BuildSystem::ToolDoc version=1.0>
271     <Tool name=rootcintex version=%v>
272     <info url="http://root.cern.ch/root/"></info>
273     <lib name=Cintex>
274     <use name=ROOTRflx>
275     <use name=ROOTCore>
276     </Tool>
277     EOF_TOOLFILE
278    
279 elmer 1.146 # (temporarily eviscerated) rootinteractive toolfile (GQt/qt lib dependencies
280     # have been removed for the moment)
281 elmer 1.98 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootinteractive
282     <doc type=BuildSystem::ToolDoc version=1.0>
283     <Tool name=rootinteractive version=%v>
284     <info url="http://root.cern.ch/root/"></info>
285     <lib name=Rint>
286 dlange 1.154 <lib name=GQt>
287     <lib name=Gui>
288     <use name=qt>
289 elmer 1.146 <use name=libjpg>
290     <use name=libpng>
291 muzaffar 1.158 <use name=rootgpad>
292 elmer 1.146 </Tool>
293     EOF_TOOLFILE
294    
295 elmer 1.98 # rootmath toolfile
296     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootmath
297     <doc type=BuildSystem::ToolDoc version=1.0>
298     <Tool name=rootmath version=%v>
299     <info url="http://root.cern.ch/root/"></info>
300 muzaffar 1.153 <lib name=GenVector>
301 elmer 1.98 <lib name=MathMore>
302     <use name=ROOTCore>
303     <use name=gsl>
304     </Tool>
305     EOF_TOOLFILE
306    
307     # rootminuit toolfile
308     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootminuit
309     <doc type=BuildSystem::ToolDoc version=1.0>
310     <Tool name=rootminuit version=%v>
311     <info url="http://root.cern.ch/root/"></info>
312     <lib name=Minuit>
313 muzaffar 1.158 <use name=rootgpad>
314 elmer 1.98 </Tool>
315     EOF_TOOLFILE
316    
317     # rootminuit2 toolfile
318     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootminuit2
319     <doc type=BuildSystem::ToolDoc version=1.0>
320     <Tool name=rootminuit2 version=%v>
321     <info url="http://root.cern.ch/root/"></info>
322     <lib name=Minuit2>
323 muzaffar 1.158 <use name=rootgpad>
324 elmer 1.98 </Tool>
325     EOF_TOOLFILE
326    
327     # rootrflx toolfile
328     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootrflx
329     <doc type=BuildSystem::ToolDoc version=1.0>
330     <Tool name=rootrflx version=%v>
331     <info url="http://root.cern.ch/root/"></info>
332     <lib name=Reflex>
333     <Client>
334     <Environment name=ROOTRFLX_BASE default="%i"></Environment>
335     <Environment name=LIBDIR default="$ROOTRFLX_BASE/lib"></Environment>
336     <Environment name=INCLUDE default="$ROOTRFLX_BASE/include"></Environment>
337     </Client>
338     <use name=sockets>
339     <use name=gccxml>
340     <Runtime name=PATH value="$ROOTRFLX_BASE/bin" type=path>
341     <Runtime name=ROOTSYS value="$ROOTRFLX_BASE/">
342     <Runtime name=GENREFLEX value="$ROOTRFLX_BASE/bin/genreflex">
343     </Tool>
344     EOF_TOOLFILE
345    
346     # roothtml toolfile
347     cat << \EOF_TOOLFILE >%i/etc/scram.d/roothtml
348     <doc type=BuildSystem::ToolDoc version=1.0>
349     <Tool name=roothtml version=%v>
350     <info url="http://root.cern.ch/root/"></info>
351     <lib name=Html>
352 muzaffar 1.158 <use name=rootgpad>
353 elmer 1.98 </Tool>
354     EOF_TOOLFILE
355    
356     # rootroofit toolfile
357     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootroofit
358     <doc type=BuildSystem::ToolDoc version=1.0>
359     <Tool name=rootroofit version=%v>
360     <info url="http://root.cern.ch/root/"></info>
361 muzaffar 1.153 <lib name=RooFit>
362 ratnik 1.106 <lib name=RooFitCore>
363 elmer 1.98 <use name=ROOTMinuit>
364     </Tool>
365     EOF_TOOLFILE
366    
367     # rootmlp toolfile
368     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootmlp
369     <doc type=BuildSystem::ToolDoc version=1.0>
370     <Tool name=rootmlp version=%v>
371     <info url="http://root.cern.ch/root/"></info>
372     <lib name=MLP>
373 muzaffar 1.153 <use name=RootGraphics>
374 elmer 1.98 </Tool>
375     EOF_TOOLFILE
376    
377     # roottmva toolfile
378     cat << \EOF_TOOLFILE >%i/etc/scram.d/roottmva
379     <doc type=BuildSystem::ToolDoc version=1.0>
380     <Tool name=roottmva version=%v>
381     <info url="http://root.cern.ch/root/"></info>
382     <lib name=TMVA>
383     <use name=ROOTMLP>
384 muzaffar 1.158 <use name=rootminuit>
385 elmer 1.98 </Tool>
386     EOF_TOOLFILE
387    
388     # rootthread toolfile
389     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootthread
390     <doc type=BuildSystem::ToolDoc version=1.0>
391     <Tool name=rootthread version=%v>
392     <info url="http://root.cern.ch/root/"></info>
393     <use name=ROOTCore>
394     </Tool>
395     EOF_TOOLFILE
396    
397     %post
398     %{relocateConfig}etc/scram.d/root
399     %{relocateConfig}etc/scram.d/rootcore
400 elmer 1.120 %{relocateConfig}etc/scram.d/roothistmatrix
401 elmer 1.121 %{relocateConfig}etc/scram.d/rootphysics
402     %{relocateConfig}etc/scram.d/rootgraphics
403 elmer 1.98 %{relocateConfig}etc/scram.d/rootcintex
404     %{relocateConfig}etc/scram.d/rootinteractive
405     %{relocateConfig}etc/scram.d/rootmath
406     %{relocateConfig}etc/scram.d/rootminuit
407     %{relocateConfig}etc/scram.d/rootminuit2
408     %{relocateConfig}etc/scram.d/rootrflx
409     %{relocateConfig}etc/scram.d/roothtml
410     %{relocateConfig}etc/scram.d/rootroofit
411     %{relocateConfig}etc/scram.d/rootmlp
412     %{relocateConfig}etc/scram.d/roottmva
413     %{relocateConfig}etc/scram.d/rootthread