diff options
author | Andreas Baumbach <healther@users.noreply.github.com> | 2021-05-18 20:21:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-18 11:21:54 -0700 |
commit | b41ee03475d132ea63b367768825d69b818cecb9 (patch) | |
tree | 9a2431df7592fdddca5e362ae6647161e0bb600a | |
parent | c22a5326d802205b802268df64cb41675065908e (diff) | |
download | spack-b41ee03475d132ea63b367768825d69b818cecb9.tar.gz spack-b41ee03475d132ea63b367768825d69b818cecb9.tar.bz2 spack-b41ee03475d132ea63b367768825d69b818cecb9.tar.xz spack-b41ee03475d132ea63b367768825d69b818cecb9.zip |
doxygen: fix build with gcc@10: for version 1.8.15 (#23680)
-rw-r--r-- | var/spack/repos/builtin/packages/doxygen/cpp17_namespaces.patch | 30 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/doxygen/package.py | 4 |
2 files changed, 34 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/doxygen/cpp17_namespaces.patch b/var/spack/repos/builtin/packages/doxygen/cpp17_namespaces.patch new file mode 100644 index 0000000000..3d7e892b80 --- /dev/null +++ b/var/spack/repos/builtin/packages/doxygen/cpp17_namespaces.patch @@ -0,0 +1,30 @@ +From 788440279e0f0fdc7dce27ec266d7d5c11bcda1c Mon Sep 17 00:00:00 2001 +From: Matthew Hatch <mrhatch97@gmail.com> +Date: Thu, 9 May 2019 01:05:43 -0700 +Subject: [PATCH] Fixed C++17-namespace assignment bug + +Added scope save and restore before and after namespace parsing +--- + src/scanner.l | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/scanner.l b/src/scanner.l +index d3902b38d..5395e499c 100644 +--- a/src/scanner.l ++++ b/src/scanner.l +@@ -3941,6 +3941,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) + else + { + current->endBodyLine = yyLineNr; ++ Entry * original_root = current_root; // save root this namespace is in + if (current->section == Entry::NAMESPACE_SEC && current->type == "namespace") + { + int split_point; +@@ -4005,6 +4006,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) + ) + { // namespaces and interfaces and java classes ends with a closing bracket without semicolon + current->reset(); ++ current_root = original_root; // restore scope from before namespace descent + initEntry(); + memspecEntry = 0; + BEGIN( FindMembers ) ; diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py index b1254e91c1..fa22b56754 100644 --- a/var/spack/repos/builtin/packages/doxygen/package.py +++ b/var/spack/repos/builtin/packages/doxygen/package.py @@ -78,6 +78,10 @@ class Doxygen(CMakePackage): # Also - https://github.com/doxygen/doxygen/pull/6588 patch('shared_ptr.patch', when='@1.8.14') + # Support C++17's nested namespaces a::b::c. For details about this patch, see + # https://github.com/doxygen/doxygen/pull/6977/commits/788440279e0f0fdc7dce27ec266d7d5c11bcda1c + patch('cpp17_namespaces.patch', when='@1.8.15') + # Workaround for gcc getting stuck in an infinite loop patch('gcc-partial-inlining-bug.patch', when='@1.8.20: %gcc@7') |