update moc patch to define _SYS_SYSMACROS_H (#1396755)

This commit is contained in:
Rex Dieter 2016-12-08 12:39:41 -06:00
parent 15b5003df8
commit 55cdca6d74
3 changed files with 20 additions and 17 deletions

View File

@ -97,10 +97,11 @@ Patch4: qtbase-opensource-src-5.3.2-QTBUG-35459.patch
# namespace QT_VERSION_CHECK to workaround major/minor being pre-defined (#1396755)
Patch50: qtbase-opensource-src-5.7.1-QT_VERSION_CHECK.patch
# Workaround moc/multilib issues
# 1. Workaround moc/multilib issues
# https://bugzilla.redhat.com/show_bug.cgi?id=1290020
# https://bugreports.qt.io/browse/QTBUG-49972
Patch52: qtbase-opensource-src-5.6.0-moc_WORDSIZE.patch
# 2. Workaround sysmacros.h (pre)defining major/minor a breaking stuff
Patch52: qtbase-opensource-src-5.7.1-moc_macros.patch
# arm patch
Patch54: qtbase-opensource-src-5.6.0-arm.patch
@ -350,7 +351,7 @@ Qt5 libraries used for drawing widgets and OpenGL items.
%patch4 -p1 -b .QTBUG-35459
%patch52 -p1 -b .moc_WORDSIZE
%patch52 -p1 -b .moc_macros
%patch54 -p1 -b .arm
%patch61 -p1 -b .qt5-qtbase-cxxflag
%patch62 -p1 -b .libpng
@ -960,6 +961,7 @@ fi
%changelog
* Thu Dec 08 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.7.1-6
- namespace QT_VERSION_CHECK to workaround major/minor being pre-defined (#1396755)
- update moc patch to define _SYS_SYSMACROS_H (#1396755)
* Thu Dec 08 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.7.1-5
- 5.7.1 dec5 snapshot

View File

@ -1,14 +0,0 @@
diff -up qtbase-opensource-src-5.6.0-beta/src/tools/moc/main.cpp.moc_WORDSIZE qtbase-opensource-src-5.6.0-beta/src/tools/moc/main.cpp
--- qtbase-opensource-src-5.6.0-beta/src/tools/moc/main.cpp.moc_WORDSIZE 2015-12-04 18:05:24.000000000 -0600
+++ qtbase-opensource-src-5.6.0-beta/src/tools/moc/main.cpp 2015-12-15 20:57:55.554485416 -0600
@@ -184,6 +184,10 @@ int runMoc(int argc, char **argv)
Moc moc;
pp.macros["Q_MOC_RUN"];
pp.macros["__cplusplus"];
+ Macro macro;
+ macro.symbols = Preprocessor::tokenize(QByteArray::number(Q_PROCESSOR_WORDSIZE*8), 1, Preprocessor::TokenizeDefine);
+ macro.symbols.removeLast(); // remove the EOF symbol
+ pp.macros.insert("__WORDSIZE", macro);
// Don't stumble over GCC extensions
Macro dummyVariadicFunctionMacro;

View File

@ -0,0 +1,15 @@
diff -up qtbase-opensource-src-5.7.1/src/tools/moc/main.cpp.moc_WORDSIZE qtbase-opensource-src-5.7.1/src/tools/moc/main.cpp
--- qtbase-opensource-src-5.7.1/src/tools/moc/main.cpp.moc_WORDSIZE 2016-12-01 02:17:04.000000000 -0600
+++ qtbase-opensource-src-5.7.1/src/tools/moc/main.cpp 2016-12-08 12:37:28.931589338 -0600
@@ -179,6 +179,11 @@ int runMoc(int argc, char **argv)
Moc moc;
pp.macros["Q_MOC_RUN"];
pp.macros["__cplusplus"];
+ pp.macros["_SYS_SYSMACROS_H"];
+ Macro macro;
+ macro.symbols = Preprocessor::tokenize(QByteArray::number(Q_PROCESSOR_WORDSIZE*8), 1, Preprocessor::TokenizeDefine);
+ macro.symbols.removeLast(); // remove the EOF symbol
+ pp.macros.insert("__WORDSIZE", macro);
// Don't stumble over GCC extensions
Macro dummyVariadicFunctionMacro;