Result:
found more than 398 distributions - search limited to the first 2001 files matching your query ( run in 0.678 )


Alien-Gimp

 view release on metacpan or  search on metacpan

common.pl  view on Meta::CPAN

  \%cfg;
}

sub ag_getbuild {
  +{
    cflags => $gimpcfg{cflags},
    pluginlibs => $pluginlibs,
  };
}

sub ag_getversion {

 view all matches for this distribution


Alien-Google-GRPC

 view release on metacpan or  search on metacpan

lib/Alien/Google/GRPC.pm  view on Meta::CPAN

   ...
   configure_requires => {
     'Alien::Google::GRPC' => '0',
     ...
   },
   extra_compiler_flags => Alien::Google::GRPC->cflags,
   extra_linker_flags   => Alien::Google::GRPC->libs,
   ...
 );
 
 $build->create_build_script;

lib/Alien/Google/GRPC.pm  view on Meta::CPAN

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

In your script or module:

 view all matches for this distribution


Alien-Graphene

 view release on metacpan or  search on metacpan

t/version.t  view on Meta::CPAN

use Test::Alien;
use Alien::Graphene;

use lib 't/lib';

subtest "Check flags" => sub {
	alien_ok 'Alien::Graphene';

	my $xs = do { local $/; <DATA> };
	xs_ok $xs, with_subtest {
		my($module) = @_;

 view all matches for this distribution


Alien-GvaScript

 view release on metacpan or  search on metacpan

doc/html/Form.html  view on Meta::CPAN

    <div class="TN_content">
      <pre>  GvaScript.Form.remove(repeat_block[, live_update]);</pre>

<p>Removes a repetition block from the DOM. The argument is either
a DOM element or a string containing the element id.</p>
<p>param <code>Boolean</code> live_update: flag to indicate whether the 'remaining'
repeatable sections are to be also removed from DOM, recreated by re-merging
the data with repeat template, then finally re-appended to the DOM.
Default true.</p>
<p>All repetition blocks above the removed block are renumbered,
leaving no hole in the index sequence. To do so, these

 view all matches for this distribution


Alien-HDF4

 view release on metacpan or  search on metacpan

common.pl  view on Meta::CPAN

    my ($libpath, $libs) = findlibs();
    my ($incpath) = findinc();
    my $defs = finddefs();
    my ($szlibs) = findsz();
    {
        cflags => qq{$defs "-I$incpath"},
        libs => qq{"-L$libpath" $libs -ljpeg -lz $szlibs},
    }
}

1;

 view all matches for this distribution


Alien-Hunspell

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

  plugin 'Extract' => 'tar.gz';
  plugin 'Build::Autoconf' => (
    ffi => 1,
  );

  my @acflags;
  unshift @acflags, '--disable-nls' if $^O =~ /^(?:MSWin32|darwin|freebsd)/;

  build [
    "%{configure} --disable-shared --enable-static @acflags",
    '%{make}',
    '%{make} install',
  ];

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

 view all matches for this distribution


Alien-IUP

 view release on metacpan or  search on metacpan

inc/My/Builder.pm  view on Meta::CPAN

  my $self = shift;

  if ( ! -e 'build_done' ) {
    my $inst = $self->notes('already_installed_lib');
    if (defined $inst) {
      $self->config_data('config', { LIBS   => $inst->{lflags},
                                     INC    => $inst->{cflags},
                                   });
    }
    else {
      # some questions before we start
      my $dbg = !$ENV{TRAVIS} ? $self->prompt("\nDo you want to see debug info + all messages during 'make' (y/n)?", 'n') : 'n';

inc/My/Builder.pm  view on Meta::CPAN

          $self->apply_patch("$build_src/cd", $_)  foreach (@{$self->notes('cd_patches')});
        }
      }

      $unpack = (-d "$build_src/zlib") && !$ENV{TRAVIS} ? $self->prompt("\nDir '$build_src/zlib'  exists, wanna replace with clean sources?", "n") : 'y';
      if ($self->notes('zlib_url') && !$self->config_data('syszlib_lflags') && lc($unpack) eq 'y') {
        File::Path::rmtree("$build_src/zlib") if -d "$build_src/zlib";
        $self->prepare_sources($self->notes('zlib_url'), $self->notes('zlib_sha1'), $download, $build_src);
        if ($self->notes('zlib_patches')) {
          $self->apply_patch("$build_src/zlib", $_)  foreach (@{$self->notes('zlib_patches')});
        }
      }

      $unpack = (-d "$build_src/freetype") && !$ENV{TRAVIS} ? $self->prompt("\nDir '$build_src/freetype'  exists, wanna replace with clean sources?", "n") : 'y';
      if ($self->notes('freetype_url') && !$self->config_data('sysfreetype_lflags') && lc($unpack) eq 'y') {
        File::Path::rmtree("$build_src/freetype") if -d "$build_src/freetype";
        $self->prepare_sources($self->notes('freetype_url'), $self->notes('freetype_sha1'), $download, $build_src);
        if ($self->notes('freetype_patches')) {
          $self->apply_patch("$build_src/freetype", $_)  foreach (@{$self->notes('freetype_patches')});
        }

inc/My/Builder.pm  view on Meta::CPAN

      # store info about build to ConfigData
      $self->config_data('share_subdir', $share_subdir);
      $self->config_data('config', { PREFIX => '@PrEfIx@',
                                     LIBS   => '-L' . $self->quote_literal('@PrEfIx@/lib') .
                                               ' -l' . join(' -l', @{$self->config_data('linker_libs')}) .
                                               ' ' . $self->config_data('extra_lflags'),
                                     INC    => '-I' . $self->quote_literal('@PrEfIx@/include') .
                                               ' ' . $self->config_data('extra_cflags'),
                                   });
    }
    # mark sucessfully finished build
    $self->touchfile('build_done');
  }

inc/My/Builder.pm  view on Meta::CPAN

  push(@candidates, { L => '/usr/local/lib', I => '/usr/local/include' }) if -d '/usr/local/lib' && -d '/usr/local/include';
  push(@candidates, { L => '/usr/lib', I => '/usr/include' }) if -d '/usr/lib' && -d '/usr/include';

  print STDERR "Checking iup+im+cd already installed on your system ...\n";
  foreach my $i (@candidates) {
    my $lflags = $i->{L} ? '-L'.$self->quote_literal($i->{L}) : '';
    my $cflags = $i->{I} ? '-I'.$self->quote_literal($i->{I}) : '';
    #xxx does not work with MSVC compiler
    #xxx $lflags = ExtUtils::Liblist->ext($lflags) if($Config{make} =~ /nmake/ && $Config{cc} =~ /cl/); # MSVC compiler hack
    print STDERR "- testing: $cflags $lflags\n";
    my $rv1 = $self->check_header( [ 'iup.h', 'im.h', 'cd.h' ], $cflags);
    #xxx maybe we need to link with more libs
    if ($self->check_lib( [ 'iup', 'im', 'cd' ], $cflags, $lflags)){
      print STDERR "- iup+im+cd FOUND!\n";
      $self->notes('already_installed_lib', { lflags => "$lflags -liup -lim -lcd", cflags => $cflags } );
      return 1;
    }
    elsif ($self->check_lib( [ 'iupwin', 'im', 'cdwin' ], $cflags, $lflags)) {
      print STDERR "- iupwin+im+cdwin FOUND!\n";
      $self->notes('already_installed_lib', { lflags => "$lflags -liupwin -lim -lcdwin", cflags => $cflags } );
      return 1;
    }
    elsif ($self->check_lib( [ 'iupgtk', 'im', 'cdgdk' ], $cflags, $lflags)) {
      print STDERR "- iupgtk+im+cdgdk FOUND!\n";
      $self->notes('already_installed_lib', { lflags => "$lflags -liupgtk -lim -lcdgdk", cflags => $cflags } );
      return 1;
    }
    elsif ($self->check_lib( [ 'iupmot', 'im', 'cdx11' ], $cflags, $lflags)) {
      print STDERR "- iupmot+im+cdx11 FOUND!\n";
      $self->notes('already_installed_lib', { lflags => "$lflags -liupmot -lim -lcdx11", cflags => $cflags } );
      return 1;
    }
  }
  print STDERR "- iup+im+cd not found (we have to build it from sources)!\n";
  return 0;
}

