[csw-devel] SF.net SVN: gar:[16472] csw/mgar/pkg/tiff/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Mon Dec 12 13:52:45 CET 2011


Revision: 16472
          http://gar.svn.sourceforge.net/gar/?rev=16472&view=rev
Author:   dmichelsen
Date:     2011-12-12 12:52:45 +0000 (Mon, 12 Dec 2011)
Log Message:
-----------
tiff: Update to 3.9.5, general rework

Modified Paths:
--------------
    csw/mgar/pkg/tiff/trunk/Makefile
    csw/mgar/pkg/tiff/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/tiff/trunk/files/0001-Keep-norunpath-during-linkage.patch

Removed Paths:
-------------
    csw/mgar/pkg/tiff/trunk/files/libtiff-CVE-2009-2347.patch
    csw/mgar/pkg/tiff/trunk/files/libtiff-jpeg-scanline.patch
    csw/mgar/pkg/tiff/trunk/files/libtiff-mantypo.patch
    csw/mgar/pkg/tiff/trunk/files/libtiff-scanlinesize.patch

Modified: csw/mgar/pkg/tiff/trunk/Makefile
===================================================================
--- csw/mgar/pkg/tiff/trunk/Makefile	2011-12-12 11:25:34 UTC (rev 16471)
+++ csw/mgar/pkg/tiff/trunk/Makefile	2011-12-12 12:52:45 UTC (rev 16472)
@@ -1,5 +1,5 @@
 NAME = tiff
-VERSION = 3.9.2
+VERSION = 3.9.5
 CATEGORIES = lib
 
 DESCRIPTION = Lib and tools for Tag Image File Format
@@ -7,107 +7,69 @@
 endef
 
 MASTER_SITES =  http://download.osgeo.org/libtiff/
-DISTFILES  = $(NAME)-$(VERSION).tar.gz
-DISTNAME  = $(NAME)-$(VERSION)
+DISTFILES += $(DISTNAME).tar.gz
 
-PACKAGES = CSWtiff CSWtiffrt CSWtiffdevel CSWtiffdoc
-CATALOGNAME_CSWtiff = tiff
-CATALOGNAME_CSWtiffrt = tiff_rt
-CATALOGNAME_CSWtiffdevel = tiff_devel
-CATALOGNAME_CSWtiffdoc = tiff_doc
+PATCHFILES += 0001-Keep-norunpath-during-linkage.patch
 
-SPKG_DESC_CSWtiff += $(DESCRIPTION)
-SPKG_DESC_CSWtiffrt +=  $(DESCRIPTION) - runtime package
-SPKG_DESC_CSWtiffdevel += $(DESCRIPTION) - developer package
-SPKG_DESC_CSWtiffdoc += $(DESCRIPTION) - documentation
+VENDOR_URL = http://www.remotesensing.org/libtiff/
 
-RUNTIME_DEP_PKGS_CSWtiff += CSWtiffrt CSWjbigkit CSWjpeg CSWzlib
-RUNTIME_DEP_PKGS_CSWtiffrt += CSWjbigkit CSWjpeg CSWzlib
-RUNTIME_DEP_PKGS_CSWtiffdevel += CSWtiffrt
-RUNTIME_DEP_PKGS_CSWtiffdoc += 
+LICENSE = COPYRIGHT
 
-PKGFILES_CSWtiffrt = $(PKGFILES_RT)
-PKGFILES_CSWtiffdevel = $(PKGFILES_DEVEL)
-PKGFILES_CSWtiffdoc = $(sharedstatedir)/doc/.*
+PACKAGES = CSWtiff
+SPKG_DESC_CSWtiff += Tools for Tag Image File Format manipulation
+PKGFILES_CSWtiff += $(bindir)/.*
+PKGFILES_CSWtiff += $(mandir)/man1/.*
+RUNTIME_DEP_PKGS_CSWtiff += CSWlibtiff3
+RUNTIME_DEP_PKGS_CSWtiff += CSWlibjpeg7
+RUNTIME_DEP_PKGS_CSWtiff += CSWjbigkit
+RUNTIME_DEP_PKGS_CSWtiff += CSWfreeglut
+RUNTIME_DEP_PKGS_CSWtiff += CSWmesa
+RUNTIME_DEP_PKGS_CSWtiff += CSWlibz1
 
