pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mk/ shorten the code

Module Name:	pkgsrc-wip
Committed By:	Roland Illig <>
Pushed By:	rillig
Date:		Sat Mar 3 22:46:54 2018 +0000
Changeset:	ea64bf1c98a4385b7d7fdd7fc3dc4ecdbf57301c

Modified Files:

Log Message:
mk/ shorten the code

To see a diff of this commit:;a=commitdiff;h=ea64bf1c98a4385b7d7fdd7fc3dc4ecdbf57301c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

 mk/ | 30 ++++++++++++++----------------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/mk/ b/mk/
index ef0452fed0..9ce8846fa0 100644
--- a/mk/
+++ b/mk/
@@ -143,33 +143,28 @@ _CVS_FLAGS=		-Q -z3
 _CVS_PASSFILE=		${WRKDIR}/.cvs_passwords
-_CVS_TODAY_CMD=		${DATE} -u +'%Y-%m-%d'
-_CVS_PKGVERSION_CMD=	${DATE} -u +'%Y.%m.%d'
+_CVS_PKGVERSION?=	${${DATE} -u +'%Y.%m.%d':L:sh}
 _CVS_DISTDIR=		${DISTDIR}/cvs-packages
 .for repo in ${CVS_REPOSITORIES}
 CVS_MODULE.${repo}?=		${repo}
 CVS_EXTRACTDIR.${repo}?=	${repo}
+.  if defined(CVS_TAG)
+CVS_TAG.${repo}?=		${CVS_TAG}
+.  endif
 # Determine appropriate checkout date or tag
 .  if defined(CVS_TAG.${repo})
-_CVS_TAG_FLAG.${repo}=	-r${CVS_TAG.${repo}}
-_CVS_TAG.${repo}=	${CVS_TAG.${repo}}
-.  elif defined(CVS_TAG)
-_CVS_TAG_FLAG.${repo}=	-r${CVS_TAG}
-_CVS_TAG.${repo}=	${CVS_TAG}
-.  elif defined(CHECKOUT_DATE)
+_CVS_REV_ARGS.${repo}=	-r ${CVS_TAG.${repo}:Q}
+_CVS_REV.${repo}=	${CVS_TAG.${repo}}
 .  else
-_CVS_TAG_FLAG.${repo}=	'-D${_CVS_TODAY} 00:00 +0000'
-_CVS_TAG.${repo}=	${_CVS_TODAY:Q}
+_CVS_DATE.${repo}=	${CHECKOUT_DATE:U${${DATE} -u +'%Y-%m-%d':L:sh}}
+_CVS_REV_ARGS.${repo}=	-D ${_CVS_DATE.${repo}}\ 00:00:00\ +0000
+_CVS_REV.${repo}=	${_CVS_DATE.${repo}}
 .  endif
 # The cached archive
-_CVS_DISTFILE.${repo}=	${PKGBASE}-${repo}-${_CVS_TAG.${repo}}.tar.gz
+_CVS_DISTFILE.${repo}=	${PKGBASE}-${repo}-${_CVS_REV.${repo}}.tar.gz
 # Define the shell variables used by the following commands
 _CVS_CMD.vars.${repo}= \
@@ -201,7 +196,7 @@ _CVS_CMD.login.${repo}= \
 _CVS_CMD.checkout.${repo}= \
 	${STEP_MSG} "Checking out $$module from $$root.";		\
 	${_CVS_CMDLINE} -d "$$root"					\
-	    checkout ${_CVS_CHECKOUT_FLAGS} ${_CVS_TAG_FLAG.${repo}}	\
+	    checkout ${_CVS_CHECKOUT_FLAGS} ${_CVS_REV_ARGS.${repo}}	\
 	      -d "$$extractdir" "$$module"
 # Create the cached archive from the checked out repository
@@ -239,5 +234,8 @@ _PKG_VARS.cvs+=		${varbase}.${repo}
 .  for varbase in _CVS_DISTFILE
 _SYS_VARS.cvs+=		${varbase}.${repo}
 .  endfor
+.  for varbase in _CVS_REV_ARGS _CVS_REV
+_DEF_VARS.cvs+=		${varbase}.${repo}
+.  endfor

Home | Main Index | Thread Index | Old Index