aboutsummaryrefslogtreecommitdiffstats
path: root/science
diff options
context:
space:
mode:
authoryuri <yuri@FreeBSD.org>2018-07-10 14:13:50 +0800
committeryuri <yuri@FreeBSD.org>2018-07-10 14:13:50 +0800
commit0f3b39eb7e5bd9c5ac1c10c06ec2910f4e7fa17c (patch)
treedea83a3c1234e3c5e53ad4ec8bce4078292e5d34 /science
parent0eebe85846e549405115805c92f161aae32e0720 (diff)
downloadfreebsd-ports-gnome-0f3b39eb7e5bd9c5ac1c10c06ec2910f4e7fa17c.tar.gz
freebsd-ports-gnome-0f3b39eb7e5bd9c5ac1c10c06ec2910f4e7fa17c.tar.zst
freebsd-ports-gnome-0f3b39eb7e5bd9c5ac1c10c06ec2910f4e7fa17c.zip
science/openstructure: Fix build on 12 broken due to the obvious misuse of std::getline
Reported by: fallout
Diffstat (limited to 'science')
-rw-r--r--science/openstructure/Makefile2
-rw-r--r--science/openstructure/files/patch-modules_base_src_test__utils_compare__files.cc17
2 files changed, 18 insertions, 1 deletions
diff --git a/science/openstructure/Makefile b/science/openstructure/Makefile
index 3634d6d59537..10215238acd8 100644
--- a/science/openstructure/Makefile
+++ b/science/openstructure/Makefile
@@ -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=/
diff --git a/science/openstructure/files/patch-modules_base_src_test__utils_compare__files.cc b/science/openstructure/files/patch-modules_base_src_test__utils_compare__files.cc
new file mode 100644
index 000000000000..ac497f782233
--- /dev/null
+++ b/science/openstructure/files/patch-modules_base_src_test__utils_compare__files.cc
@@ -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;
+ }