# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: ;) DESCRIPTION="A set of tools that detect motion between two images" SRC_URI="http://gemia.de/motion/${P}.tar.gz" HOMEPAGE="http://motiontrack.sourceforge.net" SLOT="0" LICENSE="GPL-2" KEYWORDS="x86 ~ppc ~ppc64 ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~s390" #note: i had motiontrack running on sourceforge test machines with #ppc sparc, amd64 alpha and several x86, but hadnt installed gentoo there #other architectures probably work, too IUSE="libgd imagemagick debug" DEPEND="virtual/glibc debug? ( libgd? ( imagemagick? ( media-gfx/imagemagick ) : ( media-libs/libgd ) ) : ( media-gfx/imagemagick ) ) : ( imagemagick? ( libgd? ( media-libs/libgd ) : ( media-gfx/imagemagick ) ) : ( media-libs/libgd ) )" src_compile() { local myconf if use libgd; then if use imagemagick; then einfo "motiontrack can only use one of libgd or imagemagick, not both." einfo "default is libgd when debug is unset, imagemagick otherwise." einfo "please unset one of these use flags if you have other intentions." fi fi if use debug; then #default to imagemagick for providing better features #for debugging myconf="--enable-debug" if use libgd; then if use imagemagick; then myconf="${myconf} --enable-magick --disable-gd"; else myconf="${myconf} --disable-magick --enable-gd"; fi else myconf="${myconf} --enable-magick --disable-gd"; fi else #default to libgd for being faster myconf="--disable-debug" if use imagemagick; then if use libgd; then myconf="${myconf} --disable-magick --enable-gd"; else myconf="${myconf} --enable-magick --disable-gd"; fi else myconf="${myconf} --disable-magick --enable-gd"; fi fi econf $myconf || die "configure failed" emake || die "make failed" } src_install() { make DESTDIR=${D} install || die "install failed" dodoc README src/TheCode.txt }