Alien-Xmake
view release on metacpan or search on metacpan
- **cachedir**
Global cache directory.
- **policies**
Global policy overrides (`--policies=`).
- **network**, **proxy**, **proxy\_hosts**, **proxy\_pac**
Network settings, e.g. `network => 'n'` to go offline, `insecure_ssl => 1` to skip HTTPS verification.
- **pkg\_searchdirs**, **pkg\_cachedir**, **pkg\_installdir**
Global package search/cache/install directories.
## `install( [$target], %options )`
```perl
$xmake->install;
$xmake->install('hello', installdir => './dist');
eg/examples/Alien-Lsquic/t/01_delegation.t view on Meta::CPAN
is $lsquic->ffi_lib, undef, 'ffi_lib is undef before install';
is $lsquic->version, undef, 'version is undef before install';
is $lsquic->kind, undef, 'kind is undef before install';
is $lsquic->cflags, '', 'cflags is empty before install';
is $lsquic->libs, '', 'libs is empty before install';
my @bins = $lsquic->bin_dir;
is [@bins], [], 'bin_dir is empty before install';
is $lsquic->package_info, undef, 'package_info is undef before install';
}
# lsquic is a heavy CMake/Meson/boringssl build; only validate post-build
# delegation when ConfigData was actually generated.
SKIP: {
my $info = $lsquic->package_info;
skip 'package not installed; run `perl Build` first' => 4 unless $info;
ok $lsquic->libpath, 'libpath resolved';
ok $lsquic->version, 'version resolved';
ok $lsquic->cflags, 'cflags resolved';
ok $lsquic->find_header('lsquic.h'), 'lsquic.h findable';
}
#
lib/Alien/Xmake.pm view on Meta::CPAN
my @args;
push @args, '-c' if $opts{clean};
push @args, '--check' if $opts{check};
push @args, '--menu' if $opts{menu};
push @args, '--theme=' . $opts{theme} if $opts{theme};
push @args, '--debugger=' . $opts{debugger} if $opts{debugger};
push @args, '--ccache=' . $opts{ccache} if defined $opts{ccache};
push @args, '--cachedir=' . $opts{cachedir} if $opts{cachedir};
push @args, '--policies=' . $opts{policies} if $opts{policies};
push @args, '--network=' . $opts{network} if $opts{network};
push @args, '--insecure-ssl' if $opts{insecure_ssl};
push @args, '--proxy=' . $opts{proxy} if $opts{proxy};
push @args, '--proxy_hosts=' . $opts{proxy_hosts} if $opts{proxy_hosts};
push @args, '--proxy_pac=' . $opts{proxy_pac} if $opts{proxy_pac};
push @args, '--pkg_searchdirs=' . $self->_join( $opts{pkg_searchdirs}, ';' ) if $opts{pkg_searchdirs};
push @args, '--pkg_cachedir=' . $opts{pkg_cachedir} if $opts{pkg_cachedir};
push @args, '--pkg_installdir=' . $opts{pkg_installdir} if $opts{pkg_installdir};
push @args, $self->_global_config_args( \%opts );
push @args, $self->_extra_args( \%opts );
$self->_run( 'global', @args );
}
lib/Alien/Xmake.pod view on Meta::CPAN
=item B<cachedir>
Global cache directory.
=item B<policies>
Global policy overrides (C<--policies=>).
=item B<network>, B<proxy>, B<proxy_hosts>, B<proxy_pac>
Network settings, e.g. C<network =E<gt> 'n'> to go offline, C<insecure_ssl =E<gt> 1> to skip HTTPS verification.
=item B<pkg_searchdirs>, B<pkg_cachedir>, B<pkg_installdir>
Global package search/cache/install directories.
=back
=head2 C<install( [$target], %options )>
$xmake->install;
lib/Alien/Xrepo.pod view on Meta::CPAN
You are free to install B<both kinds into the same store>: C<ninja> next to C<libpng>. Use L<Affix>, L<FFI::Platypus>,
L<Inline>, or plain XS to bind the libraries, and C<bin_dir>/C<installdir> to locate and run the binaries.
While FFI or XS can handle the binding or linking to native functions, Alien::Xrepo handles the B<acquisition> of the
libraries and binaries. It automates the entire dependency lifecycle:
=over
=item 1. Provisioning:
Downloads and installs both libraries (C<libpng>, C<openssl>, ...) and binary tools (C<ninja>, C<python>, ...) via
C<xrepo>, handling version constraints and custom repository lookups.
=item 2. Configuration:
Ensures libraries are compiled with FFI compatible flags (forcing C<shared> libraries instead of static archives) and
supports cross-compilation parameters (platform, architecture, toolchains).
=item 3. Introspection:
Parses the build metadata to locate the exact absolute paths to the runtime binaries (C<.dll>, C<.so>, C<.dylib>) and
lib/Alien/Xrepo.pod view on Meta::CPAN
Always build and install from source.
=item B<debugdir>
Source directory used for debugging; enables C<force> and C<shallow> by default.
=item B<configs( ... )>
A hashref or string of package-specific configurations.
configs => { openssl => 'true', shared => 'true' }
# becomes --configs='openssl=true,shared=true'
=item B<includes>
A list or string of extra dependencies to include in the environment.
=item B<installdir>, B<cachedir>
Root directories for the installed packages and the download/build cache, applied per-call via the
C<XMAKE_PKG_INSTALLDIR> / C<XMAKE_PKG_CACHEDIR> environment variables. This lets each wrapper keep its libraries in a
project-local directory instead of the shared per-user store, which gives reproducible builds and protects against an
( run in 1.130 second using v1.01-cache-2.11-cpan-aadc1410aed )