pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: wip patch for using external git command
> Aleksey Cheusov <vle%gmx.net@localhost> writes:
>> On non-NetBSD systems I'd like to use external git command in WIP.
>> Is there objections against the following patch?
> Why is this not just an instance of the tools platform finding and
> accepting a native tool, rather than patching something not to use the
> tools framework? It seems like the change is in the wrong place.
I've added support for tool "git" and patch for wip. See attachments.
Index: mk/tools/defaults.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/defaults.mk,v
retrieving revision 1.65
diff -u -r1.65 defaults.mk
--- mk/tools/defaults.mk 12 Apr 2024 19:53:25 -0000 1.65
+++ mk/tools/defaults.mk 2 Jul 2024 20:15:18 -0000
@@ -82,6 +82,7 @@
_TOOLS_VARNAME.find= FIND
_TOOLS_VARNAME.gawk= AWK
_TOOLS_VARNAME.gem= GEM
+_TOOLS_VARNAME.git= GIT
_TOOLS_VARNAME.gm4= M4
_TOOLS_VARNAME.gmake= GMAKE
_TOOLS_VARNAME.grep= GREP
Index: mk/tools/replace.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/replace.mk,v
retrieving revision 1.303
diff -u -r1.303 replace.mk
--- mk/tools/replace.mk 12 Apr 2024 19:55:49 -0000 1.303
+++ mk/tools/replace.mk 2 Jul 2024 20:15:18 -0000
@@ -431,6 +431,16 @@
. endif
.endif
+.if !defined(TOOLS_IGNORE.git) && !empty(_USE_TOOLS:Mgit)
+. if ${PKGPATH} == devel/git-base
+MAKEFLAGS+= TOOLS_IGNORE.git=
+. elif !empty(_TOOLS_USE_PKGSRC.git:M[yY][eE][sS])
+TOOLS_DEPENDS.git?= git-base-[0-9]*:../../devel/git-base
+TOOLS_CREATE+= git
+TOOLS_PATH.git= ${TOOLBASE}/bin/git
+. endif
+.endif
+
.if !defined(TOOLS_IGNORE.gm4) && !empty(_USE_TOOLS:Mgm4)
. if ${PKGPATH} == devel/m4
MAKEFLAGS+= TOOLS_IGNORE.gm4=
Index: mk/tools/tools.Darwin.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/tools.Darwin.mk,v
retrieving revision 1.66
diff -u -r1.66 tools.Darwin.mk
--- mk/tools/tools.Darwin.mk 22 Mar 2024 18:59:04 -0000 1.66
+++ mk/tools/tools.Darwin.mk 2 Jul 2024 20:15:18 -0000
@@ -62,6 +62,9 @@
TOOLS_PLATFORM.gerep?= /usr/bin/egrep
TOOLS_PLATFORM.gfrep?= /usr/bin/fgrep
TOOLS_PLATFORM.ggrep?= /usr/bin/grep
+.if exists(/usr/bin/git)
+TOOLS_PLATFORM.git?= /usr/bin/git
+.endif
#
# Avoid using the native gnumake and gm4. On systems up to and including Big
# Sur, the version of GNU m4 is from 2006 and unable to build autoconf 2.70.
Index: mk/tools/tools.Linux.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/tools.Linux.mk,v
retrieving revision 1.69
diff -u -r1.69 tools.Linux.mk
--- mk/tools/tools.Linux.mk 9 May 2023 12:16:01 -0000 1.69
+++ mk/tools/tools.Linux.mk 2 Jul 2024 20:15:18 -0000
@@ -96,6 +96,9 @@
. if exists(${_path}/gettext)
TOOLS_PLATFORM.gettext?= ${_path}/gettext
. endif
+. if exists(${_path}/git)
+TOOLS_PLATFORM.git?= ${_path}/git
+. endif
. if exists(${_path}/m4)
TOOLS_PLATFORM.m4?= ${_path}/m4
. endif
diff --git a/mk/git-package.mk b/mk/git-package.mk
index efb8491445..b3d0bce803 100644
--- a/mk/git-package.mk
+++ b/mk/git-package.mk
@@ -85,7 +85,7 @@
#
# Keywords: git github
-TOOL_DEPENDS+= git-base>=1.6.4:../../devel/git-base
+USE_TOOLS+= git
# Defaults for package-settable variables
DISTFILES?= # empty
@@ -124,7 +124,7 @@ GIT_EXTRACTDIR.${repo}?= ${GIT_MODULE.${repo}}
USE_TOOLS+= date gzip pax
-_GIT_CMD= ${TOOLBASE}/bin/git
+_GIT_CMD= ${TOOLS_PATH.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