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