Alien-ROOT

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

#!/usr/bin/perl
use 5.008;
use strict;
use warnings;
use inc::latest 'Module::Build';

use lib 'inc';
use Alien::ROOT::Builder;

use Env '@PATH';

use Getopt::Long qw/GetOptions/;
Getopt::Long::Configure('pass_through', 'permute', 'no_require_order');

our $USER_CONFIG = {
  archive             => 'root_v5.34.36.source.tar.gz',
  parallel_processes  => 1,

Build.PL  view on Meta::CPAN

);

my $build_data = {%$USER_CONFIG};

$build_data->{url} = 'https://root.cern.ch/download/' . $build_data->{archive};
$build_data->{directory} = 'root'; # this is pretty retarded :(

$builder->notes('build_data' => $build_data);

# Use Alien::ROOT to see if it's already installed
use lib 'lib';
use Alien::ROOT;

my $aroot = Alien::ROOT->new();
$builder->notes(build_ROOT => 0);

if (not $aroot->installed or $USER_CONFIG->{force_recompile}) {
  if ($ENV{AUTOMATED_TESTING}) {
    exit(0); # Do not create pain for CPAN testers...
  }

Makefile.PL  view on Meta::CPAN

      # Save this 'cause CPAN will chdir all over the place.
      my $cwd = Cwd::cwd();

      CPAN::Shell->install('Module::Build::Compat');
      CPAN::Shell->expand("Module", "Module::Build::Compat")->uptodate
	or die "Couldn't install Module::Build, giving up.\n";

      chdir $cwd or die "Cannot chdir() back to $cwd: $!";
    }
    eval "use Module::Build::Compat 0.02; 1" or die $@;
    use lib 'inc';
    Module::Build::Compat->run_build_pl(args => \@ARGV);
    my $build_script = 'Build';
    $build_script .= '.com' if $^O eq 'VMS';
    exit(0) unless(-e $build_script); # cpantesters convention
    require Alien::ROOT::Builder;
    Module::Build::Compat->write_makefile(build_class => 'Alien::ROOT::Builder');

inc/inc_Module-Build/Module/Build/Authoring.pod  view on Meta::CPAN

=head1 SUBCLASSING

Right now, there are two ways to subclass Module::Build.  The first
way is to create a regular module (in a C<.pm> file) that inherits
from Module::Build, and use that module's class instead of using
Module::Build directly:

  ------ in Build.PL: ----------
  #!/usr/bin/perl

  use lib q(/nonstandard/library/path);
  use My::Builder;  # Or whatever you want to call it

  my $build = My::Builder->new
    (
     module_name => 'Foo::Bar',  # All the regular args...
     license     => 'perl',
     dist_author => 'A N Other <me@here.net.au>',
     requires    => { Carp => 0 }
    );
  $build->create_build_script;

inc/inc_Module-Build/Module/Build/Base.pm  view on Meta::CPAN

sub is_executable {
  # We assume this does the right thing on generic platforms, though
  # we do some other more specific stuff on Unixish platforms.
  my ($self, $file) = @_;
  return -x $file;
}

sub _startperl { shift()->config('startperl') }

# Return any directories in @INC which are not in the default @INC for
# this perl.  For example, stuff passed in with -I or loaded with "use lib".
sub _added_to_INC {
  my $self = shift;

  my %seen;
  $seen{$_}++ foreach $self->_default_INC;
  return grep !$seen{$_}++, @INC;
}

# Determine the default @INC for this Perl
{

inc/inc_Module-Build/Module/Build/Compat.pm  view on Meta::CPAN

  my $subclass_load = '';
  if (ref($build) ne "Module::Build") {
    my $subclass_dir = $package->subclass_dir($build);

    if (File::Spec->file_name_is_absolute($subclass_dir)) {
      my $base_dir = $build->base_dir;

      if ($build->dir_contains($base_dir, $subclass_dir)) {
	$subclass_dir = File::Spec->abs2rel($subclass_dir, $base_dir);
	$subclass_dir = $package->unixify_dir($subclass_dir);
        $subclass_load = "use lib '$subclass_dir';";
      }
      # Otherwise, leave it the empty string

    } else {
      $subclass_dir = $package->unixify_dir($subclass_dir);
      $subclass_load = "use lib '$subclass_dir';";
    }
  }

  if ($type eq 'small') {
    printf {$fh} <<'EOF', $subclass_load, ref($build), ref($build);
    use Module::Build::Compat 0.02;
    %s
    Module::Build::Compat->run_build_pl(args => \@ARGV);
    require %s;
    Module::Build::Compat->write_makefile(build_class => '%s');



( run in 0.401 second using v1.01-cache-2.11-cpan-87723dcf8b7 )