Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tesseract] fix downstream usage #26378

Merged
merged 2 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ports/opencv3/0018-fix-depend-tesseract.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/modules/text/cmake/init.cmake
+++ b/modules/text/cmake/init.cmake
@@ -4,6 +4,8 @@ OCV_OPTION(WITH_TESSERACT "Include Tesseract OCR library support" (NOT CMAKE_CRO
if(NOT HAVE_TESSERACT
AND (WITH_TESSERACT OR OPENCV_FIND_TESSERACT)
)
+ find_package(Tesseract CONFIG REQUIRED)
+ set(Tesseract_LIBRARIES Tesseract::libtesseract)
if(NOT Tesseract_FOUND)
find_package(Tesseract QUIET) # Prefer CMake's standard locations (including Tesseract_DIR)
endif()
1 change: 1 addition & 0 deletions ports/opencv3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ if("contrib" IN_LIST FEATURES)
0007-fix-hdf5.patch
0013-fix-ceres.patch
0016-fix-freetype-contrib.patch
0018-fix-depend-tesseract.patch
)
set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules")

Expand Down
1 change: 1 addition & 0 deletions ports/opencv3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "opencv3",
"version": "3.4.18",
"port-version": 1,
"description": "Open Source Computer Vision Library",
"homepage": "https://github.com/opencv/opencv",
"license": "BSD-3-Clause",
Expand Down
2 changes: 0 additions & 2 deletions ports/opencv4/0018-fix-depend-tesseract.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
diff --git a/modules/text/cmake/init.cmake b/modules/text/cmake/init.cmake
index 254757e..73194ec 100644
--- a/modules/text/cmake/init.cmake
+++ b/modules/text/cmake/init.cmake
@@ -4,6 +4,8 @@ OCV_OPTION(WITH_TESSERACT "Include Tesseract OCR library support" (NOT CMAKE_CRO
Expand Down
2 changes: 1 addition & 1 deletion ports/opencv4/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opencv4",
"version": "4.6.0",
"port-version": 1,
"port-version": 2,
"description": "computer vision library",
"homepage": "https://github.com/opencv/opencv",
"license": "Apache-2.0",
Expand Down
2 changes: 0 additions & 2 deletions ports/tesseract/fix-depend-libarchive.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bd2649d..f932913 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -792,7 +792,8 @@ if(OpenCL_FOUND)
Expand Down
1 change: 1 addition & 0 deletions ports/tesseract/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/tesseract)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/tesseract/TesseractConfig.cmake"
"find_dependency(Leptonica)"
[[
find_dependency(CURL)
find_dependency(Leptonica)
find_dependency(LibArchive)
]]
Expand Down
2 changes: 2 additions & 0 deletions ports/tesseract/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "tesseract",
"version": "5.2.0",
"port-version": 1,
"description": "An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google.",
"homepage": "https://github.com/tesseract-ocr/tesseract",
"license": "Apache-2.0",
"supports": "!(arm & (osx | linux))",
"dependencies": [
"curl",
"leptonica",
"libarchive",
{
Expand Down
6 changes: 3 additions & 3 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5202,11 +5202,11 @@
},
"opencv3": {
"baseline": "3.4.18",
"port-version": 0
"port-version": 1
},
"opencv4": {
"baseline": "4.6.0",
"port-version": 1
"port-version": 2
},
"opendnp3": {
"baseline": "3.1.1",
Expand Down Expand Up @@ -7046,7 +7046,7 @@
},
"tesseract": {
"baseline": "5.2.0",
"port-version": 0
"port-version": 1
},
"tfhe": {
"baseline": "1.0.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/opencv3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6f45f46b8a492b795cce92786a3d2048ef24ef38",
"version": "3.4.18",
"port-version": 1
},
{
"git-tree": "15c9083efa4c00674bef4fbca443a662fe6dd5cd",
"version": "3.4.18",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/opencv4.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "57554ec83d4e4667344f005a1f61be8164cbf58a",
"version": "4.6.0",
"port-version": 2
},
{
"git-tree": "a6c9bded8fc4ad22bea6869caecf2881c8da2d41",
"version": "4.6.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/t-/tesseract.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ea93f36603ca265da43ef28d6583871ef3d97b43",
"version": "5.2.0",
"port-version": 1
},
{
"git-tree": "5ea8fcd243e8aa38e1a83eaa1c745fc53a3464cc",
"version": "5.2.0",
Expand Down