Homebrew/homebrew — pull request #25225 by jensenb (2013-12-15 11:58:55+00:00)
Title: PyQt: patch to fix handling of qmake inline comments

It seems the previous patch was not enough to correctly support PyQt with the new qmake configuration for Mavericks and libc++. As it turns out most packages that I deal with, like PyQWT and the ROS GUI packages, still rely on PyQt for generating makefiles with the appropriate build settings for integrating with Qt. This is accomplished with the help of ```pyqtconfig.py``` build artifact, which is only generated using the old and now deprecated ```configure.py``` build script.

Unfortunately the old build script does not properly handle inline comments in variable definitions when parsing QMake configuration files, it simply copies the entire line verbatim. When generating makefiles it then concatenates all the relevant variables (such as ```LDFLAGS = LFLAGS + LFLAGS_SHLIB```), and if one the variables contained an inline comment, then any variables concatenated afterwards are (correctly) ignored by make. With Mavericks and the new libc++ QMake configuration, both the ```CXXFLAGS``` and ```LFLAGS``` contained inline comments, leading to some very unexpected and confusing linker errors in PyQt dependent projects.

PyQt itself does not seem to be affected, since the newer build script ```configure-ng.py``` has better handling of such behaviour. However at the moment many (most?) PyQt dependent projects still rely on the old method. I will submit the patches upstream as soon as I can post on the mailing list.