Skip to content

CMake installation issues with vim and gedit syntax files - incorrect paths and missing files #2195

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

Open
brndnmtthws opened this issue May 5, 2025 · 3 comments
Labels
bug related to incorrect existing implementation of some functionality build system related to build system (CMake) and/or building process/assumptions packaging related to conky packaging, package distribution or installation

Comments

@brndnmtthws
Copy link
Owner

I just noticed this commit and would like to comment on this:

  • First of all for some reason here ${CMAKE_INSTALL_DATAROOTDIR} does not evaluate to "share" here so the files end up in "/" (CMAKE_INSTALL_PREFIX does not seem to be considered as well in this case) instead of (/usr/)share which is probably not desired.

  • Apparently there is no default installation location for the vimfiles (Gentoo Linux puts them in /usr/share/vim/vimfiles and not /usr/share/vim), so if this is not configurable the will end up in the wrong directories even if ${CMAKE_INSTALL_DATAROOTDIR} evaluates to /usr/share

  • Additionally there is extras/vim/ftdetect/conkyrc.vim which probably should also be installed.

  • And there is extras/gedit/conky.lang) (gedit syntax highlighting) . For some reason its readme was moved to web/documents/syntax-highlighting.mdx about two years ago. It seems outdated anyway as with recent versions of gtksourceview these files should be placed in /usr/share/gtksourceview-4/language-specs/.

Originally posted by @billie80 in c67d8c2

@brndnmtthws brndnmtthws added the bug related to incorrect existing implementation of some functionality label May 5, 2025
@Caellian Caellian added build system related to build system (CMake) and/or building process/assumptions packaging related to conky packaging, package distribution or installation labels May 6, 2025
@Caellian
Copy link
Collaborator

Caellian commented May 6, 2025

The file is missing include(GNUInstallDirs) at the top (example from EagleLib). This should set CMAKE_INSTALL_DATAROOTDIR to correct default per-distro if it's not manually specified.

Autotools defaults to /usr/local/share instead of /usr/share because hand-compiled software shouldn't overwrite system files (installed by package managers). So we'll likely end up with /usr/local/share prefixed paths once GNUInstallDirs is included - that's expected; apps should handle both.

@billie80
Copy link
Contributor

billie80 commented May 6, 2025

The file is missing include(GNUInstallDirs) at the top (example from EagleLib). This should set CMAKE_INSTALL_DATAROOTDIR to correct default per-distro if it's not manually specified.

Thanks this fixes the install directory.

For vim there is still the question of /usr/share/vim/vimfiles or /usr/share/vim

Autotools defaults to /usr/local/share instead of /usr/share because hand-compiled software shouldn't overwrite system files (installed by package managers). So we'll likely end up with /usr/local/share prefixed paths once GNUInstallDirs is included - that's expected; apps should handle both.

The default of CMAKE_INSTALL_PREFIX is /usr/local and this is perfectly fine. Distro packagers just need to set it /usr or whatever is the desired path.

@Caellian
Copy link
Collaborator

Caellian commented May 7, 2025

Looking at Arch package for ansible, /usr/share/vim/vimfiles is also used there. A lot of other sources reference that folder as well for system-wide syntax installs.

We could make it a build option that defaults to ${CMAKE_CURRENT_BINARY_DIR}/vim/vimfiles/syntax/conkyrc.vim and allow overriding. If someone makes it explicitly empty - skip installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug related to incorrect existing implementation of some functionality build system related to build system (CMake) and/or building process/assumptions packaging related to conky packaging, package distribution or installation
Projects
None yet
Development

No branches or pull requests

3 participants