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