view release on metacpan or search on metacpan
src/subversion/CHANGES view on Meta::CPAN
* Compatibility changes:
- lose ra_dav compatibility with servers 0.31 and earlier
- lose support for working copy format "1" (not created for over a year)
* 'svn diff' and other read-only actions now work in read-only working copies
* 'svn blame -rX' now does the intuitive thing
* 'svn log' output headers now say "rXXXX | " instead of "rev XXXX: "
* 'svnversion' no longer stymied by svn:externals
* new 'svn pd' alias for 'svn propdel'
* '-rCOMMITTED' keyword now works on more commands
* minor changes to output of 'svn ls -v' and 'svn st -v' (r7530)
* 'svn log --xml' now obeys the '-q' flag (r7555)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Saxon.pm view on Meta::CPAN
Alien::Saxon - Distribute and make available as shared Saxon 9 JAR file
=head1 SYNOPSIS
use Alien::Saxon;
say Alien::Saxon->jar;
=head1 DESCRIPTION
Bundles and makes available (together with the rest of the Zip file,
including the licenses) F<saxon9he.jar> via the C<jar> method.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Module/Build.pm view on Meta::CPAN
mkdir(my $fakemoduledir = My::Tests::Below->tempdir() . "/Fake-Module");
my $sample_Build_PL = My::Tests::Below->pod_code_snippet("synopsis");
$sample_Build_PL =~ s/^(.*Acme::Pony.*)$/#$1/m; # As we say in french,
# faut pas _que_ deconner non plus.
my $ordinary_arguments = <<'ORDINARY_ARGUMENTS';
module_name => 'Fake::Module',
license => 'perl',
dist_author => 'Octave Hergebelle <hector@tdlgb.org>',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/SeqAlignment/edlib.pm view on Meta::CPAN
my $string1 = "ACGACG";
my $string2 = "CCCCCACGTCG";
# save sequences
open my $fh, '>', 'seq1.fasta';
say $fh ">Seq1\n$string1";
close $fh;
open my $fh, '>', 'seq2.fasta';
say $fh ">Seq2\n$string2";
close $fh;
system Alien::SeqAlignment::edlib->edlib_aligner, '-m', 'HW','-n','0', '-k','-1','-p','-f' ,'NICE','seq1.fasta', 'seq2.fasta';
Output
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Thrust.pm view on Meta::CPAN
This package will download a zip file containing the L<Thrust cross-platform, cross-language GUI toolkit|https://github.com/breach/thrust> and will then install it into its private distribution share directory.
The location of the binary is stored in the C<$Alien::Thrust::thrust_shell_binary> variable:
$ perl -MAlien::Thrust -E 'say $Alien::Thrust::thrust_shell_binary'
/usr/local/share/perl/5.18.2/auto/share/dist/Alien-Thrust/thrust_shell
Note however that you probably want to use the L<Thrust> module instead of accessing the binary directly.
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Build/Linux.pm view on Meta::CPAN
use File::Path;
sub ACTION_install {
my $self = shift;
# For unixish systems, we must re-build with the new prefix so that all of
# the baked-in paths are correct. I just wanna say this:
#my $prefix = File::ShareDir::dist_dir('Alien-TinyCC');
# Unfortunately, this won't work because File::ShareDir expects the
# folder to already exist.
# Instead, I copy code from Alien::Base::ModuleBuild to calculate the
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Build/Linux.pm view on Meta::CPAN
use File::Path;
sub ACTION_install {
my $self = shift;
# For unixish systems, we must re-build with the new prefix so that all of
# the baked-in paths are correct. I just wanna say this:
#my $prefix = File::ShareDir::dist_dir('Alien-TinyCCx');
# Unfortunately, this won't work because File::ShareDir expects the
# folder to already exist.
# Instead, I copy code from Alien::Base::ModuleBuild to calculate the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Unicruft.pm view on Meta::CPAN
use 5.010;
use strict;
use Alien::Unicruft;
my $alien = Alien::Unicruft->new;
say $alien->libs;
say $alien->cflags;
=head1 DESCRIPTION
Ensures that the libunicruft C library is installed on your system.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/inc_Module-Build/Module/Build/Cookbook.pm view on Meta::CPAN
This will find all F<.dat> files in the F<lib/> directory, copy them
to the F<blib/lib/> directory during the C<build> action, and install
them during the C<install> action.
If your extra files aren't located in the C<lib/> directory in your
distribution, you can explicitly say where they are, just as you'd do
with F<.pm> or F<.pod> files:
use Module::Build;
my $build = new Module::Build
(
inc/inc_Module-Build/Module/Build/Cookbook.pm view on Meta::CPAN
=back
=head2 Modifying an action
Sometimes you might need an to have an action, say C<./Build install>,
do something unusual. For instance, you might need to change the
ownership of a file or do something else peculiar to your application.
You can subclass C<Module::Build> on the fly using the C<subclass()>
method and override the methods that perform the actions. You may
inc/inc_Module-Build/Module/Build/Cookbook.pm view on Meta::CPAN
You can add a new C<./Build> action simply by writing the method for
it in your subclass. Use C<depends_on> to declare that another action
must have been run before your action.
For example, let's say you wanted to be able to write C<./Build
commit> to test your code and commit it to Subversion.
# Build.PL
use Module::Build;
my $class = Module::Build->subclass(
view all matches for this distribution
view release on metacpan or search on metacpan
xgboost/R-package/R/callbacks.R view on Meta::CPAN
#' @param stopping_rounds The number of rounds with no improvement in
#' the evaluation metric in order to stop the training.
#' @param maximize whether to maximize the evaluation metric
#' @param metric_name the name of an evaluation column to use as a criteria for early
#' stopping. If not set, the last column would be used.
#' Let's say the test data in \code{watchlist} was labelled as \code{dtest},
#' and one wants to use the AUC in test data for early stopping regardless of where
#' it is in the \code{watchlist}, then one of the following would need to be set:
#' \code{metric_name='dtest-auc'} or \code{metric_name='dtest_auc'}.
#' All dash '-' characters in metric names are considered equivalent to '_'.
#' @param verbose whether to print the early stopping information.
view all matches for this distribution
view release on metacpan or search on metacpan
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
-e 'META.json' or die "No META information provided\n";
}
method Build_PL() {
die "Pure perl Affix? Ha! You wish.\n" if $pureperl;
say sprintf 'Creating new Build script for %s %s', $meta->name, $meta->version;
# We must capture the current INC to ensure the builder finds itself
# when running the generated script.
my $inc_str = join( ' ', map {"-I$_"} @INC );
$self->write_file( 'Build', sprintf <<'', $^X, $inc_str, __PACKAGE__, __PACKAGE__ );
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
$meta->save(@$_) for ['MYMETA.json'];
}
# Actions
method ACTION_build ( ) {
say 'Building Alien-Xmake...';
# Prepare blib
path('blib/lib')->mkpath;
path('blib/arch')->mkpath;
path('blib/script')->mkpath;
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
# Alien Logic: Check or Install Xmake
my $config_data = $self->_resolve_xmake();
# Generate ConfigData.pm
$self->_write_config_data($config_data);
say 'Build complete';
}
method ACTION_install ( ) {
say 'Installing...';
require ExtUtils::Install;
ExtUtils::Install::install( { 'blib/lib' => $Config{installprivlib}, 'blib/arch' => $Config{installarchlib} }, 1, 0, 0 );
}
method ACTION_clean () {
say 'Cleaning...';
path('blib')->remove_tree;
path('_build_xmake')->remove_tree;
path('config.log')->remove;
path('Build')->remove;
path('_build_params')->remove;
}
method ACTION_test ( ) {
$self->ACTION_build();
say 'Running tests...';
use Test::Harness;
my @tests = glob('t/*.t');
runtests(@tests) if @tests;
}
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
unless ($force) {
my $sys_path = $self->_find_system_xmake();
if ($sys_path) {
my $ver = $self->_get_xmake_version($sys_path);
if ( $self->_version_cmp( $ver, $target_version ) >= 0 ) {
say "Found suitable system Xmake: $sys_path ($ver)";
return { install_type => 'system', version => $ver, bin => "$sys_path" };
}
say "System Xmake found ($ver) but is older than required ($target_version).";
}
}
# Check build dir (idempotency)
my $install_dir = path('blib/lib/Alien/Xmake/share')->absolute;
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
$blib_bin = $fallback if -x $fallback;
}
if ( -x $blib_bin ) {
my $ver = $self->_get_xmake_version($blib_bin);
if ( $self->_version_cmp( $ver, $target_version ) >= 0 ) {
say "Alien-Xmake build up-to-date ($ver).";
return $self->_generate_share_config( $blib_bin, $ver );
}
}
# Check existing shared installation for upgrading
my $existing = $self->_check_existing_share();
if ($existing) {
my $ex_ver = $existing->{version};
my $ex_dir = path( $existing->{install_dir} )->absolute;
if ( $self->_version_cmp( $ex_ver, $target_version ) >= 0 ) {
say "Found valid private Xmake ($ex_ver) in $ex_dir";
if ( $ex_dir->stringify ne $install_dir->stringify ) {
say 'Copying existing installation to build directory...';
$self->_copy_directory( $ex_dir, $install_dir );
}
# Re-locate binary in new dir
my $bin_path = $install_dir->child( 'bin', $bin_name );
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
return $self->_generate_share_config( $bin_path, $ex_ver );
}
}
# Download and Install
say 'Installing a private copy of Xmake...';
if ( $^O eq 'MSWin32' ) {
$self->_install_windows($install_dir);
}
else {
$self->_install_unix($install_dir);
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
}
if ( !-x $bin_path ) {
die "Installation finished, but binary not found at $bin_path";
}
my $ver = $self->_get_xmake_version($bin_path);
say "Private install successful: $ver";
return $self->_generate_share_config( $bin_path, $ver );
}
method _generate_share_config( $bin_path, $version ) {
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
}
};
1;
PERL
$dest->spew_utf8($content);
say "Generated $dest";
}
method _install_windows ($installdir) {
my $temppath = path('_build_xmake');
$temppath->mkpath;
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
}
my $install_str = $installdir->stringify;
$install_str =~ s{/}{\\}g;
my $outfile_str = $outfile->stringify;
$outfile_str =~ s{/}{\\}g;
say "Installing to $install_str...";
# /NOADMIN: Avoid UAC prompt if possible (installs to local user path if allowed)
# /S: Silent
# /D: Destination directory
my $cmd = qq{"$outfile_str" /NOADMIN /S /D=$install_str};
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
}
unless ( $self->_test_tools() ) {
# Do not auto-install system tools unless requested.
if ( $ENV{ALIEN_INSTALL_SYSTEM_TOOLS} ) {
say 'Attempting to install system tools via package manager...';
if ( $self->_install_tools($sudo) ) {
$self->_test_tools() or $self->_raise_dep_error();
}
else {
$self->_raise_dep_error();
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
@urls = ( $gh_url, $cdn_url );
}
my $outfile = $build_dir->child('xmake.run');
my $downloaded = 0;
for my $url (@urls) {
say "Attempting download from $url...";
if ( $self->_download_file( $url, $outfile ) ) {
$downloaded = 1;
last;
}
}
die 'All download attempts failed.' unless $downloaded;
say 'Extracting source bundle...';
$self->_run_cmd( 'sh', $outfile, '--noexec', '--quiet', '--target', $build_dir ) or die 'Failed to extract .run file';
my $cwd = cwd();
chdir $build_dir or die 'Cannot chdir to build dir';
say 'Building Xmake...';
# DETERMINE MAKE
# On FreeBSD/NetBSD/OpenBSD/DragonFly, 'make' is BSD make.
# Xmake generates GNU makefiles. We MUST use gmake.
my $make_cmd = 'make';
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
}
elsif ( $self->_run_cmd('gmake --version >/dev/null 2>&1') ) {
$make_cmd = 'gmake';
}
if ( -f 'configure' ) {
say "Configuring with make=$make_cmd...";
system( './configure', "--make=$make_cmd" ) == 0 or die 'Configure failed';
system( $make_cmd, '-j4' ) == 0 or die 'Make failed';
say "Installing to $installdir...";
system( $make_cmd, 'install', "PREFIX=$installdir" ) == 0 or die 'Install failed';
}
else {
system( $make_cmd, 'build', '-j4' ) == 0 or die 'Make build failed';
system( $make_cmd, 'install', "prefix=$installdir" ) == 0 or die 'Make install failed';
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
method _get_fast_host ( ) {
if ( $ENV{GITHUB_ACTIONS} ) {
return 'github.com';
}
say 'Testing connection speed to github.com vs gitee.com...';
my $speed_gitee = $self->_get_host_speed('gitee.com');
my $speed_github = $self->_get_host_speed('github.com');
if ( $speed_gitee <= $speed_github ) {
return 'gitee.com';
}
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
method _download_file ( $url, $dest ) {
my $dest_str = "$dest";
# Try HTTP::Tiny + IO::Socket::SSL
if ( eval { require IO::Socket::SSL; 1 } ) {
say 'Downloading with HTTP::Tiny...';
my $http = HTTP::Tiny->new( verify_SSL => 1 );
my $res = $http->mirror( $url, $dest_str );
if ( $res->{success} ) {
return 1;
}
say "HTTP::Tiny failed: $res->{status} $res->{reason}";
}
else {
say 'HTTP::Tiny skipped: IO::Socket::SSL not installed.';
}
# Try curl
if ( $self->_run_cmd('curl --version >/dev/null 2>&1') ) {
say 'Downloading with curl...';
# -L: Follow redirects, -f: Fail on error, -o: Output
if ( $self->_run_cmd( 'curl', '-L', '-f', '-o', $dest_str, $url ) ) {
return 1;
}
say 'curl failed.';
}
# Try wget
if ( $self->_run_cmd('wget --version >/dev/null 2>&1') ) {
say 'Downloading with wget...';
if ( $self->_run_cmd( 'wget', '--quiet', '-O', $dest_str, $url ) ) {
return 1;
}
say 'wget failed.';
}
return 0;
}
method _test_tools ( ) {
say 'Checking build tools...';
my $ok = 1;
if ( $self->_run_cmd('git --version >/dev/null 2>&1') ) {
say ' - git: Found';
}
else {
say ' - git: Missing';
$ok = 0;
}
# GNU or BSD make
my $found_make = 0;
if ( $self->_run_cmd('gmake --version >/dev/null 2>&1') ) {
say ' - make: Found (gmake)';
$found_make = 1;
}
elsif ( $self->_run_cmd('make --version >/dev/null 2>&1') ) {
say ' - make: Found (make - likely GNU compatible)';
$found_make = 1;
}
elsif ( $self->_run_cmd('make -V MACHINE >/dev/null 2>&1') ) {
say ' - make: Found (make - BSD)';
# If we are on BSD, this is technically 'found', but we know it won't work for Xmake.
# We must fail here to trigger the installer if we are on BSD.
if ( $^O =~ /bsd/i || $^O eq 'dragonfly' ) {
say ' ! Note: BSD make is not compatible with Xmake build (needs gmake).';
}
else {
$found_make = 1; # On non-BSD systems, maybe they have a different make setup.
}
}
# STRICT CHECK for BSDs
if ( $^O =~ /bsd/i || $^O eq 'dragonfly' ) {
unless ( $self->_run_cmd('gmake --version >/dev/null 2>&1') ) {
say ' - make: Missing gmake (Required on FreeBSD/BSD for Xmake build)';
$found_make = 0;
$ok = 0;
}
else {
$found_make = 1;
}
}
unless ($found_make) {
say ' - make: Missing';
$ok = 0;
}
# Compiler
my $found_cc = 0;
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
my $pid = open( my $ph, '|-', "$cmd_str >/dev/null 2>&1" );
if ($pid) {
print $ph $prog;
close $ph;
if ( $? == 0 ) {
say " - compiler: Found ($name)";
$found_cc = 1;
last;
}
}
}
unless ($found_cc) {
say ' - compiler: Missing (checked cc, gcc, clang)';
$ok = 0;
}
return $ok;
}
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
[ 'xbps-install --version', 'xbps-install -Sy git base-devel' ]
);
for my $pair (@installers) {
my ( $check, $install ) = @$pair;
if ( $self->_run_cmd( $check . ' >/dev/null 2>&1' ) ) {
say "Detected package manager via: $check";
say 'Attempting to install dependencies...';
return $self->_run_cmd( $sudo . ' ' . $install );
}
}
return 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
include/boost/numeric/conversion/detail/old_numeric_cast.hpp view on Meta::CPAN
};
template <>
struct greater_than_type_max<false, true>
{
// What does the standard say about this? I think it's right, and it
// will work with every compiler I know of.
template <class X, class Y>
static inline bool check(X x, Y)
{ return x >= 0 && static_cast<X>(static_cast<Y>(x)) != x; }
};
include/boost/numeric/conversion/detail/old_numeric_cast.hpp view on Meta::CPAN
};
template <>
struct greater_than_type_max<false, false>
{
// What does the standard say about this? I think it's right, and it
// will work with every compiler I know of.
template <class X, class Y>
static inline bool check(X x, Y)
{ return static_cast<X>(static_cast<Y>(x)) != x; }
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/bz2/Installer.pm view on Meta::CPAN
version of bz2 that you use, and bz2 is not an optional
requirement, then you are probably more interested in using
L<Alien::bz2>.
Where L<Alien::bz2::Installer> is useful is when you have
specific version requirements (say you require 3.0.x but 2.7.x
will not do), but would still like to use the system bz2
if it is available.
=head1 CLASS METHODS
view all matches for this distribution
view release on metacpan or search on metacpan
libcares/CMakeLists.txt view on Meta::CPAN
CHECK_SYMBOL_EXISTS (MSG_NOSIGNAL "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_MSG_NOSIGNAL)
CHECK_SYMBOL_EXISTS (PF_INET6 "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_PF_INET6)
CHECK_SYMBOL_EXISTS (SO_NONBLOCK "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_SO_NONBLOCK)
# XCode v8 bug: iOS when targeting less than v10, or MacOS when targeting less than v10.12 will
# say clock_gettime exists, it is a weak symbol that only exists in iOS10/MacOS10.12 and will
# cause a crash at runtime when running on older versions. Skip finding CLOCK_MONOTONIC on older
# OS's.
IF ((NOT APPLE) OR IOS_V10 OR MACOS_V1012)
CHECK_SYMBOL_EXISTS (CLOCK_MONOTONIC "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CLOCK_GETTIME_MONOTONIC)
ENDIF ()
view all matches for this distribution
view release on metacpan or search on metacpan
patch/flex-2.6.4.diff view on Meta::CPAN
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named 'Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
+ am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
patch/flex-2.6.4.diff view on Meta::CPAN
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named 'Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
+ am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
view all matches for this distribution
view release on metacpan or search on metacpan
filter => qr/^freexl-([0-9\.]+)\.tar\.gz$/,
version => qr/^freexl-([0-9\.]+)\.tar\.gz$/,
);
my $lib_version = get_lib_version() // 'not yet defined';
say "Downloaded version is $lib_version";
plugin Extract => (format => 'tar.gz');
plugin 'Build::Autoconf' => ();
my $make_cmd = '%{make}';
my $make_inst_cmd = '%{make} install';
my @make_clean;
# try not to exceed the cpan-testers log limits
if ($on_automated_rig) {
say "Running under CI or automated testing";
$make_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|build.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" || type build.log/;
$make_inst_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|install.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" || type install.log/;
if (!$on_windows) {
$make_cmd =~ s/%%/%/;
$make_cmd =~ s/type/cat/;
my @la_files
= File::Find::Rule->file()
->name( '*.la' )
->in( '.' );
foreach my $file (@la_files) {
say "Renaming $file so it will not intefere with gdal compilation";
rename $file, $file . '.bak';
}
}
sub pause {
return; # re-enable in case of debug
return if $on_automated_rig;
return if !$on_windows;
say "CONTINUE?";
my $response = <>;
while (not $response =~ /yes/) {
$response = <>;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
# might also be able to access via old hash via https://metacpan.org/pod/Alien::Build#install_prop
my $have_alien_gdal = eval 'require Alien::gdal';
my $copy_from_dir;
if ($ENV{ALIEN_SHARE_RECYCLE} && $have_alien_gdal && Alien::gdal->install_type eq 'share') {
my $ag_version = Alien::gdal->version;
say "Found existing gdal via alien ($ag_version) in " . Alien::gdal->dist_dir;
# append the relevant path
if (versioncmp($ag_version, $min_target_version) >= 0) {
$copy_from_dir = Alien::gdal->dist_dir;
}
}
my $make_inst_cmd = '%{make} install';
my @automated_rig_config_args;
# try not to exceed the cpan-testers log limits
if ($on_automated_rig) {
say "Running under CI or automated testing";
$make_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|build.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" /;
$make_inst_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|install.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" /;
if (!$on_windows) {
$make_cmd =~ s/%%/%/;
$make_cmd =~ s/"/'/g;
push @LD_LIBRARY_PATH, @ld_lib_path;
Alien::Build->log('LD_LIBRARY_PATH: ' . join ':', grep {defined} @LD_LIBRARY_PATH);
}
#foreach my $env_var (qw /LD_LIBRARY_PATH DYLD_LIBRARY_PATH LDFLAGS CFLAGS CXXFLAGS/) {
# say "ENV: $env_var is " . ($ENV{$env_var} // '');
#}
if (@cmake_prefix_path) {
my $path = join $Config{path_sep}, @cmake_prefix_path;
meta->around_hook(
build => sub {
sub update_pkg_conf_path {
return if !$on_windows;
use Env qw /@PKG_CONFIG_PATH/;
say 'Modifying drive paths in PKG_CONFIG_PATH';
say $ENV{PKG_CONFIG_PATH};
# msys-ificate drive paths
@PKG_CONFIG_PATH = map {my $x = $_; $x =~ s{^([a-z]):}{/$1}i; $x} @PKG_CONFIG_PATH;
say $ENV{PKG_CONFIG_PATH};
return;
}
# git for windows clashes with MSYS
sub pause {
return; # re-enable in case of debug
# return if $on_automated_rig;
# return if !$on_windows;
say "CONTINUE?";
my $response = <>;
while (not $response =~ /yes/) {
$response = <>;
}
}
->in( '.' );
my @pkg_configs
= File::Find::Rule->file()
->name( 'gdal.pc' )
->in( '.' );
say 'gdal-configs: ' . join ' ', @gdal_configs;
say 'pkg-configs: ' . join ' ', @pkg_configs;
return if !@gdal_configs || !@pkg_configs;
open my $gc_fh, '<', $gdal_configs[0] or die $!;
my $dep_libs = '';
}
close $pk_fh;
# change all (we should be more nuanced and do only the one that matters)
foreach my $pkg_config_file (@pkg_configs) {
say "Adding gdal dep_libs to $pkg_config_file";
# now add the dep libs to the pkg_conf file
open $pk_fh, '>', $pkg_config_file or die $!;
foreach my $line (@pkg_conf) {
if ($line =~ /^CONFIG_INST_LIBS/) {
chomp $line;
view all matches for this distribution
view release on metacpan or search on metacpan
filter => qr/^geos-([0-9\.]+)\.tar\.bz2$/,
version => qr/^geos-([0-9\.]+)\.tar\.bz2$/,
);
my $geos_version = get_geos_version() // 'not yet defined';
say "Downloaded version is $geos_version";
plugin Extract => (format => 'tar.bz2');
#plugin 'Build::Autoconf' => ();
plugin 'Build::CMake';
my $run_tests = $ENV{ALIEN_GEOS_ENABLE_TESTS};
my $run_tests_bool_text = $run_tests ? 'ON' : 'OFF';
# try not to exceed the cpan-testers log limits
if ($on_automated_rig) {
say "Running under CI or automated testing";
$make_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|build.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" || type build.log/;
$make_inst_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|install.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" || type install.log/;
if (!$on_windows) {
$make_cmd =~ s/%%/%/;
$make_cmd =~ s/type/cat/;
@rpath,
'-DBUILD_GEOSOP=OFF',
'..'
];
#say join ' ', @$cmake_cmd;
build [
#\&set_rectangle_intersection, # disable
#"%{configure} $with_local $with_cpp11 $build_static",
#'echo %{make}',
# disabled in GEOS in the first place
return;
return if $build->install_type ne 'share';
say 'set_rectangle_intersection: Currently in ' . getcwd();
use File::Find::Rule;
use Path::Tiny qw /path/;
my (@files)
= File::Find::Rule
->file()
->name( 'Geometry.cpp' )
->in( $base_dir );
# loop is brute force
foreach my $file (@files) {
say "Modifying file $file";
path($file)->edit (
sub {
s{^//(#define USE_RECTANGLE_INTERSECTION 1)}{$1}ms;
}
);
my @la_files
= File::Find::Rule->file()
->name( '*.la' )
->in( '.' );
foreach my $file (@la_files) {
say "Renaming $file so it will not interfere with gdal compilation";
rename $file, $file . '.bak';
}
}
sub pause {
#return; # disable
#return if !$on_windows || $on_automated_rig;
say "CONTINUE?";
my $response = <>;
while (not $response =~ /yes/) {
$response = <>;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/ffi/init.c view on Meta::CPAN
//#endif
#include <ffi_platypus_bundle.h>
void ffi_pl_bundle_init(const char *package, int argc, void *argv[]) {
// version = argv[0];
// say = argv[1];
// say("in init!");
// snprintf(buffer, 512, "package = %s, version = %s", package, version);
// say(buffer);
// snprintf(buffer, 512, "args = %d", argc);
// say(buffer);
}
void ffi_pl_bundle_fini(const char *package) {
// say("in fini!");
}
int Log(const char *line) {
//#ifdef _WIN32
//warn(line);
view all matches for this distribution
view release on metacpan or search on metacpan
#$build->runtime_prop->{$flag} = '-Wl,-rpath,/usr/pkg/lib ' . $build->runtime_prop->{$flag};
});
after 'gather' => sub {
my ($build) = @_;
use Data::Dumper; CORE::say Dumper($build);
};
share {
# The tarball from the 1.1.8 release and the 1.1.8 tag produce different
# libraries -- and from some preliminary testing, the tarball version isn't
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/libsndfile.pm view on Meta::CPAN
palien --cflags Alien::libsndfile
Or alternativly, this one-liner:
perl -MAlien::libsndfile -E 'say Alien::libsndfile->cflags'
Run this command to obtain the library flags
palien --cflags Alien::libsndfile
Or alternativly, this one-liner:
perl -MAlien::libsndfile -E 'say Alien::libsndfile->libs'
See also L<palien|App::palien> and L<Alien::Base>
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
);
my $lib_version = get_lib_version() // 'not yet defined';
say "Downloaded version is $lib_version";
plugin Extract => (format => 'tar.gz');
plugin 'Build::Autoconf' => ();
my $make_cmd = '%{make}';
my $make_inst_cmd = '%{make} install';
my @make_clean;
# try not to exceed the cpan-testers log limits
if ($on_automated_rig) {
say "Running under CI or automated testing";
$make_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|build.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" || type build.log/;
$make_inst_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|install.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" || type install.log/;
if (!$on_windows) {
$make_cmd =~ s/%%/%/;
$make_cmd =~ s/type/cat/;
# clean up the build dir on cpan testers etc
plugin 'Cleanse::BuildDir';
}
## remove any git utils from the path
##say join ' ', @PATH;
#my $have_git_in_path = grep {$_ =~ m|Git[/\\]usr[/\\]bin|} @PATH;
#if ($on_windows && $have_git_in_path) {
# warn 'Found Git/usr/bin in path and removed it for compilation';
# #say $ENV{PATH};
# @PATH = grep {not $_ =~ m|Git[/\\]usr[/\\]bin$|} @PATH;
# #say $ENV{PATH};
#}
meta->around_hook(
build => sub {
my ($orig, $build, @args) = @_;
$build->log("Setting CCACHE_BASEDIR to " . getcwd());
sub pause {
return; # re-enable in case of debug
return if $on_automated_rig;
return if !$on_windows;
say "CONTINUE?";
my $response = <>;
while (not $response =~ /yes/) {
$response = <>;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/poetry.pm view on Meta::CPAN
=head1 SYNOPSIS
use Alien::poetry;
#Â the poetry application
say Alien::poetry->poetry;
=head1 DESCRIPTION
L<Alien::poetry> downloads and installs poetry.
view all matches for this distribution
view release on metacpan or search on metacpan
unshift @PATH, $lib->dist_dir . '/dynamic';
}
$lib = 'Alien::libtiff';
$have{$lib} = eval "require $lib";
if ($have{$lib}) {
#say 'Adding libtiff dependency';
unshift @PATH, $lib->bin_dir;
push @dep_aliens, $lib if $lib->install_type eq 'share';
my $p;
if ($on_windows && $lib->install_type eq 'system') {
# dirty hack for strawberry perl
elsif ($lib->install_type eq 'share') {
$p = path ($lib->dist_dir, 'lib', 'pkgconfig');
}
if ($p && -e $p) {
push @PKG_CONFIG_PATH, $p;
say join ' ', @PKG_CONFIG_PATH;
}
}
say "Alien::sqlite has sqlite version " . Alien::sqlite->version;
my $min_target_version = '7.1';
plugin 'PkgConfig' => (
pkg_name => 'proj',
share {
# see if this helps with cirrus bsd builds
#$ENV{SQLITE3_CFLAGS} = Alien::sqlite->cflags;
#$ENV{SQLITE3_LIBS} = Alien::sqlite->libs;
#say "sqlite cflags: " . Alien::sqlite->cflags;
#say "sqlite libs: " . Alien::sqlite->libs;
#if ($have{'Alien::libtiff'}) {
# my $p = path ('Alien::libtiff'->dist_dir, 'lib');
# $ENV{TIFF_LIBS}
# ||= (-e $p
# ? "-L$p "
# : ''
# )
# . 'Alien::libtiff'->libs;
# say "libtiff libs: $ENV{TIFF_LIBS}";
#}
plugin 'Build::SearchDep' => (
aliens => [ grep {$_->install_type eq 'share'} @dep_aliens ],
public_I => 1,
filter => qr/^proj-([0-9\.]+)\.tar\.gz$/,
version => qr/^proj-([0-9\.]+)\.tar\.gz$/,
);
my $proj_version = get_proj_version() // 'not yet defined';
say "Downloaded proj version is $proj_version";
die "Downloaded proj version $proj_version is too low "
. "(should be >= $min_target_version).\n"
. "Please update your Alien::Build::Fetch::Cache if using one."
if defined $proj_version
my $make_cmd = '%{make}';
my $make_inst_cmd = '%{make} install';
my @make_clean;
# try not to exceed the cpan-testers log limits
if ($on_automated_rig) {
say "Running under CI or automated testing";
#$make_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|build.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" || type build.log/;
#$make_inst_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|install.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" || type install.log/;
#if (!$on_windows) {
# $make_cmd =~ s/%%/%/;
# $make_cmd =~ s/type/cat/;
# silence an undef warning
Alien::Build->log ('PKG_CONFIG_PATH:' . join ' ', grep {defined} @PKG_CONFIG_PATH);
foreach my $env_var (qw /LD_LIBRARY_PATH LDFLAGS CFLAGS CXXFLAGS/) {
say "ENV: $env_var is " . ($ENV{$env_var} // '');
}
# try to fix some rpath issues
# See also:
# https://github.com/OSGeo/gdal/issues/5413#issuecomment-1060286925
sub update_pkg_conf_path {
return;
return if !$on_windows;
# should be a before or around hook
use Env qw /@PKG_CONFIG_PATH/;
say 'Modifying drive paths in PKG_CONFIG_PATH';
say $ENV{PKG_CONFIG_PATH};
# msys-ificate drive paths
@PKG_CONFIG_PATH = map {my $r=$_; $r=~s{^([a-z]):}{/$1}i; $r} @PKG_CONFIG_PATH;
# make sure we get the dynamic libcurl
# (although the proj configure script does not currently use it)
@PKG_CONFIG_PATH
= map {my $r=$_; $r=~s{Alien-curl[/\\]lib[/\\]pkgconfig}{Alien-curl/dynamic/pkgconfig}i; $r}
@PKG_CONFIG_PATH;
$ENV{PKG_CONFIG_PATH} = join ':', @PKG_CONFIG_PATH;
say $ENV{PKG_CONFIG_PATH};
return;
}
sub pause {
return; # re-enable in case of debug
return if $on_automated_rig;
return if !$on_windows;
say "CONTINUE?";
my $response = <>;
while (not $response =~ /yes/) {
$response = <>;
}
}
EOD
;
while (my $line = <$fh>) {
if ($line =~ /^\s*configure_proj_pc/) {
#say STDERR "ADDING TO CMAKE LISTS";
$line .= $define_check;
}
$file_contents .= $line;
}
$fh->close;
view all matches for this distribution
view release on metacpan or search on metacpan
filter => qr/^libspatialite-([0-9\.]+[a-z]?)\.tar\.gz$/,
version => qr/^libspatialite-([0-9\.]+[a-z]?)\.tar\.gz$/,
);
my $lib_version = get_lib_version() // 'not yet defined';
say "Downloaded spatialite version is $lib_version";
plugin Extract => (format => 'tar.gz');
plugin 'Build::Autoconf' => ();
/);
# see if this helps with cirrus bsd builds
#$ENV{SQLITE3_CFLAGS} = Alien::sqlite->cflags;
#$ENV{SQLITE3_LIBS} = Alien::sqlite->libs;
#say "sqlite cflags: " . Alien::sqlite->cflags;
#say "sqlite libs: " . Alien::sqlite->libs;
if ($^O =~ /bsd/) {
plugin 'Build::Make' => 'gmake';
if (-d '/usr/local') {
$with_local = ' --with-local=/usr/local ';
my $make_cmd = '%{make}';
my $make_inst_cmd = '%{make} install';
my @make_clean;
# try not to exceed the cpan-testers log limits
if ($on_automated_rig) {
say "Running under CI or automated testing";
$make_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|build.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" || type build.log/;
$make_inst_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|install.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" || type install.log/;
if (!$on_windows) {
$make_cmd =~ s/%%/%/;
$make_cmd =~ s/type/cat/;
sub pause {
return; # re-enable in case of debug
return if $on_automated_rig;
return if !$on_windows;
say "CONTINUE?";
my $response = <>;
while (not $response =~ /yes/) {
$response = <>;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
version => '3.39.3',
);
my $lib_version = get_lib_version() // 'not yet defined';
say "Downloaded version is $lib_version";
plugin Extract => (format => 'tar.gz');
plugin 'Build::Autoconf' => ();
my $make_cmd = '%{make}';
my $make_inst_cmd = '%{make} install';
my @make_clean;
# try not to exceed the cpan-testers log limits
if ($on_automated_rig) {
say "Running under CI or automated testing";
$make_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|build.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" || type build.log/;
$make_inst_cmd .= q/ | perl -ne "BEGIN {$|=1; open our $log, q|>|, q|install.log|}; print qq|\n| if 0 == ($. %% 100); print q|.|; print {$log} $_;" || type install.log/;
if (!$on_windows) {
$make_cmd =~ s/%%/%/;
$make_cmd =~ s/type/cat/;
sub pause {
return; # re-enable in case of debug
return if $on_automated_rig;
return if !$on_windows;
say "CONTINUE?";
my $response = <>;
while (not $response =~ /yes/) {
$response = <>;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/ultraviolet.pm view on Meta::CPAN
=head1 SYNOPSIS
use Alien::ultraviolet;
#Â the uv application
say Alien::ultraviolet->uv;
=head1 DESCRIPTION
L<Alien::ultraviolet> downloads and installs uv.
view all matches for this distribution
view release on metacpan or search on metacpan
libuv/src/win/fs.c view on Meta::CPAN
/* Todo: set st_flags to something meaningful. Also provide a wrapper for
* chattr(2).
*/
statbuf->st_flags = 0;
/* Windows has nothing sensible to say about these values, so they'll just
* remain empty.
*/
statbuf->st_gid = 0;
statbuf->st_uid = 0;
statbuf->st_rdev = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
builder/xmake.pm view on Meta::CPAN
sub get_fast_host {
my $gitee_speed = get_host_speed("gitee.com");
my $github_speed = get_host_speed("github.com");
#~ CORE::say "gitee.com mirror took $gitee_speed ms";
#~ CORE::say "github.com mirror took $github_speed ms";
if ( $gitee_speed <= $github_speed ) {
return 'gitee.com';
}
else {
return 'github.com';
builder/xmake.pm view on Meta::CPAN
last;
}
}
if ( !$git ) { warn 'Cannot locate git. Giving up'; exit 1; }
my $mirror = get_fast_host();
CORE::say "Using $mirror mirror...";
my ( $gitrepo, $gitrepo_raw );
if ( $mirror eq 'github.com' ) {
$gitrepo = 'https://github.com/xmake-io/xmake.git';
#$gitrepo_raw='https://github.com/xmake-io/xmake/raw/master';
view all matches for this distribution