--- groff-1.20.1-r1.ebuild 2009-03-12 20:20:40.000000000 +0000 +++ groff-1.20.1-r1.ebuild.new 2009-03-12 20:20:16.000000000 +0000 @@ -24,6 +24,22 @@ x11-libs/libICE )" +pkg_setup() +{ + # The host groff version needs to be the same then what we try to emerge. + if tc-is-cross-compiler ; then + HOSTGROFF=$(groff -v | grep 'GNU groff version' | sed -e 's/GNU groff version //') + if [ "${HOSTGROFF}" == "" ]; then + die "Groff must be installed on host for cross-compiling!" + fi + if [ "${HOSTGROFF}" != "${PV}" ]; then + eerror "Groff version ${HOSTGROFF} is installed on your host," + eerror "but version ${PV} is required for cross-compilation." + die "Can't crosscompile groff due to version mismatch." + fi + fi +} + src_unpack() { unpack ${A} cd "${S}"