2017-02-07 00:16:46 +00:00
package = JSON.parse(File.read(File.expand_path('../../package.json', __dir__)))
version = package['version']
2017-03-18 19:21:50 +00:00
source = { :git => ENV['INSTALL_YOGA_FROM_LOCATION'] || 'https://github.com/facebook/react-native.git' }
2017-02-07 00:16:46 +00:00
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|
2017-08-25 11:38:52 +00:00
spec.name = 'yoga'
2017-02-07 00:16:46 +00:00
spec.version = "#{version}.React"
2018-02-17 02:25:02 +00:00
spec.license = { :type => 'MIT' }
2017-02-07 00:16:46 +00:00
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',
2017-11-21 18:10:30 +00:00
'-std=c++1y',
2017-02-07 00:16:46 +00:00
'-fPIC'
]
# Pinning to the same version as React.podspec.
2018-05-23 06:23:05 +00:00
spec.platforms = { :ios => "9.0", :tvos => "9.2" }
2017-02-07 00:16:46 +00:00
2018-03-21 21:12:08 +00:00
# Set this environment variable when *not* using the `:path` option to install the pod.
2017-02-07 00:16:46 +00:00
# E.g. when publishing this spec to a spec repo.
2017-11-21 18:10:30 +00:00
source_files = 'yoga/**/*.{cpp,h}'
2017-02-07 00:16:46 +00:00
source_files = File.join('ReactCommon/yoga', source_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION']
spec.source_files = source_files
2018-05-23 06:23:05 +00:00
2018-03-21 21:12:08 +00:00
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
2017-02-07 00:16:46 +00:00
end