include $(TOPDIR)/rules.mk
PKG_NAME:=tesseract
-PKG_VERSION:=4.1.1
-PKG_RELEASE:=3
+PKG_VERSION:=5.3.3
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/tesseract-ocr/tesseract/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=2a66ff0d8595bff8f04032165e6c936389b1e5727c3ce5a27b3e059d218db1cb
+PKG_HASH:=dc4329f85f41191b2d813b71b528ba6047745813474e583ccce8795ff2ff5681
PKG_MAINTAINER:=Valentin Kivachuk <vk18496@gmail.com>
PKG_LICENSE:=Apache-2.0
CMAKE_OPTIONS += \
-DAUTO_OPTIMIZE=OFF \
- -DBUILD_TRAINING_TOOLS=OFF
+ -DBUILD_SHARED_LIBS=ON \
+ -DBUILD_TRAINING_TOOLS=OFF \
+ -DDISABLE_CURL=ON
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/tesseract $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtesseract.so* $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/usr/lib/cmake
- $(CP) $(PKG_INSTALL_DIR)/usr/cmake/*.cmake $(1)/usr/lib/cmake/
+ $(INSTALL_DIR) $(1)/usr/lib/cmake/tesseract
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/tesseract/*.cmake $(1)/usr/lib/cmake/tesseract
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/tesseract.pc $(1)/usr/lib/pkgconfig/
endef
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -252,15 +252,6 @@ set(AVX2_OPT OFF)
- set(FMA_OPT OFF)
- set(SSE41_OPT OFF)
- set(MARCH_NATIVE_OPT OFF)
--foreach(flag ${_enable_vector_unit_list}) # from OptimizeForArchitecture()
-- string(TOUPPER "${flag}" flag)
-- string(REPLACE "\." "_" flag "${flag}")
-- set(simd_flags "${simd_flags} -D${flag}")
-- string(REPLACE "_" "" flag "${flag}")
-- if("${flag}" MATCHES "AVX|AVX2|FMA|SSE41")
-- set("${flag}_OPT" ON)
+--- a/cmake/CheckFunctions.cmake
++++ b/cmake/CheckFunctions.cmake
+@@ -29,24 +29,6 @@ function(check_leptonica_tiff_support)
+ " return ret_val;}\n")
+ if(${CMAKE_VERSION} VERSION_LESS "3.25")
+ message(STATUS "Testing TIFF support in Leptonica is available with CMake >= 3.25 (you have ${CMAKE_VERSION}))")
+- else()
+- set(CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})
+- try_run(
+- LEPT_TIFF_RESULT
+- LEPT_TIFF_COMPILE_SUCCESS
+- SOURCE_FROM_CONTENT tiff_test.cpp "${TIFF_TEST}"
+- CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${Leptonica_INCLUDE_DIRS}"
+- LINK_LIBRARIES ${Leptonica_LIBRARIES}
+- COMPILE_OUTPUT_VARIABLE
+- COMPILE_OUTPUT)
+- if(NOT LEPT_TIFF_COMPILE_SUCCESS)
+- message(STATUS "COMPILE_OUTPUT: ${COMPILE_OUTPUT}")
+- message(STATUS "Leptonica_INCLUDE_DIRS: ${Leptonica_INCLUDE_DIRS}")
+- message(STATUS "Leptonica_LIBRARIES: ${Leptonica_LIBRARIES}")
+- message(STATUS "LEPT_TIFF_RESULT: ${LEPT_TIFF_RESULT}")
+- message(STATUS "LEPT_TIFF_COMPILE: ${LEPT_TIFF_COMPILE}")
+- message(WARNING "Failed to compile test")
- endif()
--endforeach(flag)
- if (NOT MSVC)
- set(MARCH_NATIVE_FLAGS "${MARCH_NATIVE_FLAGS} -O3 -ffast-math")
- endif()
+ endif()
+ endfunction(check_leptonica_tiff_support)
+