Alien-Build

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

     probe [ 'some command %{.meta.plugin_fetch_newprotocol_foo}' ];
     probe [ 'some command %{.install.plugin_fetch_newprotocol_bar}' ];
     probe [ 'some command %{.runtime.plugin_fetch_newprotocol_baz}' ];
     probe [ 'some command %{.meta.my_foo}' ];
     probe [ 'some command %{.install.my_bar}' ];
     probe [ 'some command %{.runtime.my_baz}' ];

 meta_prop

     my $href = $build->meta_prop;
     my $href = Alien::Build->meta_prop;

    Meta properties have to do with the recipe itself, and not any
    particular instance that probes or builds that recipe. Meta properties
    can be changed from within an alienfile using the meta_prop directive,
    or from a plugin from its init method (though should NOT be modified
    from any hooks registered within that init method). This is not
    strictly enforced, but if you do not follow this rule your recipe will
    likely be broken.

    arch

      This is a hint to an installer like Alien::Build::MM or
      Alien::Build::MB, that the library or tool contains architecture
      dependent files and so should be stored in an architecture dependent
      location. If not specified by your alienfile then it will be set to
      true.

    check_digest

      True if cryptographic digest should be checked when files are fetched
      or downloaded. This is set by Digest negotiator plugin.

    destdir

      Some plugins (Alien::Build::Plugin::Build::Autoconf for example)
      support installing via DESTDIR. They will set this property to true
      if they plan on doing such an install. This helps Alien::Build find
      the staged install files and how to locate them.

      If available, DESTDIR is used to stage install files in a sub
      directory before copying the files into blib. This is generally
      preferred method if available.

    destdir_filter

      Regular expression for the files that should be copied from the
      DESTDIR into the stage directory. If not defined, then all files will
      be copied.

    destdir_ffi_filter

      Same as destdir_filter except applies to build_ffi instead of build.

    digest

      This properties contains the cryptographic digests (if any) that
      should be used when verifying any fetched and downloaded files. It is
      a hash reference where the key is the filename and the value is an
      array reference containing a pair of values, the first being the
      algorithm ('SHA256' is recommended) and the second is the actual
      digest. The special filename * may be specified to indicate that any
      downloaded file should match that digest. If there are both real
      filenames and the * placeholder, the real filenames will be used for
      filenames that match and any other files will use the placeholder.
      Example:

       $build->meta_prop->{digest} = {
         'foo-1.00.tar.gz' => [ SHA256 => '9feac593aa49a44eb837de52513a57736457f1ea70078346c60f0bfc5f24f2c1' ],
         'foo-1.01.tar.gz' => [ SHA256 => '6bbde6a7f10ae5924cf74afc26ff5b7bc4b4f9dfd85c6b534c51bd254697b9e7' ],
         '*'               => [ SHA256 => '33a20aae3df6ecfbe812b48082926d55391be4a57d858d35753ab1334b9fddb3' ],
       };

      Cryptographic signatures will only be checked if the check_digest
      meta property is set and if the Digest negotiator plugin is loaded.
      (The Digest negotiator can be used directly, but is also loaded
      automatically if you use the digest directive is used by the
      alienfile).

    env

      Environment variables to override during the build stage.

    env_interpolate

      Environment variable values will be interpolated with helpers.
      Example:

       meta->prop->{env_interpolate} = 1;
       meta->prop->{env}->{PERL} = '%{perl}';

    local_source

      Set to true if source code package is available locally. (that is not
      fetched over the internet). This is computed by default based on the
      start_url property. Can be set by an alienfile or plugin.

    platform

      Hash reference. Contains information about the platform beyond just
      $^O.

      platform.compiler_type

	Refers to the type of flags that the compiler accepts. May be
	expanded in the future, but for now, will be one of:

	microsoft

	  On Windows when using Microsoft Visual C++

	unix

	  Virtually everything else, including gcc on windows.

	The main difference is that with Visual C++ -LIBPATH should be used
	instead of -L, and static libraries should have the .LIB suffix
	instead of .a.

      platform.system_type

README  view on Meta::CPAN


    probe_instance_id (probe)

      Probe and PkgConfig plugins may set this property indicating the
      plugin instance id that made the probe. If the probe results in a
      system install this will be propagated to system_probe_instance_id
      for later use.

METHODS

 checkpoint

     $build->checkpoint;

    Save any install or runtime properties so that they can be reloaded on
    a subsequent run in a separate process. This is useful if your build
    needs to be done in multiple stages from a Makefile, such as with
    ExtUtils::MakeMaker. Once checkpointed you can use the resume
    constructor (documented above) to resume the probe/build/install]
    process.

 root

     my $dir = $build->root;

    This is just a shortcut for:

     my $root = $build->install_prop->{root};

    Except that it will be created if it does not already exist.

 install_type

     my $type = $build->install_type;

    This will return the install type. (See the like named install property
    above for details). This method will call probe if it has not already
    been called.

 is_system_install

     my $boolean = $build->is_system_install;

    Returns true if the alien is a system install type.

 is_share_install

     my $boolean = $build->is_share_install;

    Returns true if the alien is a share install type.

 download_rule

     my $rule = $build->download_rule;

    This returns install rule as a string. This is determined by the
    environment and should be one of:

    warn

      Warn only if fetching via non secure source (secure sources include
      https, and bundled files, may include other encrypted protocols in
      the future).

    digest

      Require that any downloaded source package have a cryptographic
      signature in the alienfile and that signature matches what was
      downloaded.

    encrypt

      Require that any downloaded source package is fetched via secure
      source.

    digest_or_encrypt

      Require that any downloaded source package is either fetched via a
      secure source or has a cryptographic signature in the alienfile and
      that signature matches what was downloaded.

    digest_and_encrypt

      Require that any downloaded source package is both fetched via a
      secure source and has a cryptographic signature in the alienfile and
      that signature matches what was downloaded.

    The current default is warn, but in the near future this will be
    upgraded to digest_or_encrypt.

 set_prefix

     $build->set_prefix($prefix);

    Set the final (unstaged) prefix. This is normally only called by
    Alien::Build::MM and similar modules. It is not intended for use from
    plugins or from an alienfile.

 set_stage

     $build->set_stage($dir);

    Sets the stage directory. This is normally only called by
    Alien::Build::MM and similar modules. It is not intended for use from
    plugins or from an alienfile.

 requires

     my $hash = $build->requires($phase);

    Returns a hash reference of the modules required for the given phase.
    Phases include:

    configure

      These modules must already be available when the alienfile is read.

    any

      These modules are used during either a system or share install.

    share

      These modules are used during the build phase of a share install.

    system

      These modules are used during the build phase of a system install.

 load_requires

     $build->load_requires($phase);

    This loads the appropriate modules for the given phase (see requires
    above for a description of the phases).

 probe

     my $install_type = $build->probe;

    Attempts to determine if the operating system has the library or tool
    already installed. If so, then the string system will be returned and a
    system install will be performed. If not, then the string share will be
    installed and the tool or library will be downloaded and built from
    source.



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