aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/libgit2-glib.rb48
1 files changed, 48 insertions, 0 deletions
diff --git a/Library/Formula/libgit2-glib.rb b/Library/Formula/libgit2-glib.rb
new file mode 100644
index 000000000..ae957e1e2
--- /dev/null
+++ b/Library/Formula/libgit2-glib.rb
@@ -0,0 +1,48 @@
+class Libgit2Glib < Formula
+ homepage "https://github.com/GNOME/libgit2-glib"
+ url "http://ftp.gnome.org/pub/GNOME/sources/libgit2-glib/0.0/libgit2-glib-0.0.24.tar.xz"
+ sha256 "8a0a6f65d86f2c8cb9bcb20c5e0ea6fd02271399292a71fc7e6852f13adbbdb8"
+
+ head do
+ url "https://github.com/GNOME/libgit2-glib.git"
+
+ depends_on "libtool" => :build
+ depends_on "automake" => :build
+ depends_on "autoconf" => :build
+ depends_on "gnome-common" => :build
+ depends_on "gtk-doc" => :build
+ end
+
+ depends_on "pkg-config" => :build
+ depends_on "gettext"
+ depends_on "libgit2" => "with-libssh2"
+ depends_on "gobject-introspection"
+ depends_on "glib"
+ depends_on "vala" => :optional
+ depends_on :python => :optional
+
+ def install
+ args = %W[
+ --prefix=#{prefix}
+ --disable-silent-rules
+ --disable-dependency-tracking
+ ]
+
+ args << "--enable-python=no" if build.without? "python"
+ args << "--enable-vala=no" if build.without? "vala"
+
+ system "./autogen.sh", *args if build.head?
+ system "./configure", *args if build.stable?
+ system "make", "install"
+
+ libexec.install "examples/.libs", "examples/clone", "examples/general", "examples/walk"
+ end
+
+ test do
+ mkdir "horatio"
+ cd "horatio" do
+ system "git", "init"
+ end
+ system "#{libexec}/general", testpath/"horatio"
+ end
+end