ports/contrib (3.1): pjsua: initial commit version 2.4
commit c95505ed6adf141467980daf35c27ffdfe41ff15 Author: Alan Mizrahi <alan+crux@mizrahi.com.ve> Date: Wed Aug 5 15:40:22 2015 +0900 pjsua: initial commit version 2.4 diff --git a/pjsua/.footprint b/pjsua/.footprint new file mode 100644 index 0000000..769943b --- /dev/null +++ b/pjsua/.footprint @@ -0,0 +1,3 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/pjsua diff --git a/pjsua/.md5sum b/pjsua/.md5sum new file mode 100644 index 0000000..aef3b75 --- /dev/null +++ b/pjsua/.md5sum @@ -0,0 +1,3 @@ +0f3226061ee2969bf49c450de5c29fc2 config_site.h +721b32016fe7988dfb864768769498a0 pjmedia-libsamplerate.patch +39629ca3fcedbdc7dbd8c5a707060095 pjproject-2.4.tar.bz2 diff --git a/pjsua/Pkgfile b/pjsua/Pkgfile new file mode 100644 index 0000000..45dfa3a --- /dev/null +++ b/pjsua/Pkgfile @@ -0,0 +1,54 @@ +# Description: Command line SIP phone +# URL: http://www.pjsip.org/ +# Packager: Alan Mizrahi, alan at mizrahi dot com dot ve +# Depends on: pjproject + +name=pjsua +version=2.4 +release=2 + +source=( +http://www.pjsip.org/release/$version/pjproject-$version.tar.bz2 +pjmedia-libsamplerate.patch +config_site.h +) + +# Related ports: +# pjsua: Standalone user-agent. +# pjsip: The minimum that asterisk needs for res_pjsip.so and friends. Dynamic libraries. +# pjproject: Libraries with most things enabled. Static and dynamic libraries. + +build() { + cd pjproject-$version + + export CFLAGS="$CFLAGS -DNDEBUG" + + # pjsua will be dynamically linked as long as pjproject is installed beforehand. + # otherwise it will be statically linked. + ./configure \ + --prefix=/usr \ + --with-external-pa \ + --with-external-gsm \ + --with-external-speex \ + --with-external-srtp \ + --with-sdl=/usr \ + --disable-openh264 \ + --enable-libsamplerate \ + --disable-resample_dll + + cp $SRC/config_site.h pjlib/include/pj/config_site.h + + # use system's libsamplerate + patch -p1 -i $SRC/pjmedia-libsamplerate.patch + + make dep + + # would be nice if something like this worked: + # make -j1 -C pjsip-apps/build pjsua-`./config.guess` + + # but for now: + make + + # install pjsua only + install -D -m755 pjsip-apps/bin/pjsua-* $PKG/usr/bin/pjsua +} diff --git a/pjsua/config_site.h b/pjsua/config_site.h new file mode 100644 index 0000000..98b4c93 --- /dev/null +++ b/pjsua/config_site.h @@ -0,0 +1,6 @@ +#define PJMEDIA_HAS_VIDEO 1 +// #define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 1 +// #define PJMEDIA_AUDIO_DEV_HAS_ALSA 1 +#define PJMEDIA_HAS_FFMPEG 1 +#define PJMEDIA_HAS_OPENH264_CODEC 0 +// #include <pj/config_site_sample.h> diff --git a/pjsua/pjmedia-libsamplerate.patch b/pjsua/pjmedia-libsamplerate.patch new file mode 100644 index 0000000..556290b --- /dev/null +++ b/pjsua/pjmedia-libsamplerate.patch @@ -0,0 +1,12 @@ +diff -ru pjproject-2.4.orig/pjmedia/src/pjmedia/resample_libsamplerate.c pjproject-2.4/pjmedia/src/pjmedia/resample_libsamplerate.c +--- pjproject-2.4.orig/pjmedia/src/pjmedia/resample_libsamplerate.c 2015-08-05 09:37:02.714255339 +0900 ++++ pjproject-2.4/pjmedia/src/pjmedia/resample_libsamplerate.c 2015-08-05 09:38:44.601257767 +0900 +@@ -33,7 +33,7 @@ + + #if PJMEDIA_RESAMPLE_IMP==PJMEDIA_RESAMPLE_LIBSAMPLERATE + +-#include "../../third_party/libsamplerate/src/samplerate.h" ++#include <samplerate.h> + + #define THIS_FILE "resample_libsamplerate.c" +
participants (1)
-
crux@crux.nu