2021-01-19 06:50:56 +00:00
|
|
|
{ stdenv, fetchFromGitHub, pkg-config, glib, cairo, Carbon, fontconfig
|
2018-07-21 00:44:44 +00: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
|
|
|
|
2019-09-22 07:38:09 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libgdiplus";
|
2020-05-05 16:34:41 +00:00
|
|
|
version = "6.0.5";
|
2012-01-04 13:55:54 +00:00
|
|
|
|
2018-03-05 13:39:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mono";
|
|
|
|
repo = "libgdiplus";
|
2019-09-22 07:38:09 +00:00
|
|
|
rev = version;
|
2020-05-05 16:34:41 +00:00
|
|
|
sha256 = "1387lgph5r17viv3rkf5hbksdn435njzmra7s17q0nzk2mkkm68c";
|
2012-01-04 13:55:54 +00:00
|
|
|
};
|
|
|
|
|
2013-12-07 12:32:57 +00:00
|
|
|
NIX_LDFLAGS = "-lgif";
|
|
|
|
|
2019-09-20 11:28:34 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2018-05-28 20:53:19 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2018-03-05 13:39:01 +00:00
|
|
|
|
2019-11-09 19:31:37 +00:00
|
|
|
configureFlags = stdenv.lib.optional stdenv.cc.isClang "--host=${stdenv.hostPlatform.system}";
|
2019-10-27 21:20:00 +00:00
|
|
|
|
2020-08-25 05:41:25 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
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 16:06:29 +00: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 18:31:22 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Mono library that provides a GDI+-compatible API on non-Windows operating systems";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.mono-project.com/docs/gui/libgdiplus/";
|
2018-10-17 18:31:22 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.mit;
|
2016-08-02 16:06:29 +00:00
|
|
|
};
|
2012-01-04 13:55:54 +00:00
|
|
|
}
|