diff options
author | asami <asami@FreeBSD.org> | 1999-10-01 17:28:32 +0800 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 1999-10-01 17:28:32 +0800 |
commit | aa0d9f9f23e63243f54400cbb1c018b12a899203 (patch) | |
tree | be9db293222896645e2490d6d9d87a88d40dde95 /Mk | |
parent | 2f1d42b609540078300964f743858d1cd5eb0015 (diff) | |
download | freebsd-ports-gnome-aa0d9f9f23e63243f54400cbb1c018b12a899203.tar.gz freebsd-ports-gnome-aa0d9f9f23e63243f54400cbb1c018b12a899203.tar.zst freebsd-ports-gnome-aa0d9f9f23e63243f54400cbb1c018b12a899203.zip |
Handle distfiles with directory names in it. Helps when the master site
has things in different directories.
PR: 13926
Submitted by: jdp
Reviewed by: steve
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index cf77e4dda110..7732e8dec0a3 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1474,7 +1474,12 @@ do-fetch: ${ECHO_MSG} ">> Attempting to fetch from $${site}."; \ DIR=${DIST_SUBDIR}; \ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ - if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} ${FETCH_AFTER_ARGS}; then \ + case $${file} in \ + */*) ${MKDIR} $${file%/*}; \ + args="-o $${file} $${site}$${file}";; \ + *) args=$${site}$${file};; \ + esac; \ + if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} ${FETCH_AFTER_ARGS}; then \ continue 2; \ fi \ done; \ @@ -1498,7 +1503,12 @@ do-fetch: ${ECHO_MSG} ">> Attempting to fetch from $${site}."; \ DIR=${DIST_SUBDIR}; \ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ - if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} ${FETCH_AFTER_ARGS}; then \ + case $${file} in \ + */*) ${MKDIR} $${file%/*}; \ + args="-o $${file} $${site}$${file}";; \ + *) args=$${site}$${file};; \ + esac; \ + if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} ${FETCH_AFTER_ARGS}; then \ continue 2; \ fi \ done; \ @@ -2033,7 +2043,11 @@ fetch-list: for site in ${MASTER_SITES}; do \ DIR=${DIST_SUBDIR}; \ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ - ${ECHO} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} "${FETCH_AFTER_ARGS}" '||' ; \ + case $${file} in \ + */*) args="-o $${file} $${site}$${file}";; \ + *) args=$${site}$${file};; \ + esac; \ + ${ECHO} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} "${FETCH_AFTER_ARGS}" '||' ; \ break; \ done; \ ${ECHO} "echo $${file} not fetched" ; \ @@ -2046,7 +2060,11 @@ fetch-list: for site in ${PATCH_SITES}; do \ DIR=${DIST_SUBDIR}; \ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ - ${ECHO} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} "${FETCH_AFTER_ARGS}" '||' ; \ + case $${file} in \ + */*) args="-o $${file} $${site}$${file}";; \ + *) args=$${site}$${file};; \ + esac; \ + ${ECHO} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} "${FETCH_AFTER_ARGS}" '||' ; \ break; \ done; \ ${ECHO} "echo $${file} not fetched" ; \ |