Thursday, April 27, 2023

[update] telephony/baresip 3.1.0 & drop rem/restund

Index: libzrtp/Makefile
===================================================================
RCS file: /cvs/ports/telephony/libzrtp/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- libzrtp/Makefile 11 Mar 2022 19:58:31 -0000 1.19
+++ libzrtp/Makefile 28 Apr 2023 06:01:39 -0000
@@ -1,25 +1,15 @@
COMMENT = ZRTP library

-DISTNAME = libzrtp-0.20180617
+DISTNAME = libzrtp-0.20221005
CATEGORIES = telephony security
-REVISION = 1

# AGPLv3
PERMIT_PACKAGE = Yes

GH_ACCOUNT = juha-h
-GH_PROJECT = libzrtp
-GH_COMMIT = 9069e4c1828c18d31c2b424f6eaf870cf3b8453f
+GH_PROJECT = ZRTPCPP
+GH_COMMIT = 2d59090ee244bc4d3a682ad45ae49dc7b4d4dfb7

-CONFIGURE_STYLE = autoreconf
-CONFIGURE_ARGS = --disable-docs
-AUTOCONF_VERSION = 2.69
-AUTOMAKE_VERSION = 1.9
-AUTORECONF = ./bootstrap.sh
-
-.include <bsd.port.arch.mk>
-.if ${PROPERTIES:Mclang}
-MAKE_FLAGS += GCCMAGIC2=-lcompiler_rt
-.endif
+MODULES = devel/cmake

