|
| 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 | + |
| 6 | +require "json" |
| 7 | + |
| 8 | +package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) |
| 9 | +version = package['version'] |
| 10 | + |
| 11 | +source = { :git => 'https://github.com/facebook/react-native.git' } |
| 12 | +if 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 |
| 15 | +else |
| 16 | + source[:tag] = "v#{version}" |
| 17 | +end |
| 18 | + |
| 19 | +folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' |
| 20 | +folly_version = '2020.01.13.00' |
| 21 | +boost_compiler_flags = '-Wno-documentation' |
| 22 | + |
| 23 | +Pod::Spec.new do |s| |
| 24 | + s.name = "React-hermes" |
| 25 | + s.version = version |
| 26 | + s.summary = "-" # TODO |
| 27 | + s.homepage = "https://reactnative.dev/" |
| 28 | + s.license = package["license"] |
| 29 | + s.author = "Facebook, Inc. and its affiliates" |
| 30 | + s.platforms = { :osx => "10.14", :ios => "10.0" } |
| 31 | + s.source = source |
| 32 | + s.source_files = "executor/*.{cpp,h}", |
| 33 | + "inspector/*.{cpp,h}", |
| 34 | + "inspector/chrome/*.{cpp,h}", |
| 35 | + "inspector/detail/*.{cpp,h}" |
| 36 | + s.public_header_files = "executor/HermesExecutorFactory.h" |
| 37 | + s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags |
| 38 | + s.pod_target_xcconfig = { |
| 39 | + "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"", |
| 40 | + "GCC_PREPROCESSOR_DEFINITIONS" => "HERMES_ENABLE_DEBUGGER=1", |
| 41 | + } |
| 42 | + s.header_dir = "reacthermes" |
| 43 | + s.dependency "React-cxxreact", version |
| 44 | + s.dependency "React-jsi", version |
| 45 | + s.dependency "React-jsiexecutor", version |
| 46 | + s.dependency "React-jsinspector", version |
| 47 | + s.dependency "React-perflogger", version |
| 48 | + s.dependency "RCT-Folly", folly_version |
| 49 | + s.dependency "RCT-Folly/Futures", folly_version |
| 50 | + s.dependency "DoubleConversion" |
| 51 | + s.dependency "glog" |
| 52 | + s.dependency "hermes-engine" |
| 53 | +end |
0 commit comments