commit:     1f119b09659de1d69966a9b602a37bf871e113a9
Author:     Patrick Nicolas <patricknicolas <AT> laposte <DOT> net>
AuthorDate: Sun Aug 10 09:52:33 2025 +0000
Commit:     Patrick Nicolas <patricknicolas <AT> laposte <DOT> net>
CommitDate: Sun Aug 10 09:52:41 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1f119b09

media-libs/wivrn: add 25.8

Signed-off-by: Patrick Nicolas <patricknicolas <AT> laposte.net>

 media-libs/wivrn/Manifest          |   2 +
 media-libs/wivrn/wivrn-25.8.ebuild | 166 +++++++++++++++++++++++++++++++++++++
 2 files changed, 168 insertions(+)

diff --git a/media-libs/wivrn/Manifest b/media-libs/wivrn/Manifest
index 339e0ab663..0843994109 100644
--- a/media-libs/wivrn/Manifest
+++ b/media-libs/wivrn/Manifest
@@ -2,3 +2,5 @@ DIST wivrn-0.25-server-build-deps.tar.xz 22247744 BLAKE2B 
d11282538d68a9f4d4eb1a
 DIST wivrn-0.25.tar.gz 11322202 BLAKE2B 
9409ef567fd6ae973313c5164d4dd043a65c7171d066105a81a19cb856104c28890a083ff4cb028f7debe05841097ea624ed93c866db35c093036cfe22d46e45
 SHA512 
c5904b9b0888d9795b1f26836c7047daa4ec43ec0729d11549b5b996976dce9818f2e28030d9a21584aedb989bb5817dbbbb54aa41e4c4d4d1778a851032b1bc
 DIST wivrn-25.6.1-server-build-deps.tar.xz 22193276 BLAKE2B 
0767414c83f04f6e32d0491d5163f8a37b713363e4f16695ad7aa2fd2a62a722a245b0a6827eec2653331450d69bad738515f4285ea3e8b3e8097bbc2acf897d
 SHA512 
eb212ff9d08e1ee196606be66885b5af78650cc2b4d06fbaeac9a60f94417b3389bbe75cdde09a7c7fe47327a56ca63cae61e9737a014f22ee8e527f6c9979f4
 DIST wivrn-25.6.1.tar.gz 11323454 BLAKE2B 
9c2130656c76bf5b01be9f373d490fd595bba83debd15066360ef41e094ad16733b1d160ce239288e19c0d103800ff1d138b2a46eba9115d1d6db903064dcab3
 SHA512 
ad37cc2f9eeb4801bd310dee11ed68348e812bbe5f47903789ab8bf7860e779a8d35bcb1ef6f4c5738fc74c4983fe0078cec0a54966b2da52703f23b6785f783
+DIST wivrn-25.8-server-build-deps.tar.xz 22876608 BLAKE2B 
e54f1da83bd9cc1a470893748663c63523ec283b4f3c69eec5aaf7dbe382118923198a70e6caa4abddc4ffbe4c538347c9483e3af154031950273f1d00920f3d
 SHA512 
a702ec6850c392fa6353522ff27edb12fcb9017424cbf9560a64e47f9b1dd22878b4f4ffb96eb14a1b0a8de4f24801caf94aaaf592f1b095d63269db8ad8b2d0
+DIST wivrn-25.8.tar.gz 11441756 BLAKE2B 
1cb44f774afc744e279e23561c4b4deddaaf18e63e1c119703f9a1eb1a9b63cb36225bbbe3b73f6bc2ac4c21cf0c03928da81ea7e6b6b3217958549ca920d8f5
 SHA512 
be6f260e2ccbcc276f4656a2d3a7797384d4cd293a4bd9bb9aa035eaf2e059fd2c4d9d896f9841b904cf3cf3a27ea36b8a01c7f400a20fd0a0332db0c51c53e9

diff --git a/media-libs/wivrn/wivrn-25.8.ebuild 
b/media-libs/wivrn/wivrn-25.8.ebuild
new file mode 100644
index 0000000000..33383582f2
--- /dev/null
+++ b/media-libs/wivrn/wivrn-25.8.ebuild
@@ -0,0 +1,166 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib fcaps flag-o-matic xdg
+
+DESCRIPTION="WiVRn OpenXR streaming"
+HOMEPAGE="https://github.com/WiVRn/WiVRn";
+
+LICENSE="GPL-3 Apache-2.0 MIT"
+SLOT="0"
+IUSE="debug gui 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/WiVRn/WiVRn.git";
+       MONADO_REPO_URI="https://gitlab.freedesktop.org/monado/monado.git";
+else
+       SRC_URI="
+               https://github.com/WiVRn/WiVRn/archive/refs/tags/v${PV}.tar.gz 
-> ${P}.tar.gz
+               
https://github.com/WiVRn/WiVRn/releases/download/v${PV}/server-build-deps.tar.xz
 -> ${P}-server-build-deps.tar.xz"
