pkgsrc-WIP-changes archive

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

mk/fossil-package.mk: make single-repository case simpler



Module Name:	pkgsrc-wip
Committed By:	Roland Illig <rillig%NetBSD.org@localhost>
Pushed By:	rillig
Date:		Tue Feb 27 13:10:29 2018 +0000
Changeset:	4213a5055676b94b4397f0e930b182c1be36087b

Modified Files:
	mk/fossil-package.mk
	tcl-fossil/Makefile

Log Message:
mk/fossil-package.mk: make single-repository case simpler

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4213a5055676b94b4397f0e930b182c1be36087b

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

diffstat:
 mk/fossil-package.mk | 23 +++++++++++++++++++++--
 tcl-fossil/Makefile  |  5 +----
 2 files changed, 22 insertions(+), 6 deletions(-)

diffs:
diff --git a/mk/fossil-package.mk b/mk/fossil-package.mk
index aad8a49649..5e6ad6f796 100644
--- a/mk/fossil-package.mk
+++ b/mk/fossil-package.mk
@@ -5,6 +5,18 @@
 #
 # Package-settable variables:
 #
+# FOSSIL_REPO (required)
+#	The URL of the Fossil repository.
+#
+# FOSSIL_REVISION (optional)
+#	The revision, tag or branch to check out.
+#
+#	Default: --latest
+#
+# Packages that access more than one Fossil repository have to list the
+# repositories in FOSSIL_REPOSITORIES and configure the remaining variables
+# for each repository individually.
+#
 # FOSSIL_REPOSITORIES (required)
 #	A list of unique identifiers /id/ for which appropriate
 #	FOSSIL_REPO must be defined.
@@ -44,6 +56,13 @@ PKGREVISION?=		${_FOSSIL_PKGVERSION:S/.//g}
 # Input validation
 #
 
+.if defined(FOSSIL_REPO)
+FOSSIL_REPOSITORIES+=	_default
+FOSSIL_REPO._default=	${FOSSIL_REPO}
+FOSSIL_MODULE._default=	${FOSSIL_REPO:S,/$,,:T}
+WRKSRC?=		${WRKDIR}/${FOSSIL_MODULE._default}
+.endif
+
 .if !defined(FOSSIL_REPOSITORIES)
 PKG_FAIL_REASON+=	"[fossil-package.mk] FOSSIL_REPOSITORIES must be set."
 FOSSIL_REPOSITORIES?=	# none
@@ -146,8 +165,8 @@ do-fossil-extract:
 
 # Debug info for show-all and show-all-fossil
 _VARGROUPS+=		fossil
-_PKG_VARS.fossil+=	FOSSIL_REPOSITORIES
-_SYS_VARS.fossil+=	DISTFILES PKGREVISION
+_PKG_VARS.fossil+=	FOSSIL_REPO FOSSIL_MODULE FOSSIL_REPOSITORIES
+_SYS_VARS.fossil+=	DISTFILES PKGREVISION WRKSRC
 _SYS_VARS.fossil+=	_FOSSIL_PKGVERSION _FOSSIL_DISTDIR
 .for repo in ${FOSSIL_REPOSITORIES}
 .  for varbase in FOSSIL_REPO FOSSIL_MODULE FOSSIL_ENV FOSSIL_BRANCH FOSSIL_REVISION FOSSIL_TAG
diff --git a/tcl-fossil/Makefile b/tcl-fossil/Makefile
index 2077a1efda..59f041e705 100644
--- a/tcl-fossil/Makefile
+++ b/tcl-fossil/Makefile
@@ -3,8 +3,7 @@
 PKGNAME=	tcl-${TCL_VERSION}
 CATEGORIES=	lang
 
-FOSSIL_REPOSITORIES=	tcl
-FOSSIL_REPO.tcl=	http://core.tcl.tk/tcl/
+FOSSIL_REPO=	http://core.tcl.tk/tcl/
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	http://www.tcl.tk/
@@ -13,8 +12,6 @@ LICENSE=	2-clause-bsd
 
 .include "../../lang/tcl/Makefile.version"
 
-WRKSRC=			${WRKDIR}/tcl
-
 USE_GCC_RUNTIME=	yes
 
 GNU_CONFIGURE=		yes


Home | Main Index | Thread Index | Old Index