Fix FTBFS with g++ 4.7

* Tue Jul 31 2012 Kevin Kofler <Kevin@tigcc.ticalc.org> - 3.00-6
- Fix FTBFS with g++ 4.7
This commit is contained in:
Kevin Kofler 2012-07-31 23:35:21 +02:00
parent 6e8023589c
commit 3d26c66db1
2 changed files with 18 additions and 1 deletions

View File

@ -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__

View File

@ -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@tigcc.ticalc.org> - 3.00-6
- Fix FTBFS with g++ 4.7
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.00-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild