homebrew-core/Formula/gtk-vnc.rb
2018-03-24 12:52:19 +01:00

59 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.7/gtk-vnc-0.7.2.tar.xz"
sha256 "f893f32b1ef6d09dd23cda39b8a2567be7c2aebda58026288e1362f042e20808"
bottle do
sha256 "caa4703d05d6f5413fc661e327ede0dff09ce603d32510e8e2c410a4105e65c4" => :high_sierra
sha256 "fe4d1d434b8e3b784d886ce07d82f5c049916b8e67e28e34c9f56779d0c9b943" => :sierra
sha256 "a6fea29893a63c9df2866c962dcef68ce6d4e5e3f7034f99350e6c3b7ca030a6" => :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 "libtool" => :build
depends_on "pkg-config" => :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
--without-python
--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