aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-09-07 13:19:35 +0100
committerMike McQuaid2013-09-07 13:37:12 +0100
commit0b4ff8e74563f30384f59b886d815554fc77f308 (patch)
tree5749ebda240f073edbbf81f09423d3bfa41a7e25 /Library
parent7fd3b03236ce4f1353f6ea211fca7a1ed770ee22 (diff)
downloadhomebrew-0b4ff8e74563f30384f59b886d815554fc77f308.tar.bz2
qt, qt5: cleanup hacky, unused, misnamed options.
Closes #22321. Closes #22332.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/qt.rb35
-rw-r--r--Library/Formula/qt5.rb44
2 files changed, 29 insertions, 50 deletions
diff --git a/Library/Formula/qt.rb b/Library/Formula/qt.rb
index 222a60488..0da38065a 100644
--- a/Library/Formula/qt.rb
+++ b/Library/Formula/qt.rb
@@ -15,16 +15,17 @@ class Qt < Formula
head 'git://gitorious.org/qt/qt.git', :branch => '4.8'
option :universal
- option 'with-qtdbus', 'Enable QtDBus module'
- option 'with-qt3support', 'Enable deprecated Qt3Support module'
- option 'with-demos-examples', 'Enable Qt demos and examples'
- option 'with-docs', 'Build Qt documentation'
- option 'with-debug-and-release', 'Compile Qt in debug and release mode'
- option 'developer', 'Compile and link Qt with developer options'
-
- depends_on "d-bus" if build.with? 'qtdbus'
+ option 'with-qt3support', 'Build with deprecated Qt3Support module support'
+ option 'with-docs', 'Build documentation'
+ option 'developer', 'Build and link with developer options'
+
+ depends_on "d-bus" => :optional
depends_on "mysql" => :optional
+ odie 'qt: --with-qtdbus has been renamed to --with-d-bus' if ARGV.include? '--with-qtdbus'
+ odie 'qt: --with-demos-examples is no longer supported' if ARGV.include? '--with-demos-examples'
+ odie 'qt: --with-debug-and-release is no longer supported' if ARGV.include? '--with-debug-and-release'
+
def install
ENV.universal_binary if build.universal?
ENV.append "CXXFLAGS", "-fvisibility=hidden"
@@ -32,7 +33,8 @@ class Qt < Formula
args = ["-prefix", prefix,
"-system-zlib",
"-confirm-license", "-opensource",
- "-cocoa", "-fast" ]
+ "-nomake", "demos", "-nomake", "examples",
+ "-cocoa", "-fast", "-release"]
# we have to disable these to avoid triggering optimization code
# that will fail in superenv, perhaps because we rename clang to cc and
@@ -48,7 +50,7 @@ class Qt < Formula
args << "-plugin-sql-mysql" if build.with? 'mysql'
- if build.with? 'qtdbus'
+ if build.with? 'd-bus'
dbus_opt = Formula.factory('d-bus').opt_prefix
args << "-I#{dbus_opt}/lib/dbus-1.0/include"
args << "-I#{dbus_opt}/include/dbus-1.0"
@@ -62,10 +64,6 @@ class Qt < Formula
args << "-no-qt3support"
end
- unless build.with? 'demos-examples'
- args << "-nomake" << "demos" << "-nomake" << "examples"
- end
-
unless build.with? 'docs'
args << "-nomake" << "docs"
end
@@ -78,15 +76,6 @@ class Qt < Formula
args << '-arch' << 'x86'
end
- if build.with? 'debug-and-release'
- args << "-debug-and-release"
- # Debug symbols need to find the source so build in the prefix
- mv "../qt-everywhere-opensource-src-#{version}", "#{prefix}/src"
- cd "#{prefix}/src"
- else
- args << "-release"
- end
-
args << '-developer-build' if build.include? 'developer'
system "./configure", *args
diff --git a/Library/Formula/qt5.rb b/Library/Formula/qt5.rb
index 702fcebf5..086913113 100644
--- a/Library/Formula/qt5.rb
+++ b/Library/Formula/qt5.rb
@@ -17,20 +17,26 @@ class Qt5 < Formula
keg_only "Qt 5 conflicts Qt 4 (which is currently much more widely used)."
option :universal
- option 'with-qtdbus', 'Enable QtDBus module'
- option 'with-demos-examples', 'Enable Qt demos and examples'
- option 'with-debug-and-release', 'Compile Qt in debug and release mode'
- option 'with-mysql', 'Enable MySQL plugin'
- option 'developer', 'Compile and link Qt with developer options'
+ option 'with-docs', 'Build documentation'
+ option 'developer', 'Build and link with developer options'
- depends_on "d-bus" if build.include? 'with-qtdbus'
+ depends_on "d-bus" => :optional
depends_on "mysql" => :optional
+ odie 'qt5: --with-qtdbus has been renamed to --with-d-bus' if ARGV.include? '--with-qtdbus'
+ odie 'qt5: --with-demos-examples is no longer supported' if ARGV.include? '--with-demos-examples'
+ odie 'qt5: --with-debug-and-release is no longer supported' if ARGV.include? '--with-debug-and-release'
+
def install
ENV.universal_binary if build.universal?
args = ["-prefix", prefix,
"-system-zlib",
- "-confirm-license", "-opensource"]
+ "-confirm-license", "-opensource",
+ "-nomake", "examples",
+ "-release"]
+
+ # In latest head `-nomake demos` is no longer recognized
+ args << "-nomake" << "demos" unless build.head?
unless MacOS::CLT.installed?
# ... too stupid to find CFNumber.h, so we give a hint:
@@ -41,7 +47,7 @@ class Qt5 < Formula
args << "-plugin-sql-mysql" if build.with? 'mysql'
- if build.with? 'qtdbus'
+ if build.with? 'd-bus'
dbus_opt = Formula.factory('d-bus').opt_prefix
args << "-I#{dbus_opt}/lib/dbus-1.0/include"
args << "-I#{dbus_opt}/include/dbus-1.0"
@@ -49,10 +55,8 @@ class Qt5 < Formula
args << "-ldbus-1"
end
- unless build.include? 'with-demos-examples'
- args << "-nomake" << "examples"
- # In latest head `-nomake demos` is no longer recognized
- args << "-nomake" << "demos" unless build.head?
+ unless build.with? 'docs'
+ args << "-nomake" << "docs"
end
if MacOS.prefer_64_bit? or build.universal?
@@ -63,22 +67,8 @@ class Qt5 < Formula
args << '-arch' << 'x86'
end
- if build.include? 'with-debug-and-release'
- args << "-debug-and-release"
- else
- args << "-release"
- end
-
args << '-developer-build' if build.include? 'developer'
- # We move the source and build in-place because:
- # - Debug symbols need to find the source
- # - to fix https://github.com/mxcl/homebrew/issues/20020
- # - PySide `make apidoc` needs the src
- (prefix/"src").mkdir
- mv Dir['*'], "#{prefix}/src/"
- cd "#{prefix}/src"
-
system "./configure", *args
system "make"
ENV.j1
@@ -111,7 +101,7 @@ class Qt5 < Formula
end
test do
- system "#{bin}/qmake", "--version"
+ system "#{bin}/qmake", "-project"
end
def caveats; <<-EOS.undent