--- /usr/portage/app-laptop/hdapsd/hdapsd-20060409-r1.ebuild 2007-08-29 21:05:49.000000000 +0200 +++ hdapsd-20060409-r1.ebuild 2008-03-21 21:22:10.444027582 +0100 @@ -20,10 +20,18 @@ S="${WORKDIR}" -CONFIG_CHECK="SENSORS_HDAPS" -ERROR_SENSORS_HDAPS="${P} requires support for HDAPS (CONFIG_SENSORS_HDAPS)" - src_compile() { + # We require the hdaps module; problem is that it can come from either + # kernel sources or from the tp_smapi package. This hack is required because + # the linux-info eclass doesn't export any more suitable config checkers. + # Here we just skip calling its pkg_setup() in case the module is provided + # by the package. + if ! has_version app-laptop/tp_smapi || ! built_with_use app-laptop/tp_smapi hdaps; then + CONFIG_CHECK="SENSORS_HDAPS" + ERROR_SENSORS_HDAPS="${P} requires support for HDAPS (CONFIG_SENSORS_HDAPS) or " + linux-info_pkg_setup + fi + cd "${WORKDIR}" gcc ${CFLAGS} "${P}".c -o hdapsd || die "failed to compile" }