Index: Scripts/qa.sh =================================================================== --- Scripts/qa.sh +++ Scripts/qa.sh @@ -9,6 +9,11 @@ [ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_QA}" ] && set -x +if [ -z "${PKG_BIN}" ]; then + echo "PKG_BIN required in environment." >&2 + exit 1 +fi + LF=$(printf '\nX') LF=${LF%X} @@ -666,8 +671,8 @@ if listcontains ${dep_file} "${already}"; then continue fi - if $(pkg which -q ${dep_file} > /dev/null 2>&1); then - dep_file_pkg=$(pkg which -qo ${dep_file}) + if $("${PKG_BIN}" which -q ${dep_file} > /dev/null 2>&1); then + dep_file_pkg=$("${PKG_BIN}" which -qo ${dep_file}) # Check that the .so we need has a SONAME if [ "${dep_file_pkg}" != "${PKGORIGIN}" ]; then @@ -772,7 +777,7 @@ EOT fi done - if [ -n "${gotsome}" ] && ! pkg info -e devel/p5-Module-CoreList; then + if [ -n "${gotsome}" ] && ! "${PKG_BIN}" info -e devel/p5-Module-CoreList; then notice "You have some Perl modules as dependencies but you do not have devel/p5-Module-CoreList installed, the perlcore QA check gets better results when using it, especially with older Perl versions." fi } Index: Uses/ncurses.mk =================================================================== --- Uses/ncurses.mk +++ Uses/ncurses.mk @@ -64,7 +64,7 @@ .if ${NCURSES_INSTALLED} != "" NCURSES_PORT= ${NCURSES_INSTALLED} -NCURSES_SHLIBFILE!= ${PKG_INFO} -ql ${NCURSES_INSTALLED} | grep -m 1 "^`pkg query "%p" ${NCURSES_INSTALLED}`/lib/libncurses.so." +NCURSES_SHLIBFILE!= ${PKG_INFO} -ql ${NCURSES_INSTALLED} | grep -m 1 "^`${PKG_QUERY} "%p" ${NCURSES_INSTALLED}`/lib/libncurses.so." NCURSES_SHLIBVER?= ${NCURSES_SHLIBFILE:E} .endif Index: bsd.port.mk =================================================================== --- bsd.port.mk +++ bsd.port.mk @@ -1503,7 +1503,8 @@ PKGORIGIN=${PKGORIGIN} \ LIB_RUN_DEPENDS='${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}' \ UNIFIED_DEPENDS=${_UNIFIED_DEPENDS:C,([^:]*:[^:]*):?.*,\1,:O:u:Q} \ - PKGBASE=${PKGBASE} + PKGBASE=${PKGBASE} \ + PKG_BIN="${PKG_BIN}" .if !empty(USES:Mssl) QA_ENV+= USESSSL=yes .endif