diff options
-rw-r--r-- | Mk/bsd.port.mk | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index a7ccb4bce23c..bd17be75731e 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -3177,7 +3177,11 @@ do-fetch: ${_PATCH_SITES_ENV} ; \ for _file in ${PATCHFILES}; do \ file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^-:][^:]*$$//'` ; \ - select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` ; \ + if [ $$_file = $$file ]; then \ + select=''; \ + else \ + select=`${ECHO_CMD} $${_file##*:} | ${SED} -e 's/,/ /g'` ; \ + fi; \ file=`${ECHO_CMD} $$file | ${SED} -E -e 's/:-[^:]+$$//'` ; \ force_fetch=false; \ filebasename=$${file##*/}; \ @@ -3997,7 +4001,11 @@ fetch-list: ${_MASTER_SITES_ENV} ; \ for _file in ${DISTFILES}; do \ file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ - select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` ; \ + if [ $$_file = $$file ]; then \ + select=''; \ + else \ + select=`${ECHO_CMD} $${_file##*:} | ${SED} -e 's/,/ /g'` ; \ + fi; \ if [ ! -f $$file -a ! -f $${file##*/} ]; then \ if [ ! -z "$$select" ] ; then \ __MASTER_SITES_TMP= ; \ @@ -4034,7 +4042,11 @@ fetch-list: ${_PATCH_SITES_ENV} ; \ for _file in ${PATCHFILES}; do \ file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^-:][^:]*$$//'` ; \ - select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` ; \ + if [ $$_file = $$file ]; then \ + select=''; \ + else \ + select=`${ECHO_CMD} $${_file##*:} | ${SED} -e 's/,/ /g'` ; \ + fi; \ file=`${ECHO_CMD} $$file | ${SED} -E -e 's/:-[^:]+$$//'` ; \ if [ ! -f $$file -a ! -f $${file##*/} ]; then \ if [ ! -z "$$select" ] ; then \ @@ -4072,7 +4084,11 @@ fetch-url-list-int: for _file in ${DISTFILES}; do \ file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ fileptn=`${ECHO_CMD} $$file | ${SED} 's|/|\\\\/|g;s/\./\\\\./g;s/\+/\\\\+/g;s/\?/\\\\?/g'` ; \ - select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` ; \ + if [ $$_file = $$file ]; then \ + select=''; \ + else \ + select=`${ECHO_CMD} $${_file##*:} | ${SED} -e 's/,/ /g'` ; \ + fi; \ if [ ! -z "${LISTALL}" -o ! -f $$file -a ! -f $${file##*/} ]; then \ if [ ! -z "$$select" ] ; then \ __MASTER_SITES_TMP= ; \ @@ -4101,7 +4117,11 @@ fetch-url-list-int: ${_PATCH_SITES_ENV} ; \ for _file in ${PATCHFILES}; do \ file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^-:][^:]*$$//'` ; \ - select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` ; \ + if [ $$_file = $$file ]; then \ + select=''; \ + else \ + select=`${ECHO_CMD} $${_file##*:} | ${SED} -e 's/,/ /g'` ; \ + fi; \ file=`${ECHO_CMD} $$file | ${SED} -E -e 's/:-[^:]+$$//'` ; \ fileptn=`${ECHO_CMD} $$file | ${SED} 's|/|\\\\/|g;s/\./\\\\./g;s/\+/\\\\+/g;s/\?/\\\\?/g'` ; \ if [ ! -z "${LISTALL}" -o ! -f $$file -a ! -f $${file##*/} ]; then \ |