digikam vs libjpeg-turbo

digikam can't compile on the current version of VineSeed (development/unstable version of Vine Linux, and soon-to-be Vine Linux 6.0).

I found the following lines on the CMakeLists.txt in the digikam source code:

# Extract version of libjpeg so that we can use the appropriate dir
# See bug #227313, #228483
FILE(READ "${JPEG_INCLUDE_DIR}/jpeglib.h" jpeglib_h_content)
STRING(REGEX REPLACE ".*#define +JPEG_LIB_VERSION +([0-9]+).*" "\\1" jpeglib_version "${jpeglib_h_content}")
MESSAGE(STATUS "Identified libjpeg version: ${jpeglib_version}")

IF ("${jpeglib_version}" LESS 80)
    SET(DIGIKAM_LIBJPEG_DIR libjpeg-62)
ELSE ("${jpeglib_version}" LESS 80)
    SET(DIGIKAM_LIBJPEG_DIR libjpeg-80)
ENDIF ("${jpeglib_version}" LESS 80)

while on the other hand VineSeed now has libjpeg-turbo instead of the ancient libjpeg6b.

jpeglib.h from libjpeg-turbo does NOT have the line starting from #define JPEG_LIB_VERSION: instead the declaration is in another header file jconfig.h like this:

#define JPEG_LIB_VERSION 62

So the trivial hack (until the upstream fix this tiny issue) is like this:

--- digikam-1.9.0/CMakeLists.txt.orig   2011-02-28 05:16:18.000000000 +0900
+++ digikam-1.9.0/CMakeLists.txt        2011-06-08 14:10:15.000000000 +0900
@@ -153,7 +153,9 @@
 
 # Extract version of libjpeg so that we can use the appropriate dir
 # See bug #227313, #228483
-FILE(READ "${JPEG_INCLUDE_DIR}/jpeglib.h" jpeglib_h_content)
+# VINE: better check jconfig.h in place of jpeglib.h on libjpeg-turbo
+# FILE(READ "${JPEG_INCLUDE_DIR}/jpeglib.h" jpeglib_h_content)
+FILE(READ "${JPEG_INCLUDE_DIR}/jconfig.h" jpeglib_h_content)
 STRING(REGEX REPLACE ".*#define +JPEG_LIB_VERSION +([0-9]+).*" "\\1" jpeglib_version "${jpeglib_h_content}")
 MESSAGE(STATUS "Identified libjpeg version: ${jpeglib_version}")








Pages

Powered by Movable Type 4.23-en

About this Entry

This page contains a single entry by Shaolin published on June 8, 2011 3:17 PM.

懐かしの8ビットマイコンゲーム? was the previous entry in this blog.

Progress bar on the the Plymouth startup screen "Script" theme is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.