Refactor patching.

This commit is contained in:
Ralf Corsepius
2010-04-25 05:30:01 +00:00
parent 153b9381de
commit 09a43a7343
2 changed files with 19 additions and 4 deletions

View File

@@ -1,4 +1,9 @@
# cygwin patches can't be directly applied through rpm
cd gcc-%{gcc_pkgvers}
patch -p1 -t < %{SOURCE70} || true
%if "%{gcc_version}" < "4.0"
patch -p1 -t < %{PATCH70} || true
%else
patch -p2 -t < %{PATCH70} || true
%endif
%{?PATCH71:patch -p1 < %{PATCH71}}
cd ..

View File

@@ -32,7 +32,17 @@ Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-objc-%{gcc_pkgvers}.ta
%{?_without_sources:NoSource: 5}
%endif
# Cygwin patch from
# ftp://cygwin.com/pub/cygwin/release/gcc/gcc-core/gcc-core-3.4.4-3-src.tar.bz2
Source70: gcc-3.4.4-3.patch
%if "%{gcc_version}" == "3.4.4"
# Cygwin patch extracted from
# ftp://sourceware.org/pub/cygwin/release/gcc/gcc-3.4.4-3-src.tar.bz2
Patch70: gcc-3.4.4-3.patch
Patch71: cygwin-gcc-3.4.4-3.diff
%endif
%if "%{gcc_version}" == "4.3.4"
# Cygwin patch extracted from
# ftp://sourceware.org/pub/cygwin/release/gcc4/gcc4-4.3.4-3-src.tar.bz2
Patch70: gcc4-4.3.4-3.src.patch
Patch71: cygwin-gcc4-4.3.4-3.diff
%endif