[packages/tesseract] add static_libs bcond

atler atler at pld-linux.org
Thu Feb 29 21:22:38 CET 2024


commit 2e9a77d786ad32f277de368d7e3197458d7f08df
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Feb 29 20:50:26 2024 +0100

    add static_libs bcond

 tesseract.spec | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/tesseract.spec b/tesseract.spec
index 934119a..bab92e3 100644
--- a/tesseract.spec
+++ b/tesseract.spec
@@ -2,8 +2,9 @@
 # - tensorflow support
 #
 # Conditional build:
-%bcond_without	openmp	# OpenMP support
-%bcond_with	opencl	# OpenCL support
+%bcond_without	openmp		# OpenMP support
+%bcond_with	opencl		# OpenCL support
+%bcond_without	static_libs	# static library
 
 Summary:	Tesseract Open Source OCR Engine
 Summary(pl.UTF-8):	Tesseract - silnik OCR o otwartych źródłach
@@ -31,6 +32,7 @@ BuildRequires:	libtiff-devel
 BuildRequires:	libtool >= 2:2
 BuildRequires:	libxslt-progs
 BuildRequires:	pango-devel >= 1:1.38.0
+BuildRequires:	rpmbuild(macros) >= 1.527
 Requires:	leptonlib >= 1.74
 Suggests:	tesseract-data >= 3
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -100,7 +102,8 @@ Statyczne biblioteki Tesseracta.
 %configure \
 	%{?with_opencl:--enable-opencl} \
 	%{!?with_openmp:--disable-openmp} \
-	--disable-silent-rules
+	--disable-silent-rules \
+	%{__enable_disable static_libs static}
 %{__make}
 %{__make} training
 
@@ -176,6 +179,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man5/unicharambigs.5*
 %{_mandir}/man5/unicharset.5*
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libtesseract.a
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tesseract.git/commitdiff/2d9f7af412cd0be73ce50fe17d68c368d582916f



More information about the pld-cvs-commit mailing list