2015-01-16 06:33:10 +00:00
|
|
|
class SpiceGtk < Formula
|
2015-11-25 18:32:56 +00:00
|
|
|
desc "GTK client/libraries for SPICE"
|
2016-11-05 21:55:41 +00:00
|
|
|
homepage "https://www.spice-space.org"
|
2019-01-27 16:27:19 +00:00
|
|
|
url "https://www.spice-space.org/download/gtk/spice-gtk-0.36.tar.bz2"
|
|
|
|
sha256 "7126c3584df12d40dcf4970f5f46fafd65b757620f911687e549f7da5c8fd7cd"
|
2015-01-16 06:33:10 +00:00
|
|
|
|
2018-02-25 02:00:27 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "autogen" => :build
|
|
|
|
depends_on "automake" => :build
|
2015-01-16 06:33:10 +00:00
|
|
|
depends_on "gobject-introspection" => :build
|
|
|
|
depends_on "intltool" => :build
|
2015-05-14 18:01:20 +00:00
|
|
|
depends_on "libtool" => :build
|
2015-11-25 18:08:45 +00:00
|
|
|
depends_on "pkg-config" => :build
|
2015-01-16 06:33:10 +00:00
|
|
|
depends_on "vala" => :build
|
|
|
|
|
2019-01-06 20:51:51 +00:00
|
|
|
depends_on "atk"
|
2015-01-16 06:33:10 +00:00
|
|
|
depends_on "cairo"
|
|
|
|
depends_on "gdk-pixbuf"
|
|
|
|
depends_on "gettext"
|
|
|
|
depends_on "glib"
|
2019-01-06 20:51:51 +00:00
|
|
|
depends_on "gst-libav"
|
|
|
|
depends_on "gst-plugins-bad"
|
|
|
|
depends_on "gst-plugins-base"
|
|
|
|
depends_on "gst-plugins-good"
|
|
|
|
depends_on "gst-plugins-ugly"
|
|
|
|
depends_on "gstreamer"
|
2015-01-16 06:33:10 +00:00
|
|
|
depends_on "gtk+3"
|
|
|
|
depends_on "jpeg"
|
2019-01-27 16:27:19 +00:00
|
|
|
depends_on "json-glib"
|
2019-01-06 20:51:51 +00:00
|
|
|
depends_on "libusb"
|
2017-09-06 17:12:15 +00:00
|
|
|
depends_on "lz4"
|
2015-10-06 19:50:24 +00:00
|
|
|
depends_on "openssl"
|
2018-07-19 03:20:10 +00:00
|
|
|
depends_on "opus"
|
2015-01-16 06:33:10 +00:00
|
|
|
depends_on "pango"
|
|
|
|
depends_on "pixman"
|
2015-10-04 02:18:48 +00:00
|
|
|
depends_on "spice-protocol"
|
2015-10-06 19:50:24 +00:00
|
|
|
depends_on "usbredir"
|
2017-09-06 17:12:15 +00:00
|
|
|
|
2015-01-16 06:33:10 +00:00
|
|
|
def install
|
2019-01-06 20:51:51 +00:00
|
|
|
# Some files (vncdisplaykeymap.c) require building as Objective-C
|
|
|
|
# https://www.mail-archive.com/spice-devel@lists.freedesktop.org/msg40085.html
|
|
|
|
ENV["CFLAGS"] = "-ObjC -g -O2"
|
2017-09-06 17:12:15 +00:00
|
|
|
|
2019-01-06 20:51:51 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--disable-silent-rules
|
|
|
|
--enable-introspection
|
|
|
|
--enable-gstvideo
|
|
|
|
--enable-gstaudio
|
|
|
|
--enable-gstreamer=1.0
|
|
|
|
--enable-vala
|
|
|
|
--with-coroutine=gthread
|
|
|
|
--with-gtk=3.0
|
|
|
|
--with-lz4
|
|
|
|
--prefix=#{prefix}
|
|
|
|
]
|
|
|
|
system "./configure", *args
|
2015-01-16 06:33:10 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
2019-01-06 20:51:51 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.cpp").write <<~EOS
|
|
|
|
#include <spice-client.h>
|
|
|
|
#include <spice-client-gtk.h>
|
|
|
|
int main() {
|
|
|
|
return spice_session_new() ? 0 : 1;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
system ENV.cc, "test.cpp",
|
|
|
|
"-I#{Formula["spice-protocol"].include}/spice-1",
|
|
|
|
"-I#{Formula["glib"].include}/glib-2.0",
|
|
|
|
"-I#{Formula["glib"].lib}/glib-2.0/include",
|
|
|
|
"-I#{Formula["atk"].include}/atk-1.0",
|
|
|
|
"-I#{Formula["gdk-pixbuf"].include}/gdk-pixbuf-2.0",
|
|
|
|
"-I#{Formula["cairo"].include}/cairo",
|
|
|
|
"-I#{Formula["pango"].include}/pango-1.0",
|
|
|
|
"-I#{Formula["gtk+3"].include}/gtk-3.0",
|
|
|
|
"-I#{include}/spice-client-glib-2.0",
|
|
|
|
"-I#{include}/spice-client-gtk-3.0",
|
|
|
|
"-L#{lib}",
|
|
|
|
"-lspice-client-glib-2.0",
|
|
|
|
"-lspice-client-gtk-3.0",
|
|
|
|
"-o", "test"
|
|
|
|
system "./test"
|
|
|
|
end
|
2015-01-16 06:33:10 +00:00
|
|
|
end
|