diff --git a/dynare-5.1-gcc-12.patch b/dynare-5.1-gcc-12.patch new file mode 100644 index 0000000..a572ea0 --- /dev/null +++ b/dynare-5.1-gcc-12.patch @@ -0,0 +1,27 @@ +From 3823379966f15a377c863b0d15694b146854dfd8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= +Date: Mon, 2 May 2022 17:03:42 +0200 +Subject: [PATCH] Compatibility fix for GCC 12 + +Ref. dynare#1852 + +(cherry picked from commit 8c07fb5e4310b2ec2988dc62256e1cf0971c05dd) +--- + src/DataTree.hh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/DataTree.hh b/src/DataTree.hh +index 62da5681..6e9f818d 100644 +--- a/src/DataTree.hh ++++ b/src/DataTree.hh +@@ -29,6 +29,7 @@ using namespace std; + #include + #include + #include ++#include + + #include "SymbolTable.hh" + #include "NumericalConstants.hh" +-- +GitLab + diff --git a/dynare.changes b/dynare.changes index 5d4d45d..6fb2df8 100644 --- a/dynare.changes +++ b/dynare.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 27 20:34:53 UTC 2022 - Antoine Belvire + +- Add dynare-5.1-gcc-12.patch: Fix build with gcc 12. + ------------------------------------------------------------------- Tue Apr 26 18:42:14 UTC 2022 - Atri Bhattacharya diff --git a/dynare.spec b/dynare.spec index decc56c..b8862dc 100644 --- a/dynare.spec +++ b/dynare.spec @@ -35,6 +35,8 @@ Source: https://www.dynare.org/release/source/%{name}-%{version}.tar.xz # PATCH-FIX-UPSTREAM dynare-no-return-in-non-void-function.patch badshah400@gmail.com -- Return trivial value from a function that is not declared as returning void Patch0: dynare-no-return-in-non-void-function.patch Patch1: dynare-octave7-compat.patch +# PATCH-FIX-UPSTREAM dynare-5.1-gcc-12.patch -- Fix build with gcc 12 (https://git.dynare.org/Dynare/dynare/-/issues/1852) +Patch2: dynare-5.1-gcc-12.patch BuildRequires: fdupes BuildRequires: gcc%{gccver}-c++ BuildRequires: gcc%{gccver}-fortran @@ -80,7 +82,10 @@ Summary: Documentation for dynare in HTML format This package provides documentation for %{name} in HTML format. %prep -%autosetup -p1 +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 -d preprocessor %build autoreconf -fvi