diff --git a/ColPack-1.0.9_fix_gcc49_omp.patch b/ColPack-1.0.9_fix_gcc49_omp.patch new file mode 100644 index 0000000..0510be9 --- /dev/null +++ b/ColPack-1.0.9_fix_gcc49_omp.patch @@ -0,0 +1,26 @@ +Index: ColPack-1.0.9/BipartiteGraphPartialColoring/BipartiteGraphPartialColoring.cpp +=================================================================== +--- ColPack-1.0.9.orig/BipartiteGraphPartialColoring/BipartiteGraphPartialColoring.cpp ++++ ColPack-1.0.9/BipartiteGraphPartialColoring/BipartiteGraphPartialColoring.cpp +@@ -388,8 +388,9 @@ namespace ColPack + if ( m_vi_LeftVertexColors [m_vi_Edges [x]] == m_vi_LeftVertexColors[v] && f(v) > f(m_vi_Edges [x]) ) { + //Algo 4 - Line 18: add [v] to R ; cont <- false; break + #pragma omp critical ++ { + vi_verticesNeedNewColor.push_back(v); +-#pragma omp end critical ++ } + cont = false; + break; + } +@@ -575,8 +576,9 @@ namespace ColPack + if ( m_vi_RightVertexColors [m_vi_Edges [x]] == m_vi_RightVertexColors[v] && f(v) > f(m_vi_Edges [x]) ) { + //Algo 4 - Line 18: add [v] to R ; cont <- false; break + #pragma omp critical ++ { + vi_verticesNeedNewColor.push_back(v); +-#pragma omp end critical ++ } + cont = false; + break; + } diff --git a/ColPack.spec b/ColPack.spec index 7e83ce9..7f342af 100644 --- a/ColPack.spec +++ b/ColPack.spec @@ -1,20 +1,23 @@ %global lc_name colpack -Name: ColPack -Version: 1.0.9 -Release: 2%{?dist} -Summary: Algorithms for specialized vertex coloring problems -%{?el5:Group: Applications/Engineering} +Name: ColPack +Version: 1.0.9 +Release: 3%{?dist} +Summary: Algorithms for specialized vertex coloring problems +%{?el5:Group: Applications/Engineering} -License: LGPLv3+ -URL: http://cscapes.cs.purdue.edu -Source0: %{url}/download/%{name}/%{name}-%{version}.tar.gz +License: LGPLv3+ +URL: http://cscapes.cs.purdue.edu +Source0: %{url}/download/%{name}/%{name}-%{version}.tar.gz + +# Patch has been emailed to upstream. +Patch0: ColPack-1.0.9_fix_gcc49_omp.patch %{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)} -BuildRequires: chrpath +BuildRequires: chrpath -Provides: %{lc_name} = %{version}-%{release} -Provides: %{lc_name}%{?_isa} = %{version}-%{release} +Provides: %{lc_name} = %{version}-%{release} +Provides: %{lc_name}%{?_isa} = %{version}-%{release} %description ColPack is a package comprising of implementation of algorithms for @@ -27,26 +30,26 @@ modular, extendable and efficient. %package cli -Summary: CLI-tool for %{name} -%{?el5:Group: Applications/Engineering} +Summary: CLI-tool for %{name} +%{?el5:Group: Applications/Engineering} -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} -Provides: %{lc_name}-cli = %{version}-%{release} -Provides: %{lc_name}-cli%{?_isa} = %{version}-%{release} +Provides: %{lc_name}-cli = %{version}-%{release} +Provides: %{lc_name}-cli%{?_isa} = %{version}-%{release} %description cli This package contains a cli-tool for %{name} %package devel -Summary: Development files for %{name} -%{?el5:Group: Development/Libraries} +Summary: Development files for %{name} +%{?el5:Group: Development/Libraries} -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} -Provides: %{lc_name}-devel = %{version}-%{release} -Provides: %{lc_name}-devel%{?_isa} = %{version}-%{release} +Provides: %{lc_name}-devel = %{version}-%{release} +Provides: %{lc_name}-devel%{?_isa} = %{version}-%{release} %description devel This package contains the development headers and library @@ -54,11 +57,11 @@ for %{name}. %package doc -Summary: Documentation files for %{name} -%{?el5:Group: Documentation} +Summary: Documentation files for %{name} +%{?el5:Group: Documentation} %{?!el5:BuildArch: noarch} -Provides: %{lc_name}-doc = %{version}-%{release} +Provides: %{lc_name}-doc = %{version}-%{release} %description doc This package contains the documentation files and some brief examples @@ -76,8 +79,8 @@ find . -depth -type f -name '*~' -print0 | xargs -0 rm -f find . -depth -type f -name '*' -print0 | xargs -0 chmod 0644 chmod 0755 configure -# This package is LGPL, only. So let's get rid of the cluttering GPL-file. -mv -f COPYING.LESSER COPYING +# Apply patch. +%patch0 -p1 -b.omp %build @@ -106,17 +109,16 @@ chrpath --delete %{buildroot}%{_bindir}/%{name} make check -%clean +%{?el5:%clean} %{?el5:rm -rf %{buildroot}} %post -p /sbin/ldconfig - %postun -p /sbin/ldconfig %files -%doc ChangeLog COPYING +%doc ChangeLog COPYING* README %{_libdir}/lib%{name}.so.* %files cli @@ -127,10 +129,15 @@ make check %{_libdir}/lib%{name}.so %files doc -%doc AUTHORS ChangeLog COPYING README SampleDrivers +%doc AUTHORS ChangeLog COPYING* README SampleDrivers %changelog +* Wed Jun 18 2014 Björn Esser - 1.0.9-3 +- added Patch0 to fix build with openMP on GCC >= 4.9 +- restructured spec +- preserve GPLv3-file + * Fri Jun 06 2014 Fedora Release Engineering - 1.0.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild