homebrew-core/Formula/gtk-vnc.rb
2018-08-02 01:12:39 -07:00

58 lines
1.7 KiB
Ruby

class GtkVnc < Formula
desc "VNC viewer widget for GTK"
homepage "https://wiki.gnome.org/Projects/gtk-vnc"
url "https://download.gnome.org/sources/gtk-vnc/0.8/gtk-vnc-0.8.0.tar.xz"
sha256 "561647e093919ab0b38c4b1ea39813d5b5dc10ef290e689f4caef596a707dd57"
bottle do
sha256 "81136476954cb2ba4d3b80741b58c0bd7451abd77da9280d53555dbbe9f96971" => :high_sierra
sha256 "bf2f234421c9225964722e57e94922592ad80e16398bd761b2eb6464ae09d058" => :sierra
sha256 "16bcd76a3a39dff96e28a97e179f6161d64a3a23a0ab3ea9a6252eea2dda9ef3" => :el_capitan
end
# Fails with Xcode 7.1 or older
# error: use of undeclared identifier 'MAP_ANONYMOUS'
# Upstream bug: https://bugzilla.gnome.org/show_bug.cgi?id=602371
depends_on :macos => :yosemite
depends_on "gettext" => :build
depends_on "gobject-introspection" => :build
depends_on "intltool" => :build
depends_on "pkg-config" => :build
depends_on "python" => :build
depends_on "gnutls"
depends_on "gtk+3"
depends_on "libgcrypt"
depends_on "pulseaudio" => :optional
depends_on "vala" => :optional
def install
args = %W[
--prefix=#{prefix}
--with-gtk=3.0
--with-examples
--enable-introspection
]
args << "--enable-pulseaudio" if build.with? "pulseaudio"
if build.with? "vala"
args << "--enable-vala"
else
args << "--disable-vala"
end
# fix "The deprecated ucontext routines require _XOPEN_SOURCE to be defined"
ENV.append "CPPFLAGS", "-D_XOPEN_SOURCE=600"
# for MAP_ANON
ENV.append "CPPFLAGS", "-D_DARWIN_C_SOURCE"
system "./configure", *args
system "make"
system "make", "install"
end
test do
system "#{bin}/gvncviewer", "--help-all"
end
end