Merge pull request #34651 from mnacamura/r-darwin-libcxx

R: add libcxx to default LDFLAGS and CPPFLAGS on Darwin
This commit is contained in:
Peter Simons 2018-02-07 08:31:10 +01:00 committed by GitHub
commit fa23ff4a7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
{ stdenv, fetchurl, bzip2, gfortran, libX11, libXmu, libXt, libjpeg, libpng { stdenv, fetchurl, bzip2, gfortran, libX11, libXmu, libXt, libjpeg, libpng
, libtiff, ncurses, pango, pcre, perl, readline, tcl, texLive, tk, xz, zlib , libtiff, ncurses, pango, pcre, perl, readline, tcl, texLive, tk, xz, zlib
, less, texinfo, graphviz, icu, pkgconfig, bison, imake, which, jdk, openblas , less, texinfo, graphviz, icu, pkgconfig, bison, imake, which, jdk, openblas
, curl, Cocoa, Foundation, cf-private, libobjc, tzdata, fetchpatch , curl, Cocoa, Foundation, cf-private, libobjc, libcxx, tzdata, fetchpatch
, withRecommendedPackages ? true , withRecommendedPackages ? true
, enableStrictBarrier ? false , enableStrictBarrier ? false
}: }:
@ -19,7 +19,7 @@ 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 libobjc ]; ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa Foundation libobjc libcxx ];
patches = [ ./no-usr-local-search-paths.patch ]; patches = [ ./no-usr-local-search-paths.patch ];
@ -55,6 +55,8 @@ stdenv.mkDerivation rec {
--without-aqua --without-aqua
--disable-R-framework --disable-R-framework
OBJC="clang" OBJC="clang"
CPPFLAGS="-isystem ${libcxx}/include/c++/v1"
LDFLAGS="-L${libcxx}/lib"
'' + '' '' + ''
) )
echo >>etc/Renviron.in "TCLLIBPATH=${tk}/lib" echo >>etc/Renviron.in "TCLLIBPATH=${tk}/lib"