Alien-LibYAML

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    In your Build.PL:

     use Module::Build;
     use Alien::LibYAML;
     my $builder = Module::Build->new(
       ...
       configure_requires => {
         'Alien::LibYAML' => '0',
         ...
       },
       extra_compiler_flags => Alien::LibYAML->cflags,
       extra_linker_flags   => Alien::LibYAML->libs,
       ...
     );
     
     $build->create_build_script;

    In your Makefile.PL:

     use ExtUtils::MakeMaker;
     use Config;
     use Alien::LibYAML;
     
     WriteMakefile(
       ...
       CONFIGURE_REQUIRES => {
         'Alien::LibYAML' => '0',
       },
       CCFLAGS => Alien::LibYAML->cflags . " $Config{ccflags}",
       LIBS    => [ Alien::LibYAML->libs ],
       ...
     );

DESCRIPTION

    This distribution provides an alien wrapper for libyaml. It requires a
    C compiler. That's all!

SEE ALSO

alienfile  view on Meta::CPAN


  requires 'Path::Tiny' => '0.077';

  patch sub {
    my($build) = @_;

    my $pc = Path::Tiny->new('yaml-0.1.pc.in');
    if(-f $pc)
    {
      $pc->edit_lines(sub {
        s/^Cflags:\s*$/Cflags: -I\${includedir}\n/;
      });
    }
  };

  plugin 'Build::Autoconf' => ();

  ffi {

    build [
      '%{configure} --enable-shared --disable-static --libdir=%{.install.autoconf_prefix}/dynamic',
      '%{make}',
      '%{make} install',
    ];

  };

  meta->after_hook(
    gather_share => sub {
      my($build) = @_;
      $build->runtime_prop->{$_} .= ' -DYAML_DECLARE_STATIC ' for qw( cflags cflags_static );
    },
  );

};

sys {
  meta->after_hook(
    gather_system => sub {
      my($build) = @_;
      $build->runtime_prop->{ffi_checklib}->{system} = [ try_linker_script => 1 ];

dist.ini  view on Meta::CPAN

:version      = 2.26
travis_status = 1
release_tests = 1
irc           = irc://irc.perl.org/#native
github_user   = Perl5-Alien
test2_v0      = 1

diag_preamble = | $post_diag = sub {
diag_preamble = |   require Alien::LibYAML;
diag_preamble = |   diag "version        = ", Alien::LibYAML->version;
diag_preamble = |   diag "cflags         = ", Alien::LibYAML->cflags;
diag_preamble = |   diag "cflags_static  = ", Alien::LibYAML->cflags_static;
diag_preamble = |   diag "libs           = ", Alien::LibYAML->libs;
diag_preamble = |   diag "libs_static    = ", Alien::LibYAML->libs_static;
diag_preamble = |   diag "dynamic_libs   = $_" for Alien::LibYAML->dynamic_libs;
diag_preamble = | };


[AlienBuild]

[RemovePrereqs]
remove = strict

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

In your Build.PL:

 use Module::Build;
 use Alien::LibYAML;
 my $builder = Module::Build->new(
   ...
   configure_requires => {
     'Alien::LibYAML' => '0',
     ...
   },
   extra_compiler_flags => Alien::LibYAML->cflags,
   extra_linker_flags   => Alien::LibYAML->libs,
   ...
 );
 
 $build->create_build_script;

In your Makefile.PL:

 use ExtUtils::MakeMaker;
 use Config;
 use Alien::LibYAML;
 
 WriteMakefile(
   ...
   CONFIGURE_REQUIRES => {
     'Alien::LibYAML' => '0',
   },
   CCFLAGS => Alien::LibYAML->cflags . " $Config{ccflags}",
   LIBS    => [ Alien::LibYAML->libs ],
   ...
 );

=head1 DESCRIPTION

This distribution provides an alien wrapper for libyaml. It requires a C
compiler. That's all!

=head1 SEE ALSO

t/00_diag.t  view on Meta::CPAN

  Alien::Build::Plugin::Decode::Mojo
  ExtUtils::MakeMaker
  FFI::CheckLib
  Test2::V0
  Test::Alien
);

$post_diag = sub {
  require Alien::LibYAML;
  diag "version        = ", Alien::LibYAML->version;
  diag "cflags         = ", Alien::LibYAML->cflags;
  diag "cflags_static  = ", Alien::LibYAML->cflags_static;
  diag "libs           = ", Alien::LibYAML->libs;
  diag "libs_static    = ", Alien::LibYAML->libs_static;
  diag "dynamic_libs   = $_" for Alien::LibYAML->dynamic_libs;
};

my @modules = sort keys %modules;

sub spacer ()
{
  diag '';



( run in 5.331 seconds using v1.01-cache-2.11-cpan-94b05bcf43c )