Files
WiVRn/flatpak/io.github.wivrn.wivrn.yml.in

452 lines
17 KiB
Plaintext

# kate: syntax yaml
id: io.github.wivrn.wivrn
runtime: org.kde.Platform
runtime-version: '6.11'
sdk: org.kde.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
- org.freedesktop.Sdk.Extension.llvm20
command: wivrn-dashboard
separate-locales: false
finish-args:
# X11 + XShm access
- --share=ipc
- --socket=fallback-x11
# Wayland access
- --socket=wayland
# GPU acceleration
- --device=dri
# Needs to talk to the network
- --share=network
# Announce WiVRn via avahi
- --system-talk-name=org.freedesktop.Avahi
# Allow getting the pretty hostname
- --system-talk-name=org.freedesktop.hostname1
# List applications from $XDG_DATA_DIRS
- --filesystem=host-os:ro
- --filesystem=xdg-data/applications:ro
# List Steam games
- --filesystem=xdg-data/Steam:ro
- --filesystem=~/.steam:ro
- --filesystem=~/.var/app/com.valvesoftware.Steam:ro
# Pipewire
- --filesystem=xdg-run/pipewire-0
# Set the active OpenXR / OpenVR runtime
- --filesystem=xdg-config/openxr:create
- --filesystem=xdg-config/openvr:create
# Access to SlimeVR IPC sockets
- --filesystem=xdg-run/SlimeVRInput
- --filesystem=xdg-run/SlimeVRRpc
- --filesystem=xdg-run/.flatpak/dev.slimevr.SlimeVR
- --filesystem=xdg-data/dev.slimevr.SlimeVR
# Let outside application access the WiVRn socket
- --filesystem=xdg-run/wivrn:create
- --own-name=io.github.wivrn.Server
# Check firewall configuration
- --filesystem=host-etc
- --system-talk-name=org.fedoraproject.FirewallD1
- --system-talk-name=org.fedoraproject.FirewallD1.config
# QSystemTrayIcon
- --talk-name=org.kde.StatusNotifierWatcher
# Run processes outside of sandbox
- --talk-name=org.freedesktop.Flatpak
# Inhibit sleeping while a session is active
- --system-talk-name=org.freedesktop.login1
cleanup:
- /lib/pkgconfig
- /share/pkgconfig
- /include
- /share/man
- /share/cmake
- /share/gir-1.0
- /lib/girepository-1.0
- /lib/systemd
- '*.a'
- '*.la'
- '*.cmake'
# Sources are sha256-pinned archives, not git, so flatpak-builder reuses
# downloads and unchanged module builds from .flatpak-builder. CI caches that
# directory plus the monado archive, keyed on this file, ct-ng configs and monado-rev.
modules:
- name: crosstool
buildsystem: autotools
sources:
- type: archive
url: https://github.com/crosstool-ng/crosstool-ng/archive/620b909cd0713f68084378b63cf61b5232757b90.tar.gz
sha256: d109c9315c0ae0cbb7622d540b1f395b663243371413bbecba03e800c5caa18b
- type: shell
commands:
# Make the build lighter:
# don't generate debug symbols at all
- sed -i 's/-O2 -g/-O2/' scripts/crosstool-NG.sh
- sed -i 's/-g -O2/-O2/' scripts/build/cc/gcc.sh
# Delete extracted sources when no longer needed
- sed -i '/# Cleanup/a rm -r "$(readlink "${kernel_path}")"' scripts/build/kernel/linux.sh
# Delete tarballs once extracted
- sed -i '2228i CT_DoExecLog FILE rm "$(readlink -f "${file}")"' scripts/functions
# Delete big test files
- sed -i '/CT_ExtractPatch GCC/a CT_Pushd "${CT_SRC_DIR}/gcc/gcc/testsuite/";CT_DoExecLog ALL rm -rf $(ls -1 | grep -v selftests);CT_Popd' scripts/build/cc/gcc.sh
cleanup:
- '*'
- name: rsync
buildsystem: autotools
config-opts:
- --disable-md2man
sources:
- type: archive
url: https://github.com/RsyncProject/rsync/releases/download/v3.4.1/rsync-3.4.1.tar.gz
mirror-urls:
- https://download.samba.org/pub/rsync/src/rsync-3.4.1.tar.gz
sha256: 2924bcb3a1ed8b551fc101f740b9f0fe0a202b115027647cf69850d65fd88c52
cleanup:
- '*'
- name: toolchain
sources:
# mirror-urls are fallbacks, used when the primary url fails.
- type: file
url: https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.177.tar.xz
mirror-urls:
- https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.15.177.tar.xz
sha256: ea9eb8088d4231f8a01b191ceef5f4d92238f6c7519f6fbcb57e448ee9e0a6e0
- type: file
url: https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.xz
sha256: 38ef96b8dfe510d42707d9c781877914792541133e1870841463bfa73f883e32
- type: file
url: https://github.com/facebook/zstd/releases/download/v1.5.6/zstd-1.5.6.tar.gz
sha256: 8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1
- type: file
url: https://ftpmirror.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz
mirror-urls:
- https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz
- https://mirrors.kernel.org/gnu/gmp/gmp-6.3.0.tar.xz
sha256: a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898
- type: file
url: https://www.mpfr.org/mpfr-4.2.1/mpfr-4.2.1.tar.xz
mirror-urls:
- https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.1.tar.xz
- https://mirrors.kernel.org/gnu/mpfr/mpfr-4.2.1.tar.xz
sha256: 277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2
- type: file
dest-filename: isl-0.26.tar.xz
url: https://sourceforge.net/projects/libisl/files/isl-0.26.tar.xz/download
mirror-urls:
- https://libisl.sourceforge.io/isl-0.26.tar.xz
sha256: a0b5cb06d24f9fa9e77b55fabbe9a3c94a336190345c2555f9915bb38e976504
- type: file
url: https://ftpmirror.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz
mirror-urls:
- https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz
- https://mirrors.kernel.org/gnu/mpc/mpc-1.3.1.tar.gz
sha256: ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8
- type: file
url: https://invisible-mirror.net/archives/ncurses/ncurses-6.4.tar.gz
mirror-urls:
- https://ftp.gnu.org/gnu/ncurses/ncurses-6.4.tar.gz
- https://mirrors.kernel.org/gnu/ncurses/ncurses-6.4.tar.gz
sha256: 6931283d9ac87c5073f30b6290c4c75f21632bb4fc3603ac8100812bed248159
- type: file
url: https://ftpmirror.gnu.org/gnu/libiconv/libiconv-1.16.tar.gz
mirror-urls:
- https://ftp.gnu.org/gnu/libiconv/libiconv-1.16.tar.gz
- https://mirrors.kernel.org/gnu/libiconv/libiconv-1.16.tar.gz
sha256: e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
- type: file
url: https://ftpmirror.gnu.org/gnu/gettext/gettext-0.23.1.tar.xz
mirror-urls:
- https://ftp.gnu.org/gnu/gettext/gettext-0.23.1.tar.xz
- https://mirrors.kernel.org/gnu/gettext/gettext-0.23.1.tar.xz
sha256: c1f97a72a7385b7e71dd07b5fea6cdaf12c9b88b564976b23bd8c11857af2970
- type: file
url: https://ftpmirror.gnu.org/gnu/binutils/binutils-2.43.1.tar.xz
mirror-urls:
- https://ftp.gnu.org/gnu/binutils/binutils-2.43.1.tar.xz
- https://mirrors.kernel.org/gnu/binutils/binutils-2.43.1.tar.xz
sha256: 13f74202a3c4c51118b797a39ea4200d3f6cfbe224da6d1d95bb938480132dfd
- type: file
url: https://ftpmirror.gnu.org/gnu/gcc/gcc-11.5.0/gcc-11.5.0.tar.xz
mirror-urls:
- https://ftp.gnu.org/gnu/gcc/gcc-11.5.0/gcc-11.5.0.tar.xz
- https://mirrors.kernel.org/gnu/gcc/gcc-11.5.0/gcc-11.5.0.tar.xz
sha256: a6e21868ead545cf87f0c01f84276e4b5281d672098591c1c896241f09363478
- type: file
url: https://ftpmirror.gnu.org/gnu/glibc/glibc-2.35.tar.xz
mirror-urls:
- https://ftp.gnu.org/gnu/glibc/glibc-2.35.tar.xz
- https://mirrors.kernel.org/gnu/glibc/glibc-2.35.tar.xz
sha256: 5123732f6b67ccd319305efd399971d58592122bcc2a6518a1bd2510dd0cf52e
- type: file
path: ct-ng-x86_64.config
dest-filename: .config
only-arches:
- x86_64
- type: file
path: ct-ng-aarch64.config
dest-filename: .config
only-arches:
- aarch64
buildsystem: simple
build-commands:
- env -u CXXFLAGS -u CFLAGS -u CPLUS_INCLUDE_PATH -u C_INCLUDE_PATH -u LD_LIBRARY_PATH CT_PREFIX=/app TAR_OPTIONS=--no-same-owner ct-ng build
cleanup:
- '*'
- name: libavahi-client
buildsystem: autotools
config-opts:
- --disable-mono
- --enable-compat-libdns_sd
- --with-autoipd-group=avahi
- --with-autoipd-user=avahi
- --with-avahi-priv-access-group=network
- --disable-libdaemon
- --with-distro=none
- --disable-libevent
- --disable-qt4
- --disable-qt5
- --disable-gtk
- --disable-gtk3
- --disable-python
- --disable-manpages
- --disable-static
sources:
- type: archive
url: https://github.com/avahi/avahi/releases/download/v0.8/avahi-0.8.tar.gz
sha256: 060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda
cleanup:
- /share/locale
- /share/runtime/locale
- /bin/avahi-*
- name: x264
buildsystem: autotools
config-opts:
- --enable-shared
sources:
- type: archive
url: https://code.videolan.org/videolan/x264/-/archive/31e19f92f00c7003fa115047ce50978bc98c3a0d/x264-31e19f92f00c7003fa115047ce50978bc98c3a0d.tar.gz
sha256: d053c9d86988d6bc78237ca5205865c5ddf99c98ef4cd9927eec8f6d388f6dd9
cleanup:
- /bin/x264
- name: ffmpeg-libdrm
config-opts:
- --optflags="${CFLAGS}"
- --extra-ldflags="${LDFLAGS}"
- --disable-stripping
- --disable-debug
- --disable-doc
- --disable-static
- --disable-everything
- --enable-shared
- --enable-libdrm
- --enable-vaapi
- --enable-pthreads
- --enable-encoder=hevc_vaapi,h264_vaapi,av1_vaapi
build-commands:
- make install
cleanup:
- /share/ffmpeg
- /bin/ffmpeg
- /bin/ffplay
- /bin/ffprobe
sources:
- type: archive
url: https://ffmpeg.org/releases/ffmpeg-7.1.4.tar.xz
sha256: 71f4aac3573ed9060489cb62526a6c7dda815ae10993789611acd7be9fa9fbf4
- name: eigen3
buildsystem: cmake-ninja
config-opts:
- -DBUILD_TESTING=OFF
builddir: true
sources:
- type: archive
url: https://gitlab.com/libeigen/eigen/-/archive/5.0.1/eigen-5.0.1.tar.gz
sha256: e9c326dc8c05cd1e044c71f30f1b2e34a6161a3b6ecf445d56b53ff1669e3dec
cleanup:
- '*'
- name: nlohmann_json
buildsystem: cmake-ninja
config-opts:
- -DJSON_BuildTests=OFF
sources:
- type: archive
url: https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz
sha256: 42f6e95cad6ec532fd372391373363b62a14af6d771056dbfc86160e6dfff7aa
- name: cli11
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DBUILD_TESTING=OFF
- -DCLI11_BUILD_TESTS=OFF
- -DCLI11_BUILD_EXAMPLES=OFF
sources:
- type: archive
url: https://github.com/CLIUtils/CLI11/archive/refs/tags/v2.6.2.tar.gz
sha256: c6ea6b2e5608b3ea8617999bd5f47420c71b2ebdb8dc4767c1034d1da5785711
cleanup:
- '*'
- name: opencomposite
buildsystem: cmake-ninja
build-options:
cflags: -idirafter/usr/include
cxxflags: -idirafter/usr/include
arch:
aarch64:
ldflags: -L/usr/lib/aarch64-linux-gnu -Wl,--warn-unresolved-symbols
env:
CC: /app/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc
CXX: /app/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-g++
x86_64:
ldflags: -L/usr/lib/x86_64-linux-gnu -Wl,--warn-unresolved-symbols
env:
CC: /app/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc
CXX: /app/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-g++
config-opts:
- -DUSE_SYSTEM_OPENXR=OFF
- -DUSE_SYSTEM_GLM=OFF
sources:
- type: archive
url: https://gitlab.com/znixian/OpenOVR/-/archive/cff07db75c4823afe93ed7027b03d5f7bc86f164/OpenOVR-cff07db75c4823afe93ed7027b03d5f7bc86f164.tar.gz
sha256: d7ac1b9b12b3681414370be301909789ccdbb948412689780b2dec8cd47070bf
# git submodules of OpenOVR at the commit above
- type: archive
url: https://github.com/KhronosGroup/OpenXR-SDK/archive/91a8a8d9d70f4b469bca0726122c3b5a6096010e.tar.gz
dest: libs/openxr-sdk
sha256: 3b615f994adfa6184c6ff3b1b6af24965048ea1ddd3c3cf15c2b042282e74c05
- type: archive
url: https://github.com/g-truc/glm/archive/bf71a834948186f4097caa076cd2663c69a10e1e.tar.gz
dest: libs/glm
sha256: 70ad78e872c145f0164d54da833b651914c184edc65958906937b9739fb8fb1b
- type: archive
url: https://github.com/libunwind/libunwind/archive/f27f6a860335fc6c8107702dbde4b215ea74b164.tar.gz
dest: libs/libunwind
sha256: 3beb15d894759234dcb568f9d2be8b6ddc04c5d112836772e99884c58a07a285
- name: xrizer
buildsystem: simple
build-options:
append-path: /usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm20/bin
cflags: -idirafter/usr/include
cxxflags: -idirafter/usr/include
env:
CARGO_HOME: /run/build/xrizer/cargo
arch:
aarch64:
ldflags: -L/usr/lib/aarch64-linux-gnu -Wl,--warn-unresolved-symbols
env:
CC: /app/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc
CXX: /app/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-g++
RUSTFLAGS: -C linker=/app/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc
x86_64:
ldflags: -L/usr/lib/x86_64-linux-gnu -Wl,--warn-unresolved-symbols
env:
CC: /app/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc
CXX: /app/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-g++
RUSTFLAGS: -C linker=/app/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc
build-commands:
- cargo --offline fetch --manifest-path Cargo.toml --verbose
- cargo xbuild --release -F static-openxr
- mkdir /app/xrizer
- cp -rL target/release/bin/ /app/xrizer/
sources:
- type: archive
url: https://github.com/Supreeeme/xrizer/archive/a1216c7b53fb562a5bc4de473163e97a483042af.tar.gz
sha256: d75bb0a301bcafb57e94ca56b9ea6ccbe847f3db9181d7fb61bffccb26a40c88
- xrizer-gen-src.json
- name: wivrn-library
buildsystem: cmake-ninja
build-options:
# org.kde.Platform//6.8 sets _FORTIFY_SOURCE=3 but gcc 11 only supports _FORTIFY_SOURCE=2
cflags: -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=2
cxxflags: -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=2
arch:
aarch64:
ldflags: -L/usr/lib/aarch64-linux-gnu -Wl,--warn-unresolved-symbols
cflags: -idirafter/usr/include -idirafter/usr/lib/aarch64-linux-gnu/include/
cxxflags: -idirafter/usr/include -idirafter/usr/lib/aarch64-linux-gnu/include/
env:
CC: /app/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc
CXX: /app/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-g++
x86_64:
ldflags: -L/usr/lib/x86_64-linux-gnu -Wl,--warn-unresolved-symbols
cflags: -idirafter/usr/include -idirafter/usr/lib/x86_64-linux-gnu/include/
cxxflags: -idirafter/usr/include -idirafter/usr/lib/x86_64-linux-gnu/include/
env:
CC: /app/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc
CXX: /app/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-g++
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DWIVRN_BUILD_CLIENT=OFF
- -DWIVRN_BUILD_SERVER=OFF
- -DWIVRN_BUILD_SERVER_LIBRARY=ON
- -DWIVRN_BUILD_DASHBOARD=OFF
- -DWIVRN_BUILD_WIVRNCTL=OFF
- -DWIVRN_WERROR=ON
- -DFETCHCONTENT_FULLY_DISCONNECTED=ON
- -DFETCHCONTENT_BASE_DIR=deps
- -DGIT_TAG=WIVRN_GIT_TAG
- -DGIT_DESC=WIVRN_GIT_DESC
- -DGIT_COMMIT=WIVRN_GIT_COMMIT
- -Wno-dev
sources:
- WIVRN_SRC1
WIVRN_SRC2
WIVRN_SRC3
- type: archive
url: MONADO_URL
sha256: MONADO_SHA256
dest: deps/monado-src
- type: shell
commands:
- cd deps/monado-src && ../../patches/apply.sh ../../patches/monado/*
- name: wivrn
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DWIVRN_BUILD_CLIENT=OFF
- -DWIVRN_BUILD_SERVER=ON
- -DWIVRN_BUILD_SERVER_LIBRARY=OFF
- -DWIVRN_BUILD_DASHBOARD=ON
- -DWIVRN_OPTIMIZE_SHADERS=OFF
- -DWIVRN_USE_VAAPI=ON
- -DWIVRN_USE_X264=ON
- -DWIVRN_USE_NVENC=ON
- -DWIVRN_USE_VULKAN_ENCODE=ON
- -DWIVRN_USE_PIPEWIRE=ON
- -DWIVRN_USE_SYSTEM_BOOST=OFF
- -DWIVRN_FEATURE_SOLARXR=ON
- -DWIVRN_WERROR=ON
- -DWIVRN_FEATURE_STEAMVR_LIGHTHOUSE=OFF
- -DFETCHCONTENT_FULLY_DISCONNECTED=ON
- -DFETCHCONTENT_BASE_DIR=deps
- -DGIT_TAG=WIVRN_GIT_TAG
- -DGIT_DESC=WIVRN_GIT_DESC
- -DGIT_COMMIT=WIVRN_GIT_COMMIT
- -Wno-dev
sources:
- WIVRN_SRC1
WIVRN_SRC2
WIVRN_SRC3
- type: archive
url: BOOST_URL
dest: deps/boost-src
sha256: BOOST_SHA256
- type: archive
url: MONADO_URL
sha256: MONADO_SHA256
dest: deps/monado-src
- type: shell
commands:
- cd deps/monado-src && ../../patches/apply.sh ../../patches/monado/*