media-video/pipewire: add pipewire live ebuild

As this target is making fast progress, need to use the live ebuild for
some time. It start to be really useable as a daily driver to replace
pulseaudio

Package-Manager: Portage-3.0.14, Repoman-3.0.2
This commit is contained in:
Guillaume Castagnino 2021-02-08 09:03:46 +01:00
parent 853511251e
commit 2cb47e06d5
3 changed files with 152 additions and 0 deletions

View File

@ -0,0 +1,2 @@
EBUILD pipewire-9999.ebuild 3128 BLAKE2B 9964b44512714d523667f23f67eca313b3e8fdf5c0ccd09bf6bfd3319c9cbbdecba4f7bf25551c14cd59e1d440a9379643e2af920d228e3118469e81836b8afa SHA512 df50fc7968f8a9f64337ccaa5266148c0850d23db1bfa40d577f6463c66952dfcebbe3aa773ee47c526621db79599b30bc37b81e495cebe65b72a346f1731896
MISC metadata.xml 823 BLAKE2B e2bfad2125f6f580b7ab8ac0a47db10246e25ac5124a98b615aa874a9b941be646fceb17b1714497652e0db60b0d4329ba32c44396fec510d805ba2d2fd4895b SHA512 6a8d9f757a79f77dfa543fa17d054290e2fc95db19430d7ba8b3a7ea61ea32411f94bb2ee87f7e60ebd5b5ab06f437568939d9f9822a5fd1862e5086ef9d0fa0

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
<maintainer type="person">
<email>asturm@gentoo.org</email>
<name>Andreas Sturmlechner</name>
</maintainer>
<upstream>
<remote-id type="github">PipeWire/pipewire</remote-id>
</upstream>
<use>
<flag name="aptx">Enable SPA aptx plugin</flag>
<flag name="hsphfpd">Enable SPA hsphfpd plugin integration</flag>
<flag name="jack">Enable SPA JACK plugin and emulation to be able to run JACK applications on top of PipeWire</flag>
<flag name="rtkit">Enable rtkit daemon support</flag>
<flag name="vulkan">Enable vulkan spa plugin integration</flag>
</use>
</pkgmetadata>

View File

@ -0,0 +1,128 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit meson
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/PipeWire/pipewire.git"
inherit git-r3
else
SRC_URI="https://github.com/PipeWire/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
fi
DESCRIPTION="Multimedia processing graphs"
HOMEPAGE="https://pipewire.org/"
LICENSE="LGPL-2.1+"
SLOT="0/0.3"
IUSE="alsa aptx bluetooth debug doc ffmpeg gstreamer hsphfpd jack rtkit systemd test vulkan X"
BDEPEND="
app-doc/xmltoman
doc? (
app-doc/doxygen
media-gfx/graphviz
)
"
RDEPEND="
>=media-libs/alsa-lib-1.1.7
media-libs/libsdl2
>=media-libs/libsndfile-1.0.20
sys-apps/dbus
sys-auth/realtime-base
virtual/libudev
bluetooth? (
media-libs/sbc
net-wireless/bluez:=
aptx? ( media-libs/libopenaptx )
)
ffmpeg? ( media-video/ffmpeg:= )
gstreamer? (
>=dev-libs/glib-2.32.0:2
>=media-libs/gstreamer-1.10.0:1.0
media-libs/gst-plugins-base:1.0
)
hsphfpd? ( net-wireless/hsphfpd )
jack? ( >=media-sound/jack2-1.9.10:2 )
rtkit? ( sys-auth/rtkit )
systemd? ( sys-apps/systemd )
vulkan? ( media-libs/vulkan-loader )
X? ( x11-libs/libX11 )
"
DEPEND="${RDEPEND}
vulkan? ( dev-util/vulkan-headers )
"
DOCS=( {README,INSTALL}.md NEWS )
RESTRICT="!test? ( test )"
src_prepare() {
spa_use() {
if ! in_iuse ${1} || ! use ${1}; then
sed -e "/^add-spa-lib.*${1}/s/^/#${2-$1}-disabled-by-USE-no-${1}\:/" \
-e "/^load-module.*${1}/s/^/#${2-$1}-disabled-by-USE-no-${1}\:/" \
-i src/daemon/pipewire.conf.in || die
fi
}
default
spa_use libcamera
spa_use rtkit
spa_use bluetooth bluez5
spa_use jack
spa_use vulkan
}
src_configure() {
local emesonargs=(
-Dexamples=true # contains required pipewire-media-session
-Dman=true
-Dspa-plugins=true
--buildtype=$(usex debug debugoptimized plain)
# alsa plugin and jack emulation
-Dpipewire-alsa=true
$(meson_use jack pipewire-jack)
# spa-plugins
# we install alsa support unconditionally
$(meson_use bluetooth bluez5)
$(meson_use !hsphfpd bluez5-backend-hsp-native)
$(meson_use !hsphfpd bluez5-backend-hfp-native)
-Dbluez5-backend-ofono=false
$(meson_use hsphfpd bluez5-backend-hsphfpd)
$(meson_use ffmpeg)
$(meson_use jack)
$(meson_use vulkan)
# libcamera is not packaged
# misc
$(meson_use doc docs)
$(meson_use gstreamer)
$(meson_use gstreamer gstreamer-device-provider)
$(meson_use systemd)
$(meson_use test test)
$(meson_use test tests)
)
meson_src_configure
}
src_install() {
meson_src_install
dosym ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d/50-pipewire.conf
if use alsa; then
dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/99-pipewire-default.conf
fi
}
pkg_postinst() {
if use jack; then
elog "Please note that even though the libraries for JACK emulation have"
elog "been installed, this ebuild is not yet wired up to replace a JACK server."
elog
fi
elog "Read INSTALL.md for information about ALSA plugin or JACK emulation."
}