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 ;; |
36 |
> |
slc5*_*_gcc4[01234]*) |
37 |
> |
CXX="`which c++`" |
38 |
> |
CC="`which gcc`" |
39 |
> |
PLATF_CONF_OPTS="--enable-shared --disable-static" |
40 |
> |
LIBGFORTRAN=`gfortran --print-file-name=libgfortran.so` |
41 |
> |
;; |
42 |
> |
*) perl -p -i -e 's|libLHAPDF[.]so|libLHAPDF.a|g' configure |
43 |
> |
CXX="`which c++` -fPIC" |
44 |
> |
CC="`which gcc` -fPIC" |
45 |
> |
PLATF_CONF_OPTS="--enable-shared --disable-static" |
46 |
> |
LIBGFORTRAN="`gfortran --print-file-name=libgfortran.so`" |
47 |
> |
;; |
48 |
|
esac |
49 |
|
|
50 |
< |
./configure --enable-shared --disable-static \ |
50 |
> |
case %cmsplatf in |
51 |
> |
osx*) |
52 |
> |
LIBGFORTRAN="`gfortran --print-file-name=libgfortran.a`" |
53 |
> |
;; |
54 |
> |
esac |
55 |
> |
|
56 |
> |
./configure $PLATF_CONF_OPTS \ |
57 |
|
--with-LHAPDF=$LHAPDF_ROOT \ |
58 |
|
--with-hepmc=$HEPMC_ROOT \ |
59 |
|
--with-gsl=$GSL_ROOT --with-zlib=$ZLIB_ROOT \ |
60 |
|
--without-javagui --prefix=%i \ |
61 |
< |
--disable-readline CXX="`which c++`" CC="`which cc`" \ |
62 |
< |
LIBS="-L$LHAPDF_ROOT/lib -lLHAPDF `gfortran --print-file-name=libgfortran.so` -lz" |
61 |
> |
--disable-readline CXX="$CXX" CC="$CC" \ |
62 |
> |
LIBS="-L$LHAPDF_ROOT/lib -lLHAPDF $LIBGFORTRAN -lz" |
63 |
|
make |
64 |
|
|
65 |
|
%install |
73 |
|
|
74 |
|
%post |
75 |
|
%{relocateConfig}lib/ThePEG/*.la |
76 |
+ |
|