cernlib: fix for gfortran10

This commit is contained in:
Dmitry Kalinkin 2021-11-21 15:18:57 -05:00
parent 06e83482be
commit 87d20e352f
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333

View file

@ -35,18 +35,30 @@ stdenv.mkDerivation rec {
export PATH=$PATH:$CERN_ROOT/bin
'';
FFLAGS = lib.optionals (lib.versionAtLeast gfortran.version "10.0.0") [
# Fix https://github.com/vmc-project/geant3/issues/17
"-fallow-invalid-boz"
# Fix for gfortran 10
"-fallow-argument-mismatch"
];
makeFlags = [
"FORTRANOPTIONS=$(FFLAGS)"
];
buildPhase = ''
cd $CERN_ROOT
mkdir -p build bin lib
cd $CERN_ROOT/build
$CVSCOSRC/config/imake_boot
make -j $NIX_BUILD_CORES bin/kuipc
make -j $NIX_BUILD_CORES scripts/Makefile
make -j $NIX_BUILD_CORES $makeFlags bin/kuipc
make -j $NIX_BUILD_CORES $makeFlags scripts/Makefile
pushd scripts
make -j $NIX_BUILD_CORES install.bin
make -j $NIX_BUILD_CORES $makeFlags install.bin
popd
make -j $NIX_BUILD_CORES
make -j $NIX_BUILD_CORES $makeFlags
'';
installPhase = ''