Giter Site home page Giter Site logo

alien-meson's Introduction

NAME

Alien::Meson - Find or build meson build tool

SYNOPSIS

Command line tool:

use Alien::Meson;
use Env qw( @PATH );

unshift @PATH, Alien::Meson->bin_dir;
system "@{[ Alien::Meson->exe ]}";

Use in alienfile:

share {
  requires 'Alien::Meson';
  requires 'Alien::Ninja';
  # ...
  my $build_dir = '_build';
  build [
    sub {
      my $build = shift;
      Alien::Build::CommandSequence->new([
        Alien::Meson->exe, 'setup',
          '--prefix=%{.install.prefix}',
          $build_dir,
      ])->execute($build);
    },
    [ '%{ninja}', qw(-C), $build_dir, "test" ],
    [ '%{ninja}', qw(-C), $build_dir, 'install' ],
  ];
}

DESCRIPTION

This distribution provides meson so that it can be used by other Perl distributions that are on CPAN. It does this by first trying to detect an existing install of meson on your system. If found it will use that. If it cannot be found, the source code will be downloaded from the internet and it will be installed in a private share location for the use of other modules.

METHODS

exe

Alien::Meson->exe

Returns the command name for running meson.

_apply_destdir_prefix_hack

use alienfile;

eval {
  require Alien::Meson;
  Alien::Meson->_apply_destdir_prefix_hack;
};

share { ... }

Applies a hack to fix how the DESTDIR and prefix are joined to follow the approach that Meson takes. See issue at PerlAlien/Alien-Build#407 for more information.

WARNING: This is a hack. It is not expected to work long-term and if a better solution is possible, it will be deprecated then removed.

HELPERS

meson

%{meson}

WARNING: This interpolation is deprecated. This will be removed in a future version as some share installs of Meson are not callable as a single executable (they need to be prefixed with the Python interpreter). Instead use Alien::Meson->exe directly.

Returns 'meson', 'meson.py', or appropriate command for platform.

SEE ALSO

alien-meson's People

Watchers

 avatar

alien-meson's Issues

Work out how to prefer binary/source

Some systems do have Python3 installed and it would be preferable to use that
rather than the binary releases if possible. This should be controllable using
another environment variable.

  • default: prefer source-install if Python3 available, otherwise binary-install
  • source: prefer source-install
  • binary: prefer binary-install

For each of the above

  • source-install: if Python3 not available, bail out
  • binary-install: if binary release not available, bail out

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.