Date: Tuesday, February 21, 2023 @ 21:36:27
Author: artafinde
Revision: 1403307
archrelease: copy trunk to community-x86_64
Added:
corectrl/repos/community-x86_64/0001-Add-easylogging-configuration-to-tests.patch
(from rev 1403306,
corectrl/trunk/0001-Add-easylogging-configuration-to-tests.patch)
corectrl/repos/community-x86_64/PKGBUILD
(from rev 1403306, corectrl/trunk/PKGBUILD)
Deleted:
corectrl/repos/community-x86_64/PKGBUILD
---------------------------------------------------+
0001-Add-easylogging-configuration-to-tests.patch | 115 ++++++++++++++++++++
PKGBUILD | 100 +++++++++--------
2 files changed, 172 insertions(+), 43 deletions(-)
Copied:
corectrl/repos/community-x86_64/0001-Add-easylogging-configuration-to-tests.patch
(from rev 1403306,
corectrl/trunk/0001-Add-easylogging-configuration-to-tests.patch)
===================================================================
--- 0001-Add-easylogging-configuration-to-tests.patch
(rev 0)
+++ 0001-Add-easylogging-configuration-to-tests.patch 2023-02-21 21:36:27 UTC
(rev 1403307)
@@ -0,0 +1,115 @@
+From 086e814b154d0a79a4dc56b405587d93a029c80e Mon Sep 17 00:00:00 2001
+From: Juan Palacios <[email protected]>
+Date: Tue, 21 Feb 2023 19:13:25 +0100
+Subject: [PATCH] Add easylogging++ configuration to tests
+
+Also, group easylogging++ common configuration macros on
+3RDPARTY_DEFINITIONS and initialize it on corectrl_lib with
+SHARE_EASYLOGGINGPP.
+
+Fixes #351
+---
+ CHANGELOG.md | 1 +
+ CMakeLists.txt | 3 +++
+ src/CMakeLists.txt | 3 ---
+ src/app/appfactory.cpp | 2 +-
+ tests/CMakeLists.txt | 8 +-------
+ tests/src/main.cpp | 21 ++++++++++++++++++++-
+ 6 files changed, 26 insertions(+), 12 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 12c4235..eaea750 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -70,6 +70,9 @@ list(APPEND 3RDPARTY_DEFINITIONS
+ ENABLE_PREDEFINED_TEMPERATURE_UNITS
+ ENABLE_PREDEFINED_CONVERT_UNITS
+ ENABLE_PREDEFINED_CONCENTRATION_UNITS
++ ELPP_NO_LOG_TO_FILE
++ ELPP_NO_DEFAULT_LOG_FILE
++ ELPP_FORCE_USE_STD_THREAD
+ )
+
+ find_package(easyloggingpp 9.96.7 QUIET)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 67204ed..d626eef 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -3,9 +3,6 @@ configure_file(config.h.in config.h)
+ list(APPEND APP_COMPILE_DEFINITIONS
+ ${3RDPARTY_DEFINITIONS}
+ ELPP_THREAD_SAFE
+- ELPP_FORCE_USE_STD_THREAD
+- ELPP_NO_LOG_TO_FILE
+- ELPP_NO_DEFAULT_LOG_FILE
+ )
+
+ list(APPEND COMMON_SRC
+diff --git a/src/app/appfactory.cpp b/src/app/appfactory.cpp
+index e98d67f..5d0b7ab 100644
+--- a/src/app/appfactory.cpp
++++ b/src/app/appfactory.cpp
+@@ -45,7 +45,7 @@
+ #include <system_error>
+ #include <utility>
+
+-INITIALIZE_EASYLOGGINGPP
++SHARE_EASYLOGGINGPP(el::Helpers::storage());
+
+ namespace fs = std::filesystem;
+
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 72c178a..870b2ea 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -12,15 +12,9 @@ endif()
+
+ # Compile definitions
+ list(APPEND TESTS_COMPILE_DEFINITIONS
+- # https://github.com/catchorg/Catch2/blob/master/docs/configuration.md
++ ${3RDPARTY_DEFINITIONS}
+ CATCH_CONFIG_FAST_COMPILE
+-
+- # https://github.com/zuhd-org/easyloggingpp/blob/master/README.md
+ ELPP_DISABLE_LOGS
+- ELPP_NO_LOG_TO_FILE
+- ELPP_NO_DEFAULT_LOG_FILE
+-
+- ${3RDPARTY_DEFINITIONS}
+ )
+
+ # include directories for all tests
+diff --git a/tests/src/main.cpp b/tests/src/main.cpp
+index 147634b..7870121 100644
+--- a/tests/src/main.cpp
++++ b/tests/src/main.cpp
+@@ -1,6 +1,25 @@
+ // SPDX-License-Identifier: GPL-3.0-or-later
+ // Copyright 2019 Juan Palacios <[email protected]>
+
+-#define CATCH_CONFIG_MAIN
++#define CATCH_CONFIG_RUNNER
+ #include <catch2/catch.hpp>
+ #include <catch2/trompeloeil.hpp>
++#include <easylogging++.h>
++
++INITIALIZE_EASYLOGGINGPP
++
++void setupLogger()
++{
++ el::Configurations c;
++ c.setToDefault();
++ c.setGlobally(el::ConfigurationType::Enabled, "false");
++ c.setGlobally(el::ConfigurationType::ToFile, "false");
++
++ el::Loggers::setDefaultConfigurations(c, true);
++}
++
++int main(int argc, char *argv[])
++{
++ setupLogger();
++ return Catch::Session().run(argc, argv);
++}
+--
+2.39.2
+
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2023-02-21 21:36:07 UTC (rev 1403306)
+++ PKGBUILD 2023-02-21 21:36:27 UTC (rev 1403307)
@@ -1,43 +0,0 @@
-# Maintainer: Leonidas Spyropoulos <[email protected]>
-# Contributor: Sergey Kostyuchenko <[email protected]>
-
-pkgname=corectrl
-pkgver=1.3.1
-pkgrel=2
-pkgdesc="Core control application"
-url="https://gitlab.com/corectrl/corectrl"
-license=('GPL3')
-arch=('i686' 'x86_64')
-depends=('procps-ng' 'hwdata' 'quazip-qt5' 'qt5-charts' 'qt5-quickcontrols2'
'qt5-base>=5.9'
- 'botan>=2.2.0' 'qt5-svg' 'qt5-xmlpatterns' 'qt5-base' 'dbus' 'polkit')
-makedepends=('cmake>=3.3' 'qt5-tools' 'quazip-qt5' 'gcc>=8'
'extra-cmake-modules' 'ninja')
-optdepends=(
- 'vulkan-tools: For vulkaninfo'
- 'mesa-utils: For glxinfo'
- 'util-linux: For lscpu'
-)
-source=("https://gitlab.com/corectrl/corectrl/-/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.bz2")
-sha512sums=('fc603226470932f92d495da4a219b511ae11cd2e6918fb86f37cf557b140ce5ed574f5673e69d08b7348037e4de89c8db7ce2dece512f7b0ac7a3dd065639ca4')
-
-build() {
- cd "${pkgname}-v${pkgver}"
- cmake \
- -Bbuild \
- -GNinja \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -Wno-dev
- cmake --build build --verbose
-}
-
-check () {
- cd "${pkgname}-v${pkgver}"
- ninja -C build test
-}
-
-package() {
- cd "${pkgname}-v${pkgver}"
- DESTDIR="${pkgdir}" cmake --install build
-}
-
-# vim:set ts=2 sw=2 et:
Copied: corectrl/repos/community-x86_64/PKGBUILD (from rev 1403306,
corectrl/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2023-02-21 21:36:27 UTC (rev 1403307)
@@ -0,0 +1,57 @@
+# Maintainer: Leonidas Spyropoulos <[email protected]>
+# Contributor: Sergey Kostyuchenko <[email protected]>
+
+pkgname=corectrl
+pkgver=1.3.2
+pkgrel=1
+pkgdesc="Core control application"
+url="https://gitlab.com/corectrl/corectrl"
+license=('GPL3')
+arch=('x86_64')
+depends=(procps-ng hwdata quazip-qt5 qt5-charts qt5-quickcontrols2 qt5-base
+ botan qt5-svg qt5-xmlpatterns qt5-base dbus polkit fmt pugixml
hicolor-icon-theme)
+makedepends=(cmake qt5-tools extra-cmake-modules ninja easyloggingpp)
+checkdepends=(catch2 trompeloeil)
+optdepends=(
+ 'vulkan-tools: For vulkaninfo'
+ 'mesa-utils: For glxinfo'
+ 'util-linux: For lscpu'
+)
+source=("https://gitlab.com/corectrl/corectrl/-/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.bz2"
+ "0001-Add-easylogging-configuration-to-tests.patch")
+sha256sums=('928fd1a7358e948dad81ee04094025ecab912e6d651295ab3daecd781e464ec7'
+ '4cb28d50347d09a7182144a87ca14e7d8469e843f8ad6fee2a73278236f41898')
+b2sums=('6e243c6f02b4ccdcbbc7a0e184a3c5f20f380e96fc49ee0e89aa816f8041bb7b41645ee47e5edca510c93358d06a8961552f92bb45c99442cd152fc720f8014e'
+
'bca22ca8cfde48eab6386f862b247aa41acf1e5385f405c347cc35f7d76873df06f8d71b1a847947c2034a41fb0099a9edfb487fc0eab7f86d20a1066f8ee4d7')
+
+prepare() {
+ cd "${pkgname}-v${pkgver}"
+ patch -Np1 < "${srcdir}/0001-Add-easylogging-configuration-to-tests.patch"
+}
+
+build() {
+ cmake \
+ -Bbuild \
+ -GNinja \
+ -S "${pkgname}-v${pkgver}" \
+ -DCMAKE_BUILD_TYPE='None' \
+ -DCMAKE_INSTALL_PREFIX='/usr' \
+ -DCMAKE_INSTALL_LIBDIR='lib' \
+ -DCMAKE_INSTALL_LIBEXECDIR='lib' \
+ -DBUILD_TESTING=ON \
+ -Wno-dev
+ cmake --build build --verbose
+}
+
+check () {
+ CTEST_OUTPUT_ON_FAILURE=1 ninja -C build test
+}
+
+package() {
+ depends+=(
+ fmt libfmt.so
+ )
+ DESTDIR="${pkgdir}" cmake --install build
+}
+
+# vim:set ts=2 sw=2 et: