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

Add option to specify external directories for Tesseract #12

Merged
merged 5 commits into from
Feb 4, 2024

Conversation

umireon
Copy link
Member

@umireon umireon commented Feb 4, 2024

The FlatHub maintainer required us to obtain dependencies from their upstream. I have made changes to use the external tarball that is downloaded from the upstream. I use the build scripts on https://github.com/occ-ai/obs-ocr-deps and the script is not copied into this repository. The pre-downloaded tarballs can be used with CMake command as the following:

cmake . -B build_x86_64 -G Ninja -DQT_VERSION=6 \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -DENABLE_FRONTEND_API=ON \
  -DENABLE_QT=ON \
  -DBUILD_TESSERACT_FROM_SOURCE=ON \
  -DTESSERACT_SOURCE_URL="/path/to/tesseract-5.3.3.tar.gz" \
  -DTESSERACT_SOURCE_HASH=SHA256=dc4329f85f41191b2d813b71b528ba6047745813474e583ccce8795ff2ff5681 \
  -DLEPTONICA_SOURCE_URL="/path/to/leptonica-1.84.1.tar.gz" \
  -DLEPTONICA_SOURCE_HASH=SHA256=ecd7a868403b3963c4e33623595d77f2c87667e2cfdd9b370f87729192061bef

Refer to flathub/flathub#4907 (comment)

The changes in occ-ai/obs-ocr-deps#1 should be merged before this PR is merged.

@umireon
Copy link
Member Author

umireon commented Feb 4, 2024

@royshil

Copy link
Contributor

@royshil royshil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok this checks out. lets make sure its only acativated on linux

cmake/BuildTesseract.cmake Show resolved Hide resolved
@umireon
Copy link
Member Author

umireon commented Feb 4, 2024

@royshil Please approve occ-ai/obs-ocr-deps#1 first.

@umireon
Copy link
Member Author

umireon commented Feb 4, 2024

I will need to change the ref to occ-ai/obs-ocr-deps on main.

@umireon umireon merged commit fd8dc8d into occ-ai:main Feb 4, 2024
6 checks passed
Copy link
Contributor

@royshil royshil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go

@umireon umireon deleted the umireon/build-with-upstream-tar branch February 4, 2024 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants