Make it compile on FreeBSD.

This commit is contained in:
Mathieu Arnold 2011-07-25 15:22:04 +02:00
parent f9e3bdfbce
commit 6a4d426109

View File

@ -17,6 +17,8 @@ module Qt
case platform case platform
when :linux when :linux
"#{path} -spec linux-g++" "#{path} -spec linux-g++"
when :freebsd
"#{path} -spec freebsd-g++"
when :mac_os_x when :mac_os_x
"#{path} -spec macx-g++" "#{path} -spec macx-g++"
end end
@ -37,17 +39,19 @@ module Qt
# We need integration tests for these! # We need integration tests for these!
# #
def path def path
get_exe_path('qmake') get_exe_path('qmake-qt4') || get_exe_path('qmake')
end end
def make_path def make_path
get_exe_path('make') get_exe_path('gmake') || get_exe_path('make')
end end
def platform def platform
case RbConfig::CONFIG['host_os'] case RbConfig::CONFIG['host_os']
when /linux/ when /linux/
:linux :linux
when /freebsd/i
:freebsd
when /darwin/ when /darwin/
:mac_os_x :mac_os_x
end end
@ -77,6 +81,8 @@ module Qt
case platform case platform
when :linux when :linux
%{sudo apt-get install make or sudo yum install make} %{sudo apt-get install make or sudo yum install make}
when :freebsd
%{install /usr/ports/devel/gmake}
when :darwin when :darwin
%{Install XCode, and/or sudo port install make} %{Install XCode, and/or sudo port install make}
end end
@ -98,6 +104,10 @@ MSG
<<-MSG <<-MSG
sudo apt-get install libqt4-dev qt4-qmake on Debian-based systems, or downloading sudo apt-get install libqt4-dev qt4-qmake on Debian-based systems, or downloading
Nokia's prebuilt binary at http://qt.nokia.com/downloads/ Nokia's prebuilt binary at http://qt.nokia.com/downloads/
MSG
when :freebsd
<<-MSG
Install /usr/ports/devel/qmake4.
MSG MSG
when :darwin when :darwin
<<-MSG <<-MSG
@ -122,6 +132,10 @@ MSG
<<-MSG <<-MSG
sudo apt-get install libqt4-dev qt4-qmake on Debian-based systems, or downloading sudo apt-get install libqt4-dev qt4-qmake on Debian-based systems, or downloading
Nokia's prebuilt binary at http://qt.nokia.com/downloads/ Nokia's prebuilt binary at http://qt.nokia.com/downloads/
MSG
when :freebsd
<<-MSG
Install /usr/ports/www/qt4-webkit.
MSG MSG
when :darwin when :darwin
<<-MSG <<-MSG