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.38.tar.xz"
sha256 "0690a91bab86b18868f3eee6d41e9ec4ce6894f655443d490a2184bfac56c872"
license "MIT"
head "https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config.git", branch: "master"
bottle do
sha256 cellar: :any_skip_relocation, all: "43d80f736530836b6c1dae447959ede2b1cdd30e3f0273d145dc6f098de2408c"
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