Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
Qt Creator 2.6.0, Qt Creator 2.6.1, Qt Creator 2.6.2, Qt Creator 2.7.0
-
None
-
34f083f1a40f847bb9cb010c7ee0b623b2579a3b
Description
For various proper reasons, Linux distributions strongly discourage the use of bundled 3rd-party libraries. While I understand the need to provide a bundled version of the Botan library for platforms which have no proper package management, the way this is currently done confronts downstream projects with severe problems.
Here's a few instances:
- QtCreator build fails on ARM (missing cpuid.h): https://bugreports.qt-project.org/browse/QTCREATORBUG-8107
- qt4-creator-mac no longer builds on powerpc: https://trac.macports.org/ticket/37652
- =dev-util/qt-creator-2.6* - 3rdparty/botan/botan.cpp:46220:21: fatal error: cpuid.h: No such file or directory: https://bugs.gentoo.org/show_bug.cgi?id=439514
All these issues could be solved easily if it were less difficult for downstream distributors to build Qt Creator without the bundled Botan library and to use the system's Botan library (provided by the package management system) instead.
Hence, the current state, where both the amalgamated Botan sources and a set of Qt-Creator-specific wrapper functions are merged into the same pair of (.cpp, .h) files is not a good design choice. Not only does it unnecessarily make it difficult for downstream projects to patch out the bundled library, it also makes it more cumbersome for you to pull in a newer version of Botan. Hence, I propose the following file split:
- botan.cpp, botan.h: Unmodified amalgamated upstream sources
- botan-wrapper.cpp, botan-wrapper.h: Custom wrapper functions
As a bonus, it would be really nice if the choice whether to pick the bundled or the system-wide Botan library were configurable at build time.
I hope this all sounds reasonable to you. If you are interested, I can work on a patch and provide it to you.