package/glog: bump to version 0.5.0

- Drop patches (already in version)
- Disable gtest which has been added (and is enabled by default) with
  be25d94c21
- Update indentation in hash file (two spaces)

https://github.com/google/glog/releases/tag/v0.5.0

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Fabrice Fontaine 2021-12-12 22:05:25 +01:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent 2fde6bc322
commit 73b1f5e43a
4 changed files with 4 additions and 123 deletions

View file

@ -1,37 +0,0 @@
From f71e0899439aaa0e6172243a0862bf8a72a241fc Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Mon, 28 Oct 2019 18:21:55 +0100
Subject: [PATCH] src/symbolize.cc: fix build without dlfcn.h
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/google/glog/pull/475]
---
src/symbolize.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/symbolize.cc b/src/symbolize.cc
index 1ffc607..ff027f2 100644
--- a/src/symbolize.cc
+++ b/src/symbolize.cc
@@ -110,7 +110,9 @@ _END_GOOGLE_NAMESPACE_
#if defined(__ELF__)
+#if defined(HAVE_DLFCN_H)
#include <dlfcn.h>
+#endif
#if defined(OS_OPENBSD)
#include <sys/exec_elf.h>
#else
@@ -832,7 +834,7 @@ static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle(void *pc, char *out,
_END_GOOGLE_NAMESPACE_
-#elif defined(OS_MACOSX) && defined(HAVE_DLADDR)
+#elif defined(OS_MACOSX) && defined(HAVE_DLADDR) && defined(HAVE_DLFCN_H)
#include <dlfcn.h>
#include <string.h>
--
2.23.0

View file

@ -1,83 +0,0 @@
From 9630e0e848da22e27b346c38d9b05f0a16cbf7b3 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Thu, 31 Oct 2019 19:27:16 +0100
Subject: [PATCH] src/utilities: fix build without pthread
- Remove is_default_thread function which is an internal and not used
function
- Remove g_main_thread_id as it was used only by is_default_thread
Fixes:
- http://autobuild.buildroot.net/results/5320bbe1205e782e3516d9bead8d1ed825bcbaad
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Retrieved from:
https://github.com/google/glog/commit/9630e0e848da22e27b346c38d9b05f0a16cbf7b3]
---
src/utilities.cc | 16 +++-------------
src/utilities.h | 2 --
2 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/src/utilities.cc b/src/utilities.cc
index d463b33b..9a1e35d0 100644
--- a/src/utilities.cc
+++ b/src/utilities.cc
@@ -61,7 +61,6 @@ using std::string;
_START_GOOGLE_NAMESPACE_
static const char* g_program_invocation_short_name = NULL;
-static pthread_t g_main_thread_id;
_END_GOOGLE_NAMESPACE_
@@ -181,16 +180,6 @@ bool IsGoogleLoggingInitialized() {
return g_program_invocation_short_name != NULL;
}
-bool is_default_thread() {
- if (g_program_invocation_short_name == NULL) {
- // InitGoogleLogging() not yet called, so unlikely to be in a different
- // thread
- return true;
- } else {
- return pthread_equal(pthread_self(), g_main_thread_id);
- }
-}
-
#ifdef OS_WINDOWS
struct timeval {
long tv_sec, tv_usec;
@@ -276,9 +265,11 @@ pid_t GetTID() {
return getpid(); // Linux: getpid returns thread ID when gettid is absent
#elif defined OS_WINDOWS && !defined OS_CYGWIN
return GetCurrentThreadId();
-#else
+#elif defined(HAVE_PTHREAD)
// If none of the techniques above worked, we use pthread_self().
return (pid_t)(uintptr_t)pthread_self();
+#else
+ return -1;
#endif
}
@@ -350,7 +341,6 @@ void InitGoogleLoggingUtilities(const char* argv0) {
if (!slash) slash = strrchr(argv0, '\\');
#endif
g_program_invocation_short_name = slash ? slash + 1 : argv0;
- g_main_thread_id = pthread_self();
#ifdef HAVE_STACKTRACE
InstallFailureFunction(&DumpStackTraceAndExit);
diff --git a/src/utilities.h b/src/utilities.h
index ca21cfb3..c66f9146 100644
--- a/src/utilities.h
+++ b/src/utilities.h
@@ -163,8 +163,6 @@ const char* ProgramInvocationShortName();
bool IsGoogleLoggingInitialized();
-bool is_default_thread();
-
int64 CycleClock_Now();
int64 UsecToCycles(int64 usec);

View file

@ -1,5 +1,5 @@
# Locally computed
sha256 f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c glog-0.4.0.tar.gz
sha256 eede71f28371bf39aa69b45de23b329d37214016e2055269b3b5e7cfd40b59f5 glog-0.5.0.tar.gz
# Hash for License file:
sha256 0fc497129c5c69ff6f22da6933c7e4aaef082fde8437fd57680c2780100772a4 COPYING
sha256 0fc497129c5c69ff6f22da6933c7e4aaef082fde8437fd57680c2780100772a4 COPYING

View file

@ -4,12 +4,13 @@
#
################################################################################
GLOG_VERSION = 0.4.0
GLOG_VERSION = 0.5.0
GLOG_SITE = $(call github,google,glog,v$(GLOG_VERSION))
GLOG_INSTALL_STAGING = YES
GLOG_LICENSE = BSD-3-Clause
GLOG_LICENSE_FILES = COPYING
GLOG_CONF_OPTS = \
-DWITH_GTEST=OFF \
$(if $(BR2_TOOLCHAIN_HAS_THREADS),-DWITH_THREADS=ON, -DWITH_THREADS=OFF)
ifeq ($(BR2_PACKAGE_GFLAGS),y)