fix even more clang builds

This commit is contained in:
Joel Taylor 2014-08-23 23:15:23 -07:00
parent fa9b1f9cda
commit afa1db198b
4 changed files with 22 additions and 5 deletions

View File

@ -16,6 +16,15 @@ stdenv.mkDerivation rec {
configureFlags = [ "--enable-ILU" "--enable-ILUT" ];
preConfigure = ''
sed -i 's, -std=gnu99,,g' configure
sed -i 's,malloc.h,stdlib.h,g' src-ILU/ilur/ilur.c
'';
postConfigure = ''
sed -i '/RESTRICT_KEYWORD/d' include/IL/config.h
'';
patches =
[ ( fetchurl {
url = http://patch-tracker.debian.org/patch/series/dl/devil/1.7.8-6.1/03_CVE-2009-3994.diff;

View File

@ -102,8 +102,11 @@ in
# Note: most of these are in Requires.private, so maybe builder.sh
# should propagate them automatically.
libXt = attrs: attrs // {
preConfigure = setMalloc0ReturnsNullCrossCompiling;
preConfigure = setMalloc0ReturnsNullCrossCompiling + ''
sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure
'';
propagatedBuildInputs = [ xorg.libSM ];
CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -";
};
# See https://bugs.freedesktop.org/show_bug.cgi?id=47792

View File

@ -299,4 +299,9 @@ rec {
''; # */
in overrideGCC stdenv (stdenv.gcc.override { binutils = binutils'; });
dropCxx = drv: drv.override {
stdenv = if pkgs.stdenv.isDarwin
then pkgs.allStdenvs.stdenvDarwinNaked
else pkgs.stdenv;
};
}

View File

@ -4574,7 +4574,7 @@ let
coredumper = callPackage ../development/libraries/coredumper { };
ctl = callPackage ../development/libraries/ctl { };
ctl = dropCxx (callPackage ../development/libraries/ctl { });
cpp-netlib = callPackage ../development/libraries/cpp-netlib { };
@ -5079,7 +5079,7 @@ let
ilixi = callPackage ../development/libraries/ilixi { };
ilmbase = callPackage ../development/libraries/ilmbase { };
ilmbase = dropCxx (callPackage ../development/libraries/ilmbase { });
imlib = callPackage ../development/libraries/imlib {
libpng = libpng12;
@ -5253,7 +5253,7 @@ let
libdc1394avt = callPackage ../development/libraries/libdc1394avt { };
libdevil = callPackage ../development/libraries/libdevil { };
libdevil = dropCxx (callPackage ../development/libraries/libdevil { });
libdiscid = callPackage ../development/libraries/libdiscid { };
@ -5994,7 +5994,7 @@ let
# this ctl version is needed by openexr_viewers
openexr_ctl = callPackage ../development/libraries/openexr_ctl { };
openexr = callPackage ../development/libraries/openexr { };
openexr = dropCxx (callPackage ../development/libraries/openexr { });
openldap = callPackage ../development/libraries/openldap {
stdenv = if stdenv.isDarwin