| 1 | package Enbld::Definition::Ruby; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use parent qw/Enbld::Definition/; | ||
| 7 | |||
| 8 | require Enbld::Home; | ||
| 9 | |||
| 10 | sub initialize { | ||
| 11 | my $self = shift; | ||
| 12 | |||
| 13 | $self->SUPER::initialize; | ||
| 14 | |||
| 15 | $self->{defined}{ArchiveName} = 'ruby'; | ||
| 16 | $self->{defined}{WebSite} = 'https://www.ruby-lang.org'; | ||
| 17 | $self->{defined}{VersionForm} = '\d\.\d\.\d(-p\d{1,3})?'; | ||
| 18 | $self->{defined}{Dependencies} = [ 'openssl' ]; | ||
| 19 | $self->{defined}{DownloadSite} = 'http://cache.ruby-lang.org/pub/ruby/'; | ||
| 20 | |||
| 21 | $self->{defined}{AdditionalArgument} = \&set_argument; | ||
| 22 | $self->{defined}{SortedVersionList} = \&set_sorted_version_list; | ||
| 23 | |||
| 24 | return $self; | ||
| 25 | } | ||
| 26 | |||
| 27 | sub set_sorted_version_list { | ||
| 28 | my $attributes = shift; | ||
| 29 | |||
| 30 | my @sorted = sort { $a cmp $b } @{ $attributes->VersionList }; | ||
| 31 | |||
| 32 | return \@sorted; | ||
| 33 | } | ||
| 34 | |||
| 35 | sub set_argument { | ||
| 36 | return "--with-openssl-dir=" . Enbld::Home->library; | ||
| 37 | } | ||
| 38 | |||
| 39 | 1; | ||
| 40 | |||
| 41 | =pod | ||
| 42 | |||
| 43 | =head1 NAME | ||
| 44 | |||
| 45 | Enbld::Definition::Ruby - definition module for Ruby Programming Language | ||
| 46 | |||
| 47 | =head1 SEE ALSO | ||
| 48 | |||
| 49 | L<Ruby Programming Language|https://www.ruby-lang.org> | ||
| 50 | |||
| 51 | L<Enbld::Definition> | ||
| 52 | |||
| 53 | =head1 COPYRIGHT | ||
| 54 | |||
| 55 | copyright 2013- Magnolia C<< <magnolia.k@me.com> >>. | ||
| 56 | |||
| 57 | =head1 LICENSE | ||
| 58 | |||
| 59 | This is free software; you can redistribute it and/or modify it under | ||
| 60 | the same terms as the Perl 5 programming language system itself. | ||
| 61 | |||
| 62 | =cut |