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 all 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
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