-ARCHALL_CSWtiffdoc = 1
+# There are legacy packages dependencing on CSWtiff who have not a SONAME binding and
+# require libtiff.so to be available
+RUNTIME_DEP_PKGS_CSWtiff += CSWlibtiff-dev
+CHECKPKG_OVERRIDES_CSWtiff += surplus-dependency|CSWlibtiff-dev
 
-CHECKPKG_OVERRIDES_CSWtiffdevel += missing-dependency|CSWtiff
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffcmp
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|pal2rgb
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|fax2tiff
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffcp
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|ppm2tiff
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffmedian
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|raw2tiff
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|thumbnail
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiff2ps
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|bmp2tiff
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|ras2tiff
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|rgb2ycbcr
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiff2bw
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffcrop
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffset
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|fax2ps
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffinfo
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffdump
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiff2rgba
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|gif2tiff
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffdither
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffsplit
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffinfo
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiff2bw
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffdump
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffset
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffcp
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|gif2tiff
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffcrop
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|thumbnail
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffmedian
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|ppm2tiff
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|pal2rgb
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffcmp
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|rgb2ycbcr
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|raw2tiff
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|bmp2tiff
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|ras2tiff
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffdither
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|fax2ps
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|fax2tiff
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiff2ps
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiffsplit
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiff2rgba
-CHECKPKG_OVERRIDES_CSWtiff += symbol-not-found|tiff2pdf
+PACKAGES += CSWlibtiff3
+SPKG_DESC_CSWlibtiff3 = Tag Image File Format library for C, libtiff.so.3
+PKGFILES_CSWlibtiff3 += $(call pkgfiles_lib,libtiff.so.3)
+RUNTIME_DEP_PKGS_CSWlibtiff3 += CSWlibjpeg7
+RUNTIME_DEP_PKGS_CSWlibtiff3 += CSWjbigkit
+RUNTIME_DEP_PKGS_CSWlibtiff3 += CSWlibz1
 
-LICENSE = COPYRIGHT
+PACKAGES += CSWlibtiffxx3
+SPKG_DESC_CSWlibtiffxx3 = Tag Image File Format library for C++, libtiffcxx.so.3
+PKGFILES_CSWlibtiffxx3 += $(call pkgfiles_lib,libtiffxx.so.3)
+RUNTIME_DEP_PKGS_CSWlibtiffxx3 += CSWlibjpeg7
+RUNTIME_DEP_PKGS_CSWlibtiffxx3 += CSWjbigkit
+RUNTIME_DEP_PKGS_CSWlibtiffxx3 += CSWlibz1
+RUNTIME_DEP_PKGS_CSWlibtiffxx3 += CSWlibtiff3
 
-UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.bz2
+PACKAGES += CSWlibtiff-dev
+SPKG_DESC_CSWlibtiff-dev += Development files for libtiff.so.3 and libtiffxx.so.3
+# PKGFILES is catchall
+RUNTIME_DEP_PKGS_CSWlibtiff-dev += CSWlibtiff3
+RUNTIME_DEP_PKGS_CSWlibtiff-dev += CSWlibtiffxx3
 
-SPKG_SOURCEURL = http://www.remotesensing.org/libtiff/
+# There are docs only
+CHECKPKG_OVERRIDES_CSWlibtiff-dev += file-with-bad-content|/usr/local|root/opt/csw/share/doc/tiff/ChangeLog
+CHECKPKG_OVERRIDES_CSWlibtiff-dev += file-with-bad-content|/usr/local|root/opt/csw/share/doc/tiff/html/build.html
 
