summaryrefslogtreecommitdiff
path: root/dev-cpp/glog
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
commitd18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch)
tree4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /dev-cpp/glog
parente748ba9741f6540f4675c23e3e37b73e822c13a4 (diff)
gentoo resync : 15.06.2021
Diffstat (limited to 'dev-cpp/glog')
-rw-r--r--dev-cpp/glog/Manifest9
-rw-r--r--dev-cpp/glog/files/glog-0.3.2-avoid-inline-asm.patch56
-rw-r--r--dev-cpp/glog/files/glog-0.3.4-fix-build-system.patch142
-rw-r--r--dev-cpp/glog/files/glog-0.3.4-fix-gcc5-demangling.patch56
-rw-r--r--dev-cpp/glog/files/glog-0.5.0-IsGoogleLoggingInitialized_public.patch106
-rw-r--r--dev-cpp/glog/files/glog-0.5.0-vmodule_levels_changeability.patch171
-rw-r--r--dev-cpp/glog/glog-0.3.4-r1.ebuild48
-rw-r--r--dev-cpp/glog/glog-0.5.0.ebuild57
8 files changed, 338 insertions, 307 deletions
diff --git a/dev-cpp/glog/Manifest b/dev-cpp/glog/Manifest
index 80f3a878f2d9..ec0a311f7c2b 100644
--- a/dev-cpp/glog/Manifest
+++ b/dev-cpp/glog/Manifest
@@ -1,11 +1,10 @@
-AUX glog-0.3.2-avoid-inline-asm.patch 1837 BLAKE2B 2cd93d0be42a9cf18e610dbccc3859cf7347d25b9205c6bb69c795e3df63c2fdd31972312afaa835cbf1d5eae8b1b6b274d41093bf35d32db7cba2df8833f8c3 SHA512 d45e6e1ef311a8eaccbbcf802c609c19509b74d0647a6ff4e2f0886ecd52d7f107c76d06cba88036870a4c34c62c19df661c59ea5011dff931ad14a3f5d8ab58
-AUX glog-0.3.4-fix-build-system.patch 4861 BLAKE2B d1c10a8c4b264003e0718da28e1df5a24045a61987dae2412a1c72abcc3ec8d8f01d3f5a4e14a97ebb3b482effe8bafa0fe44710a94d16c5db97d44891ca3a68 SHA512 ba162ebb8395044b2bb7b1982a463be01155772acf898614cc13f73c523f63094621f887b8a67e6f810d98914177a1a4a82a45ba7ff7415101f70a8915ae42f0
-AUX glog-0.3.4-fix-gcc5-demangling.patch 1992 BLAKE2B 086661e687a98e34777fd0baf97dec3730acad2ff8fd2184bb0a25d3c516125ca97d92bd799f33fabce4aabfeb1fba6dd865c89aef1659095988c34166285f69 SHA512 6f0b6f74dd039672f80dce55526ae784ff56add01ffc0dc0f5adf4c0ebbf9af15cfd054b370a0631fb7044abb20edf6dc79cb0dd2ac49fda7131ec152f54f054
AUX glog-0.4.0-errnos.patch 4580 BLAKE2B 9a7f86fb2dbcab68948914dcef74e1e08750462e58f56b3f337ad845e1ff4bcdf831e7e231e274bce7db9a4228c307b6bb3baa85ce6cb3eee8625414da6273c9 SHA512 8be72be6d6c27bdbe74dbb95cc2534dcfcd7adc1d85fc5f7022a2b7599ae6b148431623140141ed9863d54febaa414673d18b8fbc8c5aea7f0e43b0f92a54432
AUX glog-0.4.0-fix-test-on-ports.patch 804 BLAKE2B a06a45c977ab55f086e707ad2ea113d93dedb2710fc1cf12fafc700702eb8be5812b73ea4b941355ec948d4659963e1bc7829df12a4da9ba7b80caa3d6ca20e7 SHA512 dd787c363a08810abec89f64b5aa0f77206a0963af1a0fcf5b91549528df875e83cf736cfc2d9eff63007c2d25d0ba71092368272bb5588525cf9af6300ea9a0
AUX glog-0.4.0-fix-x32-build.patch 913 BLAKE2B fc7d4e452580b8ca073439782204da8d04fd36dfc6f06e19426d980127b505a68fc8044b62b04fee5a9b218167a2e119307ea4ec1915807ee6a3ebf89aea83a9 SHA512 2c0bd65824e0ed9923c328554a6dad25d9a02b776e465044a8197416a14da5d986ea9b9394e2da2e6981a1d4149ad67d22b753566177da8c13c0e481432f4e54
-DIST glog-0.3.4.tar.gz 522508 BLAKE2B 4a188d5998005b29afc52f2ea548f33e06a68da993bb74960e5aedb214ec52ef9e9fc39efb1a34f38f217b92df7db064ff01d58df36c3e4ad789becc97335ec2 SHA512 139525b546a9eccacc9bebf7cc3053ba52229e9488485ad45344c3d3134ca819d3b571250c0e3a6d84097009c8be89b0f4fa16ef5ec838ffcc237ae11c3a034c
+AUX glog-0.5.0-IsGoogleLoggingInitialized_public.patch 3029 BLAKE2B 3b46cca54d2fdfdb51a64d9322246c26848c876c19c6aa13cd344d56fb938879339f41aa89348a1ed5fd7d52182f2803be00033052e7460d9776211df2f6448f SHA512 e83c818d4307ded63c6ee750c76f48594f8dc484b45c56b344a761ab4ed4d9e3c3fa66c78456c40d60ed19a9b0b5e07946de6971285d3779704e85eeb95dea98
+AUX glog-0.5.0-vmodule_levels_changeability.patch 5974 BLAKE2B 1ba487bdc097f6ec021d44496c72beaca0239445eadb4bd11f022d6abdfdb5b97bc9e8bebc5f79255999bf655fde5572009e6fa71e7d8a0af785581a574cc5ec SHA512 db883cd941cab39954f06a75929520c94d824344de81c712d495d03bdd438a2cd79a1d975330848c84f0b482bcbf8c4fb120c45171e51c37dce960bf9cf4c2d5
DIST glog-0.4.0.tar.gz 200955 BLAKE2B 083da6117af3e85697724942bfcb5a7831d447666945b06b149d8d324231b10923887bd8c507e8027136d12bffd30a657cb225df8c449f234381e3876f132953 SHA512 b585f1819ade2075f6b61dc5aaca5c3f9d25601dba2bd08b6c49b96ac5f79db23c6b7f2042df003f7130497dd7241fcaa8b107d1f97385cb66ce52d3c554b176
-EBUILD glog-0.3.4-r1.ebuild 1197 BLAKE2B cea35c7b86d979e70a48d7ad73eea6089da777a81f96c91e4667c20a53faaa2801f4008e4687f584bccfc141139b059249cb4757bc8033c38e7e2409a764b190 SHA512 9fc0cf68094b667b5aaec75c77f313afb9017c1e82c37fd2cd9bdff959e7522a19baf4414287af878a5724694948b6be5f7b3ef03f74ecca31b0802580518f83
+DIST glog-0.5.0.tar.gz 183346 BLAKE2B 9109a9a4bd3c74ba5d4c1d9ed44ffe0e16d5d3b9b12bf9dd5d31c6e728292ea50f39b4e1b96d55fbb35653a448af4dc8a978e266a2b0f34261c5108099e90845 SHA512 445e4338f3d81cd0b065f2da9c6ce343c243263ca144cea424ef97531a4e9e09c06ffd6942ac01c5213a8003c75cfbbede3c4028d12f0134f23ff29314769c1a
EBUILD glog-0.4.0.ebuild 1145 BLAKE2B b5ef97d1fae34eb7ee04acce16fcfc0fa842e2eccffb3df84aee526ad45498d94ce25aedaff1067296359dacdd66cf2d65c5fed9a1f2456728d400f35fdbfda7 SHA512 f5d75698b1ba54da2471bda2d21a8058094101bbf127b0cdfd13dfc148994045794838564298dceabd027248830302fb53ed275ddb3afc41a52b961393b547b2
+EBUILD glog-0.5.0.ebuild 1450 BLAKE2B 7156f879e58f723184efc9fc960c926322bf297549d0d5326712d1ebfd6f9d438b9c1bca915ad19bc1fecdaa122b2ff72811b9cfd8328957568b5b1ab3f65971 SHA512 cf566c17f165ab0ab7e20aabca37f1a16fb3842112b7b60a4ad1894add98e4058ed9559979440340ccb34bb3ed3a5aa298132757999e2a0d6a69227ac9e94ae9
MISC metadata.xml 765 BLAKE2B cb580cd0aa55d17f3b085e5603693b4c7c4e9ddb932e94fe08fb6fc00891d9d8366d9208c2d4cd7c0f56fa451866cb70575987822beb094525adf44b9410a15f SHA512 afecb5d946250c4a3d5098bf407bbe86ed4e48412e3e08282165c04eb4e7dfd4f48c734b57e2105c423bf9181e6cc74680b98d889f67904effe98cc203cac216
diff --git a/dev-cpp/glog/files/glog-0.3.2-avoid-inline-asm.patch b/dev-cpp/glog/files/glog-0.3.2-avoid-inline-asm.patch
deleted file mode 100644
index b6fa9cdb7374..000000000000
--- a/dev-cpp/glog/files/glog-0.3.2-avoid-inline-asm.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-http://code.google.com/p/google-glog/issues/detail?id=130
-
-make the code work with all gcc targets
-
---- a/src/symbolize_unittest.cc
-+++ b/src/symbolize_unittest.cc
-@@ -60,9 +60,7 @@ using namespace GOOGLE_NAMESPACE;
- # endif // __i386__
- # else
- # endif // __GNUC__ >= 4
--# if defined(__i386__) || defined(__x86_64__)
--# define TEST_X86_32_AND_64 1
--# endif // defined(__i386__) || defined(__x86_64__)
-+# define TEST_WITH_LABEL_ADDRESSES
- #endif
-
- // A wrapper function for Symbolize() to make the unit test simple.
-@@ -289,22 +287,24 @@ TEST(Symbolize, SymbolizeWithDemanglingStackConsumption) {
- extern "C" {
- inline void* always_inline inline_func() {
- register void *pc = NULL;
--#ifdef TEST_X86_32_AND_64
-- __asm__ __volatile__("call 1f; 1: pop %0" : "=r"(pc));
-+#ifdef TEST_WITH_LABEL_ADDRESSES
-+ pc = &&curr_pc;
-+ curr_pc:
- #endif
- return pc;
- }
-
- void* ATTRIBUTE_NOINLINE non_inline_func() {
- register void *pc = NULL;
--#ifdef TEST_X86_32_AND_64
-- __asm__ __volatile__("call 1f; 1: pop %0" : "=r"(pc));
-+#ifdef TEST_WITH_LABEL_ADDRESSES
-+ pc = &&curr_pc;
-+ curr_pc:
- #endif
- return pc;
- }
-
- void ATTRIBUTE_NOINLINE TestWithPCInsideNonInlineFunction() {
--#if defined(TEST_X86_32_AND_64) && defined(HAVE_ATTRIBUTE_NOINLINE)
-+#if defined(TEST_WITH_LABEL_ADDRESSES) && defined(HAVE_ATTRIBUTE_NOINLINE)
- void *pc = non_inline_func();
- const char *symbol = TrySymbolize(pc);
- CHECK(symbol != NULL);
-@@ -314,7 +314,7 @@ void ATTRIBUTE_NOINLINE TestWithPCInsideNonInlineFunction() {
- }
-
- void ATTRIBUTE_NOINLINE TestWithPCInsideInlineFunction() {
--#if defined(TEST_X86_32_AND_64) && defined(HAVE_ALWAYS_INLINE)
-+#if defined(TEST_WITH_LABEL_ADDRESSES) && defined(HAVE_ALWAYS_INLINE)
- void *pc = inline_func(); // Must be inlined.
- const char *symbol = TrySymbolize(pc);
- CHECK(symbol != NULL);
diff --git a/dev-cpp/glog/files/glog-0.3.4-fix-build-system.patch b/dev-cpp/glog/files/glog-0.3.4-fix-build-system.patch
deleted file mode 100644
index cd38111bc81f..000000000000
--- a/dev-cpp/glog/files/glog-0.3.4-fix-build-system.patch
+++ /dev/null
@@ -1,142 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -11,7 +11,7 @@
- AC_CONFIG_SRCDIR(README)
- AC_CONFIG_MACRO_DIR([m4])
- AM_INIT_AUTOMAKE
--AM_CONFIG_HEADER(src/config.h)
-+AC_CONFIG_HEADERS([src/config.h])
-
- AC_LANG(C++)
-
-@@ -21,7 +21,7 @@
- AC_PROG_CXX
- AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc
-
--AC_PROG_LIBTOOL
-+LT_INIT
- AC_SUBST(LIBTOOL_DEPS)
-
- # Check whether some low-level functions/files are available
-@@ -128,32 +128,48 @@
- fi
-
- # Check if there is google-gflags library installed.
--SAVE_CFLAGS="$CFLAGS"
--SAVE_LIBS="$LIBS"
--AC_ARG_WITH(gflags, AS_HELP_STRING[--with-gflags=GFLAGS_DIR],
-- GFLAGS_CFLAGS="-I${with_gflags}/include"
-- GFLAGS_LIBS="-L${with_gflags}/lib -lgflags"
-- CFLAGS="$CFLAGS $GFLAGS_CFLAGS"
-- LIBS="$LIBS $GFLAGS_LIBS"
--)
--AC_CHECK_LIB(gflags, main, ac_cv_have_libgflags=1, ac_cv_have_libgflags=0)
--if test x"$ac_cv_have_libgflags" = x"1"; then
-- AC_DEFINE(HAVE_LIB_GFLAGS, 1, [define if you have google gflags library])
-- if test x"$GFLAGS_LIBS" = x""; then
-- GFLAGS_LIBS="-lgflags"
-- fi
--else
-- GFLAGS_CFLAGS=
-- GFLAGS_LIBS=
--fi
--CFLAGS="$SAVE_CFLAGS"
--LIBS="$SAVE_LIBS"
-+AC_ARG_ENABLE([gflags],
-+ AS_HELP_STRING([--enable-gflags], [Enable google-gflags]))
-+
-+ac_cv_have_libgflags=0
-+AS_IF([test "x$enable_gflags" != "xno"], [
-+ SAVE_CFLAGS="$CFLAGS"
-+ SAVE_LIBS="$LIBS"
-+ AC_ARG_WITH([gflags], AS_HELP_STRING([--with-gflags=GFLAGS_DIR]),[
-+ GFLAGS_CFLAGS="-I${with_gflags}/include"
-+ GFLAGS_LIBS="-L${with_gflags}/lib -lgflags"
-+ CFLAGS="$CFLAGS $GFLAGS_CFLAGS"
-+ LIBS="$LIBS $GFLAGS_LIBS"
-+ ])
-+
-+ AC_CHECK_LIB(gflags, main, ac_cv_have_libgflags=1, ac_cv_have_libgflags=0)
-+ CFLAGS="$SAVE_CFLAGS"
-+ LIBS="$SAVE_LIBS"
-+])
-+
-+AS_IF([test "x$ac_cv_have_libgflags" = "x1"], [
-+ AC_DEFINE([HAVE_LIB_GFLAGS], [1], [define if you have google gflags library])
-+ AS_IF([test "x$GFLAGS_LIBS" = "x"], [
-+ GFLAGS_LIBS="-lgflags"
-+ ])
-+], [
-+ GFLAGS_CFLAGS=
-+ GFLAGS_LIBS=
-+])
-
- # TODO(hamaji): Use official m4 macros provided by testing libraries
- # once the m4 macro of Google Mocking becomes ready.
- # Check if there is Google Test library installed.
--AC_CHECK_PROG(GTEST_CONFIG, gtest-config, "yes")
--AC_CHECK_LIB(gtest, main, have_gtest_lib="yes")
-+AC_ARG_ENABLE([gtest-config],
-+ AS_HELP_STRING([--enable-gtest-config], [Enable looking for gtest-config]))
-+
-+AS_IF([test "x$enable_gtest_config" != "xno"], [
-+ AC_CHECK_PROG(GTEST_CONFIG, gtest-config, "yes")
-+ AC_CHECK_LIB(gtest, main, have_gtest_lib="yes")
-+], [
-+ have_gtest_lib="no"
-+])
-+
- if test x"$GTEST_CONFIG" = "xyes" -a x"$have_gtest_lib" = "xyes"; then
- GTEST_CFLAGS=`gtest-config --cppflags --cxxflags`
- GTEST_LIBS=`gtest-config --ldflags --libs`
-@@ -178,17 +194,13 @@
- AM_CONDITIONAL(HAVE_GMOCK, test x"$GMOCK_CONFIG" = "xyes")
-
- # We want to link in libunwind if it exists
--UNWIND_LIBS=
--# Unfortunately, we need to check the header file in addition to the
--# lib file to check if libunwind is available since libunwind-0.98
--# doesn't install all necessary header files.
--if test x"$ac_cv_have_libunwind_h" = x"1"; then
-- AC_CHECK_LIB(unwind, backtrace, UNWIND_LIBS=-lunwind)
--fi
--AC_SUBST(UNWIND_LIBS)
--if test x"$UNWIND_LIBS" != x""; then
-- AC_DEFINE(HAVE_LIB_UNWIND, 1, [define if you have libunwind])
--fi
-+AC_ARG_ENABLE([unwind],
-+ AS_HELP_STRING([--enable-unwind], [Enable libunwind]))
-+
-+AS_IF([test "x$enable_unwind" != "xno"], [
-+ PKG_CHECK_MODULES([UNWIND], [libunwind > 0.98])
-+ AC_DEFINE([HAVE_LIB_UNWIND], [1], [define if you have libunwind])
-+])
-
- # We'd like to use read/write locks in several places in the code.
- # See if our pthreads support extends to that. Note: for linux, it
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -40,12 +40,11 @@
- nodist_gloginclude_HEADERS = src/glog/logging.h src/glog/raw_logging.h src/glog/vlog_is_on.h src/glog/stl_logging.h
- noinst_HEADERS = src/glog/logging.h.in src/glog/raw_logging.h.in src/glog/vlog_is_on.h.in src/glog/stl_logging.h.in
-
--docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
- ## This is for HTML and other documentation you want to install.
- ## Add your documentation files (in doc/) in addition to these
- ## top-level boilerplate files. Also add a TODO file if you have one.
--dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README README.windows \
-- doc/designstyle.css doc/glog.html
-+dist_doc_DATA = AUTHORS ChangeLog INSTALL NEWS README
-+dist_html_DATA = doc/designstyle.css doc/glog.html
-
- ## The libraries (.so's) you want to install
- lib_LTLIBRARIES =
-@@ -215,7 +214,7 @@
-
- ## This should always include $(TESTS), but may also include other
- ## binaries that you compile but don't want automatically installed.
--noinst_PROGRAMS = $(TESTS) $(TEST_BINARIES)
-+check_PROGRAMS = $(TESTS) $(TEST_BINARIES)
-
- rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
- @cd packages && ./rpm.sh ${PACKAGE} ${VERSION}
diff --git a/dev-cpp/glog/files/glog-0.3.4-fix-gcc5-demangling.patch b/dev-cpp/glog/files/glog-0.3.4-fix-gcc5-demangling.patch
deleted file mode 100644
index fd1518c68583..000000000000
--- a/dev-cpp/glog/files/glog-0.3.4-fix-gcc5-demangling.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From b1639e3014996fbc7635870e013559c54e7e3b2f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?David=20Mart=C3=ADnez=20Moreno?= <ender@debian.org>
-Date: Thu, 13 Aug 2015 09:31:26 -0700
-Subject: [PATCH] Fix ABI demangling for the GCC 5.x case.
-
-When glog is compiled with gcc-5.2 in cxx11 ABI mode, it barfs about unmangled symbols. This patches it getting inspiration from binutils and demangle.cc itself, although it may be totally wrong or maybe have to use ParseAbiTag in more places. I haven't read the spec for the symbols, though.
-
-This patch makes the demangle unit test pass correctly.
----
- src/demangle.cc | 19 +++++++++++++++++++
- 1 file changed, 19 insertions(+)
-
-diff --git a/src/demangle.cc b/src/demangle.cc
-index e858181..0f0c831 100644
---- a/src/demangle.cc
-+++ b/src/demangle.cc
-@@ -439,6 +439,7 @@ static bool ParseExprPrimary(State *state);
- static bool ParseLocalName(State *state);
- static bool ParseDiscriminator(State *state);
- static bool ParseSubstitution(State *state);
-+static bool ParseAbiTag(State *state);
-
- // Implementation note: the following code is a straightforward
- // translation of the Itanium C++ ABI defined in BNF with a couple of
-@@ -567,6 +568,8 @@ static bool ParseNestedName(State *state) {
- static bool ParsePrefix(State *state) {
- bool has_something = false;
- while (true) {
-+ if (ParseAbiTag(state))
-+ continue;
- MaybeAppendSeparator(state);
- if (ParseTemplateParam(state) ||
- ParseSubstitution(state) ||
-@@ -585,6 +588,22 @@ static bool ParsePrefix(State *state) {
- return true;
- }
-
-+// <abi-tag> ::= B <source-name>
-+static bool ParseAbiTag(State *state) {
-+ State copy = *state;
-+
-+ Append(state, "[", 1);
-+ if (ParseOneCharToken(state, 'B') &&
-+ ParseSourceName(state))
-+ {
-+ Append(state, "]", 1);
-+ return true;
-+ }
-+
-+ *state = copy;
-+ return false;
-+}
-+
- // <unqualified-name> ::= <operator-name>
- // ::= <ctor-dtor-name>
- // ::= <source-name>
diff --git a/dev-cpp/glog/files/glog-0.5.0-IsGoogleLoggingInitialized_public.patch b/dev-cpp/glog/files/glog-0.5.0-IsGoogleLoggingInitialized_public.patch
new file mode 100644
index 000000000000..a19ebdcf0fac
--- /dev/null
+++ b/dev-cpp/glog/files/glog-0.5.0-IsGoogleLoggingInitialized_public.patch
@@ -0,0 +1,106 @@
+https://github.com/google/glog/issues/125
+https://github.com/google/glog/pull/651
+https://github.com/google/glog/commit/81e0d616edeb73cbd06d6c40bc4f90593ac0c5d1
+
+--- /src/glog/logging.h.in
++++ /src/glog/logging.h.in
+@@ -594,6 +594,9 @@
+ void* prefix_callback_data = NULL);
+ #endif
+
++// Check if google's logging library has been initialized.
++GOOGLE_GLOG_DLL_DECL bool IsGoogleLoggingInitialized();
++
+ // Shutdown google's logging library.
+ GOOGLE_GLOG_DLL_DECL void ShutdownGoogleLogging();
+
+--- /src/logging_custom_prefix_unittest.cc
++++ /src/logging_custom_prefix_unittest.cc
+@@ -221,11 +221,15 @@
+ LogWithLevels(0, 0, 0, 0); // simulate "before global c-tors"
+ const string early_stderr = GetCapturedTestStderr();
+
++ EXPECT_FALSE(IsGoogleLoggingInitialized());
++
+ // Setting a custom prefix generator (it will use the default format so that
+ // the golden outputs can be reused):
+ string prefix_attacher_data = "good data";
+ InitGoogleLogging(argv[0], &PrefixAttacher, static_cast<void*>(&prefix_attacher_data));
+
++ EXPECT_TRUE(IsGoogleLoggingInitialized());
++
+ RunSpecifiedBenchmarks();
+
+ FLAGS_logtostderr = true;
+@@ -992,8 +996,10 @@
+ base::SetLogger(GLOG_INFO,
+ new RecordDeletionLogger(&custom_logger_deleted,
+ base::GetLogger(GLOG_INFO)));
++ EXPECT_TRUE(IsGoogleLoggingInitialized());
+ ShutdownGoogleLogging();
+ EXPECT_TRUE(custom_logger_deleted);
++ EXPECT_FALSE(IsGoogleLoggingInitialized());
+ }
+
+ _START_GOOGLE_NAMESPACE_
+--- /src/logging_unittest.cc
++++ /src/logging_unittest.cc
+@@ -197,8 +197,12 @@
+ LogWithLevels(0, 0, 0, 0); // simulate "before global c-tors"
+ const string early_stderr = GetCapturedTestStderr();
+
++ EXPECT_FALSE(IsGoogleLoggingInitialized());
++
+ InitGoogleLogging(argv[0]);
+
++ EXPECT_TRUE(IsGoogleLoggingInitialized());
++
+ RunSpecifiedBenchmarks();
+
+ FLAGS_logtostderr = true;
+@@ -965,8 +969,10 @@
+ base::SetLogger(GLOG_INFO,
+ new RecordDeletionLogger(&custom_logger_deleted,
+ base::GetLogger(GLOG_INFO)));
++ EXPECT_TRUE(IsGoogleLoggingInitialized());
+ ShutdownGoogleLogging();
+ EXPECT_TRUE(custom_logger_deleted);
++ EXPECT_FALSE(IsGoogleLoggingInitialized());
+ }
+
+ _START_GOOGLE_NAMESPACE_
+--- /src/utilities.cc
++++ /src/utilities.cc
+@@ -62,6 +62,10 @@
+
+ static const char* g_program_invocation_short_name = NULL;
+
++bool IsGoogleLoggingInitialized() {
++ return g_program_invocation_short_name != NULL;
++}
++
+ _END_GOOGLE_NAMESPACE_
+
+ // The following APIs are all internal.
+@@ -176,10 +180,6 @@
+ }
+ }
+
+-bool IsGoogleLoggingInitialized() {
+- return g_program_invocation_short_name != NULL;
+-}
+-
+ #ifdef OS_WINDOWS
+ struct timeval {
+ long tv_sec, tv_usec;
+--- /src/utilities.h
++++ /src/utilities.h
+@@ -163,8 +163,6 @@
+
+ const char* ProgramInvocationShortName();
+
+-bool IsGoogleLoggingInitialized();
+-
+ int64 CycleClock_Now();
+
+ int64 UsecToCycles(int64 usec);
diff --git a/dev-cpp/glog/files/glog-0.5.0-vmodule_levels_changeability.patch b/dev-cpp/glog/files/glog-0.5.0-vmodule_levels_changeability.patch
new file mode 100644
index 000000000000..f9b90c1521aa
--- /dev/null
+++ b/dev-cpp/glog/files/glog-0.5.0-vmodule_levels_changeability.patch
@@ -0,0 +1,171 @@
+https://github.com/google/glog/issues/649
+https://github.com/google/glog/pull/650
+https://github.com/google/glog/commit/86fea1ab254c463cbb72e5ce8bcc6855bc4e1e9c
+
+--- /src/glog/vlog_is_on.h.in
++++ /src/glog/vlog_is_on.h.in
+@@ -81,10 +81,10 @@
+ // parsing of --vmodule flag and/or SetVLOGLevel calls.
+ #define VLOG_IS_ON(verboselevel) \
+ __extension__ \
+- ({ static @ac_google_namespace@::int32* vlocal__ = NULL; \
++ ({ static @ac_google_namespace@::SiteFlag vlocal__{NULL, NULL, 0, NULL}; \
+ @ac_google_namespace@::int32 verbose_level__ = (verboselevel); \
+- (vlocal__ == NULL ? @ac_google_namespace@::InitVLOG3__(&vlocal__, &FLAGS_v, \
+- __FILE__, verbose_level__) : *vlocal__ >= verbose_level__); \
++ (vlocal__.level == NULL ? @ac_google_namespace@::InitVLOG3__(&vlocal__, &FLAGS_v, \
++ __FILE__, verbose_level__) : *vlocal__.level >= verbose_level__); \
+ })
+ #else
+ // GNU extensions not available, so we do not support --vmodule.
+@@ -105,6 +105,13 @@
+
+ // Various declarations needed for VLOG_IS_ON above: =========================
+
++struct SiteFlag {
++ @ac_google_namespace@::int32* level;
++ const char* base_name;
++ size_t base_len;
++ SiteFlag* next;
++};
++
+ // Helper routine which determines the logging info for a particalur VLOG site.
+ // site_flag is the address of the site-local pointer to the controlling
+ // verbosity level
+@@ -114,7 +121,7 @@
+ // We will return the return value for VLOG_IS_ON
+ // and if possible set *site_flag appropriately.
+ extern GOOGLE_GLOG_DLL_DECL bool InitVLOG3__(
+- @ac_google_namespace@::int32** site_flag,
++ @ac_google_namespace@::SiteFlag* site_flag,
+ @ac_google_namespace@::int32* site_default,
+ const char* fname,
+ @ac_google_namespace@::int32 verbose_level);
+--- /src/logging_unittest.cc
++++ /src/logging_unittest.cc
+@@ -98,6 +98,7 @@
+ static void TestRawLogging();
+ static void LogWithLevels(int v, int severity, bool err, bool alsoerr);
+ static void TestLoggingLevels();
++static void TestVLogModule();
+ static void TestLogString();
+ static void TestLogSink();
+ static void TestLogToString();
+@@ -223,6 +224,7 @@
+ TestLogging(true);
+ TestRawLogging();
+ TestLoggingLevels();
++ TestVLogModule();
+ TestLogString();
+ TestLogSink();
+ TestLogToString();
+@@ -453,6 +455,24 @@
+ LogWithLevels(1, GLOG_FATAL, false, true);
+ }
+
++int TestVlogHelper() {
++ if (VLOG_IS_ON(1)) {
++ return 1;
++ }
++ return 0;
++}
++
++void TestVLogModule() {
++ int c = TestVlogHelper();
++ EXPECT_EQ(0, c);
++
++#if defined(__GNUC__)
++ EXPECT_EQ(0, SetVLOGLevel("logging_unittest", 1));
++ c = TestVlogHelper();
++ EXPECT_EQ(1, c);
++#endif
++}
++
+ TEST(DeathRawCHECK, logging) {
+ ASSERT_DEATH(RAW_CHECK(false, "failure 1"),
+ "RAW: Check false failed: failure 1");
+--- /src/vlog_is_on.cc
++++ /src/vlog_is_on.cc
+@@ -125,6 +125,8 @@
+ // Pointer to head of the VModuleInfo list.
+ // It's a map from module pattern to logging level for those module(s).
+ static VModuleInfo* vmodule_list = 0;
++static SiteFlag* cached_site_list = 0;
++
+ // Boolean initialization flag.
+ static bool inited_vmodule = false;
+
+@@ -190,6 +192,23 @@
+ info->vlog_level = log_level;
+ info->next = vmodule_list;
+ vmodule_list = info;
++
++ SiteFlag** item_ptr = &cached_site_list;
++ SiteFlag* item = cached_site_list;
++
++ // We traverse the list fully because the pattern can match several items
++ // from the list.
++ while (item) {
++ if (SafeFNMatch_(module_pattern, pattern_len, item->base_name,
++ item->base_len)) {
++ // Redirect the cached value to its module override.
++ item->level = &info->vlog_level;
++ *item_ptr = item->next; // Remove the item from the list.
++ } else {
++ item_ptr = &item->next;
++ }
++ item = *item_ptr;
++ }
+ }
+ }
+ RAW_VLOG(1, "Set VLOG level for \"%s\" to %d", module_pattern, log_level);
+@@ -198,7 +217,7 @@
+
+ // NOTE: Individual VLOG statements cache the integer log level pointers.
+ // NOTE: This function must not allocate memory or require any locks.
+-bool InitVLOG3__(int32** site_flag, int32* site_default,
++bool InitVLOG3__(SiteFlag* site_flag, int32* level_default,
+ const char* fname, int32 verbose_level) {
+ MutexLock l(&vmodule_lock);
+ bool read_vmodule_flag = inited_vmodule;
+@@ -211,10 +230,17 @@
+ int old_errno = errno;
+
+ // site_default normally points to FLAGS_v
+- int32* site_flag_value = site_default;
++ int32* site_flag_value = level_default;
+
+ // Get basename for file
+ const char* base = strrchr(fname, '/');
++
++#ifdef _WIN32
++ if (!base) {
++ base = strrchr(fname, '\\');
++ }
++#endif
++
+ base = base ? (base+1) : fname;
+ const char* base_end = strchr(base, '.');
+ size_t base_length = base_end ? size_t(base_end - base) : strlen(base);
+@@ -244,7 +270,20 @@
+ ANNOTATE_BENIGN_RACE(site_flag,
+ "*site_flag may be written by several threads,"
+ " but the value will be the same");
+- if (read_vmodule_flag) *site_flag = site_flag_value;
++ if (read_vmodule_flag) {
++ site_flag->level = site_flag_value;
++ // If VLOG flag has been cached to the default site pointer,
++ // we want to add to the cached list in order to invalidate in case
++ // SetVModule is called afterwards with new modules.
++ // The performance penalty here is neglible, because InitVLOG3__ is called
++ // once per site.
++ if (site_flag_value == level_default && !site_flag->base_name) {
++ site_flag->base_name = base;
++ site_flag->base_len = base_length;
++ site_flag->next = cached_site_list;
++ cached_site_list = site_flag;
++ }
++ }
+
+ // restore the errno in case something recoverable went wrong during
+ // the initialization of the VLOG mechanism (see above note "protect the..")
diff --git a/dev-cpp/glog/glog-0.3.4-r1.ebuild b/dev-cpp/glog/glog-0.3.4-r1.ebuild
deleted file mode 100644
index d6fd3e0dc0d4..000000000000
--- a/dev-cpp/glog/glog-0.3.4-r1.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools multilib-minimal
-
-DESCRIPTION="Google's C++ logging library"
-HOMEPAGE="https://github.com/google/glog"
-SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 x86 ~amd64-linux ~x86-linux"
-IUSE="gflags +libunwind static-libs test"
-RESTRICT="test"
-
-RDEPEND="
- gflags? ( >=dev-cpp/gflags-2.0-r1[${MULTILIB_USEDEP}] )
- libunwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-0.3.2-avoid-inline-asm.patch
- "${FILESDIR}"/${PN}-0.3.4-fix-build-system.patch
- "${FILESDIR}"/${PN}-0.3.4-fix-gcc5-demangling.patch
-)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-multilib_src_configure() {
- ECONF_SOURCE="${S}" econf \
- $(use_enable gflags) \
- $(use_enable static-libs static) \
- $(use_enable test gtest-config) \
- $(use_enable libunwind unwind)
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- # package provides .pc files
- find "${D}" -name '*.la' -delete || die
-}
diff --git a/dev-cpp/glog/glog-0.5.0.ebuild b/dev-cpp/glog/glog-0.5.0.ebuild
new file mode 100644
index 000000000000..4df075626adc
--- /dev/null
+++ b/dev-cpp/glog/glog-0.5.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 2011-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+CMAKE_ECLASS="cmake"
+
+inherit cmake-multilib
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/google/glog"
+fi
+
+DESCRIPTION="Google Logging library"
+HOMEPAGE="https://github.com/google/glog"
+if [[ "${PV}" == "9999" ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux"
+IUSE="gflags +libunwind llvm-libunwind test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="gflags? ( dev-cpp/gflags:0=[${MULTILIB_USEDEP}] )
+ libunwind? (
+ llvm-libunwind? ( sys-libs/llvm-libunwind:0=[${MULTILIB_USEDEP}] )
+ !llvm-libunwind? ( sys-libs/libunwind:0=[${MULTILIB_USEDEP}] )
+ )"
+DEPEND="${RDEPEND}
+ test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-IsGoogleLoggingInitialized_public.patch"
+ "${FILESDIR}/${P}-vmodule_levels_changeability.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_TESTING=$(usex test ON OFF)
+ -DWITH_CUSTOM_PREFIX=ON
+ -DWITH_GFLAGS=$(usex gflags ON OFF)
+ -DWITH_GTEST=$(usex test ON OFF)
+ -DWITH_UNWIND=$(usex libunwind ON OFF)
+ )
+ if use libunwind; then
+ mycmakeargs+=(
+ -DUnwind_PLATFORM_LIBRARY="${ESYSROOT}/usr/$(get_libdir)/libunwind.so"
+ )
+ fi
+
+ cmake-multilib_src_configure
+}