Files

49 lines
1.5 KiB
Ruby

class Orc < Formula
bottle do
root_url "https://homebrew.mirror.ygg/bottles"
sha256 cellar: :any, arm64_sequoia: "7a0d9ba6e8e8279bc1c17502bb2384564ee63b8df3f0db9e2fdbc04084807713"
sha256 cellar: :any, arm64_tahoe: "a45340cf95a072f37cb00f9bcb8b1dfe31128fe4a9421957c9a57938a87341a1"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "f61c9e4d2bc4894d65d16c7ccedeba81ffaac9c07cbc337be00cd8d77d353c06"
end
desc "Oil Runtime Compiler (ORC)"
homepage "https://gstreamer.freedesktop.org/modules/orc.html"
url "https://gstreamer.freedesktop.org/src/orc/orc-0.4.42.tar.xz"
sha256 "7ec912ab59af3cc97874c456a56a8ae1eec520c385ec447e8a102b2bd122c90c"
license all_of: ["BSD-2-Clause", "BSD-3-Clause"]
compatibility_version 1
livecheck do
url "https://gstreamer.freedesktop.org/src/orc/"
regex(/href=.*?orc[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
depends_on "meson" => :build
depends_on "ninja" => :build
def install
system "meson", "setup", "build", *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end
test do
assert_match version.to_s, shell_output("#{bin}/orcc --version 2>&1")
(testpath/"test.c").write <<~C
#include <orc/orc.h>
int main(int argc, char *argv[]) {
if (orc_version_string() == NULL) {
return 1;
}
return 0;
}
C
system ENV.cc, "test.c", "-I#{include}/orc-0.4", "-L#{lib}", "-lorc-0.4", "-o", "test"
system "./test"
end
end