* [Buildroot] [PATCH] package/libdatachannel: new package
@ 2023-04-26 16:14 Maksim Kiselev
2023-05-08 20:42 ` Yann E. MORIN
0 siblings, 1 reply; 2+ messages in thread
From: Maksim Kiselev @ 2023-04-26 16:14 UTC (permalink / raw)
To: buildroot; +Cc: Maksim Kiselev, Samuel Martin
This patch adds a new package for libdatachannel.
libdatachannel is an open-source software library implementing WebRTC Data
Channels, WebRTC Media Transport, and WebSockets. It is written in C++17
and offers C bindings.
Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
---
package/Config.in | 1 +
package/libdatachannel/Config.in | 7 +++++
package/libdatachannel/libdatachannel.hash | 3 ++
package/libdatachannel/libdatachannel.mk | 32 ++++++++++++++++++++++
4 files changed, 43 insertions(+)
create mode 100644 package/libdatachannel/Config.in
create mode 100644 package/libdatachannel/libdatachannel.hash
create mode 100644 package/libdatachannel/libdatachannel.mk
diff --git a/package/Config.in b/package/Config.in
index eaac32a01a..c323409e37 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1408,6 +1408,7 @@ menu "Audio/Sound"
source "package/libcodec2/Config.in"
source "package/libcue/Config.in"
source "package/libcuefile/Config.in"
+ source "package/libdatachannel/Config.in"
source "package/libebur128/Config.in"
source "package/libg7221/Config.in"
source "package/libgsm/Config.in"
diff --git a/package/libdatachannel/Config.in b/package/libdatachannel/Config.in
new file mode 100644
index 0000000000..84ade9a879
--- /dev/null
+++ b/package/libdatachannel/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LIBDATACHANNEL
+ bool "libdatachannel"
+ help
+ C/C++ WebRTC network library featuring Data Channels,
+ Media Transport, and WebSockets.
+
+ https://github.com/paullouisageneau/libdatachannel
diff --git a/package/libdatachannel/libdatachannel.hash b/package/libdatachannel/libdatachannel.hash
new file mode 100644
index 0000000000..fd1112acf7
--- /dev/null
+++ b/package/libdatachannel/libdatachannel.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 cecd359c6c261676bde42ab8b912c851d13d73759b16eb03496903833fdf4306 libdatachannel-v0.18.3-br1.tar.gz
+sha256 fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85 LICENSE
diff --git a/package/libdatachannel/libdatachannel.mk b/package/libdatachannel/libdatachannel.mk
new file mode 100644
index 0000000000..d86eed9bef
--- /dev/null
+++ b/package/libdatachannel/libdatachannel.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# libdatachannel
+#
+################################################################################
+
+LIBDATACHANNEL_VERSION = v0.18.3
+LIBDATACHANNEL_SITE_METHOD = git
+LIBDATACHANNEL_SITE = https://github.com/paullouisageneau/libdatachannel
+LIBDATACHANNEL_GIT_SUBMODULES = YES
+LIBDATACHANNEL_INSTALL_STAGING = YES
+LIBDATACHANNEL_LICENSE = MPL-2.0
+LIBDATACHANNEL_LICENSE_FILES = LICENSE
+
+LIBDATACHANNEL_CONF_OPTS = -DPREFER_SYSTEM_LIB=1
+
+ifeq ($(BR2_PACKAGE_JSON_FOR_MODERN_CPP),y)
+LIBDATACHANNEL_CONF_OPTS += -DUSE_SYSTEM_JSON=1
+LIBDATACHANNEL_DEPENDENCIES += json-for-modern-cpp
+endif
+
+ifeq ($(BR2_PACKAGE_LIBNICE),y)
+LIBDATACHANNEL_CONF_OPTS += -DUSE_NICE=1
+LIBDATACHANNEL_DEPENDENCIES += libnice
+endif
+
+ifeq ($(BR2_PACKAGE_LIBSRTP),y)
+LIBDATACHANNEL_CONF_OPTS += -DUSE_SYSTEM_SRTP=1
+LIBDATACHANNEL_DEPENDENCIES += libsrtp
+endif
+
+$(eval $(cmake-package))
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] package/libdatachannel: new package
2023-04-26 16:14 [Buildroot] [PATCH] package/libdatachannel: new package Maksim Kiselev
@ 2023-05-08 20:42 ` Yann E. MORIN
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2023-05-08 20:42 UTC (permalink / raw)
To: Maksim Kiselev; +Cc: Samuel Martin, buildroot
Maxim, All,
On 2023-04-26 19:14 +0300, Maksim Kiselev spake thusly:
> This patch adds a new package for libdatachannel.
>
> libdatachannel is an open-source software library implementing WebRTC Data
> Channels, WebRTC Media Transport, and WebSockets. It is written in C++17
> and offers C bindings.
>
> Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
Thanks for this new package. Please see below for a quick review...
[--SNIP--]
> diff --git a/package/Config.in b/package/Config.in
> index eaac32a01a..c323409e37 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1408,6 +1408,7 @@ menu "Audio/Sound"
> source "package/libcodec2/Config.in"
> source "package/libcue/Config.in"
> source "package/libcuefile/Config.in"
> + source "package/libdatachannel/Config.in"
I would have added that in the network category, rather than the
audio/sound one.
[--SNIP--]
> diff --git a/package/libdatachannel/libdatachannel.mk b/package/libdatachannel/libdatachannel.mk
> new file mode 100644
> index 0000000000..d86eed9bef
> --- /dev/null
> +++ b/package/libdatachannel/libdatachannel.mk
> @@ -0,0 +1,32 @@
> +################################################################################
> +#
> +# libdatachannel
> +#
> +################################################################################
> +
> +LIBDATACHANNEL_VERSION = v0.18.3
> +LIBDATACHANNEL_SITE_METHOD = git
> +LIBDATACHANNEL_SITE = https://github.com/paullouisageneau/libdatachannel
> +LIBDATACHANNEL_GIT_SUBMODULES = YES
> +LIBDATACHANNEL_INSTALL_STAGING = YES
> +LIBDATACHANNEL_LICENSE = MPL-2.0
> +LIBDATACHANNEL_LICENSE_FILES = LICENSE
> +
> +LIBDATACHANNEL_CONF_OPTS = -DPREFER_SYSTEM_LIB=1
I think I understand what this means, but please explain it the commit
log why we need to do so. Also, as the name if "prefer", what happens if
a system dependency is not present? Does it fallback to the bundled one?
So, it would be better to explicitly disable all options that use
bundled dependencies (e.g. juice, et al.).
Bulding tests is not necessary either, so they should be disable
(-DNO_TESTS=1)
> +ifeq ($(BR2_PACKAGE_JSON_FOR_MODERN_CPP),y)
> +LIBDATACHANNEL_CONF_OPTS += -DUSE_SYSTEM_JSON=1
> +LIBDATACHANNEL_DEPENDENCIES += json-for-modern-cpp
> +endif
Unlesss this is not supported by the package buildsystem, we want to
pass explicit disabling of options:
ifeq ($(BR2_PACKAGE_JSON_FOR_MODERN_CPP),y)
LIBDATACHANNEL_CONF_OPTS += -DUSE_SYSTEM_JSON=1
LIBDATACHANNEL_DEPENDENCIES += json-for-modern-cpp
else
LIBDATACHANNEL_CONF_OPTS += -DUSE_SYSTEM_JSON=0
endif
(and so on for the other two).
Care to fix and respin, please?
Regards,
Yann E. MORIN.
> +ifeq ($(BR2_PACKAGE_LIBNICE),y)
> +LIBDATACHANNEL_CONF_OPTS += -DUSE_NICE=1
> +LIBDATACHANNEL_DEPENDENCIES += libnice
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LIBSRTP),y)
> +LIBDATACHANNEL_CONF_OPTS += -DUSE_SYSTEM_SRTP=1
> +LIBDATACHANNEL_DEPENDENCIES += libsrtp
> +endif
> +
> +$(eval $(cmake-package))
> --
> 2.39.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-08 20:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-26 16:14 [Buildroot] [PATCH] package/libdatachannel: new package Maksim Kiselev
2023-05-08 20:42 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox