53 lines
1.5 KiB
Ruby
53 lines
1.5 KiB
Ruby
class Gssdp < Formula
|
|
desc "GUPnP library for resource discovery and announcement over SSDP"
|
|
homepage "https://wiki.gnome.org/GUPnP/"
|
|
url "https://download.gnome.org/sources/gssdp/1.2/gssdp-1.2.2.tar.xz"
|
|
sha256 "cabb9e3b456b8354a55e23eb0207545d974643cda6d623523470ebbc4188b0a4"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "a034241f5bf93797110bbad30222dcce724c7c93db341e2196bf21c89e941db9" => :catalina
|
|
sha256 "09d7829d9e394bc02fded8018460470750221d195d06b636f095e0474a33ec62" => :mojave
|
|
sha256 "578aa551636198f669c67902cc37ddee65bc1d295f477e95bf8a49f1413b5894" => :high_sierra
|
|
end
|
|
|
|
depends_on "gobject-introspection" => :build
|
|
depends_on "meson" => :build
|
|
depends_on "ninja" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "gettext"
|
|
depends_on "glib"
|
|
depends_on "libsoup"
|
|
|
|
def install
|
|
mkdir "build" do
|
|
system "meson", "--prefix=#{prefix}", "-Dsniffer=false", ".."
|
|
system "ninja"
|
|
system "ninja", "install"
|
|
end
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<~EOS
|
|
#include <libgssdp/gssdp.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
GType type = gssdp_client_get_type();
|
|
return 0;
|
|
}
|
|
EOS
|
|
gettext = Formula["gettext"]
|
|
glib = Formula["glib"]
|
|
flags = %W[
|
|
-I#{gettext.opt_include}
|
|
-I#{glib.opt_include}/glib-2.0
|
|
-I#{glib.opt_lib}/glib-2.0/include
|
|
-I#{include}/gssdp-1.2
|
|
-D_REENTRANT
|
|
-L#{lib}
|
|
-lgssdp-1.2
|
|
]
|
|
system ENV.cc, "test.c", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|