From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1223038-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 99AC213835A
	for <garchives@archives.gentoo.org>; Mon, 16 Nov 2020 23:48:08 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B261AE0997;
	Mon, 16 Nov 2020 23:48:07 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id E7D53E0982
	for <gentoo-commits@lists.gentoo.org>; Mon, 16 Nov 2020 23:48:06 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id DA44934119C
	for <gentoo-commits@lists.gentoo.org>; Mon, 16 Nov 2020 23:48:05 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 8B8723A9
	for <gentoo-commits@lists.gentoo.org>; Mon, 16 Nov 2020 23:48:04 +0000 (UTC)
From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" <polynomial-c@gentoo.org>
Message-ID: <1605570479.e10a816f22b00a9a87481df79977234b45af7748.polynomial-c@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/mumble/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-sound/mumble/mumble-9999.ebuild
X-VCS-Directories: media-sound/mumble/
X-VCS-Committer: polynomial-c
X-VCS-Committer-Name: Lars Wendler
X-VCS-Revision: e10a816f22b00a9a87481df79977234b45af7748
X-VCS-Branch: master
Date: Mon, 16 Nov 2020 23:48:04 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: de1a3d7b-220d-4f8f-8c84-e3136b461f51
X-Archives-Hash: a4050ca22c8718ecd94e743f91411a2b

commit:     e10a816f22b00a9a87481df79977234b45af7748
Author:     Sebastian Parborg <darkdefende <AT> gmail <DOT> com>
AuthorDate: Sat Sep 19 12:03:02 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Nov 16 23:47:59 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e10a816f

media-sound/mumble: Update/Fix live ebuild

Upstream now has dropped qmake and uses only cmake.
Updated the ebuild to use cmake instead of qmake.

Also added tests.

Closes: https://bugs.gentoo.org/741716
Closes: https://github.com/gentoo/gentoo/pull/17468
Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com>
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 media-sound/mumble/mumble-9999.ebuild | 117 ++++++++++++----------------------
 1 file changed, 39 insertions(+), 78 deletions(-)

diff --git a/media-sound/mumble/mumble-9999.ebuild b/media-sound/mumble/mumble-9999.ebuild
index d821055f5f3..48fccfb70b6 100644
--- a/media-sound/mumble/mumble-9999.ebuild
+++ b/media-sound/mumble/mumble-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit desktop multilib-build qmake-utils xdg
+inherit cmake xdg
 
 DESCRIPTION="Mumble is an open source, low-latency, high quality voice chat software"
 HOMEPAGE="https://wiki.mumble.info"
@@ -26,7 +26,8 @@ fi
 
 LICENSE="BSD MIT"
 SLOT="0"
-IUSE="+alsa +dbus debug g15 jack libressl +opus oss pch portaudio pulseaudio +rnnoise speech zeroconf"
+IUSE="+alsa +dbus debug g15 jack libressl portaudio pulseaudio nls +rnnoise speech test zeroconf"
+RESTRICT="!test? ( test )"
 
 RDEPEND="
 	dev-qt/qtcore:5
@@ -38,6 +39,7 @@ RDEPEND="
 	dev-qt/qtxml:5
 	>=dev-libs/protobuf-2.2.0:=
 	>=media-libs/libsndfile-1.0.20[-minimal]
+	>=media-libs/opus-1.3.1
 	>=media-libs/speex-1.2.0
 	media-libs/speexdsp
 	sys-apps/lsb-release
@@ -49,7 +51,6 @@ RDEPEND="
 	jack? ( virtual/jack )
 	!libressl? ( >=dev-libs/openssl-1.0.0b:0= )
 	libressl? ( dev-libs/libressl )
-	opus? ( >=media-libs/opus-1.0.1 )
 	portaudio? ( media-libs/portaudio )
 	pulseaudio? ( media-sound/pulseaudio )
 	speech? ( >=app-accessibility/speech-dispatcher-0.8.0 )
@@ -64,94 +65,54 @@ BDEPEND="
 	virtual/pkgconfig
 "
 
-# NB: qmake does not support multilib but it's fine to configure
-# for the native ABI here
-src_configure() {
-	myuse() {
-		[[ -n "${1}" ]] || die "myuse: No use option given"
-		use ${1} || echo no-${1}
-	}
-
-	local conf_add=(
-		bundled-celt
-		no-bundled-opus
-		no-bundled-speex
-		no-embed-qt-translations
-		no-server
-		no-update
-		$(myuse alsa)
-		$(myuse dbus)
-		$(usex debug 'symbols debug' release)
-		$(myuse g15)
-		$(usex jack '' no-jackaudio)
-		$(myuse opus)
-		$(myuse oss)
-		$(myuse portaudio)
-		$(myuse pulseaudio)
-		$(myuse rnnoise)
-		$(usex speech '' no-speechd)
-		$(usex zeroconf '' no-bonjour)
-	)
-
-	use pch || conf_add+=( no-pch )
-
-	eqmake5 "${S}/main.pro" -recursive \
-		CONFIG+="${conf_add[*]}" \
-		DEFINES+="PLUGIN_PATH=/usr/$(get_libdir)/mumble"
+src_prepare() {
+        # required because of xdg.eclass also providing src_prepare
+        cmake_src_prepare
 }
 
-multilib_src_compile() {
-	local emake_args=(
-		# place libmumble* in a subdirectory
-		DESTDIR_ADD="/${MULTILIB_ABI_FLAG}"
-		{C,L}FLAGS_ADD="$(get_abi_CFLAGS)"
+src_configure() {
+
+	local mycmakeargs=(
+		"-Dalsa=$(usex alsa)"
+		"-DBUILD_TESTING=$(usex test)"
+		"-Dbundled-celt=ON"
+		"-Dbundled-opus=OFF"
+		"-Dbundled-speex=OFF"
+		"-Ddbus=$(usex dbus)"
+		"-Dg15=$(usex g15)"
+		"-Djackaudio=$(usex jack)"
+		"-Doverlay=ON"
+		"-Dportaudio=$(usex portaudio)"
+		"-Dpulseaudio=$(usex pulseaudio)"
+		"-Drnnoise=$(usex rnnoise)"
+		"-Dserver=OFF"
+		"-Dspeechd=$(usex speech)"
+		"-Dtranslations=$(usex nls)"
+		"-Dupdate=OFF"
+		"-Dzeroconf=$(usex zeroconf)"
 	)
-	# build only overlay library for other ABIs
-	multilib_is_native_abi || emake_args+=( -C overlay_gl )
-	emake "${emake_args[@]}"
-	emake clean
-}
 
-src_compile() {
-	multilib_foreach_abi multilib_src_compile
-}
-
-multilib_src_install() {
-	local dir=$(usex debug debug release)
-	insinto /usr/$(get_libdir)/${PN}
-	doins "${dir}/${MULTILIB_ABI_FLAG}"/libmumble.so*
-	if multilib_is_native_abi; then
-		dobin "${dir}"/mumble
-		doins "${dir}"/libcelt0.so* "${dir}"/plugins/lib*.so*
-	fi
+	cmake_src_configure
 }
 
 src_install() {
-	multilib_foreach_abi multilib_src_install
-
-	dodoc CHANGES README.md
-	dobin scripts/mumble-overlay
-
-	insinto /usr/share/services
-	doins scripts/mumble.protocol
-
-	domenu scripts/mumble.desktop
-
-	doicon -s scalable icons/mumble.svg
-
-	doman man/mumble-overlay.1
-	doman man/mumble.1
-}
-
-pkg_preinst() {
-	xdg_pkg_preinst
+	cmake_src_install
+
+	if use amd64 ; then
+		# The 32bit overlay library gets automatically built and installed on x86_64 platforms.
+		# Install it into the correct 32bit lib dir.
+		local libdir_64="/usr/$(get_libdir)/mumble"
+		local libdir_32="/usr/$(get_abi_var LIBDIR x86)/mumble"
+		mkdir -p ${D}/{$libdir_32} || die
+		mv ${D}/${libdir_64}/libmumbleoverlay.x86.so* ${D}/${libdir_32}/ || die
+	fi
 }
 
 pkg_postinst() {
 	xdg_pkg_postinst
 	echo
 	elog "Visit https://wiki.mumble.info/ for futher configuration instructions."
-	elog "Run mumble-overlay to start the OpenGL overlay (after starting mumble)."
+	elog "Run 'mumble-overlay <program>' to start the OpenGL overlay (after starting mumble)."
 	echo
 }