mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-20 06:06:58 +02:00
to avoid conflict with the new libyuv package and because the PJMEDIA video features are not enabled anyway
125 lines
3.4 KiB
Text
125 lines
3.4 KiB
Text
# Contributor: Michael Mason <ms13sp@gmail.com>
|
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=pjproject
|
|
pkgver=2.14.1
|
|
pkgrel=4
|
|
pkgdesc="Open source multimedia communication library"
|
|
url="https://www.pjsip.org/pjsua.htm"
|
|
arch="all"
|
|
license="GPL-2.0-or-later"
|
|
depends_dev="openssl-dev>3 alsa-lib-dev gsm-dev speex-dev speexdsp-dev
|
|
portaudio-dev opus-dev libsrtp-dev libsamplerate-dev"
|
|
makedepends="$depends_dev linux-headers python3-dev py3-setuptools swig"
|
|
subpackages="$pkgname-dbg $pkgname-dev py3-pjsua-pyc py3-pjsua:py3 pjsua"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/pjsip/pjproject/archive/refs/tags/$pkgver.tar.gz
|
|
pjproject_no_third_party.patch
|
|
"
|
|
options="!check"
|
|
|
|
# secfixes:
|
|
# 2.14-r0:
|
|
# - CVE-2023-38703
|
|
# 2.13.1-r0:
|
|
# - CVE-2023-27585
|
|
# 2.13-r0:
|
|
# - CVE-2022-31031
|
|
# - CVE-2022-39244
|
|
# - CVE-2022-39269
|
|
# 2.12.1-r0:
|
|
# - CVE-2022-24754
|
|
# - CVE-2022-24763
|
|
# - CVE-2022-24764
|
|
# - CVE-2022-24786
|
|
# - CVE-2022-24792
|
|
# - CVE-2022-24793
|
|
# 2.12-r0:
|
|
# - CVE-2021-37706
|
|
# - CVE-2021-41141
|
|
# - CVE-2021-43299
|
|
# - CVE-2021-43300
|
|
# - CVE-2021-43301
|
|
# - CVE-2021-43302
|
|
# - CVE-2021-43303
|
|
# - CVE-2021-43804
|
|
# - CVE-2021-43845
|
|
# - CVE-2022-21722
|
|
# - CVE-2022-21723
|
|
# - CVE-2022-23608
|
|
# 2.11.1-r0:
|
|
# - CVE-2021-32686
|
|
# 2.11-r0:
|
|
# - CVE-2020-15260
|
|
# - CVE-2021-21375
|
|
|
|
prepare() {
|
|
default_prepare
|
|
update_config_sub
|
|
|
|
# Remove target name from lib names
|
|
find . -name '*.mak*' -o -name Makefile | \
|
|
xargs sed -i -e 's/-$(TARGET_NAME)//g' \
|
|
-e 's/= $(TARGET_NAME).a/= .a/g' \
|
|
-e 's/-$(LIB_SUFFIX)/$(LIB_SUFFIX)/g'
|
|
|
|
# Use libsamplerate instead of bundled resample
|
|
sed -i -e "s/resample//" third_party/build/Makefile
|
|
sed -i -e "s#../../third_party/libsamplerate/src/samplerate.h#samplerate.h#" pjmedia/src/pjmedia/resample_libsamplerate.c
|
|
|
|
# Add minor and patch version to soname to better handle ABI changes
|
|
sed -i -e 's/$(PJ_VERSION_MAJOR)/$(PJ_VERSION)/' build.mak.in ./*/build/Makefile third_party/build/*/Makefile
|
|
|
|
# Enable IPv6
|
|
printf "#define PJ_HAS_IPV6 1\n" >> pjlib/include/pj/config_site.h
|
|
}
|
|
|
|
build() {
|
|
export CFLAGS="-DNDEBUG $CFLAGS"
|
|
./configure \
|
|
--build=$CBUILD \
|
|
--host=$CHOST \
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--mandir=/usr/share/man \
|
|
--infodir=/usr/share/info \
|
|
--enable-shared \
|
|
--enable-libsamplerate \
|
|
--with-external-speex \
|
|
--with-external-gsm \
|
|
--with-external-srtp \
|
|
--with-external-pa \
|
|
--disable-libyuv \
|
|
--disable-libwebrtc
|
|
|
|
# TODO: make it build with only shared libs from system
|
|
# rm -r third_party
|
|
make dep
|
|
make all
|
|
|
|
cd pjsip-apps/src/swig/python
|
|
make
|
|
}
|
|
|
|
package() {
|
|
install -d "$pkgdir"/usr/lib
|
|
make -j1 DESTDIR="$pkgdir" prefix=/usr install
|
|
rm -f "$pkgdir"/usr/lib/*.a
|
|
|
|
cd pjsip-apps/src/swig/python
|
|
python3 setup.py install --skip-build --root="$pkgdir"
|
|
}
|
|
|
|
pjsua() {
|
|
pkgdesc="Open source command line SIP user agent (softphone)"
|
|
cd "$builddir"/pjsip-apps/bin/
|
|
install -D -m755 pjsua "$subpkgdir"/usr/bin/pjsua
|
|
}
|
|
|
|
py3() {
|
|
pkgdesc="$pkgdesc (Python bindings)"
|
|
amove usr/lib/python*
|
|
}
|
|
|
|
sha512sums="
|
|
fd026af39e588f9646af1cfed176dadb4c9675943499c18866175f732630003965913960108efde192e4dc7968838850a4b3f5a31981482ae7b41497f5b58b97 pjproject-2.14.1.tar.gz
|
|
fe53b4e8a654dc4025a4bf6350f405953609abc9e7ed967882cb9eb9e6a659e348a0c3c7496c8093562a0dcc4a40459896d8ee1da7275dd089244338111bccbb pjproject_no_third_party.patch
|
|
"
|