# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils toolchain-funcs DESCRIPTION="A client-server based 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="~x86 ~amd64" IUSE="pulseaudio" DEPEND=">=x11-libs/qt-4.3 media-libs/alsa-lib dev-libs/boost x11-libs/libXevie media-libs/speex pulseaudio? (media-sound/pulseaudio) " RDEPEND="${DEPEND}" pkg_setup() { if ! built_with_use -o =x11-libs/qt-4* sqlite3 || ! built_with_use -o =x11-libs/qt-4* dbus; then echo if ! built_with_use -o =x11-libs/qt-4* sqlite3; then ewarn "You need to build Qt4 with the sqlite3 use-flag" fi if ! built_with_use -o =x11-libs/qt-4* dbus; then ewarn "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 ewarn "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}" if ! use pulseaudio; then ewarn "pulseaudio support not enabled: disabling pulseaudio support" epatch "${FILESDIR}"/mumble-1.1.1-disablePulsaudioBuild.patch fi epatch "${FILESDIR}"/mumble-1.1.1-clientonly.patch } src_compile() { qmake main.pro || die "qmake failed" emake || die "emake failed" } src_install() { cat README.Linux >> README dodoc README CHANGES || die "installing docs failed" cd release dobin mumble || die "install mumble executable failed" dolib libmumble.so.${PV} || die "install libary failed" dosym /usr/$(get_libdir)/libmumble.so.${PV} /usr/$(get_libdir)/libmumble.so insinto /usr/share/pixmaps newins ${S}/icons/mumble.64x64.png mumble.png make_desktop_entry mumble "Mumble" mumble.png "KDE;Qt;AudioVideo" || die "installing desktop entry failed" } pkg_postinst() { einfo "Visit http://mumble.sourceforge.net/Audio_Tuning for futher configuration" einfo "type mumble to run the client" einfo "you might want to add this to your xorg.conf to get shortcut support" einfo " Section \"Extensions\"" einfo " Option \"XEVIE\" \"Enable\"" einfo " EndSection" }