logo

overlay

My (experimental) gentoo overlay

mumble-1.3.0_rc1.ebuild (3023B)


      1 # Copyright 1999-2019 Gentoo Authors
      2 # Distributed under the terms of the GNU General Public License v2
      3 
      4 EAPI=7
      5 
      6 inherit desktop qmake-utils xdg
      7 
      8 DESCRIPTION="Mumble is an open source, low-latency, high quality voice chat software"
      9 HOMEPAGE="https://wiki.mumble.info"
     10 if [[ "${PV}" == 9999 ]] ; then
     11 	inherit git-r3
     12 	EGIT_REPO_URI="https://github.com/mumble-voip/mumble.git"
     13 	EGIT_SUBMODULES=( '-*' celt-0.7.0-src celt-0.11.0-src themes/Mumble 3rdparty/rnnoise-src )
     14 else
     15 	MY_PV="$(ver_rs 3 -)"
     16 	SRC_URI="https://github.com/mumble-voip/mumble/archive/${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz"
     17 	KEYWORDS="~amd64 ~arm64 ~x86"
     18 	S="${WORKDIR}/${PN}-${MY_PV}"
     19 fi
     20 
     21 LICENSE="BSD MIT"
     22 SLOT="0"
     23 IUSE="+alsa +dbus debug g15 jack libressl +opus oss pch portaudio pulseaudio +rnnoise speech zeroconf"
     24 
     25 RDEPEND="
     26 	dev-qt/qtcore:5
     27 	dev-qt/qtgui:5
     28 	dev-qt/qtnetwork:5
     29 	dev-qt/qtsql:5[sqlite]
     30 	dev-qt/qtsvg:5
     31 	dev-qt/qtwidgets:5
     32 	dev-qt/qtxml:5
     33 	>=dev-libs/protobuf-2.2.0:=
     34 	>=media-libs/libsndfile-1.0.20[-minimal]
     35 	>=media-libs/speex-1.2.0
     36 	media-libs/speexdsp
     37 	sys-apps/lsb-release
     38 	x11-libs/libX11
     39 	x11-libs/libXi
     40 	alsa? ( media-libs/alsa-lib )
     41 	dbus? ( dev-qt/qtdbus:5 )
     42 	g15? ( app-misc/g15daemon )
     43 	jack? ( virtual/jack )
     44 	!libressl? ( >=dev-libs/openssl-1.0.0b:0= )
     45 	libressl? ( dev-libs/libressl )
     46 	opus? ( >=media-libs/opus-1.0.1 )
     47 	portaudio? ( media-libs/portaudio )
     48 	pulseaudio? ( media-sound/pulseaudio )
     49 	speech? ( >=app-accessibility/speech-dispatcher-0.8.0 )
     50 	zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
     51 "
     52 DEPEND="${RDEPEND}
     53 	>=dev-libs/boost-1.41.0
     54 	x11-base/xorg-proto
     55 "
     56 BDEPEND="
     57 	dev-qt/linguist-tools:5
     58 	virtual/pkgconfig
     59 "
     60 
     61 src_configure() {
     62 	myuse() {
     63 		[[ -n "${1}" ]] || die "myuse: No use option given"
     64 		use ${1} || echo no-${1}
     65 	}
     66 
     67 	local conf_add=(
     68 		bundled-celt
     69 		no-bundled-opus
     70 		no-bundled-speex
     71 		no-embed-qt-translations
     72 		no-server
     73 		no-update
     74 		$(myuse alsa)
     75 		$(myuse dbus)
     76 		$(usex debug 'symbols debug' release)
     77 		$(myuse g15)
     78 		$(usex jack '' no-jackaudio)
     79 		$(myuse opus)
     80 		$(myuse oss)
     81 		$(myuse portaudio)
     82 		$(myuse pulseaudio)
     83 		$(myuse rnnoise)
     84 		$(usex speech '' no-speechd)
     85 		$(usex zeroconf '' no-bonjour)
     86 	)
     87 
     88 	use pch || conf_add+=( no-pch )
     89 
     90 	eqmake5 "${S}/main.pro" -recursive \
     91 		CONFIG+="${conf_add[*]}" \
     92 		DEFINES+="PLUGIN_PATH=/usr/$(get_libdir)/mumble"
     93 }
     94 
     95 src_install() {
     96 	newdoc README.Linux README
     97 	dodoc CHANGES
     98 
     99 	local dir=release
    100 	if use debug; then
    101 		dir=debug
    102 	fi
    103 
    104 	dobin "${dir}"/mumble
    105 	dobin scripts/mumble-overlay
    106 
    107 	insinto /usr/share/services
    108 	doins scripts/mumble.protocol
    109 
    110 	domenu scripts/mumble.desktop
    111 
    112 	doicon -s scalable icons/mumble.svg
    113 
    114 	doman man/mumble-overlay.1
    115 	doman man/mumble.1
    116 
    117 	dolib.so "${dir}"/libmumble.so* "${dir}"/libcelt0.so* "${dir}"/plugins/lib*.so*
    118 }
    119 
    120 pkg_preinst() {
    121 	xdg_pkg_preinst
    122 }
    123 
    124 pkg_postinst() {
    125 	xdg_pkg_postinst
    126 	echo
    127 	elog "Visit http://mumble.sourceforge.net/ for futher configuration instructions."
    128 	elog "Run mumble-overlay to start the OpenGL overlay (after starting mumble)."
    129 	echo
    130 }
    131 
    132 pkg_postrm() {
    133 	xdg_pkg_postrm
    134 }