Subject: pkg/19190: shells/ast-ksh is not correct (and as a result, does not build)
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 11/27/2002 18:47:02
>Number:         19190
>Category:       pkg
>Synopsis:       shells/ast-ksh is not correct (and as a result, does not build)
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 27 15:48:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Greg A. Woods
>Release:        pkgsrc-current 2002/11/26
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD 1.5W
Architecture: i386 sparc
Machine: i386 sparc
>Description:

	the shells/ast-ksh build rules don't follow the documentation
	properly.

	the command to build ksh is "make", not "${MAKE}"!!!!

	also, it seems the build script is not /bin/sh compatible, at
	least not on my 1.5W systems....

	as a result of fixing these problems it seems ast-ksh is indeed
	entirely compatible with BUILDLINK2.

	also as a result ast-ksh should work on any NetBSD, not just
	i386.  (seems to run OK on my sparc systems as well)


	ast-ksh can no doubt be made to work on other platforms too by
	using shells/pdksh whenever the native /bin/sh is not viable and
	when an older native ksh (or xpg4 sh) is not available.

>How-To-Repeat:

>Fix:

Index: shells/ast-ksh/Makefile
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/shells/ast-ksh/Makefile,v
retrieving revision 1.3
diff -c -r1.3 Makefile
*** shells/ast-ksh/Makefile	17 Nov 2002 09:01:59 -0000	1.3
--- shells/ast-ksh/Makefile	27 Nov 2002 23:07:16 -0000
***************
*** 17,35 ****
  NO_SRC_ON_CDROM=${RESTRICTED}
  NO_SRC_ON_FTP=	${RESTRICTED}
  
! ONLY_FOR_PLATFORM=	NetBSD-*-i386
  
  ASTKSH_VERSION=	2002-09-22
  
! NO_BUILDLINK2=	# arcane build procedure causes buildlink2 to not work
  WRKSRC=		${WRKDIR}
! MAKE_FLAGS=	CC="${BUILDLINK_CC}" CCFLAGS="${CFLAGS}"
  
  PKG_SHELL=	${PREFIX}/bin/ksh93
  
  do-build:
  	cd ${WRKSRC}; \
! 	${SETENV} SHELL=${SH} ${SH} ./bin/package ${MAKE_PROGRAM} ${MAKE_FLAGS}
  
  do-install:
  	arch=`${WRKSRC}/bin/package host`; \
--- 17,36 ----
  NO_SRC_ON_CDROM=${RESTRICTED}
  NO_SRC_ON_FTP=	${RESTRICTED}
  
! # needs pdksh
! ONLY_FOR_PLATFORM=	NetBSD-*
  
  ASTKSH_VERSION=	2002-09-22
  
! USE_BUILDLINK2=	YES
  WRKSRC=		${WRKDIR}
! MAKE_FLAGS=	CC="${CC}" CCFLAGS="${CFLAGS}"
  
  PKG_SHELL=	${PREFIX}/bin/ksh93
  
  do-build:
  	cd ${WRKSRC}; \
! 	${SETENV} SHELL=/bin/ksh /bin/ksh ./bin/package make
  
  do-install:
  	arch=`${WRKSRC}/bin/package host`; \
>Release-Note:
>Audit-Trail:
>Unformatted: