[vlc-commits] [Git][videolan/vlc][3.0.x] 17 commits: contrib: use winstorecompat when building for Windows Store
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Jan 17 13:38:57 UTC 2025
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
daa0ff26 by Steve Lhomme at 2025-01-16T14:31:50+01:00
contrib: use winstorecompat when building for Windows Store
Many contribs use forbidden APIs that are mapped to valid APIs in the
winstorecompat. We make sure they map to these calls with the define and
linking with the matching library.
(cherry picked from commit 8a7939228feef676cfafd5cd45d2fea9c4bb941f) (rebased)
rebased:
- the code around is slightly different
- - - - -
92c8c6a9 by Steve Lhomme at 2025-01-16T14:32:23+01:00
contrib: gme: switch to github
This is the new official home.
(cherry picked from commit 5e125e3ab3f331dc276219eb30a5cf78af6de4a8) (rebased)
rebased:
- the 3.0 patching around is slightly different
- - - - -
72a3bd87 by Steve Lhomme at 2025-01-16T14:32:24+01:00
contrib: gme: use CMAKE_CXX_IMPLICIT_LINK_LIBRARIES to get the C++ runtime
And since we need to patch the pkg-config, add libm from there as well.
(cherry picked from commit 740d93a609150ec938610ab250dbe8f1e8979c9a) (rebased)
rebased:
- 3.0 already contains the 8205482c3ad8436c244f04b7a09e94b7acf9c66e backport
- - - - -
cf6e1f9e by Steve Lhomme at 2025-01-16T14:32:24+01:00
contrib: gme: use proper patch format for underrun
(cherry picked from commit a57a1c040861b4ec137c3e19161ad4dcc6f93d04)
- - - - -
10964add by Steve Lhomme at 2025-01-16T14:32:24+01:00
contrib: gme: fix -Wl,-l: linker flag escaping in implicit libraries
(cherry picked from commit 3c60f1462213c4b38aba0488378913cc8c6c38f7)
- - - - -
63ed2193 by Steve Lhomme at 2025-01-16T14:32:24+01:00
contrib: chromaprint: use proper patch format for library fixes
(cherry picked from commit 27acbe02e8effd926dab89decb097f1dd8fae630)
- - - - -
eb50de7a by Steve Lhomme at 2025-01-16T14:32:24+01:00
contrib: chromaprint: fix libunwind usage when static linking
It ends up with
- set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "atomic;m;-l:libunwind.a;dl;c;-l:libunwind.a;dl")
- set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "windowsapp;windowsapp;ucrt;windowsapp;ucrtapp;c++;mingw32;-l:libunwind.a;moldname;mingwex;mingw32;-l:libunwind.a;moldname;mingwex")
(cherry picked from commit fe40fb7f4e14c1c6b87b78adf17943f94605f742)
- - - - -
d308bfe6 by Steve Lhomme at 2025-01-16T14:32:24+01:00
contrib: chromaprint: fix -Wl,-l: linker flag escaping in implicit libraries
(cherry picked from commit 17cb1afc962f605484a789f009b185436d69e0e3)
- - - - -
b4c46271 by Steve Lhomme at 2025-01-16T14:32:24+01:00
contrib: srt: use the MOVE call
(cherry picked from commit 252472aa6b4ed54994f1d186718f956234837b1e) (rebased)
rebased:
- the 3.0 patching around is slightly different
- - - - -
163a896c by Steve Lhomme at 2025-01-16T14:32:24+01:00
contrib: srt: disable build if license is not matched
We need nettle and gmp and they can't be used with the LGPLv2 license.
(cherry picked from commit 82faf7932af044cd93c841bc2e53c26216fe0d07) (rebased)
rebased:
- the minimum srt on 3.0 is different
- - - - -
33b3f658 by Johannes Kauffmann at 2025-01-16T14:32:24+01:00
contrib: srt: update to 1.5.2
(cherry picked from commit 2e741d956d39ec261c078c1379fdd51603a1a501) (rebased)
rebased:
- the 3.0 code around is slightly different
- - - - -
f9032333 by Tristan Matthews at 2025-01-16T14:32:24+01:00
contrib: srt: update to 1.5.3
(cherry picked from commit 409e9fc82cac40899daf4923b81a1a4d5de8b767)
- - - - -
8e5a9c8e by Steve Lhomme at 2025-01-16T14:32:24+01:00
contrib: srt: fix -Wl,-l: linker flag escaping in implicit libraries
(cherry picked from commit 248ddae0d5a394f503b632204ec20931f7b8a263)
- - - - -
8795b3c2 by Steve Lhomme at 2025-01-16T14:32:24+01:00
contrib: x265: fix libunwind usage when static linking
It ends up with
- set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "atomic;m;-l:libunwind.a;dl;c;-l:libunwind.a;dl")
- set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "windowsapp;windowsapp;ucrt;windowsapp;ucrtapp;c++;mingw32;-l:libunwind.a;moldname;mingwex;mingw32;-l:libunwind.a;moldname;mingwex")
(cherry picked from commit 517bf7f5c3cd7c1a6742c0f7e23758f3178e201c) (rebased)
rebased:
- the 3.0 patches around are slightly different
- - - - -
1ced7e0c by Steve Lhomme at 2025-01-16T14:32:24+01:00
contrib: x265: use proper patch format for old fixes
(cherry picked from commit 9800e3deada25cd4cf162d034f8c5b358543ae65) (rebased)
rebased:
- the 3.0 patches around are slightly different
- - - - -
38548236 by Steve Lhomme at 2025-01-16T14:32:24+01:00
contrib: x265: fix -Wl,-l: linker flag escaping in implicit libraries
(cherry picked from commit 49eb55d9b9df8b2720e53375a4064368f0b9e3e2)
- - - - -
10aa0e6e by Steve Lhomme at 2025-01-16T14:32:24+01:00
contrib: modplug: reference libc++ for all Clang compilations
Not just the Apple ones.
(cherry picked from commit 7b43acff4f2c342d51a604ae29e34c078e5d188e)
- - - - -
24 changed files:
- contrib/src/chromaprint/linklibs.patch → contrib/src/chromaprint/0001-contribs-chromaprint-more-fixes-for-.pc-file.patch
- contrib/src/chromaprint/0002-add-the-C-runtime-to-the-packages-to-link-to.patch
- contrib/src/chromaprint/rules.mak
- + contrib/src/gme/0001-Export-the-proper-C-runtime-library.patch
- + contrib/src/gme/0001-don-t-skip-negative-fixes-14088.patch
- + contrib/src/gme/0002-link-with-libm-and-set-it-in-pkg-config-when-buildin.patch
- + contrib/src/gme/0003-fix-android-toolchain-broken-CMAKE_CXX_IMPLICIT_LINK.patch
- contrib/src/gme/SHA512SUMS
- − contrib/src/gme/add-libm.patch
- − contrib/src/gme/mac-use-c-stdlib.patch
- contrib/src/gme/rules.mak
- − contrib/src/gme/skip-underrun.patch
- contrib/src/main.mak
- contrib/src/modplug/rules.mak
- − contrib/src/srt/0001-build-always-use-GNUInstallDirs.patch
- + contrib/src/srt/0001-build-fix-implicit-libraries-set-using-Wl-l-libname..patch
- − contrib/src/srt/0001-core-remove-MSG_TRUNC-logging.patch
- contrib/src/srt/SHA512SUMS
- contrib/src/srt/rules.mak
- + contrib/src/x265/0001-Fix-libunwind-static-linking-on-Android-toolchains.patch
- contrib/src/x265/x265-ldl-linking.patch → contrib/src/x265/0001-fix-ldl-linking-error-of-x265.patch
- contrib/src/x265/x265-no-pdb-install.patch → contrib/src/x265/0002-do-not-copy-.pdb-files-that-don-t-exist.patch
- contrib/src/x265/x265-enable-detect512.patch → contrib/src/x265/0003-add-patch-to-enable-detect512.patch
- contrib/src/x265/rules.mak
Changes:
=====================================
contrib/src/chromaprint/linklibs.patch → contrib/src/chromaprint/0001-contribs-chromaprint-more-fixes-for-.pc-file.patch
=====================================
@@ -1,7 +1,21 @@
-diff -urN chromaprint.orig/CMakeLists.txt chromaprint/CMakeLists.txt
---- chromaprint.orig/CMakeLists.txt 2016-12-28 21:10:42.000000000 +0100
-+++ chromaprint/CMakeLists.txt 2017-12-08 14:59:39.000000000 +0100
-@@ -135,12 +135,16 @@
+From e0ef879e98b2aabb2aaf9124b6260d4af5e820d4 Mon Sep 17 00:00:00 2001
+From: Pavlov Konstantin <thresh at videolan.org>
+Date: Fri, 8 Dec 2017 13:12:30 +0100
+Subject: [PATCH 1/2] contribs: chromaprint: more fixes for .pc file.
+
+- Moved AVFFT check: FFMPEG_LIBRARIES might be unset even if
+all needed FFmpeg libraries were found.
+- Added an ability to link with VDSP/Accelerate Framework on macOS.
+---
+ CMakeLists.txt | 4 ++++
+ libchromaprint.pc.cmake | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fd6374e..c14e32b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -135,12 +135,16 @@ endif()
if(FFT_LIB STREQUAL "vdsp")
if(ACCELERATE_LIBRARIES)
set(USE_VDSP ON)
@@ -18,25 +32,18 @@ diff -urN chromaprint.orig/CMakeLists.txt chromaprint/CMakeLists.txt
else()
message(FATAL_ERROR "Selected ${FFT_LIB} for FFT calculations, but the library is not found")
endif()
-diff -urN chromaprint.orig/libchromaprint.pc.cmake chromaprint/libchromaprint.pc.cmake
---- chromaprint.orig/libchromaprint.pc.cmake 2016-12-28 21:10:42.000000000 +0100
-+++ chromaprint/libchromaprint.pc.cmake 2017-12-08 14:56:22.000000000 +0100
-@@ -7,6 +7,6 @@
+diff --git a/libchromaprint.pc.cmake b/libchromaprint.pc.cmake
+index 3799329..120e85d 100644
+--- a/libchromaprint.pc.cmake
++++ b/libchromaprint.pc.cmake
+@@ -7,6 +7,6 @@ Name: ${PROJECT_NAME}
Description: Audio fingerprint library
URL: http://acoustid.org/chromaprint
Version: ${PROJECT_VERSION}
-Libs: -L${LIB_INSTALL_DIR} -lchromaprint
-+Libs: -L${LIB_INSTALL_DIR} -lchromaprint ${CHROMAPRINT_ADDITIONAL_LIBS}
++Libs: -L${LIB_INSTALL_DIR} -lchromaprint @CHROMAPRINT_ADDITIONAL_LIBS@
Cflags: -I${INCLUDE_INSTALL_DIR}
-diff -urN chromaprint.orig/src/fft_lib_avfft.h chromaprint/src/fft_lib_avfft.h
---- chromaprint.orig/src/fft_lib_avfft.h 2016-12-28 21:10:42.000000000 +0100
-+++ chromaprint/src/fft_lib_avfft.h 2017-12-08 14:55:35.000000000 +0100
-@@ -5,6 +5,7 @@
- #define CHROMAPRINT_FFT_LIB_AVFFT_H_
-
- extern "C" {
-+#include <libavutil/mem.h>
- #include <libavcodec/avcodec.h>
- #include <libavcodec/avfft.h>
- #include <libavutil/mem.h>
+--
+2.45.0.windows.1
+
=====================================
contrib/src/chromaprint/0002-add-the-C-runtime-to-the-packages-to-link-to.patch
=====================================
@@ -1,23 +1,30 @@
-From 6726ebef3eec9dcc9d08b2ad6ae352bacb215e5e Mon Sep 17 00:00:00 2001
+From b4075d5b76b3efc717de27db5c093eed1be7a985 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4 at ycbcr.xyz>
Date: Mon, 5 Sep 2022 16:13:05 +0200
Subject: [PATCH 2/2] add the C++ runtime to the packages to link to
gcc needs libstdc++ and clang needs libc++.
---
- CMakeLists.txt | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
+ CMakeLists.txt | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0dbd9bd..67fa620 100644
+index c14e32b..b2545b7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -197,6 +197,21 @@ else()
+@@ -205,6 +205,28 @@ else()
endif()
if(NOT BUILD_FRAMEWORK)
+ foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES})
-+ if (LIB MATCHES "-l.*")
++ if(IS_ABSOLUTE ${LIB} AND EXISTS ${LIB})
++ list(APPEND PKG_CXX_LIBS "${LIB}")
++ elseif(LIB MATCHES "-l:lib.*.a")
++ string(LENGTH ${LIB} LIBLEN)
++ math(EXPR LIBLEN "${LIBLEN}-8")
++ string(SUBSTRING ${LIB} 6 ${LIBLEN} DIRECT_LIB)
++ list(APPEND PKG_CXX_LIBS "-l${DIRECT_LIB}")
++ elseif(LIB MATCHES "-l.*")
+ list(APPEND PKG_CXX_LIBS "${LIB}")
+ else()
+ list(APPEND PKG_CXX_LIBS "-l${LIB}")
@@ -32,8 +39,8 @@ index 0dbd9bd..67fa620 100644
+ set(CHROMAPRINT_ADDITIONAL_LIBS "${CHROMAPRINT_ADDITIONAL_LIBS} ${PKG_LIBS}")
+ endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libchromaprint.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libchromaprint.pc)
- install(
- FILES ${CMAKE_CURRENT_BINARY_DIR}/libchromaprint.pc
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libchromaprint.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+ endif()
--
-2.27.0.windows.1
+2.45.0.windows.1
=====================================
contrib/src/chromaprint/rules.mak
=====================================
@@ -15,7 +15,7 @@ $(TARBALLS)/chromaprint-$(CHROMAPRINT_VERSION).tar.gz:
chromaprint: chromaprint-$(CHROMAPRINT_VERSION).tar.gz .sum-chromaprint
$(UNPACK)
- $(APPLY) $(SRC)/chromaprint/linklibs.patch
+ $(APPLY) $(SRC)/chromaprint/0001-contribs-chromaprint-more-fixes-for-.pc-file.patch
$(APPLY) $(SRC)/chromaprint/0002-add-the-C-runtime-to-the-packages-to-link-to.patch
$(MOVE)
=====================================
contrib/src/gme/0001-Export-the-proper-C-runtime-library.patch
=====================================
@@ -0,0 +1,53 @@
+From a025cafddfa3c9a41625c08c384e90db88507bb5 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Mon, 5 Sep 2022 13:34:41 +0200
+Subject: [PATCH 1/3] Export the proper C++ runtime library
+
+With gcc it's libstdc++, with clang it's libc++. So let CMake give it to use
+and use all the libraries it needs, except some noise from clang toolchains.
+---
+ gme/CMakeLists.txt | 17 +++++++++++++++++
+ gme/libgme.pc.in | 2 +-
+ 2 files changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/gme/CMakeLists.txt b/gme/CMakeLists.txt
+index b1b2bf0..51adade 100644
+--- a/gme/CMakeLists.txt
++++ b/gme/CMakeLists.txt
+@@ -193,6 +193,23 @@ set_target_properties(gme
+ PROPERTIES VERSION ${GME_VERSION}
+ SOVERSION 0)
+
++foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES})
++ if(IS_ABSOLUTE ${LIB} AND EXISTS ${LIB})
++ list(APPEND IMPLICITS_LIST "${LIB}")
++ else()
++ list(APPEND IMPLICITS_LIST "-l${LIB}")
++ endif()
++endforeach()
++if(IMPLICITS_LIST)
++ # blacklist of libraries that should not be in Libs.private
++ list(REMOVE_ITEM IMPLICITS_LIST "-lmingwex"
++ "-lmingw32" "-lmoldname" "-lmsvcrt" "-ladvapi32" "-lshell32"
++ "-luser32" "-lkernel32")
++ string(REPLACE ";" " " PKG_CONFIG_CXXRT "${IMPLICITS_LIST}")
++else()
++ set(PKG_CONFIG_CXXRT "")
++endif(IMPLICITS_LIST)
++
+ # macOS framework build
+ if(BUILD_FRAMEWORK)
+ set_target_properties(gme
+diff --git a/gme/libgme.pc.in b/gme/libgme.pc.in
+index f057ce1..a0e8986 100644
+--- a/gme/libgme.pc.in
++++ b/gme/libgme.pc.in
+@@ -13,4 +13,4 @@ URL: https://bitbucket.org/mpyne/game-music-emu/wiki/Home
+ Version: @GME_VERSION@
+ Cflags: -I${includedir}
+ Libs: -L${libdir} -lgme
+-Libs.private: -lstdc++ @PKG_CONFIG_ZLIB@
++Libs.private: @PKG_CONFIG_CXXRT@ @PKG_CONFIG_ZLIB@
+--
+2.27.0.windows.1
+
=====================================
contrib/src/gme/0001-don-t-skip-negative-fixes-14088.patch
=====================================
@@ -0,0 +1,26 @@
+From f070646738428aa1f237f4c3ab3318db3ed77165 Mon Sep 17 00:00:00 2001
+From: Hannes Domani <ssbssa at yahoo.de>
+Date: Fri, 6 Mar 2015 14:43:45 +0100
+Subject: [PATCH] don't skip negative (fixes #14088)
+
+Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
+---
+ gme/Fir_Resampler.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gme/Fir_Resampler.cpp b/gme/Fir_Resampler.cpp
+index d8dd683..ae5f2df 100644
+--- a/gme/Fir_Resampler.cpp
++++ b/gme/Fir_Resampler.cpp
+@@ -188,6 +188,8 @@ int Fir_Resampler_::skip_input( long count )
+ {
+ int remain = write_pos - buf.begin();
+ int max_count = remain - width_ * stereo;
++ if ( max_count < 0 )
++ return 0;
+ if ( count > max_count )
+ count = max_count;
+
+--
+2.45.0.windows.1
+
=====================================
contrib/src/gme/0002-link-with-libm-and-set-it-in-pkg-config-when-buildin.patch
=====================================
@@ -0,0 +1,41 @@
+From 327bda2f8517f9c35b5a734556a579c1781338fc Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Mon, 5 Sep 2022 13:48:27 +0200
+Subject: [PATCH 2/3] link with libm and set it in pkg-config when building on
+ UNIX
+
+It's exported with PKG_CONFIG_CXXRT
+---
+ gme/CMakeLists.txt | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/gme/CMakeLists.txt b/gme/CMakeLists.txt
+index 51adade..da23ea8 100644
+--- a/gme/CMakeLists.txt
++++ b/gme/CMakeLists.txt
+@@ -210,6 +210,22 @@ else()
+ set(PKG_CONFIG_CXXRT "")
+ endif(IMPLICITS_LIST)
+
++set(TEST_MATH_LINK "#include <math.h>\n
++int main(int argc, char** argv) { return (int)pow(argc, 2.5); }")
++
++check_cxx_source_compiles("${TEST_MATH_LINK}" HAVE_MATH_LIBRARY)
++if(NOT HAVE_MATH_LIBRARY)
++ set(CMAKE_REQUIRED_LIBRARIES "-lm")
++ check_cxx_source_compiles("${TEST_MATH_LINK}" NEEDS_MATH_LIBRARY)
++ unset(CMAKE_REQUIRED_LIBRARIES)
++ if(NEEDS_MATH_LIBRARY)
++ message(STATUS "Adding -lm flag.")
++ target_link_libraries(gme PRIVATE m)
++ set(PKG_CONFIG_CXXRT "${PKG_CONFIG_CXXRT} -lm")
++ endif(NEEDS_MATH_LIBRARY)
++endif()
++
++
+ # macOS framework build
+ if(BUILD_FRAMEWORK)
+ set_target_properties(gme
+--
+2.27.0.windows.1
+
=====================================
contrib/src/gme/0003-fix-android-toolchain-broken-CMAKE_CXX_IMPLICIT_LINK.patch
=====================================
@@ -0,0 +1,36 @@
+From b618db8f750d1201dceb05620978236aa44ce265 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Tue, 6 Sep 2022 11:56:30 +0200
+Subject: [PATCH 3/4] fix android toolchain broken
+ CMAKE_CXX_IMPLICIT_LINK_LIBRARIES
+
+CMake 3.17.0 and Android NDK 25 the CMAKE_CXX_IMPLICIT_LINK_LIBRARIES is
+c++;m;-l:libunwind.a;dl;c;-l:libunwind.a;dl
+
+When it should be
+c++;m;unwind;dl;c;unwind;dl
+---
+ gme/CMakeLists.txt | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/gme/CMakeLists.txt b/gme/CMakeLists.txt
+index da23ea8..cc058c7 100644
+--- a/gme/CMakeLists.txt
++++ b/gme/CMakeLists.txt
+@@ -196,6 +196,13 @@ set_target_properties(gme
+ foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES})
+ if(IS_ABSOLUTE ${LIB} AND EXISTS ${LIB})
+ list(APPEND IMPLICITS_LIST "${LIB}")
++ elseif(LIB MATCHES "-l:lib.*.a")
++ string(LENGTH ${LIB} LIBLEN)
++ math(EXPR LIBLEN "${LIBLEN}-8")
++ string(SUBSTRING ${LIB} 6 ${LIBLEN} DIRECT_LIB)
++ list(APPEND IMPLICITS_LIST "-l${DIRECT_LIB}")
++ elseif(LIB MATCHES "-l.*")
++ list(APPEND IMPLICITS_LIST "${LIB}")
+ else()
+ list(APPEND IMPLICITS_LIST "-l${LIB}")
+ endif()
+--
+2.45.0.windows.1
+
=====================================
contrib/src/gme/SHA512SUMS
=====================================
@@ -1 +1 @@
-4b20c69ced696bb879c34bcb7ce0f5f276642458d4cebca8ede673eed7d50664e527626e2077f85a3411a26660f1b3f01e43cccd72945e1edb2994421efeb552 game-music-emu-0.6.3.tar.xz
+fb4e8026f7b1565ef7884fabfcdedd97546bbe30d3047f06f0487dc752963ea37e5e4320cb0311eabe8fb7ed122f7958c388c7873ccff812fa3b612c9523491e game-music-emu-0.6.3.tar.gz
=====================================
contrib/src/gme/add-libm.patch deleted
=====================================
@@ -1,8 +0,0 @@
---- game-music-emu-0.6.3/gme/libgme.pc.in.old 2022-08-26 08:35:03.000000000 +0200
-+++ game-music-emu-0.6.3/gme/libgme.pc.in 2022-08-26 08:35:18.000000000 +0200
-@@ -13,4 +13,4 @@
- Version: @GME_VERSION@
- Cflags: -I${includedir}
- Libs: -L${libdir} -lgme
--Libs.private: -lstdc++ @PKG_CONFIG_ZLIB@
-+Libs.private: -lstdc++ -lm @PKG_CONFIG_ZLIB@
=====================================
contrib/src/gme/mac-use-c-stdlib.patch deleted
=====================================
@@ -1,8 +0,0 @@
---- game-music-emu/gme/libgme.pc.in.old 2022-08-25 21:46:36.000000000 +0200
-+++ game-music-emu/gme/libgme.pc.in 2022-08-25 21:46:57.000000000 +0200
-@@ -13,4 +13,4 @@
- Version: @GME_VERSION@
- Cflags: -I${includedir}
- Libs: -L${libdir} -lgme
--Libs.private: -lstdc++ -lm @PKG_CONFIG_ZLIB@
-+Libs.private: -lc++ -lm @PKG_CONFIG_ZLIB@
=====================================
contrib/src/gme/rules.mak
=====================================
@@ -1,24 +1,23 @@
# Game Music Emu
GME_VERSION := 0.6.3
-GME_URL := https://bitbucket.org/mpyne/game-music-emu/downloads/game-music-emu-$(GME_VERSION).tar.xz
+GME_URL := $(GITHUB)/libgme/game-music-emu/archive/refs/tags/$(GME_VERSION).tar.gz
PKGS += gme
-$(TARBALLS)/game-music-emu-$(GME_VERSION).tar.xz:
+$(TARBALLS)/game-music-emu-$(GME_VERSION).tar.gz:
$(call download_pkg,$(GME_URL),gme)
DEPS_gme = zlib $(DEPS_zlib)
-.sum-gme: game-music-emu-$(GME_VERSION).tar.xz
+.sum-gme: game-music-emu-$(GME_VERSION).tar.gz
-game-music-emu: game-music-emu-$(GME_VERSION).tar.xz .sum-gme
+game-music-emu: game-music-emu-$(GME_VERSION).tar.gz .sum-gme
$(UNPACK)
- $(APPLY) $(SRC)/gme/skip-underrun.patch
- $(APPLY) $(SRC)/gme/add-libm.patch
-ifdef HAVE_MACOSX
- $(APPLY) $(SRC)/gme/mac-use-c-stdlib.patch
-endif
+ $(APPLY) $(SRC)/gme/0001-don-t-skip-negative-fixes-14088.patch
+ $(APPLY) $(SRC)/gme/0001-Export-the-proper-C-runtime-library.patch
+ $(APPLY) $(SRC)/gme/0002-link-with-libm-and-set-it-in-pkg-config-when-buildin.patch
+ $(APPLY) $(SRC)/gme/0003-fix-android-toolchain-broken-CMAKE_CXX_IMPLICIT_LINK.patch
$(APPLY) $(SRC)/gme/0004-Blip_Buffer-replace-assert-with-a-check.patch
$(call pkg_static,"gme/libgme.pc.in")
$(MOVE)
=====================================
contrib/src/gme/skip-underrun.patch deleted
=====================================
@@ -1,11 +0,0 @@
---- a/gme/Fir_Resampler.cpp 2013-03-17 02:38:55.000000000 +0100
-+++ b/gme/Fir_Resampler.cpp 2015-03-06 14:33:01.061577900 +0100
-@@ -188,6 +188,8 @@
- {
- int remain = write_pos - buf.begin();
- int max_count = remain - width_ * stereo;
-+ if ( max_count < 0 )
-+ return 0;
- if ( count > max_count )
- count = max_count;
-
=====================================
contrib/src/main.mak
=====================================
@@ -164,6 +164,11 @@ EXTRA_LDFLAGS += -m32
endif
endif
+ifdef HAVE_WINSTORE
+EXTRA_CFLAGS += -DWINSTORECOMPAT
+EXTRA_LDFLAGS += -lwinstorecompat
+endif
+
ifneq ($(findstring clang, $(shell $(CC) --version)),)
HAVE_CLANG := 1
endif
=====================================
contrib/src/modplug/rules.mak
=====================================
@@ -20,7 +20,7 @@ libmodplug: libmodplug-$(MODPLUG_VERSION).tar.gz .sum-modplug
$(APPLY) $(SRC)/modplug/modplug-win32-static.patch
$(APPLY) $(SRC)/modplug/macosx-do-not-force-min-version.patch
$(APPLY) $(SRC)/modplug/fix-endianness-check.diff
-ifdef HAVE_MACOSX
+ifdef HAVE_CLANG
$(APPLY) $(SRC)/modplug/mac-use-c-stdlib.patch
endif
$(call pkg_static,"libmodplug.pc.in")
=====================================
contrib/src/srt/0001-build-always-use-GNUInstallDirs.patch deleted
=====================================
@@ -1,41 +0,0 @@
-From e76d61dae5af710317a919f867b9b7a58adf6a39 Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Fri, 2 Sep 2022 09:46:56 +0200
-Subject: [PATCH] [build] always use GNUInstallDirs
-
-It's possible to use GNUInstallDirs and allow the user to force some specific
-target folder. The values set by the user are not overriden in that case [1]:
-
-> If the includer does not define a value the above-shown default will be used
-> and the value will appear in the cache for editing by the user.
-
-With MSVC builds this doesn't change the default values used to install targets.
-
-[1] https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
----
- CMakeLists.txt | 9 +--------
- 1 file changed, 1 insertion(+), 8 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index ce3d0b8..05764e2 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -45,14 +45,7 @@ set_if(POSIX LINUX OR DARWIN OR BSD OR SUNOS OR ANDROID OR (CYGWIN AND CYG
- set_if(SYMLINKABLE LINUX OR DARWIN OR BSD OR SUNOS OR CYGWIN OR GNU)
- set_if(NEED_DESTINATION ${CMAKE_VERSION} VERSION_LESS "3.14.0")
-
--# Not sure what to do in case of compiling by MSVC.
--# This will make installdir in C:\Program Files\SRT then
--# inside "bin" and "lib64" directories. At least this maintains
--# the current status. Shall this be not desired, override values
--# of CMAKE_INSTALL_BINDIR, CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR.
--if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
-- include(GNUInstallDirs)
--endif()
-+include(GNUInstallDirs)
-
- # The CMAKE_BUILD_TYPE seems not to be always set, weird.
- if (NOT DEFINED ENABLE_DEBUG)
---
-2.37.3.windows.1
-
=====================================
contrib/src/srt/0001-build-fix-implicit-libraries-set-using-Wl-l-libname..patch
=====================================
@@ -0,0 +1,33 @@
+From 64157b23fd0359fdbe706a17154be3733fc0deb2 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Fri, 10 Jan 2025 13:04:59 +0100
+Subject: [PATCH] [build] fix implicit libraries set using -Wl,-l:libname.a
+
+We need to turn it to a more generic name in the pkg-config file.
+---
+ CMakeLists.txt | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1492306..49d4869 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1183,7 +1183,14 @@ endif()
+ # obtained by `pkg-config --libs`.
+ if(ENABLE_CXX_DEPS)
+ foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES})
+- if((IS_ABSOLUTE ${LIB} AND EXISTS ${LIB}) OR (${LIB} MATCHES "^-l"))
++ if(IS_ABSOLUTE ${LIB} AND EXISTS ${LIB})
++ set(SRT_LIBS_PRIVATE ${SRT_LIBS_PRIVATE} ${LIB})
++ elseif(${LIB} MATCHES "-l:lib.*.a")
++ string(LENGTH ${LIB} LIBLEN)
++ math(EXPR LIBLEN "${LIBLEN}-8")
++ string(SUBSTRING ${LIB} 6 ${LIBLEN} DIRECT_LIB)
++ set(SRT_LIBS_PRIVATE ${SRT_LIBS_PRIVATE} "-l${DIRECT_LIB}")
++ elseif(${LIB} MATCHES "^-l")
+ set(SRT_LIBS_PRIVATE ${SRT_LIBS_PRIVATE} ${LIB})
+ else()
+ set(SRT_LIBS_PRIVATE ${SRT_LIBS_PRIVATE} "-l${LIB}")
+--
+2.45.0.windows.1
+
=====================================
contrib/src/srt/0001-core-remove-MSG_TRUNC-logging.patch deleted
=====================================
@@ -1,27 +0,0 @@
-From 82a65778b2445d3b310c7fa870cfb6410307d31b Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Fri, 2 Sep 2022 09:12:03 +0200
-Subject: [PATCH] [core] remove MSG_TRUNC logging
-
-The code does not compile on platforms/SDKs where MSG_TRUNC doesn't exist
-(mingw-w64/windows).
----
- srtcore/channel.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/srtcore/channel.cpp b/srtcore/channel.cpp
-index 6d51487..30fd987 100644
---- a/srtcore/channel.cpp
-+++ b/srtcore/channel.cpp
-@@ -878,7 +878,7 @@ srt::EReadStatus srt::CChannel::recvfrom(sockaddr_any& w_addr, CPacket& w_packet
- {
- HLOGC(krlog.Debug,
- log << CONID() << "NET ERROR: packet size=" << recv_size << " msg_flags=0x" << hex << msg_flags
-- << ", possibly MSG_TRUNC (0x" << hex << int(MSG_TRUNC) << ")");
-+ << ", possibly MSG_TRUNC)");
- status = RST_AGAIN;
- goto Return_error;
- }
---
-2.27.0.windows.1
-
=====================================
contrib/src/srt/SHA512SUMS
=====================================
@@ -1 +1 @@
-0d51e0ef73f4aa7eb284288cdbbd75b1c161969c2c2fed3a6d4e13a931341ca41dfcf2d6c1b9728f72b43454a9fde3764da67a27af9f0c99a6818682e4f4d4ba srt-1.4.4.tar.gz
+5b576d6fd325515e05074e4568e3b65d1ae265e3e971db6e6242e5138243fc1594df1e3a7d90962385dac38abc34c4c4b0a567439050f8c0ff818b3b3d497efc srt-1.5.3.tar.gz
=====================================
contrib/src/srt/rules.mak
=====================================
@@ -1,11 +1,22 @@
# srt
-SRT_VERSION := 1.4.4
+SRT_VERSION := 1.5.3
SRT_URL := $(GITHUB)/Haivision/srt/archive/v$(SRT_VERSION).tar.gz
+# gnutls (nettle/gmp) can't be used with the LGPLv2 license
+ifdef GPL
+SRT_PKG=1
+else
+ifdef GNUV3
+SRT_PKG=1
+endif
+endif
+
ifdef BUILD_NETWORK
+ifdef SRT_PKG
PKGS += srt
endif
+endif
ifeq ($(call need_pkg,"srt >= 1.3.1"),)
PKGS_FOUND += srt
@@ -23,10 +34,9 @@ $(TARBALLS)/srt-$(SRT_VERSION).tar.gz:
srt: srt-$(SRT_VERSION).tar.gz .sum-srt
$(UNPACK)
- $(APPLY) $(SRC)/srt/0001-core-remove-MSG_TRUNC-logging.patch
- $(APPLY) $(SRC)/srt/0001-build-always-use-GNUInstallDirs.patch
+ $(APPLY) $(SRC)/srt/0001-build-fix-implicit-libraries-set-using-Wl-l-libname..patch
$(call pkg_static,"scripts/srt.pc.in")
- mv srt-$(SRT_VERSION) $@ && touch $@
+ $(MOVE)
SRT_CONF := -DENABLE_SHARED=OFF -DUSE_ENCLIB=gnutls -DENABLE_CXX11=OFF
=====================================
contrib/src/x265/0001-Fix-libunwind-static-linking-on-Android-toolchains.patch
=====================================
@@ -0,0 +1,31 @@
+From 6e5f1a13bf5abaa1a84a65d6bb4fa3c9eb5fb41a Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Wed, 16 Oct 2024 10:43:58 +0200
+Subject: [PATCH] Fix libunwind static linking on Android toolchains
+
+As well as llvm-mingw with -static-libgcc.
+---
+ source/CMakeLists.txt | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
+index 33b6523f1..4d452e2c0 100644
+--- a/source/CMakeLists.txt
++++ b/source/CMakeLists.txt
+@@ -649,6 +649,13 @@ if(X265_LATEST_TAG)
+ foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES} ${PLATFORM_LIBS})
+ if(IS_ABSOLUTE ${LIB} AND EXISTS ${LIB})
+ list(APPEND PLIBLIST "${LIB}")
++ elseif(${LIB} MATCHES "-l:lib.*.a")
++ string(LENGTH ${LIB} LIBLEN)
++ math(EXPR LIBLEN "${LIBLEN}-8")
++ string(SUBSTRING ${LIB} 6 ${LIBLEN} DIRECT_LIB)
++ list(APPEND PLIBLIST "-l${DIRECT_LIB}")
++ elseif(${LIB} MATCHES "-l.*")
++ list(APPEND PLIBLIST ${LIB})
+ else()
+ list(APPEND PLIBLIST "-l${LIB}")
+ endif()
+--
+2.45.0.windows.1
+
=====================================
contrib/src/x265/x265-ldl-linking.patch → contrib/src/x265/0001-fix-ldl-linking-error-of-x265.patch
=====================================
@@ -1,6 +1,18 @@
---- x265/source/CMakeLists.txt.orig 2022-03-20 16:40:01.560434700 +0000
-+++ x265/source/CMakeLists.txt 2022-03-20 16:41:20.563787600 +0000
-@@ -713,7 +713,7 @@
+From 6a859d8fc1b064dd9db9f5807b95d621604aab7c Mon Sep 17 00:00:00 2001
+From: Gilles Sabourin <gilles.sabourin at free.fr>
+Date: Sun, 10 Jul 2016 15:21:38 +0200
+Subject: [PATCH 1/3] fix ldl linking error of x265
+
+Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
+---
+ source/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
+index 33b6523f1..0ea2487c7 100644
+--- a/source/CMakeLists.txt
++++ b/source/CMakeLists.txt
+@@ -713,7 +713,7 @@ if(ENABLE_CLI)
if(WIN32 OR NOT ENABLE_SHARED OR INTEL_CXX)
# The CLI cannot link to the shared library on Windows, it
# requires internal APIs not exported from the DLL
@@ -9,3 +21,6 @@
else()
target_link_libraries(cli x265-shared ${PLATFORM_LIBS})
endif()
+--
+2.45.0.windows.1
+
=====================================
contrib/src/x265/x265-no-pdb-install.patch → contrib/src/x265/0002-do-not-copy-.pdb-files-that-don-t-exist.patch
=====================================
@@ -1,6 +1,17 @@
---- x265/source/CMakeLists.txt.nopdb 2022-03-20 16:50:06.435395700 +0000
-+++ x265/source/CMakeLists.txt 2022-03-20 16:50:23.988474200 +0000
-@@ -554,7 +554,7 @@
+From 0a77b8c80bc3ae6b10fa159102dc78d1b0fc6918 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Fri, 18 May 2018 16:32:17 +0200
+Subject: [PATCH 2/3] do not copy .pdb files that don't exist
+
+---
+ source/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
+index 0ea2487c7..f6649ced1 100644
+--- a/source/CMakeLists.txt
++++ b/source/CMakeLists.txt
+@@ -554,7 +554,7 @@ if(ENABLE_HDR10_PLUS)
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
endif()
install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
@@ -9,3 +20,6 @@
if(MSVC_IDE)
install(FILES "${PROJECT_BINARY_DIR}/Debug/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug)
install(FILES "${PROJECT_BINARY_DIR}/RelWithDebInfo/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo)
+--
+2.45.0.windows.1
+
=====================================
contrib/src/x265/x265-enable-detect512.patch → contrib/src/x265/0003-add-patch-to-enable-detect512.patch
=====================================
@@ -1,8 +1,18 @@
-This function is used on all architectures, not just X86.
+From 84f315deced14f7541fb68a637391bd6eaab9f6c Mon Sep 17 00:00:00 2001
+From: rego21 <miguelfrego at gmail.com>
+Date: Sun, 20 Mar 2022 23:27:21 +0100
+Subject: [PATCH 3/3] add patch to enable detect512
---- x265/source/common/cpu.cpp
-+++ x265/source/common/cpu.cpp
-@@ -110,6 +110,11 @@
+Enables detect512 for all architectures
+---
+ source/common/cpu.cpp | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/source/common/cpu.cpp b/source/common/cpu.cpp
+index 0681ff55b..fa687da7c 100644
+--- a/source/common/cpu.cpp
++++ b/source/common/cpu.cpp
+@@ -110,6 +110,11 @@ const cpu_name_t cpu_names[] =
{ "", 0 },
};
@@ -14,7 +24,7 @@ This function is used on all architectures, not just X86.
#if X265_ARCH_X86
extern "C" {
-@@ -123,10 +128,6 @@
+@@ -123,10 +128,6 @@ uint64_t PFX(cpu_xgetbv)(int xcr);
#pragma warning(disable: 4309) // truncation of constant value
#endif
@@ -24,3 +34,7 @@ This function is used on all architectures, not just X86.
-}
uint32_t cpu_detect(bool benableavx512 )
{
+
+--
+2.45.0.windows.1
+
=====================================
contrib/src/x265/rules.mak
=====================================
@@ -24,9 +24,10 @@ $(TARBALLS)/x265_$(X265_VERSION).tar.gz:
x265: x265_$(X265_VERSION).tar.gz .sum-x265
$(UNPACK)
- $(APPLY) $(SRC)/x265/x265-ldl-linking.patch
- $(APPLY) $(SRC)/x265/x265-no-pdb-install.patch
- $(APPLY) $(SRC)/x265/x265-enable-detect512.patch
+ $(APPLY) $(SRC)/x265/0001-fix-ldl-linking-error-of-x265.patch
+ $(APPLY) $(SRC)/x265/0002-do-not-copy-.pdb-files-that-don-t-exist.patch
+ $(APPLY) $(SRC)/x265/0003-add-patch-to-enable-detect512.patch
+ $(APPLY) $(SRC)/x265/0001-Fix-libunwind-static-linking-on-Android-toolchains.patch
$(call pkg_static,"source/x265.pc.in")
ifndef HAVE_WIN32
$(APPLY) $(SRC)/x265/x265-pkg-libs.patch
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/7b58309ae72af83d2053bd88f0529e7addaddc6f...10aa0e6e1bba557409c9173c89dd3a9c199fccd4
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/7b58309ae72af83d2053bd88f0529e7addaddc6f...10aa0e6e1bba557409c9173c89dd3a9c199fccd4
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list