[libxchange] initial port#51346
Conversation
e143a94 to
18e2a0f
Compare
|
From the
|
|
For the arm64-linux cross build, libm is not in the standard paths searched by CMake's Basically it is a bad idea to search for the path of libm because you are supposed to use Related: #50514 |
|
Thanks @dg0yt, I've changed how the need for linking against the math library is determined. It's a bit strange that CMake does not have a more automatic portable way to link against the math library when needed for a given platform, given that it's likely to a very common use case and equally common source of mistakes that limit portability... |
| vcpkg_cmake_configure( | ||
| SOURCE_PATH "${SOURCE_PATH}" | ||
| OPTIONS | ||
| -DBUILD_TESTING=OFF |
There was a problem hiding this comment.
| -DBUILD_TESTING=OFF | |
| -DBUILD_TESTING=OFF | |
| -DBUILD_DOC=OFF | |
| -DBUILD_EXAMPLES=OFF |
The port is installing documentation and examples by default
xchange:<triplet>:/share/doc/xchange/CHANGELOG.md
xchange:<triplet>:/share/doc/xchange/CONTRIBUTING.md
xchange:<triplet>:/share/doc/xchange/examples/CMakeLists.txt
xchange:<triplet>:/share/doc/xchange/examples/example-escape.c
xchange:<triplet>:/share/doc/xchange/examples/Makefile
xchange:<triplet>:/share/doc/xchange/examples/example-json.c
xchange:<triplet>:/share/doc/xchange/examples/.gitignore
There was a problem hiding this comment.
Hi @vicroms,
Thanks for the feedback. I'll remove the doc and examples from the install. I'm also happy to call it libxchange (I was debating it in the first place). The original name is xchange (as in the Github repo, and the CMake package export), but that name was already taken by a once-upon-a-time Fedora package, hence it became libxchange for Linux.
There was a problem hiding this comment.
BUILD_DOC and BUILD_EXAMPLES are both OFF by default, so there is no need to set these explicitly. The examples (source code) and some bare basic documentation (e.g. CHANGELOG.md) are always installed in the docdir by upstream. Which means that the vcpkg port will have to explicitly remove these if they are unwanted. I've updated to portfile to remove the docdir contents installed by upstream. Hopefully that is sufficient.
There was a problem hiding this comment.
Nevertheless, the CMake package export from upstream is xchange, not libxchange. If that is confusing, then I think naming the vcpkg port as xchange (the same as the CMake package) might still be preferrable.
There was a problem hiding this comment.
Nevertheless, the CMake package export from upstream is
xchange, notlibxchange. If that is confusing, then I think naming the vcpkg port asxchange(the same as the CMake package) might still be preferrable.
We cite repology because we believe being consistent with other package managers is more important than being consistent with other identifiers.
Co-authored-by: Kai Pastor <dg0yt@darc.de>
BillyONeal
left a comment
There was a problem hiding this comment.
Please merge these nitpick fixes. attipaci#3
|
I don't think Victor (@vicroms ) comment is fixed yet. If upstream exposes an option to disable building examples we should use it. |
|
Hi @BillyONeal, I think I tried to answer @vicroms comments -- I clearly did not do a good job, so I'll ty again... ;-) Upstream always installs the example source code ( The The only way to ensure that vcpkg does not have stuff installed in the docdir is to remove these after the upstream install. Which is the change I did implement. I hope this clarifies it better. -- A. |
Remove extra newline, ensure line endings are LF, remove trailing whitespace.
|
Ah, I see the confusion now. I think what happened is that @vicroms saw "examples" in the file list, saw that upstream has a BUILD_EXAMPLES, and that that was not turned off when we invoke it, then wrote the comment. The unconditional write is here: |
They explained that that does not apply
This is a draft PR with the upstream release candidate. Please comment on issues so they may be fixed upstream if need be. This PR will be updated to the final upstream v1.1.2 release in a couple of weeks, after which it may be merged as appropriate.
Owner-Projectform.vcpkg.json, or explicitly disabled through patches or build system arguments such as CMAKE_DISABLE_FIND_PACKAGE_Xxx or VCPKG_LOCK_FIND_PACKAGEvcpkg.jsonmatches what upstream says.vcpkg.jsonmatches what upstream says../vcpkg x-add-version --alland committing the result.