Date: Tue, 30 Mar 2010 00:37:02 +1100 From: Dima Panov <fluffy@freebsd.org> To: freebsd-ports-bugs@freebsd.org Cc: dinoex@freebsd.org, Matt <datahead4@gmail.com> Subject: Re: ports/145159: [ERROR] cannot portupgrade graphics/digikam-kde4 Message-ID: <201003300037.07888.fluffy@freebsd.org> In-Reply-To: <cd6b4a5b1003290614g55ce23b2k9253d8ef3849f115@mail.gmail.com> References: <201003290746.o2T7k39a078224@freefall.freebsd.org> <cd6b4a5b1003290614g55ce23b2k9253d8ef3849f115@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 30 March 2010 00:14:49 Matt wrote: > On Mon, Mar 29, 2010 at 1:46 AM, <dinoex@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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003300037.07888.fluffy>