ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/root.spec
Revision: 1.244
Committed: Wed Feb 9 23:54:50 2011 UTC (14 years, 2 months ago) by elmer
Branch: MAIN
CVS Tags: pe20110210a-for4XY-ports, pe20110210a-for4XY
Changes since 1.243: +4 -0 lines
Log Message:
  Apply root-5.27-06b-r37210.patch and root-5.27-06b-r38023.patch

File Contents

# User Rev Content
1 fwyzard 1.235 ### RPM lcg root 5.27.06b
2 dlange 1.57 ## INITENV +PATH PYTHONPATH %i/lib/python
3 elmer 1.198 ## 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 elmer 1.179 %define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo false;; esac)
8 fwyzard 1.235 %define ismac %(case %cmsplatf in osx*%closingbrace echo true;; *%closingbrace e
9     cho false;; esac)
10 elmer 1.96
11 fwyzard 1.235 Patch0: root-5.27-06-externals
12     Patch1: root-5.27-04-CINT-maxlongline-maxtypedef
13     Patch2: root-5.22-00a-roofit-silence-static-printout
14     Patch3: root-5.22-00d-linker-gnu-hash-style
15     Patch4: root-5.22-00d-TBranchElement-dropped-data-member
16     Patch5: root-5.27-06-fireworks9
17     Patch6: root-5.27-06b-gdb-backtrace
18     Patch7: root-5.27-06-tmva-DecisionTreeNode
19     Patch8: root-5.27-06b-r36567
20     Patch9: root-5.27-06b-r36572
21     Patch10: root-5.27-06b-r36707
22     Patch11: root-5.27-06b-r36594
23     Patch12: root-5.27-06b-tmva-MethodBase-initvar
24 elmer 1.237 Patch13: root-5.27-06b-r37582-tmva
25     Patch14: root-5.27-06b-r37405
26     Patch15: root-5.27-06b-r37556
27     Patch16: root-5.27-06-fireworks10
28 elmer 1.238 Patch17: root-5.27-06-TTreeClonerTopLevel
29 elmer 1.239 Patch18: root-5.27-06b-r37947
30     Patch19: root-5.27-06b-TTreeCache-r37950-r37919-r37917-r37916-r37906
31 elmer 1.240 Patch20: root-5.27-06b-extra-math-for-roofit-5.28.00
32 elmer 1.241 Patch21: root-5.27-06b-TEfficiency-backport-from-5.28.00
33     Patch22: root-5.27-06b-histfactory-bits-from-5.28.00
34 elmer 1.244 Patch23: root-5.27-06b-r37210
35     Patch24: root-5.27-06b-r38023
36 elmer 1.239
37 elmer 1.98 %define cpu %(echo %cmsplatf | cut -d_ -f2)
38    
39 fwyzard 1.229 Requires: gccxml gsl libjpg libpng libtiff libungif pcre python fftw3
40 elmer 1.228
41 fwyzard 1.235 %if "%ismac" != "true"
42 elmer 1.228 Requires: castor dcap
43     %endif
44    
45 fwyzard 1.235 %if "%online" != "true"
46     Requires: openssl zlib xrootd
47 elmer 1.228 %endif
48    
49 fwyzard 1.235 %if "%ismac" == "true"
50     Requires: gfortran-macosx
51     %endif
52    
53     %if "%online" != "true"
54     %if "%ismac" != "true"
55     Requires: qt
56     %endif
57 elmer 1.98 %endif
58 eulisse 1.25
59 eulisse 1.1 %prep
60     %setup -n root
61 ratnik 1.106 %patch0 -p1
62     %patch1 -p1
63 elmer 1.205 %patch2 -p1
64 fwyzard 1.235 # patch3 is OS version dependent, see below
65 elmer 1.205 %patch4 -p1
66 elmer 1.149 %patch5 -p1
67 gowdy 1.219 %patch6 -p1
68     %patch7 -p1
69     %patch8 -p1
70     %patch9 -p1
71 fwyzard 1.235 %patch10 -p1
72 gowdy 1.219 %patch11 -p1
73 elmer 1.222 %patch12 -p1
74 elmer 1.228 %patch13 -p1
75 elmer 1.237 %patch14 -p1
76     %patch15 -p1
77     %patch16 -p1
78 elmer 1.238 %patch17 -p0
79 elmer 1.239 %patch18 -p1
80     %patch19 -p0
81 elmer 1.240 %patch20 -p1
82 elmer 1.241 %patch21 -p1
83     %patch22 -p1
84 elmer 1.244 %patch23 -p1
85     %patch24 -p1
86 elmer 1.228
87 fwyzard 1.235 # The following patch can only be applied on SLC5 or later (extra linker
88 elmer 1.198 # options only available with the SLC5 binutils)
89     case %cmsplatf in
90     slc5_* | slc5onl_* )
91 fwyzard 1.235 %patch3 -p1
92 elmer 1.198 ;;
93     esac
94 eulisse 1.190
95 fwyzard 1.235 # Delete these (irrelevant) files as the fits appear to confuse rpm on OSX
96     # (It tries to run install_name_tool on them.)
97     rm -fR tutorials/fitsio
98    
99 eulisse 1.1 %build
100 andreasp 1.163
101 eulisse 1.1 mkdir -p %i
102 elmer 1.221 export LIBJPG_ROOT
103 elmer 1.14 export ROOTSYS=%_builddir/root
104 elmer 1.180 export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)
105 dlange 1.103
106 muzaffar 1.164 %if "%online" == "true"
107 elmer 1.181 # Use system qt. Also skip xrootd and odbc for online case:
108 ratnik 1.111
109 muzaffar 1.164 EXTRA_CONFIG_ARGS="--with-f77=/usr
110 ratnik 1.111 --disable-odbc
111 fwyzard 1.235 --disable-qt --disable-qtgsi --disable-astiff"
112 dlange 1.103 %else
113 elmer 1.221 export LIBPNG_ROOT ZLIB_ROOT LIBTIFF_ROOT LIBUNGIF_ROOT
114 muzaffar 1.164 EXTRA_CONFIG_ARGS="--with-f77=${GCC_ROOT}
115 ratnik 1.106 --enable-qt --with-qt-libdir=${QT_ROOT}/lib --with-qt-incdir=${QT_ROOT}/include
116     --with-ssl-incdir=${OPENSSL_ROOT}/include
117 muzaffar 1.164 --with-ssl-libdir=${OPENSSL_ROOT}/lib
118     --enable-qtgsi"
119 dlange 1.103 %endif
120    
121 muzaffar 1.164 CONFIG_ARGS="--enable-table
122 eulisse 1.20 --disable-builtin-pcre
123     --disable-builtin-freetype
124     --disable-builtin-zlib
125 elmer 1.98 --with-gccxml=${GCCXML_ROOT}
126 elmer 1.180 --enable-python --with-python-libdir=${PYTHON_ROOT}/lib --with-python-incdir=${PYTHON_ROOT}/include/python${PYTHONV}
127 eulisse 1.2 --enable-explicitlink
128 eulisse 1.20 --enable-mathmore
129 eulisse 1.2 --enable-reflex
130     --enable-cintex
131     --enable-minuit2
132 elmer 1.221 --enable-fftw3
133     --with-fftw3-incdir=${FFTW3_ROOT}/include
134     --with-fftw3-libdir=${FFTW3_ROOT}/lib
135 elmer 1.98 --disable-ldap
136 gowdy 1.143 --disable-krb5
137 fwyzard 1.235 --with-xrootd=${XROOTD_ROOT}
138 eulisse 1.34 --with-gsl-incdir=${GSL_ROOT}/include
139     --with-gsl-libdir=${GSL_ROOT}/lib
140 elmer 1.59 --with-dcap-libdir=${DCAP_ROOT}/lib
141 elmer 1.98 --with-dcap-incdir=${DCAP_ROOT}/include
142     --disable-pgsql
143 elmer 1.181 --disable-mysql
144 elmer 1.242 --disable-oracle ${EXTRA_CONFIG_ARGS}"
145 elmer 1.98
146 eulisse 1.236 case %cmsos in
147     slc*_amd64)
148 fwyzard 1.235 ./configure linuxx8664gcc $CONFIG_ARGS --with-rfio-libdir=${CASTOR_ROOT}/lib --with-rfio-incdir=${CASTOR_ROOT}/include/shift --with-castor-libdir=${CASTOR_ROOT}/lib --with-castor-incdir=${CASTOR_ROOT}/include/shift ;;
149 eulisse 1.236 slc*_ia32)
150 fwyzard 1.235 ./configure linux $CONFIG_ARGS --with-rfio-libdir=${CASTOR_ROOT}/lib --with-rfio-incdir=${CASTOR_ROOT}/include/shift --with-castor-libdir=${CASTOR_ROOT}/lib --with-castor-incdir=${CASTOR_ROOT}/include/shift ;;
151 eulisse 1.236 osx*)
152 elmer 1.198 case %cmsplatf in
153     *_ia32_* )
154 fwyzard 1.235 comparch=i386
155     macconfig=macosx
156     ;;
157 elmer 1.198 *_amd64_* )
158 fwyzard 1.235 comparch=x86_64
159     macconfig=macosx64
160     ;;
161 elmer 1.198 * )
162 fwyzard 1.235 comparch=ppc
163     macconfig=macosx
164     ;;
165 elmer 1.198 esac
166 eulisse 1.236 export CC=`which gcc` CXX=`which g++`
167     ./configure $arch $CONFIG_ARGS --with-cc="$CC" --with-cxx="$CXX" --disable-rfio --disable-builtin_afterimage ;;
168     slc*_ppc64*)
169 elmer 1.98 ./configure linux $CONFIG_ARGS --disable-rfio;;
170 eulisse 1.1 esac
171 eulisse 1.2
172 elmer 1.243 makeopts="%makeprocesses"
173 eulisse 1.236
174     make $makeopts
175 eulisse 1.20 make cintdlls
176 eulisse 1.147
177 eulisse 1.1 %install
178     # Override installers if we are using GNU fileutils cp. On OS X
179     # ROOT's INSTALL is defined to "cp -pPR", which only works with
180     # the system cp (/bin/cp). If you have fileutils on fink, you
181     # lose. Check which one is getting picked up and select syntax
182     # accordingly. (FIXME: do we need to check that -P is accepted?)
183     if (cp --help | grep -e '-P.*--parents') >/dev/null 2>&1; then
184     cp="cp -dpR"
185     else
186     cp="cp -pPR"
187     fi
188    
189 dlange 1.57 export ROOTSYS=%i
190 eulisse 1.5 make INSTALL="$cp" INSTALLDATA="$cp" install
191 dlange 1.57 mkdir -p $ROOTSYS/lib/python
192 elmer 1.141 cp -r cint/reflex/python/genreflex $ROOTSYS/lib/python
193 eulisse 1.236 # This file confuses rpm's find-requires because it starts with
194     # a """ and it thinks is the shebang.
195     rm -f %i/tutorials/pyroot/mrt.py
196 elmer 1.204
197     # SCRAM ToolBox toolfile
198     mkdir -p %i/etc/scram.d
199     # rootcore toolfile
200     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootcore.xml
201     <tool name="rootcore" version="%v">
202     <info url="http://root.cern.ch/root/"/>
203     <lib name="Tree"/>
204     <lib name="Net"/>
205     <lib name="Thread"/>
206     <lib name="MathCore"/>
207     <lib name="RIO"/>
208     <lib name="Core"/>
209     <lib name="Cint"/>
210     <client>
211     <environment name="ROOTCORE_BASE" default="%i"/>
212     <environment name="LIBDIR" default="$ROOTCORE_BASE/lib"/>
213     <environment name="INCLUDE" default="$ROOTCORE_BASE/include"/>
214     <environment name="INCLUDE" default="$ROOTCORE_BASE/cint"/>
215     </client>
216     <runtime name="PATH" value="$ROOTCORE_BASE/bin" type="path"/>
217     <runtime name="ROOTSYS" value="$ROOTCORE_BASE/"/>
218     <runtime name="PYTHONPATH" value="$ROOTCORE_BASE/lib" type="path"/>
219     <use name="sockets"/>
220     <use name="pcre"/>
221     <use name="zlib"/>
222     </tool>
223     EOF_TOOLFILE
224    
225     # root toolfile, alias for rootphysics. Using rootphysics is preferred.
226     cat << \EOF_TOOLFILE >%i/etc/scram.d/root.xml
227     <tool name="root" version="%v">
228     <info url="http://root.cern.ch/root/"/>
229     <use name="rootphysics"/>
230     </tool>
231     EOF_TOOLFILE
232    
233     # roothistmatrix toolfile
234     cat << \EOF_TOOLFILE >%i/etc/scram.d/roothistmatrix.xml
235 fwyzard 1.235 <tool name="roothistmatrix" version="%v">
236 elmer 1.204 <info url="http://root.cern.ch/root/"/>
237     <lib name="Hist"/>
238     <lib name="Matrix"/>
239     <use name="ROOTCore"/>
240     </tool>
241     EOF_TOOLFILE
242    
243     # rootgpad toolfile
244     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootgpad.xml
245 fwyzard 1.235 <tool name="rootgpad" version="%v">
246 elmer 1.204 <info url="http://root.cern.ch/root/"/>
247     <lib name="Gpad"/>
248     <lib name="Graf"/>
249     <use name="roothistmatrix"/>
250     </tool>
251     EOF_TOOLFILE
252    
253     # rootphysics toolfile
254     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootphysics.xml
255     <tool name="rootphysics" version="%v">
256     <info url="http://root.cern.ch/root/"/>
257     <lib name="Physics"/>
258     <use name="roothistmatrix"/>
259     </tool>
260     EOF_TOOLFILE
261    
262     # rootgraphics toolfile, identical to old "root" toolfile
263     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootgraphics.xml
264     <tool name="rootgraphics" version="%v">
265     <info url="http://root.cern.ch/root/"/>
266     <lib name="TreePlayer"/>
267     <lib name="Graf3d"/>
268     <lib name="Postscript"/>
269     <use name="rootgpad"/>
270     </tool>
271     EOF_TOOLFILE
272    
273     # rootcintex toolfile
274     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootcintex.xml
275     <tool name="rootcintex" version="%v">
276     <info url="http://root.cern.ch/root/"/>
277     <lib name="Cintex"/>
278     <use name="ROOTRflx"/>
279     <use name="ROOTCore"/>
280     </tool>
281     EOF_TOOLFILE
282    
283     # rootinteractive toolfile (GQt/qt lib dependencies
284     # have been moved to rootqt.xml)
285     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootinteractive.xml
286     <tool name="rootinteractive" version="%v">
287     <info url="http://root.cern.ch/root/"/>
288     <lib name="Rint"/>
289     <lib name="Gui"/>
290     <use name="libjpg"/>
291     <use name="libpng"/>
292     <use name="rootgpad"/>
293     </tool>
294     EOF_TOOLFILE
295    
296     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootqt.xml
297     <tool name="rootqt" version="%v">
298     <info url="http://root.cern.ch/root/"/>
299     <lib name="GQt"/>
300     <use name="qt"/>
301     </tool>
302     EOF_TOOLFILE
303    
304     # rootmath toolfile
305     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootmath.xml
306     <tool name="rootmath" version="%v">
307     <info url="http://root.cern.ch/root/"/>
308     <lib name="GenVector"/>
309     <lib name="MathMore"/>
310     <use name="ROOTCore"/>
311     <use name="gsl"/>
312     </tool>
313     EOF_TOOLFILE
314    
315     # rootminuit toolfile
316     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootminuit.xml
317     <tool name="rootminuit" version="%v">
318     <info url="http://root.cern.ch/root/"/>
319     <lib name="Minuit"/>
320     <use name="rootgpad"/>
321     </tool>
322     EOF_TOOLFILE
323    
324     # rootminuit2 toolfile
325     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootminuit2.xml
326     <tool name="rootminuit2" version="%v">
327     <info url="http://root.cern.ch/root/"/>
328     <lib name="Minuit2"/>
329     <use name="rootgpad"/>
330     </tool>
331     EOF_TOOLFILE
332    
333     # rootrflx toolfile
334     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootrflx.xml
335     <tool name="rootrflx" version="%v">
336     <info url="http://root.cern.ch/root/"/>
337     <lib name="Reflex"/>
338     <client>
339     <environment name="ROOTRFLX_BASE" default="%i"/>
340     <environment name="LIBDIR" default="$ROOTRFLX_BASE/lib"/>
341     <environment name="INCLUDE" default="$ROOTRFLX_BASE/include"/>
342     </client>
343     <runtime name="PATH" value="$ROOTRFLX_BASE/bin" type="path"/>
344     <runtime name="ROOTSYS" value="$ROOTRFLX_BASE/"/>
345     <runtime name="GENREFLEX" value="$ROOTRFLX_BASE/bin/genreflex"/>
346     <use name="sockets"/>
347     <use name="gccxml"/>
348     </tool>
349     EOF_TOOLFILE
350    
351     # roothtml toolfile
352     cat << \EOF_TOOLFILE >%i/etc/scram.d/roothtml.xml
353     <tool name="roothtml" version="%v">
354     <info url="http://root.cern.ch/root/"/>
355     <lib name="Html"/>
356     <use name="rootgpad"/>
357     </tool>
358     EOF_TOOLFILE
359    
360     # rootmlp toolfile
361     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootmlp.xml
362     <tool name="rootmlp" version="%v">
363     <info url="http://root.cern.ch/root/"/>
364     <lib name="MLP"/>
365     <use name="RootGraphics"/>
366     </tool>
367     EOF_TOOLFILE
368    
369     # roottmva toolfile
370     cat << \EOF_TOOLFILE >%i/etc/scram.d/roottmva.xml
371     <tool name="roottmva" version="%v">
372     <info url="http://root.cern.ch/root/"/>
373     <lib name="TMVA"/>
374     <use name="ROOTMLP"/>
375     <use name="rootminuit"/>
376     </tool>
377     EOF_TOOLFILE
378    
379     # rootthread toolfile
380     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootthread.xml
381     <tool name="rootthread" version="%v">
382     <info url="http://root.cern.ch/root/"/>
383     <use name="ROOTCore"/>
384     </tool>
385     EOF_TOOLFILE
386    
387 elmer 1.242 # rootxml toolfile
388     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootxml.xml
389     <tool name="rootxml" version="%v">
390     <info url="http://root.cern.ch/root/"/>
391     <lib name="XMLParser"/>
392     <use name="ROOTCore"/>
393     </tool>
394     EOF_TOOLFILE
395    
396     # rootfoam toolfile
397     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootfoam.xml
398     <tool name="rootfoam" version="%v">
399     <info url="http://root.cern.ch/root/"/>
400     <lib name="Foam"/>
401     <use name="roothistmatrix"/>
402     </tool>
403     EOF_TOOLFILE
404    
405 elmer 1.204 %post
406     perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $(find $RPM_INSTALL_PREFIX/%pkgrel/etc/scram.d -type f)
407 fwyzard 1.235