[SM-Commit] GIT changes to master grimoire by Treeve Jelbert (0f73e67d8b1ea45ac87dae56a014e8e6b3e8a3e0)

Treeve Jelbert scm at sourcemage.org
Fri May 8 07:25:55 EDT 2009


GIT changes to master grimoire by Treeve Jelbert <treeve at sourcemage.org>:

 kde4/kdegraphics4/DETAILS          |    4 -
 kde4/kdegraphics4/FindKdcraw.cmake |  110 +++++++++++++++++++++++++++++++++++++
 kde4/kdegraphics4/HISTORY          |    6 ++
 kde4/kdegraphics4/PRE_BUILD        |    9 +++
 kde4/kdegraphics4/sane.diff        |   29 +++++++++
 5 files changed, 156 insertions(+), 2 deletions(-)

New commits:
commit 6e2bba8a5e2773cb2e340c6cdc80816a73321efa
Author: Treeve Jelbert <treeve at sourcemage.org>
Commit: Treeve Jelbert <treeve at sourcemage.org>

    kdegraphics4: => 4.2.85

diff --git a/kde4/kdegraphics4/DETAILS b/kde4/kdegraphics4/DETAILS
index 425258a..44425fb 100755
--- a/kde4/kdegraphics4/DETAILS
+++ b/kde4/kdegraphics4/DETAILS
@@ -15,8 +15,8 @@ SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELLX-svn"
   FORCE_DOWNLOAD=on
 else
   if [[ "${KDE_VER}" == "unstable" ]];then
-         VERSION=4.2.71.svn961800
-     SOURCE_HASH=sha512:f061d5f6580ded65ba575bcd09583c046f655ea76b962b2c582c850928f0e1ae7ef2a94a3d72f603621b1e578bdb7c636ab503bc5a9822632c24647d841adcb0
+         VERSION=4.2.85
+     SOURCE_HASH=sha512:a1dc0ed3f2fe19b2cae42e6479ee0c3ba9f87e36370cb828f53bad0123a902a27864f92ad3b5ac098bab5aeaeb5f20a69d23b9234a50a8f82444627516e235a9
   else 
          VERSION=4.2.3
      SOURCE_HASH=sha512:a0a328129fb7cee9946efc195f7c52f8f513592c8790efdfeb75f2275888a934fb44ac818b314f9d179149f9e8b82f0fed36a27988d705b290705b7f018bf7df
diff --git a/kde4/kdegraphics4/FindKdcraw.cmake b/kde4/kdegraphics4/FindKdcraw.cmake
new file mode 100644
index 0000000..2eb0814
--- /dev/null
+++ b/kde4/kdegraphics4/FindKdcraw.cmake
@@ -0,0 +1,110 @@
+# - Try to find the Kdcraw library
+# Once done this will define
+#
+#  KDCRAW_FOUND - system has libkdcraw
+#  KDCRAW_INCLUDE_DIR - the libkdcraw include directory
+#  KDCRAW_LIBRARIES - Link these to use libkdcraw
+#  KDCRAW_DEFINITIONS - Compiler switches required for using libkdcraw
+#
+
+# Copyright (c) 2008, Gilles Caulier, <caulier.gilles at gmail.com>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
+
+  message(STATUS "Found Kdcraw library in cache: ${KDCRAW_LIBRARIES}")
+
+  # in cache already
+  SET(KDCRAW_FOUND TRUE)
+
+else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
+
+  message(STATUS "Check Kdcraw library in local sub-folder...")
+
+  # Check if library is not in local sub-folder
+ 
+  FIND_FILE(KDCRAW_LOCAL_FOUND libkdcraw/kdcraw.h ${CMAKE_SOURCE_DIR}/libkdcraw ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH)
+
+  if (KDCRAW_LOCAL_FOUND)
+
+    # Was it found in libkdcraw/ or in libs/libkdcraw?
+    FIND_FILE(KDCRAW_LOCAL_FOUND_IN_LIBS libkdcraw/kdcraw.h ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH)
+    if (KDCRAW_LOCAL_FOUND_IN_LIBS)
+      set(KDCRAW_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/libs/libkdcraw)
+    else (KDCRAW_LOCAL_FOUND_IN_LIBS)
+      set(KDCRAW_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/libkdcraw)
+    endif (KDCRAW_LOCAL_FOUND_IN_LIBS)
+    set(KDCRAW_DEFINITIONS "-I${KDCRAW_INCLUDE_DIR}")
+    set(KDCRAW_LIBRARIES kdcraw)
+    message(STATUS "Found Kdcraw library in local sub-folder: ${KDCRAW_INCLUDE_DIR}")
+    set(KDCRAW_FOUND TRUE)
+    MARK_AS_ADVANCED(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES)
+
+  else(KDCRAW_LOCAL_FOUND)
+
+    message(STATUS "Check Kdcraw library using pkg-config...")
+    if(NOT WIN32)
+      # use pkg-config to get the directories and then use these values
+      # in the FIND_PATH() and FIND_LIBRARY() calls
+      INCLUDE(UsePkgConfig)
+    
+      PKGCONFIG(libkdcraw _KDCRAWIncDir _KDCRAWLinkDir _KDCRAWLinkFlags _KDCRAWCflags)
+    
+      if(_KDCRAWLinkFlags)
+        # query pkg-config asking for a libkdcraw >= 0.2.0
+        EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkdcraw RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
+        if(_return_VALUE STREQUAL "0")
+            message(STATUS "Found libkdcraw release >= 0.2.0")
+            set(KDCRAW_VERSION_GOOD_FOUND TRUE)
+        else(_return_VALUE STREQUAL "0")
+            message(STATUS "Found libkdcaw release < 0.2.0, too old")
+            set(KDCRAW_VERSION_GOOD_FOUND FALSE)
+            set(KDCRAW_FOUND FALSE)
+        endif(_return_VALUE STREQUAL "0")
+      else(_KDCRAWLinkFlags)
+        set(KDCRAW_VERSION_GOOD_FOUND FALSE)
+        set(KDCRAW_FOUND FALSE)
+      endif(_KDCRAWLinkFlags)
+    ELSE(NOT WIN32)
+      set(KDCRAW_VERSION_GOOD_FOUND TRUE)
+    ENDif(NOT WIN32)
+
+    if(KDCRAW_VERSION_GOOD_FOUND)
+        set(KDCRAW_DEFINITIONS "${_KDCRAWCflags}")
+    
+        FIND_PATH(KDCRAW_INCLUDE_DIR libkdcraw/version.h
+        ${_KDCRAWIncDir}
+        )
+    
+        FIND_LIBRARY(KDCRAW_LIBRARIES NAMES kdcraw
+        PATHS
+        ${_KDCRAWLinkDir}
+        )
+    
+        if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
+            set(KDCRAW_FOUND TRUE)
+        endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
+     endif(KDCRAW_VERSION_GOOD_FOUND) 
+     if (KDCRAW_FOUND)
+         if (NOT Kdcraw_FIND_QUIETLY)
+             message(STATUS "Found libkdcraw: ${KDCRAW_LIBRARIES}")
+         endif (NOT Kdcraw_FIND_QUIETLY)
+     else (KDCRAW_FOUND)
+         if (Kdcraw_FIND_REQUIRED)
+             if (NOT KDCRAW_INCLUDE_DIR)
+                 message(FATAL_ERROR "Could NOT find libkdcraw header files")
+             endif (NOT KDCRAW_INCLUDE_DIR)
+             if (NOT KDCRAW_LIBRARIES)
+                 message(FATAL_ERROR "Could NOT find libkdcraw library")
+             endif (NOT KDCRAW_LIBRARIES)
+         endif (Kdcraw_FIND_REQUIRED)
+     endif (KDCRAW_FOUND)
+    
+    MARK_AS_ADVANCED(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES)
+
+  endif(KDCRAW_LOCAL_FOUND)
+  
+endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
diff --git a/kde4/kdegraphics4/HISTORY b/kde4/kdegraphics4/HISTORY
index dec573c..b179ecb 100644
--- a/kde4/kdegraphics4/HISTORY
+++ b/kde4/kdegraphics4/HISTORY
@@ -1,3 +1,9 @@
+2009-05-07 Treeve Jelbert <treeve at sourcemage.org>
+	* DETAILS: version 4.2.85 (unstable)
+	* sane.diff: added, fix compile of sane 
+	* FindKdcraw.cmake: added, fix finding kdcraw
+	* PRE_BUILD: added, apply patches
+
 2009-05-06 Treeve Jelbert <treeve at sourcemage.org>
 	* DETAILS: version 4.2.3 (stable)
 
