ports/61972: make USE_SIZE the default in bsd.port.mk

Trevor Johnson trevor at jpj.net
Mon Feb 2 08:11:37 UTC 2004


> --- bsd.port.mk.orig	Mon Jan 26 18:11:56 2004
> +++ bsd.port.mk	Mon Jan 26 18:20:34 2004
> @@ -4084,6 +4084,7 @@
>
>  # Checksumming utilities
>
> +USE_SIZE?=	yes
>  .if !target(makesum)
>  makesum:
>  	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} fetch NO_CHECKSUM=yes
> @@ -4091,7 +4092,7 @@
>  	@(cd ${DISTDIR}; \
>  	 for file in ${_CKSUMFILES}; do \
>  		${MD5} $$file >> ${MD5_FILE}; \
> -		if [ -n "${USE_SIZE}" ]; then \
> +		if [ ${USE_SIZE} = "yes" ]; then \
>  			${ECHO_CMD} "SIZE ($$file) = "`${LS} -ALln $$file | ${AWK} '{print $$5}'` >> ${MD5_FILE}; \
>  		fi; \
>  	 done)

Here's a slightly different way to do the same thing:

Index: /usr/ports/Mk/bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.483
diff -u -r1.483 bsd.port.mk
--- /usr/ports/Mk/bsd.port.mk	24 Jan 2004 01:26:30 -0000	1.483
+++ /usr/ports/Mk/bsd.port.mk	2 Feb 2004 08:07:38 -0000
@@ -725,6 +725,12 @@
 #				  to 0:0.  Set this variable if you want to turn off this
 #				  feature.
 #
+# For makesum:
+#
+# NO_SIZE	- Don't record size data in distinfo, needed when the master site
+# does not report file sizes, or when multiple valid versions of a distfile,
+# having different sizes, exist.
+#
 # For patch:
 #
 # EXTRA_PATCHES - Define this variable if you have patches not in
@@ -4091,7 +4097,7 @@
 	@(cd ${DISTDIR}; \
 	 for file in ${_CKSUMFILES}; do \
 		${MD5} $$file >> ${MD5_FILE}; \
-		if [ -n "${USE_SIZE}" ]; then \
+		if [ -z "${NO_SIZE}" ]; then \
 			${ECHO_CMD} "SIZE ($$file) = "`${LS} -ALln $$file | ${AWK} '{print $$5}'` >> ${MD5_FILE}; \
 		fi; \
 	 done)
-- 
Trevor Johnson



More information about the freebsd-ports-bugs mailing list