+++ /dev/null
---- tiff-4.0.0/libtiff/tif_dir.c.orig 2011-02-19 17:26:09.000000000 +0100
-+++ tiff-4.0.0/libtiff/tif_dir.c 2011-12-24 10:43:18.779372638 +0100
-@@ -153,6 +153,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va
- {
- static const char module[] = "_TIFFVSetField";
-
-+ const TIFFField* fip;
- TIFFDirectory* td = &tif->tif_dir;
- int status = 1;
- uint32 v32, i, v;
-@@ -660,17 +661,19 @@ end:
- va_end(ap);
- return (status);
- badvalue:
-+ fip = TIFFFieldWithTag(tif, tag);
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Bad value %u for \"%s\" tag",
- tif->tif_name, v,
-- TIFFFieldWithTag(tif, tag)->field_name);
-+ fip ? fip->field_name : "Unknown");
- va_end(ap);
- return (0);
- badvalue32:
-+ fip = TIFFFieldWithTag(tif, tag);
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Bad value %u for \"%s\" tag",
- tif->tif_name, v32,
-- TIFFFieldWithTag(tif, tag)->field_name);
-+ fip ? fip->field_name : "Unknown");
- va_end(ap);
- return (0);
- }
---- tiff-4.0.0/libtiff/tif_dirread.c.orig 2011-12-22 00:18:41.000000000 +0100
-+++ tiff-4.0.0/libtiff/tif_dirread.c 2011-12-24 10:39:34.932698478 +0100
-@@ -3897,6 +3897,7 @@ TIFFReadDirectory(TIFF* tif)
- * Attempt to deal with a missing StripByteCounts tag.
- */
- if (!TIFFFieldSet(tif, FIELD_STRIPBYTECOUNTS)) {
-+ const TIFFField* fip = TIFFFieldWithTag(tif, TIFFTAG_STRIPBYTECOUNTS);
- /*
- * Some manufacturers violate the spec by not giving
- * the size of the strips. In this case, assume there
-@@ -3912,7 +3913,7 @@ TIFFReadDirectory(TIFF* tif)
- TIFFWarningExt(tif->tif_clientdata, module,
- "TIFF directory is missing required "
- "\"%s\" field, calculating from imagelength",
-- TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
-+ fip ? fip->field_name : "Unknown");
- if (EstimateStripByteCounts(tif, dir, dircount) < 0)
- goto bad;
- /*
-@@ -3940,6 +3941,7 @@ TIFFReadDirectory(TIFF* tif)
- && _TIFFFillStriles(tif)
- && tif->tif_dir.td_stripoffset[0] != 0
- && BYTECOUNTLOOKSBAD) {
-+ const TIFFField* fip = TIFFFieldWithTag(tif, TIFFTAG_STRIPBYTECOUNTS);
- /*
- * XXX: Plexus (and others) sometimes give a value of
- * zero for a tag when they don't know what the
-@@ -3948,7 +3950,7 @@ TIFFReadDirectory(TIFF* tif)
- */
- TIFFWarningExt(tif->tif_clientdata, module,
- "Bogus \"%s\" field, ignoring and calculating from imagelength",
-- TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
-+ fip ? fip->field_name : "Unknown");
- if(EstimateStripByteCounts(tif, dir, dircount) < 0)
- goto bad;
-
-@@ -3959,6 +3961,7 @@ TIFFReadDirectory(TIFF* tif)
- && tif->tif_dir.td_stripbytecount[0] != tif->tif_dir.td_stripbytecount[1]
- && tif->tif_dir.td_stripbytecount[0] != 0
- && tif->tif_dir.td_stripbytecount[1] != 0 ) {
-+ const TIFFField* fip = TIFFFieldWithTag(tif, TIFFTAG_STRIPBYTECOUNTS);
- /*
- * XXX: Some vendors fill StripByteCount array with
- * absolutely wrong values (it can be equal to
-@@ -3971,7 +3974,7 @@ TIFFReadDirectory(TIFF* tif)
- */
- TIFFWarningExt(tif->tif_clientdata, module,
- "Wrong \"%s\" field, ignoring and calculating from imagelength",
-- TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
-+ fip ? fip->field_name : "Unknown");
- if (EstimateStripByteCounts(tif, dir, dircount) < 0)
- goto bad;
- #endif /* !defined(DEFER_STRILE_LOAD) */
-# TODO: libjpeg12 support (separate libjpeg compiled with 12-bits/sample)
#
# Conditional build:
-%bcond_without opengl # do not build OpenGL viewer
+%bcond_without opengl # do not build OpenGL viewer
+%bcond_with jpeg12 # dual 8/12-bit libjpeg mode
#
Summary: Library for handling TIFF files
Summary(de.UTF-8): Library zum Verwalten von TIFF-Dateien
Summary(pl.UTF-8): Biblioteka do manipulacji plikami w formacie TIFF
Summary(tr.UTF-8): TIFF dosyalarını işleme kitaplığı
Name: libtiff
-Version: 4.0.0
+Version: 4.0.1
Release: 1
License: BSD-like
Group: Libraries
Source0: http://download.osgeo.org/libtiff/tiff-%{version}.tar.gz
-# Source0-md5: 456ad12e7c492b275a0d047f2ba89904
+# Source0-md5: fae149cc9da35c598d8be897826dfc63
Patch0: %{name}-glut.patch
-Patch1: %{name}-sec.patch
URL: http://www.remotesensing.org/libtiff/
%{?with_opengl:BuildRequires: OpenGL-glut-devel}
BuildRequires: autoconf >= 2.64
BuildRequires: automake >= 1:1.11
BuildRequires: jbigkit-devel
BuildRequires: libjpeg-devel
+%{?with_jpeg12:BuildRequires: libjpeg12-devel}
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 2:2.2
%{?with_opengl:BuildRequires: xorg-lib-libX11-devel}
Requires: %{name} = %{version}-%{release}
Requires: jbigkit-devel
Requires: libjpeg-devel
+%{?with_jpeg12:Requires: libjpeg12-devel}
Requires: xz-devel
Requires: zlib-devel
%prep
%setup -q -n tiff-%{version}
%patch0 -p1
-%patch1 -p1
%build
%{__libtoolize}
%{__autoheader}
%{__automake}
%configure \
- %{!?with_opengl:--without-x}
+ %{!?with_opengl:--without-x} \
+ %{?with_jpeg12:--enable-jpeg12 --with-jpeg12-include-dir=%{_includedir}/libjpeg12 --with-jpeg12-lib=-ljpeg12}
%{__make}