2013-12-23 17:06:09 +00:00
|
|
|
{ stdenv, fetchurl, fetchsvn, pkgconfig, zlib, libjpeg, xz }:
|
2012-05-15 22:13:46 +01:00
|
|
|
|
2013-12-23 17:06:09 +00:00
|
|
|
let
|
|
|
|
version = "4.0.3";
|
|
|
|
patchDir = fetchsvn {
|
|
|
|
url = svn://svn.archlinux.org/packages/libtiff/trunk;
|
|
|
|
rev = "198247";
|
|
|
|
sha256 = "0a47l0zkc1zz7wxg64cyjv9z1djdvfyxgmwd03znlsac4zijkcy4";
|
|
|
|
};
|
|
|
|
in
|
2012-05-15 22:13:46 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "libtiff-${version}";
|
2012-09-26 19:59:48 +01:00
|
|
|
|
2003-11-06 15:24:19 +00:00
|
|
|
src = fetchurl {
|
2010-07-20 00:24:16 +01:00
|
|
|
urls =
|
2012-05-15 22:13:46 +01:00
|
|
|
[ "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${version}.tar.gz"
|
|
|
|
"http://download.osgeo.org/libtiff/tiff-${version}.tar.gz"
|
2010-07-20 00:24:16 +01:00
|
|
|
];
|
2013-01-29 12:32:55 +00:00
|
|
|
sha256 = "0wj8d1iwk9vnpax2h29xqc2hwknxg3s0ay2d5pxkg59ihbifn6pa";
|
2003-11-06 15:24:19 +00:00
|
|
|
};
|
2012-05-15 22:13:46 +01:00
|
|
|
|
2013-12-23 17:06:09 +00:00
|
|
|
patchPhase = ''
|
|
|
|
for p in ${patchDir}/*-{2013-4244,2012-4447,2012-4564,2013-1960,2013-1961,libjpeg-turbo}.patch; do
|
|
|
|
patch -p1 < "$p"
|
|
|
|
done
|
|
|
|
(
|
|
|
|
cd tools
|
|
|
|
for p in ${patchDir}/*-CVE-{2013-4231,2013-4232}.patch; do
|
|
|
|
patch -p0 < "$p"
|
|
|
|
done
|
|
|
|
)
|
2013-12-25 17:51:35 +00:00
|
|
|
patch -p0 < ${patchDir}/${if stdenv.isDarwin then "tiff-4.0.3" else "*"}-tiff2pdf-colors.patch
|
|
|
|
''; # ^ sh on darwin seems not to expand globs in redirects, and I don't want to rebuild all again elsewhere
|
2013-12-23 17:06:09 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ zlib libjpeg xz ]; #TODO: opengl support (bogus configure detection)
|
2009-10-29 14:19:58 +00:00
|
|
|
|
2012-05-15 22:13:46 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2013-12-23 17:06:09 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2014-07-30 17:04:57 +01:00
|
|
|
meta = with stdenv.lib; {
|
2009-10-29 14:19:58 +00:00
|
|
|
description = "Library and utilities for working with the TIFF image file format";
|
2013-01-29 12:32:55 +00:00
|
|
|
homepage = http://www.remotesensing.org/libtiff/;
|
2014-07-30 17:04:57 +01:00
|
|
|
license = licenses.libtiff;
|
2014-08-12 18:07:05 +01:00
|
|
|
platforms = platforms.unix;
|
2009-10-29 14:19:58 +00:00
|
|
|
};
|
2003-11-06 15:24:19 +00:00
|
|
|
}
|