summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/digikam/files/digikam-1.1.0-libpng14.patch')
-rw-r--r--media-gfx/digikam/files/digikam-1.1.0-libpng14.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/media-gfx/digikam/files/digikam-1.1.0-libpng14.patch b/media-gfx/digikam/files/digikam-1.1.0-libpng14.patch
new file mode 100644
index 000000000000..e7a161dbc9b3
--- /dev/null
+++ b/media-gfx/digikam/files/digikam-1.1.0-libpng14.patch
@@ -0,0 +1,42 @@
+http://repos.archlinux.org/wsvn/packages/digikam/trunk/libpng14.patch
+
+--- libs/dimg/loaders/pngloader.cpp
++++ libs/dimg/loaders/pngloader.cpp
+@@ -105,7 +105,7 @@
+ unsigned char buf[PNG_BYTES_TO_CHECK];
+
+ size_t membersRead = fread(buf, 1, PNG_BYTES_TO_CHECK, f);
+- if ((membersRead != PNG_BYTES_TO_CHECK) || !png_check_sig(buf, PNG_BYTES_TO_CHECK))
++ if ((membersRead != PNG_BYTES_TO_CHECK) || png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
+ {
+ kDebug() << "Not a PNG image file.";
+ fclose(f);
+@@ -322,7 +322,7 @@
+ #ifdef ENABLE_DEBUG_MESSAGES
+ kDebug() << "PNG in PNG_COLOR_TYPE_GRAY";
+ #endif
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ png_set_gray_to_rgb(png_ptr);
+
+ if (QSysInfo::ByteOrder == QSysInfo::LittleEndian) // Intel
+--- libs/threadimageio/thumbnailbasic.cpp
++++ libs/threadimageio/thumbnailbasic.cpp
+@@ -137,7 +137,7 @@
+ unsigned char buf[PNG_BYTES_TO_CHECK];
+
+ size_t itemsRead = fread(buf, 1, PNG_BYTES_TO_CHECK, f);
+- if (itemsRead != 1 || !png_check_sig(buf, PNG_BYTES_TO_CHECK))
++ if (itemsRead != 1 || png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
+ {
+ fclose(f);
+ return qimage;
+@@ -232,7 +232,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);