fix qmake bug

This commit is contained in:
John Bintz 2011-08-23 18:47:15 -04:00
parent 4fb82c2e7c
commit 01b1fcce16

View File

@ -3,7 +3,6 @@ require 'rubygems/version'
module Qt
class NotInstalledError < StandardError; end
class Qmake
class << self
QMAKES = %w{qmake-qt4 qmake}
@ -17,14 +16,13 @@ module Qt
end
def command(project_file = nil)
spec = (case platform
when :linux
"#{path} -spec linux-g++"
"linux-g++"
when :freebsd
"#{path} -spec freebsd-g++"
"freebsd-g++"
when :mac_os_x
"#{path} -spec macx-g++"
"macx-g++"
end)
command = "#{path} -spec #{spec}"
@ -99,15 +97,15 @@ module Qt
%{sudo apt-get install make or sudo yum install make}
when :freebsd
%{install /usr/ports/devel/gmake}
when :darwin
when :mac_os_x
%{Install XCode, and/or sudo port install make}
end
)
$stderr.puts <<-MSG
make is not installed. You'll need to install it to build #{@name}.
#{install_method} should do it for you.
MSG
make is not installed. You'll need to install it to build #{@name}.
#{install_method} should do it for you.
MSG
raise NotInstalledError
end
end
@ -118,26 +116,26 @@ MSG
case platform
when :linux
<<-MSG
sudo apt-get install libqt4-dev qt4-qmake on Debian-based systems, or downloading
Nokia's prebuilt binary at http://qt.nokia.com/downloads/
MSG
sudo apt-get install libqt4-dev qt4-qmake on Debian-based systems, or downloading
Nokia's prebuilt binary at http://qt.nokia.com/downloads/
MSG
when :freebsd
<<-MSG
Install /usr/ports/www/qt4-webkit and /usr/ports/devel/qmake4.
MSG
when :darwin
Install /usr/ports/www/qt4-webkit and /usr/ports/devel/qmake4.
MSG
when :mac_os_x
<<-MSG
sudo port install qt4-mac (for the patient) or downloading Nokia's pre-built binary
at http://qt.nokia.com/downloads/
MSG
sudo port install qt4-mac (for the patient) or downloading Nokia's pre-built binary
at http://qt.nokia.com/downloads/
MSG
end
).strip
$stderr.puts <<-MSG
qmake is not installed or is not the right version (#{@name} needs Qt 4.7 or above).
You'll need to install it to build #{@name}.
#{install_method} should do it for you.
MSG
qmake is not installed or is not the right version (#{@name} needs Qt 4.7 or above).
You'll need to install it to build #{@name}.
#{install_method} should do it for you.
MSG
end
end
end