See the description of install in prepare.sh; the second set of packages are stuff to *avoid* installing.  If it's not relevant for gentoo, you don't have to special-case it.