# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # submitted by gabriel.rossetti@eivd.ch DESCRIPTION="A Gtk version of mp3splt" HOMEPAGE="http://mp3splt.sourceforge.net/" SRC_URI="mirror://sourceforge/mp3splt/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~hppa -mips ~ppc ~sparc ~x86" IUSE="gtk2 bmp xmms" # if xmms uses gtk1, then mp3splt-gtk crashes! DEPEND=">=media-libs/libmp3splt-0.1.4 gtk2? ( >=x11-libs/gtk+-2.6.0 ) xmms? ( >=media-sound/xmms-1.2.10 ) bmp? ( >=media-sound/beep-media-player-0.9.7 )" pkg_setup() { einfo "" einfo "" einfo "To compile using the xmms USE flag the gtk2 USE flag also" einfo "has to be present. The application crashes if xmms uses gtk1" einfo "so this is intended to keep non-gtk2 USE flag users from" einfo "compiling a faulty option" einfo "If you don't care and still want force it, then use the gtk2" einfo "flag in a temporary manner like this :" einfo "" einfo 'USE="gtk2" emerge' ${P} einfo "" einfo "" } src_compile() { local myconf="" # --enable-xmms doesn't work well if xmms uses gtk1 # so if gtk2 USE flag isn't on, don't enable it if (use gtk2 && use xmms) && !(use bmp) then myconf="--enable-xmms --disable-bmp" elif (use gtk2 && use xmms) then myconf="--enable-xmms" elif !(use bmp) then myconf="--disable-bmp" fi econf ${myconf} || die "econf failed" emake || die "build failed" } src_install() { make DESTDIR="${D}" install || die "make install failed" dodoc AUTHORS ChangeLog NEWS TODO ABOUT-NLS COPYING README } pkg_postinst() { einfo "" einfo "" einfo "Warning! compiling with xmms causes the application to crash on" einfo "on gnome when using the file choose, this seems to be caused by" einfo "xmms being compiled using gtk1 instead of gtk2" einfo "If the application crashes as described above, either compile" einfo "xmms using only gtk2 or remove the xmms USE flag as shown below" einfo "" einfo 'USE="-xmms" emerge' ${P} einfo "" einfo "" }