aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/qt.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/Library/Formula/qt.rb b/Library/Formula/qt.rb
index e7a4b847e..c5057bc71 100644
--- a/Library/Formula/qt.rb
+++ b/Library/Formula/qt.rb
@@ -16,10 +16,14 @@ class Qt <Formula
['--with-qt3support', "Enable deprecated Qt3Support module."],
]
end
+
+ def self.x11?
+ File.exist? "/usr/X11R6/lib"
+ end
depends_on "dbus" if ARGV.include? '--with-dbus'
depends_on "dbus" if ARGV.include? '--with-qt3support'
- depends_on 'libpng' unless File.exist? "/usr/X11R6/lib"
+ depends_on 'libpng' unless x11?
def install
if version == '4.5.3'
@@ -48,7 +52,7 @@ class Qt <Formula
conf_args << "-no-qt3support"
end
- if File.exist? "/usr/X11R6/lib"
+ if x11?
conf_args << "-L/usr/X11R6/lib"
conf_args << "-I/usr/X11R6/include"
else