Merge pull request #1420 from birarda/injected-audio

updated patched qt5 homebrew formula
This commit is contained in:
Stephen Birarda 2013-12-20 10:58:44 -08:00
commit eadf39872e

49
qt5.rb
View file

@ -1,19 +1,39 @@
# this is a Qt5 formula patched to remove support for the CoreWLAN module on OS X
# which was causing us problems with constant WLAN scans
# the change is a removal of the following line in bearer.pro
# mac:contains(QT_CONFIG, corewlan):SUBDIRS += corewlan
require 'formula'
class Qt5HeadDownloadStrategy < GitDownloadStrategy
include FileUtils
def support_depth?
# We need to make a local clone so we can't use "--depth 1"
false
end
def stage
@clone.cd { reset }
safe_system 'git', 'clone', @clone, '.'
ln_s @clone, 'qt'
safe_system './init-repository', '--mirror', "#{Dir.pwd}/"
rm 'qt'
end
end
class Qt5 < Formula
homepage 'http://qt-project.org/'
url 'https://dl.dropboxusercontent.com/u/1864924/5.2.0-beta1/qt-everywhere-opensource-nocorewlan-src-5.2.0-beta1.tar.gz'
sha1 'd9f646fd2e9ed6e086350b767ee5da81bca9e16b'
head 'git://gitorious.org/qt/qt5.git', :branch => 'stable'
url 'https://highfidelity-public.s3.amazonaws.com/packages/qt-everywhere-opensource-nocorewlan-src-5.2.0.tar.gz'
sha1 '07ef1ca133db4a5168d8a716e99d145432832a24'
head 'git://gitorious.org/qt/qt5.git', :branch => 'stable',
:using => Qt5HeadDownloadStrategy
bottle do
revision 1
sha1 '7cf5fec167c1b0d8a8a719fad79756b9892d04dd' => :mountain_lion
sha1 '5d6a4a10362ba66d6471cd45a40b1bcde8137f62' => :lion
sha1 'd1790e3b17b5a0855efa8df68187a62774aad9b9' => :snow_leopard
sha1 '38ae6b107af1e34635cf9e6efc69e630518cc0a6' => :mavericks
sha1 '7623e90ae623360a1f6ca282ca8003ae8ee04c55' => :mountain_lion
sha1 '1f58eab10d42880b444c6c151e2075227574fa8d' => :lion
end
keg_only "Qt 5 conflicts Qt 4 (which is currently much more widely used)."
@ -42,6 +62,10 @@ class Qt5 < Formula
ENV.append 'CXXFLAGS', "-I#{MacOS.sdk_path}/System/Library/Frameworks/CoreFoundation.framework/Headers"
end
# https://bugreports.qt-project.org/browse/QTBUG-34382
args << "-no-xcb"
args << "-L#{MacOS::X11.lib}" << "-I#{MacOS::X11.include}" if MacOS::X11.installed?
args << "-plugin-sql-mysql" if build.with? 'mysql'
@ -68,17 +92,6 @@ class Qt5 < Formula
ENV.j1
system "make install"
# Fix https://github.com/mxcl/homebrew/issues/20020 (upstream: https://bugreports.qt-project.org/browse/QTBUG-32417)
system "install_name_tool", "-change", "#{pwd}/qtwebkit/lib/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets", #old
"#{lib}/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets", #new
"#{libexec}/QtWebProcess" # in this lib
system "install_name_tool", "-change", "#{pwd}/qtwebkit/lib/QtWebKit.framework/Versions/5/QtWebKit",
"#{lib}/QtWebKit.framework/Versions/5/QtWebKit",
"#{prefix}/qml/QtWebKit/libqmlwebkitplugin.dylib"
system "install_name_tool", "-change", "#{pwd}/qtwebkit/lib/QtWebKit.framework/Versions/5/QtWebKit",
"#{lib}/QtWebKit.framework/Versions/5/QtWebKit",
"#{lib}/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets"
# Some config scripts will only find Qt in a "Frameworks" folder
cd prefix do
ln_s lib, frameworks