Index: devel/qt5-qdoc/Makefile =================================================================== --- devel/qt5-qdoc/Makefile +++ devel/qt5-qdoc/Makefile @@ -2,6 +2,7 @@ PORTNAME= qdoc DISTVERSION= ${QT5_VERSION} +PORTREVISION= 1 CATEGORIES= devel textproc PKGNAMEPREFIX= qt5- @@ -17,4 +18,10 @@ PLIST_FILES= ${QT_BINDIR}/qdoc -.include +.include + +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 +EXTRA_PATCHES= ${FILESDIR}/extrapatch-src_qdoc_qdocindexfiles.cpp +.endif + +.include Index: devel/qt5-qdoc/files/extrapatch-src_qdoc_qdocindexfiles.cpp =================================================================== --- /dev/null +++ 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(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);