Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Oct 2016 15:16:12 +0000 (UTC)
From:      "Tobias C. Berner" <tcberner@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r423126 - in head/devel/qt5-qdoc: . files
Message-ID:  <201610021516.u92FGCmU022588@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tcberner
Date: Sun Oct  2 15:16:12 2016
New Revision: 423126
URL: https://svnweb.freebsd.org/changeset/ports/423126

Log:
  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

Added:
  head/devel/qt5-qdoc/files/extrapatch-src_qdoc_qdocindexfiles.cpp   (contents, props changed)
Modified:
  head/devel/qt5-qdoc/Makefile

Modified: head/devel/qt5-qdoc/Makefile
==============================================================================
--- head/devel/qt5-qdoc/Makefile	Sun Oct  2 14:56:43 2016	(r423125)
+++ head/devel/qt5-qdoc/Makefile	Sun Oct  2 15:16:12 2016	(r423126)
@@ -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>

Added: head/devel/qt5-qdoc/files/extrapatch-src_qdoc_qdocindexfiles.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/qt5-qdoc/files/extrapatch-src_qdoc_qdocindexfiles.cpp	Sun Oct  2 15:16:12 2016	(r423126)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610021516.u92FGCmU022588>