|
Lines 28-34
Link Here
|
| 28 |
use Log::Agent::Driver::File; |
28 |
use Log::Agent::Driver::File; |
| 29 |
use Log::Agent::Driver::Silent; |
29 |
use Log::Agent::Driver::Silent; |
| 30 |
|
30 |
|
| 31 |
our $VERSION = "0.15.0"; |
31 |
our $VERSION = "0.16.0"; |
| 32 |
my $prog = basename($0); |
32 |
my $prog = basename($0); |
| 33 |
|
33 |
|
| 34 |
##### Establish our tmpdir |
34 |
##### Establish our tmpdir |
|
Lines 598-603
Link Here
|
| 598 |
# Let's unpack it and get all the deps out of it. |
598 |
# Let's unpack it and get all the deps out of it. |
| 599 |
spinner_start(); |
599 |
spinner_start(); |
| 600 |
$gcpan_run->unpackModule($gcpan_run->{cpan}{lc($original_ebuild)}{name}); |
600 |
$gcpan_run->unpackModule($gcpan_run->{cpan}{lc($original_ebuild)}{name}); |
|
|
601 |
# Force re-compute of the information, as MANPAGE is now valid. |
| 602 |
$gcpan_run->getCPANInfo($original_ebuild); |
| 601 |
spinner_stop(); |
603 |
spinner_stop(); |
| 602 |
|
604 |
|
| 603 |
foreach my $dep (keys %{$gcpan_run->{cpan}{lc($original_ebuild)}{depends}}) |
605 |
foreach my $dep (keys %{$gcpan_run->{cpan}{lc($original_ebuild)}{depends}}) |
|
Lines 664-682
Link Here
|
| 664 |
print_info('Generating ebuild for ' . $gcpan_run->{cpan}{lc($original_ebuild)}{name}); |
666 |
print_info('Generating ebuild for ' . $gcpan_run->{cpan}{lc($original_ebuild)}{name}); |
| 665 |
my $EBUILD = IO::File->new($ebuild, '>') |
667 |
my $EBUILD = IO::File->new($ebuild, '>') |
| 666 |
or fatal(print_err("Couldn't open(write) file $ebuild: $!")); |
668 |
or fatal(print_err("Couldn't open(write) file $ebuild: $!")); |
|
|
669 |
my $module_author = $gcpan_run->{'cpan'}{lc($original_ebuild)}{'src_uri'}; |
| 670 |
$module_author =~ s/.\/..\/(.*)\/[^\/]+$/$1/g; |
| 671 |
my $module_section = ''; |
| 672 |
if($module_author =~ /\//) { |
| 673 |
$module_section = $module_author; |
| 674 |
my @module_bits = split /\//, $module_author, 2; |
| 675 |
$module_author = $module_bits[0]; |
| 676 |
$module_section = sprintf "MODULE_SECTION=\"%s\"\n", $module_bits[1]; |
| 677 |
} |
| 678 |
my $description = $gcpan_run->{'cpan'}{lc($original_ebuild)}{'description'}; |
| 679 |
|
| 667 |
print $EBUILD <<"HERE"; |
680 |
print $EBUILD <<"HERE"; |
| 668 |
# Copyright 1999-2006 Gentoo Foundation |
681 |
# Copyright 1999-2006 Gentoo Foundation |
| 669 |
# Distributed under the terms of the GNU General Public License v2 |
682 |
# Distributed under the terms of the GNU General Public License v2 |
| 670 |
# This ebuild generated by $prog $VERSION |
683 |
# This ebuild generated by $prog $VERSION |
| 671 |
|
684 |
|
|
|
685 |
MODULE_AUTHOR="$module_author" |
| 686 |
$module_section |
| 672 |
inherit perl-module |
687 |
inherit perl-module |
| 673 |
|
688 |
|
| 674 |
S=\${WORKDIR}/$gcpan_run->{'cpan'}{lc($original_ebuild)}{'portage_sdir'} |
689 |
DESCRIPTION="$description" |
| 675 |
|
|
|
| 676 |
DESCRIPTION="$gcpan_run->{'cpan'}{lc($original_ebuild)}{'description'}" |
| 677 |
HOMEPAGE="http://search.cpan.org/search?query=$gcpan_run->{cpan}{lc($original_ebuild)}{portage_name}\&mode=dist" |
| 678 |
SRC_URI="mirror://cpan/authors/id/$gcpan_run->{'cpan'}{lc($original_ebuild)}{'src_uri'}" |
| 679 |
|
| 680 |
|
690 |
|
| 681 |
IUSE="" |
691 |
IUSE="" |
| 682 |
|
692 |
|