diff options
author | Satoshi Asami <asami@FreeBSD.org> | 2000-07-19 16:41:22 +0000 |
---|---|---|
committer | Satoshi Asami <asami@FreeBSD.org> | 2000-07-19 16:41:22 +0000 |
commit | ca3a88aa57f9e01921ba5d3753cba65189115848 (patch) | |
tree | aa085d4e6282b77640688ef3787112e1fafdc112 /Mk/bsd.port.mk | |
parent | 60200dd42a29e21dd2aee735038f406db5c2c77c (diff) | |
download | ports-ca3a88aa57f9e01921ba5d3753cba65189115848.tar.gz ports-ca3a88aa57f9e01921ba5d3753cba65189115848.zip |
Notes
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r-- | Mk/bsd.port.mk | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 95fae7b43625..72eb7d01d5e2 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -911,7 +911,11 @@ MTREE_FILE= /etc/mtree/BSD.local.dist .endif .endif MTREE_CMD?= /usr/sbin/mtree +.if ${OSVERSION} >= 500010 +MTREE_ARGS?= -U -f ${MTREE_FILE} -d -e -p -L +.else MTREE_ARGS?= -U -f ${MTREE_FILE} -d -e -p +.endif # A few aliases for *-install targets INSTALL_PROGRAM= \ @@ -1070,6 +1074,20 @@ FETCH_BEFORE_ARGS+= -l .endif .endif +# +# Sort the master site list according to the patterns in MASTER_SORT +# +MASTER_SORT?= +MASTER_SORT_REGEX?= +MASTER_SORT_REGEX+= ${MASTER_SORT:S|.|\\.|g:S|^|//[^/]*|:S|$|/|} + +MASTER_SORT_AWK= BEGIN { RS = " "; ORS = " "; IGNORECASE = 1 ; gl = "${MASTER_SORT_REGEX}"; } +.for srt in ${MASTER_SORT_REGEX} +MASTER_SORT_AWK+= /${srt:S^/^\\/^g}/ { good["${srt}"] = good["${srt}"] " " $$0 ; next; } +.endfor +MASTER_SORT_AWK+= { rest = rest " " $$0; } END { n=split(gl, gla); for(i=1;i<=n;i++) { print good[gla[i]]; } print rest; } +SORTED_MASTER_SITES_CMD= echo '${MASTER_SITES}' | ${AWK} '${MASTER_SORT_AWK}' + DISTFILES?= ${DISTNAME}${EXTRACT_SUFX} ALLFILES?= ${DISTFILES} ${PATCHFILES} @@ -1535,7 +1553,7 @@ do-fetch: fi; \ fi; \ ${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \ - for site in ${MASTER_SITES}; do \ + for site in `${SORTED_MASTER_SITES_CMD}`; do \ ${ECHO_MSG} ">> Attempting to fetch from $${site}."; \ DIR=${DIST_SUBDIR}; \ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ @@ -2134,7 +2152,7 @@ fetch-list: @(cd ${_DISTDIR}; \ for file in ${DISTFILES}; do \ if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ - for site in ${MASTER_SITES}; do \ + for site in `${SORTED_MASTER_SITES_CMD}`; do \ DIR=${DIST_SUBDIR}; \ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ case $${file} in \ @@ -2665,7 +2683,9 @@ generate-plist: .endif .endfor @${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${PLIST} >> ${TMPPLIST} +.if !defined(NO_MTREE) @${ECHO} "@unexec if [ -f %D/info/dir ]; then if sed -e '1,/Menu:/d' %D/info/dir | grep -q '^[*] '; then true; else rm %D/info/dir; fi; fi" >> ${TMPPLIST} +.endif .if defined(INSTALLS_SHLIB) @${ECHO} "@exec ${LDCONFIG} -m ${LDCONFIG_PLIST}" >> ${TMPPLIST} @${ECHO} "@unexec ${LDCONFIG} -R" >> ${TMPPLIST} |