From owner-svn-ports-all@freebsd.org Fri May 18 10:19:01 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3CC4EF0819; Fri, 18 May 2018 10:19:00 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A72E36FEE3; Fri, 18 May 2018 10:19:00 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89DCC16BDC; Fri, 18 May 2018 10:19:00 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4IAJ0VZ069237; Fri, 18 May 2018 10:19:00 GMT (envelope-from rakuco@FreeBSD.org) Received: (from rakuco@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4IAJ0Xl069236; Fri, 18 May 2018 10:19:00 GMT (envelope-from rakuco@FreeBSD.org) Message-Id: <201805181019.w4IAJ0Xl069236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rakuco set sender to rakuco@FreeBSD.org using -f From: Raphael Kubo da Costa Date: Fri, 18 May 2018 10:19:00 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r470285 - head/print/lyx/files X-SVN-Group: ports-head X-SVN-Commit-Author: rakuco X-SVN-Commit-Paths: head/print/lyx/files X-SVN-Commit-Revision: 470285 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2018 10:19:01 -0000 Author: rakuco Date: Fri May 18 10:19:00 2018 New Revision: 470285 URL: https://svnweb.freebsd.org/changeset/ports/470285 Log: Add a patch to fix the build on FreeBSD 10.4. pkg-fallout reports the following error: TexRow.cpp:271:6: error: return type 'const TexRow::TextEntry' must match previous return type 'TexRow::TextEntry' when lambda expression has unspecified explicit return type return text_none; ^ TexRow.cpp:273:3: error: return type 'const TexRow::TextEntry' must match previous return type 'TexRow::TextEntry' when lambda expression has unspecified explicit return type return text_none; ^ TexRow.cpp:288:6: error: return type 'lyx::TexRow::TextEntry' must match previous return type 'const TexRow::TextEntry' when lambda expression has unspecified explicit return type return last_pos; ^ TexRow.cpp:290:6: error: return type 'struct TextEntry' must match previous return type 'const TexRow::TextEntry' when lambda expression has unspecified explicit return type return entry.text; ^ TexRow.cpp:293:3: error: return type 'lyx::TexRow::TextEntry' must match previous return type 'const TexRow::TextEntry' when lambda expression has unspecified explicit return type return last_pos; ^ Make the lambda return type explicit to work around what looks like a bug on an old clang version. Not bumping PORTREVISION, as this shouldn't change the code in FreeBSD versions with a more recent clang. Added: head/print/lyx/files/ head/print/lyx/files/patch-src_TexRow.cpp (contents, props changed) Added: head/print/lyx/files/patch-src_TexRow.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/print/lyx/files/patch-src_TexRow.cpp Fri May 18 10:19:00 2018 (r470285) @@ -0,0 +1,39 @@ +Fixes the build on 10.4 with clang 3.4.1. + + TexRow.cpp:271:6: error: return type 'const TexRow::TextEntry' must match previous return type 'TexRow::TextEntry' when lambda expression has unspecified explicit return type + return text_none; + ^ + TexRow.cpp:273:3: error: return type 'const TexRow::TextEntry' must match previous return type 'TexRow::TextEntry' when lambda expression has unspecified explicit return type + return text_none; + ^ + TexRow.cpp:288:6: error: return type 'lyx::TexRow::TextEntry' must match previous return type 'const TexRow::TextEntry' when lambda expression has unspecified explicit return type + return last_pos; + ^ + TexRow.cpp:290:6: error: return type 'struct TextEntry' must match previous return type 'const TexRow::TextEntry' when lambda expression has unspecified explicit return type + return entry.text; + ^ + TexRow.cpp:293:3: error: return type 'lyx::TexRow::TextEntry' must match previous return type 'const TexRow::TextEntry' when lambda expression has unspecified explicit return type + return last_pos; + ^ + +Not upstreamable, this seems to be a workaround for a compiler bug. +--- src/TexRow.cpp.orig 2018-02-25 00:11:18 UTC ++++ src/TexRow.cpp +@@ -260,7 +260,7 @@ TexRow::getEntriesFromRow(int const row) const + return {text_none, text_none}; + + // find the start entry +- TextEntry const start = [&]() { ++ TextEntry const start = [&]() -> TextEntry const { + for (size_t j = i; j > 0; --j) { + if (!isNone(rowlist_[j].getTextEntry())) + return rowlist_[j].getTextEntry(); +@@ -274,7 +274,7 @@ TexRow::getEntriesFromRow(int const row) const + } (); + + // find the end entry +- TextEntry end = [&]() { ++ TextEntry end = [&]() -> TextEntry const { + if (isNone(start)) + return text_none; + // select up to the last position of the starting paragraph as a