Skip to content

Instantly share code, notes, and snippets.

@zhangyoufu
Created June 17, 2024 02:50
Show Gist options
  • Save zhangyoufu/5c5cb1f6f3a82feeeb5253d361b6cc37 to your computer and use it in GitHub Desktop.
Save zhangyoufu/5c5cb1f6f3a82feeeb5253d361b6cc37 to your computer and use it in GitHub Desktop.
tiger-vnc Homebrew Formula with ffmpeg for PiKVM H.264 encoding
class TigerVnc < Formula
desc "High-performance, platform-neutral implementation of VNC"
homepage "https://tigervnc.org/"
url "https://github.com/TigerVNC/tigervnc/archive/refs/tags/v1.13.1.tar.gz"
sha256 "b7c5b8ed9e4e2c2f48c7b2c9f21927db345e542243b4be88e066b2daa3d1ae25"
license "GPL-2.0-or-later"
# Tags with a 90+ patch are unstable (e.g., the 1.9.90 tag is used for the
# 1.10.0 beta release) and this regex should only match the stable versions.
livecheck do
url :stable
regex(/^v?(\d+\.\d+\.(?:\d|[1-8]\d+)(?:\.\d+)*)$/i)
end
depends_on "cmake" => :build
depends_on "pkg-config" => :build
depends_on "ffmpeg"
depends_on "fltk"
depends_on "gettext"
depends_on "gnutls"
depends_on "jpeg-turbo"
depends_on "pixman"
on_linux do
depends_on "libx11"
depends_on "libxcursor"
depends_on "libxdamage"
depends_on "libxext"
depends_on "libxfixes"
depends_on "libxft"
depends_on "libxi"
depends_on "libxinerama"
depends_on "libxrandr"
depends_on "libxrender"
depends_on "libxtst"
depends_on "linux-pam"
end
def install
system "cmake", "-S", ".", "-B", "_build", *std_cmake_args
system "cmake", "--build", "_build"
system "cmake", "--install", "_build"
end
test do
output = shell_output("#{bin}/vncviewer -h 2>&1", 1)
assert_match "TigerVNC Viewer v#{version}", output
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment