49 lines
1.5 KiB
Ruby
49 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/0.14/gssdp-0.14.13.tar.xz"
|
|
sha256 "43057f0e3c07a12ad698cfb70420da21fc6e6eefe3c83161ef69e8308979eaea"
|
|
|
|
bottle do
|
|
sha256 "4666b91e90e2fdf8e6a0d1649bfe71503d15c21ca5263ed09ea9e86ab134a37d" => :el_capitan
|
|
sha256 "1e9c120f706d9fa50e2cc42dcf63918368578862cc5ec422626dcd340049e88d" => :yosemite
|
|
sha256 "7e748bd9ac813f9f0d701d5abd34df45f0a6d69bc0aacc2821ddcacd72cfb260" => :mavericks
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "intltool" => :build
|
|
depends_on "gettext"
|
|
depends_on "glib"
|
|
depends_on "libsoup"
|
|
|
|
def install
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
"--prefix=#{prefix}"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
#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 = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
|
|
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.0
|
|
-D_REENTRANT
|
|
-L#{lib}
|
|
-lgssdp-1.0
|
|
]
|
|
system ENV.cc, "test.c", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|