Merge pull request #34209 from LnL7/darwin-libR

R: fix dylib install_name on darwin
This commit is contained in:
Peter Simons 2018-01-24 12:59:07 +01:00 committed by GitHub
commit 9ffaa69da4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,10 +19,14 @@ stdenv.mkDerivation rec {
pango pcre perl readline texLive xz zlib less texinfo graphviz icu pango pcre perl readline texLive xz zlib less texinfo graphviz icu
pkgconfig bison imake which jdk openblas curl pkgconfig bison imake which jdk openblas curl
] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ tcl tk ] ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ tcl tk ]
++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa Foundation cf-private libobjc ]; ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa Foundation libobjc ];
patches = [ ./no-usr-local-search-paths.patch ]; patches = [ ./no-usr-local-search-paths.patch ];
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace configure --replace "-install_name libR.dylib" "-install_name $out/lib/R/lib/libR.dylib"
'';
preConfigure = '' preConfigure = ''
configureFlagsArray=( configureFlagsArray=(
--disable-lto --disable-lto
@ -40,8 +44,8 @@ stdenv.mkDerivation rec {
--enable-R-shlib --enable-R-shlib
AR=$(type -p ar) AR=$(type -p ar)
AWK=$(type -p gawk) AWK=$(type -p gawk)
CC=$(type -p gcc) CC=$(type -p cc)
CXX=$(type -p g++) CXX=$(type -p c++)
FC="${gfortran}/bin/gfortran" F77="${gfortran}/bin/gfortran" FC="${gfortran}/bin/gfortran" F77="${gfortran}/bin/gfortran"
JAVA_HOME="${jdk}" JAVA_HOME="${jdk}"
RANLIB=$(type -p ranlib) RANLIB=$(type -p ranlib)
@ -50,8 +54,6 @@ stdenv.mkDerivation rec {
--without-tcltk --without-tcltk
--without-aqua --without-aqua
--disable-R-framework --disable-R-framework
CC="clang"
CXX="clang++"
OBJC="clang" OBJC="clang"
'' + '' '' + ''
) )