pkgsrc-Users archive

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

wip patch for using external git command



On non-NetBSD systems I'd like to use external git command in WIP.
Is there objections against the following patch?
diff --git a/mk/git-package.mk b/mk/git-package.mk
index efb8491445..2607f10fd7 100644
--- a/mk/git-package.mk
+++ b/mk/git-package.mk
@@ -59,6 +59,11 @@
 #
 #	Example: GIT_SSL_NO_VERIFY=true
 #
+# GIT_CMD_ENV (optional)
+#	The environment variable that sets the external git command.
+#
+#	Example: /usr/bin/git
+#
 # GIT_REPOSITORIES (optional)
 #	For packages that need multiple Git repositories, this is the list
 #	of repository IDs. Each of these repositories is configured separately,
@@ -85,7 +90,9 @@
 #
 # Keywords: git github

+.if empty(GIT_CMD_ENV)
 TOOL_DEPENDS+=		git-base>=1.6.4:../../devel/git-base
+.endif

 # Defaults for package-settable variables
 DISTFILES?=		# empty
@@ -124,7 +131,7 @@ GIT_EXTRACTDIR.${repo}?= ${GIT_MODULE.${repo}}

 USE_TOOLS+=		date gzip pax

-_GIT_CMD=		${TOOLBASE}/bin/git
+_GIT_CMD=		${GIT_CMD_ENV:U${TOOLBASE}/bin/git}
 _GIT_CHECKOUT_FLAGS=	--quiet
 _GIT_PKGVERSION_CMD=	${DATE} -u +'%Y.%m.%d'
 _GIT_PKGVERSION=	${_GIT_PKGVERSION_CMD:sh}


Home | Main Index | Thread Index | Old Index