rpms/gpsim/FC-5 gpsim-0.21.11.ktechlab.patch, NONE, 1.1 gpsim.spec, 1.8, 1.9

Alain Portal (dionysos) fedora-extras-commits at redhat.com
Sat Sep 23 17:15:18 UTC 2006


Author: dionysos

Update of /cvs/extras/rpms/gpsim/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17099

Modified Files:
	gpsim.spec 
Added Files:
	gpsim-0.21.11.ktechlab.patch 
Log Message:
Add patch to fix a ktechlab crash, a ktechlab upstream contribution.

gpsim-0.21.11.ktechlab.patch:

--- NEW FILE gpsim-0.21.11.ktechlab.patch ---
diff -U 3 -H -d -r -N -- src/os_dependent.cc src/os_dependent.cc
--- src/os_dependent.cc	2005-08-25 22:57:41.000000000 +0100
+++ src/os_dependent.cc	2005-12-27 01:00:16.000000000 +0000
@@ -229,6 +229,11 @@
   }
 }
 
+bool bHasAbsolutePath(string &fname)
+{
+  return fname[0] == FOLDERDELIMITER;
+}
+
 //---------------------------
 //OS agnostic library loader
 
diff -U 3 -H -d -r -N -- src/processor.cc src/processor.cc
--- src/processor.cc	2005-10-01 22:12:55.000000000 +0100
+++ src/processor.cc	2005-12-27 01:00:00.000000000 +0000
@@ -2244,9 +2244,12 @@
   return -1;
 }
 
+extern bool bHasAbsolutePath(string &fname);
+
 int FileContextList::Add(string &new_name)
 {
-  string sFull = sSourcePath + new_name;
+  string sFull = bHasAbsolutePath(new_name) ? new_name : (sSourcePath + new_name);
+//   string sFull = sSourcePath + new_name;
   push_back(FileContext(sFull));
   lastFile++;
   if(CSimulationContext::GetContext()->IsSourceEnabled()) {
@@ -2261,6 +2264,9 @@
 
 int FileContextList::Add(char *new_name)
 {
+  string sNewName(new_name);
+  return Add (sNewName);
+  /*
   string sFull = sSourcePath + new_name;
   push_back(FileContext(sFull));
   lastFile++;
@@ -2270,6 +2276,7 @@
          << "  id = " << lastFile << endl;
 
   return lastFile-1;
+  */
 }
 
 FileContext *FileContextList::operator [] (int file_id)
diff -U 3 -H -d -r -N -- src/symbol.cc src/symbol.cc
--- src/symbol.cc	2005-09-07 14:34:24.000000000 +0100
+++ src/symbol.cc	2005-12-23 19:26:05.000000000 +0000
@@ -697,9 +697,8 @@
 
 void Symbol_Table::clear() {
   iterator it;
-  iterator itEnd = end();
   int i = 0;
-  for(it = begin(); it != itEnd;) {
+  for(it = begin(); it != end();) {
     Value *value = *it;
     if(value->isClearable()) {
       delete value;


Index: gpsim.spec
===================================================================
RCS file: /cvs/extras/rpms/gpsim/FC-5/gpsim.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- gpsim.spec	15 Mar 2006 09:11:15 -0000	1.8
+++ gpsim.spec	23 Sep 2006 17:15:17 -0000	1.9
@@ -1,6 +1,6 @@
 Name:		gpsim
 Version:	0.21.11
-Release:	6%{?dist}
+Release:	7%{?dist}
 Summary:	A simulator for Microchip (TM) PIC (TM) microcontrollers
 Summary(fr):	Un simulateur pour les microcontrôleurs PIC (TM) Microchip (TM)
 
@@ -9,6 +9,7 @@
 URL:		http://www.dattalo.com/gnupic/gpsim.html
 Source:		http://dl.sf.net/gpsim/gpsim-%{version}.tar.gz
 Patch:		%{name}-%{version}.happy_gcc
+Patch1:		%{name}-%{version}.ktechlab.patch
 BuildRoot: 	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	gtk+extra-devel, flex, readline-devel
@@ -45,18 +46,19 @@
 %prep
 %setup -q
 %patch -p1
+%patch1 -p0
 %{__chmod} a-x examples/12bit/p12x.inc examples/14bit/sine.asm
 
 %build
 %configure
-make %{?_smp_mflags}
+%{__make} %{?_smp_mflags}
 
 %install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
+%{__rm} -rf %{buildroot}
+%{__make} install DESTDIR=%{buildroot}
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+%{__rm} -rf %{buildroot}
 
 %post -p /sbin/ldconfig
 
@@ -80,6 +82,12 @@
 %{_includedir}/*
 
 %changelog
+* Sat Sep 23 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.21.11-7
+  - Add patch to fix a ktechlab crash, a ktechlab upstream contribution
+    See http://ktechlab.org/download/gpsim.php
+  - Use macros for rm and make
+  - Use macro style instead of variable style
+
 * Wed Mar 15 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0.21.11-6
   - Update Patch
 




More information about the scm-commits mailing list