# check presence of header(s) specified as params
sub check_header {
  my ($self, $h, $cflags) = @_;
  $cflags ||= '';
  my @header = ref($h) ? @$h : ( $h );

  my ($fs, $src) = tempfile('tmpfileXXXXXX', SUFFIX => '.c', UNLINK => 1);
  my ($fo, $obj) = tempfile('tmpfileXXXXXX', SUFFIX => '.o', UNLINK => 1);
  my $inc = '';

inc/My/Builder.pm  view on Meta::CPAN

MARKER
  close($fs);
  $src = $self->quote_literal($src);
  $obj = $self->quote_literal($obj);
  #Note: $Config{cc} might contain e.g. 'ccache cc' (FreeBSD 8.0)
  my $rv = run3("$Config{cc} -c -o $obj $src $cflags", \undef, \undef, \undef, { return_if_system_error => 1 } );
  return ($rv == 1 && $? == 0) ? 1 : 0;
}

# check presence of lib(s) specified as params
sub check_lib {
  my ($self, $l, $cflags, $lflags) = @_;
  $cflags ||= '';
  $lflags ||= '';
  $cflags =~ s/[\r\n]//g;
  $lflags =~ s/[\r\n]//g;
  my @libs = ref($l) ? @$l : ( $l );
  my $liblist = scalar(@libs) ? '-l' . join(' -l', @libs) : '';

  my ($fs, $src) = tempfile('tmpfileXXXXXX', SUFFIX => '.c', UNLINK => 1);
  my ($fo, $obj) = tempfile('tmpfileXXXXXX', SUFFIX => '.o', UNLINK => 1);

inc/My/Builder.pm  view on Meta::CPAN

  $src = $self->quote_literal($src);
  $obj = $self->quote_literal($obj);
  $exe = $self->quote_literal($exe);
  my $output;
  #Note: $Config{cc} might contain e.g. 'ccache cc' (FreeBSD 8.0)
  my $rv1 = run3("$Config{cc} -c -o $obj $src $cflags", \undef, \$output, \$output, { return_if_system_error => 1 } );
  unless ($rv1 == 1 && $? == 0) {
    #print STDERR "OUTPUT(compile):\n$output\n" if $output;
    return 0
  }
  my $rv2 = run3("$Config{ld} $obj -o $exe $lflags $liblist", \undef, \$output, \$output, { return_if_system_error => 1 } );
  unless ($rv2 == 1 && $? == 0) {
    #print STDERR "OUTPUT(link):\n$output\n" if $output;
    return 0
  }
  return 1;

inc/My/Builder.pm  view on Meta::CPAN

sub pkg_config {
  my ($self, $pkc, $nul) = @_;
  if ($nul && $pkc && `$pkc --version 2>$nul`) {
    warn "Checking system libraries zlib, freetype2\n";
    (my $syszlib_ver        = `$pkc zlib --modversion 2>$nul`     ) =~ s/\s*$//;
    (my $syszlib_lflags     = `$pkc zlib --libs 2>$nul`           ) =~ s/\s*$//;
    (my $syszlib_cflags     = `$pkc zlib --cflags 2>$nul`         ) =~ s/\s*$//;
    (my $sysfreetype_ver    = `$pkc freetype2 --modversion 2>$nul`) =~ s/\s*$//;
    (my $sysfreetype_lflags = `$pkc freetype2 --libs 2>$nul`      ) =~ s/\s*$//;
    (my $sysfreetype_cflags = `$pkc freetype2 --cflags 2>$nul`    ) =~ s/\s*$//;
    $self->config_data('syszlib_ver',        $syszlib_ver       );
    $self->config_data('syszlib_lflags',     $syszlib_lflags    );
    $self->config_data('syszlib_cflags',     $syszlib_cflags    );
    $self->config_data('sysfreetype_ver',    $sysfreetype_ver   );
    $self->config_data('sysfreetype_lflags', $sysfreetype_lflags);
    $self->config_data('sysfreetype_cflags', $sysfreetype_cflags);
    warn "FOUND: zlib-$syszlib_ver LF=$syszlib_lflags\n"             if $syszlib_lflags;
    warn "FOUND: freetype-$sysfreetype_ver LF=$sysfreetype_lflags\n" if $sysfreetype_lflags;
  }
};

1;

 view all matches for this distribution


Alien-Iconv

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN


# Absolut-ize all paths
$ICONV_SOURCE_DIR    = File::Spec->rel2abs($ICONV_SOURCE_DIR);
$ICONV_SOURCE        = File::Spec->rel2abs($ICONV_SOURCE);

# Construct the necessary flags
my $CCFLAGS = $ENV{CCFLAGS};
my $LDFLAGS = $ENV{LDFLAGS};
if (! $RUNNING_IN_HELL) {
    $CCFLAGS ||= '-I/usr/local/include';
    $LDFLAGS ||= '-L/usr/local/lib';

 view all matches for this distribution


Alien-JPCRE2

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

our $VERSION = 0.014_000;

use English qw(-no_match_vars);  # for $OSNAME

# DEV NOTE: Windows OS, required macro to avoid build errors
my $configure_cxxflags = '';
if ($OSNAME eq 'MSWin32') {
    $configure_cxxflags = 'CXXFLAGS="%CXXFLAGS% -DPCRE2_STATIC"';
}
#print {*STDERR} "\n\n", q{<<< DEBUG >>> in alienfile, have $configure_cxxflags = '}, $configure_cxxflags, q{'}, "\n\n";

plugin 'Probe::CBuilder' => (
  aliens => [ 'Alien::PCRE2' ],
  program => "#include <jpcre2.hpp>\nint main() { return 0; }\n",
  lang => 'C++',

alienfile  view on Meta::CPAN

        aliens => [ 'Alien::PCRE2' ],
        public_I => 1,
        public_l => 1,
    );
    build [
#        '%{configure} --enable-cpp11 --enable-test ' . $configure_cxxflags,  # DEV NOTE: disable C++11 features to support older compilers
        '%{configure} --disable-cpp11 --enable-test ' . $configure_cxxflags,
        '%{gmake}',
        '%{gmake} check',
        '%{gmake} install',
    ];
};

 view all matches for this distribution


Alien-Jerl

 view release on metacpan or  search on metacpan

t/01_hasJVM.t  view on Meta::CPAN

  $errorMessage = $javaVersion;

  $diagMessage .=  "\nJVM is returning an Error when querying version information ...  stopping tests.\n";
  $diagMessage .=  "!!!!!!!!!!  Error Message !!!!!!!: = $errorMessage\n";

  # flag as missing/not runnable
  $javaVersion = 'missing';
}


