-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
201 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,8 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
cip_tag: | ||
- "5.37" | ||
- "5.39" | ||
- "5.38" | ||
- "5.36" | ||
- "5.34" | ||
- "5.32" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Alien::cue ![static](https://github.com/PerlAlien/Alien-cue/workflows/static/badge.svg) ![linux](https://github.com/PerlAlien/Alien-cue/workflows/linux/badge.svg) | ||
|
||
Find or download the cue configuration language tool | ||
|
||
# SYNOPSIS | ||
|
||
In your script or module: | ||
|
||
```perl | ||
use Alien::cue; | ||
use Env qw( @PATH ); | ||
|
||
unshift @PATH, Alien::cue->bin_dir; | ||
``` | ||
|
||
# DESCRIPTION | ||
|
||
This package can be used by other CPAN modules that require cue, | ||
the configuration language tool. | ||
|
||
# HELPERS | ||
|
||
## cue | ||
|
||
``` | ||
%{cue} | ||
``` | ||
|
||
Returns the name of the cue command. Usually just `cue`. | ||
|
||
# SEE ALSO | ||
|
||
[Alien](https://metacpan.org/pod/Alien), [Alien::Base](https://metacpan.org/pod/Alien::Base), [Alien::Build::Manual::AlienUser](https://metacpan.org/pod/Alien::Build::Manual::AlienUser) | ||
|
||
# AUTHOR | ||
|
||
Graham Ollis <[email protected]> | ||
|
||
# COPYRIGHT AND LICENSE | ||
|
||
This software is copyright (c) 2024 by Graham Ollis. | ||
|
||
This is free software; you can redistribute it and/or modify it under | ||
the same terms as the Perl 5 programming language system itself. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,31 @@ | ||
use alienfile; | ||
plugin 'PkgConfig' => 'libfoo'; | ||
|
||
plugin 'Probe::CommandLine' => ( | ||
command => 'cue', | ||
args => [ 'version' ], | ||
match => qr/cue version/, | ||
version => qr/cue version ([0-9\.]+)/, | ||
); | ||
|
||
share { | ||
plugin Download => ( | ||
url => 'http://...', | ||
filter => qr/*\.tar\.gz$/, | ||
version => qr/([0-9\.]+)/, | ||
|
||
requires 'Alien::Go'; | ||
|
||
plugin 'Download::GitHub' => ( | ||
github_user => 'cue-lang', | ||
github_repo => 'cue', | ||
prefer => sub { | ||
my($build, $res) = @_; | ||
return { | ||
type => 'list', | ||
list => [grep { $_->{version} !~ /alpha/ } @{ $res->{list} }], | ||
}; | ||
}, | ||
); | ||
plugin Extract => 'tar.gz'; | ||
plugin 'Build::Autoconf'; | ||
}; | ||
|
||
build [ | ||
'env GOPATH=%{.install.prefix} go install ./cmd/cue', | ||
'env GOPATH=%{.install.prefix} go clean -modcache', | ||
]; | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
use Test2::V0 -no_srand => 1; | ||
use Config; | ||
|
||
eval { require 'Test/More.pm' }; | ||
|
||
# This .t file is generated. | ||
# make changes instead to dist.ini | ||
|
||
my %modules; | ||
my $post_diag; | ||
|
||
$modules{$_} = $_ for qw( | ||
Alien::Base | ||
Alien::Build | ||
Alien::Build::MM | ||
Alien::Build::Plugin::Download::GitHub | ||
ExtUtils::MakeMaker | ||
Test2::V0 | ||
Test::Alien | ||
); | ||
|
||
|
||
|
||
my @modules = sort keys %modules; | ||
|
||
sub spacer () | ||
{ | ||
diag ''; | ||
diag ''; | ||
diag ''; | ||
} | ||
|
||
pass 'okay'; | ||
|
||
my $max = 1; | ||
$max = $_ > $max ? $_ : $max for map { length $_ } @modules; | ||
our $format = "%-${max}s %s"; | ||
|
||
spacer; | ||
|
||
my @keys = sort grep /(MOJO|PERL|\A(LC|HARNESS)_|\A(SHELL|LANG)\Z)/i, keys %ENV; | ||
|
||
if(@keys > 0) | ||
{ | ||
diag "$_=$ENV{$_}" for @keys; | ||
|
||
if($ENV{PERL5LIB}) | ||
{ | ||
spacer; | ||
diag "PERL5LIB path"; | ||
diag $_ for split $Config{path_sep}, $ENV{PERL5LIB}; | ||
|
||
} | ||
elsif($ENV{PERLLIB}) | ||
{ | ||
spacer; | ||
diag "PERLLIB path"; | ||
diag $_ for split $Config{path_sep}, $ENV{PERLLIB}; | ||
} | ||
|
||
spacer; | ||
} | ||
|
||
diag sprintf $format, 'perl', "$] $^O $Config{archname}"; | ||
|
||
foreach my $module (sort @modules) | ||
{ | ||
my $pm = "$module.pm"; | ||
$pm =~ s{::}{/}g; | ||
if(eval { require $pm; 1 }) | ||
{ | ||
my $ver = eval { $module->VERSION }; | ||
$ver = 'undef' unless defined $ver; | ||
diag sprintf $format, $module, $ver; | ||
} | ||
else | ||
{ | ||
diag sprintf $format, $module, '-'; | ||
} | ||
} | ||
|
||
if($post_diag) | ||
{ | ||
spacer; | ||
$post_diag->(); | ||
} | ||
|
||
spacer; | ||
|
||
done_testing; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters