pure darwin stdenv

This commit is contained in:
Jude Taylor
2015-06-11 17:58:26 -07:00
parent 5e63669520
commit fa9c81f694
19 changed files with 435 additions and 132 deletions

View File

@@ -19,7 +19,12 @@ stdenv.mkDerivation (rec {
"--with-included-gettext"
"--with-included-glib"
"--with-included-libcroco"
]);
])
# avoid retaining reference to CF during stdenv bootstrap
++ (stdenv.lib.optionals stdenv.isDarwin [
"gt_cv_func_CFPreferencesCopyAppValue=no"
"gt_cv_func_CFLocaleCopyCurrent=no"
]);
# On cross building, gettext supposes that the wchar.h from libc
# does not fulfill gettext needs, so it tries to work with its

View File

@@ -32,6 +32,11 @@ stdenv.mkDerivation {
configureFlags = "--disable-debug" +
stdenv.lib.optionalString stdenv.isDarwin " --enable-rpath";
# remove dependency on bootstrap-tools in early stdenv build
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
sed -i 's/INSTALL_CMD=.*install/INSTALL_CMD=install/' $out/lib/icu/${version}/pkgdata.inc
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {

View File

@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
] else null;
postInstall = ''
sed -i ${stdenv.lib.optionalString (stdenv.isDarwin && stdenv.cc.nativeTools) "''"} s/-lncurses/-lncursesw/g $out/lib/pkgconfig/libedit.pc
sed -i s/-lncurses/-lncursesw/g $out/lib/pkgconfig/libedit.pc
'';
configureFlags = [ "--enable-widec" ];

View File

@@ -13,6 +13,13 @@ stdenv.mkDerivation (rec {
sha256 = "039agw5rqvqny92cpkrfn243x2gd4xn13hs3xi6isk55d2vqqr9n";
};
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace configure \
--replace '/usr/bin/libtool' 'ar' \
--replace 'AR="libtool"' 'AR="ar"' \
--replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
'';
configureFlags = if static then "" else "--shared";
preConfigure = ''