view release on metacpan or search on metacpan
return $out
}
return;
}
sub alien_provides_cflags {
my $self = shift;
if ($self->use_installed_version) {
return $self->system_libgpg_error_config_get('cflags');
}
return;
}
sub alien_provides_libs {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Libjio.pm view on Meta::CPAN
return $self->{version};
}
sub ldflags {
my ($self) = @_;
Carp::croak('You must call this method as an object') unless ref($self);
# Return early if called in void context
return unless defined wantarray;
# If calling in array context, dereference and return
return @{ $self->{ldflags} } if wantarray;
return $self->{ldflags};
}
# Glob to create an alias to ldflags
*linker_flags = *ldflags;
sub cflags {
my ($self) = @_;
Carp::croak('You must call this method as an object') unless ref($self);
# Return early if called in void context
return unless defined wantarray;
# If calling in array context, dereference and return
return @{ $self->{cflags} } if wantarray;
return $self->{cflags};
}
*compiler_flags = *cflags;
sub method {
my ($self) = @_;
lib/Alien/Libjio.pm view on Meta::CPAN
}
sub _try_pkg_config {
my ($self) = @_;
my ($value, $err) = _get_pc('cflags');
return unless (defined $value && length $value);
#if (defined $err && length $err) {
# #warn "Problem with pkg-config; using ExtUtils::Liblist instead\n";
# return;
#}
$self->{installed} = 1;
$self->{method} = 'pkg-config';
# pkg-config returns things with a newline, so remember to remove it
$self->{cflags} = [ split(' ', $value) ];
$self->{ldflags} = [ split(' ', _get_pc('libs')) ];
$self->{version} = _get_pc('modversion');
return 1;
}
lib/Alien/Libjio.pm view on Meta::CPAN
my ($self) = @_;
use ExtUtils::Liblist ();
local $SIG{__WARN__} = sub { }; # mask warnings
my (undef, undef, $ldflags, $ldpath) = ExtUtils::Liblist->ext('-ljio');
return unless (defined($ldflags) && length($ldflags));
$self->{installed} = 1;
$self->{method} = 'ExtUtils::Liblist';
# Empty out cflags; initialize it
$self->{cflags} = [];
my $read;
my $pid = open3(undef, $read, undef, 'getconf', 'LFS_CFLAGS');
# We're using blocking wait, so the return value doesn't matter
lib/Alien/Libjio.pm view on Meta::CPAN
waitpid($pid, 0);
# Check the status code
if (($? >> 8) == 0) {
# This only takes the first line
push(@{ $self->{cflags} }, split(' ', <$read>));
}
else {
warn 'Problem using getconf: ', <$read>, "\n";
push(@{ $self->{cflags} },
'-D_LARGEFILE_SOURCE',
'-D_FILE_OFFSET_BITS=64',
);
}
# Used for resolving the include path, relative to lib
use Cwd ();
use File::Spec ();
push(@{ $self->{cflags} },
# The include path is taken as: $libpath/../include
'-I' . Cwd::realpath(File::Spec->catfile(
$ldpath,
File::Spec->updir(),
'include'
))
);
push(@{ $self->{ldflags} },
'-L' . $ldpath,
$ldflags,
);
return 1;
}
lib/Alien/Libjio.pm view on Meta::CPAN
=head1 SYNOPSIS
use Alien::Libjio;
my $jio = Alien::Libjio->new;
my $ldflags = $jio->ldflags;
my $cflags = $jio->cflags;
=head1 DESCRIPTION
To ensure reliability, some file systems and databases provide support for
something known as journalling. The idea is to ensure data consistency by
lib/Alien/Libjio.pm view on Meta::CPAN
Thankfully, Alberto Bertogli published a userspace C library called libjio
that can provide these features in a small (less than 1500 lines of code)
library with no external dependencies.
This package is designed to install it, and provide a way to get the flags
necessary to compile programs using it. It is particularly useful for Perl XS
programs that use it, such as B<IO::Journal>.
=head1 METHODS
=head2 Alien::Libjio->new
Creates a new C<Alien::Libjio> object, which essentially just has a few
convenience methods providing useful information like compiler and linker
flags.
Example code:
my $jio = Alien::Libjio->new();
lib/Alien/Libjio.pm view on Meta::CPAN
Example code:
my $version = $jio->version;
=head2 $jio->ldflags
=head2 $jio->linker_flags
This returns the flags required to link C code with the local installation of
libjio (typically in the LDFLAGS variable). It is particularly useful for
building and installing Perl XS modules such as L<IO::Journal>.
In scalar context, it returns an array reference suitable for passing to
other build systems, particularly L<Module::Build>. In list context, it gives
a normal array so that C<join> and friends will work as expected.
Example code:
my $ldflags = $jio->ldflags;
my @ldflags = @{ $jio->ldflags };
my $ldstring = join(' ', $jio->ldflags);
# or:
# my $ldflags = $jio->linker_flags;
=head2 $jio->cflags
=head2 $jio->compiler_flags
This method returns the compiler option flags to compile C code which uses
the libjio library (typically in the CFLAGS variable). It is particularly
useful for building and installing Perl XS modules such as L<IO::Journal>.
Example code:
my $cflags = $jio->cflags;
my @cflags = @{ $jio->cflags };
my $ccstring = join(' ', $jio->cflags);
# or:
# my $cflags = $jio->compiler_flags;
=head2 $jio->method
=head2 $jio->how
view all matches for this distribution
view release on metacpan or search on metacpan
t/librdkafka.t view on Meta::CPAN
use Alien::Librdkafka;
use version;
my $alien = Alien::Librdkafka->new;
ok defined( $alien->libs ), "libs directory defined";
ok defined( $alien->cflags ), "cflags defined";
subtest ffi => sub {
plan skip_all => 'test requires FFI::Platypus'
unless eval "use FFI::Platypus; 1;";
view all matches for this distribution
view release on metacpan or search on metacpan
my($build) = @_;
my $prefix = $build->runtime_prop->{prefix};
my @libs = grep /^[a-z]+\.lib$/, map { $_->basename } Path::Tiny->new('.')->child('lib')->children;
$build->runtime_prop->{$_} = "-I$prefix/include " for qw( cflags cflags_static );
$build->runtime_prop->{$_} = "-LIBPATH:$prefix/lib @libs " for qw( libs libs_static );
};
}
}
else
view all matches for this distribution
view release on metacpan or search on metacpan
my $prefix = $build->runtime_prop->{prefix};
my $include_path = File::Spec->catfile($prefix, qw(include));
my $lib_path = File::Spec->catfile($prefix, qw(lib));
my $cflags = "-I$include_path";
my @ldlibs = "-ltensorflow";
my $libs = join " ", "-L$lib_path", @ldlibs;
$build->runtime_prop->{cflags} = $cflags;
$build->runtime_prop->{libs} = $libs;
};
} else {
requires 'Alien::Bazel';
plugin 'Download::GitHub' => (
view all matches for this distribution
view release on metacpan or search on metacpan
doc = xmlReadFile("foo.xml", NULL, 0);
printf("xml version = '%s'\n", LIBXML_DOTTED_VERSION);
}
EOF
my @try_flags = (
{ cflags => '', libs => '-lxml2' },
{ cflags => '-I/usr/include/libxml2', libs => '-lxml2' },
{ cflags => '-I/usr/local/include/libxml2', libs => '-lxml2' },
);
plugin 'Probe::Vcpkg' => 'libxml2';
probe [
['xml2-config', '--version' => \'%{.install.my_version}'],
['xml2-config', '--cflags' => \'%{.install.my_cflags}'],
['xml2-config', '--libs' => \'%{.install.my_libs}'],
];
plugin 'PkgConfig' => 'libxml-2.0';
plugin 'Probe::CBuilder' => (
cflags => $_->{cflags},
libs => $_->{libs},
program => $test_program,
version => qr{xml version = '(.*?)'},
) for @try_flags;
plugin 'PkgConfig::MakeStatic' => ();
my %bad_versions = map { $_ => 1 } (
# known bad versions
# may have some extras, and may be incomplete.
plugin 'Gather::IsolateDynamic';
gather sub {
my($build) = @_;
my $prefix = $build->runtime_prop->{prefix};
$build->runtime_prop->{cflags} = "-I$prefix/include/libxml2";
$build->runtime_prop->{libs} = "-L$prefix/lib libxml2_a.lib";
};
}
else
{
gather_system => sub {
my($build) = @_;
return if defined $build->runtime_prop->{libs};
if($build->install_prop->{my_libs})
{
$build->runtime_prop->{$_} = $build->install_prop->{"my_$_"} for qw( version cflags libs );
}
},
);
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Lua.pm view on Meta::CPAN
return $self;
}
sub luajit { return $_[0]->{alien_luajit} }
sub cflags {
my $self = shift;
if (not ref($self) or not $self->luajit) {
return $self->SUPER::cflags(@_);
}
return $self->luajit->cflags(@_);
}
sub libs {
my $self = shift;
if (not ref($self) or not $self->luajit) {
lib/Alien/Lua.pm view on Meta::CPAN
=head1 SYNOPSIS
use Alien::Lua;
my $alien = Alien::Lua->new;
my $libs = $alien->libs;
my $cflags = $alien->cflags;
=head1 DESCRIPTION
See the documentation of L<Alien::Base> for details on the API of this module.
lib/Alien/Lua.pm view on Meta::CPAN
act as a shim for C<Alien::LuaJIT>:
use Alien::Lua;
my $alien = Alien::Lua->new(luajit => 1);
my $libs = $alien->libs; # refers to luajit
my $cflags = $alien->cflags; # refers to luajit
Note that if C<Alien::LuaJIT> is not available, the
C<luajit> option becomes a silent no-op.
After passing the C<luajit> option to the constructor,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/LuaJIT.pm view on Meta::CPAN
=head1 SYNOPSIS
use Alien::LuaJIT;
my $alien = Alien::LuaJIT->new;
my $libs = $alien->libs;
my $cflags = $alien->cflags;
=head1 DESCRIPTION
See the documentation of L<Alien::Base> for details on the API of this module.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/MSYS2.pm view on Meta::CPAN
return ($dir);
}
}
sub cflags { '' }
sub libs { '' }
sub dynamic_libs { () }
1;
lib/Alien/MSYS2.pm view on Meta::CPAN
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
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/MariaDB.pm view on Meta::CPAN
WriteMakefile(
...
CONFIGURE_REQUIRES => {
'Alien::MariaDB' => 0,
},
CCFLAGS => Alien::MariaDB->cflags,
LIBS => Alien::MariaDB->libs,
);
=head1 DESCRIPTION
lib/Alien/MariaDB.pm view on Meta::CPAN
Inherits all methods from L<Alien::Base>.
=head2 libs
Overridden to add C<-Wl,-rpath> flags on macOS share installs so the
dynamic linker can find the bundled libmariadb at runtime.
=head1 SEE ALSO
L<Alien::Base>, L<https://mariadb.com/kb/en/mariadb-connector-c/>
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
$MECAB_SOURCE = File::Spec->rel2abs($MECAB_SOURCE);
$MECAB_EXE = File::Spec->rel2abs($MECAB_EXE);
my %REQUIRES;
# 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
view release on metacpan or search on metacpan
lib/Alien/Moot.pm view on Meta::CPAN
use strict;
use Alien::Moot;
my $alien = Alien::Moot->new;
say $alien->libs;
say $alien->cflags;
=head1 DESCRIPTION
Ensures that the libmoot C++ library is installed on your system.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/MuPDF.pm view on Meta::CPAN
sub inline_auto_include {
return [ 'mupdf/fitz.h' ];
}
sub cflags {
my ($self) = @_;
my $top_include = File::Spec->catfile( File::Spec->rel2abs($self->dist_dir), qw(include) );
# We do not include $self->SUPER::cflags() because that adds too many
# header files to the path. In particular, it adds -Imupdf/fitz, which
# leads to "mupdf/fitz/math.h" being included when trying to include
# the C standard "math.h" header.
return "-I$top_include";
}
view all matches for this distribution
view release on metacpan or search on metacpan
version => qr/(\d+[.]\d+[.]\d+)[.](?:tar[.].gz|tgz)$/,
);
plugin Extract => 'tar.gz';
# only if necessary; e.g to add a CMake flag
build [ [
'%{cmake}', @{ meta->prop->{plugin_build_cmake}->{args} },
'-D', 'BUILD_SHARED_LIBS=OFF',
'%{.install.extract}',
],
};
gather [
[ "pkg-config --modversion @{[ PACKAGE_NAME ]}", \'%{.runtime.version}' ],
[ "pkg-config --cflags @{[ PACKAGE_NAME ]}", \'%{.runtime.cflags}' ],
[ "pkg-config --libs @{[ PACKAGE_NAME ]}", \'%{.runtime.libs}' ],
];
view all matches for this distribution
view release on metacpan or search on metacpan
version => qr/(\d+[.]\d+[.]\d+)[.](?:tar[.].gz|tgz)$/,
);
plugin Extract => 'tar.gz';
# only if necessary; e.g to add a CMake flag
build [ [
'%{cmake}', @{ meta->prop->{plugin_build_cmake}->{args} },
'-D', 'BUILD_SHARED_LIBS=OFF',
'%{.install.extract}',
],
};
gather [
[ "pkg-config --modversion @{[ PACKAGE_NAME ]}", \'%{.runtime.version}' ],
[ "pkg-config --cflags @{[ PACKAGE_NAME ]}", \'%{.runtime.cflags}' ],
[ "pkg-config --libs @{[ PACKAGE_NAME ]}", \'%{.runtime.libs}' ],
];
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/NSS.pm view on Meta::CPAN
use warnings;
use Module::Build;
use Alien::NSS;
my $cflags = Alien::NSS->cflags;
my $ldflags = Alien::NSS->libs;
my $builder = Module::Build->new(
module_name => 'my_lib',
extra_compiler_flags => $cflags,
extra_linker_flags => $ldflags,
configure_requires => {
'Alien::NSS => 0
},
);
lib/Alien/NSS.pm view on Meta::CPAN
./Build test
./Build install
=head2 Build Flags
When running C<perl Build.PL>, certain command line flags may be passed:
=over 4
=item C<--help>
view all matches for this distribution
view release on metacpan or search on metacpan
plugin Extract => 'tar.gz';
plugin 'Build::Autoconf' => ();
my @configure_flags = qw( --disable-shared );
push @configure_flags, '--disable-assembler' if $^O eq 'MSWin32' && $Config{myuname} =~ /strawberry-perl/;
build [
"%{configure} @configure_flags",
'%{make}',
'%{make} install',
];
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/OTR.pm view on Meta::CPAN
=head1 SYNOPSIS
use Alien::OTR;
my $cflags = Alien::OTR->cflags;
my $libs = Alien::OTR->libs;
=head1 DESCRIPTION
Alien::OTR installs the C library C<libotr> version v4.1.1.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/OpenMP.pm view on Meta::CPAN
our $VERSION = '0.003006';
# "public" Alien::Base method implementations
# we can reuse cflags for gcc/gomp; hopefully this will
# remain the case for all supported compilers
sub lddlflags { shift->libs }
# Inline related methods
sub Inline {
my ($self, $lang) = @_;
my $params = $self->SUPER::Inline($lang);
$params->{CCFLAGSEX} = delete $params->{INC};
return {
%$params,
LDDLFLAGS => join( q{ }, $Config::Config{lddlflags}, $self->lddlflags() ),
AUTO_INCLUDE => $self->runtime_prop->{auto_include},
};
}
1;
lib/Alien/OpenMP.pm view on Meta::CPAN
Alien::OpenMP - Encapsulate system info for OpenMP
=head1 SYNOPSIS
use Alien::OpenMP;
say Alien::OpenMP->cflags; # e.g. '-fopenmp' if gcc
say Alien::OpenMP->lddlflags; # e.g. '-fopenmp' if gcc
say Alien::OpenMP->auto_include; # e.g. '#include <omp.h>' if gcc
=head1 DESCRIPTION
This module encapsulates the knowledge required to compile OpenMP programs
C<$Config{ccname}>. C<C>, C<Fortran>, and C<C++> programs annotated
with declarative OpenMP pragmas will still compile if the compiler (and
linker if this is a separate process) is not passed the appropriate flag
to enable OpenMP support. This is because all pragmas are hidden behind
full line comments (with the addition of OpenMP specific C<sentinels>,
as they are called).
All compilers require OpenMP to be explicitly activated during compilation;
for example, GCC's implementation, C<GOMP>, is invoked by the C<-fopenmp>
flag.
Most major compilers support OpenMP, including: GCC, Intel, IBM,
Portland Group, NAG, and those compilers created using LLVM. GCC's OpenMP
implementation, C<GOMP>, is available in all modern versions. Unfortunately,
while OpenMP is a well supported standard; compilers are not required to
lib/Alien/OpenMP.pm view on Meta::CPAN
=head2 Contributing
The biggest need is to support additional compilers. OpenMP is a well
established standard across compilers, but there is no guarantee that
all compilers will use the same flags, library names, or header files. It
should also be easy to contribute a patch to add this information, which
is effectively its purpose. At the very least, please create an issue
at the official issue tracker to request this support, and be sure to
include the relevant information. Chances are the maintainers of this
module do not have access to an unsupported compiler.
=head1 METHODS
=over 3
=item C<cflags>
Returns flag used by a supported compiler to enable OpenMP. If not support,
an empty string is provided since by definition all OpenMP programs
must compile because OpenMP pragmas are annotations hidden behind source
code comments.
Example, GCC uses, C<-fopenmp>.
=item C<lddlflags>
Returns the flag used by the linker to enable OpenMP. This is usually
the same as what is returned by C<cflags>.
Example, GCC uses, C<-fopenmp>, for this as well.
=item C<Inline>
lib/Alien/OpenMP.pm view on Meta::CPAN
The nice, compact form above replaces this mess:
use Alien::OpenMP; use Inline (
C => 'DATA',
ccflagsex => Alien::OpenMP->cflags(),
lddlflags => join( q{ }, $Config::Config{lddlflags}, Alien::OpenMP::lddlflags() ),
auto_include => Alien::OpenMP->auto_include(),
);
It also means that the standard I<include> for OpenMP is not required in
the C<C> code, i.e., C<< #include <omp.h> >>.
view all matches for this distribution
view release on metacpan or search on metacpan
bin/openssl-env-bash view on Meta::CPAN
use Alien::OpenSSL::Static;
use Text::ParseWords qw( shellwords );
my $bindir = Alien::OpenSSL::Static->bin_dir;
my $cflags = Alien::OpenSSL::Static->cflags;
my $ldflags = Alien::OpenSSL::Static->libs;
my $cpath = join ':', map {s/^-I//; $_} shellwords( $cflags );
my $librarypath = join ':', map {s/^-L//; $_} grep {m/^-L/} shellwords( $ldflags );
exec(qq{$ENV{SHELL} -c 'export PATH="$bindir:\$PATH" CFLAGS="$cflags \$CFLAGS" LDFLAGS="$ldflags \$LDFLAGS" CPATH="$cpath:\$CPATH" LIBRARY_PATH="$librarypath:\$LIBRARY_PATH";\$SHELL'});
view all matches for this distribution
view release on metacpan or search on metacpan
'%{make} OPENSSLDIR=%{.install.prefix}/ssl install',
];
gather sub {
my($build) = @_;
my $prefix = $build->runtime_prop->{prefix};
$build->runtime_prop->{$_} = "-I$prefix/include " for qw( cflags cflags_static );
$build->runtime_prop->{$_} = "-LIBPATH:$prefix/lib libcrypto.lib libssl.lib " for qw( libs libs_static );
};
}
else
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/OpenVcdiff.pm view on Meta::CPAN
=head2 Library interface
my $openvcdiff = Alien::OpenVcdiff->new;
my $cflags = $openvcdiff->cflags;
## "-I/usr/local/share/perl/5.16.2/auto/share/dist/Alien-OpenVcdiff/include/google"
my $libs = $openvcdiff->libs;
## "-L/usr/local/share/perl/5.16.2/auto/share/dist/Alien-OpenVcdiff/lib -lvcdcom -lvcddec -lvcdenc"
The above methods are inherited from L<Alien::Base> which has worked really well so far except with C<$cflags> I found I had to strip the "google" off the end of the include directory.
=head1 DESCRIPTION
This package configures, builds, and installs Google's L<open-vcdiff|http://code.google.com/p/open-vcdiff/>. This library and its associated command-line utility C<vcdiff> implement L<RFC 3284|http://www.faqs.org/rfcs/rfc3284.html>, "The VCDIFF Gener...
view all matches for this distribution
view release on metacpan or search on metacpan
- Windows, Skip pcre-config Tests If sh Bourne Shell Not Found
0.010000 2017-07-16
- Require PCRE2 Minimum Version v10.30 During Build Time
- Test Suite, Skip cflags Test On system Install Type
0.009000 2017-07-15
- Test Suite, Upgrade To Test::Alien
- Quality Assurance, Enable Debugging Output
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Builder.pm view on Meta::CPAN
$self->config_data('build_cc', $Config{cc});
$self->config_data('build_arch', $Config{archname});
$self->config_data('build_os', $^O);
$self->config_data('script', ''); # just to be sure
$self->config_data('config', {}); # just to be sure
$self->config_data('additional_cflags', ''); # just to be sure
$self->config_data('additional_libs', ''); # just to be sure
if($bp->{buildtype} eq 'use_config_script') {
$self->config_data('script', $bp->{script});
# include path trick - adding couple of addititonal locations
$self->config_data('additional_cflags', '-I' . get_path($bp->{prefix} . '/include/smpeg') . ' '.
'-I' . get_path($bp->{prefix} . '/include') . ' ' .
$self->get_additional_cflags);
$self->config_data('additional_libs', $self->get_additional_libs);
}
elsif($bp->{buildtype} eq 'use_win32_pkgconfig') {
$self->config_data(win32_pkgconfig => $bp->{win32_pkgconfig});
}
inc/My/Builder.pm view on Meta::CPAN
my $cfg = {
# defaults
version => $version,
prefix => '@PrEfIx@',
libs => '-L' . $self->get_path('@PrEfIx@/lib') . ' -lpng',
cflags => '-I' . $self->get_path('@PrEfIx@/include') . ' -D_GNU_SOURCE=1', # -Dmain=SDL_main
shared_libs => [ ],
};
# overwrite values available via libpng-config
my $bp = $self->config_data('build_prefix') || $prefix;
my $devnull = File::Spec->devnull();
my $script = rel2abs("$prefix/bin/libpng-config");
foreach my $p (qw(version prefix L_opts libs I_opts cflags)) {
my $o=`$script --$p 2>$devnull`;
if ($o) {
$o =~ s/[\r\n]*$//;
$o =~ s/\Q$prefix\E/\@PrEfIx\@/g;
$cfg->{$p} = $o;
inc/My/Builder.pm view on Meta::CPAN
if($p eq 'libs') {
$cfg->{$p} = $cfg->{L_opts} . ' ' . $cfg->{$p};
delete $cfg->{L_opts};
}
if($p eq 'cflags') {
$cfg->{$p} = $cfg->{I_opts} . ' ' . $cfg->{$p};
delete $cfg->{I_opts};
}
}
}
inc/My/Builder.pm view on Meta::CPAN
};
$cfg->{ld_paths} = [ keys %tmp ];
$cfg->{ld_shlib_map} = \%shlib_map;
# write config
$self->config_data('additional_cflags', '-I' . $self->get_path('@PrEfIx@/include') . ' ' .
$self->get_additional_cflags);
$self->config_data('additional_libs', $self->get_additional_libs);
$self->config_data('config', $cfg);
}
sub can_build_binaries_from_sources {
inc/My/Builder.pm view on Meta::CPAN
# this needs to be overriden in My::Builder::<platform>
my ($self, $build_out, $build_src) = @_;
die "###ERROR### My::Builder cannot build PNG from sources, use rather My::Builder::<platform>";
}
sub get_additional_cflags {
# this needs to be overriden in My::Builder::<platform>
my $self = shift;
return '';
}
view all matches for this distribution
view release on metacpan or search on metacpan
use alienfile;
#our $VERSION = 0.005_000;
plugin 'Probe::CBuilder' => (
# DEV NOTE: can not mix 'aliens' and 'cflags' or 'libs' options below;
# Alien::Texinfo provides a command-line utility `makeinfo`, not source and/or library files to be used during compilation
# aliens => [ 'Alien::Texinfo' ], # incorrect
program => "#include <libpluto.h>\nint main() { return 0; }\n",
lang => 'C++', # mostly C, but some C++, according to GitHub
# paths for pre-existing AKA system install
# NEED FIXES: remove hard-coded paths below; add Windows-compatible paths
cflags => '-I/usr/local/include/pluto/ -std=c++11',
libs => '-L/usr/local/lib/',
);
share {
# DEV NOTE, CORRELATION #ap020: must update Alien::Texinfo & Alien::bison & Alien::flex versions in BOTH alienfile & Makefile.PL
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Proj4.pm view on Meta::CPAN
sub default_inc {
return;
}
sub libflags {
my ($class) = @_;
my $flags = join ' ', $class->libs;
return $flags;
}
sub incflags {
my ($class) = @_;
my $flags = $class->cflags;
return $flags;
}
# dup of code currently in PDLA::GIS::Proj
sub load_projection_descriptions {
my ($class) = @_;
my $incflags = $class->cflags;
my $libflags = $class->libs;
require Inline;
Inline->bind(C => <<'EOF', inc => $incflags, libs => $libflags) unless defined &list_projections;
#include "projects.h"
HV *list_projections() {
struct PJ_LIST *lp;
SV* scalar_val;
HV *hv = newHV();
view all matches for this distribution
view release on metacpan or search on metacpan
inc/AP/Build.pm view on Meta::CPAN
}
return $self;
}
sub alien_provides_cflags {
my $self = shift;
my $cflags = $self->SUPER::alien_provides_cflags || '';
if ($^O eq 'freebsd' && $cflags !~ m{/usr/local/include}) {
$cflags = "$cflags -I/usr/local/include";
}
return $cflags;
}
sub ACTION_alien_code {
my $self = shift;
$self->SUPER::ACTION_alien_code();
inc/AP/Build.pm view on Meta::CPAN
my $version = $self->alien_check_installed_version;
my ($major, $minor) = split /\./, $version;
if ($major > 3 || ($major == 3 && $minor >= 6)) {
if (!ExtUtils::CppGuess->new->is_msvc) {
$system_provides->{'C++flags'} = "-std=c++11";
}
}
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
prototype.js view on Meta::CPAN
},
_getEv: function(element, attribute) {
var attribute = element.getAttribute(attribute);
return attribute ? attribute.toString().slice(23, -2) : null;
},
_flag: function(element, attribute) {
return $(element).hasAttribute(attribute) ? attribute : null;
},
style: function(element) {
return element.style.cssText.toLowerCase();
},
prototype.js view on Meta::CPAN
Object.extend(v, {
href: v._getAttr,
src: v._getAttr,
type: v._getAttr,
action: v._getAttrNode,
disabled: v._flag,
checked: v._flag,
readonly: v._flag,
multiple: v._flag,
onload: v._getEv,
onunload: v._getEv,
onclick: v._getEv,
ondblclick: v._getEv,
onmousedown: v._getEv,
prototype.js view on Meta::CPAN
node._counted = undefined;
return nodes;
},
// mark each child node with its position (for nth calls)
// "ofType" flag indicates whether we're indexing for nth-of-type
// rather than nth-child
index: function(parentNode, reverse, ofType) {
parentNode._counted = true;
if (reverse) {
for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/inc_Archive-Extract/Archive/Extract.pm view on Meta::CPAN
is_lzma => { bin => '_unlzma_bin', pp => '_unlzma_cz' },
is_xz => { bin => '_unxz_bin', pp => '_unxz_cz' },
is_txz => { bin => '_untar_bin', pp => '_untar_at' },
};
{ ### use subs so we re-generate array refs etc for the no-override flags
### if we don't, then we reuse the same arrayref, meaning objects store
### previous errors
my $tmpl = {
archive => sub { { required => 1, allow => FILE_EXISTS } },
type => sub { { default => '', allow => [ @Types ] } },
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Role/Alt.pm view on Meta::CPAN
Then you can use it:
use Alien::Libfoo;
my $cflags = Alien::Libfoo->alt('foo1')->cflags;
my $libs = Alien::Libfoo->alt('foo1')->libs;
=head1 DESCRIPTION
B<NOTE>: The capabilities that used to be provided by this role have been
view all matches for this distribution