All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] package/ragel: new package
@ 2022-03-10 15:20 Théo Lebrun via buildroot
  2022-03-10 15:20 ` [Buildroot] [PATCH 2/3] package/roc: " Théo Lebrun via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Théo Lebrun via buildroot @ 2022-03-10 15:20 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Théo Lebrun, Thomas Petazzoni

This is an host-only package that does preprocessing to .rl files to
turn them into .c or .cpp files.

Initially added to support package/roc.

See https://www.colm.net/open-source/ragel/ for the project's home page:

Ragel compiles executable finite state machines from regular languages.
Ragel targets C, C++ and ASM. Ragel state machines can not only
recognize byte sequences as regular expression machines do, but can
also execute code at arbitrary points in the recognition of a regular
language. Code embedding is done using inline operators that do not
disrupt the regular language syntax.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
 package/ragel/ragel.hash |  3 +++
 package/ragel/ragel.mk   | 18 ++++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 package/ragel/ragel.hash
 create mode 100644 package/ragel/ragel.mk

diff --git a/package/ragel/ragel.hash b/package/ragel/ragel.hash
new file mode 100644
index 0000000000..332f587432
--- /dev/null
+++ b/package/ragel/ragel.hash
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f  ragel-6.10.tar.gz
+sha256  05a87975accb539399d0c8a4f4402ac27a6762fb1e4f31d04d455a8bee3e3693  COPYING
diff --git a/package/ragel/ragel.mk b/package/ragel/ragel.mk
new file mode 100644
index 0000000000..476aff5da4
--- /dev/null
+++ b/package/ragel/ragel.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# ragel
+#
+################################################################################
+
+RAGEL_VERSION = 6.10
+RAGEL_SITE = https://www.colm.net/files/ragel/
+RAGEL_LICENSE = GPL-2.0
+RAGEL_LICENSE_FILES = COPYING
+RAGEL_CONF_OPTS = \
+	--disable-silent-rules \
+	--disable-manual \
+	--disable-dependency-tracking
+RAGEL_DEPENDENCIES =
+HOST_RAGEL_DEPENDENCIES =
+
+$(eval $(host-autotools-package))
-- 
2.35.1

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/3] package/roc: new package
  2022-03-10 15:20 [Buildroot] [PATCH 1/3] package/ragel: new package Théo Lebrun via buildroot
@ 2022-03-10 15:20 ` Théo Lebrun via buildroot
  2022-04-20 21:28   ` Yann E. MORIN
  2022-03-10 15:20 ` [Buildroot] [PATCH 3/3] package/pipewire: add optional roc Théo Lebrun via buildroot
  2022-04-20 20:57 ` [Buildroot] [PATCH 1/3] package/ragel: new package Yann E. MORIN
  2 siblings, 1 reply; 6+ messages in thread
From: Théo Lebrun via buildroot @ 2022-03-10 15:20 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Théo Lebrun, Thomas Petazzoni

Roc is a toolkit for real-time audio streaming over the network.
https://roc-streaming.org/

Goal: optional dependency to PipeWire.
Requires host-ragel to build.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
 package/Config.in                             |  1 +
 ...uild-that-used-removed-functionality.patch | 28 +++++++
 package/roc/Config.in                         | 28 +++++++
 package/roc/roc.hash                          |  3 +
 package/roc/roc.mk                            | 75 +++++++++++++++++++
 5 files changed, 135 insertions(+)
 create mode 100644 package/roc/0001-fix-build-that-used-removed-functionality.patch
 create mode 100644 package/roc/Config.in
 create mode 100644 package/roc/roc.hash
 create mode 100644 package/roc/roc.mk

diff --git a/package/Config.in b/package/Config.in
index 0d5d763180..7ed075ae19 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -48,6 +48,7 @@ menu "Audio and video applications"
 	source "package/on2-8170-libs/Config.in"
 	source "package/opus-tools/Config.in"
 	source "package/pulseaudio/Config.in"
+	source "package/roc/Config.in"
 	source "package/sox/Config.in"
 	source "package/squeezelite/Config.in"
 	source "package/tovid/Config.in"
diff --git a/package/roc/0001-fix-build-that-used-removed-functionality.patch b/package/roc/0001-fix-build-that-used-removed-functionality.patch
new file mode 100644
index 0000000000..50147905c8
--- /dev/null
+++ b/package/roc/0001-fix-build-that-used-removed-functionality.patch
@@ -0,0 +1,28 @@
+build: fix build that used removed functionality
+
+The SConstruct file used the "SourceCode()" method that was removed in
+SCons 4.0.0, after being deprecated in 2.0.0.
+
+This was fixed upstream but is not in the latest release yet.
+https://github.com/roc-streaming/roc-toolkit/commit/abdfbb94df98fe88be4dd92ca587500126558411
+
+Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
+---
+ SConstruct | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/SConstruct b/SConstruct
+index c724854..91fd469 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -49,7 +49,6 @@ env = Environment(ENV=os.environ, tools=[
+ # performance tuning
+ env.Decider('MD5-timestamp')
+ env.SetOption('implicit_cache', 1)
+-env.SourceCode('.', None)
+ 
+ # provide absolute path to force single sconsign file
+ # per-directory sconsign files seems to be buggy with generated sources
+-- 
+2.35.1
+
diff --git a/package/roc/Config.in b/package/roc/Config.in
new file mode 100644
index 0000000000..3fd74cab3f
--- /dev/null
+++ b/package/roc/Config.in
@@ -0,0 +1,28 @@
+comment "ROC needs a toolchain w/ shared libraries, C++, NPTL"
+	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_HAS_THREADS_NPTL
+	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
+
+config BR2_PACKAGE_ROC
+	bool "roc"
+	# depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_1
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
+	depends on BR2_USE_MMU # libuv
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv
+	select BR2_PACKAGE_HOST_PYTHON3
+	select BR2_PACKAGE_HOST_PYTHON3_SSL
+	select BR2_PACKAGE_LIBUV
+	help
+	  Roc is a toolkit for real-time audio streaming over the
+	  network.
+
+	  https://roc-streaming.org/
+
+if BR2_PACKAGE_ROC
+config BR2_PACKAGE_ROC_TOOLS
+	bool "build roc-{conv,recv,send} tools"
+	default y
+endif
diff --git a/package/roc/roc.hash b/package/roc/roc.hash
new file mode 100644
index 0000000000..92bd8ce022
--- /dev/null
+++ b/package/roc/roc.hash
@@ -0,0 +1,3 @@
+# Computed locally:
+sha256  b5f6eda94e5f989226bc6e61dcd0e307e711f00e3b27da49b552133862117353  roc-v0.1.5.tar.gz
+sha256  60222c28c1a7f6a92c7df98e5c5f4459e624e6e285e0b9b94467af5f6ab3343d  LICENSE
diff --git a/package/roc/roc.mk b/package/roc/roc.mk
new file mode 100644
index 0000000000..90d226ffbd
--- /dev/null
+++ b/package/roc/roc.mk
@@ -0,0 +1,75 @@
+################################################################################
+#
+# roc
+#
+################################################################################
+
+ROC_VERSION = v0.1.5
+ROC_SITE = $(call github,roc-streaming,roc-toolkit,$(ROC_VERSION))
+ROC_LICENSE = MPL-2.0
+ROC_LICENSE_FILES = LICENSE
+ROC_INSTALL_STAGING = YES
+ROC_DEPENDENCIES = \
+	host-gengetopt \
+	host-pkgconf \
+	host-ragel \
+	host-scons \
+	libuv
+
+ROC_SCONS_OPTS = \
+	--disable-tests \
+	--disable-examples \
+	--disable-doc \
+	--disable-libunwind \
+	--build-3rdparty=openfec
+# We are not building OpenFEC ourselves as they are using a forked version. See
+# the following note in the documentation:
+# https://github.com/roc-streaming/roc-toolkit/blob/c89687330bfce6f4dce79826f7a235b581f2b49d/docs/sphinx/building/dependencies.rst
+
+# The shared library is enabled by default. --enable-lib does not exist.
+ifneq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+ROC_SCONS_OPTS += --disable-lib
+endif
+
+ifeq ($(BR2_PACKAGE_ROC_TOOLS),y)
+
+# Tools are enabled by default. --enable-tools does not exist.
+
+# SoX and Pulseaudio support is only used for tools or examples, which is why
+# their support is inside the TOOLS condition.
+
+ifeq ($(BR2_PACKAGE_SOX),y)
+ROC_DEPENDENCIES += sox
+else
+ROC_SCONS_OPTS += --disable-sox
+endif
+
+ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
+ROC_DEPENDENCIES += pulseaudio
+else
+ROC_SCONS_OPTS += --disable-pulseaudio
+endif
+
+else
+ROC_SCONS_OPTS += --disable-tools
+endif
+
+define ROC_BUILD_CMDS
+	(cd $(@D); \
+	$(TARGET_CONFIGURE_OPTS) CROSS=$(TARGET_CROSS) \
+		$(SCONS) $(ROC_SCONS_OPTS))
+endef
+
+define ROC_INSTALL_STAGING_CMDS
+	(cd $(@D); \
+	$(TARGET_CONFIGURE_OPTS) CROSS=$(TARGET_CROSS) \
+		$(SCONS) $(ROC_SCONS_OPTS) --prefix="$(STAGING_DIR)/usr" install)
+endef
+
+define ROC_INSTALL_TARGET_CMDS
+	(cd $(@D); \
+	$(TARGET_CONFIGURE_OPTS) CROSS=$(TARGET_CROSS) \
+		$(SCONS) $(ROC_SCONS_OPTS) --prefix="$(TARGET_DIR)/usr" install)
+endef
+
+$(eval $(generic-package))
-- 
2.35.1

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 3/3] package/pipewire: add optional roc
  2022-03-10 15:20 [Buildroot] [PATCH 1/3] package/ragel: new package Théo Lebrun via buildroot
  2022-03-10 15:20 ` [Buildroot] [PATCH 2/3] package/roc: " Théo Lebrun via buildroot
