2016-05-09 12:56:41 +00:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, pkgconfig
|
|
|
|
, zlib
|
|
|
|
, libpng
|
2016-06-02 17:06:34 +00:00
|
|
|
, libjpeg ? null
|
|
|
|
, libwebp ? null
|
2016-05-09 12:56:41 +00:00
|
|
|
, libtiff ? null
|
|
|
|
, libXpm ? null
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
}:
|
2007-09-21 20:43:43 +00:00
|
|
|
|
2016-05-09 12:56:41 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gd-${version}";
|
2017-09-18 20:10:15 +00:00
|
|
|
version = "2.2.5";
|
2015-12-23 01:59:47 +00:00
|
|
|
|
2007-09-21 20:43:43 +00:00
|
|
|
src = fetchurl {
|
2016-05-09 12:56:41 +00:00
|
|
|
url = "https://github.com/libgd/libgd/releases/download/${name}/libgd-${version}.tar.xz";
|
2017-09-18 20:10:15 +00:00
|
|
|
sha256 = "0lfy5f241sbv8s3splm2zqiaxv7lxrcshh875xryryk7yk5jqc4c";
|
2007-09-21 20:43:43 +00:00
|
|
|
};
|
2015-12-23 01:59:47 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2015-12-23 01:59:47 +00:00
|
|
|
|
2016-07-18 19:00:23 +00:00
|
|
|
# -pthread gets passed to clang, causing warnings
|
|
|
|
configureFlags = stdenv.lib.optional stdenv.isDarwin "--enable-werror=no";
|
|
|
|
|
2016-07-23 12:18:24 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2016-07-21 00:56:43 +00:00
|
|
|
|
2016-06-02 17:06:34 +00:00
|
|
|
buildInputs = [ zlib fontconfig freetype ];
|
|
|
|
propagatedBuildInputs = [ libpng libjpeg libwebp libtiff libXpm ];
|
2007-09-21 20:43:43 +00:00
|
|
|
|
2016-08-29 00:30:01 +00:00
|
|
|
outputs = [ "bin" "dev" "out" ];
|
2016-05-22 12:03:16 +00:00
|
|
|
|
|
|
|
postFixup = ''moveToOutput "bin/gdlib-config" $dev'';
|
2007-09-21 20:43:43 +00:00
|
|
|
|
2016-06-02 17:50:28 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-08-08 18:34:25 +00:00
|
|
|
doCheck = false; # fails 2 tests
|
|
|
|
|
2016-05-09 12:56:41 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://libgd.github.io/;
|
|
|
|
description = "A dynamic image creation library";
|
|
|
|
license = licenses.free; # some custom license
|
|
|
|
platforms = platforms.unix;
|
2007-09-21 20:43:43 +00:00
|
|
|
};
|
|
|
|
}
|