Allow applying patches to vendored libraries.

This commit is contained in:
Sadie Powell 2023-02-21 17:17:50 +00:00
parent f94635cd71
commit 24cb560e9a

6
vendor/update vendored
View File

@ -55,6 +55,12 @@ while (my ($name, $info) = each %{$data}) {
chomp(my $tag = `git -C $unpackdir describe --abbrev=0 --tags HEAD 2>/dev/null`) unless $success;
$success ||= execute 'git', '-C', $unpackdir, 'checkout', $tag if $tag;
chomp($info->{version} = `git -C $unpackdir describe --always --tags HEAD 2>/dev/null`);
if (defined $info->{patches}) {
my $patches = catfile($unpackdir, $info->{patches});
for my $patch (glob $patches) {
$success |= execute 'git', '-C', $unpackdir, 'apply', $patch;
}
}
} elsif (defined $info->{tarball}) {
my $tarball = catfile $unpackdir, basename $info->{tarball};
$success ||= execute 'wget', '--output-document', $tarball, $info->{tarball};