R: Add static argument.
R's autoconf does not use the normal configure flags for that.
This commit is contained in:
parent
0347078949
commit
edbe2d8145
1 changed files with 6 additions and 1 deletions
|
@ -4,6 +4,9 @@
|
||||||
, curl, Cocoa, Foundation, libobjc, libcxx, tzdata, fetchpatch
|
, curl, Cocoa, Foundation, libobjc, libcxx, tzdata, fetchpatch
|
||||||
, withRecommendedPackages ? true
|
, withRecommendedPackages ? true
|
||||||
, enableStrictBarrier ? false
|
, enableStrictBarrier ? false
|
||||||
|
# R as of writing does not support outputting both .so and .a files; it outputs:
|
||||||
|
# --enable-R-static-lib conflicts with --enable-R-shlib and will be ignored
|
||||||
|
, static ? false
|
||||||
, javaSupport ? (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64)
|
, javaSupport ? (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64)
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -33,6 +36,8 @@ stdenv.mkDerivation rec {
|
||||||
substituteInPlace configure --replace "-install_name libR.dylib" "-install_name $out/lib/R/lib/libR.dylib"
|
substituteInPlace configure --replace "-install_name libR.dylib" "-install_name $out/lib/R/lib/libR.dylib"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
dontDisableStatic = static;
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
configureFlagsArray=(
|
configureFlagsArray=(
|
||||||
--disable-lto
|
--disable-lto
|
||||||
|
@ -47,7 +52,7 @@ stdenv.mkDerivation rec {
|
||||||
--with-libtiff
|
--with-libtiff
|
||||||
--with-ICU
|
--with-ICU
|
||||||
${stdenv.lib.optionalString enableStrictBarrier "--enable-strict-barrier"}
|
${stdenv.lib.optionalString enableStrictBarrier "--enable-strict-barrier"}
|
||||||
--enable-R-shlib
|
${if static then "--enable-R-static-lib" else "--enable-R-shlib"}
|
||||||
AR=$(type -p ar)
|
AR=$(type -p ar)
|
||||||
AWK=$(type -p gawk)
|
AWK=$(type -p gawk)
|
||||||
CC=$(type -p cc)
|
CC=$(type -p cc)
|
||||||
|
|
Loading…
Reference in a new issue