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