SKIP: { 

 view all matches for this distribution


Alien-Judy

 view release on metacpan or  search on metacpan

inc/My/Judy/Builder.pm  view on Meta::CPAN

                          both]
  --with-tags[=TAGS]      include additional configurations [automatic]

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CXXCPP      C++ preprocessor
  F77         Fortran 77 compiler command
  FFLAGS      Fortran 77 compiler flags

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to <dougbaskins@yahoo.com>.

 view all matches for this distribution


Alien-KentSrc

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

  meta->after_hook(
    gather_share => sub {
      my ($build) = @_;
      $build->runtime_prop->{version} =
        join '.', split //, $build->runtime_prop->{version};
      $build->runtime_prop->{cflags} = join ' ',
        '-Wno-format',
        '-Wformat=0',
        join('', '-DMACHTYPE_', $build->runtime_prop->{kent_machtype}),
        join('', '-I', catfile $build->install_prop->{prefix}, 'inc'),
        ;

 view all matches for this distribution


Alien-Keystone

 view release on metacpan or  search on metacpan

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

            use Alien::Keystone;
            # ...
            my $keystone= Alien::Keystone->new;
            my $build = Module::Build->new(
                ...
                extra_compiler_flags => $keystone->cflags(),
                extra_linker_flags => $keystone->libs(),
                ...
            );


=head1 VERSION

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


=item B<new>

Creates the object. Refer C<Alien::Base> for more information.

=item B<cflags>

This method provides the compiler flags needed to use the library on the system.

=item B<libs>

This method provides the linker flags needed to use the library on the system.

=back

=head1 SEE ALSO

 view all matches for this distribution


Alien-Kiwisolver

 view release on metacpan or  search on metacpan

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

	my ($self, $lang) = @_;

	if( $lang =~ /^CPP$/ ) {
		my $params = Alien::Base::Inline(@_);

		$params->{CCFLAGSEX} = $self->runtime_prop->{cppstdflag};

		$params->{PRE_HEAD} = <<'		EOF';
		#if defined(_MSC_VER) || defined(__MINGW32__)
		#  define NO_XSLOCKS /* To avoid Perl wrappers of C library */
		#endif

 view all matches for this distribution


Alien-LIBSVM

 view release on metacpan or  search on metacpan

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

		$class->install_type eq 'share' ? ('-L' . File::Spec->catfile($class->dist_dir, qw(lib)) ) : (),
		'-lsvm',
	);
}

sub cflags {
	my ($class) = @_;
	join ' ', (
		$class->install_type eq 'share' ? ('-I' . File::Spec->catfile($class->dist_dir, qw(include)) ) : (),
	);
}

 view all matches for this distribution


Alien-LMDB

 view release on metacpan or  search on metacpan

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


=head1 SYNOPSIS

    my $lmdb = Alien::LMDB->new;

    my $cflags = $lmdb->cflags;
    ## "-I/usr/local/share/perl/5.20.2/auto/share/dist/Alien-LMDB/include"

    my $libs = $lmdb->libs;
    ## "-L/usr/local/share/perl/5.20.2/auto/share/dist/Alien-LMDB/lib -llmdb"

 view all matches for this distribution


Alien-LZO

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

    my($build) = @_;
    my $pc = Path::Tiny->new('lzo2.pc.in');
    if(-f $pc)
    {
      $pc->edit_lines(sub {
        /^Cflags:/ && s{/lzo$}{};
      });
    }
  };

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

 view all matches for this distribution


