[digikam] bacport fix for changed libpgf API

nucleo nucleo at fedoraproject.org
Sat Oct 29 19:27:04 UTC 2011


commit a3b432dcad8655ab7ce7b338541c0e7ff0a54650
Author: nucleo <nucleo at fedoraproject.org>
Date:   Sat Oct 29 22:26:59 2011 +0300

    bacport fix for changed libpgf API

 digikam-2.2.0-libpgf-api.patch |   44 ++++++++++++++++++++++++++++++++++++++++
 digikam.spec                   |    9 +++++++-
 2 files changed, 52 insertions(+), 1 deletions(-)
---
diff --git a/digikam-2.2.0-libpgf-api.patch b/digikam-2.2.0-libpgf-api.patch
new file mode 100644
index 0000000..7506d36
--- /dev/null
+++ b/digikam-2.2.0-libpgf-api.patch
@@ -0,0 +1,44 @@
+From: Gilles Caulier <caulier.gilles at gmail.com>
+Date: Sat, 29 Oct 2011 19:04:33 +0000
+Subject: update internal libpgf to last stable 6.11.42. Fixbroken compilation due to API changes.
+X-Git-Url: http://quickgit.kde.org/?p=digikam.git&amp;a=commitdiff&amp;h=51a92945ea0725fcca9c27435ee852003c441ad0
+---
+update internal libpgf to last stable 6.11.42. Fixbroken compilation due to API changes.
+BUGS: 285240
+---
+
+
+--- a/libs/dimg/loaders/pgfloader.cpp
++++ b/libs/dimg/loaders/pgfloader.cpp
+@@ -420,7 +420,12 @@ bool PGFLoader::save(const QString& file
+             }
+         }
+ 
++#ifdef PGFCodecVersionID
++#   if PGFCodecVersionID < 0x061142
+         header.background.rgbtBlue = header.background.rgbtGreen = header.background.rgbtRed = 0;
++#   endif
++#endif
++
+         pgf.SetHeader(header);
+ 
+         pgf.ImportBitmap(4 * imageWidth() * (imageSixteenBit() ? 2 : 1),
+
+--- a/libs/threadimageio/pgfutils.cpp
++++ b/libs/threadimageio/pgfutils.cpp
+@@ -131,9 +131,14 @@ bool writePGFImageData(const QImage& img
+         header.bpp                  = img.depth();
+         header.channels             = 4;
+         header.mode                 = ImageModeRGBA;
++
++#ifdef PGFCodecVersionID
++#   if PGFCodecVersionID < 0x061142
+         header.background.rgbtBlue  = 0;
+         header.background.rgbtGreen = 0;
+         header.background.rgbtRed   = 0;
++#   endif
++#endif
+         pgfImg.SetHeader(header);
+         // NOTE: see B.K.O #273765 : Loading PGF thumbs with OpenMP support through a separated thread do not work properlly with libppgf 6.11.24
+         // pgfImg.ConfigureEncoder(false);
+
diff --git a/digikam.spec b/digikam.spec
index 9a993dc..9afe3b5 100644
--- a/digikam.spec
+++ b/digikam.spec
@@ -22,6 +22,9 @@ Patch0: digikam-2.1.1-clapack-atlas.patch
 ## upstreamable patches
 
 ## upstream patches
+# Fix broken compilation due to API changes in libpgf-6.11.42 (kde#285240)
+# http://commits.kde.org/digikam/51a92945ea0725fcca9c27435ee852003c441ad0
+Patch100: digikam-2.2.0-libpgf-api.patch
 
 # for clapack, see also the clapack-atlas patch
 BuildRequires: atlas-devel
@@ -195,6 +198,9 @@ Requires: kipi-plugins = %{version}-%{release}
 
 %patch0 -p1 -b .clapack-atlas
 
+pushd core
+%patch100 -p1 -b .libpgf-api
+popd
 
 %build
 
@@ -470,8 +476,9 @@ update-desktop-database -q &> /dev/null
 
 
 %changelog
-* Fri Oct 28 2011 Alexey Kurov <nucleo at fedoraproject.org> - 2.2.0-2
+* Sat Oct 29 2011 Alexey Kurov <nucleo at fedoraproject.org> - 2.2.0-2
 - rebuild for libpgf-6.11.42
+- bacport fix for changed libpgf API
 
 * Tue Oct  4 2011 Alexey Kurov <nucleo at fedoraproject.org> - 2.2.0-1
 - digikam-2.2.0


More information about the scm-commits mailing list