2013-06-30 16:10:54 +00:00
|
|
|
class Gssdp < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "GUPnP library for resource discovery and announcement over SSDP"
|
2015-08-03 12:55:31 +00:00
|
|
|
homepage "https://wiki.gnome.org/GUPnP/"
|
2015-09-07 16:36:35 +00:00
|
|
|
url "https://download.gnome.org/sources/gssdp/0.14/gssdp-0.14.11.tar.xz"
|
|
|
|
sha256 "7bf5aeaf2119fe0bec5f3632ecf39dae15bc85276c72c2ad8dd4b0e345c6535a"
|
2013-06-30 16:10:54 +00:00
|
|
|
|
2014-10-23 11:11:39 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-09-08 00:23:01 +00:00
|
|
|
sha256 "f0346d2cdac6d5e2a2fc40b282426582c09e177c6d7202961cd51522bf680551" => :yosemite
|
|
|
|
sha256 "b0554ba681354f342915e358ce628a06164b1984ee9486b6fcb56b78f26efc55" => :mavericks
|
|
|
|
sha256 "f598056ff1d988ee2f96b3f8bd34e83fc23418e1880b85bd215766de20029262" => :mountain_lion
|
2014-10-23 11:11:39 +00:00
|
|
|
end
|
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "intltool" => :build
|
|
|
|
depends_on "gettext"
|
|
|
|
depends_on "glib"
|
|
|
|
depends_on "libsoup"
|
2013-06-30 16:10:54 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
2015-09-07 16:36:35 +00:00
|
|
|
|
|
|
|
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
|
2013-06-30 16:10:54 +00:00
|
|
|
end
|