components/libpcap/patches/fix-man-page.patch
author John Beck <John.Beck@Oracle.COM>
Tue, 04 Apr 2017 16:12:22 -0700
changeset 7829 2de4f4ace09c
parent 6942 d4c5b8626f38
permissions -rw-r--r--
25766761 prepare Userland for 11.4

commit ab02a7a9053242efa81dfb3bda35117fe951b417
Author: Vladimir Marek <[email protected]>
Date:   Mon Sep 19 12:42:11 2016 +0200

    Fix man page locations on Solaris
    
    There are two problems:
    a) usermod and ethers man pages lie in nonstandard path
    b) Newer Solaris versions have the man pages sections reordered completely

--- a/configure.in	2015-04-22 13:19:15.000000000 +0000
+++ b/configure.in	2017-03-22 10:07:21.877704267 +0000
@@ -1077,6 +1077,8 @@
 DYEXT="none"
 MAN_FILE_FORMATS=5
 MAN_MISC_INFO=7
+MAN_USERMOD_SECTION=1M
+MAN_ETHERS_SECTION=3N
 case "$host_os" in
 
 aix*)
@@ -1309,12 +1311,23 @@
 solaris*)
 	AC_DEFINE(HAVE_SOLARIS,1,[On solaris])
 
+	if test -f /usr/share/man/man7/attributes.7 ; then
+		MAN_USERMOD_SECTION=8
+		MAN_ETHERS_SECTION=5
+		MAN_FILE_FORMATS=5
+		MAN_MISC_INFO=7
+	else
+		#
+		# Use System V conventions for man pages.
+		#
+
+		MAN_USERMOD_SECTION=1m
+		MAN_ETHERS_SECTION=4
+		MAN_FILE_FORMATS=4
+		MAN_MISC_INFO=5
+	fi
+
 	DYEXT="so"
-	#
-	# Use System V conventions for man pages.
-	#
-	MAN_FILE_FORMATS=4
-	MAN_MISC_INFO=5
 	;;
 esac
 
@@ -1364,6 +1377,8 @@
 AC_SUBST(DYEXT)
 AC_SUBST(MAN_FILE_FORMATS)
 AC_SUBST(MAN_MISC_INFO)
+AC_SUBST(MAN_USERMOD_SECTION)
+AC_SUBST(MAN_ETHERS_SECTION)
 
 AC_ARG_ENABLE([usb],
 [AC_HELP_STRING([--enable-usb],[enable nusb support @<:@default=yes, if support available@:>@])],
--- a/pcap-filter.manmisc.in
+++ b/pcap-filter.manmisc.in
@@ -182,7 +182,7 @@ be checked for a match.
 True if the Ethernet destination address is \fIehost\fP.
 \fIEhost\fP
 may be either a name from /etc/ethers or a number (see
-.IR ethers (3N)
+.IR ethers (@MAN_ETHERS_SECTION@)
 for numeric format).
 .IP "\fBether src \fIehost\fP"
 True if the Ethernet source address is \fIehost\fP.
--- a/pcap.3pcap.in
+++ b/pcap.3pcap.in
@@ -244,7 +244,7 @@ that device.  A user can be given that privilege by, for example, adding
 that privilege to the user's
 .B defaultpriv
 key with the
-.B usermod (1M)
+.B usermod (@MAN_USERMOD_SECTION@)
 command.
 .TP
 .B Under HP-UX with DLPI:
@@ -915,7 +915,7 @@ script or some other configuration script to check whether the libpcap
 1.0 APIs are available and use them only if they are.
 .SH SEE ALSO
 autoconf(1), tcpdump(1), tcpslice(1), pcap-filter(@MAN_MISC_INFO@), pfconfig(8),
-usermod(1M)
+usermod(@MAN_USERMOD_SECTION@)
 .SH AUTHORS
 The original authors of libpcap are:
 .LP