diff options
| author | Brian Jensen | 2013-12-15 12:12:19 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-01-03 11:04:59 +0000 |
| commit | 745311b66d750f7aef58bf00f8b4cf17caff49bc (patch) | |
| tree | 309123918d3caf8d87c77d27fdeb8fdd210caf80 /Library | |
| parent | ae5ef807aa9404a129769cf3f77244e6937651dc (diff) | |
| download | homebrew-745311b66d750f7aef58bf00f8b4cf17caff49bc.tar.bz2 | |
pyqt: patch handling of qmake inline comments.
Closes #25225.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/pyqt.rb | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/Library/Formula/pyqt.rb b/Library/Formula/pyqt.rb index ce74b7e1c..6439a06c1 100644 --- a/Library/Formula/pyqt.rb +++ b/Library/Formula/pyqt.rb @@ -20,6 +20,9 @@ class Pyqt < Formula # 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. + # Also qmake spec macro parsing does not properly handle inline comments, + # which can result in ignored build flags when they are concatenated together. + # Changes proposed upstream: http://www.riverbankcomputing.com/pipermail/pyqt/2013-December/033537.html DATA end @@ -36,8 +39,11 @@ class Pyqt < Formula "--destdir=#{lib}/#{python.xy}/site-packages", "--sipdir=#{share}/sip#{python.if3then3}" ] # 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. + # is needed by PyQWT (and many other PyQt interoperable implementations such + # as the ROS GUI libs). This file is currently needed for generating build + # files appropriate for the qmake spec that was used to build Qt. This method + # is deprecated and will be removed with SIP v5, so we do the actual compile + # using the newer configure-ng.py as recommended. system python, "configure.py", *args (python.site_packages/'PyQt4').install 'pyqtconfig.py' @@ -100,3 +106,15 @@ index a8e5dcd..a5f1474 100644 qt_macx_spec = fname fname = os.path.join(qt_archdatadir, "mkspecs", fname) elif sys.platform == "darwin": +@@ -1934,6 +1934,11 @@ def get_build_macros(overrides): + if macros is None: + return None + ++ # QMake macros may contain comments on the same line so we need to remove them ++ for macro, value in macros.iteritems(): ++ if "#" in value: ++ macros[macro] = value.split("#", 1)[0] ++ + # Qt5 doesn't seem to support the specific macros so add them if they are + # missing. + if macros.get("INCDIR_QT", "") == "": |
