# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-plugins/e_modules/e_modules-9999.ebuild,v 1.3 2006/05/14 20:42:20 vapier Exp $
ECVS_MODULE="e_modules"
inherit enlightenment
DESCRIPTION="add-on modules for e17 (snow/flame/notes/etc...)"
IUSE="alarm bling calendar cpu deskshow emu engage flame language mail mem mixer moon \
net photo rain screenshot slideshow snow taskbar tclock uptime weather winselector wlan"
DEPEND="x11-wm/e
x11-libs/ecore
x11-libs/evas
x11-libs/esmart
media-libs/edje
dev-libs/eet
dev-libs/exml"
src_unpack() {
enlightenment_src_unpack
cd ${S}
ALL_MODULES="alarm bling calendar cpu deskshow emu engage flame language mail mem mixer moon net photo rain screenshot slideshow snow taskbar tclock uptime weather winselector wlan"
MODULES_BUILD="";
# Create the list of modules that will be built
for d in ${ALL_MODULES};
do
if use $d; then
MODULES_BUILD="${MODULES_BUILD} $d";
fi
done
# If new modules are introduced into CVS they should be automatically
# built until the ebuild is patched
for d in `ls -1`;
do
[[ -d $d ]] && case $d in
CVS | debian)
## skip these directories
;;
*)
[[ -z "$(echo ${ALL_MODULES} | grep $d 2>/dev/null)" ]] && \
MODULES_BUILD="${MODULES_BUILD} $d"
;;
esac
done
# Patch the relevant files
for f in autogen.sh configure.in Makefile.in;
do
sed -i -e "s:for d in \*:for d in ${MODULES_BUILD}:" $f || die
done
}