Subject: | [PATCH] [Mozilla-DOM-0.18] Add support to detect package named "mozilla-firefox-xpcom" |
Hi,
with Mozilla-DOM-0.18,
when running "perl Makefile.PL",
it fails to detect the Mozilla Firefox xpcom package,
because on my linux distro, Mandriva LE2005 (formerly Mandrakelinux),
the package is not named "firefox-xpcom" but "mozilla-firefox-xpcom".
The attached patch solves the problem,
and slightly modifies the way the package named is found.
OS version an perl -v follows
many thanks
regards, José
$ uname -r
2.6.11-12mdk
$ perl -v
This is perl, v5.8.7 built for i686-linux
Copyright 1987-2005, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
--- Makefile.PL.orig 2005-09-27 14:43:55.000000000 -0300
+++ Makefile.PL 2005-09-27 15:48:34.000000000 -0300
@@ -12,12 +12,14 @@
my $mozpkg = 'mozilla-xpcom';
my $ffpkg = 'firefox-xpcom';
+my $mffpkg = 'mozilla-firefox-xpcom';
our %build_reqs = (
'perl-ExtUtils-Depends' => '0.205',
'perl-ExtUtils-PkgConfig' => '1.07',
$mozpkg => '1.7',
$ffpkg => '1.0',
+ $mffpkg => '1.0',
);
unless (eval "use ExtUtils::Depends '$build_reqs{'perl-ExtUtils-Depends'}';"
@@ -35,8 +37,10 @@
}
my %pkgcfg = ExtUtils::PkgConfig->find("$mozpkg >= " . $build_reqs{$mozpkg},
- "$ffpkg >= " . $build_reqs{$ffpkg});
-my $pkg = $pkgcfg{pkg} =~ /mozilla/ ? $mozpkg : $ffpkg;
+ "$ffpkg >= " . $build_reqs{$ffpkg},
+ "$mffpkg >= " . $build_reqs{$mffpkg});
+
+my( $pkg ) = $pkgcfg{pkg} =~ /^(\S+-xpcom)/;
mkdir 'build', 0777;