2018-03-05 13:39:01 +00:00
|
|
|
{ stdenv, fetchFromGitHub, pkgconfig, glib, cairo, Carbon, fontconfig
|
2018-07-21 01:44:44 +01:00
|
|
|
, libtiff, giflib, libjpeg, libpng
|
2018-03-09 18:28:28 +00:00
|
|
|
, libXrender, libexif, autoreconfHook, fetchpatch }:
|
2012-01-04 13:55:54 +00:00
|
|
|
|
2012-03-06 13:49:37 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-03-25 21:45:58 +00:00
|
|
|
name = "libgdiplus-5.6.1";
|
2012-01-04 13:55:54 +00:00
|
|
|
|
2018-03-05 13:39:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mono";
|
|
|
|
repo = "libgdiplus";
|
2019-03-25 21:45:58 +00:00
|
|
|
rev = "5.6.1";
|
|
|
|
sha256 = "023xf3l2s0mxcdbl2viglzrkhx3lwcrpm66fiq7cfdqz80d4vsj2";
|
2012-01-04 13:55:54 +00:00
|
|
|
};
|
|
|
|
|
2013-12-07 12:32:57 +00:00
|
|
|
NIX_LDFLAGS = "-lgif";
|
|
|
|
|
2018-03-09 18:28:28 +00:00
|
|
|
patches = [ # Series of patches cherry-picked from master, all fixes various sigsegv (or required by other patch)
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/mono/libgdiplus/commit/d33a2580a94701ff33abe28c22881d6173be57d0.patch";
|
|
|
|
sha256 = "0rr54jylscn4icqjprqhwrncyr92r0d7kmfrrq3myskplpqv1c11";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url ="https://github.com/mono/libgdiplus/commit/aa6aa53906935572f52f519fe4ab9ebedc051d08.patch";
|
|
|
|
sha256 = "1wg0avm8qv5cb4vk80baflfzszm6q7ydhn89c3h6kq68hg6zsf1f";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/mono/libgdiplus/commit/81e45a1d5a3ac3cf035bcc3fabb2859818b6cc04.patch";
|
|
|
|
sha256 = "07wmc88cd1lqifs5x6npryni65jyy9gi8lgr2i1lb7v0fhvlyswg";
|
|
|
|
})
|
|
|
|
];
|
2012-03-06 13:49:37 +00:00
|
|
|
|
2018-05-28 21:53:19 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2018-03-05 13:39:01 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
|
|
|
|
2012-03-06 13:49:37 +00:00
|
|
|
buildInputs =
|
2018-03-05 13:39:01 +00:00
|
|
|
[ 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-03-09 18:28:28 +00:00
|
|
|
checkPhase = ''
|
|
|
|
make check -w
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
}
|