File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 79
79
]
80
80
81
81
if ruby_version =~ /^3/
82
- # swig 4.1 generated interface does not need patching
83
- unless platform . name =~ /^(debian-12|ubuntu-24|fedora-40)/
82
+ # swig 4.1 generated interface does not need patching, so skip
83
+ # when running debian >= 12, fedora >= 40, etc
84
+ unless ( platform . is_debian? && platform . os_version . to_i >= 12 ) ||
85
+ ( platform . is_fedora? && platform . os_version . to_i >= 40 ) ||
86
+ ( platform . is_ubuntu? && platform . os_version . to_i >= 24 )
84
87
steps << "#{ platform . patch } --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../selinuxswig_ruby_wrap.patch"
85
88
end
86
89
# EL 7 uses an older version of swig (2.0) so a different patch is needed to
90
93
else
91
94
# Ubuntu 24 & Fedora 40 use a newer swig that already has the fix that's
92
95
# being patched
93
- unless platform . name =~ /^(ubuntu-24|fedora-40)/
96
+ unless ( platform . is_fedora? && platform . os_version . to_i >= 40 ) ||
97
+ ( platform . is_ubuntu? && platform . os_version . to_i >= 24 )
94
98
steps << "#{ platform . patch } --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../selinuxswig_ruby_undefining_allocator.patch"
95
99
end
96
100
end
You can’t perform that action at this time.
0 commit comments