* [Buildroot] [PATCH v3] package/log4qt: new package
@ 2021-02-17 19:49 Bartosz Bilas
2021-03-16 22:06 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Bartosz Bilas @ 2021-02-17 19:49 UTC (permalink / raw)
To: buildroot
Log4Qt is a C++ port of the Apache Software Foundation
Log4j package using the Qt Framework.
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
---
Changes v2 -> v3:
- use cmake pkg infra
- rework database logging support
Changes v1 -> v2:
- bump version to 1.5.1
- use qmake pkg infra
- propagate dependencies from qt5 package
- improve commit message
DEVELOPERS | 1 +
package/Config.in | 1 +
package/log4qt/Config.in | 19 +++++++++++++++++++
package/log4qt/log4qt.hash | 3 +++
package/log4qt/log4qt.mk | 23 +++++++++++++++++++++++
5 files changed, 47 insertions(+)
create mode 100644 package/log4qt/Config.in
create mode 100644 package/log4qt/log4qt.hash
create mode 100644 package/log4qt/log4qt.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 12e1f83cf7..3f122d436b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -261,6 +261,7 @@ F: package/python-canopen/
N: Bartosz Bilas <b.bilas@grinn-global.com>
F: board/stmicroelectronics/stm32mp157a-dk1/
F: configs/stm32mp157a_dk1_defconfig
+F: package/log4qt/
F: package/python-esptool/
F: package/python-pyaes/
F: package/ttyd/
diff --git a/package/Config.in b/package/Config.in
index 5304ab141c..54102e0509 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1659,6 +1659,7 @@ menu "Logging"
source "package/log4cplus/Config.in"
source "package/log4cpp/Config.in"
source "package/log4cxx/Config.in"
+ source "package/log4qt/Config.in"
source "package/opentracing-cpp/Config.in"
source "package/spdlog/Config.in"
source "package/zlog/Config.in"
diff --git a/package/log4qt/Config.in b/package/log4qt/Config.in
new file mode 100644
index 0000000000..1b716bbc51
--- /dev/null
+++ b/package/log4qt/Config.in
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_LOG4QT
+ bool "log4qt"
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_PACKAGE_QT5
+ depends on BR2_USE_WCHAR
+ depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # c++11 qt5base
+ depends on !BR2_STATIC_LIBS
+ help
+ Log4Qt is a C++ port of the Apache Software Foundation
+ Log4j package using the Qt Framework. It is intended to be
+ used by open source and commercial Qt projects.
+
+ https://github.com/MEONMedical/Log4Qt
+
+comment "Log4Qt needs qt5, a toolchain w/ gcc >= 5.0, wchar, NPTL, C++, dynamic library"
+ depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
+ !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS || \
+ !BR2_TOOLCHAIN_GCC_AT_LEAST_5 || !BR2_PACKAGE_QT5
diff --git a/package/log4qt/log4qt.hash b/package/log4qt/log4qt.hash
new file mode 100644
index 0000000000..757bab1a25
--- /dev/null
+++ b/package/log4qt/log4qt.hash
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256 ff17b794ca7d5290a150a53f6272e6a30a7f4d942aa58298a8328bf10a65858a log4qt-1.5.1.tar.gz
+sha256 c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08 LICENSE
diff --git a/package/log4qt/log4qt.mk b/package/log4qt/log4qt.mk
new file mode 100644
index 0000000000..57bf5c9ab0
--- /dev/null
+++ b/package/log4qt/log4qt.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# log4qt
+#
+################################################################################
+
+LOG4QT_VERSION = 1.5.1
+LOG4QT_SITE = $(call github,MEONMedical,Log4Qt,v$(LOG4QT_VERSION))
+LOG4QT_DEPENDENCIES += qt5base
+LOG4QT_LICENSE = Apache-2.0
+LOG4QT_LICENSE_FILES = LICENSE
+LOG4QT_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_QT5BASE_SQLITE_QT),y)
+LOG4QT_CONF_OPTS += -DBUILD_WITH_DB_LOGGING=ON
+else ifeq ($(BR2_PACKAGE_SQLITE)$(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),yy)
+LOG4QT_CONF_OPTS += -DBUILD_WITH_DB_LOGGING=ON
+LOG4QT_DEPENDENCIES += sqlite
+else
+LOG4QT_CONF_OPTS += -DBUILD_WITH_DB_LOGGING=OFF
+endif
+
+$(eval $(cmake-package))
--
2.30.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v3] package/log4qt: new package
2021-02-17 19:49 [Buildroot] [PATCH v3] package/log4qt: new package Bartosz Bilas
@ 2021-03-16 22:06 ` Thomas Petazzoni
2021-03-17 20:30 ` Bartosz Bilas
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2021-03-16 22:06 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 17 Feb 2021 20:49:59 +0100
Bartosz Bilas <b.bilas@grinn-global.com> wrote:
> Log4Qt is a C++ port of the Apache Software Foundation
> Log4j package using the Qt Framework.
>
> Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
Thanks for this contribution! I have applied, with a number of changes.
See below.
> Changes v1 -> v2:
> - bump version to 1.5.1
> - use qmake pkg infra
> - propagate dependencies from qt5 package
Actually, this was not needed. Propagating "depends on" is needed if
you "select" something. But if you "depends on" that something, then
it's not needed.
> diff --git a/package/log4qt/Config.in b/package/log4qt/Config.in
> new file mode 100644
> index 0000000000..1b716bbc51
> --- /dev/null
> +++ b/package/log4qt/Config.in
> @@ -0,0 +1,19 @@
> +config BR2_PACKAGE_LOG4QT
> + bool "log4qt"
> + depends on BR2_INSTALL_LIBSTDCPP
> + depends on BR2_PACKAGE_QT5
> + depends on BR2_USE_WCHAR
> + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # c++11 qt5base
> + depends on !BR2_STATIC_LIBS
So I simplified all of this to just:
depends on BR2_PACKAGE_QT5
> +comment "Log4Qt needs qt5, a toolchain w/ gcc >= 5.0, wchar, NPTL, C++, dynamic library"
> + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
> + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS || \
> + !BR2_TOOLCHAIN_GCC_AT_LEAST_5 || !BR2_PACKAGE_QT5
And simplified that as well.
> +LOG4QT_VERSION = 1.5.1
> +LOG4QT_SITE = $(call github,MEONMedical,Log4Qt,v$(LOG4QT_VERSION))
> +LOG4QT_DEPENDENCIES += qt5base
> +LOG4QT_LICENSE = Apache-2.0
> +LOG4QT_LICENSE_FILES = LICENSE
> +LOG4QT_INSTALL_STAGING = YES
> +
> +ifeq ($(BR2_PACKAGE_QT5BASE_SQLITE_QT),y)
> +LOG4QT_CONF_OPTS += -DBUILD_WITH_DB_LOGGING=ON
> +else ifeq ($(BR2_PACKAGE_SQLITE)$(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),yy)
> +LOG4QT_CONF_OPTS += -DBUILD_WITH_DB_LOGGING=ON
> +LOG4QT_DEPENDENCIES += sqlite
This dance was not needed. If BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM=y then
you know that Qt5 has been built with SQLite support.
So, I simplified this to:
ifeq ($(BR2_PACKAGE_QT5BASE_SQLITE_QT)$(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),y)
LOG4QT_CONF_OPTS += -DBUILD_WITH_DB_LOGGING=ON
else
LOG4QT_CONF_OPTS += -DBUILD_WITH_DB_LOGGING=OFF
endif
I'm curious though: is this DB_LOGGING feature only supported with the
Sqlite DB backend of Qt, or would it also work with other DB backends ?
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v3] package/log4qt: new package
2021-03-16 22:06 ` Thomas Petazzoni
@ 2021-03-17 20:30 ` Bartosz Bilas
0 siblings, 0 replies; 3+ messages in thread
From: Bartosz Bilas @ 2021-03-17 20:30 UTC (permalink / raw)
To: buildroot
Hello Thomas,
On 16.03.2021 23:06, Thomas Petazzoni wrote:
> Hello,
>
> On Wed, 17 Feb 2021 20:49:59 +0100
> Bartosz Bilas <b.bilas@grinn-global.com> wrote:
>
>> Log4Qt is a C++ port of the Apache Software Foundation
>> Log4j package using the Qt Framework.
>>
>> Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
> Thanks for this contribution! I have applied, with a number of changes.
> See below.
>
>> Changes v1 -> v2:
>> - bump version to 1.5.1
>> - use qmake pkg infra
>> - propagate dependencies from qt5 package
> Actually, this was not needed. Propagating "depends on" is needed if
> you "select" something. But if you "depends on" that something, then
> it's not needed.
Oh, good to know - I'll keep it in my mind for the future :)
>> diff --git a/package/log4qt/Config.in b/package/log4qt/Config.in
>> new file mode 100644
>> index 0000000000..1b716bbc51
>> --- /dev/null
>> +++ b/package/log4qt/Config.in
>> @@ -0,0 +1,19 @@
>> +config BR2_PACKAGE_LOG4QT
>> + bool "log4qt"
>> + depends on BR2_INSTALL_LIBSTDCPP
>> + depends on BR2_PACKAGE_QT5
>> + depends on BR2_USE_WCHAR
>> + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
>> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # c++11 qt5base
>> + depends on !BR2_STATIC_LIBS
> So I simplified all of this to just:
>
> depends on BR2_PACKAGE_QT5
>
>> +comment "Log4Qt needs qt5, a toolchain w/ gcc >= 5.0, wchar, NPTL, C++, dynamic library"
>> + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
>> + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS || \
>> + !BR2_TOOLCHAIN_GCC_AT_LEAST_5 || !BR2_PACKAGE_QT5
> And simplified that as well.
>
>> +LOG4QT_VERSION = 1.5.1
>> +LOG4QT_SITE = $(call github,MEONMedical,Log4Qt,v$(LOG4QT_VERSION))
>> +LOG4QT_DEPENDENCIES += qt5base
>> +LOG4QT_LICENSE = Apache-2.0
>> +LOG4QT_LICENSE_FILES = LICENSE
>> +LOG4QT_INSTALL_STAGING = YES
>> +
>> +ifeq ($(BR2_PACKAGE_QT5BASE_SQLITE_QT),y)
>> +LOG4QT_CONF_OPTS += -DBUILD_WITH_DB_LOGGING=ON
>> +else ifeq ($(BR2_PACKAGE_SQLITE)$(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),yy)
>> +LOG4QT_CONF_OPTS += -DBUILD_WITH_DB_LOGGING=ON
>> +LOG4QT_DEPENDENCIES += sqlite
> This dance was not needed. If BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM=y then
> you know that Qt5 has been built with SQLite support.
>
> So, I simplified this to:
>
> ifeq ($(BR2_PACKAGE_QT5BASE_SQLITE_QT)$(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),y)
> LOG4QT_CONF_OPTS += -DBUILD_WITH_DB_LOGGING=ON
> else
> LOG4QT_CONF_OPTS += -DBUILD_WITH_DB_LOGGING=OFF
> endif
That looks nicer than my idea.
>
> I'm curious though: is this DB_LOGGING feature only supported with the
> Sqlite DB backend of Qt, or would it also work with other DB backends ?
As far as I know and what I've actually used in my projects is sqlite
backend only but I'm not up to date with the upstream so I can be
outdated ;)
>
> Thanks!
>
> Thomas
Best
Bartek
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-17 20:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-17 19:49 [Buildroot] [PATCH v3] package/log4qt: new package Bartosz Bilas
2021-03-16 22:06 ` Thomas Petazzoni
2021-03-17 20:30 ` Bartosz Bilas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.