-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[podofo] Change to github and update version to 0.10.0 #31584
Conversation
@playgithub Has been passed the CI checking, could you please test the latest version api ? |
I'm just going to use podofo, not any experience now. |
No. There is not a single port using it. |
It has been verified that the change of the |
The usage(Including
Waiting for feature |
Private is public, really? |
No, it's official. I just changed the location of the export. |
The feature
|
No, it is not official. The patch adds the export and the installation of the exported config. The keyword |
No, upstream used the keyword |
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.
Oh, confusion, also on my side. But I thinked it was worth looking closer:
-
Upstream
CMakeLists
doesexport(TARGETS ... FILE "${PROJECT_BINARY_DIR}/podofoConfig.cmake")
This is specific to the build tree and not useful for vcpkg.
But it does qualify as setting the standard for the official config name and namespace.
(NB:podofoConfig.cmake
is for case-sensitive package name matching onfind_package(podofo)
.) -
The patch adds to
src/CMakeLists.txt
:install(TARGETS podofo_static podofo_private EXPORT PoDoFoConfig ...) install(EXPORT PoDoFoConfig DESTINATION share/podofo)
These commands are for installed trees, i.e. needed for vcpkg.
But it uses a different case-sensitive package name, matchingfind_package(PoDoFo)
. This is unofficial.
Now I see the following tasks:
- Rectify the config file name: the official package name is spelled
podofo
. Options:- Use
podofo-config.cmake
. This file name is for case-insensitive package name matching. - Use upstream's
podofoConfig.cmake
. However, to not break existing vcpkg users, you will need to provide a forwarding config under the old package name spelling.
- Use
- Add a usage file to get rid of vcpkg tools's limited heuristics.
podofo provides CMake targets:
find_package(podofo CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:podofo_shared>,podofo_shared,podofo_static>)
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.
My major concerns are resolved. Thank you for the improvements.
Upstream doesn't depend on |
PoDoFo maintainer here: no, libxml2 is now a requirement. Also OpenSSL is added as a strict requirement. The bar has been raised on this principle: anything needed to access the structure/metadata of the document is now a requirement. Anything else needed to decode content can be optional. Based on this principle:
Instead libpng, libjpeg, libtiff are needed just to decode content, so they are left as optional. PoDoFo wants to be as much package manager friendly as possible, so feel free to suggest (non invasive) changes in the build system. I appear to have inspected already the usage of PoDoFo in vcpkg and Conan, and I added few more CMake switches and clarified handling of static vs shared library compilation. |
@ceztko Thanks for having an eye on this port.
Don't worry. The comment needs context to not be misunderstood. |
Thank you for the clarification. |
@FrankXie05 This was present in PoDoFo 0.9.x as well, and I admit to have no idea what it does. Please advice if this can be migrated to more modern CMake usage. |
Cf. the first part of #31584 (review). Now that podofo no longer builds static and shared at the same time, you wouldn't need BTW this port update triggered vcpkg baseline regressions because the presence of other packages causes non-obvious behavioural changes - for the x64-windows triplet (the only one with dynamic linkage in vcpkg CI), the port unexpectedly installed pkg-config files... Follow-up: #31658 |
Ok, I think I understood the matter and I am now considering merging your patch as is. I don't see much use of saving the config files in the binary dir, and PoDoFo CMakeLists.txt is well optimized to be included in other CMake projects.
I'm not sure what you mean here but if I merge the patch above I think you are fine with that.
Previously I studied the matter and noticed that this was not working 100% as one would expect, so I consider this feature only "accidentally working". Now having both targets enabled would even more difficult because of private static targets so I just disabled it for the time being, or until a correct and maintainable solution to have both enabled is found.
I thought about it, and I actually tried it and committed it during development. I ended not liking it, and semantically I just prefer
Please elaborate more what you need with this. |
For the general case, it may take a little bit more effort than just the patch: the portfile injects
They should always be installed. External usage is independent of pkg-config availability at build time.
vcpkg doesn't need/want both simultaneously.
Well, it would be one variable less invented differently in each project, for a single problem. option(BUILD_SHARED_LIBS "Build a shared podofo library" ON) (Alternatively, it would be possible to just derive the default of
I would prefer if I could uniformly use: find_package(podofo REQUIRED)
target_link_libraries(main PRIVATE podofo::podofo) This doesn't require to rename the targets - it can be implemented in the config using an interface target. |
The problem here is I have no experience with usage of config files, I either include subprojects or find dependencies with
You make it easy, but deriving
Recently we added support to refer to (most) dependencies with that target notation. Please show me a simple project that export targets this way from within the build project (not a |
I'm not sure the aim became clear. My requests is that the user doesn't need to know if the podofo lib was build with static or shared linkage. |
That's more clear. I think that's a reasonable request now that static/shared can't be build together (but consider there's a |
* [podofo] Change to github and update version to 0.10.0 * update version * fix static export * v db * fix export name and add usage * v db * disable build libxml2 features * format * v db Co-authored-by: Frank <[email protected]>
Hello, I merged your patch about installing config files during install in podofo/podofo@9a07376 . I'm not exporting them in the binary folder anymore, we'll see if someone complains about it (I personally don't use them), but the recommended approach is to just include the project file anyway for CMake users, and installing for everyone else. I also added the |
Fix #31578
Note: Changed to
GitHub
because upstream indicates that it has been transferred togithub
for development.https://sourceforge.net/projects/podofo/
However, the
api
has undergone major changes in version0.10.0
.We need to perform compatibility tests for downstream.
https://github.com/podofo/podofo/wiki/PoDoFo-API-migration-guide/#098---0100
https://github.com/podofo/podofo#api-migration
The "supports" clause reflects platforms that may be fixed by this new versionAny fixed CI baseline entries are removed from that file../vcpkg x-add-version --all
and committing the result.