XR packaging for Fedora Atomic
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[WIP] openxr (new formula)

from openxr-generated, but builds from source. Does not compile yet

+47
+47
Formula/openxr.rb
··· 1 + class Openxr < Formula 2 + desc "Cross-platform VR/AR runtime and API" 3 + homepage "https://khronos.org/openxr" 4 + url "https://github.com/KhronosGroup/OpenXR-SDK-Source/archive/refs/tags/release-1.1.49.tar.gz" 5 + sha256 "207452a51ec9d730742c385adb5af21fb266fa7be8090b251f76c0bd2b433c61" 6 + license "Apache-2.0" 7 + 8 + depends_on "cmake" => :build 9 + depends_on "wayland-protocols" => :build 10 + depends_on "libxcb" => :build 11 + depends_on "gcc" => :build 12 + depends_on "mesa" => :build 13 + depends_on "vulkan-loader" => :build 14 + depends_on "nushell" => :build 15 + 16 + def install 17 + args = %w[ 18 + -DBUILD_ALL_EXTENSIONS=ON 19 + -DBUILD_LOADER=ON 20 + -DDYNAMIC_LOADER=ON 21 + -DPRESENTATION_BACKEND=wayland 22 + -DCMAKE_BUILD_TYPE=Release 23 + -DBUILD_TESTS=OFF 24 + -DBUILD_CONFORMANCE_TESTS=OFF 25 + ] 26 + 27 + # HACK: temporarily disable fixincludes for pthread.h, see https://github.com/orgs/Homebrew/discussions/6193 28 + system "nu", "-c", "ls /home/linuxbrew/.linuxbrew/Cellar/gcc/*/lib/gcc/current/gcc/x86_64-pc-linux-gnu/*/include-fixed/pthread.h | each {|file| mv $file.name $'($file.name).bak'}" 29 + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args 30 + system "cmake", "--build", "build" 31 + system "cmake", "--install", "build" 32 + system "nu", "-c", "ls /home/linuxbrew/.linuxbrew/Cellar/gcc/*/lib/gcc/current/gcc/x86_64-pc-linux-gnu/*/include-fixed/pthread.h.bak | each {|file| mv $file.name ($file.name | str substring 0..-5)}" 33 + end 34 + 35 + test do 36 + # `test do` will create, run in and delete a temporary directory. 37 + # 38 + # This test will fail and we won't accept that! For Homebrew/homebrew-core 39 + # this will need to be a test that verifies the functionality of the 40 + # software. Run the test with `brew test openxr`. Options passed 41 + # to `brew install` such as `--HEAD` also need to be provided to `brew test`. 42 + # 43 + # The installed folder is not in the path, so use the entire path to any 44 + # executables being tested: `system bin/"program", "do", "something"`. 45 + system "false" 46 + end 47 + end