diff --git a/astyle-r655-gcc8-vector-at-end.patch b/astyle-r655-gcc8-vector-at-end.patch new file mode 100644 index 0000000..040bbb5 --- /dev/null +++ b/astyle-r655-gcc8-vector-at-end.patch @@ -0,0 +1,13 @@ +Index: AStyle/src/astyle_main.cpp +=================================================================== +--- AStyle/src/astyle_main.cpp (revision 655) ++++ AStyle/src/astyle_main.cpp (working copy) +@@ -1347,7 +1347,7 @@ void ASConsole::getFileNames(const string& directo + + // sort the current entries for fileName + if (firstEntry < fileName.size()) +- sort(&fileName[firstEntry], &fileName[fileName.size()]); ++ sort(fileName.begin() + firstEntry, fileName.end()); + + // recurse into sub directories + // if not doing recursive, subDirectory is empty diff --git a/astyle.spec b/astyle.spec index 7b4c2a9..5814390 100644 --- a/astyle.spec +++ b/astyle.spec @@ -1,6 +1,6 @@ Name: astyle Version: 3.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Source code formatter for C-like programming languages %global majorversion 3 @@ -19,6 +19,10 @@ BuildRequires: java-devel >= 1:1.8.0 Patch0: astyle-arduino.patch # Fix (hardcoded) path to html-help Patch1: astyle-html-help.patch +# Fix abort with gcc8 -Wp,-D_GLIBCXX_ASSERTION +# https://bugzilla.redhat.com/show_bug.cgi?id=1573092 +# Patch proposed: https://sourceforge.net/p/astyle/bugs/503/ +Patch2: astyle-r655-gcc8-vector-at-end.patch %description Artistic Style is a source code indenter, source code formatter, and @@ -41,6 +45,7 @@ This package contains the shared library. %setup -q -n %{name} %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build chmod a-x src/* @@ -80,6 +85,9 @@ popd %{_includedir}/astyle.h %changelog +* Mon May 14 2018 Mamoru TASAKA - 3.1-5 +- Fix abort with gcc8 -Wp,-D_GLIBCXX_ASSERTION (bug 1573092) + * Mon Feb 19 2018 Jens Lody - 3.1-4 - Add BuildRequires for gcc-c++.