perl: fuse configureFlags

This commit is contained in:
Robin Gloster 2019-05-08 00:42:47 +02:00 committed by Jan Tojnar
parent a69e309794
commit 3b50d0462a
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -91,7 +91,13 @@ let
]
++ optionals ((builtins.match ''5\.[0-9]*[13579]\..+'' version) != null) [ "-Dusedevel" "-Uversiononly" ]
++ optional stdenv.isSunOS "-Dcc=gcc"
++ optional enableThreading "-Dusethreads";
++ optional enableThreading "-Dusethreads"
++ optionals (!crossCompiling) [
"-Dprefix=${placeholder "out"}"
"-Dman1dir=${placeholder "out"}/share/man/man1"
"-Dman3dir=${placeholder "out"}/share/man/man3"
]
++ optional (stdenv.isAarch32 || stdenv.isMips) "-Dldflags=\"-lm -lrt\"";
configureScript = optionalString (!crossCompiling) "${stdenv.shell} ./Configure";
@ -102,10 +108,6 @@ let
preConfigure = ''
substituteInPlace ./Configure --replace '`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`' 'Thu Jan 1 00:00:01 UTC 1970'
substituteInPlace ./Configure --replace '$uname -a' '$uname --kernel-name --machine --operating-system'
'' + optionalString (!crossCompiling) ''
configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3"
'' + optionalString (stdenv.isAarch32 || stdenv.isMips) ''
configureFlagsArray=(-Dldflags="-lm -lrt")
'' + optionalString stdenv.isDarwin ''
substituteInPlace hints/darwin.sh --replace "env MACOSX_DEPLOYMENT_TARGET=10.3" ""
'' + optionalString (!enableThreading) ''