diff --git a/net/liblinphone/Makefile b/net/liblinphone/Makefile index 7c3508f920f9..f8d34545f47d 100644 --- a/net/liblinphone/Makefile +++ b/net/liblinphone/Makefile @@ -1,68 +1,69 @@ PORTNAME= liblinphone DISTVERSION= 5.4.100 +PORTREVISION= 1 CATEGORIES= net MAINTAINER= bofh@FreeBSD.org COMMENT= SIP library supporting voice/video calls and text messaging WWW= https://gitlab.linphone.org/BC/public/liblinphone LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE.txt BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pystache>=0:textproc/py-pystache@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}six>=0:devel/py-six@${PY_FLAVOR} \ doxygen:devel/doxygen \ v4l_compat>=1.0.20120501:multimedia/v4l_compat \ xsd>0:devel/xsd LIB_DEPENDS= \ libbctoolbox.so:net/bctoolbox \ libbelcard.so:deskutils/belcard \ libbelle-sip.so:net/belle-sip \ libbelr.so:textproc/belr \ libbzrtp.so:security/bzrtp \ libjsoncpp.so:devel/jsoncpp \ liblime.so:security/lime \ libmediastreamer2.so:net/mediastreamer \ libortp.so:net/ortp \ libsoci_core.so:databases/soci \ libxerces-c-3.3.so:textproc/xerces-c3 USES= cmake compiler:c++17-lang gnome iconv pkgconfig python:build \ sqlite xorg USE_GITLAB= yes GL_SITE= https://gitlab.linphone.org/BC GL_ACCOUNT= public USE_GNOME= libxml2 USE_LDCONFIG= yes USE_XORG= xfixes CMAKE_ARGS= -DCMAKE_PREFIX_PATH=${LOCALBASE} \ -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DENABLE_DAEMON=NO \ -DENABLE_FLEXIAPI=NO \ -DENABLE_NLS=NO \ -DENABLE_QRCODE=NO \ -DENABLE_STATIC=NO \ -DENABLE_STRICT=NO \ -DENABLE_TOOLS=NO CMAKE_ON= BUILD_SHARED_LIBS CMAKE_OFF= ENABLE_UNIT_TESTS LDFLAGS+= -lpthread OPTIONS_DEFINE= LDAP VIDEO OPTIONS_DEFAULT= LDAP VIDEO OPTIONS_SUB= yes LDAP_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 LDAP_USES= ldap LDAP_CMAKE_BOOL= ENABLE_LDAP VIDEO_CMAKE_BOOL= ENABLE_VIDEO post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/CMakeLists.txt post-install: ${RM} -r ${STAGEDIR}${PREFIX}/share/doc/${DISTNAME} .include diff --git a/net/liblinphone/files/patch-src_db_main-db.cpp b/net/liblinphone/files/patch-src_db_main-db.cpp new file mode 100644 index 000000000000..e3bbb76d6c8b --- /dev/null +++ b/net/liblinphone/files/patch-src_db_main-db.cpp @@ -0,0 +1,55 @@ +--- src/db/main-db.cpp.orig 2026-03-21 15:38:51 UTC ++++ src/db/main-db.cpp +@@ -1884,11 +1884,14 @@ void MainDbPrivate::updateConferenceChatMessageEvent(c + if (state == ChatMessage::State::NotDelivered) { + const auto &meAddress = chatRoom->getMe()->getAddress(); + long long meAddressId = insertSipAddress(meAddress); ++ // Materialize the IDs into local variables first ++ long long msgId = static_cast(chatMessage->getStorageId()); ++ long long addrId = static_cast(meAddressId); ++ + static const string query = + "SELECT chat_message_participant.state FROM chat_message_participant WHERE event_id = :eventId AND " + "chat_message_participant.participant_sip_address_id = :meAddressId"; +- soci::rowset rows = +- (session->prepare << query, soci::use(chatMessage->getStorageId()), soci::use(meAddressId)); ++ soci::rowset rows = (session->prepare << query, soci::use(msgId), soci::use(addrId)); + ChatMessage::State meParticipantState = ChatMessage::State::Idle; + for (const auto &row : rows) { + meParticipantState = static_cast(row.get(0)); +@@ -1911,7 +1914,8 @@ void MainDbPrivate::updateConferenceChatMessageEvent(c + " FROM sip_address, chat_message_participant" + " WHERE event_id = :eventId" + " AND sip_address.id = chat_message_participant.participant_sip_address_id"; +- soci::rowset rows = (session->prepare << query, soci::use(chatMessage->getStorageId())); ++ long long msgStorageId = static_cast(chatMessage->getStorageId()); ++ soci::rowset rows = (session->prepare << query, soci::use(msgStorageId)); + + // Use list of participants the client is sure have received the message and not the actual list of participants + // being part of the chatroom +@@ -5068,10 +5072,11 @@ list> MainDb::getEphemeralMess + L_D(); + list> chatMessages; + auto epoch = d->dbSession.getTimeWithSociIndicator(0); ++ int maxTasks = EPHEMERAL_MESSAGE_TASKS_MAX_NB; + soci::rowset rows = + getBackend() == MainDb::Backend::Sqlite3 + ? (d->dbSession.getBackendSession()->prepare << query, soci::use(epoch.first), +- soci::use(EPHEMERAL_MESSAGE_TASKS_MAX_NB)) ++ soci::use(maxTasks)) + : (d->dbSession.getBackendSession()->prepare << query, soci::use(epoch.first)); + for (const auto &row : rows) { + const long long &dbChatRoomId = d->dbSession.resolveId(row, (int)row.size() - 1); +@@ -5866,9 +5871,11 @@ list> MainDb::getHistoryRangeNear + const EventLogPrivate *dEventLog = event->getPrivate(); + MainDbKeyPrivate *dEventKey = static_cast(dEventLog->dbKey).getPrivate(); + const long long &dbEventId = dEventKey->storageId; ++ long long beforePlusOne = static_cast(before + 1); ++ long long afterPlusOne = static_cast(after + 1); + + soci::rowset rows = (d->dbSession.getBackendSession()->prepare << query, soci::use(dbChatRoomId), +- soci::use(dbEventId), soci::use(before + 1), soci::use(after + 1)); ++ soci::use(dbEventId), soci::use(beforePlusOne), soci::use(afterPlusOne)); + + for (const auto &row : rows) { + shared_ptr event = d->selectGenericConferenceEvent(chatRoom, row);