Version: 0.10.0-beta2 (using KDE 4.1.0) Compiler: gcc (GCC) 4.1.3 20080202 prerelease (NetBSD nb1 20080202) OS: NetBSD Installed from: NetBSD pkgsrc digikam fails to compile on NetBSD-4.99.72/amd64, because there is no exp2() provided by the system libraries: [ 4%] Building CXX object digikam/CMakeFiles/digikam.dir/__/libs/dmetadata/dmet adata.o /scratch/digikam-kde4/work/digikam-0.10.0-beta2/libs/dmetadata/dmetadata.cpp : In static member function 'static double Digikam::DMetadata::apexApertureToFNu mber(double)': /scratch/digikam-kde4/work/digikam-0.10.0-beta2/libs/dmetadata/dmetadata.cpp :1211: error: 'exp2' was not declared in this scope /scratch/digikam-kde4/work/digikam-0.10.0-beta2/libs/dmetadata/dmetadata.cpp : In static member function 'static double Digikam::DMetadata::apexShutterSpeedT oExposureTime(double)': /scratch/digikam-kde4/work/digikam-0.10.0-beta2/libs/dmetadata/dmetadata.cpp :1257: error: 'exp2' was not declared in this scope *** Error code 1 Please use exp(log(2)*value) (or something similar) instead.
Created attachment 27044 [details] Proposed patch
SVN commit 852440 by aclemens: compile M +2 -2 dmetadata.cpp --- trunk/extragear/graphics/digikam/libs/dmetadata/dmetadata.cpp #852439:852440 @@ -1208,7 +1208,7 @@ return 22; else if (aperture == 10.0) return 32; - return exp2(aperture / 2.0); + return exp(log(2) * aperture / 2.0); } double DMetadata::apexShutterSpeedToExposureTime(double shutterSpeed) @@ -1254,7 +1254,7 @@ else if (shutterSpeed == 13.0) return 0.000125; // 1/8000 - return exp2( - shutterSpeed); + return exp( - log(2) * shutterSpeed); } /**
Please test if everything is fine for you now.
Everything alright with this commit? Can we close this?
For me the patch is fine and can be applied. Marcel, you have implemented this code originally. Fine for you ? Gilles
Yes, fine for me.
Since my patch was committed, I'm happy. Thanks!