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

CMake doesn't install bash completion scripts on Linux #2396

Closed
akien-mga opened this issue Oct 12, 2020 · 4 comments
Closed

CMake doesn't install bash completion scripts on Linux #2396

akien-mga opened this issue Oct 12, 2020 · 4 comments

Comments

@akien-mga
Copy link

Name of the game:

n/a

Player platform:

Linux, packaging EasyRPG Player for Mageia

Attach files (as a .zip archive or link them)

n/a

Describe the issue in detail and how to reproduce it:

I'm packaging EasyRPG Player for the Mageia Linux distribution.

Since upgrading to 0.6.x and switching the buildsystem from autotools to CMake, the bash-completion script in resources/unix/bash-completion/easyrpg-player is no longer installed by make install.

I'd suggest making CMake install it on Linux as autotools used to.

@Ghabry
Copy link
Member

Ghabry commented Oct 12, 2020

Yeah that's an oversight. Thanks for the report :)

@Ghabry
Copy link
Member

Ghabry commented Oct 12, 2020

@akien-mga
Do you know if there is any accepted standard convention in CMake to install the manpage?

Can already see the can of worms opening here because the manpage folder depends on the operating system/distribution...

@akien-mga
Copy link
Author

Well this is about the bash completion file, which are typically installed in /usr/share/bash-completion/completions/. I don't know if that can depend on the distro, but bash-completion has a FAQ entry on this: https://github.com/scop/bash-completion/blob/master/README.md#faq

pkg-config --variable=completionsdir bash-completion can be used to query the system's bash-completion folder. Maybe there's a CMake way to query that easily. Otherwise I'd say hardcoding CMAKE_INSTALL_PREFIX/share/bash-completion/completions/ and waiting to see if anyone complains is a good way to do it too :)

As for multiple operating systems, I guess it's uncommon to have bash on Windows, and macOS defaults to zsh IIRC. Might be good to look into whether Windows and macOS can consume bash-completion scripts when configured to use this shell, but otherwise making the installation of the script Linux-specific should also be OK IMO.

@Ghabry
Copy link
Member

Ghabry commented Oct 12, 2020

oh right bash completion. No idea why I researched manpages.

The FAQ also mentions a bundled CMake script file. Will see if I can get something working.

Yeah I will limit it to UNIX and make some testing on Apple. Makes no sense for Windows.

Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Oct 12, 2020
Unconditionally on Unix as bash is usually available there. On other platforms depend on bash-completion package as a hint.

Fix EasyRPG#2396
@fdelapena fdelapena added this to the 0.6.3 milestone Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants