PHP: add ares as deps

pull/10669/head
Stanley Cheung 8 years ago
parent bb75f3ea82
commit 5ec52ae01a
  1. 1
      build.yaml
  2. 57
      config.m4
  3. 73
      package.xml
  4. 7
      templates/config.m4.template

@ -4473,6 +4473,7 @@ php_config_m4:
deps:
- grpc
- gpr
- ares
- boringssl
headers:
- src/php/ext/grpc/byte_buffer.h

@ -8,6 +8,8 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/include)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/src/php/ext/grpc)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/boringssl/include)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/cares)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/cares/cares)
LIBS="-lpthread $LIBS"
@ -18,8 +20,11 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_LIBRARY(dl)
case $host in
*darwin*) ;;
*darwin*)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/cares/config_darwin)
;;
*)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/cares/config_linux)
PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD)
PHP_ADD_LIBRARY(rt)
;;
@ -621,6 +626,55 @@ if test "$PHP_GRPC" != "no"; then
third_party/boringssl/ssl/tls13_server.c \
third_party/boringssl/ssl/tls_method.c \
third_party/boringssl/ssl/tls_record.c \
third_party/cares/cares/ares__close_sockets.c \
third_party/cares/cares/ares__get_hostent.c \
third_party/cares/cares/ares__read_line.c \
third_party/cares/cares/ares__timeval.c \
third_party/cares/cares/ares_cancel.c \
third_party/cares/cares/ares_create_query.c \
third_party/cares/cares/ares_data.c \
third_party/cares/cares/ares_destroy.c \
third_party/cares/cares/ares_expand_name.c \
third_party/cares/cares/ares_expand_string.c \
third_party/cares/cares/ares_fds.c \
third_party/cares/cares/ares_free_hostent.c \
third_party/cares/cares/ares_free_string.c \
third_party/cares/cares/ares_getenv.c \
third_party/cares/cares/ares_gethostbyaddr.c \
third_party/cares/cares/ares_gethostbyname.c \
third_party/cares/cares/ares_getnameinfo.c \
third_party/cares/cares/ares_getopt.c \
third_party/cares/cares/ares_getsock.c \
third_party/cares/cares/ares_init.c \
third_party/cares/cares/ares_library_init.c \
third_party/cares/cares/ares_llist.c \
third_party/cares/cares/ares_mkquery.c \
third_party/cares/cares/ares_nowarn.c \
third_party/cares/cares/ares_options.c \
third_party/cares/cares/ares_parse_a_reply.c \
third_party/cares/cares/ares_parse_aaaa_reply.c \
third_party/cares/cares/ares_parse_mx_reply.c \
third_party/cares/cares/ares_parse_naptr_reply.c \
third_party/cares/cares/ares_parse_ns_reply.c \
third_party/cares/cares/ares_parse_ptr_reply.c \
third_party/cares/cares/ares_parse_soa_reply.c \
third_party/cares/cares/ares_parse_srv_reply.c \
third_party/cares/cares/ares_parse_txt_reply.c \
third_party/cares/cares/ares_platform.c \
third_party/cares/cares/ares_process.c \
third_party/cares/cares/ares_query.c \
third_party/cares/cares/ares_search.c \
third_party/cares/cares/ares_send.c \
third_party/cares/cares/ares_strcasecmp.c \
third_party/cares/cares/ares_strdup.c \
third_party/cares/cares/ares_strerror.c \
third_party/cares/cares/ares_timeout.c \
third_party/cares/cares/ares_version.c \
third_party/cares/cares/ares_writev.c \
third_party/cares/cares/bitncmp.c \
third_party/cares/cares/inet_net_pton.c \
third_party/cares/cares/inet_ntop.c \
third_party/cares/cares/windows_port.c \
, $ext_shared, , -Wall -Werror \
-Wno-parentheses-equality -Wno-unused-value -std=c11 \
-fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN \
@ -717,5 +771,6 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/x509)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/x509v3)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/ssl)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/cares/cares)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/nanopb)
fi

@ -1027,6 +1027,79 @@
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls13_server.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls_method.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls_record.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_data.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_dns.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_getenv.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_getopt.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_inet_net_pton.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_iphlpapi.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_ipv6.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_library_init.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_llist.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_nowarn.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_platform.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_private.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_rules.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_setup.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_strcasecmp.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_strdup.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_version.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/bitncmp.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/config-win32.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/setup_once.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/ares_build.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/config_linux/ares_config.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/config_darwin/ares_config.h" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares__close_sockets.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares__get_hostent.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares__read_line.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares__timeval.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_cancel.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_create_query.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_data.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_destroy.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_expand_name.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_expand_string.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_fds.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_free_hostent.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_free_string.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_getenv.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_gethostbyaddr.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_gethostbyname.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_getnameinfo.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_getopt.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_getsock.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_init.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_library_init.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_llist.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_mkquery.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_nowarn.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_options.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_parse_a_reply.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_parse_aaaa_reply.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_parse_mx_reply.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_parse_naptr_reply.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_parse_ns_reply.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_parse_ptr_reply.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_parse_soa_reply.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_parse_srv_reply.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_parse_txt_reply.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_platform.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_process.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_query.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_search.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_send.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_strcasecmp.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_strdup.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_strerror.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_timeout.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_version.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/ares_writev.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/bitncmp.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/inet_net_pton.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/inet_ntop.c" role="src" />
<file baseinstalldir="/" name="third_party/cares/cares/windows_port.c" role="src" />
</dir>
</contents>
<dependencies>

@ -10,6 +10,8 @@
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/include)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/src/php/ext/grpc)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/boringssl/include)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/cares)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/cares/cares)
LIBS="-lpthread $LIBS"
@ -20,8 +22,11 @@
PHP_ADD_LIBRARY(dl)
case $host in
*darwin*) ;;
*darwin*)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/cares/config_darwin)
;;
*)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/cares/config_linux)
PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD)
PHP_ADD_LIBRARY(rt)
;;

Loading…
Cancel
Save