Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cascade,cascade-toolfile: cleanup architectures
Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
  • Loading branch information
David Abdurachmanov authored and David Abdurachmanov committed Dec 10, 2015
1 parent 27ae7aa commit 0faf6a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 33 deletions.
13 changes: 0 additions & 13 deletions cascade-toolfile.spec
Expand Up @@ -9,20 +9,7 @@ Requires: cascade
mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/cascade.xml
<tool name="cascade" version="@TOOL_VERSION@">
<architecture name="slc[^_]*_[^_]*_gcc4[0-3]">
<lib name="cascade2"/>
<lib name="bases"/>
<lib name="mycern"/>
</architecture>
<architecture name="slc[^_]*_[^_]*_gcc4[4-9]">
<lib name="cascade_merged"/>
</architecture>
<architecture name="^fc">
<lib name="cascade_merged"/>
</architecture>
<architecture name="osx">
<lib name="cascade_merged"/>
</architecture>
<client>
<environment name="CASCADE_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$CASCADE_BASE/lib"/>
Expand Down
28 changes: 8 additions & 20 deletions cascade.spec
Expand Up @@ -23,32 +23,20 @@ rm -rf %{n}
# it to the library location so that it links correctly.
PYTHIA="$PYTHIA6_ROOT"
LHAPDF="$LHAPDF_ROOT"
case %cmsplatf in
slc5_*_gcc4[0123]*)
F77="`which gfortran`"
PLATF_CONFIG_OPTS="--enable-shared"
;;
*)
F77="`which gfortran` -fPIC"
PLATF_CONFIG_OPTS="--enable-static --disable-shared"
LIBS='-lstdc++ -lz'
;;
esac
F77="$(which gfortran) -fPIC"
PLATF_CONFIG_OPTS="--enable-static --disable-shared"
LIBS="-lstdc++ -lz"
./configure $PLATF_CONFIG_OPTS --with-pythia6=$PYTHIA --with-lhapdf=$LHAPDF --prefix=%i F77="$F77" LIBS="$LIBS"
%build
make %makeprocesses

%install
make install

# In case we build archive libraries we need to merge all of them, because
# otherwise that results some missing symbol due to a circular dependency among
# them which cannot be solved by reshuffling the various -l statements.
case %cmsplatf in
slc5_*_gcc4[0123]*) ;;
*)
cd %i/lib
find . -name "*.a" -exec ar -x {} \;
ar rcs libcascade_merged.a *.o
rm -rf *.o
;;
esac
cd %{i}/lib
find . -name '*.a' -exec ar -x {} \;
ar rcs libcascade_merged.a *.o
rm -rf *.o

0 comments on commit 0faf6a4

Please sign in to comment.