From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 53E5F13835B for ; Sat, 8 May 2021 18:27:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 92DF3E07A5; Sat, 8 May 2021 18:27:58 +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 68D23E07A5 for ; Sat, 8 May 2021 18:27:58 +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 5CF65340DB7 for ; Sat, 8 May 2021 18:27:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6E13A74A for ; Sat, 8 May 2021 18:27:54 +0000 (UTC) From: "Thomas Deutschmann" 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" Message-ID: <1620498463.e3978839cc6da41c74e9c65ced13fdf2b7c0f3db.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/ X-VCS-Repository: repo/gentoo X-VCS-Files: 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: e3978839cc6da41c74e9c65ced13fdf2b7c0f3db X-VCS-Branch: master Date: Sat, 8 May 2021 18:27:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 83a18ca0-34d7-4cc4-a361-9d564b2ceb2b X-Archives-Hash: 4517011c25bdeb29b4c1967d4872d81e commit: e3978839cc6da41c74e9c65ced13fdf2b7c0f3db Author: Thomas Deutschmann gentoo org> AuthorDate: Sat May 8 13:38:11 2021 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sat May 8 18:27:43 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3978839 media-video/pipewire: add multilib support Thanks to Niklāvs for the initial work! Thanks-to: Niklāvs Koļesņikovs <89q1r14hd relay.firefox.com> Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Thomas Deutschmann gentoo.org> media-video/pipewire/pipewire-9999.ebuild | 91 +++++++++++++++++++------------ 1 file changed, 56 insertions(+), 35 deletions(-) diff --git a/media-video/pipewire/pipewire-9999.ebuild b/media-video/pipewire/pipewire-9999.ebuild index 879b3968542..f15fbb4d5e3 100644 --- a/media-video/pipewire/pipewire-9999.ebuild +++ b/media-video/pipewire/pipewire-9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit meson optfeature udev +inherit meson optfeature udev multilib-minimal if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git" @@ -43,9 +43,10 @@ BDEPEND=" " RDEPEND=" media-libs/alsa-lib - sys-apps/dbus + sys-apps/dbus[${MULTILIB_USEDEP}] sys-libs/ncurses[unicode] - virtual/libudev + virtual/libintl[${MULTILIB_USEDEP}] + virtual/libudev[${MULTILIB_USEDEP}] bluetooth? ( aac? ( media-libs/fdk-aac ) aptx? ( media-libs/libopenaptx ) @@ -67,13 +68,13 @@ RDEPEND=" !media-sound/jack2 ) pipewire-alsa? ( - >=media-libs/alsa-lib-1.1.7 + >=media-libs/alsa-lib-1.1.7[${MULTILIB_USEDEP}] || ( media-plugins/alsa-plugins[-pulseaudio] !media-plugins/alsa-plugins ) ) - !pipewire-alsa? ( media-plugins/alsa-plugins[pulseaudio] ) + !pipewire-alsa? ( media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio] ) systemd? ( sys-apps/systemd ) v4l? ( media-libs/libv4l ) " @@ -102,6 +103,18 @@ PATCHES=( # with changes as necessary. limitsdfile=40-${PN}.conf +meson_native_enabled() { + if multilib_is_native_abi; then + echo "-D${1}=enabled" + else + echo "-D${1}=disabled" + fi +} + +meson_native_feature() { + multilib_native_usex "${1}" "-D${2-${1}}=enabled" "-D${2-${1}}=disabled" +} + src_prepare() { default @@ -112,72 +125,80 @@ src_prepare() { fi } -src_configure() { +multilib_src_configure() { local emesonargs=( -Ddocdir="${EPREFIX}"/usr/share/doc/${PF} - $(meson_feature doc docs) - -Dexamples=enabled # Disabling this implicitly disables -Dmedia-session (not good) - -Dmedia-session=enabled - -Dman=enabled + $(meson_native_feature doc docs) + $(meson_native_enabled examples) # Disabling this implicitly disables -Dmedia-session + $(meson_native_enabled media-session) + $(meson_native_enabled man) $(meson_feature test tests) -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests - $(meson_feature gstreamer) - $(meson_feature gstreamer gstreamer-device-provider) - $(meson_feature systemd) # Also covers logind integration + $(meson_native_feature gstreamer) + $(meson_native_feature gstreamer gstreamer-device-provider) + $(meson_native_feature systemd) -Dsystemd-system-service=disabled # Matches upstream - $(meson_feature systemd systemd-user-service) + $(meson_native_feature systemd systemd-user-service) $(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph -Dspa-plugins=enabled -Dalsa=enabled # Allows using kernel ALSA for sound I/O (-Dmedia-session depends on this) -Daudiomixer=enabled # Matches upstream -Daudioconvert=enabled # Matches upstream - $(meson_feature bluetooth bluez5) - $(meson_feature bluetooth bluez5-backend-hsp-native) - $(meson_feature bluetooth bluez5-backend-hfp-native) - $(meson_feature bluetooth bluez5-backend-ofono) - $(meson_feature bluetooth bluez5-backend-hsphfpd) - $(meson_feature aac bluez5-codec-aac) - $(meson_feature aptx bluez5-codec-aptx) - $(meson_feature ldac bluez5-codec-ldac) + $(meson_native_feature bluetooth bluez5) + $(meson_native_feature bluetooth bluez5-backend-hsp-native) + $(meson_native_feature bluetooth bluez5-backend-hfp-native) + $(meson_native_feature bluetooth bluez5-backend-ofono) + $(meson_native_feature bluetooth bluez5-backend-hsphfpd) + $(meson_native_feature aac bluez5-codec-aac) + $(meson_native_feature aptx bluez5-codec-aptx) + $(meson_native_feature ldac bluez5-codec-ldac) -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 + $(meson_native_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 - $(meson_feature v4l v4l2) + $(meson_native_feature v4l v4l2) -Dlibcamera=disabled # libcamera is not in Portage tree -Dvideoconvert=enabled # Matches upstream -Dvideotestsrc=enabled # Matches upstream -Dvolume=enabled # Matches upstream -Dvulkan=disabled # Uses pre-compiled Vulkan compute shader to provide a CGI video source (dev thing; disabled by upstream) - $(meson_feature extra pw-cat) + $(meson_native_feature extra pw-cat) -Dudev=enabled -Dudevrulesdir="$(get_udevdir)/rules.d" -Dsdl2=disabled # Controls SDL2 dependent code (currently only examples when -Dinstalled_tests=enabled which we never install) - $(meson_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat) + $(meson_native_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat) ) + meson_src_configure } -src_compile() { +multilib_src_compile() { meson_src_compile - einfo "Generating ${limitsdfile}" - cat > ${limitsdfile} <<- EOF || die - # Start of ${limitsdfile} from ${P} + if multilib_is_native_abi; then + einfo "Generating ${limitsdfile}" + cat > ${limitsdfile} <<- EOF || die + # Start of ${limitsdfile} from ${P} + + 1000:60000 - memlock 256 - 1000:60000 - memlock 256 + # End of ${limitsdfile} from ${P} + EOF + fi +} - # End of ${limitsdfile} from ${P} - EOF +multilib_src_install() { + # Our customs DOCS do not exist in multilib source directory + DOCS= meson_src_install } -src_install() { - meson_src_install +multilib_src_install_all() { + einstalldocs insinto /etc/security/limits.d doins ${limitsdfile}