--- ksmserver-3.5.9.ebuild.orig 2008-05-18 17:36:22.000000000 +0200 +++ ksmserver-3.5.9.ebuild 2008-05-23 12:55:46.000000000 +0200 @@ -6,17 +6,43 @@ EAPI="1" inherit kde-meta eutils -#SRC_URI="${SRC_URI} -# mirror://gentoo/kdebase-3.5-patchset-07.tar.bz2" - DESCRIPTION="The reliable KDE session manager that talks the standard X11R6" KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd" -IUSE="kdehiddenvisibility" +IUSE="dbus hal kdehiddenvisibility" KMEXTRACTONLY="kdm/kfrontend/themer/" KMCOMPILEONLY="kdmlib/" KMNODOCS=true -# Re-add those patches later on. -#EPATCH_EXCLUDE="ksmserver-3.5.8-ksmserver_suspend.diff -# ksmserver-3.5.8-suspend_configure.diff" +DEPEND="dbus? ( sys-apps/dbus ) + hal? ( sys-apps/hal )" + +PATCHES="${FILESDIR}/${P}-ksmserver_suspend.diff + ${FILESDIR}/${P}-suspend_configure.diff" + +src_compile() { + myconf="${myconf} + $(use_enable hal) + $(use_enable dbus)" + + kde-meta_src_compile +} + +pkg_setup() { + if ! built_with_use --missing true sys-apps/hal laptop; then + eerror "Please re-emerge sys-apps/hal with the \"laptop\" USE flag." + die "Fix use flag and re-emerge." + fi +} + +pkg_postinst() { + kde_pkg_postinst + + if use dbus && use hal ; then + echo + elog "If you don't see any icons next to the suspend/hibernate buttons," + elog "make sure you use an iconset that provides the files" + elog "\"suspend.png\" and \"hibernate.png\"." + echo + fi +}