Index: Scripts/qa.sh =================================================================== --- Scripts/qa.sh +++ Scripts/qa.sh @@ -942,10 +942,35 @@ return 0 } +perl5run() +{ + if [ -z "${USEPERL5RUN}" ]; then + return 0 + fi + # skip check if port is a p5-* one; they always run depend on perl + if [ "${PKGBASE%%-*}" = "p5" ]; then + return 0 + fi + + perl5runused=0 + while read -r f; do + # no results presents a blank line from heredoc + [ -z "$f" ] && continue + file ${f} | grep -vi perl > /dev/null 2>&1 + perl5runused=$((${perl5runused}+${?})) + done <<-EOF + $(find ${STAGEDIR} -type f) + EOF + if [ ${perl5runused} -eq 0 ]; then + warn "You have a run depend on perl5 but no files in the package seem to use perl" + fi + return 0 +} + checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo" checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo" -checks="$checks proxydeps sonames perlcore no_arch gemdeps gemfiledeps flavors" -checks="$checks license" +checks="$checks proxydeps sonames perlcore perl5run no_arch gemdeps" +checks="$checks gemfiledeps flavors license" ret=0 cd ${STAGEDIR} || exit 1 Index: bsd.port.mk =================================================================== --- bsd.port.mk +++ bsd.port.mk @@ -1655,6 +1655,9 @@ .if !empty(USES:Mterminfo) QA_ENV+= USESTERMINFO=yes .endif +.if !empty(USES:Mperl5) && (!empty(USE_PERL5:Mrun) || !empty(USE_PERL5:Mconfigure) || !empty(USE_PERL5:Mmodbuild) || !empty(USE_PERL5:Mmodbuildtiny)) +QA_ENV+= USEPERL5RUN=yes +.endif CO_ENV+= STAGEDIR=${STAGEDIR} \ PREFIX=${PREFIX} \