commit:     153b8eba20c1894975bbcde1ecd9919820facc5b
Author:     Patrick Nicolas <patricknicolas <AT> laposte <DOT> net>
AuthorDate: Mon Oct 14 21:22:42 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Mon Oct 14 21:22:42 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=153b8eba

media-libs/wivrn: add 0.20, drop 0.18

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

 media-libs/wivrn/Manifest                          |  4 +-
 .../wivrn/{wivrn-0.18.ebuild => wivrn-0.20.ebuild} | 44 ++++++++++++++--------
 2 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/media-libs/wivrn/Manifest b/media-libs/wivrn/Manifest
index c596a50aa..ed35a8c2c 100644
--- a/media-libs/wivrn/Manifest
+++ b/media-libs/wivrn/Manifest
@@ -1,4 +1,4 @@
-DIST wivrn-0.18-server-build-deps.tar.xz 18478712 BLAKE2B 
04f60048fc64194786602f27d3abe4587bf962356d44b66c3a40bc9f597ef974d6ab8937e5959ca76160df300b9a40807fd3fd0ce542fe42203e31048ef212ed
 SHA512 
e86e4e626f895b66facf99127023a911552799f66cc6ea7df67d583e3af0ff5b052d7f2565c1bc510dff3ddfe77b7f8cb0341b908436aa37bf841cb54788b9d5
-DIST wivrn-0.18.tar.gz 11238428 BLAKE2B 
3b44679d8f3c34906ba39e27aff09c8cdb1e8fa1240c9e07a96782971b5f7b54181fb9e4544729b5abd41603d17f1c834ab4d697d9c6ad78c69ad57b34b817cc
 SHA512 
7e65edf3968c4142bae294ec62950a8bfde86da0797078f716de3b9a57f032b7a74293d18e0ecbbe2fcd11da45968a6c07ebbaefea9106b5e11bb17024181852
 DIST wivrn-0.19-server-build-deps.tar.xz 21027752 BLAKE2B 
8de78f1f356747e7ffa64a14c1d4d3888f9df658ddb1bc5556788873dfcae48612a586bc176f20c54466ad8895bddfac05423195d8f1d070a8a12178eaf9340a
 SHA512 
4c75aa3b1b64df1ea2e1cd258c5ad602230c1a4cc3dbbbbd3c6e41ae562719996e983fd2f95c1da0a8d4f53017cf108cebd6177e7439ac1bc050a10c7339480b
 DIST wivrn-0.19.tar.gz 11281543 BLAKE2B 
cc182cacdc35eccdd815730bbecfa007c0a096690b06a773b9da570115c693e6a2e1266e5ad30d9ce34db2640e3f251e630a825f4cf2f5f14ef51dfbf784b99e
 SHA512 
47d985156e234702d5a55febfa8e3d62154db77db40da9b1d2c7e63e649b2c9550f0b40a68610b597bcf6f2f0f32ebaf1a9dd474509f3e376e60fe669cc1a630
+DIST wivrn-0.20-server-build-deps.tar.xz 21140156 BLAKE2B 
17836be45393a0fbd3f45d8654e88ce677a94c7f641f4662c6bcfd47fb70d87394a05544995d79e9203294c0c83d95a221af6b5d73e7cf078e7db9aa7f8f1f67
 SHA512 
a86d9d74afd316a4740b80302dbae63ec13609abd4c33a0b97bdbfbeb6caa36035a5f1b60245c8bec5ab460c7486089efa6eae4b8a0a8121b6d33a4ee9a46417
+DIST wivrn-0.20.tar.gz 11433225 BLAKE2B 
15c00dcd23bf9751d7b119a301298a5487128b6c06b91fd7ed3787b4ac9375d0a822036d76e0e9fe113700524bf0fa27459bfc8173f02eb893233f5fac566d59
 SHA512 
d83be879d31740e2ce382ee9ed095a6299ed6a435a5ef1cffa88aca9af0bb5d242374a90bcf0ff936611454950566da4e3aaa216085259d8301d9122b0159af9

diff --git a/media-libs/wivrn/wivrn-0.18.ebuild 
b/media-libs/wivrn/wivrn-0.20.ebuild
similarity index 72%
rename from media-libs/wivrn/wivrn-0.18.ebuild
rename to media-libs/wivrn/wivrn-0.20.ebuild
index 15d153a54..79b65c4cb 100644
--- a/media-libs/wivrn/wivrn-0.18.ebuild
+++ b/media-libs/wivrn/wivrn-0.20.ebuild
@@ -1,27 +1,22 @@
 # Copyright 2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-inherit cmake
+inherit cmake fcaps xdg
 
 DESCRIPTION="WiVRn OpenXR streaming"
 HOMEPAGE="https://github.com/WiVRn/WiVRn";
 
 LICENSE="GPL-3 Apache-2.0 MIT"
 SLOT="0"
-IUSE="nvenc +pipewire pulseaudio systemd vaapi wireshark-plugins x264"
+IUSE="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_V=dfc602288ab05131584a3f2be18031a13fccd061
-       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.bz2";
+       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
@@ -51,13 +46,18 @@ RDEPEND="
        wireshark-plugins? (
                net-analyzer/wireshark
        )
+       gui? (
+               dev-qt/qtbase:6
+       )
 "
-
-BDEPEND="
+DEPEND="
        ${RDEPEND}
        dev-cpp/cli11
        dev-cpp/eigen
        dev-cpp/nlohmann_json
+       dev-libs/boost
+"
+BDEPEND="
        dev-util/glslang
 "
 
@@ -65,9 +65,16 @@ 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"
+
+               local MONADO_COMMIT=$(grep "GIT_TAG" "${P}/CMakeLists.txt" | 
awk '{print $2}')
+               git-r3_fetch "${MONADO_REPO_URI}" "${MONADO_COMIT}"
+               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() {
@@ -79,7 +86,7 @@ fi
 
 src_configure() {
        if [[ ${PV} == 9999 ]]; then
-               GIT_DESC=$(git describe)
+               GIT_DESC=$(git describe --always)
        else
                GIT_DESC=${PV}
        fi
@@ -87,6 +94,7 @@ src_configure() {
                -DGIT_DESC=${GIT_DESC}
                -DWIVRN_BUILD_CLIENT=OFF
                -DWIVRN_BUILD_SERVER=ON
+               -DWIVRN_BUILD_DASHBOARD=$(usex gui)
                -DWIVRN_BUILD_DISSECTOR=$(usex wireshark-plugins)
                -DWIVRN_USE_PIPEWIRE=$(usex pipewire)
                -DWIVRN_USE_PULSEAUDIO=$(usex pulseaudio)
@@ -94,6 +102,8 @@ src_configure() {
                -DWIVRN_USE_VAAPI=$(usex vaapi)
                -DWIVRN_USE_X264=$(usex x264)
                -DWIVRN_USE_SYSTEMD=$(usex systemd)
+               -DWIVRN_USE_SYSTEM_OPENXR=ON
+               -DWIVRN_USE_SYSTEM_BOOST=ON
                -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
                -DFETCHCONTENT_FULLY_DISCONNECTED=ON
                -DFETCHCONTENT_BASE_DIR="${WORKDIR}"
@@ -106,11 +116,13 @@ src_configure() {
 src_install() {
        cmake_src_install
 
-       dosym /usr/share/openxr/1/openxr_wivrn.json 
/etc/openxr/1/active_runtime.json
+       dosym -r /usr/share/openxr/1/openxr_wivrn.json 
/etc/openxr/1/active_runtime.json
 }
 
 pkg_postinst()
 {
+       fcaps cap_sys_nice 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";

Reply via email to