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.49 by sashby, Thu Dec 14 10:59:06 2006 UTC vs.
Revision 1.219 by gowdy, Mon Nov 22 08:41:55 2010 UTC

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