[digikam] digikam FTBFS against libgphoto2-2.5 (#841615)

Rex Dieter rdieter at fedoraproject.org
Tue Jul 24 19:03:42 UTC 2012


commit 97b3ee6ec50de9609d2a62923b9ff8e1c2e51e00
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Tue Jul 24 14:07:15 2012 -0500

    digikam FTBFS against libgphoto2-2.5 (#841615)

 digikam-2.7.0-libgphoto2_25.patch |  126 +++++++++++++++++++++++++++++++++++++
 digikam.spec                      |   11 +++-
 2 files changed, 136 insertions(+), 1 deletions(-)
---
diff --git a/digikam-2.7.0-libgphoto2_25.patch b/digikam-2.7.0-libgphoto2_25.patch
new file mode 100644
index 0000000..eade46b
--- /dev/null
+++ b/digikam-2.7.0-libgphoto2_25.patch
@@ -0,0 +1,126 @@
+From d0aed7c6a251a7dd49975c26085c555da332cf1a Mon Sep 17 00:00:00 2001
+From: Marcus Meissner <marcus at beiboot.suse.de>
+Date: Tue, 24 Jul 2012 17:54:17 +0200
+Subject: [PATCH] support both libgphoto2 2.5.0 and 2.4.0
+
+---
+ CMakeLists.txt                           |   34 ++++++++++++++++++++----------
+ digikam/utils/config-digikam.h.cmake     |    3 +++
+ utilities/cameragui/devices/gpcamera.cpp |   15 +++++++++++++
+ 3 Dateien geändert, 41 Zeilen hinzugefügt(+), 11 Zeilen entfernt(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index dfc7f16..51fb603 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -329,6 +329,24 @@ IF (NOT WIN32 AND HAVE_GPHOTO2)
+     MACRO_OPTIONAL_FIND_PACKAGE(USB)
+ ENDIF (NOT WIN32 AND HAVE_GPHOTO2)
+ 
++IF(GPHOTO2_FOUND)
++    EXEC_PROGRAM(gphoto2-config ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GPHOTO2_VERSION)
++    STRING(REPLACE "libgphoto2" "" GPHOTO2_VERSION "${GPHOTO2_VERSION}")
++    MACRO_ENSURE_VERSION("2.4.0" "${GPHOTO2_VERSION}" VERSION_GPHOTO2)
++    IF(VERSION_GPHOTO2 AND LIBUSB_FOUND)
++        SET(GPHOTO2_FOUND true)
++    ELSE(VERSION_GPHOTO2 AND LIBUSB_FOUND)
++        SET(GPHOTO2_FOUND false)
++    ENDIF(VERSION_GPHOTO2 AND LIBUSB_FOUND)
++    MACRO_ENSURE_VERSION("2.5.0" "${GPHOTO2_VERSION}" VERSION_GPHOTO25)
++    IF(VERSION_GPHOTO25)
++        SET(HAVE_GPHOTO25 1)
++    ELSE(VERSION_GPHOTO25)
++        SET(HAVE_GPHOTO25 0)
++    ENDIF(VERSION_GPHOTO25)
++ENDIF(GPHOTO2_FOUND)
++
++
+ MACRO_OPTIONAL_FIND_PACKAGE(KdepimLibs)
+ MACRO_BOOL_TO_01(KDEPIMLIBS_FOUND HAVE_KDEPIMLIBS)
+ 
+@@ -378,6 +396,8 @@ MACRO_OPTIONAL_FIND_PACKAGE(Doxygen)
+ 
+ CONFIGURE_FILE(digikam/utils/config-digikam.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/digikam/utils/config-digikam.h)
+ 
++
++
+ # ==================================================================================================
+ # Log messages
+ 
+@@ -428,18 +448,10 @@ ENDIF(CLAPACK_FOUND)
+ # ================================================================
+ 
+ IF(GPHOTO2_FOUND)
+-    EXEC_PROGRAM(gphoto2-config ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GPHOTO2_VERSION)
+-    STRING(REPLACE "libgphoto2" "" GPHOTO2_VERSION "${GPHOTO2_VERSION}")
+-    MACRO_ENSURE_VERSION("2.4.0" "${GPHOTO2_VERSION}" VERSION_GPHOTO2)
+-    IF(VERSION_GPHOTO2 AND LIBUSB_FOUND)
+-        SET(GPHOTO2_FOUND true)
+-    ELSE(VERSION_GPHOTO2 AND LIBUSB_FOUND)
+-        SET(GPHOTO2_FOUND false)
+-    ENDIF(VERSION_GPHOTO2 AND LIBUSB_FOUND)
+-ENDIF(GPHOTO2_FOUND)
+-
+-IF(GPHOTO2_FOUND)
+     MESSAGE(STATUS " libgphoto2 and libusb libraries found.... YES (optional)")
++    IF(HAVE_GPHOTO25)
++    MESSAGE(STATUS " libgphoto2 2.5 library found............. YES (optional)")
++    endIF(HAVE_GPHOTO25)
+ ELSE(GPHOTO2_FOUND)
+     MESSAGE(STATUS " libgphoto2 and libusb libraries found.... NO  (optional)")
+     MESSAGE(STATUS "")
+diff --git a/digikam/utils/config-digikam.h.cmake b/digikam/utils/config-digikam.h.cmake
+index d886499..4c1c6d3 100644
+--- a/digikam/utils/config-digikam.h.cmake
++++ b/digikam/utils/config-digikam.h.cmake
+@@ -45,6 +45,9 @@
+ /* Define to 1 if GPhoto2 shared library is installed */
+ #cmakedefine HAVE_GPHOTO2 1
+ 
++/* Define to 1 if libgphoto2 2.5 shared library is installed */
++#cmakedefine HAVE_GPHOTO25 1
++
+ /* Define to 1 if thumbnails database is used */
+ #cmakedefine USE_THUMBS_DB 1
+ 
+diff --git a/utilities/cameragui/devices/gpcamera.cpp b/utilities/cameragui/devices/gpcamera.cpp
+index 22e873a..a98e0a2 100644
+--- a/utilities/cameragui/devices/gpcamera.cpp
++++ b/utilities/cameragui/devices/gpcamera.cpp
+@@ -1329,10 +1329,19 @@ bool GPCamera::uploadItem(const QString& folder, const QString& itemName, const
+     d->status = 0;
+     d->status = new GPStatus;
+ 
++#ifdef HAVE_GPHOTO25
+     errorCode = gp_camera_folder_put_file(d->camera,
+                                           QFile::encodeName(folder).constData(),
++                                          QFile::encodeName(itemName),
++                                          GP_FILE_TYPE_NORMAL,
+                                           cfile,
+                                           d->status->context);
++#else
++    errorCode = gp_camera_folder_put_file(d->camera,
++                                          QFile::encodeName(folder).constData(),
++                                          cfile,
++                                          d->status->context);
++#endif
+ 
+     if (errorCode != GP_OK)
+     {
+@@ -1651,7 +1660,13 @@ void GPCamera::getSupportedPorts(QStringList& plist)
+         for (int i = 0 ; i < numPorts ; ++i)
+         {
+             gp_port_info_list_get_info(list, i, &info);
++#ifdef HAVE_GPHOTO25
++	    char *xpath;
++            gp_port_info_get_name (info, &xpath);
++            plist.append(xpath);
++#else
+             plist.append(info.path);
++#endif
+         }
+     }
+ 
+-- 
+1.7.10.4
+
diff --git a/digikam.spec b/digikam.spec
index 6a0e631..0d3673a 100644
--- a/digikam.spec
+++ b/digikam.spec
@@ -2,7 +2,7 @@
 
 Name:	 digikam
 Version: 2.7.0
-Release: 4%{?pre}%{?dist}
+Release: 5%{?pre}%{?dist}
 Summary: A digital camera accessing & photo management application
 
 License: GPLv2+
@@ -21,6 +21,9 @@ Source1: digikam-import.desktop
 Patch0: digikam-2.5.0-clapack-atlas.patch
 
 ## upstreamable patches
+# libgphoto2-2.5 support patch from
+# https://bugs.kde.org/show_bug.cgi?id=303427
+Patch50: digikam-2.7.0-libgphoto2_25.patch
 
 ## upstream patches
 
@@ -217,6 +220,9 @@ BuildArch: noarch
 %setup -q -n %{name}-%{version}%{?pre:-%{pre}}
 
 %patch0 -p1 -b .clapack-atlas
+pushd core
+%patch50 -p1 -b .libgphoto2_25
+popd
 
 
 %build
@@ -507,6 +513,9 @@ update-desktop-database -q &> /dev/null
 
 
 %changelog
+* Tue Jul 24 2012 Rex Dieter <rdieter at fedoraproject.org> 2.7.0-5
+- digikam FTBFS against libgphoto2-2.5 (#841615)
+
 * Wed Jul 18 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.7.0-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list