It is the Gentoo policy to use system installed versions of libraries always when possible. I noticed that the sqlite extension can't be built to use the system installed version. I talked to CHTEKK on #gentoo-web about this and he said that upstream prefers to use their own copies. Some other projects also bundle libraries but Gentoo does not use them. Quoting http://devzone.zend.com/node/view/id/760 "Often enough you will find that the bundled SQLite library is a bit dated, so building your PHP with an external library will allow you to benefit from the latest fixes and features of SQLite. It will also allow you to upgrade your SQLite library in future without having to recompile PHP." Also building extensions as shared means that we can enable/disable them without having to re-emerge php which is quite a good bonus on servers.
Ok I just went through the PHP packages and checked where it uses bundled libs. Not in all cases it's possible to sobstitute them with external ones, as either we don't even have those in the tree, or in most cases the PHP team modifies/enhances them for PHP specifically. Following is a list of those I found that _could_ be made to use external libs instead of the bundled ones: PHP 4.4.4 ext/dba - cdb support - could use dev-db/cdb ext/pcre - PCRE support - could use dev-libs/libpcre PHP 5.1.6 ext/dba - cdb support - could use dev-db/cdb ext/pcre - PCRE support - could use dev-libs/libpcre ext/sqlite - sqlite2 support - could use dev-db/sqlite-2* ext/pdo_sqlite - sqlite3 support - could use dev-db/sqlite-3* PHP Team: please vote on each of them, if we should use bundled or external. I'm in favour of using external for both sqlite extensions and cdb, but still unsure about PCRE... Atm PHP's PCRE (6.6) is more up-to-date than our latest stable (6.3), as is SQLite in 5.2.0RC2 (3.3.7, we only have 3.3.5 stable). Opinions/votes please! Best regards, CHTEKK.
(In reply to comment #1) > > PHP Team: please vote on each of them, if we should use bundled or external. > I'm in favour of using external for both sqlite extensions and cdb, but still > unsure about PCRE... Atm PHP's PCRE (6.6) is more up-to-date than our latest > stable (6.3), as is SQLite in 5.2.0RC2 (3.3.7, we only have 3.3.5 stable). > Opinions/votes please! > Best regards, CHTEKK. > Well if your stable version is lagging behind with no reason, we can always request for the new ones to be marked stable.
*** Bug 145406 has been marked as a duplicate of this bug. ***
(In reply to comment #1) > Opinions/votes please! I believe that there should be 2 use flags for each of these libraries the internal one (foo) and the external one (foo-external). I believe that the default should be the internal one so php in Gentoo will behave more like other php installations. If someone needs something different he just have to change foo to foo-external. I made a patch for php5_1-sapi.eclass (see Bug #145406) that implements the pcre-external flag. It's seems to be working and is very simple. Any chance of this kind of support being included soon?
+1 for using shared stuff instead of bundled. I'm definitely against adding more flags and such dual mess.
Yeah, I'm against having two flags (pcre/pcre-external, sqlite/sqlite-external, ...) too, that's absolutely not needed, as we're only talking about the used libraries here, not about extensions themselves, just about the libraries some of them use. @betelgeuse: using a shared library to build those extensions doesn't mean the extensions themselves will be built as shared, please use the "sharedext" USE flag for that. Best regards, CHTEKK.
Fixed in the tree. SQLite2/3 support is now using the external libs, as well as the PCRE support. CDB still uses the internal lib to compile, because the external ones don't appear to work. This fixes it, enjoy! Best regards, CHTEKK.
UPDATE: Remove PCRE support through external lib, it's broken (see http://bugs.php.net/bug.php?id=29914). Seems only the bundled lib works in an acceptable way... :( This will remain like this then, so in the end only SQLite were switched to use bundled libs. Best regards, CHTEKK.