3
0
Fork 0
forked from mirrors/nixpkgs

libtiff: pull (mostly) security patches from Arch

Also enable lzma support and check phase.
This commit is contained in:
Vladimír Čunát 2013-12-23 18:06:09 +01:00
parent 51c83e927d
commit a1cfb23d73

View file

@ -1,7 +1,13 @@
{ stdenv, fetchurl, zlib, libjpeg }:
let version = "4.0.3"; in
{ stdenv, fetchurl, fetchsvn, pkgconfig, zlib, libjpeg, xz }:
let
version = "4.0.3";
patchDir = fetchsvn {
url = svn://svn.archlinux.org/packages/libtiff/trunk;
rev = "198247";
sha256 = "0a47l0zkc1zz7wxg64cyjv9z1djdvfyxgmwd03znlsac4zijkcy4";
};
in
stdenv.mkDerivation rec {
name = "libtiff-${version}";
@ -13,10 +19,27 @@ stdenv.mkDerivation rec {
sha256 = "0wj8d1iwk9vnpax2h29xqc2hwknxg3s0ay2d5pxkg59ihbifn6pa";
};
propagatedBuildInputs = [ zlib libjpeg ];
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
)
patch -p0 < ${patchDir}/*-tiff2pdf-colors.patch
'';
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ zlib libjpeg xz ]; #TODO: opengl support (bogus configure detection)
enableParallelBuilding = true;
doCheck = true;
meta = {
description = "Library and utilities for working with the TIFF image file format";
homepage = http://www.remotesensing.org/libtiff/;