]> git.pld-linux.org Git - packages/tesseract.git/blobdiff - tesseract.spec
- rebuild with icu 58.2
[packages/tesseract.git] / tesseract.spec
index dc50c35aa0d02255d3145e05f0447c493c2d972a..bb83ff3da95909ec51b4f4ac48b40892ae79d49c 100644 (file)
@@ -1,22 +1,31 @@
 # TODO:
 # - warnings at compile stage about pointer size on amd64 - needs check
+#
+# Conditional build:
+%bcond_without openmp  # 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:       1
+Version:       3.04.01
+Release:       3
 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
+%{?with_openmp: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)
@@ -33,7 +42,7 @@ latach 1985-1995. W 1995 roku był jednym z 3 najlepszych wg UNLV.
 
 %package training
 Summary:       Tesseract training tools
-Summary(pl.UTF-8):     Pliki treningowe tesseracta
+Summary(pl.UTF-8):     Narzędzia treningowe Tesseracta
 Group:          Applications/Graphics
 Requires:      %{name} = %{version}
 
@@ -41,7 +50,7 @@ Requires:     %{name} = %{version}
 This package contains the Tesseract training tools.
 
 %description training -l pl.UTF-8
-Ten pakiet zawiera programy do trenowania tesseracta.
+Ten pakiet zawiera programy do trenowania Tesseracta.
 
 %package devel
 Summary:       Header files for Tesseract libraries
@@ -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_openmp:--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
@@ -117,6 +125,7 @@ rm -rf $RPM_BUILD_ROOT
 %files training
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/ambiguous_words
+%attr(755,root,root) %{_bindir}/classifier_tester
 %attr(755,root,root) %{_bindir}/cntraining
 %attr(755,root,root) %{_bindir}/combine_tessdata
 %attr(755,root,root) %{_bindir}/dawg2wordlist
This page took 0.074024 seconds and 4 git commands to generate.