Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174735002
D59905.id187431.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D59905.id187431.diff
View Options
diff --git a/Mk/Scripts/do-fetch.sh b/Mk/Scripts/do-fetch.sh
--- a/Mk/Scripts/do-fetch.sh
+++ b/Mk/Scripts/do-fetch.sh
@@ -19,10 +19,6 @@
set -u
case ${dp_TARGET} in
- makesum-fetch)
- dp_NO_CHECKSUM=yes
- dp_DISABLE_SIZE=yes
- ;&
do-fetch|makesum)
if [ ! -d "${dp_DISTDIR}" ]; then
mkdir -p "${dp_DISTDIR}"
@@ -77,7 +73,7 @@
fi
fi
case ${dp_TARGET} in
- do-fetch|makesum|makesum-fetch)
+ do-fetch|makesum)
${dp_ECHO_MSG} "=> $file doesn't seem to exist in ${dp_DISTDIR}."
if [ ! -w "${dp_DISTDIR}" ]; then
${dp_ECHO_MSG} "=> ${dp_DISTDIR} is not writable by you; cannot fetch."
@@ -96,7 +92,7 @@
__MASTER_SITES_TMP="${__MASTER_SITES_TMP} ${___MASTER_SITES_TMP}"
else
case ${dp_TARGET} in
- do-fetch|makesum|makesum-fetch)
+ do-fetch|makesum)
if [ -n "${dp_DEVELOPER}" ]; then
${dp_ECHO_MSG} "===> /!\\ Error /!\\"
else
@@ -156,7 +152,7 @@
fi
_fetch_cmd="${_fetch_cmd} ${args} ${dp_FETCH_AFTER_ARGS}"
case ${dp_TARGET} in
- do-fetch|makesum|makesum-fetch)
+ do-fetch|makesum)
${dp_ECHO_MSG} "=> Attempting to fetch ${site}${file}"
if env -S "${dp_FETCH_ENV}" ${_fetch_cmd}; then
actual_size=$(stat -f %z "${file}")
@@ -180,7 +176,7 @@
esac
done
case ${dp_TARGET} in
- do-fetch|makesum|makesum-fetch)
+ do-fetch|makesum)
${dp_ECHO_MSG} "=> Couldn't fetch it - please try to retrieve this"
${dp_ECHO_MSG} "=> port manually into ${dp_DISTDIR} and try again."
exit 1
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3116,21 +3116,43 @@
_PATCH_SITES_FILE=${WRKDIR}/.patch_sites
_PATCHFILES_FILE=${WRKDIR}/.patchfiles
+create-do-fetch-distfiles-files: .PHONY
+. if !empty(DISTFILES)
+. if !defined(_DO_FETCH_FILES_CREATED) || ${_DO_FETCH_FILES_CREATED} != ${PKGORIGIN}
+ @${MKDIR} ${WRKDIR}
+ @${RM} ${_MASTER_SITES_FILE} ${_DISTFILES_FILE}
+. for site in ${_MASTER_SITES_ENV}
+ @printf '%s\n' "${site}" >> ${_MASTER_SITES_FILE}
+. endfor
+. for file in ${DISTFILES}
+ @printf '%s\n' "${file}" >> ${_DISTFILES_FILE}
+. endfor
+. endif
+. endif
+
+create-do-fetch-patchfiles-files: .PHONY
+. if defined(PATCHFILES) && !empty(PATCHFILES)
+. if !defined(_DO_FETCH_FILES_CREATED) || ${_DO_FETCH_FILES_CREATED} != ${PKGORIGIN}
+ @${MKDIR} ${WRKDIR}
+ @${RM} ${_PATCH_SITES_FILE} ${_PATCHFILES_FILE}
+. for site in ${_PATCH_SITES_ENV}
+ @printf '%s\n' "${site}" >> ${_PATCH_SITES_FILE}
+. endfor
+. for file in ${PATCHFILES}
+ @printf '%s\n' "${file:C/:-p[0-9]//}" >> ${_PATCHFILES_FILE}
+. endfor
+. endif
+. endif
+
+
# do-fetch does the fetching
# fetch-list Prints out a list of files to fetch (useful to do a batch fetch)
# fetch-url-list-int Used by fetch-urlall-list and fetch-url-list
-. for _target in do-fetch fetch-list fetch-url-list-int makesum-fetch
+. for _target in do-fetch fetch-list fetch-url-list-int
. if !target(${_target})
-${_target}:
+${_target}: create-do-fetch-distfiles-files create-do-fetch-patchfiles-files
@${MKDIR} ${WRKDIR}
. if !empty(DISTFILES)
- @${RM} ${_MASTER_SITES_FILE} ${_DISTFILES_FILE}
-. for site in ${_MASTER_SITES_ENV}
- @printf '%s\n' "${site}" >> ${_MASTER_SITES_FILE}
-. endfor
-. for file in ${DISTFILES}
- @printf '%s\n' "${file}" >> ${_DISTFILES_FILE}
-. endfor
@${SETENV} \
${_DO_FETCH_ENV} \
dp_SITES_FILE=${_MASTER_SITES_FILE} \
@@ -3139,13 +3161,6 @@
${SH} ${SCRIPTSDIR}/do-fetch.sh
. endif
. if defined(PATCHFILES) && !empty(PATCHFILES)
- @${RM} ${_PATCH_SITES_FILE} ${_PATCHFILES_FILE}
-. for site in ${_PATCH_SITES_ENV}
- @printf '%s\n' "${site}" >> ${_PATCH_SITES_FILE}
-. endfor
-. for file in ${PATCHFILES}
- @printf '%s\n' "${file:C/:-p[0-9]//}" >> ${_PATCHFILES_FILE}
-. endfor
@${SETENV} \
${_DO_FETCH_ENV} \
dp_SITES_FILE=${_PATCH_SITES_FILE} \
@@ -3937,13 +3952,11 @@
# the options consistent when fetching and when makesum'ing.
# As we're fetching new distfiles, that are not in the distinfo file, disable
# checksum and sizes checks.
-# NOTE: if you arrived here because your port defines a custom do-fetch target,
-# and makesum is somewhat broken, you need to define both do-fetch and
-# makesum-fetch to do the same thing, the easiest way is to do:
-# do-fetch makesum-fetch:
-# @target content
-makesum: check-sanity
- @cd ${.CURDIR} && ${MAKE} makesum-fetch
+makesum: check-sanity create-do-fetch-distfiles-files create-do-fetch-patchfiles-files
+ @cd ${.CURDIR} && ${MAKE} fetch \
+ NO_CHECKSUM=yes \
+ DISABLE_SIZE=yes \
+ _DO_FETCH_FILES_CREATED=${PKGORIGIN}
@${MKDIR} ${WRKDIR}
@${RM} ${_CKSUMFILES_FILE}
. for file in ${_CKSUMFILES}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 6, 2:42 PM (1 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40270127
Default Alt Text
D59905.id187431.diff (4 KB)
Attached To
Mode
D59905: Fix `make makesum` with complex ports
Attached
Detach File
Event Timeline
Log In to Comment