Conditional build in package is often defined using
%define build_foo 0
%{?_with_foo: %{expand: %define build_foo 1}}
this way, to allow condition foo, you can either edit the spec file and change
its value to 1, or use --with foo on command line when building the package.
However, it seems rpm 4.2 has a bug processing ?_with directive, or at least
changed behaviour since latest version. It is now only local to current rpm
section.
Try for instance freetype2 package.
If you build it normally, you got a -mdk package with no bytecode interpreter.
If you build it with --with plf, release tag is changed to -plf, meaning
build_plf is evaluated to true in tag section, but the perl substitution in
%prep section is not triggered, meaning build_plf is evaluated to false in
this section.
Now move the %{?_with_plf: %{expand: %define build_plf 1}} from tag section to
%prep section, and build with --with plf, you'll get a -mdk release tag and
bytecode interpreter enabled, meaning build_plf is false in tag section and
true in %prep section.
Now if you just edit the spec file to define build_plf to 1 directly,
everything is fine
So my point is ?_with directive doesn't work anymore as before.
--
Guillaume Rousse
If the vending machine actually has what you want, it will cost more than the
amount of change that you have
-- Murphy's Laws on Vending Machines n�3