summaryrefslogtreecommitdiff
path: root/graphics/camlimages/patches
diff options
context:
space:
mode:
authordholland <dholland>2016-09-18 05:46:31 +0000
committerdholland <dholland>2016-09-18 05:46:31 +0000
commit74d08b4f7c7f7e7dd5080e0598114b599e222c56 (patch)
treee8fc7de71e31964f02591835e5355f5ebda5be5f /graphics/camlimages/patches
parent2704e84cd28ddf17871b3eacdd60702daa5dddd1 (diff)
downloadpkgsrc-74d08b4f7c7f7e7dd5080e0598114b599e222c56.tar.gz
Fix broken build.
Diffstat (limited to 'graphics/camlimages/patches')
-rw-r--r--graphics/camlimages/patches/patch-src_tiffwrite.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/graphics/camlimages/patches/patch-src_tiffwrite.c b/graphics/camlimages/patches/patch-src_tiffwrite.c
index 896e3075395..5a0625ae59d 100644
--- a/graphics/camlimages/patches/patch-src_tiffwrite.c
+++ b/graphics/camlimages/patches/patch-src_tiffwrite.c
@@ -1,10 +1,14 @@
-$NetBSD: patch-src_tiffwrite.c,v 1.1 2012/07/29 12:52:55 marino Exp $
+$NetBSD: patch-src_tiffwrite.c,v 1.2 2016/09/18 05:46:31 dholland Exp $
-Both ocaml/caml/config.h and tiff.h define int32, uint32, etc.
+ - 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
+has to be applied to 64-bit types.
+
+ - As of some newer ocaml there's no "uint32", only "uint32_t". The
+first two hunks of this patch are probably no longer necessary.
+
--- src/tiffwrite.c.orig 2011-06-22 18:04:32.000000000 +0000
+++ src/tiffwrite.c
@@ -26,3 +30,14 @@ has to be applied to 64-bit types
extern value *imglib_error;
+@@ -56,8 +60,8 @@ value open_tiff_file_for_write( value fi
+ /* Resolution */
+ /* FillOrder */
+
+- TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32) image_width);
+- TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32) image_height);
++ TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32_t) image_width);
++ TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32_t) image_height);
+ TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
+ TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3);
+ TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);