commit 9694f838e8f111b49e5b38f72a19ef822abf1191
Author: Jakub Bogusz <[email protected]>
Date:   Fri Feb 26 17:57:59 2016 +0100

    - updated to 3.04.01
    - added opencl patch (fixes build with OpenCL), added opencl bcond (default 
off, as upstream)

 tesseract-opencl.patch | 29 +++++++++++++++++++++++++++++
 tesseract.spec         | 34 +++++++++++++++++++++-------------
 2 files changed, 50 insertions(+), 13 deletions(-)
---
diff --git a/tesseract.spec b/tesseract.spec
index 8853705..bb59b37 100644
--- a/tesseract.spec
+++ b/tesseract.spec
@@ -1,22 +1,31 @@
 # TODO:
 # - warnings at compile stage about pointer size on amd64 - needs check
+#
+# Conditional build:
+%bcond_without gomp    # OpenMP support
+%bcond_with    opencl  # OpenCL support
+#
 Summary:       Tesseract Open Source OCR Engine
 Summary(pl.UTF-8):     Tesseract - silnik OCR o otwartych źródłach
 Name:          tesseract
-Version:       3.04.00
-Release:       2
+Version:       3.04.01
+Release:       1
 License:       Apache v2.0
 Group:         Applications/Graphics
-Source0:       
https://github.com/tesseract-ocr/tesseract/archive/%{version}.tar.gz
-# Source0-md5: 078130b9c7d28c558a0e49d432505864
-URL:           http://code.google.com/p/tesseract-ocr/
+Source0:       
https://github.com/tesseract-ocr/tesseract/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 645a21effcf2825a3473849d72a7fd90
+Patch0:                %{name}-opencl.patch
+URL:           https://github.com/tesseract-ocr/
+%{?with_opencl:BuildRequires:  OpenCL-devel}
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
 BuildRequires: cairo-devel
 BuildRequires: leptonlib-devel >= 1.71
+BuildRequires: libgomp-devel
 BuildRequires: libicu-devel
-BuildRequires: libstdc++-devel
-BuildRequires: libtool
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: libtiff-devel
+BuildRequires: libtool >= 2:2
 BuildRequires: pango-devel
 Suggests:      tesseract-data >= 3
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -73,10 +82,7 @@ Statyczne biblioteki Tesseracta.
 
 %prep
 %setup -q
-# workaround for 'off_t undefined when -std=c++11' workaround
-%ifarch x32
-%{__sed} -e 's|typedef long off_t;|//typedef long off_t;|' -i 
ccutil/scanutils.cpp
-%endif
+%patch0 -p1
 
 %build
 %{__libtoolize}
@@ -84,7 +90,9 @@ Statyczne biblioteki Tesseracta.
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-%configure
+%configure \
+       %{?with_opencl:--enable-opencl} \
+       %{!?with_gomp:--disable-openmp}
 %{__make}
 %{__make} training
 
@@ -107,7 +115,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS COPYING ChangeLog README ReleaseNotes
+%doc AUTHORS COPYING ChangeLog README.md ReleaseNotes
 %attr(755,root,root) %{_bindir}/tesseract
 %attr(755,root,root) %{_libdir}/libtesseract.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libtesseract.so.3
diff --git a/tesseract-opencl.patch b/tesseract-opencl.patch
new file mode 100644
index 0000000..2634df6
--- /dev/null
+++ b/tesseract-opencl.patch
@@ -0,0 +1,29 @@
+--- tesseract-3.04.01/configure.ac.orig        2016-02-16 22:27:01.000000000 
+0100
++++ tesseract-3.04.01/configure.ac     2016-02-25 21:32:09.495375558 +0100
+@@ -248,7 +248,7 @@
+         fi
+         AC_SUBST([AM_CPPFLAGS], [-DUSE_OPENCL])
+         OPENCL_CPPFLAGS="-I${OPENCL_INC}"
+-        OPENCL_LDFLAGS="-l${OPENCL_LIBS}"
++        OPENCL_LDFLAGS="${OPENCL_LIBS}"
+     fi
+     ;;
+ esac
+--- tesseract-3.04.01/opencl/Makefile.am.orig  2016-02-16 22:27:01.000000000 
+0100
++++ tesseract-3.04.01/opencl/Makefile.am       2016-02-26 15:40:52.609300973 
+0100
+@@ -4,12 +4,14 @@
+ 
+ if !USING_MULTIPLELIBS
+ noinst_LTLIBRARIES = libtesseract_opencl.la
++libtesseract_opencl_la_LIBADD = $(OPENCL_LDFLAGS) -ltiff
+ else
+ lib_LTLIBRARIES = libtesseract_opencl.la
+ libtesseract_opencl_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION) 
$(OPENCL_LDFLAGS)
+ libtesseract_opencl_la_LIBADD = \
+     ../ccutil/libtesseract_ccutil.la \
+-    ../viewer/libtesseract_viewer.la
++    ../viewer/libtesseract_viewer.la \
++    $(OPENCL_LDFLAGS) -ltiff
+ endif
+ 
+ libtesseract_opencl_la_SOURCES = \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tesseract.git/commitdiff/9694f838e8f111b49e5b38f72a19ef822abf1191

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to