.include <bsd.port.mk>
Index: libzrtp/distinfo
===================================================================
RCS file: /cvs/ports/telephony/libzrtp/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- libzrtp/distinfo 22 Jul 2018 17:36:13 -0000 1.6
+++ libzrtp/distinfo 28 Apr 2023 06:01:39 -0000
@@ -1,2 +1,2 @@
-SHA256 (libzrtp-0.20180617-9069e4c1.tar.gz) = 5fB/mqSm0rzViRJ4ZmS69O26TqitJ57zb8MWYDwoD+c=
-SIZE (libzrtp-0.20180617-9069e4c1.tar.gz) = 666647
+SHA256 (libzrtp-0.20221005-2d59090e.tar.gz) = PAMGe+IYIPW4NTuqL3HZC8yhVSV9GDiPZpBynJ6zoW4=
+SIZE (libzrtp-0.20221005-2d59090e.tar.gz) = 2236122
Index: libzrtp/patches/patch-Makefile_am
===================================================================
RCS file: libzrtp/patches/patch-Makefile_am
diff -N libzrtp/patches/patch-Makefile_am
--- libzrtp/patches/patch-Makefile_am 11 Mar 2022 19:58:31 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-Index: Makefile.am
---- Makefile.am.orig
-+++ Makefile.am
-@@ -49,7 +49,7 @@ libzrtp_a_CPPFLAGS = \
- -I$(top_srcdir)/third_party/bgaes \
- -I$(top_srcdir)/third_party/bnlib
-
--libzrtp_a_LIBADD = $(top_srcdir)/third_party/bnlib/libbn.a
-+libzrtp_a_LIBADD = $(top_srcdir)/third_party/bnlib/*.o
-
- libzrtp_a_SOURCES = $(top_srcdir)/src/zrtp.c \
- $(top_srcdir)/src/zrtp_crc.c \
Index: libzrtp/patches/patch-include_zrtp_config_h
===================================================================
RCS file: libzrtp/patches/patch-include_zrtp_config_h
diff -N libzrtp/patches/patch-include_zrtp_config_h
--- libzrtp/patches/patch-include_zrtp_config_h 11 Mar 2022 19:58:31 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-Prefer endianness detection using endian.h instead of a hardcoded list of architectures.
-
-Index: include/zrtp_config.h
---- include/zrtp_config.h.orig
-+++ include/zrtp_config.h
-@@ -69,7 +69,19 @@
- */
- #if !defined(ZRTP_BYTE_ORDER)
-
--#if defined(_i386_) || defined(i_386_) || defined(_X86_) || defined(x86) || defined(__i386__) || \
-+#if 1 /* defined(ZRTP_HAVE_ENDIAN_H) or similar */
-+
-+/* POSIX-style endian.h, see http://www.opengroup.org/austin/docs/austin_514.txt */
-+/* Other approach: autoconf AC_C_BIGENDIAN */
-+# include <endian.h>
-+
-+# if BYTE_ORDER == BIG_ENDIAN
-+# define ZRTP_BYTE_ORDER ZBO_BIG_ENDIAN
-+# else
-+# define ZRTP_BYTE_ORDER ZBO_LITTLE_ENDIAN
-+# endif
-+
-+#elif defined(_i386_) || defined(i_386_) || defined(_X86_) || defined(x86) || defined(__i386__) || \
- defined(__i386) || defined(_M_IX86) || defined(__I86__)
- /*
- * Generic i386 processor family, little-endian
Index: libzrtp/patches/patch-third_party_bnlib_Makefile_in
===================================================================
RCS file: libzrtp/patches/patch-third_party_bnlib_Makefile_in
diff -N libzrtp/patches/patch-third_party_bnlib_Makefile_in
--- libzrtp/patches/patch-third_party_bnlib_Makefile_in 11 Mar 2022 19:58:31 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,53 +0,0 @@
-Index: third_party/bnlib/Makefile.in
---- third_party/bnlib/Makefile.in.orig
-+++ third_party/bnlib/Makefile.in
-@@ -41,12 +41,9 @@ all: $(BNLIB) bntest32.c bntest64.c
-
- # for libzrtp support
- install: all
-- test -d /usr/local/include/libzrtp || mkdir /usr/local/include/libzrtp
-- cp *.h /usr/local/include/libzrtp
-- cp 'libbn.a' '/usr/local/lib/libbn.a'
-- chmod 644 /usr/local/lib/libbn.a
-- chown 0:0 /usr/local/lib/libbn.a
-- $(RANLIB) '/usr/local/lib/libbn.a'
-+ ${BSD_INSTALL_DATA_DIR} ${PREFIX}/include/libzrtp
-+ ${BSD_INSTALL_DATA} *.h ${PREFIX}/include/libzrtp
-+ ${RANLIB} libbn.a
-
- # for libzrtp support
- #check: bntest
-@@ -60,9 +57,11 @@ germtest: germtest.o $(BNLIB)
- $(LD) $(LDFLAGS) -o $@ germtest.o $(BNLIB) $(LIBS)
-
- $(BNLIB): $(OBJS)
-- $(AR) r $@ $?
-+ $(AR) $(ARFLAGS) $@ $?
- $(RANLIB) $@
-
-+GCCMAGIC1=@GCCMAGIC1@
-+GCCMAGIC2=@GCCMAGIC2@
- # Here we get tricky... if we're compiling with GCC, then GCCMAGIC1 and
- # GCCMAGIC2 are set so that we actually do a link, but with the -r flag
- # (produce relocatable output) and with -lgcc *only*. This is so that
-@@ -72,16 +71,16 @@ $(BNLIB): $(OBJS)
- # support-library function.
-
- lbn00.o: $(srcdir)/lbn00.c $(HDRS) bnconfig.h
-- $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -o $@ @GCCMAGIC1@ lbn00.c @GCCMAGIC2@
-+ $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -o $@ ${GCCMAGIC1} lbn00.c ${GCCMAGIC2}
-
- lbn16.o: $(srcdir)/lbn16.c $(HDRS) bnconfig.h
-- $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -o $@ @GCCMAGIC1@ lbn16.c @GCCMAGIC2@
-+ $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -o $@ ${GCCMAGIC1} lbn16.c ${GCCMAGIC2}
-
- lbn32.o: $(srcdir)/lbn32.c $(HDRS) bnconfig.h
-- $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -o $@ @GCCMAGIC1@ lbn32.c @GCCMAGIC2@
-+ $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -o $@ ${GCCMAGIC1} lbn32.c ${GCCMAGIC2}
-
- lbn64.o: $(srcdir)/lbn64.c $(HDRS) bnconfig.h
-- $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -o $@ @GCCMAGIC1@ lbn64.c @GCCMAGIC2@
-+ $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -o $@ ${GCCMAGIC1} lbn64.c ${GCCMAGIC2}
-
- # The default .o rule.
- .c.o: bnconfig.h
Index: libzrtp/pkg/PLIST
===================================================================
RCS file: /cvs/ports/telephony/libzrtp/pkg/PLIST,v
retrieving revision 1.6
diff -u -r1.6 PLIST
--- libzrtp/pkg/PLIST 11 Mar 2022 19:58:31 -0000 1.6
+++ libzrtp/pkg/PLIST 28 Apr 2023 06:01:39 -0000
@@ -1,59 +1,10 @@
-include/libzrtp/
-include/libzrtp/aes.h
-include/libzrtp/aesopt.h
-include/libzrtp/aestab.h
-include/libzrtp/bg2zrtp.h
-include/libzrtp/bn.h
-include/libzrtp/bn16.h
-include/libzrtp/bn32.h
-include/libzrtp/bn64.h
-include/libzrtp/bnconfig.h
-include/libzrtp/bnprint.h
-include/libzrtp/bnsize00.h
-include/libzrtp/brg_types.h
-include/libzrtp/cputime.h
-include/libzrtp/germain.h
-include/libzrtp/jacobi.h
-include/libzrtp/kludge.h
-include/libzrtp/lbn.h
-include/libzrtp/lbn16.h
-include/libzrtp/lbn32.h
-include/libzrtp/lbn64.h
-include/libzrtp/lbn68000.h
-include/libzrtp/lbn68020.h
-include/libzrtp/lbn80386.h
-include/libzrtp/lbn8086.h
-include/libzrtp/lbn960jx.h
-include/libzrtp/lbnalpha.h
-include/libzrtp/lbnmem.h
-include/libzrtp/lbnppc.h
-include/libzrtp/legal.h
-include/libzrtp/ppcasm.h
-include/libzrtp/prime.h
-include/libzrtp/sha1.h
-include/libzrtp/sha2.h
-include/libzrtp/sieve.h
-include/libzrtp/zrtp.h
-include/libzrtp/zrtp_base.h
-include/libzrtp/zrtp_config.h
-include/libzrtp/zrtp_config_unix.h
-include/libzrtp/zrtp_config_user.h
-include/libzrtp/zrtp_crypto.h
-include/libzrtp/zrtp_ec.h
-include/libzrtp/zrtp_engine.h
-include/libzrtp/zrtp_error.h
-include/libzrtp/zrtp_iface.h
-include/libzrtp/zrtp_iface_cache.h
-include/libzrtp/zrtp_iface_scheduler.h
-include/libzrtp/zrtp_iface_system.h
-include/libzrtp/zrtp_legal.h
-include/libzrtp/zrtp_list.h
-include/libzrtp/zrtp_log.h
-include/libzrtp/zrtp_pbx.h
-include/libzrtp/zrtp_protocol.h
-include/libzrtp/zrtp_srtp.h
-include/libzrtp/zrtp_srtp_builtin.h
-include/libzrtp/zrtp_string.h
-include/libzrtp/zrtp_types.h
-include/libzrtp/zrtp_version.h
-@static-lib lib/libzrtp.a
+include/libzrtpcpp/
+include/libzrtpcpp/ZrtpCWrapper.h
+include/libzrtpcpp/ZrtpCallback.h
+include/libzrtpcpp/ZrtpCodes.h
+include/libzrtpcpp/ZrtpConfigure.h
+include/libzrtpcpp/ZrtpUserCallback.h
+include/libzrtpcpp/common/
+include/libzrtpcpp/common/osSpecifics.h
+@static-lib lib/libzrtpcppcore.a
+lib/pkgconfig/libzrtpcppcore.pc
Index: baresip/Makefile
===================================================================
RCS file: /cvs/ports/telephony/baresip/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- baresip/Makefile 11 Mar 2022 19:58:29 -0000 1.2
+++ baresip/Makefile 28 Apr 2023 06:01:39 -0000
@@ -1,7 +1,5 @@
SUBDIR =
SUBDIR += re
- SUBDIR += rem
SUBDIR += baresip
- SUBDIR += restund

.include <bsd.port.subdir.mk>
Index: baresip/Makefile.inc
===================================================================
RCS file: /cvs/ports/telephony/baresip/Makefile.inc,v
retrieving revision 1.12
diff -u -r1.12 Makefile.inc
--- baresip/Makefile.inc 11 Mar 2022 19:58:29 -0000 1.12
+++ baresip/Makefile.inc 28 Apr 2023 06:01:39 -0000
@@ -4,64 +4,11 @@
# licensed libzrtp. As a result, main baresip package is subject to AGPLv3.
PERMIT_PACKAGE = Yes

-USE_GMAKE = Yes
+GH_ACCOUNT = baresip
+GH_TAGNAME ?= v3.1.0

-MAKE_ENV += CC="${CC}"
-MAKE_ENV += LD="${CC}"
-MAKE_ENV += AR="${AR}"
-#MAKE_ENV += DFLAGS=-MD -MF config -MT config
-MAKE_ENV += APP_LFLAGS="-rdynamic"
-MAKE_ENV += AFLAGS="${ARFLAGS}"
-MAKE_ENV += BUILD="build-${ARCH}"
-MAKE_ENV += OS=openbsd
-MAKE_ENV += LFLAGS="-fPIC -L${LOCALBASE}/lib -L/${X11BASE}/lib"
-MAKE_ENV += SH_LFLAGS="-shared"
-MAKE_ENV += MOD_SUFFIX=".so"
-MAKE_ENV += SYSROOT="/usr"
-MAKE_ENV += V=Yes
-MAKE_ENV += LIBRE_MK=/dev/null
-MAKE_ENV += LIBRE_INC="${LOCALBASE}/include/re"
-MAKE_ENV += HAVE_ARC4RANDOM=1
-MAKE_ENV += HAVE_DLFCN_H=1
-MAKE_ENV += HAVE_EPOLL=
-MAKE_ENV += HAVE_GETIFADDRS=1
-MAKE_ENV += HAVE_GETOPT=1
-MAKE_ENV += HAVE_INET6=1
-MAKE_ENV += HAVE_INET_NTOP=1
-MAKE_ENV += HAVE_INET_PTON=1
-MAKE_ENV += HAVE_INTTYPES_H=1
-MAKE_ENV += HAVE_KQUEUE=1
-MAKE_ENV += HAVE_LIBPTHREAD=1
-MAKE_ENV += HAVE_NET_ROUTE_H=1
-MAKE_ENV += HAVE_PTHREAD=1
-MAKE_ENV += HAVE_PTHREAD_RWLOCK=1
-MAKE_ENV += HAVE_RESOLV=1
-MAKE_ENV += HAVE_STRERROR_R=1
-MAKE_ENV += HAVE_SYSLOG=1
-MAKE_ENV += HAVE_SYS_SYSCTL_H=1
-MAKE_ENV += USE_OPENSSL=yes
-MAKE_ENV += USE_OPENSSL_AES=yes
-MAKE_ENV += USE_OPENSSL_DTLS=yes
-MAKE_ENV += USE_OPENSSL_HMAC=yes
-MAKE_ENV += USE_OPENSSL_SRTP=yes
-MAKE_ENV += USE_TLS=yes
-MAKE_ENV += USE_ZLIB=yes
+# C11
+COMPILER = base-clang ports-gcc
+COMPILER_LANGS = c

-FAKE_FLAGS += PREFIX=${PREFIX}
-
-CFLAGS += -I${X11BASE}/include -I${LOCALBASE}/include -fPIC \
- -DARCH=\"${ARCH}\" -DOPENBSD -DOS=\"openbsd\" -std=c99 \
- -DUSE_OPENSSL -DUSE_TLS -DUSE_OPENSSL_DTLS -DUSE_DTLS \
- -DUSE_OPENSSL_SRTP -DUSE_DTLS_SRTP -DUSE_ZLIB \
- -DHAVE_PTHREAD -DHAVE_GETIFADDRS -DHAVE_STRERROR_R \
- -DHAVE_GETOPT -DHAVE_INTTYPES_H -DHAVE_NET_ROUTE_H \
- -DHAVE_SYS_SYSCTL_H -DHAVE_STDBOOL_H -DHAVE_INET6 \
- -DHAVE_RESOLV -DHAVE_SYSLOG -DHAVE_FORK \
- -DHAVE_INET_NTOP -DHAVE_PWD_H -DHAVE_POLL \
- -DHAVE_INET_PTON -DHAVE_SELECT -DHAVE_SELECT_H \
- -DHAVE_SETRLIMIT -DHAVE_SIGNAL -DHAVE_SYS_TIME_H \
- -DHAVE_KQUEUE -DHAVE_UNAME -DHAVE_UNISTD_H \
- -DHAVE_STRINGS_H -DHAVE_GAI_STRERROR -DHAVE_ARC4RANDOM \
- -DVERSION=\"$V\" -DHAVE_ROUTE_LIST
-
-NO_TEST ?= Yes
+MODULES = devel/cmake
Index: baresip/baresip/Makefile
===================================================================
RCS file: /cvs/ports/telephony/baresip/baresip/Makefile,v
retrieving revision 1.36
diff -u -r1.36 Makefile
--- baresip/baresip/Makefile 31 Oct 2022 23:14:55 -0000 1.36
+++ baresip/baresip/Makefile 28 Apr 2023 06:01:39 -0000
@@ -1,29 +1,25 @@
COMMENT-main = modular SIP User-Agent with audio and video support
COMMENT-gtk = GTK+-based modules for baresip

-GH_ACCOUNT = baresip
GH_PROJECT = baresip
-GH_TAGNAME = v2.6.0
-REVISION = 0

+SHARED_LIBS += baresip 0.0 # 0.0
+MULTI_PACKAGES = -main -gtk
PKGNAME-main = baresip-${GH_TAGNAME:C/^v//}
PKGNAME-gtk = baresip-gtk-${GH_TAGNAME:C/^v//}

-# C11
-COMPILER = base-clang ports-gcc
-COMPILER_LANGS = c
-
-WANTLIB-main += X11 Xext avcodec avdevice avfilter avformat avutil
-WANTLIB-main += c m mosquitto mp3lame mpg123 opus png postproc
-WANTLIB-main += pthread re rem sndfile sndio spandsp speexdsp swresample
-WANTLIB-main += swscale twolame v4l2 vpx opencore-amrnb
+WANTLIB-main += ICE SDL2 SM X11 Xext aom avcodec avdevice avfilter
+WANTLIB-main += avformat avutil c crypto gio-2.0 glib-2.0 gobject-2.0
+WANTLIB-main += m mosquitto mp3lame mpg123 opencore-amrnb opus png
+WANTLIB-main += pthread re sndfile sndio spandsp speexdsp ssl swresample
+WANTLIB-main += swscale twolame v4l2 vpx z
+WANTLIB-main += ${COMPILER_LIBCXX}

WANTLIB-gtk += atk-1.0 cairo cairo-gobject gdk-3 gdk_pixbuf-2.0 gio-2.0
-WANTLIB-gtk += glib-2.0 gobject-2.0 gstreamer-1.0
-WANTLIB-gtk += gtk-3 harfbuzz intl pango-1.0 pangocairo-1.0
-WANTLIB-gtk += re
+WANTLIB-gtk += glib-2.0 gobject-2.0 gtk-3 harfbuzz intl pango-1.0
+WANTLIB-gtk += pangocairo-1.0

-BUILD_DEPENDS = telephony/libzrtp>=0.20170512
+BUILD_DEPENDS = telephony/libzrtp>=0.20221005:build
LIB_DEPENDS-main = audio/libsndfile \
audio/opencore-amr \
audio/opus \
@@ -31,81 +27,19 @@
graphics/ffmpeg \
graphics/png \
multimedia/libv4l \
- multimedia/libvpx>=1.3.0 \
+ multimedia/libvpx \
net/mosquitto \
- telephony/baresip/re>=2.4.0 \
- telephony/baresip/rem>=2.4.0 \
+ telephony/baresip/re>=3.1.0 \
telephony/spandsp
-LIB_DEPENDS-gtk = multimedia/gstreamer1/core \
- telephony/baresip/re>=2.4.0 \
- x11/gtk+3,-main
-RUN_DEPENDS-gtk = telephony/baresip/baresip,-main>=1.1.0
-
-MAKE_ENV += LIBRE_INC=${LOCALBASE}/include/re \
- LIBRE_SO=${LOCALBASE}/lib LIBS="-lm -lrem"
-
-MAKE_FLAGS += MOD_AUTODETECT= \
- EXTRA_MODULES="echo snapshot sndio swscale" \
- USE_MQTT=yes \
- HAVE_LIBV4L2=yes \
- HAVE_SPEEXDSP=yes \
- USE_AMR=yes \
- USE_AVAHI=yes \
- USE_AVCODEC=yes \
- USE_AVFORMAT=yes \
- USE_CONS=yes \
- USE_DTLS=yes \
- USE_DTLS_SRTP=yes \
- USE_FFMPEG=yes \
- USE_G711=yes \
- USE_G722=yes \
- USE_G726=yes \
- USE_GSM=yes \
- USE_GST= \
- USE_H265=yes \
- USE_L16=yes \
- USE_MPA=yes \
- USE_MPG123=yes \
- USE_NETROAM=yes \
- USE_OPUS=yes \
- USE_PLC=yes \
- USE_SDL2=yes \
- USE_SNDFILE=yes \
- USE_SPEEX_AEC=yes \
- USE_SPEEX_PP=yes \
- USE_SRTP=yes \
- USE_STDIO=yes \
- USE_SYSLOG=yes \
- USE_UUID=yes \
- USE_V4L2=yes \
- USE_VPX=yes \
- USE_X11=yes \
- USE_ZRTP=yes
-
-MULTI_PACKAGES = -main -gtk
-PSEUDO_FLAVORS = no_gtk
-FLAVOR ?=
-
-.include <bsd.port.arch.mk>
-
-.if ${FLAVOR:L:Mno_gtk}
-BUILD_PACKAGES := ${BUILD_PACKAGES:N-gtk}
-.endif
-
-.if ${BUILD_PACKAGES:M-gtk}
-MAKE_FLAGS += USE_CAIRO=yes \
- USE_GST=yes \
- USE_GTK=yes
-.endif
-
-TEST_TARGET = test
-NO_TEST = No
+LIB_DEPENDS-gtk = x11/gtk+3,-main
+RUN_DEPENDS-gtk = telephony/baresip/baresip,-main

-do-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/lib/baresip/modules \
- ${PREFIX}/share/baresip
- ${INSTALL_PROGRAM} ${WRKBUILD}/baresip ${PREFIX}/bin
- ${INSTALL_DATA} ${WRKBUILD}/*.so ${PREFIX}/lib/baresip/modules
- ${INSTALL_DATA} ${WRKBUILD}/share/* ${PREFIX}/share/baresip
+post-extract:
+ # revert https://github.com/baresip/baresip/pull/2422
+ mkdir -p ${WRKSRC}/modules/sndio
+ cp ${FILESDIR}/sndio.c ${FILESDIR}/CMakeLists.txt ${WRKSRC}/modules/sndio/
+ # do the symlink dance so that cmake finds static libzrtpcppcore.a & private headers
+ ln -sf ${WRKDIR}/telephony/libzrtp/ZRTPCPP-2d59090ee244bc4d3a682ad45ae49dc7b4d4dfb7 ${WRKDIR}/ZRTPCPP
+ ln -f ${WRKDIR}/telephony/libzrtp/build-${MACHINE_ARCH}/clients/no_client/libzrtpcppcore.a ${WRKDIR}/ZRTPCPP/clients/no_client/

.include <bsd.port.mk>
Index: baresip/baresip/distinfo
===================================================================
RCS file: /cvs/ports/telephony/baresip/baresip/distinfo,v
retrieving revision 1.20
diff -u -r1.20 distinfo
--- baresip/baresip/distinfo 9 Aug 2022 06:24:01 -0000 1.20
+++ baresip/baresip/distinfo 28 Apr 2023 06:01:39 -0000
@@ -1,2 +1,2 @@
-SHA256 (baresip-2.6.0.tar.gz) = huBM7wiChRXMnmkM8PN9iw8facbYS9jup6cN8FsKynY=
-SIZE (baresip-2.6.0.tar.gz) = 1126329
+SHA256 (baresip-3.1.0.tar.gz) = 3mmCOlTs0Fep/8DKb5s8+VYoSNofFdXfipekrm+Nrzc=
+SIZE (baresip-3.1.0.tar.gz) = 1129043
Index: baresip/baresip/files/CMakeLists.txt
===================================================================
RCS file: baresip/baresip/files/CMakeLists.txt
diff -N baresip/baresip/files/CMakeLists.txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ baresip/baresip/files/CMakeLists.txt 28 Apr 2023 06:01:39 -0000
@@ -0,0 +1,11 @@
+project(sndio)
+
+set(SRCS sndio.c)
+
+if(STATIC)
+ add_library(${PROJECT_NAME} OBJECT ${SRCS})
+else()
+ add_library(${PROJECT_NAME} MODULE ${SRCS})
+endif()
+
+target_link_libraries(${PROJECT_NAME} PRIVATE -lsndio)
Index: baresip/baresip/files/sndio.c
===================================================================
RCS file: baresip/baresip/files/sndio.c
diff -N baresip/baresip/files/sndio.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ baresip/baresip/files/sndio.c 28 Apr 2023 06:01:39 -0000
@@ -0,0 +1,327 @@
+/**
+ * @file sndio.c SndIO sound driver
+ *
+ * Copyright (C) 2014 Alfred E. Heggestad
+ */
+#include <stdlib.h>
+#include <string.h>
+#include <sndio.h>
+#include <pthread.h>
+#include <re.h>
+#include <rem.h>
+#include <baresip.h>
+
+
+/**
+ * @defgroup sndio sndio
+ *
+ * This module implements audio driver for OpenBSD sndio
+ */
+
+
+struct ausrc_st {
+ struct sio_hdl *hdl;
+ pthread_t thread;
+ int16_t *sampv;
+ size_t sampc;
+ int run;
+ ausrc_read_h *rh;
+ void *arg;
+ struct ausrc_prm prm;
+};
+
+struct auplay_st {
+ struct sio_hdl *hdl;
+ pthread_t thread;
+ int16_t *sampv;
+ size_t sampc;
+ int run;
+ auplay_write_h *wh;
+ void *arg;
+ struct auplay_prm prm;
+};
+
+static struct ausrc *ausrc;
+static struct auplay *auplay;
+
+
+static struct sio_par *sndio_initpar(uint32_t srate, uint8_t ch)
+{
+ struct sio_par *par = NULL;
+
+ if ((par = mem_zalloc(sizeof(*par), NULL)) == NULL)
+ return NULL;
+
+ sio_initpar(par);
+
+ /* sndio doesn't support a-low and u-low */
+ par->bits = 16;
+ par->bps = SIO_BPS(par->bits);
+ par->sig = 1;
+ par->le = SIO_LE_NATIVE;
+
+ par->rchan = ch;
+ par->pchan = ch;
+ par->rate = srate;
+
+ return par;
+}
+
+
+static void *read_thread(void *arg)
+{
+ struct ausrc_st *st = arg;
+
+ if (!sio_start(st->hdl)) {
+ warning("sndio: could not start record\n");
+ goto out;
+ }
+
+ while (st->run) {
+ struct auframe af;
+ size_t n = sio_read(st->hdl, st->sampv, st->sampc*2);
+
+ auframe_init(&af, AUFMT_S16LE, st->sampv, n/2,
+ st->prm.srate, st->prm.ch);
+
+ st->rh(&af, st->arg);
+ }
+
+ out:
+ return NULL;
+}
+
+
+static void *write_thread(void *arg)
+{
+ struct auplay_st *st = arg;
+ struct auframe af;
+
+ if (!sio_start(st->hdl)) {
+ warning("sndio: could not start playback\n");
+ goto out;
+ }
+
+ auframe_init(&af, AUFMT_S16LE, st->sampv, st->sampc, st->prm.srate,
+ st->prm.ch);
+
+ while (st->run) {
+ st->wh(&af, st->arg);
+
+ sio_write(st->hdl, st->sampv, st->sampc*2);
+ }
+
+ out:
+ return NULL;
+}
+
+
+static void ausrc_destructor(void *arg)
+{
+ struct ausrc_st *st = arg;
+
+ if (st->run) {
+ st->run = false;
+ (void)pthread_join(st->thread, NULL);
+ }
+
+ if (st->hdl)
+ sio_close(st->hdl);
+
+ mem_deref(st->sampv);
+}
+
+
+static void auplay_destructor(void *arg)
+{
+ struct auplay_st *st = arg;
+
+ if (st->run) {
+ st->run = false;
+ (void)pthread_join(st->thread, NULL);
+ }
+
+ if (st->hdl)
+ sio_close(st->hdl);
+
+ mem_deref(st->sampv);
+}
+
+
+static int src_alloc(struct ausrc_st **stp, const struct ausrc *as,
+ struct ausrc_prm *prm, const char *device,
+ ausrc_read_h *rh, ausrc_error_h *errh, void *arg)
+{
+ struct ausrc_st *st;
+ struct sio_par *par = NULL;
+ int err;
+ const char *name;
+
+ (void)errh;
+
+ if (!stp || !as || !prm)
+ return EINVAL;
+
+ if (prm->fmt != AUFMT_S16LE) {
+ warning("sndio: source: unsupported sample format (%s)\n",
+ aufmt_name(prm->fmt));
+ return ENOTSUP;
+ }
+
+ name = (str_isset(device)) ? device : SIO_DEVANY;
+
+ if ((st = mem_zalloc(sizeof(*st), ausrc_destructor)) == NULL)
+ return ENOMEM;
+
+ st->rh = rh;
+ st->arg = arg;
+ st->prm = *prm;
+ st->hdl = sio_open(name, SIO_REC, 0);
+
+ if (!st->hdl) {
+ warning("sndio: could not open ausrc device '%s'\n", name);
+ err = EINVAL;
+ goto out;
+ }
+
+ par = sndio_initpar(prm->srate, prm->ch);
+ if (!par) {
+ err = ENOMEM;
+ goto out;
+ }
+
+ if (!sio_setpar(st->hdl, par)) {
+ err = EINVAL;
+ goto out;
+ }
+
+ if (!sio_getpar(st->hdl, par)) {
+ err = EINVAL;
+ goto out;
+ }
+
+ st->sampc = par->bufsz / 2;
+
+ st->sampv = mem_alloc(2 * st->sampc, NULL);
+ if (!st->sampv) {
+ err = ENOMEM;
+ goto out;
+ }
+
+ st->run = true;
+ err = pthread_create(&st->thread, NULL, read_thread, st);
+ if (err)
+ st->run = false;
+
+ out:
+ mem_deref(par);
+ if (err)
+ mem_deref(st);
+ else
+ *stp = st;
+
+ return err;
+}
+
+
+static int play_alloc(struct auplay_st **stp, const struct auplay *ap,
+ struct auplay_prm *prm, const char *device,
+ auplay_write_h *wh, void *arg)
+{
+ struct auplay_st *st;
+ struct sio_par *par = NULL;
+ int err;
+ const char *name;
+
+ if (!stp || !ap || !prm)
+ return EINVAL;
+
+ if (prm->fmt != AUFMT_S16LE) {
+ warning("sndio: playback: unsupported sample format (%s)\n",
+ aufmt_name(prm->fmt));
+ return ENOTSUP;
+ }
+
+ name = (str_isset(device)) ? device : SIO_DEVANY;
+
+ if ((st = mem_zalloc(sizeof(*st), auplay_destructor)) == NULL)
+ return ENOMEM;
+
+ st->wh = wh;
+ st->arg = arg;
+ st->prm = *prm;
+ st->hdl = sio_open(name, SIO_PLAY, 0);
+
+ if (!st->hdl) {
+ warning("sndio: could not open auplay device '%s'\n", name);
+ err = EINVAL;
+ goto out;
+ }
+
+ par = sndio_initpar(prm->srate, prm->ch);
+ if (!par) {
+ err = ENOMEM;
+ goto out;
+ }
+
+ if (!sio_setpar(st->hdl, par)) {
+ err = EINVAL;
+ goto out;
+ }
+
+ if (!sio_getpar(st->hdl, par)) {
+ err = EINVAL;
+ goto out;
+ }
+
+ st->sampc = prm->srate * prm->ch * prm->ptime / 1000;
+
+ st->sampv = mem_alloc(2 * st->sampc, NULL);
+ if (!st->sampv) {
+ err = ENOMEM;
+ goto out;
+ }
+
+ st->run = true;
+ err = pthread_create(&st->thread, NULL, write_thread, st);
+ if (err)
+ st->run = false;
+
+ out:
+ mem_deref(par);
+ if (err)
+ mem_deref(st);
+ else
+ *stp = st;
+
+ return err;
+}
+
+
+static int sndio_init(void)
+{
+ int err = 0;
+
+ err |= ausrc_register(&ausrc, baresip_ausrcl(), "sndio", src_alloc);
+ err |= auplay_register(&auplay, baresip_auplayl(),
+ "sndio", play_alloc);
+
+ return err;
+}
+
+
+static int sndio_close(void)
+{
+ ausrc = mem_deref(ausrc);
+ auplay = mem_deref(auplay);
+
+ return 0;
+}
+
+
+EXPORT_SYM const struct mod_export DECL_EXPORTS(sndio) = {
+ "sndio",
+ "sound",
+ sndio_init,
+ sndio_close
+};
Index: baresip/baresip/patches/patch-Makefile
===================================================================
RCS file: baresip/baresip/patches/patch-Makefile
diff -N baresip/baresip/patches/patch-Makefile
--- baresip/baresip/patches/patch-Makefile 28 Jun 2022 14:13:24 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-Index: Makefile
---- Makefile.orig
-+++ Makefile
-@@ -260,6 +260,7 @@ endif
- endif
-
- LIBS += -lrem -lm
-+LIBS += -pthread
- #LIBS += -L$(SYSROOT)/lib
-
- ifeq ($(OS),win32)
Index: baresip/baresip/patches/patch-cmake_modules_cmake
===================================================================
RCS file: baresip/baresip/patches/patch-cmake_modules_cmake
diff -N baresip/baresip/patches/patch-cmake_modules_cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ baresip/baresip/patches/patch-cmake_modules_cmake 28 Apr 2023 06:01:39 -0000
@@ -0,0 +1,28 @@
+Index: cmake/modules.cmake
+--- cmake/modules.cmake.orig
++++ cmake/modules.cmake
+@@ -12,14 +12,11 @@ find_package(GIO)
+ find_package(GST)
+ find_package(GTK3)
+ find_package(GZRTP)
+-find_package(JACK)
+ find_package(MOSQUITTO)
+ find_package(MPA)
+ find_package(OPENSLES)
+ find_package(OPUS)
+ find_package(PNG)
+-find_package(PORTAUDIO)
+-find_package(PULSE)
+ find_package(SDL)
+ find_package(SNDFILE)
+ find_package(SPANDSP)
+@@ -175,6 +172,9 @@ if(X11_XShm_FOUND)
+ endif()
+ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ list(APPEND MODULES evdev)
++endif()
++if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
++ list(APPEND MODULES sndio)
+ endif()
+ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ list(APPEND MODULES audiounit)
Index: baresip/baresip/patches/patch-mk_modules_mk
===================================================================
RCS file: baresip/baresip/patches/patch-mk_modules_mk
diff -N baresip/baresip/patches/patch-mk_modules_mk
--- baresip/baresip/patches/patch-mk_modules_mk 9 Aug 2022 06:24:01 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-otherwise echo tries to link twice its objfile and that results in conflicting exports
-
-Index: mk/modules.mk
---- mk/modules.mk.orig
-+++ mk/modules.mk
-@@ -175,7 +175,6 @@ MODULES += contact
- MODULES += ctrl_tcp
- MODULES += debug_cmd
- MODULES += ebuacip
--MODULES += echo
- MODULES += fakevideo
- MODULES += httpd
- MODULES += ice
Index: baresip/baresip/patches/patch-modules_gtk_CMakeLists_txt
===================================================================
RCS file: baresip/baresip/patches/patch-modules_gtk_CMakeLists_txt
diff -N baresip/baresip/patches/patch-modules_gtk_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ baresip/baresip/patches/patch-modules_gtk_CMakeLists_txt 28 Apr 2023 06:01:39 -0000
@@ -0,0 +1,13 @@
+make sure gtk3 libs are foud
+fallout from https://github.com/baresip/baresip/pull/2506/ ?
+Index: modules/gtk/CMakeLists.txt
+--- modules/gtk/CMakeLists.txt.orig
++++ modules/gtk/CMakeLists.txt
+@@ -9,6 +9,7 @@ else()
+ endif()
+
+ add_definitions(${GTK3_CFLAGS} ${GTK3_CFLAGS_OTHER})
++target_link_directories(${PROJECT_NAME} PRIVATE ${GTK3_LIBRARY_DIRS})
+ target_link_libraries(${PROJECT_NAME} PRIVATE ${GTK3_LIBRARIES})
+
+ target_compile_options(${PROJECT_NAME} PRIVATE
Index: baresip/baresip/patches/patch-modules_x11_CMakeLists_txt
===================================================================
RCS file: baresip/baresip/patches/patch-modules_x11_CMakeLists_txt
diff -N baresip/baresip/patches/patch-modules_x11_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ baresip/baresip/patches/patch-modules_x11_CMakeLists_txt 28 Apr 2023 06:01:39 -0000
@@ -0,0 +1,10 @@
+Index: modules/x11/CMakeLists.txt
+--- modules/x11/CMakeLists.txt.orig
++++ modules/x11/CMakeLists.txt
+@@ -8,5 +8,5 @@ else()
+ add_library(${PROJECT_NAME} MODULE ${SRCS})
+ endif()
+
+-target_include_directories(${PROJECT_NAME} PRIVATE ${X11_INCLUDE_DIR})
++target_include_directories(${PROJECT_NAME} PRIVATE ${X11_Xlib_INCLUDE_PATH})
+ target_link_libraries(${PROJECT_NAME} PRIVATE ${X11_LIBRARIES})
Index: baresip/baresip/patches/patch-modules_zrtp_module_mk
===================================================================
RCS file: baresip/baresip/patches/patch-modules_zrtp_module_mk
diff -N baresip/baresip/patches/patch-modules_zrtp_module_mk
--- baresip/baresip/patches/patch-modules_zrtp_module_mk 11 Mar 2022 19:58:29 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-Index: modules/zrtp/module.mk
---- modules/zrtp/module.mk.orig
-+++ modules/zrtp/module.mk
-@@ -18,7 +18,7 @@
-
- MOD := zrtp
- $(MOD)_SRCS += zrtp.c
--$(MOD)_LFLAGS += -lzrtp -lbn
-+$(MOD)_LFLAGS += -lzrtp
- $(MOD)_CFLAGS += -isystem /usr/local/include/libzrtp
- $(MOD)_CFLAGS += -Wno-strict-prototypes -Wno-zero-length-array
-
Index: baresip/baresip/patches/patch-src_config_c
===================================================================
RCS file: /cvs/ports/telephony/baresip/baresip/patches/patch-src_config_c,v
retrieving revision 1.21
diff -u -r1.21 patch-src_config_c
--- baresip/baresip/patches/patch-src_config_c 12 Aug 2022 20:07:04 -0000 1.21
+++ baresip/baresip/patches/patch-src_config_c 28 Apr 2023 06:01:39 -0000
@@ -1,7 +1,25 @@
Index: src/config.c
--- src/config.c.orig
+++ src/config.c
-@@ -634,7 +634,7 @@ static const char *default_video_device(void)
+@@ -622,7 +622,7 @@ static const char *default_cafile(void)
+ {
+ #if defined (DEFAULT_CAFILE)
+ return DEFAULT_CAFILE;
+-#elif defined (DARWIN) || defined (FREEBSD)
++#elif defined (DARWIN) || defined (FREEBSD) || defined(OPENBSD)
+ return "/etc/ssl/cert.pem";
+ #else
+ return "/etc/ssl/certs/ca-certificates.crt";
+@@ -645,6 +645,8 @@ static const char *default_audio_device(void)
+ #endif
+ #elif defined (FREEBSD)
+ return "alsa,default";
++#elif defined (OPENBSD)
++ return "sndio,default";
+ #elif defined (WIN32)
+ return "winwave,nil";
+ #else
+@@ -660,7 +662,7 @@ static const char *default_video_device(void)
#elif defined (WIN32)
return "dshow,nil";
#else
@@ -10,7 +28,16 @@
#endif
}

-@@ -933,14 +933,14 @@ int config_write_template(const char *file, const stru
+@@ -724,7 +726,7 @@ static int core_config_template(struct re_printf *pf,
+ "#sip_listen\t\t0.0.0.0:5060\n"
+ "#sip_certificate\tcert.pem\n"
+ #if defined (DEFAULT_CAFILE) || defined (DARWIN) || defined (LINUX) \
+- || defined (FREEBSD)
++ || defined (FREEBSD) || defined(OPENBSD)
+ "sip_cafile\t\t%s\n"
+ #else
+ "#sip_cafile\t\t%s\n"
+@@ -966,14 +968,14 @@ int config_write_template(const char *file, const stru
(void)re_fprintf(f, "#module\t\t\t" "httpd" MOD_EXT "\n");

(void)re_fprintf(f, "\n# Audio codec Modules (in order)\n");
@@ -31,8 +58,17 @@
(void)re_fprintf(f, "#module\t\t\t" "codec2" MOD_EXT "\n");

(void)re_fprintf(f, "\n# Audio filter Modules (in encoding order)\n");
-@@ -979,16 +979,16 @@ int config_write_template(const char *file, const stru
- (void)re_fprintf(f, "#module\t\t\t" "pulse" MOD_EXT "\n");
+@@ -998,6 +1000,8 @@ int config_write_template(const char *file, const stru
+ #endif
+ #elif defined (FREEBSD)
+ (void)re_fprintf(f, "module\t\t\t" "alsa" MOD_EXT "\n");
++#elif defined (OPENBSD)
++ (void)re_fprintf(f, "module\t\t\t" "sndio" MOD_EXT "\n");
+ #elif defined (WIN32)
+ (void)re_fprintf(f, "module\t\t\t" "winwave" MOD_EXT "\n");
+ #else
+@@ -1010,16 +1014,16 @@ int config_write_template(const char *file, const stru
+ (void)re_fprintf(f, "#module\t\t\t" "pulse" MOD_EXT"\n");
}
#endif
- (void)re_fprintf(f, "#module\t\t\t" "jack" MOD_EXT "\n");
@@ -53,7 +89,7 @@

(void)re_fprintf(f, "\n# Video filter Modules (in encoding order)\n");
(void)re_fprintf(f, "#module\t\t\t" "selfview" MOD_EXT "\n");
-@@ -1014,7 +1014,7 @@ int config_write_template(const char *file, const stru
+@@ -1045,7 +1049,7 @@ int config_write_template(const char *file, const stru
#ifdef LINUX
(void)re_fprintf(f, "#module\t\t\t" "directfb" MOD_EXT "\n");
#endif
@@ -62,7 +98,7 @@
(void)re_fprintf(f, "#module\t\t\t" "sdl" MOD_EXT "\n");
(void)re_fprintf(f, "#module\t\t\t" "fakevideo" MOD_EXT "\n");

-@@ -1035,8 +1035,8 @@ int config_write_template(const char *file, const stru
+@@ -1066,8 +1070,8 @@ int config_write_template(const char *file, const stru
(void)re_fprintf(f, "#module\t\t\t" "pcp" MOD_EXT "\n");

(void)re_fprintf(f, "\n# Media encryption modules\n");
@@ -70,10 +106,10 @@
- (void)re_fprintf(f, "#module\t\t\t" "dtls_srtp" MOD_EXT "\n");
+ (void)re_fprintf(f, "module\t\t\t" "srtp" MOD_EXT "\n");
+ (void)re_fprintf(f, "module\t\t\t" "dtls_srtp" MOD_EXT "\n");
- (void)re_fprintf(f, "#module\t\t\t" "zrtp" MOD_EXT "\n");
+ (void)re_fprintf(f, "#module\t\t\t" "gzrtp" MOD_EXT "\n");
(void)re_fprintf(f, "\n");

-@@ -1083,8 +1083,8 @@ int config_write_template(const char *file, const stru
+@@ -1114,8 +1118,8 @@ int config_write_template(const char *file, const stru
(void)re_fprintf(f, "ctrl_tcp_listen\t\t0.0.0.0:4444 # ctrl_tcp - "
"TCP interface JSON\n");

Index: baresip/baresip/pkg/PLIST-gtk
===================================================================
RCS file: /cvs/ports/telephony/baresip/baresip/pkg/PLIST-gtk,v
retrieving revision 1.5
diff -u -r1.5 PLIST-gtk
--- baresip/baresip/pkg/PLIST-gtk 9 Aug 2022 06:24:01 -0000 1.5
+++ baresip/baresip/pkg/PLIST-gtk 28 Apr 2023 06:01:39 -0000
@@ -1,5 +1,4 @@
@conflict baresip-gtk2-*
@pkgpath telephony/baresip/baresip,-gtk2
-@so lib/baresip/modules/gst.so
@so lib/baresip/modules/gtk.so
@so lib/baresip/modules/vidinfo.so
Index: baresip/baresip/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/telephony/baresip/baresip/pkg/PLIST-main,v
retrieving revision 1.15
diff -u -r1.15 PLIST-main
--- baresip/baresip/pkg/PLIST-main 12 Aug 2022 20:07:04 -0000 1.15
+++ baresip/baresip/pkg/PLIST-main 28 Apr 2023 06:01:39 -0000
@@ -1,5 +1,6 @@
@pkgpath telephony/baresip/baresip
@bin bin/baresip
+include/baresip.h
lib/baresip/
lib/baresip/modules/
@so lib/baresip/modules/account.so
@@ -9,10 +10,13 @@
@so lib/baresip/modules/aufile.so
@so lib/baresip/modules/auresamp.so
@so lib/baresip/modules/ausine.so
+@so lib/baresip/modules/av1.so
@so lib/baresip/modules/avcodec.so
+@so lib/baresip/modules/avfilter.so
@so lib/baresip/modules/avformat.so
@so lib/baresip/modules/cons.so
@so lib/baresip/modules/contact.so
+@so lib/baresip/modules/ctrl_dbus.so
@so lib/baresip/modules/ctrl_tcp.so
@so lib/baresip/modules/debug_cmd.so
@so lib/baresip/modules/dtls_srtp.so
@@ -22,7 +26,9 @@
@so lib/baresip/modules/g711.so
@so lib/baresip/modules/g722.so
@so lib/baresip/modules/g726.so
+@so lib/baresip/modules/gzrtp.so
@so lib/baresip/modules/httpd.so
+@so lib/baresip/modules/httpreq.so
@so lib/baresip/modules/ice.so
@so lib/baresip/modules/l16.so
@so lib/baresip/modules/menu.so
@@ -35,9 +41,12 @@
@so lib/baresip/modules/natpmp.so
@so lib/baresip/modules/netroam.so
@so lib/baresip/modules/opus.so
+@so lib/baresip/modules/opus_multistream.so
+@so lib/baresip/modules/pcp.so
@so lib/baresip/modules/plc.so
@so lib/baresip/modules/presence.so
@so lib/baresip/modules/rtcpsummary.so
+@so lib/baresip/modules/sdl.so
@so lib/baresip/modules/selfview.so
@so lib/baresip/modules/serreg.so
@so lib/baresip/modules/snapshot.so
@@ -57,7 +66,8 @@
@so lib/baresip/modules/vp9.so
@so lib/baresip/modules/vumeter.so
@so lib/baresip/modules/x11.so
-@so lib/baresip/modules/zrtp.so
+@lib lib/libbaresip.so.${LIBbaresip_VERSION}
+lib/pkgconfig/libbaresip.pc
share/baresip/
share/baresip/autoanswer.wav
share/baresip/busy.wav
Index: baresip/re/Makefile
===================================================================
RCS file: /cvs/ports/telephony/baresip/re/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- baresip/re/Makefile 9 Aug 2022 06:24:01 -0000 1.27
+++ baresip/re/Makefile 28 Apr 2023 06:01:39 -0000
@@ -1,29 +1,9 @@
COMMENT = portable library for real-time communications

-GH_ACCOUNT = baresip
GH_PROJECT = re
-GH_TAGNAME = v2.6.1

-# C11
-COMPILER = base-clang ports-gcc
-COMPILER_LANGS = c
+SHARED_LIBS = re 9.0

-SHARED_LIBS = re 8.0
-CATEGORIES += devel
-
-WANTLIB = crypto pthread ssl z
-
-MAKE_ENV += LIB_SUFFIX=.so.${LIBre_VERSION} V=1
-MAKE_ENV += LIBS="-lssl -lcrypto -lz -lpthread"
-
-ALL_TARGET = libre.a libre.so.${LIBre_VERSION}
-
-NO_TEST = yes
-
-do-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/include/re
- ${INSTALL_DATA} ${WRKBUILD}/include/*.h ${PREFIX}/include/re
- ${INSTALL_DATA} ${WRKBUILD}/libre.a ${PREFIX}/lib
- ${INSTALL_DATA} ${WRKBUILD}/libre.so.${LIBre_VERSION} ${PREFIX}/lib
+WANTLIB = crypto execinfo m pthread ssl z

.include <bsd.port.mk>
Index: baresip/re/distinfo
===================================================================
RCS file: /cvs/ports/telephony/baresip/re/distinfo,v
retrieving revision 1.19
diff -u -r1.19 distinfo
--- baresip/re/distinfo 9 Aug 2022 06:24:01 -0000 1.19
+++ baresip/re/distinfo 28 Apr 2023 06:01:39 -0000
@@ -1,2 +1,2 @@
-SHA256 (re-2.6.1.tar.gz) = Zlyd5RgdTBk9Zn6ZqiPZyTA+DuRY6X6TgGpaXrSaLYE=
-SIZE (re-2.6.1.tar.gz) = 388318
+SHA256 (re-3.1.0.tar.gz) = k5Q8/19trQ1gOVSnGPypnfAoSjO1hLX7a2xeE0E+a+4=
+SIZE (re-3.1.0.tar.gz) = 575558
Index: baresip/re/patches/patch-CMakeLists_txt
===================================================================
RCS file: baresip/re/patches/patch-CMakeLists_txt
diff -N baresip/re/patches/patch-CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ baresip/re/patches/patch-CMakeLists_txt 28 Apr 2023 06:01:39 -0000
@@ -0,0 +1,14 @@
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -586,6 +586,10 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+ list(APPEND SRCS
+ src/net/bsd/brt.c
+ )
++elseif(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
++ list(APPEND SRCS
++ src/net/bsd/brt.c
++ )
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ list(APPEND SRCS
+ src/net/linux/rt.c
Index: baresip/re/patches/patch-Makefile
===================================================================
RCS file: baresip/re/patches/patch-Makefile
diff -N baresip/re/patches/patch-Makefile
--- baresip/re/patches/patch-Makefile 28 Jun 2022 14:07:49 -0000 1.13
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,48 +0,0 @@
-Index: Makefile
---- Makefile.orig
-+++ Makefile
-@@ -30,10 +30,6 @@ else
- VERSION := $(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)-$(VER_PRE)
- endif
-
--MK := mk/re.mk
--
--include $(MK)
--
- # List of modules
- MODULES += sip sipevent sipreg sipsess
- MODULES += uri http httpauth msg websock
-@@ -69,6 +65,10 @@ endif
- INCDIR := $(PREFIX)/include/re
- MKDIR := $(PREFIX)/share/re
- CFLAGS += -Iinclude
-+CFLAGS += \
-+ -DVER_MAJOR=$(VER_MAJOR) \
-+ -DVER_MINOR=$(VER_MINOR) \
-+ -DVER_PATCH=$(VER_PATCH)
-
- MODMKS := $(patsubst %,src/%/mod.mk,$(MODULES))
- SHARED := libre$(LIB_SUFFIX)
-@@ -119,12 +119,12 @@ libre.pc: Makefile
- @echo 'Libs.private: -L$${libdir} -lre ${LIBS}' >> libre.pc
- @echo 'Cflags: -I$${includedir}' >> libre.pc
-
--$(BUILD)/%.o: src/%.c $(BUILD) Makefile $(MK) $(MODMKS)
-+$(BUILD)/%.o: src/%.c $(BUILD) Makefile $(MODMKS)
- @echo " CC $@"
- $(HIDE)$(CC) $(CFLAGS) -c $< -o $@ $(DFLAGS)
-
-
--$(BUILD): Makefile $(MK) $(MODMKS)
-+$(BUILD): Makefile $(MODMKS)
- $(HIDE)mkdir -p $(patsubst %,$(BUILD)/%,$(sort $(dir $(SRCS))))
- $(HIDE)touch $@
-
-@@ -150,7 +150,6 @@ else
- endif
- $(INSTALL) -m 0755 $(STATIC) $(DESTDIR)$(LIBDIR)
- $(INSTALL) -m 0644 libre.pc $(DESTDIR)$(LIBDIR)/pkgconfig
-- $(INSTALL) -m 0644 $(MK) $(DESTDIR)$(MKDIR)
-
- uninstall:
- $(HIDE)rm -rf $(DESTDIR)$(INCDIR)
Index: baresip/re/patches/patch-cmake_re-config_cmake
===================================================================
RCS file: baresip/re/patches/patch-cmake_re-config_cmake
diff -N baresip/re/patches/patch-cmake_re-config_cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ baresip/re/patches/patch-cmake_re-config_cmake 28 Apr 2023 06:01:39 -0000
@@ -0,0 +1,14 @@
+make sure kqueue() is properly detected
+fallout from https://github.com/baresip/re/pull/558
+Index: cmake/re-config.cmake
+--- cmake/re-config.cmake.orig
++++ cmake/re-config.cmake
+@@ -73,7 +73,7 @@ if(UNIX)
+ if(HAVE_EPOLL)
+ list(APPEND RE_DEFINITIONS -DHAVE_EPOLL)
+ endif()
+- check_symbol_exists(kqueue "sys/event.h" HAVE_KQUEUE)
++ check_symbol_exists(kqueue "sys/types.h;sys/event.h" HAVE_KQUEUE)
+ if(HAVE_KQUEUE)
+ list(APPEND RE_DEFINITIONS -DHAVE_KQUEUE)
+ endif()
Index: baresip/re/patches/patch-src_thread_thread_c
===================================================================
RCS file: baresip/re/patches/patch-src_thread_thread_c
diff -N baresip/re/patches/patch-src_thread_thread_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ baresip/re/patches/patch-src_thread_thread_c 28 Apr 2023 06:01:39 -0000
@@ -0,0 +1,23 @@
+Index: src/thread/thread.c
+--- src/thread/thread.c.orig
++++ src/thread/thread.c
+@@ -14,6 +14,7 @@
+ #endif
+ #ifdef HAVE_PTHREAD
+ #include <pthread.h>
++#include <pthread_np.h>
+ #endif
+
+
+@@ -74,7 +75,11 @@ static int handler(void *p)
+ #elif defined(DARWIN)
+ (void)pthread_setname_np(th.name);
+ #elif defined(HAVE_PTHREAD)
++#if defined(OPENBSD)
++ (void)pthread_set_name_np(*th.thr, th.name);
++#else
+ (void)pthread_setname_np(*th.thr, th.name);
++#endif
+ #endif
+
+ return th.func(th.arg);
Index: baresip/re/pkg/PLIST
===================================================================
RCS file: /cvs/ports/telephony/baresip/re/pkg/PLIST,v
retrieving revision 1.6
diff -u -r1.6 PLIST
--- baresip/re/pkg/PLIST 9 Aug 2022 06:24:01 -0000 1.6
+++ baresip/re/pkg/PLIST 28 Apr 2023 06:01:39 -0000
@@ -1,11 +1,13 @@
+@conflict rem-*
+@pkgpath telephony/baresip/rem
include/re/
include/re/re.h
include/re/re_aes.h
+include/re/re_async.h
include/re/re_atomic.h
include/re/re_av1.h
include/re/re_base64.h
include/re/re_bfcp.h
-include/re/re_bitv.h
include/re/re_btrace.h
include/re/re_conf.h
include/re/re_convert.h
@@ -35,6 +37,7 @@
include/re/re_pcp.h
include/re/re_rtmp.h
include/re/re_rtp.h
+include/re/re_rtpext.h
include/re/re_sa.h
include/re/re_sdp.h
include/re/re_sha.h
@@ -56,7 +59,35 @@
include/re/re_turn.h
include/re/re_types.h
include/re/re_udp.h
+include/re/re_unixsock.h
include/re/re_uri.h
include/re/re_websock.h
+include/re/rem.h
+include/re/rem_aac.h
+include/re/rem_au.h
+include/re/rem_aubuf.h
+include/re/rem_auconv.h
+include/re/rem_audio.h
+include/re/rem_aufile.h
+include/re/rem_auframe.h
+include/re/rem_aulevel.h
+include/re/rem_aumix.h
+include/re/rem_auresamp.h
+include/re/rem_autone.h
+include/re/rem_avc.h
+include/re/rem_dsp.h
+include/re/rem_dtmf.h
+include/re/rem_fir.h
+include/re/rem_flv.h
+include/re/rem_g711.h
+include/re/rem_goertzel.h
+include/re/rem_vid.h
+include/re/rem_vidconv.h
+include/re/rem_video.h
+include/re/rem_vidmix.h
+lib/cmake/
+lib/cmake/re/
+lib/cmake/re/re-config.cmake
@static-lib lib/libre.a
@lib lib/libre.so.${LIBre_VERSION}
+lib/pkgconfig/libre.pc
Index: baresip/rem/Makefile
===================================================================
RCS file: /cvs/ports/telephony/baresip/rem/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- baresip/rem/Makefile 9 Aug 2022 06:24:01 -0000 1.14
+++ baresip/rem/Makefile 28 Apr 2023 06:01:39 -0000
@@ -2,7 +2,7 @@

GH_ACCOUNT = baresip
GH_PROJECT = rem
-GH_TAGNAME = v2.6.0
+GH_TAGNAME = v2.12.0
SHARED_LIBS = rem 3.0
CATEGORIES += multimedia devel

Hi,

here's a rather large diff (to apply in telephony/):
- updating baresip & its companion library re to 3.1.0, switching them to cmake
- drops the useless no_gtk PSEUDO_FLAVOR, there's a -gtk subpackage
- drops the dependency on gstreamer (can be readded if needed)
- reinstates the sndio backend dropped upstream
(https://github.com/baresip/baresip/pull/2422), i'll repush it
- updating libzrtp to a new upstream (https://github.com/juha-h/ZRTPCPP)
- dropping rem because it's been merged in re (https://github.com/baresip/baresip/pull/2442)
- dropping restund because its dead upstream, and doesnt build as-is with newer re
- if ppl need a TURN server there's telephony/coturn & telephony/resiprocate,-return

baresip's gzrtp module sadly relies on the internals of libzrtp, so to
make it simple i've made it BDEP on libzrtp:build and do some ln dance
during post-extract so that it finds the static libzrtpcppcore.a and the
private headers it needs. Maybe a bit gross, but works.

in my limited testing baresip still works fine, eg i can connect to my
$WORK sip provider and place/receive calls to/from my cellphone.

feedback & testing welcome. I'll push most of the obvious and non
obnoxious patches upstream.

Landry

No comments:

Post a Comment