Now that we have GH_DISTNAME, we can add support for GH_* in
cargo.port.mk without too much mess, allowing those ports which use
the module and GH_* distfiles to get rid of the "DISTFILES +=
${DISTNAME}${EXTRACT_SUFX}' boilerplate from their Makefiles.
I've got this in my current i386 bulk (now most of the way through
with no problems), assuming that succeeds, OK?
After this goes in, the extra DISTFILES+=... can be removed from
ports using MODULES=devel/cargo with GH_*; no need to do it beforehand.
I'm happy to go through and clean those up.
(I would have used !empty(GH_DISTFILE) instead of checking GH_ACCOUNT
and GH_PROJECT, but due to the order that files get included, it's not
defined until _after_ the .if is evaluated).
Index: cargo.port.mk
===================================================================
RCS file: /cvs/ports/devel/cargo/cargo.port.mk,v
retrieving revision 1.34
diff -u -p -r1.34 cargo.port.mk
--- cargo.port.mk 18 Jan 2023 13:11:39 -0000 1.34
+++ cargo.port.mk 28 Jan 2023 09:51:55 -0000
@@ -60,6 +60,10 @@ MASTER_SITES${MODCARGO_MASTER_SITESN} ?=
# allow override default configuration, and keep all files
MODCARGO_CRATES_KEEP ?=
+.if !empty(GH_ACCOUNT) && !empty(GH_PROJECT)
+DISTFILES += ${GH_DISTFILE}
+.endif
+
# Generated list of DISTFILES.
.for _cratename _cratever in ${MODCARGO_CRATES}
DISTFILES += ${_MODCARGO_DIST_SUBDIR}${_cratename}-${_cratever}.tar.gz{${_cratename}/${_cratever}/download}:${MODCARGO_MASTER_SITESN}
No comments:
Post a Comment