54 lines
1.6 KiB
Ruby
54 lines
1.6 KiB
Ruby
class Libgit2Glib < Formula
|
|
desc "Glib wrapper library around libgit2 git access library"
|
|
homepage "https://github.com/GNOME/libgit2-glib"
|
|
url "https://download.gnome.org/sources/libgit2-glib/0.24/libgit2-glib-0.24.0.tar.xz"
|
|
sha256 "d616c268821c28ff8dc1a6419dbf8555fa48e31dc6509c10f5151be7690f4845"
|
|
|
|
bottle do
|
|
sha256 "aa8656e213e6eb56bbc095e15f56c20b6015fb89a82a960323473da59da592c0" => :el_capitan
|
|
sha256 "5b1b074b2862cda8d3afec6cf6f59662f2b33766168ead3206e5ea3d2b96e323" => :yosemite
|
|
sha256 "947fe370112c6a238d4cb1ccb6e8523832d49120eb2efad7a897e91b0ee9b601" => :mavericks
|
|
end
|
|
|
|
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"
|
|
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" do
|
|
system "git", "init"
|
|
end
|
|
system "#{libexec}/general", testpath/"horatio"
|
|
end
|
|
end
|