On Sat, Jun 25, 2011 at 07:21:19PM +0400, Mike Korbakov wrote:
> Hello!
>
> Here is dash port.
>
> I'm surprised that needs the great patch (which adds one letter).
> What do you think, is correct that text utilities, which have always been a
> part most
> of all UNIX'es now in a separate package (textutils) and has different names?
These are the GNU version of those utils, so they're prefixed with a
'g'. (In this case, there's no nl(1) in base though ...)
>
> $OpenBSD$
> $Id: patch-src_mkbuiltins,v 1.2 2011/03/29 14:15:54 mike Exp $
> --- src/mkbuiltins.orig Sat Jun 5 13:34:23 2010
> +++ src/mkbuiltins Tue Mar 29 17:41:12 2011
> @@ -84,7 +84,7 @@ cat <<\!
> */
>
> !
> -sed 's/ -[a-z]*//' $temp2 | nl -v 0 | LC_COLLATE=C sort -u -k 3,3 |
> +sed 's/ -[a-z]*//' $temp2 | gnl -v 0 | LC_COLLATE=C sort -u -k 3,3 |
Why not use:
awk '{ print " " FNR-1 " " $0 }'
and get rid of the dependency on textutils?
> tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
> awk '{ printf "#define %s (builtincmd + %d)\n", $3, $1}'
> printf '\n#define NUMBUILTINS %d\n' $(wc -l < $temp2)
>
>
> # $Id: Makefile,v 1.4 2011/03/29 18:08:30 mike-kmv Exp $
>
> COMMENT= Debian Almquist shell, POSIX-compliant, faster than bash
>
> DISTNAME= dash-0.5.6.1
> PKGREVISION= 0
> CATEGORIES= shells
> PKGNAME= ${DISTNAME}p${PKGREVISION}
Revisions are handled by $REVISION, but there's no need to set a
REVISION for a new port.
> HOMEPAGE= http://gondor.apana.org.au/~herbert/dash/
> MASTER_SITES= ${HOMEPAGE}/files/
>
> MAINTAINER= Mike <[email protected]>
>
> # GPL
Should have a version appended.
> PERMIT_PACKAGE_CDROM= Yes
> PERMIT_PACKAGE_FTP= Yes
> PERMIT_DISTFILES_CDROM= Yes
> PERMIT_DISTFILES_FTP= Yes
>
> BUILD_DEPENDS= devel/gmake
> BUILD_DEPENDS= textproc/textutils
>
> USE_GMAKE= yes
> CONFIGURE_STYLE= gnu
>
> include <bsd.port.mk>