Alien-LibCIAORegion

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

          ];
};

gather [
  [ 'pkg-config --modversion libcxcregion', \'%{.runtime.version}' ],
  [ 'pkg-config --cflags     libcxcregion', \'%{.runtime.cflags}'  ],
  [ 'pkg-config --libs       libcxcregion', \'%{.runtime.libs}'    ],
];

 view all matches for this distribution


Alien-LibJIT

 view release on metacpan or  search on metacpan

inc/Module/Build/AlienLibJIT.pm  view on Meta::CPAN

sub new {
    my ($class, @args) = @_;

    return $class->SUPER::new(
        #include_dirs       => [$LIBJIT_INCLUDE],
        #extra_linker_flags => [$LIBJIT_RESULT, '-lpthread'],
        @args,
    );
}

sub ACTION_code {

 view all matches for this distribution


Alien-LibJQ

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

   # save correct package settings
   # for now there is no good way to retrieve them from cmake
   gather sub {
      my ( $build ) = @_;
      my $prefix = $build->runtime_prop->{prefix};
      $build->runtime_prop->{cflags}        = "-I$prefix/include";
      $build->runtime_prop->{cflags_static} = "-I$prefix/include";
      my $extra_libs = ' -lm';
      $extra_libs .= ' -lshlwapi' if $^O eq 'MSWin32';
      $build->runtime_prop->{libs}          = "-L$prefix/lib -ljq -lonig". $extra_libs;
      $build->runtime_prop->{libs_static}   = "-L$prefix/lib -ljq -lonig". $extra_libs;
   };

 view all matches for this distribution


Alien-LibMagic

 view release on metacpan or  search on metacpan

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

use warnings;

use Path::Tiny;
use parent 'Alien::Base';

sub cflags {
	my ($self) = @_;
	my $top_include = File::Spec->catfile( File::Spec->rel2abs($self->dist_dir), qw(include) );
	return "-I$top_include";
}

 view all matches for this distribution


Alien-LibUSB

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

if (isAtLeastFreeBSDv8) {
    probe  sub { 1 };
    gather sub {
        my ($build) = @_;
        $build->runtime_prop->{version}     = '1.0.9';
        $build->runtime_prop->{cflags}      = '-I/usr/include';
        $build->runtime_prop->{libs}        = '-L/usr/lib -lusb';
        $build->runtime_prop->{libs_static} = '-L/usr/lib -lusb';
    };
}

plugin 'PkgConfig' => 'libusb-1.0';

my ($cppflags, $ldflags) = ('', '');

share {
    requires 'Alien::autoconf' => '0.03';
    requires 'Alien::automake' => '0.05';
    requires 'Alien::libtool'  => '0.02';

 view all matches for this distribution


Alien-LibUSBx

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN


my $libusbx_version = '1.0.17';

# Override the CFLAGS/LIBS settings
sub alien_override($$$$) {
    my ($builder, $version, $cflags, $libs) = @_;
    my $dirname = '_dummy';
    my $filename = "dummy-$version.tar";

    unless (-d $dirname) {
        mkdir($dirname) or croak "Could not create temporary directory '$dirname': $!";

Build.PL  view on Meta::CPAN

                                exact_version => $version});

    $builder->alien_build_commands(undef);
    $builder->alien_install_commands(undef);

    $builder->alien_provides_cflags($cflags);
    $builder->alien_provides_libs($libs);
}

# Mirror list: http://sourceforge.net/apps/trac/sourceforge/wiki/Mirrors
my @mirrors = qw/aarnet dfn freefr garr heanet hivelocity internode

 view all matches for this distribution


Alien-LibXML

 view release on metacpan or  search on metacpan

examples/synopsis.pl  view on Meta::CPAN

use strict;
use Alien::LibXML;

my $alien = Alien::LibXML->new;
say $alien->libs;
say $alien->cflags;

 view all matches for this distribution


Alien-LibYAML

 view release on metacpan or  search on metacpan

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

   ...
   configure_requires => {
     'Alien::LibYAML' => '0',
     ...
   },
   extra_compiler_flags => Alien::LibYAML->cflags,
   extra_linker_flags   => Alien::LibYAML->libs,
   ...
 );
 
 $build->create_build_script;

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

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

