homebrew-core/Formula/gtk-vnc.rb
2018-03-20 23:08:11 -07:00

60 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.1.tar.xz"
sha256 "f34baa696615ef67666e8465b4d0ac563355e999a77d2cc42ad4625a24f7aab1"
revision 1
bottle do
sha256 "6535c5f95e5f7088b02a54cb2211d95f26410ab2b7e07ae412c4add9471e0bc7" => :high_sierra
sha256 "97176d84f83fa7329b9768bc144f17b3b1f67de9acffee9accd196355588324f" => :sierra
sha256 "0167dceffade027d3f07c87d1634c5ce210349e12eaa836b30c95f8e5464ad0e" => :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
--with-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