aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2011-02-12 09:49:26 +0000
committerMike McQuaid2011-02-12 11:27:28 +0000
commitb1135df7b352191ff68d200a010de4972156cb32 (patch)
tree3427a9ed894b212b98b26e375242eeda536c157a /Library
parent77dc3464c12d262d60fa44d546f5c02cd70a388c (diff)
downloadhomebrew-b1135df7b352191ff68d200a010de4972156cb32.tar.bz2
Add debug-and-release and universal options to Qt.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/qt.rb18
1 files changed, 14 insertions, 4 deletions
diff --git a/Library/Formula/qt.rb b/Library/Formula/qt.rb
index 69b68442f..b85f3f8a6 100644
--- a/Library/Formula/qt.rb
+++ b/Library/Formula/qt.rb
@@ -16,6 +16,8 @@ class Qt <Formula
['--with-qtdbus', "Enable QtDBus module."],
['--with-qt3support', "Enable deprecated Qt3Support module."],
['--with-demos-examples', "Enable Qt demos and examples."],
+ ['--with-debug-and-release', "Compile Qt in debug and release mode."],
+ ['--universal', "Build both x86_64 and x86 architectures."],
]
end
@@ -31,9 +33,8 @@ class Qt <Formula
ENV.append "CXXFLAGS", "-fvisibility=hidden"
args = ["-prefix", prefix,
"-system-libpng", "-system-zlib",
- "-release", "-cocoa",
"-confirm-license", "-opensource",
- "-fast"]
+ "-cocoa", "-fast" ]
# See: https://github.com/mxcl/homebrew/issues/issue/744
args << "-system-sqlite" if MACOS_VERSION <= 10.5
@@ -53,6 +54,12 @@ class Qt <Formula
args << "-no-qt3support"
end
+ if ARGV.include? '--with-debug-and-release'
+ args << "-debug-and-release"
+ else
+ args << "-release"
+ end
+
unless ARGV.include? '--with-demos-examples'
args << "-nomake" << "demos" << "-nomake" << "examples"
end
@@ -65,14 +72,17 @@ class Qt <Formula
args << "-I#{Formula.factory('libpng').include}"
end
- if snow_leopard_64?
+ if snow_leopard_64? or ARGV.include? '--universal'
args << '-arch' << 'x86_64'
- else
+ end
+
+ if !snow_leopard_64? or ARGV.include? '--universal'
args << '-arch' << 'x86'
end
system "./configure", *args
system "make"
+ ENV.j1
system "make install"
# stop crazy disk usage