Subject: | [PATCH] Cannot customize Makefile 'dist' section options |
Hello all,
I've tried, to no avail, to switch to bzip2 compression for my
distribution bundles. I have used Module::Install::MakeMaker for this,
adding the following lines at the end of my Makefile.PL:
WriteMakefile('dist' => { COMPRESS => "bzip2",
SUFFIX => ".bz2" });
Looking at the ExtUtils::MakeMaker documentation, this ought to work.
However, gzip and .gz files are still being used.
I debugged Makefile.PL and I think I've found the lines which overwrite
the 'dist' options. They start at line 176 of Module::Install::Makefile
(I'm using 0.75, which seems to be the latest version):
my $user_preop = delete $args{dist}->{PREOP};
if (my $preop = $self->admin->preop($user_preop)) {
$args{dist} = $preop;
}
Apparently, it always clobbers the custom 'dist' options, as even if the
user doesn't specify anything, a default value is used. Attached is a
patch which just copies over all the fields returned from the preop
extension, instead of overwriting all the dist options.
Keep up the good work!
Antonio
Subject: | patch.diff |
--- Makefile.pm.orig 2008-06-18 12:32:02.000000000 +0200
+++ Makefile.pm 2008-06-18 12:34:11.000000000 +0200
@@ -174,7 +174,7 @@
my $user_preop = delete $args{dist}->{PREOP};
if (my $preop = $self->admin->preop($user_preop)) {
- $args{dist} = $preop;
+ $args{dist}->{$_} = $preop->{$_} for keys %$preop;
}
my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);