2016-10-13 22:53:43 +01:00
|
|
|
{ stdenv, fetchurl, fetchpatch, bzip2, freetype, graphviz, ghostscript
|
|
|
|
, libjpeg, libpng, libtiff, libxml2, zlib, libtool, xz, libX11
|
2017-02-28 20:14:24 +00:00
|
|
|
, libwebp, quantumdepth ? 8, fixDarwinDylibNames }:
|
2010-03-04 14:44:47 +00:00
|
|
|
|
2016-09-07 03:54:34 +01:00
|
|
|
let version = "1.3.25"; in
|
2010-03-04 14:44:47 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "graphicsmagick-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2012-02-23 21:14:19 +00:00
|
|
|
url = "mirror://sourceforge/graphicsmagick/GraphicsMagick-${version}.tar.xz";
|
2016-09-07 03:54:34 +01:00
|
|
|
sha256 = "17xcc7pfcmiwpfr1g8ys5a7bdnvqzka53vg3kkzhwwz0s99gljyn";
|
2010-03-04 14:44:47 +00:00
|
|
|
};
|
|
|
|
|
2016-10-13 22:53:43 +01:00
|
|
|
patches = [
|
|
|
|
./disable-popen.patch
|
|
|
|
(fetchpatch {
|
2016-11-24 02:33:48 +00:00
|
|
|
url = "https://sources.debian.net/data/main/g/graphicsmagick/1.3.25-5/debian/patches/CVE-2016-7996_CVE-2016-7997.patch";
|
2016-10-13 22:53:43 +01:00
|
|
|
sha256 = "0xsby2z8n7cnnln7szjznq7iaabq323wymvdjra59yb41aix74r2";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
2016-11-24 02:33:48 +00:00
|
|
|
url = "https://sources.debian.net/data/main/g/graphicsmagick/1.3.25-5/debian/patches/CVE-2016-7800_part1.patch";
|
2016-10-13 22:53:43 +01:00
|
|
|
sha256 = "02s0x9bkbnm5wrd0d2x9ld4d9z5xqpfk310lyylyr5zlnhqxmwgn";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
2016-11-24 02:33:48 +00:00
|
|
|
url = "https://sources.debian.net/data/main/g/graphicsmagick/1.3.25-5/debian/patches/CVE-2016-7800_part2.patch";
|
2016-10-13 22:53:43 +01:00
|
|
|
sha256 = "1h4xv3i1aq5avsd584rwa5sa7ca8f7w9ggmh7j2llqq5kymwsv5f";
|
|
|
|
})
|
2016-11-02 13:20:35 +00:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.net/data/main/g/graphicsmagick/1.3.25-5/debian/patches/CVE-2016-8682.patch";
|
|
|
|
sha256 = "1wfirw2yi5y72657kvnbgjs0f9b3rs9nvk8gjbwhb9a03z9ws0y5";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.net/data/main/g/graphicsmagick/1.3.25-5/debian/patches/CVE-2016-8683.patch";
|
|
|
|
sha256 = "102252zb34nj6alk1nhh1wbn3apd2v9rzk7clmm237332yj72vif";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.net/data/main/g/graphicsmagick/1.3.25-5/debian/patches/CVE-2016-8684.patch";
|
|
|
|
sha256 = "1p36gpz904wnmbz1n64x4pdpg8lp9zs3gx0awklxqdvgl8m82vvy";
|
|
|
|
})
|
2017-02-09 12:21:07 +00:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.net/data/main/g/graphicsmagick/1.3.25-7/debian/patches/CVE-2016-9830.patch";
|
|
|
|
sha256 = "0qh15sd7nx7vf9sld4453iml951bwsx2fx84hxc7plhds2k3gjpa";
|
|
|
|
})
|
2016-10-13 22:53:43 +01:00
|
|
|
];
|
2016-05-30 09:26:31 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-shared"
|
|
|
|
"--with-quantum-depth=${toString quantumdepth}"
|
|
|
|
"--with-gslib=yes"
|
|
|
|
];
|
2010-03-04 14:44:51 +00:00
|
|
|
|
2010-03-04 14:44:47 +00:00
|
|
|
buildInputs =
|
|
|
|
[ bzip2 freetype ghostscript graphviz libjpeg libpng libtiff libX11 libxml2
|
2016-05-30 09:26:31 +01:00
|
|
|
zlib libtool libwebp
|
2017-02-28 20:14:24 +00:00
|
|
|
]
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
2010-03-04 14:44:47 +00:00
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ xz ];
|
2012-02-23 21:14:19 +00:00
|
|
|
|
2010-03-04 16:41:10 +00:00
|
|
|
postInstall = ''
|
|
|
|
sed -i 's/-ltiff.*'\'/\'/ $out/bin/*
|
|
|
|
'';
|
|
|
|
|
2010-03-04 14:44:47 +00:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.graphicsmagick.org;
|
|
|
|
description = "Swiss army knife of image processing";
|
|
|
|
license = stdenv.lib.licenses.mit;
|
2012-02-03 21:02:00 +00:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2010-03-04 14:44:47 +00:00
|
|
|
};
|
|
|
|
}
|