diff --git a/gpsim-0.21.11.ktechlab.patch b/gpsim-0.21.11.ktechlab.patch new file mode 100644 index 0000000..f48cb39 --- /dev/null +++ b/gpsim-0.21.11.ktechlab.patch @@ -0,0 +1,64 @@ +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; diff --git a/gpsim.spec b/gpsim.spec index 87c4d9d..c182f74 100644 --- a/gpsim.spec +++ b/gpsim.spec @@ -1,6 +1,6 @@ Name: gpsim Version: 0.21.11 -Release: 7%{?dist} +Release: 8%{?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 @@ License: GPL 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 @@ qui utilisent la bibliothèque gpsim. %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 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/* %changelog +* Sat Sep 23 2006 Alain Portal 0.21.11-8 + - 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 + * Fri Sep 1 2006 Alain Portal 0.21.11-7 - FE6 rebuild