From 22b0766abdd658e956c32d747b655ceb044d1b96 Mon Sep 17 00:00:00 2001 From: satokaz Date: Sun, 24 Jan 2016 19:35:58 +0900 Subject: [PATCH 1/7] Add Oracle Solaris 11 support --- nodebrew | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/nodebrew b/nodebrew index 27da5a9..b71d0e8 100755 --- a/nodebrew +++ b/nodebrew @@ -99,6 +99,11 @@ 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') { + print "io.js does not supported on Oracle Solaris. \n"; + exit; + } + $self->clean($version); mkdir $src_dir; @@ -109,15 +114,38 @@ 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+ICAgICAgICAgICAgICdkZWZpbmVzJzogWydfR0xJQkNYWF9VU0VfQzk5X01BVEgnXSwK" | 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 make && + CC=gcc make install + ]; + } else { + system qq[ + cd "$src_dir/$target_name" && + ./configure --prefix="$install_dir/$version" $configure_opts && + make && + make install + ]; + } } sub _cmd_install_binary { + if ($^O eq 'solaris') { + print "Does not supported on Oracle Solaris. This option supports only illumos kernel distribution. \n"; + exit; + } my ($self, $args) = @_; my ($version, $release) = $self->find_install_version($args->[0]); From 31f2e45cf41d83a112bd1068888f34f604fc15a0 Mon Sep 17 00:00:00 2001 From: satokaz Date: Sun, 24 Jan 2016 22:32:28 +0900 Subject: [PATCH 2/7] base64 encoding fix --- nodebrew | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodebrew b/nodebrew index b71d0e8..1515997 100755 --- a/nodebrew +++ b/nodebrew @@ -120,7 +120,7 @@ sub _cmd_install { $configure_opts = join ' ', "--dest-os=solaris --with-dtrace --dest-cpu=x64 --without-mdb", $configure_opts; system qq[ cd "$src_dir/$target_name" && - echo "MjAwYTIwMQo+ICAgICAgICAgICAgICdkZWZpbmVzJzogWydfR0xJQkNYWF9VU0VfQzk5X01BVEgnXSwK" | openssl enc -d -base64 | gpatch common.gypi + echo "MjAwYTIwMQo+IAkgICAgJ2RlZmluZXMnOiBbJ19HTElCQ1hYX1VTRV9DOTlfTUFUSCddLAo=" | openssl enc -d -base64 | gpatch common.gypi ]; } else { $configure_opts = join ' ', "--dest-os=solaris --with-dtrace --dest-cpu=x64", $configure_opts; From 0473f2b5a80c50e7d5b981ee3de36630c235bec8 Mon Sep 17 00:00:00 2001 From: satokaz Date: Sun, 24 Jan 2016 23:26:16 +0900 Subject: [PATCH 3/7] Must use gmake on Solaris --- nodebrew | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodebrew b/nodebrew index 1515997..e488fa4 100755 --- a/nodebrew +++ b/nodebrew @@ -128,8 +128,8 @@ sub _cmd_install { system qq[ cd "$src_dir/$target_name" && CC=gcc ./configure --prefix="$install_dir/$version" $configure_opts && - CC=gcc make && - CC=gcc make install + CC=gcc gmake && + CC=gcc gmake install ]; } else { system qq[ From 497615f9ba7c509ccdd3b659e058248db6723686 Mon Sep 17 00:00:00 2001 From: satokaz Date: Wed, 27 Jan 2016 17:15:03 +0900 Subject: [PATCH 4/7] use error_and_exit --- nodebrew | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/nodebrew b/nodebrew index e488fa4..90d1f88 100755 --- a/nodebrew +++ b/nodebrew @@ -99,10 +99,7 @@ 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') { - print "io.js does not supported on Oracle Solaris. \n"; - exit; - } + error_and_exit("io.js does not supported on $^O \n") if $^O eq 'solaris'; $self->clean($version); mkdir $src_dir; @@ -142,10 +139,8 @@ sub _cmd_install { } sub _cmd_install_binary { - if ($^O eq 'solaris') { - print "Does not supported on Oracle Solaris. This option supports only illumos kernel distribution. \n"; - exit; - } + error_and_exit("Does not supported on Oracle Solaris. This option supports only illumos kernel distribution. \n") if $^O eq 'solaris'; + my ($self, $args) = @_; my ($version, $release) = $self->find_install_version($args->[0]); From c52111dfb15b4ebcda839651c265bb955187e094 Mon Sep 17 00:00:00 2001 From: satokaz Date: Sun, 28 Feb 2016 09:39:30 +0900 Subject: [PATCH 5/7] critical bug fixes --- .vscode/ftp-sync.json | 15 +++++++++++++++ nodebrew | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .vscode/ftp-sync.json diff --git a/.vscode/ftp-sync.json b/.vscode/ftp-sync.json new file mode 100644 index 0000000..44afd0c --- /dev/null +++ b/.vscode/ftp-sync.json @@ -0,0 +1,15 @@ +{ + "remotePath": "/export/home/kazus/Gits/nodebrew", + "host": "192.168.100.15", + "username": "kazus", + "password": "tk-rave", + "port": 22, + "protocol": "sftp", + "uploadOnSave": true, + "passive": false, + "debug": false, + "ignore": [ + "\\.vscode", + "\\.git" + ] +} diff --git a/nodebrew b/nodebrew index 90d1f88..d60032c 100755 --- a/nodebrew +++ b/nodebrew @@ -99,7 +99,9 @@ sub _cmd_install { my $target_name = $self->get_type . "-$version"; my $tarball_path = "$src_dir/$target_name.tar.gz"; - error_and_exit("io.js does not supported on $^O \n") if $^O eq 'solaris'; + if ($^O eq 'solaris' && $self->get_type eq 'iojs') { + error_and_exit("io.js does not supported on $^O \n"); + } $self->clean($version); mkdir $src_dir; From 9039eee441fff9ab00295b8c16d63a21a9957a35 Mon Sep 17 00:00:00 2001 From: satokaz Date: Sun, 28 Feb 2016 09:46:40 +0900 Subject: [PATCH 6/7] Minor fixes --- .vscode/ftp-sync.json | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .vscode/ftp-sync.json diff --git a/.vscode/ftp-sync.json b/.vscode/ftp-sync.json deleted file mode 100644 index 44afd0c..0000000 --- a/.vscode/ftp-sync.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "remotePath": "/export/home/kazus/Gits/nodebrew", - "host": "192.168.100.15", - "username": "kazus", - "password": "tk-rave", - "port": 22, - "protocol": "sftp", - "uploadOnSave": true, - "passive": false, - "debug": false, - "ignore": [ - "\\.vscode", - "\\.git" - ] -} From 6addfbe0fa4332fa0a7dba26d7fbe709ec786826 Mon Sep 17 00:00:00 2001 From: satokaz Date: Sun, 28 Feb 2016 09:47:03 +0900 Subject: [PATCH 7/7] Minor fixes --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8c46312..d3d6234 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ inc/ blib/ pm_to_blib cpanfile.snapshot +.vscode/* \ No newline at end of file