[Digikam-devel] [Bug 277133] additional patch needed to compile 2.0.0-rc with external libpgf

Andreas K. Huettel dilfridge at gentoo.org
Tue Jul 5 19:08:54 BST 2011


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





--- Comment #5 from Andreas K. Huettel <dilfridge gentoo org>  2011-07-05 18:08:54 ---
(In reply to comment #4)
> PGF codec ID do not exist in official libpgf yet. I patch internal lib and
> reported that to PGF team.
> This ID for the moment is managed in PGF find cmake script
(...)

Yes, I know. Sorry I should have been more precise. But... let's assume we
build the >>current git master<< digikam against an external system
libpgf-6.09.44

Then, the FindPGF.cmake script defines PGF_CODEC_VERSION_ID=060944 and
digikam/utils/config-digikam.h sets 
#define PGFCodecVersionID 0x${PGF_CODEC_VERSION_ID}
i.e. PGFCodecVersionID=0x060944

Now if you look at libs/dimg/loaders/pgfloader.cpp line 433 and following,
PGFCodecVersionID is defined, but it is also smaller than 0x061124. Meaning, no
branch of the #if statements is actually compiled, and there is no call to
pgf.Write at all. (Of course this compilation always succeeds, but the
resulting code does not do anything.)

With the current version of FindPGF.cmake, PGFCodecVersionID is always defined
after the pgf library has been found. This is why I suggest changing the code
to 

#if PGFCodecVersionID >= 0x061124
        pgf.Write(&stream, &nWrittenBytes, CallbackForLibPGF, this);
#else
        pgf.Write(&stream, 0, CallbackForLibPGF, &nWrittenBytes, this);
#endif

The same problem also exists in libs/threadimageio/pgfutils.cpp line 156 and
following, which should in my opinion be 

#if PGFCodecVersionID >= 0x061124
        pgfImg.Write(&stream, &nWrittenBytes);
#else
        pgfImg.Write(&stream, 0, 0, &nWrittenBytes);
#endif

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list