Skip to content

Conversation

Snaipe
Copy link
Contributor

@Snaipe Snaipe commented Oct 20, 2017

The old behaviour was to set CMAKE_INSTALL_MANDIR to /usr/local/man
when MANPREFIX wasn't defined. This caused mismatching installation
paths when the installation prefix wasn't /usr/local.

This fix explicitely checks that the prefix is /usr/local to change
the value of CMAKE_INSTALL_MANDIR, and uses the default behaviour
otherwise, as /usr/local is the exception rather than the norm
(as per man hier(7)).


Tested prefixes are:

Prefix Absolute MANDIR
/usr /usr/share/man
/usr/local /usr/local/man
$HOME/.local $HOME/.local/share/man

These paths should be correct according to hier(7), and compatible with the XDG defaults.

This fixes #7239.

The old behaviour was to set CMAKE_INSTALL_MANDIR to /usr/local/man
when MANPREFIX wasn't defined. This caused mismatching installation
paths when the installation prefix wasn't /usr/local.

This fix explicitely checks that the prefix is /usr/local to change
the value of CMAKE_INSTALL_MANDIR, and uses the default behaviour
otherwise, as /usr/local is the exception rather than the norm
(as per man hier(7)).
@marvim marvim added the RFC label Oct 20, 2017
@justinmk justinmk merged commit 3ce9787 into neovim:master Oct 21, 2017
@justinmk justinmk removed the RFC label Oct 21, 2017
@justinmk
Copy link
Member

@Snaipe Thanks!

sameedali added a commit to sameedali/neovim that referenced this pull request Oct 24, 2017
* 'master' of https://github.com/neovim/neovim: (554 commits)
  test: tabstop=<big-number> neovim#2838
  plines_win_nofold(): Ignore virtcols after 32000th computation neovim#3527
  :cquit : take an error code argument neovim#7336
  vim-patch:8.0.0140 (neovim#7428)
  cmake,bsd: Fix mandir to saner defaults. (neovim#7417)
  help, man.vim: change "outline" map to gO (neovim#7405)
  build: set MIN_LOG_LEVEL correctly (neovim#7419)
  vim-patch:8.0.1019
  vim-patch:8.0.0962
  bufhl: support creating new groups
  lint
  refactor/single-include: undo.h
  refactor/single-include: undo_defs.h
  refactor/single-include: syntax_defs.h
  refactor/single-include: regexp_defs.h
  refactor/single-include: terminal.h
  vim-patch:8.0.0118
  :checkhealth : validate $VIM
  ex_checkhealth: call health#check() directly
  doc: E5009 "Invalid $VIMRUNTIME"
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake ignores install prefix for manpages
3 participants