# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: 

inherit eutils

DESCRIPTION="GTK Engines"
HOMEPAGE="http://www.windowmaker.org/"

THEME_URI="http://dside.dyndns.org/files/darklin/themes"
SRC_URI="${THEME_URI}/eazel-engine-0.3.tar.bz2
	${THEME_URI}/Wonderland1-0.47.tar.bz2"

#	${THEME_URI}/ThinIce.tar.bz2

DEPEND="media-libs/gdk-pixbuf
	=gnome-base/libglade-0*"
    
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="alpha amd64 ppc sparc x86"

src_unpack() {
	mkdir ${S}
	cd ${S}
	for i in ${SRC_URI} ; do
		bn=`basename $i`
		unpack ${bn}
	done

	cd eazel-engine-0.3 || die
	epatch ${FILESDIR}/eazel-engine-0.3-disablecapplet.patch.bz2 || die
	epatch ${FILESDIR}/eazel-engine-0.3-gcc3.4.patch.bz2 || die
	
	rm ltmain.sh
	aclocal
	autoheader
	automake --add-missing --copy
	autoconf
}

src_compile() {
    cd ${S}
    
    for name in *; do
	cd $name || die
	econf || die
	emake || die
	cd ..
    done
}

src_install () {
    cd ${S}
    
    for name in *; do
	cd $name || die
	emake install DESTDIR=${D} || die
	cd ..
    done
}