net-libs/c-client: new revision building the "slx" target with USE="-pam".
authorMichael Orlitzky <mjo@gentoo.org>
Sat, 18 Feb 2017 15:27:51 +0000 (10:27 -0500)
committerMichael Orlitzky <mjo@gentoo.org>
Sat, 18 Feb 2017 16:13:22 +0000 (11:13 -0500)
commit3524b85eb813d017c7fa32843a3949d065ab2d6b
tree4fb95c2c6bcd8cdad3bedaef23e969d2361c07a0
parenta3c9e285f61c980cb56393fa34b2deb75a40519a
net-libs/c-client: new revision building the "slx" target with USE="-pam".

The build system for c-client supports a few different targets. When
USE=pam was not set, we were using the "lnx" target, which supposes
that the crypt() function is available directly in libc. That is not
the case in Gentoo, but things usually worked out when libcrypt was
linked in transitively (by, say, PHP).

However, the "gold" linker is more strict than "bfd" with regard to
transitive dependencies. The gold linker treats them as superfluous
and mercilessly prunes them; thus c-client could wind up with no
crypt() function when the gold linker was used: c-client was not
linking with -lcrypt itself, and even though consumers might be
linking in c-client with -lcrypt, the crypt library appeared unused
and would be omitted.

By switching from the "lnx" target to "slx", we ensure that -lcrypt is
passed to the linker when it links c-client itself. Thus the crypt()
function is where it is expected to be, and the associated PHP build
failure is resolved. I was unable to reproduce a related bug in
mail-client/alpine.

I added two (unrelated) missing "die" statements to the ebuild while I
was at it.

This non-maintainer commit was with permission from robbat2.

Gentoo-Bug: 456928
Gentoo-Bug: 545086

Package-Manager: portage-2.3.3
net-libs/c-client/c-client-2007f-r6.ebuild [new file with mode: 0644]