tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Adding ninja to tools framework
I'd like to add ninja to mk/tools. This would allow systems to
supply their own version rather than pulling in the one from pkgsrc.
Additionally, it would open up the possibility to swap ninja out
for an alternative implementation such as samurai in the future.
Any objections?
Index: mk/tools/defaults.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/defaults.mk,v
retrieving revision 1.62
diff -u -r1.62 defaults.mk
--- mk/tools/defaults.mk 22 Aug 2018 20:48:37 -0000 1.62
+++ mk/tools/defaults.mk 15 Oct 2020 23:40:47 -0000
@@ -104,6 +104,7 @@
_TOOLS_VARNAME.mtree= MTREE
_TOOLS_VARNAME.mv= MV
_TOOLS_VARNAME.nice= NICE
+_TOOLS_VARNAME.ninja= NINJA
_TOOLS_VARNAME.nroff= NROFF
_TOOLS_VARNAME.openssl= OPENSSL
_TOOLS_VARNAME.7za= P7ZA
Index: mk/tools/replace.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/replace.mk,v
retrieving revision 1.291
diff -u -r1.291 replace.mk
--- mk/tools/replace.mk 6 Oct 2020 17:36:50 -0000 1.291
+++ mk/tools/replace.mk 15 Oct 2020 23:40:47 -0000
@@ -619,6 +619,16 @@
. endif
.endif
+.if !defined(TOOLS_IGNORE.ninja) && !empty(_USE_TOOLS:Mninja)
+. if !empty(PKGPATH:Mdevel/ninja-build)
+MAKEFLAGS+= TOOLS_IGNORE.ninja=
+. elif !empty(_TOOLS_USE_PKGSRC.ninja:M[yY][eE][sS])
+TOOLS_DEPENDS.ninja?= ninja-build-[0-9]*:../../devel/ninja-build
+TOOLS_CREATE+= ninja
+TOOLS_PATH.ninja= ${LOCALBASE}/bin/ninja
+. endif
+.endif
+
.if !defined(TOOLS_IGNORE.openssl) && !empty(_USE_TOOLS:Mopenssl)
#
# Ensure we use pkgsrc openssl if we're not using builtin.
Home |
Main Index |
Thread Index |
Old Index