I'm looking for a way to generate pkgconfig() style deps for the mingw32 packages in Fedora,
without duplicating the whole pkgconfigdeps.sh. To do that, I'd like a way to override pkgconfig
executable name and the pkgconfig() provide name in pkgconfigdeps.sh.
The attached patch makes pkgconfigdeps.sh honour $pkgconfig and $providename env variables. With this in place, I could install a mingw32-pkgconfigdeps.sh wrapper which just overrides the two variables and invokes pkgconfigdeps.sh.
Some bits from a relevant IRC discussion:
11:07 < Panu> there's actually some rpm-side support for this too in rpm development tree (which allows fileattrs to specify their own foo() namespace)
11:07 < Panu> what's lacking is support in the actual generator scripts, so your pkgconfig bit comes in perfect time :)
11:07 < kalev> oh, interesting
11:10 < kalev> if you think the env variable style overriding is crude, another way to do overrides would be adding some new options to the generator scripts, something like "pkgconfigdeps.sh --pkgconfig-executable=/usr/bin/i686-pc-mingw32-pkgconfig --providename='mingw32-pkgconfig'"
11:10 < kalev> not sure what would work better with the new foo() namespace code that's in the rpm development tree
11:13 < Panu> it probably doesn't matter a whole lot what exact mechanism each depgen script uses, although it would of course be nice if they all used the same (be it switch or environment)