1 |
< |
### RPM external clhep 1.9.2.2 |
2 |
< |
Source: http://proj-clhep.web.cern.ch/proj-clhep/%n-%v.tgz |
1 |
> |
### RPM external clhep 2.0.4.6 |
2 |
> |
Source: http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/distributions/%n-%realversion.tgz |
3 |
> |
Patch: clhep-2.0.4.2-no-virtual-inline |
4 |
|
|
5 |
|
%prep |
6 |
< |
%setup -n %v/CLHEP |
6 |
> |
%setup -n %realversion/CLHEP |
7 |
> |
# Apply the patch only for MacOSX and gcc45 (test builds as of Dec2010) |
8 |
> |
# (Technically these aren't guaranteed to be mutually exclusive, but in |
9 |
> |
# practice they are at the moment.) |
10 |
> |
case %gccver in |
11 |
> |
4.5.*) |
12 |
> |
%patch -p1 |
13 |
> |
;; |
14 |
> |
esac |
15 |
> |
case %cmsplatf in |
16 |
> |
osx*) |
17 |
> |
%patch -p1 |
18 |
> |
;; |
19 |
> |
esac |
20 |
> |
|
21 |
|
|
22 |
|
%build |
23 |
+ |
if [ $(uname) = Darwin ]; then |
24 |
+ |
export MACOSX_DEPLOYMENT_TARGET="10.4" |
25 |
+ |
fi |
26 |
|
CXX=g++ ./configure --prefix=%i |
27 |
|
make |
28 |
|
|
50 |
|
#for f in *.cc; do |
51 |
|
# g++ -c -O2 -ansi -Wall -fPIC -I../.. $flags $f |
52 |
|
#done |
53 |
< |
#g++ $shared -o libCLHEP-g++.%v.$so *.o |
53 |
> |
#g++ $shared -o libCLHEP-g++.%realversion.$so *.o |
54 |
|
|
55 |
|
%install |
56 |
|
case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac |
57 |
|
make install |
58 |
|
#cd shared-tmp |
59 |
< |
#cp libCLHEP-g++.%v.$so %i/lib |
60 |
< |
#ln -s libCLHEP-g++.%v.$so %i/lib/libCLHEP.$so |
61 |
< |
#n -s libCLHEP-g++.%v.a %i/lib/libCLHEP.a |
59 |
> |
#cp libCLHEP-g++.%realversion.$so %i/lib |
60 |
> |
#ln -s libCLHEP-g++.%realversion.$so %i/lib/libCLHEP.$so |
61 |
> |
#n -s libCLHEP-g++.%realversion.a %i/lib/libCLHEP.a |
62 |
> |
#remove the .a files |
63 |
> |
rm %i/lib/*.a |
64 |
> |
# remove the separate libs: |
65 |
> |
rm %i/lib/libCLHEP-[A-Z]*-%realversion.$so |
66 |
> |
|
67 |
> |
%post |
68 |
> |
%{relocateConfig}bin/Evaluator-config |
69 |
> |
%{relocateConfig}bin/Cast-config |
70 |
> |
%{relocateConfig}bin/GenericFunctions-config |
71 |
> |
%{relocateConfig}bin/Exceptions-config |
72 |
> |
%{relocateConfig}bin/RandomObjects-config |
73 |
> |
%{relocateConfig}bin/Geometry-config |
74 |
> |
%{relocateConfig}bin/Matrix-config |
75 |
> |
%{relocateConfig}bin/Random-config |
76 |
> |
%{relocateConfig}bin/RefCount-config |
77 |
> |
%{relocateConfig}bin/Units-config |
78 |
> |
%{relocateConfig}bin/Vector-config |
79 |
> |
%{relocateConfig}bin/clhep-config |