[v2,1/1] package/libpjsip: new package
diff mbox

Message ID 1430078330-14821-1-git-send-email-bernd.kuhls@t-online.de
State Changes Requested
Delegated to: Yann E. MORIN
Headers show

Commit Message

Bernd Kuhls April 26, 2015, 7:58 p.m. UTC
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: various changes (Thomas)
  - changed portaudio dependency to avoid using third_party/portaudio/
  - removed 0001-disable-tests.patch
    not necessary anymore since ipv6 changes in buildroot
  - added license information

 package/Config.in              |    1 +
 package/libpjsip/Config.in     |   16 ++++++++++++++
 package/libpjsip/libpjsip.hash |    2 ++
 package/libpjsip/libpjsip.mk   |   47 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 66 insertions(+)
 create mode 100644 package/libpjsip/Config.in
 create mode 100644 package/libpjsip/libpjsip.hash
 create mode 100644 package/libpjsip/libpjsip.mk

Comments

Luca Ceresoli Oct. 4, 2015, 6:44 p.m. UTC | #1
Dear Bernd,

are you still interested in this work?

Generally looks good. Below are a few comments.

Bernd Kuhls wrote:
[...]
> diff --git a/package/libpjsip/libpjsip.hash b/package/libpjsip/libpjsip.hash
> new file mode 100644
> index 0000000..c647ac4
> --- /dev/null
> +++ b/package/libpjsip/libpjsip.hash
> @@ -0,0 +1,2 @@
> +# From http://www.pjsip.org/release/2.4/MD5SUM.TXT
> +md5	39629ca3fcedbdc7dbd8c5a707060095	pjproject-2.4.tar.bz2

If no hash stronger that MD5 is published, you should compute one
manually.

> diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk
> new file mode 100644
> index 0000000..6308da1
> --- /dev/null
> +++ b/package/libpjsip/libpjsip.mk
> @@ -0,0 +1,47 @@
> +################################################################################
> +#
> +# libpjsip
> +#
> +################################################################################
> +
> +LIBPJSIP_VERSION = 2.4

Of course if you respin this patch you'll have to upgrade the version.

> +LIBPJSIP_SOURCE = pjproject-$(LIBPJSIP_VERSION).tar.bz2
> +LIBPJSIP_SITE = http://www.pjsip.org/release/$(LIBPJSIP_VERSION)
> +LIBPJSIP_LICENSE = GPLv2+
> +LIBPJSIP_LICENSE_FILES = COPYING
> +LIBPJSIP_INSTALL_STAGING = YES
> +
> +LIBPJSIP_DEPENDENCIES = libgsm libsrtp portaudio
> +
> +LIBPJSIP_CONF_ENV = \
> +	LD="$(TARGET_CC)" \
> +	CFLAGS="$(TARGET_CFLAGS) -DPJ_HAS_IPV6=1"
> +
> +LIBPJSIP_CONF_OPTS = \
> +	--with-external-gsm \
> +	--with-external-pa \
> +	--with-external-srtp \
> +	--disable-sound \

If sound is disabled, does it make sense to forcibly enable gsm?

Incidentally, since you sent this patch alone and I didn't see v1, I
applied this one only, and of course it didn't build because libgsm is
not in Buildroot. This suggested me that the libpjsip patch might go
on on its own even without libgsm. After all pjsip has interesting
things besides audio, such as the NAT traversal techniques. I assume
these other features can be used with audio disabled.

So I'd forcibly disable gsm in the first run, and maybe optionally
enable it if/when libgsm gets merged.
Bernd Kuhls Oct. 5, 2015, 4:25 a.m. UTC | #2
Hi Luca,

Am Sun, 04 Oct 2015 20:44:15 +0200 schrieb Luca Ceresoli:

> Dear Bernd,
> 
> are you still interested in this work?

no, I explained my reasons here (in short: I switched to Freeswitch):
http://thread.gmane.org/gmane.comp.lib.uclibc.buildroot/124777/focus=125692

> Incidentally, since you sent this patch alone and I didn't see v1, I
> applied this one only, and of course it didn't build because libgsm is
> not in Buildroot.

This patch is part of a series to implement an Asterisk package:

libgsm: http://patchwork.ozlabs.org/patch/464719/
libspandsp: http://patchwork.ozlabs.org/patch/464716/
Asterisk (RFC version): http://patchwork.ozlabs.org/patch/464714/

Regards, Bernd

Patch
diff mbox

diff --git a/package/Config.in b/package/Config.in
index 744ebc6..2a06a3d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/libpjsip/Config.in b/package/libpjsip/Config.in
new file mode 100644
index 0000000..ae3c65b
--- /dev/null
+++ b/package/libpjsip/Config.in
@@ -0,0 +1,16 @@ 
+config BR2_PACKAGE_LIBPJSIP
+	bool "libpjsip"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS # portaudio
+	select BR2_PACKAGE_LIBGSM
+	select BR2_PACKAGE_LIBSRTP
+	select BR2_PACKAGE_PORTAUDIO
+	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++, threads"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/libpjsip/libpjsip.hash b/package/libpjsip/libpjsip.hash
new file mode 100644
index 0000000..c647ac4
--- /dev/null
+++ b/package/libpjsip/libpjsip.hash
@@ -0,0 +1,2 @@ 
+# From http://www.pjsip.org/release/2.4/MD5SUM.TXT
+md5	39629ca3fcedbdc7dbd8c5a707060095	pjproject-2.4.tar.bz2
diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk
new file mode 100644
index 0000000..6308da1
--- /dev/null
+++ b/package/libpjsip/libpjsip.mk
@@ -0,0 +1,47 @@ 
+################################################################################
+#
+# libpjsip
+#
+################################################################################
+
+LIBPJSIP_VERSION = 2.4
+LIBPJSIP_SOURCE = pjproject-$(LIBPJSIP_VERSION).tar.bz2
+LIBPJSIP_SITE = http://www.pjsip.org/release/$(LIBPJSIP_VERSION)
+LIBPJSIP_LICENSE = GPLv2+
+LIBPJSIP_LICENSE_FILES = COPYING
+LIBPJSIP_INSTALL_STAGING = YES
+
+LIBPJSIP_DEPENDENCIES = libgsm libsrtp portaudio
+
+LIBPJSIP_CONF_ENV = \
+	LD="$(TARGET_CC)" \
+	CFLAGS="$(TARGET_CFLAGS) -DPJ_HAS_IPV6=1"
+
+LIBPJSIP_CONF_OPTS = \
+	--with-external-gsm \
+	--with-external-pa \
+	--with-external-srtp \
+	--disable-sound \
+	--disable-resample \
+	--disable-video \
+	--disable-opencore-amr
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+LIBPJSIP_DEPENDENCIES += openssl
+LIBPJSIP_CONF_OPTS += --with-ssl=$(STAGING_DIR)/usr
+else
+LIBPJSIP_CONF_OPTS += --disable-ssl
+endif
+
+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
+endif
+
+$(eval $(autotools-package))