[vlc-commits] [Git][videolan/vlc][master] 8 commits: contrib: live555: use UNPACK_DIR

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Jul 3 07:20:52 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
077b54ee by Steve Lhomme at 2026-07-03T06:51:21+00:00
contrib: live555: use UNPACK_DIR

- - - - -
ad435562 by Steve Lhomme at 2026-07-03T06:51:21+00:00
contrib: live555: pass the compiler/linker via the command line

- - - - -
8b883b70 by Steve Lhomme at 2026-07-03T06:51:21+00:00
contrib: live555: (almost) build like any other target

- - - - -
b97b53c5 by Steve Lhomme at 2026-07-03T06:51:21+00:00
contrib: live555: simplify pkg-config file generation

Uses less variables.

- - - - -
6e36d572 by Steve Lhomme at 2026-07-03T06:51:21+00:00
contrib: live555: target catalina (10.15) rather than bigsur (11.x)

Since we are targeting 10.11 for macOS.

- - - - -
372f5690 by Steve Lhomme at 2026-07-03T06:51:21+00:00
contrib: add macros to check the GCC version

Similar to the existing one for Clang.

- - - - -
866c3f05 by Steve Lhomme at 2026-07-03T06:51:21+00:00
contrib: live555: build with c++2a on older compilers

- - - - -
b895adbf by Steve Lhomme at 2026-07-03T06:51:21+00:00
contrib: live555: update to 2026.06.24

MSG_NOSIGNAL is properly used in send() and sendto() calls.

It requires a compiler that can handle -std=c++20.

- - - - -


6 changed files:

- contrib/src/live555/SHA512SUMS
- contrib/src/live555/add-pkgconfig-file.patch
- − contrib/src/live555/live555-nosignal.patch
- − contrib/src/live555/mingw-static-libs.patch
- contrib/src/live555/rules.mak
- contrib/src/main.mak


Changes:

=====================================
contrib/src/live555/SHA512SUMS
=====================================
@@ -1 +1 @@
-382544d9d9fe200699669a1f3301efb4ccec0193499c95b532ea923c380b1ec6fa721a4118d36a447ba9df08575f185498f244293c66bbe97cff0482eab033c7  live.2022.07.14.tar.gz
+31b325f406c651e9008367c90937a1dc555588f76a0aaa820edb62ccfed3bb9f46d42fae4fe62f8812c7f25d0a3eeb13a8267b84130dfee7a25ab74f5d94c57a  live.2026.06.24.tar.gz


=====================================
contrib/src/live555/add-pkgconfig-file.patch
=====================================
@@ -11,7 +11,7 @@ diff --git a/Makefile.tail b/Makefile.tail
 -install:
 +install_shared_libraries:
 +	install -d $(DESTDIR)$(LIBDIR)/pkgconfig
-+	sed "s#@PREFIX@#$(PREFIX)#;s#@LIBDIR@#$(LIBDIR)#;s#@VERSION@#$(VERSION)#" live555.pc.in > $(DESTDIR)$(LIBDIR)/pkgconfig/live555.pc
++	sed "s#@PREFIX@#$(PREFIX)#;s#@VERSION@#$(VERSION)#" live555.pc.in > $(DESTDIR)$(LIBDIR)/pkgconfig/live555.pc
 +	chmod 644 $(DESTDIR)$(LIBDIR)/pkgconfig/live555.pc
 +
 +install: $(INSTALL2)
@@ -22,7 +22,7 @@ diff --git a/Makefile.tail b/Makefile.tail
 +++ live.2016.07.19/live555.pc.in	2017-01-19 18:46:01.456059400 +0100
 @@ -0,0 +1,9 @@
 +prefix=@PREFIX@
-+libdir=@LIBDIR@
++libdir=${prefix}/lib
 +includedir=${prefix}/include
 +
 +Name: live555


=====================================
contrib/src/live555/live555-nosignal.patch deleted
=====================================
@@ -1,101 +0,0 @@
-Copyright (C) 2015 Rémi Denis-Courmont
-
-Licensed under the terms of the GNU LGPL version 2.1 or later.
-
-diff -ru live555.orig/groupsock/GroupsockHelper.cpp live555/groupsock/GroupsockHelper.cpp
---- live555.orig/groupsock/GroupsockHelper.cpp	2022-06-16 11:14:03.000000000 +0000
-+++ live555/groupsock/GroupsockHelper.cpp	2022-07-16 11:04:10.334840299 +0000
-@@ -47,6 +47,9 @@
- #include <net/if.h>
- #endif
- #include <stdio.h>
-+#ifndef MSG_NOSIGNAL
-+# define MSG_NOSIGNAL 0
-+#endif
- 
- // By default, use INADDR_ANY for the sending and receiving interfaces (IPv4 only):
- ipv4AddressBits SendingInterfaceAddr = INADDR_ANY;
-@@ -447,7 +450,7 @@
- 		    unsigned char* buffer, unsigned bufferSize) {
-   do {
-     SOCKLEN_T dest_len = addressSize(addressAndPort);
--    int bytesSent = sendto(socket, (char*)buffer, bufferSize, 0,
-+    int bytesSent = sendto(socket, (char*)buffer, bufferSize, MSG_NOSIGNAL,
- 			   (struct sockaddr const*)&addressAndPort, dest_len);
-     if (bytesSent != (int)bufferSize) {
-       char tmpBuf[100];
-diff -ru live555.orig/liveMedia/RTPInterface.cpp live555/liveMedia/RTPInterface.cpp
---- live555.orig/liveMedia/RTPInterface.cpp	2022-06-16 11:14:03.000000000 +0000
-+++ live555/liveMedia/RTPInterface.cpp	2022-07-16 11:05:59.904820188 +0000
-@@ -23,6 +23,9 @@
- #include "RTPInterface.hh"
- #include <GroupsockHelper.hh>
- #include <stdio.h>
-+#ifndef MSG_NOSIGNAL
-+# define MSG_NOSIGNAL 0
-+#endif
- 
- ////////// Helper Functions - Definition //////////
- 
-@@ -382,7 +385,7 @@
- 				      Boolean forceSendToSucceed) {
-   int sendResult = (tlsState != NULL && tlsState->isNeeded)
-     ? tlsState->write((char const*)data, dataSize)
--    : send(socketNum, (char const*)data, dataSize, 0/*flags*/);
-+    : send(socketNum, (char const*)data, dataSize, MSG_NOSIGNAL);
-   if (sendResult < (int)dataSize) {
-     // The TCP send() failed - at least partially.
- 
-@@ -398,7 +401,7 @@
-       makeSocketBlocking(socketNum, RTPINTERFACE_BLOCKING_WRITE_TIMEOUT_MS);
-       sendResult = (tlsState != NULL && tlsState->isNeeded)
- 	? tlsState->write((char const*)(&data[numBytesSentSoFar]), numBytesRemainingToSend)
--	: send(socketNum, (char const*)(&data[numBytesSentSoFar]), numBytesRemainingToSend, 0/*flags*/);
-+	: send(socketNum, (char const*)(&data[numBytesSentSoFar]), numBytesRemainingToSend, MSG_NOSIGNAL);
-       makeSocketNonBlocking(socketNum);
-       if ((unsigned)sendResult != numBytesRemainingToSend) {
- 	// The blocking "send()" failed, or timed out.  In either case, we assume that the
-diff -ru live555.orig/liveMedia/RTSPClient.cpp live555/liveMedia/RTSPClient.cpp
---- live555.orig/liveMedia/RTSPClient.cpp	2022-06-16 11:14:03.000000000 +0000
-+++ live555/liveMedia/RTSPClient.cpp	2022-07-16 11:09:59.856563940 +0000
-@@ -24,6 +24,9 @@
- #include "Locale.hh"
- #include <GroupsockHelper.hh>
- #include "ourMD5.hh"
-+#ifndef MSG_NOSIGNAL
-+# define MSG_NOSIGNAL 0
-+#endif
- 
- RTSPClient* RTSPClient::createNew(UsageEnvironment& env, char const* rtspURL,
- 				  int verbosityLevel,
-@@ -2022,7 +2025,7 @@
-       if (fOutputTLS->isNeeded) {
- 	return fOutputTLS->write(data, count);
-       } else {
--	return send(fOutputSocketNum, data, count, 0);
-+	return send(fOutputSocketNum, data, count, MSG_NOSIGNAL);
-       }
- }
- 
-diff -ru live555.orig/liveMedia/RTSPServer.cpp live555/liveMedia/RTSPServer.cpp
---- live555.orig/liveMedia/RTSPServer.cpp	2022-06-16 11:14:03.000000000 +0000
-+++ live555/liveMedia/RTSPServer.cpp	2022-07-16 11:11:37.086888246 +0000
-@@ -23,6 +23,9 @@
- #include "RTSPRegisterSender.hh"
- #include "Base64.hh"
- #include <GroupsockHelper.hh>
-+#ifndef MSG_NOSIGNAL
-+# define MSG_NOSIGNAL 0
-+#endif
- 
- ////////// RTSPServer implementation //////////
- 
-@@ -976,7 +979,7 @@
-     if (fOutputTLS->isNeeded) {
-         fOutputTLS->write((char const*)fResponseBuffer, numBytesToWrite);
-     } else {
--        send(fClientOutputSocket, (char const*)fResponseBuffer, numBytesToWrite, 0);
-+        send(fClientOutputSocket, (char const*)fResponseBuffer, numBytesToWrite, MSG_NOSIGNAL);
-    }
-     
-     if (playAfterSetup) {


=====================================
contrib/src/live555/mingw-static-libs.patch deleted
=====================================
@@ -1,14 +0,0 @@
-diff -urN live555-orig/config.mingw live555/config.mingw
---- live555-orig/config.mingw	2018-02-26 11:28:41.446443807 +0200
-+++ live555/config.mingw	2018-02-26 11:29:02.453948892 +0200
-@@ -9,8 +9,8 @@
- LINK =                 $(CXX) -o 
- LINK_OPTS =            -L.
- CONSOLE_LINK_OPTS =    $(LINK_OPTS)
--LIBRARY_LINK =         $(LD) -o 
--LIBRARY_LINK_OPTS =    $(LINK_OPTS) -r -Bstatic
-+LIBRARY_LINK =         $(AR) cr 
-+LIBRARY_LINK_OPTS =
- LIB_SUFFIX =                   a
- LIBS_FOR_CONSOLE_APPLICATION = -lws2_32
- LIBS_FOR_GUI_APPLICATION = -lws2_32


=====================================
contrib/src/live555/rules.mak
=====================================
@@ -1,9 +1,25 @@
 # live555
 
-LIVE555_VERSION := 2022.07.14
+LIVE555_VERSION := 2026.06.24
 LIVE555_FILE := live.$(LIVE555_VERSION).tar.gz
 LIVEDOTCOM_URL := $(CONTRIB_VIDEOLAN)/live555/$(LIVE555_FILE)
 
+ifdef HAVE_GCC
+# older GCC doesn't support -std=c++20 required for std::atomic_flag
+ifeq ($(call gcc_at_least, 10), true)
+HAVE_LIVE555_CPP20=1
+endif
+else
+ifdef HAVE_CLANG
+# older CLANG doesn't support -std=c++20 required for std::atomic_flag
+ifeq ($(call clang_at_least, 10), true)
+HAVE_LIVE555_CPP20=1
+endif
+else
+HAVE_LIVE555_CPP20=1
+endif
+endif
+
 ifdef BUILD_NETWORK
 ifdef GNUV3
 PKGS += live555
@@ -34,7 +50,7 @@ LIVE_TARGET := mingw
 LIVE_EXTRA_CFLAGS += -DNO_GETIFADDRS=1
 endif
 ifdef HAVE_DARWIN_OS
-LIVE_TARGET := macosx-bigsur
+LIVE_TARGET := macosx-catalina
 endif
 ifdef HAVE_BSD
 LIVE_TARGET := freebsd
@@ -47,59 +63,55 @@ LIVE_TARGET := solaris-32bit
 endif
 endif
 
+live555: UNPACK_DIR=live
 live555: $(LIVE555_FILE) .sum-live555
-	rm -Rf live && $(UNPACK)
+	rm -rf $(UNPACK_DIR)
+	$(UNPACK)
 
 	# Change permissions to patch and sed the source
-	chmod -R u+w live
+	chmod -R u+w $(UNPACK_DIR)
 	# Remove hardcoded cc, c++, ar variables
-	cd live && sed -e 's%cc%$(CC)%' -e 's%c++%$(CXX)%' -e 's%LIBRARY_LINK =.*ar%LIBRARY_LINK = $(AR)%' -i.orig config.$(LIVE_TARGET)
-	# Replace libtool -s by ar cr for macOS only
-	cd live && sed -i.orig -e s/"libtool -s -o"/"ar cr"/g config.macosx*
-	# Add Extra LDFLAGS for macOS
-	cd live && sed -i.orig -e 's%$(CXX)%$(CXX)\ $(EXTRA_LDFLAGS)%' config.macosx*
-	# Add CXXFLAGS for macOS (force libc++)
-	cd live && sed -i.orig -e 's%^\(CPLUSPLUS_FLAGS.*\)$$%\1 '"$(CXXFLAGS)%" config.macosx*
+	sed -e 's%C_COMPILER%#C_COMPILER%' -e 's%CPLUSPLUS_COMPILER%#CPLUSPLUS_COMPILER%' -e 's%LIBRARY_LINK%#LIBRARY_LINK%' -i.orig $(UNPACK_DIR)/config.$(LIVE_TARGET)
+	# Remove hardcoded --std=c+20 on un supported compilers
+ifndef HAVE_LIVE555_CPP20
+	sed -e 's%std=c++20%std=c++2a -DNO_STD_LIB=1%' -i.orig $(UNPACK_DIR)/config.$(LIVE_TARGET)
+endif
 	# Add the Extra_CFLAGS to all config files
-	cd live && sed -i.orig \
-		-e 's%^\(COMPILE_OPTS.*\)$$%\1 '"$(LIVE_EXTRA_CFLAGS)%" config.*
+	sed -i.orig \
+		-e 's%^\(COMPILE_OPTS.*\)$$%\1 '"$(LIVE_EXTRA_CFLAGS)%" $(UNPACK_DIR)/config.*
 	# We want 64bits offsets and PIC on Linux
-	cd live && sed -e 's%-D_FILE_OFFSET_BITS=64%-D_FILE_OFFSET_BITS=64\ -fPIC\ -DPIC%' -i.orig config.linux
+	sed -e 's%-D_FILE_OFFSET_BITS=64%-D_FILE_OFFSET_BITS=64\ -fPIC\ -DPIC%' -i.orig $(UNPACK_DIR)/config.linux
 	# Disable Locale for Solaris
-	cd live && sed -e 's%-DSOLARIS%-DSOLARIS -DXLOCALE_NOT_USED%' -i.orig config.solaris-*bit
+	sed -e 's%-DSOLARIS%-DSOLARIS -DXLOCALE_NOT_USED%' -i.orig $(UNPACK_DIR)/config.solaris-*bit
 ifdef HAVE_ANDROID
 	# Disable locale on Android too
-	cd live && sed -e 's%-DPIC%-DPIC -DNO_SSTREAM=1 -DLOCALE_NOT_USED -I$(ANDROID_NDK)/platforms/android-$(ANDROID_API)/arch-$(PLATFORM_SHORT_ARCH)/usr/include%' -i.orig config.linux
+	sed -e 's%-DPIC%-DPIC -DNO_SSTREAM=1 -DLOCALE_NOT_USED -I$(ANDROID_NDK)/platforms/android-$(ANDROID_API)/arch-$(PLATFORM_SHORT_ARCH)/usr/include%' -i.orig $(UNPACK_DIR)/config.linux
 endif
-	mv live live.$(LIVE555_VERSION)
-	# Patch for MSG_NOSIGNAL
-	$(APPLY) $(SRC)/live555/live555-nosignal.patch
 	# Add a pkg-config file
 	$(APPLY) $(SRC)/live555/add-pkgconfig-file.patch
 	# Expose Server:
 	$(APPLY) $(SRC)/live555/expose_server_string.patch
-	# Fix creating static libs on mingw
-	$(APPLY) $(SRC)/live555/mingw-static-libs.patch
 	# FormatMessageA is available on all Windows versions, even WinRT
 	$(APPLY) $(SRC)/live555/live555-formatmessage.patch
 	# ifaddrs.h is supported since API level 24
 	$(APPLY) $(SRC)/live555/android-no-ifaddrs.patch
 	# Don't use unavailable off64_t functions
 	$(APPLY) $(SRC)/live555/file-offset-bits-64.patch
-	cd $(UNPACK_DIR) && sed -i.orig "s,LIBRARY_LINK =.*,LIBRARY_LINK = $(AR) cr ,g" config.macosx*
-	mv live.$(LIVE555_VERSION) $@ && touch $@
+	# disable code built/installed in unused folder
+	sed -e 's,all: $$(,all: #,' -e 's,install: $$,install: #,' -e 's,install ,#install ,' -i.orig $(UNPACK_DIR)/testProgs/Makefile.tail
+	sed -e 's,all: $$(,all: #,' -e 's,install: $$,install: #,' -e 's,install ,#install ,' -i.orig $(UNPACK_DIR)/mediaServer/Makefile.tail
+	sed -e 's,all: $$(,all: #,' -e 's,install: $$,install: #,' -e 's,install ,#install ,' -i.orig $(UNPACK_DIR)/proxyServer/Makefile.tail
+	sed -e 's,all: $$(,all: #,' -e 's,install: $$,install: #,' -e 's,install ,#install ,' -i.orig $(UNPACK_DIR)/hlsProxy/Makefile.tail
+	$(MOVE)
 
-LIVE555_SUBDIRS=groupsock liveMedia UsageEnvironment BasicUsageEnvironment
+LIVE555_ENV := $(HOSTVARS) C_COMPILER=$(CC) CPLUSPLUS_COMPILER=$(CXX) LIBRARY_LINK="$(AR) cr " \
+	PREFIX=$(PREFIX) DESTDIR= LIBDIR=$(PREFIX)/lib
 
+.live555: BUILD_DIR=$<
 .live555: live555
 	$(REQUIRE_GNUV3)
-	cd $< && for subdir in $(LIVE555_SUBDIRS); do \
-		echo "PREFIX = $(PREFIX)" >> $$subdir/Makefile.head && \
-		echo "LIBDIR = $(PREFIX)/lib" >> $$subdir/Makefile.head ; done
-	cd $< && echo "LIBDIR = $(PREFIX)/lib" >> Makefile.head && \
-		echo "PREFIX = $(PREFIX)" >> Makefile.head
 	cd $< && ./genMakefiles $(LIVE_TARGET)
-	cd $< && for subdir in $(LIVE555_SUBDIRS); do $(MAKE) $(HOSTVARS) -C $$subdir; done
-	cd $< && for subdir in $(LIVE555_SUBDIRS); do $(MAKE) $(HOSTVARS) -C $$subdir install; done
-	$(MAKE) -C $< install_shared_libraries
+	+$(MAKEBUILD) $(LIVE555_ENV)
+	+$(MAKEBUILD) $(LIVE555_ENV) install
+	+$(MAKEBUILD) $(LIVE555_ENV) install_shared_libraries
 	touch $@


=====================================
contrib/src/main.mak
=====================================
@@ -149,6 +149,12 @@ EXTRA_LDFLAGS += -m32
 endif
 endif
 
+clang_at_least = $(shell echo false)
+clang_at_most  = $(shell echo false)
+clang_major_is = $(shell echo false)
+gcc_at_least = $(shell echo false)
+gcc_at_most  = $(shell echo false)
+gcc_major_is = $(shell echo false)
 ifneq ($(findstring clang, $(shell $(CC) --version 2>/dev/null)),)
 HAVE_CLANG := 1
 CLANG_VERSION := $(shell $(CC) --version | head -1 | grep -o '[0-9]\+\.' | head -1 | cut -d '.' -f 1)
@@ -156,9 +162,13 @@ clang_at_least = $(shell [ $(CLANG_VERSION) -ge $(1) ] && echo true)
 clang_at_most  = $(shell [ $(CLANG_VERSION) -le $(1) ] && echo true)
 clang_major_is = $(shell [ $(CLANG_VERSION) -eq $(1) ] && echo true)
 else
-clang_at_least = $(shell echo false)
-clang_at_most  = $(shell echo false)
-clang_major_is = $(shell echo false)
+ifneq ($(findstring Free Software Foundation, $(shell $(CC) --version 2>/dev/null | head -2 | tail -1)),)
+HAVE_GCC := 1
+GCC_VERSION := $(shell $(CC) --version | head -1 | grep -o '[0-9]\+\.' | head -1 | cut -d '.' -f 1)
+gcc_at_least = $(shell [ $(GCC_VERSION) -ge $(1) ] && echo true)
+gcc_at_most  = $(shell [ $(GCC_VERSION) -le $(1) ] && echo true)
+gcc_major_is = $(shell [ $(GCC_VERSION) -eq $(1) ] && echo true)
+endif
 endif
 
 # -fno-stack-check is a workaround for a possible



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/7c388797614a7adb6613b041c0de17ae609b38fb...b895adbf5f206eadb330fec21c1ee0e092415d10

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/7c388797614a7adb6613b041c0de17ae609b38fb...b895adbf5f206eadb330fec21c1ee0e092415d10
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list