summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron>2012-07-31 15:12:03 +0000
committertron <tron>2012-07-31 15:12:03 +0000
commit7f4357ce79361f7da7178c9bb2c76b8c65ada79e (patch)
treea480ff33e832471bf442e191c13b33115a4011a2
parenta97ef4b7c1b0baa9fdeef24e7c55fe9605ccdd09 (diff)
downloadpkgsrc-7f4357ce79361f7da7178c9bb2c76b8c65ada79e.tar.gz
Pullup ticket #3882 - requested by dholland
graphics/camlimages: build fix Revisions pulled up: - graphics/camlimages/Makefile 1.44 via patch - graphics/camlimages/distinfo 1.9 - graphics/camlimages/patches/patch-src_tiffread.c 1.2 - graphics/camlimages/patches/patch-src_tiffwrite.c 1.1 --- Module Name: pkgsrc Committed By: marino Date: Sun Jul 29 12:52:56 UTC 2012 Modified Files: pkgsrc/graphics/camlimages: Makefile distinfo pkgsrc/graphics/camlimages/patches: patch-src_tiffread.c Added Files: pkgsrc/graphics/camlimages/patches: patch-src_tiffwrite.c Log Message: graphics/camlimages: Fix tiff-4.0 regression When tiff was upgraded to 4.0, camlimages stopped building. Both caml and tiff redefine several common typedefs such as uint32. Unlike the 3-series of tiff, tiff-4.0 also redefined int64 and uint64. The existing hack didn't foresee int64 and uint64 getting used, and so camlimages broke. One patch was created and another revised to override the caml typedef definitions with macros before tiff.h is included. The original tiffread.c patch was reworked to override uint16 and uint32 *again* after the tiff.h include and not before as it was originally. Very ugly all around, but I just extended what camlimages was already doing.
-rw-r--r--graphics/camlimages/Makefile4
-rw-r--r--graphics/camlimages/distinfo5
-rw-r--r--graphics/camlimages/patches/patch-src_tiffread.c32
-rw-r--r--graphics/camlimages/patches/patch-src_tiffwrite.c28
4 files changed, 59 insertions, 10 deletions
diff --git a/graphics/camlimages/Makefile b/graphics/camlimages/Makefile
index 0f5e96b969a..e305f005ddf 100644
--- a/graphics/camlimages/Makefile
+++ b/graphics/camlimages/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.42 2012/06/14 07:43:53 sbd Exp $
+# $NetBSD: Makefile,v 1.42.2.1 2012/07/31 15:12:03 tron Exp $
VERSION= 4.0.1
PKGNAME= camlimages-${VERSION}
-PKGREVISION= 9
+PKGREVISION= 11
CATEGORIES= graphics
MASTER_SITES= https://bitbucket.org/camlspotter/camlimages/get/
DISTNAME= v${VERSION}
diff --git a/graphics/camlimages/distinfo b/graphics/camlimages/distinfo
index 0406d2cc1bb..9f512cb249c 100644
--- a/graphics/camlimages/distinfo
+++ b/graphics/camlimages/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2011/08/07 20:36:20 wiz Exp $
+$NetBSD: distinfo,v 1.8.8.1 2012/07/31 15:12:03 tron Exp $
SHA1 (camlimages-4.0.1/v4.0.1.tar.gz) = 4c1eee28f02749f53ed8345b448ce11375ce6dce
RMD160 (camlimages-4.0.1/v4.0.1.tar.gz) = 6ae0f4c2ad3f0a8d7f4d84109d413e0b4bc1a86b
@@ -6,4 +6,5 @@ Size (camlimages-4.0.1/v4.0.1.tar.gz) = 2190252 bytes
SHA1 (patch-OMakefile) = de4f35f576b4a5a6de477b0f50cc6e5d4cfbe24c
SHA1 (patch-src_pngread.c) = 00d753b8570b5ff9ffa71e6e62328496b03f9654
SHA1 (patch-src_pngwrite.c) = 4df4f69851769e0eefc2249a30ac8dd53aa8d755
-SHA1 (patch-src_tiffread.c) = 319411cb6454ce276f540e260e4054054a60c700
+SHA1 (patch-src_tiffread.c) = 4dab0fe8da42fe7d0720d5edddf45743c7fa41fd
+SHA1 (patch-src_tiffwrite.c) = e1acae308004b22a7d46c694cd0a387bd8bf6546
diff --git a/graphics/camlimages/patches/patch-src_tiffread.c b/graphics/camlimages/patches/patch-src_tiffread.c
index 54d0f6f1c6f..26868ec0000 100644
--- a/graphics/camlimages/patches/patch-src_tiffread.c
+++ b/graphics/camlimages/patches/patch-src_tiffread.c
@@ -1,13 +1,33 @@
-$NetBSD: patch-src_tiffread.c,v 1.1 2011/08/07 20:36:20 wiz Exp $
+$NetBSD: patch-src_tiffread.c,v 1.1.8.1 2012/07/31 15:12:03 tron Exp $
---- src/tiffread.c.orig 2011-01-25 14:10:44.000000000 +0000
-+++ src/tiffread.c 2011-04-17 13:37:39.000000000 +0000
-@@ -28,6 +28,8 @@
+Both ocaml/caml/config.h and tiff.h define int32, uint32, etc.
+The workaround of this name polution is to intentionally overwrite the
+first caml definition with a garbage macro before tiff.h is included and
+then unset it after the include. After tiff version 4.0.1, the same hack
+has to be applied to 64-bit types. Unlike tiffwrite.c, tiffread.c forgot
+to unset the bogus definitions. The uint16 and uint32 then has to be
+redefined correctly. (ugly hack)
+
+--- src/tiffread.c.orig 2011-06-22 18:04:32.000000000 +0000
++++ src/tiffread.c
+@@ -28,9 +28,20 @@
#define uint16 uint16tiff
#define int32 int32tiff
#define uint32 uint32tiff
-+#define uint16 uint16_t
-+#define uint32 uint32_t
++#define int64 int64tiff
++#define uint64 uint64tiff
#include <tiffio.h>
++#undef int16
++#undef uint16
++#undef int32
++#undef uint32
++#undef int64
++#undef uint64
++#define uint16 uint16_t
++#define uint32 uint32_t
++
+ extern value *imglib_error;
+
+ value open_tiff_file_for_read( name )
diff --git a/graphics/camlimages/patches/patch-src_tiffwrite.c b/graphics/camlimages/patches/patch-src_tiffwrite.c
new file mode 100644
index 00000000000..c515c38b288
--- /dev/null
+++ b/graphics/camlimages/patches/patch-src_tiffwrite.c
@@ -0,0 +1,28 @@
+$NetBSD: patch-src_tiffwrite.c,v 1.1.2.2 2012/07/31 15:12:03 tron Exp $
+
+Both ocaml/caml/config.h and tiff.h define int32, uint32, etc.
+The workaround of this name polution is to intentionally overwrite the
+first caml definition with a garbage macro before tiff.h is included and
+then unset it after the include. After tiff version 4.0.1, the same hack
+has to be applied to 64-bit types
+
+--- src/tiffwrite.c.orig 2011-06-22 18:04:32.000000000 +0000
++++ src/tiffwrite.c
+@@ -25,6 +25,8 @@
+ #define uint16 uint16tiff
+ #define int32 int32tiff
+ #define uint32 uint32tiff
++#define int64 int64tiff
++#define uint64 uint64tiff
+
+ #include <tiffio.h>
+
+@@ -32,6 +34,8 @@
+ #undef uint16
+ #undef int32
+ #undef uint32
++#undef int64
++#undef uint64
+
+ extern value *imglib_error;
+