ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/root.spec
Revision: 1.211
Committed: Thu Sep 30 13:09:49 2010 UTC (14 years, 6 months ago) by eulisse
Branch: MAIN
CVS Tags: azFor3100p3, CMSSW_3_10_0_pre2, smFor3100pre2, CMSSW_3_10_0_pre1, smFor3100pre1, CMSSW_3_9_0, apFor390v0, pe20101008b-for39Xrb, pe20101008a-for39Xrb, CMSSW_3_9_0_pre7, apFor390pre7v0, sm39Xtoolconf-101007, pe20101005a-for39Xrb, pe20101004a-for39Xrb, pe20101001b-for39Xrb, pe20101001a-for39Xrb, pe20100930c-for39Xrb, pe20100930b-for39Xrb, pe20100930a-for39Xrb
Changes since 1.210: +11 -4 lines
Log Message:
Misc fixes.

* Do not have castor & dcap as dependencies on a mac.
* Remove workaround of broken patch, since the patch should not be broken
  anymore.

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