Added gentoo/freebsd support  [ci skip]