Error message while building: ../libmysql/.libs/libmysqlclient.so: undefined reference to `OpenSSL_add_all_algorithms' collect2: ld returned 1 exit status at this point the entire ebuild stops. I am using: openssl-0.9.7c-r1
do revdep-rebuild on your system and it will all work fine.