+       KEYWORDS="~amd64"
+fi
+
+RDEPEND="
+       app-arch/libarchive
+       dev-libs/glib
+       dev-libs/libbsd
+       dev-libs/openssl
+       gnome-base/librsvg
+       media-libs/libpng
+       media-libs/openxr-loader
+       net-dns/avahi
+       x11-libs/libnotify
+       || (
+               sys-apps/systemd
+               sys-auth/elogind
+       )
+       gui? (
+               dev-libs/qcoro[qml]
+               kde-frameworks/kcoreaddons:6
+               kde-frameworks/ki18n:6
+               kde-frameworks/kiconthemes:6
+               kde-frameworks/kirigami:6
+               kde-frameworks/qqc2-desktop-style:6
+       )
+       pipewire? (
+               media-video/pipewire
+       )
+       pulseaudio? (
+               media-libs/libpulse
+       )
+       systemd? (
+               sys-apps/systemd
+       )
+       vaapi? ( || (
+               media-video/ffmpeg[libdrm(-),vaapi]
+               media-video/ffmpeg[drm(-),vaapi]
+       ) )
+       wireshark-plugins? (
+               net-analyzer/wireshark
+       )
+       x264? (
+               media-libs/x264
+       )
+"
+DEPEND="
+       ${RDEPEND}
+       dev-libs/boost
+"
+BDEPEND="
+       dev-cpp/cli11
+       dev-cpp/eigen
+       dev-cpp/nlohmann_json
+       dev-util/glslang
+       dev-util/gdbus-codegen
+       dev-util/vulkan-headers
+"
+
+if [[ ${PV} == 9999 ]]; then
+       src_unpack() {
+               git-r3_src_unpack
+               default_src_unpack
+
+               local MONADO_COMMIT=$(cat "${P}/monado-rev")
+               git-r3_fetch "${MONADO_REPO_URI}" "${MONADO_COMMIT}"
+               git-r3_checkout "${MONADO_REPO_URI}" "${WORKDIR}/monado-src"
+       }
+
+       src_prepare() {
+               default_src_prepare
+               eapply --directory="${WORKDIR}/monado-src" 
"${WORKDIR}/${P}/patches/monado"/*
+               cmake_src_prepare
+       }
+else
+       src_unpack() {
+               default_src_unpack
+               cd "${WORKDIR}"
+               mv "WiVRn-${PV}" "${P}"
+       }
+fi
+
+multilib_src_configure() {
+       use debug || append-cflags "-DNDEBUG"
+       use debug || append-cxxflags "-DNDEBUG"
+       if [[ ${PV} == 9999 ]]; then
+               GIT_DESC=$(git describe --tags --always)
+               GIT_COMMIT=$(git rev-parse HEAD)
+       else
+               GIT_DESC=v${PV}
+               GIT_COMMIT=v${PV}
+       fi
+       local mycmakeargs=(
+               -DGIT_DESC=${GIT_DESC}
+               -DGIT_COMMIT=${GIT_COMMIT}
+               -DWIVRN_BUILD_CLIENT=OFF
+               -DWIVRN_BUILD_SERVER=$(multilib_is_native_abi && echo ON || 
echo OFF)
+               -DWIVRN_BUILD_SERVER_LIBRARY=ON
+               -DWIVRN_OPENXR_MANIFEST_TYPE=filename
+               -DWIVRN_BUILD_DASHBOARD=$(multilib_native_usex gui)
+               -DWIVRN_BUILD_DISSECTOR=$(multilib_native_usex 
wireshark-plugins)
+               -DWIVRN_BUILD_WIVRNCTL=ON
+               -DWIVRN_FEATURE_STEAMVR_LIGHTHOUSE=ON
+               -DWIVRN_USE_PIPEWIRE=$(multilib_native_usex pipewire)
+               -DWIVRN_USE_PULSEAUDIO=$(multilib_native_usex pulseaudio)
+               -DWIVRN_USE_NVENC=$(multilib_native_usex nvenc)
+               -DWIVRN_USE_VAAPI=$(multilib_native_usex vaapi)
+               -DWIVRN_USE_VULKAN_ENCODE=ON
+               -DWIVRN_USE_X264=$(multilib_native_usex x264)
+               -DWIVRN_USE_SYSTEMD=$(multilib_native_usex systemd)
+               -DWIVRN_USE_SYSTEM_OPENXR=ON
+               -DWIVRN_USE_SYSTEM_BOOST=ON
+               -DFETCHCONTENT_FULLY_DISCONNECTED=ON
+               -DFETCHCONTENT_BASE_DIR="${WORKDIR}"
+               -DENABLE_COLOURED_OUTPUT=OFF
+       )
+
+       cmake_src_configure
+}
+
+multilib_src_install() {
+       cmake_src_install
+
+       local i ldpath=""
+       for i in $(get_all_libdirs) ; do
+               ldpath="${ldpath}:/usr/${i}/wivrn"
+       done
+       newenvd - "50${PN}" <<-_EOF_
+               LDPATH="${ldpath}"
+               PRESSURE_VESSEL_IMPORT_OPENXR_1_RUNTIMES=1
+       _EOF_
+ }
+
+pkg_postinst()
+{
+       fcaps cap_sys_nice usr/bin/wivrn-server
+       xdg_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/WiVRn/WiVRn/actions/workflows/Build.yml";
+       else
+               elog "For most headsets it can be downloaded on 
https://github.com/WiVRn/WiVRn/releases/tag/v${PV}";
+       fi
+}

Reply via email to