Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[yoga] revert #33381 changes #33973

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 0 additions & 21 deletions ReactCommon/yoga/Yoga-umbrella.h

This file was deleted.

6 changes: 0 additions & 6 deletions ReactCommon/yoga/Yoga.modulemap

This file was deleted.

24 changes: 5 additions & 19 deletions ReactCommon/yoga/Yoga.podspec
Expand Up @@ -47,25 +47,11 @@ Pod::Spec.new do |spec|

# Set this environment variable when *not* using the `:path` option to install the pod.
# E.g. when publishing this spec to a spec repo.
source_files = 'yoga/**/*.{cpp,h}', 'Yoga-umbrella.h'
source_files = source_files.map { |file| File.join('ReactCommon/yoga', file) } if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION']
source_files = 'yoga/**/*.{cpp,h}'
source_files = File.join('ReactCommon/yoga', source_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION']
spec.source_files = source_files

spec.module_map = 'Yoga.modulemap'

# CocoaPods custom `module_map` + `header_dir` doesn't put the umbrella header in right place.
# Ideally, modulemap should be placed with the umbrella header, that would work for both use_frameworks! mode and non use_frameworks! mode.
# This script copy the umbrella header back to right place.
spec.script_phase = {
:name => 'Copy umbrella header',
:input_files => ["$PODS_ROOT/Headers/Public/Yoga/yoga/Yoga-umbrella.h"],
:output_files => ["$PODS_ROOT/Headers/Private/Yoga/Yoga-umbrella.h"],
:execution_position => :before_compile,
:shell_path => '/bin/bash',

# In use_frameworks! mode, the umbrella header will by copied to right place.
# This copy command will fail because "$PODS_ROOT/Headers/Public/Yoga/yoga/Yoga-umbrella.h" doesn't exist.
# The command is just a no-op in use_frameworks! mode.
:script => 'cp -f "$PODS_ROOT/Headers/Public/Yoga/yoga/Yoga-umbrella.h" "$PODS_ROOT/Headers/Private/Yoga/Yoga-umbrella.h" || true',
}
header_files = 'yoga/*.h'
header_files = File.join('ReactCommon/yoga', header_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION']
spec.public_header_files = header_files
end