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"
7 head "https://github.com/Igalia/WPEBackend-fdo.git", branch: "master"
11 strategy :github_latest
15 sha256 x86_64_linux: "2bab7093c2eaba0cde2fec85b7b413585d05fef38ddeb9b69ebef34deff304b3"
18 depends_on "meson" => :build
19 depends_on "ninja" => :build
20 depends_on "pkgconf" => :build
29 system "meson", "setup", "build", *std_meson_args
30 system "meson", "compile", "-C", "build", "--verbose"
31 system "meson", "install", "-C", "build"
35 (testpath/"wpe-fdo-test.c").write <<~C
39 printf("%u.%u.%u", wpe_fdo_get_major_version(), wpe_fdo_get_minor_version(), wpe_fdo_get_micro_version());
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")