XR packaging for Fedora Atomic
0
fork

Configure Feed

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

openxr-generated (new formula)

Closes #5

Shiloh Fen 88252595 a4f3dc79

+49
+49
Formula/openxr-generated.rb
··· 1 + # Documentation: https://docs.brew.sh/Formula-Cookbook 2 + # https://rubydoc.brew.sh/Formula 3 + # PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST! 4 + class OpenxrGenerated < Formula 5 + desc "Generated headers and sources for OpenXR loader" 6 + homepage "https://khronos.org/openxr" 7 + url "https://github.com/KhronosGroup/OpenXR-SDK/archive/refs/tags/release-1.1.49.tar.gz" 8 + sha256 "74e9260a1876b0540171571a09bad853302ec68a911200321be8b0591ca94111" 9 + license "Apache-2.0" 10 + 11 + depends_on "cmake" => :build 12 + depends_on "wayland-protocols" => :build 13 + depends_on "gcc" => :build 14 + depends_on "mesa" 15 + depends_on "pkgconfig" => :build 16 + depends_on "vulkan-loader" 17 + depends_on "nushell" => :build 18 + 19 + def install 20 + args = %w[ 21 + -DBUILD_ALL_EXTENSIONS=ON 22 + -DBUILD_LOADER=ON 23 + -DDYNAMIC_LOADER=ON 24 + -DPRESENTATION_BACKEND=wayland 25 + -DCMAKE_BUILD_TYPE=Release 26 + -DBUILD_TESTS=OFF 27 + -DBUILD_CONFORMANCE_TESTS=OFF 28 + ] 29 + 30 + # Fixes an issue with CMake not being able to find OpenGL, I have no clue what's causing it 31 + args << "-DOPENGL_INCLUDE_DIR=#{Formula["mesa"].opt_include}" 32 + 33 + # HACK: temporarily disable fixincludes for pthread.h, see https://github.com/orgs/Homebrew/discussions/6193 34 + # Maybe building with LLVM clang would be a better idea? 35 + system "nu", "-c", "try {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'}}" 36 + 37 + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args 38 + system "cmake", "--build", "build" 39 + system "cmake", "--install", "build" 40 + 41 + # HACK: restore from above 42 + system "nu", "-c", "try {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)}}" 43 + end 44 + 45 + test do 46 + # TODO: run tests 47 + system "false" 48 + end 49 + end