summaryrefslogtreecommitdiff
path: root/graphics/ocaml-images/files
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/ocaml-images/files')
-rw-r--r--graphics/ocaml-images/files/patch-OMakefile46
-rw-r--r--graphics/ocaml-images/files/patch-configure13
-rw-r--r--graphics/ocaml-images/files/patch-src_OMakefile15
-rw-r--r--graphics/ocaml-images/files/patch-src_bitmap.ml11
-rw-r--r--graphics/ocaml-images/files/patch-src_gifread.c34
-rw-r--r--graphics/ocaml-images/files/patch-src_gifwrite.c55
-rw-r--r--graphics/ocaml-images/files/patch-src_jpegread.c11
-rw-r--r--graphics/ocaml-images/files/patch-src_pngread.c38
-rw-r--r--graphics/ocaml-images/files/patch-src_pngwrite.c20
-rw-r--r--graphics/ocaml-images/files/patch-src_tiffread.c36
-rw-r--r--graphics/ocaml-images/files/patch-src_tiffwrite.c39
11 files changed, 0 insertions, 318 deletions
diff --git a/graphics/ocaml-images/files/patch-OMakefile b/graphics/ocaml-images/files/patch-OMakefile
deleted file mode 100644
index 8f6675f254fc..000000000000
--- a/graphics/ocaml-images/files/patch-OMakefile
+++ /dev/null
@@ -1,46 +0,0 @@
---- OMakefile.orig 2011-06-22 18:04:32 UTC
-+++ OMakefile
-@@ -22,13 +22,13 @@ if $(defined WithOMyApt)
-
- # Specify non standard include directories
- INCLUDES[]=
-- /usr/include/X11
-- /usr/local/include
-+ %%INCLUDESPORTS%%
-+ %%INCLUDESX11%%
-+ %%INCLUDESPNG%%
-
- # Specify non standard library directories
- LDFLAGS[]+=
--# for example,
--# LDFLAGS[]+= -L/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/
-+ %%LDFLAGSPORTS%%
-
- # Specify directories where X's rgb.txt can be found
- PATH_RGB_TXT[]=
-@@ -95,6 +95,8 @@ print_configured() =
- exit 1
-
- CFLAGS = $(addprefix -I , $(INCLUDES))
-+ OCAMLCFLAGS = -unsafe-string
-+ OCAMLOPTFLAGS = -unsafe-string
-
- WORD_SIZE = $(Word_size)
-
-@@ -175,13 +177,13 @@ print_configured() =
- OCAMLPACKS+=graphics
- export
-
-- SUPPORT_FREETYPE = $(Check_prog_in_path freetype-config)
-+ SUPPORT_FREETYPE = $(Check_prog_in_path pkg-config)
- PATH_FREETYPE_CONFIG = $(WHERE)
- LDFLAGS_freetype=
- if $(SUPPORT_FREETYPE)
- println(SUPPORT_FREETYPE=$(SUPPORT_FREETYPE)!)
-- CFLAGS= $(CFLAGS) $(shell freetype-config --cflags)
-- LDFLAGS_freetype= $(shell freetype-config --libs)
-+ CFLAGS= $(CFLAGS) $(shell pkg-config freetype2 --cflags)
-+ LDFLAGS_freetype= $(shell pkg-config freetype2 --libs)
- export
- if $(SUPPORT_FREETYPE)
- SUPPORTED_NON_FORMATS+=freetype
diff --git a/graphics/ocaml-images/files/patch-configure b/graphics/ocaml-images/files/patch-configure
deleted file mode 100644
index 224ee1fca92e..000000000000
--- a/graphics/ocaml-images/files/patch-configure
+++ /dev/null
@@ -1,13 +0,0 @@
---- configure.orig 2021-08-07 07:17:08 UTC
-+++ configure
-@@ -8108,8 +8108,8 @@ fi
-
-
- if test -n "$FREETYPE_CONFIG"; then
-- LIBFREETYPE=`freetype-config --libs`
-- INCFREETYPE=`freetype-config --cflags`
-+ LIBFREETYPE=`pkg-config freetype2 --libs`
-+ INCFREETYPE=`pkg-config freetype2 --cflags`
- SUPPORT_FREETYPE="true"
- fi
- fi
diff --git a/graphics/ocaml-images/files/patch-src_OMakefile b/graphics/ocaml-images/files/patch-src_OMakefile
deleted file mode 100644
index c6d85cfd4037..000000000000
--- a/graphics/ocaml-images/files/patch-src_OMakefile
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/OMakefile.orig 2012-11-07 22:43:27.000000000 +0100
-+++ src/OMakefile 2012-11-07 22:44:22.000000000 +0100
-@@ -262,10 +262,10 @@
- $(glob i, *.so)
-
- INSTALL()=
-- value $(OCAMLFIND) install $(LIBRARY_PREFIX) $(INSTALL_TARGETS)
-+ value $(OCAMLFIND) install -ldconf ignore -destdir $(PREFIX)/lib/ocaml/site-lib $(LIBRARY_PREFIX) $(INSTALL_TARGETS)
-
- UNINSTALL()=
-- value $(OCAMLFIND) remove $(LIBRARY_PREFIX)
-+ value $(OCAMLFIND) remove -ldconf ignore -destdir $(PREFIX)/lib/ocaml/site-lib $(LIBRARY_PREFIX)
-
- install: all
- $(INSTALL)
diff --git a/graphics/ocaml-images/files/patch-src_bitmap.ml b/graphics/ocaml-images/files/patch-src_bitmap.ml
deleted file mode 100644
index eec47155e7a5..000000000000
--- a/graphics/ocaml-images/files/patch-src_bitmap.ml
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/bitmap.ml.orig 2011-06-22 18:04:32 UTC
-+++ src/bitmap.ml
-@@ -186,7 +186,7 @@ module Make(B:Bitdepth) = struct
-
- let swap_out_eldest words =
- let sorted =
-- Sort.list (fun b1 b2 -> b1.last_used < b2.last_used) !swappable_blocks in
-+ List.sort (fun b1 b2 -> compare b1.last_used b2.last_used) !swappable_blocks in
- let rec swapper sorted i =
- match sorted with
- | [] -> ()
diff --git a/graphics/ocaml-images/files/patch-src_gifread.c b/graphics/ocaml-images/files/patch-src_gifread.c
deleted file mode 100644
index c2b49558342c..000000000000
--- a/graphics/ocaml-images/files/patch-src_gifread.c
+++ /dev/null
@@ -1,34 +0,0 @@
---- src/gifread.c.orig 2011-06-22 18:04:32 UTC
-+++ src/gifread.c
-@@ -140,7 +140,11 @@ value dGifOpenFileName( value name )
- GifFileType *GifFile;
- int i;
-
-+#if GIFLIB_MAJOR >= 5
-+ if((GifFile = DGifOpenFileName( String_val(name), NULL )) == NULL){
-+#else
- if((GifFile = DGifOpenFileName( String_val(name) )) == NULL){
-+#endif
- failwith("DGifOpenFileName");
- }
-
-@@ -161,7 +165,11 @@ value dGifCloseFile( value hdl )
- segmentation faults */
- ((GifFileType *)hdl)->Image.ColorMap = NULL;
-
-+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
-+ DGifCloseFile( (GifFileType *) hdl, NULL );
-+#else
- DGifCloseFile( (GifFileType *) hdl );
-+#endif
- CAMLreturn(Val_unit);
- }
-
-@@ -200,7 +208,6 @@ value dGifGetLine( value hdl )
-
- if( DGifGetLine(GifFile, String_val(buf), GifFile->Image.Width )
- == GIF_ERROR ){
-- PrintGifError ();
- failwith("DGifGetLine");
- }
- CAMLreturn(buf);
diff --git a/graphics/ocaml-images/files/patch-src_gifwrite.c b/graphics/ocaml-images/files/patch-src_gifwrite.c
deleted file mode 100644
index 0fbcede2549c..000000000000
--- a/graphics/ocaml-images/files/patch-src_gifwrite.c
+++ /dev/null
@@ -1,55 +0,0 @@
---- src/gifwrite.c.orig 2011-06-22 18:04:32 UTC
-+++ src/gifwrite.c
-@@ -25,7 +25,7 @@
-
- #include <gif_lib.h>
-
--int list_length( value list )
-+static int list_length( value list )
- {
- CAMLparam1(list);
- CAMLlocal1(l);
-@@ -52,7 +52,11 @@ ColorMapObject *ColorMapObject_val( valu
- fprintf(stderr, "Creating map with length = %d ...\n", len);
- fflush(stderr);
- */
-+#if GIFLIB_MAJOR >= 5
-+ cmapobj = GifMakeMapObject( len, NULL );
-+#else
- cmapobj = MakeMapObject( len, NULL );
-+#endif
- for(i=0; i< len; i++){
- cmapobj->Colors[i].Red = Int_val(Field(Field(cmap,i),0));
- cmapobj->Colors[i].Green = Int_val(Field(Field(cmap,i),1));
-@@ -68,7 +72,11 @@ value eGifOpenFileName( name )
-
- GifFileType *GifFileOut;
-
-+#if GIFLIB_MAJOR >= 5
-+ if ((GifFileOut = EGifOpenFileName( String_val( name ), 0, NULL) )== NULL) {
-+#else
- if ((GifFileOut = EGifOpenFileName( String_val( name ), 0) )== NULL) {
-+#endif
- failwith("EGifOpenFileName");
- }
- /* gcc -fwritable-strings is required to compile libungif */
-@@ -88,7 +96,11 @@ value eGifCloseFile( value hdl )
- segmentation faults */
- ((GifFileType *)hdl)->Image.ColorMap = NULL;
-
-+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
-+ EGifCloseFile( (GifFileType *) hdl, NULL );
-+#else
- EGifCloseFile( (GifFileType *) hdl );
-+#endif
- CAMLreturn(Val_unit);
- }
-
-@@ -133,7 +145,6 @@ value eGifPutLine( value oc, value buf )
-
- if ( EGifPutLine(GifFileOut, String_val(buf), GifFileOut->Image.Width)
- == GIF_ERROR ){
-- PrintGifError ();
- failwith("EGifPutLine");
- }
- CAMLreturn(Val_unit);
diff --git a/graphics/ocaml-images/files/patch-src_jpegread.c b/graphics/ocaml-images/files/patch-src_jpegread.c
deleted file mode 100644
index 4369ab05fd9d..000000000000
--- a/graphics/ocaml-images/files/patch-src_jpegread.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/jpegread.c.orig 2011-06-22 20:04:32.000000000 +0200
-+++ src/jpegread.c
-@@ -417,7 +417,7 @@
- jpeg_read_scanlines( cinfop, row, 1 );
- row[0] += scanline_bytes;
- }
-- CAMLreturn0;
-+ CAMLreturn(0);
- }
-
- value close_jpeg_file_for_read( jpegh )
diff --git a/graphics/ocaml-images/files/patch-src_pngread.c b/graphics/ocaml-images/files/patch-src_pngread.c
deleted file mode 100644
index 2e5a49bf9c4f..000000000000
--- a/graphics/ocaml-images/files/patch-src_pngread.c
+++ /dev/null
@@ -1,38 +0,0 @@
---- src/pngread.c.orig 2009-10-26 13:42:03.000000000 +0100
-+++ src/pngread.c 2012-05-05 07:08:53.000000000 +0200
-@@ -69,7 +69,7 @@
- }
-
- /* error handling */
-- if (setjmp(png_ptr->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png_ptr))) {
- /* Free all of the memory associated with the png_ptr and info_ptr */
- png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
- fclose(fp);
-@@ -134,7 +134,7 @@
- png_set_rows(png_ptr, info_ptr, row_pointers);
-
- /* Later, we can return something */
-- if (setjmp(png_ptr->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png_ptr))) {
- /* Free all of the memory associated with the png_ptr and info_ptr */
- png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
- fclose(fp);
-@@ -243,7 +243,7 @@
- }
-
- /* error handling */
-- if (setjmp(png_ptr->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png_ptr))) {
- /* Free all of the memory associated with the png_ptr and info_ptr */
- png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
- fclose(fp);
-@@ -302,7 +302,7 @@
- png_set_rows(png_ptr, info_ptr, row_pointers);
-
- /* Later, we can return something */
-- if (setjmp(png_ptr->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png_ptr))) {
- /* Free all of the memory associated with the png_ptr and info_ptr */
- png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
- fclose(fp);
diff --git a/graphics/ocaml-images/files/patch-src_pngwrite.c b/graphics/ocaml-images/files/patch-src_pngwrite.c
deleted file mode 100644
index dc6872e299d7..000000000000
--- a/graphics/ocaml-images/files/patch-src_pngwrite.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/pngwrite.c.orig 2009-10-26 13:42:03.000000000 +0100
-+++ src/pngwrite.c 2012-05-06 13:01:28.000000000 +0200
-@@ -62,7 +62,7 @@
- }
-
- /* error handling */
-- if (setjmp(png_ptr->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png_ptr))) {
- /* Free all of the memory associated with the png_ptr and info_ptr */
- png_destroy_write_struct(&png_ptr, &info_ptr);
- fclose(fp);
-@@ -171,7 +171,7 @@
- }
-
- /* error handling */
-- if (setjmp(png_ptr->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png_ptr))) {
- /* Free all of the memory associated with the png_ptr and info_ptr */
- png_destroy_write_struct(&png_ptr, &info_ptr);
- fclose(fp);
diff --git a/graphics/ocaml-images/files/patch-src_tiffread.c b/graphics/ocaml-images/files/patch-src_tiffread.c
deleted file mode 100644
index 73b684a3408e..000000000000
--- a/graphics/ocaml-images/files/patch-src_tiffread.c
+++ /dev/null
@@ -1,36 +0,0 @@
---- 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");
diff --git a/graphics/ocaml-images/files/patch-src_tiffwrite.c b/graphics/ocaml-images/files/patch-src_tiffwrite.c
deleted file mode 100644
index 280158a1d7dd..000000000000
--- a/graphics/ocaml-images/files/patch-src_tiffwrite.c
+++ /dev/null
@@ -1,39 +0,0 @@
---- src/tiffwrite.c.orig 2011-06-22 20:04:32.000000000 +0200
-+++ src/tiffwrite.c
-@@ -20,11 +20,16 @@
- #include <caml/memory.h>
- #include <caml/fail.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>
-
-@@ -32,6 +37,8 @@
- #undef uint16
- #undef int32
- #undef uint32
-+#undef int64
-+#undef uint64
-
- extern value *imglib_error;
-
-@@ -56,8 +63,8 @@ value open_tiff_file_for_write( value file,
- /* Resolution */
- /* FillOrder */
-
-- TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32) image_width);
-- TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32) image_height);
-+ TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, image_width);
-+ TIFFSetField(tif, TIFFTAG_IMAGELENGTH, image_height);
- TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
- TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3);
- TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);