Subject: bugs in bsd.pkg.mk configure section?
To: None <tech-pkg@netbsd.org>
From: None <mcmahill@mtl.mit.edu>
List: tech-pkg
Date: 05/19/1999 14:18:52
I was working on making a package for gawk-3 (prompted by recent
discussions of our awk being the old gawk-2) and came across a possible
bug in /usr/pkgsrc/mk/bsd.pkg.mk

In the section of /usr/pkgsrc/mk/bsd.pkg.mk which does the configure I
see:

.if defined(HAS_CONFIGURE)
        ${_PKG_SILENT}(${_PKG_DEBUG}cd ${WRKSRC} && ${SETENV} CC="${CC}" ac_cv_path_CC="${CC}" \
            CFLAGS="${CFLAGS}" \
            INSTALL="`${TYPE} ${INSTALL} | ${AWK} '{ print $$NF }'` -c -o 
${BINOWN} -g ${BINGRP}" \
            INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
            ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS})
.endif

so the INSTALL_PROGRAM="${INSTALL_PROGRAM}" causes autoconf generated
configure scripts to be able to use our desired INSTALL_PROGRAM, but for
some reason we don't seem to have

INSTALL_SCRIPT="${INSTALL_SCRIPT}"

or for that matter, INSTALL_DATA, is also not added to the environment.

Anyway, this caused the program installation to fail because
INSTALL_PROGRAM gets applied to a shell script which can't be stripped.

I can work around this by adding
CONFIGURE_ENV+= "INSTALL_SCRIPT=${INSTALL_SCRIPT}"

to the package Makefile, but it seems like other packages may have this
same issue so a prefered approach would be to add
CONFIGURE_ENV+= "INSTALL_SCRIPT=${INSTALL_SCRIPT}"
CONFIGURE_ENV+= "INSTALL_DATA=${INSTALL_DATA}"
to bsd.pkg.mk


Any comments?  

Thanks

-Dan