All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4 1/3] package/bcg729: new package
@ 2017-10-06 20:28 Bernd Kuhls
  2017-10-06 20:28 ` [Buildroot] [PATCH v4 2/3] package/freeswitch-mod-bcg729: " Bernd Kuhls
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bernd Kuhls @ 2017-10-06 20:28 UTC (permalink / raw)
  To: buildroot

Quoting http://www.linphone.org/technical-corner/bcg729/downloads
regarding patent information:

"ITU G729 Annex A/B were offically released October/November 1996
(https://www.itu.int/rec/T-REC-G.729), hence all patents covering these
specifications shall have expired in November 2016.

Patent pool administrator confirmed most licensed patents under the
G.729 Consortium have expired (http://www.sipro.com/G729.html)."

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: renamed package to bcg729 (Arnout), added license hash
v3: bumped to version 1.0.4, switched to cmake
v2: no changes

 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/bcg729/Config.in   |  7 +++++++
 package/bcg729/bcg729.hash |  3 +++
 package/bcg729/bcg729.mk   | 21 +++++++++++++++++++++
 5 files changed, 33 insertions(+)
 create mode 100644 package/bcg729/Config.in
 create mode 100644 package/bcg729/bcg729.hash
 create mode 100644 package/bcg729/bcg729.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 43ad9e5f8a..a031f31ec9 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -197,6 +197,7 @@ F:	package/alsa-utils/
 F:	package/apache/
 F:	package/apr/
 F:	package/apr-util/
+F:	package/bcg729/
 F:	package/bluez-tools/
 F:	package/clamav/
 F:	package/dovecot/
diff --git a/package/Config.in b/package/Config.in
index 36b42d24f1..0a3675a566 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -946,6 +946,7 @@ menu "Audio/Sound"
 	source "package/alsa-lib/Config.in"
 	source "package/aubio/Config.in"
 	source "package/audiofile/Config.in"
+	source "package/bcg729/Config.in"
 	source "package/celt051/Config.in"
 	source "package/fdk-aac/Config.in"
 	source "package/libao/Config.in"
diff --git a/package/bcg729/Config.in b/package/bcg729/Config.in
new file mode 100644
index 0000000000..8e9bcfe66b
--- /dev/null
+++ b/package/bcg729/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_BCG729
+	bool "bcg729"
+	help
+	  Bcg729 is an opensource implementation of both encoder and
+	  decoder of the ITU G729 Annex A/B speech codec.
+
+	  http://www.linphone.org/technical-corner/bcg729/overview
diff --git a/package/bcg729/bcg729.hash b/package/bcg729/bcg729.hash
new file mode 100644
index 0000000000..4dbfbbbbb2
--- /dev/null
+++ b/package/bcg729/bcg729.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 94b3542a06cbd96306efc19f959f9febae62806a22599063f82a8c33e989d48b  bcg729-1.0.4.tar.gz
+sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670  COPYING
diff --git a/package/bcg729/bcg729.mk b/package/bcg729/bcg729.mk
new file mode 100644
index 0000000000..426cfd90af
--- /dev/null
+++ b/package/bcg729/bcg729.mk
@@ -0,0 +1,21 @@
+################################################################################
+#
+# bcg729
+#
+################################################################################
+
+BCG729_VERSION = 1.0.4
+BCG729_SITE = $(call github,BelledonneCommunications,bcg729,$(BCG729_VERSION))
+BCG729_LICENSE = GPL-2.0+
+BCG729_LICENSE_FILES = COPYING
+BCG729_INSTALL_STAGING = YES
+
+ifeq ($(BR2_STATIC_LIBS),y)
+BCG729_CONF_OPTS += -DENABLE_SHARED=OFF -DENABLE_STATIC=ON
+else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
+BCG729_CONF_OPTS += -DENABLE_SHARED=ON -DENABLE_STATIC=ON
+else ifeq ($(BR2_SHARED_LIBS),y)
+BCG729_CONF_OPTS += -DENABLE_SHARED=ON -DENABLE_STATIC=OFF
+endif
+
+$(eval $(cmake-package))
-- 
2.11.0

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

* [Buildroot] [PATCH v4 2/3] package/freeswitch-mod-bcg729: new package
  2017-10-06 20:28 [Buildroot] [PATCH v4 1/3] package/bcg729: new package Bernd Kuhls
@ 2017-10-06 20:28 ` Bernd Kuhls
  2017-10-08 21:15   ` Thomas Petazzoni
  2017-10-06 20:28 ` [Buildroot] [PATCH v4 3/3] package/freeswitch: Use mod_g729 only when freeswitch-mod-bcg729 is disabled Bernd Kuhls
  2017-10-08 21:13 ` [Buildroot] [PATCH v4 1/3] package/bcg729: new package Thomas Petazzoni
  2 siblings, 1 reply; 6+ messages in thread
From: Bernd Kuhls @ 2017-10-06 20:28 UTC (permalink / raw)
  To: buildroot

This package is based on the bcg729 library from Belledonne Communica-
tions which is wrapped into a freeswitch module to provide a native
G729.A codec.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: added dependency to !BR2_STATIC_LIBS (Arnout), added license hash
v3: bumped to latest version
v2: renamed package from freeswitch_mod_bcg729 to freeswitch-mod-bcg729
    (Thomas)

 DEVELOPERS                                         |  1 +
 package/Config.in                                  |  1 +
 package/freeswitch-mod-bcg729/Config.in            | 10 ++++++++
 .../freeswitch-mod-bcg729.hash                     |  3 +++
 .../freeswitch-mod-bcg729/freeswitch-mod-bcg729.mk | 30 ++++++++++++++++++++++
 5 files changed, 45 insertions(+)
 create mode 100644 package/freeswitch-mod-bcg729/Config.in
 create mode 100644 package/freeswitch-mod-bcg729/freeswitch-mod-bcg729.hash
 create mode 100644 package/freeswitch-mod-bcg729/freeswitch-mod-bcg729.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index a031f31ec9..69fa2e56bf 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -207,6 +207,7 @@ F:	package/eudev/
 F:	package/exim/
 F:	package/fetchmail/
 F:	package/freeswitch/
+F:	package/freeswitch-mod-bcg729/
 F:	package/ffmpeg/
 F:	package/ghostscript/
 F:	package/giflib/
diff --git a/package/Config.in b/package/Config.in
index 0a3675a566..5f7768e37b 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1638,6 +1638,7 @@ menu "Networking applications"
 	source "package/fmc/Config.in"
 	source "package/fping/Config.in"
 	source "package/freeswitch/Config.in"
+	source "package/freeswitch-mod-bcg729/Config.in"
 	source "package/gesftpserver/Config.in"
 	source "package/gupnp-tools/Config.in"
 	source "package/gutenprint/Config.in"
diff --git a/package/freeswitch-mod-bcg729/Config.in b/package/freeswitch-mod-bcg729/Config.in
new file mode 100644
index 0000000000..e75e2acbc0
--- /dev/null
+++ b/package/freeswitch-mod-bcg729/Config.in
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_FREESWITCH_MOD_BCG729
+	bool "freeswitch-mod-bcg729"
+	depends on BR2_PACKAGE_FREESWITCH
+	depends on !BR2_STATIC_LIBS # freeswitch
+	select BR2_PACKAGE_BCG729
+	help
+	  FreeSWITCH G.729A module using the opensource bcg729
+	  implementation by Belledonne Communications.
+
+	  https://github.com/xadhoom/mod_bcg729
diff --git a/package/freeswitch-mod-bcg729/freeswitch-mod-bcg729.hash b/package/freeswitch-mod-bcg729/freeswitch-mod-bcg729.hash
new file mode 100644
index 0000000000..67804883bc
--- /dev/null
+++ b/package/freeswitch-mod-bcg729/freeswitch-mod-bcg729.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 135f545ad0eef49d1228f8d66a4e66f1ff5f1f8fdf115e88c1df3df8df49fdcb  freeswitch-mod-bcg729-c504eea91f225014380ae17c00b35e7173e316ad.tar.gz
+sha256 bb4680b13c3190429464a8308a07d7d891e6454349fb7be856e02405b25b1195  LICENSE
diff --git a/package/freeswitch-mod-bcg729/freeswitch-mod-bcg729.mk b/package/freeswitch-mod-bcg729/freeswitch-mod-bcg729.mk
new file mode 100644
index 0000000000..15f9375f2b
--- /dev/null
+++ b/package/freeswitch-mod-bcg729/freeswitch-mod-bcg729.mk
@@ -0,0 +1,30 @@
+################################################################################
+#
+# freeswitch-mod-bcg729
+#
+################################################################################
+
+FREESWITCH_MOD_BCG729_VERSION = c504eea91f225014380ae17c00b35e7173e316ad
+FREESWITCH_MOD_BCG729_SITE = $(call github,xadhoom,mod_bcg729,$(FREESWITCH_MOD_BCG729_VERSION))
+FREESWITCH_MOD_BCG729_LICENSE = MPL-1.1
+FREESWITCH_MOD_BCG729_LICENSE_FILES = LICENSE
+FREESWITCH_MOD_BCG729_DEPENDENCIES = freeswitch bcg729
+
+# instead of patching the not cross-compile friendly Makefile from
+# upstream we issue the necessary build commands ourselves
+define FREESWITCH_MOD_BCG729_BUILD_CMDS
+	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
+		-I$(STAGING_DIR)/usr/include/freeswitch \
+		-fPIC -fomit-frame-pointer -fno-exceptions \
+		-c $(@D)/mod_bcg729.c -o $(@D)/mod_bcg729.o
+	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
+		-fPIC -fomit-frame-pointer -fno-exceptions \
+		-shared -Xlinker -x -lm -lbcg729 -Wl,-Bdynamic \
+		-o $(@D)/mod_bcg729.so $(@D)/mod_bcg729.o
+endef
+
+define FREESWITCH_MOD_BCG729_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 $(@D)/mod_bcg729.so $(TARGET_DIR)/usr/lib/freeswitch/mod/mod_bcg729.so
+endef
+
+$(eval $(generic-package))
-- 
2.11.0

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

* [Buildroot] [PATCH v4 3/3] package/freeswitch: Use mod_g729 only when freeswitch-mod-bcg729 is disabled
  2017-10-06 20:28 [Buildroot] [PATCH v4 1/3] package/bcg729: new package Bernd Kuhls
  2017-10-06 20:28 ` [Buildroot] [PATCH v4 2/3] package/freeswitch-mod-bcg729: " Bernd Kuhls
@ 2017-10-06 20:28 ` Bernd Kuhls
  2017-10-08 21:15   ` Thomas Petazzoni
  2017-10-08 21:13 ` [Buildroot] [PATCH v4 1/3] package/bcg729: new package Thomas Petazzoni
  2 siblings, 1 reply; 6+ messages in thread
From: Bernd Kuhls @ 2017-10-06 20:28 UTC (permalink / raw)
  To: buildroot

mod_g729 contained in freeswitch source provides pass-through:
https://freeswitch.org/confluence/display/FREESWITCH/mod_g729

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v4: added comment (Arnout)
v3: no changes
v2: no changes

 package/freeswitch/freeswitch.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/freeswitch/freeswitch.mk b/package/freeswitch/freeswitch.mk
index ce22ffc28f..defa00f47a 100644
--- a/package/freeswitch/freeswitch.mk
+++ b/package/freeswitch/freeswitch.mk
@@ -116,7 +116,6 @@ FREESWITCH_ENABLED_MODULES += \
 	applications/mod_valet_parking \
 	applications/mod_voicemail \
 	codecs/mod_g723_1 \
-	codecs/mod_g729 \
 	dialplans/mod_dialplan_asterisk \
 	dialplans/mod_dialplan_xml \
 	endpoints/mod_loopback \
@@ -175,6 +174,12 @@ FREESWITCH_DEPENDENCIES += alsa-lib
 FREESWITCH_ENABLED_MODULES += endpoints/mod_alsa
 endif
 
+# Use the pass-through g729 module provided by freeswitch instead of
+# the external mod_bcg729 provided by freeswitch-mod-bcg729.
+ifeq ($(BR2_PACKAGE_FREESWITCH_MOD_BCG729),)
+FREESWITCH_ENABLED_MODULES += codecs/mod_g729
+endif
+
 ifeq ($(BR2_PACKAGE_FREETYPE),y)
 FREESWITCH_DEPENDENCIES += freetype
 endif
-- 
2.11.0

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

* [Buildroot] [PATCH v4 1/3] package/bcg729: new package
  2017-10-06 20:28 [Buildroot] [PATCH v4 1/3] package/bcg729: new package Bernd Kuhls
  2017-10-06 20:28 ` [Buildroot] [PATCH v4 2/3] package/freeswitch-mod-bcg729: " Bernd Kuhls
  2017-10-06 20:28 ` [Buildroot] [PATCH v4 3/3] package/freeswitch: Use mod_g729 only when freeswitch-mod-bcg729 is disabled Bernd Kuhls
@ 2017-10-08 21:13 ` Thomas Petazzoni
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2017-10-08 21:13 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri,  6 Oct 2017 22:28:27 +0200, Bernd Kuhls wrote:
> Quoting http://www.linphone.org/technical-corner/bcg729/downloads
> regarding patent information:
> 
> "ITU G729 Annex A/B were offically released October/November 1996
> (https://www.itu.int/rec/T-REC-G.729), hence all patents covering these
> specifications shall have expired in November 2016.
> 
> Patent pool administrator confirmed most licensed patents under the
> G.729 Consortium have expired (http://www.sipro.com/G729.html)."
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
> v4: renamed package to bcg729 (Arnout), added license hash
> v3: bumped to version 1.0.4, switched to cmake
> v2: no changes

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v4 2/3] package/freeswitch-mod-bcg729: new package
  2017-10-06 20:28 ` [Buildroot] [PATCH v4 2/3] package/freeswitch-mod-bcg729: " Bernd Kuhls
@ 2017-10-08 21:15   ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2017-10-08 21:15 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri,  6 Oct 2017 22:28:28 +0200, Bernd Kuhls wrote:
> This package is based on the bcg729 library from Belledonne Communica-
> tions which is wrapped into a freeswitch module to provide a native
> G729.A codec.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
> v4: added dependency to !BR2_STATIC_LIBS (Arnout), added license hash
> v3: bumped to latest version
> v2: renamed package from freeswitch_mod_bcg729 to freeswitch-mod-bcg729
>     (Thomas)

Do be honest, I am not a big fan of the compile commands inside
Buildroot's .mk file. Wouldn't it be possible to patch the package
build system and get the patches merged upstream, if there is an active
upstream of course?

That being said, since there has been prior discussion with Arnout on
this, I'll assume the pros/cons have been weighted, so I've applied.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v4 3/3] package/freeswitch: Use mod_g729 only when freeswitch-mod-bcg729 is disabled
  2017-10-06 20:28 ` [Buildroot] [PATCH v4 3/3] package/freeswitch: Use mod_g729 only when freeswitch-mod-bcg729 is disabled Bernd Kuhls
@ 2017-10-08 21:15   ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2017-10-08 21:15 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri,  6 Oct 2017 22:28:29 +0200, Bernd Kuhls wrote:
> mod_g729 contained in freeswitch source provides pass-through:
> https://freeswitch.org/confluence/display/FREESWITCH/mod_g729
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v4: added comment (Arnout)
> v3: no changes
> v2: no changes

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2017-10-08 21:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-06 20:28 [Buildroot] [PATCH v4 1/3] package/bcg729: new package Bernd Kuhls
2017-10-06 20:28 ` [Buildroot] [PATCH v4 2/3] package/freeswitch-mod-bcg729: " Bernd Kuhls
2017-10-08 21:15   ` Thomas Petazzoni
2017-10-06 20:28 ` [Buildroot] [PATCH v4 3/3] package/freeswitch: Use mod_g729 only when freeswitch-mod-bcg729 is disabled Bernd Kuhls
2017-10-08 21:15   ` Thomas Petazzoni
2017-10-08 21:13 ` [Buildroot] [PATCH v4 1/3] package/bcg729: new package Thomas Petazzoni

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.