2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch }:
|
2015-03-27 19:41:22 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-22 14:21:29 +01:00
|
|
|
pname = "libfpx";
|
|
|
|
version = "1.3.1-7";
|
2015-03-27 19:41:22 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-22 14:21:29 +01:00
|
|
|
url = "mirror://imagemagick/delegates/${pname}-${version}.tar.xz";
|
2016-09-25 16:34:22 +01:00
|
|
|
sha256 = "1s28mwb06w6dj0zl6ashpj8m1qiyadawzl7cvbw7dmj1w39ipghh";
|
2015-03-27 19:41:22 +00:00
|
|
|
};
|
|
|
|
|
2015-04-01 01:40:38 +01:00
|
|
|
# Darwin gets misdetected as Windows without this
|
2021-01-21 17:00:13 +00:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-D__unix";
|
2015-04-01 01:40:38 +01:00
|
|
|
|
2017-09-04 14:23:45 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libfpx/files/libfpx-1.3.1_p6-gcc6.patch?id=f28a947813dbc0a1fd1a8d4a712d58a64c48ca01";
|
|
|
|
sha256 = "032y8110zgnkdhkdq3745zk53am1x34d912rai8q70k3sskyq22p";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2015-04-01 01:40:38 +01:00
|
|
|
# This dead code causes a duplicate symbol error in Clang so just remove it
|
2015-05-11 22:37:53 +01:00
|
|
|
postPatch = if stdenv.cc.isClang then ''
|
2015-04-01 01:40:38 +01:00
|
|
|
substituteInPlace jpeg/ejpeg.h --replace "int No_JPEG_Header_Flag" ""
|
|
|
|
'' else null;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.imagemagick.org";
|
2015-03-27 19:41:22 +00:00
|
|
|
description = "A library for manipulating FlashPIX images";
|
|
|
|
license = "Flashpix";
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|