ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/root.spec
(Generate patch)

Comparing COMP/CMSDIST/root.spec (file contents):
Revision 1.193 by elmer, Mon Mar 29 11:21:08 2010 UTC vs.
Revision 1.254 by elmer, Sun Mar 6 22:10:52 2011 UTC

# Line 1 | Line 1
1 < ### RPM lcg root 5.22.00d
1 > ### RPM lcg root 5.27.06b
2   ## INITENV +PATH PYTHONPATH %i/lib/python
3 < ## INITENV SET ROOTSYS %i
3 > ## INITENV SET ROOTSYS %i  
4   #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   Source: ftp://root.cern.ch/%n/%{n}_v%{realversion}.source.tar.gz
6   %define closingbrace )
7   %define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo false;; esac)
8 + %define ismac %(case %cmsplatf in osx*%closingbrace echo true;; *%closingbrace echo false;; esac)
9  
10 < Patch0:  root-5.18-00-libpng
11 < Patch1:  root-5.21-04-CINT-maxlongline
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 < # patch 8 was dropped
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 <
10 > Patch0: root-5.27-06-externals
11 > Patch1: root-5.27-04-CINT-maxlongline-maxtypedef
12 > Patch2: root-5.22-00a-roofit-silence-static-printout
13 > Patch3: root-5.22-00d-linker-gnu-hash-style
14 > Patch4: root-5.22-00d-TBranchElement-dropped-data-member
15 > Patch5: root-5.27-06-fireworks9
16 > Patch6: root-5.27-06b-gdb-backtrace
17 > Patch7: root-5.27-06-tmva-DecisionTreeNode
18 > Patch8: root-5.27-06b-r36567
19 > Patch9: root-5.27-06b-r36572
20 > Patch10: root-5.27-06b-r36707
21 > Patch11: root-5.27-06b-r36594
22 > Patch12: root-5.27-06b-tmva-MethodBase-initvar
23 > Patch13: root-5.27-06b-r37582-tmva
24 > Patch14: root-5.27-06b-r37405
25 > Patch15: root-5.27-06b-r37556
26 > Patch16: root-5.27-06-fireworks10
27 > Patch17: root-5.27-06-TTreeClonerTopLevel
28 > Patch18: root-5.27-06b-r37947
29 > Patch19: root-5.27-06b-TTreeCache-r37950-r37919-r37917-r37916-r37906
30 > Patch20: root-5.27-06b-extra-math-for-roofit-5.28.00
31 > Patch21: root-5.27-06b-TEfficiency-backport-from-5.28.00
32 > Patch22: root-5.27-06b-histfactory-bits-from-5.28.00
33 > Patch23: root-5.27-06b-r37210
34 > Patch24: root-5.27-06b-r38023
35 > Patch25: root-5.27-06b-r36708
36 > Patch26: root-5.27-06b-r38126-r38156
37 > Patch27: root-5.27-06b-r38210
38 > Patch28: root-5.27-06b-r38248-r38252-r38259-r38264-r38265-r38267
39 > Patch29: root-5.27-06b-gcc46
40 >
41   %define cpu %(echo %cmsplatf | cut -d_ -f2)
42  
43 < Requires: gccxml gsl castor libjpg dcap pcre python
43 > Requires: gccxml gsl libjpg libpng libtiff libungif pcre python fftw3
44 >
45 > %if "%ismac" != "true"
46 > Requires: castor dcap
47 > %endif
48  
49   %if "%online" != "true"
50 < Requires: qt openssl libpng zlib libungif xrootd
38 < %else
39 < %define skiplibtiff true
50 > Requires: openssl zlib xrootd
51   %endif
52  
53 < %if "%cpu" == "amd64"
54 < %define skiplibtiff true
53 > %if "%ismac" == "true"
54 > Requires: gfortran-macosx
55   %endif
56  
57 < %if "%skiplibtiff" != "true"
58 < Requires: libtiff
57 > %if "%online" != "true"
58 > %if "%ismac" != "true"
59 > Requires: qt
60 > %endif
61   %endif
62  
63   %prep
# Line 52 | Line 65 | Requires: libtiff
65   %patch0 -p1
66   %patch1 -p1
67   %patch2 -p1
68 < %patch3 -p1
68 > # patch3 is OS version dependent, see below
69   %patch4 -p1
57
70   %patch5 -p1
71   %patch6 -p1
72   %patch7 -p1
73 < # patch 8 was dropped
73 > %patch8 -p1
74   %patch9 -p1
75 <
64 < # patch10 is compiler version dependent, see below
75 > %patch10 -p1
76   %patch11 -p1
77   %patch12 -p1
78 < # patch13 is compiler version dependent, see below
68 <
69 < # work around patch issue...
70 < rm graf3d/gl/src/gl2ps.c
78 > %patch13 -p1
79   %patch14 -p1
72 #work around patch issues in patch14(?)
73 rm graf3d/eve/inc/TEveLegoOverlay.h.orig
74 rm graf3d/eve/src/TEveLegoOverlay.cxx
75 rm graf3d/gl/inc/gl2ps.h.orig
76 rm graf3d/gl/src/gl2ps.c.orig
80   %patch15 -p1
81   %patch16 -p1
82 < %patch17 -p1
83 < %patch19 -p1
82 > %patch17 -p0
83 > %patch18 -p1
84 > %patch19 -p0
85   %patch20 -p1
86   %patch21 -p1
87 + %patch22 -p1
88 + %patch23 -p1
89 + %patch24 -p1
90 + %patch25 -p1
91 + %patch26 -p1
92 + %patch27 -p1
93 + %patch28 -p1
94 + %patch29 -p1
95  
96 < case %gccver in
85 <  4.3.*)
86 < %patch13 -p1
87 <  ;;
88 <  4.4.*)
89 < %patch10 -p1
90 <  ;;
91 < esac
92 <
93 < # The following patch can only be applied on SLC5 or later (extra linker
96 > # The following patch can only be applied on SLC5 or later (extra linker
97   # options only available with the SLC5 binutils)
98   case %cmsplatf in
99    slc5_* | slc5onl_* )
100 < %patch18 -p1
100 > %patch3 -p1
101    ;;
102   esac
103  
104 + # Delete these (irrelevant) files as the fits appear to confuse rpm on OSX
105 + # (It tries to run install_name_tool on them.)
106 + rm -fR tutorials/fitsio
107 +
108   %build
109  
110   mkdir -p %i
111 + export LIBJPG_ROOT
112   export ROOTSYS=%_builddir/root
113   export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)
114  
# Line 108 | Line 116 | export PYTHONV=$(echo $PYTHON_VERSION |
116   # Use system qt. Also skip xrootd and odbc for online case:
117  
118   EXTRA_CONFIG_ARGS="--with-f77=/usr
111             --disable-xrootd
119               --disable-odbc
120 <             --disable-qt --disable-qtgsi"
120 >             --disable-qt --disable-qtgsi --disable-astiff"
121   %else
122 + export LIBPNG_ROOT ZLIB_ROOT LIBTIFF_ROOT LIBUNGIF_ROOT
123   EXTRA_CONFIG_ARGS="--with-f77=${GCC_ROOT}
116             --with-xrootd=$XROOTD_ROOT
124               --enable-qt --with-qt-libdir=${QT_ROOT}/lib --with-qt-incdir=${QT_ROOT}/include
125               --with-ssl-incdir=${OPENSSL_ROOT}/include
126               --with-ssl-libdir=${OPENSSL_ROOT}/lib
# Line 131 | Line 138 | CONFIG_ARGS="--enable-table
138               --enable-reflex  
139               --enable-cintex
140               --enable-minuit2
141 +             --enable-fftw3
142 +             --with-fftw3-incdir=${FFTW3_ROOT}/include
143 +             --with-fftw3-libdir=${FFTW3_ROOT}/lib
144               --disable-ldap
145               --disable-krb5
146 +             --with-xrootd=${XROOTD_ROOT}
147               --with-gsl-incdir=${GSL_ROOT}/include
148               --with-gsl-libdir=${GSL_ROOT}/lib
149               --with-dcap-libdir=${DCAP_ROOT}/lib
150               --with-dcap-incdir=${DCAP_ROOT}/include
151               --disable-pgsql
152               --disable-mysql
153 <             --disable-xml ${EXTRA_CONFIG_ARGS}"
153 >             --disable-oracle ${EXTRA_CONFIG_ARGS}"
154  
155 < case $(uname)-$(uname -m) in
156 <  Linux-x86_64)
157 <    ./configure linuxx8664gcc $CONFIG_ARGS --with-shift-libdir=${CASTOR_ROOT}/lib --with-shift-incdir=${CASTOR_ROOT}/include/shift --disable-astiff;;
158 <  Linux-i*86)
159 <    ./configure linux  $CONFIG_ARGS --with-shift-libdir=${CASTOR_ROOT}/lib --with-shift-incdir=${CASTOR_ROOT}/include/shift;;
160 <  Darwin*)
155 > case %cmsos in
156 >  slc*_amd64)
157 >    ./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 ;;
158 >  slc*_ia32)
159 >    ./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 ;;
160 >  osx*)
161      case %cmsplatf in
162      *_ia32_* )
163 <      comparch=i386 ;;
163 >      comparch=i386
164 >      macconfig=macosx
165 >      ;;
166      *_amd64_* )
167 <      comparch=x86_64 ;;
167 >      comparch=x86_64
168 >      macconfig=macosx64
169 >      ;;
170      * )
171 <      comparch=ppc ;;
171 >      comparch=ppc
172 >      macconfig=macosx
173 >      ;;
174      esac
175 <    export CC="gcc -arch $comparch" CXX="g++ -arch $comparch"
176 <    ./configure macosx $CONFIG_ARGS --with-cc="$CC" --with-cxx="$CXX" --disable-rfio --disable-builtin_afterimage ;;
177 <  Linux-ppc64*)
175 >    export CC=`which gcc` CXX=`which g++`
176 >    ./configure $arch $CONFIG_ARGS --with-cc="$CC" --with-cxx="$CXX" --disable-rfio --disable-builtin_afterimage ;;
177 >  slc*_ppc64*)
178      ./configure linux $CONFIG_ARGS --disable-rfio;;
179   esac
180  
181 < case %cmsplatf in
182 <  osx*)
183 <   makeopts=
167 <  ;;
168 <  *)
169 <   makeopts="%makeprocesses"
170 <  ;;
171 < esac
172 <
173 < make $makeopts
181 > makeopts="%makeprocesses"
182 >
183 > make $makeopts
184   make cintdlls
185  
186   %install
# Line 189 | Line 199 | export ROOTSYS=%i
199   make INSTALL="$cp" INSTALLDATA="$cp" install
200   mkdir -p $ROOTSYS/lib/python
201   cp -r cint/reflex/python/genreflex $ROOTSYS/lib/python
202 < #
202 > # This file confuses rpm's find-requires because it starts with
203 > # a """ and it thinks is the shebang.
204 > rm -f %i/tutorials/pyroot/mrt.py
205  
194 # SCRAM ToolBox toolfile
195 mkdir -p %i/etc/scram.d
196 # rootcore toolfile
197 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootcore.xml
198  <tool name="rootcore" version="%v">
199    <info url="http://root.cern.ch/root/"/>
200    <lib name="Tree"/>
201    <lib name="Net"/>
202    <lib name="Thread"/>
203    <lib name="MathCore"/>
204    <lib name="RIO"/>
205    <lib name="Core"/>
206    <lib name="Cint"/>
207    <client>
208      <environment name="ROOTCORE_BASE" default="%i"/>
209      <environment name="LIBDIR" default="$ROOTCORE_BASE/lib"/>
210      <environment name="INCLUDE" default="$ROOTCORE_BASE/include"/>
211      <environment name="INCLUDE" default="$ROOTCORE_BASE/cint"/>
212    </client>
213    <runtime name="PATH" value="$ROOTCORE_BASE/bin" type="path"/>
214    <runtime name="ROOTSYS" value="$ROOTCORE_BASE/"/>
215    <runtime name="PYTHONPATH" value="$ROOTCORE_BASE/lib" type="path"/>
216    <use name="sockets"/>
217    <use name="pcre"/>
218    <use name="zlib"/>
219  </tool>
220 EOF_TOOLFILE
221
222 # root toolfile, alias for rootphysics. Using rootphysics is preferred.
223 cat << \EOF_TOOLFILE >%i/etc/scram.d/root.xml
224  <tool name="root" version="%v">
225    <info url="http://root.cern.ch/root/"/>
226    <use name="rootphysics"/>
227  </tool>
228 EOF_TOOLFILE
229
230 # roothistmatrix toolfile
231 cat << \EOF_TOOLFILE >%i/etc/scram.d/roothistmatrix.xml
232  <tool name="roothistmatrix" version="%v">
233    <info url="http://root.cern.ch/root/"/>
234    <lib name="Hist"/>
235    <lib name="Matrix"/>
236    <use name="ROOTCore"/>
237  </tool>
238 EOF_TOOLFILE
239
240 # rootgpad toolfile
241 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootgpad.xml
242  <tool name="rootgpad" version="%v">
243    <info url="http://root.cern.ch/root/"/>
244    <lib name="Gpad"/>
245    <lib name="Graf"/>
246    <use name="roothistmatrix"/>
247  </tool>
248 EOF_TOOLFILE
249
250 # rootphysics toolfile
251 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootphysics.xml
252  <tool name="rootphysics" version="%v">
253    <info url="http://root.cern.ch/root/"/>
254    <lib name="Physics"/>
255    <use name="roothistmatrix"/>
256  </tool>
257 EOF_TOOLFILE
258
259 # rootgraphics toolfile, identical to old "root" toolfile
260 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootgraphics.xml
261  <tool name="rootgraphics" version="%v">
262    <info url="http://root.cern.ch/root/"/>
263    <lib name="TreePlayer"/>
264    <lib name="Graf3d"/>
265    <lib name="Postscript"/>
266    <use name="rootgpad"/>
267  </tool>
268 EOF_TOOLFILE
269
270 # rootcintex toolfile
271 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootcintex.xml
272  <tool name="rootcintex" version="%v">
273    <info url="http://root.cern.ch/root/"/>
274    <lib name="Cintex"/>
275    <use name="ROOTRflx"/>
276    <use name="ROOTCore"/>
277  </tool>
278 EOF_TOOLFILE
279
280 # rootinteractive toolfile (GQt/qt lib dependencies
281 # have been moved to rootqt.xml)
282 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootinteractive.xml
283  <tool name="rootinteractive" version="%v">
284    <info url="http://root.cern.ch/root/"/>
285    <lib name="Rint"/>
286    <lib name="Gui"/>
287    <use name="libjpg"/>
288    <use name="libpng"/>
289    <use name="rootgpad"/>
290  </tool>
291 EOF_TOOLFILE
292
293 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootqt.xml
294  <tool name="rootqt" version="%v">
295    <info url="http://root.cern.ch/root/"/>
296    <lib name="GQt"/>
297    <use name="qt"/>
298  </tool>
299 EOF_TOOLFILE
300
301 # rootmath toolfile
302 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootmath.xml
303  <tool name="rootmath" version="%v">
304    <info url="http://root.cern.ch/root/"/>
305    <lib name="GenVector"/>
306    <lib name="MathMore"/>
307    <use name="ROOTCore"/>
308    <use name="gsl"/>
309  </tool>
310 EOF_TOOLFILE
311
312 # rootminuit toolfile
313 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootminuit.xml
314  <tool name="rootminuit" version="%v">
315    <info url="http://root.cern.ch/root/"/>
316    <lib name="Minuit"/>
317    <use name="rootgpad"/>
318  </tool>
319 EOF_TOOLFILE
320
321 # rootminuit2 toolfile
322 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootminuit2.xml
323  <tool name="rootminuit2" version="%v">
324    <info url="http://root.cern.ch/root/"/>
325    <lib name="Minuit2"/>
326    <use name="rootgpad"/>
327  </tool>
328 EOF_TOOLFILE
329
330 # rootrflx toolfile
331 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootrflx.xml
332  <tool name="rootrflx" version="%v">
333    <info url="http://root.cern.ch/root/"/>
334    <lib name="Reflex"/>
335    <client>
336      <environment name="ROOTRFLX_BASE" default="%i"/>
337      <environment name="LIBDIR" default="$ROOTRFLX_BASE/lib"/>
338      <environment name="INCLUDE" default="$ROOTRFLX_BASE/include"/>
339    </client>
340    <runtime name="PATH" value="$ROOTRFLX_BASE/bin" type="path"/>
341    <runtime name="ROOTSYS" value="$ROOTRFLX_BASE/"/>
342    <runtime name="GENREFLEX" value="$ROOTRFLX_BASE/bin/genreflex"/>
343    <use name="sockets"/>
344    <use name="gccxml"/>
345  </tool>
346 EOF_TOOLFILE
347
348 # roothtml toolfile
349 cat << \EOF_TOOLFILE >%i/etc/scram.d/roothtml.xml
350  <tool name="roothtml" version="%v">
351    <info url="http://root.cern.ch/root/"/>
352    <lib name="Html"/>
353    <use name="rootgpad"/>
354  </tool>
355 EOF_TOOLFILE
356
357 # rootmlp toolfile
358 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootmlp.xml
359  <tool name="rootmlp" version="%v">
360    <info url="http://root.cern.ch/root/"/>
361    <lib name="MLP"/>
362    <use name="RootGraphics"/>
363  </tool>
364 EOF_TOOLFILE
365
366 # roottmva toolfile
367 cat << \EOF_TOOLFILE >%i/etc/scram.d/roottmva.xml
368  <tool name="roottmva" version="%v">
369    <info url="http://root.cern.ch/root/"/>
370    <lib name="TMVA"/>
371    <use name="ROOTMLP"/>
372    <use name="rootminuit"/>
373  </tool>
374 EOF_TOOLFILE
375
376 # rootthread toolfile
377 cat << \EOF_TOOLFILE >%i/etc/scram.d/rootthread.xml
378  <tool name="rootthread" version="%v">
379    <info url="http://root.cern.ch/root/"/>
380    <use name="ROOTCore"/>
381  </tool>
382 EOF_TOOLFILE
206  
384 %post
385 perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $(find $RPM_INSTALL_PREFIX/%pkgrel/etc/scram.d -type f)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines