Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
Merge pull request #85 from boxen/bump-to-git-2.12.2
Browse files Browse the repository at this point in the history
Bump git to `2.12.2`
  • Loading branch information
jacobbednarz authored Apr 24, 2017
2 parents b792a67 + e6d9f84 commit 82bcaac
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sudo: false
script: "./script/cibuild"
gemfile: "this/does/not/exist"
rvm:
- "1.8.7"
- "2.0.0"
2 changes: 1 addition & 1 deletion data/Darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
git::configdir: "%{::boxen::config::configdir}/git"

git::package: 'boxen/brews/git'
git::version: '2.11.0'
git::version: '2.12.2'

git::credentialhelper: "%{::boxen::config::repodir}/script/boxen-git-credential"
git::global_credentialhelper: "%{boxen::config::home}/bin/boxen-git-credential"
Expand Down
56 changes: 25 additions & 31 deletions files/brews/git.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
class Git < Formula
desc "Distributed revision control system"
homepage "https://git-scm.com"
url "https://www.kernel.org/pub/software/scm/git/git-2.11.0.tar.xz"
sha256 "7e7e8d69d494892373b87007674be5820a4bc1ef596a0117d03ea3169119fd0b"

url "https://www.kernel.org/pub/software/scm/git/git-2.12.2.tar.xz"
sha256 "d21a9e23506e618d561fb25a8a7bd6134f927b86147930103487117a7a678c4a"
head "https://github.com/git/git.git", :shallow => false

bottle do
sha256 "3e57569cb8058b98a9c46fe7cf0e65b2b4007286dd607256446abd5cac0e9d8a" => :sierra
sha256 "505487e55a7a38e08c06f8ac301fa33d4c890c10432ffb3bde5a173dd2fa12b8" => :el_capitan
sha256 "dc138bfcb944111b4c94f95bd985b8f406ba8fb33e2a449cf641ca5463fee04d" => :yosemite
sha256 "b2f5e8d1be066285f723d17173d1c6cd854ebd419dc3e440bb18e277b09ae22c" => :sierra
sha256 "7f17f19cce5cee6509ab3c5c5ceb6e74bc5bd198c2488752c4e32d1478771225" => :el_capitan
sha256 "ffada28a5ff7e7c2c0de2d2dfb5eac0396faeb24d4bdbc929a5177e23aadb81f" => :yosemite
end

option "with-blk-sha1", "Compile with the block-optimized SHA1 implementation"
Expand All @@ -32,34 +31,29 @@ class Git < Formula
end

resource "html" do
url "https://www.kernel.org/pub/software/scm/git/git-htmldocs-2.11.0.tar.xz"
sha256 "3975399f1be3d959edf0fded03eab8fbf94787bfd0318b7644c77cf61e4a7b48"
url "https://www.kernel.org/pub/software/scm/git/git-htmldocs-2.12.2.tar.xz"
sha256 "6f656085c2fdca94df1cc3eb8624c38099f920318c428e34ef0333ecf7f4cd59"
end

resource "man" do
url "https://www.kernel.org/pub/software/scm/git/git-manpages-2.11.0.tar.xz"
sha256 "b3d3e78829c0b69b727aaca407ecfe239a46db3f354f16189f7a7c10af9528d8"
url "https://www.kernel.org/pub/software/scm/git/git-manpages-2.12.2.tar.xz"
sha256 "7ed1da04e6b0f7fb54a3c7546c6a30fe999b5c8ffcf5e3418521e7550b7f9558"
end

def install
# If these things are installed, tell Git build system to not use them
# If these things are installed, tell Git build system not to use them
ENV["NO_FINK"] = "1"
ENV["NO_DARWIN_PORTS"] = "1"
ENV["V"] = "1" # build verbosely
ENV["NO_R_TO_GCC_LINKER"] = "1" # pass arguments to LD correctly
ENV["PYTHON_PATH"] = which "python"
ENV["PERL_PATH"] = which "perl"

# Support Tcl versions before "lime" color name was introduced
# https://github.com/Homebrew/homebrew-core/issues/115
# https://www.mail-archive.com/git%40vger.kernel.org/msg92017.html
inreplace "gitk-git/gitk", "lime", '"#99FF00"'

perl_version = /\d\.\d+/.match(`perl --version`)

if build.with? "brewed-svn"
ENV["PERLLIB_EXTRA"] = %W[
#{Formula["subversion"].opt_prefix}/lib/perl5/site_perl
#{Formula["subversion"].opt_lib}/perl5/site_perl
#{Formula["subversion"].opt_prefix}/Library/Perl/#{perl_version}/darwin-thread-multi-2level
].join(":")
elsif MacOS.version >= :mavericks
Expand Down Expand Up @@ -96,7 +90,7 @@ def install

system "make", "install", *args

# Install the OS X keychain credential helper
# Install the macOS keychain credential helper
cd "contrib/credential/osxkeychain" do
system "make", "CC=#{ENV.cc}",
"CFLAGS=#{ENV.cflags}",
Expand All @@ -105,6 +99,12 @@ def install
system "make", "clean"
end

# Install the netrc credential helper
cd "contrib/credential/netrc" do
system "make", "test"
bin.install "git-credential-netrc"
end

# Install git-subtree
cd "contrib/subtree" do
system "make", "CC=#{ENV.cc}",
Expand Down Expand Up @@ -132,12 +132,12 @@ def install
end

elisp.install Dir["contrib/emacs/*.el"]
(share+"git-core").install "contrib"
(share/"git-core").install "contrib"

# We could build the manpages ourselves, but the build process depends
# on many other packages, and is somewhat crazy, this way is easier.
man.install resource("man")
(share+"doc/git-doc").install resource("html")
(share/"doc/git-doc").install resource("html")

# Make html docs world-readable
chmod 0644, Dir["#{share}/doc/git-doc/**/*.{html,txt}"]
Expand All @@ -146,19 +146,13 @@ def install
# To avoid this feature hooking into the system OpenSSL, remove it.
# If you need it, install git --with-brewed-openssl.
rm "#{libexec}/git-core/git-imap-send" if build.without? "brewed-openssl"

# Set the OS X keychain credential helper by default
# (as Apple's CLT's git also does this).
(buildpath/"gitconfig").write <<-EOS.undent
[credential]
\thelper = osxkeychain
EOS
etc.install "gitconfig"
end

test do
HOMEBREW_REPOSITORY.cd do
assert_equal "bin/brew", `#{bin}/git ls-files -- bin`.strip
end
system bin/"git", "init"
%w[haunted house].each { |f| touch testpath/f }
system bin/"git", "add", "haunted", "house"
system bin/"git", "commit", "-a", "-m", "Initial Commit"
assert_equal "haunted\nhouse", shell_output("#{bin}/git ls-files").strip
end
end

0 comments on commit 82bcaac

Please sign in to comment.