tech-pkg archive

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

Re: PRINT_PLIST_AWK and pyversion.mk



On Mon, Jul 15, 2024 at 05:33:59PM +0200, Hauke Fath (SPG) wrote:
> Hi,
> 
> while creating PRINT_PLIST_AWK patterns for a package, I found that a
> corresponding path will not be substituted with ${PYSITELIB} if the PLIST
> entry has already been prefixed with ${PLIST.whatever}.
> 
> Looking at lang/python/pyversion.mk, this is because the match anchors to
> the beginning or the line, unlike the regexp that gsub() uses.
> 
> PRINT_PLIST_AWK+=       /^${PYSITELIB:S|/|\\/|g}/ \
>           { gsub(/${PYSITELIB:S|/|\\/|g}/, "$${PYSITELIB}") }
> 
> Is this intended, and what is the idea?
> 
> My workaround is to run the above gsub() in the package Makefile's
> PRINT_PLIST_AWK, but maybe this should be fixed globally.

I think allowing ${foo} before that should be fine.

With foo/bar/ before that - not sure if we want to regex PYSITELIB in
then. On the other hand, I don't think it will happen often or at all,
${PYSITELIB} is quite an uncommon path anyway.
 Thomas


Home | Main Index | Thread Index | Old Index