Commit f7dd9f9c authored by Natanael Copa's avatar Natanael Copa

main/pjproject: upgrade to 2.1 and fix building on musl

parent 87ea013c
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pjproject
pkgver=2.0
pkgver=2.1
pkgrel=0
pkgdesc="CLI Softphone"
url="http://www.pjsip.org/pjsua.htm"
......@@ -11,10 +11,17 @@ depends=
makedepends="openssl-dev alsa-lib-dev gsm-dev speex-dev portaudio-dev"
install=
subpackages="$pkgname-dev pjsua"
source="http://www.pjsip.org/release/$pkgver/$pkgname-$pkgver.tar.bz2"
source="http://www.pjsip.org/release/$pkgver/$pkgname-$pkgver.tar.bz2
musl-fixes.patch"
_builddir="$srcdir/$pkgname-$pkgver.0"
prepare() {
cd "$srcdir/$pkgname-$pkgver"
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
update_config_sub || return 1
# Remove target name from lib names
sed -i -e 's/-$(TARGET_NAME)//g' \
......@@ -33,7 +40,7 @@ prepare() {
}
build() {
cd "$srcdir/$pkgname-$pkgver"
cd "$_builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
......@@ -53,14 +60,19 @@ build() {
}
package() {
cd "$srcdir/$pkgname-$pkgver"
cd "$_builddir"
make -j1 DESTDIR="$pkgdir" prefix=/usr install
}
pjsua() {
pkgdesc="pjsua is an open source command line SIP user agent (softphone)"
cd "$srcdir/$pkgname-$pkgver"/pjsip-apps/bin/
cd "$_builddir"/pjsip-apps/bin/
install -D -m755 pjsua "$subpkgdir"/usr/bin/pjsua
}
md5sums="6d7291960f2f341eb39694754586e0e9 pjproject-2.0.tar.bz2"
md5sums="310eb63638dac93095f6a1fc8ee1f578 pjproject-2.1.tar.bz2
e92287afb144883546e39c382bd75cdd musl-fixes.patch"
sha256sums="ac86d2401e1cb4a4f0207e4fd58921f869d0b5ee65a26aa438039a107ba415a5 pjproject-2.1.tar.bz2
a9768e1ddc6e519048a5acc084ed1e9d2007bd0cd6291dde0828ea7efc837266 musl-fixes.patch"
sha512sums="a31c33fb45b074bb43ecf8f579d140cf2d7fe2d508edad5643a9124e7e85dc50e1ecc860e2e52ca42e82c92121b08e7e3691b5dd99db844b21749e03afbc2f94 pjproject-2.1.tar.bz2
1dd0d8dabe0c27f8d314a776b8873700755ae59346223a5bb5ec816ab42d4fa4c8d9281ed33ced9cba87177cdf6249e458c404c8fd0ac9ec0be8607b4a4e8a73 musl-fixes.patch"
--- ./pjsip-apps/src/samples/siprtp.c.orig
+++ ./pjsip-apps/src/samples/siprtp.c
@@ -1133,7 +1133,7 @@
PJ_RETURN_OS_ERROR(rc));
return;
}
- tp.__sched_priority = max_prio;
+ tp.sched_priority = max_prio;
rc = sched_setscheduler(0, POLICY, &tp);
if (rc != 0) {
@@ -1142,7 +1142,7 @@
}
PJ_LOG(4, (THIS_FILE, "New process policy=%d, priority=%d",
- policy, tp.__sched_priority));
+ policy, tp.sched_priority));
/*
* Adjust thread scheduling algorithm and priority
@@ -1155,10 +1155,10 @@
}
PJ_LOG(4, (THIS_FILE, "Old thread policy=%d, priority=%d",
- policy, tp.__sched_priority));
+ policy, tp.sched_priority));
policy = POLICY;
- tp.__sched_priority = max_prio;
+ tp.sched_priority = max_prio;
rc = pthread_setschedparam(pthread_self(), policy, &tp);
if (rc != 0) {
@@ -1168,7 +1168,7 @@
}
PJ_LOG(4, (THIS_FILE, "New thread policy=%d, priority=%d",
- policy, tp.__sched_priority));
+ policy, tp.sched_priority));
}
#else
--- ./pjlib/src/pj/os_core_unix.c.orig
+++ ./pjlib/src/pj/os_core_unix.c
@@ -1104,7 +1104,7 @@
if (type == PJ_MUTEX_SIMPLE) {
#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \
defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE)
- rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_FAST_NP);
+ rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
#elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \
defined(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE)
/* Nothing to do, default is simple */
@@ -1114,7 +1114,7 @@
} else {
#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \
defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE)
- rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+ rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
#elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \
defined(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE)
// Phil Torre <ptorre@zetron.com>:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment