From 6c74740048a6a8413e10b4f29164a38d85020877 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 27 May 2021 08:02:46 -0700 Subject: sdbus-cpp: Do not fetch googletest on the fly This package downloads code ( gtest ) post do_fetch task Now this is checked out by bitbake fetcher into decided source directory, this ensures reproducibility Signed-off-by: Khem Raj --- .../0001-Do-not-download-gtest-automatically.patch | 44 ++++++++++++++++++++++ meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb | 8 +++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.3/0001-Do-not-download-gtest-automatically.patch diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.3/0001-Do-not-download-gtest-automatically.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.3/0001-Do-not-download-gtest-automatically.patch new file mode 100644 index 0000000000..5bd3801f38 --- /dev/null +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.3/0001-Do-not-download-gtest-automatically.patch @@ -0,0 +1,44 @@ +From af91a20ee201f13e56f225df536a56e5d8d259e8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 27 May 2021 09:56:49 -0700 +Subject: [PATCH] Do not download gtest automatically + +Signed-off-by: Khem Raj +--- + tests/CMakeLists.txt | 9 +-------- + tests/googletest-download/CMakeLists.txt.in | 3 --- + 2 files changed, 1 insertion(+), 11 deletions(-) + +--- a/tests/googletest-download/CMakeLists.txt.in ++++ b/tests/googletest-download/CMakeLists.txt.in +@@ -7,10 +7,7 @@ project(googletest-download NONE) + include(ExternalProject) + + ExternalProject_Add(googletest +- GIT_REPOSITORY https://github.com/google/googletest.git +- GIT_TAG master +- GIT_SHALLOW 1 +- SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" ++ SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/googletest-src" + BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" + UPDATE_COMMAND "" + CONFIGURE_COMMAND "" +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -6,9 +6,7 @@ include(FetchContent) + + message("Fetching googletest...") + FetchContent_Declare(googletest +- GIT_REPOSITORY https://github.com/google/googletest.git +- GIT_TAG master +- GIT_SHALLOW 1 ++ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/googletest-src + UPDATE_COMMAND "") + + #FetchContent_MakeAvailable(googletest) # Not available in CMake 3.13 :-( Let's do it manually: +@@ -144,4 +142,4 @@ endif() + if(NOT CMAKE_CROSSCOMPILING) + add_test(NAME sdbus-c++-unit-tests COMMAND sdbus-c++-unit-tests) + add_test(NAME sdbus-c++-integration-tests COMMAND sdbus-c++-integration-tests) +-endif() ++endif() diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb index 98829765c2..338a89dda4 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb @@ -17,7 +17,13 @@ PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${libdir}/${B DEPENDS += "expat" SRCREV = "6e8e5aadb674cccea5bdd55141db5dad887fbacd" -SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master" +SRCREV_gtest = "a3460d1aeeaa43fdf137a6adefef10ba0b59fe4b" +SRCREV_FORMAT = "default_gtest" + +SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master \ + git://github.com/google/googletest.git;protocol=https;branch=master;name=gtest;destsuffix=git/tests/googletest-src \ + file://0001-Do-not-download-gtest-automatically.patch \ +" SRC_URI += "file://run-ptest" EXTRA_OECMAKE = "-DBUILD_CODE_GEN=ON \ -- cgit 1.2.3-korg