From b539b297f0a10851e9315a7eb458d6983f5eb0a1 Mon Sep 17 00:00:00 2001 From: Russell Greene Date: Tue, 18 Oct 2022 11:28:00 -0500 Subject: [PATCH 1/4] [tesseract] link exe to libarchive to fix link error --- ports/tesseract/fix-depend-libarchive.patch | 13 +++++++++++++ ports/tesseract/vcpkg.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ports/tesseract/fix-depend-libarchive.patch b/ports/tesseract/fix-depend-libarchive.patch index 5d510e16ec5c8c..6250ff6e795ecd 100644 --- a/ports/tesseract/fix-depend-libarchive.patch +++ b/ports/tesseract/fix-depend-libarchive.patch @@ -1,3 +1,5 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bd2649d..f63030e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -792,7 +792,8 @@ if(OpenCL_FOUND) @@ -10,3 +12,14 @@ endif(LibArchive_FOUND) if(CURL_FOUND) if(NOT CURL_LIBRARIES) +@@ -858,6 +859,10 @@ target_link_libraries(tesseract libtesseract) + if(HAVE_TIFFIO_H AND WIN32) + target_link_libraries(tesseract ${TIFF_LIBRARIES}) + endif() ++if(LibArchive_FOUND) ++ find_package(LibArchive REQUIRED) ++ target_link_libraries(tesseract LibArchive::LibArchive) ++endif(LibArchive_FOUND) + + if(OPENMP_BUILD AND UNIX) + target_link_libraries(tesseract pthread) diff --git a/ports/tesseract/vcpkg.json b/ports/tesseract/vcpkg.json index ffc6df5ebb963d..460f9b77b8df41 100644 --- a/ports/tesseract/vcpkg.json +++ b/ports/tesseract/vcpkg.json @@ -1,7 +1,7 @@ { "name": "tesseract", "version": "5.2.0", - "port-version": 2, + "port-version": 3, "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", From 04f2838eead013564b815dbb93fe2df2dd7abc17 Mon Sep 17 00:00:00 2001 From: Russell Greene Date: Tue, 18 Oct 2022 11:28:49 -0500 Subject: [PATCH 2/4] ./vcpkg x-add-version --all --- versions/baseline.json | 2 +- versions/t-/tesseract.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 888ca87a0b218d..201b35eb91407c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7278,7 +7278,7 @@ }, "tesseract": { "baseline": "5.2.0", - "port-version": 2 + "port-version": 3 }, "tfhe": { "baseline": "1.0.1", diff --git a/versions/t-/tesseract.json b/versions/t-/tesseract.json index 713e368b7facdf..1cf36048341ec9 100644 --- a/versions/t-/tesseract.json +++ b/versions/t-/tesseract.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "6e70171a3b58d3d96add722d577b295eaf9b6aa7", + "version": "5.2.0", + "port-version": 3 + }, { "git-tree": "9d9b7d5ba2e222ee4fb62d4d5f03992e9232a97d", "version": "5.2.0", From 71f12d452fc5f4394854cfd15476c3962e4303e8 Mon Sep 17 00:00:00 2001 From: Russell Greene Date: Tue, 18 Oct 2022 12:52:44 -0500 Subject: [PATCH 3/4] address comments --- ports/tesseract/fix-depend-libarchive.patch | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/ports/tesseract/fix-depend-libarchive.patch b/ports/tesseract/fix-depend-libarchive.patch index 6250ff6e795ecd..dd72206fb2d369 100644 --- a/ports/tesseract/fix-depend-libarchive.patch +++ b/ports/tesseract/fix-depend-libarchive.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index bd2649d..f63030e 100644 +index bd2649d..c1801a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -792,7 +792,8 @@ if(OpenCL_FOUND) @@ -12,14 +12,12 @@ index bd2649d..f63030e 100644 endif(LibArchive_FOUND) if(CURL_FOUND) if(NOT CURL_LIBRARIES) -@@ -858,6 +859,10 @@ target_link_libraries(tesseract libtesseract) +@@ -854,7 +855,7 @@ endif() + # ############################################################################## + + add_executable(tesseract src/tesseract.cpp) +-target_link_libraries(tesseract libtesseract) ++target_link_libraries(tesseract libtesseract LibArchive::LibArchive) if(HAVE_TIFFIO_H AND WIN32) target_link_libraries(tesseract ${TIFF_LIBRARIES}) endif() -+if(LibArchive_FOUND) -+ find_package(LibArchive REQUIRED) -+ target_link_libraries(tesseract LibArchive::LibArchive) -+endif(LibArchive_FOUND) - - if(OPENMP_BUILD AND UNIX) - target_link_libraries(tesseract pthread) From a1b4c67bf23810d5e78cd4f4119b718161f5da37 Mon Sep 17 00:00:00 2001 From: Russell Greene Date: Tue, 18 Oct 2022 12:53:02 -0500 Subject: [PATCH 4/4] ./vcpkg x-add-version --all --overwrite-version --- versions/t-/tesseract.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/t-/tesseract.json b/versions/t-/tesseract.json index 1cf36048341ec9..f3d85dfcf17361 100644 --- a/versions/t-/tesseract.json +++ b/versions/t-/tesseract.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "6e70171a3b58d3d96add722d577b295eaf9b6aa7", + "git-tree": "106efd2adc79ebdcf63488c2cc930b035f01535d", "version": "5.2.0", "port-version": 3 },