ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/root.spec
Revision: 1.202
Committed: Wed Aug 11 13:03:12 2010 UTC (14 years, 8 months ago) by muzaffar
Branch: MAIN
CVS Tags: sm39XPoolLess, sm100823a, CMSSW_3_9_0_pre2, for390pre2, for390p2tools1, for390pre2tools
Changes since 1.201: +214 -5 lines
Log Message:
added fix-python-shebang and RootsysOnMac root patches on top of 390pre1 tag

File Contents

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