Will attach an ebuild, but I had some problems fully understanding all this eclass-stuff. So "worksforme", but I'd like to have some review from php-team.
Created attachment 136898 [details]
In PHP overlay now. hanno, just commit the ebuild there if it works for you.
jakub, there's one issue with it: It shouldn't install as an extension for the apache-module and the cli-version, as it only makes sense for cgi/fcgi.
Installing the ini-file for mod_php can even raise new security issues, as it may bypass restrictions set by the administrator.