All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] cmake-native: use internal cmcurl library
@ 2022-12-29  2:34 changqing.li
  2022-12-29  2:34 ` [PATCH 2/2] curl: enable nghttp2 for support HTTP2 changqing.li
  0 siblings, 1 reply; 14+ messages in thread
From: changqing.li @ 2022-12-29  2:34 UTC (permalink / raw)
  To: openembedded-core

From: Changqing Li <changqing.li@windriver.com>

This commit is for breaking circular dependency in following condition:
After enabling PACKAGECONFIG nghttp2 for curl, the dependency chain is:
curl-native -> nghttp2-native -> cmake-native -> curl-native.
So change to use internal cmcurl library to fix this. And as using
system curl library before, disable nghttp2 and use system openssl
library for cmcurl.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 .../cmake/cmake-native_3.25.1.bb              |  8 +++--
 ...1-CMakeLists.txt-disable-USE_NGHTTP2.patch | 31 +++++++++++++++++++
 2 files changed, 36 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-devtools/cmake/cmake/0001-CMakeLists.txt-disable-USE_NGHTTP2.patch

diff --git a/meta/recipes-devtools/cmake/cmake-native_3.25.1.bb b/meta/recipes-devtools/cmake/cmake-native_3.25.1.bb
index bcc87eb8f2..c150aef5ef 100644
--- a/meta/recipes-devtools/cmake/cmake-native_3.25.1.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_3.25.1.bb
@@ -1,21 +1,23 @@
 require cmake.inc
 inherit native
 
-DEPENDS += "bzip2-replacement-native xz-native zlib-native curl-native ncurses-native zstd-native"
+DEPENDS += "bzip2-replacement-native xz-native zlib-native ncurses-native zstd-native openssl-native"
 
 SRC_URI += "file://OEToolchainConfig.cmake \
             file://environment.d-cmake.sh \
             file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \
             file://0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch \
+            file://0001-CMakeLists.txt-disable-USE_NGHTTP2.patch \
             "
 
-LICENSE:append = " & BSD-1-Clause & MIT & BSD-2-Clause"
+LICENSE:append = " & BSD-1-Clause & MIT & BSD-2-Clause & curl"
 LIC_FILES_CHKSUM:append = " \
     file://Utilities/cmjsoncpp/LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926 \
     file://Utilities/cmlibarchive/COPYING;md5=d499814247adaee08d88080841cb5665 \
     file://Utilities/cmexpat/COPYING;md5=9e2ce3b3c4c0f2670883a23bbd7c37a9 \
     file://Utilities/cmlibrhash/COPYING;md5=a8c2a557a5c53b1c12cddbee98c099af \
     file://Utilities/cmlibuv/LICENSE;md5=ad93ca1fffe931537fcf64f6fcce084d \
+    file://Utilities/cmcurl/COPYING;md5=190c514872597083303371684954f238 \
 "
 
 B = "${WORKDIR}/build"
@@ -30,9 +32,9 @@ CMAKE_EXTRACONF = "\
     -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
     -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
     -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=0 \
+    -DCMAKE_USE_SYSTEM_LIBRARY_CURL=0 \
     -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
     -DHAVE_SYS_ACL_H=0 \
-    -DCURL_LIBRARIES=-lcurl \
 "
 
 do_configure () {
diff --git a/meta/recipes-devtools/cmake/cmake/0001-CMakeLists.txt-disable-USE_NGHTTP2.patch b/meta/recipes-devtools/cmake/cmake/0001-CMakeLists.txt-disable-USE_NGHTTP2.patch
new file mode 100644
index 0000000000..d6486cb45f
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0001-CMakeLists.txt-disable-USE_NGHTTP2.patch
@@ -0,0 +1,31 @@
+From 3fd6082c52a8140db5995afb59fb391f7d5c19d7 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Wed, 28 Dec 2022 17:51:27 +0800
+Subject: [PATCH] CMakeLists.txt: disable USE_NGHTTP2
+
+nghttp2 depends on cmake-native to build, to break circular
+dependency, disable nghttp2.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ Utilities/cmcurl/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
+index f842270b..17b1ce19 100644
+--- a/Utilities/cmcurl/CMakeLists.txt
++++ b/Utilities/cmcurl/CMakeLists.txt
+@@ -68,7 +68,7 @@ set(ENABLE_UNIX_SOCKETS OFF CACHE INTERNAL "No curl Unix domain sockets support"
+ set(HTTP_ONLY OFF CACHE INTERNAL "Curl is not http-only")
+ set(PICKY_COMPILER OFF CACHE INTERNAL "Enable picky compiler options")
+ set(USE_LIBIDN2 ON)
+-set(USE_NGHTTP2 ON)
++set(USE_NGHTTP2 OFF)
+ set(USE_NGTCP2 OFF)
+ set(USE_QUICHE OFF)
+ set(USE_WIN32_IDN OFF)
+-- 
+2.25.1
+
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-01-29  3:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-29  2:34 [PATCH 1/2] cmake-native: use internal cmcurl library changqing.li
2022-12-29  2:34 ` [PATCH 2/2] curl: enable nghttp2 for support HTTP2 changqing.li
2023-01-04 19:17   ` [OE-core] " Khem Raj
2023-01-10  9:32     ` Changqing Li
2023-01-10 16:49       ` Khem Raj
2023-01-05 14:09   ` Alexandre Belloni
2023-01-13  8:04     ` Changqing Li
2023-01-15 21:30       ` Alexandre Belloni
2023-01-20  1:48         ` Changqing Li
     [not found]         ` <173BE13D4A763969.24231@lists.openembedded.org>
2023-01-28  8:03           ` Changqing Li
2023-01-28 23:17             ` Khem Raj
2023-01-28 23:32               ` Khem Raj
2023-01-29  2:24                 ` Changqing Li
2023-01-29  3:38                   ` Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.