[arch-commits] Commit in digikam/trunk (PKGBUILD libpng14.patch)

Ionut Biru ibiru at archlinux.org
Wed Jan 20 16:39:06 EST 2010


    Date: Wednesday, January 20, 2010 @ 16:39:05
  Author: ibiru
Revision: 64492

upgpkg: digikam 1.0.0-2
    libpng1.4.0/libjpeg8 rebuild

Added:
  digikam/trunk/libpng14.patch
Modified:
  digikam/trunk/PKGBUILD

----------------+
 PKGBUILD       |    9 ++++++---
 libpng14.patch |   42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-01-20 21:36:06 UTC (rev 64491)
+++ PKGBUILD	2010-01-20 21:39:05 UTC (rev 64492)
@@ -3,20 +3,22 @@
 
 pkgname=digikam
 pkgver=1.0.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Digital photo management application for kde"
 arch=(i686 x86_64)
 license=('GPL')
 url="http://digikam.sourceforge.net"
 depends=('kdebase-runtime' 'kdegraphics-libs' 'kdepimlibs' 'lensfun' 'kdeedu-marble' 'liblqr')
 makedepends=('pkgconfig' 'cmake' 'automoc4')
-source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2 libpng14.patch)
 replaces=('digikamimageplugins')
 install=digikam.install
 optdepends=('kipi-plugins: for more extras and plugins')
 
 build() {
    cd ${srcdir}
+   patch -Np0 -i ${srcdir}/libpng14.patch || return 1
+
    mkdir build
    cd build
    cmake ../${pkgname}-${pkgver} \
@@ -27,4 +29,5 @@
    make all|| return 1
    make DESTDIR=${pkgdir} install || return 1
  }
-md5sums=('6169deb68a3d712a0c6539b09c5f8c0c')
+md5sums=('6169deb68a3d712a0c6539b09c5f8c0c'
+         '80fddb057f635a4a8c200410d6419280')

Added: libpng14.patch
===================================================================
--- libpng14.patch	                        (rev 0)
+++ libpng14.patch	2010-01-20 21:39:05 UTC (rev 64492)
@@ -0,0 +1,42 @@
+diff -Nur digikam-1.0.0.orig/libs/dimg/loaders/pngloader.cpp digikam-1.0.0/libs/dimg/loaders/pngloader.cpp
+--- digikam-1.0.0.orig/libs/dimg/loaders/pngloader.cpp	2009-12-21 11:20:36.000000000 +0200
++++ digikam-1.0.0/libs/dimg/loaders/pngloader.cpp	2010-01-20 20:18:51.000000000 +0200
+@@ -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
+diff -Nur digikam-1.0.0.orig/libs/threadimageio/thumbnailbasic.cpp digikam-1.0.0/libs/threadimageio/thumbnailbasic.cpp
+--- digikam-1.0.0.orig/libs/threadimageio/thumbnailbasic.cpp	2009-12-21 11:20:45.000000000 +0200
++++ digikam-1.0.0/libs/threadimageio/thumbnailbasic.cpp	2010-01-20 20:19:20.000000000 +0200
+@@ -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);



More information about the arch-commits mailing list