Subject: | wrong assumption about library installation directory |
The Build.PL scripts assumes library installation directory on
non-windows platform can be computed from binary installation directory
by substituting 'lib' to 'bin'. However, this is wrong on biarch x86_64
platforms, which use 'lib64' for 64 bits libraries, and triggers runtime
failure:
https://qa.mandriva.com/show_bug.cgi?id=63052
A simple patch like the attached one is enough to workaround the issue,
but it is still an ugly hack. Using a dedicated packaging, such as the
previous standalone autotools-based btparse package, seems a much better
alternative for native C code.
Subject: | Text-BibTeX-0.53-fix-lib64.patch |
diff -Naur -x '*~' Text-BibTeX-0.53/Build.PL Text-BibTeX-0.53-fix-lib64/Build.PL
--- Text-BibTeX-0.53/Build.PL 2011-03-10 19:37:16.000000000 +0100
+++ Text-BibTeX-0.53-fix-lib64/Build.PL 2011-04-17 15:20:30.000000000 +0200
@@ -3,6 +3,7 @@
use lib 'inc';
use MyBuilder;
+use Config;
my $version = get_version();
@@ -55,7 +56,11 @@
if ($^O =~ /mswin32/i) {
$libdir = $ENV{WINDIR} || 'c:\\WINDOWS\\'; ## HACK HACK HACK
} else {
- $libdir =~ s/\bbin\b/lib/;
+ if ($Config{archname} =~ /^x86_64/) {
+ $libdir =~ s/\bbin\b/lib64/;
+ } else {
+ $libdir =~ s/\bbin\b/lib/;
+ }
}
$builder->notes('btparse_version' => $version);
$builder->notes('lib_path' => $libdir);