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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9E54F1581C1 for ; Mon, 15 Jul 2024 19:27:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E5B952BC02E; Mon, 15 Jul 2024 19:27:38 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C78FE2BC02E for ; Mon, 15 Jul 2024 19:27:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E22B7340C7F for ; Mon, 15 Jul 2024 19:27:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 83BF61E1B for ; Mon, 15 Jul 2024 19:27:36 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1720988257.0d32520479b474ddc597a400163d4d682e2f724e.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: media-libs/wivrn/ X-VCS-Repository: repo/proj/guru X-VCS-Files: media-libs/wivrn/wivrn-0.17.ebuild X-VCS-Directories: media-libs/wivrn/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: 0d32520479b474ddc597a400163d4d682e2f724e X-VCS-Branch: master Date: Mon, 15 Jul 2024 19:27:36 +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: 847d4aaf-22b0-45fd-a1b3-2d0f00e2c7db X-Archives-Hash: 5f8609e2389bed8515588e034eae1619 commit: 0d32520479b474ddc597a400163d4d682e2f724e Author: Patrick Nicolas laposte net> AuthorDate: Sun Jul 14 20:17:37 2024 +0000 Commit: Andrew Ammerlaan gentoo org> CommitDate: Sun Jul 14 20:17:37 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0d325204 media-libs/wivrn: add 0.17 Signed-off-by: Patrick Nicolas laposte.net> media-libs/wivrn/wivrn-0.17.ebuild | 120 +++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) diff --git a/media-libs/wivrn/wivrn-0.17.ebuild b/media-libs/wivrn/wivrn-0.17.ebuild new file mode 100644 index 000000000..9d5d5e81e --- /dev/null +++ b/media-libs/wivrn/wivrn-0.17.ebuild @@ -0,0 +1,120 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="WiVRn OpenXR streaming" +HOMEPAGE="https://github.com/meumeu/WiVRn" + +LICENSE="GPL-3 Apache-2.0 MIT" +SLOT="0" +IUSE="nvenc +pipewire pulseaudio systemd vaapi wireshark-plugins x264" +REQUIRED_USE="|| ( nvenc vaapi x264 )" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/Meumeu/WiVRn.git" + + MONADO_V=598080453545c6bf313829e5780ffb7dde9b79dc + PFR_V=2.2.0 + SRC_URI=" + https://github.com/boostorg/pfr/archive/refs/tags/${PFR_V}.tar.gz -> boostpfr_${PFR_V}.tar.gz + https://gitlab.freedesktop.org/monado/monado/-/archive/${MONADO_V}/monado-${MONADO_V}.tar.gz" +else + SRC_URI=" + https://github.com/Meumeu/WiVRn/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/Meumeu/WiVRn/releases/download/v${PV}/server-build-deps.tar.xz -> ${P}-server-build-deps.tar.xz" + KEYWORDS="~amd64" +fi + +RDEPEND=" + vaapi? ( + media-video/ffmpeg[libdrm,vaapi] + ) + x264? ( + media-libs/x264 + ) + dev-libs/libbsd + pipewire? ( + media-video/pipewire + ) + pulseaudio? ( + media-libs/libpulse + ) + media-libs/openxr-loader + net-dns/avahi + systemd? ( + sys-apps/systemd + ) + wireshark-plugins? ( + net-analyzer/wireshark + ) +" + +BDEPEND=" + ${RDEPEND} + dev-cpp/cli11 + dev-cpp/eigen + dev-cpp/nlohmann_json + dev-util/glslang +" + +if [[ ${PV} == 9999 ]]; then + src_unpack() { + git-r3_src_unpack + default_src_unpack + cd "${WORKDIR}" + mv "monado-${MONADO_V}" "monado-src" + mv "pfr-${PFR_V}" "boostpfr-src" + } +else + src_unpack() { + default_src_unpack + cd "${WORKDIR}" + mv "WiVRn-${PV}" "${P}" + } +fi + +src_configure() { + if [[ ${PV} == 9999 ]]; then + GIT_DESC=$(git describe) + else + GIT_DESC=${PV} + fi + local mycmakeargs=( + -DGIT_DESC=${GIT_DESC} + -DWIVRN_BUILD_CLIENT=OFF + -DWIVRN_BUILD_SERVER=ON + -DWIVRN_BUILD_DISSECTOR=$(usex wireshark-plugins) + -DWIVRN_USE_PIPEWIRE=$(usex pipewire) + -DWIVRN_USE_PULSEAUDIO=$(usex pulseaudio) + -DWIVRN_USE_NVENC=$(usex nvenc) + -DWIVRN_USE_VAAPI=$(usex vaapi) + -DWIVRN_USE_X264=$(usex x264) + -DWIVRN_USE_SYSTEMD=$(usex systemd) + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + -DFETCHCONTENT_BASE_DIR="${WORKDIR}" + -DENABLE_COLOURED_OUTPUT=OFF + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + dosym /usr/share/openxr/1/openxr_wivrn.json /etc/openxr/1/active_runtime.json +} + +pkg_postinst() +{ + elog "WiVRn requires a compatible client on VR headset to run." + if [[ ${PV} == 9999 ]]; then + elog "For most headsets it can be downloaded from CI artifacts on https://github.com/Meumeu/WiVRn/actions/workflows/Build.yml" + else + elog "For most headsets it can be downloaded on https://github.com/Meumeu/WiVRn/releases/tag/v${PV}" + fi +}