# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # Created by: Alex Barker #IUSE="alsa jack djconsole" IUSE="djconsole recording hifieq ladspa ffmpeg vinylcontrol gprof debug" inherit eutils #Some local vars MY_S="${WORKDIR}/${P/_/}" MY_CONF="prefix=/usr" DESCRIPTION="Digital DJ tool using QT 3.x" HOMEPAGE="http://mixxx.sourceforge.net" SRC_URI="mirror://sourceforge/mixxx/${P/_/-}-src.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64 ~ppc" DEPEND=">=x11-libs/qt-4.3.0 dev-util/scons media-sound/madplay media-libs/libogg media-libs/libvorbis media-libs/audiofile media-libs/libsndfile media-libs/libsamplerate =media-libs/portaudio-19* ffmpeg? ( media-video/ffmpeg ) djconsole? ( media-libs/libdjconsole ) ladspa? ( media-libs/ladspa-sdk )" RDEPEND="${DEPEND} dev-lang/perl sys-apps/sed" # Mixxx should use what is provided by port audio # alsa? ( media-libs/alsa-lib ) # jack? ( media-sound/jack-audio-connection-kit )" pkg_setup() { # Make sure x11-libs/qt-4.3.0 uses qt3support if ! built_with_use x11-libs/qt qt3support ; then eerror "Please make sure x11-libs/qt is built with: qt3support" die "Package dependencies not set up correctly" fi ewarn "*************************************************" ewarn "This packages provides many use flags that will " ewarn "NOT be included in the final release. They are " ewarn "provided for debugging purposes only. " ewarn "" ewarn "The following is a list of recomended settings: " ewarn "\tdjconsole\t[OFF]" ewarn "\trecording\t[OFF]" ewarn "\thifieq\t\t[OFF]" ewarn "\tladspa\t\t[OFF]" ewarn "\tffmpeg\t\t[OFF]" ewarn "\tvinylcontrol\t[ON]" ewarn "\tgprof\t\t[OFF]" ewarn "\tdebug\t\t[ON]" ewarn "" ewarn "*************************************************" if use ffmpeg ; then ewarn "**** BIG FAT WARNING! ****" ewarn "There are known issues building with ffmpeg support at this time." fi #if use custom-cflags ; then # ewarn "The custom-cflags should tell mixxx to build with the current CFLAGS and CHOST in env vars however at this time it uses -native flag." #fi } src_unpack() { unpack "${A}" cd "${MY_S}" # We currently have no patches. epatch "${FILESDIR}"/${P}-version.patch epatch "${FILESDIR}"/${P}-Sconscript.patch #sed -i -e "s:\(QMAKE_CXXFLAGS\)\(.*\):\1 += ${CFLAGS} -pipe:" \ # -e "s:\(QMAKE_CFLAGS\)\(.*\):\1 += ${CFLAGS} -pipe:" \ # mixxx.pro || die "patching failed" } src_compile() { cd "${MY_S}" # Gentoo does not currently support scons, we must build/config maunally use djconsole && MY_CONF="${MY_CONF} djconsole=1" || MY_CONF="${MY_CONF} djconsole=0" use recording && MY_CONF="${MY_CONF} experimentalrecord=1" || MY_CONF="${MY_CONF} experimentalrecord=0" use hifieq && MY_CONF="${MY_CONF} hifieq=1" || MY_CONF="${MY_CONF} hifieq=0" use ladspa && MY_CONF="${MY_CONF} ladspa=1" || MY_CONF="${MY_CONF} ladspa=0" use ffmpeg && MY_CONF="${MY_CONF} ffmpeg=1" || MY_CONF="${MY_CONF} ffmpeg=0" use vinylcontrol && MY_CONF="${MY_CONF} vinylcontrol=1" || MY_CONF="${MY_CONF} vinylcontrol=0" use gprof && MY_CONF="${MY_CONF} gprof=1" || MY_CONF="${MY_CONF} gprof=0" use debug && MY_CONF="${MY_CONF} cmetrics=1" || MY_CONF="${MY_CONF} cmetrics=0" use custom-cflags && MY_CONF="${MY_CONF} tuned=1" || MY_CONF="${MY_CONF} tuned=0" einfo "Cleaning..." einfo "scons --clean" scons --clean || die "Clean failed!" einfo "Compiling..." einfo "scons ${MAKEOPTS} ${MY_CONF}" scons ${MAKEOPTS} ${MY_CONF} || die "Build failed!" } src_install() { cd "${MY_S}" # Got to copy to ${D}/usr scons ${MY_CONF} install_root=${D}/usr install # What happened to README.ALSA ? dodoc ./README ./Mixxx-Manual.pdf if use djconsole ; then dodoc ./HERCULES.txt fi if use recording ; then dodoc ./README.macro fi } pkg_postinst() { elog "Please review Mixxx-Manual.pdf for configuration options." }