diff options
author | David Naylor <dbn@FreeBSD.org> | 2017-06-18 18:09:16 +0000 |
---|---|---|
committer | David Naylor <dbn@FreeBSD.org> | 2017-06-18 18:09:16 +0000 |
commit | 9920d3ae657e820bce42911009136fc059210d0d (patch) | |
tree | 237480885bd130394dbcbc56f765540bba4416e2 /Mk | |
parent | 4aeae92375bb57620d054d3cc88677ebba4f22bf (diff) | |
download | ports-9920d3ae657e820bce42911009136fc059210d0d.tar.gz ports-9920d3ae657e820bce42911009136fc059210d0d.zip |
Notes
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Scripts/qa.sh | 28 | ||||
-rw-r--r-- | Mk/Uses/cran.mk | 2 | ||||
-rw-r--r-- | Mk/bsd.port.mk | 8 |
3 files changed, 36 insertions, 2 deletions
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh index 024fce7e8fa7..ea6128b9bf8b 100644 --- a/Mk/Scripts/qa.sh +++ b/Mk/Scripts/qa.sh @@ -797,9 +797,35 @@ perlcore() { fi } +no_arch() { + [ -z "$NO_ARCH" ] && return + rc=0 + while read f; do + [ -z "$f" ] && continue + if [ -n "$NO_ARCH_IGNORE" ]; then + skip= + for blacklist in $NO_ARCH_IGNORE; do + case $f in + *$blacklist) skip=1; break;; + esac + done + [ "$skip" ] && continue + fi + err "'${f#.}' is a architecture specific binary file and you have set NO_ARCH. Either remove NO_ARCH or add '$(basename $f)' to NO_ARCH_IGNORE." + rc=1 + done <<-EOF + $(list_stagedir_elfs \ + | file -F $'\1' -f - -N \ + | grep -aE 'ELF .* [LM]SB .*, .*, version [0-9]+ \(FreeBSD\)' \ + | cut -f 1 -d $'\1') + EOF + return $rc +} + + checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo" checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo" -checks="$checks proxydeps sonames perlcore" +checks="$checks proxydeps sonames perlcore no_arch" ret=0 cd ${STAGEDIR} diff --git a/Mk/Uses/cran.mk b/Mk/Uses/cran.mk index b23d91989654..28c08f717e0c 100644 --- a/Mk/Uses/cran.mk +++ b/Mk/Uses/cran.mk @@ -71,6 +71,8 @@ cran-strip: ${FIND} ${STAGEDIR}${PREFIX}/${R_MOD_DIR} -name '*.so' -exec ${STRIP_CMD} {} + .include "${PORTSDIR}/math/R/compiler.mk" .include "${USESDIR}/fortran.mk" +.else +NO_ARCH= yes .endif .endif #_INCLUDE_USES_CRAN_MK diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index bb6b1995585c..42546f7f8578 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -226,6 +226,10 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # # NO_ARCH - Set this if port is architecture neutral. # +# NO_ARCH_IGNORE - Set this to a list files to ignore when NO_ARCH is checked +# in stage-qa (i.e. architecture specific files that are +# 'bundled' with the port). +# # Set these if your port only makes sense to certain architectures. # They are lists containing names for them (e.g., "amd64 i386"). # (Defaults: not set.) @@ -1527,7 +1531,9 @@ QA_ENV+= STAGEDIR=${STAGEDIR} \ PKGORIGIN=${PKGORIGIN} \ LIB_RUN_DEPENDS='${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}' \ UNIFIED_DEPENDS=${_UNIFIED_DEPENDS:C,([^:]*:[^:]*):?.*,\1,:O:u:Q} \ - PKGBASE=${PKGBASE} + PKGBASE=${PKGBASE} \ + NO_ARCH=${NO_ARCH} \ + "NO_ARCH_IGNORE=${NO_ARCH_IGNORE}" .if !empty(USES:Mssl) QA_ENV+= USESSSL=yes .endif |