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

Fix building process #25774

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"prop-types": "^15.7.2",
"react-devtools-core": "^3.6.0",
"regenerator-runtime": "^0.13.2",
"scheduler": "0.14.0",
"stacktrace-parser": "^0.1.3",
"whatwg-fetch": "^3.0.0"
},
Expand Down Expand Up @@ -139,7 +140,6 @@
"prettier": "1.17.0",
"react": "16.8.6",
"react-test-renderer": "16.8.6",
"scheduler": "0.14.0",
"shelljs": "^0.7.8",
"ws": "^6.1.4",
"yargs": "^9.0.0"
Expand Down
3 changes: 2 additions & 1 deletion scripts/ios-configure-glog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# LICENSE file in the root directory of this source tree.

set -e
cd glog

PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}"
CURRENT_ARCH="${CURRENT_ARCH}"
Expand Down Expand Up @@ -57,7 +58,7 @@ cat << EOF >> src/config.h
EOF

# Prepare exported header include
EXPORTED_INCLUDE_DIR="exported/glog"
EXPORTED_INCLUDE_DIR="../Headers/Public/glog/"
mkdir -p exported/glog
cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
Expand Down
18 changes: 16 additions & 2 deletions third-party-podspecs/glog.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,33 @@ Pod::Spec.new do |spec|
spec.summary = 'Google logging module'
spec.authors = 'Google'

spec.prepare_command = File.read("../scripts/ios-configure-glog.sh")
spec.script_phase = {
:name => 'Configure Glog',
:script => File.read("../scripts/ios-configure-glog.sh"),
:execution_position => :before_compile
}
spec.source = { :git => 'https://github.com/google/glog.git',
:tag => "v#{spec.version}" }
spec.module_name = 'glog'
spec.header_dir = 'glog'
spec.source_files = 'src/glog/*.h',
'src/glog/*.h.in',
'libglog.pc.in',
'src/demangle.cc',
'src/logging.cc',
'src/raw_logging.cc',
'src/signalhandler.cc',
'src/symbolize.cc',
'src/utilities.cc',
'src/vlog_is_on.cc'
'src/vlog_is_on.cc',
'src/config.h.in',
'config.guess',
'config.sub',
'configure',
'configure.ac',
'Makefile.in',
'install-sh',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need these files. Have you been verifying each of them?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes they are individually added and verified. Basically, configure is required because the target architecture only becomes available in compile time. (whilst during pod installation, the architecture cannot be determined). And install.sh, config.sub, config.guess and Makefile.in are required by configure and its subroutines. The other are source files that are required to the compile the pod.

'ltmain.sh'
# workaround for https://github.com/facebook/react-native/issues/14326
spec.preserve_paths = 'src/*.h',
'src/base/*.h'
Expand Down