1 |
davidlt |
1.22 |
### RPM external rivet 1.8.2
|
2 |
|
|
Source: http://www.hepforge.org/archive/rivet/Rivet-%{realversion}.tar.gz
|
3 |
|
|
|
4 |
|
|
Requires: hepmc boost fastjet swig gsl
|
5 |
|
|
Patch0: rivet-1.4.0
|
6 |
|
|
Patch1: rivet-1.8.2-disable-doc
|
7 |
davidlt |
1.23 |
Patch2: rivet-1.8.2-fix-isnan
|
8 |
|
|
Patch3: rivet-1.8.2-fix-duplicate-symbols
|
9 |
davidlt |
1.22 |
|
10 |
|
|
%if "%{?cms_cxx:set}" != "set"
|
11 |
|
|
%define cms_cxx g++
|
12 |
|
|
%endif
|
13 |
|
|
|
14 |
|
|
%if "%{?cms_cxxflags:set}" != "set"
|
15 |
|
|
%define cms_cxxflags -O2 -std=c++0x
|
16 |
|
|
%endif
|
17 |
|
|
|
18 |
|
|
%prep
|
19 |
|
|
%setup -n Rivet-%{realversion}
|
20 |
|
|
%patch0 -p0
|
21 |
|
|
%patch1 -p1
|
22 |
davidlt |
1.23 |
%patch2 -p1
|
23 |
|
|
%patch3 -p1
|
24 |
davidlt |
1.22 |
./configure --disable-silent-rules --prefix=%i --with-boost=${BOOST_ROOT} --with-hepmc=$HEPMC_ROOT \
|
25 |
|
|
--with-fastjet=$FASTJET_ROOT --with-gsl=$GSL_ROOT --disable-doxygen --disable-pdfmanual --with-pic \
|
26 |
|
|
CXX="$(which %cms_cxx)" CXXFLAGS="%cms_cxxflags"
|
27 |
|
|
# The following hack insures that the bins with the library linked explicitly
|
28 |
|
|
# rather than indirectly, as required by the gold linker
|
29 |
|
|
perl -p -i -e "s|LIBS = $|LIBS = -lHepMC|g" bin/Makefile
|
30 |
|
|
%build
|
31 |
davidlt |
1.23 |
make %makeprocesses
|
32 |
davidlt |
1.22 |
%install
|
33 |
|
|
make install
|
34 |
|
|
# The following creates a (for now) empty directory consistent with the
|
35 |
|
|
# tool definition (probably the PYTHONPATH entry could be removed there,
|
36 |
|
|
# too, but I'm still not sure if there is a use case for the python or not)
|
37 |
|
|
mkdir -p %i/lib/python2.7/site-packages
|
38 |
|
|
|