]> git.pld-linux.org Git - packages/tesseract.git/commitdiff
- updated to 3.04.01 auto/th/tesseract-3.04.01-1
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 26 Feb 2016 16:57:59 +0000 (17:57 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 26 Feb 2016 16:57:59 +0000 (17:57 +0100)
- added opencl patch (fixes build with OpenCL), added opencl bcond (default off, as upstream)

tesseract-opencl.patch [new file with mode: 0644]
tesseract.spec

diff --git a/tesseract-opencl.patch b/tesseract-opencl.patch
new file mode 100644 (file)
index 0000000..2634df6
--- /dev/null
@@ -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 = \
index 88537052003833d0ca3fce66869018c5d9d92071..bb59b373bb9182658903218e4cd4b59973319fe7 100644 (file)
@@ -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
This page took 0.066734 seconds and 4 git commands to generate.