[tesseract] Fix FTBFS with g++ 4.7

Kevin Kofler kkofler at fedoraproject.org
Tue Jul 31 21:35:56 UTC 2012


commit 3d26c66db1bb4daa846b7d420b54b0a7617388f0
Author: Kevin Kofler <Kevin at tigcc.ticalc.org>
Date:   Tue Jul 31 23:35:21 2012 +0200

    Fix FTBFS with g++ 4.7
    
    * Tue Jul 31 2012 Kevin Kofler <Kevin at tigcc.ticalc.org> - 3.00-6
    - Fix FTBFS with g++ 4.7

 tesseract-3.00-gcc47.patch |   11 +++++++++++
 tesseract.spec             |    8 +++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/tesseract-3.00-gcc47.patch b/tesseract-3.00-gcc47.patch
new file mode 100644
index 0000000..22e6c6d
--- /dev/null
+++ b/tesseract-3.00-gcc47.patch
@@ -0,0 +1,11 @@
+diff -ur tesseract-3.00/viewer/svutil.cpp tesseract-3.00-gcc47/viewer/svutil.cpp
+--- tesseract-3.00/viewer/svutil.cpp	2010-09-30 17:22:07.000000000 +0200
++++ tesseract-3.00-gcc47/viewer/svutil.cpp	2012-07-31 23:30:16.000000000 +0200
+@@ -39,6 +39,7 @@
+ #include <signal.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ #include <netdb.h>
+ #include <sys/socket.h>
+ #ifdef __linux__
diff --git a/tesseract.spec b/tesseract.spec
index d4c3e6c..5eef6fe 100644
--- a/tesseract.spec
+++ b/tesseract.spec
@@ -1,6 +1,6 @@
 Name:		tesseract
 Version:	3.00
-Release:	5%{?dist}
+Release:	6%{?dist}
 Summary:	Raw OCR Engine 
 
 Group:		Applications/File
@@ -8,6 +8,8 @@ License:	ASL 2.0
 URL:		http://code.google.com/p/tesseract-ocr/
 Source0:	http://tesseract-ocr.googlecode.com/files/%{name}-%{version}.tar.gz
 Source1:	http://tesseract-ocr.googlecode.com/files/eng.traineddata.gz
+# fix FTBFS with g++ 4.7
+Patch0:		tesseract-3.00-gcc47.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:	libtiff-devel
 
@@ -28,6 +30,7 @@ developing applications that use %{name}.
 %prep
 %setup -q
 gzip -dc %{SOURCE1} > eng.traineddata
+%patch0 -p1 -b .gcc47
 
 %build
 sed -i 's#-DTESSDATA_PREFIX=@datadir@/#-DTESSDATA_PREFIX=@datadir@/%{name}/##' ccutil/Makefile.*
@@ -68,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/lib%{name}*.so
 
 %changelog
+* Tue Jul 31 2012 Kevin Kofler <Kevin at tigcc.ticalc.org> - 3.00-6
+- Fix FTBFS with g++ 4.7
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.00-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list