wayland (new formula)

master
Michka Popoff 2020-11-20 17:47:36 +01:00
parent 0aae21fd18
commit d0002786c6
2 changed files with 46 additions and 0 deletions

View File

@ -19,6 +19,7 @@ on:
- "Formula/libtirpc.rb"
- "Formula/linux-headers.rb"
- "Formula/strace.rb"
- "Formula/wayland.rb"
jobs:
check_labels_linux:
runs-on: ubuntu-latest

45
Formula/wayland.rb Normal file
View File

@ -0,0 +1,45 @@
class Wayland < Formula
desc "Protocol for a compositor to talk to its clients"
homepage "https://wayland.freedesktop.org"
url "https://wayland.freedesktop.org/releases/wayland-1.18.0.tar.xz"
sha256 "4675a79f091020817a98fd0484e7208c8762242266967f55a67776936c2e294d"
license "MIT"
depends_on "pkg-config" => :build
depends_on :linux
uses_from_macos "expat"
uses_from_macos "libffi"
uses_from_macos "libxml2"
def install
args = %W[
--prefix=#{prefix}
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-dependency-tracking
--disable-silent-rules
--disable-documentation
]
system "./configure", *args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~EOS
#include "wayland-server.h"
#include "wayland-client.h"
int main(int argc, char* argv[]) {
const char *socket;
struct wl_protocol_logger *logger;
return 0;
}
EOS
system ENV.cc, "test.c", "-o", "test", "-I#{include}"
system "./test"
assert_equal 0, $CHILD_STATUS.exitstatus
end
end