Skip to content

autotools: install shell completion files on cross build #17159

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

samueloph
Copy link
Contributor

Before 8.13.0, it was not possible to generate them as it required
calling the compiled binary, but this has been fixed.

Forwarding the patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103938, although the bug mistakenly said this was intentionally done by upstream, Helmut probably missed the fact that 8.13.0 actually solved the root issue, we just need to update the makefiles.

I could not reopen #17148, so had to create a new PR.

I've confirmed this solves the issue for autotools build.

 Before 8.13.0, it was not possible to generate them as it required
 calling the compiled binary, but this has been fixed.

Co-authored-by: Samuel Henrique <samueloph@debian.org>
@bagder bagder closed this in 51170b5 Apr 23, 2025
@bagder
Copy link
Member

bagder commented Apr 23, 2025

Thanks!

@samueloph samueloph deleted the samueloph/cross_compile_shell_completions branch April 23, 2025 22:45
vszakats added a commit that referenced this pull request Apr 24, 2025
Also:
- omit auto-detecting `CURL_COMPLETION_FISH_DIR` via `pkg-config`
  for cross-builds and when `CMAKE_INSTALL_PREFIX` is set.
- flatten nested `if`s.

Note:
On macOS with Homebrew, `pkg-config --variable completionsdir fish`
returns the version-specific Cellar path instead of the permanent path
`/opt/homebrew/share/fish/vendor_completions.d/`. This mimics what
autotools does, but may need further fixing, possibly upstream.
https://github.com/Homebrew/homebrew-core/blob/9c13e62b009b8e814fda180e0fcc5096318daf31/Formula/f/fish.rb
https://github.com/fish-shell/fish-shell/blob/ce631fd2fb1f5b63f5f0f1b4041a30dfad823d22/cmake/Install.cmake#L15-L21

Ref: #17147
Ref: 51170b5 #17159
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103938

Closes #17145
nbaws pushed a commit to nbaws/curl that referenced this pull request Apr 26, 2025
 Before 8.13.0, it was not possible to generate them as it required
 calling the compiled binary, but this has been fixed.

Co-authored-by: Samuel Henrique <samueloph@debian.org>

Closes curl#17159
nbaws pushed a commit to nbaws/curl that referenced this pull request Apr 26, 2025
Also:
- omit auto-detecting `CURL_COMPLETION_FISH_DIR` via `pkg-config`
  for cross-builds and when `CMAKE_INSTALL_PREFIX` is set.
- flatten nested `if`s.

Note:
On macOS with Homebrew, `pkg-config --variable completionsdir fish`
returns the version-specific Cellar path instead of the permanent path
`/opt/homebrew/share/fish/vendor_completions.d/`. This mimics what
autotools does, but may need further fixing, possibly upstream.
https://github.com/Homebrew/homebrew-core/blob/9c13e62b009b8e814fda180e0fcc5096318daf31/Formula/f/fish.rb
https://github.com/fish-shell/fish-shell/blob/ce631fd2fb1f5b63f5f0f1b4041a30dfad823d22/cmake/Install.cmake#L15-L21

Ref: curl#17147
Ref: 51170b5 curl#17159
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103938

Closes curl#17145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants