aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostadin Shishmanov <kocelfc@tutanota.com>2023-06-11 05:06:41 +0300
committerKostadin Shishmanov <kocelfc@tutanota.com>2023-06-11 05:06:41 +0300
commit62e6533f027db76017979475dc9c95800f18eacf (patch)
treed041ca899f10c4f5c072595997194e3b85c958b2
parentapp-misc/clifm: add 1.12, drop 1.9 (diff)
downloadguru-62e6533f.tar.gz
guru-62e6533f.tar.bz2
guru-62e6533f.zip
dev-cpp/easyloggingpp: new package, add 9.97.0
Signed-off-by: Kostadin Shishmanov <kocelfc@tutanota.com>
-rw-r--r--dev-cpp/easyloggingpp/Manifest1
-rw-r--r--dev-cpp/easyloggingpp/easyloggingpp-9.97.0.ebuild32
-rw-r--r--dev-cpp/easyloggingpp/files/0001-Switch-CMake-build-system-from-C-11-to-C-14.patch66
-rw-r--r--dev-cpp/easyloggingpp/files/disable-failing-tests.patch45
-rw-r--r--dev-cpp/easyloggingpp/metadata.xml11
5 files changed, 155 insertions, 0 deletions
diff --git a/dev-cpp/easyloggingpp/Manifest b/dev-cpp/easyloggingpp/Manifest
new file mode 100644
index 000000000..c1e7508ce
--- /dev/null
+++ b/dev-cpp/easyloggingpp/Manifest
@@ -0,0 +1 @@
+DIST easyloggingpp-9.97.0.tar.gz 750851 BLAKE2B 7ae65db33009dccf6e3a4362e4b5e23080935629b079e5898c8063d31144bef2341a041365bf20d0acd5067ad606e752de4b2b70a55f4bd16047b1ae3bab416d SHA512 e45789edaf7a43ad6a73861840d24ccce9b9d6bba1aaacf93c6ac26ff7449957251d2ca322c9da85130b893332dd305b13a2499eaffc65ecfaaafa3e11f8d63d
diff --git a/dev-cpp/easyloggingpp/easyloggingpp-9.97.0.ebuild b/dev-cpp/easyloggingpp/easyloggingpp-9.97.0.ebuild
new file mode 100644
index 000000000..9fd347ed9
--- /dev/null
+++ b/dev-cpp/easyloggingpp/easyloggingpp-9.97.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="C++ logging library"
+HOMEPAGE="https://github.com/abumq/easyloggingpp"
+SRC_URI="https://github.com/abumq/easyloggingpp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="test? ( dev-cpp/gtest )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/0001-Switch-CMake-build-system-from-C-11-to-C-14.patch"
+ "${FILESDIR}/disable-failing-tests.patch"
+)
+
+src_configure() {
+ local mycmakeargs+=(
+ -Dtest=$(usex test ON OFF)
+ )
+ cmake_src_configure
+}
diff --git a/dev-cpp/easyloggingpp/files/0001-Switch-CMake-build-system-from-C-11-to-C-14.patch b/dev-cpp/easyloggingpp/files/0001-Switch-CMake-build-system-from-C-11-to-C-14.patch
new file mode 100644
index 000000000..fbdbd849f
--- /dev/null
+++ b/dev-cpp/easyloggingpp/files/0001-Switch-CMake-build-system-from-C-11-to-C-14.patch
@@ -0,0 +1,66 @@
+From 1f6025dc0553c64eb556759a38ff70e55f97904b Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Thu, 26 Jan 2023 20:10:42 -0500
+Subject: [PATCH] Switch CMake build system from C++11 to C++14
+
+---
+ CMakeLists.txt | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 538cc8a..ed42915 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,21 +2,21 @@ cmake_minimum_required(VERSION 2.8.7)
+
+ project(Easyloggingpp CXX)
+
+-macro(require_cpp11)
++macro(require_cpp14)
+ if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.0)
+ # CMake 3.1 has built-in CXX standard checks.
+- message("-- Setting C++11")
+- set(CMAKE_CXX_STANDARD 11)
++ message("-- Setting C++14")
++ set(CMAKE_CXX_STANDARD 14)
+ set(CMAKE_CXX_STANDARD_REQUIRED on)
+ else()
+ if (CMAKE_CXX_COMPILER_ID MATCHES "GCC")
+- message ("-- GNU CXX (-std=c++11)")
+- list(APPEND CMAKE_CXX_FLAGS "-std=c++11")
++ message ("-- GNU CXX (-std=c++14)")
++ list(APPEND CMAKE_CXX_FLAGS "-std=c++14")
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+- message ("-- CLang CXX (-std=c++11)")
+- list(APPEND CMAKE_CXX_FLAGS "-std=c++11")
++ message ("-- CLang CXX (-std=c++14)")
++ list(APPEND CMAKE_CXX_FLAGS "-std=c++14")
+ else()
+- message ("-- Easylogging++ requires C++11. Your compiler does not support it.")
++ message ("-- Easylogging++ requires C++14. Your compiler does not support it.")
+ endif()
+ endif()
+ endmacro()
+@@ -57,7 +57,7 @@ if (build_static_lib)
+ add_definitions(-DELPP_UTC_DATETIME)
+ endif()
+
+- require_cpp11()
++ require_cpp14()
+ add_library(easyloggingpp STATIC src/easylogging++.cc)
+ set_property(TARGET easyloggingpp PROPERTY POSITION_INDEPENDENT_CODE ON)
+
+@@ -71,8 +71,8 @@ export(PACKAGE ${PROJECT_NAME})
+
+ ########################################## Unit Testing ###################################
+ if (test)
+- # We need C++11
+- require_cpp11()
++ # We need C++14
++ require_cpp14()
+ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
+
+ find_package (gtest REQUIRED)
+--
+2.39.1
+
diff --git a/dev-cpp/easyloggingpp/files/disable-failing-tests.patch b/dev-cpp/easyloggingpp/files/disable-failing-tests.patch
new file mode 100644
index 000000000..44479ecb4
--- /dev/null
+++ b/dev-cpp/easyloggingpp/files/disable-failing-tests.patch
@@ -0,0 +1,45 @@
+Description: Disable failing tests
+Author: Stephen Kitt <skitt@debian.org>
+
+--- a/test/command-line-args-test.h
++++ b/test/command-line-args-test.h
+@@ -26,7 +26,7 @@
+ EXPECT_STRCASEEQ(cmd.getParamValue("--arg4WithValue"), "this_should_Added");
+ }
+
+-TEST(CommandLineArgsTest, LoggingFlagsArg) {
++TEST(CommandLineArgsTest, DISABLED_LoggingFlagsArg) {
+ const char* c[3];
+ c[0] = "myprog";
+ c[1] = "--logging-flags=5"; // NewLineForContainer & LogDetailedCrashReason (1 & 4)
+--- a/test/helpers-test.h
++++ b/test/helpers-test.h
+@@ -5,7 +5,7 @@
+ #include "test.h"
+ #include <vector>
+
+-TEST(HelpersTest, ConvertTemplateToStdString) {
++TEST(HelpersTest, DISABLED_ConvertTemplateToStdString) {
+ std::vector<int> vecInt;
+ vecInt.push_back(1);
+ vecInt.push_back(2);
+--- a/test/syslog-test.h
++++ b/test/syslog-test.h
+@@ -8,7 +8,7 @@
+ static const char* kSysLogFile = "/var/log/syslog";
+ static const char* s_currentHost = el::base::utils::OS::currentHost().c_str();
+
+-TEST(SysLogTest, WriteLog) {
++TEST(SysLogTest, DISABLED_WriteLog) {
+ if (!fileExists(kSysLogFile)) {
+ // Do not check for syslog config, just dont test it
+ return;
+@@ -23,7 +23,7 @@
+ EXPECT_TRUE(Str::endsWith(actual, expectedEnd));
+ }
+
+-TEST(SysLogTest, DebugVersionLogs) {
++TEST(SysLogTest, DISABLED_DebugVersionLogs) {
+ if (!fileExists(kSysLogFile)) {
+ // Do not check for syslog config, just dont test it
+ return;
diff --git a/dev-cpp/easyloggingpp/metadata.xml b/dev-cpp/easyloggingpp/metadata.xml
new file mode 100644
index 000000000..b1302a967
--- /dev/null
+++ b/dev-cpp/easyloggingpp/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM 'https://www.gentoo.org/dtd/metadata.dtd'>
+<pkgmetadata>
+ <maintainer type="person">
+ <email>kocelfc@tutanota.com</email>
+ <name>Kostadin Shishmanov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">abumq/easyloggingpp</remote-id>
+ </upstream>
+</pkgmetadata>