Move find curl_ca_bundle script out of gyp and zlib DEPS change

Find curl_ca_bundle script is used by linux only. Move it out of
gyp and make sure it runs only in linux.

Also make zlib deps generic for all systems, not for linux only.

This is the first step of getting edash_packager builds on Windows
and Mac.

Change-Id: I82d3e5872fd0dd6f57127890bc062490332a1b69
This commit is contained in:
KongQun Yang 2015-03-12 09:29:53 -07:00
parent a82bab9f3f
commit 63792f088e
4 changed files with 35 additions and 22 deletions

8
DEPS
View File

@ -82,6 +82,10 @@ deps = {
"src/packager/third_party/protobuf":
Var("chromium_svn") + "/src/third_party/protobuf@" + Var("chromium_rev"),
# Required by build/linux/system.gyp and third_party/curl/curl.gyp.
"src/packager/third_party/zlib":
Var("chromium_svn") + "/src/third_party/zlib@" + Var("chromium_rev"),
"src/packager/tools/clang":
Var("chromium_svn") + "/src/tools/clang@" + Var("chromium_rev"),
@ -100,10 +104,6 @@ deps_os = {
# Linux gold build to build faster.
"src/packager/third_party/gold":
Var("chromium_svn") + "/deps/third_party/gold@" + Var("chromium_rev"),
# Required by /src/build/linux/system.gyp.
"src/packager/third_party/zlib":
Var("chromium_svn") + "/src/third_party/zlib@" + Var("chromium_rev"),
},
}

View File

@ -30,6 +30,9 @@ Description of source tree.
linux platform, with a few features disabled to build correctly on a
fresh linux box.
config/linux/find_curl_ca_bundle.sh
A script used to find the path to curl_ca_bundle in the target system.
2) curl.gyp
A gyp build file for the library. Manually maintained.

View File

@ -0,0 +1,27 @@
#!/bin/sh
# Copyright 2015 Google Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
# Scan ca bundle in its common appearing locations.
paths=('/etc/pki/tls/certs/ca-bundle.crt'
'/etc/ssl/cert.pem'
'/etc/ssl/certs/ca-bundle.crt'
'/etc/ssl/certs/ca-certificates.crt'
'/usr/local/share/certs/ca-root.crt'
'/usr/share/ssl/certs/ca-bundle.crt')
for path in "${paths[@]}"
do
if test -f "$path"
then
echo "$path"
exit 0
fi
done
echo 'Failed to locate SSL CA cert.'
exit 1

View File

@ -5,23 +5,6 @@
# https://developers.google.com/open-source/licenses/bsd
{
'variables': {
# Scan ca bundle in its common appearing locations.
'curl_ca_bundle%':
'<!(for path in /etc/pki/tls/certs/ca-bundle.crt \
/etc/ssl/cert.pem \
/etc/ssl/certs/ca-bundle.crt \
/etc/ssl/certs/ca-certificates.crt \
/usr/local/share/certs/ca-root.crt \
/usr/share/ssl/certs/ca-bundle.crt; do \
if test -f "$path"; then ca="$path"; break; fi; \
done; \
if [ -z "$ca" ]; then \
echo "Failed to locate SSL CA cert."; exit 1; \
else \
echo "$ca"; \
fi)',
},
'targets': [
{
'target_name': 'curl_config',
@ -35,7 +18,6 @@
'USE_IPV6',
'USE_OPENSSL'
'USE_SSLEAY',
'CURL_CA_BUNDLE="<(curl_ca_bundle)"',
],
'include_dirs': [
'config',
@ -55,6 +37,7 @@
'direct_dependent_settings': {
'defines': [
'HAVE_CONFIG_H',
'CURL_CA_BUNDLE="<!(config/linux/find_curl_ca_bundle.sh)"',
],
'include_dirs': [
'config/linux',