alpine-2.00-r4 failed to merge because of some issues with the OpenSSL support picking up the OS copy of OpenSSL header (Centos 5.5) instead of the Prefix copy.
Steps to Reproduce:
1. emerge alpine
Failed merge with broken syntax SSL headers
Stopping the emerge after the 'Source unpacked' with Ctrl-Z
Edit $PREFIX/var/tmp/portage/mail-client/alpine-2.00-r4/work/alpine-2.00/imap/src/osdep/unix/Makefile and changing
SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\
SSLCFLAGS= -I<your prefix>$(SSLINCLUDE) -I<your prefix>$(SSLINCLUDE)/openssl\
seemed to fix the problem. This is not a good solution, but perhaps a stopgap.
alpine needs an extensive amount of patching to work nicely in Prefix. The build system hardcodes zillion of paths to host-provided libraries based on platform used.
If you have interest in this package, I encourage you to create a patch.