100 lines
3.5 KiB
Ruby
100 lines
3.5 KiB
Ruby
class SpiceGtk < Formula
|
|
include Language::Python::Virtualenv
|
|
|
|
desc "GTK client/libraries for SPICE"
|
|
homepage "https://www.spice-space.org"
|
|
url "https://www.spice-space.org/download/gtk/spice-gtk-0.41.tar.xz"
|
|
sha256 "d8f8b5cbea9184702eeb8cc276a67d72acdb6e36e7c73349fb8445e5bca0969f"
|
|
license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later", "BSD-3-Clause"]
|
|
|
|
livecheck do
|
|
url "https://www.spice-space.org/download/gtk/"
|
|
regex(/href=.*?spice-gtk[._-]v?(\d+(?:\.\d+)+)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 arm64_monterey: "4a098429afb405c76f4513e84e002145657d4438f194e91e8d46f2944da9bbe0"
|
|
sha256 arm64_big_sur: "53544810c91c90091c172a0207012390c4a006eb1f4b58d96c7af7503c41198c"
|
|
sha256 monterey: "e88b7445db383d3bebafd43f508a4d550899a58d289996daf09e47fbc75b4ec9"
|
|
sha256 big_sur: "8b199ea4c7842b38ce451e744ef138fd05065b63a53b202c1b1ea654e35807d6"
|
|
sha256 catalina: "a7b71c8f7cf80f7e69cb5d8eeda061306215f2b7eda16a29f72f2bcb14a5e4ef"
|
|
sha256 x86_64_linux: "1fb150028d89b19a2c8024bcb4169f54f05d61c0d812a48465fd907d4b1dec3e"
|
|
end
|
|
|
|
depends_on "glib-utils" => :build
|
|
depends_on "gobject-introspection" => :build
|
|
depends_on "intltool" => :build
|
|
depends_on "libtool" => :build
|
|
depends_on "meson" => :build
|
|
depends_on "ninja" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "python@3.10" => :build
|
|
depends_on "six" => :build
|
|
depends_on "vala" => :build
|
|
|
|
depends_on "atk"
|
|
depends_on "cairo"
|
|
depends_on "gdk-pixbuf"
|
|
depends_on "gettext"
|
|
depends_on "glib"
|
|
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"
|
|
depends_on "gtk+3"
|
|
depends_on "jpeg"
|
|
depends_on "json-glib"
|
|
depends_on "libusb"
|
|
depends_on "lz4"
|
|
depends_on "openssl@1.1"
|
|
depends_on "opus"
|
|
depends_on "pango"
|
|
depends_on "pixman"
|
|
depends_on "spice-protocol"
|
|
depends_on "usbredir"
|
|
|
|
resource "pyparsing" do
|
|
url "https://files.pythonhosted.org/packages/71/22/207523d16464c40a0310d2d4d8926daffa00ac1f5b1576170a32db749636/pyparsing-3.0.9.tar.gz"
|
|
sha256 "2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"
|
|
end
|
|
|
|
def install
|
|
venv = virtualenv_create(buildpath/"venv", "python3")
|
|
venv.pip_install resources
|
|
ENV.prepend_path "PATH", buildpath/"venv/bin"
|
|
|
|
system "meson", "build", *std_meson_args
|
|
system "meson", "compile", "-C", "build"
|
|
system "meson", "install", "-C", "build"
|
|
end
|
|
|
|
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["atk"].include}/atk-1.0",
|
|
"-I#{Formula["cairo"].include}/cairo",
|
|
"-I#{Formula["gdk-pixbuf"].include}/gdk-pixbuf-2.0",
|
|
"-I#{Formula["glib"].include}/glib-2.0",
|
|
"-I#{Formula["glib"].lib}/glib-2.0/include",
|
|
"-I#{Formula["gtk+3"].include}/gtk-3.0",
|
|
"-I#{Formula["harfbuzz"].opt_include}/harfbuzz",
|
|
"-I#{Formula["pango"].include}/pango-1.0",
|
|
"-I#{Formula["spice-protocol"].include}/spice-1",
|
|
"-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
|
|
end
|