Piotr Caban : make_specfiles: Merge -arch options if there are multiple exports with the same name.
Alexandre Julliard
julliard at winehq.org
Mon Nov 29 16:26:52 CST 2021
Module: wine
Branch: master
Commit: 64534e9b5bc9b31c9efb55b45c9f1a3364b9d326
URL: https://source.winehq.org/git/wine.git/?a=commit;h=64534e9b5bc9b31c9efb55b45c9f1a3364b9d326
Author: Piotr Caban <piotr at codeweavers.com>
Date: Sun Nov 28 16:19:34 2021 +0100
make_specfiles: Merge -arch options if there are multiple exports with the same name.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/make_specfiles | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/tools/make_specfiles b/tools/make_specfiles
index 019f16d3f14..49a032ef14c 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -578,7 +578,24 @@ sub read_spec_file($)
next unless %descr;
my $func = $descr{name};
- next if defined $funcs{$func};
+ if (defined $funcs{$func})
+ {
+ my %update = %{$funcs{$func}};
+ next if $update{ordinal} ne $descr{ordinal} or $update{callconv} ne $descr{callconv} or $update{args} ne $descr{args};
+
+ my $arch = $1 if $update{flags} =~ /-arch=(\S+)/;
+ my $new_arch = $1 if $descr{flags} =~ /-arch=(\S+)/;
+ next if !defined $arch or !defined $new_arch;
+
+ if (($arch eq "win32" and $new_arch eq "win64") or ($arch eq "win64" and $new_arch eq "win32"))
+ {
+ $funcs{$func}{flags} =~ s/-arch=\S+\s+//;
+ next;
+ }
+
+ $funcs{$func}{flags} =~ s/-arch=$arch/-arch=$arch,$new_arch/;
+ next;
+ }
next if $func eq "@";
$funcs{$func} = \%descr;
}
More information about the wine-cvs
mailing list