Skip to content

Commit

Permalink
Fixed GD support
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaba committed Nov 14, 2014
1 parent a543238 commit bd84ed3
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions bin/pmbp.pl
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ ($$$)

sub _quote_dq ($) {
my $s = shift;
no warnings 'uninitialized';
$s = '' unless defined $s;
$s =~ s/\"/\\\"/g;
return $s;
} # _quote_dq
Expand Down Expand Up @@ -1235,21 +1235,30 @@ ()
$CPANMWrapperCreated = 1;
} # install_cpanm_wrapper

sub install_makeinstaller ($$) {
my ($name, $makefilepl_args) = @_;
sub install_makeinstaller ($$;%) {
my ($name, $makefilepl_args, %args) = @_;
#return if -f "$MakeInstaller.$name";
info_writing 1, "makeinstaller.$name", "$MakeInstaller.$name";
mkdir_for_file "$MakeInstaller.$name";
open my $file, '>', "$MakeInstaller.$name"
or info_die "$0: $MakeInstaller.name: $!";
my $cmd1 = 'Makefile.PL';
my $cmd2 = 'make';
if ($args{module_build}) {
$cmd1 = 'Build.PL';
$cmd2 = './Build';
}
printf $file q{#!/bin/sh
(
export SHELL="%s"
echo perl Makefile.PL %s && perl Makefile.PL %s && \
echo make && make && \
echo make install && make install
echo perl %s %s && perl %s %s && \
echo %s && %s && \
echo %s install && %s install
) || echo "!!! MakeInstaller failed !!!"
}, _quote_dq $ENV{SHELL}, $makefilepl_args, $makefilepl_args;
}, _quote_dq $ENV{SHELL},
$cmd1, $makefilepl_args, $cmd1, $makefilepl_args,
$cmd2, $cmd2,
$cmd2, $cmd2;
close $file;
chmod 0755, "$MakeInstaller.$name";
} # install_makeinstaller
Expand Down Expand Up @@ -1402,7 +1411,10 @@ ($$)
if (@module_arg and $module_arg[0] eq 'GD' and
not $args->{info} and not $args->{scandeps}) {
## <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636649>
install_makeinstaller 'gd', q{CCFLAGS="$PMBP__CCFLAGS"};
install_makeinstaller 'gd', q{CCFLAGS="$PMBP__CCFLAGS"},
module_build => 1;
## Though it has both Makefile.PL and Build.PL, Makefile.PL does
## not make GD.so in some Debian environment.
my $ccflags = '-Wformat=0 ' . get_perl_config $perl_command, $perl_version, 'ccflags';
$envs->{PMBP__CCFLAGS} = $ccflags;
$envs->{SHELL} = "$MakeInstaller.gd";
Expand Down

0 comments on commit bd84ed3

Please sign in to comment.