From 148240ee8a5ca1d506f3b796b7f362b9d9fbb0a8 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Sat, 12 Oct 2024 14:53:11 +0800 Subject: glog: upgrade 0.6.0 -> 0.7.1 ChangeLog: https://github.com/google/glog/releases/tag/v0.7.0 https://github.com/google/glog/releases/tag/v0.7.1 Drop 0001-Change-SleepForMilliseconds-parameter-from-unsigned-.patch and libexecinfo.patch as the issues have been fixed upstream. Signed-off-by: Yi Zhao Signed-off-by: Khem Raj --- ...pForMilliseconds-parameter-from-unsigned-.patch | 33 ----------------- .../recipes-support/glog/glog/libexecinfo.patch | 40 -------------------- meta-oe/recipes-support/glog/glog_0.6.0.bb | 43 ---------------------- meta-oe/recipes-support/glog/glog_0.7.1.bb | 42 +++++++++++++++++++++ 4 files changed, 42 insertions(+), 116 deletions(-) delete mode 100644 meta-oe/recipes-support/glog/glog/0001-Change-SleepForMilliseconds-parameter-from-unsigned-.patch delete mode 100644 meta-oe/recipes-support/glog/glog/libexecinfo.patch delete mode 100644 meta-oe/recipes-support/glog/glog_0.6.0.bb create mode 100644 meta-oe/recipes-support/glog/glog_0.7.1.bb diff --git a/meta-oe/recipes-support/glog/glog/0001-Change-SleepForMilliseconds-parameter-from-unsigned-.patch b/meta-oe/recipes-support/glog/glog/0001-Change-SleepForMilliseconds-parameter-from-unsigned-.patch deleted file mode 100644 index 3732c62cd0..0000000000 --- a/meta-oe/recipes-support/glog/glog/0001-Change-SleepForMilliseconds-parameter-from-unsigned-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 176230435cb4b64ff7f2d97f77a04579ad9ca239 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 18 Feb 2023 13:14:14 -0800 -Subject: [PATCH] Change SleepForMilliseconds parameter from unsigned int -> long - -Fixes following error on 32bit platforms - -src/googletest.h:631:35: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'long' in initializer list [-Wc++11-narrowing] - const struct timespec req = {0, t * 1000 * 1000}; - ^~~~~~~~~~~~~~~ - -Upstream-Status: Submitted [https://github.com/google/glog/pull/894] -Signed-off-by: Khem Raj ---- - src/googletest.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/googletest.h b/src/googletest.h -index 5761361..836b06c 100644 ---- a/src/googletest.h -+++ b/src/googletest.h -@@ -625,7 +625,7 @@ class Thread { - #endif - }; - --static inline void SleepForMilliseconds(unsigned t) { -+static inline void SleepForMilliseconds(long t) { - #ifndef GLOG_OS_WINDOWS - # if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L - const struct timespec req = {0, t * 1000 * 1000}; --- -2.39.2 - diff --git a/meta-oe/recipes-support/glog/glog/libexecinfo.patch b/meta-oe/recipes-support/glog/glog/libexecinfo.patch deleted file mode 100644 index a791a40dbc..0000000000 --- a/meta-oe/recipes-support/glog/glog/libexecinfo.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 19d00c15710840910a7397252c14d612746631fe Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 8 Mar 2021 14:58:40 -0800 -Subject: [PATCH] Link libexecinfo if its found, this is needed for musl based - systems - -Fixes -ld: libglog.so.0.4.0: undefined reference to `backtrace' -| collect2: error: ld returned 1 exit status - -Upstream-Status: Pending -Signed-off-by: Khem Raj - ---- - CMakeLists.txt | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 846b444..1553358 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -162,6 +162,7 @@ cmake_pop_check_state () - check_cxx_symbol_exists (snprintf cstdio HAVE_SNPRINTF) - - check_library_exists (dbghelp UnDecorateSymbolName "" HAVE_DBGHELP) -+check_library_exists (execinfo backtrace "" HAVE_EXECINFO) - - check_cxx_source_compiles (" - #include -@@ -629,6 +630,10 @@ if (Unwind_FOUND) - set (Unwind_DEPENDENCY "find_dependency (Unwind ${Unwind_VERSION})") - endif (Unwind_FOUND) - -+if (HAVE_EXECINFO) -+ target_link_libraries (glog PUBLIC execinfo) -+endif (HAVE_EXECINFO) -+ - if (HAVE_DBGHELP) - target_link_libraries (glog PRIVATE dbghelp) - set (glog_libraries_options_for_static_linking "${glog_libraries_options_for_static_linking} -ldbghelp") diff --git a/meta-oe/recipes-support/glog/glog_0.6.0.bb b/meta-oe/recipes-support/glog/glog_0.6.0.bb deleted file mode 100644 index ec39604f44..0000000000 --- a/meta-oe/recipes-support/glog/glog_0.6.0.bb +++ /dev/null @@ -1,43 +0,0 @@ -DESCRIPTION = "The glog library implements application-level logging. This \ -library provides logging APIs based on C++-style streams and various helper \ -macros." -HOMEPAGE = "https://github.com/google/glog" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=dc9db360e0bbd4e46672f3fd91dd6c4b" - -SRC_URI = " \ - git://github.com/google/glog.git;branch=master;protocol=https \ - file://libexecinfo.patch \ - file://0001-Change-SleepForMilliseconds-parameter-from-unsigned-.patch \ -" - -SRCREV = "b33e3bad4c46c8a6345525fd822af355e5ef9446" - -S = "${WORKDIR}/git" - -inherit cmake - -PACKAGECONFIG ?= "shared unwind 64bit-atomics" -PACKAGECONFIG:remove:riscv64 = "unwind" -PACKAGECONFIG:remove:riscv32 = "unwind 64bit-atomics" -PACKAGECONFIG:remove:mipsarch = "64bit-atomics" -PACKAGECONFIG:remove:armv5 = "64bit-atomics" -PACKAGECONFIG:remove:armv6 = "64bit-atomics" - -PACKAGECONFIG:append:libc-musl:riscv64 = " execinfo" -PACKAGECONFIG:append:libc-musl:riscv32 = " execinfo" - -PACKAGECONFIG[unwind] = "-DWITH_UNWIND=ON,-DWITH_UNWIND=OFF,libunwind,libunwind" -PACKAGECONFIG[execinfo] = ",,libexecinfo" -PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,," -PACKAGECONFIG[64bit-atomics] = ",-DCMAKE_CXX_STANDARD_LIBRARIES='-latomic',," - -do_configure:append() { - # remove WORKDIR info to improve reproducibility - if [ -f "${B}/config.h" ] ; then - sed -i 's/'$(echo ${WORKDIR} | sed 's_/_\\/_g')'/../g' ${B}/config.h - fi -} - -FILES:${PN}-dev += "${datadir}/${BPN}/cmake" diff --git a/meta-oe/recipes-support/glog/glog_0.7.1.bb b/meta-oe/recipes-support/glog/glog_0.7.1.bb new file mode 100644 index 0000000000..586afcad53 --- /dev/null +++ b/meta-oe/recipes-support/glog/glog_0.7.1.bb @@ -0,0 +1,42 @@ +DESCRIPTION = "The glog library implements application-level logging. This \ +library provides logging APIs based on C++-style streams and various helper \ +macros." +HOMEPAGE = "https://github.com/google/glog" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=583a6ead531ca3cd5a2ea593a2888800" + +SRC_URI = " \ + git://github.com/google/glog.git;branch=master;protocol=https \ +" + +SRCREV = "7b134a5c82c0c0b5698bb6bf7a835b230c5638e4" + +S = "${WORKDIR}/git" + +inherit cmake + +PACKAGECONFIG ?= "shared unwind 64bit-atomics" +PACKAGECONFIG:remove:riscv64 = "unwind" +PACKAGECONFIG:remove:riscv32 = "unwind 64bit-atomics" +PACKAGECONFIG:remove:mipsarch = "64bit-atomics" +PACKAGECONFIG:remove:armv5 = "64bit-atomics" +PACKAGECONFIG:remove:armv6 = "64bit-atomics" +PACKAGECONFIG:remove:powerpc = "64bit-atomics" + +PACKAGECONFIG:append:libc-musl:riscv64 = " execinfo" +PACKAGECONFIG:append:libc-musl:riscv32 = " execinfo" + +PACKAGECONFIG[unwind] = "-DWITH_UNWIND=ON,-DWITH_UNWIND=OFF,libunwind,libunwind" +PACKAGECONFIG[execinfo] = ",,libexecinfo" +PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,," +PACKAGECONFIG[64bit-atomics] = ",-DCMAKE_CXX_STANDARD_LIBRARIES='-latomic',," + +do_configure:append() { + # remove WORKDIR info to improve reproducibility + if [ -f "${B}/config.h" ] ; then + sed -i 's/'$(echo ${WORKDIR} | sed 's_/_\\/_g')'/../g' ${B}/config.h + fi +} + +FILES:${PN}-dev += "${datadir}/${BPN}/cmake" -- cgit v1.2.3-54-g00ecf