diff --git a/kde4/kdegraphics4/PRE_BUILD b/kde4/kdegraphics4/PRE_BUILD
new file mode 100755
index 0000000..1ff1c34
--- /dev/null
+++ b/kde4/kdegraphics4/PRE_BUILD
@@ -0,0 +1,9 @@
+default_pre_build    &&
+cd $SOURCE_DIRECTORY &&
+# sane problem applies to all versions
+patch -p1 < $SPELL_DIRECTORY/sane.diff  &&
+if [[ $KDE_VER == unstable ]]; then
+# for version 4.2.85
+# the FindKdcraw.cmake from kdelibs4-4.2.85 is broken
+cp $SPELL_DIRECTORY/FindKdcraw.cmake cmake/modules/
+fi
diff --git a/kde4/kdegraphics4/sane.diff b/kde4/kdegraphics4/sane.diff
new file mode 100644
index 0000000..c6f568b
--- /dev/null
+++ b/kde4/kdegraphics4/sane.diff
@@ -0,0 +1,29 @@
+diff -uNr kdegraphics-4.2.85/libs/libksane/libksane/ksane_widget_private.cpp kdegraphics-4.2.85.cp/libs/libksane/libksane/ksane_widget_private.cpp
+--- kdegraphics-4.2.85/libs/libksane/libksane/ksane_widget_private.cpp	2009-03-10 13:24:04.000000000 +0100
++++ kdegraphics-4.2.85.cp/libs/libksane/libksane/ksane_widget_private.cpp	2009-05-08 10:55:04.000000000 +0200
+@@ -738,6 +738,7 @@
+         switch (status)
+         {
+             #ifndef SANE_CAP_ALWAYS_SETTABLE
++             #ifdef SANE_STATUS_WARMING_UP
+             // should better be done by detecting SANE's version in configure and providing a HAS_SANE_1_1
+             // FIXME remove these ifdefs and require sane 1.1.x as soon as possible
+             case SANE_STATUS_WARMING_UP:
+@@ -751,6 +752,7 @@
+                     scanDone();
+                 }
+                 return;
++             #endif
+             #endif
+             case SANE_STATUS_NO_DOCS:
+                 // if it is the first doc in batch mode this is an error
+@@ -760,7 +762,9 @@
+             case SANE_STATUS_DEVICE_BUSY:
+             case SANE_STATUS_ACCESS_DENIED:
+             #ifndef SANE_CAP_ALWAYS_SETTABLE
++             #ifdef SANE_STATUS_HW_LOCKED
+             case SANE_STATUS_HW_LOCKED:
++             #endif
+             #endif
+                 KMessageBox::sorry(0, i18n(sane_strstatus(status)));
+                 scanCancel();



More information about the SM-Commit mailing list