-
Notifications
You must be signed in to change notification settings - Fork 2k
leptonica: add version 1.83.0 #14864
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
Conversation
I am not sure if it is correct but otherwise find_package(GIF) picks up system framework not the generate `giflib*` cmake files
This comment has been minimized.
This comment has been minimized.
Can't reproduce this issue with conan 1.55.0 |
Co-authored-by: SpaceIm <[email protected]>
This reverts commit ccab369.
Removed the local cache, |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
recipes/leptonica/all/conanfile.py
Outdated
# pkgconfig is prefered to CMake. Disable pkgconfig so only CMake is used | ||
replace_in_file(self, cmakelists, "pkg_check_modules(JP2K libopenjp2>=2.0 QUIET)", "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprising. This recipe has pkgconfig in build requirements when openjpeg option is enabled, and pkgconfig files are generated by PkgConfigDeps, so why would it fail without this patch? I can try to test but AFAIR it was working fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested and previous patch works like a charm, openjpeg is always found & injected in 1.82.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, my bad. Previously openjpeg was located using pkgconfig. So hardcoded openjpeg's version paths do not affect already found openjpeg.
Why I have moved to cmake-only openjpeg is to fix MSVC build (I don't have a clue why it is failed). 1.83.0 and pre-1.83.0 Leptonica have different resolution order for openjpeg: pkg-config then cmake vs cmake vs pkg-config. I think it is easier for us just to use CMake. How do you think?
By the way, "ERROR: Package 'zlib/1.2.13' not resolved: Unable to find 'zlib/1.2.13' in remotes" in a Conan v2 automatic comment seems strange. |
This comment has been minimized.
This comment has been minimized.
Conan v1 pipelineAll green in build 9 (
Conan v2 pipeline (informative, not required for merge)Failure in build 9 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
@@ -139,47 +133,69 @@ def _patch_sources(self): | |||
replace_in_file(self, cmakelists_src, "${GIF_LIBRARIES}", "GIF::GIF") | |||
if not self.options.with_gif: | |||
replace_in_file(self, cmakelists_src, "if (GIF_LIBRARIES)", "if(0)") | |||
replace_in_file(self, cmake_configure, "if (GIF_FOUND)", "if(0)") | |||
if Version(self.version) >= "1.83.0": | |||
replace_in_file(self, cmake_configure, "if(GIF_FOUND)", "if(0)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love to see patches for this project in the future 🙏
* Add leptonica 1.83.0 * Modernize with rm_safe * Add new options for libwebp and openjpeg from 1.83.0 * Fix whitespaces in inline patching for 1.83.0 * Consolidate handling webp, openjpeg options * Use find_package(GIFLIB) I am not sure if it is correct but otherwise find_package(GIF) picks up system framework not the generate `giflib*` cmake files * Add required fields to yaml * Update patch metadata Co-authored-by: SpaceIm <[email protected]> * Revert "Use find_package(GIFLIB)" This reverts commit ccab369. * Use openjpeg 2.4.0 for Leptonica older thatn 1.83.0 * Improve patching for 1.82.0 * Try to link to target openjp2 * Prefer CMake for openjpeg * Fix patching pkg_check_modules for older versions * Always depend on latest openjpeg * Bump libpng dependency Co-authored-by: SpaceIm <[email protected]>
This reverts commit 5ddac4f. This is being reverted because the options to turn off different graphic packages don't work (WEBP, etc.).
Revert "(conan-io#14864) leptonica: add version 1.83.0"
Specify library name and version: leptonica/1.83.0
There is one moment I don't fully understand. Upstream uses
find_package(GIF)
which seems to be totally fine.But Conan generators create a bunch of
giflib-*
files so the find_package doesn't find them but picks up a system include path/Library/Frameworks/UnixImageIO.framework/Headers
. Usingfind_package(GIFLIB)
fixes the problem.Recent giflib changes do not change a
cmake_file_name
property. If it is not changed, why doesn't it work?