From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1279692-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 DA0041382C5
	for <garchives@archives.gentoo.org>; Sat,  8 May 2021 18:27:58 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id E6A66E077F;
	Sat,  8 May 2021 18:27:57 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(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 C3821E077F
	for <gentoo-commits@lists.gentoo.org>; Sat,  8 May 2021 18:27:57 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(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 3A7DA340D01
	for <gentoo-commits@lists.gentoo.org>; Sat,  8 May 2021 18:27:56 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 59B384D2
	for <gentoo-commits@lists.gentoo.org>; Sat,  8 May 2021 18:27:54 +0000 (UTC)
From: "Thomas Deutschmann" <whissi@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, "Thomas Deutschmann" <whissi@gentoo.org>
Message-ID: <1620498463.ba2b951973e0f5ab1e1647b8ac969d9e147cb6ae.whissi@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-video/pipewire/metadata.xml media-video/pipewire/pipewire-9999.ebuild
X-VCS-Directories: media-video/pipewire/
X-VCS-Committer: whissi
X-VCS-Committer-Name: Thomas Deutschmann
X-VCS-Revision: ba2b951973e0f5ab1e1647b8ac969d9e147cb6ae
X-VCS-Branch: master
Date: Sat,  8 May 2021 18:27:54 +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: 7f72935e-f55f-4336-a0dc-0c6be46372bc
X-Archives-Hash: 692b1fe0d736b5e31cb671cba0a612e8

commit:     ba2b951973e0f5ab1e1647b8ac969d9e147cb6ae
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat May  8 13:13:51 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat May  8 18:27:43 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba2b9519

media-video/pipewire: add support to replace JACK

Thanks to Niklāvs for the initial work!

Thanks-to: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 media-video/pipewire/metadata.xml         |  1 +
 media-video/pipewire/pipewire-9999.ebuild | 25 ++++++++++++++++---------
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/media-video/pipewire/metadata.xml b/media-video/pipewire/metadata.xml
index 954805d1590..d199e8a9255 100644
--- a/media-video/pipewire/metadata.xml
+++ b/media-video/pipewire/metadata.xml
@@ -25,6 +25,7 @@
 		<flag name="ffmpeg">Builds an unsupported SPA (file a Gentoo bug if you need this)</flag>
 		<flag name="jack">Enable SPA JACK plugin and emulation to be able to run JACK applications on top of PipeWire</flag>
 		<flag name="jack-client">Install a plugin for running PipeWire as a JACK client</flag>
+		<flag name="jack-sdk">Use PipeWire as JACK replacement</flag>
 		<flag name="ldac">LDAC over Bluetooth (primarily Sony headphones)</flag>
 		<flag name="pipewire-alsa">Replace PulseAudio's ALSA plugin with PipeWire's plugin</flag>
 		<flag name="vulkan">Uses Vulkan compute shaders to provide a CGI video source</flag>

diff --git a/media-video/pipewire/pipewire-9999.ebuild b/media-video/pipewire/pipewire-9999.ebuild
index a90b445a81d..879b3968542 100644
--- a/media-video/pipewire/pipewire-9999.ebuild
+++ b/media-video/pipewire/pipewire-9999.ebuild
@@ -19,7 +19,7 @@ HOMEPAGE="https://pipewire.org/"
 
 LICENSE="LGPL-2.1+"
 SLOT="0/0.3"
-IUSE="aac aptx bluetooth doc extra gstreamer jack-client ldac pipewire-alsa systemd test v4l"
+IUSE="aac aptx bluetooth doc extra gstreamer jack-client jack-sdk ldac pipewire-alsa systemd test v4l"
 
 # Once replacing system JACK libraries is possible, it's likely that
 # jack-client IUSE will need blocking to avoid users accidentally
@@ -30,6 +30,7 @@ IUSE="aac aptx bluetooth doc extra gstreamer jack-client ldac pipewire-alsa syst
 REQUIRED_USE="
 	aac? ( bluetooth )
 	aptx? ( bluetooth )
+	jack-sdk? ( !jack-client )
 	ldac? ( bluetooth )
 "
 
@@ -61,6 +62,10 @@ RDEPEND="
 		media-libs/gst-plugins-base:1.0
 	)
 	jack-client? ( >=media-sound/jack2-1.9.10:2[dbus] )
+	jack-sdk? (
+		!media-sound/jack-audio-connection-kit
+		!media-sound/jack2
+	)
 	pipewire-alsa? (
 		>=media-libs/alsa-lib-1.1.7
 		|| (
@@ -122,8 +127,6 @@ src_configure() {
 		-Dsystemd-system-service=disabled # Matches upstream
 		$(meson_feature systemd systemd-user-service)
 		$(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph
-		-Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph
-		#-Dlibjack-path="" # Where to install libjack.so et al (if an absolute path is used, remember to prefix it with ${EROOT} or similar!); setting this will also break pw-jack's multilib support (but presumably that's okay as the intended use would be to replace system's libraries making the loader irrelevant)
 		-Dspa-plugins=enabled
 		-Dalsa=enabled # Allows using kernel ALSA for sound I/O (-Dmedia-session depends on this)
 		-Daudiomixer=enabled # Matches upstream
@@ -139,7 +142,9 @@ src_configure() {
 		-Dcontrol=enabled # Matches upstream
 		-Daudiotestsrc=enabled # Matches upstream
 		-Dffmpeg=disabled # Disabled by upstream and no major developments to spa/plugins/ffmpeg/ since May 2020
+		-Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph
 		$(meson_feature jack-client jack) # Allows PW to act as a JACK client
+		$(usex jack-sdk "-Dlibjack-path=${EPREFIX}/usr/$(get_libdir)" '')
 		-Dsupport=enabled # Miscellaneous/common plugins, such as null sink
 		-Devl=disabled # Matches upstream
 		-Dtest=disabled # fakesink and fakesource plugins
@@ -201,12 +206,14 @@ pkg_postinst() {
 		elog
 	fi
 
-	elog "JACK emulation is incomplete and not all programs will work. PipeWire's"
-	elog "alternative libraries have been installed to a non-default location."
-	elog "To use them, put pw-jack <application> before every JACK application."
-	elog "When using pw-jack, do not run jackd/jackdbus. However, a virtual/jack"
-	elog "provider is still needed to compile the JACK applications themselves."
-	elog
+	if ! use jack-sdk; then
+		elog "JACK emulation is incomplete and not all programs will work. PipeWire's"
+		elog "alternative libraries have been installed to a non-default location."
+		elog "To use them, put pw-jack <application> before every JACK application."
+		elog "When using pw-jack, do not run jackd/jackdbus. However, a virtual/jack"
+		elog "provider is still needed to compile the JACK applications themselves."
+		elog
+	fi
 
 	if use systemd; then
 		elog "Per Gentoo policy installed systemd units must be manually enabled:"