diff options
Diffstat (limited to 'Library/Formula/libgit2.rb')
| -rw-r--r-- | Library/Formula/libgit2.rb | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Library/Formula/libgit2.rb b/Library/Formula/libgit2.rb index 8cf3056e6..81666debf 100644 --- a/Library/Formula/libgit2.rb +++ b/Library/Formula/libgit2.rb @@ -1,7 +1,7 @@ require "formula" class Libgit2 < Formula - homepage "http://libgit2.github.com/" + homepage "https://libgit2.github.com/" url "https://github.com/libgit2/libgit2/archive/v0.21.3.tar.gz" sha1 "d116cb15f76edf2283c85da40389e4fecc8d5aeb" @@ -14,16 +14,24 @@ class Libgit2 < Formula sha1 "059ee25e0a3d46ad685b3d55394ae1c8a007da70" => :mountain_lion end + option :universal + depends_on "cmake" => :build depends_on "libssh2" => :optional depends_on "openssl" def install + args = std_cmake_args + args << "-DBUILD_TESTS=NO" + + if build.universal? + ENV.universal_binary + args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}" + end + mkdir "build" do - system "cmake", "..", - "-DBUILD_TESTS=NO", - *std_cmake_args - system "make install" + system "cmake", "..", *args + system "make", "install" end end end |
