From owner-freebsd-ports@FreeBSD.ORG Fri Mar 16 22:37:32 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C25CA1065676 for ; Fri, 16 Mar 2012 22:37:32 +0000 (UTC) (envelope-from freebsd-ports-local@be-well.ilk.org) Received: from asbnvacz-mailrelay01.megapath.net (asbnvacz-mailrelay01.megapath.net [207.145.128.243]) by mx1.freebsd.org (Postfix) with ESMTP id 21E448FC18 for ; Fri, 16 Mar 2012 22:37:31 +0000 (UTC) Received: from mail4.sea5.speakeasy.net (mail4.sea5.speakeasy.net [69.17.117.48]) by asbnvacz-mailrelay01.megapath.net (Postfix) with ESMTP id 38D77A7167F for ; Fri, 16 Mar 2012 18:37:31 -0400 (EDT) Received: (qmail 22986 invoked from network); 16 Mar 2012 22:37:30 -0000 Received: by simscan 1.4.0 ppid: 8010, pid: 4268, t: 0.1967s scanners: clamav: 0.88.2/m:52/d:10739 Received: from unknown (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail4.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 16 Mar 2012 22:37:30 -0000 Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.8]) by be-well.ilk.org (Postfix) with ESMTP id 0C6C133C1E; Fri, 16 Mar 2012 18:37:24 -0400 (EDT) Received: by lowell-desk.lan (Postfix, from userid 1147) id 984B139860; Fri, 16 Mar 2012 18:37:24 -0400 (EDT) From: Lowell Gilbert To: freebsd-ports@freebsd.org References: <4F60C059.7060904@FreeBSD.org> <44pqcd8yhd.fsf@lowell-desk.lan> Date: Fri, 16 Mar 2012 18:37:24 -0400 In-Reply-To: (Chris Rees's message of "Thu, 15 Mar 2012 19:50:29 +0000") Message-ID: <4462e46ul7.fsf@lowell-desk.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Chris Rees , Oleg Moskalenko , Gabor Kovesdan Subject: Re: CFT: new BSD-licensed sort available X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 22:37:32 -0000 Chris Rees writes: > On 15 March 2012 19:18, Lowell Gilbert > wrote: >> Gabor Kovesdan writes: >> >>> some time ago I started writing a BSDL sort variant from scratch since >>> the OpenBSD version did not support multibyte locales and was hard to >>> modify. The development was a bit stalled but recently, Oleg >>> Moskalenko showed interest in continuing >>> this version and he has made a very good job on this BSD sort >>> variant. Now it is compatible with the base version of GNU sort but >>> the performance in most cases (string sort and -n) is quite behind GNU >>> sort (although with -g it is about *4 times* faster). Oleg is still >>> working on optimizing the code and the long-term plan is to drop GNU >>> sort once this variant is good enough to replace it. For now, it is >>> only available in Ports Collection as textproc/bsdsort but if there is >>> no objection or any serious bug report I plan to add it to base >>> installed as bsdsort, being GNU sort still the default sort until it >>> proves that we can safely drop GNU sort. If you are interested in this >>> sort utility, could you please try the port and report us any issue >>> that you experience? >> >> portsdb(1) (from portupgrade) doesn't seem to like it; >> apparently it is missing a '-2' option, which I haven't >> tracked down yet... > > Fails with gnusort too anyway: > > [crees@pegasus]~% gsort -2 > gsort: invalid option -- '2' > Try `gsort --help' for more information. > [crees@pegasus]~% As it turns out, this *is* something that Gnu sort supports, although the documentation claims that the syntax is obsolete -- and doesn't document it very well. [5022] (lowell-desk) ~> printf "fee\nfie\nfoe\nfum\nfoo\nbaz" |gsort -t 'a' +1 -2 fee fie foe foo fum baz [5022] (lowell-desk) ~> It wouldn't be bad if BSD sort supported it, but it should definitely be fixed in the ports Makefile. I have submitted the fix in a PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=166188 Personally, I'd don't see any reason for bsdsort to include this functionality...