summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/jbig2dec/files/jbig2dec-0.11-libpng15.patch')
-rw-r--r--media-libs/jbig2dec/files/jbig2dec-0.11-libpng15.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/media-libs/jbig2dec/files/jbig2dec-0.11-libpng15.patch b/media-libs/jbig2dec/files/jbig2dec-0.11-libpng15.patch
new file mode 100644
index 00000000000..c18ccb7af60
--- /dev/null
+++ b/media-libs/jbig2dec/files/jbig2dec-0.11-libpng15.patch
@@ -0,0 +1,31 @@
+--- configure.ac
++++ configure.ac
+@@ -45,7 +45,7 @@
+ fi
+ dnl libpng requires pow() which may be in libm
+ AC_SEARCH_LIBS([pow], [m])
+- AC_CHECK_LIB([png], [png_check_sig], [
++ AC_CHECK_LIB([png], [png_sig_cmp], [
+ AC_CHECK_LIB([z], [deflate], [
+ AC_DEFINE(HAVE_LIBPNG, 1, [Define if libpng is available (-lpng)])
+ LIBS="-lpng -lz $LIBS"
+--- jbig2_image_png.c
++++ jbig2_image_png.c
+@@ -33,7 +33,7 @@
+ {
+ png_size_t check;
+
+- check = fwrite(data, 1, length, (png_FILE_p)png_ptr->io_ptr);
++ check = fwrite(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr));
+ if (check != length) {
+ png_error(png_ptr, "Write Error");
+ }
+@@ -43,7 +43,7 @@
+ jbig2_png_flush(png_structp png_ptr)
+ {
+ png_FILE_p io_ptr;
+- io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
++ io_ptr = (png_FILE_p)png_get_io_ptr(png_ptr);
+ if (io_ptr != NULL)
+ fflush(io_ptr);
+ }