aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authortcberner <tcberner@FreeBSD.org>2016-10-02 23:16:12 +0800
committertcberner <tcberner@FreeBSD.org>2016-10-02 23:16:12 +0800
commita798160883322065caf4e231ad966815abe3a7a8 (patch)
tree5b68193c7cdf6d6c28c490666aae990904068f59 /devel
parent14a6ba9cab987e129a0701aa2e71680be483a71e (diff)
downloadfreebsd-ports-gnome-a798160883322065caf4e231ad966815abe3a7a8.tar.gz
freebsd-ports-gnome-a798160883322065caf4e231ad966815abe3a7a8.tar.zst
freebsd-ports-gnome-a798160883322065caf4e231ad966815abe3a7a8.zip
Work around a gcc bug in devel/qt5-qdoc to fix build of devel/qtcreator on 9.3
Instead of using std::sort() use qSort() on FreeBSD 9.3. This should fix the pkg-fallout of devel/qtcreator. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59391 [2] https://bugreports.qt.io/browse/QTBUG-43057 Reviewed by: rakuco Approved by: rakuco (mentor) Differential Revision: https://reviews.freebsd.org/D8121
Diffstat (limited to 'devel')
-rw-r--r--devel/qt5-qdoc/Makefile9
-rw-r--r--devel/qt5-qdoc/files/extrapatch-src_qdoc_qdocindexfiles.cpp21
2 files changed, 29 insertions, 1 deletions
diff --git a/devel/qt5-qdoc/Makefile b/devel/qt5-qdoc/Makefile
index eee3e4e3c0fe..2c3011b8a5f1 100644
--- a/devel/qt5-qdoc/Makefile
+++ b/devel/qt5-qdoc/Makefile
@@ -2,6 +2,7 @@
PORTNAME= qdoc
DISTVERSION= ${QT5_VERSION}
+PORTREVISION= 1
CATEGORIES= devel textproc
PKGNAMEPREFIX= qt5-
@@ -17,4 +18,10 @@ INSTALL_WRKSRC= ${BUILD_WRKSRC}
PLIST_FILES= ${QT_BINDIR}/qdoc
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000
+EXTRA_PATCHES= ${FILESDIR}/extrapatch-src_qdoc_qdocindexfiles.cpp
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/qt5-qdoc/files/extrapatch-src_qdoc_qdocindexfiles.cpp b/devel/qt5-qdoc/files/extrapatch-src_qdoc_qdocindexfiles.cpp
new file mode 100644
index 000000000000..c7a666f2b071
--- /dev/null
+++ b/devel/qt5-qdoc/files/extrapatch-src_qdoc_qdocindexfiles.cpp
@@ -0,0 +1,21 @@
+There is a bug [1] in the old gcc used on FreeBSD 9.3, which makes
+qdoc segfault on sorting while generating its index sections.
+
+As mentioned in [2] by Michael Hansen, we can circument this by using
+qSort instead of std::sort on FreeBSD 9.x.
+
+
+[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59391
+[2] https://bugreports.qt.io/browse/QTBUG-43057
+
+--- src/qdoc/qdocindexfiles.cpp.orig 2016-10-02 07:52:39 UTC
++++ src/qdoc/qdocindexfiles.cpp
+@@ -1476,7 +1476,7 @@ void QDocIndexFiles::generateIndexSectio
+ const Aggregate* inner = static_cast<const Aggregate*>(node);
+
+ NodeList cnodes = inner->childNodes();
+- std::sort(cnodes.begin(), cnodes.end(), compareNodes);
++ qSort(cnodes.begin(), cnodes.end(), compareNodes);
+
+ foreach (Node* child, cnodes) {
+ generateIndexSections(writer, child, generateInternalNodes);