aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Nicolas <patricknicolas@laposte.net>2023-11-23 19:49:35 +0100
committerPatrick Nicolas <patricknicolas@laposte.net>2023-11-23 19:49:35 +0100
commit337f633cb79361d56f5ac81ad49ac0618151e0f6 (patch)
tree6fe59db1c1c9b45a11126eaee30e8f7f4908c05d /media-libs/wivrn
parentmedia-libs/openxr-loader: add 1.0.31, drop 1.0.20 (diff)
downloadguru-337f633cb79361d56f5ac81ad49ac0618151e0f6.tar.gz
guru-337f633cb79361d56f5ac81ad49ac0618151e0f6.tar.bz2
guru-337f633cb79361d56f5ac81ad49ac0618151e0f6.zip
media-libs/wivrn: new package, add 0.9.1, 9999
Signed-off-by: Patrick Nicolas <patricknicolas@laposte.net>
Diffstat (limited to 'media-libs/wivrn')
-rw-r--r--media-libs/wivrn/Manifest4
-rw-r--r--media-libs/wivrn/wivrn-0.9.1.ebuild80
-rw-r--r--media-libs/wivrn/wivrn-9999.ebuild80
3 files changed, 164 insertions, 0 deletions
diff --git a/media-libs/wivrn/Manifest b/media-libs/wivrn/Manifest
new file mode 100644
index 000000000..29b99e153
--- /dev/null
+++ b/media-libs/wivrn/Manifest
@@ -0,0 +1,4 @@
+DIST boostpfr_2.0.3.tar.gz 57376 BLAKE2B 447370c88a3241fcd91d5fb4c3ea8a6b5e54e11807f0b0458da8ba26a7a57d54402403d13c951ebdf3638386f01bd721fc50558477802a8aae3012ee6e88cba5 SHA512 ce7a7955066a678cfff3d65068830b60727dc6a0a1c3f29a1b1fcb50c79f718fb06d6767afb74f7e9ce00f33858cd10f627534f29f536e5504f034831c696ca0
+DIST monado-3ca1381be18e4cda516a2c7ac5778706aac89ce4.tar.gz 3216545 BLAKE2B 9d87979665c8a154a00d35a982c8b7245042044fb1c52a5383fff190c91e808fa4fb5942fc5de16954b67a4009dcce3cb2b2b3bfd67fe0c0e04ec193d64648b9 SHA512 fa9447cf43329ce46711fb80e84d3ec6b04bfe40b2eeb25cea4edd1930f97e55cb1c3b74c00bafc26e8e6f85d0477bf6d0409d4dec6bec62007a9e131541c1ba
+DIST wivrn-0.9.1-server-build-deps.tar.xz 15574764 BLAKE2B 1fa80fa057c73f8bfe31752f0f6e86e932f092fb5e73d94d58a0b327417f73d0299484dfba9d0b95c729228fee29b1fe7f66c0a836d33eede31fe1f39b49e7ae SHA512 66729f45e3650274ac2cf24e55e04d5ea77474f874fb0d4f1ad7561f6ee40d0abbef347904112c7fac22413e14b23788f207f0fbbd901a6f218b720e36cda6be
+DIST wivrn-0.9.1.tar.gz 398632 BLAKE2B 2c76dfc648a535e1c2d9edebbed6f514b1e3fc7510f5af1a988995fff737166034cbccc8d7c407f4f9a28b67bceee17acf3ccbb8991e6f48ec396219482a8815 SHA512 fe69f1473a8e8d5617a18d56ef63a1f11b7cf32e64268f43d6efebb00184cc28c94b251b8ecccc1f95f6064fa2152566a3a001665b82ee3b6479bd009d63aee3
diff --git a/media-libs/wivrn/wivrn-0.9.1.ebuild b/media-libs/wivrn/wivrn-0.9.1.ebuild
new file mode 100644
index 000000000..be97f65fe
--- /dev/null
+++ b/media-libs/wivrn/wivrn-0.9.1.ebuild
@@ -0,0 +1,80 @@
+EAPI=7
+
+DESCRIPTION="WiVRn OpenXR streaming"
+HOMEPAGE="https://github.com/meumeu/WiVRn"
+SLOT="0"
+
+IUSE="nvenc vaapi x264"
+
+inherit cmake
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Meumeu/WiVRn.git"
+
+ MONADO_V=3ca1381be18e4cda516a2c7ac5778706aac89ce4
+ PFR_V=2.0.3
+ 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="
+ nvenc? (
+ x11-drivers/nvidia-drivers
+ )
+ vaapi? (
+ media-video/ffmpeg[vulkan,vaapi]
+ )
+ x264? (
+ media-libs/x264
+ )
+ dev-libs/libbsd
+ media-libs/openxr-loader
+ net-dns/avahi
+ sys-apps/systemd
+"
+
+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
+ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
+ -DFETCHCONTENT_FULLY_DISCONNECTED=ON
+ -DFETCHCONTENT_BASE_DIR=${WORKDIR}
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ dosym /usr/share/openxr/1/openxr_wivrn.json /etc/openxr/1/active_runtime.json
+}
diff --git a/media-libs/wivrn/wivrn-9999.ebuild b/media-libs/wivrn/wivrn-9999.ebuild
new file mode 100644
index 000000000..be97f65fe
--- /dev/null
+++ b/media-libs/wivrn/wivrn-9999.ebuild
@@ -0,0 +1,80 @@
+EAPI=7
+
+DESCRIPTION="WiVRn OpenXR streaming"
+HOMEPAGE="https://github.com/meumeu/WiVRn"
+SLOT="0"
+
+IUSE="nvenc vaapi x264"
+
+inherit cmake
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Meumeu/WiVRn.git"
+
+ MONADO_V=3ca1381be18e4cda516a2c7ac5778706aac89ce4
+ PFR_V=2.0.3
+ 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="
+ nvenc? (
+ x11-drivers/nvidia-drivers
+ )
+ vaapi? (
+ media-video/ffmpeg[vulkan,vaapi]
+ )
+ x264? (
+ media-libs/x264
+ )
+ dev-libs/libbsd
+ media-libs/openxr-loader
+ net-dns/avahi
+ sys-apps/systemd
+"
+
+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
+ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
+ -DFETCHCONTENT_FULLY_DISCONNECTED=ON
+ -DFETCHCONTENT_BASE_DIR=${WORKDIR}
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ dosym /usr/share/openxr/1/openxr_wivrn.json /etc/openxr/1/active_runtime.json
+}