nixpkgs/pkgs/development/libraries/freeimage/default.nix
Lluís Batlle i Rossell d2c00001f8 freeimage: updating to 3.17
It is buggy in 32-bit: sizeof(uint64) != 8 !!.
2016-03-31 12:35:57 +02:00

31 lines
1 KiB
Nix

{stdenv, fetchurl, unzip}:
stdenv.mkDerivation {
name = "freeimage-3.17.0";
src = fetchurl {
url = mirror://sourceforge/freeimage/FreeImage3170.zip;
sha256 = "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v";
};
buildInputs = [ unzip ];
prePatch = ''
sed -e s@/usr/@$out/@ \
-e 's@-o root -g root@@' \
-e 's@ldconfig@echo not running ldconfig@' \
-i Makefile.gnu Makefile.fip
# Fix gcc 5.1 macro problems
# https://chromium.googlesource.com/webm/libwebp/+/eebaf97f5a1cb713d81d311308d8a48c124e5aef%5E!/
sed -i -e 's/"\(#[^"]*\)"/" \1 "/g' Source/LibWebP/src/dsp/*
'';
postBuild = "make -f Makefile.fip";
preInstall = "mkdir -p $out/include $out/lib";
postInstall = "make -f Makefile.fip install";
meta = {
description = "Open Source library for accessing popular graphics image file formats";
homepage = http://freeimage.sourceforge.net/;
license = "GPL";
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
};
}