[mrpt] Rebuild for new OpenCV
rmattes
rmattes at fedoraproject.org
Sun Jul 15 15:23:42 UTC 2012
commit 5af061ff7eb9c449fee80a1af7561a57a41bcb2f
Author: Rich Mattes <richmattes at gmail.com>
Date: Sun Jul 15 11:23:33 2012 -0400
Rebuild for new OpenCV
- Fix for zlib 1.2.7
- Fix for gcc 4.7
mrpt-0.9.5.gcc47.patch | 40 ++++++++++++++++++++++
mrpt-0.9.5.gzip.patch | 85 ++++++++++++++++++++++++++++++++++++++++++++++++
mrpt.spec | 11 ++++++-
3 files changed, 135 insertions(+), 1 deletions(-)
---
diff --git a/mrpt-0.9.5.gcc47.patch b/mrpt-0.9.5.gcc47.patch
new file mode 100644
index 0000000..c3ed3de
--- /dev/null
+++ b/mrpt-0.9.5.gcc47.patch
@@ -0,0 +1,40 @@
+diff -up ./mrpt-0.9.5/libs/base/include/mrpt/math/eigen_plugins.h.gcc47 ./mrpt-0.9.5/libs/base/include/mrpt/math/eigen_plugins.h
+--- ./mrpt-0.9.5/libs/base/include/mrpt/math/eigen_plugins.h.gcc47 2012-07-14 19:46:25.374532651 -0400
++++ ./mrpt-0.9.5/libs/base/include/mrpt/math/eigen_plugins.h 2012-07-14 19:46:57.228764489 -0400
+@@ -394,8 +394,8 @@ public:
+ outStdVector.resize(cols());
+ for (Index i=0;i<cols();i++)
+ {
+- outMeanVector[i]= col(i).array().sum() * N_inv;
+- outStdVector[i] = std::sqrt( (col(i).array()-outMeanVector[i]).square().sum() * N_ );
++ outMeanVector[i]= this->col(i).array().sum() * N_inv;
++ outStdVector[i] = std::sqrt( (this->col(i).array()-outMeanVector[i]).square().sum() * N_ );
+ }
+ }
+
+diff -up ./mrpt-0.9.5/libs/base/include/mrpt/otherlibs/stlplus/smart_ptr.hpp.gcc47 ./mrpt-0.9.5/libs/base/include/mrpt/otherlibs/stlplus/smart_ptr.hpp
+--- ./mrpt-0.9.5/libs/base/include/mrpt/otherlibs/stlplus/smart_ptr.hpp.gcc47 2010-07-15 21:13:00.000000000 -0400
++++ ./mrpt-0.9.5/libs/base/include/mrpt/otherlibs/stlplus/smart_ptr.hpp 2012-07-14 19:46:08.978898821 -0400
+@@ -286,8 +286,8 @@ namespace stlplus
+ smart_ptr_clone(void) {}
+ explicit smart_ptr_clone(const T& data) : smart_ptr_base<T, clone_copy<T>, COUNTER >(data) {}
+ explicit smart_ptr_clone(T* data) : smart_ptr_base<T, clone_copy<T>, COUNTER >(data) {}
+- smart_ptr_clone<T>& operator=(const T& data) {set_value(data); return *this;}
+- smart_ptr_clone<T>& operator=(const smart_ptr_clone<T>& r) {alias(r); return *this;}
++ smart_ptr_clone<T>& operator=(const T& data) {this->set_value(data); return *this;}
++ smart_ptr_clone<T>& operator=(const smart_ptr_clone<T>& r) {this->alias(r); return *this;}
+ ~smart_ptr_clone(void) {}
+ };
+
+diff -up ./mrpt-0.9.5/libs/base/src/utils/simpleini/SimpleIni.h.gcc47 ./mrpt-0.9.5/libs/base/src/utils/simpleini/SimpleIni.h
+--- ./mrpt-0.9.5/libs/base/src/utils/simpleini/SimpleIni.h.gcc47 2010-05-14 06:31:39.000000000 -0400
++++ ./mrpt-0.9.5/libs/base/src/utils/simpleini/SimpleIni.h 2012-07-14 19:46:08.980898899 -0400
+@@ -416,7 +416,7 @@ public:
+ return *this;
+ }
+ bool ConvertToStore(const SI_CHAR * a_pszString) {
+- size_t uLen = SizeToStore(a_pszString);
++ size_t uLen = this->SizeToStore(a_pszString);
+ if (uLen == (size_t)(-1)) {
+ return false;
+ }
diff --git a/mrpt-0.9.5.gzip.patch b/mrpt-0.9.5.gzip.patch
new file mode 100644
index 0000000..8a9e8b7
--- /dev/null
+++ b/mrpt-0.9.5.gzip.patch
@@ -0,0 +1,85 @@
+diff -up ./mrpt-0.9.5/libs/base/src/utils/CFileGZInputStream.cpp.gzip ./mrpt-0.9.5/libs/base/src/utils/CFileGZInputStream.cpp
+--- ./mrpt-0.9.5/libs/base/src/utils/CFileGZInputStream.cpp.gzip 2011-08-07 14:40:43.000000000 -0400
++++ ./mrpt-0.9.5/libs/base/src/utils/CFileGZInputStream.cpp 2012-07-14 14:50:55.598444172 -0400
+@@ -66,7 +66,7 @@ bool CFileGZInputStream::open(const std:
+ {
+ MRPT_START
+
+- if (m_f) gzclose(m_f);
++ if (m_f) gzclose((gzFile)m_f);
+
+ // Get compressed file size:
+ m_file_size = mrpt::system::getFileSize(fileName);
+@@ -87,7 +87,7 @@ void CFileGZInputStream::close()
+ {
+ if (m_f)
+ {
+- gzclose(m_f);
++ gzclose((gzFile)m_f);
+ m_f = NULL;
+ }
+ }
+@@ -108,7 +108,7 @@ size_t CFileGZInputStream::Read(void *B
+ {
+ if (!m_f) { THROW_EXCEPTION("File is not open."); }
+
+- return gzread(m_f,Buffer,Count);
++ return gzread((gzFile)m_f,Buffer,Count);
+ }
+
+ /*---------------------------------------------------------------
+@@ -135,7 +135,7 @@ uint64_t CFileGZInputStream::getTotalByt
+ uint64_t CFileGZInputStream::getPosition()
+ {
+ if (!m_f) { THROW_EXCEPTION("File is not open."); }
+- return gztell(m_f);
++ return gztell((gzFile)m_f);
+ }
+
+ /*---------------------------------------------------------------
+@@ -152,5 +152,5 @@ bool CFileGZInputStream::fileOpenCorrec
+ bool CFileGZInputStream::checkEOF()
+ {
+ if (!m_f) return true;
+- else return 0!=gzeof(m_f);
++ else return 0!=gzeof((gzFile)m_f);
+ }
+diff -up ./mrpt-0.9.5/libs/base/src/utils/CFileGZOutputStream.cpp.gzip ./mrpt-0.9.5/libs/base/src/utils/CFileGZOutputStream.cpp
+--- ./mrpt-0.9.5/libs/base/src/utils/CFileGZOutputStream.cpp.gzip 2011-08-07 14:40:43.000000000 -0400
++++ ./mrpt-0.9.5/libs/base/src/utils/CFileGZOutputStream.cpp 2012-07-14 14:50:34.444707988 -0400
+@@ -72,7 +72,7 @@ bool CFileGZOutputStream::open( const st
+ {
+ MRPT_START
+
+- if (m_f) gzclose(m_f);
++ if (m_f) gzclose((gzFile)m_f);
+
+ // Open gz stream:
+ m_f = gzopen(fileName.c_str(),format("wb%i",compress_level).c_str() );
+@@ -96,7 +96,7 @@ void CFileGZOutputStream::close()
+ {
+ if (m_f)
+ {
+- gzclose(m_f);
++ gzclose((gzFile)m_f);
+ m_f = NULL;
+ }
+ }
+@@ -117,7 +117,7 @@ size_t CFileGZOutputStream::Read(void *
+ size_t CFileGZOutputStream::Write(const void *Buffer, size_t Count)
+ {
+ if (!m_f) { THROW_EXCEPTION("File is not open."); }
+- return gzwrite(m_f,(void*)Buffer,Count);
++ return gzwrite((gzFile)m_f,(void*)Buffer,Count);
+ }
+
+ /*---------------------------------------------------------------
+@@ -126,7 +126,7 @@ size_t CFileGZOutputStream::Write(const
+ uint64_t CFileGZOutputStream::getPosition()
+ {
+ if (!m_f) { THROW_EXCEPTION("File is not open."); }
+- return gztell(m_f);
++ return gztell((gzFile)m_f);
+ }
+
+ /*---------------------------------------------------------------
diff --git a/mrpt.spec b/mrpt.spec
index a7ea9a3..4681e60 100644
--- a/mrpt.spec
+++ b/mrpt.spec
@@ -1,7 +1,7 @@
Summary: Libraries and programs for mobile robot SLAM and navigation
Name: mrpt
Version: 0.9.5
-Release: 0.4.20110917svn2662%{?dist}
+Release: 0.5.20110917svn2662%{?dist}
License: GPLv3+
Group: Development/Libraries
URL: http://www.mrpt.org/
@@ -16,6 +16,8 @@ URL: http://www.mrpt.org/
# svn export http://babel.isa.uma.es/mrpt-browse-code/mrpt-0.7.0 mrpt-0.7.0
# tar -czvf mrpt-0.7.0-20090529svn1047.tar.gz mrpt-0.70
Source: http://archive.mrpt.org/fedora-packages/mrpt-0.9.5-20110917svn2662.tar.gz
+Patch0: mrpt-0.9.5.gcc47.patch
+Patch1: mrpt-0.9.5.gzip.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -258,6 +260,8 @@ with Doxygen.
%prep
%setup -q
+%patch0 -p2 -b .gcc47
+%patch1 -p2 -b .gzip
# Fix encoding of the mrpt-book file
#gzip -d doc/mrpt-book.ps.gz
#iconv -f ISO8859-1 -t UTF-8 doc/mrpt-book.ps > mrpt-book.ps.conv
@@ -470,6 +474,11 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%changelog
+* Sat Jul 14 2012 Rich Mattes <richmattes at gmail.com> - 0.9.5-0.5.20110917svn2662
+- Rebuild for new OpenCV
+- Fix for zlib 1.2.7
+- Fix for gcc 4.7
+
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.5-0.4.20110917svn2662
- Rebuilt for c++ ABI breakage
More information about the scm-commits
mailing list