Bug 254315

Summary: Please consider attached patch for build system
Product: [Applications] digikam Reporter: Andreas K. Huettel <dilfridge>
Component: Portability-CompilationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: caulier.gilles
Priority: NOR    
Version: 1.5.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In: 1.6.0
Attachments: patch for the CMakeLists.txt files
Updated patch against trunk rev. 1188289 (untested but looks ok)

Description Andreas K. Huettel 2010-10-16 00:40:36 UTC
Created attachment 52557 [details]
patch for the CMakeLists.txt files

Version:           1.5.0 (using KDE 4.5.2) 
OS:                Linux

Dear digikam authors, 

I'm packaging digikam for Gentoo Linux. Since Gentoo is a source based distribution, we try to avoid using bundled libraries as much as possible. Please consider applying the attached patch; it extends the functionality of the build system as carefully as possible. In detail:

* Add functions to find system CLAPACK and PGF library
* Build against system CLAPACK and PGF library if found
* Add a cmake option -DFORCED_UNBUNDLE that (if defined) makes cmake abort if any bundled libraries have to be used

Thanks a lot, and thanks for your great work. You can also find me on #digikam as dilfridge. 

Andreas

Reproducible: Didn't try

Steps to Reproduce:
-

Actual Results:  
-

Expected Results:  
-

-
Comment 1 caulier.gilles 2010-10-16 09:39:21 UTC
Thanks for your patch. I will take a look

Gilles Caulier
Comment 2 caulier.gilles 2010-10-18 14:21:44 UTC
Andreas,

Patch cannot be applied to trunk :

[gilles@localhost graphics]$ patch < digikam-1.5.0-unbundle.patch 
patching file CMakeLists.txt
Hunk #1 FAILED at 34.
Hunk #2 FAILED at 133.
Hunk #3 FAILED at 273.
Hunk #4 FAILED at 367.
Hunk #5 FAILED at 585.
Hunk #6 FAILED at 618.
Hunk #7 FAILED at 1076.
7 out of 7 hunks FAILED -- saving rejects to file CMakeLists.txt.rej
patching file FindCLAPACK.cmake
patching file FindPGF.cmake
patching file CMakeLists.txt
Hunk #1 FAILED at 53.
Hunk #2 FAILED at 94.
Hunk #3 FAILED at 187.
Hunk #4 FAILED at 241.
Hunk #5 FAILED at 339.
5 out of 5 hunks FAILED -- saving rejects to file CMakeLists.txt.rej
patching file CMakeLists.txt
Hunk #1 FAILED at 21.
1 out of 1 hunk FAILED -- saving rejects to file CMakeLists.txt.rej
patching file CMakeLists.txt
Hunk #1 FAILED at 65.
1 out of 1 hunk FAILED -- saving rejects to file CMakeLists.txt.rej

Can you post a revised patch against trunk. Thanks in adavnce

Also, please take a look in this file : 

https://bugs.kde.org/show_bug.cgi?id=251563

... which use Eigen library to replace clacpack...

Gilles Caulier
Comment 3 Andreas K. Huettel 2010-10-22 00:46:41 UTC
Created attachment 52735 [details]
Updated patch against trunk rev. 1188289 (untested but looks ok)

Here's an updated version of the patch.

About clapack vs. eigen... In theory it should not matter so much since clapack _can_ be built against cblas, which needs no fortran. I'm working on that for Gentoo but it's just not finished yet. On the other hand, eigen is already used in some kde packages I think. No strong opinion here.
Comment 4 caulier.gilles 2010-10-22 10:32:37 UTC
SVN commit 1188366 by cgilles:

apply patch #52735 to be able to use an external version of libpgf and clapack if there are available in host system. 
BUGS: 254315


 M  +31 -1     CMakeLists.txt  
 M  +32 -2     digikam/CMakeLists.txt  
 M  +4 -0      libs/CMakeLists.txt  
 M  +4 -0      showfoto/CMakeLists.txt  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1188366