aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorSteve Mynott <steve.mynott@gmail.com>2016-02-08 18:26:58 +0000
committerSteve Mynott <steve.mynott@gmail.com>2016-02-08 18:26:58 +0000
commit9c53efd7a6372ce394b753807b2930c955aae035 (patch)
tree325c2f6b2ffdd818c5666244897f8a9b6f19bc3b /ports
parentefd255b0bd5f023b4b55bfde5b7dcf26cd5a6e2a (diff)
Start to bring back R* Mac dmg binary build from dead
- remove parrot specific workarounds and add simple Configure - Rename target directory Rakudo like the Windows build build - Comment out Rez and remove unused option - Increase temp file system size so precomp files fit - Now works with some hand holding
Diffstat (limited to 'ports')
-rw-r--r--ports/darwin_dmg/HOW_TO_INSTALL.txt10
-rwxr-xr-xports/darwin_dmg/package_darwin_dmg.pl129
2 files changed, 37 insertions, 102 deletions
diff --git a/ports/darwin_dmg/HOW_TO_INSTALL.txt b/ports/darwin_dmg/HOW_TO_INSTALL.txt
index ac33a06..fb0ae32 100644
--- a/ports/darwin_dmg/HOW_TO_INSTALL.txt
+++ b/ports/darwin_dmg/HOW_TO_INSTALL.txt
@@ -1,6 +1,6 @@
-1. Drag the Rakudo_Star folder onto the Applications folder.
+1. Drag the Rakudo folder onto the Applications folder.
2. In a Terminal window, type this command:
- alias p6='/Applications/Rakudo_Star/bin/perl6'
+ alias p6='/Applications/Rakudo/bin/perl6'
( This step only affects this one window; to make available to all
future sessions, add the line to your ~/.bash_profile file. )
@@ -13,9 +13,9 @@ Try this:
p6 -e 'say "Hello, world!";'
You can always skip the alias and use the full path:
- /Applications/Rakudo_Star/bin/perl6 -e 'say "Hello, world!";'
+ /Applications/Rakudo/bin/perl6 -e 'say "Hello, world!";'
or alternately, add Rakudo Star to your path:
- PATH=$PATH:/Applications/Rakudo_Star/bin
+ PATH=$PATH:/Applications/Rakudo/bin
perl6 -e 'say "Hello, world!";'
-See also README in /Applications/Rakudo_Star/docs/rakudo/README .
+See also README in /Applications/Rakudo/docs/rakudo/README .
diff --git a/ports/darwin_dmg/package_darwin_dmg.pl b/ports/darwin_dmg/package_darwin_dmg.pl
index 3989cad..c0d097a 100755
--- a/ports/darwin_dmg/package_darwin_dmg.pl
+++ b/ports/darwin_dmg/package_darwin_dmg.pl
@@ -6,13 +6,10 @@ use Getopt::Long;
use Data::Dumper; $Data::Dumper::Useqq = 1;
my $USAGE = <<"END_OF_USAGE";
-$0 [-q|--quiet] yyyy mm
+$0 yyyy mm
--build
- Build Parrot and Rakudo from the tarball.
+ Build Rakudo (MoarVM) from the tarball.
Defaults to only packaging what is already built.
- -q, --quiet
- Suppress pausing for "OK" input.
- (Not yet implemented)
-v
--verbose
Report each command that is run.
@@ -26,26 +23,6 @@ END_OF_USAGE
=begin comments
-(Note: The build process below (except downloading the tarball) is automated in this script)
-Note: For this .dmg packaging procedure work, Rakudo Star must be built like this:
-XXX Can we use .app to automatically have them look in the right place, even when uninstalled in .dmg?
-Here are the key parts of the build process, the parts that you might not expect from your normal build experience with Parrot and Rakudo:
- Rather than having Rakudo automatically build Parrot, we must build Parrot ourselves, to configure it specially.
- Configure Parrot with --optimize, --prefix with the installation dir, and --without any libs that any user might not have on their system.
- Configure Rakudo pointing --parrot-config to the parrot_config in the installation dir.
- Rename the build dir (to anything else) after building.
- Run `install_name_tool` on all the exes in the installation dir, updating the location in which they will look for libparrot.dylib.
- (This part will get merged into pbc_to_exe soon)
-
-Failure to follow this packaging procedure will result in a `perl6` executable that runs fine, *until* the original build directory is removed.
-Therefore, the `perl6` executable would test fine on your system, but fail on every system that installed it from the .dmg!
-
-Run this to make sure that all is well so far.
- $src_dir/bin/perl6 -e 'say "OK so far"'
-
-At this point, you can run this script.
- perl package_star.pl
-
Does the .dmg packaging procedure really need to be this complex?
Yes! The single-line process that we *wish* we could use does not allow:
* symlink to /Applications (so they have to know to drag-and-drop outside the window)
@@ -60,7 +37,7 @@ TODO:
Add a .dmg-specific HOW_TO_INSTALL.txt
Demo code (as opposed to Example code that we already have)
Click on .app for REPL
- Remove the underscore from /Applications/Rakudo_Star, changing it to a space.
+ Remove the underscore from /Applications/Rakudo, changing it to a space.
This will require upstream changes to Rakudo, but Parrot itself seems OK with an embedded space.
Include all the dependent libs; gmp, pcre, opengl, zlib, gettext, icu, libffi,readline
So far, we build with these libs disabled to allow Rakudo to run on systems that lack the libs.
@@ -71,9 +48,8 @@ TODO:
GetOptions(
- 'build' => \( my $opt_build_parrot_and_rakudo ),
+ 'build' => \( my $opt_build_rakudo ),
'time' => \( my $opt_time ),
- 'quiet' => \( my $opt_quiet ),
'verbose|v' => \( my $opt_verbose ),
'help|h' => \( my $opt_help ),
) or die $USAGE;
@@ -105,75 +81,34 @@ sub run {
my $temp_dir = 'Temp_build';
my $temp_dmg = 'temp';
-my $vol_name = 'Rakudo_Star';
+my $vol_name = 'Rakudo';
# XXX rename to install_dir?
-my $src_dir = '/Applications/Rakudo_Star';
+my $src_dir = '/Applications/Rakudo';
my $vol_dir = "/Volumes/$vol_name";
my $tar_dir = "rakudo-star-$yyyy.$mm";
my $tar_file = "rakudo-star-$yyyy.$mm.tar.gz";
-my $final_dmg = "Rakudo_Star_$yyyy-$mm";
-my $license_path = "$src_dir/share/doc/rakudo/LICENSE";
+my $final_dmg = "Rakudo_$yyyy-$mm";
+my $license_path = "../../../LICENSE";
+#my $license_path = "$src_dir/share/doc/rakudo/LICENSE";
-if ( $opt_build_parrot_and_rakudo ) {
- my $full_parrot_path;
+if ( $opt_build_rakudo ) {
run "rm -rf '$src_dir'";
- run "rm -rf $tar_dir";
- run "tar zxf $tar_file";
-
- chdir $tar_dir or die;
-
- my ($parrot_dir) = glob 'parrot-*';
- chdir $parrot_dir or die;
- chomp( $full_parrot_path = `pwd` );
- run "perl Configure.pl --prefix=/Applications/Rakudo_Star --optimize"
- . " --without-gettext --without-gmp --without-libffi --without-opengl"
- . " --without-readline --without-pcre --without-zlib --without-icu"
- . " > conf.1 2>conf.2";
- run "make > make.1 2>make.2";
- run "make install > inst.1 2>inst.2";
- chdir '..';
-
- run "perl Configure.pl --parrot-config=/Applications/Rakudo_Star/bin/parrot_config"
- . " > conf.1 2>conf.2";
- run "make > make.1 2>make.2";
- run "make install > inst.1 2>inst.2";
-
-# run "make blizkost-install > bliz.1 2>bliz.2";
-# XXX Not running for now, because OS X 10.5 comes with Perl 5.8.8, and blizkost requires 5.10.
-
- run "cp -r docs /Applications/Rakudo_Star/";
- run "mv /Applications/Rakudo_Star/parrot /Applications/Rakudo_Star/docs/";
- run "mv /Applications/Rakudo_Star/rakudo /Applications/Rakudo_Star/docs/";
-
- chdir '..';
-
- run "rm -rf $tar_dir-renamed_for_testing";
- run "mv -i $tar_dir $tar_dir-renamed_for_testing";
-
- my @exe_paths = map {"$src_dir/bin/$_"} qw(
- ops2c
- parrot
- parrot-nqp
- parrot-prove
- parrot_config
- parrot_debugger
- parrot_nci_thunk_gen
- pbc_disassemble
- pbc_dump
- pbc_merge
- pbc_to_exe
- perl6
- );
- die if grep { not -e $_ } @exe_paths;
-
- for my $exe_path (@exe_paths) {
- run "install_name_tool -change $full_parrot_path/blib/lib/libparrot.dylib $src_dir/lib/libparrot.dylib $exe_path";
- }
-}
+ my $ocwd = qx!pwd!;
+ chomp $ocwd;
+
+ chdir "../..";
+
+ run "make clean";
+ run "perl Configure.pl --gen-moar --prefix /Applications/Rakudo";
+ run "make install";
+
+ chdir $ocwd;
+
+}
if ( `$src_dir/bin/perl6 -e 42.say` ne "42\n" ) {
die "The perl6 exe will not run, so we cannot make a .dmg for it! ($src_dir/bin/perl6)\n";
@@ -190,25 +125,25 @@ chdir $temp_dir or die;
my $size = `du -ks '$src_dir'`;
$size =~ s{ \A \s* (\d+) \t \S.* \z }{$1}msx or die;
-$size += int( $size * 0.05 ); # Add 5% for file system
+$size += int( $size * 0.20 ); # Add 20% for file system
run "hdiutil create '$temp_dmg' -ov -size ${size}k -fs HFS+ -volname '$vol_name' -attach";
-
print "Copying Rakudo files\n";
run "CpMac -r '$src_dir' '$vol_dir'";
run "cp ../HOW_TO_INSTALL.txt '$vol_dir'";
+run "cp -pr ../../../docs '$vol_dir'";
-run "touch '$vol_dir/Rakudo_Star/Icon\r'";
+run "touch '$vol_dir/Rakudo/Icon\r'";
run "cp ../2000px-Camelia.svg.icns $vol_dir/.VolumeIcon.icns";
run "sips -i $vol_dir/.VolumeIcon.icns";
run "DeRez -only icns $vol_dir/.VolumeIcon.icns > tempicns.rsrc";
-run "Rez -append tempicns.rsrc -o '$vol_dir/Rakudo_Star/bin/perl6'";
-run "Rez -append tempicns.rsrc -o '$vol_dir/Rakudo_Star/Icon\r'";
+run "Rez -append tempicns.rsrc -o '$vol_dir/Rakudo/bin/perl6'";
+run "Rez -append tempicns.rsrc -o '$vol_dir/Rakudo/Icon\r'";
run "SetFile -c icnC '$vol_dir/.VolumeIcon.icns'";
run "SetFile -a C '$vol_dir'";
-run "SetFile -a C '$vol_dir/Rakudo_Star'";
-run "SetFile -a C '$vol_dir/Rakudo_Star/bin/perl6'";
-run "SetFile -a V '$vol_dir/Rakudo_Star/Icon\r'";
+run "SetFile -a C '$vol_dir/Rakudo'";
+run "SetFile -a C '$vol_dir/Rakudo/bin/perl6'";
+run "SetFile -a V '$vol_dir/Rakudo/Icon\r'";
run "rm tempicns.rsrc";
@@ -231,7 +166,7 @@ my $template_path = '../SLA_rakudo_star.template.r';
create_sla_file( $license_path, $template_path, $r_path );
run "hdiutil unflatten '$final_dmg.dmg'";
-run "Rez Carbon.r '$r_path' -append -o '$final_dmg.dmg'"; # Carbon.r has type definitions.
+#run "Rez Carbon.r '$r_path' -append -o '$final_dmg.dmg'"; # Carbon.r has type definitions.
run "hdiutil flatten '$final_dmg.dmg'";
unlink $r_path or die;
@@ -243,7 +178,7 @@ sub create_sla_file {
my ( $license_path, $template_path, $output_r_path ) = @_;
my $license_munged = '';
- open my $license_fh, '<', $license_path or die;
+ open my $license_fh, '<', $license_path or die "not found at $license_path";
while (<$license_fh>) {
s{"}{\\"}g;
s{\n}{\\n};