mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 17:15:54 +00:00
cf036dbc7a
Summary: Updates the Yoga Podspec to work with Cocoa frameworks. Replicated a2's work over on Yoga https://github.com/facebook/yoga/pull/726 (Which should also get merged too please ❤️ ) Set it manually in my own project and tested 👍 Only https://github.com/facebook/yoga/pull/726 [IOS] [BUGFIX] [Yoga] - Fixes to yoga.podspec when integrating into an iOS app using Cocoa frameworks. Closes https://github.com/facebook/react-native/pull/18492 Differential Revision: D7355907 Pulled By: hramos fbshipit-source-id: 6986d2bc560a23bb7f0f20b80e88bb440079891a
49 lines
1.8 KiB
Ruby
49 lines
1.8 KiB
Ruby
package = JSON.parse(File.read(File.expand_path('../../package.json', __dir__)))
|
||
version = package['version']
|
||
|
||
source = { :git => ENV['INSTALL_YOGA_FROM_LOCATION'] || 'https://github.com/facebook/react-native.git' }
|
||
if version == '1000.0.0'
|
||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
||
source[:commit] = `git rev-parse HEAD`.strip
|
||
else
|
||
source[:tag] = "v#{version}"
|
||
end
|
||
|
||
Pod::Spec.new do |spec|
|
||
spec.name = 'yoga'
|
||
spec.version = "#{version}.React"
|
||
spec.license = { :type => 'MIT' }
|
||
spec.homepage = 'https://facebook.github.io/yoga/'
|
||
spec.documentation_url = 'https://facebook.github.io/yoga/docs/api/c/'
|
||
|
||
spec.summary = 'Yoga is a cross-platform layout engine which implements Flexbox.'
|
||
spec.description = 'Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API many designers are familiar with, and opening it up to developers across different platforms.'
|
||
|
||
spec.authors = 'Facebook'
|
||
spec.source = source
|
||
|
||
spec.module_name = 'yoga'
|
||
spec.requires_arc = false
|
||
spec.compiler_flags = [
|
||
'-fno-omit-frame-pointer',
|
||
'-fexceptions',
|
||
'-Wall',
|
||
'-Werror',
|
||
'-std=c++1y',
|
||
'-fPIC'
|
||
]
|
||
|
||
# Pinning to the same version as React.podspec.
|
||
spec.platforms = { :ios => "8.0", :tvos => "9.2" }
|
||
|
||
# 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}'
|
||
source_files = File.join('ReactCommon/yoga', source_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION']
|
||
spec.source_files = source_files
|
||
|
||
header_files = 'yoga/{Yoga,YGEnums,YGMacros}.h'
|
||
header_files = File.join('ReactCommon/yoga', header_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION']
|
||
spec.public_header_files = header_files
|
||
end
|