2 desc "Flexible API to implement spellchecking in GTK+ applications"
3 homepage "https://gitlab.gnome.org/GNOME/gspell"
4 url "https://download.gnome.org/sources/gspell/1.14/gspell-1.14.0.tar.xz"
5 sha256 "64ea1d8e9edc1c25b45a920e80daf67559d1866ffcd7f8432fecfea6d0fe8897"
6 license "LGPL-2.1-or-later"
10 sha256 arm64_sequoia: "03106944ffad6a23ddd95ca647a7808698374337309aba617c63d11eb4a47130"
11 sha256 arm64_sonoma: "3c67a5a4434cc8faa2b0abe80843891a565dd81afdca0e4aff24b71ae2896f6f"
12 sha256 arm64_ventura: "9a1ea15e3f7b7b0c7213d63f565cad2e312fae9a6f5c1ef4b76c632d3f43b831"
13 sha256 sonoma: "055cb331155fc7a4627c5e27f09491285922fe28967fb2e3af7296711ce961e0"
14 sha256 ventura: "5713495649b5b21951f2e39574b9335333298276f9c96dfe5ffb3cf03f5e96e8"
15 sha256 x86_64_linux: "b6fa120befbae62fff98ae659831ef563b621fe32e8b1c137b79cb401360feed"
18 depends_on "gobject-introspection" => :build
19 depends_on "meson" => :build
20 depends_on "ninja" => :build
21 depends_on "pkgconf" => [:build, :test]
22 depends_on "vala" => :build
24 depends_on "at-spi2-core"
27 depends_on "gdk-pixbuf"
45 system "meson", "setup", "build", *args, *std_meson_args
46 system "meson", "compile", "-C", "build", "--verbose"
47 system "meson", "install", "-C", "build"
51 (testpath/"test.c").write <<~C
52 #include <gspell/gspell.h>
54 int main(int argc, char *argv[]) {
55 const GList *list = gspell_language_get_available();
60 icu4c = deps.map(&:to_formula).find { |f| f.name.match?(/^icu4c@\d+$/) }
61 ENV.prepend_path "PKG_CONFIG_PATH", icu4c.opt_lib/"pkgconfig"
62 flags = shell_output("pkgconf --cflags --libs gspell-1").chomp.split
63 system ENV.cc, "test.c", "-o", "test", *flags
64 ENV["G_DEBUG"] = "fatal-warnings"
66 # This test will fail intentionally when iso-codes gets updated.
67 # Resolve by increasing the `revision` on this formula.