Permalink
Browse files

Rakefile refactor

  • Loading branch information...
guns committed Jan 27, 2012
1 parent 4a2d60b commit 6e9b0bfd3cd873a11069dc452b0d34694a37f5ad
Showing with 3 additions and 3 deletions.
  1. +3 −3 Rakefile
View
@@ -12,7 +12,7 @@ task :env do
if RUBY_PLATFORM =~ /darwin/i
# Homebrew linking help
- if system 'command -v brew &>/dev/null'
+ if system "/bin/sh -c 'command -v brew' &>/dev/null"
%w[libgcrypt libgpg-error gettext gnutls].each do |pkg|
cellar = %x(brew --prefix #{pkg}).chomp
ENV['CFLAGS' ] += " -I#{cellar}/include "
@@ -29,7 +29,7 @@ task :cmake => :env do
cmd = %W[cmake .. -DPREFIX=#{ENV['PREFIX'] || '/opt/weechat'} -DCMAKE_BUILD_TYPE=None -Wno-dev]
# Arch Linux has boldly moved to Python 3, but nobody's following
- cmd << '-DPYTHON_EXECUTABLE=/usr/bin/python2' if %x(uname -a) =~ /ARCH/
+ cmd << '-DPYTHON_EXECUTABLE=/usr/bin/python2' if %x(python --version)[/\b(\d+)\.\d+\.\d+/, 1].to_i > 2
mkdir_p 'build'
Dir.chdir('build') { sh *cmd }
@@ -48,6 +48,6 @@ task :build => [:cmake, :make]
desc 'Install weechat'
task :install => :env do
Dir.chdir 'build' do
- sh *%W[make install]
+ sh 'make install'
end
end

0 comments on commit 6e9b0bf

Please sign in to comment.