aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorBrian Jensen2013-11-12 14:06:48 +0100
committerJack Nagel2013-11-19 13:44:31 -0600
commitede4ccbbc3dfee94e4c2d6273f5e9f644c4bfcb7 (patch)
treee74aae4535b17b13f12b7d533567b8082eb3d4fe /Library
parent509a4d9c8ce5225ea5f5b40475731d5c8f83f48a (diff)
downloadhomebrew-ede4ccbbc3dfee94e4c2d6273f5e9f644c4bfcb7.tar.bz2
pyqt: enable build with libc++ on Mavericks
Closes #24213. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/pyqt.rb39
1 files changed, 36 insertions, 3 deletions
diff --git a/Library/Formula/pyqt.rb b/Library/Formula/pyqt.rb
index 155228349..ce74b7e1c 100644
--- a/Library/Formula/pyqt.rb
+++ b/Library/Formula/pyqt.rb
@@ -16,17 +16,36 @@ class Pyqt < Formula
depends_on 'sip'
end
+ def patches
+ # On Mavericks we want to target libc++, but this requires a user specified
+ # qmake makespec. Unfortunately user specified makespecs are broken in the
+ # configure.py script, so we have to fix the makespec path handling logic.
+ DATA
+ end
+
def install
python do
+
+ # On Mavericks we want to target libc++, this requires a non default qt makespec
+ if ENV.compiler == :clang and MacOS.version >= :mavericks
+ ENV.append "QMAKESPEC", "unsupported/macx-clang-libc++"
+ end
+
args = [ "--confirm-license",
"--bindir=#{bin}",
"--destdir=#{lib}/#{python.xy}/site-packages",
"--sipdir=#{share}/sip#{python.if3then3}" ]
- # We need to run "configure.py" so that pyqtconfig.py is generated and
- # PyQWT needs that. But to do the actual compile, we use the newer
- # "configure-ng.py" that is recommened in the README.
+ # We need to run "configure.py" so that pyqtconfig.py is generated, which
+ # is needed by PyQWT for determining the correct build settings. But do
+ # the actual compile, we use the newer configure-ng.py.
system python, "configure.py", *args
(python.site_packages/'PyQt4').install 'pyqtconfig.py'
+
+ # On Mavericks we want to target libc++, this requires a non default qt makespec
+ if ENV.compiler == :clang and MacOS.version >= :mavericks
+ args << "--spec" << "unsupported/macx-clang-libc++"
+ end
+
system python, "./configure-ng.py", *args
system "make"
system "make", "install"
@@ -67,3 +86,17 @@ class Pyqt < Formula
end
end
end
+__END__
+diff --git a/configure.py b/configure.py
+index a8e5dcd..a5f1474 100644
+--- a/configure.py
++++ b/configure.py
+@@ -1886,7 +1886,7 @@ def get_build_macros(overrides):
+ if "QMAKESPEC" in list(os.environ.keys()):
+ fname = os.environ["QMAKESPEC"]
+
+- if not os.path.dirname(fname):
++ if not os.path.dirname(fname) or fname.startswith('unsupported'):
+ qt_macx_spec = fname
+ fname = os.path.join(qt_archdatadir, "mkspecs", fname)
+ elif sys.platform == "darwin":