qt5: build with secure transport

Closes Homebrew/homebrew#41367.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Dominyk Tiller 2015-07-05 06:15:29 +01:00 committed by Mike McQuaid
parent 553baf5441
commit f58458ce93

View file

@ -12,15 +12,19 @@ end
class Qt5 < Formula class Qt5 < Formula
desc "Version 5 of the Qt framework" desc "Version 5 of the Qt framework"
homepage "https://www.qt.io/" homepage "https://www.qt.io/"
url "https://download.qt.io/official_releases/qt/5.5/5.5.0/single/qt-everywhere-opensource-src-5.5.0.tar.xz" head "https://code.qt.io/qt/qt5.git", :branch => "5.5", :shallow => false
mirror "https://www.mirrorservice.org/sites/download.qt-project.org/official_releases/qt/5.5/5.5.0/single/qt-everywhere-opensource-src-5.5.0.tar.xz"
sha256 "7ea2a16ecb8088e67db86b0835b887d5316121aeef9565d5d19be3d539a2c2af"
# Apple's 3.6.0svn based clang doesn't support -Winconsistent-missing-override stable do
# https://bugreports.qt.io/browse/QTBUG-46833 url "https://download.qt.io/official_releases/qt/5.5/5.5.0/single/qt-everywhere-opensource-src-5.5.0.tar.xz"
# This is fixed in 5.5 branch and below patch should be removed mirror "https://www.mirrorservice.org/sites/download.qt-project.org/official_releases/qt/5.5/5.5.0/single/qt-everywhere-opensource-src-5.5.0.tar.xz"
# when this formula is updated to 5.5.1 sha256 "7ea2a16ecb8088e67db86b0835b887d5316121aeef9565d5d19be3d539a2c2af"
patch :DATA
# Apple's 3.6.0svn based clang doesn't support -Winconsistent-missing-override
# https://bugreports.qt.io/browse/QTBUG-46833
# This is fixed in 5.5 branch and below patch should be removed
# when this formula is updated to 5.5.1
patch :DATA
end
bottle do bottle do
sha256 "1d3aee1664b44e912ddd307fc7f1eff25e835452ce44705acaa4162f79006ef7" => :yosemite sha256 "1d3aee1664b44e912ddd307fc7f1eff25e835452ce44705acaa4162f79006ef7" => :yosemite
@ -28,8 +32,6 @@ class Qt5 < Formula
sha256 "855e075b522199c52876f44fe2d2a63e4c4b4f9bfd5c6edb0e3dc850fd02ef34" => :mountain_lion sha256 "855e075b522199c52876f44fe2d2a63e4c4b4f9bfd5c6edb0e3dc850fd02ef34" => :mountain_lion
end end
head "https://code.qt.io/qt/qt5.git", :branch => "5.5", :shallow => false
keg_only "Qt 5 conflicts Qt 4 (which is currently much more widely used)." keg_only "Qt 5 conflicts Qt 4 (which is currently much more widely used)."
option :universal option :universal
@ -49,20 +51,15 @@ class Qt5 < Formula
depends_on :mysql => :optional depends_on :mysql => :optional
depends_on :xcode => :build depends_on :xcode => :build
# There needs to be an OpenSSL dep here ideally, but qt keeps ignoring it.
# Keep nagging upstream for a fix to this problem, and revision when possible.
# https://github.com/Homebrew/homebrew/pull/34929
# https://bugreports.qt.io/browse/QTBUG-42161
# https://bugreports.qt.io/browse/QTBUG-43456
depends_on OracleHomeVarRequirement if build.with? "oci" depends_on OracleHomeVarRequirement if build.with? "oci"
def install def install
ENV.universal_binary if build.universal? ENV.universal_binary if build.universal?
args = ["-prefix", prefix, args = ["-prefix", prefix,
"-system-zlib", "-system-zlib", "-securetransport",
"-qt-libpng", "-qt-libjpeg", "-qt-libpng", "-qt-libjpeg",
"-no-rpath", "-no-openssl",
"-confirm-license", "-opensource", "-confirm-license", "-opensource",
"-nomake", "tests", "-release"] "-nomake", "tests", "-release"]
@ -123,15 +120,41 @@ class Qt5 < Formula
Pathname.glob("#{bin}/*.app") { |app| mv app, prefix } Pathname.glob("#{bin}/*.app") { |app| mv app, prefix }
end end
test do
system "#{bin}/qmake", "-project"
end
def caveats; <<-EOS.undent def caveats; <<-EOS.undent
We agreed to the Qt opensource license for you. We agreed to the Qt opensource license for you.
If this is unacceptable you should uninstall. If this is unacceptable you should uninstall.
EOS EOS
end end
test do
(testpath/"hello.pro").write <<-EOS.undent
QT += core
QT -= gui
TARGET = hello
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
EOS
(testpath/"main.cpp").write <<-EOS.undent
#include <QCoreApplication>
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
qDebug() << "Hello World!";
return 0;
}
EOS
system bin/"qmake", testpath/"hello.pro"
system "make"
assert File.exist?("hello")
assert File.exist?("main.o")
system "./hello"
end
end end
__END__ __END__