summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2020-02-25 20:36:15 +0100
committerKhem Raj <raj.khem@gmail.com>2020-02-26 07:17:58 -0800
commite92cbff942b9ef6c50d7a7cbfb7ee4d2be656e2e (patch)
tree72032d9c3182d18a055536581ff2966791a35e81 /meta-networking
parentc66896149c8b6bea524a8b518ea8b704ce7a9fd0 (diff)
downloadmeta-openembedded-e92cbff942b9ef6c50d7a7cbfb7ee4d2be656e2e.tar.gz
c-ares: move from meta-networking to meta-oe
* nodejs from meta-oe depends on this since: commit 76dd3dac1f1e67a5c44ad732b8e827cc36ded641 Author: André Draszik <git@andred.net> Date: Tue Oct 29 16:42:24 2019 +0000 nodejs: allow use of system c-ares (and make default) Use system c-ares via PACKAGECONFIG by default. So far, nodejs had been built using its embedded copy of c-ares, which we generally try to avoid, for the known reasons (independent updates, cve & license checks, etc). Notes: * otherwise nodejs uses its bundled version of c-ares * the PACKAGECONFIG variable is 'ares' so as to be in line with other uses of this (wget & curl recipes in OE core) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb2
-rw-r--r--meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch112
-rw-r--r--meta-networking/recipes-support/c-ares/c-ares_1.15.0.bb26
3 files changed, 1 insertions, 139 deletions
diff --git a/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb b/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb
index fa9bf2db5..103c99bb1 100644
--- a/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb
+++ b/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb
@@ -107,7 +107,7 @@ RDEPENDS_packagegroup-meta-networking-support = "\
107 tunctl dovecot ipvsadm stunnel chrony spice-protocol \ 107 tunctl dovecot ipvsadm stunnel chrony spice-protocol \
108 usbredir ntop wireshark tnftp lksctp-tools \ 108 usbredir ntop wireshark tnftp lksctp-tools \
109 cim-schema-docs cim-schema-final cim-schema-exper \ 109 cim-schema-docs cim-schema-final cim-schema-exper \
110 libmemcached smcroute libtevent ipcalc c-ares uftp \ 110 libmemcached smcroute libtevent ipcalc uftp \
111 ntimed linux-atm ssmtp openvpn rdma-core \ 111 ntimed linux-atm ssmtp openvpn rdma-core \
112 iftop aoetools tcpslice tcpdump libtalloc memcached nuttcp netcat \ 112 iftop aoetools tcpslice tcpdump libtalloc memcached nuttcp netcat \
113 netcat-openbsd fetchmail yp-tools ypbind-mt yp-tools \ 113 netcat-openbsd fetchmail yp-tools ypbind-mt yp-tools \
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
deleted file mode 100644
index 8cadb2bba..000000000
--- a/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch
+++ /dev/null
@@ -1,112 +0,0 @@
1From 12414304245cce6ef0e8b9547949be5109845353 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Tue, 24 Jul 2018 13:33:33 +0800
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
11update to 1.14.0, fix patch warning
12
13Signed-off-by: Changqing Li <changqing.li@windriver.com>
14---
15 CMakeLists.txt | 23 +++++++++++++++++++++++
16 libcares.pc.cmakein | 20 ++++++++++++++++++++
17 2 files changed, 43 insertions(+)
18 create mode 100644 libcares.pc.cmakein
19
20diff --git a/CMakeLists.txt b/CMakeLists.txt
21index 60a880c..71eaa53 100644
22--- a/CMakeLists.txt
23+++ b/CMakeLists.txt
24@@ -193,22 +193,30 @@ ADD_DEFINITIONS(${SYSFLAGS})
25
26
27 # Tell C-Ares about libraries to depend on
28+# Also pass these libraries to pkg-config file
29+SET(CARES_PRIVATE_LIBS_LIST)
30 IF (HAVE_LIBRESOLV)
31 LIST (APPEND CARES_DEPENDENT_LIBS resolv)
32+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lresolv")
33 ENDIF ()
34 IF (HAVE_LIBNSL)
35 LIST (APPEND CARES_DEPENDENT_LIBS nsl)
36+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lnsl")
37 ENDIF ()
38 IF (HAVE_LIBSOCKET)
39 LIST (APPEND CARES_DEPENDENT_LIBS socket)
40+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lsocket")
41 ENDIF ()
42 IF (HAVE_LIBRT)
43 LIST (APPEND CARES_DEPENDENT_LIBS rt)
44+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lrt")
45 ENDIF ()
46 IF (WIN32)
47 LIST (APPEND CARES_DEPENDENT_LIBS ws2_32)
48+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lws2_32")
49 ENDIF ()
50
51+string (REPLACE ";" " " CARES_PRIVATE_LIBS "${CARES_PRIVATE_LIBS_LIST}")
52
53 # When checking for symbols, we need to make sure we set the proper
54 # headers, libraries, and definitions for the detection to work properly
55@@ -514,6 +522,15 @@ CONFIGURE_FILE (ares_build.h.cmake ${PROJECT_BINARY_DIR}/ares_build.h)
56 # Write ares_config.h configuration file. This is used only for the build.
57 CONFIGURE_FILE (ares_config.h.cmake ${PROJECT_BINARY_DIR}/ares_config.h)
58
59+# Pass required CFLAGS to pkg-config in case of static library
60+IF (CARES_STATIC)
61+ SET (CPPFLAG_CARES_STATICLIB "-DCARES_STATICLIB")
62+ENDIF()
63+
64+# Write ares_config.h configuration file. This is used only for the build.
65+CONFIGURE_FILE (libcares.pc.cmakein ${PROJECT_BINARY_DIR}/libcares.pc @ONLY)
66+
67+
68
69 # TRANSFORM_MAKEFILE_INC
70 #
71@@ -664,6 +681,12 @@ IF (CARES_INSTALL)
72 INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcares.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
73 ENDIF ()
74
75+# pkg-config file
76+IF (CARES_INSTALL)
77+ SET (PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
78+ INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcares.pc" DESTINATION ${PKGCONFIG_INSTALL_DIR})
79+ENDIF ()
80+
81 # Legacy chain-building variables (provided for compatibility with old code).
82 # Don't use these, external code should be updated to refer to the aliases directly (e.g., Cares::cares).
83 SET (CARES_FOUND 1 CACHE INTERNAL "CARES LIBRARY FOUND")
84diff --git a/libcares.pc.cmakein b/libcares.pc.cmakein
85new file mode 100644
86index 0000000..3579256
87--- /dev/null
88+++ b/libcares.pc.cmakein
89@@ -0,0 +1,20 @@
90+#***************************************************************************
91+# Project ___ __ _ _ __ ___ ___
92+# / __|____ / _` | '__/ _ \/ __|
93+# | (_|_____| (_| | | | __/\__ \
94+# \___| \__,_|_| \___||___/
95+#
96+prefix=@CMAKE_INSTALL_PREFIX@
97+exec_prefix=@CMAKE_INSTALL_PREFIX@
98+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
99+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
100+
101+Name: c-ares
102+URL: http://daniel.haxx.se/projects/c-ares/
103+Description: asynchronous DNS lookup library
104+Version: @VERSION@
105+Requires:
106+Requires.private:
107+Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@
108+Libs: -L${libdir} -lcares
109+Libs.private: @CARES_PRIVATE_LIBS@
110--
1112.7.4
112
diff --git a/meta-networking/recipes-support/c-ares/c-ares_1.15.0.bb b/meta-networking/recipes-support/c-ares/c-ares_1.15.0.bb
deleted file mode 100644
index d437529dc..000000000
--- a/meta-networking/recipes-support/c-ares/c-ares_1.15.0.bb
+++ /dev/null
@@ -1,26 +0,0 @@
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=fb997454c8d62aa6a47f07a8cd48b006"
7
8PV = "1.15.0+gitr${SRCPV}"
9
10SRC_URI = "\
11 git://github.com/c-ares/c-ares.git \
12 file://cmake-install-libcares.pc.patch \
13"
14SRCREV = "e982924acee7f7313b4baa4ee5ec000c5e373c30"
15
16UPSTREAM_CHECK_GITTAGREGEX = "cares-(?P<pver>\d+_(\d_?)+)"
17
18S = "${WORKDIR}/git"
19
20inherit cmake pkgconfig
21
22PACKAGES =+ "${PN}-utils"
23
24FILES_${PN}-utils = "${bindir}"
25
26BBCLASSEXTEND = "native nativesdk"