summaryrefslogtreecommitdiff
path: root/dev-cpp/glog
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-cpp/glog
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-cpp/glog')
-rw-r--r--dev-cpp/glog/Manifest11
-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/glog-0.3.3-r1.ebuild67
-rw-r--r--dev-cpp/glog/glog-0.3.4-r1.ebuild50
-rw-r--r--dev-cpp/glog/glog-0.3.4.ebuild68
-rw-r--r--dev-cpp/glog/metadata.xml19
8 files changed, 469 insertions, 0 deletions
diff --git a/dev-cpp/glog/Manifest b/dev-cpp/glog/Manifest
new file mode 100644
index 000000000000..0cb108f1dd90
--- /dev/null
+++ b/dev-cpp/glog/Manifest
@@ -0,0 +1,11 @@
+AUX glog-0.3.2-avoid-inline-asm.patch 1837 SHA256 0771464b45ac79545ca0e8f3c489b842fdd61dc0585b917dc0b5f619dc2f2c55 SHA512 d45e6e1ef311a8eaccbbcf802c609c19509b74d0647a6ff4e2f0886ecd52d7f107c76d06cba88036870a4c34c62c19df661c59ea5011dff931ad14a3f5d8ab58 WHIRLPOOL b8f119c1b4e67ff016d5e041a6d91281fb79ebec00e608e19ebf8d53d42c3fabbf5bc8f29882bfa269f209b3034eeafc11ef080d65fa3948c223b95fcdf1d241
+AUX glog-0.3.4-fix-build-system.patch 4861 SHA256 340a39b0facd47ca1404dbd36e57e0ed202e5d40659c8c611074d754ed5fa1b0 SHA512 ba162ebb8395044b2bb7b1982a463be01155772acf898614cc13f73c523f63094621f887b8a67e6f810d98914177a1a4a82a45ba7ff7415101f70a8915ae42f0 WHIRLPOOL 077dd78a4e02fc59dc7049736e260a24766e192f2c61a3532cb4b2cbf74bd8c0c797e1196a1252038e0e92608d94344d467913975f8596e624ec5cdf61026d51
+AUX glog-0.3.4-fix-gcc5-demangling.patch 1992 SHA256 b740c758ceba68347650453561b4108a26263e9cb7ddd5833a3bb9c1179cfc50 SHA512 6f0b6f74dd039672f80dce55526ae784ff56add01ffc0dc0f5adf4c0ebbf9af15cfd054b370a0631fb7044abb20edf6dc79cb0dd2ac49fda7131ec152f54f054 WHIRLPOOL d2c1f5f490bbe2a7863e179e91efbac7dad3347c4fe68ab17a77e6a1911c907b1381845d09865b0994933362e1a185903c9331c6dc17003639422e977f61db47
+DIST glog-0.3.3.tar.gz 509676 SHA256 fbf90c2285ba0561db7a40f8a4eefb9aa963e7d399bd450363e959929fe849d0 SHA512 95418ff0857415a0fbc15caeb22a13f3b6736618adcc3c30e054626f1397bc58399c45f68784c70b1f5dc594ebc6ea66e386896beab5c20be72dd53b25f5a4ac WHIRLPOOL 7ba26a936e3ac18afbccf141b888a885f3f9847d4f19c0ebad416d16fcff936b9622e03aec155f77622759a40e8684673c29648c026426326239f4485113c6cf
+DIST glog-0.3.4.tar.gz 522508 SHA256 ce99d58dce74458f7656a68935d7a0c048fa7b4626566a71b7f4e545920ceb10 SHA512 139525b546a9eccacc9bebf7cc3053ba52229e9488485ad45344c3d3134ca819d3b571250c0e3a6d84097009c8be89b0f4fa16ef5ec838ffcc237ae11c3a034c WHIRLPOOL b6787336ea55de2f6574e29bc4649a7c64aa5d5e8a07ab15c2c5754ebf9cfefd1405c64cc4dfecab557814991ae4c97be078d21916181850ee12b853918c0a27
+EBUILD glog-0.3.3-r1.ebuild 1834 SHA256 6662b28f0512f3aa924cc7819f9c2df96da45a1b8f8d7b62e596d9b13f9a6dfd SHA512 6a399224979c430102861f0bcd80344c1227d270e1eb175e0df4172f6294c5800112fd0c9a94c84a3e6baf8b77880c6447b1c13d75ddf941a44e1ffaca482606 WHIRLPOOL 977a2b276aebfc75c9ee0ac107ad3a3bd877cfe9b1eaaafa56c83be8d8bda58750daa1a857c6cf8f3134238c890f2162d31286ea2fd271467ebcc1a5069e78e0
+EBUILD glog-0.3.4-r1.ebuild 1248 SHA256 9402ff63ebf077c51f27b743987fcd12459e38571caa4f5cddfec540caeee082 SHA512 7dbbb7565ac1399a0fffbde8a11917c85814d1fa22be45e1f191d277c9bcf019bfc0a2b4ff6f8b2cf9505c68b35e36880e0163d05ce912956a47d60980a484c2 WHIRLPOOL b3ef813542f0a7f23efdb798b7b11037f284232308c135a666b77616a3fb75c9f74d50955f49b4da48bc6bc16330916fe75193a55b6448303842105e5b3b0e51
+EBUILD glog-0.3.4.ebuild 1855 SHA256 faf7166f6e103f3387475eebaf55f9965448ffbd7ad3f969b7c6780a534aaecf SHA512 f9feb687feb6d5141580ade93318bdaa505c98697f86a1c51e7f4e3e61819df41bb131f317db721723865a5a49856147cd8284fcaeaae8b0250044473478d613 WHIRLPOOL ee6a4183e06a955877c10185814da33d6c3109eea4fdc1f288321ccbf533a2250b3a183eec497dbcf3bf788ed5b2fb99ee97ac7c5f331c4036e8408a69bcb2a0
+MISC ChangeLog 3680 SHA256 02be7c8418a3e35c9e86e875a0dbf8030f88f44d9e442281f09cd2825b20964e SHA512 43215d3e0df19cc99f2a96a39f03dea090747c1cdeef1be895c58939825470128400af78d8549db0f41654b01da053747415933ac2dffc702c583adbdf8cf37f WHIRLPOOL c3a28660871be10f05ac1bd8130c4e44bacd292ed104529e6d98ea0bf63a64867bcbb30f1c3fe7b8760502d8a43fcfaf2db8498f2bd63b4a5441aaa5391da7b1
+MISC ChangeLog-2015 2689 SHA256 9c19163205dee303f883c006a06b0f4bbe8d54709bd9165c052de7b96f372ee7 SHA512 274de3ece525e2d20ec5fb178c482b092185fbb7b46d93cc0fbf7acd608d45ae949c1eca4cd6294e4ff7321a09699df9a1e167f36b715588475c2bf126cad8d1 WHIRLPOOL 8f2df79c46fe2730793b5c2f3569507c5d175ecebb35be927576d0c30cae618a9235d00a76d19c8463fdc8e44ee38bc3a90fedfd5e955e293c00a96d7e21d5fe
+MISC metadata.xml 687 SHA256 1ab62241e23e2346e742341dac3e7e0dcd823ceaadf2df5e3369bca4bd59684f SHA512 31e7803ad7e7563ae6d133caa347c56e277c4b68bc11b3d87889c73fe043d65c793492089f017696bc427420dd89f69257c26b1c4cba7ad1efdca059554fed0e WHIRLPOOL a0dbf4cbe1aafdc62a4be8904dff811d76a8f21dd9f9ebf5c5f9b3853de5e1e68f57e1a23d91f4b06301efcc5957953142fa721f591b31068b4c5d1871012b78
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
new file mode 100644
index 000000000000..b6fa9cdb7374
--- /dev/null
+++ b/dev-cpp/glog/files/glog-0.3.2-avoid-inline-asm.patch
@@ -0,0 +1,56 @@
+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
new file mode 100644
index 000000000000..cd38111bc81f
--- /dev/null
+++ b/dev-cpp/glog/files/glog-0.3.4-fix-build-system.patch
@@ -0,0 +1,142 @@
+--- 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
new file mode 100644
index 000000000000..fd1518c68583
--- /dev/null
+++ b/dev-cpp/glog/files/glog-0.3.4-fix-gcc5-demangling.patch
@@ -0,0 +1,56 @@
+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/glog-0.3.3-r1.ebuild b/dev-cpp/glog/glog-0.3.3-r1.ebuild
new file mode 100644
index 000000000000..3b6207ec2075
--- /dev/null
+++ b/dev-cpp/glog/glog-0.3.3-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+inherit eutils multilib-minimal
+
+DESCRIPTION="Google's C++ logging library"
+HOMEPAGE="https://github.com/google/glog"
+SRC_URI="https://google-glog.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~x86-linux"
+IUSE="gflags static-libs unwind test"
+
+RDEPEND="gflags? ( >=dev-cpp/gflags-2.0-r1[${MULTILIB_USEDEP}] )
+ unwind? ( sys-libs/libunwind )"
+DEPEND="${RDEPEND}
+ test? (
+ >=dev-cpp/gmock-1.7.0-r1[${MULTILIB_USEDEP}]
+ >=dev-cpp/gtest-1.6.0-r2[${MULTILIB_USEDEP}]
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.3.2-avoid-inline-asm.patch
+ # Fix the --dodcdir flag:
+ # https://code.google.com/p/google-glog/issues/detail?id=193
+ sed -i \
+ -e '/^docdir =/s:=.*:= @docdir@:' \
+ Makefile.in || die
+}
+
+multilib_src_configure() {
+ use test || export ac_cv_prog_GTEST_CONFIG=no
+ ECONF_SOURCE=${S} \
+ ac_cv_lib_gflags_main=$(usex gflags) \
+ ac_cv_lib_unwind_backtrace=$(usex unwind) \
+ econf \
+ --docdir="\$(datarootdir)/doc/${PF}" \
+ --htmldir='$(docdir)/html' \
+ $(use_enable static-libs static)
+}
+
+_emake() {
+ # The tests always get built ... disable them when unused.
+ emake $(usex test '' noinst_PROGRAMS=) "$@"
+}
+
+multilib_src_compile() {
+ _emake
+}
+
+multilib_src_install() {
+ _emake install DESTDIR="${D}"
+}
+
+multilib_src_install_all() {
+ # Punt docs we don't care about (NEWS is 0 bytes).
+ rm "${ED}"/usr/share/doc/${PF}/{COPYING,NEWS,README.windows} || die
+
+ # --htmldir doesn't work (yet):
+ # https://code.google.com/p/google-glog/issues/detail?id=144
+ dohtml "${ED}"/usr/share/doc/${PF}/*
+ rm "${ED}"/usr/share/doc/${PF}/*.{html,css}
+
+ use static-libs || find "${ED}" -name '*.la' -delete
+}
diff --git a/dev-cpp/glog/glog-0.3.4-r1.ebuild b/dev-cpp/glog/glog-0.3.4-r1.ebuild
new file mode 100644
index 000000000000..03378d2c6dfb
--- /dev/null
+++ b/dev-cpp/glog/glog-0.3.4-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# 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="~alpha ~amd64 arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="gflags static-libs test unwind"
+
+RDEPEND="
+ gflags? ( >=dev-cpp/gflags-2.0-r1[${MULTILIB_USEDEP}] )
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ test? (
+ >=dev-cpp/gmock-1.7.0-r1[${MULTILIB_USEDEP}]
+ >=dev-cpp/gtest-1.6.0-r2[${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 unwind)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ # package provides .pc files
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/dev-cpp/glog/glog-0.3.4.ebuild b/dev-cpp/glog/glog-0.3.4.ebuild
new file mode 100644
index 000000000000..a6e1d7719cb0
--- /dev/null
+++ b/dev-cpp/glog/glog-0.3.4.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="gflags static-libs unwind test"
+
+RDEPEND="gflags? ( >=dev-cpp/gflags-2.0-r1[${MULTILIB_USEDEP}] )
+ unwind? ( sys-libs/libunwind )"
+DEPEND="${RDEPEND}
+ test? (
+ >=dev-cpp/gmock-1.7.0-r1[${MULTILIB_USEDEP}]
+ >=dev-cpp/gtest-1.6.0-r2[${MULTILIB_USEDEP}]
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.3.2-avoid-inline-asm.patch
+ # Fix the --dodcdir flag:
+ # https://code.google.com/p/google-glog/issues/detail?id=193
+ sed -i \
+ -e '/^docdir =/s:=.*:= @docdir@:' \
+ Makefile.in || die
+}
+
+multilib_src_configure() {
+ use test || export ac_cv_prog_GTEST_CONFIG=no
+ ECONF_SOURCE=${S} \
+ ac_cv_lib_gflags_main=$(usex gflags) \
+ ac_cv_lib_unwind_backtrace=$(usex unwind) \
+ econf \
+ --docdir="\$(datarootdir)/doc/${PF}" \
+ --htmldir='$(docdir)/html' \
+ $(use_enable static-libs static)
+}
+
+_emake() {
+ # The tests always get built ... disable them when unused.
+ emake $(usex test '' noinst_PROGRAMS=) "$@"
+}
+
+multilib_src_compile() {
+ _emake
+}
+
+multilib_src_install() {
+ _emake install DESTDIR="${D}"
+}
+
+multilib_src_install_all() {
+ # Punt docs we don't care about (NEWS is 0 bytes).
+ rm "${ED}"/usr/share/doc/${PF}/{COPYING,NEWS,README.windows} || die
+
+ # --htmldir doesn't work (yet):
+ # https://code.google.com/p/google-glog/issues/detail?id=144
+ dohtml "${ED}"/usr/share/doc/${PF}/*
+ rm "${ED}"/usr/share/doc/${PF}/*.{html,css}
+
+ use static-libs || find "${ED}" -name '*.la' -delete
+}
diff --git a/dev-cpp/glog/metadata.xml b/dev-cpp/glog/metadata.xml
new file mode 100644
index 000000000000..012c86e5ade5
--- /dev/null
+++ b/dev-cpp/glog/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>vapier@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>cpp@gentoo.org</email>
+ <name>Gentoo C++ Project</name>
+ </maintainer>
+ <use>
+ <flag name="gflags">Use <pkg>dev-cpp/gflags</pkg> for flag parsing</flag>
+ <flag name="unwind">Use <pkg>sys-libs/libunwind</pkg> for stack unwinding instead of glibc/gcc (may be more reliable on x86_64)</flag>
+ </use>
+ <upstream>
+ <remote-id type="google-code">google-glog</remote-id>
+ <remote-id type="github">google/glog</remote-id>
+ </upstream>
+</pkgmetadata>