DevHeads.net

Review Request: Patch to build only kdecore

Review request for kdelibs and KDEPIM-Libraries.

Summary
Hello,

As some of you may know, we are using KIMAP and KMime as stand-alone libraries for BetterInbox, our cross-platform email client.

Since our primary targets are Windows and Mac OS X platforms, it would be quite costly to try to build and ship the whole kdelibs + kdepimlibs + dependencies in order to use just kimap and kmime. So we made a few patches to KDE's build scripts that enable to build only kdecore + kimap + kmime. The only third-party dependencies on Windows are kdewin, boost, cyrus-sasl, and zlib.

Basically, we just declare a new build option called KIMAP_STANDALONE, that will skip the compilation of everything that is not needed. We are sharing the patches to kdelibs in this review request. See <a href="https://git.reviewboard.kde.org/r/100698/" title="https://git.reviewboard.kde.org/r/100698/">https://git.reviewboard.kde.org/r/100698/</a> for the patches to kdepimlibs.

Please note that the goal here is *NOT* to ask for the inclusion of those patches into KDE's source code, but rather to show the community how we did it, and maybe to foster some discussion around the idea of modularizing kdelibs and kdepimlibs a bit more, so that this kind of hack wouldn't be needed.

Any ideas / comments appreciated.

Cheers,

Greg Schlomoff
Founder, BetterInbox

Diffs
kdecore/localization/kcatalog.cpp 1f01688
kdecore/CMakeLists.txt f78c115
cmake/modules/FindKDE4Internal.cmake d4e5780
CMakeLists.txt 87631d1
kdecore/tests/CMakeLists.txt 9703c7d

Diff: <a href="http://git.reviewboard.kde.org/r/100697/diff" title="http://git.reviewboard.kde.org/r/100697/diff">http://git.reviewboard.kde.org/r/100697/diff</a>

Testing
Works flawlessly on Windows, Mac OS, and Ubuntu

Thanks,

Gregory

Comments

Re: Review Request: Patch to build only kdecore

By Gregory Schlomoff at 02/21/2011 - 05:15

(Updated Feb. 21, 2011, 10:15 a.m.)

Review request for kdelibs and KDEPIM-Libraries.

Changes
Renamed the build option from KIMAP_STANDALONE to KDE4_ONLY_KDECORE, as suggested

Summary
Hello,

As some of you may know, we are using KIMAP and KMime as stand-alone libraries for BetterInbox, our cross-platform email client.

Since our primary targets are Windows and Mac OS X platforms, it would be quite costly to try to build and ship the whole kdelibs + kdepimlibs + dependencies in order to use just kimap and kmime. So we made a few patches to KDE's build scripts that enable to build only kdecore + kimap + kmime. The only third-party dependencies on Windows are kdewin, boost, cyrus-sasl, and zlib.

Basically, we just declare a new build option called KIMAP_STANDALONE, that will skip the compilation of everything that is not needed. We are sharing the patches to kdelibs in this review request. See <a href="https://git.reviewboard.kde.org/r/100698/" title="https://git.reviewboard.kde.org/r/100698/">https://git.reviewboard.kde.org/r/100698/</a> for the patches to kdepimlibs.

Please note that the goal here is *NOT* to ask for the inclusion of those patches into KDE's source code, but rather to show the community how we did it, and maybe to foster some discussion around the idea of modularizing kdelibs and kdepimlibs a bit more, so that this kind of hack wouldn't be needed.

Any ideas / comments appreciated.

Cheers,

Greg Schlomoff
Founder, BetterInbox

Diffs (updated)
CMakeLists.txt 87631d1
cmake/modules/FindKDE4Internal.cmake d4e5780
kdecore/CMakeLists.txt f78c115
kdecore/localization/kcatalog.cpp 1f01688
kdecore/tests/CMakeLists.txt 9703c7d

Diff: <a href="http://git.reviewboard.kde.org/r/100697/diff" title="http://git.reviewboard.kde.org/r/100697/diff">http://git.reviewboard.kde.org/r/100697/diff</a>

Testing
Works flawlessly on Windows, Mac OS, and Ubuntu

Thanks,

Gregory

Re: Review Request: Patch to build only kdecore

By Christophe Gibo... at 02/21/2011 - 04:46

CMakeLists.txt
<http://git.reviewboard.kde.org/r/100697/#comment1320>

Please find a better name for kdelibs. The module is not supposed to know what kimap is. (eg: KDE4_ONLY_KDECORE)

kdecore/localization/kcatalog.cpp
<http://git.reviewboard.kde.org/r/100697/#comment1321>

where is this ifdef'd ?

- Christophe

On Feb. 21, 2011, 8:42 a.m., Gregory Schlomoff wrote:

Re: Review Request: Patch to build only kdecore

By Gregory Schlomoff at 02/21/2011 - 05:13

This is supposed to be defined manually when you build kdelibs. (In other words, we invoke cmake with the -DCMAKE_CXX_FLAGS="-DKIMAP_STANDALONE" command-line flag).

This is needed to avoid a useless (for our purposes) dependency on lib gettext, but actually, I have a feeling that this code could probably be refactored to avoid entirely the need for us to patch it.

I agree -actually, I wasn't expecting this patch to be included for real in kdelibs, this is why I didn't bother finding a better name.

But I'll update the diff with the name you suggest.

- Gregory

On Feb. 21, 2011, 8:42 a.m., Gregory Schlomoff wrote: