ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/root.spec
Revision: 1.254
Committed: Sun Mar 6 22:10:52 2011 UTC (14 years, 1 month ago) by elmer
Branch: MAIN
CVS Tags: azFor420p7g434_fwlite, azFor420p7_fwlite, sm110311fwlite, CMSSW_4_2_0_pre7-ports, CMSSW_4_2_0_pre7, azFor420p7g451, azFor420p7g434, pe20110307a-for4XY-ports, pe20110307a-for4XY
Changes since 1.253: +2 -0 lines
Log Message:
  Apply root-5.27-06b-gcc46.patch (regardless of gcc version, it is a
  trivial #include addition)

File Contents

# User Rev Content
1 fwyzard 1.235 ### RPM lcg root 5.27.06b
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.251 %define ismac %(case %cmsplatf in osx*%closingbrace echo true;; *%closingbrace echo false;; esac)
9 elmer 1.96
10 fwyzard 1.235 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 elmer 1.237 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 elmer 1.238 Patch17: root-5.27-06-TTreeClonerTopLevel
28 elmer 1.239 Patch18: root-5.27-06b-r37947
29     Patch19: root-5.27-06b-TTreeCache-r37950-r37919-r37917-r37916-r37906
30 elmer 1.240 Patch20: root-5.27-06b-extra-math-for-roofit-5.28.00
31 elmer 1.241 Patch21: root-5.27-06b-TEfficiency-backport-from-5.28.00
32     Patch22: root-5.27-06b-histfactory-bits-from-5.28.00
33 elmer 1.244 Patch23: root-5.27-06b-r37210
34     Patch24: root-5.27-06b-r38023
35 elmer 1.245 Patch25: root-5.27-06b-r36708
36 elmer 1.246 Patch26: root-5.27-06b-r38126-r38156
37 elmer 1.248 Patch27: root-5.27-06b-r38210
38 elmer 1.253 Patch28: root-5.27-06b-r38248-r38252-r38259-r38264-r38265-r38267
39 elmer 1.254 Patch29: root-5.27-06b-gcc46
40 elmer 1.239
41 elmer 1.98 %define cpu %(echo %cmsplatf | cut -d_ -f2)
42    
43 fwyzard 1.229 Requires: gccxml gsl libjpg libpng libtiff libungif pcre python fftw3
44 elmer 1.228
45 fwyzard 1.235 %if "%ismac" != "true"
46 elmer 1.228 Requires: castor dcap
47     %endif
48    
49 fwyzard 1.235 %if "%online" != "true"
50     Requires: openssl zlib xrootd
51 elmer 1.228 %endif
52    
53 fwyzard 1.235 %if "%ismac" == "true"
54     Requires: gfortran-macosx
55     %endif
56    
57     %if "%online" != "true"
58     %if "%ismac" != "true"
59     Requires: qt
60     %endif
61 elmer 1.98 %endif
62 eulisse 1.25
63 eulisse 1.1 %prep
64     %setup -n root
65 ratnik 1.106 %patch0 -p1
66     %patch1 -p1
67 elmer 1.205 %patch2 -p1
68 fwyzard 1.235 # patch3 is OS version dependent, see below
69 elmer 1.205 %patch4 -p1
70 elmer 1.149 %patch5 -p1
71 gowdy 1.219 %patch6 -p1
72     %patch7 -p1
73     %patch8 -p1
74     %patch9 -p1
75 fwyzard 1.235 %patch10 -p1
76 gowdy 1.219 %patch11 -p1
77 elmer 1.222 %patch12 -p1
78 elmer 1.228 %patch13 -p1
79 elmer 1.237 %patch14 -p1
80     %patch15 -p1
81     %patch16 -p1
82 elmer 1.238 %patch17 -p0
83 elmer 1.239 %patch18 -p1
84     %patch19 -p0
85 elmer 1.240 %patch20 -p1
86 elmer 1.241 %patch21 -p1
87     %patch22 -p1
88 elmer 1.244 %patch23 -p1
89     %patch24 -p1
90 elmer 1.245 %patch25 -p1
91 elmer 1.246 %patch26 -p1
92 elmer 1.247 %patch27 -p1
93 elmer 1.252 %patch28 -p1
94 elmer 1.254 %patch29 -p1
95 elmer 1.228
96 fwyzard 1.235 # The following patch can only be applied on SLC5 or later (extra linker
97 elmer 1.198 # options only available with the SLC5 binutils)
98     case %cmsplatf in
99     slc5_* | slc5onl_* )
100 fwyzard 1.235 %patch3 -p1
101 elmer 1.198 ;;
102     esac
103 eulisse 1.190
104 fwyzard 1.235 # 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 eulisse 1.1 %build
109 andreasp 1.163
110 eulisse 1.1 mkdir -p %i
111 elmer 1.221 export LIBJPG_ROOT
112 elmer 1.14 export ROOTSYS=%_builddir/root
113 elmer 1.180 export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)
114 dlange 1.103
115 muzaffar 1.164 %if "%online" == "true"
116 elmer 1.181 # Use system qt. Also skip xrootd and odbc for online case:
117 ratnik 1.111
118 muzaffar 1.164 EXTRA_CONFIG_ARGS="--with-f77=/usr
119 ratnik 1.111 --disable-odbc
120 fwyzard 1.235 --disable-qt --disable-qtgsi --disable-astiff"
121 dlange 1.103 %else
122 elmer 1.221 export LIBPNG_ROOT ZLIB_ROOT LIBTIFF_ROOT LIBUNGIF_ROOT
123 muzaffar 1.164 EXTRA_CONFIG_ARGS="--with-f77=${GCC_ROOT}
124 ratnik 1.106 --enable-qt --with-qt-libdir=${QT_ROOT}/lib --with-qt-incdir=${QT_ROOT}/include
125     --with-ssl-incdir=${OPENSSL_ROOT}/include
126 muzaffar 1.164 --with-ssl-libdir=${OPENSSL_ROOT}/lib
127     --enable-qtgsi"
128 dlange 1.103 %endif
129    
130 muzaffar 1.164 CONFIG_ARGS="--enable-table
131 eulisse 1.20 --disable-builtin-pcre
132     --disable-builtin-freetype
133     --disable-builtin-zlib
134 elmer 1.98 --with-gccxml=${GCCXML_ROOT}
135 elmer 1.180 --enable-python --with-python-libdir=${PYTHON_ROOT}/lib --with-python-incdir=${PYTHON_ROOT}/include/python${PYTHONV}
136 eulisse 1.2 --enable-explicitlink
137 eulisse 1.20 --enable-mathmore
138 eulisse 1.2 --enable-reflex
139     --enable-cintex
140     --enable-minuit2
141 elmer 1.221 --enable-fftw3
142     --with-fftw3-incdir=${FFTW3_ROOT}/include
143     --with-fftw3-libdir=${FFTW3_ROOT}/lib
144 elmer 1.98 --disable-ldap
145 gowdy 1.143 --disable-krb5
146 fwyzard 1.235 --with-xrootd=${XROOTD_ROOT}
147 eulisse 1.34 --with-gsl-incdir=${GSL_ROOT}/include
148     --with-gsl-libdir=${GSL_ROOT}/lib
149 elmer 1.59 --with-dcap-libdir=${DCAP_ROOT}/lib
150 elmer 1.98 --with-dcap-incdir=${DCAP_ROOT}/include
151     --disable-pgsql
152 elmer 1.181 --disable-mysql
153 elmer 1.242 --disable-oracle ${EXTRA_CONFIG_ARGS}"
154 elmer 1.98
155 eulisse 1.236 case %cmsos in
156     slc*_amd64)
157 fwyzard 1.235 ./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 eulisse 1.236 slc*_ia32)
159 fwyzard 1.235 ./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 eulisse 1.236 osx*)
161 elmer 1.198 case %cmsplatf in
162     *_ia32_* )
163 fwyzard 1.235 comparch=i386
164     macconfig=macosx
165     ;;
166 elmer 1.198 *_amd64_* )
167 fwyzard 1.235 comparch=x86_64
168     macconfig=macosx64
169     ;;
170 elmer 1.198 * )
171 fwyzard 1.235 comparch=ppc
172     macconfig=macosx
173     ;;
174 elmer 1.198 esac
175 eulisse 1.236 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 elmer 1.98 ./configure linux $CONFIG_ARGS --disable-rfio;;
179 eulisse 1.1 esac
180 eulisse 1.2
181 elmer 1.243 makeopts="%makeprocesses"
182 eulisse 1.236
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 eulisse 1.236 # 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 elmer 1.204
206 fwyzard 1.235