diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-08-03 13:48:30 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-08-03 13:48:30 +0100 |
commit | 24d75f43d3d4caf76f2448bb277e89a3b3ae0d99 (patch) | |
tree | 4f290d635d831599222130ba8ddbf1a726129426 /media-libs/tg_owt/files/tg_owt-0_pre20220507-unbundle-crc32c.patch | |
parent | 8d8735134b6bb6e159162e531cccb456691a4ed4 (diff) |
gentoo auto-resync : 03.08.2022 - 13:48:05
Diffstat (limited to 'media-libs/tg_owt/files/tg_owt-0_pre20220507-unbundle-crc32c.patch')
-rw-r--r-- | media-libs/tg_owt/files/tg_owt-0_pre20220507-unbundle-crc32c.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20220507-unbundle-crc32c.patch b/media-libs/tg_owt/files/tg_owt-0_pre20220507-unbundle-crc32c.patch new file mode 100644 index 000000000000..44283c24384c --- /dev/null +++ b/media-libs/tg_owt/files/tg_owt-0_pre20220507-unbundle-crc32c.patch @@ -0,0 +1,72 @@ +Use system's crc32c if found + +--- tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41.orig/CMakeLists.txt ++++ tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41/CMakeLists.txt +@@ -147,7 +147,6 @@ + + target_link_libraries(tg_owt + PRIVATE +- tg_owt::libcrc32c + tg_owt::libpffft + tg_owt::librnnoise + tg_owt::libsrtp +@@ -185,6 +184,7 @@ + link_libabsl(tg_owt) + link_libopenh264(tg_owt) + link_libvpx(tg_owt) ++link_crc32c(tg_owt) + + if (TG_OWT_BUILD_AUDIO_BACKENDS AND (UNIX AND NOT APPLE)) + link_libalsa(tg_owt) +@@ -2599,7 +2599,6 @@ + + set(export_targets + ${tg_owt_export} +- libcrc32c + libpffft + librnnoise + libsrtp +@@ -2617,6 +2616,9 @@ + if (NOT LIBOPENH264_FOUND) + list(APPEND export_targets libopenh264) + endif() ++if (NOT Crc32c_FOUND) ++ list(APPEND export_targets libcrc32c) ++endif() + + export( + TARGETS ${export_targets} +--- tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41.orig/cmake/external.cmake ++++ tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41/cmake/external.cmake +@@ -166,6 +166,20 @@ + endif() + endfunction() + ++# crc32c ++function(link_crc32c target_name) ++ if (TG_OWT_PACKAGED_BUILD) ++ find_package(Crc32c) ++ set(Crc32c_FOUND ${Crc32c_FOUND} PARENT_SCOPE) ++ if (Crc32c_FOUND) ++ target_link_libraries(${target_name} PRIVATE Crc32c::crc32c) ++ endif() ++ endif() ++ if (NOT Crc32c_FOUND) ++ target_link_libraries(${target_name} PRIVATE tg_owt::libcrc32c) ++ endif() ++endfunction() ++ + function(link_glib target_name) + find_package(PkgConfig REQUIRED) + pkg_check_modules(GLIB2 REQUIRED glib-2.0) +--- tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41.orig/src/net/dcsctp/packet/crc32c.cc ++++ tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41/src/net/dcsctp/packet/crc32c.cc +@@ -11,7 +11,7 @@ + + #include <cstdint> + +-#include "third_party/crc32c/src/include/crc32c/crc32c.h" ++#include "crc32c/crc32c.h" + + namespace dcsctp { + |