@ 2022-03-10 15:20 ` Théo Lebrun via buildroot
  2022-04-20 20:57 ` [Buildroot] [PATCH 1/3] package/ragel: new package Yann E. MORIN
  2 siblings, 0 replies; 6+ messages in thread
From: Théo Lebrun via buildroot @ 2022-03-10 15:20 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Théo Lebrun, Thomas Petazzoni

Roc is a toolkit for real-time audio streaming over the network, that
can be used as a PipeWire module.

Successful if libpipewire-module-roc-{sink,source}.so get built.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
 package/pipewire/pipewire.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/pipewire/pipewire.mk b/package/pipewire/pipewire.mk
index fc521c86ac..de27bce10c 100644
--- a/package/pipewire/pipewire.mk
+++ b/package/pipewire/pipewire.mk
@@ -189,6 +189,13 @@ else
 PIPEWIRE_CONF_OPTS += -Draop=disabled
 endif
 
+ifeq ($(BR2_PACKAGE_ROC),y)
+PIPEWIRE_CONF_OPTS += -Droc=enabled
+PIPEWIRE_DEPENDENCIES += roc
+else
+PIPEWIRE_CONF_OPTS += -Droc=disabled
+endif
+
 define PIPEWIRE_USERS
 	pipewire -1 pipewire -1 * - - audio,video PipeWire System Daemon
 endef
-- 
2.35.1

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH 1/3] package/ragel: new package
  2022-03-10 15:20 [Buildroot] [PATCH 1/3] package/ragel: new package Théo Lebrun via buildroot
  2022-03-10 15:20 ` [Buildroot] [PATCH 2/3] package/roc: " Théo Lebrun via buildroot
  2022-03-10 15:20 ` [Buildroot] [PATCH 3/3] package/pipewire: add optional roc Théo Lebrun via buildroot
@ 2022-04-20 20:57 ` Yann E. MORIN
  2022-04-20 21:07   ` Yann E. MORIN
  2 siblings, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2022-04-20 20:57 UTC (permalink / raw)
  To: Théo Lebrun; +Cc: James Hilliard, Thomas Petazzoni, buildroot

Théo, All,

On 2022-03-10 16:20 +0100, Théo Lebrun via buildroot spake thusly:
> This is an host-only package that does preprocessing to .rl files to
> turn them into .c or .cpp files.
> 
> Initially added to support package/roc.
> 
> See https://www.colm.net/open-source/ragel/ for the project's home page:
> 
> Ragel compiles executable finite state machines from regular languages.
> Ragel targets C, C++ and ASM. Ragel state machines can not only
> recognize byte sequences as regular expression machines do, but can
> also execute code at arbitrary points in the recognition of a regular
> language. Code embedding is done using inline operators that do not
> disrupt the regular language syntax.
> 
> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
> ---
>  package/ragel/ragel.hash |  3 +++
>  package/ragel/ragel.mk   | 18 ++++++++++++++++++
>  2 files changed, 21 insertions(+)
>  create mode 100644 package/ragel/ragel.hash
>  create mode 100644 package/ragel/ragel.mk
> 
> diff --git a/package/ragel/ragel.hash b/package/ragel/ragel.hash
> new file mode 100644
> index 0000000000..332f587432
> --- /dev/null
> +++ b/package/ragel/ragel.hash
> @@ -0,0 +1,3 @@
> +# Locally computed:
> +sha256  5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f  ragel-6.10.tar.gz
> +sha256  05a87975accb539399d0c8a4f4402ac27a6762fb1e4f31d04d455a8bee3e3693  COPYING
> diff --git a/package/ragel/ragel.mk b/package/ragel/ragel.mk
> new file mode 100644
> index 0000000000..476aff5da4
> --- /dev/null
> +++ b/package/ragel/ragel.mk
> @@ -0,0 +1,18 @@
> +################################################################################
> +#
> +# ragel
> +#
> +################################################################################
> +
> +RAGEL_VERSION = 6.10
> +RAGEL_SITE = https://www.colm.net/files/ragel/
> +RAGEL_LICENSE = GPL-2.0
> +RAGEL_LICENSE_FILES = COPYING
> +RAGEL_CONF_OPTS = \
> +	--disable-silent-rules \
> +	--disable-manual \
> +	--disable-dependency-tracking
> +RAGEL_DEPENDENCIES =
> +HOST_RAGEL_DEPENDENCIES =

Useless setting of empty variables. Besides, RAGEL_DEPENDENCIES is not
even needed as this is a host-only package.

Applied to master after dropping those two variables, thanks.

Regards,
Yann E. MORIN.

> +$(eval $(host-autotools-package))
> -- 
> 2.35.1
> 
> _______________________________________________
> 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] 6+ messages in thread

* Re: [Buildroot] [PATCH 1/3] package/ragel: new package
  2022-04-20 20:57 ` [Buildroot] [PATCH 1/3] package/ragel: new package Yann E. MORIN
@ 2022-04-20 21:07   ` Yann E. MORIN
  0 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2022-04-20 21:07 UTC (permalink / raw)
  To: Théo Lebrun; +Cc: James Hilliard, Thomas Petazzoni, buildroot

Théo, All,

On 2022-04-20 22:57 +0200, Yann E. MORIN spake thusly:
> On 2022-03-10 16:20 +0100, Théo Lebrun via buildroot spake thusly:
> > This is an host-only package that does preprocessing to .rl files to
> > turn them into .c or .cpp files.
[--SNIP--]
> > +RAGEL_VERSION = 6.10
> > +RAGEL_SITE = https://www.colm.net/files/ragel/
> > +RAGEL_LICENSE = GPL-2.0
> > +RAGEL_LICENSE_FILES = COPYING
> > +RAGEL_CONF_OPTS = \
> > +	--disable-silent-rules \
> > +	--disable-manual \
> > +	--disable-dependency-tracking

Gah, I forgot to comment about those before pushing and sending the
previous mail...

So, why were --disable-silent-rules and --disable-dependency-tracking
needed? Usually, they are not needed, and we do not even set them in our
autotools-package infra.

If they are really important, could you please send a followup that adds
a comment above RAGEL_CONF_OPTS? And if they are not needed, can you
send a followup patch that removes them?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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] 6+ messages in thread

