On Mon, Jun 24, 2019 at 10:38:39PM -0400, Kurt Mosiejczuk wrote: > Almost every python port has a line similar to: > PKGNAME = py-${DISTNAME} > > Some have: > PKGNAME = ${DISTNAME:S/^python-/py-/} > > They are all very similar. Very boilerplate. > > So I looked at getting rid of some more boilerplate. This one is a bit > trickier. After a bit of investigation and iteration I came up with the > following: > > PKGNAME ?= py-${DISTNAME:L:C/^py(thon)?-?//:C/-py(thon)?[-_]/-/} ...
I'm not a fan of it. Too much magic. And reasonably difficult to read. That line, and the other one later.