Bug 290157 - RawEngine should support LCMS2 [patch]
Summary: RawEngine should support LCMS2 [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-RAW (show other bugs)
Version: 2.5.0
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-30 09:54 UTC by Treeve Jelbert
Modified: 2018-04-01 09:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.5.0


Attachments
lcms2 patch (5.07 KB, patch)
2011-12-30 11:17 UTC, Treeve Jelbert
Details
alllow either lcms1 or lcms2 (5.56 KB, patch)
2011-12-30 12:12 UTC, Treeve Jelbert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Treeve Jelbert 2011-12-30 09:54:17 UTC
Version:           2.5.0 (using Devel) 
OS:                Linux

the underlying libraw can use LCMS2, but libkdcraw does not check for it

/var/git/kde-graphics/libkdcraw$ git grep lcms
CMakeLists.txt:macro_log_feature(LCMS_FOUND "lcms" "A small-footprint color management engine" "http://ww
ChangeLog:        Make it to find the lcms from nonstandard places provided by user
ChangeLog:        --with-extra-* flags. Fixes detecting lcms installed from pkgsrc
ChangeLog:        no need to link with lcms. Only dcraw.c require it
README:liblcms    >= 1.14.x (used by libraw)  http://www.littlecms.com
libraw/libraw/libraw_types.h:#include <lcms.h>
libraw/libraw/libraw_types.h:#include <lcms2.h>


Reproducible: Always


Actual Results:  
only uses lcms1

Expected Results:  
builds with lcms2

improve CMakeLists.txt to check for and use LCMS2 which is more stable and thread safe.
Comment 1 caulier.gilles 2011-12-30 10:41:59 UTC
patch is welcome to support lcms2.

note: i already tried to port all code from digiKAm from lcms to lcms2, and API are changed indeep without any guide and help to do it quickly.

Gilles Caulier
Comment 2 Treeve Jelbert 2011-12-30 11:17:10 UTC
Created attachment 67240 [details]
lcms2 patch

patch to use lcms2 instead of lcms1

the FindLCMS2.cmake file comes from the Calligra project, who have dropped support for lcms1 completely.

everything builds and links ok for me using lcms2-2.3
Comment 3 caulier.gilles 2011-12-30 11:25:38 UTC
Treeve,

Thanks for you patch.

On my systems (Mandriva and Mageia), LCMS2 is not yet available by default.

So, LCMS must be checked first and after LCMS2, at least for transition time. Please fix your patch accordingly. Do not drop LCMS as well.

Thanks in advance

Gilles Caulier
Comment 4 Treeve Jelbert 2011-12-30 12:12:22 UTC
Created attachment 67245 [details]
alllow either lcms1 or lcms2

revised patch, now checks for either of lcms1/2
tested with all combinations installed or missing
Comment 5 caulier.gilles 2011-12-30 19:12:04 UTC
Git commit d0e61353aeff0ec89cfa4a2de0c767286784c239 by Gilles Caulier.
Committed on 30/12/2011 at 20:10.
Pushed by cgilles into branch 'master'.

apply patch #67240 from Treeve Jelbert to support LCMS or LCMS2 as Color Management shared lib.

M  +19   -7    CMakeLists.txt
A  +72   -0    cmake/modules/FindLCMS2.cmake

http://commits.kde.org/libkdcraw/d0e61353aeff0ec89cfa4a2de0c767286784c239
Comment 6 Philip Muškovac 2012-02-14 19:45:51 UTC
Ubuntu plans to depcrecate lcms1 for 12.04 which will ship with KDE 4.8. Can this be safely cherry-picked for 4.8? I've confirmed that it builds, now the question is whether it'll work.