Subject: Re: USE_TOOLS+= gfmt
To: None <tech-pkg@NetBSD.org>
From: Aleksey Cheusov <cheusov@tut.by>
List: tech-pkg
Date: 05/13/2006 19:06:37
> On Sat, May 13, 2006 at 06:18:54PM +0300, Aleksey Cheusov wrote:
 >> > On Sat, May 13, 2006 at 05:01:28PM +0300, Aleksey Cheusov wrote:
 >>  >> Because fmt utilities are very different on many types of OSes it
 >>  >> whould be very nice to support yet another tool: gfmt (i.e. GNU fmt).
 >>  >> AFAIU it is better to use USE_TOOLS than add sysutils/coreutils
 >>  >> to BUILD_DEPENDS.
 >> 
 >> > For what exactly is this needed?
 >> 
 >> I have a plan to package a few dictionaries for dictd
 >> (textproc/dict-server). For this purpose I need GNU fmt.
 >> See wip/dict-mueller7, for example.

> OK, so this is about the dicussion from tech-userlevel.
Yes. I still think that NetBSD fmt is ugly.

> I still don't see why you need GNU fmt though, since the seemingly
> desired effect can be obtained using a combination of fold and sed
It is really easy for me to implement all functionality I need from
scratch using awk. The only problem I see for such solution is that
awk has no access to wcwidth(3) function needed for formatting
Japanese, Chinese and other languages.
This is why I think that it is better to
implement utility for formatting text using C language.
And well known 'fmt' and 'fold' are good candidates for this.
Unfortunately 'gfmt -s' is _the only_ tool ready for my needs.
If it works, for what reason I should reimplement the wheel
using 'fold', 'sed' and whatever?

P.S.
Oops, NetBSD has no manual page for wcwidth(3) function.

-- 
Best regards, Aleksey Cheusov.