UNPKG

2.28 kBPlain TextView Raw
1# Copyright (c) Facebook, Inc. and its affiliates.
2#
3# This source code is licensed under the MIT license found in the
4# LICENSE file in the root directory of this source tree.
5
6require "json"
7
8package = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
9version = package['version']
10
11source = { :git => 'https://github.com/facebook/react-native.git' }
12if version == '1000.0.0'
13 # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
14 source[:commit] = `git rev-parse HEAD`.strip
15else
16 source[:tag] = "v#{version}"
17end
18
19folly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
20folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32'
21folly_version = '2018.10.22.00'
22boost_compiler_flags = '-Wno-documentation'
23
24Pod::Spec.new do |s|
25 s.name = "React-RCTFabric"
26 s.version = version
27 s.summary = "RCTFabric for React Native."
28 s.homepage = "http://facebook.github.io/react-native/"
29 s.license = package["license"]
30 s.author = "Facebook, Inc. and its affiliates"
31 s.platforms = { :ios => "9.0", :tvos => "9.2" }
32 s.source = source
33 s.source_files = "Fabric/**/*.{c,h,m,mm,S,cpp}"
34 s.exclude_files = "**/tests/*",
35 "**/android/*",
36 s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
37 s.header_dir = "React"
38 s.framework = "JavaScriptCore"
39 s.library = "stdc++"
40 s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\"" }
41 s.xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/Folly\"",
42 "OTHER_CFLAGS" => "$(inherited) -DRN_FABRIC_ENABLED" + " " + folly_flags }
43
44 s.dependency "React-Core", version
45 s.dependency "React-Fabric", version
46 s.dependency "React-RCTImage", version
47 s.dependency "Folly/Fabric", folly_version
48end