aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/ranger.rb
diff options
context:
space:
mode:
authorMisty De Meo2014-08-11 12:13:35 -0700
committerMisty De Meo2014-08-12 17:28:49 -0700
commit3f4e8ddbb8cbba9e20ef4a79526a3667adf5e743 (patch)
tree70c2eeda9d09ff7c1ecdecdf9c370d3148537208 /Library/Formula/ranger.rb
parenteeef186fae0b5926e3071d93c7dbc01773bde6fb (diff)
downloadhomebrew-3f4e8ddbb8cbba9e20ef4a79526a3667adf5e743.tar.bz2
ranger: use :python on 10.5 and lower
Fixes mistydemeo/tigerbrew#218.
Diffstat (limited to 'Library/Formula/ranger.rb')
-rw-r--r--Library/Formula/ranger.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Formula/ranger.rb b/Library/Formula/ranger.rb
index 94a8dcb50..0cd41ddc9 100644
--- a/Library/Formula/ranger.rb
+++ b/Library/Formula/ranger.rb
@@ -7,7 +7,14 @@ class Ranger < Formula
head 'git://git.savannah.nongnu.org/ranger.git'
+ # requires 2.6 or newer; Leopard comes with 2.5
+ depends_on :python if MacOS.version <= :leopard
+
def install
+ inreplace %w[ranger.py ranger/ext/rifle.py] do |s|
+ s.gsub! "#!/usr/bin/python", "#!#{PythonDependency.new.which_python}"
+ end if MacOS.version <= :leopard
+
man1.install 'doc/ranger.1'
libexec.install 'ranger.py', 'ranger'
bin.install_symlink libexec+'ranger.py' => 'ranger'