Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jul 2018 06:13:50 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r474335 - in head/science/openstructure: . files
Message-ID:  <201807100613.w6A6DogW045393@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Tue Jul 10 06:13:50 2018
New Revision: 474335
URL: https://svnweb.freebsd.org/changeset/ports/474335

Log:
  science/openstructure: Fix build on 12 broken due to the obvious misuse of std::getline
  
  Reported by:	fallout

Added:
  head/science/openstructure/files/patch-modules_base_src_test__utils_compare__files.cc   (contents, props changed)
Modified:
  head/science/openstructure/Makefile

Modified: head/science/openstructure/Makefile
==============================================================================
--- head/science/openstructure/Makefile	Tue Jul 10 06:02:57 2018	(r474334)
+++ head/science/openstructure/Makefile	Tue Jul 10 06:13:50 2018	(r474335)
@@ -2,7 +2,7 @@
 
 PORTNAME=	openstructure
 DISTVERSION=	1.7.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	science
 MASTER_SITES=	https://git.scicore.unibas.ch/schwede/${PORTNAME}/repository/${DISTVERSION}/archive.tar.gz?dummy=/
 

Added: head/science/openstructure/files/patch-modules_base_src_test__utils_compare__files.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/openstructure/files/patch-modules_base_src_test__utils_compare__files.cc	Tue Jul 10 06:13:50 2018	(r474335)
@@ -0,0 +1,17 @@
+Patch for the obvious bug. Reported to the upstream.
+
+--- modules/base/src/test_utils/compare_files.cc.orig	2018-07-10 05:54:54 UTC
++++ modules/base/src/test_utils/compare_files.cc
+@@ -37,8 +37,10 @@ bool compare_files(const String& test, c
+   }
+   String test_line, gold_line;
+   while (true) {
+-    bool test_end=std::getline(test_stream, test_line) != 0;
+-    bool gold_end=std::getline(gold_stream, gold_line) != 0;
++    std::getline(test_stream, test_line);
++    std::getline(gold_stream, gold_line);
++    bool test_end=test_stream.eof();
++    bool gold_end=gold_stream.eof();
+     if (!(test_end || gold_end)) {
+       return true;
+     }



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