-# Patches from upstream (found via src.opensolaris.org), not applied for now
-#PATCHFILES += libtiff-mantypo.patch
-#PATCHFILES += libtiff-scanlinesize.patch
-#PATCHFILES += libtiff-jpeg-scanline.patch
-#PATCHFILES += libtiff-CVE-2009-2347.patch
+EXTRA_LINKER_FLAGS += -norunpath
 
 BUILD64 = 1
+ISAEXEC = 1
 
-STRIP_LIBTOOL = 1
-
-EXTRA_INC = $(prefix)/X11/include
-EXTRA_LIB = $(prefix)/X11/lib
-EXTRA_PKG_CONFIG_DIRS = $(prefix)/X11/lib
-
 CONFIGURE_ARGS = $(DIRPATHS)
 CONFIGURE_ARGS += --with-docdir=$(docdir)/tiff
 CONFIGURE_ARGS += --disable-static
 CONFIGURE_ARGS += --enable-cxx
-CONFIGURE_ARGS += --with-zlib-include-dir=/opt/csw/include
-CONFIGURE_ARGS += --with-zlib-lib-dir=/opt/csw/lib
-CONFIGURE_ARGS += --with-jpeg-include-dir=/opt/csw/include
-CONFIGURE_ARGS += --with-jpeg-lib-dir=/opt/csw/lib
-CONFIGURE_ARGS += --with-jbig-include-dir=/opt/csw/include
-CONFIGURE_ARGS += --with-jbig-lib-dir=/opt/csw/lib
+CONFIGURE_ARGS += --with-zlib-include-dir=$(includedir)
+CONFIGURE_ARGS += --with-zlib-lib-dir=$(libdir)
+CONFIGURE_ARGS += --with-jpeg-include-dir=$(includedir)
+CONFIGURE_ARGS += --with-jpeg-lib-dir=$(libdir)
+CONFIGURE_ARGS += --with-jbig-include-dir=$(includedir)
+CONFIGURE_ARGS += --with-jbig-lib-dir=$(libdir)
 
 include gar/category.mk

Modified: csw/mgar/pkg/tiff/trunk/checksums
===================================================================
--- csw/mgar/pkg/tiff/trunk/checksums	2011-12-12 11:25:34 UTC (rev 16471)
+++ csw/mgar/pkg/tiff/trunk/checksums	2011-12-12 12:52:45 UTC (rev 16472)
@@ -1 +1 @@
-93e56e421679c591de7552db13384cb8  tiff-3.9.2.tar.gz
+8fc7ce3b4e1d0cc8a319336967815084  tiff-3.9.5.tar.gz

Added: csw/mgar/pkg/tiff/trunk/files/0001-Keep-norunpath-during-linkage.patch
===================================================================
--- csw/mgar/pkg/tiff/trunk/files/0001-Keep-norunpath-during-linkage.patch	                        (rev 0)
+++ csw/mgar/pkg/tiff/trunk/files/0001-Keep-norunpath-during-linkage.patch	2011-12-12 12:52:45 UTC (rev 16472)
@@ -0,0 +1,25 @@
+From 38d3de7945093afc2095a944630feff1507fb76c Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Mon, 12 Dec 2011 12:08:10 +0100
+Subject: [PATCH] Keep -norunpath during linkage
+
+---
+ config/ltmain.sh |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/config/ltmain.sh b/config/ltmain.sh
+index 3061e3c..5817d54 100755
+--- a/config/ltmain.sh
++++ b/config/ltmain.sh
+@@ -5840,7 +5840,7 @@ func_mode_link ()
+       # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+-      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
++      -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-norunpath)
+         func_quote_for_eval "$arg"
+ 	arg="$func_quote_for_eval_result"
+         func_append compile_command " $arg"
+-- 
+1.7.6.1
+

