ports/145159: [ERROR] cannot portupgrade graphics/digikam-kde4

Dima Panov fluffy at freebsd.org
Mon Mar 29 13:37:35 UTC 2010


On Tuesday 30 March 2010 00:14:49 Matt wrote:
> On Mon, Mar 29, 2010 at 1:46 AM,  <dinoex at freebsd.org> wrote:
> > Synopsis: [ERROR] cannot portupgrade graphics/digikam-kde4
> > 
> > Responsible-Changed-From-To: freebsd-ports-bugs->dinoex
> > Responsible-Changed-By: dinoex
> > Responsible-Changed-When: Mon Mar 29 09:45:40 CEST 2010
> > Responsible-Changed-Why:
> > I will take care of it.
> > 
> > http://www.freebsd.org/cgi/query-pr.cgi?pr=145159
> 
> From the libpng-1.4.1.txt file that comes with the updated dist file:
>     The function png_set_expand_gray_1_2_4_to_8() was added at
> libpng-1.2.9. Unlike png_set_gray_1_2_4_to_8(), the new function does not
> expand the tRNS chunk to alpha. The png_set_gray_1_2_4_to_8() function is
> deprecated.
> 
> So it looks like the proposed patch is the right one as long as it
> passes a tindy run.


backport from digikam svn trunk


--- ./libs/dimg/loaders/pngloader.cpp.orig	2010-01-31 23:21:36.000000000 +1000
+++ ./libs/dimg/loaders/pngloader.cpp	2010-02-04 11:16:41.771939164 +1000
@@ -105,7 +105,11 @@
     unsigned char buf[PNG_BYTES_TO_CHECK];
 
     size_t membersRead = fread(buf, 1, PNG_BYTES_TO_CHECK, f);
+#if PNG_LIBPNG_VER >= 10400
+    if ((membersRead != PNG_BYTES_TO_CHECK) || png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
+#else
     if ((membersRead != PNG_BYTES_TO_CHECK) || !png_check_sig(buf, PNG_BYTES_TO_CHECK))
+#endif
     {
         kDebug() << "Not a PNG image file.";
         fclose(f);
@@ -165,7 +169,11 @@
     CleanupData *cleanupData = new CleanupData;
     cleanupData->setFile(f);
 
+#if PNG_LIBPNG_VER >= 10400
+    if (setjmp(png_jmpbuf(png_ptr)))
+#else
     if (setjmp(png_ptr->jmpbuf))
+#endif
     {
         kDebug() << "Internal libPNG error during reading file. Process aborted!";
         png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
@@ -322,7 +330,11 @@
 #ifdef ENABLE_DEBUG_MESSAGES
                     kDebug() << "PNG in PNG_COLOR_TYPE_GRAY";
 #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 (QSysInfo::ByteOrder == QSysInfo::LittleEndian)           // Intel
@@ -627,7 +639,11 @@
     CleanupData *cleanupData = new CleanupData;
     cleanupData->setFile(f);
 
-    if (setjmp(png_ptr->jmpbuf))
+#if PNG_LIBPNG_VER >= 10400
+    if (setjmp(png_jmpbuf(png_ptr)))
+#else
+     if (setjmp(png_ptr->jmpbuf))
+#endif
     {
         kDebug() << "Internal libPNG error during writing file. Process aborted!";
         png_destroy_write_struct(&png_ptr, (png_infopp) & info_ptr);


-- 
Dima "Red Fox" Panov @ Home | C73E 2B72 1FFD 61BD E206 1234 A626 76ED 93E3 B018
Khabarovsk, Russia          | 2D30 2CCB 9984 130C 6F87 BAFC FB8B A09D D539 8F29
KDE at FreeBSD Team | FreeBSD committer since 10.08.2009 | FreeBSD since Sept 1995
Twitter.com:fluffy_khv | Skype:dima.panov | Jabber.org:fluffy.khv | ICQ:1745024



More information about the freebsd-ports-bugs mailing list