homebrew-core/Formula/libinfinity.rb
Baptiste Fontaine 07dc2b3c99 batch http->https fixes
Closes Homebrew/homebrew#41553.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-07-12 12:53:09 +02:00

78 lines
2.3 KiB
Ruby

class Libinfinity < Formula
desc "GObject-based C implementation of the Infinote protocol"
homepage "https://gobby.github.io"
url "http://releases.0x539.de/libinfinity/libinfinity-0.6.6.tar.gz"
sha256 "3df9397b52d61392cbe98084aada9b7362a34811ef21baa0db87fdfd754f92cc"
bottle do
revision 1
sha256 "07e6ddb3637ebf634a64af6dae46cde353fc5fa8e89bf0fd5958eb38a305c877" => :yosemite
sha256 "c74520bb5b208f9e43390c69682745edeef0ffd8b8d30ec84805a2300e1dce4a" => :mavericks
sha256 "75561e4d4ad9a8e35c624442e420a53e4dc521437e985a9531580b2797d24124" => :mountain_lion
end
depends_on "pkg-config" => :build
depends_on "glib"
depends_on "gtk+3"
depends_on "gnutls"
depends_on "gsasl"
# MacPorts patch to fix pam include. This is still applicable to 0.6.4.
patch :p0 do
url "https://trac.macports.org/export/92297/trunk/dports/comms/libinfinity/files/patch-infinoted-infinoted-pam.c.diff"
sha1 "30bdd7dc80bf50fc1e0d9747fc67d84b229c01ef"
end
def install
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--with-gtk3", "--with-inftextgtk", "--with-infgtk"
system "make", "install"
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <libinfinity/common/inf-init.h>
int main(int argc, char *argv[]) {
GError *error = NULL;
gboolean status = inf_init(&error);
return 0;
}
EOS
ENV.libxml2
gettext = Formula["gettext"]
glib = Formula["glib"]
gnutls = Formula["gnutls"]
gsasl = Formula["gsasl"]
libtasn1 = Formula["libtasn1"]
nettle = Formula["nettle"]
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#{gnutls.opt_include}
-I#{gsasl.opt_include}
-I#{include}/libinfinity-0.6
-I#{libtasn1.opt_include}
-I#{nettle.opt_include}
-D_REENTRANT
-L#{gettext.opt_lib}
-L#{glib.opt_lib}
-L#{gnutls.opt_lib}
-L#{gsasl.opt_lib}
-L#{lib}
-lglib-2.0
-lgnutls
-lgobject-2.0
-lgsasl
-lgthread-2.0
-linfinity-0.6
-lintl
-lxml2
]
system ENV.cc, "test.c", "-o", "test", *flags
system "./test"
end
end