homebrew-core/Formula/xkeyboardconfig.rb

34 lines
1.3 KiB
Ruby

class Xkeyboardconfig < Formula
desc "Keyboard configuration database for the X Window System"
homepage "https://www.freedesktop.org/wiki/Software/XKeyboardConfig/"
url "https://xorg.freedesktop.org/archive/individual/data/xkeyboard-config/xkeyboard-config-2.37.tar.xz"
sha256 "eb1383a5ac4b6210d7c7302b9d6fab052abdf51c5d2c9b55f1f779997ba68c6c"
license "MIT"
head "https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config.git", branch: "master"
bottle do
sha256 cellar: :any_skip_relocation, all: "6f921f65160528b1903c09edd032524ac4e8d723998184d28157e0e139cc4a83"
end
depends_on "gettext" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => [:build, :test]
depends_on "python@3.11" => :build
uses_from_macos "libxslt" => :build
def install
system "meson", "setup", "build", *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end
test do
assert_predicate man7/"xkeyboard-config.7", :exist?
assert_equal "#{share}/X11/xkb", shell_output("pkg-config --variable=xkb_base xkeyboard-config").chomp
assert_match "Language-Team: English",
shell_output("strings #{share}/locale/en_GB/LC_MESSAGES/xkeyboard-config.mo")
end
end