perl-Alien-wxWidgets/perl-Alien-wxWidgets-SONAME.patch

28 lines
904 B
Diff
Raw Normal View History

2009-08-20 Stepan Kasal <skasal@redhat.com>
* inc/My/Build/Any_wx_config_Bakefile.pm: convert the lib*.so
file name to the canonical name (soname); the *.so symlink
usually belongs to package *-devel and may not be available at
runtime.
--- Alien-wxWidgets-0.42/inc/My/Build/Any_wx_config_Bakefile.pm.orig 2008-11-08 00:52:22.000000000 +0100
+++ Alien-wxWidgets-0.42/inc/My/Build/Any_wx_config_Bakefile.pm 2009-08-20 15:51:52.000000000 +0200
@@ -32,6 +32,17 @@
&& $lib =~ m/(?:gtk2?|mac)[ud]{0,2}-/;
my $dll = "lib${name}." . $self->awx_dlext;
+ open PIPE1, "ldconfig -p |";
+ while (<PIPE1>) {
+ if (s/^\s+${dll}\s(.*\s)?=>\s+//) {
+ for (`objdump -p $_`) {
+ if (s/^\s+SONAME\s+//) { chomp; $dll = $_; }
+ }
+ last;
+ }
+ }
+ close PIPE1;
+
$data{dlls}{$key} = { dll => $dll,
link => $lib };
}