<commit_before>#
# Copyright 2013-2014 Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name "nodejs"
default_version "0.10.10"

dependency "python"

version "0.10.10" do
  source md5: "a47a9141567dd591eec486db05b09e1c"
end

version "0.10.26" do
  source md5: "15e9018dadc63a2046f61eb13dfd7bd6"
end

version "0.10.35" do
  source md5: "2c00d8cf243753996eecdc4f6e2a2d11"
end

source url: "https://nodejs.org/dist/v#{version}/node-v#{version}.tar.gz"

relative_path "node-v#{version}"

build do
  env = with_standard_compiler_flags(with_embedded_path)

  command "#{install_dir}/embedded/bin/python ./configure" \
          " --prefix=#{install_dir}/embedded", env: env

  make "-j #{workers}", env: env
  make "install", env: env
end<commit_msg>Disable nodejs Snapshot feature for ARM platforms<commit_after>#
# Copyright 2013-2014 Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name "nodejs"
default_version "0.10.10"

dependency "python"

version "0.10.10" do
  source md5: "a47a9141567dd591eec486db05b09e1c"
end

version "0.10.26" do
  source md5: "15e9018dadc63a2046f61eb13dfd7bd6"
end

version "0.10.35" do
  source md5: "2c00d8cf243753996eecdc4f6e2a2d11"
end

source url: "https://nodejs.org/dist/v#{version}/node-v#{version}.tar.gz"

relative_path "node-v#{version}"

build do
  env = with_standard_compiler_flags(with_embedded_path)

  args = if ohai['kernel']['machine'].start_with?('arm')
           '--without-snapshot'
         else
           ''
         end

  command "#{install_dir}/embedded/bin/python ./configure" \
          " --prefix=#{install_dir}/embedded #{args}", env: env

  make "-j #{workers}", env: env
  make "install", env: env
end
{'fraction_non_alphanumeric': 0.10987791342952276, 'fraction_numerical': 0.0680725120236774, 'mean_word_length': 4.130929791271347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '86956', 'n_tokens_mistral': 984, 'n_tokens_neox': 891, 'n_words': 284}