# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_P="${P/projectm/projectM}" DESCRIPTION="A graphical music visualization plugin similar to milkdrop" HOMEPAGE="http://xmms-projectm.sourceforge.net/" SRC_URI="mirror://sourceforge/xmms-projectm/${MY_P}.tar.gz" LICENSE="LGPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="xmms libvisual" RDEPEND="libvisual? ( media-libs/libvisual ) xmms? ( media-sound/xmms )" DEPEND="${RDEPEND}" S="${WORKDIR}/${MY_P}" pkg_setup() { if use !xmms && use !libvisual ; then die "You must enable either xmms or libvisual" fi } src_compile() { #Fix Makefiles for make install epatch ${FILESDIR}/makeinstall.patch #add -fpic if compiling on amd64 use amd64 && CFLAGS="${CFLAGS} -fPIC" #for some reason the configure scripts don't find the X11 headers myconf="${myconf} --x-includes=/usr/include/X11" cd ${S}/src/projectM #the cflags are hardcoded into the makefile...update with local flags sed "s%CFLAGS=[^\"]*%CFLAGS=${CFLAGS}%" -i Makefile make clean emake || die "projectM core build failed" if use xmms ; then cd ${S}/src/xmms-projectM econf ${myconf} emake || die "xmms-projectM build failed" fi if use libvisual ; then cd ${S}/src/lv-projectM econf ${myconf} emake || die "lv-projectM build failed" fi } src_install() { if use xmms ; then cd ${S}/src/xmms-projectM make DESTDIR="${D}" install || die "xmms plugin install failed" fi if use libvisual ; then cd ${S}/src/lv-projectM make DESTDIR="${D}" install || die "libvisual plugin install failed" fi }