RFC: Convert bconds to autoconf-like options.

Przemyslaw Iskra sparky at pld-linux.org
Wed Nov 18 17:49:37 CET 2009


On Wed, Nov 18, 2009 at 11:20:05AM -0500, Jeff Johnson wrote:
> Before you get into a litter of additional macros for
> bconds, please note that when originally implemented
> (by PLD, always first ;-) bcond's were intended as booleans.
> 
> When bconds were picked up by RPM using --with/--without popt aliases
> (that are essentially just --define wrappings to conventionally
> set macro strings), there was already an attempt to try to
> conventionalize the string values to be passed straight to
> ./configure.
> 
> So there is a previous attempt to do what you seem to be attempting now.
> 
> Whether the existing mapping is flexible enough (or not) is an entirely
> different issue than attempting a common conventional approach to
> setting build options through RPM.
> 
> Personally, I don't believe the existing macro infrastructure in RPM
> is robust enough to support full blown "build option" configuiration.
> 
> What should be done instead is to add additional macro primitives,
> with a reliably defined "registry", not yet more gunky and obscure lazy
> string expansions using the existing RPM macro implementation.
> 
> I can help with implementing macro primitives (and adding a "registry")
> if you wish. YAML would likely be a representation markup that
> isn't too painful, other approaches, using embedded lua symbol
> tables instead of the existing macro store (which is quite feeble imho).
> 
> But you can do whatever you please too ...

I only really care about %__enable_disable macro which replaces such
obscure PLD idiom:
	--%{?with_runtime:en}%{!?with_runtime:dis}able-runtime-cpudetection
with much more readable:
	%{__enable_disable runtime runtime-cpudetection}

All the other macros are to complete the implementation.


Your "registry" idea sounds very interesting, but PLD doesn't even have
standarized bcond names (not often, but they differ between spec files
sometimes). So implementing it would require a lot of effort from us.


-- 
 ____  Sparky{PI] -- Przemyslaw _  ___  _  _  ........... LANG...Pl..Ca..Es..En
/____) ___  ___  _ _ || Iskra  |  | _ \| |  | : WWW........ppcrcd.pld-linux.org
\____\| -_)'___| ||^'||//\\// <   |  _/| |  | : JID......sparky<at>jabberes.org
(____/||   (_-_|_||  ||\\ ||   |_ |_|  |_| _| : Mail....sparky<at>pld-linux.org


More information about the pld-devel-en mailing list