Skip to content

Commit

Permalink
build(patch): apply recommended patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Voisin committed Nov 17, 2021
1 parent 34c5b11 commit 3b892b5
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions patches/react-native+0.64.2.patch
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,31 @@ index 2ef8cf8..236c52f 100755
+#if [[ -d $HOMEBREW_M1_BIN && ! $PATH =~ $HOMEBREW_M1_BIN ]]; then
+# export PATH="$HOMEBREW_M1_BIN:$PATH"
+#fi
diff --git a/node_modules/react-native/scripts/react_native_pods.rb b/node_modules/react-native/scripts/react_native_pods.rb
index db9a34a..ce694c4 100644
--- a/node_modules/react-native/scripts/react_native_pods.rb
+++ b/node_modules/react-native/scripts/react_native_pods.rb
@@ -165,7 +165,7 @@ def use_react_native_codegen!(spec, options={})
return if ENV['DISABLE_CODEGEN'] == '1'

# The path to react-native (e.g. react_native_path)
- prefix = options[:path] ||= File.join(__dir__, "..")
+ prefix = options[:path] ||= "../../node_modules/react-native"

# The path to JavaScript files
srcs_dir = options[:srcs_dir] ||= File.join(prefix, "Libraries")
@@ -208,12 +208,12 @@ def use_react_native_codegen!(spec, options={})
:name => 'Generate Specs',
:input_files => [srcs_dir],
:output_files => ["$(DERIVED_FILE_DIR)/codegen-#{codegen_modules_library_name}.log"].concat(generated_files),
- :script => "set -o pipefail\n\nbash -l -c '#{env_vars} CODEGEN_MODULES_LIBRARY_NAME=#{codegen_modules_library_name} #{File.join(__dir__, "generate-specs.sh")}' 2>&1 | tee \"${SCRIPT_OUTPUT_FILE_0}\"",
+ :script => "set -o pipefail\n\nbash -l -c '#{env_vars} CODEGEN_MODULES_LIBRARY_NAME=#{codegen_modules_library_name} ../../node_modules/react-native/scripts/generate-specs.sh' 2>&1 | tee \"${SCRIPT_OUTPUT_FILE_0}\"",
:execution_position => :before_compile,
:show_env_vars_in_log => true
}

- spec.prepare_command = "#{mkdir_command} && touch #{generated_files.reduce() { |str, file| str + " " + file }}"
+ spec.prepare_command = "cd ../.. && #{mkdir_command} && touch #{generated_files.reduce() { |str, file| str + " " + file }}"
end

# Local method for the Xcode 12.5 fix

0 comments on commit 3b892b5

Please sign in to comment.