[gpsim/f20] Add ^C patch
Roy Rankin
rrankin at fedoraproject.org
Wed Nov 19 20:50:08 UTC 2014
commit ee4962809b27d0d8b820a1dfea03ad5d82d94c1e
Author: Roy Rankin <rrankin at ihug.com.au>
Date: Thu Nov 20 07:49:55 2014 +1100
Add ^C patch
gpsim-0.28.1-break.patch | 27 +++++++++++++++++++++++++++
gpsim.png | Bin 0 -> 1383 bytes
gpsim.spec | 21 ++++++++++++++-------
3 files changed, 41 insertions(+), 7 deletions(-)
---
diff --git a/gpsim-0.28.1-break.patch b/gpsim-0.28.1-break.patch
new file mode 100644
index 0000000..ce4860f
--- /dev/null
+++ b/gpsim-0.28.1-break.patch
@@ -0,0 +1,27 @@
+From 6ec1e6af69ec7d71da81d133bb2a9c2977e16647 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Tue, 28 Oct 2014 11:49:25 +0100
+Subject: [PATCH] Don't crash on CTRL+C in console if the simulation is not
+ running
+
+---
+ src/sim_context.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/sim_context.cc b/src/sim_context.cc
+index c4b8373..9276bd4 100644
+--- a/src/sim_context.cc
++++ b/src/sim_context.cc
+@@ -315,7 +315,8 @@ void CSimulationContext::NotifyUserCanceled() {
+ m_pbUserCanceled = NULL;
+ return;
+ }
+- if(CSimulationContext::GetContext()->GetActiveCPU()->simulation_mode
++ if(CSimulationContext::GetContext()->GetActiveCPU() &&
++ CSimulationContext::GetContext()->GetActiveCPU()->simulation_mode
+ == eSM_RUNNING) {
+ // If we get a CTRL->C while processing a command file
+ // we should probably stop the command file processing.
+--
+2.1.0
+
diff --git a/gpsim.png b/gpsim.png
new file mode 100644
index 0000000..ddb339a
Binary files /dev/null and b/gpsim.png differ
diff --git a/gpsim.spec b/gpsim.spec
index e9facd5..b102b23 100644
--- a/gpsim.spec
+++ b/gpsim.spec
@@ -1,6 +1,6 @@
Name: gpsim
Version: 0.28.1
-Release: 0%{?dist}
+Release: 1%{?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,8 @@ Group: Development/Debuggers
License: GPLv2+ and LGPLv2+
URL: http://gpsim.sourceforge.net/gpsim.html
Source: http://downloads.sourceforge.net/gpsim/gpsim-%{version}.tar.gz
+Source1: gpsim.png
+Patch1: gpsim-%{version}-break.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gtk+extra-devel, flex, readline-devel, popt-devel
@@ -51,6 +53,7 @@ mv ChangeLog ChangeLog.raw
iconv -f ISO88592 -t UTF8 AUTHORS.raw -o AUTHORS
iconv -f ISO88592 -t UTF8 ChangeLog.raw -o ChangeLog
rm -f AUTHORS.raw ChangeLog.raw
+%patch1 -p1
autoconf
%build
@@ -64,14 +67,14 @@ autoconf
%{__rm} -f examples/modules/Makefile
%{__rm} -f examples/projects/Makefile
install -Dm 0644 -p doc/metadata/%{name}.desktop \
- %{buildroot}%{_datadir}/applications/%{name}.desktop
-install -Dm 0644 -p doc/metadata/%{name}.png \
- %{buildroot}%{_datadir}/pixmaps/%{name}.png
+ %{buildroot}%{_datadir}/applications/%{name}.desktop
+install -Dm 0644 -p %{SOURCE1} \
+ %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -Dm 0644 -p doc/metadata/%{name}.appdata.xml \
- %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
+ %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
desktop-file-install --vendor=""\
- --dir=%{buildroot}/%{_datadir}/applications\
- %{buildroot}%{_datadir}/applications/%{name}.desktop
+ --dir=%{buildroot}/%{_datadir}/applications\
+ %{buildroot}%{_datadir}/applications/%{name}.desktop
%clean
@@ -102,6 +105,10 @@ desktop-file-install --vendor=""\
%{_includedir}/*
%changelog
+* Thu Nov 20 2014 Roy Rankin <rrankin at ihug.com.au> - 0.28.1-1
+- Fix CTRL+C crash
+- use website icon
+
* Sun Nov 16 2014 Roy Rankin <rrankin at ihug.com.au> - 0.28.1-0
- Upstream update to 0.28.1
- Add desktop and appdatta which is now delivered from upstream
More information about the scm-commits
mailing list