1 |
davidlt |
1.334 |
### RPM lcg root 5.32.00
|
2 |
dlange |
1.57 |
## INITENV +PATH PYTHONPATH %i/lib/python
|
3 |
elmer |
1.198 |
## INITENV SET ROOTSYS %i
|
4 |
davidlt |
1.334 |
#Source: ftp://root.cern.ch/%n/%{n}_v%{realversion}.source.tar.gz
|
5 |
|
|
%define svntag %(echo %realversion | tr . -)
|
6 |
|
|
Source: svn://root.cern.ch/svn/root/tags/v%{svntag}/?scheme=http&strategy=export&module=%n-%{realversion}&output=/%n-%{realversion}.tgz
|
7 |
|
|
%define online %(case %cmsplatf in (*onl_*_*) echo true;; (*) echo false;; esac)
|
8 |
|
|
%define ismac %(case %cmsplatf in (osx*) echo true;; (*) echo false;; esac)
|
9 |
|
|
|
10 |
|
|
Patch0: root-5.32-00-externals
|
11 |
|
|
Patch1: root-5.28-00d-roofit-silence-static-printout
|
12 |
|
|
Patch2: root-5.32-00-linker-gnu-hash-style
|
13 |
|
|
Patch3: root-5.32.00-detect-arch
|
14 |
|
|
Patch4: root-5.30.02-fix-gcc46
|
15 |
|
|
Patch5: root-5.30.02-fix-isnan-again
|
16 |
|
|
# See https://hypernews.cern.ch/HyperNews/CMS/get/edmFramework/2913/1/1.html
|
17 |
|
|
Patch6: root-5.32.00-fix-oneline
|
18 |
|
|
Patch7: root-5.32.00-longBranchName
|
19 |
eulisse |
1.335 |
Patch8: root-5.32.00-fireworks1
|
20 |
matevz |
1.336 |
Patch9: root-5.32.00-noungif
|
21 |
davidlt |
1.334 |
|
22 |
elmer |
1.98 |
%define cpu %(echo %cmsplatf | cut -d_ -f2)
|
23 |
|
|
|
24 |
matevz |
1.336 |
Requires: gccxml gsl libjpg libpng libtiff pcre python fftw3 xz xrootd libxml2
|
25 |
elmer |
1.228 |
|
26 |
fwyzard |
1.235 |
%if "%ismac" != "true"
|
27 |
elmer |
1.228 |
Requires: castor dcap
|
28 |
|
|
%endif
|
29 |
|
|
|
30 |
fwyzard |
1.235 |
%if "%online" != "true"
|
31 |
davidlt |
1.334 |
Requires: openssl zlib
|
32 |
elmer |
1.228 |
%endif
|
33 |
|
|
|
34 |
davidlt |
1.334 |
%define keep_archives true
|
35 |
|
|
%if "%(case %cmsplatf in (osx*_*_gcc421) echo true ;; (*) echo false ;; esac)" == "true"
|
36 |
fwyzard |
1.235 |
Requires: gfortran-macosx
|
37 |
|
|
%endif
|
38 |
|
|
|
39 |
davidlt |
1.334 |
%if "%(case %cmsplatf in (osx*) echo true ;; (*) echo false ;; esac)" == "true"
|
40 |
|
|
Requires: freetype
|
41 |
|
|
%endif
|
42 |
|
|
|
43 |
eulisse |
1.1 |
%prep
|
44 |
davidlt |
1.334 |
%setup -n root-%realversion
|
45 |
ratnik |
1.106 |
%patch0 -p1
|
46 |
davidlt |
1.323 |
%patch1 -p1
|
47 |
davidlt |
1.334 |
%patch3 -p1
|
48 |
davidlt |
1.328 |
%patch4 -p1
|
49 |
|
|
%patch5 -p1
|
50 |
|
|
%patch6 -p1
|
51 |
davidlt |
1.334 |
%patch7 -p2
|
52 |
eulisse |
1.335 |
%patch8 -p1
|
53 |
matevz |
1.336 |
%patch9 -p1
|
54 |
eulisse |
1.335 |
|
55 |
fwyzard |
1.235 |
# The following patch can only be applied on SLC5 or later (extra linker
|
56 |
elmer |
1.198 |
# options only available with the SLC5 binutils)
|
57 |
|
|
case %cmsplatf in
|
58 |
davidlt |
1.334 |
slc[56]_* | slc5onl_* )
|
59 |
|
|
%patch2 -p1
|
60 |
elmer |
1.198 |
;;
|
61 |
|
|
esac
|
62 |
eulisse |
1.190 |
|
63 |
fwyzard |
1.235 |
# Delete these (irrelevant) files as the fits appear to confuse rpm on OSX
|
64 |
|
|
# (It tries to run install_name_tool on them.)
|
65 |
|
|
rm -fR tutorials/fitsio
|
66 |
|
|
|
67 |
lat |
1.338 |
# Block use of /opt/local, /usr/local.
|
68 |
|
|
perl -p -i -e 's{/(usr|opt)/local}{/no-no-no/local}g' configure
|
69 |
|
|
|
70 |
eulisse |
1.1 |
%build
|
71 |
andreasp |
1.163 |
|
72 |
eulisse |
1.1 |
mkdir -p %i
|
73 |
elmer |
1.221 |
export LIBJPG_ROOT
|
74 |
elmer |
1.14 |
export ROOTSYS=%_builddir/root
|
75 |
elmer |
1.180 |
export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)
|
76 |
dlange |
1.103 |
|
77 |
muzaffar |
1.164 |
%if "%online" == "true"
|
78 |
elmer |
1.256 |
# Also skip xrootd and odbc for online case:
|
79 |
ratnik |
1.111 |
|
80 |
muzaffar |
1.164 |
EXTRA_CONFIG_ARGS="--with-f77=/usr
|
81 |
elmer |
1.256 |
--disable-odbc --disable-astiff"
|
82 |
dlange |
1.103 |
%else
|
83 |
elmer |
1.221 |
export LIBPNG_ROOT ZLIB_ROOT LIBTIFF_ROOT LIBUNGIF_ROOT
|
84 |
muzaffar |
1.164 |
EXTRA_CONFIG_ARGS="--with-f77=${GCC_ROOT}
|
85 |
ratnik |
1.106 |
--with-ssl-incdir=${OPENSSL_ROOT}/include
|
86 |
elmer |
1.256 |
--with-ssl-libdir=${OPENSSL_ROOT}/lib"
|
87 |
dlange |
1.103 |
%endif
|
88 |
davidlt |
1.334 |
LZMA=${XZ_ROOT}
|
89 |
|
|
export LZMA
|
90 |
muzaffar |
1.164 |
CONFIG_ARGS="--enable-table
|
91 |
eulisse |
1.20 |
--disable-builtin-pcre
|
92 |
|
|
--disable-builtin-freetype
|
93 |
|
|
--disable-builtin-zlib
|
94 |
elmer |
1.98 |
--with-gccxml=${GCCXML_ROOT}
|
95 |
elmer |
1.180 |
--enable-python --with-python-libdir=${PYTHON_ROOT}/lib --with-python-incdir=${PYTHON_ROOT}/include/python${PYTHONV}
|
96 |
eulisse |
1.2 |
--enable-explicitlink
|
97 |
eulisse |
1.20 |
--enable-mathmore
|
98 |
eulisse |
1.2 |
--enable-reflex
|
99 |
|
|
--enable-cintex
|
100 |
davidlt |
1.334 |
--enable-minuit2
|
101 |
|
|
--disable-builtin-lzma
|
102 |
elmer |
1.221 |
--enable-fftw3
|
103 |
|
|
--with-fftw3-incdir=${FFTW3_ROOT}/include
|
104 |
|
|
--with-fftw3-libdir=${FFTW3_ROOT}/lib
|
105 |
elmer |
1.98 |
--disable-ldap
|
106 |
gowdy |
1.143 |
--disable-krb5
|
107 |
fwyzard |
1.235 |
--with-xrootd=${XROOTD_ROOT}
|
108 |
eulisse |
1.34 |
--with-gsl-incdir=${GSL_ROOT}/include
|
109 |
|
|
--with-gsl-libdir=${GSL_ROOT}/lib
|
110 |
elmer |
1.59 |
--with-dcap-libdir=${DCAP_ROOT}/lib
|
111 |
elmer |
1.98 |
--with-dcap-incdir=${DCAP_ROOT}/include
|
112 |
|
|
--disable-pgsql
|
113 |
elmer |
1.181 |
--disable-mysql
|
114 |
elmer |
1.256 |
--disable-qt --disable-qtgsi
|
115 |
davidlt |
1.334 |
--with-cint-maxstruct=36000
|
116 |
|
|
--with-cint-maxtypedef=36000
|
117 |
|
|
--with-cint-longline=4096
|
118 |
eulisse |
1.337 |
--disable-hdfs
|
119 |
elmer |
1.242 |
--disable-oracle ${EXTRA_CONFIG_ARGS}"
|
120 |
elmer |
1.98 |
|
121 |
eulisse |
1.236 |
case %cmsos in
|
122 |
davidlt |
1.334 |
slc*)
|
123 |
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 ;;
|
124 |
eulisse |
1.236 |
osx*)
|
125 |
davidlt |
1.334 |
comparch=x86_64
|
126 |
|
|
macconfig=macosx64
|
127 |
|
|
./configure $arch $CONFIG_ARGS --disable-rfio --disable-builtin_afterimage ;;
|
128 |
eulisse |
1.236 |
slc*_ppc64*)
|
129 |
elmer |
1.98 |
./configure linux $CONFIG_ARGS --disable-rfio;;
|
130 |
eulisse |
1.1 |
esac
|
131 |
eulisse |
1.2 |
|
132 |
elmer |
1.243 |
makeopts="%makeprocesses"
|
133 |
eulisse |
1.236 |
|
134 |
|
|
make $makeopts
|
135 |
eulisse |
1.147 |
|
136 |
eulisse |
1.1 |
%install
|
137 |
|
|
# Override installers if we are using GNU fileutils cp. On OS X
|
138 |
|
|
# ROOT's INSTALL is defined to "cp -pPR", which only works with
|
139 |
|
|
# the system cp (/bin/cp). If you have fileutils on fink, you
|
140 |
|
|
# lose. Check which one is getting picked up and select syntax
|
141 |
|
|
# accordingly. (FIXME: do we need to check that -P is accepted?)
|
142 |
|
|
if (cp --help | grep -e '-P.*--parents') >/dev/null 2>&1; then
|
143 |
|
|
cp="cp -dpR"
|
144 |
|
|
else
|
145 |
|
|
cp="cp -pPR"
|
146 |
|
|
fi
|
147 |
|
|
|
148 |
dlange |
1.57 |
export ROOTSYS=%i
|
149 |
eulisse |
1.5 |
make INSTALL="$cp" INSTALLDATA="$cp" install
|
150 |
dlange |
1.57 |
mkdir -p $ROOTSYS/lib/python
|
151 |
elmer |
1.141 |
cp -r cint/reflex/python/genreflex $ROOTSYS/lib/python
|
152 |
eulisse |
1.236 |
# This file confuses rpm's find-requires because it starts with
|
153 |
|
|
# a """ and it thinks is the shebang.
|
154 |
|
|
rm -f %i/tutorials/pyroot/mrt.py
|
155 |
eulisse |
1.289 |
|
156 |
|
|
|