Hello,

the current libffado-9999.ebuild doesn't work properly. It builts ffado with DEBUG=True and ENABLE_OPTIMIZATIONS=False regardless if the USE flag "debug" is set or not. In my case this lead to ffado constantly producing xruns, so it would be good to change this. Since FFADO uses scons as build system, I was following these guidelines:
http://devmanual.gentoo.org/eclass-reference/scons-utils.eclass/index.html
To produce the attached ebuild.
Notes:
- "die" calls removed, since escons dies on failure in EAPI 4
- changed src_configure to use the Gentoo provided "myesconsargs" mechanism, to properly respect the debug USE flag - ENABLE_OPTIMIZATIONS: meanings of TRUE and FALSE are inverted here to enable this when the debug USE flag is not set and to disable it, if it is. Ugly, but I'm not sure how to achieve this otherwise.

kind regards,
semkath
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

inherit eutils multilib scons-utils subversion

DESCRIPTION="Successor for freebob: Library for accessing BeBoB IEEE1394 
devices"
HOMEPAGE="http://www.ffado.org";

ESVN_REPO_URI="http://subversion.ffado.org/ffado/trunk/libffado";

LICENSE="GPL-2"
KEYWORDS=""
SLOT="0"
IUSE="debug qt4 dbus-server"

RDEPEND=">=media-libs/alsa-lib-1.0.0
        >=dev-cpp/libxmlpp-2.13.0
        >=sys-libs/libraw1394-1.3.0
        >=media-libs/libiec61883-1.1.0
        >=sys-libs/libavc1394-0.5.3
        >=sys-apps/dbus-1.0
        dbus-server? ( dev-libs/dbus-c++ )
        dev-libs/libconfig
        qt4? (
                || ( ( x11-libs/qt-core x11-libs/qt-gui )
                                >=x11-libs/qt-4.0:4 )
                dev-python/PyQt4
                >=dev-python/dbus-python-0.83.0 )"

DEPEND="${RDEPEND}
        dev-util/scons"

src_configure () {
        myesconsargs=(
                $(use_scons debug DEBUG)
                $(use_scons debug ENABLE_OPTIMIZATIONS 0 1)
        )
}

src_compile () {
        addpredict /dev/snd # workaround because jackd --version is called after
                                                # compilation, that tries to 
use /dev/snd/control*
        escons \
                PREFIX=/usr \
                LIBDIR=/usr/$(get_libdir)
}

src_install () {
        escons DESTDIR="${D}" WILL_DEAL_WITH_XDG_MYSELF="True" install
        dodoc AUTHORS ChangeLog NEWS README TODO

        if use qt4; then
                newicon "support/xdg/hi64-apps-ffado.png" "ffado.png"
                newmenu "support/xdg/ffado.org-ffadomixer.desktop" 
"ffado-mixer.desktop"
        fi
}

Reply via email to