1 |
< |
### RPM external lhapdf 5.2.3-CMS8 |
1 |
> |
### RPM external lhapdf 5.6.0 |
2 |
|
%define realversion %(echo %v | cut -d- -f1) |
3 |
|
Source: http://cern.ch/service-spi/external/MCGenerators/distribution/%{n}-%{realversion}-src.tgz |
4 |
+ |
Patch0: lhapdf-5.6.0-g77 |
5 |
+ |
Patch1: lhapdf-5.6.0-32bit-on-64bit-recheck-workaround |
6 |
+ |
|
7 |
|
%prep |
8 |
|
%setup -q -n %{n}/%{realversion} |
9 |
< |
%if "%cmsplatf" == "slc4_ia32_gcc412" |
10 |
< |
# Switch to gfortran |
11 |
< |
perl -p -i -e 's|^export F77\=g77|export F77=gfortran|' .scripts/platform_functions |
12 |
< |
perl -p -i -e 's| -Wno-globals||' configure |
13 |
< |
%endif |
14 |
< |
./configure |
9 |
> |
# This applies both old and new fixes, probably the gcc4 ones can go (to check) |
10 |
> |
case %gccver in |
11 |
> |
4.*) |
12 |
> |
# Switch to gfortran |
13 |
> |
perl -p -i -e 's|^export F77\=g77|export F77=gfortran|' .scripts/platform_functions |
14 |
> |
perl -p -i -e 's| -Wno-globals||' configure |
15 |
> |
;; |
16 |
> |
3.*) |
17 |
> |
%patch0 -p2 |
18 |
> |
;; |
19 |
> |
esac |
20 |
> |
%patch1 -p2 |
21 |
> |
./configure --disable-pyext --enable-low-memory --prefix=%i --with-max-num-pdfsets=1 |
22 |
|
|
23 |
|
%build |
24 |
+ |
which perl |
25 |
+ |
cp Makefile Makefile.orig |
26 |
+ |
perl -p -i -e 's|/usr/lib64/libm.a||g' config.status |
27 |
+ |
perl -p -i -e 's|/usr/lib64/libc.a||g' config.status |
28 |
|
make |
29 |
|
|
30 |
|
%install |
31 |
< |
tar -c lib include PDFsets | tar -x -C %i |
31 |
> |
make install |
32 |
|
# SCRAM ToolBox toolfile |
33 |
|
mkdir -p %i/etc/scram.d |
34 |
|
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |