diff --git a/codeblocks-8.02-gcc-detect.patch b/codeblocks-8.02-gcc-detect.patch new file mode 100644 index 0000000..b7ebe2e --- /dev/null +++ b/codeblocks-8.02-gcc-detect.patch @@ -0,0 +1,38 @@ +Index: src/plugins/compilergcc/compilerMINGW.cpp +=================================================================== +--- src/plugins/compilergcc/compilerMINGW.cpp (revision 5158) ++++ src/plugins/compilergcc/compilerMINGW.cpp (revision 5159) +@@ -206,15 +206,25 @@ + AutoDetectResult CompilerMINGW::AutoDetectInstallationDir() + { + // try to find MinGW in environment variable PATH first +- wxPathList list; +- list.AddEnvList(_T("PATH")); +- wxString path = list.FindAbsoluteValidPath(m_Programs.C); +- if (!path.IsEmpty()) ++ wxString pathValues; ++ wxGetEnv(_T("PATH"), &pathValues); ++ if (!pathValues.IsEmpty()) + { +- wxFileName fname(path); +- fname.RemoveLastDir(); +- m_MasterPath = fname.GetPath(wxPATH_GET_VOLUME); +- return adrDetected; ++ wxArrayString pathArray; ++ wxString sep = platform::windows ? _T(";") : _T(":"); ++ wxChar pathSep = platform::windows ? _T('\\') : _T('/'); ++ GetStringFromArray(pathArray, sep); ++ for (size_t i = 0; i < pathArray.GetCount(); ++i) ++ { ++ if (wxFileExists(pathArray[i] + pathSep + m_Programs.C)) ++ { ++ if (pathArray[i].AfterLast(pathSep).IsSameAs(_T("bin"))) ++ { ++ m_MasterPath = pathArray[i].BeforeLast(pathSep); ++ return adrDetected; ++ } ++ } ++ } + } + + wxString sep = wxFileName::GetPathSeparator(); diff --git a/codeblocks.spec b/codeblocks.spec index 098b91b..84ff4f7 100644 --- a/codeblocks.spec +++ b/codeblocks.spec @@ -1,6 +1,6 @@ Name: codeblocks Version: 8.02 -Release: 3%{?dist} +Release: 4%{?dist} Summary: An open source, cross platform, free C++ IDE Group: Development/Tools License: GPLv3+ @@ -19,6 +19,8 @@ Patch1: codeblocks-plugins.patch Patch2: codeblocks-desktop.patch # bug #461120 (http://developer.berlios.de/patch/?func=detailpatch&patch_id=2568&group_id=5358) Patch3: codeblocks-run.patch +# bug #469096 (fixed in upstream svn revision 5159) +Patch4: codeblocks-8.02-gcc-detect.patch %description Code::Blocks is a free C++ IDE built specifically to meet the most demanding @@ -71,6 +73,7 @@ Additional Code::Blocks plugins. %patch1 -p1 %patch2 -p1 %patch3 -p0 -b .run +%patch4 -p0 -b .gcc-detect # convert EOLs find . -type f -and -not -name "*.cpp" -and -not -name "*.h" -and -not -name "*.png" -and -not -name "*.bmp" -and -not -name "*.c" -and -not -name "*.cxx" -and -not -name "*.ico" | sed "s/.*/\"\\0\"/" | xargs dos2unix --keepdate &> /dev/null @@ -258,6 +261,9 @@ update-mime-database /usr/share/mime &> /dev/null || : %changelog +* Fri Oct 31 2008 Dan Horak 8.02-4 +- fix gcc detection (#469096) + * Sat Sep 20 2008 Dan Horak 8.02-3 - update desktop file - fix running console applications (#461120)