[vlc-devel] [PATCH 3/3] Contribs: update srt to 1.4.1

κΉ€μ •μ„λ‹˜(JUSTIN) jeongseok.kim at sk.com
Mon May 11 10:06:59 CEST 2020


From: "J. Kim" <jeongseok.kim at sk.com>

---
 .../srt/0001-api-Don-t-use-inet_ntop.patch    | 44 -------------------
 ...32-Only-include-inttypes.h-with-MSVC.patch | 27 ------------
 ...nstall-Windows-headers-in-win-subdir.patch | 41 -----------------
 .../src/srt/0004-cmake-pthread-win32.patch    | 11 -----
 ...thread-for-now-because-clang-and-VLC.patch | 26 -----------
 ...make-Don-t-confuse-libs-and-requires.patch | 42 ------------------
 contrib/src/srt/SHA512SUMS                    |  2 +-
 contrib/src/srt/rules.mak                     |  8 +---
 8 files changed, 2 insertions(+), 199 deletions(-)
 delete mode 100644 contrib/src/srt/0001-api-Don-t-use-inet_ntop.patch
 delete mode 100644 contrib/src/srt/0002-win32-Only-include-inttypes.h-with-MSVC.patch
 delete mode 100644 contrib/src/srt/0003-cmake-Only-install-Windows-headers-in-win-subdir.patch
 delete mode 100644 contrib/src/srt/0004-cmake-pthread-win32.patch
 delete mode 100644 contrib/src/srt/0005-cmake-Prefer-lpthread-for-now-because-clang-and-VLC.patch
 delete mode 100644 contrib/src/srt/0006-cmake-Don-t-confuse-libs-and-requires.patch

