From 07d93630f5da33246a54c3cbcd2fd5909fb62947 Mon Sep 17 00:00:00 2001 From: Nikola Forró Date: Jan 24 2017 13:34:17 +0000 Subject: Fix Hylafax breakage (#1416042) --- diff --git a/libtiff-hylafax-fix.patch b/libtiff-hylafax-fix.patch new file mode 100644 index 0000000..cdf2fcd --- /dev/null +++ b/libtiff-hylafax-fix.patch @@ -0,0 +1,35 @@ +From dacc8bd0dd8b50e9d1c84c4c19aedcbb8f026bee Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 24 Jan 2017 14:32:18 +0100 +Subject: [PATCH] * libtiff/tif_fax3.h: revert change done on 2016-01-09 that + made Param member of TIFFFaxTabEnt structure a uint16 to reduce size of the + binary. It happens that the Hylafax software uses the tables that follow this + typedef (TIFFFaxMainTable, TIFFFaxWhiteTable, TIFFFaxBlackTable), also they + are not in a public libtiff header. Raised by Lee Howard. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2636 + +--- + libtiff/tif_fax3.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/libtiff/tif_fax3.h b/libtiff/tif_fax3.h +index e0b2ca6..1715d3e 100644 +--- a/libtiff/tif_fax3.h ++++ b/libtiff/tif_fax3.h +@@ -81,10 +81,12 @@ extern void _TIFFFax3fillruns(unsigned char*, uint32*, uint32*, uint32); + #define S_MakeUp 11 + #define S_EOL 12 + ++/* WARNING: do not change the layout of this structure as the HylaFAX software */ ++/* really depends on it. See http://bugzilla.maptools.org/show_bug.cgi?id=2636 */ + typedef struct { /* state table entry */ + unsigned char State; /* see above */ + unsigned char Width; /* width of code in bits */ +- uint16 Param; /* unsigned 16-bit run length in bits */ ++ uint32 Param; /* unsigned 32-bit run length in bits (holds on 16 bit actually, but cannot be changed. See above warning) */ + } TIFFFaxTabEnt; + + extern const TIFFFaxTabEnt TIFFFaxMainTable[]; +-- +2.7.4 + diff --git a/libtiff.spec b/libtiff.spec index 8d3aa26..1f1b07c 100644 --- a/libtiff.spec +++ b/libtiff.spec @@ -1,7 +1,7 @@ Summary: Library of functions for manipulating TIFF format image files Name: libtiff Version: 4.0.7 -Release: 1%{?dist} +Release: 2%{?dist} License: libtiff Group: System Environment/Libraries URL: http://www.simplesystems.org/libtiff/ @@ -10,6 +10,7 @@ Source: ftp://ftp.simplesystems.org/pub/libtiff/tiff-%{version}.tar.gz Patch0: libtiff-am-version.patch Patch1: libtiff-make-check.patch +Patch2: libtiff-hylafax-fix.patch BuildRequires: zlib-devel libjpeg-devel jbigkit-devel BuildRequires: libtool automake autoconf pkgconfig @@ -62,6 +63,7 @@ image files using the libtiff library. %patch0 -p1 %patch1 -p1 +%patch2 -p1 # Use build system's libtool.m4, not the one in the package. rm -f libtool.m4 @@ -167,6 +169,9 @@ find html -name 'Makefile*' | xargs rm %{_mandir}/man1/* %changelog +* Tue Jan 24 2017 Nikola Forró - 4.0.7-2 +- Fix Hylafax breakage (#1416042) + * Fri Dec 09 2016 Nikola Forró - 4.0.7-1 - New upstream version libtiff-4.0.7 (#1403163)