summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/c-ares
diff options
context:
space:
mode:
authorAlexey Firago <alexey_firago@mentor.com>2017-07-27 00:08:32 +0300
committerJoe MacDonald <joe_macdonald@mentor.com>2017-09-08 16:38:56 -0400
commit12f2fed08311359d703446ed6c4271733a505645 (patch)
treef2f79da09ec3247e59d47911032eb1e226955bea /meta-networking/recipes-support/c-ares
parent7a13a2e45b26c22476f6b08a3008c6fc287acc62 (diff)
downloadmeta-openembedded-12f2fed08311359d703446ed6c4271733a505645.tar.gz
c-ares: update 1.12.0 -> 1.13.0
Update to c-ares version 1.13.0 from June 20 2017 Recipe updates: * Change SRC_URI to github, because tarball at https://c-ares.haxx.se/download/c-ares-1.13.0.tar.gz does not include all required files (cmake related). * Change build method to cmake. Library now supports cmake build system and installs *.cmake config files. These files can be used by several libraries/packages, such as gRPC, curl. * Add patch to generate and install libcares.pc during cmake build. * Add -utils package for the utilities installed during cmake build (acountry, adig, ahost). Highlights of library changes and bug fixes: * cmake build system support added * Add virtual function set for socket IO: ares_set_socket_functions * CVE-2017-1000381: c-ares NAPTR parser out of bounds access Full changelog - https://c-ares.haxx.se/changelog.html Signed-off-by: Alexey Firago <alexey_firago@mentor.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-support/c-ares')
-rw-r--r--meta-networking/recipes-support/c-ares/c-ares/0001-configure.ac-don-t-override-passed-cflags.patch26
-rw-r--r--meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch105
-rw-r--r--meta-networking/recipes-support/c-ares/c-ares_1.12.0.bb15
-rw-r--r--meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb22
4 files changed, 127 insertions, 41 deletions
diff --git a/meta-networking/recipes-support/c-ares/c-ares/0001-configure.ac-don-t-override-passed-cflags.patch b/meta-networking/recipes-support/c-ares/c-ares/0001-configure.ac-don-t-override-passed-cflags.patch
deleted file mode 100644
index 10fad4e94..000000000
--- a/meta-networking/recipes-support/c-ares/c-ares/0001-configure.ac-don-t-override-passed-cflags.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From 2a7236d2a7bb9c3d3c3f44ebf59404bf7134fcb3 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
3Date: Tue, 12 Apr 2016 11:37:28 +0100
4Subject: [PATCH] configure.ac: don't override passed cflags
5
6We are controlling debug and optimiser flags from OE
7---
8 configure.ac | 2 --
9 1 file changed, 2 deletions(-)
10
11diff --git a/configure.ac b/configure.ac
12index 5c02450..3cf9fcd 100644
13--- a/configure.ac
14+++ b/configure.ac
15@@ -147,8 +147,6 @@ dnl **********************************************************************
16
17 CARES_CHECK_COMPILER
18 CARES_SET_COMPILER_BASIC_OPTS
19-CARES_SET_COMPILER_DEBUG_OPTS
20-CARES_SET_COMPILER_OPTIMIZE_OPTS
21 CARES_SET_COMPILER_WARNING_OPTS
22
23 if test "$compiler_id" = "INTEL_UNIX_C"; then
24--
252.8.0.rc3
26
diff --git a/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch b/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch
new file mode 100644
index 000000000..5dd4c7d77
--- /dev/null
+++ b/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch
@@ -0,0 +1,105 @@
1From 7e1ae687916fd5878ee755afbdea6b10494e0b92 Mon Sep 17 00:00:00 2001
2From: Alexey Firago <alexey_firago@mentor.com>
3Date: Wed, 26 Jul 2017 23:21:25 +0300
4Subject: [PATCH] cmake: Install libcares.pc
5
6Prepare and install libcares.pc file during cmake build, so libraries
7using pkg-config to find libcares will not fail.
8
9Signed-off-by: Alexey Firago <alexey_firago@mentor.com>
10---
11 CMakeLists.txt | 21 +++++++++++++++++++++
12 libcares.pc.cmakein | 20 ++++++++++++++++++++
13 2 files changed, 41 insertions(+)
14 create mode 100644 libcares.pc.cmakein
15
16diff --git a/CMakeLists.txt b/CMakeLists.txt
17index 364b6c7..0016b67 100644
18--- a/CMakeLists.txt
19+++ b/CMakeLists.txt
20@@ -173,21 +173,29 @@ ADD_DEFINITIONS(${SYSFLAGS})
21
22
23 # Tell C-Ares about libraries to depend on
24+# Also pass these libraries to pkg-config file
25+SET(CARES_PRIVATE_LIBS_LIST)
26 IF (HAVE_LIBRESOLV)
27 LIST (APPEND CARES_DEPENDENT_LIBS resolv)
28+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lresolv")
29 ENDIF ()
30 IF (HAVE_LIBNSL)
31 LIST (APPEND CARES_DEPENDENT_LIBS nsl)
32+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lnsl")
33 ENDIF ()
34 IF (HAVE_LIBSOCKET)
35 LIST (APPEND CARES_DEPENDENT_LIBS socket)
36+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lsocket")
37 ENDIF ()
38 IF (HAVE_LIBRT)
39 LIST (APPEND CARES_DEPENDENT_LIBS rt)
40+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lrt")
41 ENDIF ()
42 IF (WIN32)
43 LIST (APPEND CARES_DEPENDENT_LIBS ws2_32)
44+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lws2_32")
45 ENDIF ()
46+string (REPLACE ";" " " CARES_PRIVATE_LIBS "${CARES_PRIVATE_LIBS_LIST}")
47
48
49 # When checking for symbols, we need to make sure we set the proper
50@@ -489,6 +497,13 @@ CONFIGURE_FILE (ares_build.h.cmake ${PROJECT_BINARY_DIR}/ares_build.h)
51 # Write ares_config.h configuration file. This is used only for the build.
52 CONFIGURE_FILE (ares_config.h.cmake ${PROJECT_BINARY_DIR}/ares_config.h)
53
54+# Pass required CFLAGS to pkg-config in case of static library
55+IF (CARES_STATIC)
56+ SET (CPPFLAG_CARES_STATICLIB "-DCARES_STATICLIB")
57+ENDIF()
58+
59+# Write ares_config.h configuration file. This is used only for the build.
60+CONFIGURE_FILE (libcares.pc.cmakein ${PROJECT_BINARY_DIR}/libcares.pc @ONLY)
61
62 # TRANSFORM_MAKEFILE_INC
63 #
64@@ -625,6 +640,12 @@ IF (CARES_INSTALL)
65 INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" DESTINATION ${CMAKECONFIG_INSTALL_DIR})
66 ENDIF ()
67
68+# pkg-config file
69+IF (CARES_INSTALL)
70+ SET (PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
71+ INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcares.pc" DESTINATION ${PKGCONFIG_INSTALL_DIR})
72+ENDIF ()
73+
74 # Legacy chain-building variables (provided for compatibility with old code).
75 # Don't use these, external code should be updated to refer to the aliases directly (e.g., Cares::cares).
76 SET (CARES_FOUND 1 CACHE INTERNAL "CARES LIBRARY FOUND")
77diff --git a/libcares.pc.cmakein b/libcares.pc.cmakein
78new file mode 100644
79index 0000000..f29fede
80--- /dev/null
81+++ b/libcares.pc.cmakein
82@@ -0,0 +1,20 @@
83+#***************************************************************************
84+# Project ___ __ _ _ __ ___ ___
85+# / __|____ / _` | '__/ _ \/ __|
86+# | (_|_____| (_| | | | __/\__ \
87+# \___| \__,_|_| \___||___/
88+#
89+prefix=@CMAKE_INSTALL_PREFIX@
90+exec_prefix=@CMAKE_INSTALL_PREFIX@
91+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
92+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
93+
94+Name: c-ares
95+URL: http://daniel.haxx.se/projects/c-ares/
96+Description: asynchronous DNS lookup library
97+Version: @VERSION@
98+Requires:
99+Requires.private:
100+Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@
101+Libs: -L${libdir} -lcares
102+Libs.private: @CARES_PRIVATE_LIBS@
103--
1042.7.4
105
diff --git a/meta-networking/recipes-support/c-ares/c-ares_1.12.0.bb b/meta-networking/recipes-support/c-ares/c-ares_1.12.0.bb
deleted file mode 100644
index 4e28d6abc..000000000
--- a/meta-networking/recipes-support/c-ares/c-ares_1.12.0.bb
+++ /dev/null
@@ -1,15 +0,0 @@
1# Copyright (c) 2012-2014 LG Electronics, Inc.
2
3SUMMARY = "c-ares is a C library that resolves names asynchronously."
4HOMEPAGE = "http://daniel.haxx.se/projects/c-ares/"
5SECTION = "libs"
6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://LICENSE.md;md5=f4b026880834eb01c035c5e5cb47ccac"
8
9SRC_URI = "http://c-ares.haxx.se/download/${BP}.tar.gz \
10 file://0001-configure.ac-don-t-override-passed-cflags.patch \
11"
12SRC_URI[md5sum] = "2ca44be1715cd2c5666a165d35788424"
13SRC_URI[sha256sum] = "8692f9403cdcdf936130e045c84021665118ee9bfea905d1a76f04d4e6f365fb"
14
15inherit autotools pkgconfig
diff --git a/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb b/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb
new file mode 100644
index 000000000..8d297aa4a
--- /dev/null
+++ b/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb
@@ -0,0 +1,22 @@
1# Copyright (c) 2012-2014 LG Electronics, Inc.
2SUMMARY = "c-ares is a C library that resolves names asynchronously."
3HOMEPAGE = "http://daniel.haxx.se/projects/c-ares/"
4SECTION = "libs"
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://LICENSE.md;md5=f4b026880834eb01c035c5e5cb47ccac"
7SRCREV = "3be1924221e1326df520f8498d704a5c4c8d0cce"
8PV = "1.13.0+gitr${SRCPV}"
9
10SRC_URI = "\
11 git://github.com/c-ares/c-ares.git \
12 file://cmake-install-libcares.pc.patch \
13"
14
15S = "${WORKDIR}/git"
16
17inherit cmake pkgconfig
18
19PACKAGES =+ "${PN}-utils"
20
21FILES_${PN}-dev += "${libdir}/cmake"
22FILES_${PN}-utils = "${bindir}"