ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/root.spec
Revision: 1.225
Committed: Sat Dec 18 07:13:14 2010 UTC (14 years, 4 months ago) by elmer
Branch: MAIN
Changes since 1.224: +2 -0 lines
Log Message:
Apply root-5.27-06-fireworks10.patch

File Contents

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