[urg] Fix FTBFS with gcc 4.7

Peter Robinson pbrobinson at fedoraproject.org
Sun Mar 4 17:21:12 UTC 2012


commit ce2c9d4140c3c055d12e129ca94658cdb9784f77
Author: Peter Robinson <pbrobinson at gmail.com>
Date:   Sun Mar 4 17:21:01 2012 +0000

    Fix FTBFS with gcc 4.7

 urg-0.8.11-gcc47.patch |   10 ++++++++++
 urg.spec               |   13 ++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)
---
diff --git a/urg-0.8.11-gcc47.patch b/urg-0.8.11-gcc47.patch
new file mode 100644
index 0000000..3b796b2
--- /dev/null
+++ b/urg-0.8.11-gcc47.patch
@@ -0,0 +1,10 @@
+--- urg-0.8.11/src/cpp/connection/SerialDevice.cpp.orig	2012-03-04 15:44:49.816546498 +0000
++++ urg-0.8.11/src/cpp/connection/SerialDevice.cpp	2012-03-04 16:19:09.730663243 +0000
+@@ -10,6 +10,7 @@
+ #include "SerialDevice.h"
+ #include "DetectOS.h"
+ #include "RingBuffer.h"
++#include <unistd.h>
+ #include <string>
+ 
+ using namespace qrk;
diff --git a/urg.spec b/urg.spec
index 296524a..0d421ab 100644
--- a/urg.spec
+++ b/urg.spec
@@ -1,6 +1,6 @@
 Name:           urg
 Version:        0.8.11
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Library to access Hokuyo URG laser range finders
 
 Group:          System Environment/Libraries
@@ -9,7 +9,7 @@ URL:            http://www.hokuyo-aut.jp/cgi-bin/urg_programs_en/
 Source0:        http://www.hokuyo-aut.jp/02sensor/07scanner/download/urg_programs_en/urg-0.8.11.zip
 Patch0:         urg-0.8.7-noforwdecl.patch
 Patch1:         urg-0.8.11-gcc46.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch2:         urg-0.8.11-gcc47.patch
 
 BuildRequires:  autoconf automake libtool
 BuildRequires:  SDL_net-devel
@@ -35,6 +35,7 @@ developing applications that use %{name}.
 %setup -q
 %patch0 -p1 -b .noforwdecl
 %patch1 -p1 -b .gcc46
+%patch2 -p1 -b .gcc47
 
 %build
 #libtoolize --copy
@@ -48,15 +49,10 @@ make %{?_smp_mflags}
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
 
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
@@ -75,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sun Mar  4 2012 Peter Robinson <pbrobinson at fedoraproject.org> - 0.8.11-5
+- Fix gcc 4.7 FTBFS
+
 * Tue Feb 28 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.11-4
 - Rebuilt for c++ ABI breakage
 


More information about the scm-commits mailing list