From a34b749aa3fa39fa4539c8de77e7a0a0f78e8c48 Mon Sep 17 00:00:00 2001 From: Samuel John Date: Mon, 18 Mar 2013 18:11:59 +0100 Subject: qt5: Build on Xcode-only Macs Qt5 needs a -sdk flag and the -I to find some CFNumber.h. --- Library/Formula/qt5.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Library/Formula') diff --git a/Library/Formula/qt5.rb b/Library/Formula/qt5.rb index f282e0f0c..790e59308 100644 --- a/Library/Formula/qt5.rb +++ b/Library/Formula/qt5.rb @@ -20,6 +20,7 @@ class Qt5 < Formula depends_on "d-bus" if build.include? 'with-qtdbus' depends_on "mysql" if build.include? 'with-mysql' + depends_on "jpeg" def patches # http://qt.gitorious.org/qt/qtbase/commit/655ba5?format=patch @@ -32,6 +33,13 @@ class Qt5 < Formula "-system-libpng", "-system-zlib", "-confirm-license", "-opensource"] + unless MacOS::CLT.installed? + # Qt hard-codes paths (and uses -I flags) and linking fails on Xcode-only + args += ["-sdk", MacOS.sdk_path] + # Even with sdk given, Qt5 is too stupid to find CFNumber.h, so we give a hint: + ENV.append 'CXXFLAGS', "-I#{MacOS.sdk_path}/System/Library/Frameworks/CoreFoundation.framework/Headers" + end + args << "-L#{MacOS::X11.prefix}/lib" << "-I#{MacOS::X11.prefix}/include" if MacOS::X11.installed? args << "-plugin-sql-mysql" if build.include? 'with-mysql' -- cgit v1.2.3