Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
0291fe93 by Steve Lhomme at 2026-02-02T10:45:13+00:00
contrib: nfs: depend on gnutls

It is necessary on Linux and someday on BSD. We just enable it for everyone.

(cherry picked from commit bf03bd51bad3faa19b8e1ab4abfc8fc7fcc2b430)

- - - - -
1709526f by Khalid Masum at 2026-02-02T10:45:13+00:00
contrib: nfs: require gnutls

Without this patch, building vlc fails with:
"libnfs.so: undefined reference to gnutls_XXX"

(cherry picked from commit f6db0ac6acc9ca41def18a2758f7b3b27e0e7606)

- - - - -
10fdfe40 by Steve Lhomme at 2026-02-02T10:45:13+00:00
contrib: nfs: fix compilation with older Linux kernels

(cherry picked from commit d8bd55bd235ec375a13fd91898985132a70b48bc)

- - - - -
7b0f395a by Steve Lhomme at 2026-02-02T10:45:13+00:00
codec: don't build modules that only contain video encoders if sout is disabled

This is already the case for many of them.

(cherry picked from commit a264d13638d43908acbf7b7a01ab2674aa425438) (edited)
edited:
- 3.0 doesn't have rav1e

- - - - -
74f239c9 by Steve Lhomme at 2026-02-02T10:45:13+00:00
contrib: x265: check the compiler flag for .S files with the C++ compiler

That's what is used to compile those files.

(cherry picked from commit 1f9383c17987f597b64cb91b192e54ad4b1db82d)

- - - - -
ea3c709c by Steve Lhomme at 2026-02-02T10:45:13+00:00
contrib: x265: keep -lpthread in the pkg-config file

- - - - -


8 changed files:

- 
contrib/src/nfs/0001-cmake-export-the-necessary-library-in-the-pkg-config.patch
- + 
contrib/src/nfs/0007-tls-add-support-for-kernel-without-TLS_1_3_VERSION.patch
- + contrib/src/nfs/0008-tls-define-TLS_RX-if-it-s-missing.patch
- contrib/src/nfs/rules.mak
- 
contrib/src/x265/0001-CMake-verify-the-Neon-SVE-compiler-flags-can-be-used.patch
- + contrib/src/x265/0010-CMake-allow-lpthread-in-the-pkg-config-file.patch
- contrib/src/x265/rules.mak
- modules/codec/Makefile.am


Changes:

=====================================
contrib/src/nfs/0001-cmake-export-the-necessary-library-in-the-pkg-config.patch
=====================================
@@ -1,39 +1,59 @@
-From 49de343b66783e172a0a3f294d2946b62f06101a Mon Sep 17 00:00:00 2001
+From 8615adc07b66c78a12211324ff0992afe4be79cf Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <[email protected]>
 Date: Mon, 16 Dec 2024 11:46:16 +0100
 Subject: [PATCH] cmake: export the necessary library in the pkg-config file
 
 That includes gnutls on Linux if it's used.
+
+Co-authored-by: Khalid Masum <[email protected]>
 ---
- CMakeLists.txt        | 3 +++
- cmake/libnfs.pc.cmake | 2 +-
- 2 files changed, 4 insertions(+), 1 deletion(-)
+ CMakeLists.txt        | 11 ++++++++++-
+ cmake/libnfs.pc.cmake |  4 ++--
+ 2 files changed, 12 insertions(+), 3 deletions(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1b94d2e..f2cf51d 100644
+index 1b94d2e..aa64acb 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -155,6 +155,9 @@ install(FILES cmake/FindNFS.cmake
+@@ -86,7 +86,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
+     else()
+       message(STATUS "Using ${GNUTLS_LIBRARIES}")
+       add_definitions(-DHAVE_TLS)
+-      list(APPEND SYSTEM_LIBRARIES ${GNUTLS_LIBRARIES})
++      list(APPEND REQUIRED_LIBRARIES "gnutls")
+       add_subdirectory(tls)
+     endif()
+   endif()
+@@ -155,6 +155,15 @@ install(FILES cmake/FindNFS.cmake
          DESTINATION ${INSTALL_CMAKE_DIR})
  
  # handle pc-config files
++set(PKG_LIBLIST "")
 +foreach(LIB ${SYSTEM_LIBRARIES})
-+  list(APPEND PKG_LIBLIST "-l${LIB}")
++  if(IS_ABSOLUTE ${LIB} AND EXISTS ${LIB})
++    list(APPEND PKG_LIBLIST "${LIB}")
++  else()
++    list(APPEND PKG_LIBLIST "-l${LIB}")
++  endif()
 +endforeach()
++string(REPLACE ";" " " PKG_REQUIRED_LIBRARIES "${REQUIRED_LIBRARIES}")
  configure_file(cmake/libnfs.pc.cmake
                 ${CMAKE_CURRENT_BINARY_DIR}/libnfs.pc @ONLY)
  
 diff --git a/cmake/libnfs.pc.cmake b/cmake/libnfs.pc.cmake
-index 8a4e11e..783c2e3 100644
+index 8a4e11e..1699df7 100644
 --- a/cmake/libnfs.pc.cmake
 +++ b/cmake/libnfs.pc.cmake
-@@ -10,5 +10,5 @@ Description: libnfs is a client library for accessing NFS 
shares over a network.
+@@ -8,7 +8,7 @@ includedir=@INSTALL_INC_DIR@
+ Name: libnfs
+ Description: libnfs is a client library for accessing NFS shares over a 
network.
  Version: @PROJECT_VERSION@
- Requires:
+-Requires:
++Requires: @PKG_REQUIRED_LIBRARIES@
  Conflicts:
 -Libs: -L${libdir} -lnfs
 +Libs: -L${libdir} -lnfs @PKG_LIBLIST@
  Cflags: -I${includedir}
 -- 
-2.45.0.windows.1
+2.45.1.windows.1
 


=====================================
contrib/src/nfs/0007-tls-add-support-for-kernel-without-TLS_1_3_VERSION.patch
=====================================
@@ -0,0 +1,50 @@
+From 10a4fe89df7d2780a2e8711d908568f34b5e7d50 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <[email protected]>
+Date: Fri, 16 Jan 2026 11:55:17 +0100
+Subject: [PATCH 7/8] tls: add support for kernel without TLS_1_3_VERSION
+
+810ef615eac7b5e8c8da9619016e0d8cc18c81ea assumed Kernel 5.10+ would be used.
+---
+ tls/ktls.c | 20 ++++++++++++++++----
+ 1 file changed, 16 insertions(+), 4 deletions(-)
+
+diff --git a/tls/ktls.c b/tls/ktls.c
+index ae277d7..eeba9d0 100644
+--- a/tls/ktls.c
++++ b/tls/ktls.c
+@@ -125,16 +125,28 @@ static int ktls_setsockopt(int sock, bool read, const 
void *info, socklen_t info
+ #define tls12_crypto_info_AES_CCM_128                 
tls12_crypto_info_aes_ccm_128
+ #define tls12_crypto_info_CHACHA20_POLY1305   
tls12_crypto_info_chacha20_poly1305
+ 
+-#define GENERATE_SET_CRYPTO_INFO(CIPHER)                              \
+-static int ktls_set_##CIPHER##_info(gnutls_session_t session)                 
\
+-{                                                                     \
++#ifdef TLS_1_3_VERSION
++#define GENERATE_TLS_INFO(CIPHER)                             \
+       const bool is_tls12 =                                           \
+               (gnutls_protocol_get_version(session) == GNUTLS_TLS1_2);\
+       struct tls12_crypto_info_##CIPHER info = {                      \
+               .info.version           = (is_tls12 ? TLS_1_2_VERSION   \
+                                                   : TLS_1_3_VERSION), \
+               .info.cipher_type       = TLS_CIPHER_##CIPHER,          \
+-      };                                                              \
++      };
++#else /* !TLS_1_3_VERSION */
++#define GENERATE_TLS_INFO(CIPHER)                             \
++      const bool is_tls12 =  1;\
++      struct tls12_crypto_info_##CIPHER info = {                      \
++              .info.version           = TLS_1_2_VERSION, \
++              .info.cipher_type       = TLS_CIPHER_##CIPHER,          \
++      };
++#endif /* !TLS_1_3_VERSION */
++
++#define GENERATE_SET_CRYPTO_INFO(CIPHER)                              \
++static int ktls_set_##CIPHER##_info(gnutls_session_t session)                 
\
++{                                                                     \
++      GENERATE_TLS_INFO(CIPHER) \     
+       unsigned char seq_number[12];                                   \
+       gnutls_datum_t cipher_key;                                      \
+       gnutls_datum_t mac_key;                                         \
+-- 
+2.52.0.windows.1
+


=====================================
contrib/src/nfs/0008-tls-define-TLS_RX-if-it-s-missing.patch
=====================================
@@ -0,0 +1,27 @@
+From 2904ad8fb49c070b8350f7b2dfad36f25b35609b Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <[email protected]>
+Date: Tue, 27 Jan 2026 10:32:36 +0100
+Subject: [PATCH 8/8] tls: define TLS_RX if it's missing
+
+---
+ tls/ktls.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/tls/ktls.c b/tls/ktls.c
+index eeba9d0..cb88a78 100644
+--- a/tls/ktls.c
++++ b/tls/ktls.c
+@@ -93,6 +93,10 @@ static bool tls_is_ktls_enabled(gnutls_session_t session 
_U_, bool read _U_)
+ }
+ #endif
+ 
++#ifndef TLS_RX
++#define TLS_RX 2
++#endif
++
+ static int ktls_setsockopt(int sock, bool read, const void *info, socklen_t 
infolen)
+ {
+       const int ret = setsockopt(sock, SOL_TLS, read ? TLS_RX : TLS_TX, info, 
infolen);
+-- 
+2.52.0.windows.1
+


=====================================
contrib/src/nfs/rules.mak
=====================================
@@ -9,6 +9,10 @@ PKGS_FOUND += nfs
 endif
 endif
 
+ifneq ($(findstring gnutls,$(PKGS)),)
+DEPS_nfs = gnutls $(DEPS_gnutls)
+endif
+
 $(TARBALLS)/libnfs-$(NFS_VERSION).tar.gz:
        $(call download_pkg,$(NFS_URL),nfs)
 
@@ -23,6 +27,8 @@ nfs: libnfs-$(NFS_VERSION).tar.gz .sum-nfs
        $(APPLY) $(SRC)/nfs/0004-win32-fix-build-with-MSVC.patch
        $(APPLY) $(SRC)/nfs/0005-win32-don-t-use-pthread-on-Windows.patch
        $(APPLY) 
$(SRC)/nfs/0001-cmake-export-the-necessary-library-in-the-pkg-config.patch
+       $(APPLY) 
$(SRC)/nfs/0007-tls-add-support-for-kernel-without-TLS_1_3_VERSION.patch
+       $(APPLY) $(SRC)/nfs/0008-tls-define-TLS_RX-if-it-s-missing.patch
        $(MOVE)
 
 .nfs: nfs toolchain.cmake


=====================================
contrib/src/x265/0001-CMake-verify-the-Neon-SVE-compiler-flags-can-be-used.patch
=====================================
@@ -1,22 +1,21 @@
-From 5001bc0a608277eba834541e1fef872bce5ef1f2 Mon Sep 17 00:00:00 2001
+From 6948a010ef1110584498549789bceccd01a89de3 Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <[email protected]>
 Date: Thu, 15 Jan 2026 16:12:02 +0100
 Subject: [PATCH 1/2] CMake: verify the Neon/SVE compiler flags can be used
 
 Otherwise we can't compile the matching files.
 ---
- source/CMakeLists.txt | 16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
+ source/CMakeLists.txt | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
 
 diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
-index b83955e9c..a14a7277d 100755
+index b83955e9c..41118fc49 100755
 --- a/source/CMakeLists.txt
 +++ b/source/CMakeLists.txt
-@@ -289,12 +289,20 @@ if(GCC)
+@@ -289,12 +289,19 @@ if(GCC)
              message(STATUS "Configuring build for run-time CPU feature 
detection")
          endif()
  
-+        include(CheckCCompilerFlag)
 +        include(CMakePushCheckState)
          if(AARCH64_RUNTIME_CPU_DETECT OR CROSS_COMPILE_ARM64)
 +            cmake_push_check_state(RESET)
@@ -26,13 +25,13 @@ index b83955e9c..a14a7277d 100755
 -            set(CPU_HAS_NEON_I8MM 1)
 -            set(CPU_HAS_SVE 1)
 -            set(CPU_HAS_SVE2 1)
-+            check_c_compiler_flag(${AARCH64_NEON_DOTPROD_FLAG} 
CPU_HAS_NEON_DOTPROD)
++            check_cxx_compiler_flag(${AARCH64_NEON_DOTPROD_FLAG} 
CPU_HAS_NEON_DOTPROD)
 +            cmake_pop_check_state()
-+            check_c_compiler_flag(${AARCH64_NEON_I8MM_FLAG} CPU_HAS_NEON_I8MM)
++            check_cxx_compiler_flag(${AARCH64_NEON_I8MM_FLAG} 
CPU_HAS_NEON_I8MM)
 +            cmake_pop_check_state()
-+            check_c_compiler_flag(${AARCH64_SVE_FLAG} CPU_HAS_SVE)
++            check_cxx_compiler_flag(${AARCH64_SVE_FLAG} CPU_HAS_SVE)
 +            cmake_pop_check_state()
-+            check_c_compiler_flag(${AARCH64_SVE2_FLAG} CPU_HAS_SVE2)
++            check_cxx_compiler_flag(${AARCH64_SVE2_FLAG} CPU_HAS_SVE2)
 +            cmake_pop_check_state()
          else()
              if(CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin")


=====================================
contrib/src/x265/0010-CMake-allow-lpthread-in-the-pkg-config-file.patch
=====================================
@@ -0,0 +1,31 @@
+From f046444cb59518400902ef0bf89e386623f92f30 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <[email protected]>
+Date: Tue, 27 Jan 2026 15:36:18 +0100
+Subject: [PATCH 10/10] CMake: allow -lpthread in the pkg-config file
+
+If it was used with -lpthread (instead of a -pthread flag for example) it 
should be
+in the pkg-config file.
+
+The cleaner way to use  threading library should be with CMake's FindThread 
[^1] anyway.
+
+[^1]: https://cmake.org/cmake/help/latest/module/FindThreads.html
+---
+ source/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
+index a6ffcc6fd..7a47a7bef 100755
+--- a/source/CMakeLists.txt
++++ b/source/CMakeLists.txt
+@@ -957,7 +957,7 @@ if(X265_LATEST_TAG OR NOT GIT_FOUND)
+     endforeach()
+     if(PLIBLIST)
+         # blacklist of libraries that should not be in Libs.private
+-        list(REMOVE_ITEM PLIBLIST "-lc" "-lpthread" "-lmingwex" "-lmingwthrd"
++        list(REMOVE_ITEM PLIBLIST "-lc" "-lmingwex" "-lmingwthrd"
+             "-lmingw32" "-lmoldname" "-lmsvcrt" "-ladvapi32" "-lshell32"
+             "-luser32" "-lkernel32")
+         string(REPLACE ";" " " PRIVATE_LIBS "${PLIBLIST}")
+-- 
+2.52.0.windows.1
+


=====================================
contrib/src/x265/rules.mak
=====================================
@@ -31,6 +31,7 @@ x265: x265_$(X265_VERSION).tar.gz .sum-x265
        $(APPLY) 
$(SRC)/x265/0001-Fix-libunwind-static-linking-on-Android-toolchains.patch
        $(APPLY) 
$(SRC)/x265/0001-CMake-verify-the-Neon-SVE-compiler-flags-can-be-used.patch
        $(APPLY) $(SRC)/x265/0002-CMake-don-t-force-_WIN32_WINNT-values.patch
+       $(APPLY) 
$(SRC)/x265/0010-CMake-allow-lpthread-in-the-pkg-config-file.patch
        $(call pkg_static,"source/x265.pc.in")
        $(MOVE)
 


=====================================
modules/codec/Makefile.am
=====================================
@@ -533,7 +533,9 @@ libx265_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_x265)
 libx265_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_x265) -rpath '$(codecdir)'
 libx265_plugin_la_LIBADD = $(LIBS_x265)
 EXTRA_LTLIBRARIES += libx265_plugin.la
+if ENABLE_SOUT
 codec_LTLIBRARIES += $(LTLIBx265)
+endif
 
 libx262_plugin_la_SOURCES = codec/x264.c
 libx262_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DMODULE_NAME_IS_x262
@@ -541,7 +543,9 @@ libx262_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_x262)
 libx262_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_x262) -rpath '$(codecdir)'
 libx262_plugin_la_LIBADD = $(LIBS_x262) $(LIBM)
 EXTRA_LTLIBRARIES += libx262_plugin.la
+if ENABLE_SOUT
 codec_LTLIBRARIES += $(LTLIBx262)
+endif
 
 libx264_plugin_la_SOURCES = codec/x264.c
 libx264_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_x264) 
-DMODULE_NAME_IS_x264
@@ -549,7 +553,9 @@ libx264_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_x264)
 libx264_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_x264) -rpath '$(codecdir)'
 libx264_plugin_la_LIBADD = $(LIBS_x264) $(LIBM)
 EXTRA_LTLIBRARIES += libx264_plugin.la
+if ENABLE_SOUT
 codec_LTLIBRARIES += $(LTLIBx264)
+endif
 
 libx26410b_plugin_la_SOURCES = codec/x264.c
 libx26410b_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DMODULE_NAME_IS_x26410b
@@ -557,7 +563,9 @@ libx26410b_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_x26410b)
 libx26410b_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_x26410b) -rpath 
'$(codecdir)'
 libx26410b_plugin_la_LIBADD = $(LIBS_x26410b) $(LIBM)
 EXTRA_LTLIBRARIES += libx26410b_plugin.la
+if ENABLE_SOUT
 codec_LTLIBRARIES += $(LTLIBx26410b)
+endif
 
 
 ### Misc encoders ###



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0761ceecb3dfddd6ac5f237fa310aeab7b0a26ee...ea3c709c10b7125a4e33c551b42a6716f8f55440

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0761ceecb3dfddd6ac5f237fa310aeab7b0a26ee...ea3c709c10b7125a4e33c551b42a6716f8f55440
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to