Alien-Base-ModuleBuild

 view release on metacpan or  search on metacpan

lib/Alien/Base/ModuleBuild/API.pod  view on Meta::CPAN


[version 0.001]

An arrayref of commands used to test the library.  Each command is first
passed through the L<command interpolation engine|/"COMMAND INTERPOLATION">,
so those variables may be used.  The default is to do no tests.  The most
common command used by the GNU toolchain is C<[ 'make check' ]>, but beware
that is not supported by all packages.

[version 0.009]

Each command may be either a string or an array reference.  If the array
reference form is used, then the multiple argument form of system is used.

=item alien_version_check

[version 0.001]

A command to run to check the version of the library installed on the system. The default is C<pkg-config --modversion %n>.

=back

=head2 PACKAGE AND ENVIRONMENT VARIABLES

A few global variables are used to set gross behavior. For each pair of variables, if both are set, the environment variable takes precedence.

=over

=item $ENV{ALIEN_ARCH}

[version 0.017]

Setting this changes the default for alien_arch above.  If the module specifies its own alien_arch in its C<Build.PL> file then it will override this setting.  Typically installing into an architecture specific directory is what you
want to do, since most L<Alien::Base> based distributions provide architecture specific binary code, so you should consider carefully before installing modules with this environment variable set to 0.  This may be useful for
integrators creating a single non-architecture specific RPM, .deb or similar package.  In this case the integrator should ensure that the Alien package be installed with a system install_type and use the system package.

=item $ENV{ALIEN_BLIB}

Setting this to true indicates that you don't intend to actually install your Alien::Base subclass, but rather use it from the built F<blib> directory. This behavior is mostly to support automated testing from CPANtesters and should be automagically ...

=item $Alien::Base::ModuleBuild::Force

=item $ENV{ALIEN_FORCE}

Setting either to a true value will cause the builder to ignore a system-wide installation and build a local version of the library.  This is the equivalent to setting $ENV{ALIEN_INSTALL_TYPE} to 'share'.  $ENV{ALIEN_INSTALL_TYPE} takes precedence.

=item $ENV{ALIEN_INSTALL_TYPE}

Setting to C<share> will ignore a system-wide installation and build a local version of the library.  Setting to C<system> will only use a system-wide installation and die if it cannot be found.

=item $Alien::Base::ModuleBuild::Verbose

=item $ENV{ALIEN_VERBOSE}

Setting the either to a true value will output a little more info from within the module itself. At this point L<Alien::Base> is going to be fairly verbose without this enabled.

=back

=head2 CONFIG DATA

The L<Alien::Base> system needs to store some data to be used in other phases of the build and eventual use. This is done via the mechanism provided by L<Module::Build::ConfigData>. During the build-phase this information is mutable and is available ...

Config keys of interest are:

=over

=item name

Holder for C<alien_name> as needed by pkg-config.

=item install_type

Remembers if the library was found system-wide (value: C<system>) or was installed during build (value: C<share>).

=item pkgconfig

A hashref of Alien::Base::PkgConfig objects created from F<.pc> files found in C<working_directory>. One extra object (whose key is C<_manual> is created from the C<alien_provides_*> information.

=item version

The version number installed or available.

=item working_directory

Holder for the full path to the extracted source of the library. This is used to munge the pkg-config data later on.

=back

=head2 COMMAND INTERPOLATION

Before L<Alien::Base::ModuleBuild> executes system commands, it replaces a few special escape sequences with useful data. This is needed especially for referencing the full path to the C<alien_share_dir> before this path is known. The available seque...

=over

=item %{I<helper>}

[version 0.020]

Call the given helper, either provided by the C<alien_helper> or C<alien_bin_requires> property.  See L<Alien::Base#alien_helper>.

=item %c

Platform independent incantation for running autoconf C<configure> script.  On *nix systems this is C<./configure>, on Windows this is C<sh configure>.  On windows L<Alien::MSYS> is injected as a dependency and all commands are executed in an C<MSYS>...

=item %n

Shortcut for the name stored in C<alien_name>

 pkg-config --modversion %n

=item %p

B<deprecated>

Platform independent "local command prefix". On *nix systems this is C<./>, on Windows it is an empty string.

 %pconfigure

Please note that this only works to run scripts on Unix, and does not work on Windows.  It is thus, not fit for purpose and should not be used.  As an alternative:

=over 4



( run in 1.167 second using v1.01-cache-2.11-cpan-119454b85a5 )