* Re: [Buildroot] [PATCH 2/3] package/roc: new package
  2022-03-10 15:20 ` [Buildroot] [PATCH 2/3] package/roc: " Théo Lebrun via buildroot
@ 2022-04-20 21:28   ` Yann E. MORIN
  0 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2022-04-20 21:28 UTC (permalink / raw)
  To: Théo Lebrun; +Cc: James Hilliard, Thomas Petazzoni, buildroot

Théo, All,

On 2022-03-10 16:20 +0100, Théo Lebrun via buildroot spake thusly:
> Roc is a toolkit for real-time audio streaming over the network.
> https://roc-streaming.org/
> 
> Goal: optional dependency to PipeWire.
> Requires host-ragel to build.
> 
> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
> ---
[--SNIP--]
> diff --git a/package/roc/0001-fix-build-that-used-removed-functionality.patch b/package/roc/0001-fix-build-that-used-removed-functionality.patch
> new file mode 100644
> index 0000000000..50147905c8
> --- /dev/null
> +++ b/package/roc/0001-fix-build-that-used-removed-functionality.patch
> @@ -0,0 +1,28 @@
> +build: fix build that used removed functionality
> +
> +The SConstruct file used the "SourceCode()" method that was removed in
> +SCons 4.0.0, after being deprecated in 2.0.0.
> +
> +This was fixed upstream but is not in the latest release yet.
> +https://github.com/roc-streaming/roc-toolkit/commit/abdfbb94df98fe88be4dd92ca587500126558411

Then please just backport that upstream commit (git format-patch, then
add your SoB line).

[--SNIP--]
> diff --git a/package/roc/Config.in b/package/roc/Config.in
> new file mode 100644
> index 0000000000..3fd74cab3f
> --- /dev/null
> +++ b/package/roc/Config.in
> @@ -0,0 +1,28 @@
> +comment "ROC needs a toolchain w/ shared libraries, C++, NPTL"
> +	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP || \
> +		!BR2_TOOLCHAIN_HAS_THREADS_NPTL
> +	depends on BR2_USE_MMU
> +	depends on BR2_TOOLCHAIN_HAS_SYNC_4
> +
> +config BR2_PACKAGE_ROC
> +	bool "roc"
> +	# depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_1

Drop commented-out dependency.

> +	depends on !BR2_STATIC_LIBS
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
> +	depends on BR2_USE_MMU # libuv
> +	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv

Depenencies order are:
  - arch dependencies
  - toolchain dependencies
  - package dependencies

https://buildroot.org/downloads/manual/manual.html#_config_files

> +	select BR2_PACKAGE_HOST_PYTHON3
> +	select BR2_PACKAGE_HOST_PYTHON3_SSL
> +	select BR2_PACKAGE_LIBUV
> +	help
> +	  Roc is a toolkit for real-time audio streaming over the
> +	  network.
> +
> +	  https://roc-streaming.org/
> +
> +if BR2_PACKAGE_ROC

