Skip to content

Commit 91d034f

Browse files
Support %bcond of rpm 4.17.1
build#971
1 parent 63b7ae2 commit 91d034f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Build/Rpm.pm

+3-2
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,11 @@ sub builtinmacro {
330330
$args[0] =~ s/ $//;
331331
return $args[0];
332332
}
333-
if ($macname eq 'bcond_with') {
333+
if ($macname eq 'bcond_with' || ($macname eq 'bcond' && !$args[1])) {
334334
$macros->{"with_$args[0]"} = 1 if exists $macros->{"_with_$args[0]"};
335335
return '';
336336
}
337-
if ($macname eq 'bcond_without') {
337+
if ($macname eq 'bcond_without' || ($macname eq 'bcond' && $args[1])) {
338338
$macros->{"with_$args[0]"} = 1 unless exists $macros->{"_without_$args[0]"};
339339
return '';
340340
}
@@ -404,6 +404,7 @@ my %builtin_macros = (
404404
'undefined' => \&builtinmacro,
405405
'with' => \&builtinmacro,
406406
'without' => \&builtinmacro,
407+
'bcond' => \&builtinmacro,
407408
'bcond_with' => \&builtinmacro,
408409
'bcond_without' => \&builtinmacro,
409410
'expr' => \&builtinmacro,

0 commit comments

Comments
 (0)