Deleted: csw/mgar/pkg/tiff/trunk/files/libtiff-CVE-2009-2347.patch
===================================================================
--- csw/mgar/pkg/tiff/trunk/files/libtiff-CVE-2009-2347.patch	2011-12-12 11:25:34 UTC (rev 16471)
+++ csw/mgar/pkg/tiff/trunk/files/libtiff-CVE-2009-2347.patch	2011-12-12 12:52:45 UTC (rev 16472)
@@ -1,90 +0,0 @@
-http://bugzilla.maptools.org/show_bug.cgi?id=2079
-
-
-diff -Naur tiff-3.9.2.orig/tools/tiff2rgba.c tiff-3.9.2/tools/tiff2rgba.c
---- tiff-3.9.2.orig/tools/tiff2rgba.c	2009-08-20 16:23:53.000000000 -0400
-+++ tiff-3.9.2/tools/tiff2rgba.c	2009-12-03 12:19:07.000000000 -0500
-@@ -125,6 +125,17 @@
-     return (0);
- }
- 
-+static tsize_t
-+multiply(tsize_t m1, tsize_t m2)
-+{
-+    tsize_t prod = m1 * m2;
-+
-+    if (m1 && prod / m1 != m2)
-+        prod = 0;		/* overflow */
-+
-+    return prod;
-+}
-+
- static int
- cvt_by_tile( TIFF *in, TIFF *out )
- 
-@@ -134,6 +145,7 @@
-     uint32  tile_width, tile_height;
-     uint32  row, col;
-     uint32  *wrk_line;
-+    tsize_t raster_size;
-     int	    ok = 1;
- 
-     TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width);
-@@ -151,7 +163,14 @@
-     /*
-      * Allocate tile buffer
-      */
--    raster = (uint32*)_TIFFmalloc(tile_width * tile_height * sizeof (uint32));
-+    raster_size = multiply(multiply(tile_width, tile_height), sizeof (uint32));
-+    if (!raster_size) {
-+	TIFFError(TIFFFileName(in),
-+		  "Can't allocate buffer for raster of size %lux%lu",
-+		  (unsigned long) tile_width, (unsigned long) tile_height);
-+	return (0);
-+    }
-+    raster = (uint32*)_TIFFmalloc(raster_size);
-     if (raster == 0) {
-         TIFFError(TIFFFileName(in), "No space for raster buffer");
-         return (0);
-@@ -159,7 +178,7 @@
- 
-     /*
-      * Allocate a scanline buffer for swapping during the vertical
--     * mirroring pass.
-+     * mirroring pass.  (Request can't overflow given prior checks.)
-      */
-     wrk_line = (uint32*)_TIFFmalloc(tile_width * sizeof (uint32));
-     if (!wrk_line) {
-@@ -236,6 +255,7 @@
-     uint32  width, height;		/* image width & height */
-     uint32  row;
-     uint32  *wrk_line;
-+    tsize_t raster_size;
-     int	    ok = 1;
- 
-     TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width);
-@@ -251,7 +271,14 @@
-     /*
-      * Allocate strip buffer
-      */
--    raster = (uint32*)_TIFFmalloc(width * rowsperstrip * sizeof (uint32));
-+    raster_size = multiply(multiply(width, rowsperstrip), sizeof (uint32));
-+    if (!raster_size) {
-+	TIFFError(TIFFFileName(in),
-+		  "Can't allocate buffer for raster of size %lux%lu",
-+		  (unsigned long) width, (unsigned long) rowsperstrip);
-+	return (0);
-+    }
-+    raster = (uint32*)_TIFFmalloc(raster_size);
-     if (raster == 0) {
-         TIFFError(TIFFFileName(in), "No space for raster buffer");
-         return (0);
-@@ -259,7 +286,7 @@
- 
-     /*
-      * Allocate a scanline buffer for swapping during the vertical
--     * mirroring pass.
-+     * mirroring pass.  (Request can't overflow given prior checks.)
-      */
-     wrk_line = (uint32*)_TIFFmalloc(width * sizeof (uint32));
-     if (!wrk_line) {

Deleted: csw/mgar/pkg/tiff/trunk/files/libtiff-jpeg-scanline.patch
===================================================================
--- csw/mgar/pkg/tiff/trunk/files/libtiff-jpeg-scanline.patch	2011-12-12 11:25:34 UTC (rev 16471)
+++ csw/mgar/pkg/tiff/trunk/files/libtiff-jpeg-scanline.patch	2011-12-12 12:52:45 UTC (rev 16472)
@@ -1,59 +0,0 @@
-http://bugzilla.maptools.org/show_bug.cgi?id=1936
-
-
-diff -Naur tiff-3.9.2.orig/libtiff/tif_dir.c tiff-3.9.2/libtiff/tif_dir.c
---- tiff-3.9.2.orig/libtiff/tif_dir.c	2008-12-31 19:10:43.000000000 -0500
-+++ tiff-3.9.2/libtiff/tif_dir.c	2010-01-05 19:59:12.000000000 -0500
-@@ -1100,6 +1100,13 @@
- 	 */
- 	tif->tif_flags &= ~TIFF_ISTILED;
- 
-+	/*
-+	 * Clear other directory-specific fields.
-+	 */
-+	tif->tif_tilesize = -1;
-+	tif->tif_scanlinesize = -1;
-+	
-+
- 	return (1);
- }
- 
-diff -Naur tiff-3.9.2.orig/libtiff/tif_jpeg.c tiff-3.9.2/libtiff/tif_jpeg.c
---- tiff-3.9.2.orig/libtiff/tif_jpeg.c	2009-08-30 12:21:46.000000000 -0400
-+++ tiff-3.9.2/libtiff/tif_jpeg.c	2010-01-05 19:59:12.000000000 -0500
-@@ -1613,7 +1613,11 @@
- 	 * Must recalculate cached tile size in case sampling state changed.
- 	 * Should we really be doing this now if image size isn't set? 
- 	 */
--	tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tsize_t) -1;
-+        if( tif->tif_tilesize > 0 )
-+            tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tsize_t) -1;
-+
-+        if(tif->tif_scanlinesize > 0 )
-+            tif->tif_scanlinesize = TIFFScanlineSize(tif); 
- }
- 
- static int
-@@ -1741,13 +1745,21 @@
- 			return;
-     }
-     else
--	{
-+    {
-         if( !TIFFFillStrip( tif, 0 ) )
-             return;
-     }
- 
-     TIFFSetField( tif, TIFFTAG_YCBCRSUBSAMPLING, 
-                   (uint16) sp->h_sampling, (uint16) sp->v_sampling );
-+
-+    /*
-+    ** We want to clear the loaded strip so the application has time
-+    ** to set JPEGCOLORMODE or other behavior modifiers.  This essentially
-+    ** undoes the JPEGPreDecode triggers by TIFFFileStrip().  (#1936)
-+    */
-+    tif->tif_curstrip = -1;
-+
- #endif /* CHECK_JPEG_YCBCR_SUBSAMPLING */
- }
- 

Deleted: csw/mgar/pkg/tiff/trunk/files/libtiff-mantypo.patch
===================================================================
--- csw/mgar/pkg/tiff/trunk/files/libtiff-mantypo.patch	2011-12-12 11:25:34 UTC (rev 16471)
+++ csw/mgar/pkg/tiff/trunk/files/libtiff-mantypo.patch	2011-12-12 12:52:45 UTC (rev 16472)
@@ -1,15 +0,0 @@
-http://bugzilla.maptools.org/show_bug.cgi?id=2129
-
-
-diff -Naur tiff-3.9.2.orig/man/tiffset.1 tiff-3.9.2/man/tiffset.1
---- tiff-3.9.2.orig/man/tiffset.1	2006-04-20 08:17:19.000000000 -0400
-+++ tiff-3.9.2/man/tiffset.1	2009-12-03 12:11:58.000000000 -0500
-@@ -60,7 +60,7 @@
- ``Anonymous'':
- .RS
- .nf
--tiffset \-s 305 Anonymous a.tif
-+tiffset \-s 315 Anonymous a.tif
- .fi
- .RE
- .PP

Deleted: csw/mgar/pkg/tiff/trunk/files/libtiff-scanlinesize.patch
===================================================================
--- csw/mgar/pkg/tiff/trunk/files/libtiff-scanlinesize.patch	2011-12-12 11:25:34 UTC (rev 16471)
+++ csw/mgar/pkg/tiff/trunk/files/libtiff-scanlinesize.patch	2011-12-12 12:52:45 UTC (rev 16472)
@@ -1,68 +0,0 @@
-http://bugzilla.maptools.org/show_bug.cgi?id=2140
-
-
-diff -Naur tiff-3.9.2.orig/libtiff/tif_jpeg.c tiff-3.9.2/libtiff/tif_jpeg.c
---- tiff-3.9.2.orig/libtiff/tif_jpeg.c	2009-08-30 12:21:46.000000000 -0400
-+++ tiff-3.9.2/libtiff/tif_jpeg.c	2010-01-05 22:40:40.000000000 -0500
-@@ -988,8 +988,15 @@
- 	tsize_t nrows;
- 	(void) s;
- 
--	/* data is expected to be read in multiples of a scanline */
--	if ( (nrows = sp->cinfo.d.image_height) ) {
-+    nrows = cc / sp->bytesperline;
-+    if (cc % sp->bytesperline)
-+		TIFFWarningExt(tif->tif_clientdata, tif->tif_name, "fractional scanline not read");
-+
-+    if( nrows > (int) sp->cinfo.d.image_height )
-+        nrows = sp->cinfo.d.image_height;
-+
-+    /* data is expected to be read in multiples of a scanline */
-+    if (nrows) {
- 		/* Cb,Cr both have sampling factors 1, so this is correct */
- 		JDIMENSION clumps_per_line = sp->cinfo.d.comp_info[1].downsampled_width;            
- 		int samples_per_clump = sp->samplesperclump;
-@@ -1087,8 +1094,7 @@
- 			 * TODO: resolve this */
- 			buf += sp->bytesperline;
- 			cc -= sp->bytesperline;
--			nrows -= sp->v_sampling;
--		} while (nrows > 0);
-+		} while (--nrows > 0);
- 
- #ifdef JPEG_LIB_MK1
- 		_TIFFfree(tmpbuf);
-diff -Naur tiff-3.9.2.orig/libtiff/tif_strip.c tiff-3.9.2/libtiff/tif_strip.c
---- tiff-3.9.2.orig/libtiff/tif_strip.c	2006-03-25 13:04:35.000000000 -0500
-+++ tiff-3.9.2/libtiff/tif_strip.c	2010-01-05 21:39:20.000000000 -0500
-@@ -238,23 +238,19 @@
- 				     ycbcrsubsampling + 0,
- 				     ycbcrsubsampling + 1);
- 
--			if (ycbcrsubsampling[0] == 0) {
-+			if (ycbcrsubsampling[0]*ycbcrsubsampling[1] == 0) {
- 				TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- 					     "Invalid YCbCr subsampling");
- 				return 0;
- 			}
- 
--			scanline = TIFFroundup(td->td_imagewidth,
-+			/* number of sample clumps per line */
-+			scanline = TIFFhowmany(td->td_imagewidth,
- 					       ycbcrsubsampling[0]);
--			scanline = TIFFhowmany8(multiply(tif, scanline,
--							 td->td_bitspersample,
--							 "TIFFScanlineSize"));
--			return ((tsize_t)
--				summarize(tif, scanline,
--					  multiply(tif, 2,
--						scanline / ycbcrsubsampling[0],
--						"TIFFVStripSize"),
--					  "TIFFVStripSize"));
-+			/* number of samples per line */
-+			scanline = multiply(tif, scanline,
-+					    ycbcrsubsampling[0]*ycbcrsubsampling[1] + 2,
-+					    "TIFFScanlineSize");
- 		} else {
- 			scanline = multiply(tif, td->td_imagewidth,
- 					    td->td_samplesperpixel,

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list