ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/root.spec
Revision: 1.226
Committed: Sat Dec 18 09:16:50 2010 UTC (14 years, 4 months ago) by muzaffar
Branch: MAIN
CVS Tags: CMSSW_3_10_1, smFor3101, sm110117, fwFor3100xdaq11b4online, CMSSW_3_11_0_pre3, smFor3110pre3a, smFor3110pre3, pe20101230-311XAB, CMSSW_3_11_0_pre2, pe20101229-for311X, fwFor311pre2, CMSSW_3_10_0, smFor3100c, smFor3100b, smFor3100a, smFor3100
Changes since 1.225: +92 -33 lines
Log Message:
applied fireworks10 patch for 5.22.00d

File Contents

# User Rev Content
1 muzaffar 1.226 ### RPM lcg root 5.22.00d
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 muzaffar 1.226 %define ismac %(case %cmsplatf in osx*%closingbrace echo true;; *%closingbrace echo false;; esac)
9 elmer 1.96
10 muzaffar 1.226 Patch0: root-5.22-00d-externals
11     Patch1: root-5.22-00d-CINT-maxlongline-maxtypedef
12     Patch2: root-5.22-00-TMVA-shut-the-hell-up-for-once
13     Patch3: root-5.22-00a-TMVA-shut-the-hell-up-again
14     Patch4: root-5.22-00d-fireworks-graf3d-gui
15     Patch5: root-5.22-00a-roofit-silence-static-printout
16     Patch6: root-5.22-00a-TMVA-just-shut-the-hell-up
17     Patch7: root-5.22-00a-th1
18     Patch8: root-5.22-00d-makelib-ldl
19     Patch9: root-5.22-00a-fireworks1
20     Patch10: root-5.22-00a-gcc44
21     Patch11: root-5.22-00a-fireworks2
22     Patch12: root-5.22-00a-fireworks3
23     Patch13: root-5.22-00a-gcc43-array-bounds-dictionary-workaround
24     Patch14: root-5.22-00a-fireworks4
25     Patch15: root-5.22-00d-fireworks5
26     Patch16: root-5.22-00d-genreflex_python26_popen3
27     Patch17: root-5.22-00d-fireworks6
28     Patch18: root-5.22-00d-linker-gnu-hash-style
29     Patch19: root-5.22-00d-TFile-version3-Init
30     Patch20: root-5.22-00d-cint-namespace
31     Patch21: root-5.22-00d-fireworks7
32     Patch22: root-5.22-00d-TMath-Vavilov
33     Patch23: root-5.22-00d-TBranchElement-dropped-data-member
34     Patch24: root-5.22-00d-fireworks8
35     Patch25: root-5.22-00d-fix-python-shebang
36     Patch26: root-5.22-00d-RootsysOnMac
37     Patch27: root-5.22-00d-TString-Clear
38     Patch28: root-5.22-00d-libgfortran-dylib-detection
39     Patch29: root-5.22-00d-cint-dll-correct-install-name
40     Patch30: root-5.22-00d-fireworks9
41     Patch31: root-5.22-00d-async-readbuffers
42     Patch32: root-5.22-00d-fireworks10
43 elmer 1.98
44     %define cpu %(echo %cmsplatf | cut -d_ -f2)
45    
46 muzaffar 1.226 Requires: gccxml gsl libjpg pcre python fftw3
47    
48     %if "%ismac" == "false"
49     Requires: castor dcap
50     %endif
51    
52     %if "%online-%ismac" == "false-true"
53     Requires: openssl libpng zlib libungif libtiff gfortran-macosx
54     %endif
55    
56     %if "%online-%ismac" == "false-false"
57     Requires: qt openssl libpng zlib libungif xrootd libtiff
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 muzaffar 1.226 %patch3 -p1
66 elmer 1.205 %patch4 -p1
67 muzaffar 1.226
68 elmer 1.149 %patch5 -p1
69 gowdy 1.219 %patch6 -p1
70     %patch7 -p1
71     %patch8 -p1
72     %patch9 -p1
73 muzaffar 1.226
74     # patch10 is compiler version dependent, see below
75 gowdy 1.219 %patch11 -p1
76 elmer 1.222 %patch12 -p1
77 muzaffar 1.226 # patch13 is compiler version dependent, see below
78    
79     # work around patch issue...
80     rm graf3d/gl/src/gl2ps.c
81 elmer 1.223 %patch14 -p1
82 muzaffar 1.226 #work around patch issues in patch14(?)
83     rm graf3d/eve/inc/TEveLegoOverlay.h.orig
84     rm graf3d/eve/src/TEveLegoOverlay.cxx
85 elmer 1.223 %patch15 -p1
86 elmer 1.225 %patch16 -p1
87 muzaffar 1.226 %patch17 -p1
88     %patch19 -p1
89     %patch20 -p1
90     %patch21 -p1
91     %patch22 -p1
92     %patch23 -p1
93     %patch24 -p1
94     %patch25 -p1
95     %patch26 -p1
96     %patch27 -p1
97     %patch28 -p2
98     %patch29 -p1
99     %patch30 -p1
100     %patch31 -p1
101     %patch32 -p1
102 elmer 1.204
103 muzaffar 1.226 case %gccver in
104     4.3.*)
105     %patch13 -p1
106     ;;
107     4.4.*)
108     %patch10 -p1
109     ;;
110     esac
111    
112     # The following patch can only be applied on SLC5 or later (extra linker
113 elmer 1.198 # options only available with the SLC5 binutils)
114     case %cmsplatf in
115     slc5_* | slc5onl_* )
116 muzaffar 1.226 %patch18 -p1
117 elmer 1.198 ;;
118     esac
119 eulisse 1.190
120 eulisse 1.1 %build
121 andreasp 1.163
122 eulisse 1.1 mkdir -p %i
123 elmer 1.221 export LIBJPG_ROOT
124 elmer 1.14 export ROOTSYS=%_builddir/root
125 elmer 1.180 export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)
126 dlange 1.103
127 muzaffar 1.164 %if "%online" == "true"
128 elmer 1.181 # Use system qt. Also skip xrootd and odbc for online case:
129 ratnik 1.111
130 muzaffar 1.164 EXTRA_CONFIG_ARGS="--with-f77=/usr
131 muzaffar 1.226 --disable-xrootd
132 ratnik 1.111 --disable-odbc
133 muzaffar 1.226 --disable-qt --disable-qtgsi"
134 dlange 1.103 %else
135 elmer 1.221 export LIBPNG_ROOT ZLIB_ROOT LIBTIFF_ROOT LIBUNGIF_ROOT
136 muzaffar 1.164 EXTRA_CONFIG_ARGS="--with-f77=${GCC_ROOT}
137 muzaffar 1.226 --with-xrootd=$XROOTD_ROOT
138 ratnik 1.106 --enable-qt --with-qt-libdir=${QT_ROOT}/lib --with-qt-incdir=${QT_ROOT}/include
139     --with-ssl-incdir=${OPENSSL_ROOT}/include
140 muzaffar 1.164 --with-ssl-libdir=${OPENSSL_ROOT}/lib
141     --enable-qtgsi"
142 dlange 1.103 %endif
143    
144 muzaffar 1.164 CONFIG_ARGS="--enable-table
145 eulisse 1.20 --disable-builtin-pcre
146     --disable-builtin-freetype
147     --disable-builtin-zlib
148 elmer 1.98 --with-gccxml=${GCCXML_ROOT}
149 elmer 1.180 --enable-python --with-python-libdir=${PYTHON_ROOT}/lib --with-python-incdir=${PYTHON_ROOT}/include/python${PYTHONV}
150 eulisse 1.2 --enable-explicitlink
151 eulisse 1.20 --enable-mathmore
152 eulisse 1.2 --enable-reflex
153     --enable-cintex
154     --enable-minuit2
155 elmer 1.221 --enable-fftw3
156     --with-fftw3-incdir=${FFTW3_ROOT}/include
157     --with-fftw3-libdir=${FFTW3_ROOT}/lib
158 elmer 1.98 --disable-ldap
159 gowdy 1.143 --disable-krb5
160 eulisse 1.34 --with-gsl-incdir=${GSL_ROOT}/include
161     --with-gsl-libdir=${GSL_ROOT}/lib
162 elmer 1.59 --with-dcap-libdir=${DCAP_ROOT}/lib
163 elmer 1.98 --with-dcap-incdir=${DCAP_ROOT}/include
164     --disable-pgsql
165 elmer 1.181 --disable-mysql
166 elmer 1.187 --disable-xml ${EXTRA_CONFIG_ARGS}"
167 elmer 1.98
168 elmer 1.183 case $(uname)-$(uname -m) in
169 eulisse 1.2 Linux-x86_64)
170 muzaffar 1.226 ./configure linuxx8664gcc $CONFIG_ARGS --with-shift-libdir=${CASTOR_ROOT}/lib --with-shift-incdir=${CASTOR_ROOT}/include/shift --disable-astiff;;
171 elmer 1.54 Linux-i*86)
172 muzaffar 1.226 ./configure linux $CONFIG_ARGS --with-shift-libdir=${CASTOR_ROOT}/lib --with-shift-incdir=${CASTOR_ROOT}/include/shift;;
173 elmer 1.11 Darwin*)
174 elmer 1.198 case %cmsplatf in
175     *_ia32_* )
176     comparch=i386 ;;
177     *_amd64_* )
178     comparch=x86_64 ;;
179     * )
180     comparch=ppc ;;
181     esac
182     export CC="gcc -arch $comparch" CXX="g++ -arch $comparch"
183     ./configure macosx $CONFIG_ARGS --with-cc="$CC" --with-cxx="$CXX" --disable-rfio --disable-builtin_afterimage ;;
184 elmer 1.54 Linux-ppc64*)
185 elmer 1.98 ./configure linux $CONFIG_ARGS --disable-rfio;;
186 eulisse 1.1 esac
187 eulisse 1.2
188 eulisse 1.147 case %cmsplatf in
189     osx*)
190     makeopts=
191     ;;
192     *)
193     makeopts="%makeprocesses"
194     ;;
195     esac
196    
197     make $makeopts
198 eulisse 1.20 make cintdlls
199 eulisse 1.147
200 eulisse 1.1 %install
201     # Override installers if we are using GNU fileutils cp. On OS X
202     # ROOT's INSTALL is defined to "cp -pPR", which only works with
203     # the system cp (/bin/cp). If you have fileutils on fink, you
204     # lose. Check which one is getting picked up and select syntax
205     # accordingly. (FIXME: do we need to check that -P is accepted?)
206     if (cp --help | grep -e '-P.*--parents') >/dev/null 2>&1; then
207     cp="cp -dpR"
208     else
209     cp="cp -pPR"
210     fi
211    
212 dlange 1.57 export ROOTSYS=%i
213 eulisse 1.5 make INSTALL="$cp" INSTALLDATA="$cp" install
214 dlange 1.57 mkdir -p $ROOTSYS/lib/python
215 elmer 1.141 cp -r cint/reflex/python/genreflex $ROOTSYS/lib/python
216 muzaffar 1.226 #
217 elmer 1.204
218     # SCRAM ToolBox toolfile
219     mkdir -p %i/etc/scram.d
220     # rootcore toolfile
221     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootcore.xml
222     <tool name="rootcore" version="%v">
223     <info url="http://root.cern.ch/root/"/>
224     <lib name="Tree"/>
225     <lib name="Net"/>
226     <lib name="Thread"/>
227     <lib name="MathCore"/>
228     <lib name="RIO"/>
229     <lib name="Core"/>
230     <lib name="Cint"/>
231     <client>
232     <environment name="ROOTCORE_BASE" default="%i"/>
233     <environment name="LIBDIR" default="$ROOTCORE_BASE/lib"/>
234     <environment name="INCLUDE" default="$ROOTCORE_BASE/include"/>
235     <environment name="INCLUDE" default="$ROOTCORE_BASE/cint"/>
236     </client>
237     <runtime name="PATH" value="$ROOTCORE_BASE/bin" type="path"/>
238     <runtime name="ROOTSYS" value="$ROOTCORE_BASE/"/>
239     <runtime name="PYTHONPATH" value="$ROOTCORE_BASE/lib" type="path"/>
240     <use name="sockets"/>
241     <use name="pcre"/>
242     <use name="zlib"/>
243     </tool>
244     EOF_TOOLFILE
245    
246     # root toolfile, alias for rootphysics. Using rootphysics is preferred.
247     cat << \EOF_TOOLFILE >%i/etc/scram.d/root.xml
248     <tool name="root" version="%v">
249     <info url="http://root.cern.ch/root/"/>
250     <use name="rootphysics"/>
251     </tool>
252     EOF_TOOLFILE
253    
254     # roothistmatrix toolfile
255     cat << \EOF_TOOLFILE >%i/etc/scram.d/roothistmatrix.xml
256 muzaffar 1.226 <tool name="roothistmatrix" version="%v">
257 elmer 1.204 <info url="http://root.cern.ch/root/"/>
258     <lib name="Hist"/>
259     <lib name="Matrix"/>
260     <use name="ROOTCore"/>
261     </tool>
262     EOF_TOOLFILE
263    
264     # rootgpad toolfile
265     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootgpad.xml
266 muzaffar 1.226 <tool name="rootgpad" version="%v">
267 elmer 1.204 <info url="http://root.cern.ch/root/"/>
268     <lib name="Gpad"/>
269     <lib name="Graf"/>
270     <use name="roothistmatrix"/>
271     </tool>
272     EOF_TOOLFILE
273    
274     # rootphysics toolfile
275     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootphysics.xml
276     <tool name="rootphysics" version="%v">
277     <info url="http://root.cern.ch/root/"/>
278     <lib name="Physics"/>
279     <use name="roothistmatrix"/>
280     </tool>
281     EOF_TOOLFILE
282    
283     # rootgraphics toolfile, identical to old "root" toolfile
284     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootgraphics.xml
285     <tool name="rootgraphics" version="%v">
286     <info url="http://root.cern.ch/root/"/>
287     <lib name="TreePlayer"/>
288     <lib name="Graf3d"/>
289     <lib name="Postscript"/>
290     <use name="rootgpad"/>
291     </tool>
292     EOF_TOOLFILE
293    
294     # rootcintex toolfile
295     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootcintex.xml
296     <tool name="rootcintex" version="%v">
297     <info url="http://root.cern.ch/root/"/>
298     <lib name="Cintex"/>
299     <use name="ROOTRflx"/>
300     <use name="ROOTCore"/>
301     </tool>
302     EOF_TOOLFILE
303    
304     # rootinteractive toolfile (GQt/qt lib dependencies
305     # have been moved to rootqt.xml)
306     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootinteractive.xml
307     <tool name="rootinteractive" version="%v">
308     <info url="http://root.cern.ch/root/"/>
309     <lib name="Rint"/>
310     <lib name="Gui"/>
311     <use name="libjpg"/>
312     <use name="libpng"/>
313     <use name="rootgpad"/>
314     </tool>
315     EOF_TOOLFILE
316    
317     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootqt.xml
318     <tool name="rootqt" version="%v">
319     <info url="http://root.cern.ch/root/"/>
320     <lib name="GQt"/>
321     <use name="qt"/>
322     </tool>
323     EOF_TOOLFILE
324    
325     # rootmath toolfile
326     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootmath.xml
327     <tool name="rootmath" version="%v">
328     <info url="http://root.cern.ch/root/"/>
329     <lib name="GenVector"/>
330     <lib name="MathMore"/>
331     <use name="ROOTCore"/>
332     <use name="gsl"/>
333     </tool>
334     EOF_TOOLFILE
335    
336     # rootminuit toolfile
337     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootminuit.xml
338     <tool name="rootminuit" version="%v">
339     <info url="http://root.cern.ch/root/"/>
340     <lib name="Minuit"/>
341     <use name="rootgpad"/>
342     </tool>
343     EOF_TOOLFILE
344    
345     # rootminuit2 toolfile
346     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootminuit2.xml
347     <tool name="rootminuit2" version="%v">
348     <info url="http://root.cern.ch/root/"/>
349     <lib name="Minuit2"/>
350     <use name="rootgpad"/>
351     </tool>
352     EOF_TOOLFILE
353    
354     # rootrflx toolfile
355     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootrflx.xml
356     <tool name="rootrflx" version="%v">
357     <info url="http://root.cern.ch/root/"/>
358     <lib name="Reflex"/>
359     <client>
360     <environment name="ROOTRFLX_BASE" default="%i"/>
361     <environment name="LIBDIR" default="$ROOTRFLX_BASE/lib"/>
362     <environment name="INCLUDE" default="$ROOTRFLX_BASE/include"/>
363     </client>
364     <runtime name="PATH" value="$ROOTRFLX_BASE/bin" type="path"/>
365     <runtime name="ROOTSYS" value="$ROOTRFLX_BASE/"/>
366     <runtime name="GENREFLEX" value="$ROOTRFLX_BASE/bin/genreflex"/>
367     <use name="sockets"/>
368     <use name="gccxml"/>
369     </tool>
370     EOF_TOOLFILE
371    
372     # roothtml toolfile
373     cat << \EOF_TOOLFILE >%i/etc/scram.d/roothtml.xml
374     <tool name="roothtml" version="%v">
375     <info url="http://root.cern.ch/root/"/>
376     <lib name="Html"/>
377     <use name="rootgpad"/>
378     </tool>
379     EOF_TOOLFILE
380    
381     # rootmlp toolfile
382     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootmlp.xml
383     <tool name="rootmlp" version="%v">
384     <info url="http://root.cern.ch/root/"/>
385     <lib name="MLP"/>
386     <use name="RootGraphics"/>
387     </tool>
388     EOF_TOOLFILE
389    
390     # roottmva toolfile
391     cat << \EOF_TOOLFILE >%i/etc/scram.d/roottmva.xml
392     <tool name="roottmva" version="%v">
393     <info url="http://root.cern.ch/root/"/>
394     <lib name="TMVA"/>
395     <use name="ROOTMLP"/>
396     <use name="rootminuit"/>
397     </tool>
398     EOF_TOOLFILE
399    
400     # rootthread toolfile
401     cat << \EOF_TOOLFILE >%i/etc/scram.d/rootthread.xml
402     <tool name="rootthread" version="%v">
403     <info url="http://root.cern.ch/root/"/>
404     <use name="ROOTCore"/>
405     </tool>
406     EOF_TOOLFILE
407    
408     %post
409     perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $(find $RPM_INSTALL_PREFIX/%pkgrel/etc/scram.d -type f)