Subject: Re: pkg/36825 (bsd.options.mk is broken when building packages on
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: pkgsrc-bugs
Date: 08/26/2007 16:05:03
The following reply was made to PR pkg/36825; it has been noted by GNATS.

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/36825 (bsd.options.mk is broken when building packages on
	Solaris 10)
Date: Sun, 26 Aug 2007 18:04:02 +0200

 --AqsLC8rIMeq19msA
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Fri, Aug 24, 2007 at 05:20:10PM +0000, Tobias Nygren wrote:
 >  Nevertheless, /bin/sh is the default shell used by bmake, and
 >  thus the pkgsrc infrastructure. The proper fix for this problem is to
 >  teach bmake to use /usr/xpg4/bin/sh or similar. Please reopen until a
 >  proper fix has been implemented.
 
 I disagree. Nevertheless, the two attached patches should do that.
 
 Joerg
 
 --AqsLC8rIMeq19msA
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="Makefile.diff"
 
 Index: Makefile
 ===================================================================
 RCS file: /home/joerg/repo/netbsd/pkgsrc/devel/bmake/Makefile,v
 retrieving revision 1.35
 diff -u -r1.35 Makefile
 --- Makefile	12 Apr 2007 21:28:42 -0000	1.35
 +++ Makefile	26 Aug 2007 16:03:52 -0000
 @@ -24,6 +24,16 @@
  
  INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1
  
 +BOOTSTRAP_ARGS=		-q -o ${OPSYS} --prefix=${PREFIX} \
 +			--with-default-sys-path=${makesyspath} \
 +			--mksrc none --sysconfdir=${PKG_SYSCONFDIR:Q}
 +
 +.include "../../mk/bsd.prefs.mk"
 +
 +.if ${OPSYS} == "SunOS"
 +BOOTSTRAP_ARGS+=	--with-defshell=/usr/xpg4/bin/sh
 +.endif
 +
  do-extract:
  	${CP} -R ${FILESDIR} ${WRKSRC}
  
 @@ -31,10 +41,7 @@
  
  do-build:
  	cd ${WRKDIR} && \
 -		${SETENV} ${MAKE_ENV} ${SH} ./bmake/boot-strap \
 -		-q -o ${OPSYS} --prefix=${PREFIX} \
 -		--with-default-sys-path=${makesyspath} --mksrc none \
 -		--sysconfdir=${PKG_SYSCONFDIR}
 +		${SETENV} ${MAKE_ENV} ${SH} ./bmake/boot-strap ${BOOTSTRAP_ARGS}
  
  do-install:
  	${INSTALL_PROGRAM} ${WRKDIR}/${OPSYS}/bmake ${PREFIX}/bin
 
 --AqsLC8rIMeq19msA
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="bootstrap.diff"
 
 Index: bootstrap
 ===================================================================
 RCS file: /home/joerg/repo/netbsd/pkgsrc/bootstrap/bootstrap,v
 retrieving revision 1.108
 diff -u -r1.108 bootstrap
 --- bootstrap	18 Aug 2007 11:01:28 -0000	1.108
 +++ bootstrap	26 Aug 2007 15:40:01 -0000
 @@ -477,6 +477,7 @@
  	whoamiprog=/usr/ucb/whoami
  	machine_arch=`uname -p | sed -e 's/i86pc/i386/'`
  	check_compiler=yes
 +	bmakexargs="$bmakexargs --with-defshell=/usr/xpg4/bin/sh"
  	;;
  AIX)
  	root_group=system
 
 --AqsLC8rIMeq19msA--