# 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" IUSE="dbus debug portaudio pulseaudio alsa oss texttospeech" DEPEND="$(qt4_min_version 4.3) >=media-libs/speex-1.2_beta3_p2 dev-libs/boost x11-libs/libXevie dbus? ( sys-apps/dbus ) alsa? ( media-libs/alsa-lib ) portaudio? ( media-libs/portaudio ) pulseaudio? ( media-sound/pulseaudio ) texttospeech? ( app-accessibility/speech-dispatcher )" RDEPEND="${DEPEND}" pkg_setup() { echo if ! built_with_use =x11-libs/qt-4* ssl sqlite3; then die "You need to build Qt4 with the ssl and sqlite3 use-flags" fi if use dbus; then if ! built_with_use =x11-libs/qt-4* dbus; then die "You need to build Qt4 with the dbus use-flag" fi 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}" } src_compile() { use dbus || conf_add="${conf_add} no-dbus" use portaudio || conf_add="${conf_add} no-portaudio" use pulseaudio || conf_add="${conf_add} no-pulseaudio" use alsa || conf_add="${conf_add} no-alsa" use oss || conf_add="${conf_add} no-oss" use texttospeech || conf_add="${conf_add} no-speechd" use debug && conf_add="${conf_add} symbols debug" qmake "${S}/main.pro" -recursive CONFIG+="${conf_add} release no-server no-bundled-speex" DEFINES+="PLUGIN_PATH=/usr/lib/mumble" \ || die "Error while executing qmake." 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" dodir /usr/$(get_libdir)/mumble || die "failed to create lib dir" CONF_LIBDIR="$(get_libdir)/mumble" dolib.so ${dir}/lib*.so* || die "installing libs failed" CONF_LIBDIR="$(get_libdir)/mumble" dolib.so ${dir}/plugins/lib*.so* || die "installing libs failed" dobin scripts/mumble-overlay || die "installing overlay failed" newicon icons/mumble.64x64.png mumble.png || die "installing icon failed" make_desktop_entry ${PN} "Mumble" mumble "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 (obsolete as of mumble-1.1.4)" elog " Section \"Extensions\"" elog " Option \"XEVIE\" \"Enable\"" elog " EndSection" }