freeimage: fix build with gcc6
This commit is contained in:
parent
8cae089f19
commit
d31b3a9e6d
@ -1,11 +1,15 @@
|
|||||||
{stdenv, fetchurl, unzip, darwin}:
|
{ stdenv, fetchurl, unzip, darwin }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "freeimage-3.17.0";
|
name = "freeimage-3.17.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = mirror://sourceforge/freeimage/FreeImage3170.zip;
|
url = mirror://sourceforge/freeimage/FreeImage3170.zip;
|
||||||
sha256 = "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v";
|
sha256 = "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ unzip ] ++ stdenv.lib.optional stdenv.isDarwin darwin.cctools;
|
buildInputs = [ unzip ] ++ stdenv.lib.optional stdenv.isDarwin darwin.cctools;
|
||||||
|
|
||||||
prePatch = if stdenv.isDarwin
|
prePatch = if stdenv.isDarwin
|
||||||
then ''
|
then ''
|
||||||
sed -e 's/gcc-4.0/clang/g' \
|
sed -e 's/gcc-4.0/clang/g' \
|
||||||
@ -38,6 +42,8 @@ stdenv.mkDerivation {
|
|||||||
preInstall = "mkdir -p $out/include $out/lib";
|
preInstall = "mkdir -p $out/include $out/lib";
|
||||||
postInstall = stdenv.lib.optionalString (!stdenv.isDarwin) "make -f Makefile.fip install";
|
postInstall = stdenv.lib.optionalString (!stdenv.isDarwin) "make -f Makefile.fip install";
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE = "-Wno-narrowing";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Open Source library for accessing popular graphics image file formats";
|
description = "Open Source library for accessing popular graphics image file formats";
|
||||||
homepage = http://freeimage.sourceforge.net/;
|
homepage = http://freeimage.sourceforge.net/;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user