spirv-cross 2019-01-31 (new formula)

Closes #36875.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Yurii Kolesnykov 2019-02-10 14:10:44 +02:00 committed by FX Coudert
parent 0d57d17c8b
commit 470b98a627

29
Formula/spirv-cross.rb Normal file
View file

@ -0,0 +1,29 @@
class SpirvCross < Formula
desc "Performing reflection and disassembling SPIR-V"
homepage "https://github.com/KhronosGroup/SPIRV-Cross"
url "https://github.com/KhronosGroup/SPIRV-Cross/archive/2019-01-31.tar.gz"
version "2019-01-31"
sha256 "1876b044cd21942752492c99f12fcd7e69debb6a63c52277ae83303bd6437f59"
depends_on "cmake" => :build
depends_on "glm" => :test
depends_on "glslang" => :test
def install
mkdir "build" do
system "cmake", "..", *std_cmake_args
system "make", "install"
end
# required for tests
prefix.install "samples"
(include/"spirv_cross").install Dir["include/spirv_cross/*"]
end
test do
cp_r Dir[prefix/"samples/cpp/*"], testpath
inreplace "Makefile", "-I../../include", "-I#{include}"
inreplace "Makefile", "../../spirv-cross", "spirv-cross"
system "make"
end
end