[proaudio] Hydrogen 0.9.4 rc1

[ Thread Index | Date Index | More lists.tuxfamily.org/proaudio Archives ]


While were all submitting new ebuilds, I hacked together an ebuild for
this version. I don't know if this is the correct way to do scons
installs, or if scons just changed the way it works or something, but
this is based on one of the beta ebuilds, and the program seems to
work for me, so I guess it's okay. Anyway, I only changed the SRC_URI
variable slightly, and added the two "cd" lines in src_compile.

Here it is:

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=1

inherit eutils qt4

DESCRIPTION="Linux Drum Machine"
HOMEPAGE="http://hydrogen.sourceforge.net/";
MY_PV="${PV/_/-}"
SRC_URI="mirror://sourceforge/hydrogen/${PN}-${MY_PV}-1.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="alsa debug flac jack ladspa lash portaudio"

RDEPEND="
        || ( (
                x11-libs/qt-core:4
                        x11-libs/qt-gui:4 )
                        >=x11-libs/qt-4.1:4     )
        dev-libs/libxml2
        media-libs/libsndfile
        media-libs/audiofile
        dev-libs/libtar
        portaudio? ( >=media-libs/portaudio-18.1 )
        alsa? ( media-libs/alsa-lib )
        jack? ( media-sound/jack-audio-connection-kit )
        ladspa? ( media-libs/liblrdf )
        lash? ( media-sound/lash )
        flac? ( media-libs/flac )"

DEPEND="${RDEPEND}"

S="${WORKDIR}/${PN}-${MY_PV}"
src_compile() {
        # export qt4 related environ (copy 'n paste fromt qt4.eclass)
        export QTDIR=/usr/$(get_libdir)
        export QMAKE=/usr/bin/qmake
        export QMAKE_CC=$(tc-getCC)
        export QMAKE_CXX=$(tc-getCXX)
        export QMAKE_LINK=$(tc-getCXX)
        export QMAKE_CFLAGS_RELEASE="${CFLAGS}"
        export QMAKE_CFLAGS_DEBUG="${CFLAGS}"
        export QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}"
        export QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS}"
        export QMAKE_LFLAGS_RELEASE="${LDFLAGS}"
        export QMAKE_LFLAGS_DEBUG="${LDFLAGS}"

        local myconf="prefix=${ROOT}usr destdir=${D}"
        ! use alsa; myconf="${myconf} alsa=$?"
        ! use debug; myconf="${myconf} debug=$?"
        ! use jack; myconf="${myconf} jack=$?"
        ! use ladspa; myconf="${myconf} lrdf=$?"
        ! use portaudio; myconf="${myconf} portaudio=$?"
        ! use lash; myconf="${myconf} lash=$?"
        ! use flac; myconf="${myconf} flac=$?"

        tc-export CC CXX
        myconf="${myconf} CC=${CC} CXX=${CXX}"
        mkdir -p ${D}
        cd ../work/hyd*
        einfo "${myconf}"
        scons CUSTOMCCFLAGS="${CFLAGS}" CUSTOMCXXFLAGS="${CXXFLAGS}" \
                MAKEOPTS="${MAKEOPTS}" \
                ${myconf} || die "scons failed"
}
        mkdir -p ${D}
        cd ../work/hyd*
        einfo "${myconf}"
        scons CUSTOMCCFLAGS="${CFLAGS}" CUSTOMCXXFLAGS="${CXXFLAGS}" \
                MAKEOPTS="${MAKEOPTS}" \
                ${myconf} || die "scons failed"
}

src_install() {
        cd ../work/hyd*
        scons install prefix="${ROOT}usr" destdir="${D}" || die "scons
install failed"

        # install tools
        for i in hydrogenSynth hydrogenPlayer; do
                dobin extra/$i/$i
        done

        # desktop entry
        newicon "data/img/gray/icon32.png" "${PN}.png"
        make_desktop_entry "${PN}" "Hydrogen" "${PN}"
"AudioVideo;Audio;sequencer"
}



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/