2013-12-23 18:06:09 +01:00
|
|
|
{ stdenv, fetchurl, fetchsvn, pkgconfig, zlib, libjpeg, xz }:
|
2012-05-15 23:13:46 +02:00
|
|
|
|
2013-12-23 18:06:09 +01:00
|
|
|
let
|
|
|
|
version = "4.0.3";
|
|
|
|
patchDir = fetchsvn {
|
|
|
|
url = svn://svn.archlinux.org/packages/libtiff/trunk;
|
|
|
|
rev = "198247";
|
|
|
|
sha256 = "0a47l0zkc1zz7wxg64cyjv9z1djdvfyxgmwd03znlsac4zijkcy4";
|
|
|
|
};
|
|
|
|
in
|
2012-05-15 23:13:46 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "libtiff-${version}";
|
2012-09-26 20:59:48 +02:00
|
|
|
|
2003-11-06 16:24:19 +01:00
|
|
|
src = fetchurl {
|
2010-07-20 01:24:16 +02:00
|
|
|
urls =
|
2012-05-15 23:13:46 +02:00
|
|
|
[ "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${version}.tar.gz"
|
|
|
|
"http://download.osgeo.org/libtiff/tiff-${version}.tar.gz"
|
2010-07-20 01:24:16 +02:00
|
|
|
];
|
2013-01-29 13:32:55 +01:00
|
|
|
sha256 = "0wj8d1iwk9vnpax2h29xqc2hwknxg3s0ay2d5pxkg59ihbifn6pa";
|
2003-11-06 16:24:19 +01:00
|
|
|
};
|
2012-05-15 23:13:46 +02:00
|
|
|
|
2013-12-23 18:06:09 +01: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 18:51:35 +01: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 18:06:09 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ zlib libjpeg xz ]; #TODO: opengl support (bogus configure detection)
|
2009-10-29 15:19:58 +01:00
|
|
|
|
2012-05-15 23:13:46 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2013-12-23 18:06:09 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
2014-07-30 18:04:57 +02:00
|
|
|
meta = with stdenv.lib; {
|
2009-10-29 15:19:58 +01:00
|
|
|
description = "Library and utilities for working with the TIFF image file format";
|
2013-01-29 13:32:55 +01:00
|
|
|
homepage = http://www.remotesensing.org/libtiff/;
|
2014-07-30 18:04:57 +02:00
|
|
|
license = licenses.libtiff;
|
2014-08-12 19:07:05 +02:00
|
|
|
platforms = platforms.unix;
|
2009-10-29 15:19:58 +01:00
|
|
|
};
|
2003-11-06 16:24:19 +01:00
|
|
|
}
|