svn commit: r408911 - head/devel/qt4-moc/files
Raphael Kubo da Costa
rakuco at FreeBSD.org
Sun Feb 14 23:56:30 UTC 2016
Author: rakuco
Date: Sun Feb 14 23:56:28 2016
New Revision: 408911
URL: https://svnweb.freebsd.org/changeset/ports/408911
Log:
Add more context to the patch we have for Boost.
Explain what the problem is and how we work around it instead of just defining
weirdly-named macros.
Modified:
head/devel/qt4-moc/files/patch-src__tools__moc__main.cpp
Modified: head/devel/qt4-moc/files/patch-src__tools__moc__main.cpp
==============================================================================
--- head/devel/qt4-moc/files/patch-src__tools__moc__main.cpp Sun Feb 14 23:26:18 2016 (r408910)
+++ head/devel/qt4-moc/files/patch-src__tools__moc__main.cpp Sun Feb 14 23:56:28 2016 (r408911)
@@ -1,20 +1,25 @@
-Work around additional moc + Boost bugs that showed up after the Boost
-upgrade from 1.52 to 1.55. This should make science/avogadro buildable
-again.
+Workaround for Boost: Qt4's moc cannot parse macros in namespace declarations,
+leading to errors such as:
-See the discussion in QTBUG-22829.
+ Parse error at "BOOST_JOIN"
-Obtained from: Fedora Project
-http://pkgs.fedoraproject.org/cgit/qt.git/tree/qt-everywhere-opensource-src-4.8.5-QTBUG-22829.patch
---- src/tools/moc/main.cpp 2013-06-09 17:04:02.762459323 -0500
-+++ src/tools/moc/main.cpp 2013-06-09 17:08:20.409680813 -0500
-@@ -188,8 +188,9 @@ int runMoc(int _argc, char **_argv)
- pp.macros["Q_MOC_RUN"];
- pp.macros["__cplusplus"];
+This is fixed in Qt5 (the upstream bug is QTBUG-22829), but fixing it in Qt4
+requires substantial changes that upstream has decided not to backport.
+
+What we do to work around the issue is define some Boost include guards so that
+they end up being skipped by moc when it is preprocessing a file.
+--- src/tools/moc/main.cpp.orig 2015-05-07 14:14:44 UTC
++++ src/tools/moc/main.cpp
+@@ -190,6 +190,13 @@ int runMoc(int _argc, char **_argv)
-- // Workaround a bug while parsing the boost/type_traits/has_operator.hpp header. See QTBUG-22829
-+ // Workaround bugs while parsing some boost headers. See QTBUG-22829
+ // Workaround a bug while parsing the boost/type_traits/has_operator.hpp header. See QTBUG-22829
pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"];
++ // Additional workarounds for newer Boost versions. The version numbers
++ // below are the first versions in the ports tree to require them, not
++ // the first versions upstream to require them (ie. we might have skipped
++ // some Boost versions in the ports tree).
++ //
++ // For Boost >= 1.55.
+ pp.macros["BOOST_LEXICAL_CAST_INCLUDED"];
QByteArray filename;
More information about the svn-ports-all
mailing list