summaryrefslogtreecommitdiff
path: root/pcr/pjproject
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2018-01-20 22:37:40 +0100
committerAndreas Grapentin <andreas@grapentin.org>2018-01-20 22:37:40 +0100
commit2d088f93f155f1de2b4328f864fefaa966bd1540 (patch)
tree063bf9ddbd3e43dc35e807c01cb0c8ff43d431c9 /pcr/pjproject
parentf3d4afa1277cecf36ea6b91cce20f9468cb71e52 (diff)
downloadabslibre-2d088f93f155f1de2b4328f864fefaa966bd1540.tar.gz
abslibre-2d088f93f155f1de2b4328f864fefaa966bd1540.tar.bz2
abslibre-2d088f93f155f1de2b4328f864fefaa966bd1540.zip
pcr/pjproject: added
Diffstat (limited to 'pcr/pjproject')
-rw-r--r--pcr/pjproject/PKGBUILD42
-rw-r--r--pcr/pjproject/arm-build.patch53
-rw-r--r--pcr/pjproject/pjproject.install18
3 files changed, 113 insertions, 0 deletions
diff --git a/pcr/pjproject/PKGBUILD b/pcr/pjproject/PKGBUILD
new file mode 100644
index 000000000..cfdaeb0e8
--- /dev/null
+++ b/pcr/pjproject/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer (AUR): Xavier Devlamynck <magicrhesus@ouranos.be>
+# Contributor (AUR): Marti Raudsepp <marti@juffo.org>
+#Contributor (AUR): Travis Hegner <travis.hegner@gmail.com>
+
+# parabola changes and rationale:
+# fixing misdetection of x86 intrinsics on armv7h
+
+pkgname=pjproject
+pkgver=2.7.1
+pkgrel=1
+pkgdesc="Open source SIP stack and media stack"
+arch=('i686' 'x86_64' 'armv7h')
+url="http://www.pjsip.org/"
+license=('GPL')
+depends=('openssl' 'portaudio' 'speex' 'alsa-lib' 'libsamplerate' 'util-linux' 'ffmpeg' 'libsrtp' 'opus')
+makedepends=('e2fsprogs' 'python')
+install=pjproject.install
+source=(http://www.pjsip.org/release/${pkgver}/pjproject-${pkgver}.tar.bz2
+ arm-build.patch)
+sha256sums=('59fabc62a02b2b80857297cfb10e2c68c473f4a0acc6e848cfefe8421f2c3126'
+ 'fc6ccc004586e504d89fd14bbe2c26747849b1b9b617f4427e593de6a1c6b3db')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 < "${srcdir}/arm-build.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ export CXXFLAGS="${CXXFLAGS} -fPIC -march=native"
+ export CFLAGS="${CXXFLAGS} -DNDEBUG"
+ ./configure --prefix=/usr --with-external-speex --with-external-srtp --with-external-pa --with-external-gsm --disable-oss --enable-shared --disable-opencore-amr --disable-v4l2 --disable-video --disable-sound
+ echo "#define PJ_HAS_IPV6 1" >> "${srcdir}/${pkgname}-${pkgver}/pjlib/include/pj/config_site.h"
+ make -j1 dep
+ make -j1
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make -j1 DESTDIR=${pkgdir} install
+ install -D -m755 pjsip-apps/bin/pjsua-* ${pkgdir}/usr/bin/pjsua
+}
diff --git a/pcr/pjproject/arm-build.patch b/pcr/pjproject/arm-build.patch
new file mode 100644
index 000000000..06dde3493
--- /dev/null
+++ b/pcr/pjproject/arm-build.patch
@@ -0,0 +1,53 @@
+diff -ur pjproject-2.6.orig/aconfigure pjproject-2.6/aconfigure
+--- pjproject-2.6.orig/aconfigure 2017-01-25 11:23:08.000000000 +0000
++++ pjproject-2.6/aconfigure 2017-05-03 21:41:34.657154786 +0000
+@@ -8494,7 +8494,15 @@
+ ac_webrtc_cflags="-msse2"
+ ;;
+ *win32* | *w32* | *darwin* | *linux*)
+- ac_webrtc_instset=sse2
++ case $target in
++ armv7l*gnueabihf)
++ ac_webrtc_instset=neon
++ ac_webrtc_cflags="-DWEBRTC_ARCH_ARMV7 -mfloat-abi=hard -mfpu=neon"
++ ;;
++ *)
++ ac_webrtc_instset=sse2
++ ;;
++ esac
+ ;;
+ *)
+ ;;
+diff -ur pjproject-2.6.orig/aconfigure.ac pjproject-2.6/aconfigure.ac
+--- pjproject-2.6.orig/aconfigure.ac 2017-01-25 11:23:08.000000000 +0000
++++ pjproject-2.6/aconfigure.ac 2017-05-03 21:42:41.686846516 +0000
+@@ -1840,7 +1840,15 @@
+ ac_webrtc_cflags="-msse2"
+ ;;
+ *win32* | *w32* | *darwin* | *linux*)
+- ac_webrtc_instset=sse2
++ case $target in
++ armv7l*gnueabihf)
++ ac_webrtc_instset=neon
++ ac_webrtc_cflags="-DWEBRTC_ARCH_ARMV7 -mfloat-abi=hard -mfpu=neon"
++ ;;
++ *)
++ ac_webrtc_instset=sse2
++ ;;
++ esac
+ ;;
+ *)
+ ;;
+diff -ur pjproject-2.6.orig/third_party/build/os-auto.mak.in pjproject-2.6/third_party/build/os-auto.mak.in
+--- pjproject-2.6.orig/third_party/build/os-auto.mak.in 2016-12-22 09:33:55.000000000 +0000
++++ pjproject-2.6/third_party/build/os-auto.mak.in 2017-05-03 21:25:48.151562278 +0000
+@@ -104,8 +104,7 @@
+ else # Generic fixed point
+ WEBRTC_SRC = \
+ modules/audio_processing/aecm/aecm_core_c.o \
+- modules/audio_processing/ns/nsx_core_c.o \
+- common_audio/signal_processing/complex_fft.o
++ modules/audio_processing/ns/nsx_core_c.o
+ endif
+ endif
+ endif
diff --git a/pcr/pjproject/pjproject.install b/pcr/pjproject/pjproject.install
new file mode 100644
index 000000000..b7fa377cf
--- /dev/null
+++ b/pcr/pjproject/pjproject.install
@@ -0,0 +1,18 @@
+post_install() {
+ cat << EOF
+==>
+==> To use py_pjsua (Python bindings for PJSUA),
+==> install 'alsa-lib', 'e2fsprogs', and 'python'
+==>
+EOF
+}
+
+post_upgrade() {
+ post_install
+}
+
+op=$1
+shift
+[ "$(type -t "$op")" = "function" ] && $op "$@"
+
+# vim:set ts=2 sw=2 et: