Alien-MSYS2

 view release on metacpan or  search on metacpan

INSTALL  view on Meta::CPAN


Installing Alien-MSYS2 is straightforward.

## Installation with cpanm

If you have cpanm, you only need one line:

    % cpanm Alien::MSYS2

If you are installing into a system-wide directory, you may need to pass the
"-S" flag to cpanm, which uses sudo to install the module:

    % cpanm -S Alien::MSYS2

## Installing with the CPAN shell

Alternatively, if your CPAN shell is set up, you should just be able to do:

    % cpan Alien::MSYS2

## Manual installation

README  view on Meta::CPAN

    Returns the root of the MSYS2 install.

 bin_dir

     my @dir = Alien::MSYS2->bin_dir;

    Returns a list of directories that need to be added to the PATH in
    order for MSYS2 to operate. Note that if MSYS2 is already in the PATH,
    this will return an empty list.

 cflags

    provided for Alien::Base compatibility. Does not do anything useful.

 dynamic_libs

    provided for Alien::Base compatibility. Does not do anything useful.

 libs

    provided for Alien::Base compatibility. Does not do anything useful.

author.yml  view on Meta::CPAN

---
pod_spelling_system:
  skip: 0
  # list of words that are spelled correctly
  # (regardless of what spell check thinks)
  # or stuff that I like to spell incorrectly
  # intentionally
  stopwords:
    - MSYS
    - autogen
    - cflags
    - libs

pod_coverage:
  skip: 0
  # format is "Class#method" or "Class",regex allowed
  # for either Class or method.
  private: []

lib/Alien/MSYS2.pm  view on Meta::CPAN

    $cc =~ s{\\}{/}g if $cc;
    return $cc ? ($cc, $dir) : ($dir);
  }
  else
  {
    return ($dir);
  }
}


sub cflags { '' }
sub libs   { '' }
sub dynamic_libs { () }

1;

__END__

=pod

=encoding UTF-8

lib/Alien/MSYS2.pm  view on Meta::CPAN

Returns the root of the MSYS2 install.

=head2 bin_dir

 my @dir = Alien::MSYS2->bin_dir;

Returns a list of directories that need to be added to the C<PATH> in order for
C<MSYS2> to operate.  Note that if C<MSYS2> is I<already> in the C<PATH>, this
will return an I<empty> list.

=head2 cflags

provided for L<Alien::Base> compatibility.  Does not do anything useful.

=head2 dynamic_libs

provided for L<Alien::Base> compatibility.  Does not do anything useful.

=head2 libs

provided for L<Alien::Base> compatibility.  Does not do anything useful.

t/alien_msys2__build_static.t  view on Meta::CPAN

  ->success
  ->note
  ->out_like(qr{the answer to life the universe and everything is 42});

my $inc = File::Spec->catdir( $prefix, qw( include ) );
$inc =~ s{\\}{/}g;
my $lib  = File::Spec->catdir( $prefix, qw( lib    ) );
$lib =~ s{\\}{/}g;

my $alien = synthetic {
  cflags => "-I$inc",
  libs   => "-L$lib -ldontpanic",
};

alien_ok $alien;

xs_ok do { local $/; <DATA> }, with_subtest {
  plan 1;
  is Foo::answer(), 42;
};



( run in 0.323 second using v1.01-cache-2.11-cpan-94b05bcf43c )