summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/qt4-moc/files/patch-src__tools__moc__main.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/devel/qt4-moc/files/patch-src__tools__moc__main.cpp b/devel/qt4-moc/files/patch-src__tools__moc__main.cpp
index 1c907ad3cf5f..53bbcc5853ac 100644
--- a/devel/qt4-moc/files/patch-src__tools__moc__main.cpp
+++ b/devel/qt4-moc/files/patch-src__tools__moc__main.cpp
@@ -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;