=head1 DESCRIPTION

 view all matches for this distribution


Alien-Libarchive-Installer

 view release on metacpan or  search on metacpan

lib/Alien/Libarchive/Installer.pm  view on Meta::CPAN

      $dir = [$v,File::Spec->splitdir($d)]; 
      $f;
    } $alien->dlls;
    
    my $build = bless {
      cflags  => [$alien->cflags],
      libs    => [$alien->libs],
      dll_dir => $dir,
      dlls    => \@dlls,
      prefix  => File::Spec->rootdir,
    }, $class;

lib/Alien/Libarchive/Installer.pm  view on Meta::CPAN

    };
    return $build unless $@;
  }

  my $build = bless {
    cflags => _try_pkg_config(undef, 'cflags', '', ''),
    libs   => _try_pkg_config(undef, 'libs',   '-larchive', ''),
  }, $class;
  
  if($options{test} =~ /^(ffi|both)$/)
  {

lib/Alien/Libarchive/Installer.pm  view on Meta::CPAN

                              "exec_prefix=\${prefix}",
                              "libdir=\${exec_prefix}/lib",
                              "includedir=\${prefix}/include",
                              "Name: libarchive",
                              "Description: library that can create and read several streaming archive formats",
                              "Cflags: -I\${includedir}",
                              "Libs: advapi32.lib \${libdir}/archive_static.lib",
                              "Libs.private: ",
                              "";
        require File::Path;
        File::Path::mkpath($pkg_config_dir, 0, 0755);
      }
      
      my($version) = map { /^Version:\s*(.*)$/; $1 } grep /^Version: /, @content;
      # older versions apparently didn't include the necessary -I and -L flags
      if(defined $version && $version =~ /^[12]\./)
      {
        for(@content)
        {
          s/^Libs: /Libs: -L\${libdir} /;
        }
        push @content, "Cflags: -I\${includedir}\n";
      }
      
      open my $fh, '>', $pcfile;
      print $fh @content;
      close $fh;
    };
    
    my $build = bless {
      cflags  => _try_pkg_config($pkg_config_dir, 'cflags', '-I' . File::Spec->catdir($prefix, 'include'), '--static'),
      libs    => _try_pkg_config($pkg_config_dir, 'libs',   '-L' . File::Spec->catdir($prefix, 'lib'),     '--static'),
      prefix  => $prefix,
      dll_dir => [ 'dll' ],
      dlls    => do {
        opendir(my $dh, File::Spec->catdir($prefix, 'dll'));

lib/Alien/Libarchive/Installer.pm  view on Meta::CPAN

    }, $class;
    
    if($^O eq 'cygwin' || $^O eq 'MSWin32')
    {
      # TODO: should this go in the munged pc file?
      unshift @{ $build->{cflags} }, '-DLIBARCHIVE_STATIC';
    }

    $build->test_compile_run || die $build->error if $options{test} =~ /^(compile|both)$/;
    $build->test_ffi         || die $build->error if $options{test} =~ /^(ffi|both)$/;
    $build;

lib/Alien/Libarchive/Installer.pm  view on Meta::CPAN

  die $error if $error;
  $build;
}


sub cflags  { shift->{cflags}  }
sub libs    { shift->{libs}    }
sub version { shift->{version} }

sub dlls
{

lib/Alien/Libarchive/Installer.pm  view on Meta::CPAN

  };
  
  my $test_object = eval {
    $cbuilder->compile(
      source               => $fn,
      extra_compiler_flags => $self->{cflags} || [],
    );
  };
  
  if(my $error = $@)
  {

lib/Alien/Libarchive/Installer.pm  view on Meta::CPAN

  }
  
  my $test_exe = eval {
    $cbuilder->link_executable(
      objects            => $test_object,
      extra_linker_flags => $self->{libs} || [],
    );
  };
  
  if(my $error = $@)
  {

lib/Alien/Libarchive/Installer.pm  view on Meta::CPAN

 my %build_args;
 
 my $installer = eval { Alien::Libarchive::Installer->system_install };
 if($installer)
 {
   $build_args{extra_compiler_flags} = $installer->cflags,
   $build_args{extra_linker_flags}   = $installer->libs,
 }
 
 my $build = Module::Build->new(%build_args);
 $build->create_build_script;

lib/Alien/Libarchive/Installer.pm  view on Meta::CPAN

      # reasonably assumes that build_install will never download
      # a version older that 3.0
 } || Alien::Libarchive::Installer->build_install("dir");
 
 my $build = Module::Build->new(
   extra_compiler_flags => $installer->cflags,
   extra_linker_flags   => $installer->libs,
 );
 $build->create_build_script;

FFI::Raw

lib/Alien/Libarchive/Installer.pm  view on Meta::CPAN

Attributes of an L<Alien::Libarchive::Installer> provide the
information needed to use an existing libarchive (which may
either be provided by the system, or have just been built
using L<build_install|Alien::Libarchive::Installer#build_install>.

=head2 cflags

The compiler flags required to use libarchive.

=head2 libs

The linker flags and libraries required to use libarchive.

=head2 dlls

List of DLL or .so (or other dynamic library) files that can
be used by L<FFI::Raw> or similar.

 view all matches for this distribution


Alien-Libarchive

 view release on metacpan or  search on metacpan

inc/Alien/LZO/Installer.pm  view on Meta::CPAN

 my %build_args;
 
 my $installer = eval { Alien::LZO::Installer->system_install };
 if($installer)
 {
   $build_args{extra_compiler_flags} = $installer->cflags,
   $build_args{extra_linker_flags}   = $installer->libs,
 }
 
 my $build = Module::Build->new(%build_args);
 $build->create_build_script;

inc/Alien/LZO/Installer.pm  view on Meta::CPAN

      # reasonably assumes that build_install will never download
      # a version older that 3.0
 } || Alien::LZO::Installer->build_install("dir");
 
 my $build = Module::Build->new(
   extra_compiler_flags => $installer->cflags,
   extra_linker_flags   => $installer->libs,
 );
 $build->create_build_script;

FFI::Raw

inc/Alien/LZO/Installer.pm  view on Meta::CPAN


  if($options{alien} && eval q{ use Alien::LZO 0.01; 1 })
  {
    my $alien = Alien::LZO->new;
    my $build = bless {
      cflags => $alien->cflags,
      libs   => $alien->libs,
    }, $class;
    return $build if $options{test} =~ /^(compile|both)$/ && $build->test_compile_run;
    return $build if $options{test} =~ /^(ffi|both)$/ && $build->test_compile_run;
  }

  my $build = bless {
    cflags => [],
    libs   => ['-llzo2'],
  }, $class;
  
  $build->test_compile_run || die $build->error if $options{test} =~ /^(compile|both)$/;
  $build->test_ffi || die $build->error if $options{test} =~ /^(ffi|both)$/;

