From 9e60c2e4c28d32f66882e7035c9f1d5a338c2ed3 Mon Sep 17 00:00:00 2001 From: Christoph Niethammer Date: Fri, 12 Aug 2016 09:15:05 +0000 Subject: [PATCH] Fix patches for the empty line problem which had to be applied on top of each other. --- packages/performance/scorep/scorep-2.0.2 | 1 + .../scorep/scorep-2.0.2-0002.patch | 56 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 packages/performance/scorep/scorep-2.0.2-0002.patch diff --git a/packages/performance/scorep/scorep-2.0.2 b/packages/performance/scorep/scorep-2.0.2 index 8b8619a..241da6a 100755 --- a/packages/performance/scorep/scorep-2.0.2 +++ b/packages/performance/scorep/scorep-2.0.2 @@ -51,5 +51,6 @@ fi src_prepare () { patch -p1 < $SCLASS_DIR/$SCLASSFILE-0001.patch + patch -p1 < $SCLASS_DIR/$SCLASSFILE-0002.patch } diff --git a/packages/performance/scorep/scorep-2.0.2-0002.patch b/packages/performance/scorep/scorep-2.0.2-0002.patch new file mode 100644 index 0000000..90dc565 --- /dev/null +++ b/packages/performance/scorep/scorep-2.0.2-0002.patch @@ -0,0 +1,56 @@ +Index: src/opari/opari2_parser_f.cc +=================================================================== +--- src/opari/opari2_parser_f.cc (revision 1749) ++++ src/opari/opari2_parser_f.cc (working copy) +@@ -763,11 +763,13 @@ + lines.push_back( m_lowline ); + + bool found_continuation_line; +- string prev_sentinel = m_sentinel; +- unsigned ignored_lines = 0; ++ bool last_was_continuation_line = false; ++ string prev_sentinel = m_sentinel; ++ unsigned ignored_lines = 0; + do + { +- found_continuation_line = false; ++ last_was_continuation_line = found_continuation_line; ++ found_continuation_line = false; + + if ( m_options.form == F_FREE ) + { +@@ -778,7 +780,7 @@ + --com; + } + string::size_type amp = m_lowline.find_last_not_of( " \t", com ); +- if ( m_lowline[ amp ] == '&' ) ++ if ( m_lowline[ amp ] == '&' || ( is_empty_line() && last_was_continuation_line ) ) + { + found_continuation_line = true; + } +@@ -822,8 +824,15 @@ + found_continuation_line = true; + m_sentinel = prev_sentinel; + } +- else if ( found_continuation_line && !is_empty_line() ) ++ else if ( is_empty_line() && last_was_continuation_line && m_options.form == F_FREE ) + { ++ found_continuation_line = true; ++ lines.push_back( m_lowline ); ++ m_sentinel = prev_sentinel; ++ ignored_lines--; ++ } ++ else if ( found_continuation_line ) ++ { + cerr << m_curr_file << ":" << m_lineno - 1 + << ": ERROR: missing continuation line\n"; + cleanup_and_exit(); +@@ -840,7 +849,6 @@ + OPARI2_Directive* d_new = + NewDirective( lines, directive_prefix, m_options.lang, m_curr_file, + m_lineno - lines.size() - ignored_lines + 1 ); +- + if ( d_new ) + { + m_waitfor_loopstart = d_new->NeedsEndLoopDirective(); +