Tuesday, September 7, 2010

Fixing /usr/portage/profiles/default/linux/make.defaults

This is a post about probably (to an outsider) boring Gentoo internal development affairs. Feel free to skip or skim it, if you're only here for the PHP status updates ;)

Part of the update to dev-lang/php-5.2.14 was the change to IUSE defaults. This allowed us to provide a PHP build that matched what you could get by simply downloading and compiling the PHP upstream tarball by hand.

It also allowed fixing a long-standing papercut with the make.defaults file. In 2006, the release team discovered php was breaking the release process because certain packages required dev-lang/php to be built with certain USE-flags enabled. For lack of a better solution, the required flags were added to the top-most make.conf template available at that time.

Today, /usr/portage/profiles/default/linux/make.defaults still contains USE="${USE} cli pcre reflection session spl". This results in every linux system having these USE flags enabled by default. At least for spl this is a waste: no other ebuild besides php uses this flag.

Initially, I was going to scrap the whole line, but it turned out to be rather difficult. Not counting spl, all other USE flags are utilized by other packages beside php. So removing the make.defaults line would change their default behavior, too.

Therefore I removed "spl" from the list in make.defaults. For the rest, more consultation is needed. So if you read this and maintain a package using one of "cli pcre reflection session", please comment on this post or better yet, on bug #310383. Expect a mail on gentoo-dev about this, soon, too.