X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debian%2FDebhelper%2FBuildsystem%2Fperl_build.pm;h=deb9a37933d4c0a911a103711bd6ca6a2048ac3a;hb=db7f72ff48072d3aafc1f6ffda9e3d8e477553d0;hp=b5ad96df75a678e5bc8ba68aa9d805d5e9312806;hpb=84f5388446ed30938f5df37f117543ad8b19e73d;p=debhelper.git diff --git a/Debian/Debhelper/Buildsystem/perl_build.pm b/Debian/Debhelper/Buildsystem/perl_build.pm index b5ad96d..deb9a37 100644 --- a/Debian/Debhelper/Buildsystem/perl_build.pm +++ b/Debian/Debhelper/Buildsystem/perl_build.pm @@ -1,4 +1,4 @@ -# A buildsystem plugin for handling Perl Build based projects. +# A build system class for handling Perl Build based projects. # # Copyright: © 2008-2009 Joey Hess # © 2008-2009 Modestas Vainius @@ -7,28 +7,26 @@ package Debian::Debhelper::Buildsystem::perl_build; use strict; -use Debian::Debhelper::Dh_Lib; -use base 'Debian::Debhelper::Dh_Buildsystem'; +use base 'Debian::Debhelper::Buildsystem'; sub DESCRIPTION { - "support for building Perl Build.PL based packages (in-source only)" + "Perl Module::Build (Build.PL)" } sub check_auto_buildable { - my ($this, $action) = @_; + my ($this, $step) = @_; # Handles everything - my $ret = -e "Build.PL"; - if ($action ne "configure") { - $ret &&= -e "Build"; + my $ret = -e $this->get_sourcepath("Build.PL"); + if ($step ne "configure") { + $ret &&= -e $this->get_sourcepath("Build"); } - return $ret; + return $ret ? 1 : 0; } sub do_perl { my $this=shift; - $ENV{MODULEBUILDRC} = "/dev/null"; - doit("perl", @_); + $this->doit_in_sourcedir("perl", @_); } sub new { @@ -62,7 +60,9 @@ sub install { sub clean { my $this=shift; - $this->do_perl("Build", "--allow_mb_mismatch", 1, "distclean", @_); + if (-e $this->get_sourcepath("Build")) { + $this->do_perl("Build", "--allow_mb_mismatch", 1, "distclean", @_); + } } -1; +1