From: Matt S Trout Date: Tue, 4 Sep 2012 19:37:00 +0000 (+0000) Subject: initial import of star builder X-Git-Tag: v2012.08002~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1612b73d2163f36f7146b6fc308665b3ef8cda4a;p=scpubgit%2FRakudo-Star.git initial import of star builder --- 1612b73d2163f36f7146b6fc308665b3ef8cda4a diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..598cc57 --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,35 @@ +use strict; +use warnings FATAL => 'all'; +use ExtUtils::MakeMaker; + +WriteMakefile( + NAME => 'Rakudo-Star', + VERSION => '2012.08_000', +); + +sub MY::postamble { <<'END' } + +INSTALLRAKUDO=$(INSTALLARCHLIB)/Rakudo/Star/Install + +all :: rakudo + touch blib/arch/auto/Rakudo-Star/force-arch + +rakudo-star/Makefile : + cd rakudo-star; $(PERL) Configure.pl --gen-parrot --prefix=$(INSTALLRAKUDO) + +rakudo : rakudo-star/Makefile + cd rakudo-star; make all + +install :: rakudoinstall + +rakudoinstall : + cd rakudo-star; make install + +manifest : + rm MANIFEST + $(PERL) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest + echo "rakudo-star/parrot/.gitignore" >>MANIFEST + echo "rakudo-star/parrot/examples/compilers/Makefile" >>MANIFEST + echo "rakudo-star/parrot/examples/embed/Makefile" >>MANIFEST + echo "rakudo-star/parrot/examples/tools/Makefile" >>MANIFEST +END diff --git a/lib/Rakudo/Star.pm b/lib/Rakudo/Star.pm new file mode 100644 index 0000000..602027c --- /dev/null +++ b/lib/Rakudo/Star.pm @@ -0,0 +1,52 @@ +package Rakudo::Star; + +our $VERSION = '2012.08_000'; + +$VERSION = eval $VERSION; + +1; + +=head1 NAME + +Rakudo::Star - install Rakudo Star from CPAN + +=head1 SYNOPSIS + +This module is here as a version container - see L +for documentation of how to find the install. + +=head1 DESCRIPTION + +Basically, this module convinces MakeMaker to build a bundled version of +'s "Star" release, then provides a way to find it on +disk. + +Note that since parrot is not relocatable, the rakudo install is not +relocatable - so putting it in a L dir and then C-ing that +directory is not going to work yet. Sorry. + +=head1 AUTHORS OF RAKUDO + +See L for the Rakudo project. The following author, +copyright and license information applies only to the L +installation code. + +=head1 AUTHOR + +mst - Matt S. Trout (cpan:MSTROUT) + +=head1 CONTRIBUTORS + +None yet, because nobody's broken it yet. I'm sure they will shortly. + +=head1 COPYRIGHT + +Copyright (c) 2012 the L L and L +as listed above. + +=head1 LICENSE + +This library is free software and may be distributed under the same terms +as perl itself; for the licensing of rakudo, please see L + +=cut diff --git a/lib/Rakudo/Star/Paths.pm b/lib/Rakudo/Star/Paths.pm new file mode 100644 index 0000000..c5a083a --- /dev/null +++ b/lib/Rakudo/Star/Paths.pm @@ -0,0 +1,54 @@ +package Rakudo::Star::Paths; + +use strict; +use warnings FATAL => 'all'; +use File::Basename qw(dirname); +use File::Spec::Functions qw(catdir); + +sub base_path { + catdir(dirname(__FILE__), 'Install') +} + +sub bin_path { + my $class = shift; + catdir($class->base_path, 'bin'); +} + +sub env_PATH { + my $class = shift; + 'export PATH='.join(':', $class->bin_path, $ENV{PATH}?$ENV{PATH}:())."\n"; +} + +sub import { + if ($0 eq '-') { + print shift->env_PATH; + exit 0; + } +} + +=head1 NAME + +Rakudo::Star::Paths - find your rakudo install + +=head1 SYNOPSIS + + bash$ perl -MRakudo::Star::Paths + export PATH=/path/to/rakudo/star/bin:... + + bash$ eval $(perl -MRakudo::Star::Paths) + # PATH env var is now set + + bash$ perl -MRakudo::Star::Paths -e 'print Rakudo::Star::Paths->bin_path' + /path/to/rakudo/star/bin + +=head1 COPYRIGHT + +See L + +=head1 LICENSE + +See L + +=cut + +1; diff --git a/maint/fetch-star b/maint/fetch-star new file mode 100755 index 0000000..dd4cf01 --- /dev/null +++ b/maint/fetch-star @@ -0,0 +1,11 @@ +#!/bin/sh + +STAR=2012.08 + +STARTAR=rakudo-star-$STAR + +wget https://github.com/downloads/rakudo/star/$STARTAR.tar.gz -O - | tar xzf - + +rm -rf rakudo-star + +mv $STARTAR rakudo-star diff --git a/t/rakudo.t b/t/rakudo.t new file mode 100644 index 0000000..d859399 --- /dev/null +++ b/t/rakudo.t @@ -0,0 +1,14 @@ +use strict; +use warnings FATAL => 'all'; +use Test::More qw(no_plan); + +chdir('rakudo-star/rakudo'); + +sub run_test { + my ($file) = @_; + cmp_ok(system($^X, 't/harness', $file), '==', 0, "${file} passed"); +} + +run_test($_) for ; + +run_test($_) for ;