Skip to contentSkip to conversation

cli11: upgrade 1.8.0 -> 1.9.0

PATCH In review William A. Kennington III 2 participants 3 messages May 14, 2020 – May 17, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cli11: upgrade 1.8.0 -> 1.9.0

Variants of the patches are now included upstream so the local patching can be removed.

---
 .../cli11/{cli11_1.8.0.bb => cli11_1.9.0.bb}  |  8 +---
 .../files/0001-Add-CLANG_TIDY-check.patch     | 25 ------------
 ...stallDirs-instead-of-hard-coded-path.patch | 39 -------------------
 3 files changed, 1 insertion(+), 71 deletions(-)
 rename meta-oe/recipes-support/cli11/{cli11_1.8.0.bb => cli11_1.9.0.bb} (68%)
 delete mode 100644 meta-oe/recipes-support/cli11/files/0001-Add-CLANG_TIDY-check.patch
 delete mode 100644 meta-oe/recipes-support/cli11/files/0001-Use-GNUInstallDirs-instead-of-hard-coded-path.patch
meta-oe/recipes-support/cli11/cli11_1.9.0.bb renamed from meta-oe/recipes-support/cli11/cli11_1.8.0.bb +1 -7
similarity index 68%
rename from meta-oe/recipes-support/cli11/cli11_1.8.0.bb
rename to meta-oe/recipes-support/cli11/cli11_1.9.0.bb
index dd129cbec..151653b22 100644
@@ -6,18 +6,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b73927b18d5c6cd8d2ed28a6ad539733"
 SRCREV = "13becaddb657eacd090537719a669d66d393b8b2"
 PV .= "+git${SRCPV}"
 
-SRC_URI += "gitsm://github.com/CLIUtils/CLI11 \
-            file://0001-Add-CLANG_TIDY-check.patch \
-            file://0001-Use-GNUInstallDirs-instead-of-hard-coded-path.patch \
-           "
+SRC_URI += "gitsm://github.com/CLIUtils/CLI11"
 
 S = "${WORKDIR}/git"
 
 inherit cmake
 inherit ptest
 
-EXTRA_OECMAKE += "-DCLANG_TIDY=OFF"
-DEPENDS += "boost"
-
 # cli11 is a header only C++ library, so the main package will be empty.
 RDEPENDS_${PN}-dev = ""
meta-oe/recipes-support/cli11/files/0001-Add-CLANG_TIDY-check.patch deleted +0 -25
deleted file mode 100644
index 02b3c9bd7..000000000
@@ -1,25 +0,0 @@
-From 902b251fd8d6408ee6623e7a92692948cf90187d Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Tue, 12 Feb 2019 13:22:21 -0800
-Subject: [PATCH] Add CLANG_TIDY check
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <[email protected]>
-
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7073a0b..2dd2c02 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -60,7 +60,7 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
-         endif()
-     endif()
- 
--    if(CMAKE_VERSION VERSION_GREATER 3.6)
-+    if(CMAKE_VERSION VERSION_GREATER 3.6 AND CLANG_TIDY)
-         # Add clang-tidy if available
-         option(CLANG_TIDY_FIX "Perform fixes for Clang-Tidy" OFF)
-         find_program(
meta-oe/recipes-support/cli11/files/0001-Use-GNUInstallDirs-instead-of-hard-coded-path.patch deleted +0 -39
deleted file mode 100644
index 4541cd929..000000000
@@ -1,39 +0,0 @@
-From 8c51221f748bca1483fe1141e584867d2ff34a07 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Thu, 19 Dec 2019 16:26:39 -0800
-Subject: [PATCH] Use GNUInstallDirs instead of hard-coded path
-
-Upstream-Status: Submitted [https://github.com/CLIUtils/CLI11/pull/373]
-Signed-off-by: Khem Raj <[email protected]>
----
- CMakeLists.txt | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7073a0b..5236fd2 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -120,17 +120,18 @@ endif()
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/CLI11ConfigVersion.cmake.in"
-   "${CMAKE_CURRENT_BINARY_DIR}/CLI11ConfigVersion.cmake" @ONLY)
- 
-+include(GNUInstallDirs)
- # These installs only make sense for a local project
- if(CUR_PROJ)
-     # Make version available in the install
-     install(FILES "${CMAKE_CURRENT_BINARY_DIR}/CLI11ConfigVersion.cmake"
--            DESTINATION lib/cmake/CLI11)
-+            DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CLI11)
- 
-     # Install the export target as a file
-     install(EXPORT CLI11Targets
-             FILE CLI11Config.cmake
-             NAMESPACE CLI11::
--            DESTINATION lib/cmake/CLI11)
-+            DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CLI11)
- 
-     # Use find_package on the installed package
-     export(TARGETS CLI11
--- 
-2.24.1
-
Signature · 1 line
2.26.2.645.ge9eca65c58-goog
#1 lore raw
Quoted 4 lines · William A. Kennington III via lists.openembedded.org

Variants of the patches are now included upstream so the local patching can be removed.

Building with clang fails like below

https://errors.yoctoproject.org/Errors/Details/412048/

core2-32-yoe-linux/cli11/1.9.0+gitAUTOINC+13becaddb6-r0/git/include/CLI/Optional.hpp:6:10:
error: 'istream' file not found [clang-diagnostic-error]

#include <istream>
         ^
Quoted 117 lines
---
 .../cli11/{cli11_1.8.0.bb => cli11_1.9.0.bb}  |  8 +---
 .../files/0001-Add-CLANG_TIDY-check.patch     | 25 ------------
 ...stallDirs-instead-of-hard-coded-path.patch | 39 -------------------
 3 files changed, 1 insertion(+), 71 deletions(-)
 rename meta-oe/recipes-support/cli11/{cli11_1.8.0.bb => cli11_1.9.0.bb} (68%)
 delete mode 100644 meta-oe/recipes-support/cli11/files/0001-Add-CLANG_TIDY-check.patch
 delete mode 100644 meta-oe/recipes-support/cli11/files/0001-Use-GNUInstallDirs-instead-of-hard-coded-path.patch
meta-oe/recipes-support/cli11/cli11_1.9.0.bb renamed from meta-oe/recipes-support/cli11/cli11_1.8.0.bb +1 -7
similarity index 68%
rename from meta-oe/recipes-support/cli11/cli11_1.8.0.bb
rename to meta-oe/recipes-support/cli11/cli11_1.9.0.bb
index dd129cbec..151653b22 100644
@@ -6,18 +6,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b73927b18d5c6cd8d2ed28a6ad539733"
 SRCREV = "13becaddb657eacd090537719a669d66d393b8b2"
 PV .= "+git${SRCPV}"
 
-SRC_URI += "gitsm://github.com/CLIUtils/CLI11 \
-            file://0001-Add-CLANG_TIDY-check.patch \
-            file://0001-Use-GNUInstallDirs-instead-of-hard-coded-path.patch \
-           "
+SRC_URI += "gitsm://github.com/CLIUtils/CLI11"
 
 S = "${WORKDIR}/git"
 
 inherit cmake
 inherit ptest
 
-EXTRA_OECMAKE += "-DCLANG_TIDY=OFF"
-DEPENDS += "boost"
-
 # cli11 is a header only C++ library, so the main package will be empty.
 RDEPENDS_${PN}-dev = ""
meta-oe/recipes-support/cli11/files/0001-Add-CLANG_TIDY-check.patch deleted +0 -25
deleted file mode 100644
index 02b3c9bd7..000000000
@@ -1,25 +0,0 @@
-From 902b251fd8d6408ee6623e7a92692948cf90187d Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Tue, 12 Feb 2019 13:22:21 -0800
-Subject: [PATCH] Add CLANG_TIDY check
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <[email protected]>
-
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7073a0b..2dd2c02 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -60,7 +60,7 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
-         endif()
-     endif()
-
--    if(CMAKE_VERSION VERSION_GREATER 3.6)
-+    if(CMAKE_VERSION VERSION_GREATER 3.6 AND CLANG_TIDY)
-         # Add clang-tidy if available
-         option(CLANG_TIDY_FIX "Perform fixes for Clang-Tidy" OFF)
-         find_program(
meta-oe/recipes-support/cli11/files/0001-Use-GNUInstallDirs-instead-of-hard-coded-path.patch deleted +0 -40
deleted file mode 100644
index 4541cd929..000000000
@@ -1,39 +0,0 @@
-From 8c51221f748bca1483fe1141e584867d2ff34a07 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Thu, 19 Dec 2019 16:26:39 -0800
-Subject: [PATCH] Use GNUInstallDirs instead of hard-coded path
-
-Upstream-Status: Submitted [https://github.com/CLIUtils/CLI11/pull/373]
-Signed-off-by: Khem Raj <[email protected]>
----
- CMakeLists.txt | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7073a0b..5236fd2 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -120,17 +120,18 @@ endif()
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/CLI11ConfigVersion.cmake.in"
-   "${CMAKE_CURRENT_BINARY_DIR}/CLI11ConfigVersion.cmake" @ONLY)
-
-+include(GNUInstallDirs)
- # These installs only make sense for a local project
- if(CUR_PROJ)
-     # Make version available in the install
-     install(FILES "${CMAKE_CURRENT_BINARY_DIR}/CLI11ConfigVersion.cmake"
--            DESTINATION lib/cmake/CLI11)
-+            DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CLI11)
-
-     # Install the export target as a file
-     install(EXPORT CLI11Targets
-             FILE CLI11Config.cmake
-             NAMESPACE CLI11::
--            DESTINATION lib/cmake/CLI11)
-+            DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CLI11)
-
-     # Use find_package on the installed package
-     export(TARGETS CLI11
---
-2.24.1
-
--

2.26.2.645.ge9eca65c58-goog

#2 lore raw
Quoted 8 lines · Khem Raj
Quoted 4 lines · William A. Kennington III via lists.openembedded.org

Variants of the patches are now included upstream so the local patching can be removed.

Quoted 9 lines

Building with clang fails like below

https://errors.yoctoproject.org/Errors/Details/412048/

core2-32-yoe-linux/cli11/1.9.0+gitAUTOINC+13becaddb6-r0/git/include/CLI/Optional.hpp:6:10:
error: 'istream' file not found [clang-diagnostic-error]

#include <istream>
         ^

This was a problem in clang-tidy invocation of cross-compiler as it was not passing -target option to clang
it was silently ignoring the c++ system headers, this has now been fixed in meta-clang, I am applied this
patch as it is to master.

Quoted 118 lines
Quoted 118 lines
---
 .../cli11/{cli11_1.8.0.bb => cli11_1.9.0.bb}  |  8 +---
 .../files/0001-Add-CLANG_TIDY-check.patch     | 25 ------------
 ...stallDirs-instead-of-hard-coded-path.patch | 39 -------------------
 3 files changed, 1 insertion(+), 71 deletions(-)
 rename meta-oe/recipes-support/cli11/{cli11_1.8.0.bb => cli11_1.9.0.bb} (68%)
 delete mode 100644 meta-oe/recipes-support/cli11/files/0001-Add-CLANG_TIDY-check.patch
 delete mode 100644 meta-oe/recipes-support/cli11/files/0001-Use-GNUInstallDirs-instead-of-hard-coded-path.patch
meta-oe/recipes-support/cli11/cli11_1.9.0.bb renamed from meta-oe/recipes-support/cli11/cli11_1.8.0.bb +1 -7
similarity index 68%
rename from meta-oe/recipes-support/cli11/cli11_1.8.0.bb
rename to meta-oe/recipes-support/cli11/cli11_1.9.0.bb
index dd129cbec..151653b22 100644
@@ -6,18 +6,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b73927b18d5c6cd8d2ed28a6ad539733"
 SRCREV = "13becaddb657eacd090537719a669d66d393b8b2"
 PV .= "+git${SRCPV}"
 
-SRC_URI += "gitsm://github.com/CLIUtils/CLI11 \
-            file://0001-Add-CLANG_TIDY-check.patch \
-            file://0001-Use-GNUInstallDirs-instead-of-hard-coded-path.patch \
-           "
+SRC_URI += "gitsm://github.com/CLIUtils/CLI11"
 
 S = "${WORKDIR}/git"
 
 inherit cmake
 inherit ptest
 
-EXTRA_OECMAKE += "-DCLANG_TIDY=OFF"
-DEPENDS += "boost"
-
 # cli11 is a header only C++ library, so the main package will be empty.
 RDEPENDS_${PN}-dev = ""
meta-oe/recipes-support/cli11/files/0001-Add-CLANG_TIDY-check.patch deleted +0 -25
deleted file mode 100644
index 02b3c9bd7..000000000
@@ -1,25 +0,0 @@
-From 902b251fd8d6408ee6623e7a92692948cf90187d Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Tue, 12 Feb 2019 13:22:21 -0800
-Subject: [PATCH] Add CLANG_TIDY check
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <[email protected]>
-
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7073a0b..2dd2c02 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -60,7 +60,7 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
-         endif()
-     endif()
-
--    if(CMAKE_VERSION VERSION_GREATER 3.6)
-+    if(CMAKE_VERSION VERSION_GREATER 3.6 AND CLANG_TIDY)
-         # Add clang-tidy if available
-         option(CLANG_TIDY_FIX "Perform fixes for Clang-Tidy" OFF)
-         find_program(
meta-oe/recipes-support/cli11/files/0001-Use-GNUInstallDirs-instead-of-hard-coded-path.patch deleted +0 -40
deleted file mode 100644
index 4541cd929..000000000
@@ -1,39 +0,0 @@
-From 8c51221f748bca1483fe1141e584867d2ff34a07 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Thu, 19 Dec 2019 16:26:39 -0800
-Subject: [PATCH] Use GNUInstallDirs instead of hard-coded path
-
-Upstream-Status: Submitted [https://github.com/CLIUtils/CLI11/pull/373]
-Signed-off-by: Khem Raj <[email protected]>
----
- CMakeLists.txt | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7073a0b..5236fd2 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -120,17 +120,18 @@ endif()
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/CLI11ConfigVersion.cmake.in"
-   "${CMAKE_CURRENT_BINARY_DIR}/CLI11ConfigVersion.cmake" @ONLY)
-
-+include(GNUInstallDirs)
- # These installs only make sense for a local project
- if(CUR_PROJ)
-     # Make version available in the install
-     install(FILES "${CMAKE_CURRENT_BINARY_DIR}/CLI11ConfigVersion.cmake"
--            DESTINATION lib/cmake/CLI11)
-+            DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CLI11)
-
-     # Install the export target as a file
-     install(EXPORT CLI11Targets
-             FILE CLI11Config.cmake
-             NAMESPACE CLI11::
--            DESTINATION lib/cmake/CLI11)
-+            DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CLI11)
-
-     # Use find_package on the installed package
-     export(TARGETS CLI11
---
-2.24.1
-
--

2.26.2.645.ge9eca65c58-goog