I recently emerged dev-lang/php-5.2.4_pre200708051230-r2. Since then, I've removed pam from my system (USE=-pam and -uDN world). Today, I unmerged pam since it showed up in the --depclean output. After that, revdep-rebuild showed me something I didn't expect: [ 46% ] * broken /usr/lib/apache2/modules/libphp5.so (requires libpam.so.0) [ 78% ] * broken /usr/lib/php5/bin/php (requires libpam.so.0) The ebuild has no pam USE flag nor a dependency on pam.
I just finished rebuilding this version, and it rebuilt fine without pam, so there's no reason for it to be linking against it.
*** This bug has been marked as a duplicate of bug 99696 ***
Uhh, I'm pretty sure this is not a duplicate of bug 99696. I rebuilt *just* php and it was no longer linking against libpam. I didn't have to rebuild any other packages.
IOW - same thing like when half of your desktop packages break on upgrade to expat-2. This will link against pam as long as its dependencies used to compile optional features (such as net-libs/c-client and/or dev-libs/libmcal w/ PHP4) link against pam. PHP itself doesn't depend on PAM. If you dislike this, you can try your luck w/ LDFLAGS="-Wl,--as-needed" :)
Okay, I concede. I didn't know c-client was a static lib. This makes sense now.
*** Bug 213397 has been marked as a duplicate of this bug. ***