Subject: bump BUILDLINK_DEPENDS.tiff and pkg/23515: graphics/tiff is broken
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 11/21/2003 02:24:53
I am working on PR pkg/23515.

On an amd64 system, libtiff didn't properly build for 64 bit. So other
software using it didn't work correctly.

I believe that the tiff/buildlink2.mk's BUILDLINK_DEPENDS.tiff needs to be
increased. I understand that in some cases, the packages depending on it
may need to be increased too. Please advise me on how to proceed.

Maybe this will help other 64-bit machines too. (Can anyone test?)

Below is the patch for graphics/tiff and also here are
graphics/tiff/patches/patch-ah and graphics/tiff/patches/patch-ai.

Please test.

   Jeremy C. Reed
   http://bsd.reedmedia.net/

? graphics/tiff/patches/patch-ah
? graphics/tiff/patches/patch-ai
Index: graphics/tiff/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/tiff/Makefile,v
retrieving revision 1.48
diff -b -u -r1.48 Makefile
--- graphics/tiff/Makefile	2003/10/03 15:38:46	1.48
+++ graphics/tiff/Makefile	2003/11/21 10:20:45
@@ -2,7 +2,7 @@

 DISTNAME=	tiff-v3.5.7
 PKGNAME=	tiff-3.5.7
-PKGREVISION=	1
+PKGREVISION=	2
 CATEGORIES=	graphics
 MASTER_SITES=	ftp://ftp.remotesensing.org/pub/libtiff/
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
Index: graphics/tiff/buildlink2.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/tiff/buildlink2.mk,v
retrieving revision 1.2
diff -b -u -r1.2 buildlink2.mk
--- graphics/tiff/buildlink2.mk	2002/08/25 18:39:23	1.2
+++ graphics/tiff/buildlink2.mk	2003/11/21 10:20:45
@@ -4,7 +4,7 @@
 TIFF_BUILDLINK2_MK=	# defined

 BUILDLINK_PACKAGES+=		tiff
-BUILDLINK_DEPENDS.tiff?=	tiff>=3.5.4
+BUILDLINK_DEPENDS.tiff?=	tiff>=3.5.7nb2
 BUILDLINK_PKGSRCDIR.tiff?=	../../graphics/tiff

 EVAL_PREFIX+=	BUILDLINK_PREFIX.tiff=tiff
Index: graphics/tiff/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/tiff/distinfo,v
retrieving revision 1.10
diff -b -u -r1.10 distinfo
--- graphics/tiff/distinfo	2003/05/23 09:26:58	1.10
+++ graphics/tiff/distinfo	2003/11/21 10:20:45
@@ -11,3 +11,5 @@
 SHA1 (patch-ae) = 146a27e003ec0d194f31b021b961699f3ffe9f94
 SHA1 (patch-af) = e168502fbdc7f94439aa71a5f67d85ce41d1a68e
 SHA1 (patch-ag) = 32ff74fe27c0fd00948c50db97a2ee71f34560ef
+SHA1 (patch-ah) = 59429b6299e368b4c3147bd2c98172d0caf831af
+SHA1 (patch-ai) = 89506c1ef6bbab5e8c7361a3ab503fa43c30eeed
$NetBSD$

--- libtiff/tiff.h.orig	Fri Nov  2 09:25:52 2001
+++ libtiff/tiff.h
@@ -79,7 +79,7 @@ typedef	char int8;
 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__)
+#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__) || defined(_LP64)
 typedef	int int32;
 typedef	unsigned int uint32;	/* sizeof (uint32) must == 4 */
 #else
$NetBSD$

--- libtiff/tif_fax3.c.orig	Sun Sep  9 09:10:37 2001
+++ libtiff/tif_fax3.c
@@ -315,7 +315,7 @@ Fax3Decode2D(TIFF* tif, tidata_t buf, ts
  * this is <8 bytes.  We optimize the code here to reflect the
  * machine characteristics.
  */
-#if defined(__alpha) || _MIPS_SZLONG == 64 || defined(__LP64__)
+#if defined(__alpha) || _MIPS_SZLONG == 64 || defined(__LP64__) || defined(_LP64)
 #define FILL(n, cp)							    \
     switch (n) {							    \
     case 15:(cp)[14] = 0xff; case 14:(cp)[13] = 0xff; case 13: (cp)[12] = 0xff;\