# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase-kioslaves/kdebase-kioslaves-3.5.10-r1.ebuild,v 1.6 2009/07/08 13:36:05 alexxy Exp $
EAPI="1"
KMNAME=kdebase
KMMODULE=kioslave

inherit kde-meta eutils

SRC_URI="${SRC_URI}
	mirror://gentoo/kdebase-3.5-patchset-13.tar.bz2"

DESCRIPTION="kioslave: the kde VFS framework - kioslave plugins present a filesystem-like view of arbitrary data"
KEYWORDS="~alpha amd64 hppa ~ia64 ~mips ppc ppc64 ~sparc x86 ~x86-fbsd"
IUSE="hal kdehiddenvisibility ldap openexr samba"

DEPEND="x11-libs/libXcursor
	ldap? ( net-nds/openldap )
	samba? ( >=net-fs/samba-3.0.1 )
	>=dev-libs/cyrus-sasl-2
	hal? ( dev-libs/dbus-qt3-old =sys-apps/hal-0.5* )
	openexr? ( >=media-libs/openexr-1.2.2-r2 )
	!> /dev/null 2>/dev/null) ]] ; then
		einfo "User ${USER} has no X access, disabling some tests."
		for ioslave in media remote home system ; do
			sed -e "s:check\: test${ioslave}::" -e "s:./test${ioslave}::" \
				-i kioslave/${ioslave}/Makefile.am || die "sed failed"
		done
	fi
}

src_compile() {
	myconf="$myconf $(use_with ldap) $(use_with samba) $(use_with hal) $(use_with openexr)"
	kde-meta_src_compile
}