- Remove separate handling of /bin and /usr/bin in manpath. They are no

longer a special case.
- Prefer PREFIX/share/man over PREFIX/man.
- Add /usr/local/share/man to man_default_path.
- Update manpath man page.

Reviewed by:	bapt
This commit is contained in:
Tijl Coosemans 2017-03-12 10:56:19 +00:00
parent 2a92bd2d38
commit 971c1c4219
2 changed files with 17 additions and 29 deletions

View File

@ -778,26 +778,19 @@ search_path() {
IFS=:
for path in $PATH; do
# Do a little special casing since the base manpages
# are in /usr/share/man instead of /usr/man or /man.
case "$path" in
/bin|/usr/bin) add_to_manpath "/usr/share/man" ;;
*) if add_to_manpath "$path/man"; then
:
elif add_to_manpath "$path/MAN"; then
:
else
case "$path" in
*/bin) p="${path%/bin}/man"
add_to_manpath "$p"
p="${path%/bin}/share/man"
add_to_manpath "$p"
;;
*) ;;
esac
fi
;;
esac
if add_to_manpath "$path/man"; then
:
elif add_to_manpath "$path/MAN"; then
:
else
case "$path" in
*/bin) p="${path%/bin}/share/man"
add_to_manpath "$p"
p="${path%/bin}/man"
add_to_manpath "$p"
;;
esac
fi
done
unset IFS
@ -1007,7 +1000,7 @@ SYSCTL=/sbin/sysctl
debug=0
man_default_sections='1:8:2:3:n:4:5:6:7:9:l'
man_default_path='/usr/share/man:/usr/share/openssl/man:/usr/local/man'
man_default_path='/usr/share/man:/usr/share/openssl/man:/usr/local/share/man:/usr/local/man'
cattool='/usr/bin/zcat -f'
config_global='/etc/man.conf'

View File

@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd September 1, 2010
.Dd March 11, 2017
.Dt MANPATH 1
.Os
.Sh NAME
@ -66,15 +66,10 @@ for the first of:
.Pa pathname/MAN
.It
If pathname ends with /bin:
.Pa pathname/../share/man
and
.Pa pathname/../man
.El
Note: Special logic exists to make
.Pa /bin
and
.Pa /usr/bin
look in
.Pa /usr/share/man
for manual files.
.It
The configuration files listed in the
.Sx FILES