Skip to contentSkip to conversation

New library packages for upcoming Asterisk package

PATCH Superseded Bernd Kuhls 2 participants 12 messages Apr 26, 2015

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover New library packages for upcoming Asterisk package

Hi,

these three new packages are needed by an upcoming Asterisk package to be released sometime this year.

I know Asterisk was removed from buildroot on Feb 9th, 2010. Due to the fact that my telephony provider will forcefully change my contract to VOIP in the future I need some kind of solution...

Regards, Bernd

Bernd Kuhls (3):
package/libgsm: new package
package/libpjsip: new package
package/libspandsp: new package

Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/3 package/libgsm: new package

---
 package/Config.in               |    1 +
 package/libgsm/0001-cross.patch |  205 +++++++++++++++++++++++++++++++++++++++
 package/libgsm/Config.in        |    6 ++
 package/libgsm/libgsm.mk        |   33 +++++++
 4 files changed, 245 insertions(+)
 create mode 100644 package/libgsm/0001-cross.patch
 create mode 100644 package/libgsm/Config.in
 create mode 100644 package/libgsm/libgsm.mk
package/Config.in +1 -0
index da185be..744ebc6 100644
@@ -670,6 +670,7 @@ menu "Audio/Sound"
 	source "package/libcdio/Config.in"
 	source "package/libcue/Config.in"
 	source "package/libcuefile/Config.in"
+	source "package/libgsm/Config.in"
 	source "package/libid3tag/Config.in"
 	source "package/liblo/Config.in"
 	source "package/libmad/Config.in"
package/libgsm/0001-cross.patch new file +205 -0

205 lines not on this page · raw message

package/libgsm/Config.in new file +6 -0
new file mode 100644
index 0000000..da6e22f
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_LIBGSM
+	bool "libgsm"
+	help
+	  Shared libraries for GSM 06.10 lossy speech compression.
+
+	  http://www.quut.com/gsm
package/libgsm/libgsm.mk new file +33 -0
new file mode 100644
index 0000000..e272e7c
@@ -0,0 +1,33 @@
+################################################################################
+#
+# libgsm
+#
+################################################################################
+
+LIBGSM_VERSION = 1.0.14
+LIBGSM_SOURCE = gsm-$(LIBGSM_VERSION).tar.gz
+LIBGSM_SITE = http://www.quut.com/gsm
+LIBGSM_INSTALL_STAGING = YES
+
+define LIBGSM_BUILD_CMDS
+	cd $(@D) && $(TARGET_MAKE_ENV) $(MAKE) CC=$(TARGET_CC) -C $(@D)
+endef
+
+# install targets are not safe for parallel jobs
+define LIBGSM_INSTALL_STAGING_CMDS
+	cd $(@D) && $(TARGET_MAKE_ENV) $(MAKE1) CC=$(TARGET_CC) -C $(@D) \
+		INSTALL_ROOT=$(STAGING_DIR)/usr \
+		GSM_INSTALL_INC=$(STAGING_DIR)/usr/include \
+		install
+endef
+
+define LIBGSM_INSTALL_TARGET_CMDS
+	cd $(@D) && $(TARGET_MAKE_ENV) $(MAKE1) CC=$(TARGET_CC) -C $(@D) \
+		INSTALL_ROOT=$(TARGET_DIR)/usr \
+		GSM_INSTALL_INC=$(TARGET_DIR)/usr/include \
+		GSM_INSTALL_MAN=$(TARGET_DIR)/usr/share/man/man3 \
+		TOAST_INSTALL_MAN=$(TARGET_DIR)/usr/share/man/man1 \
+		install
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 1/3 package/libgsm: new package

Dear Bernd Kuhls,

Quoted 6 lines · Bernd Kuhls
package/libgsm/libgsm.mk new file +0 -0
new file mode 100644
index 0000000..e272e7c

package/libgsm/libgsm.mk line 10

Quoted 10 lines
package/libgsm/libgsm.mk new file +10 -0
@@ -0,0 +1,33 @@
+################################################################################
+#
+# libgsm
+#
+################################################################################
+
+LIBGSM_VERSION = 1.0.14
+LIBGSM_SOURCE = gsm-$(LIBGSM_VERSION).tar.gz
+LIBGSM_SITE = http://www.quut.com/gsm
+LIBGSM_INSTALL_STAGING = YES

License + license file?

package/libgsm/libgsm.mk line 13

Quoted 2 lines
package/libgsm/libgsm.mk new file +2 -0
+define LIBGSM_BUILD_CMDS
+	cd $(@D) && $(TARGET_MAKE_ENV) $(MAKE) CC=$(TARGET_CC) -C $(@D)

Do need for cd $(@D) when you do -C $(@D). Ditto for the commands below.

Also, please try to use $(TARGET_CONFIGURE_OPTS) instead of just CC=$(TARGET_CC).

Quoted 6 lines
package/libgsm/libgsm.mk new file +6 -0
+endef
+
+# install targets are not safe for parallel jobs
+define LIBGSM_INSTALL_STAGING_CMDS
+	cd $(@D) && $(TARGET_MAKE_ENV) $(MAKE1) CC=$(TARGET_CC) -C $(@D) \
+		INSTALL_ROOT=$(STAGING_DIR)/usr \

package/libgsm/libgsm.mk line 29

Quoted 10 lines
package/libgsm/libgsm.mk new file +10 -0
+		GSM_INSTALL_INC=$(STAGING_DIR)/usr/include \
+		install
+endef
+
+define LIBGSM_INSTALL_TARGET_CMDS
+	cd $(@D) && $(TARGET_MAKE_ENV) $(MAKE1) CC=$(TARGET_CC) -C $(@D) \
+		INSTALL_ROOT=$(TARGET_DIR)/usr \
+		GSM_INSTALL_INC=$(TARGET_DIR)/usr/include \
+		GSM_INSTALL_MAN=$(TARGET_DIR)/usr/share/man/man3 \
+		TOAST_INSTALL_MAN=$(TARGET_DIR)/usr/share/man/man1 \

Where are the manpages going in the case of the staging installation?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/3 package/libgsm: new package

Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20150426191104.1dafb792 at free-electrons.com:

Quoted 1 line

License + license file?

Hi,

I will add

LIBGSM_LICENSE_FILES = COPYRIGHT

but how should I describe the license itself for
LIBGSM_LICENSE = ?

Regards, Bernd

#4 lore raw

PATCH 1/3 package/libgsm: new package

In reply to Thomas Petazzoni

Hi Thomas,

Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20150426191104.1dafb792 at free-electrons.com:

Quoted 4 lines

package/libgsm/libgsm.mk line 13

Quoted 2 lines
package/libgsm/libgsm.mk new file +2 -0
+define LIBGSM_BUILD_CMDS
+     cd $(@D) && $(TARGET_MAKE_ENV) $(MAKE) CC=$(TARGET_CC) -C $(@D)

Do need for cd $(@D) when you do -C $(@D). Ditto for the commands below.

no, I removed it, thanks for the hint, the libgsm Makefile is a nasty bit of code...

Quoted 2 lines

Also, please try to use $(TARGET_CONFIGURE_OPTS) instead of just CC=$(TARGET_CC).

This breaks compilation:

make: Entering directory `/home/fli4l/br4/output/build/libgsm-1.0.14' /home/fli4l/br4/output/host/usr/bin/i586-buildroot-linux-uclibc-gcc -
D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os
src/add.c
src/add.c:16:21: fatal error: private.h: No such file or directory

 #include "private.h"
                     ^

compilation terminated.
make: *** [src/add.o] Error 1
make: Leaving directory `/home/fli4l/br4/output/build/libgsm-1.0.14'

Quoted 1 line

Where are the manpages going in the case of the staging installation?

I added some code for them.

Regards, Bernd

#5 lore raw

PATCH 2/3 package/libpjsip: new package

In reply to Bernd Kuhls
---
 package/Config.in                         |    1 +
 package/libpjsip/0001-disable-tests.patch |   12 +++++++
 package/libpjsip/Config.in                |   14 +++++++++
 package/libpjsip/libpjsip.hash            |    2 ++
 package/libpjsip/libpjsip.mk              |   49 +++++++++++++++++++++++++++++
 5 files changed, 78 insertions(+)
 create mode 100644 package/libpjsip/0001-disable-tests.patch
 create mode 100644 package/libpjsip/Config.in
 create mode 100644 package/libpjsip/libpjsip.hash
 create mode 100644 package/libpjsip/libpjsip.mk
package/Config.in +1 -0
index 744ebc6..2a06a3d 100644
@@ -961,6 +961,7 @@ menu "Networking"
 	source "package/liboping/Config.in"
 	source "package/libosip2/Config.in"
 	source "package/libpcap/Config.in"
+	source "package/libpjsip/Config.in"
 	source "package/librsync/Config.in"
 	source "package/libshairplay/Config.in"
 	source "package/libshout/Config.in"
package/libpjsip/0001-disable-tests.patch new file +12 -0
new file mode 100644
index 0000000..3b140ed
@@ -0,0 +1,12 @@
+diff -uNr pjproject-2.3.org/pjlib/build/Makefile pjproject-2.3/pjlib/build/Makefile
+--- pjproject-2.3.org/pjlib/build/Makefile	2014-02-04 08:39:55.000000000 +0100
++++ pjproject-2.3/pjlib/build/Makefile	2015-03-01 18:34:13.432524074 +0100
+@@ -66,7 +66,7 @@
+ # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
+ #
+ 
+-all: $(TARGETS) $(TARGETS_EXE)
++all: $(TARGETS)
+ 
+ lib: $(TARGETS)
+ 
package/libpjsip/Config.in new file +14 -0
new file mode 100644
index 0000000..2f5fdd2
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_LIBPJSIP
+	bool "libpjsip"
+	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_LIBGSM
+	select BR2_PACKAGE_LIBSRTP
+	help
+	  PJSIP is a free and open source multimedia communication
+	  library written in C language implementing standard based
+	  protocols such as: SIP, SDP, RTP, STUN, TURN, and ICE.
+
+	  http://www.pjsip.org
+
+comment "libpjsip needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
package/libpjsip/libpjsip.hash new file +2 -0
new file mode 100644
index 0000000..c647ac4
@@ -0,0 +1,2 @@
+# From http://www.pjsip.org/release/2.4/MD5SUM.TXT
+md5	39629ca3fcedbdc7dbd8c5a707060095	pjproject-2.4.tar.bz2
package/libpjsip/libpjsip.mk new file +49 -0

49 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#6 lore raw

PATCH 2/3 package/libpjsip: new package

Dear Bernd Kuhls,

package/libpjsip/0001-disable-tests.patch

Quoted 6 lines · Bernd Kuhls
package/libpjsip/0001-disable-tests.patch new file +0 -0
new file mode 100644
index 0000000..3b140ed
@@ -0,0 +1,12 @@

Missing patch description + SoB.

Quoted 6 lines
package/libpjsip/libpjsip.mk new file +0 -0
new file mode 100644
index 0000000..8f445e6

package/libpjsip/libpjsip.mk line 10

Quoted 10 lines
package/libpjsip/libpjsip.mk new file +10 -0
@@ -0,0 +1,49 @@
+################################################################################
+#
+# libpjsip
+#
+################################################################################
+
+LIBPJSIP_VERSION = 2.4
+LIBPJSIP_SOURCE = pjproject-$(LIBPJSIP_VERSION).tar.bz2
+LIBPJSIP_SITE = http://www.pjsip.org/release/$(LIBPJSIP_VERSION)
+LIBPJSIP_INSTALL_STAGING = YES

License + license files?

Quoted 9 lines
package/libpjsip/libpjsip.mk new file +9 -0
+
+LIBPJSIP_DEPENDENCIES = libgsm libsrtp
+
+LIBPJSIP_CONF_ENV = \
+	LD="$(TARGET_CC)" \
+	CFLAGS="$(TARGET_CFLAGS) -DPJ_HAS_IPV6=1"
+
+LIBPJSIP_CONF_OPTS = \
+	--with-external-gsm \

package/libpjsip/libpjsip.mk line 29

Quoted 10 lines
package/libpjsip/libpjsip.mk new file +10 -0
+	--with-external-srtp \
+	--disable-sound \
+	--disable-resample \
+	--disable-video \
+	--disable-opencore-amr
+
+ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
+LIBPJSIP_CONF_OPTS += --with-external-pa
+LIBPJSIP_DEPENDENCIES += portaudio
+endif

Can you add a 'else' clause to explicitly disable portaudio support?

Quoted 7 lines
package/libpjsip/libpjsip.mk new file +7 -0
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+LIBPJSIP_DEPENDENCIES += openssl
+LIBPJSIP_CONF_OPTS += --with-ssl=$(STAGING_DIR)/usr
+else
+LIBPJSIP_CONF_OPTS += --disable-ssl
+endif

package/libpjsip/libpjsip.mk line 46

Quoted 10 lines
package/libpjsip/libpjsip.mk new file +10 -0
+
+ifeq ($(BR2_PACKAGE_SPEEX),y)
+LIBPJSIP_CONF_OPTS += --with-external-speex
+LIBPJSIP_DEPENDENCIES += speex
+else
+LIBPJSIP_CONF_OPTS += --disable-speex-codec --disable-speex-aec
+endif
+
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
+LIBPJSIP_DEPENDENCIES += util-linux

Any way to --enable/--disable this?

package/libpjsip/libpjsip.mk line 49

Quoted 3 lines
package/libpjsip/libpjsip.mk new file +3 -0
+endif
+
+$(eval $(autotools-package))

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

PATCH 2/3 package/libpjsip: new package

Hi Thomas,

v2 will contain the following changes:

Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20150426191246.5e1c5242 at free-electrons.com:

Quoted 4 lines

Review

Quoted 2 lines

+++ b/package/libpjsip/0001-disable-tests.patch

(quoted diff) +0 -0
@@ -0,0 +1,12 @@

Missing patch description + SoB.

I removed this patch because the test binaries require ipv6 support and I wanted to avoid that dependency. This is not necessary anymore :)

Quoted 1 line

License + license files?

Done.

Quoted 6 lines

package/libpjsip/libpjsip.mk line 29

Quoted 4 lines
package/libpjsip/libpjsip.mk new file +4 -0
+ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
+LIBPJSIP_CONF_OPTS += --with-external-pa
+LIBPJSIP_DEPENDENCIES += portaudio
+endif

Can you add a 'else' clause to explicitly disable portaudio support?

No, because otherwise pjsip will use its internal portaudio files in third_party/portaudio/. I changed portaudio to a hard dependency...

Quoted 4 lines

package/libpjsip/libpjsip.mk line 46

Quoted 2 lines
package/libpjsip/libpjsip.mk new file +2 -0
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
+LIBPJSIP_DEPENDENCIES += util-linux

Any way to --enable/--disable this?

No, since aconfigure.ac has no support for this:

AC_CHECK_LIB(uuid,uuid_generate) AC_CHECK_LIB(uuid,uuid_generate,[ac_has_uuid_lib=1])

Regards, Bernd

#8 lore raw

PATCH 3/3 package/libspandsp: new package

In reply to Bernd Kuhls
---
 package/Config.in                               |    1 +
 package/libspandsp/0001-fix-compiler-opts.patch |   23 +++++++++++++++++++++
 package/libspandsp/Config.in                    |    9 ++++++++
 package/libspandsp/libspandsp.hash              |    2 ++
 package/libspandsp/libspandsp.mk                |   25 +++++++++++++++++++++++
 5 files changed, 60 insertions(+)
 create mode 100644 package/libspandsp/0001-fix-compiler-opts.patch
 create mode 100644 package/libspandsp/Config.in
 create mode 100644 package/libspandsp/libspandsp.hash
 create mode 100644 package/libspandsp/libspandsp.mk
package/Config.in +1 -0
index 2a06a3d..d47b787 100644
@@ -682,6 +682,7 @@ menu "Audio/Sound"
 	source "package/libsidplay2/Config.in"
 	source "package/libsndfile/Config.in"
 	source "package/libsoxr/Config.in"
+	source "package/libspandsp/Config.in"
 	source "package/libvorbis/Config.in"
 	source "package/mp4v2/Config.in"
 	source "package/opencore-amr/Config.in"
package/libspandsp/0001-fix-compiler-opts.patch new file +23 -0
new file mode 100644
index 0000000..c3bd800
@@ -0,0 +1,23 @@
+Fix bfin compilation
+
+cc1: error: unrecognized command line option "-Wunused-but-set-variable"
+
+using this defconfig
+
+BR2_bfin=y
+BR2_PACKAGE_LIBSPANDSP=y
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+diff -uNr spandsp-0.0.6.org/configure.ac spandsp-0.0.6/configure.ac
+--- spandsp-0.0.6.org/configure.ac	2014-08-09 10:19:27.000000000 +0200
++++ spandsp-0.0.6/configure.ac	2015-04-25 17:46:27.717349873 +0200
+@@ -337,7 +337,7 @@
+ 
+ case "${ax_cv_c_compiler_vendor}" in
+ gnu)
+-    COMP_VENDOR_CFLAGS="-std=gnu99 -ffast-math -Wall -Wunused-variable -Wunused-but-set-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes $COMP_VENDOR_CFLAGS"
++    COMP_VENDOR_CFLAGS="-std=gnu99 -ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes $COMP_VENDOR_CFLAGS"
+     if test "$enable_neon" = "yes" ; then
+         COMP_VENDOR_CFLAGS="-mfpu=neon -mfloat-abi=hard $COMP_VENDOR_CFLAGS"
+     fi
package/libspandsp/Config.in new file +9 -0
new file mode 100644
index 0000000..9a22209
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LIBSPANDSP
+	bool "libspandsp"
+	select BR2_PACKAGE_TIFF
+	help
+	  Spandsp is a library of many DSP functions for telephony.
+	  These range from simple modules, such as DTMF detection, to a
+	  complete software FAX machine.
+
+	  http://www.soft-switch.org
package/libspandsp/libspandsp.hash new file +2 -0
new file mode 100644
index 0000000..3bd7fa6
@@ -0,0 +1,2 @@
+# Locally computed
+sha256	6a86ccf68c2af46c1f98334b8e300c75df1be39b5620d689285c35167737c913	spandsp-20140809.tar.gz
package/libspandsp/libspandsp.mk new file +25 -0
new file mode 100644
index 0000000..b543a1d
@@ -0,0 +1,25 @@
+################################################################################
+#
+# libspandsp
+#
+################################################################################
+
+LIBSPANDSP_VERSION = 20140809
+LIBSPANDSP_SOURCE = spandsp-$(LIBSPANDSP_VERSION).tar.gz
+LIBSPANDSP_SITE = http://www.soft-switch.org/downloads/spandsp/snapshots
+LIBSPANDSP_LICENSE = LGPL-2.1
+LIBSPANDSP_LICENSE_FILES = COPYING
+LIBSPANDSP_INSTALL_STAGING = YES
+LIBSPANDSP_AUTORECONF = YES
+
+# Fixes broken gcc
+# http://thread.gmane.org/gmane.linux.lib.musl.general/2468/
+LIBSPANDSP_CONF_ENV = ac_cv_header_tgmath_h=no
+
+LIBSPANDSP_DEPENDENCIES = tiff
+
+ifeq ($(BR2_PACKAGE_JPEG),y)
+LIBSPANDSP_DEPENDENCIES += jpeg
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
1.7.10.4
#9 lore raw

PATCH 3/3 package/libspandsp: new package

Dear Bernd Kuhls,

package/libspandsp/libspandsp.mk line 10

Quoted 4 lines · Bernd Kuhls
package/libspandsp/libspandsp.mk new file +4 -0
+LIBSPANDSP_VERSION = 20140809
+LIBSPANDSP_SOURCE = spandsp-$(LIBSPANDSP_VERSION).tar.gz
+LIBSPANDSP_SITE = http://www.soft-switch.org/downloads/spandsp/snapshots
+LIBSPANDSP_LICENSE = LGPL-2.1

LGPLv2.1 or LGPLv2.1+. Yes, I know it doesn't match
https://spdx.org/licenses/, but it's what we've been using in Buildroot for all other packages.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#10 lore raw

cover New library packages for upcoming Asterisk package

In reply to Bernd Kuhls

Dear Bernd Kuhls,

Quoted 2 lines · Bernd Kuhls

these three new packages are needed by an upcoming Asterisk package to be released sometime this year.

Great! I also already have an Asterisk package I've used for a project last year. Just never gotten around to clean it up and submit it.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#11 lore raw

cover New library packages for upcoming Asterisk package

Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20150426190659.5a4a531f at free-electrons.com:

Quoted 9 lines

Dear Bernd Kuhls,

Quoted 2 lines · Bernd Kuhls

these three new packages are needed by an upcoming Asterisk package to be released sometime this year.

Great! I also already have an Asterisk package I've used for a project last year. Just never gotten around to clean it up and submit it.

Hi,

I posted my unfinished patch for Asterisk as RFC:
http://patchwork.ozlabs.org/patch/464714/

Regards, Bernd