From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-4.sys.kth.se (smtp-4.sys.kth.se [130.237.48.193]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s79CPCO2026497 for ; Sat, 9 Aug 2014 08:25:13 -0400 (EDT) Received: from smtp-4.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-4.sys.kth.se (Postfix) with ESMTP id 856CB571 for ; Sat, 9 Aug 2014 14:25:12 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-4.sys.kth.se ([127.0.0.1]) by smtp-4.sys.kth.se (smtp-4.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id EnaD_IAIs4Q3 for ; Sat, 9 Aug 2014 14:25:11 +0200 (CEST) X-KTH-Auth: kristaps [2a02:1205:5033:5b0:c187:c525:e154:78f6] X-KTH-mail-from: kristaps@bsd.lv X-KTH-rcpt-to: discuss@mdocml.bsd.lv Received: from [IPv6:2a02:1205:5033:5b0:c187:c525:e154:78f6] (unknown [IPv6:2a02:1205:5033:5b0:c187:c525:e154:78f6]) by smtp-4.sys.kth.se (Postfix) with ESMTPSA id 6C1F324D9 for ; Sat, 9 Aug 2014 14:25:11 +0200 (CEST) Message-ID: <53E61326.4070905@bsd.lv> Date: Sat, 09 Aug 2014 14:25:10 +0200 From: Kristaps Dzonsons User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 To: discuss@mdocml.bsd.lv Subject: mandoc & mandocdb on Mac OS X Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Thought I'd drop a note to all with OSX who want mandoc goodness instead of the defaults for apropos and so on. This can be easily modified to only affect the local user, but I want to make it the system default. (As noted to tech@, there's a certain failure with mmap() in running some commands, but this should be fixed soon, so I won't mention it here.) First, uncomment "USE_MANPATH" in the Makefile. Then make (or remake) and install with the usual make install. (All binaries dumped into /usr/local now.) Aside: I also uncommented the CFLAGS and DBLIB to include /usr/local as I've compiled a more recent SQLite in there. The default SQLite doesn't have SQLITE_DETERMINISTIC. I don't know how much of a difference this makes, however. Prep the makewhatis database. $ sudo /usr/local/sbin/makewhatis Optionally add this to the /etc/weekly.local file. Note that the system makewhatis (via makewhatis.local) will also run weekly as stipulated in /etc/periodic/weekly. Then make sure that apropos and whatis point to mandoc's versions of the same. You can either replace the in-system binaries or alias. (Note: if you alias, running apropos via man won't work with the new system.) Finally, we need to de-funk man-db: $ alias man='man -c -p ""' This makes the formatter be run each time (-c) and suppresses preprocessors (-p ""). Next, to continue de-funkifying, we need not only to replace nroff with mandoc in /etc/man.conf, but to decline the "help" that man-db gives us in line lengths in a way that I can't disable but that triggers -man mode instead of -mdoc: NROFF tail -n +2 | /usr/local/bin/mandoc That's it! NOTE: not all manuals play well with mandoc! Specifically, the OpenGL manuals look like butts. I don't know why yet. Perhaps, in converting from DocBook, they didn't use docbook2mdoc... (Aside number two. It's because the OpenGL docbook input use a lot of , which docbook2mdoc doesn't understand enough to convert to eqn. In turn, mandoc's eqn wouldn't understand enough of the eqn itself... Any takers?) Best, Kristaps -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv