2016-01-24 03:49:50 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, glib, cairo, Carbon, fontconfig
|
2018-07-21 01:44:44 +01:00
|
|
|
, libtiff, giflib, libjpeg, libpng
|
2012-03-06 13:49:37 +00:00
|
|
|
, libXrender, libexif }:
|
2012-01-04 13:55:54 +00:00
|
|
|
|
2012-03-06 13:49:37 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2012-03-06 20:23:34 +00:00
|
|
|
name = "libgdiplus-2.10.9";
|
2012-01-04 13:55:54 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://download.mono-project.com/sources/libgdiplus/${name}.tar.bz2";
|
2012-03-06 20:23:34 +00:00
|
|
|
sha256 = "0klnbly2q0yx5p0l5z8da9lhqsjj9xqj06kdw2v7rnms4z1vdpkd";
|
2012-01-04 13:55:54 +00:00
|
|
|
};
|
|
|
|
|
2013-12-07 12:32:57 +00:00
|
|
|
NIX_LDFLAGS = "-lgif";
|
|
|
|
|
2012-03-06 13:49:37 +00:00
|
|
|
patches =
|
|
|
|
[ (fetchurl {
|
2013-04-06 09:38:54 +01:00
|
|
|
url = "https://raw.github.com/MagicGroup/MagicSpecLib/master/libgdiplus/libgdiplus-2.10.1-libpng15.patch";
|
2012-03-06 13:49:37 +00:00
|
|
|
sha256 = "130r0jm065pjvbz5dkx96w37vj1wqc8fakmi2znribs14g0bl65f";
|
|
|
|
})
|
2013-12-07 12:32:57 +00:00
|
|
|
./giflib.patch
|
2012-03-06 13:49:37 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
patchFlags = "-p0";
|
|
|
|
|
2018-05-28 21:53:19 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2012-03-06 13:49:37 +00:00
|
|
|
buildInputs =
|
2018-05-04 22:10:21 +01:00
|
|
|
[ pkgconfig glib cairo fontconfig libtiff giflib
|
2012-03-06 13:49:37 +00:00
|
|
|
libjpeg libpng libXrender libexif
|
2016-01-24 03:49:50 +00:00
|
|
|
]
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin Carbon;
|
2016-08-02 17:06:29 +01:00
|
|
|
|
2017-02-07 19:00:48 +00:00
|
|
|
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
ln -s $out/lib/libgdiplus.0.dylib $out/lib/libgdiplus.so
|
|
|
|
'';
|
|
|
|
|
2018-10-17 19:31:22 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Mono library that provides a GDI+-compatible API on non-Windows operating systems";
|
|
|
|
homepage = https://www.mono-project.com/docs/gui/libgdiplus/;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.mit;
|
2016-08-02 17:06:29 +01:00
|
|
|
};
|
2012-01-04 13:55:54 +00:00
|
|
|
}
|