Lingua-Jspell

 view release on metacpan or  search on metacpan

inc/MyBuilder.pm  view on Meta::CPAN

        $self->install_path( 'usrlib' => $usrlib );
        warn "libjspell.so will install on $usrlib. Be sure to add it to your LIBRARY_PATH\n"
    }

    if ($^O ne "MSWin32") {
        # Create and prepare for installation the .pc file if not under windows.
        _interpolate('jspell.pc.in' => 'jspell.pc',
                     VERSION    => $self->notes('version'),
                     EXECPREFIX => $self->install_destination('bin'),
                     LIBDIR     => $self->install_destination('usrlib'));
        $self->copy_if_modified( from   => "jspell.pc",
                                 to_dir => catdir('blib','pcfile'),
                                 flatten => 1 );

        $self->copy_if_modified( from   => catfile('src','jslib.h'),
                                 to_dir => catdir('blib','incdir'),
                                 flatten => 1);
    }

    ## FIXME - usar o Module::Build para isto?
    for (qw.ujspell jspell-dict jspell-to jspell-installdic.) {

        $self->copy_if_modified( from   => catfile("scripts",$_),
                                 to_dir => catdir('blib','script'),
                                 flatten => 1 );
        $self->fix_shebang_line( catfile('blib','script',$_ ));
        $self->make_executable(  catfile('blib','script',$_ ));
    }
}

sub ACTION_fakeinstall {
    my $self = shift;
    $self->dispatch("pre_install");

inc/MyBuilder.pm  view on Meta::CPAN

    $self->config_data("jbuild" => catfile($self->config_data("bindir") => "jbuild$EXEEXT"));
    push @toinstall, $exe_file;
    $object   = catfile("src","jbuild.o");
    if (!$self->up_to_date($object, $exe_file)) {
        $libbuilder->link_executable(exe_file => $exe_file,
                                     objects  => [ $object ],
                                     extra_linker_flags => "-Lsrc -ljspell $extralinkerflags");
    }

    for my $file (@toinstall) {
        $self->copy_if_modified( from    => $file,
                                 to_dir  => "blib/bin",
                                 flatten => 1);
    }
}

sub ACTION_create_library {
    my $self = shift;
    my $cbuilder = $self->cbuilder;

    my $libbuilder = $self->notes('libbuilder');

inc/MyBuilder.pm  view on Meta::CPAN

        $libbuilder->link(module_name => 'libjspell',
                          extra_linker_flags => $extralinkerflags,
                          objects => \@objects,
                          lib_file => $libfile,
                         );
    }

    my $libdir = catdir($self->blib, 'usrlib');
    mkpath( $libdir, 0, 0777 ) unless -d $libdir;

    $self->copy_if_modified( from   => $libfile,
                             to_dir => $libdir,
                             flatten => 1 );
}

sub ACTION_test {
    my $self = shift;

    if ($^O =~ /mswin32/i) {
        my $oldpath = $ENV{PATH};
        $ENV{PATH} = catdir($self->blib, "usrlib").";$oldpath";



( run in 2.111 seconds using v1.01-cache-2.11-cpan-3fabe0161c3 )