All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herve Codina <herve.codina@bootlin.com>
To: buildroot@buildroot.org
Cc: "Hervé Codina" <herve.codina@bootlin.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH 2/5] package/ulog: new package
Date: Wed,  3 Nov 2021 08:36:53 +0100	[thread overview]
Message-ID: <20211103073656.1689919-3-herve.codina@bootlin.com> (raw)
In-Reply-To: <20211103073656.1689919-1-herve.codina@bootlin.com>

The ulog library is a minimalistic logging library derived from
Android logger.

https://github.com/Parrot-Developers/ulog

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
 DEVELOPERS             |  1 +
 package/Config.in      |  1 +
 package/ulog/Config.in | 12 ++++++++++++
 package/ulog/ulog.hash |  3 +++
 package/ulog/ulog.mk   | 44 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 61 insertions(+)
 create mode 100644 package/ulog/Config.in
 create mode 100644 package/ulog/ulog.hash
 create mode 100644 package/ulog/ulog.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 778c5c7e08..33e77285d2 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1152,6 +1152,7 @@ F:	package/dtbocfg/
 F:	package/libdbi/
 F:	package/libdbi-drivers/
 F:	package/lua-augeas/
+F:	package/ulog/
 F:	support/testing/tests/package/test_dtbocfg.py
 F:	support/testing/tests/package/test_lua_augeas.py
 
diff --git a/package/Config.in b/package/Config.in
index c23755a421..bbf4ea0477 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1704,6 +1704,7 @@ menu "Logging"
 	source "package/log4qt/Config.in"
 	source "package/opentracing-cpp/Config.in"
 	source "package/spdlog/Config.in"
+	source "package/ulog/Config.in"
 	source "package/zlog/Config.in"
 endmenu
 
diff --git a/package/ulog/Config.in b/package/ulog/Config.in
new file mode 100644
index 0000000000..ef155005c2
--- /dev/null
+++ b/package/ulog/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_ULOG
+	bool "ulog"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	help
+	  This is a minimalistic logging library derived from
+	  Android logger.
+
+	  https://github.com/Parrot-Developers/ulog
+
+comment "ulog needs a toolchain w/ C++, threads"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/ulog/ulog.hash b/package/ulog/ulog.hash
new file mode 100644
index 0000000000..47adc093b9
--- /dev/null
+++ b/package/ulog/ulog.hash
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  14e5773b32a79fa5380bdc7ac73a39a7cd3ab182830f57cf6f2994fb49cf38dc  ulog-0389d243352255f6182326dccdae3d56dadc078f.tar.gz
+sha256  cbb97dd2528af2aa2b9aee6c1b3ff1caed758044c17b2c811cf44b2528c496da  COPYING
diff --git a/package/ulog/ulog.mk b/package/ulog/ulog.mk
new file mode 100644
index 0000000000..e84598701b
--- /dev/null
+++ b/package/ulog/ulog.mk
@@ -0,0 +1,44 @@
+################################################################################
+#
+# ulog
+#
+################################################################################
+
+ULOG_VERSION = 0389d243352255f6182326dccdae3d56dadc078f
+ULOG_SITE = $(call github,Parrot-Developers,ulog,$(ULOG_VERSION))
+ULOG_LICENSE = Apache-2.0
+ULOG_LICENSE_FILES = COPYING
+ULOG_DEPENDENCIES = host-alchemy
+ULOG_INSTALL_STAGING = YES
+
+define ULOG_BUILD_CMDS
+	$(ALCHEMY_TARGET_CONFIGURE_ENV) \
+	$(ALCHEMY_MAKE) libulog
+endef
+
+define ULOG_INSTALL_STATIC_LIBS
+	$(INSTALL) -m 644 $(@D)/alchemy-out/staging/usr/lib/libulog.a $(strip $(1))/usr/lib/
+endef
+
+define ULOG_INSTALL_HEADERS
+	cp -Raf $(@D)/libulog/include/* $(strip $(1))/usr/include/
+endef
+
+ifeq ($(BR2_STATIC_LIBS),)
+define ULOG_INSTALL_SHARED_LIBS
+	$(INSTALL) -m 755 $(@D)/alchemy-out/staging/usr/lib/libulog.so* $(strip $(1))/usr/lib/
+endef
+endif
+
+define ULOG_INSTALL_TARGET_CMDS
+	$(call ULOG_INSTALL_SHARED_LIBS, $(TARGET_DIR))
+endef
+
+define ULOG_INSTALL_STAGING_CMDS
+	$(call ULOG_INSTALL_STATIC_LIBS, $(STAGING_DIR))
+	$(call ULOG_INSTALL_SHARED_LIBS, $(STAGING_DIR))
+	$(call ULOG_INSTALL_HEADERS, $(STAGING_DIR))
+	$(call ALCHEMY_INSTALL_LIB_SDK_FILE, ulog, libulog, libulog.so)
+endef
+
+$(eval $(generic-package))
-- 
2.31.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2021-11-03  7:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03  7:36 [Buildroot] [PATCH 0/5] Add Alchemy build system and some related libs Herve Codina
2021-11-03  7:36 ` [Buildroot] [PATCH 1/5] package/alchemy: new host package Herve Codina
2021-11-03 15:44   ` Thomas Petazzoni
2021-11-03 17:20     ` Herve Codina
2021-11-03 17:30       ` Thomas Petazzoni
2021-11-03  7:36 ` Herve Codina [this message]
2021-11-03 15:47   ` [Buildroot] [PATCH 2/5] package/ulog: new package Thomas Petazzoni
2021-11-03 17:24     ` Herve Codina
2021-11-03  7:36 ` [Buildroot] [PATCH 3/5] package/libfutils: " Herve Codina
2021-11-03 15:47   ` Thomas Petazzoni
2021-11-03 17:31     ` Herve Codina
2021-11-03  7:36 ` [Buildroot] [PATCH 4/5] package/libshdata: " Herve Codina
2021-11-03 15:50   ` Thomas Petazzoni
2021-11-03 17:49     ` Herve Codina
2021-11-03  7:36 ` [Buildroot] [PATCH 5/5] support/testing/tests/package/test_libshdata: new test Herve Codina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211103073656.1689919-3-herve.codina@bootlin.com \
    --to=herve.codina@bootlin.com \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.