diff --git a/net-im/tg_owt/Makefile b/net-im/tg_owt/Makefile index 3b772bbbeef0..b5b3a008645a 100644 --- a/net-im/tg_owt/Makefile +++ b/net-im/tg_owt/Makefile @@ -1,65 +1,66 @@ PORTNAME= tg_owt PORTVERSION= 0.0.20241116 +PORTREVISION= 1 CATEGORIES= net-im MAINTAINER= ports@FreeBSD.org COMMENT= Webrtc library used by telegram-desktop WWW= https://github.com/desktop-app/tg_owt LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= v4l_compat>0:multimedia/v4l_compat \ yasm:devel/yasm LIB_DEPENDS= libabsl_base.so:devel/abseil \ libavformat.so:multimedia/ffmpeg \ libcrc32c.so:devel/crc32c \ libjpeg.so:graphics/jpeg-turbo \ libopenh264.so:multimedia/openh264 \ libopus.so:audio/opus \ libpipewire-0.3.so:multimedia/pipewire \ libprotobuf.so:devel/protobuf \ libsrtp2.so:net/libsrtp2 \ libvpx.so:multimedia/libvpx USES= cmake gl pkgconfig xorg USE_XORG= x11 xcomposite xdamage xrender xrandr xtst USE_GL= gbm gl USE_GITHUB= yes GH_ACCOUNT= desktop-app GH_TAGNAME= 3008950 CMAME_ON= TG_OWT_PACKAGED_BUILD # libyuv cloned from https://chromium.googlesource.com/libyuv/libyuv # when updating port check if hash tag in the submodule was updated GH_TUPLE= osokin:libyuv:04821d1:libyuv/src/third_party/libyuv post-extract: ${RM} -rf \ ${WRKSRC}/src/sdk/android \ ${WRKSRC}/src/sdk/objc \ ${WRKSRC}/src/third_party/abseil-cpp \ ${WRKSRC}/src/third_party/crc32c \ ${WRKSRC}/src/third_party/libsrtp \ ${WRKSRC}/src/third_party/libsrtp_config \ ${WRKSRC}/src/third_party/libvpx \ ${WRKSRC}/src/third_party/openh264 \ ${WRKSRC}/src/third_party/yasm # remove more sources not needed to build telegram-desktop, they are however # required at tg_owt configure-time even though they are not built, see # nice_target_sources()/remove_target_sources() calls in CMakeLists.txt post-configure: ${RM} -rf \ ${WRKSRC}/src/modules/audio_device/android \ ${WRKSRC}/src/modules/audio_device/mac \ ${WRKSRC}/src/modules/audio_device/win \ ${WRKSRC}/src/modules/desktop_capture/mac \ ${WRKSRC}/src/modules/desktop_capture/wayland \ ${WRKSRC}/src/modules/desktop_capture/win \ ${WRKSRC}/src/modules/video_capture/windows \ ${WRKSRC}/src/rtc_base/win \ ${WRKSRC}/src/rtc_base/win32*.h .include diff --git a/net-im/tg_owt/files/patch-src_modules_audio__device_audio__device__impl.cc b/net-im/tg_owt/files/patch-src_modules_audio__device_audio__device__impl.cc new file mode 100644 index 000000000000..798487e3a4a2 --- /dev/null +++ b/net-im/tg_owt/files/patch-src_modules_audio__device_audio__device__impl.cc @@ -0,0 +1,11 @@ +--- src/modules/audio_device/audio_device_impl.cc.orig 2024-12-02 05:33:43 UTC ++++ src/modules/audio_device/audio_device_impl.cc +@@ -141,7 +141,7 @@ int32_t AudioDeviceModuleImpl::CheckPlatform() { + #elif defined(WEBRTC_ANDROID) + platform = kPlatformAndroid; + RTC_LOG(LS_INFO) << "current platform is Android"; +-#elif defined(WEBRTC_LINUX) ++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_FREEBSD) + platform = kPlatformLinux; + RTC_LOG(LS_INFO) << "current platform is Linux"; + #elif defined(WEBRTC_IOS) diff --git a/net-im/tg_owt/files/patch-src_rtc__base_openssl__adapter.cc b/net-im/tg_owt/files/patch-src_rtc__base_openssl__adapter.cc index 0f4becf9578a..7fced0de2d87 100644 --- a/net-im/tg_owt/files/patch-src_rtc__base_openssl__adapter.cc +++ b/net-im/tg_owt/files/patch-src_rtc__base_openssl__adapter.cc @@ -1,12 +1,12 @@ ---- src/rtc_base/openssl_adapter.cc.orig 2023-06-08 13:40:19 UTC +--- src/rtc_base/openssl_adapter.cc.orig 2024-11-16 05:27:29 UTC +++ src/rtc_base/openssl_adapter.cc -@@ -192,7 +192,9 @@ bool OpenSSLAdapter::InitializeSSL() { +@@ -176,7 +176,9 @@ bool OpenSSLAdapter::InitializeSSL() { // Loading the error strings crashes mac_asan. Omit this debugging aid there. SSL_load_error_strings(); #endif +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR < 3) ERR_load_BIO_strings(); +#endif OpenSSL_add_all_algorithms(); RAND_poll(); return true;