# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils toolchain-funcs qt4 DESCRIPTION="Voice chat software for gaming written in Qt4" HOMEPAGE="http://mumble.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86" # would be a good idea to be able to remove oss / alsa support if needed # the festival useflag just removes or adds the dependency at the moment. # maybe its worth removing all tts features from mumble when it is disabled as # well. IUSE="festival portaudio pulseaudio" RDEPEND="dev-libs/boost media-libs/alsa-lib x11-libs/libXevie $(qt4_min_version 4.3) portaudio? ( media-libs/portaudio ) pulseaudio? ( media-sound/pulseaudio ) festival? ( app-accessibility/festival )" DEPEND="${RDEPEND} dev-util/pkgconfig" pkg_setup() { if ! built_with_use -a =x11-libs/qt-4* sqlite3 dbus ; then echo if ! built_with_use =x11-libs/qt-4* sqlite3; then eerror "You need to build Qt4 with the sqlite3 use-flag" fi if ! built_with_use =x11-libs/qt-4* dbus; then eerror "You need to build Qt4 with the dbus use-flag" fi echo die "Your Qt4 installation lacks propper useflag configuration, see above" fi if [[ $(gcc-major-version) -eq 3 && $(gcc-minor-version) -lt 4 ]]; then eerror "You need >=sys-devel/gcc-3.4 to compile ${PN}." die "System gcc is too old to compile ${PN}." fi } src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/${P}-disableMurmur.patch" if ! use portaudio && ! use pulseaudio then epatch "${FILESDIR}/${P}-disablePulseaudio-disablePortaudio.patch" else use pulseaudio || epatch "${FILESDIR}/${P}-disablePulseaudio.patch" use portaudio || epatch "${FILESDIR}/${P}-disablePortaudio.patch" fi } src_compile() { qmake "${S}/main.pro" emake } src_install() { newdoc README.Linux README dodoc CHANGES local dir if built_with_use =x11-libs/qt-4* debug; then dir=debug ewarn "Built debug-version because your Qt4 has the debug use-flag enabled." else dir=release fi dobin ${dir}/mumble || die "installing failed" dolib.so ${dir}/lib*.so* || die "installing failed" dobin scripts/mumble-overlay || die "installing failed" newicon icons/mumble.64x64.png mumble.png || die "installing icon failed" make_desktop_entry ${PN} "Mumble" mumble.png "KDE;Qt;AudioVideo" \ || die "installing menu entry failed" doman man/mumble-overlay.1 doman man/mumble.1 insinto /usr/share/services doins scripts/mumble.protocol } pkg_postinst() { elog elog "Visit http://mumble.sourceforge.net/Audio_Tuning for futher configuration" elog "type mumble to run the client" elog "you might want to add this to your xorg.conf to get shortcut support" elog " Section \"Extensions\"" elog " Option \"XEVIE\" \"Enable\"" elog " EndSection" }