inc/Alien/LZO/Installer.pm  view on Meta::CPAN

        }
      };
    }

    my $build = bless {
      cflags  => ['-I' . _catdir($prefix, 'include')],
      libs    => ['-L' . _catdir($prefix, 'lib'), '-llzo2'],
      prefix  => $prefix,
      dll_dir => [ 'dll' ],
      dlls    => do {
        opendir(my $dh, _catdir($prefix, 'dll'));

inc/Alien/LZO/Installer.pm  view on Meta::CPAN

Attributes of an L<Alien::LZO::Installer> provide the
information needed to use an existing lzo (which may
either be provided by the system, or have just been built
using L<build_install|Alien::LZO::Installer#build_install>.

=head2 cflags

The compiler flags required to use lzo.

=head2 libs

The linker flags and libraries required to use lzo.

=head2 dlls

List of DLL or .so (or other dynamic library) files that can
be used by L<FFI::Raw> or similar.

inc/Alien/LZO/Installer.pm  view on Meta::CPAN


The version of lzo

=cut

sub cflags  { shift->{cflags}  }
sub libs    { shift->{libs}    }
sub version { shift->{version} }

sub dlls
{

inc/Alien/LZO/Installer.pm  view on Meta::CPAN

  };
  
  my $test_object = eval {
    $cbuilder->compile(
      source               => $fn,
      extra_compiler_flags => $self->{cflags} || [],
    );
  };
  
  if(my $error = $@)
  {

inc/Alien/LZO/Installer.pm  view on Meta::CPAN

  }
  
  my $test_exe = eval {
    $cbuilder->link_executable(
      objects            => $test_object,
      extra_linker_flags => $self->{libs} || [],
    );
  };
  
  if(my $error = $@)
  {

 view all matches for this distribution


Alien-Libarchive3

 view release on metacpan or  search on metacpan

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

{
  my($class) = @_;
  bless {}, $class;
}

sub cflags
{
  wantarray   ## no critic (Community::Wantarray)
    ? shellwords(Alien::Libarchive3->cflags)
    : Alien::Libarchive3->cflags;
}

sub libs
{
  wantarray   ## no critic (Community::Wantarray)

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


sub _macro_list
{
  require Config;

  my $cc = "$Config::Config{ccname} $Config::Config{ccflags} " . Alien::Libarchive3->cflags;

  my $tempdir = Path::Tiny->tempdir;
  my $file = path($tempdir, 'test.c');
  $file->spew(
    "#include <archive.h>\n#include <archive_entry.h>\n"

 view all matches for this distribution


Alien-Libbz2

 view release on metacpan or  search on metacpan

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

   ...
   configure_requires => {
     'Alien::Libbz2' => '0',
     ...
   },
   extra_compiler_flags => Alien::Libbz2->cflags,
   extra_linker_flags   => Alien::Libbz2->libs,
   ...
 );
 
 $build->create_build_script;

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

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

In your L<FFI::Platypus> script or module:

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

 
 unshift @PATH, Alien::Libbz2->bin_dir;

=head1 DESCRIPTION

This L<Alien> module provides the necessary compiler and linker flags needed
for using libbz2 in XS.

=head1 METHODS

=head2 cflags

 my $cflags = Alien::Libbz2->cflags;

Returns the C compiler flags.

=head2 libs

 my $libs = Alien::Libbz2->libs;

Returns the linker flags.

=head1 HELPERS

=head2 bzip2

 view all matches for this distribution


Alien-Libgcrypt

 view release on metacpan or  search on metacpan

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

Alien::Libgcrypt - Download, configure, build and install libgcrypt.

=head1 SYNOPSIS

    use Alien::Libgcrypt;
    my $cflags = Alien::Libgcrypt->cflags;
    ...

=head1 SEE ALSO

L<Alien::Base>, L<Alien::Libssh2>.

 view all matches for this distribution


( run in 0.678 second using v1.01-cache-2.11-cpan-39bf76dae61 )