Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ inc/
blib/
pm_to_blib
cpanfile.snapshot
.vscode/*
37 changes: 31 additions & 6 deletions nodebrew
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ sub _cmd_install {
my $target_name = $self->get_type . "-$version";
my $tarball_path = "$src_dir/$target_name.tar.gz";

if ($^O eq 'solaris' && $self->get_type eq 'iojs') {
error_and_exit("io.js does not supported on $^O \n");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
error_and_exit("io.js does not supported on $^O \n");
error_and_exit("io.js is not supported on $^O \n");

}

$self->clean($version);
mkdir $src_dir;

Expand All @@ -109,15 +113,36 @@ sub _cmd_install {
Nodebrew::Utils::extract_tar($tarball_path, $src_dir);

my $install_dir = $self->get_install_dir;
system qq[
cd "$src_dir/$target_name" &&
./configure --prefix="$install_dir/$version" $configure_opts &&
make &&
make install
];

if ($^O eq 'solaris') {
if ($version =~ /^v0/) {
$configure_opts = join ' ', "--dest-os=solaris --with-dtrace --dest-cpu=x64 --without-mdb", $configure_opts;
system qq[
cd "$src_dir/$target_name" &&
echo "MjAwYTIwMQo+IAkgICAgJ2RlZmluZXMnOiBbJ19HTElCQ1hYX1VTRV9DOTlfTUFUSCddLAo=" | openssl enc -d -base64 | gpatch common.gypi
];
} else {
$configure_opts = join ' ', "--dest-os=solaris --with-dtrace --dest-cpu=x64", $configure_opts;
}
system qq[
cd "$src_dir/$target_name" &&
CC=gcc ./configure --prefix="$install_dir/$version" $configure_opts &&
CC=gcc gmake &&
CC=gcc gmake install
];
} else {
system qq[
cd "$src_dir/$target_name" &&
./configure --prefix="$install_dir/$version" $configure_opts &&
make &&
make install
];
}
}

sub _cmd_install_binary {
error_and_exit("Does not supported on Oracle Solaris. This option supports only illumos kernel distribution. \n") if $^O eq 'solaris';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
error_and_exit("Does not supported on Oracle Solaris. This option supports only illumos kernel distribution. \n") if $^O eq 'solaris';
error_and_exit("Node.js does not support Oracle Solaris. Only illumos-based distributions are supported.\n") if $^O eq 'solaris';


my ($self, $args) = @_;

my ($version, $release) = $self->find_install_version($args->[0]);
Expand Down