head	1.23;
access;
symbols
	pkgsrc-2013Q2:1.23.0.8
	pkgsrc-2013Q2-base:1.23
	pkgsrc-2012Q4:1.23.0.6
	pkgsrc-2012Q4-base:1.23
	pkgsrc-2011Q4:1.23.0.4
	pkgsrc-2011Q4-base:1.23
	pkgsrc-2011Q2:1.23.0.2
	pkgsrc-2011Q2-base:1.23
	pkgsrc-2011Q1:1.22.0.8
	pkgsrc-2011Q1-base:1.22
	pkgsrc-2010Q4:1.22.0.6
	pkgsrc-2010Q4-base:1.22
	pkgsrc-2010Q3:1.22.0.4
	pkgsrc-2010Q3-base:1.22
	pkgsrc-2010Q2:1.22.0.2
	pkgsrc-2009Q4:1.21.0.2
	pkgsrc-2009Q4-base:1.21
	pkgsrc-2009Q2:1.20.0.2
	pkgsrc-2009Q2-base:1.20
	pkgsrc-2009Q1:1.19.0.8
	pkgsrc-2009Q1-base:1.19
	pkgsrc-2008Q4:1.19.0.6
	pkgsrc-2008Q4-base:1.19
	pkgsrc-2008Q3:1.19.0.4
	pkgsrc-2008Q3-base:1.19
	cube-native-xorg:1.19.0.2
	cube-native-xorg-base:1.19
	pkgsrc-2008Q2:1.18.0.22
	pkgsrc-2008Q2-base:1.18
	pkgsrc-2008Q1:1.18.0.20
	pkgsrc-2008Q1-base:1.18
	pkgsrc-2007Q4:1.18.0.18
	pkgsrc-2007Q4-base:1.18
	pkgsrc-2007Q3:1.18.0.16
	pkgsrc-2007Q3-base:1.18
	pkgsrc-2007Q2:1.18.0.14
	pkgsrc-2007Q2-base:1.18
	pkgsrc-2007Q1:1.18.0.12
	pkgsrc-2007Q1-base:1.18
	pkgsrc-2006Q4:1.18.0.10
	pkgsrc-2006Q4-base:1.18
	pkgsrc-2006Q3:1.18.0.8
	pkgsrc-2006Q3-base:1.18
	pkgsrc-2006Q2:1.18.0.6
	pkgsrc-2006Q2-base:1.18
	pkgsrc-2006Q1:1.18.0.4
	pkgsrc-2006Q1-base:1.18
	pkgsrc-2005Q4:1.18.0.2
	pkgsrc-2005Q4-base:1.18
	pkgsrc-2005Q3:1.17.0.2
	pkgsrc-2005Q3-base:1.17
	pkgsrc-2005Q2:1.16.0.2
	pkgsrc-2005Q2-base:1.16
	pkgsrc-2005Q1:1.14.0.2
	pkgsrc-2005Q1-base:1.14
	pkgsrc-2004Q4:1.13.0.18
	pkgsrc-2004Q4-base:1.13
	pkgsrc-2004Q3:1.13.0.16
	pkgsrc-2004Q3-base:1.13
	pkgsrc-2004Q2:1.13.0.14
	pkgsrc-2004Q2-base:1.13
	pkgsrc-2004Q1:1.13.0.12
	pkgsrc-2004Q1-base:1.13
	pkgsrc-2003Q4:1.13.0.10
	pkgsrc-2003Q4-base:1.13
	netbsd-1-6-1:1.13.0.6
	netbsd-1-6-1-base:1.13
	netbsd-1-6:1.13.0.8
	netbsd-1-6-RELEASE-base:1.13
	pkgviews:1.13.0.4
	pkgviews-base:1.13
	buildlink2:1.13.0.2
	buildlink2-base:1.13
	netbsd-1-5-PATCH003:1.13
	netbsd-1-5-PATCH001:1.11
	netbsd-1-5-RELEASE:1.10
	netbsd-1-4-PATCH003:1.10
	netbsd-1-4-PATCH002:1.9
	comdex-fall-1999:1.8
	netbsd-1-4-PATCH001:1.7
	netbsd-1-4-RELEASE:1.6
	netbsd-1-3-PATCH003:1.5
	netbsd-1-3-PATCH002:1.3
	FreeBSD-current-1997-10-05:1.1.1.1
	FREEBSD:1.1.1;
locks; strict;
comment	@# @;


1.23
date	2011.04.12.08.57.57;	author wiz;	state dead;
branches;
next	1.22;

1.22
date	2010.08.04.17.48.22;	author tron;	state Exp;
branches
	1.22.2.1
	1.22.8.1;
next	1.21;

1.21
date	2009.08.24.08.50.33;	author wiz;	state dead;
branches;
next	1.20;

1.20
date	2009.06.22.14.54.44;	author drochner;	state Exp;
branches;
next	1.19;

1.19
date	2008.08.30.08.12.45;	author tron;	state Exp;
branches;
next	1.18;

1.18
date	2005.10.15.17.11.51;	author wiz;	state dead;
branches
	1.18.22.1;
next	1.17;

1.17
date	2005.07.14.13.43.28;	author wiz;	state Exp;
branches;
next	1.16;

1.16
date	2005.05.07.00.47.30;	author toshii;	state Exp;
branches;
next	1.15;

1.15
date	2005.03.23.01.17.45;	author wiz;	state dead;
branches;
next	1.14;

1.14
date	2004.12.28.23.10.10;	author reed;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2002.03.05.10.33.36;	author martti;	state Exp;
branches;
next	1.12;

1.12
date	2001.08.23.00.07.18;	author abs;	state Exp;
branches;
next	1.11;

1.11
date	2001.02.27.09.45.13;	author skrll;	state Exp;
branches;
next	1.10;

1.10
date	2000.03.18.19.43.21;	author jlam;	state Exp;
branches;
next	1.9;

1.9
date	2000.01.06.01.25.25;	author wiz;	state Exp;
branches;
next	1.8;

1.8
date	99.10.08.21.14.34;	author jlam;	state Exp;
branches;
next	1.7;

1.7
date	99.05.20.22.23.29;	author tron;	state Exp;
branches;
next	1.6;

1.6
date	98.10.02.14.57.53;	author tv;	state Exp;
branches;
next	1.5;

1.5
date	98.08.07.10.40.54;	author agc;	state Exp;
branches;
next	1.4;

1.4
date	98.07.20.15.51.30;	author tv;	state Exp;
branches;
next	1.3;

1.3
date	98.05.13.09.51.39;	author agc;	state Exp;
branches;
next	1.2;

1.2
date	97.12.01.00.02.02;	author hubertf;	state Exp;
branches;
next	1.1;

1.1
date	97.10.06.13.29.39;	author agc;	state Exp;
branches
	1.1.1.1;
next	;

1.22.2.1
date	2010.08.04.17.48.22;	author spz;	state dead;
branches;
next	1.22.2.2;

1.22.2.2
date	2010.08.04.21.23.39;	author spz;	state Exp;
branches;
next	;

1.22.8.1
date	2011.06.14.11.52.02;	author tron;	state dead;
branches;
next	;

1.18.22.1
date	2008.09.06.02.17.45;	author rtr;	state Exp;
branches;
next	;

1.14.2.1
date	2005.05.12.23.21.16;	author snj;	state Exp;
branches;
next	;

1.1.1.1
date	97.10.06.13.29.39;	author agc;	state Exp;
branches;
next	;


desc
@@


1.23
log
@Update to 3.9.5:
Many bugs and security issues are resolved in this stable release.
@
text
@$NetBSD: patch-ac,v 1.22 2010/08/04 17:48:22 tron Exp $

Fix for	CVE-2010-2482 taken from here:

http://bugzilla.maptools.org/show_bug.cgi?id=1996

--- tools/tiffsplit.c.orig	2010-06-08 19:50:44.000000000 +0100
+++ tools/tiffsplit.c	2010-08-04 18:14:07.000000000 +0100
@@@@ -237,7 +237,10 @@@@
 		tstrip_t s, ns = TIFFNumberOfStrips(in);
 		uint32 *bytecounts;
 
