Build training tool libraries statically
This commit is contained in:
parent
622725d184
commit
b72178e0a5
@ -2,7 +2,7 @@
|
||||
|
||||
Name: tesseract
|
||||
Version: 5.1.0
|
||||
Release: 1%{?pre:.%pre}%{?dist}
|
||||
Release: 2%{?pre:.%pre}%{?dist}
|
||||
Summary: Raw OCR Engine
|
||||
|
||||
License: ASL 2.0
|
||||
@ -12,6 +12,7 @@ Source0: https://github.com/tesseract-ocr/tesseract/archive/%{version}%{?p
|
||||
# Fix library name case
|
||||
# Fix shared library version suffix
|
||||
# Honour TESSDATA_PREFIX
|
||||
# Build training libs statically
|
||||
Patch0: tesseract_cmake.patch
|
||||
|
||||
|
||||
@ -223,6 +224,9 @@ cp -a doc/*.5 %{buildroot}%{_mandir}/man5/
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Mar 11 2022 Sandro Mani <manisandro@gmail.com> - 5.1.0-2
|
||||
- Build training tool libraries statically
|
||||
|
||||
* Wed Mar 02 2022 Sandro Mani <manisandro@gmail.com> - 5.1.0-1
|
||||
- Update to 5.1.0
|
||||
|
||||
|
||||
@ -38,3 +38,33 @@ diff -rupN --no-dereference tesseract-5.1.0/CMakeLists.txt tesseract-5.1.0-new/C
|
||||
endif()
|
||||
|
||||
# ##############################################################################
|
||||
diff -rupN tesseract-5.1.0/src/training/CMakeLists.txt tesseract-5.1.0-new/src/training/CMakeLists.txt
|
||||
--- tesseract-5.1.0/src/training/CMakeLists.txt 2022-03-01 17:25:45.000000000 +0100
|
||||
+++ tesseract-5.1.0-new/src/training/CMakeLists.txt 2022-03-11 11:14:25.962728696 +0100
|
||||
@@ -108,7 +108,7 @@ if(NOT DISABLED_LEGACY_ENGINE)
|
||||
common/trainingsampleset.h)
|
||||
endif()
|
||||
|
||||
-add_library(common_training ${COMMON_TRAINING_SRC})
|
||||
+add_library(common_training STATIC ${COMMON_TRAINING_SRC})
|
||||
target_include_directories(common_training PUBLIC common
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_link_libraries(common_training PUBLIC libtesseract)
|
||||
@@ -242,7 +242,7 @@ if(ICU_FOUND)
|
||||
|
||||
file(GLOB unicharset_training_src unicharset/*)
|
||||
|
||||
- add_library(unicharset_training ${unicharset_training_src})
|
||||
+ add_library(unicharset_training STATIC ${unicharset_training_src})
|
||||
if(SW_BUILD)
|
||||
target_link_libraries(unicharset_training
|
||||
PUBLIC common_training org.sw.demo.unicode.icu.i18n)
|
||||
@@ -361,7 +361,7 @@ if(ICU_FOUND)
|
||||
|
||||
file(GLOB pango_training_src pango/*)
|
||||
|
||||
- add_library(pango_training ${pango_training_src})
|
||||
+ add_library(pango_training STATIC ${pango_training_src})
|
||||
target_link_libraries(pango_training PUBLIC unicharset_training)
|
||||
if(SW_BUILD)
|
||||
target_link_libraries(pango_training
|
||||
|
||||
Loading…
Reference in New Issue
Block a user