$NetBSD$
*
* This patch makes sure the man pages are installed in PKGMANDIR
*
--- doc/CMakeLists.txt.orig	2014-11-18 13:07:36.000000000 +0000
+++ doc/CMakeLists.txt
@@ -81,7 +81,7 @@ if(BUILD_DOCUMENTATION)
         # is the manpage of the command line interface with a manpage number 3,
         # we need to exclude it when installing man3.
         install(DIRECTORY ${EC_MANPAGE3_DIR}
-            DESTINATION share/man
+            DESTINATION ${CMAKE_INSTALL_MANDIR}
             PATTERN editorconfig.3 EXCLUDE
             REGEX ._include_. EXCLUDE)
 
@@ -89,7 +89,7 @@ if(BUILD_DOCUMENTATION)
 
         install(FILES
             ${EC_MANPAGE1_DIR}/editorconfig.1
-            DESTINATION share/man/man1)
+            DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
 
         # "make clean" should also clean generated docs
         set_directory_properties(PROPERTIES
