From owner-freebsd-current@FreeBSD.ORG Mon Apr 18 20:01:40 2011 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09841106566B for ; Mon, 18 Apr 2011 20:01:40 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 7F6BB8FC08 for ; Mon, 18 Apr 2011 20:01:39 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id p3IK1bwB088363 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 18 Apr 2011 22:01:38 +0200 (CEST) (envelope-from uqs@FreeBSD.org) Date: Mon, 18 Apr 2011 22:01:37 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: current@FreeBSD.org Message-ID: <20110418200137.GK85668@acme.spoerlein.net> Mail-Followup-To: current@freebsd.org, Gordon Tetlow MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="gw4vLALk08fVJy3V" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Gordon Tetlow Subject: RFC: let man(1) depend on users PATH? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 20:01:40 -0000 --gw4vLALk08fVJy3V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Greetings, the following patch is required to let man(1) continue to work if the user build WITHOUT_GROFF and has textproc/groff installed. I personally think relying on a sane $PATH while calling groff and co is ok to do. If there are good reasons against this, please speak your mind. The idea is to be able to switch back and forth between base/ports groff-suite without having to alter any configuration files. Cheers, Uli --gw4vLALk08fVJy3V Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="man_groff.diff" Content-Transfer-Encoding: 8bit commit 4f1cfe61ede418f795095c2d3c021db64c860e20 Author: Ulrich Spörlein Date: Sat Mar 12 12:40:21 2011 +0100 Let users' PATH decide which groff suite to pick up. Let groff pass the -c flag to grotty, which will turn off ANSI sequences. While these are not a problem for our more/less, they get mangled by col(1) and this will result in garbage output. This makes man(1) work together with textproc/groff, in case the user decided to delete the old groff from base (-DWITHOUT_GROFF). diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 147ce58..58373a4 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -889,16 +889,18 @@ do_whatis() { search_whatis whatis "$@" } -EQN=/usr/bin/eqn +# User's PATH setting decides on the groff-suite to pick up. +EQN=eqn +NROFF='groff -P-c -Wall -mtty-char -man' +PIC=pic +REFER=refer +TBL=tbl +TROFF='groff -P-c -man' +VGRIND=vgrind + COL=/usr/bin/col LOCALE=/usr/bin/locale -NROFF='/usr/bin/groff -S -Wall -mtty-char -man' -PIC=/usr/bin/pic SYSCTL=/sbin/sysctl -TBL=/usr/bin/tbl -TROFF='/usr/bin/groff -S -man' -REFER=/usr/bin/refer -VGRIND=/usr/bin/vgrind debug=0 man_default_sections='1:1aout:8:2:3:n:4:5:6:7:9:l' --gw4vLALk08fVJy3V--