Merge pull request #207012 from Homebrew/bump-tailwindcss-4.0.5
[Homebrew/homebrew-core.git] / Formula / w / wpebackend-fdo.rb
blob3b7d38cf549d389f76b69c7d4b5bdcb032348bd1
1 class WpebackendFdo < Formula
2   desc "Freedesktop.org backend for WPE WebKit"
3   homepage "https://wpewebkit.org/"
4   url "https://github.com/Igalia/WPEBackend-fdo/releases/download/1.14.3/wpebackend-fdo-1.14.3.tar.xz"
5   sha256 "10121842595a850291db3e82f3db0b9984df079022d386ce42c2b8508159dc6c"
6   license "BSD-2-Clause"
7   head "https://github.com/Igalia/WPEBackend-fdo.git", branch: "master"
9   livecheck do
10     url :stable
11     strategy :github_latest
12   end
14   bottle do
15     sha256 x86_64_linux: "2bab7093c2eaba0cde2fec85b7b413585d05fef38ddeb9b69ebef34deff304b3"
16   end
18   depends_on "meson" => :build
19   depends_on "ninja" => :build
20   depends_on "pkgconf" => :build
21   depends_on "glib"
22   depends_on "libepoxy"
23   depends_on "libwpe"
24   depends_on :linux
25   depends_on "mesa"
26   depends_on "wayland"
28   def install
29     system "meson", "setup", "build", *std_meson_args
30     system "meson", "compile", "-C", "build", "--verbose"
31     system "meson", "install", "-C", "build"
32   end
34   test do
35     (testpath/"wpe-fdo-test.c").write <<~C
36       #include "wpe/fdo.h"
37       #include <stdio.h>
38       int main() {
39         printf("%u.%u.%u", wpe_fdo_get_major_version(), wpe_fdo_get_minor_version(), wpe_fdo_get_micro_version());
40       }
41     C
42     ENV.append_to_cflags "-I#{include}/wpe-fdo-1.0 -I#{Formula["libwpe"].opt_include}/wpe-1.0"
43     ENV.append "LDFLAGS", "-L#{lib}"
44     ENV.append "LDLIBS", "-lWPEBackend-fdo-1.0"
45     system "make", "wpe-fdo-test"
46     assert_equal version.to_s, shell_output("./wpe-fdo-test")
47   end
48 end