rpms/codeblocks/F-9 codeblocks-8.02-gcc-detect.patch, NONE, 1.1 codeblocks.spec, 1.26, 1.27

Dan Horák sharkcz at fedoraproject.org
Fri Oct 31 09:07:51 UTC 2008


Author: sharkcz

Update of /cvs/extras/rpms/codeblocks/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13868

Modified Files:
	codeblocks.spec 
Added Files:
	codeblocks-8.02-gcc-detect.patch 
Log Message:
* Fri Oct 31 2008 Dan Horak <dan[at]danny.cz> 8.02-3
- fix gcc detection (#469096)


codeblocks-8.02-gcc-detect.patch:

--- NEW FILE codeblocks-8.02-gcc-detect.patch ---
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();


Index: codeblocks.spec
===================================================================
RCS file: /cvs/extras/rpms/codeblocks/F-9/codeblocks.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- codeblocks.spec	22 Sep 2008 06:18:58 -0000	1.26
+++ codeblocks.spec	31 Oct 2008 09:07:21 -0000	1.27
@@ -1,6 +1,6 @@
 Name:		codeblocks
 Version:	8.02
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	An open source, cross platform, free C++ IDE
 Group:		Development/Tools
 License:	GPLv3+
@@ -19,6 +19,8 @@
 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 @@
 %patch1
 %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 @@
 
 
 %changelog
+* Fri Oct 31 2008 Dan Horak <dan[at]danny.cz> 8.02-3
+- fix gcc detection (#469096)
+
 * Sat Sep 20 2008 Dan Horak <dan[at]danny.cz> 8.02-2
 - update desktop file
 - fix running console applications (#461120)




More information about the fedora-extras-commits mailing list