From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- .../c-ares/c-ares/cmake-install-libcares.pc.patch | 105 +++++++++++++++++++++ .../recipes-support/c-ares/c-ares_1.13.0.bb | 24 +++++ 2 files changed, 129 insertions(+) create mode 100644 meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch create mode 100644 meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb (limited to 'meta-openembedded/meta-networking/recipes-support/c-ares') diff --git a/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch b/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch new file mode 100644 index 000000000..5dd4c7d77 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch @@ -0,0 +1,105 @@ +From 7e1ae687916fd5878ee755afbdea6b10494e0b92 Mon Sep 17 00:00:00 2001 +From: Alexey Firago +Date: Wed, 26 Jul 2017 23:21:25 +0300 +Subject: [PATCH] cmake: Install libcares.pc + +Prepare and install libcares.pc file during cmake build, so libraries +using pkg-config to find libcares will not fail. + +Signed-off-by: Alexey Firago +--- + CMakeLists.txt | 21 +++++++++++++++++++++ + libcares.pc.cmakein | 20 ++++++++++++++++++++ + 2 files changed, 41 insertions(+) + create mode 100644 libcares.pc.cmakein + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 364b6c7..0016b67 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -173,21 +173,29 @@ ADD_DEFINITIONS(${SYSFLAGS}) + + + # Tell C-Ares about libraries to depend on ++# Also pass these libraries to pkg-config file ++SET(CARES_PRIVATE_LIBS_LIST) + IF (HAVE_LIBRESOLV) + LIST (APPEND CARES_DEPENDENT_LIBS resolv) ++ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lresolv") + ENDIF () + IF (HAVE_LIBNSL) + LIST (APPEND CARES_DEPENDENT_LIBS nsl) ++ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lnsl") + ENDIF () + IF (HAVE_LIBSOCKET) + LIST (APPEND CARES_DEPENDENT_LIBS socket) ++ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lsocket") + ENDIF () + IF (HAVE_LIBRT) + LIST (APPEND CARES_DEPENDENT_LIBS rt) ++ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lrt") + ENDIF () + IF (WIN32) + LIST (APPEND CARES_DEPENDENT_LIBS ws2_32) ++ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lws2_32") + ENDIF () ++string (REPLACE ";" " " CARES_PRIVATE_LIBS "${CARES_PRIVATE_LIBS_LIST}") + + + # When checking for symbols, we need to make sure we set the proper +@@ -489,6 +497,13 @@ CONFIGURE_FILE (ares_build.h.cmake ${PROJECT_BINARY_DIR}/ares_build.h) + # Write ares_config.h configuration file. This is used only for the build. + CONFIGURE_FILE (ares_config.h.cmake ${PROJECT_BINARY_DIR}/ares_config.h) + ++# Pass required CFLAGS to pkg-config in case of static library ++IF (CARES_STATIC) ++ SET (CPPFLAG_CARES_STATICLIB "-DCARES_STATICLIB") ++ENDIF() ++ ++# Write ares_config.h configuration file. This is used only for the build. ++CONFIGURE_FILE (libcares.pc.cmakein ${PROJECT_BINARY_DIR}/libcares.pc @ONLY) + + # TRANSFORM_MAKEFILE_INC + # +@@ -625,6 +640,12 @@ IF (CARES_INSTALL) + INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" DESTINATION ${CMAKECONFIG_INSTALL_DIR}) + ENDIF () + ++# pkg-config file ++IF (CARES_INSTALL) ++ SET (PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++ INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcares.pc" DESTINATION ${PKGCONFIG_INSTALL_DIR}) ++ENDIF () ++ + # Legacy chain-building variables (provided for compatibility with old code). + # Don't use these, external code should be updated to refer to the aliases directly (e.g., Cares::cares). + SET (CARES_FOUND 1 CACHE INTERNAL "CARES LIBRARY FOUND") +diff --git a/libcares.pc.cmakein b/libcares.pc.cmakein +new file mode 100644 +index 0000000..f29fede +--- /dev/null ++++ b/libcares.pc.cmakein +@@ -0,0 +1,20 @@ ++#*************************************************************************** ++# Project ___ __ _ _ __ ___ ___ ++# / __|____ / _` | '__/ _ \/ __| ++# | (_|_____| (_| | | | __/\__ \ ++# \___| \__,_|_| \___||___/ ++# ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=@CMAKE_INSTALL_PREFIX@ ++libdir=@CMAKE_INSTALL_FULL_LIBDIR@ ++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ ++ ++Name: c-ares ++URL: http://daniel.haxx.se/projects/c-ares/ ++Description: asynchronous DNS lookup library ++Version: @VERSION@ ++Requires: ++Requires.private: ++Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@ ++Libs: -L${libdir} -lcares ++Libs.private: @CARES_PRIVATE_LIBS@ +-- +2.7.4 + diff --git a/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb b/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb new file mode 100644 index 000000000..70e497f5f --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb @@ -0,0 +1,24 @@ +# Copyright (c) 2012-2014 LG Electronics, Inc. +SUMMARY = "c-ares is a C library that resolves names asynchronously." +HOMEPAGE = "http://daniel.haxx.se/projects/c-ares/" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=f4b026880834eb01c035c5e5cb47ccac" +SRCREV = "3be1924221e1326df520f8498d704a5c4c8d0cce" +PV = "1.13.0+gitr${SRCPV}" + +SRC_URI = "\ + git://github.com/c-ares/c-ares.git \ + file://cmake-install-libcares.pc.patch \ +" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +PACKAGES =+ "${PN}-utils" + +FILES_${PN}-dev += "${libdir}/cmake" +FILES_${PN}-utils = "${bindir}" + +BBCLASSEXTEND = "native" -- cgit v1.2.3