aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2010-03-30 01:37:39 +0800
committerdinoex <dinoex@FreeBSD.org>2010-03-30 01:37:39 +0800
commit8b2b0d77cd7916d61eaae20dfe1ef74af087a614 (patch)
tree730b9ed677b590ad476ce475784075d6116ee531 /graphics
parent53e5f3be83a209cdc80e16481302c3f0e9bf5db8 (diff)
downloadfreebsd-ports-gnome-8b2b0d77cd7916d61eaae20dfe1ef74af087a614.tar.gz
freebsd-ports-gnome-8b2b0d77cd7916d61eaae20dfe1ef74af087a614.tar.zst
freebsd-ports-gnome-8b2b0d77cd7916d61eaae20dfe1ef74af087a614.zip
- fix build for png-1.4.1
Diffstat (limited to 'graphics')
-rw-r--r--graphics/digikam/files/patch-kioslave__digikamthumbnail.cpp20
-rw-r--r--graphics/digikam/files/patch-libs__dimg__loaders__pngloader.cpp51
2 files changed, 71 insertions, 0 deletions
diff --git a/graphics/digikam/files/patch-kioslave__digikamthumbnail.cpp b/graphics/digikam/files/patch-kioslave__digikamthumbnail.cpp
new file mode 100644
index 000000000000..6309033f8f68
--- /dev/null
+++ b/graphics/digikam/files/patch-kioslave__digikamthumbnail.cpp
@@ -0,0 +1,20 @@
+--- digikam/kioslave/digikamthumbnail.cpp.orig 2009-07-03 07:19:41.000000000 +0200
++++ digikam/kioslave/digikamthumbnail.cpp 2010-03-29 19:04:20.000000000 +0200
+@@ -370,7 +370,7 @@
+ unsigned char buf[PNG_BYTES_TO_CHECK];
+
+ fread(buf, 1, PNG_BYTES_TO_CHECK, f);
+- if (!png_check_sig(buf, PNG_BYTES_TO_CHECK))
++ if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
+ {
+ fclose(f);
+ return qimage;
+@@ -465,7 +465,7 @@
+ {
+ png_set_gray_to_rgb(png_ptr);
+ if (png_get_bit_depth(png_ptr, info_ptr) < 8)
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ }
+
+ int sizeOfUint = sizeof(unsigned int);
diff --git a/graphics/digikam/files/patch-libs__dimg__loaders__pngloader.cpp b/graphics/digikam/files/patch-libs__dimg__loaders__pngloader.cpp
new file mode 100644
index 000000000000..6e0baf03bb97
--- /dev/null
+++ b/graphics/digikam/files/patch-libs__dimg__loaders__pngloader.cpp
@@ -0,0 +1,51 @@
+--- digikam/libs/dimg/loaders/pngloader.cpp.orig 2009-07-03 07:19:41.000000000 +0200
++++ digikam/libs/dimg/loaders/pngloader.cpp 2010-03-29 18:35:49.000000000 +0200
+@@ -88,7 +88,11 @@
+ unsigned char buf[PNG_BYTES_TO_CHECK];
+
+ fread(buf, 1, PNG_BYTES_TO_CHECK, f);
++#if PNG_LIBPNG_VER >= 10400
++ if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
++#else
+ if (!png_check_sig(buf, PNG_BYTES_TO_CHECK))
++#endif
+ {
+ DDebug() << k_funcinfo << "Not a PNG image file." << endl;
+ fclose(f);
+@@ -120,7 +124,11 @@
+ // PNG error handling. If an error occurs during reading, libpng
+ // will jump here
+
++#if PNG_LIBPNG_VER >= 10400
++ if (setjmp(png_jmpbuf(png_ptr)))
++#else
+ if (setjmp(png_ptr->jmpbuf))
++#endif
+ {
+ DDebug() << k_funcinfo << "Internal libPNG error during reading file. Process aborted!" << endl;
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+@@ -252,7 +260,11 @@
+ #ifdef ENABLE_DEBUG_MESSAGES
+ DDebug() << "PNG in PNG_COLOR_TYPE_GRAY" << endl;
+ #endif
++#if PNG_LIBPNG_VER >= 10400
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
++#else
+ png_set_gray_1_2_4_to_8(png_ptr);
++#endif
+ png_set_gray_to_rgb(png_ptr);
+
+ if (QImage::systemByteOrder() == QImage::LittleEndian) // Intel
+@@ -526,7 +538,11 @@
+ // PNG error handling. If an error occurs during writing, libpng
+ // will jump here
+
+- if (setjmp(png_ptr->jmpbuf))
++#if PNG_LIBPNG_VER >= 10400
++ if (setjmp(png_jmpbuf(png_ptr)))
++#else
++ if (setjmp(png_ptr->jmpbuf))
++#endif
+ {
+ DDebug() << k_funcinfo << "Internal libPNG error during writing file. Process aborted!" << endl;
+ fclose(f);