freebsd-ports/Mk
Fernando Apesteguía 3d9f300e01 Mk/bsd.port.{subdir}.mk: create describe-json
Summary:
Create "describe-json" target to get a JSON-compliant representation of the
ports tree.

It can be invoked from a single port directory, a category directory or from the
ports tree top directory.

It supports FLAVORS. E.g. It is possible to execute the following:

cd math/qalculate-qt && make describe-json-qt6

Performance-wise it is equivalent to a simple "make describe" although it
offers a more complete vision of the port in an easily parseable format.

Times for describe:
     1345.39 real       933.06 user       403.01 sys
     1317.00 real       929.22 user       406.43 sys
     1316.83 real       930.82 user       404.70 sys
     1316.75 real       928.05 user       407.39 sys
     1316.58 real       930.69 user       404.59 sys
Times for describe-json:
     1320.38 real       924.80 user       414.48 sys
     1320.66 real       926.14 user       413.41 sys
     1320.41 real       924.08 user       415.30 sys
     1320.37 real       922.96 user       416.35 sys
     1320.25 real       924.25 user       414.95 sys

Some examples assuming the output is saved in the `describe.json` file.

Show all ports in the "accessibility" category:

jq '.accessibility' describe.json

Show ports in the "accessibility" category with a USES=iconv dependency:

jq '.accessibility.[] | select(.uses | index("iconv")) | .pkgorigin' describe.json

Show ports in the tree that Uses=kmod:

jq '.[].[] | select(.uses | index("kmod")) | .pkgorigin' describe.json

Show ports having a LIB_DEPENDS on devel/binutils:

jq '.[].[] | select(.lib_depends | map(test("devel/binutils")) | any) | .pkgorigin' describe.json

Show ports in the "database" category which have no maintainer and are marked as
deprecated:

jq '.databases.[] | select(.maintainer=="ports@FreeBSD.org" and .deprecated!=" ") | .pkgorigin, .deprecated' describe.json

Approved by:		portmgr (bapt@)
Differential Revision:	https://reviews.freebsd.org/D42131
2023-10-18 13:16:36 +02:00
..
Features Mk/Features/lto.mk: allow LTO on powerpc64 2023-08-10 22:02:29 +02:00
Scripts dialog: force UTF-8 locale 2023-10-11 09:56:27 +02:00
Uses PyQt6: Update to latest versions 2023-10-16 19:57:46 -04:00
Wrappers
bsd.ccache.mk Mk/bsd.ccache.mk: Add CCACHE_ENABLED variable for ports' convenience 2022-09-12 00:47:54 -07:00
bsd.commands.mk config: switch from dialog4ports to portconfig 2023-10-10 13:58:31 +02:00
bsd.default-versions.mk Mk/bsd.default-versions.mk: Update the default Perl version to 5.36. 2023-10-17 20:38:40 -07:00
bsd.destdir.mk
bsd.gcc.mk Mk/bsd.gcc.mk: Simplify logic, only dealing with ports 2023-09-16 13:03:28 +00:00
bsd.gecko.mk www/firefox: update to 119.0 (rc1) 2023-10-17 12:32:12 +02:00
bsd.java.mk */*: Refactor java/openjdk7 removal 2023-04-04 13:10:53 -05:00
bsd.licenses.db.mk
bsd.licenses.mk dialog: force UTF-8 locale 2023-10-11 09:56:27 +02:00
bsd.local.mk Mk/bsd.local.mk: Remove accidental addition from previous commit 2023-07-11 11:34:51 -05:00
bsd.ocaml.mk
bsd.options.desc.mk Mk/bsd.options.desc.mk: Add NOASLR 2023-10-07 13:00:34 +02:00
bsd.options.mk bsd.sites.mk: Support tag names with USE_GITLAB 2023-07-12 20:55:08 +02:00
bsd.port.mk Mk/bsd.port.{subdir}.mk: create describe-json 2023-10-18 13:16:36 +02:00
bsd.port.options.mk
bsd.port.post.mk
bsd.port.pre.mk
bsd.port.subdir.mk Mk/bsd.port.{subdir}.mk: create describe-json 2023-10-18 13:16:36 +02:00
bsd.sanity.mk Mk/**ldap.mk: Convert USE_LDAP to USES=ldap 2023-02-08 04:53:56 -06:00
bsd.sites.mk Mk/bsd.sites.mk: Update APACHE site list 2023-09-24 23:03:10 +02:00
bsd.wx.mk *: Rename GTK+ to GTK 2023-08-26 21:03:32 +00:00