diff --git a/contrib/src/srt/0001-api-Don-t-use-inet_ntop.patch b/contrib/src/srt/0001-api-Don-t-use-inet_ntop.patch
deleted file mode 100644
index ffd23b4c23..0000000000
--- a/contrib/src/srt/0001-api-Don-t-use-inet_ntop.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 1658479fe1f113a02a7af48f53da6baeea5df482 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= <olivier.crete at collabora.com>
-Date: Mon, 9 Jul 2018 17:51:27 -0400
-Subject: [PATCH 1/3] api: Don't use inet_ntop
-
-It's not defined on Windows. Instead use getnameinfo with
-the numeric request.
----
- srtcore/api.h | 15 ++++++---------
- 1 file changed, 6 insertions(+), 9 deletions(-)
-
-diff --git a/srtcore/api.h b/srtcore/api.h
-index e6e9d3f..de3b4f0 100644
---- a/srtcore/api.h
-+++ b/srtcore/api.h
-@@ -270,19 +270,16 @@ inline std::string SockaddrToString(const sockaddr* sadr)
- 
-     std::ostringstream output;
-     char hostbuf[1024];
-+    int flags;
- 
- #if ENABLE_GETNAMEINFO
--    if (!getnameinfo(sadr, sizeof(*sadr), hostbuf, 1024, NULL, 0, NI_NAMEREQD))
--    {
--        output << hostbuf;
--    }
--    else
-+    flags = NI_NAMEREQD;
-+#else
-+    flags = NI_NUMERICHOST | NI_NUMERICSERV;
- #endif
-+
-+    if (!getnameinfo(sadr, sizeof(*sadr), hostbuf, 1024, NULL, 0, flags))
-     {
--        if (inet_ntop(sadr->sa_family, addr, hostbuf, 1024) == NULL)
--        {
--            strcpy(hostbuf, "unknown");
--        }
-         output << hostbuf;
-     }
- 
--- 
-2.17.1
-
diff --git a/contrib/src/srt/0002-win32-Only-include-inttypes.h-with-MSVC.patch b/contrib/src/srt/0002-win32-Only-include-inttypes.h-with-MSVC.patch
deleted file mode 100644
index af828187df..0000000000
--- a/contrib/src/srt/0002-win32-Only-include-inttypes.h-with-MSVC.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From e4d6b4d7f26d8d839889ae8508856d5a108cc258 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= <olivier.crete at collabora.com>
-Date: Mon, 9 Jul 2018 18:04:44 -0400
-Subject: [PATCH 2/3] win32: Only include inttypes.h with MSVC
-
----
- srtcore/platform_sys.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/srtcore/platform_sys.h b/srtcore/platform_sys.h
-index 33c4d9b..ce546d2 100644
---- a/srtcore/platform_sys.h
-+++ b/srtcore/platform_sys.h
-@@ -15,9 +15,9 @@
-    #include <ws2tcpip.h>
-    #include <ws2ipdef.h>
-    #include <windows.h>
--   #include <inttypes.h>
-    #include <stdint.h>
-    #if defined(_MSC_VER)
-+      #include <inttypes.h>
-       #pragma warning(disable:4251)
-    #endif
- #else
--- 
-2.17.1
-
diff --git a/contrib/src/srt/0003-cmake-Only-install-Windows-headers-in-win-subdir.patch b/contrib/src/srt/0003-cmake-Only-install-Windows-headers-in-win-subdir.patch
deleted file mode 100644
index 519b0b3874..0000000000
--- a/contrib/src/srt/0003-cmake-Only-install-Windows-headers-in-win-subdir.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From cfc7871bad28737e5b0480c90643e7d09bf6f5cb Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= <olivier.crete at collabora.com>
-Date: Mon, 9 Jul 2018 18:16:28 -0400
-Subject: [PATCH 3/3] cmake: Only install Windows headers in win subdir
-
----
- CMakeLists.txt         | 1 -
- srtcore/platform_sys.h | 4 ++--
- 2 files changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index daec198..b197c19 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -450,7 +450,6 @@ endif()
- # will now apply to the dependent library.
- #list(APPEND SOURCES_srt ${SOURCES_haicrypt})
- set (VIRTUAL_srt $<TARGET_OBJECTS:srt_virtual> $<TARGET_OBJECTS:haicrypt_virtual>)
--set (HEADERS_srt ${HEADERS_srt} ${HEADERS_srt_win32})
- 
- if (srt_libspec_shared)
- 	add_library(${TARGET_srt}_shared SHARED ${VIRTUAL_srt})
-diff --git a/srtcore/platform_sys.h b/srtcore/platform_sys.h
-index ce546d2..e8e6927 100644
---- a/srtcore/platform_sys.h
-+++ b/srtcore/platform_sys.h
-@@ -15,9 +15,9 @@
-    #include <ws2tcpip.h>
-    #include <ws2ipdef.h>
-    #include <windows.h>
--   #include <stdint.h>
-    #if defined(_MSC_VER)
--      #include <inttypes.h>
-+      #include <win/stdint.h>
-+      #include <win/inttypes.h>
-       #pragma warning(disable:4251)
-    #endif
- #else
--- 
-2.17.1
-
diff --git a/contrib/src/srt/0004-cmake-pthread-win32.patch b/contrib/src/srt/0004-cmake-pthread-win32.patch
deleted file mode 100644
index eff246761b..0000000000
--- a/contrib/src/srt/0004-cmake-pthread-win32.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- srt/CMakeLists.txt.old	2018-07-11 22:41:30.169381997 +0200
-+++ srt/CMakeLists.txt	2018-07-11 22:41:40.324958847 +0200
-@@ -338,7 +338,7 @@
- endif()
- 
- if (MINGW)
--	set (PTHREAD_LIBRARY -lpthreadGC2)
-+	set (PTHREAD_LIBRARY -lpthread)
- 	# XXX CONSIDER THIS. It came from a merged previous master version
- 	# and was under an if(NOT MINGW)...elseif(THREADS_FOUND) condition.
- 	# Might be that the current form still suffices; resolve this and remove comment.
diff --git a/contrib/src/srt/0005-cmake-Prefer-lpthread-for-now-because-clang-and-VLC.patch b/contrib/src/srt/0005-cmake-Prefer-lpthread-for-now-because-clang-and-VLC.patch
deleted file mode 100644
index 22cc1e66fb..0000000000
--- a/contrib/src/srt/0005-cmake-Prefer-lpthread-for-now-because-clang-and-VLC.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 60af57d2e045ba80174aa0bb0a89807040be6d3f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= <olivier.crete at collabora.com>
-Date: Tue, 17 Jul 2018 11:24:39 -0400
-Subject: [PATCH 5/5] cmake: Prefer -lpthread for now because clang++ and VLC
-
-It seems that clang doesn't support -pthread at the linking stage, but
-only at the compilation, so putting it into the .pc file causes issues.
----
- CMakeLists.txt | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 34c8c87..74edd20 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -358,7 +358,6 @@ elseif (WIN32)
- 		message(FATAL_ERROR "Failed to find pthread library. Specify PTHREAD_LIBRARY.")
- 	endif()
- else ()
--	set(THREADS_PREFER_PTHREAD_FLAG ON)
- 	find_package(Threads REQUIRED)
- 	set(PTHREAD_LIBRARY ${CMAKE_THREAD_LIBS_INIT})
- endif()
--- 
-2.17.1
-
diff --git a/contrib/src/srt/0006-cmake-Don-t-confuse-libs-and-requires.patch b/contrib/src/srt/0006-cmake-Don-t-confuse-libs-and-requires.patch
deleted file mode 100644
index 5b9b7aa99e..0000000000
--- a/contrib/src/srt/0006-cmake-Don-t-confuse-libs-and-requires.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From bd7beffef507a2162d22d2735f5aec2d67f81e27 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= <olivier.crete at collabora.com>
-Date: Tue, 17 Jul 2018 17:07:46 -0400
-Subject: [PATCH 6/6] cmake: Don't confuse libs and requires
-
----
- CMakeLists.txt | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 74edd20..9cfc475 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -165,10 +165,12 @@ if ( USE_GNUTLS )
- 	)
- 	message(STATUS "SSL Dependency: using GNUTLS with Nettle, as requested")
- else()
--	set (SSL_REQUIRED_MODULES "openssl libcrypto zlib")
- 
- 	if (USE_OPENSSL_PC)
- 
-+	        # Only use the .pc files if we actually try to find them
-+	        set (SSL_REQUIRED_MODULES "openssl libcrypto zlib")
-+
- 		pkg_check_modules(SSL REQUIRED ${SSL_REQUIRED_MODULES})
- 
- 		# We have some cases when pkg-config is improperly configured
-@@ -492,7 +494,10 @@ endif()
- 
- target_include_directories(haicrypt_virtual PRIVATE  ${SSL_INCLUDE_DIRS})
- 
--set (SRT_LIBS_PRIVATE ${SSL_LIBRARIES})
-+# Only set the libraries directly if they're in the Requires.private
-+if (NOT SSL_REQUIRED_MODULES)
-+  set (SRT_LIBS_PRIVATE ${SSL_LIBRARIES})
-+endif()
- 
- if (MICROSOFT)
- 	set (SRT_LIBS_PRIVATE ${SRT_LIBS_PRIVATE} ws2_32.lib)
--- 
-2.17.1
-
diff --git a/contrib/src/srt/SHA512SUMS b/contrib/src/srt/SHA512SUMS
index e348996427..0762fd61ad 100644
--- a/contrib/src/srt/SHA512SUMS
+++ b/contrib/src/srt/SHA512SUMS
@@ -1 +1 @@
-1f8fdfc0e1d92bc8c477651982c23afeacb65e2293a7225227927e1b6f71a01355a3311600097d77b3df638503e4856acbcb52ed270b650480f20b98c1be5ec2  srt-1.3.1.tar.gz
\ No newline at end of file
+ff30b7e413c4b9f0b5076d9ebf5f0942b5d802773a27ed1f7b886a12eb01eec0148d1c305e933d4f54ee1b451a445a48cba582111eb2057326c0f61fab097f94  srt-1.4.1.tar.gz
diff --git a/contrib/src/srt/rules.mak b/contrib/src/srt/rules.mak
index 88c34e4ccd..bd068e7514 100644
--- a/contrib/src/srt/rules.mak
+++ b/contrib/src/srt/rules.mak
@@ -1,6 +1,6 @@
 # srt
 
