|
| 1 | +class Foot < Formula |
| 2 | + desc "Fast, lightweight and minimalistic Wayland terminal emulator" |
| 3 | + homepage "https://codeberg.org/dnkl/foot" |
| 4 | + url "https://codeberg.org/dnkl/foot/archive/1.18.1.tar.gz" |
| 5 | + sha256 "59d22187f7ceaaaa570a5299b102e8f4692826e98785f89ad9d8911802ccc000" |
| 6 | + license "MIT" |
| 7 | + |
| 8 | + bottle do |
| 9 | + sha256 x86_64_linux: "a925f3b11f6081e54333c0cca3bfcc2c62492734975bbfcc480f09d4356b16c6" |
| 10 | + end |
| 11 | + |
| 12 | + depends_on "cmake" => :build |
| 13 | + depends_on "meson" => :build |
| 14 | + depends_on "ninja" => :build |
| 15 | + depends_on "pkg-config" => :build |
| 16 | + depends_on "scdoc" => :build |
| 17 | + depends_on "tllist" => :build |
| 18 | + |
| 19 | + depends_on "fcft" |
| 20 | + depends_on "fontconfig" |
| 21 | + depends_on "freetype" |
| 22 | + depends_on "libxkbcommon" |
| 23 | + depends_on :linux |
| 24 | + depends_on "pixman" |
| 25 | + depends_on "utf8proc" |
| 26 | + depends_on "wayland" |
| 27 | + |
| 28 | + def install |
| 29 | + system "meson", "setup", "build", "-Dterminfo-base-name=foot-extra", "-Ddocs=enabled", *std_meson_args |
| 30 | + system "meson", "compile", "-C", "build", "--verbose" |
| 31 | + system "meson", "install", "-C", "build" |
| 32 | + end |
| 33 | + |
| 34 | + test do |
| 35 | + config_dir = testpath/".config/foot" |
| 36 | + config_file = config_dir/"foot.ini" |
| 37 | + |
| 38 | + mkdir_p config_dir |
| 39 | + |
| 40 | + File.write config_file, <<-EOF |
| 41 | + [cursor] |
| 42 | + style=blok |
| 43 | + EOF |
| 44 | + |
| 45 | + assert_match( |
| 46 | + /blok: not one of 'block', 'underline', 'beam'/, |
| 47 | + shell_output("#{bin}/foot --check-config 2>&1", 230), |
| 48 | + ) |
| 49 | + |
| 50 | + File.write config_file, <<-EOF |
| 51 | + [cursor] |
| 52 | + style=block |
| 53 | + EOF |
| 54 | + |
| 55 | + assert_empty shell_output("#{bin}/foot --check-config") |
| 56 | + end |
| 57 | +end |
0 commit comments