1 |
< |
### RPM external thepeg 1.1.1 |
2 |
< |
Source: http://www.thep.lu.se/ThePEG/ThePEG++-%{realversion}.tgz |
1 |
> |
### RPM external thepeg 1.7.0 |
2 |
> |
## INITENV +PATH LD_LIBRARY_PATH %i/lib/ThePEG |
3 |
> |
## INITENV +PATH DYLD_LIBRARY_PATH %i/lib/ThePEG |
4 |
> |
#Source: http://www.thep.lu.se/~leif/ThePEG/ThePEG-%{realversion}.tgz |
5 |
> |
#Source: http://projects.hepforge.org/herwig/files/ThePEG-%{realversion}.tar.gz |
6 |
> |
Source: http://service-spi.web.cern.ch/service-spi/external/MCGenerators/distribution/thepeg-%{realversion}-src.tgz |
7 |
> |
Patch0: thepeg-1.7.0-break-termcap-dependence |
8 |
> |
Patch1: thepeg-1.7.0-use-dylibs-macosx |
9 |
> |
Patch2: thepeg-1.6.1-lhapdf-env |
10 |
> |
Patch3: thepeg-1.6.1-gcc46 |
11 |
> |
Patch4: thepeg-1.7.0-configure |
12 |
|
Requires: lhapdf |
13 |
< |
|
13 |
> |
Requires: gsl |
14 |
> |
Requires: hepmc |
15 |
> |
Requires: zlib |
16 |
> |
# FIXME: rivet? |
17 |
> |
%if "%(echo %cmsos | grep osx >/dev/null && echo true)" == "true" |
18 |
> |
Requires: gfortran-macosx |
19 |
> |
%endif |
20 |
|
|
21 |
|
%prep |
22 |
< |
%setup -q -n ThePEG++-%{realversion}/ThePEG |
23 |
< |
perl -p -i -e 's|-lLHAPDF|-llhapdf -llhapdf_dummy|' configure |
24 |
< |
perl -p -i -e 's|libLHAPDF|liblhapdf|' configure |
25 |
< |
./configure --with-LHAPDF=$LHAPDF_ROOT/lib --without-javagui --prefix=%i |
22 |
> |
%setup -q -n %{n}/%{realversion} |
23 |
> |
%patch0 -p2 |
24 |
> |
case %cmsos in |
25 |
> |
osx*) |
26 |
> |
%patch1 -p1 |
27 |
> |
;; |
28 |
> |
esac |
29 |
> |
%patch2 -p2 |
30 |
> |
%patch3 -p2 |
31 |
> |
%patch4 -p1 |
32 |
|
|
33 |
|
%build |
34 |
+ |
# Build as static only on new architectures. |
35 |
+ |
case %cmsplatf in |
36 |
+ |
slc5*_*_gcc4[01234]*) ;; |
37 |
+ |
*) perl -p -i -e 's|libLHAPDF[.]so|libLHAPDF.a|g;s|[.]dylib|.a|g' configure ;; |
38 |
+ |
esac |
39 |
+ |
|
40 |
+ |
./configure --enable-shared --disable-static \ |
41 |
+ |
--with-LHAPDF=$LHAPDF_ROOT \ |
42 |
+ |
--with-hepmc=$HEPMC_ROOT \ |
43 |
+ |
--with-gsl=$GSL_ROOT --with-zlib=$ZLIB_ROOT \ |
44 |
+ |
--without-javagui --prefix=%i \ |
45 |
+ |
--disable-readline CXX="`which c++`" CC="`which cc`" \ |
46 |
+ |
LIBS="-L$LHAPDF_ROOT/lib -lLHAPDF `gfortran --print-file-name=libgfortran.so` -lz" |
47 |
|
make |
48 |
|
|
49 |
|
%install |
50 |
|
|
51 |
|
make install |
52 |
|
rm %i/share/ThePEG/Doc/fixinterfaces.pl |
53 |
< |
|
54 |
< |
# SCRAM ToolBox toolfile |
55 |
< |
mkdir -p %i/etc/scram.d |
56 |
< |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
23 |
< |
<doc type=BuildSystem::ToolDoc version=1.0> |
24 |
< |
<Tool name=tauola version=%v> |
25 |
< |
<Client> |
26 |
< |
<Environment name=THEPEG_BASE default="%i"></Environment> |
27 |
< |
<Environment name=LIBDIR default="$THEPEG_BASE/lib"></Environment> |
28 |
< |
<Environment name=INCLUDE default="$THEPEG_BASE/include"></Environment> |
29 |
< |
</Client> |
30 |
< |
<lib name=tauola> |
31 |
< |
<lib name=pretauola> |
32 |
< |
<use name=f77compiler> |
33 |
< |
<use name=pythia6> |
34 |
< |
</Tool> |
35 |
< |
EOF_TOOLFILE |
53 |
> |
cd %i/lib/ThePEG |
54 |
> |
for item in LesHouches.so ; do |
55 |
> |
[ -e lib$item ] || ln -s $item lib$item |
56 |
> |
done |
57 |
|
|
58 |
|
%post |
59 |
< |
%{relocateConfig}etc/scram.d/%n |
59 |
> |
%{relocateConfig}lib/ThePEG/*.la |