-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
/
Copy pathlibdrm.rb
41 lines (36 loc) · 1.24 KB
/
libdrm.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
class Libdrm < Formula
desc "Library for accessing the direct rendering manager"
homepage "https://dri.freedesktop.org"
url "https://dri.freedesktop.org/libdrm/libdrm-2.4.124.tar.xz"
sha256 "ac36293f61ca4aafaf4b16a2a7afff312aa4f5c37c9fbd797de9e3c0863ca379"
license "MIT"
livecheck do
url "https://dri.freedesktop.org/libdrm/"
regex(/href=.*?libdrm[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
sha256 arm64_linux: "7e34283152be0c624b5deeff223055257a46661a42c48e66937d6016ad494f00"
sha256 x86_64_linux: "86ba0f90e6e249493c742a624ddc849a75dce477bb7a065fafb814279b2e400f"
end
depends_on "docutils" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkgconf" => :build
depends_on "libpciaccess"
depends_on :linux
def install
system "meson", "setup", "build", "-Dcairo-tests=disabled", "-Dvalgrind=disabled", *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end
test do
(testpath/"test.c").write <<~C
#include <libdrm/drm.h>
int main(int argc, char* argv[]) {
struct drm_gem_open open;
return 0;
}
C
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-ldrm"
end
end