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

manpage directory is hard coded. doesn't respect -DCMAKE_INSTALL_MANDIR #3080

Closed
ArTourter opened this issue Mar 2, 2022 · 1 comment · Fixed by #3081
Closed

manpage directory is hard coded. doesn't respect -DCMAKE_INSTALL_MANDIR #3080

ArTourter opened this issue Mar 2, 2022 · 1 comment · Fixed by #3081
Assignees
Labels

Comments

@ArTourter
Copy link

Example of problem

configuring compilation using

mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_MANDIR=/usr/man ..
make
make install

this installs the man pages in /usr/share/man/... and not in /usr/man/...

The path in indeed harcoded in man/CMakeLists.txt

Problem description

I am the maintainer for the slackbuilds.org repository for proj and the manpages in slackware are located in /usr/man not /usr/share/man.
Until now the autotools version supported setting the manpages paths with the --mandir= flag but with autotoold phased out in v9.0.0, I have to use cmake.

The following patch should allow the use of the -DCMAKE_INSTALL_MANDIR flag while still keeping the default path as /share/man as specified by the GNUInstallDirs default:

diff -Naur proj-9.0.0/man/CMakeLists.txt proj-9.0.0-new/man/CMakeLists.txt
--- proj-9.0.0/man/CMakeLists.txt       2022-02-23 18:51:04.000000000 +0000
+++ proj-9.0.0-new/man/CMakeLists.txt   2022-03-02 16:22:14.979350892 +0000
@@ -6,4 +6,4 @@
   man1/gie.1
   man1/projinfo.1
   man1/projsync.1
-  DESTINATION share/man/man1)
+  DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)

I can submit a PR if you are ok with it.

Environment Information

  • PROJ version (proj-9.0.0)
  • Slackware Linux 15.0

Installation method

  • from source
@mwtoews
Copy link
Member

mwtoews commented Mar 2, 2022

Thanks for the detailed report and patch. It should appear for PROJ 9.0.1 currently planned for June 2022.

ArTourter added a commit to ArTourter/slackbuilds that referenced this issue Mar 3, 2022
- autotools phased out so using cmake instead
- patch to fix hardcoded mandir path and allow -DCMAKE_INSTALL_MANDIR
flag. Patch submitted upstream will be merged in the next version:
OSGeo/PROJ#3080

Signed-off-by: ArTourter <artourter@gmail.com>
willysr pushed a commit to SlackBuildsOrg/slackbuilds that referenced this issue Mar 3, 2022
- autotools phased out so using cmake instead
- patch to fix hardcoded mandir path and allow -DCMAKE_INSTALL_MANDIR
flag. Patch submitted upstream will be merged in the next version:
OSGeo/PROJ#3080

Signed-off-by: ArTourter <artourter@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
@mwtoews mwtoews modified the milestone: 9.0.1 Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants