ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/root.spec
Revision: 1.207
Committed: Wed Sep 1 10:50:53 2010 UTC (14 years, 8 months ago) by elmer
Branch: MAIN
Changes since 1.206: +4 -1 lines
Log Message:
  Version of ROOT 5.22/00d spec (with tool files generation) which adds
  also the fftw3 dependency in order to build also the libFFTW.so library.
  (It still does not appear in any tool file, however.)

File Contents

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