tech-pkg archive

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

List PKGPATH in build-depends-list target



			Hi tech-pkg@,

while scripting around "make build-depends-list" in pkgsrc, I found the need to obtain $PKGPATH (e.g. pkgtools/pkg instead of pkg-1.10.99.7).

There is already support for alternative information with "make PACKAGE_NAME_TYPE=html build-depends-list". The patch attached implements the behaviour I'm looking for with "make PACKAGE_NAME_TYPE=path build-depends-list".

Is it something I could commit?

In practice the users of PACKAGE_NAME_TYPE=html could even be implemented with a combination of PACKAGE_NAME_TYPE=path and PACKAGE_NAME_TYPE=name instead; or "make build-depends-list" could always output:
${PKGPATH} ${PKGNAME}
and then all of the relevant information would be there in one call (this might break existing software and scripts though).

Let me know,
--
khorben
commit 96b277e6224c0ee4e400f0d6c6231cf8995f1f12
Author: Pierre Pronchery <khorben%EdgeBSD.org@localhost>
Date:   Mon Oct 26 11:57:47 2020 +0100

    Support PKGPATH with "make package-name"

diff --git a/mk/bsd.pkg.readme.mk b/mk/bsd.pkg.readme.mk
index d04d0d755cdf..66b3d2dac7cb 100644
--- a/mk/bsd.pkg.readme.mk
+++ b/mk/bsd.pkg.readme.mk
@@ -42,6 +42,8 @@ _HTML_PKGLINK=		<a href="../../${PKGPATH}/README.html">${PKGNAME}</a>
 package-name:
 .  if (${PACKAGE_NAME_TYPE} == "html")
 	@${ECHO} ${_HTML_PKGLINK:Q}
+.  elif (${PACKAGE_NAME_TYPE} == "path")
+	@${ECHO} ${PKGPATH}
 .  else
 	@${ECHO} ${PKGNAME}
 .  endif # PACKAGE_NAME_TYPE


Home | Main Index | Thread Index | Old Index