git: 884eebddc5c8 - main - multimedia/mswebrtc: Fix build

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Wed, 17 Sep 2025 21:27:38 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=884eebddc5c8ba491d17de30671f4550f5d54965

commit 884eebddc5c8ba491d17de30671f4550f5d54965
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2025-09-17 21:02:03 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2025-09-17 21:02:34 +0000

    multimedia/mswebrtc: Fix build
---
 multimedia/mswebrtc/Makefile                   | 20 +++++++++-----------
 multimedia/mswebrtc/files/patch-CMakeLists.txt |  2 +-
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/multimedia/mswebrtc/Makefile b/multimedia/mswebrtc/Makefile
index 2d40eee0c664..ccab5e749cd9 100644
--- a/multimedia/mswebrtc/Makefile
+++ b/multimedia/mswebrtc/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	mswebrtc
 DISTVERSION=	5.4.0
+PORTREVISION=	1
 CATEGORIES=	multimedia net
 
 MAINTAINER=	bofh@FreeBSD.org
@@ -9,13 +10,9 @@ WWW=		https://www.linphone.org/technical-corner/mediastreamer2.html
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BUILD_DEPENDS=	${LOCALBASE}/lib/libbctoolbox.a:net/bctoolbox \
-		${LOCALBASE}/lib/libbcunit.a:devel/bcunit \
-		${LOCALBASE}/lib/libbcmatroska2.a:multimedia/bcmatroska2 \
-		${LOCALBASE}/lib/libbzrtp.a:security/bzrtp \
-		${LOCALBASE}/lib/libmediastreamer2.a:net/mediastreamer \
-		${LOCALBASE}/lib/libortp.a:net/ortp \
-		v4l_compat>=1.0.20120501:multimedia/v4l_compat
+BUILD_DEPENDS=	v4l_compat>=1.0.20120501:multimedia/v4l_compat
+LIB_DEPENDS=	libbctoolbox.so:net/bctoolbox \
+		libmediastreamer2.so:net/mediastreamer
 
 USES=		cmake compiler:c++11-lib
 USE_GITLAB=	yes
@@ -23,10 +20,11 @@ GL_SITE=	https://gitlab.linphone.org/BC
 GL_ACCOUNT=	public
 GL_TUPLE=	https://gitlab.linphone.org/BC/public:external:webrtc:583acd27665cfadef8ab03eb85a768d308bd29dd:webrtc/webrtc
 
-CMAKE_ARGS=	-DENABLE_STATIC=NO
-PLIST_FILES=	lib/libmswebrtc.a
+CMAKE_ON=	BUILD_SHARED_LIBS
 
-post-patch:
-	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/CMakeLists.txt
+PLIST_FILES=	lib/mediastreamer/plugins/libmswebrtc.so
+
+#post-patch:
+#	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/CMakeLists.txt
 
 .include <bsd.port.mk>
diff --git a/multimedia/mswebrtc/files/patch-CMakeLists.txt b/multimedia/mswebrtc/files/patch-CMakeLists.txt
index b53f3138a053..f5b43415ae5f 100644
--- a/multimedia/mswebrtc/files/patch-CMakeLists.txt
+++ b/multimedia/mswebrtc/files/patch-CMakeLists.txt
@@ -9,7 +9,7 @@ i386 target on BSDs doesn't include SSE2 by default
 +find_package(OpenSSL REQUIRED)
  find_package(BCToolbox 5.3.0 REQUIRED)
 +find_package(ZLIB REQUIRED)
-+set(CMAKE_PREFIX_PATH "/usr/local/ffmpeg4;/usr/local/ffmpeg4/libexec")
++set(CMAKE_PREFIX_PATH "%%LOCALBASE%%/ffmpeg4;%%LOCALBASE%%/ffmpeg4/libexec")
  find_package(Mediastreamer2 5.3.0 REQUIRED)
  
  find_library(LIBM NAMES m)