-		TIFFGetField(in, TIFFTAG_STRIPBYTECOUNTS, &bytecounts);
+		if (!TIFFGetField(in, TIFFTAG_STRIPBYTECOUNTS, &bytecounts)) {
+			fprintf(stderr, "tiffsplit: strip byte counts are missing\n");
+			return (0);
+		}
 		for (s = 0; s < ns; s++) {
 			if (bytecounts[s] > (uint32)bufsize) {
 				buf = (unsigned char *)_TIFFrealloc(buf, bytecounts[s]);
@@@@ -267,7 +270,10 @@@@
 		ttile_t t, nt = TIFFNumberOfTiles(in);
 		uint32 *bytecounts;
 
-		TIFFGetField(in, TIFFTAG_TILEBYTECOUNTS, &bytecounts);
+		if (!TIFFGetField(in, TIFFTAG_TILEBYTECOUNTS, &bytecounts)) {
+			fprintf(stderr, "tiffsplit: tile byte counts are missing\n");
+			return (0);
+		}
 		for (t = 0; t < nt; t++) {
 			if (bytecounts[t] > (uint32) bufsize) {
 				buf = (unsigned char *)_TIFFrealloc(buf, bytecounts[t]);
@


1.22
log
@Add patches from either libtiff's or Red Hat's Bugzilla which fix the
following vulnerabilities:
- CVE-2010-2233
- CVE-2010-2482
- CVE-2010-2483
- CVE-2010-2595
- CVE-2010-2597
There is no patch for CVE-2010-2596 yet. But it is low risk (an assertion
gets triggered) and cannot be exploited after the above vulnerabilities
are fixed (at least if I understood correctly).

No butcher was involved in fixing this package.
@
text
@d1 1
a1 1
$NetBSD$
@


1.22.8.1
log
@Pullup ticket #3456 - requested by wiz
graphics/tiff: security update

Revisions pulled up:
- graphics/tiff/Makefile                                        1.101
- graphics/tiff/distinfo                                        1.52
- graphics/tiff/patches/patch-CVE-2011-1167                     deleted
- graphics/tiff/patches/patch-SA43593                           deleted
- graphics/tiff/patches/patch-aa                                deleted
- graphics/tiff/patches/patch-ab                                deleted
- graphics/tiff/patches/patch-ac                                deleted
- graphics/tiff/patches/patch-ad                                deleted
- graphics/tiff/patches/patch-ae                                deleted

---
   Module Name:	pkgsrc
   Committed By:	wiz
   Date:		Tue Apr 12 08:57:57 UTC 2011

   Modified Files:
   	pkgsrc/graphics/tiff: Makefile distinfo
   Removed Files:
   	pkgsrc/graphics/tiff/patches: patch-CVE-2011-1167 patch-SA43593
   	    patch-aa patch-ab patch-ac patch-ad patch-ae

   Log Message:
   Update to 3.9.5:
   Many bugs and security issues are resolved in this stable release.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.22 2010/08/04 17:48:22 tron Exp $
@


1.22.2.1
log
@file patch-ac was added on branch pkgsrc-2010Q2 on 2010-08-04 21:23:39 +0000
@
text
@d1 32
@


1.22.2.2
log
@Pullup ticket 3197 - requested by tron
security patches

Revisions pulled up:
- pkgsrc/graphics/tiff/Makefile		1.97
- pkgsrc/graphics/tiff/distinfo		1.49

Files added:
pkgsrc/graphics/tiff/patches/patch-aa
pkgsrc/graphics/tiff/patches/patch-ab
pkgsrc/graphics/tiff/patches/patch-ac
pkgsrc/graphics/tiff/patches/patch-ad
pkgsrc/graphics/tiff/patches/patch-ae

-------------------------------------------------------------------------
   Module Name:    pkgsrc
   Committed By:   tron
   Date:           Wed Aug  4 17:48:22 UTC 2010

   Modified Files:
           pkgsrc/graphics/tiff: Makefile distinfo
   Added Files:
           pkgsrc/graphics/tiff/patches: patch-aa patch-ab patch-ac patch-ad
               patch-ae

   Log Message:
   Add patches from either libtiff's or Red Hat's Bugzilla which fix the
   following vulnerabilities:
   - CVE-2010-2233
   - CVE-2010-2482
   - CVE-2010-2483
   - CVE-2010-2595
   - CVE-2010-2597
   There is no patch for CVE-2010-2596 yet. But it is low risk (an assertion
   gets triggered) and cannot be exploited after the above vulnerabilities
   are fixed (at least if I understood correctly).

   No butcher was involved in fixing this package.


   To generate a diff of this commit:
   cvs rdiff -u -r1.96 -r1.97 pkgsrc/graphics/tiff/Makefile
   cvs rdiff -u -r1.48 -r1.49 pkgsrc/graphics/tiff/distinfo
   cvs rdiff -u -r0 -r1.19 pkgsrc/graphics/tiff/patches/patch-aa
   cvs rdiff -u -r0 -r1.20 pkgsrc/graphics/tiff/patches/patch-ab
   cvs rdiff -u -r0 -r1.22 pkgsrc/graphics/tiff/patches/patch-ac
   cvs rdiff -u -r0 -r1.16 pkgsrc/graphics/tiff/patches/patch-ad
   cvs rdiff -u -r0 -r1.11 pkgsrc/graphics/tiff/patches/patch-ae
@
text
@a0 32
$NetBSD: patch-ac,v 1.22 2010/08/04 17:48:22 tron Exp $

Fix for	CVE-2010-2482 taken from here:

http://bugzilla.maptools.org/show_bug.cgi?id=1996

--- tools/tiffsplit.c.orig	2010-06-08 19:50:44.000000000 +0100
+++ tools/tiffsplit.c	2010-08-04 18:14:07.000000000 +0100
@@@@ -237,7 +237,10 @@@@
 		tstrip_t s, ns = TIFFNumberOfStrips(in);
 		uint32 *bytecounts;
 
-		TIFFGetField(in, TIFFTAG_STRIPBYTECOUNTS, &bytecounts);
+		if (!TIFFGetField(in, TIFFTAG_STRIPBYTECOUNTS, &bytecounts)) {
+			fprintf(stderr, "tiffsplit: strip byte counts are missing\n");
+			return (0);
+		}
 		for (s = 0; s < ns; s++) {
 			if (bytecounts[s] > (uint32)bufsize) {
 				buf = (unsigned char *)_TIFFrealloc(buf, bytecounts[s]);
@@@@ -267,7 +270,10 @@@@
 		ttile_t t, nt = TIFFNumberOfTiles(in);
 		uint32 *bytecounts;
 
-		TIFFGetField(in, TIFFTAG_TILEBYTECOUNTS, &bytecounts);
+		if (!TIFFGetField(in, TIFFTAG_TILEBYTECOUNTS, &bytecounts)) {
+			fprintf(stderr, "tiffsplit: tile byte counts are missing\n");
+			return (0);
+		}
 		for (t = 0; t < nt; t++) {
 			if (bytecounts[t] > (uint32) bufsize) {
 				buf = (unsigned char *)_TIFFrealloc(buf, bytecounts[t]);
@


1.21
log
@Update to 3.9.0:

MAJOR CHANGES:
  * New tiffcrop utility contributed by Richard Nolde. tiffcrop does the
    same as tiffcp, but also can crop, extract, rotate and mirror images.
  * tif_jbig.c: Added support for JBIG compression scheme (34661 code),
    contributed by Lee Howard.
  * Totally new implementation of OJPEG module from Joris Van Damme. No
    need to patch libjpeg anymore. Many OJPEG files should be supported
    now that was not supported previously.

------------------------------------------------

CHANGES IN THE SOFTWARE CONFIGURATION:
  * tif_config.wince.h, tiffconf.wince.h, tif_wince.c: WinCE-specific
    compatibility stuff from Mateusz Loskot.
  * Rename config.h.vc and tif_config.h.vc to config.vc.h and
    tif_config.vc.h for easier identification by folks using an IDE.
  * configure, configure.ac: OJPEG support enabled by default (i.e., whe
    the conformant JPEG support enabled).
  * README.vms, Makefile.am, configure.com, libtiff/{Makefile.am,
    tif_config.h-vms, tif_stream.cxx, tif_vms.c, tiffconf.h-vms}: Added
    support for OpenVMS by Alexey Chupahin.
  * nmake.opt: use /EHsc for VS2005 compatibility. Also define
    _CRT_SECURE_NO_DEPRECATE to avoid noise on VS2005.

------------------------------------------------

CHANGES IN LIBTIFF:
  * tif_dirinfo.c (_TIFFFindFieldInfo): Don't attempt to bsearch() on a
    NULL fieldinfo list. (_TIFFFindFieldInfoByName): Don't attempt to
    lfind() on a NULL fieldinfo list.
  * tif_jpeg.c: Changed JPEGInitializeLibJPEG() so that it will convert
    from decompressor to compressor or compress to decompress if required
    by the force arguments. This works around a problem in where the
    JPEGFixupTestSubsampling() may cause a decompressor to be setup on a
    directory when later a compressor is required with the force flag set.
    Occurs with the addtiffo program for instance.
  * tif_dirwrite.c: Fixed swapping of byte arrays stored in-place in tag
    offsets as per bug
    http://bugzilla.remotesensing.org/show_bug.cgi?id=1363
  * tif_getimage.c: workaround for 'Fractional scanline' error reading
    OJPEG images with rowsperstrip that is not a multiple of vertical
    subsampling factor. This bug is mentioned in
    http://bugzilla.remotesensing.org/show_bug.cgi?id=1390 and
    http://www.asmail.be/msg0054766825.html
  * tif_dirread.c: Added special function to handle SubjectDistance EXIF
    tag as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1362
  * tif_dirread.c, tif_read.c: Type of the byte counters changed from
    tsize_t to uint32 to be able to work with data arrays larger than 2GB.
    Fixes bug http://bugzilla.remotesensing.org/show_bug.cgi?id=89 Idea
    submitted by Matt Hancher.
  * tif_dir.c: Workaround for incorrect TIFFs with ExtraSamples == 999
    produced by Corel Draw. As per bug
    http://bugzilla.remotesensing.org/show_bug.cgi?id=1490
  * tif_write.c: TIFFAppendToStrip() - clear sorted flag if we move a
    strip. http://bugzilla.remotesensing.org/show_bug.cgi?id=1359
  * tif_fax3.c: Save the state of printdir codec dependent method.
  * tif_jpeg.c: Save the state of printdir codec dependent method as per
    bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1273
  * tif_win32.c: Fixed problem with offset value manipulation as per bug
    http://bugzilla.remotesensing.org/show_bug.cgi?id=1322
  * tif_fax3.c, tif_next.c, tif_pixarlog.c: Fixed multiple
    vulnerabilities, as per Gentoo bug ():
    http://bugs.gentoo.org/show_bug.cgi?id=142383
  * tif_lzw.c, tif_zip.c: Fixed problems with mixing encoding and decoding
    on the same read-write TIFF handle. The LZW code can now maintain
    encode and decode state at the same time. The ZIP code will switch
    back and forth as needed.
    http://bugzilla.remotesensing.org/show_bug.cgi?id=757
  * tif_msdos.c: Avoid handle leak for failed opens. c/o Thierry Pierron
  * tif_dirwrite.c: take care not to flush out buffer of strip/tile data
    in _TIFFWriteDirectory if TIFF_BEENWRITING not set. Relates to bug
    report by Peng Gao with black strip at bottom of images.
  * tif_dirwrite.c: make sure to use uint32 for wordcount in
    TIFFWriteNormanTag if writecount is VARIABLE2 for ASCII fields. It
    already seems to have been done for other field types. Needed for
    "tiffset" on files with geotiff ascii text.
  * tif_dirinfo.c: Added missed EXIF tag ColorSpace (40961).
  * tif_dirread.c: Move IFD fetching code in the separate function
    TIFFFetchDirectory() avoiding code duplication in TIFFReadDirectory()
    and TIFFReadCustomDirectory().
  * tif_readdir.c: Added case in EstimateStripByteCounts() for tiled
    files. Modified TIFFReadDirectory() to not invoke
    EstimateStripByteCounts() for case where entry 0 and 1 are unequal but
    one of them is zero.
    http://bugzilla.remotesensing.org/show_bug.cgi?id=1204
  * tif_open.c, tif_dirread.c, tiffiop.h: Move IFD looping checking code
    in the separate function TIFFCheckDirOffset().
  * tif_aux.c: Added _TIFFCheckRealloc() function.
  * tif_fax3.c: Fixed problems in fax decoder as per bug
    http://bugzilla.remotesensing.org/show_bug.cgi?id=1194
  * tif_jbig.c: Added support for JBIG compression scheme (34661 code)
    contributed by Lee Howard. As per bug
    http://bugzilla.remotesensing.org/show_bug.cgi?id=896
  * tif_getimage.c: Added support for planarconfig separate non-subsampled
    YCbCr (i.e. separate YCbCr with subsampling [1,1]).
  * tif_getimage.c: Revision of all RGB(A) put routines:
       * Conversion of unassociated alpha to associated alpha now done
         with more performant LUT, and calculation more correct.
       * Conversion of 16bit data to 8bit data now done with more
         performant LUT, and calculation more correct
       * Bugfix of handling of 16bit RGB with unassociated alpha
  * tif_ojpeg.c: totally new implementation
  * tif_getimage.c: removed TIFFTAG_JPEGCOLORMODE handling of OJPEG images
    in favor of tif_getimage.c native handling of YCbCr and desubsampling.
  * tif_jpeg.c: JPEGVSetField() so that altering the photometric
    interpretation causes the "upsampled" flag to be recomputed. Fixes
    peculiar bug where photometric flag had to be set before jpegcolormode
    flag.

------------------------------------------------

CHANGES IN THE TOOLS:
  * tiff2ps.c: Added support 16-bit images as per bug
    http://bugzilla.remotesensing.org/show_bug.cgi?id=1566. Patch from
    William Bader.
  * tiff2pdf.c: Fix for TIFFTAG_JPEGTABLES tag fetching and significant
    upgrade of the whole utility as per bug
    http://bugzilla.remotesensing.org/show_bug.cgi?id=1560. Now we don't
    need tiffiop.h in tiff2pdf anymore and will open output PDF file using
    TIFFClientOpen() machinery as it is implemented by Leon Bottou.
  * tiffcrop.c: New tiffcrop utility contributed by Richard Nolde. As per
    bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1383
  * tiff2pdf.c: Do not assume inches when the resolution units do not
    specified. As per bug
    http://bugzilla.remotesensing.org/show_bug.cgi?id=1366
  * tiffset.c: Properly handle tags with TIFF_VARIABLE writecount. As per
    bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1350
  * tif2rgba.c: This utility does not work properly on big-endian
    architectures. It was fixed including the bug
    http://bugzilla.remotesensing.org/show_bug.cgi?id=1149
  * tiff2pdf.c: Fix handling of -q values.
    http://bugzilla.remotesensing.org/show_bug.cgi?id=587
  * tiffcmp.c: Fixed floating point comparison logic as per bug
    http://bugzilla.remotesensing.org/show_bug.cgi?id=1191
  * tiff2pdf.c: Fixed buffer overflow condition in t2p_write_pdf_string()
    as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1196

------------------------------------------------

CHANGES IN THE CONTRIB AREA:
  * contrib/addtiffo/tif_overview.c: Fix problems with odd sized output
    blocks in TIFF_DownSample_Subsampled() (bug 1542).
  * contrib/dbs/xtiff/xtiff.c: Make xtiff utility compilable. Though it is
    still far from the state of being working and useful.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.20 2009/06/22 14:54:44 drochner Exp $
d3 30
a32 75
--- libtiff/tif_lzw.c.orig	2006-03-21 17:42:50.000000000 +0100
+++ libtiff/tif_lzw.c
@@@@ -237,6 +237,13 @@@@ LZWSetupDecode(TIFF* tif)
                     sp->dec_codetab[code].length = 1;
                     sp->dec_codetab[code].next = NULL;
                 } while (code--);
+                /*
+                 * Zero-out the unused entries
+                 */
+                 _TIFFmemset(&sp->dec_codetab[CODE_CLEAR], 0,
+                 (CODE_FIRST-CODE_CLEAR)*sizeof (code_t));
+
+
 	}
 	return (1);
 }
@@@@ -408,12 +415,20 @@@@ LZWDecode(TIFF* tif, tidata_t op0, tsize
 			break;
 		if (code == CODE_CLEAR) {
 			free_entp = sp->dec_codetab + CODE_FIRST;
+			 _TIFFmemset(free_entp, 0, (CSIZE-CODE_FIRST)*sizeof (code_t));
 			nbits = BITS_MIN;
 			nbitsmask = MAXCODE(BITS_MIN);
 			maxcodep = sp->dec_codetab + nbitsmask-1;
 			NextCode(tif, sp, bp, code, GetNextCode);
 			if (code == CODE_EOI)
 				break;
+			 if (code == CODE_CLEAR) {
+				 TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+				 "LZWDecode: Corrupted LZW table at scanline %d",
+				 tif->tif_row);
+				 return (0);
+			 }
+
 			*op++ = (char)code, occ--;
 			oldcodep = sp->dec_codetab + code;
 			continue;
@@@@ -604,12 +619,20 @@@@ LZWDecodeCompat(TIFF* tif, tidata_t op0,
 			break;
 		if (code == CODE_CLEAR) {
 			free_entp = sp->dec_codetab + CODE_FIRST;
+			 _TIFFmemset(free_entp, 0, (CSIZE-CODE_FIRST)*sizeof (code_t));
 			nbits = BITS_MIN;
 			nbitsmask = MAXCODE(BITS_MIN);
 			maxcodep = sp->dec_codetab + nbitsmask;
 			NextCode(tif, sp, bp, code, GetNextCodeCompat);
 			if (code == CODE_EOI)
 				break;
+			 if (code == CODE_CLEAR) {
+				 TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+				 "LZWDecode: Corrupted LZW table at scanline %d",
+				 tif->tif_row);
+				 return (0);
+			 }
+
 			*op++ = code, occ--;
 			oldcodep = sp->dec_codetab + code;
 			continue;
@@@@ -647,6 +670,7 @@@@ LZWDecodeCompat(TIFF* tif, tidata_t op0,
 		}
 		oldcodep = codep;
 		if (code >= 256) {
+			char *op_orig = op;
 			/*
 		 	 * Code maps to a string, copy string
 			 * value to output (written in reverse).
@@@@ -681,7 +705,7 @@@@ LZWDecodeCompat(TIFF* tif, tidata_t op0,
 			tp = op;
 			do {
 				*--tp = codep->value;
-			} while( (codep = codep->next) != NULL);
+			} while( (codep = codep->next) != NULL && tp > op_orig);
 		} else
 			*op++ = code, occ--;
 	}
@


1.20
log
@add a patch from upstream
(http://bugzilla.maptools.org/show_bug.cgi?id=2065)
to fix a buffer underflow which can cause DOS or system access
(SA35515)
bump PKGREVISION
@
text
@d1 1
a1 1
$NetBSD$
@


1.19
log
@Apply Debian's fix for the security vulnerability reported in
CVE-2008-2327. Bump package revision.
@
text
@d3 3
a5 3
--- libtiff/tif_lzw.c.orig	2006-03-21 16:42:50.000000000 +0000
+++ libtiff/tif_lzw.c	2008-08-30 09:03:37.000000000 +0100
@@@@ -237,6 +237,13 @@@@
d19 1
a19 1
@@@@ -408,12 +415,20 @@@@
d40 1
a40 1
@@@@ -604,12 +619,20 @@@@
d61 17
@


1.18
log
@Update to 3.7.4:

   MAJOR CHANGES:
     * Fixed important bug in custom tags handling code..

   ------------------------------------------------

   CHANGES IN THE SOFTWARE CONFIGURATION:
     * Applied patch from Patrick Welche (all scripts moved in the 'config'
       and 'm4' directories).
     * SConstruct, libtiff/SConstruct: Added the first very preliminary
       support for SCons software building tool (http://www.scons.org/). This
       is experimental infrastructure and it will exist along with the
       autotools stuff.
     * port/lfind.c: Added lfind() replacement module.

   ------------------------------------------------

   CHANGES IN LIBTIFF:
     * tif_dir.c: When prefreeing tv->value in TIFFSetFieldV also set it to
       NULL to avoid double free when re-setting custom string fields as per:
       http://bugzilla.remotesensing.org/show_bug.cgi?id=922
     * tif_dir.c: Fixed up support for swapping "double complex" values (128
       bits as 2 64 bits doubles). GDAL gcore tests now pass on bigendian
       (macosx) system.
     * libtiff/{tif_dirread.c, tif_dirinfo.c}: Do not upcast BYTEs to SHORTs
       in the TIFFFetchByteArray(). Remove TIFFFetchExtraSamples() function,
       use TIFFFetchNormalTag() instead as per bug
       http://bugzilla.remotesensing.org/show_bug.cgi?id=831 Remove
       TIFFFetchExtraSamples() function, use TIFFFetchNormalTag() instead.
     * tif_print.c: Fixed printing of the BYTE and SBYTE arrays.
     * tif_write.c: Do not check the PlanarConfiguration field in the
       TIFFWriteCheck() function in case of single band images (as per TIFF
       spec).
     * libtiff/{tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_print.c}: Make
       FieldOfViewCotangent, MatrixWorldToScreen, MatrixWorldToCamera,
       ImageFullWidth, ImageFullLength and PrimaryChromaticities tags custom.

   ------------------------------------------------

   CHANGES IN THE TOOLS:
     * tiffcp.c: Fixed WhitePoint tag copying.

   ------------------------------------------------

   CHANGES IN THE CONTRIB AREA:
     * tiffdump.c: Added support for TIFF_IFD datatype.
     * addtiffo/{tif_overview.c, tif_ovrcache.c, tif_ovrcache.h}: Make
       overviews working for contiguous images.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.17 2005/07/14 13:43:28 wiz Exp $
d3 58
a60 11
--- libtiff/tiff.h.orig	2005-07-05 16:38:13.000000000 +0000
+++ libtiff/tiff.h
@@@@ -81,7 +81,7 @@@@ typedef	signed char int8;	/* NB: non-ANS
 typedef	unsigned char uint8;
 typedef	short int16;
 typedef	unsigned short uint16;	/* sizeof (uint16) must == 2 */
-#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__) || defined(__arch64__) || defined(__sparcv9)
+#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__) || defined(__arch64__) || defined(__sparcv9) || defined(_LP64)
 typedef	int int32;
 typedef	unsigned int uint32;	/* sizeof (uint32) must == 4 */
 #else
@


1.18.22.1
log
@pullup ticket #2510 - requested by tron
tiff: security patch

revisions pulled up:
pkgsrc/graphics/tiff/Makefile		1.86
pkgsrc/graphics/tiff/distinfo		1.41
pkgsrc/graphics/tiff/patches/patch-ac	1.19

   Module Name:    pkgsrc
   Committed By:   tron
   Date:           Sat Aug 30 08:12:45 UTC 2008

   Modified Files:
   pkgsrc/graphics/tiff: Makefile distinfo
   Added Files:
   pkgsrc/graphics/tiff/patches: patch-ac

   Log Message:
   Apply Debian's fix for the security vulnerability reported in
   CVE-2008-2327. Bump package revision.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.19 2008/08/30 08:12:45 tron Exp $
d3 11
a13 58
--- libtiff/tif_lzw.c.orig	2006-03-21 16:42:50.000000000 +0000
+++ libtiff/tif_lzw.c	2008-08-30 09:03:37.000000000 +0100
@@@@ -237,6 +237,13 @@@@
                     sp->dec_codetab[code].length = 1;
                     sp->dec_codetab[code].next = NULL;
                 } while (code--);
+                /*
+                 * Zero-out the unused entries
+                 */
+                 _TIFFmemset(&sp->dec_codetab[CODE_CLEAR], 0,
+                 (CODE_FIRST-CODE_CLEAR)*sizeof (code_t));
+
+
 	}
 	return (1);
 }
@@@@ -408,12 +415,20 @@@@
 			break;
 		if (code == CODE_CLEAR) {
 			free_entp = sp->dec_codetab + CODE_FIRST;
+			 _TIFFmemset(free_entp, 0, (CSIZE-CODE_FIRST)*sizeof (code_t));
 			nbits = BITS_MIN;
 			nbitsmask = MAXCODE(BITS_MIN);
 			maxcodep = sp->dec_codetab + nbitsmask-1;
 			NextCode(tif, sp, bp, code, GetNextCode);
 			if (code == CODE_EOI)
 				break;
+			 if (code == CODE_CLEAR) {
+				 TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+				 "LZWDecode: Corrupted LZW table at scanline %d",
+				 tif->tif_row);
+				 return (0);
+			 }
+
 			*op++ = (char)code, occ--;
 			oldcodep = sp->dec_codetab + code;
 			continue;
@@@@ -604,12 +619,20 @@@@
 			break;
 		if (code == CODE_CLEAR) {
 			free_entp = sp->dec_codetab + CODE_FIRST;
+			 _TIFFmemset(free_entp, 0, (CSIZE-CODE_FIRST)*sizeof (code_t));
 			nbits = BITS_MIN;
 			nbitsmask = MAXCODE(BITS_MIN);
 			maxcodep = sp->dec_codetab + nbitsmask;
 			NextCode(tif, sp, bp, code, GetNextCodeCompat);
 			if (code == CODE_EOI)
 				break;
+			 if (code == CODE_CLEAR) {
+				 TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+				 "LZWDecode: Corrupted LZW table at scanline %d",
+				 tif->tif_row);
+				 return (0);
+			 }
+
 			*op++ = code, occ--;
 			oldcodep = sp->dec_codetab + code;
 			continue;
@


1.17
log
@Update to 3.7.3:
Many bugfixes and several new features. The runtime endianness check
has been replaced with the compile time one. Support has been added
for the new predictor type (floating point predictor) defined at the
TIFF Technical Note 3, for custom tags passed by value, and for all
DNG tags.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.16 2005/05/07 00:47:30 toshii Exp $
@


1.16
log
@Fix for NetBSD LP64 arches by checking if _LP64 is defined.  These arches
don't define __LP64__.  This is basically same as patch-ab rev. 1.13,
which was probably removed by mistake.
@
text
@d1 1
a1 1
$NetBSD$
d3 1
a3 1
--- libtiff/tiff.h.orig	2005-05-07 09:26:00.000000000 +0900
d9 2
a10 2
-#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__) || defined(__arch64__)
+#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__) || defined(__arch64__) || defined(_LP64)
@


1.15
log
@Update to 3.7.2.
Package changes:
Put options in options.mk, and retire support for USE_GIF; turn on
the lzw option by default (since USE_GIF was on by default).
C++ library's name changed, to be in sync with tiff distribution's name
for it (libtiffcxx -> libtiffxx).

Changes in 3.7.2:
	Maintainance [sic] release. Many bugfixes in the build
	environment and compatibility improvements.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.14 2004/12/28 23:10:10 reed Exp $
d3 11
a13 11
--- html/man/Makefile.in.orig	Mon Dec 20 11:29:26 2004
+++ html/man/Makefile.in
@@@@ -213,7 +213,7 @@@@ target_alias = @@target_alias@@
 target_cpu = @@target_cpu@@
 target_os = @@target_os@@
 target_vendor = @@target_vendor@@
-docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)/html/man
+docdir = $(prefix)/share/doc/$(PACKAGE)/html/man
 docfiles = \
 	fax2ps.1.html \
 	fax2ps.1.html \
@


1.14
log
@Upgrade tiff to 3.7.1.

Remove OpenWindows workaround in pkgsrc for this.

Too many changes to include here.
See http://www.remotesensing.org/libtiff/v3.7.1.html
and http://www.remotesensing.org/libtiff/v3.7.0.html
and previous change files for changes information.

tiff-3.7.1 now includes the lzw compression code again.
It also uses autoconf and libtool now.

A new tool is bmp2tiff.

Docs are placed under share/doc/tiff/html instead of share/doc/html/tiff.

Many manpage symlinks are now missing. (This was reported to tiff list.)
@
text
@d1 1
a1 1
$NetBSD$
@


1.14.2.1
log
@Pullup ticket 495 - requested by Lubomir Sedlacik
security fix for tiff

Revisions pulled up:
- pkgsrc/graphics/tiff/Makefile			1.67, 1.69
- pkgsrc/graphics/tiff/PLIST			1.7
- pkgsrc/graphics/tiff/distinfo			1.26, 1.27, 1.28, 1.29
- pkgsrc/graphics/tiff/options.mk		1.1
- pkgsrc/graphics/tiff/buildlink3.mk		1.12
- pkgsrc/graphics/tiff/patches/patch-aa		1.16
- pkgsrc/graphics/tiff/patches/patch-ab		1.16
- pkgsrc/graphics/tiff/patches/patch-ac		1.16
- pkgsrc/graphics/tiff/patches/patch-ad		1.14
- pkgsrc/graphics/tiff/patches/patch-ae		removed
- pkgsrc/graphics/tiff/patches/patch-af		removed
- pkgsrc/graphics/tiff/patches/patch-ah		removed
- pkgsrc/graphics/tiff/patches/patch-ag		removed

    Module Name:    pkgsrc
    Committed By:   wiz
    Date:           Wed Mar 23 01:17:45 UTC 2005

    Modified Files:
            pkgsrc/graphics/tiff: Makefile PLIST distinfo
            pkgsrc/graphics/tiff/patches: patch-aa
    Added Files:
            pkgsrc/graphics/tiff: options.mk
    Removed Files:
            pkgsrc/graphics/tiff/patches: patch-ab patch-ac patch-ad patch-ae
                patch-af patch-ag patch-ah

    Log Message:
    Update to 3.7.2.
    Package changes:
    Put options in options.mk, and retire support for USE_GIF; turn on
    the lzw option by default (since USE_GIF was on by default).
    C++ library's name changed, to be in sync with tiff distribution's name
    for it (libtiffcxx -> libtiffxx).

    Changes in 3.7.2:
            Maintainance [sic] release. Many bugfixes in the build
            environment and compatibility improvements.
----
    Module Name:    pkgsrc
    Committed By:   recht
    Date:           Thu Mar 24 17:46:29 UTC 2005

    Modified Files:
            pkgsrc/graphics/tiff: distinfo
    Added Files:
            pkgsrc/graphics/tiff/patches: patch-ab

    Log Message:
    Pull in libtiff/Makefile.in rev. 1.54 and 1.55 without the rpath changes
    from libtiff CVS to fix the build on Darwin.
----
    Modified Files:
            pkgsrc/graphics/tiff: distinfo
    Added Files:
            pkgsrc/graphics/tiff/patches: patch-ac

    Log Message:
    Fix for NetBSD LP64 arches by checking if _LP64 is defined.  These arches
    don't define __LP64__.  This is basically same as patch-ab rev. 1.13,
    which was probably removed by mistake.
----
    Module Name:    pkgsrc
    Committed By:   salo
    Date:           Thu May 12 12:53:21 UTC 2005

    Modified Files:
            pkgsrc/graphics/tiff: Makefile buildlink3.mk distinfo
    Added Files:
            pkgsrc/graphics/tiff/patches: patch-ad

    Log Message:
    Security fix:

    "A vulnerability in libTIFF was found, it can be potentially exploited by
     malicious people to compromise a vulnerable system."

    http://secunia.com/advisories/15320/
    http://bugzilla.remotesensing.org/show_bug.cgi?id=3D843

    Bump PKGREVISION, patch from libtiff cvs repository.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.16 2005/05/07 00:47:30 toshii Exp $
d3 11
a13 11
--- libtiff/tiff.h.orig	2005-05-07 09:26:00.000000000 +0900
+++ libtiff/tiff.h
@@@@ -81,7 +81,7 @@@@ typedef	signed char int8;	/* NB: non-ANS
 typedef	unsigned char uint8;
 typedef	short int16;
 typedef	unsigned short uint16;	/* sizeof (uint16) must == 2 */
-#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__) || defined(__arch64__)
+#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__) || defined(__arch64__) || defined(_LP64)
 typedef	int int32;
 typedef	unsigned int uint32;	/* sizeof (uint32) must == 4 */
 #else
@


1.13
log
@Updated tiff to 3.5.7

* many bug fixes
* added support for 16bit minisblack/miniswhite images in RGBA interface
* integrated experimental OJPEG support
* updated tiffcp utility
* substantial changes to tiff2ps
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.12 2001/08/23 00:07:18 abs Exp $
d3 11
a13 10
--- html/index.html.orig	Fri Nov 23 16:56:18 2001
+++ html/index.html	Mon Mar  4 16:03:43 2002
@@@@ -77,7 +77,6 @@@@
 <LI><A HREF="bugs.html">Bugs, Bugzilla, and the TIFF mailing list</A>
 <LI><A HREF="images.html">Test images</A>
 <LI><A HREF="misc.html">Acknowledgements and copyright issues</A>
-<LI><A HREF="man/index.html">Man Pages</A> 
 </UL>
 
 <P>
@


1.12
log
@Lets compile libtiff on sparc64, gcc 2.95.3.
@
text
@d1 1
a1 1
$NetBSD$
d3 4
a6 4
--- html/index.html.orig	Mon Mar 27 17:05:55 2000
+++ html/index.html
@@@@ -78,7 +78,6 @@@@
 <LI><A HREF="bugs.html">Bugs and the TIFF mailing list</A>
@


1.11
log
@Update patches so that patchdiff works.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.10 2000/03/18 19:43:21 jlam Exp $
d3 10
a12 26
--- tools/Makefile.in.orig	Sat Mar 18 14:30:08 2000
+++ tools/Makefile.in	Sat Mar 18 14:40:14 2000
@@@@ -47,10 +47,10 @@@@
 IPATH	= -I. -I${SRCDIR} -I${LIBDIR}
 CFLAGS	= @@ENVOPTS@@ ${COPTS} ${OPTIMIZER} ${IPATH}
 #
-TIFFLIB	= ${DEPTH}/libtiff/libtiff.@@DSOSUF@@
+TIFFLIB	= ${DEPTH}/libtiff/libtiff.la
 LIBJPEG	= @@LIBJPEG@@
 LIBGZ	= @@LIBGZ@@
-LIBTIFF	= @@TIFFLIBREF@@
+LIBTIFF	= ${TIFFLIB}
 LIBPORT	= @@LIBPORT@@
 MACHLIBS= @@MACHDEPLIBS@@
 LIBS	= ${LIBTIFF} ${LIBJPEG} ${LIBGZ} ${LIBPORT} ${MACHLIBS}
@@@@ -108,8 +108,8 @@@@
 	    true; \
 	fi
 install: all
-	${INSTALL} -idb nostrip tiff.sw.tools -m 755 -dir @@DIR_BIN@@
-	${INSTALL} -idb nostrip tiff.sw.tools -m 755 -F @@DIR_BIN@@ -O ${TARGETS}
+	${INSTALL} -idb tiff.sw.tools -m 755 -dir @@DIR_BIN@@
+	${LIBTOOL} ${BSD_INSTALL_PROGRAM} ${TARGETS} @@DIR_BIN@@
 	@@if [ "@@LIBIMAGE@@" = yes ]; then \
 	    ${INSTALL} -idb tiff.sw.tools -m 755 -F @@DIR_BIN@@ -O sgi2tiff; \
 	else \
@


1.10
log
@Don't create /tiff.sw.tools on installation.
@
text
@d1 1
a1 1
$NetBSD$
d3 2
a4 2
--- ./tools/Makefile.in.orig	Sat Mar 18 14:30:08 2000
+++ ./tools/Makefile.in	Sat Mar 18 14:40:14 2000
@


1.9
log
@tiff library upgraded from 3.5.2 to 3.5.4. LZW compression part is now
optional and controlled by USE_GIF in mk.conf, decompression is unchanged.
Comment for USE_GIF in mk.conf has been updated. Some HTML documentation
gets installed now, too.

Changes:
A Y2K bugfix in ras2tiff, removal of LZW compression, new Pixar tags,
and Adobe ZIP support, as well as removal of some compiler warnings
and minor fixes.
@
text
@d3 2
a4 2
--- ./tools/Makefile.in.orig	Mon Jan  3 17:34:03 2000
+++ ./tools/Makefile.in	Mon Jan  3 17:34:05 2000
d18 2
a19 1
@@@@ -109,7 +109,7 @@@@
d22 1
a22 1
 	${INSTALL} -idb nostrip tiff.sw.tools -m 755 -dir @@DIR_BIN@@
d24 1
@


1.8
log
@Update tiff to version 3.5.2.

Changes in TIFF v3.5.1
* Support was added for IPTC Newsphoto metadata (TIFFTAGE_IPTCNEWSPHOTO)
* Support was added for photoshop caption handling (TIFFTAG_PHOTOSHOP)

Changes in TIFF v3.5.2
* Added TIFFReassignTagToIgnore() API on behalf of
  Bruce Cameron <cameron@@petris.com>.  Man page still pending.

* Fixed problem with cvtcmap() in tif_getimage.c modifying the
  colormaps owned by the TIFF handle itself when trying to fixup wrong
  (eight bit) colormaps.  Corrected by maintaining a private copy of
  the colormap.

* Added TIFFReadRGBATile()/TIFFReadRGBAStrip() support in
  tif_getimage.c.

* Applied "a" mode fix to tif_win32.c/TIFFOpen() as suggested
  by Christopher Lawton <clawton@@mathworks.com>

* Set O_BINARY for tif_unix.c open() ... used on cygwin for instance.

* Applied Francois Dagand's patch to handle fax decompression bug.
  (sizes >= 65536 were failing)
@
text
@d3 2
a4 2
--- ./tools/Makefile.in.orig	Thu Aug 19 06:03:27 1999
+++ ./tools/Makefile.in	Fri Oct  8 02:21:21 1999
d21 2
a22 2
 	${INSTALL} -idb tiff.sw.tools -m 755 -dir @@DIR_BIN@@
-	${INSTALL} -idb tiff.sw.tools -m 755 -F @@DIR_BIN@@ -O ${TARGETS}
@


1.7
log
@Link programs with "${LDFLAGS}" so that we get "-Wl,-R${PREFIX}/lib".
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.6 1998/10/02 14:57:53 tv Exp $
d3 2
a4 2
--- tools/Makefile.in.orig	Mon Jul 20 11:17:11 1998
+++ tools/Makefile.in	Mon Jul 20 11:43:58 1998
d14 1
a14 1
+LIBTIFF	= ../libtiff/libtiff.la
d18 1
a18 1
@@@@ -107,7 +107,7 @@@@
a26 117
@@@@ -127,37 +127,37 @@@@
 #
 
 tiffinfo: tiffinfo.o ${TIFFLIB}
-	${CC} -o tiffinfo ${CFLAGS} tiffinfo.o ${LIBS}
+	${LIBTOOL} ${CC} -o tiffinfo ${CFLAGS} tiffinfo.o ${LIBS} ${LDFLAGS}
 tiffinfo.o: ${SRCDIR}/tiffinfo.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/tiffinfo.c
 
 tiffcmp:tiffcmp.o ${TIFFLIB}
-	${CC} -o tiffcmp ${CFLAGS} tiffcmp.o ${LIBS}
+	${LIBTOOL} ${CC} -o tiffcmp ${CFLAGS} tiffcmp.o ${LIBS} ${LDFLAGS}
 tiffcmp.o: ${SRCDIR}/tiffcmp.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/tiffcmp.c
 
 tiffcp:	tiffcp.o ${TIFFLIB}
-	${CC} -o tiffcp ${CFLAGS} tiffcp.o ${LIBS}
+	${LIBTOOL} ${CC} -o tiffcp ${CFLAGS} tiffcp.o ${LIBS} ${LDFLAGS}
 tiffcp.o: ${SRCDIR}/tiffcp.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/tiffcp.c
 
 tiffdump: tiffdump.o
-	${CC} -o tiffdump ${CFLAGS} tiffdump.o ${LIBS}
+	${LIBTOOL} ${CC} -o tiffdump ${CFLAGS} tiffdump.o ${LIBS} ${LDFLAGS}
 tiffdump.o: ${SRCDIR}/tiffdump.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/tiffdump.c
 
 tiffmedian: tiffmedian.o ${TIFFLIB}
-	${CC} -o tiffmedian ${CFLAGS} tiffmedian.o ${LIBS}
+	${LIBTOOL} ${CC} -o tiffmedian ${CFLAGS} tiffmedian.o ${LIBS} ${LDFLAGS}
 tiffmedian.o: ${SRCDIR}/tiffmedian.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/tiffmedian.c
 
 tiffsplit: tiffsplit.o ${TIFFLIB}
-	${CC} -o tiffsplit ${CFLAGS} tiffsplit.o ${LIBS}
+	${LIBTOOL} ${CC} -o tiffsplit ${CFLAGS} tiffsplit.o ${LIBS} ${LDFLAGS}
 tiffsplit.o: ${SRCDIR}/tiffsplit.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/tiffsplit.c
 
 tiff2ps: tiff2ps.o ${TIFFLIB}
-	${CC} -o tiff2ps ${CFLAGS} tiff2ps.o ${LIBS}
+	${LIBTOOL} ${CC} -o tiff2ps ${CFLAGS} tiff2ps.o ${LIBS} ${LDFLAGS}
 tiff2ps.o: ${SRCDIR}/tiff2ps.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/tiff2ps.c
 
@@@@ -168,61 +168,61 @@@@
 
 # convert RGB image to B&W
 tiff2bw: tiff2bw.o ${TIFFLIB}
-	${CC} -o tiff2bw ${CFLAGS} tiff2bw.o ${LIBS}
+	${LIBTOOL} ${CC} -o tiff2bw ${CFLAGS} tiff2bw.o ${LIBS} ${LDFLAGS}
 tiff2bw.o: ${SRCDIR}/tiff2bw.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/tiff2bw.c
 
 # convert B&W image to bilevel w/ FS dithering
 tiffdither: tiffdither.o ${TIFFLIB}
-	${CC} -o tiffdither ${CFLAGS} tiffdither.o ${LIBS}
+	${LIBTOOL} ${CC} -o tiffdither ${CFLAGS} tiffdither.o ${LIBS} ${LDFLAGS}
 tiffdither.o: ${SRCDIR}/tiffdither.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/tiffdither.c
 
 # simple Sun rasterfile converter
 ras2tiff: ras2tiff.o ${TIFFLIB}
-	${CC} -o ras2tiff ${CFLAGS} ras2tiff.o ${LIBS}
+	${LIBTOOL} ${CC} -o ras2tiff ${CFLAGS} ras2tiff.o ${LIBS} ${LDFLAGS}
 ras2tiff.o: ${SRCDIR}/ras2tiff.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/ras2tiff.c
 
 # simple GIF converter
 gif2tiff: gif2tiff.o ${TIFFLIB}
-	${CC} -o gif2tiff ${CFLAGS} gif2tiff.o ${LIBS}
+	${LIBTOOL} ${CC} -o gif2tiff ${CFLAGS} gif2tiff.o ${LIBS} ${LDFLAGS}
 gif2tiff.o: ${SRCDIR}/gif2tiff.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/gif2tiff.c
 
 # very limited PBM converter
 ppm2tiff: ppm2tiff.o ${TIFFLIB}
-	${CC} -o ppm2tiff ${CFLAGS} ppm2tiff.o ${LIBS}
+	${LIBTOOL} ${CC} -o ppm2tiff ${CFLAGS} ppm2tiff.o ${LIBS} ${LDFLAGS}
 ppm2tiff.o: ${SRCDIR}/ppm2tiff.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/ppm2tiff.c
 
 # Group 3/4 FAX file converter
 fax2tiff: fax2tiff.o ${TIFFLIB}
-	${CC} -o fax2tiff ${CFLAGS} fax2tiff.o ${LIBS}
+	${LIBTOOL} ${CC} -o fax2tiff ${CFLAGS} fax2tiff.o ${LIBS} ${LDFLAGS}
 fax2tiff.o: ${SRCDIR}/fax2tiff.c
 	${CC} -c -I${LIBDIR} -I${DEPTH}/libtiff ${CFLAGS} ${SRCDIR}/fax2tiff.c
 
 # Group 3/4 FAX to encoded PS converter
 fax2ps: fax2ps.o ${TIFFLIB}
-	${CC} -o fax2ps ${CFLAGS} fax2ps.o ${LIBS}
+	${LIBTOOL} ${CC} -o fax2ps ${CFLAGS} fax2ps.o ${LIBS} ${LDFLAGS}
 fax2ps.o: ${SRCDIR}/fax2ps.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/fax2ps.c
 
 # convert Palette image to RGB
 pal2rgb: pal2rgb.o ${TIFFLIB}
-	${CC} -o pal2rgb ${CFLAGS} pal2rgb.o ${LIBS}
+	${LIBTOOL} ${CC} -o pal2rgb ${CFLAGS} pal2rgb.o ${LIBS} ${LDFLAGS}
 pal2rgb.o: ${SRCDIR}/pal2rgb.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/pal2rgb.c
 
 # convert RGB image to YCbCr
 rgb2ycbcr: rgb2ycbcr.o ${TIFFLIB}
-	${CC} -o rgb2ycbcr ${CFLAGS} rgb2ycbcr.o ${LIBS}
+	${LIBTOOL} ${CC} -o rgb2ycbcr ${CFLAGS} rgb2ycbcr.o ${LIBS} ${LDFLAGS}
 rgb2ycbcr.o: ${SRCDIR}/rgb2ycbcr.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/rgb2ycbcr.c
 
 # generate thumbnail images from fax (example of SubIFD usage)
 thumbnail: thumbnail.o ${TIFFLIB}
-	${CC} -o thumbnail ${CFLAGS} thumbnail.o ${LIBS}
+	${LIBTOOL} ${CC} -o thumbnail ${CFLAGS} thumbnail.o ${LIBS} ${LDFLAGS}
 thumbnail.o: ${SRCDIR}/thumbnail.c
 	${CC} -c ${CFLAGS} ${SRCDIR}/thumbnail.c
 
@


1.6
log
@Get libtool from the right place.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.5 1998/08/07 10:40:54 agc Exp $
d32 1
a32 1
+	${LIBTOOL} ${CC} -o tiffinfo ${CFLAGS} tiffinfo.o ${LIBS}
d38 1
a38 1
+	${LIBTOOL} ${CC} -o tiffcmp ${CFLAGS} tiffcmp.o ${LIBS}
d44 1
a44 1
+	${LIBTOOL} ${CC} -o tiffcp ${CFLAGS} tiffcp.o ${LIBS}
d50 1
a50 1
+	${LIBTOOL} ${CC} -o tiffdump ${CFLAGS} tiffdump.o ${LIBS}
d56 1
a56 1
+	${LIBTOOL} ${CC} -o tiffmedian ${CFLAGS} tiffmedian.o ${LIBS}
d62 1
a62 1
+	${LIBTOOL} ${CC} -o tiffsplit ${CFLAGS} tiffsplit.o ${LIBS}
d68 1
a68 1
+	${LIBTOOL} ${CC} -o tiff2ps ${CFLAGS} tiff2ps.o ${LIBS}
d77 1
a77 1
+	${LIBTOOL} ${CC} -o tiff2bw ${CFLAGS} tiff2bw.o ${LIBS}
d84 1
a84 1
+	${LIBTOOL} ${CC} -o tiffdither ${CFLAGS} tiffdither.o ${LIBS}
d91 1
a91 1
+	${LIBTOOL} ${CC} -o ras2tiff ${CFLAGS} ras2tiff.o ${LIBS}
d98 1
a98 1
+	${LIBTOOL} ${CC} -o gif2tiff ${CFLAGS} gif2tiff.o ${LIBS}
d105 1
a105 1
+	${LIBTOOL} ${CC} -o ppm2tiff ${CFLAGS} ppm2tiff.o ${LIBS}
d112 1
a112 1
+	${LIBTOOL} ${CC} -o fax2tiff ${CFLAGS} fax2tiff.o ${LIBS}
d119 1
a119 1
+	${LIBTOOL} ${CC} -o fax2ps ${CFLAGS} fax2ps.o ${LIBS}
d126 1
a126 1
+	${LIBTOOL} ${CC} -o pal2rgb ${CFLAGS} pal2rgb.o ${LIBS}
d133 1
a133 1
+	${LIBTOOL} ${CC} -o rgb2ycbcr ${CFLAGS} rgb2ycbcr.o ${LIBS}
d140 1
a140 1
+	${LIBTOOL} ${CC} -o thumbnail ${CFLAGS} thumbnail.o ${LIBS}
@


1.5
log
@Add NetBSD RCS Ids.
@
text
@d1 1
a1 1
$NetBSD$
d23 1
a23 1
+	${PREFIX}/bin/libtool ${BSD_INSTALL_PROGRAM} ${TARGETS} @@DIR_BIN@@
d32 1
a32 1
+	${PREFIX}/bin/libtool ${CC} -o tiffinfo ${CFLAGS} tiffinfo.o ${LIBS}
d38 1
a38 1
+	${PREFIX}/bin/libtool ${CC} -o tiffcmp ${CFLAGS} tiffcmp.o ${LIBS}
d44 1
a44 1
+	${PREFIX}/bin/libtool ${CC} -o tiffcp ${CFLAGS} tiffcp.o ${LIBS}
d50 1
a50 1
+	${PREFIX}/bin/libtool ${CC} -o tiffdump ${CFLAGS} tiffdump.o ${LIBS}
d56 1
a56 1
+	${PREFIX}/bin/libtool ${CC} -o tiffmedian ${CFLAGS} tiffmedian.o ${LIBS}
d62 1
a62 1
+	${PREFIX}/bin/libtool ${CC} -o tiffsplit ${CFLAGS} tiffsplit.o ${LIBS}
d68 1
a68 1
+	${PREFIX}/bin/libtool ${CC} -o tiff2ps ${CFLAGS} tiff2ps.o ${LIBS}
d77 1
a77 1
+	${PREFIX}/bin/libtool ${CC} -o tiff2bw ${CFLAGS} tiff2bw.o ${LIBS}
d84 1
a84 1
+	${PREFIX}/bin/libtool ${CC} -o tiffdither ${CFLAGS} tiffdither.o ${LIBS}
d91 1
a91 1
+	${PREFIX}/bin/libtool ${CC} -o ras2tiff ${CFLAGS} ras2tiff.o ${LIBS}
d98 1
a98 1
+	${PREFIX}/bin/libtool ${CC} -o gif2tiff ${CFLAGS} gif2tiff.o ${LIBS}
d105 1
a105 1
+	${PREFIX}/bin/libtool ${CC} -o ppm2tiff ${CFLAGS} ppm2tiff.o ${LIBS}
d112 1
a112 1
+	${PREFIX}/bin/libtool ${CC} -o fax2tiff ${CFLAGS} fax2tiff.o ${LIBS}
d119 1
a119 1
+	${PREFIX}/bin/libtool ${CC} -o fax2ps ${CFLAGS} fax2ps.o ${LIBS}
d126 1
a126 1
+	${PREFIX}/bin/libtool ${CC} -o pal2rgb ${CFLAGS} pal2rgb.o ${LIBS}
d133 1
a133 1
+	${PREFIX}/bin/libtool ${CC} -o rgb2ycbcr ${CFLAGS} rgb2ycbcr.o ${LIBS}
d140 1
a140 1
+	${PREFIX}/bin/libtool ${CC} -o thumbnail ${CFLAGS} thumbnail.o ${LIBS}
@


1.4
log
@Use libtool to create the shared library.  Strip binaries using
BSD_INSTALL_PROGRAM.
@
text
@d1 2
@


1.3
log
@Fix for tiff package on pmax, from Chris Jones in PR 4944. Munged about
by me slightly.
@
text
@d1 141
a141 18
--- libtiff/Makefile.in.orig	Tue Sep  2 18:54:19 1997
+++ libtiff/Makefile.in	Wed May 13 10:26:19 1998
@@@@ -197,7 +197,14 @@@@
 	@@rm -f libtiff_pic.a
 	@@${AR} cq libtiff_pic.a `lorder ${OBJS} | tsort -q`
 	${RANLIB} libtiff_pic.a
-	${LD} -x -Bshareable -Bforcearchive -o libtiff.@@DSOSUF@@ libtiff_pic.a
+	case `uname -m` in						\
+	alpha)								\
+		${LD} -x -Bshareable -o libtiff.@@DSOSUF@@ libtiff_pic.a ;; \
+	pmax)								\
+ 		${LD} -x -shared -o libtiff.@@DSOSUF@@ -soname libtiff.so.${DIST_MAJOR} --whole-archive libtiff_pic.a --no-whole-archive ;; \
+	*)								\
+		${LD} -x -Bshareable -Bforcearchive -o libtiff.@@DSOSUF@@ libtiff_pic.a ;; \
+	esac
 	rm -f libtiff_pic.a
 	touch $@@
 # linux ELF shared lib rule
@


1.2
log
@Incorporate Matthias Scheler's update to the tiff package with some
minor fixes from me. Closes PR pkg/4603.
@
text
@d1 3
a3 3
--- libtiff/Makefile.in.orig	Tue Sep  2 19:54:19 1997
+++ libtiff/Makefile.in	Mon Dec  1 00:20:35 1997
@@@@ -197,7 +197,8 @@@@
d8 8
a15 2
+	if [ `uname -m` != "alpha" ]; then  ${LD} -x -Bshareable -Bforcearchive -o libtiff.@@DSOSUF@@ libtiff_pic.a ; fi
+	if [ `uname -m` = "alpha" ]; then  ${LD} -x -Bshareable -o libtiff.@@DSOSUF@@ libtiff_pic.a ; fi
@


1.1
log
@Initial revision
@
text
@d1 12
a12 52
*** contrib/fax2ps/Makefile.orig	Tue Jul 26 21:55:07 1994
--- contrib/fax2ps/Makefile	Wed Oct  4 04:55:32 1995
***************
*** 25,42 ****
  TIFF=	../../libtiff
  TOOLS=	../../tools
  
! BIN=	/usr/local/bin
  NULL=
! OBJS=	fax2ps.o faxdecode.o getopt.o
  CONF_LIBRARY=\
  	${NULL}
! COPTS=	-O
! CFLAGS=	${COPTS} -ansi ${CONF_LIBRARY} -I${TIFF}
! LIBS=	${TIFF}/libtiff.a
  
  all:	fax2ps
  
! fax2ps:	${OBJS} ${LIBS}
  	${CC} -o $@@ ${OBJS} ${LDFLAGS} ${LIBS} -lm
  
  ${OBJS}: defs.h ${TIFF}/tiffio.h
--- 25,42 ----
  TIFF=	../../libtiff
  TOOLS=	../../tools
  
! BIN=	${PREFIX}/bin/
  NULL=
! OBJS=   fax2ps.o faxdecode.o
  CONF_LIBRARY=\
  	${NULL}
! CFLAGS+= ${COPTS} ${CONF_LIBRARY} -I${TIFF}
! LIBTIFF=	${TIFF}/libtiff.a
! LIBS=	-L ../../libtiff -ltiff
  
  all:	fax2ps
  
! fax2ps:	${OBJS} ${LIBTIFF}
  	${CC} -o $@@ ${OBJS} ${LDFLAGS} ${LIBS} -lm
  
  ${OBJS}: defs.h ${TIFF}/tiffio.h
***************
*** 48,51 ****
  	rm -f ${OBJS} fax2ps a.out core errs
  
  install: all
! 	/etc/install -f ${BIN} -m 755 fax2ps
--- 48,51 ----
  	rm -f ${OBJS} fax2ps a.out core errs
  
  install: all
! 	install -o bin -g bin -c -s -m 755 fax2ps ${BIN}
@


1.1.1.1
log
@Initial import of FreeBSD graphics ports into the NetBSD packages
system.
@
text
@@
