mirror of
https://git.freebsd.org/ports.git
synced 2025-06-19 11:40:31 -04:00
Ocaml 4.00 can't build ocaml-images 3.0.1, so the solution is to update the package to a newer version. This arrived from dports, but it has been heavily modified since then. It has also been staged. The pkg-plist needs work because it doesn't support all the options if they are turned off. GTK2 has been left OFF by default since it pulls in 136 packages when enabled. The Ocaml framework did not support staging at the time, so several knobs were turned off, especially the "WASH" function which disrupted pkg greatly. The options were cleaned up in a modern way too. An additional patch was addded to make clang happy so this builds on FreeBSD 10 inside poudriere. Urged by: portmgr(bapt)
36 lines
805 B
C
36 lines
805 B
C
--- src/tiffread.c.orig 2011-06-22 20:04:32.000000000 +0200
|
|
+++ src/tiffread.c
|
|
@@ -23,14 +23,22 @@
|
|
|
|
#include "oversized.h"
|
|
|
|
+/* Avoid redefinitions */
|
|
+#undef int16
|
|
+#undef uint16
|
|
/* These are defined in caml/config.h */
|
|
#define int16 int16tiff
|
|
#define uint16 uint16tiff
|
|
#define int32 int32tiff
|
|
#define uint32 uint32tiff
|
|
+#define int64 int64tiff
|
|
+#define uint64 uint64tiff
|
|
|
|
#include <tiffio.h>
|
|
|
|
+#undef int64
|
|
+#undef uint64
|
|
+
|
|
extern value *imglib_error;
|
|
|
|
value open_tiff_file_for_read( name )
|
|
@@ -70,6 +78,10 @@
|
|
failwith_oversized("tiff");
|
|
}
|
|
|
|
+ if (oversized (imagewidth, imagelength)) {
|
|
+ failwith_oversized("tiff");
|
|
+ }
|
|
+
|
|
if( imagesample == 3 && photometric == PHOTOMETRIC_RGB ){
|
|
if( imagebits != 8 ){
|
|
failwith("Sorry, tiff rgb file must be 24bit-color");
|