Empty line after an if (not a written rule, but it's more readable).

> +config BR2_PACKAGE_ROC_TOOLS
> +	bool "build roc-{conv,recv,send} tools"
> +	default y

We sually shy away from 'default y', unless there is a good reason,
which thus needs to be explained in the commit log.

Empty line before an endif (ditto).

[--SNIP--]
> diff --git a/package/roc/roc.mk b/package/roc/roc.mk
> new file mode 100644
> index 0000000000..90d226ffbd
> --- /dev/null
> +++ b/package/roc/roc.mk
> @@ -0,0 +1,75 @@
> +################################################################################
> +#
> +# roc
> +#
> +################################################################################
> +
> +ROC_VERSION = v0.1.5
> +ROC_SITE = $(call github,roc-streaming,roc-toolkit,$(ROC_VERSION))
> +ROC_LICENSE = MPL-2.0
> +ROC_LICENSE_FILES = LICENSE
> +ROC_INSTALL_STAGING = YES
> +ROC_DEPENDENCIES = \
> +	host-gengetopt \
> +	host-pkgconf \
> +	host-ragel \
> +	host-scons \
> +	libuv
> +
> +ROC_SCONS_OPTS = \
> +	--disable-tests \
> +	--disable-examples \
> +	--disable-doc \
> +	--disable-libunwind \
> +	--build-3rdparty=openfec

> +# We are not building OpenFEC ourselves as they are using a forked version. See
> +# the following note in the documentation:
> +# https://github.com/roc-streaming/roc-toolkit/blob/c89687330bfce6f4dce79826f7a235b581f2b49d/docs/sphinx/building/dependencies.rst

This must be explained in the commit log.

But why can't we use openfec as a separate package, using the roc fork?
The original OpenFEC has not been updated sine 2014: http://openfec.org/
The fork is not in a much better shape, not having been updated since
2019: https://github.com/roc-streaming/openfec

So, I would think it would be OK to package the roc fork of OpenFEC,
rather than use the bundled version.

Also, using --build-3rdparty means the download is done at configure
time (or even at build time), but we try to be able to build without
network; the following is expected to work:

    $ make source
    [unplug network]
    $ make

but --build-3rdparty will make that faile, AFAICS.

> +# The shared library is enabled by default. --enable-lib does not exist.
> +ifneq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)

Why not use positive logic;

    ifeq ($(BR2_STATIC_LIBS),y)

> +ROC_SCONS_OPTS += --disable-lib
> +endif
> +
> +ifeq ($(BR2_PACKAGE_ROC_TOOLS),y)
> +
> +# Tools are enabled by default. --enable-tools does not exist.
> +
> +# SoX and Pulseaudio support is only used for tools or examples, which is why
> +# their support is inside the TOOLS condition.

Are examples built by default? If yes, can we disable them? If yes,
should we do that unconditionally, or add an option (I'd vote against
the option)?

> +ifeq ($(BR2_PACKAGE_SOX),y)
> +ROC_DEPENDENCIES += sox
> +else
> +ROC_SCONS_OPTS += --disable-sox
> +endif
> +
> +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
> +ROC_DEPENDENCIES += pulseaudio
> +else
> +ROC_SCONS_OPTS += --disable-pulseaudio
> +endif
> +
> +else
> +ROC_SCONS_OPTS += --disable-tools
> +endif
> +
> +define ROC_BUILD_CMDS
> +	(cd $(@D); \

Enclosing the build commands in parentheses is useless; it just spawns
an extra shell for nothing. Ditto for all _CMDS below, of course.

> +	$(TARGET_CONFIGURE_OPTS) CROSS=$(TARGET_CROSS) \
> +		$(SCONS) $(ROC_SCONS_OPTS))
> +endef
> +
> +define ROC_INSTALL_STAGING_CMDS
> +	(cd $(@D); \
> +	$(TARGET_CONFIGURE_OPTS) CROSS=$(TARGET_CROSS) \
> +		$(SCONS) $(ROC_SCONS_OPTS) --prefix="$(STAGING_DIR)/usr" install)
> +endef
> +
> +define ROC_INSTALL_TARGET_CMDS
> +	(cd $(@D); \
> +	$(TARGET_CONFIGURE_OPTS) CROSS=$(TARGET_CROSS) \
> +		$(SCONS) $(ROC_SCONS_OPTS) --prefix="$(TARGET_DIR)/usr" install)
> +endef
> +
> +$(eval $(generic-package))
> -- 
> 2.35.1
> 
> _______________________________________________
> 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] 6+ messages in thread

end of thread, other threads:[~2022-04-20 21:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10 15:20 [Buildroot] [PATCH 1/3] package/ragel: new package Théo Lebrun via buildroot
2022-03-10 15:20 ` [Buildroot] [PATCH 2/3] package/roc: " Théo Lebrun via buildroot
2022-04-20 21:28   ` Yann E. MORIN
2022-03-10 15:20 ` [Buildroot] [PATCH 3/3] package/pipewire: add optional roc Théo Lebrun via buildroot
2022-04-20 20:57 ` [Buildroot] [PATCH 1/3] package/ragel: new package Yann E. MORIN
2022-04-20 21:07   ` Yann E. MORIN

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.