Gentoo support, tested working
Merge commit 'b48dd2c'

Gentoo support