2013-06-30 16:11:18 +00:00
|
|
|
class Gupnp < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Framework for creating UPnP devices and control points"
|
2015-04-23 21:32:52 +00:00
|
|
|
homepage "https://wiki.gnome.org/Projects/GUPnP"
|
2015-12-31 12:28:02 +00:00
|
|
|
url "https://download.gnome.org/sources/gupnp/0.20/gupnp-0.20.15.tar.xz"
|
|
|
|
sha256 "0446b42d0d5b8adfcdca78832f2ce6173ab33793fca055afc97aec1fcc579fe2"
|
2015-04-23 21:32:52 +00:00
|
|
|
|
|
|
|
head do
|
|
|
|
url "https://github.com/GNOME/gupnp.git"
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "gnome-common" => :build
|
|
|
|
depends_on "gtk-doc" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
end
|
2013-06-30 16:11:18 +00:00
|
|
|
|
2014-10-22 14:41:52 +00:00
|
|
|
bottle do
|
2016-01-01 03:37:32 +00:00
|
|
|
sha256 "b0788f609fc704c4e8c4b43a08a47f3d91fbc039e8957b61fcf8e0420e92a56f" => :el_capitan
|
|
|
|
sha256 "5fe19250a1d5da1674cbbd88a940910c9b24ade3bd7e49f9bfa23a32779e256e" => :yosemite
|
|
|
|
sha256 "d2211b56feaa7c0ece990c42079b62145328eb4debf7bdd95a5f106ce72c4fc5" => :mavericks
|
2014-10-22 14:41:52 +00:00
|
|
|
end
|
|
|
|
|
2014-05-11 16:21:35 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "intltool" => :build
|
|
|
|
depends_on "gettext"
|
|
|
|
depends_on "glib"
|
|
|
|
depends_on "libsoup"
|
|
|
|
depends_on "gssdp"
|
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
# REVIEW: if patch was applied in the next release
|
2015-07-03 01:09:06 +00:00
|
|
|
# https://github.com/GNOME/gupnp/pull/1
|
|
|
|
patch :p0 do
|
2015-10-07 16:46:21 +00:00
|
|
|
url "https://raw.githubusercontent.com/Homebrew/patches/51584eb/gupnp/patch-osx-uuid.diff"
|
2015-07-03 01:09:06 +00:00
|
|
|
sha256 "9cca169cc830c331ac4246e0e87f5c0b47a85b045c4a0de7cd4999d89d2ab5ce"
|
|
|
|
end
|
|
|
|
|
2013-06-30 16:11:18 +00:00
|
|
|
def install
|
2015-04-23 21:32:52 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-debug
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--disable-silent-rules
|
|
|
|
--prefix=#{prefix}
|
|
|
|
]
|
|
|
|
if build.head?
|
|
|
|
ENV.append "CFLAGS", "-I/usr/include/uuid"
|
|
|
|
system "./autogen.sh", *args
|
|
|
|
else
|
|
|
|
system "./configure", *args
|
|
|
|
end
|
2013-06-30 16:11:18 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
2015-04-23 21:32:52 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
system bin/"gupnp-binding-tool", "--help"
|
|
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
|
|
#include <libgupnp/gupnp-control-point.h>
|
|
|
|
|
|
|
|
static GMainLoop *main_loop;
|
|
|
|
|
|
|
|
int main (int argc, char **argv)
|
|
|
|
{
|
|
|
|
GUPnPContext *context;
|
|
|
|
GUPnPControlPoint *cp;
|
|
|
|
|
|
|
|
context = gupnp_context_new (NULL, NULL, 0, NULL);
|
|
|
|
cp = gupnp_control_point_new
|
|
|
|
(context, "urn:schemas-upnp-org:service:WANIPConnection:1");
|
|
|
|
|
|
|
|
main_loop = g_main_loop_new (NULL, FALSE);
|
|
|
|
g_main_loop_unref (main_loop);
|
|
|
|
g_object_unref (cp);
|
|
|
|
g_object_unref (context);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
system ENV.cc, "-I#{include}/gupnp-1.0", "-L#{lib}", "-lgupnp-1.0",
|
|
|
|
"-I#{Formula["gssdp"].opt_include}/gssdp-1.0",
|
|
|
|
"-I#{Formula["gssdp"].opt_lib}", "-lgssdp-1.0",
|
|
|
|
"-I#{Formula["glib"].opt_include}/glib-2.0",
|
|
|
|
"-I#{Formula["glib"].opt_lib}/glib-2.0/include",
|
|
|
|
"-lglib-2.0", "-lgobject-2.0",
|
|
|
|
"-I#{Formula["libsoup"].opt_include}/libsoup-2.4",
|
|
|
|
"-I/usr/include/libxml2",
|
|
|
|
testpath/"test.c", "-o", testpath/"test"
|
|
|
|
system "./test"
|
|
|
|
end
|
2013-06-30 16:11:18 +00:00
|
|
|
end
|