-SRT_VERSION := 1.3.1
+SRT_VERSION := 1.4.1
 SRT_URL := $(GITHUB)/Haivision/srt/archive/v$(SRT_VERSION).tar.gz
 
 ifdef BUILD_NETWORK
@@ -30,12 +30,6 @@ $(TARBALLS)/srt-$(SRT_VERSION).tar.gz:
 
 srt: srt-$(SRT_VERSION).tar.gz .sum-srt
 	$(UNPACK)
-	$(APPLY) $(SRC)/srt/0001-api-Don-t-use-inet_ntop.patch
-	$(APPLY) $(SRC)/srt/0002-win32-Only-include-inttypes.h-with-MSVC.patch
-	$(APPLY) $(SRC)/srt/0003-cmake-Only-install-Windows-headers-in-win-subdir.patch
-	$(APPLY) $(SRC)/srt/0004-cmake-pthread-win32.patch
-	$(APPLY) $(SRC)/srt/0005-cmake-Prefer-lpthread-for-now-because-clang-and-VLC.patch
-	$(APPLY) $(SRC)/srt/0006-cmake-Don-t-confuse-libs-and-requires.patch
 	$(call pkg_static,"scripts/srt.pc.in")
 	mv srt-$(SRT_VERSION) $@ && touch $@
 
-- 
2.26.0


More information about the vlc-devel mailing list