public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/tg_owt/, media-libs/tg_owt/files/
@ 2021-08-05 16:42 Georgy Yakovlev
  0 siblings, 0 replies; 6+ messages in thread
From: Georgy Yakovlev @ 2021-08-05 16:42 UTC (permalink / raw
  To: gentoo-commits

commit:     d4aca08a2ddefe856dd2341da21e30b64319eba7
Author:     Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Thu Aug  5 10:31:06 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Aug  5 16:42:10 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4aca08a

media-libs/tg_owt: Drop old

Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 media-libs/tg_owt/Manifest                         |   1 -
 .../files/Allow-using-packaged-third_party.patch   | 487 ---------------------
 media-libs/tg_owt/tg_owt-0_pre20210422.ebuild      |  88 ----
 3 files changed, 576 deletions(-)

diff --git a/media-libs/tg_owt/Manifest b/media-libs/tg_owt/Manifest
index bbbe5598d59..e5610fd04b7 100644
--- a/media-libs/tg_owt/Manifest
+++ b/media-libs/tg_owt/Manifest
@@ -1,3 +1,2 @@
 DIST libyuv-ad890067f661dc747a975bc55ba3767fe30d4452.tar.gz 473845 BLAKE2B 664be51c166440e6b03fa98f65d907efc446800804058a5ea7fdf944e12cb1237a1487e83fbe9a2f1ce4c73521234e43632f921ad0333507737d81e1cb23ce8f SHA512 f97529b80a786e2e92443caabebd6d85a42641e10c3d2940b0f69bedf3b8a96c69c3247abddd059c4ddd6f78107ab7214222a4267a559fc2086c8edf5ea1afbc
-DIST tg_owt-0_pre20210422.tar.gz 16156802 BLAKE2B 823248e31d7abc91402c32aa0f062f1a77a3d8c4ebf63b4e73a8f290a5691e002a6ec09a5b7ffed1087565b9a419646924030dfb3eb3d0d6aec8cfc51cf1bf73 SHA512 24b66840a54d102b96bc32636dc8b85d31f74b344244985be929db4e14b13ee60f1fbc43269526352064cee8066839c886fae1aff95276089ab60d0a14de9ec6
 DIST tg_owt-0_pre20210626.tar.gz 16264716 BLAKE2B de500e02789516527c814d0aba87cf1d0e772747f06acff7ac9295508c6e6bce1915cd3a703df618ff17ba8e04dc194538a6ef859fa85b301bb63eceab2c339a SHA512 a5d10011c427d8685bcf0743c356ff8c58c3cad6c59ac2409298b30b15cb04233889a5ed0a18107ac5b3477eee96741fdc85176d4330c866e8e3329753be7d73

diff --git a/media-libs/tg_owt/files/Allow-using-packaged-third_party.patch b/media-libs/tg_owt/files/Allow-using-packaged-third_party.patch
deleted file mode 100644
index 17025826a48..00000000000
--- a/media-libs/tg_owt/files/Allow-using-packaged-third_party.patch
+++ /dev/null
@@ -1,487 +0,0 @@
-From dbfceeea4280412358202d511e02e95a040d0297 Mon Sep 17 00:00:00 2001
-From: mid-kid <esteve.varela@gmail.com>
-Date: Sun, 7 Mar 2021 17:12:34 +0100
-Subject: [PATCH] Allow using packaged third_party
-
-This patch adds support for building tg_owt using system libraries
-instead of bundled third_party modules.
-
-Some libraries haven't been converted for the following reasons:
-- pffft: No stable ABI, patched, and not available in major distributions.
-- rnnoise: All of the remaining files are custom.
-- libsrtp: This project uses private APIs.
-- libyuv: No stable ABI, frequent breaking updates, and not available in major distributions.
-
-Note that: This still installs the system headers for the third_party
-modules (albeit in a convenient sub-directory). I haven't figured out a
-method to avoid this.
----
- CMakeLists.txt                                | 78 +++++++---------
- cmake/external.cmake                          | 91 +++++++++++++++++++
- cmake/libabsl.cmake                           |  2 +-
- cmake/libevent.cmake                          |  5 +-
- cmake/libopenh264.cmake                       | 17 +++-
- cmake/libpffft.cmake                          |  2 +-
- cmake/librnnoise.cmake                        |  2 +-
- cmake/libsrtp.cmake                           |  2 +-
- cmake/libusrsctp.cmake                        |  2 +-
- cmake/libvpx.cmake                            |  2 +-
- cmake/libwebrtcbuild.cmake                    |  4 +-
- cmake/libyuv.cmake                            |  2 +-
- cmake/tg_owtConfig.cmake                      |  5 +
- .../codecs/h264/h264_encoder_impl.cc          |  8 +-
- .../codecs/h264/h264_encoder_impl.h           |  2 +-
- src/rtc_base/task_queue_libevent.cc           |  2 +-
- 16 files changed, 166 insertions(+), 60 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7f8e3bd..3462351 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -60,7 +60,6 @@ include(cmake/librnnoise.cmake)
- include(cmake/libsrtp.cmake)
- include(cmake/libusrsctp.cmake)
- include(cmake/libvpx.cmake)
--include(cmake/libwebrtcbuild.cmake)
- include(cmake/libyuv.cmake)
- if (NOT WIN32 AND NOT APPLE)
-     include(cmake/libevent.cmake)
-@@ -80,41 +79,19 @@ init_target(tg_owt)
- 
- set_target_properties(tg_owt PROPERTIES SOVERSION 0 VERSION 0.0.0)
- 
-+target_link_libraries(tg_owt
-+PRIVATE
-+    tg_owt::libpffft
-+    tg_owt::librnnoise
-+    tg_owt::libsrtp
-+    tg_owt::libyuv
-+)
-+
- if (is_x86 OR is_x64)
-     target_link_libraries(tg_owt
--    PUBLIC
--        tg_owt::libwebrtcbuild
-     PRIVATE
-         tg_owt::tg_owt_avx2
-         tg_owt::tg_owt_sse2
--        tg_owt::libabsl
--        tg_owt::libopenh264
--        tg_owt::libpffft
--        tg_owt::librnnoise
--        tg_owt::libsrtp
--        tg_owt::libusrsctp
--        tg_owt::libvpx
--        tg_owt::libvpx_mmx
--        tg_owt::libvpx_sse2
--        tg_owt::libvpx_ssse3
--        tg_owt::libvpx_sse4
--        tg_owt::libvpx_avx
--        tg_owt::libvpx_avx2
--        tg_owt::libyuv
--    )
--else()
--    target_link_libraries(tg_owt
--    PUBLIC
--        tg_owt::libwebrtcbuild
--    PRIVATE
--        tg_owt::libabsl
--        tg_owt::libopenh264
--        tg_owt::libpffft
--        tg_owt::librnnoise
--        tg_owt::libsrtp
--        tg_owt::libusrsctp
--        tg_owt::libvpx
--        tg_owt::libyuv
-     )
- endif()
- 
-@@ -131,9 +108,6 @@ PRIVATE
-     ${libopenh264_yasm_objects}
- )
- 
--if (NOT WIN32 AND NOT APPLE)
--    target_link_libraries(tg_owt PRIVATE tg_owt::libevent)
--endif()
- if (APPLE)
-     target_link_libraries(tg_owt PUBLIC tg_owt::libsdkmacos)
- endif()
-@@ -141,6 +115,17 @@ endif()
- link_openssl(tg_owt)
- link_ffmpeg(tg_owt)
- link_opus(tg_owt)
-+link_libabsl(tg_owt)
-+link_libopenh264(tg_owt)
-+link_libusrsctp(tg_owt)
-+link_libvpx(tg_owt)
-+
-+if (NOT WIN32 AND NOT APPLE)
-+    link_libevent(tg_owt)
-+endif()
-+
-+include(cmake/libwebrtcbuild.cmake)
-+target_link_libraries(tg_owt PUBLIC tg_owt::libwebrtcbuild)
- 
- function(add_sublibrary postfix)
-     add_library(tg_owt_${postfix} OBJECT)
-@@ -149,9 +134,8 @@ function(add_sublibrary postfix)
-     target_link_libraries(tg_owt_${postfix}
-     PUBLIC
-         tg_owt::libwebrtcbuild
--    PRIVATE
--        tg_owt::libabsl
-     )
-+    link_libabsl(tg_owt_${postfix})
-     target_include_directories(tg_owt_${postfix}
-     PUBLIC
-         $<BUILD_INTERFACE:${webrtc_loc}>
-@@ -2165,7 +2149,7 @@ else()
- endif()
- 
- set(platform_export)
--if (NOT WIN32 AND NOT APPLE)
-+if (NOT WIN32 AND NOT APPLE AND NOT LIBEVENT_FOUND)
-     set(platform_export
-         libevent
-     )
-@@ -2198,14 +2182,9 @@ endif()
- 
- set(export_targets
-     ${tg_owt_export}
--    libabsl
--    libopenh264
-     libpffft
-     librnnoise
-     libsrtp
--    libusrsctp
--    libvpx
--    ${vpx_export}
-     libwebrtcbuild
-     libyuv
-     ${platform_export}
-@@ -2214,6 +2193,19 @@ if (TG_OWT_USE_PROTOBUF)
-     list(APPEND export_targets proto)
- endif()
- 
-+if (NOT absl_FOUND)
-+    list(APPEND export_targets libabsl)
-+endif()
-+if (NOT LIBOPENH264_FOUND)
-+    list(APPEND export_targets libopenh264)
-+endif()
-+if (NOT LIBUSRSCTP_FOUND)
-+    list(APPEND export_targets libusrsctp)
-+endif()
-+if (NOT LIBVPX_FOUND)
-+    list(APPEND export_targets libvpx ${vpx_export})
-+endif()
-+
- export(
-     TARGETS ${export_targets}
-     NAMESPACE tg_owt::
-@@ -2223,7 +2215,7 @@ export(
- configure_file(
-     "cmake/tg_owtConfig.cmake"
-     "${CMAKE_CURRENT_BINARY_DIR}/tg_owtConfig.cmake"
--    COPYONLY
-+    @ONLY
- )
- 
- target_include_directories(tg_owt
-diff --git a/cmake/external.cmake b/cmake/external.cmake
-index 2132546..e09af96 100644
---- a/cmake/external.cmake
-+++ b/cmake/external.cmake
-@@ -105,3 +105,94 @@ function(link_libjpeg target_name)
-         )
-     endif()
- endfunction()
-+
-+# libabsl
-+# HINT: System abseil should be built with -DCMAKE_CXX_STANDARD=17
-+function(link_libabsl target_name)
-+    if (TG_OWT_PACKAGED_BUILD)
-+        find_package(absl)
-+        set(absl_FOUND ${absl_FOUND} PARENT_SCOPE)
-+        if (absl_FOUND)
-+            target_link_libraries(${target_name} INTERFACE absl::strings)
-+        endif()
-+    endif()
-+    if (NOT absl_FOUND)
-+        target_link_libraries(${target_name} PRIVATE tg_owt::libabsl)
-+    endif()
-+endfunction()
-+
-+# libopenh264
-+function(link_libopenh264 target_name)
-+    if (TG_OWT_PACKAGED_BUILD)
-+        find_package(PkgConfig REQUIRED)
-+        pkg_check_modules(LIBOPENH264 openh264)
-+        set(LIBOPENH264_FOUND ${LIBOPENH264_FOUND} PARENT_SCOPE)
-+        if (LIBOPENH264_FOUND)
-+            target_link_libraries(${target_name} PRIVATE ${LIBOPENH264_LIBRARIES})
-+            target_include_directories(${target_name} PRIVATE ${LIBOPENH264_INCLUDE_DIRS})
-+        endif()
-+    endif()
-+    if (NOT LIBOPENH264_FOUND)
-+        target_link_libraries(${target_name} PRIVATE tg_owt::libopenh264)
-+        target_include_directories(${target_name} PRIVATE ${libopenh264_loc}/include)
-+    endif()
-+endfunction()
-+
-+# libusrsctp
-+function(link_libusrsctp target_name)
-+    if (TG_OWT_PACKAGED_BUILD)
-+        find_package(PkgConfig REQUIRED)
-+        pkg_check_modules(LIBUSRSCTP usrsctp)
-+        set(LIBUSRSCTP_FOUND ${LIBUSRSCTP_FOUND} PARENT_SCOPE)
-+        if (LIBUSRSCTP_FOUND)
-+            target_link_libraries(${target_name} PRIVATE ${LIBUSRSCTP_LIBRARIES})
-+            target_include_directories(${target_name} PRIVATE ${LIBUSRSCTP_INCLUDE_DIRS})
-+        endif()
-+    endif()
-+    if (NOT LIBUSRSCTP_FOUND)
-+        target_link_libraries(${target_name} PRIVATE tg_owt::libusrsctp)
-+    endif()
-+endfunction()
-+
-+# libvpx
-+function(link_libvpx target_name)
-+    if (TG_OWT_PACKAGED_BUILD)
-+        find_package(PkgConfig REQUIRED)
-+        pkg_check_modules(LIBVPX vpx>=1.10.0)
-+        set(LIBVPX_FOUND ${LIBVPX_FOUND} PARENT_SCOPE)
-+        if (LIBVPX_FOUND)
-+            target_link_libraries(${target_name} PRIVATE ${LIBVPX_LIBRARIES})
-+            target_include_directories(${target_name} PRIVATE ${LIBVPX_INCLUDE_DIRS})
-+        endif()
-+    endif()
-+    if (NOT LIBVPX_FOUND)
-+        target_link_libraries(${target_name} PRIVATE tg_owt::libvpx)
-+        if (is_x86 OR is_x64)
-+            target_link_libraries(${target_name}
-+            PRIVATE
-+                tg_owt::libvpx_mmx
-+                tg_owt::libvpx_sse2
-+                tg_owt::libvpx_ssse3
-+                tg_owt::libvpx_sse4
-+                tg_owt::libvpx_avx
-+                tg_owt::libvpx_avx2
-+            )
-+        endif()
-+    endif()
-+endfunction()
-+
-+# libevent
-+function(link_libevent target_name)
-+    if (TG_OWT_PACKAGED_BUILD)
-+        find_package(PkgConfig REQUIRED)
-+        pkg_check_modules(LIBEVENT libevent)
-+        set(LIBEVENT_FOUND ${LIBEVENT_FOUND} PARENT_SCOPE)
-+        if (LIBEVENT_FOUND)
-+            target_link_libraries(${target_name} PRIVATE ${LIBEVENT_LIBRARIES})
-+            target_include_directories(${target_name} PRIVATE ${LIBEVENT_INCLUDE_DIRS})
-+        endif()
-+    endif()
-+    if (NOT LIBEVENT_FOUND)
-+        target_link_libraries(${target_name} PRIVATE tg_owt::libevent)
-+    endif()
-+endfunction()
-diff --git a/cmake/libabsl.cmake b/cmake/libabsl.cmake
-index 0cc8920..a82732a 100644
---- a/cmake/libabsl.cmake
-+++ b/cmake/libabsl.cmake
-@@ -1,4 +1,4 @@
--add_library(libabsl OBJECT)
-+add_library(libabsl OBJECT EXCLUDE_FROM_ALL)
- init_target(libabsl)
- add_library(tg_owt::libabsl ALIAS libabsl)
- 
-diff --git a/cmake/libevent.cmake b/cmake/libevent.cmake
-index 0192896..31248fb 100644
---- a/cmake/libevent.cmake
-+++ b/cmake/libevent.cmake
-@@ -1,4 +1,4 @@
--add_library(libevent OBJECT)
-+add_library(libevent OBJECT EXCLUDE_FROM_ALL)
- init_target(libevent)
- add_library(tg_owt::libevent ALIAS libevent)
- 
-@@ -40,7 +40,8 @@ PRIVATE
- )
- 
- target_include_directories(libevent
-+PUBLIC
-+    $<BUILD_INTERFACE:${libevent_loc}>
- PRIVATE
-     ${webrtc_loc}
--    ${libevent_loc}
- )
-diff --git a/cmake/libopenh264.cmake b/cmake/libopenh264.cmake
-index 45ce7c9..7d4742e 100644
---- a/cmake/libopenh264.cmake
-+++ b/cmake/libopenh264.cmake
-@@ -1,4 +1,4 @@
--add_library(libopenh264 OBJECT)
-+add_library(libopenh264 OBJECT EXCLUDE_FROM_ALL)
- init_target(libopenh264)
- add_library(tg_owt::libopenh264 ALIAS libopenh264)
- 
-@@ -207,6 +207,21 @@ set(include_directories
- 
- target_include_directories(libopenh264 PRIVATE ${include_directories})
- 
-+# Create include-able wels/ directory for public use of the library
-+set(GEN_INC ${CMAKE_CURRENT_BINARY_DIR}/openh264_include)
-+add_custom_command(OUTPUT ${GEN_INC}/wels
-+COMMAND ${CMAKE_COMMAND} -E make_directory ${GEN_INC}/wels
-+COMMAND ${CMAKE_COMMAND} -E copy
-+    ${libopenh264_loc}/codec/api/svc/codec_api.h
-+    ${libopenh264_loc}/codec/api/svc/codec_app_def.h
-+    ${libopenh264_loc}/codec/api/svc/codec_def.h
-+    ${libopenh264_loc}/codec/api/svc/codec_ver.h
-+    ${GEN_INC}/wels
-+VERBATIM
-+)
-+target_sources(libopenh264 PRIVATE ${GEN_INC}/wels)
-+target_include_directories(libopenh264 PUBLIC $<BUILD_INTERFACE:${GEN_INC}>)
-+
- if (is_x86)
-     set(yasm_defines X86_32)
- else()
-diff --git a/cmake/libpffft.cmake b/cmake/libpffft.cmake
-index fa2e66f..02c3db4 100644
---- a/cmake/libpffft.cmake
-+++ b/cmake/libpffft.cmake
-@@ -1,4 +1,4 @@
--add_library(libpffft OBJECT)
-+add_library(libpffft OBJECT EXCLUDE_FROM_ALL)
- init_target(libpffft)
- add_library(tg_owt::libpffft ALIAS libpffft)
- 
-diff --git a/cmake/librnnoise.cmake b/cmake/librnnoise.cmake
-index 04f72ae..a3e682e 100644
---- a/cmake/librnnoise.cmake
-+++ b/cmake/librnnoise.cmake
-@@ -1,4 +1,4 @@
--add_library(librnnoise OBJECT)
-+add_library(librnnoise OBJECT EXCLUDE_FROM_ALL)
- init_target(librnnoise)
- add_library(tg_owt::librnnoise ALIAS librnnoise)
- 
-diff --git a/cmake/libsrtp.cmake b/cmake/libsrtp.cmake
-index ce4ff64..4754f13 100644
---- a/cmake/libsrtp.cmake
-+++ b/cmake/libsrtp.cmake
-@@ -1,4 +1,4 @@
--add_library(libsrtp OBJECT)
-+add_library(libsrtp OBJECT EXCLUDE_FROM_ALL)
- init_target(libsrtp)
- add_library(tg_owt::libsrtp ALIAS libsrtp)
- 
-diff --git a/cmake/libusrsctp.cmake b/cmake/libusrsctp.cmake
-index ad41d12..1dc5e5e 100644
---- a/cmake/libusrsctp.cmake
-+++ b/cmake/libusrsctp.cmake
-@@ -1,4 +1,4 @@
--add_library(libusrsctp OBJECT)
-+add_library(libusrsctp OBJECT EXCLUDE_FROM_ALL)
- init_target(libusrsctp)
- add_library(tg_owt::libusrsctp ALIAS libusrsctp)
- 
-diff --git a/cmake/libvpx.cmake b/cmake/libvpx.cmake
-index e6775c4..0fdfbac 100644
---- a/cmake/libvpx.cmake
-+++ b/cmake/libvpx.cmake
-@@ -1,4 +1,4 @@
--add_library(libvpx OBJECT)
-+add_library(libvpx OBJECT EXCLUDE_FROM_ALL)
- init_target(libvpx)
- add_library(tg_owt::libvpx ALIAS libvpx)
- 
-diff --git a/cmake/libwebrtcbuild.cmake b/cmake/libwebrtcbuild.cmake
-index 15f854e..8efd18d 100644
---- a/cmake/libwebrtcbuild.cmake
-+++ b/cmake/libwebrtcbuild.cmake
-@@ -3,9 +3,11 @@ add_library(tg_owt::libwebrtcbuild ALIAS libwebrtcbuild)
- 
- target_link_libraries(libwebrtcbuild
- INTERFACE
--    tg_owt::libabsl
-     tg_owt::libyuv
- )
-+if (NOT absl_FOUND)
-+    target_link_libraries(libwebrtcbuild INTERFACE tg_owt::libabsl)
-+endif()
- 
- target_compile_definitions(libwebrtcbuild
- INTERFACE
-diff --git a/cmake/libyuv.cmake b/cmake/libyuv.cmake
-index 881f9db..143e239 100644
---- a/cmake/libyuv.cmake
-+++ b/cmake/libyuv.cmake
-@@ -1,4 +1,4 @@
--add_library(libyuv OBJECT)
-+add_library(libyuv OBJECT EXCLUDE_FROM_ALL)
- init_target(libyuv)
- add_library(tg_owt::libyuv ALIAS libyuv)
- 
-diff --git a/cmake/tg_owtConfig.cmake b/cmake/tg_owtConfig.cmake
-index d0001ac..e9f4388 100644
---- a/cmake/tg_owtConfig.cmake
-+++ b/cmake/tg_owtConfig.cmake
-@@ -1 +1,6 @@
-+if (@absl_FOUND@)
-+    include(CMakeFindDependencyMacro)
-+    find_dependency(absl REQUIRED)
-+endif()
-+
- include("${CMAKE_CURRENT_LIST_DIR}/tg_owtTargets.cmake")
-diff --git a/src/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/src/modules/video_coding/codecs/h264/h264_encoder_impl.cc
-index ccf0bc5..85ddc90 100644
---- a/src/modules/video_coding/codecs/h264/h264_encoder_impl.cc
-+++ b/src/modules/video_coding/codecs/h264/h264_encoder_impl.cc
-@@ -29,10 +29,10 @@
- #include "system_wrappers/include/metrics.h"
- #include "third_party/libyuv/include/libyuv/convert.h"
- #include "third_party/libyuv/include/libyuv/scale.h"
--#include "third_party/openh264/src/codec/api/svc/codec_api.h"
--#include "third_party/openh264/src/codec/api/svc/codec_app_def.h"
--#include "third_party/openh264/src/codec/api/svc/codec_def.h"
--#include "third_party/openh264/src/codec/api/svc/codec_ver.h"
-+#include <wels/codec_api.h>
-+#include <wels/codec_app_def.h>
-+#include <wels/codec_def.h>
-+#include <wels/codec_ver.h>
- 
- namespace webrtc {
- 
-diff --git a/src/modules/video_coding/codecs/h264/h264_encoder_impl.h b/src/modules/video_coding/codecs/h264/h264_encoder_impl.h
-index 4eb4ad3..98e4c2f 100644
---- a/src/modules/video_coding/codecs/h264/h264_encoder_impl.h
-+++ b/src/modules/video_coding/codecs/h264/h264_encoder_impl.h
-@@ -25,7 +25,7 @@
- #include "common_video/h264/h264_bitstream_parser.h"
- #include "modules/video_coding/codecs/h264/include/h264.h"
- #include "modules/video_coding/utility/quality_scaler.h"
--#include "third_party/openh264/src/codec/api/svc/codec_app_def.h"
-+#include <wels/codec_app_def.h>
- 
- class ISVCEncoder;
- 
-diff --git a/src/rtc_base/task_queue_libevent.cc b/src/rtc_base/task_queue_libevent.cc
-index 38660cd..04bc278 100644
---- a/src/rtc_base/task_queue_libevent.cc
-+++ b/src/rtc_base/task_queue_libevent.cc
-@@ -27,7 +27,7 @@
- #include "absl/strings/string_view.h"
- #include "api/task_queue/queued_task.h"
- #include "api/task_queue/task_queue_base.h"
--#include "base/third_party/libevent/event.h"
-+#include <event.h>
- #include "rtc_base/checks.h"
- #include "rtc_base/logging.h"
- #include "rtc_base/numerics/safe_conversions.h"
--- 
-2.26.3
-

diff --git a/media-libs/tg_owt/tg_owt-0_pre20210422.ebuild b/media-libs/tg_owt/tg_owt-0_pre20210422.ebuild
deleted file mode 100644
index 3e8e01ec1d2..00000000000
--- a/media-libs/tg_owt/tg_owt-0_pre20210422.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 2020-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-TG_OWT_COMMIT="18cb4cd9bb4c2f5f5f5e760ec808f74c302bc1bf"
-LIBYUV_COMMIT="ad890067f661dc747a975bc55ba3767fe30d4452"
-
-DESCRIPTION="WebRTC build for Telegram"
-HOMEPAGE="https://github.com/desktop-app/tg_owt"
-SRC_URI="https://github.com/desktop-app/tg_owt/archive/${TG_OWT_COMMIT}.tar.gz -> ${P}.tar.gz
-	https://archive.org/download/libyuv-${LIBYUV_COMMIT}.tar/libyuv-${LIBYUV_COMMIT}.tar.gz"
-# Fetch libyuv archive from: https://chromium.googlesource.com/libyuv/libyuv/+archive/${LIBYUV_COMMIT}.tar.gz
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~ppc64"
-
-# Bundled libs:
-# - libyuv (no stable versioning, www-client/chromium and media-libs/libvpx bundle it)
-# - libsrtp (project uses private APIs)
-# - pffft (no stable versioning, patched)
-# media-libs/libjpeg-turbo is required for libyuv
-DEPEND="
-	dev-cpp/abseil-cpp:=[cxx17(+)]
-	dev-libs/libevent:=
-	dev-libs/openssl:=
-	dev-libs/protobuf:=
-	media-libs/libjpeg-turbo:=
-	>=media-libs/libvpx-1.10.0:=
-	media-libs/openh264:=
-	media-libs/opus
-	media-video/ffmpeg:=
-	net-libs/usrsctp
-"
-RDEPEND="${DEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-S="${WORKDIR}/${PN}-${TG_OWT_COMMIT}"
-
-src_unpack() {
-	unpack "${P}.tar.gz"
-	cd "${S}/src/third_party/libyuv" || die
-	unpack "libyuv-${LIBYUV_COMMIT}.tar.gz"
-}
-
-src_prepare() {
-	# https://github.com/desktop-app/tg_owt/pull/55
-	eapply "${FILESDIR}/Allow-using-packaged-third_party.patch"
-
-	# We aren't installing any third_party headers
-	sed -i '/third_party\/libyuv/d' cmake/libyuv.cmake || die
-
-	# libvpx source files aren't included in the repository
-	sed -i '/include(cmake\/libvpx.cmake)/d' CMakeLists.txt || die
-
-	# Remove screen_drawer files that cause linking errors
-	# (not used right now I don't think, maybe in a future version)
-	# https://github.com/desktop-app/tg_owt/issues/58
-	sed -i -e '/desktop_capture\/screen_drawer\.cc/d' \
-		-e '/desktop_capture\/screen_drawer_lock_posix\.cc/d' CMakeLists.txt || die
-
-	# HACK
-	# build/headers don't have ppc64 condition and force SSE2.
-	# sed it out and force C version on ppc64
-	# without this linking tdesktop will fail with undef reference to `webrtc::VectorDifference_SSE2_W32
-	if use ppc64; then
-		sed -i 's/VectorDifference_SSE2_W.*/VectorDifference_C;/g' src/modules/desktop_capture/differ_block.cc || die
-	fi
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Defined by -DCMAKE_BUILD_TYPE=Release, avoids crashes
-	# see https://bugs.gentoo.org/754012
-	append-cppflags '-DNDEBUG'
-	cmake_src_configure
-}
-
-src_install() {
-	cmake_src_install
-
-	# Save about 15MB of useless headers
-	rm -r "${ED}/usr/include/tg_owt/third_party" || die
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/tg_owt/, media-libs/tg_owt/files/
@ 2021-12-10 21:31 Georgy Yakovlev
  0 siblings, 0 replies; 6+ messages in thread
From: Georgy Yakovlev @ 2021-12-10 21:31 UTC (permalink / raw
  To: gentoo-commits

commit:     a1b825fb223fb6ba135082e0ac83f776dab3e63a
Author:     Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Fri Dec 10 15:16:20 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Dec 10 21:29:36 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1b825fb

media-libs/tg_owt: Bump to 0_pre20211207

Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 media-libs/tg_owt/Manifest                         |   1 +
 .../tg_owt-0_pre20211207-allow-disabling-X11.patch | 115 +++++++++++++++++++
 ...g_owt-0_pre20211207-fix-dcsctp-references.patch |  17 +++
 media-libs/tg_owt/tg_owt-0_pre20211207.ebuild      | 125 +++++++++++++++++++++
 4 files changed, 258 insertions(+)

diff --git a/media-libs/tg_owt/Manifest b/media-libs/tg_owt/Manifest
index 70bfd2264067..01088f5e5cb8 100644
--- a/media-libs/tg_owt/Manifest
+++ b/media-libs/tg_owt/Manifest
@@ -1,2 +1,3 @@
 DIST libyuv-ad890067f661dc747a975bc55ba3767fe30d4452.tar.gz 473845 BLAKE2B 664be51c166440e6b03fa98f65d907efc446800804058a5ea7fdf944e12cb1237a1487e83fbe9a2f1ce4c73521234e43632f921ad0333507737d81e1cb23ce8f SHA512 f97529b80a786e2e92443caabebd6d85a42641e10c3d2940b0f69bedf3b8a96c69c3247abddd059c4ddd6f78107ab7214222a4267a559fc2086c8edf5ea1afbc
 DIST tg_owt-0_pre20210914.tar.gz 16266351 BLAKE2B 048d6a77046b10af63f4e5c1530b6aeb9d423702a6e34e6e0082a10b06262e19c30aa766cc9ea38549605d8d2cc08bfcd5a4e715ab53c46031c23938f94af27e SHA512 bd46393d9a85fa38fcd560af4f68a4868b25528b134731070e8578217cb0b9bb8b5cf7b3990f619d321ba373e5630a52e467e14d93f71b24de3a5b3e591b8866
+DIST tg_owt-0_pre20211207.tar.gz 16780636 BLAKE2B bfa35a43b2085b897eb16986ecfb79ece5f8076d88572869580716014a564023dbc156b1d0885685bf04c57e34f26870dde497e8aae9889e5b2eed6d9a012d8e SHA512 7f8b1ae63371106cd59db6e2a290fd24554d31de4188d243ed6645468dad91c9653b7685add61291830e5309284a87512a73b63c3be76f01ea33701c72f48c90

diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch b/media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch
new file mode 100644
index 000000000000..0abb3cfb4a37
--- /dev/null
+++ b/media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch
@@ -0,0 +1,115 @@
+Add -DTG_OWT_USE_X11
+
+Allows disabling X11 desktop capturing independently of pipewire support, for
+the few people that run wayland without any X11 support whatsoever.
+
+This setup is untested, but supported by the GNI build system, see:
+* src/modules/desktop_capture/BUILD.gn (option rtc_use_x11_extensions)
+
+Toggling the WEBRTC_USE_X11 define also affects some files under
+src/modules/audio_device, but that falls under "X11 support", regardless...
+
+--- tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589.orig/CMakeLists.txt
++++ tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589/CMakeLists.txt
+@@ -21,11 +21,13 @@
+ 
+ option(BUILD_SHARED_LIBS "Builds shared libraries instead of static." ${TG_OWT_PACKAGED_BUILD})
+ option(TG_OWT_USE_PROTOBUF "Use protobuf to generate additional headers. Useful for packaged build." ${BUILD_SHARED_LIBS})
++option(TG_OWT_USE_X11 "Use X11 for desktop capture on non-Apple Unix." ON)
+ option(TG_OWT_USE_PIPEWIRE "Use pipewire for desktop capture on non-Apple Unix." ON)
+ option(TG_OWT_DLOPEN_PIPEWIRE "dlopen pipewire 0.3 for desktop capture on non-Apple Unix." ${not_packaged_build})
+ option(TG_OWT_BUILD_AUDIO_BACKENDS "Build webrtc audio backends." ON)
+ 
+ if (NOT UNIX OR APPLE)
++    set(TG_OWT_USE_X11 OFF)
+     set(TG_OWT_USE_PIPEWIRE OFF)
+ endif()
+ 
+@@ -84,6 +86,10 @@
+ add_library(tg_owt)
+ init_target(tg_owt)
+ 
++if (TG_OWT_USE_X11)
++    link_x11(tg_owt)
++endif()
++
+ if (TG_OWT_USE_PIPEWIRE)
+     link_glib(tg_owt)
+     if (TG_OWT_DLOPEN_PIPEWIRE)
+@@ -161,10 +167,6 @@
+ include(cmake/libwebrtcbuild.cmake)
+ target_link_libraries(tg_owt PUBLIC tg_owt::libwebrtcbuild)
+ 
+-if (UNIX AND NOT APPLE)
+-    link_x11(tg_owt)
+-endif()
+-
+ function(add_sublibrary postfix)
+     add_library(tg_owt_${postfix} OBJECT)
+     init_feature_target(tg_owt_${postfix} ${postfix})
+@@ -2204,6 +2206,37 @@
+     )
+ endif()
+ 
++if (NOT TG_OWT_USE_X11)
++    remove_target_sources(tg_owt ${webrtc_loc}
++        modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc
++        modules/desktop_capture/linux/mouse_cursor_monitor_x11.h
++        modules/desktop_capture/linux/screen_capturer_x11.cc
++        modules/desktop_capture/linux/screen_capturer_x11.h
++        modules/desktop_capture/linux/shared_x_display.cc
++        modules/desktop_capture/linux/shared_x_display.h
++        modules/desktop_capture/linux/window_capturer_x11.cc
++        modules/desktop_capture/linux/window_capturer_x11.h
++        modules/desktop_capture/linux/window_finder_x11.cc
++        modules/desktop_capture/linux/window_finder_x11.h
++        modules/desktop_capture/linux/window_list_utils.cc
++        modules/desktop_capture/linux/window_list_utils.h
++        modules/desktop_capture/linux/x_atom_cache.cc
++        modules/desktop_capture/linux/x_atom_cache.h
++        modules/desktop_capture/linux/x_error_trap.cc
++        modules/desktop_capture/linux/x_error_trap.h
++        modules/desktop_capture/linux/x_server_pixel_buffer.cc
++        modules/desktop_capture/linux/x_server_pixel_buffer.h
++        modules/desktop_capture/linux/x_window_property.cc
++        modules/desktop_capture/linux/x_window_property.h
++
++        modules/desktop_capture/screen_drawer.cc
++        modules/desktop_capture/screen_drawer.h
++        modules/desktop_capture/screen_drawer_linux.cc
++        modules/desktop_capture/screen_drawer_lock_posix.cc
++        modules/desktop_capture/screen_drawer_lock_posix.h
++    )
++endif()
++
+ if (NOT TG_OWT_USE_PIPEWIRE)
+     remove_target_sources(tg_owt ${webrtc_loc}
+         modules/desktop_capture/linux/base_capturer_pipewire.cc
+--- tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589.orig/cmake/libwebrtcbuild.cmake
++++ tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589/cmake/libwebrtcbuild.cmake
+@@ -28,6 +28,13 @@
+     BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0
+ )
+ 
++if (TG_OWT_USE_X11)
++    target_compile_definitions(libwebrtcbuild
++    INTERFACE
++        WEBRTC_USE_X11
++    )
++endif()
++
+ if (TG_OWT_USE_PIPEWIRE)
+     target_compile_definitions(libwebrtcbuild
+     INTERFACE
+@@ -64,11 +71,6 @@
+         INTERFACE
+             WEBRTC_MAC
+         )
+-    else()
+-        target_compile_definitions(libwebrtcbuild
+-        INTERFACE
+-            WEBRTC_USE_X11
+-        )
+     endif()
+ 
+     if (CMAKE_SYSTEM_NAME STREQUAL "Linux")

diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch b/media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch
new file mode 100644
index 000000000000..7b3380dd55de
--- /dev/null
+++ b/media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch
@@ -0,0 +1,17 @@
+Fix undefined references to dcsctp when linking this library
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtg_owt.so.0.0.0: undefined reference to `dcsctp::TaskQueueTimeoutFactory::TaskQueueTimeout::TaskQueueTimeout(dcsctp::TaskQueueTimeoutFactory&)'
+/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtg_owt.so.0.0.0: undefined reference to `dcsctp::DcSctpSocketFactory::Create(std::basic_string_view<char, std::char_traits<char> >, dcsctp::DcSctpSocketCallbacks&, std::unique_ptr<dcsctp::PacketObserver, std::default_delete<dcsctp::PacketObserver> >, dcsctp::DcSctpOptions const&)'
+/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtg_owt.so.0.0.0: undefined reference to `vtable for dcsctp::TextPcapPacketObserver'
+
+--- tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589.orig/CMakeLists.txt
++++ tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589/CMakeLists.txt
+@@ -808,8 +808,6 @@
+     media/engine/webrtc_media_engine_defaults.cc
+     media/engine/webrtc_video_engine.cc
+     media/engine/webrtc_voice_engine.cc
+-    media/sctp/dcsctp_transport.cc
+-    media/sctp/dcsctp_transport.h
+     media/sctp/sctp_transport_factory.cc
+     media/sctp/sctp_transport_factory.h
+     media/sctp/usrsctp_transport.cc

diff --git a/media-libs/tg_owt/tg_owt-0_pre20211207.ebuild b/media-libs/tg_owt/tg_owt-0_pre20211207.ebuild
new file mode 100644
index 000000000000..a0f20c6643ce
--- /dev/null
+++ b/media-libs/tg_owt/tg_owt-0_pre20211207.ebuild
@@ -0,0 +1,125 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="WebRTC build for Telegram"
+HOMEPAGE="https://github.com/desktop-app/tg_owt"
+
+TG_OWT_COMMIT="d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589"
+LIBYUV_COMMIT="ad890067f661dc747a975bc55ba3767fe30d4452"
+SRC_URI="https://github.com/desktop-app/tg_owt/archive/${TG_OWT_COMMIT}.tar.gz -> ${P}.tar.gz
+	https://archive.org/download/libyuv-${LIBYUV_COMMIT}.tar/libyuv-${LIBYUV_COMMIT}.tar.gz"
+S="${WORKDIR}/${PN}-${TG_OWT_COMMIT}"
+# Fetch libyuv archive from: https://chromium.googlesource.com/libyuv/libyuv/+archive/${LIBYUV_COMMIT}.tar.gz
+
+LICENSE="BSD"
+SLOT="0/${PV##*pre}"
+KEYWORDS="~amd64 ~ppc64"
+IUSE="screencast +X"
+
+# This package's USE flags may change the ABI and require a rebuild of
+#  dependent pacakges. As such, one should make sure to depend on
+#  media-libs/tg_owt[x=,y=,z=] for any package that uses this.
+
+# Bundled libs:
+# - libyuv (no stable versioning, www-client/chromium and media-libs/libvpx bundle it)
+# - libsrtp (project uses private APIs)
+# - pffft (no stable versioning, patched)
+# media-libs/libjpeg-turbo is required for libyuv
+DEPEND="
+	dev-cpp/abseil-cpp:=[cxx17(+)]
+	dev-libs/libevent:=
+	dev-libs/openssl:=
+	dev-libs/protobuf:=
+	media-libs/libjpeg-turbo:=
+	>=media-libs/libvpx-1.10.0:=
+	media-libs/openh264:=
+	media-libs/opus
+	media-video/ffmpeg:=
+	net-libs/usrsctp
+	screencast? (
+		dev-libs/glib:2
+		media-video/pipewire:=
+	)
+	X? (
+		x11-libs/libX11
+		x11-libs/libXcomposite
+		x11-libs/libXdamage
+		x11-libs/libXext
+		x11-libs/libXfixes
+		x11-libs/libXrender
+		x11-libs/libXrandr
+		x11-libs/libXtst
+	)
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}/tg_owt-0_pre20210626-allow-disabling-pipewire.patch"
+	"${FILESDIR}/tg_owt-0_pre20211207-allow-disabling-X11.patch"
+	"${FILESDIR}/tg_owt-0_pre20210626-allow-disabling-pulseaudio.patch"
+	"${FILESDIR}/tg_owt-0_pre20211207-fix-dcsctp-references.patch"
+)
+
+src_unpack() {
+	unpack "${P}.tar.gz"
+	cd "${S}/src/third_party/libyuv" || die
+	unpack "libyuv-${LIBYUV_COMMIT}.tar.gz"
+}
+
+src_prepare() {
+	# libvpx source files aren't included in the repository
+	sed -i '/include(cmake\/libvpx.cmake)/d' CMakeLists.txt || die
+
+	# libopenh264 has GENERATED files with yasm that aren't excluded by
+	# EXCLUDE_FROM_ALL, and I have no clue how to avoid this.
+	# These source files aren't used with system-openh264, anyway.
+	sed -i '/include(cmake\/libopenh264.cmake)/d' CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Defined by -DCMAKE_BUILD_TYPE=Release, avoids crashes
+	# see https://bugs.gentoo.org/754012
+	# EAPI 8 still wipes this flag.
+	append-cppflags '-DNDEBUG'
+
+	local mycmakeargs=(
+		-DTG_OWT_USE_X11=$(usex X)
+		-DTG_OWT_USE_PIPEWIRE=$(usex screencast)
+
+		# Not required by net-im/telegram-desktop right now, I'd rather avoid
+		#  the (ABI compatibility) headache.
+		-DTG_OWT_BUILD_AUDIO_BACKENDS=OFF
+		#-DTG_OWT_BUILD_AUDIO_BACKENDS=$(usex alsa)
+		#-DTG_OWT_BUILD_PULSE_BACKEND=$(usex pulseaudio)
+	)
+	cmake_src_configure
+}
+
+src_install() {
+	cmake_src_install
+
+	# Save about 15MB of useless headers
+	rm -r "${ED}/usr/include/tg_owt/rtc_base/third_party" || die
+	rm -r "${ED}/usr/include/tg_owt/common_audio/third_party" || die
+	rm -r "${ED}/usr/include/tg_owt/modules/third_party" || die
+	rm -r "${ED}/usr/include/tg_owt/third_party" || die
+
+	# Install a few headers anyway, as required by net-im/telegram-desktop...
+	local headers=(
+		third_party/libyuv/include
+		rtc_base/third_party/sigslot
+		rtc_base/third_party/base64
+	)
+	for dir in "${headers[@]}"; do
+		pushd "${S}/src/${dir}" > /dev/null || die
+		find -type f -name "*.h" -exec install -Dm644 '{}' "${ED}/usr/include/tg_owt/${dir}/{}" \; || die
+		popd > /dev/null || die
+	done
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/tg_owt/, media-libs/tg_owt/files/
@ 2022-04-15  6:04 Sam James
  0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2022-04-15  6:04 UTC (permalink / raw
  To: gentoo-commits

commit:     44a4a0436c3e9fc27e1d2dbfa1d1a63207da9ba8
Author:     Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Mon Apr 11 22:22:04 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 15 06:04:17 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44a4a043

media-libs/tg_owt: Drop old

Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/tg_owt/Manifest                         |   1 -
 ...wt-0_pre20210626-allow-disabling-pipewire.patch |  36 ------
 ...-0_pre20210626-allow-disabling-pulseaudio.patch |  90 ---------------
 .../tg_owt-0_pre20211207-allow-disabling-X11.patch | 115 -------------------
 media-libs/tg_owt/tg_owt-0_pre20211207.ebuild      | 125 ---------------------
 5 files changed, 367 deletions(-)

diff --git a/media-libs/tg_owt/Manifest b/media-libs/tg_owt/Manifest
index ea5cf3b09d6a..342b3ec53144 100644
--- a/media-libs/tg_owt/Manifest
+++ b/media-libs/tg_owt/Manifest
@@ -1,3 +1,2 @@
 DIST libyuv-ad890067f661dc747a975bc55ba3767fe30d4452.tar.gz 473845 BLAKE2B 664be51c166440e6b03fa98f65d907efc446800804058a5ea7fdf944e12cb1237a1487e83fbe9a2f1ce4c73521234e43632f921ad0333507737d81e1cb23ce8f SHA512 f97529b80a786e2e92443caabebd6d85a42641e10c3d2940b0f69bedf3b8a96c69c3247abddd059c4ddd6f78107ab7214222a4267a559fc2086c8edf5ea1afbc
-DIST tg_owt-0_pre20211207.tar.gz 16780636 BLAKE2B bfa35a43b2085b897eb16986ecfb79ece5f8076d88572869580716014a564023dbc156b1d0885685bf04c57e34f26870dde497e8aae9889e5b2eed6d9a012d8e SHA512 7f8b1ae63371106cd59db6e2a290fd24554d31de4188d243ed6645468dad91c9653b7685add61291830e5309284a87512a73b63c3be76f01ea33701c72f48c90
 DIST tg_owt-0_pre20220209.tar.gz 16501237 BLAKE2B fb04aca8803645cc107a7e7fbab8d6020ad91f487ece0445aba29dd1127270e8b3a33d51bb35cfc916168df78cbdc98987610b39fd2cf7b86821b4f9733783c9 SHA512 0a35ce3379887b115117188aa8dce44bf89e23ad6f9fab7320a1cd55cdd534bae4c240778a37cb9588cd6acea1e7a83c22c113d608f7bfd5272ee22bb2773af3

diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20210626-allow-disabling-pipewire.patch b/media-libs/tg_owt/files/tg_owt-0_pre20210626-allow-disabling-pipewire.patch
deleted file mode 100644
index 9cc55585a561..000000000000
--- a/media-libs/tg_owt/files/tg_owt-0_pre20210626-allow-disabling-pipewire.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Fix an issue with -DTG_OWT_USE_PIPEWIRE=OFF
-
-Some files were erroneously being included despite the option being turned off
-
---- tg_owt-91d836dc84a16584c6ac52b36c04c0de504d9c34.orig/CMakeLists.txt
-+++ tg_owt-91d836dc84a16584c6ac52b36c04c0de504d9c34/CMakeLists.txt
-@@ -88,6 +88,7 @@
- init_target(tg_owt)
- 
- if (TG_OWT_USE_PIPEWIRE)
-+    link_glib(tg_owt)
-     if (TG_OWT_DLOPEN_PIPEWIRE)
-         include(cmake/generate_stubs.cmake)
-         set(stubs_loc ${webrtc_loc}/modules/desktop_capture/linux)
-@@ -169,7 +170,6 @@
- 
- if (UNIX AND NOT APPLE)
-     link_x11(tg_owt)
--    link_glib(tg_owt)
- endif()
- 
- function(add_sublibrary postfix)
-@@ -2161,6 +2161,13 @@
-     )
- endif()
- 
-+if (NOT TG_OWT_USE_PIPEWIRE)
-+    remove_target_sources(tg_owt ${webrtc_loc}
-+        modules/desktop_capture/linux/base_capturer_pipewire.cc
-+        modules/desktop_capture/linux/base_capturer_pipewire.h
-+    )
-+endif()
-+
- if (NOT TG_OWT_BUILD_AUDIO_BACKENDS)
-     remove_target_sources(tg_owt ${webrtc_loc}
-         rtc_base/win/windows_version.cc

diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20210626-allow-disabling-pulseaudio.patch b/media-libs/tg_owt/files/tg_owt-0_pre20210626-allow-disabling-pulseaudio.patch
deleted file mode 100644
index 0bddb5fd00f6..000000000000
--- a/media-libs/tg_owt/files/tg_owt-0_pre20210626-allow-disabling-pulseaudio.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-Add support for -DTG_OWT_BUILD_PULSE_BACKEND
-
-This is based off of the rtc_include_pulse_audio option in:
-* src/modules/audio_device/BUILD.gn
-
-ALSA must be enabled unless audio support is removed as a whole, see:
-* src/modules/audio_device/audio_device_impl.cc
-
---- tg_owt-91d836dc84a16584c6ac52b36c04c0de504d9c34.orig/CMakeLists.txt
-+++ tg_owt-91d836dc84a16584c6ac52b36c04c0de504d9c34/CMakeLists.txt
-@@ -25,12 +25,17 @@
- option(TG_OWT_USE_PIPEWIRE "Use pipewire for desktop capture on non-Apple Unix." ON)
- option(TG_OWT_DLOPEN_PIPEWIRE "dlopen pipewire 0.3 for desktop capture on non-Apple Unix." ${not_packaged_build})
- option(TG_OWT_BUILD_AUDIO_BACKENDS "Build webrtc audio backends." ON)
-+option(TG_OWT_BUILD_PULSE_BACKEND "Build pulseaudio audio backend on non-Apple Unix." ON)
- 
- if (NOT UNIX OR APPLE)
-     set(TG_OWT_USE_X11 OFF)
-     set(TG_OWT_USE_PIPEWIRE OFF)
- endif()
- 
-+if (NOT TG_OWT_BUILD_AUDIO_BACKENDS)
-+    set(TG_OWT_BUILD_PULSE_BACKEND OFF)
-+endif()
-+
- if (BUILD_SHARED_LIBS)
-     set(CMAKE_POSITION_INDEPENDENT_CODE ON)
- endif()
-@@ -162,9 +167,11 @@
- link_libvpx(tg_owt)
- 
- if (TG_OWT_BUILD_AUDIO_BACKENDS AND (UNIX AND NOT APPLE))
--    link_libalsa(tg_owt)
--    link_libpulse(tg_owt)
-     link_dl(tg_owt)
-+    link_libalsa(tg_owt)
-+    if (TG_OWT_BUILD_PULSE_BACKEND)
-+        link_libpulse(tg_owt)
-+    endif()
- endif()
- 
- if (NOT WIN32 AND NOT APPLE)
-@@ -2218,12 +2225,6 @@
-         modules/audio_device/linux/audio_mixer_manager_alsa_linux.h
-         modules/audio_device/linux/latebindingsymboltable_linux.cc
-         modules/audio_device/linux/latebindingsymboltable_linux.h
--        modules/audio_device/linux/audio_device_pulse_linux.cc
--        modules/audio_device/linux/audio_device_pulse_linux.h
--        modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc
--        modules/audio_device/linux/audio_mixer_manager_pulse_linux.h
--        modules/audio_device/linux/pulseaudiosymboltable_linux.cc
--        modules/audio_device/linux/pulseaudiosymboltable_linux.h
-         modules/audio_device/mac/audio_device_mac.cc
-         modules/audio_device/mac/audio_device_mac.h
-         modules/audio_device/mac/audio_mixer_manager_mac.cc
-@@ -2243,6 +2244,17 @@
-     )
- endif()
- 
-+if (NOT TG_OWT_BUILD_PULSE_BACKEND)
-+    remove_target_sources(tg_owt ${webrtc_loc}
-+        modules/audio_device/linux/audio_device_pulse_linux.cc
-+        modules/audio_device/linux/audio_device_pulse_linux.h
-+        modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc
-+        modules/audio_device/linux/audio_mixer_manager_pulse_linux.h
-+        modules/audio_device/linux/pulseaudiosymboltable_linux.cc
-+        modules/audio_device/linux/pulseaudiosymboltable_linux.h
-+    )
-+endif()
-+
- if (NOT WIN32)
-     remove_target_sources(tg_owt ${webrtc_loc}
-         rtc_base/win32.cc
---- tg_owt-91d836dc84a16584c6ac52b36c04c0de504d9c34.orig/cmake/libwebrtcbuild.cmake
-+++ tg_owt-91d836dc84a16584c6ac52b36c04c0de504d9c34/cmake/libwebrtcbuild.cmake
-@@ -50,8 +50,13 @@
-     target_compile_definitions(libwebrtcbuild
-     INTERFACE
-         WEBRTC_ENABLE_LINUX_ALSA
--        WEBRTC_ENABLE_LINUX_PULSE
-     )
-+    if (TG_OWT_BUILD_PULSE_BACKEND)
-+        target_compile_definitions(libwebrtcbuild
-+        INTERFACE
-+            WEBRTC_ENABLE_LINUX_PULSE
-+        )
-+    endif()
- endif()
- 
- if (WIN32)

diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch b/media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch
deleted file mode 100644
index 0abb3cfb4a37..000000000000
--- a/media-libs/tg_owt/files/tg_owt-0_pre20211207-allow-disabling-X11.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-Add -DTG_OWT_USE_X11
-
-Allows disabling X11 desktop capturing independently of pipewire support, for
-the few people that run wayland without any X11 support whatsoever.
-
-This setup is untested, but supported by the GNI build system, see:
-* src/modules/desktop_capture/BUILD.gn (option rtc_use_x11_extensions)
-
-Toggling the WEBRTC_USE_X11 define also affects some files under
-src/modules/audio_device, but that falls under "X11 support", regardless...
-
---- tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589.orig/CMakeLists.txt
-+++ tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589/CMakeLists.txt
-@@ -21,11 +21,13 @@
- 
- option(BUILD_SHARED_LIBS "Builds shared libraries instead of static." ${TG_OWT_PACKAGED_BUILD})
- option(TG_OWT_USE_PROTOBUF "Use protobuf to generate additional headers. Useful for packaged build." ${BUILD_SHARED_LIBS})
-+option(TG_OWT_USE_X11 "Use X11 for desktop capture on non-Apple Unix." ON)
- option(TG_OWT_USE_PIPEWIRE "Use pipewire for desktop capture on non-Apple Unix." ON)
- option(TG_OWT_DLOPEN_PIPEWIRE "dlopen pipewire 0.3 for desktop capture on non-Apple Unix." ${not_packaged_build})
- option(TG_OWT_BUILD_AUDIO_BACKENDS "Build webrtc audio backends." ON)
- 
- if (NOT UNIX OR APPLE)
-+    set(TG_OWT_USE_X11 OFF)
-     set(TG_OWT_USE_PIPEWIRE OFF)
- endif()
- 
-@@ -84,6 +86,10 @@
- add_library(tg_owt)
- init_target(tg_owt)
- 
-+if (TG_OWT_USE_X11)
-+    link_x11(tg_owt)
-+endif()
-+
- if (TG_OWT_USE_PIPEWIRE)
-     link_glib(tg_owt)
-     if (TG_OWT_DLOPEN_PIPEWIRE)
-@@ -161,10 +167,6 @@
- include(cmake/libwebrtcbuild.cmake)
- target_link_libraries(tg_owt PUBLIC tg_owt::libwebrtcbuild)
- 
--if (UNIX AND NOT APPLE)
--    link_x11(tg_owt)
--endif()
--
- function(add_sublibrary postfix)
-     add_library(tg_owt_${postfix} OBJECT)
-     init_feature_target(tg_owt_${postfix} ${postfix})
-@@ -2204,6 +2206,37 @@
-     )
- endif()
- 
-+if (NOT TG_OWT_USE_X11)
-+    remove_target_sources(tg_owt ${webrtc_loc}
-+        modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc
-+        modules/desktop_capture/linux/mouse_cursor_monitor_x11.h
-+        modules/desktop_capture/linux/screen_capturer_x11.cc
-+        modules/desktop_capture/linux/screen_capturer_x11.h
-+        modules/desktop_capture/linux/shared_x_display.cc
-+        modules/desktop_capture/linux/shared_x_display.h
-+        modules/desktop_capture/linux/window_capturer_x11.cc
-+        modules/desktop_capture/linux/window_capturer_x11.h
-+        modules/desktop_capture/linux/window_finder_x11.cc
-+        modules/desktop_capture/linux/window_finder_x11.h
-+        modules/desktop_capture/linux/window_list_utils.cc
-+        modules/desktop_capture/linux/window_list_utils.h
-+        modules/desktop_capture/linux/x_atom_cache.cc
-+        modules/desktop_capture/linux/x_atom_cache.h
-+        modules/desktop_capture/linux/x_error_trap.cc
-+        modules/desktop_capture/linux/x_error_trap.h
-+        modules/desktop_capture/linux/x_server_pixel_buffer.cc
-+        modules/desktop_capture/linux/x_server_pixel_buffer.h
-+        modules/desktop_capture/linux/x_window_property.cc
-+        modules/desktop_capture/linux/x_window_property.h
-+
-+        modules/desktop_capture/screen_drawer.cc
-+        modules/desktop_capture/screen_drawer.h
-+        modules/desktop_capture/screen_drawer_linux.cc
-+        modules/desktop_capture/screen_drawer_lock_posix.cc
-+        modules/desktop_capture/screen_drawer_lock_posix.h
-+    )
-+endif()
-+
- if (NOT TG_OWT_USE_PIPEWIRE)
-     remove_target_sources(tg_owt ${webrtc_loc}
-         modules/desktop_capture/linux/base_capturer_pipewire.cc
---- tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589.orig/cmake/libwebrtcbuild.cmake
-+++ tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589/cmake/libwebrtcbuild.cmake
-@@ -28,6 +28,13 @@
-     BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0
- )
- 
-+if (TG_OWT_USE_X11)
-+    target_compile_definitions(libwebrtcbuild
-+    INTERFACE
-+        WEBRTC_USE_X11
-+    )
-+endif()
-+
- if (TG_OWT_USE_PIPEWIRE)
-     target_compile_definitions(libwebrtcbuild
-     INTERFACE
-@@ -64,11 +71,6 @@
-         INTERFACE
-             WEBRTC_MAC
-         )
--    else()
--        target_compile_definitions(libwebrtcbuild
--        INTERFACE
--            WEBRTC_USE_X11
--        )
-     endif()
- 
-     if (CMAKE_SYSTEM_NAME STREQUAL "Linux")

diff --git a/media-libs/tg_owt/tg_owt-0_pre20211207.ebuild b/media-libs/tg_owt/tg_owt-0_pre20211207.ebuild
deleted file mode 100644
index a1476f496136..000000000000
--- a/media-libs/tg_owt/tg_owt-0_pre20211207.ebuild
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 2020-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake flag-o-matic
-
-DESCRIPTION="WebRTC build for Telegram"
-HOMEPAGE="https://github.com/desktop-app/tg_owt"
-
-TG_OWT_COMMIT="d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589"
-LIBYUV_COMMIT="ad890067f661dc747a975bc55ba3767fe30d4452"
-SRC_URI="https://github.com/desktop-app/tg_owt/archive/${TG_OWT_COMMIT}.tar.gz -> ${P}.tar.gz
-	https://archive.org/download/libyuv-${LIBYUV_COMMIT}.tar/libyuv-${LIBYUV_COMMIT}.tar.gz"
-S="${WORKDIR}/${PN}-${TG_OWT_COMMIT}"
-# Fetch libyuv archive from: https://chromium.googlesource.com/libyuv/libyuv/+archive/${LIBYUV_COMMIT}.tar.gz
-
-LICENSE="BSD"
-SLOT="0/${PV##*pre}"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv"
-IUSE="screencast +X"
-
-# This package's USE flags may change the ABI and require a rebuild of
-#  dependent pacakges. As such, one should make sure to depend on
-#  media-libs/tg_owt[x=,y=,z=] for any package that uses this.
-
-# Bundled libs:
-# - libyuv (no stable versioning, www-client/chromium and media-libs/libvpx bundle it)
-# - libsrtp (project uses private APIs)
-# - pffft (no stable versioning, patched)
-# media-libs/libjpeg-turbo is required for libyuv
-DEPEND="
-	dev-cpp/abseil-cpp:=[cxx17(+)]
-	dev-libs/libevent:=
-	dev-libs/openssl:=
-	dev-libs/protobuf:=
-	media-libs/libjpeg-turbo:=
-	>=media-libs/libvpx-1.10.0:=
-	media-libs/openh264:=
-	media-libs/opus
-	media-video/ffmpeg:=
-	net-libs/usrsctp
-	screencast? (
-		dev-libs/glib:2
-		media-video/pipewire:=
-	)
-	X? (
-		x11-libs/libX11
-		x11-libs/libXcomposite
-		x11-libs/libXdamage
-		x11-libs/libXext
-		x11-libs/libXfixes
-		x11-libs/libXrender
-		x11-libs/libXrandr
-		x11-libs/libXtst
-	)
-"
-RDEPEND="${DEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
-	"${FILESDIR}/tg_owt-0_pre20210626-allow-disabling-pipewire.patch"
-	"${FILESDIR}/tg_owt-0_pre20211207-allow-disabling-X11.patch"
-	"${FILESDIR}/tg_owt-0_pre20210626-allow-disabling-pulseaudio.patch"
-	"${FILESDIR}/tg_owt-0_pre20211207-fix-dcsctp-references.patch"
-)
-
-src_unpack() {
-	unpack "${P}.tar.gz"
-	cd "${S}/src/third_party/libyuv" || die
-	unpack "libyuv-${LIBYUV_COMMIT}.tar.gz"
-}
-
-src_prepare() {
-	# libvpx source files aren't included in the repository
-	sed -i '/include(cmake\/libvpx.cmake)/d' CMakeLists.txt || die
-
-	# libopenh264 has GENERATED files with yasm that aren't excluded by
-	# EXCLUDE_FROM_ALL, and I have no clue how to avoid this.
-	# These source files aren't used with system-openh264, anyway.
-	sed -i '/include(cmake\/libopenh264.cmake)/d' CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Defined by -DCMAKE_BUILD_TYPE=Release, avoids crashes
-	# see https://bugs.gentoo.org/754012
-	# EAPI 8 still wipes this flag.
-	append-cppflags '-DNDEBUG'
-
-	local mycmakeargs=(
-		-DTG_OWT_USE_X11=$(usex X)
-		-DTG_OWT_USE_PIPEWIRE=$(usex screencast)
-
-		# Not required by net-im/telegram-desktop right now, I'd rather avoid
-		#  the (ABI compatibility) headache.
-		-DTG_OWT_BUILD_AUDIO_BACKENDS=OFF
-		#-DTG_OWT_BUILD_AUDIO_BACKENDS=$(usex alsa)
-		#-DTG_OWT_BUILD_PULSE_BACKEND=$(usex pulseaudio)
-	)
-	cmake_src_configure
-}
-
-src_install() {
-	cmake_src_install
-
-	# Save about 15MB of useless headers
-	rm -r "${ED}/usr/include/tg_owt/rtc_base/third_party" || die
-	rm -r "${ED}/usr/include/tg_owt/common_audio/third_party" || die
-	rm -r "${ED}/usr/include/tg_owt/modules/third_party" || die
-	rm -r "${ED}/usr/include/tg_owt/third_party" || die
-
-	# Install a few headers anyway, as required by net-im/telegram-desktop...
-	local headers=(
-		third_party/libyuv/include
-		rtc_base/third_party/sigslot
-		rtc_base/third_party/base64
-	)
-	for dir in "${headers[@]}"; do
-		pushd "${S}/src/${dir}" > /dev/null || die
-		find -type f -name "*.h" -exec install -Dm644 '{}' "${ED}/usr/include/tg_owt/${dir}/{}" \; || die
-		popd > /dev/null || die
-	done
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/tg_owt/, media-libs/tg_owt/files/
@ 2022-08-02 22:07 Georgy Yakovlev
  0 siblings, 0 replies; 6+ messages in thread
From: Georgy Yakovlev @ 2022-08-02 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     795a0a5e0f5f2053b3fada3ba1f40deb31d16965
Author:     Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Fri Jul 29 11:10:57 2022 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Aug  2 22:06:35 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=795a0a5e

media-libs/tg_owt: Bump to 0_pre20220507

Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 media-libs/tg_owt/Manifest                         |   1 +
 .../tg_owt-0_pre20220507-allow-disabling-X11.patch | 117 ++++++++++++++++++++
 .../tg_owt-0_pre20220507-unbundle-crc32c.patch     |  72 +++++++++++++
 media-libs/tg_owt/tg_owt-0_pre20220507.ebuild      | 118 +++++++++++++++++++++
 4 files changed, 308 insertions(+)

diff --git a/media-libs/tg_owt/Manifest b/media-libs/tg_owt/Manifest
index 342b3ec53144..c9992c75fd83 100644
--- a/media-libs/tg_owt/Manifest
+++ b/media-libs/tg_owt/Manifest
@@ -1,2 +1,3 @@
 DIST libyuv-ad890067f661dc747a975bc55ba3767fe30d4452.tar.gz 473845 BLAKE2B 664be51c166440e6b03fa98f65d907efc446800804058a5ea7fdf944e12cb1237a1487e83fbe9a2f1ce4c73521234e43632f921ad0333507737d81e1cb23ce8f SHA512 f97529b80a786e2e92443caabebd6d85a42641e10c3d2940b0f69bedf3b8a96c69c3247abddd059c4ddd6f78107ab7214222a4267a559fc2086c8edf5ea1afbc
 DIST tg_owt-0_pre20220209.tar.gz 16501237 BLAKE2B fb04aca8803645cc107a7e7fbab8d6020ad91f487ece0445aba29dd1127270e8b3a33d51bb35cfc916168df78cbdc98987610b39fd2cf7b86821b4f9733783c9 SHA512 0a35ce3379887b115117188aa8dce44bf89e23ad6f9fab7320a1cd55cdd534bae4c240778a37cb9588cd6acea1e7a83c22c113d608f7bfd5272ee22bb2773af3
+DIST tg_owt-0_pre20220507.tar.gz 15799740 BLAKE2B f12f3ecdfb0c7cfdae12af4734ddf22da4d95fd991b8a8ba17515f9d5c22a2f12b81967c0af15ac150c99129701c50c9384ea0e0240bf2366e176c833b14f7db SHA512 6902c65a1be0bcf300f08c274109ed53cdf92b7aff35915045c3989899fc2584cce3fe9df0e8ac29e708fcc575453fe5a6affaea85787f9c4fcc3bcde3b85711

diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20220507-allow-disabling-X11.patch b/media-libs/tg_owt/files/tg_owt-0_pre20220507-allow-disabling-X11.patch
new file mode 100644
index 000000000000..71b587f471bb
--- /dev/null
+++ b/media-libs/tg_owt/files/tg_owt-0_pre20220507-allow-disabling-X11.patch
@@ -0,0 +1,117 @@
+Add -DTG_OWT_USE_X11
+
+Allows disabling X11 desktop capturing independently of pipewire support, for
+the few people that run wayland without any X11 support whatsoever.
+
+This setup is untested, but supported by the GNI build system, see:
+* src/modules/desktop_capture/BUILD.gn (option rtc_use_x11_extensions)
+
+Toggling the WEBRTC_USE_X11 define also affects some files under
+src/modules/audio_device, but that falls under "X11 support", regardless...
+
+--- tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41.orig/CMakeLists.txt
++++ tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41/CMakeLists.txt
+@@ -21,11 +21,13 @@
+ 
+ option(BUILD_SHARED_LIBS "Builds shared libraries instead of static." OFF)
+ option(TG_OWT_USE_PROTOBUF "Use protobuf to generate additional headers. Useful for packaged build." ${BUILD_SHARED_LIBS})
++option(TG_OWT_USE_X11 "Use X11 for desktop capture on non-Apple Unix." ON)
+ option(TG_OWT_USE_PIPEWIRE "Use pipewire for desktop capture on non-Apple Unix." ON)
+ option(TG_OWT_DLOPEN_PIPEWIRE "dlopen pipewire 0.3 for desktop capture on non-Apple Unix." ${not_packaged_build})
+ option(TG_OWT_BUILD_AUDIO_BACKENDS "Build webrtc audio backends." OFF)
+ 
+ if (NOT UNIX OR APPLE)
++    set(TG_OWT_USE_X11 OFF)
+     set(TG_OWT_USE_PIPEWIRE OFF)
+ endif()
+ 
+@@ -97,6 +99,10 @@
+ add_library(tg_owt)
+ init_target(tg_owt)
+ 
++if (TG_OWT_USE_X11)
++    link_x11(tg_owt)
++endif()
++
+ if (TG_OWT_USE_PIPEWIRE)
+     if (TG_OWT_DLOPEN_PIPEWIRE)
+         include(cmake/generate_stubs.cmake)
+@@ -189,10 +195,6 @@
+ include(cmake/libwebrtcbuild.cmake)
+ target_link_libraries(tg_owt PUBLIC tg_owt::libwebrtcbuild)
+ 
+-if (UNIX AND NOT APPLE)
+-    link_x11(tg_owt)
+-endif()
+-
+ function(add_sublibrary postfix)
+     add_library(tg_owt_${postfix} OBJECT)
+     init_feature_target(tg_owt_${postfix} ${postfix})
+@@ -2370,6 +2372,39 @@
+     )
+ endif()
+ 
++if (NOT TG_OWT_USE_X11)
++    remove_target_sources(tg_owt ${webrtc_loc}
++        # src/modules/desktop_capture/BUILD.gn (rtc_use_x11_extensions)
++        modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc
++        modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.h
++        modules/desktop_capture/linux/x11/screen_capturer_x11.cc
++        modules/desktop_capture/linux/x11/screen_capturer_x11.h
++        modules/desktop_capture/linux/x11/shared_x_display.cc
++        modules/desktop_capture/linux/x11/shared_x_display.h
++        modules/desktop_capture/linux/x11/window_capturer_x11.cc
++        modules/desktop_capture/linux/x11/window_capturer_x11.h
++        modules/desktop_capture/linux/x11/window_finder_x11.cc
++        modules/desktop_capture/linux/x11/window_finder_x11.h
++        modules/desktop_capture/linux/x11/window_list_utils.cc
++        modules/desktop_capture/linux/x11/window_list_utils.h
++        modules/desktop_capture/linux/x11/x_atom_cache.cc
++        modules/desktop_capture/linux/x11/x_atom_cache.h
++        modules/desktop_capture/linux/x11/x_error_trap.cc
++        modules/desktop_capture/linux/x11/x_error_trap.h
++        modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc
++        modules/desktop_capture/linux/x11/x_server_pixel_buffer.h
++        modules/desktop_capture/linux/x11/x_window_property.cc
++        modules/desktop_capture/linux/x11/x_window_property.h
++
++        # screen_drawer_linux.cc depends on x11, rest are revdeps
++        modules/desktop_capture/screen_drawer.cc
++        modules/desktop_capture/screen_drawer.h
++        modules/desktop_capture/screen_drawer_linux.cc
++        modules/desktop_capture/screen_drawer_lock_posix.cc
++        modules/desktop_capture/screen_drawer_lock_posix.h
++    )
++endif()
++
+ if (NOT TG_OWT_USE_PIPEWIRE)
+     remove_target_sources(tg_owt ${webrtc_loc}
+         modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc
+--- tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41.orig/cmake/libwebrtcbuild.cmake
++++ tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41/cmake/libwebrtcbuild.cmake
+@@ -29,6 +29,13 @@
+     BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0
+ )
+ 
++if (TG_OWT_USE_X11)
++    target_compile_definitions(libwebrtcbuild
++    INTERFACE
++        WEBRTC_USE_X11
++    )
++endif()
++
+ if (TG_OWT_USE_PIPEWIRE)
+     target_compile_definitions(libwebrtcbuild
+     INTERFACE
+@@ -65,11 +72,6 @@
+         INTERFACE
+             WEBRTC_MAC
+         )
+-    else()
+-        target_compile_definitions(libwebrtcbuild
+-        INTERFACE
+-            WEBRTC_USE_X11
+-        )
+     endif()
+ 
+     if (CMAKE_SYSTEM_NAME STREQUAL "Linux")

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 {
+ 

diff --git a/media-libs/tg_owt/tg_owt-0_pre20220507.ebuild b/media-libs/tg_owt/tg_owt-0_pre20220507.ebuild
new file mode 100644
index 000000000000..384b3d7cafce
--- /dev/null
+++ b/media-libs/tg_owt/tg_owt-0_pre20220507.ebuild
@@ -0,0 +1,118 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="WebRTC build for Telegram"
+HOMEPAGE="https://github.com/desktop-app/tg_owt"
+
+TG_OWT_COMMIT="10d5f4bf77333ef6b43516f90d2ce13273255f41"
+LIBYUV_COMMIT="ad890067f661dc747a975bc55ba3767fe30d4452"
+SRC_URI="https://github.com/desktop-app/tg_owt/archive/${TG_OWT_COMMIT}.tar.gz -> ${P}.tar.gz
+	https://archive.org/download/libyuv-${LIBYUV_COMMIT}.tar/libyuv-${LIBYUV_COMMIT}.tar.gz"
+S="${WORKDIR}/${PN}-${TG_OWT_COMMIT}"
+# Fetch libyuv archive from: https://chromium.googlesource.com/libyuv/libyuv/+archive/${LIBYUV_COMMIT}.tar.gz
+
+LICENSE="BSD"
+SLOT="0/${PV##*pre}"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
+IUSE="screencast +X"
+
+# This package's USE flags may change the ABI and require a rebuild of
+#  dependent pacakges. As such, one should make sure to depend on
+#  media-libs/tg_owt[x=,y=,z=] for any package that uses this.
+
+# Bundled libs:
+# - libyuv (no stable versioning, www-client/chromium and media-libs/libvpx bundle it)
+# - libsrtp (project uses private APIs)
+# - pffft (no stable versioning, patched)
+DEPEND="
+	>=dev-cpp/abseil-cpp-20211102.0:=[cxx17(+)]
+	dev-libs/openssl:=
+	dev-libs/protobuf:=
+	media-libs/libjpeg-turbo:=
+	>=media-libs/libvpx-1.10.0:=
+	media-libs/openh264:=
+	media-libs/opus
+	media-video/ffmpeg:=
+	dev-libs/crc32c
+	screencast? (
+		dev-libs/glib:2
+		media-video/pipewire:=
+	)
+	X? (
+		x11-libs/libX11
+		x11-libs/libXcomposite
+		x11-libs/libXdamage
+		x11-libs/libXext
+		x11-libs/libXfixes
+		x11-libs/libXrender
+		x11-libs/libXrandr
+		x11-libs/libXtst
+	)
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}/tg_owt-0_pre20220507-allow-disabling-X11.patch"
+	"${FILESDIR}/tg_owt-0_pre20220507-unbundle-crc32c.patch"
+)
+
+src_unpack() {
+	unpack "${P}.tar.gz"
+	cd "${S}/src/third_party/libyuv" || die
+	unpack "libyuv-${LIBYUV_COMMIT}.tar.gz"
+}
+
+src_prepare() {
+	# libopenh264 has GENERATED files with yasm that aren't excluded by
+	# EXCLUDE_FROM_ALL, and I have no clue how to avoid this.
+	# These source files aren't used with system-openh264, anyway.
+	sed -i '/include(cmake\/libopenh264.cmake)/d' CMakeLists.txt || die
+
+	# The sources for libcrc32c aren't available, avoid needing them
+	sed -i '/include(cmake\/libcrc32c.cmake)/d' CMakeLists.txt || die
+
+	# "lol" said the scorpion, "lmao"
+	sed -i '/if (BUILD_SHARED_LIBS)/{n;n;s/WARNING/DEBUG/}' CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Defined by -DCMAKE_BUILD_TYPE=Release, avoids crashes
+	# see https://bugs.gentoo.org/754012
+	# EAPI 8 still wipes this flag.
+	append-cppflags '-DNDEBUG'
+
+	local mycmakeargs=(
+		-DTG_OWT_USE_X11=$(usex X)
+		-DTG_OWT_USE_PIPEWIRE=$(usex screencast)
+	)
+	cmake_src_configure
+}
+
+src_install() {
+	cmake_src_install
+
+	# Save about 15MB of useless headers
+	rm -r "${ED}/usr/include/tg_owt/rtc_base/third_party" || die
+	rm -r "${ED}/usr/include/tg_owt/common_audio/third_party" || die
+	rm -r "${ED}/usr/include/tg_owt/modules/third_party" || die
+	rm -r "${ED}/usr/include/tg_owt/third_party" || die
+
+	# Install a few headers anyway, as required by net-im/telegram-desktop...
+	local headers=(
+		third_party/libyuv/include
+		rtc_base/third_party/sigslot
+		rtc_base/third_party/base64
+	)
+	for dir in "${headers[@]}"; do
+		pushd "${S}/src/${dir}" > /dev/null || die
+		find -type f -name "*.h" -exec install -Dm644 '{}' "${ED}/usr/include/tg_owt/${dir}/{}" \; || die
+		popd > /dev/null || die
+	done
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/tg_owt/, media-libs/tg_owt/files/
@ 2023-02-01 19:27 Andreas Sturmlechner
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2023-02-01 19:27 UTC (permalink / raw
  To: gentoo-commits

commit:     8292c38ccb30db696aea8f60a41090b090ff808d
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 24 21:32:33 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Feb  1 19:26:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8292c38c

media-libs/tg_owt: drop 0_pre20220209

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-libs/tg_owt/Manifest                         |   1 -
 ...g_owt-0_pre20211207-fix-dcsctp-references.patch |  17 ---
 .../tg_owt-0_pre20220209-allow-disabling-X11.patch | 117 --------------------
 .../tg_owt-0_pre20220209-gcc-12-cstddef.patch      |  20 ----
 media-libs/tg_owt/tg_owt-0_pre20220209.ebuild      | 118 ---------------------
 5 files changed, 273 deletions(-)

diff --git a/media-libs/tg_owt/Manifest b/media-libs/tg_owt/Manifest
index 3ae8c7c46969..ef6eaa354cc6 100644
--- a/media-libs/tg_owt/Manifest
+++ b/media-libs/tg_owt/Manifest
@@ -1,5 +1,4 @@
 DIST libyuv-00950840d1c9bcbb3eb6ebc5aac5793e71166c8b.tar.bz2 426626 BLAKE2B efae062f124e3711bab9db232e5f956f09683d6743f54407bf89eeda1bb6ffbc9b82fc250bd709f06b94c28bc8bbb239a28262a002e7b7a2044f31c1432304bb SHA512 bfe2ad76c911986727d0c8b6ee85028fea382fad1eaebbff77a116f848388417719acaea11506936e8160d8dfa46f27a9a3d544b3db356e4c58aa81f493a6912
 DIST libyuv-ad890067f661dc747a975bc55ba3767fe30d4452.tar.gz 473845 BLAKE2B 664be51c166440e6b03fa98f65d907efc446800804058a5ea7fdf944e12cb1237a1487e83fbe9a2f1ce4c73521234e43632f921ad0333507737d81e1cb23ce8f SHA512 f97529b80a786e2e92443caabebd6d85a42641e10c3d2940b0f69bedf3b8a96c69c3247abddd059c4ddd6f78107ab7214222a4267a559fc2086c8edf5ea1afbc
-DIST tg_owt-0_pre20220209.tar.gz 16501237 BLAKE2B fb04aca8803645cc107a7e7fbab8d6020ad91f487ece0445aba29dd1127270e8b3a33d51bb35cfc916168df78cbdc98987610b39fd2cf7b86821b4f9733783c9 SHA512 0a35ce3379887b115117188aa8dce44bf89e23ad6f9fab7320a1cd55cdd534bae4c240778a37cb9588cd6acea1e7a83c22c113d608f7bfd5272ee22bb2773af3
 DIST tg_owt-0_pre20220507.tar.gz 15799740 BLAKE2B f12f3ecdfb0c7cfdae12af4734ddf22da4d95fd991b8a8ba17515f9d5c22a2f12b81967c0af15ac150c99129701c50c9384ea0e0240bf2366e176c833b14f7db SHA512 6902c65a1be0bcf300f08c274109ed53cdf92b7aff35915045c3989899fc2584cce3fe9df0e8ac29e708fcc575453fe5a6affaea85787f9c4fcc3bcde3b85711
 DIST tg_owt-0_pre20230105.tar.gz 13822416 BLAKE2B 05004dafaefd748d836f3508d3800bcb15d0bc9894b83340746e85763bff4b77d3dd1fb732eeaf86324b9afbec69be49b172ae7f70d959a7a65ce01b64fb6205 SHA512 70b4ada620cf19acf981abcefcbac1609fe04c51deef0332e288d59c4e7efe98625817c641b92967b4f37217f94e49aa0fc296fcfbb214c08cb63030b1427f54

diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch b/media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch
deleted file mode 100644
index 7b3380dd55de..000000000000
--- a/media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Fix undefined references to dcsctp when linking this library
-
-/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtg_owt.so.0.0.0: undefined reference to `dcsctp::TaskQueueTimeoutFactory::TaskQueueTimeout::TaskQueueTimeout(dcsctp::TaskQueueTimeoutFactory&)'
-/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtg_owt.so.0.0.0: undefined reference to `dcsctp::DcSctpSocketFactory::Create(std::basic_string_view<char, std::char_traits<char> >, dcsctp::DcSctpSocketCallbacks&, std::unique_ptr<dcsctp::PacketObserver, std::default_delete<dcsctp::PacketObserver> >, dcsctp::DcSctpOptions const&)'
-/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtg_owt.so.0.0.0: undefined reference to `vtable for dcsctp::TextPcapPacketObserver'
-
---- tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589.orig/CMakeLists.txt
-+++ tg_owt-d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589/CMakeLists.txt
-@@ -808,8 +808,6 @@
-     media/engine/webrtc_media_engine_defaults.cc
-     media/engine/webrtc_video_engine.cc
-     media/engine/webrtc_voice_engine.cc
--    media/sctp/dcsctp_transport.cc
--    media/sctp/dcsctp_transport.h
-     media/sctp/sctp_transport_factory.cc
-     media/sctp/sctp_transport_factory.h
-     media/sctp/usrsctp_transport.cc

diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20220209-allow-disabling-X11.patch b/media-libs/tg_owt/files/tg_owt-0_pre20220209-allow-disabling-X11.patch
deleted file mode 100644
index 3d4acfd0d941..000000000000
--- a/media-libs/tg_owt/files/tg_owt-0_pre20220209-allow-disabling-X11.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-Add -DTG_OWT_USE_X11
-
-Allows disabling X11 desktop capturing independently of pipewire support, for
-the few people that run wayland without any X11 support whatsoever.
-
-This setup is untested, but supported by the GNI build system, see:
-* src/modules/desktop_capture/BUILD.gn (option rtc_use_x11_extensions)
-
-Toggling the WEBRTC_USE_X11 define also affects some files under
-src/modules/audio_device, but that falls under "X11 support", regardless...
-
---- tg_owt-4cba1acdd718b700bb33945c0258283689d4eac7.orig/CMakeLists.txt
-+++ tg_owt-4cba1acdd718b700bb33945c0258283689d4eac7/CMakeLists.txt
-@@ -21,11 +21,13 @@
- 
- option(BUILD_SHARED_LIBS "Builds shared libraries instead of static." OFF)
- option(TG_OWT_USE_PROTOBUF "Use protobuf to generate additional headers. Useful for packaged build." ${BUILD_SHARED_LIBS})
-+option(TG_OWT_USE_X11 "Use X11 for desktop capture on non-Apple Unix." ON)
- option(TG_OWT_USE_PIPEWIRE "Use pipewire for desktop capture on non-Apple Unix." ON)
- option(TG_OWT_DLOPEN_PIPEWIRE "dlopen pipewire 0.3 for desktop capture on non-Apple Unix." ${not_packaged_build})
- option(TG_OWT_BUILD_AUDIO_BACKENDS "Build webrtc audio backends." OFF)
- 
- if (NOT UNIX OR APPLE)
-+    set(TG_OWT_USE_X11 OFF)
-     set(TG_OWT_USE_PIPEWIRE OFF)
- endif()
- 
-@@ -97,6 +99,10 @@
- add_library(tg_owt)
- init_target(tg_owt)
- 
-+if (TG_OWT_USE_X11)
-+    link_x11(tg_owt)
-+endif()
-+
- if (TG_OWT_USE_PIPEWIRE)
-     if (TG_OWT_DLOPEN_PIPEWIRE)
-         include(cmake/generate_stubs.cmake)
-@@ -188,10 +194,6 @@
- include(cmake/libwebrtcbuild.cmake)
- target_link_libraries(tg_owt PUBLIC tg_owt::libwebrtcbuild)
- 
--if (UNIX AND NOT APPLE)
--    link_x11(tg_owt)
--endif()
--
- function(add_sublibrary postfix)
-     add_library(tg_owt_${postfix} OBJECT)
-     init_feature_target(tg_owt_${postfix} ${postfix})
-@@ -2258,6 +2260,39 @@
-     )
- endif()
- 
-+if (NOT TG_OWT_USE_X11)
-+    remove_target_sources(tg_owt ${webrtc_loc}
-+        # src/modules/desktop_capture/BUILD.gn (rtc_use_x11_extensions)
-+        modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc
-+        modules/desktop_capture/linux/mouse_cursor_monitor_x11.h
-+        modules/desktop_capture/linux/screen_capturer_x11.cc
-+        modules/desktop_capture/linux/screen_capturer_x11.h
-+        modules/desktop_capture/linux/shared_x_display.cc
-+        modules/desktop_capture/linux/shared_x_display.h
-+        modules/desktop_capture/linux/window_capturer_x11.cc
-+        modules/desktop_capture/linux/window_capturer_x11.h
-+        modules/desktop_capture/linux/window_finder_x11.cc
-+        modules/desktop_capture/linux/window_finder_x11.h
-+        modules/desktop_capture/linux/window_list_utils.cc
-+        modules/desktop_capture/linux/window_list_utils.h
-+        modules/desktop_capture/linux/x_atom_cache.cc
-+        modules/desktop_capture/linux/x_atom_cache.h
-+        modules/desktop_capture/linux/x_error_trap.cc
-+        modules/desktop_capture/linux/x_error_trap.h
-+        modules/desktop_capture/linux/x_server_pixel_buffer.cc
-+        modules/desktop_capture/linux/x_server_pixel_buffer.h
-+        modules/desktop_capture/linux/x_window_property.cc
-+        modules/desktop_capture/linux/x_window_property.h
-+
-+        # screen_drawer_linux.cc depends on x11, rest are revdeps
-+        modules/desktop_capture/screen_drawer.cc
-+        modules/desktop_capture/screen_drawer.h
-+        modules/desktop_capture/screen_drawer_linux.cc
-+        modules/desktop_capture/screen_drawer_lock_posix.cc
-+        modules/desktop_capture/screen_drawer_lock_posix.h
-+    )
-+endif()
-+
- if (NOT TG_OWT_USE_PIPEWIRE)
-     remove_target_sources(tg_owt ${webrtc_loc}
-         modules/desktop_capture/linux/base_capturer_pipewire.cc
---- tg_owt-4cba1acdd718b700bb33945c0258283689d4eac7.orig/cmake/libwebrtcbuild.cmake
-+++ tg_owt-4cba1acdd718b700bb33945c0258283689d4eac7/cmake/libwebrtcbuild.cmake
-@@ -28,6 +28,13 @@
-     BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0
- )
- 
-+if (TG_OWT_USE_X11)
-+    target_compile_definitions(libwebrtcbuild
-+    INTERFACE
-+        WEBRTC_USE_X11
-+    )
-+endif()
-+
- if (TG_OWT_USE_PIPEWIRE)
-     target_compile_definitions(libwebrtcbuild
-     INTERFACE
-@@ -64,11 +71,6 @@
-         INTERFACE
-             WEBRTC_MAC
-         )
--    else()
--        target_compile_definitions(libwebrtcbuild
--        INTERFACE
--            WEBRTC_USE_X11
--        )
-     endif()
- 
-     if (CMAKE_SYSTEM_NAME STREQUAL "Linux")

diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20220209-gcc-12-cstddef.patch b/media-libs/tg_owt/files/tg_owt-0_pre20220209-gcc-12-cstddef.patch
deleted file mode 100644
index c79d6068945e..000000000000
--- a/media-libs/tg_owt/files/tg_owt-0_pre20220209-gcc-12-cstddef.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-https://bugs.gentoo.org/840526
---- a/src/modules/rtp_rtcp/source/rtp_packetizer_av1_test_helper.cc
-+++ b/src/modules/rtp_rtcp/source/rtp_packetizer_av1_test_helper.cc
-@@ -10,6 +10,7 @@
- 
- #include "modules/rtp_rtcp/source/rtp_packetizer_av1_test_helper.h"
- 
-+#include <cstddef>
- #include <stdint.h>
- 
- #include <initializer_list>
-@@ -42,7 +43,7 @@ std::vector<uint8_t> BuildAv1Frame(std::initializer_list<Av1Obu> obus) {
-     }
-     if (obu.header_ & kAv1ObuSizePresentBit) {
-       // write size in leb128 format.
--      size_t payload_size = obu.payload_.size();
-+      std::size_t payload_size = obu.payload_.size();
-       while (payload_size >= 0x80) {
-         raw.push_back(0x80 | (payload_size & 0x7F));
-         payload_size >>= 7;

diff --git a/media-libs/tg_owt/tg_owt-0_pre20220209.ebuild b/media-libs/tg_owt/tg_owt-0_pre20220209.ebuild
deleted file mode 100644
index c9458830e3d7..000000000000
--- a/media-libs/tg_owt/tg_owt-0_pre20220209.ebuild
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 2020-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake flag-o-matic
-
-DESCRIPTION="WebRTC build for Telegram"
-HOMEPAGE="https://github.com/desktop-app/tg_owt"
-
-TG_OWT_COMMIT="4cba1acdd718b700bb33945c0258283689d4eac7"
-LIBYUV_COMMIT="ad890067f661dc747a975bc55ba3767fe30d4452"
-SRC_URI="https://github.com/desktop-app/tg_owt/archive/${TG_OWT_COMMIT}.tar.gz -> ${P}.tar.gz
-	https://archive.org/download/libyuv-${LIBYUV_COMMIT}.tar/libyuv-${LIBYUV_COMMIT}.tar.gz"
-S="${WORKDIR}/${PN}-${TG_OWT_COMMIT}"
-# Fetch libyuv archive from: https://chromium.googlesource.com/libyuv/libyuv/+archive/${LIBYUV_COMMIT}.tar.gz
-
-LICENSE="BSD"
-SLOT="0/${PV##*pre}"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv"
-IUSE="screencast +X"
-
-# This package's USE flags may change the ABI and require a rebuild of
-#  dependent pacakges. As such, one should make sure to depend on
-#  media-libs/tg_owt[x=,y=,z=] for any package that uses this.
-
-# Bundled libs:
-# - libyuv (no stable versioning, www-client/chromium and media-libs/libvpx bundle it)
-# - libsrtp (project uses private APIs)
-# - pffft (no stable versioning, patched)
-DEPEND="
-	>=dev-cpp/abseil-cpp-20211102.0:=[cxx17(+)]
-	dev-libs/libevent:=
-	dev-libs/openssl:=
-	dev-libs/protobuf:=
-	media-libs/libjpeg-turbo:=
-	>=media-libs/libvpx-1.10.0:=
-	media-libs/openh264:=
-	media-libs/opus
-	media-video/ffmpeg:=
-	net-libs/usrsctp
-	screencast? (
-		dev-libs/glib:2
-		media-video/pipewire:=
-	)
-	X? (
-		x11-libs/libX11
-		x11-libs/libXcomposite
-		x11-libs/libXdamage
-		x11-libs/libXext
-		x11-libs/libXfixes
-		x11-libs/libXrender
-		x11-libs/libXrandr
-		x11-libs/libXtst
-	)
-"
-RDEPEND="${DEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
-	"${FILESDIR}/tg_owt-0_pre20220209-allow-disabling-X11.patch"
-	"${FILESDIR}/tg_owt-0_pre20211207-fix-dcsctp-references.patch"
-	"${FILESDIR}/tg_owt-0_pre20220209-gcc-12-cstdint.patch"
-	"${FILESDIR}/tg_owt-0_pre20220209-gcc-12-cstddef.patch"
-)
-
-src_unpack() {
-	unpack "${P}.tar.gz"
-	cd "${S}/src/third_party/libyuv" || die
-	unpack "libyuv-${LIBYUV_COMMIT}.tar.gz"
-}
-
-src_prepare() {
-	# libopenh264 has GENERATED files with yasm that aren't excluded by
-	# EXCLUDE_FROM_ALL, and I have no clue how to avoid this.
-	# These source files aren't used with system-openh264, anyway.
-	sed -i '/include(cmake\/libopenh264.cmake)/d' CMakeLists.txt || die
-
-	# "lol" said the scorpion, "lmao"
-	sed -i '/if (BUILD_SHARED_LIBS)/{n;n;s/WARNING/DEBUG/}' CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Defined by -DCMAKE_BUILD_TYPE=Release, avoids crashes
-	# see https://bugs.gentoo.org/754012
-	# EAPI 8 still wipes this flag.
-	append-cppflags '-DNDEBUG'
-
-	local mycmakeargs=(
-		-DTG_OWT_USE_X11=$(usex X)
-		-DTG_OWT_USE_PIPEWIRE=$(usex screencast)
-	)
-	cmake_src_configure
-}
-
-src_install() {
-	cmake_src_install
-
-	# Save about 15MB of useless headers
-	rm -r "${ED}/usr/include/tg_owt/rtc_base/third_party" || die
-	rm -r "${ED}/usr/include/tg_owt/common_audio/third_party" || die
-	rm -r "${ED}/usr/include/tg_owt/modules/third_party" || die
-	rm -r "${ED}/usr/include/tg_owt/third_party" || die
-
-	# Install a few headers anyway, as required by net-im/telegram-desktop...
-	local headers=(
-		third_party/libyuv/include
-		rtc_base/third_party/sigslot
-		rtc_base/third_party/base64
-	)
-	for dir in "${headers[@]}"; do
-		pushd "${S}/src/${dir}" > /dev/null || die
-		find -type f -name "*.h" -exec install -Dm644 '{}' "${ED}/usr/include/tg_owt/${dir}/{}" \; || die
-		popd > /dev/null || die
-	done
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/tg_owt/, media-libs/tg_owt/files/
@ 2023-04-17 20:16 Georgy Yakovlev
  0 siblings, 0 replies; 6+ messages in thread
From: Georgy Yakovlev @ 2023-04-17 20:16 UTC (permalink / raw
  To: gentoo-commits

commit:     9e485686023f5fe77316e295ecafc612aa626495
Author:     Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Mon Apr 10 23:29:49 2023 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Apr 17 20:15:50 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e485686

media-libs/tg_owt: Drop old

Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 media-libs/tg_owt/Manifest                         |   2 -
 .../tg_owt-0_pre20220209-gcc-12-cstdint.patch      |  44 --------
 .../tg_owt-0_pre20220507-allow-disabling-X11.patch | 117 --------------------
 .../tg_owt-0_pre20220507-unbundle-crc32c.patch     |  72 ------------
 media-libs/tg_owt/tg_owt-0_pre20220507.ebuild      | 121 ---------------------
 5 files changed, 356 deletions(-)

diff --git a/media-libs/tg_owt/Manifest b/media-libs/tg_owt/Manifest
index ef6eaa354cc6..888e31f0a89e 100644
--- a/media-libs/tg_owt/Manifest
+++ b/media-libs/tg_owt/Manifest
@@ -1,4 +1,2 @@
 DIST libyuv-00950840d1c9bcbb3eb6ebc5aac5793e71166c8b.tar.bz2 426626 BLAKE2B efae062f124e3711bab9db232e5f956f09683d6743f54407bf89eeda1bb6ffbc9b82fc250bd709f06b94c28bc8bbb239a28262a002e7b7a2044f31c1432304bb SHA512 bfe2ad76c911986727d0c8b6ee85028fea382fad1eaebbff77a116f848388417719acaea11506936e8160d8dfa46f27a9a3d544b3db356e4c58aa81f493a6912
-DIST libyuv-ad890067f661dc747a975bc55ba3767fe30d4452.tar.gz 473845 BLAKE2B 664be51c166440e6b03fa98f65d907efc446800804058a5ea7fdf944e12cb1237a1487e83fbe9a2f1ce4c73521234e43632f921ad0333507737d81e1cb23ce8f SHA512 f97529b80a786e2e92443caabebd6d85a42641e10c3d2940b0f69bedf3b8a96c69c3247abddd059c4ddd6f78107ab7214222a4267a559fc2086c8edf5ea1afbc
-DIST tg_owt-0_pre20220507.tar.gz 15799740 BLAKE2B f12f3ecdfb0c7cfdae12af4734ddf22da4d95fd991b8a8ba17515f9d5c22a2f12b81967c0af15ac150c99129701c50c9384ea0e0240bf2366e176c833b14f7db SHA512 6902c65a1be0bcf300f08c274109ed53cdf92b7aff35915045c3989899fc2584cce3fe9df0e8ac29e708fcc575453fe5a6affaea85787f9c4fcc3bcde3b85711
 DIST tg_owt-0_pre20230105.tar.gz 13822416 BLAKE2B 05004dafaefd748d836f3508d3800bcb15d0bc9894b83340746e85763bff4b77d3dd1fb732eeaf86324b9afbec69be49b172ae7f70d959a7a65ce01b64fb6205 SHA512 70b4ada620cf19acf981abcefcbac1609fe04c51deef0332e288d59c4e7efe98625817c641b92967b4f37217f94e49aa0fc296fcfbb214c08cb63030b1427f54

diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20220209-gcc-12-cstdint.patch b/media-libs/tg_owt/files/tg_owt-0_pre20220209-gcc-12-cstdint.patch
deleted file mode 100644
index 9feea500f164..000000000000
--- a/media-libs/tg_owt/files/tg_owt-0_pre20220209-gcc-12-cstdint.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-https://bugs.gentoo.org/840526
-https://github.com/desktop-app/tg_owt/pull/101
-
-From 86d2bcd7afb8706663d29e30f65863de5a626142 Mon Sep 17 00:00:00 2001
-From: Xiretza <xiretza@xiretza.xyz>
-Date: Sun, 15 May 2022 12:47:41 +0200
-Subject: [PATCH] fix(h265_pps_parser): fix missing cstdint include
-
---- a/src/common_video/h265/h265_pps_parser.h
-+++ b/src/common_video/h265/h265_pps_parser.h
-@@ -12,6 +12,7 @@
- #define COMMON_VIDEO_H265_PPS_PARSER_H_
- 
- #include "absl/types/optional.h"
-+#include <cstdint>
- 
- namespace rtc {
- class BitBuffer;
-
-From c358917ff8deac2015586356113dae75d076d1e3 Mon Sep 17 00:00:00 2001
-From: peeweep <peeweep@0x0.ee>
-Date: Mon, 27 Jun 2022 15:07:04 +0000
-Subject: [PATCH] fix(module_common_types_public): fix missing cstdint include
-
-Signed-off-by: peeweep <peeweep@0x0.ee>
----
- src/modules/include/module_common_types_public.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/modules/include/module_common_types_public.h b/src/modules/include/module_common_types_public.h
-index 345e45ce..8338a514 100644
---- a/src/modules/include/module_common_types_public.h
-+++ b/src/modules/include/module_common_types_public.h
-@@ -11,6 +11,7 @@
- #ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
- #define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
- 
-+#include <cstdint>
- #include <limits>
- 
- #include "absl/types/optional.h"
--- 
-2.35.1
-

diff --git a/media-libs/tg_owt/files/tg_owt-0_pre20220507-allow-disabling-X11.patch b/media-libs/tg_owt/files/tg_owt-0_pre20220507-allow-disabling-X11.patch
deleted file mode 100644
index 71b587f471bb..000000000000
--- a/media-libs/tg_owt/files/tg_owt-0_pre20220507-allow-disabling-X11.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-Add -DTG_OWT_USE_X11
-
-Allows disabling X11 desktop capturing independently of pipewire support, for
-the few people that run wayland without any X11 support whatsoever.
-
-This setup is untested, but supported by the GNI build system, see:
-* src/modules/desktop_capture/BUILD.gn (option rtc_use_x11_extensions)
-
-Toggling the WEBRTC_USE_X11 define also affects some files under
-src/modules/audio_device, but that falls under "X11 support", regardless...
-
---- tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41.orig/CMakeLists.txt
-+++ tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41/CMakeLists.txt
-@@ -21,11 +21,13 @@
- 
- option(BUILD_SHARED_LIBS "Builds shared libraries instead of static." OFF)
- option(TG_OWT_USE_PROTOBUF "Use protobuf to generate additional headers. Useful for packaged build." ${BUILD_SHARED_LIBS})
-+option(TG_OWT_USE_X11 "Use X11 for desktop capture on non-Apple Unix." ON)
- option(TG_OWT_USE_PIPEWIRE "Use pipewire for desktop capture on non-Apple Unix." ON)
- option(TG_OWT_DLOPEN_PIPEWIRE "dlopen pipewire 0.3 for desktop capture on non-Apple Unix." ${not_packaged_build})
- option(TG_OWT_BUILD_AUDIO_BACKENDS "Build webrtc audio backends." OFF)
- 
- if (NOT UNIX OR APPLE)
-+    set(TG_OWT_USE_X11 OFF)
-     set(TG_OWT_USE_PIPEWIRE OFF)
- endif()
- 
-@@ -97,6 +99,10 @@
- add_library(tg_owt)
- init_target(tg_owt)
- 
-+if (TG_OWT_USE_X11)
-+    link_x11(tg_owt)
-+endif()
-+
- if (TG_OWT_USE_PIPEWIRE)
-     if (TG_OWT_DLOPEN_PIPEWIRE)
-         include(cmake/generate_stubs.cmake)
-@@ -189,10 +195,6 @@
- include(cmake/libwebrtcbuild.cmake)
- target_link_libraries(tg_owt PUBLIC tg_owt::libwebrtcbuild)
- 
--if (UNIX AND NOT APPLE)
--    link_x11(tg_owt)
--endif()
--
- function(add_sublibrary postfix)
-     add_library(tg_owt_${postfix} OBJECT)
-     init_feature_target(tg_owt_${postfix} ${postfix})
-@@ -2370,6 +2372,39 @@
-     )
- endif()
- 
-+if (NOT TG_OWT_USE_X11)
-+    remove_target_sources(tg_owt ${webrtc_loc}
-+        # src/modules/desktop_capture/BUILD.gn (rtc_use_x11_extensions)
-+        modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc
-+        modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.h
-+        modules/desktop_capture/linux/x11/screen_capturer_x11.cc
-+        modules/desktop_capture/linux/x11/screen_capturer_x11.h
-+        modules/desktop_capture/linux/x11/shared_x_display.cc
-+        modules/desktop_capture/linux/x11/shared_x_display.h
-+        modules/desktop_capture/linux/x11/window_capturer_x11.cc
-+        modules/desktop_capture/linux/x11/window_capturer_x11.h
-+        modules/desktop_capture/linux/x11/window_finder_x11.cc
-+        modules/desktop_capture/linux/x11/window_finder_x11.h
-+        modules/desktop_capture/linux/x11/window_list_utils.cc
-+        modules/desktop_capture/linux/x11/window_list_utils.h
-+        modules/desktop_capture/linux/x11/x_atom_cache.cc
-+        modules/desktop_capture/linux/x11/x_atom_cache.h
-+        modules/desktop_capture/linux/x11/x_error_trap.cc
-+        modules/desktop_capture/linux/x11/x_error_trap.h
-+        modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc
-+        modules/desktop_capture/linux/x11/x_server_pixel_buffer.h
-+        modules/desktop_capture/linux/x11/x_window_property.cc
-+        modules/desktop_capture/linux/x11/x_window_property.h
-+
-+        # screen_drawer_linux.cc depends on x11, rest are revdeps
-+        modules/desktop_capture/screen_drawer.cc
-+        modules/desktop_capture/screen_drawer.h
-+        modules/desktop_capture/screen_drawer_linux.cc
-+        modules/desktop_capture/screen_drawer_lock_posix.cc
-+        modules/desktop_capture/screen_drawer_lock_posix.h
-+    )
-+endif()
-+
- if (NOT TG_OWT_USE_PIPEWIRE)
-     remove_target_sources(tg_owt ${webrtc_loc}
-         modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc
---- tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41.orig/cmake/libwebrtcbuild.cmake
-+++ tg_owt-10d5f4bf77333ef6b43516f90d2ce13273255f41/cmake/libwebrtcbuild.cmake
-@@ -29,6 +29,13 @@
-     BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0
- )
- 
-+if (TG_OWT_USE_X11)
-+    target_compile_definitions(libwebrtcbuild
-+    INTERFACE
-+        WEBRTC_USE_X11
-+    )
-+endif()
-+
- if (TG_OWT_USE_PIPEWIRE)
-     target_compile_definitions(libwebrtcbuild
-     INTERFACE
-@@ -65,11 +72,6 @@
-         INTERFACE
-             WEBRTC_MAC
-         )
--    else()
--        target_compile_definitions(libwebrtcbuild
--        INTERFACE
--            WEBRTC_USE_X11
--        )
-     endif()
- 
-     if (CMAKE_SYSTEM_NAME STREQUAL "Linux")

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
deleted file mode 100644
index 44283c24384c..000000000000
--- a/media-libs/tg_owt/files/tg_owt-0_pre20220507-unbundle-crc32c.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-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 {
- 

diff --git a/media-libs/tg_owt/tg_owt-0_pre20220507.ebuild b/media-libs/tg_owt/tg_owt-0_pre20220507.ebuild
deleted file mode 100644
index aeaa01e382a6..000000000000
--- a/media-libs/tg_owt/tg_owt-0_pre20220507.ebuild
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright 2020-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake flag-o-matic
-
-DESCRIPTION="WebRTC build for Telegram"
-HOMEPAGE="https://github.com/desktop-app/tg_owt"
-
-TG_OWT_COMMIT="10d5f4bf77333ef6b43516f90d2ce13273255f41"
-LIBYUV_COMMIT="ad890067f661dc747a975bc55ba3767fe30d4452"
-SRC_URI="https://github.com/desktop-app/tg_owt/archive/${TG_OWT_COMMIT}.tar.gz -> ${P}.tar.gz
-	https://archive.org/download/libyuv-${LIBYUV_COMMIT}.tar/libyuv-${LIBYUV_COMMIT}.tar.gz"
-S="${WORKDIR}/${PN}-${TG_OWT_COMMIT}"
-# Fetch libyuv archive from: https://chromium.googlesource.com/libyuv/libyuv/+archive/${LIBYUV_COMMIT}.tar.gz
-
-LICENSE="BSD"
-SLOT="0/${PV##*pre}"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv"
-IUSE="screencast +X"
-
-# This package's USE flags may change the ABI and require a rebuild of
-#  dependent pacakges. As such, one should make sure to depend on
-#  media-libs/tg_owt[x=,y=,z=] for any package that uses this.
-# Furthermore, the -DNDEBUG preprocessor flag should be defined by any
-#  dependent package, failure to do so will change the ABI in the header files.
-
-# Bundled libs:
-# - libyuv (no stable versioning, www-client/chromium and media-libs/libvpx bundle it)
-# - libsrtp (project uses private APIs)
-# - pffft (no stable versioning, patched)
-DEPEND="
-	>=dev-cpp/abseil-cpp-20211102.0:=[cxx17(+)]
-	dev-libs/openssl:=
-	dev-libs/protobuf:=
-	media-libs/libjpeg-turbo:=
-	>=media-libs/libvpx-1.10.0:=
-	media-libs/openh264:=
-	media-libs/opus
-	media-video/ffmpeg:=
-	dev-libs/crc32c
-	screencast? (
-		dev-libs/glib:2
-		media-video/pipewire:=
-	)
-	X? (
-		x11-libs/libX11
-		x11-libs/libXcomposite
-		x11-libs/libXdamage
-		x11-libs/libXext
-		x11-libs/libXfixes
-		x11-libs/libXrender
-		x11-libs/libXrandr
-		x11-libs/libXtst
-	)
-"
-RDEPEND="${DEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
-	"${FILESDIR}/tg_owt-0_pre20220507-allow-disabling-X11.patch"
-	"${FILESDIR}/tg_owt-0_pre20220507-unbundle-crc32c.patch"
-	"${FILESDIR}/tg_owt-0_pre20220209-gcc-12-cstdint.patch"
-)
-
-src_unpack() {
-	unpack "${P}.tar.gz"
-	cd "${S}/src/third_party/libyuv" || die
-	unpack "libyuv-${LIBYUV_COMMIT}.tar.gz"
-}
-
-src_prepare() {
-	# libopenh264 has GENERATED files with yasm that aren't excluded by
-	# EXCLUDE_FROM_ALL, and I have no clue how to avoid this.
-	# These source files aren't used with system-openh264, anyway.
-	sed -i '/include(cmake\/libopenh264.cmake)/d' CMakeLists.txt || die
-
-	# The sources for libcrc32c aren't available, avoid needing them
-	sed -i '/include(cmake\/libcrc32c.cmake)/d' CMakeLists.txt || die
-
-	# "lol" said the scorpion, "lmao"
-	sed -i '/if (BUILD_SHARED_LIBS)/{n;n;s/WARNING/DEBUG/}' CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Defined by -DCMAKE_BUILD_TYPE=Release, avoids crashes
-	# See https://bugs.gentoo.org/754012
-	# EAPI 8 still wipes this flag.
-	append-cppflags '-DNDEBUG'
-
-	local mycmakeargs=(
-		-DTG_OWT_USE_X11=$(usex X)
-		-DTG_OWT_USE_PIPEWIRE=$(usex screencast)
-	)
-	cmake_src_configure
-}
-
-src_install() {
-	cmake_src_install
-
-	# Save about 15MB of useless headers
-	rm -r "${ED}/usr/include/tg_owt/rtc_base/third_party" || die
-	rm -r "${ED}/usr/include/tg_owt/common_audio/third_party" || die
-	rm -r "${ED}/usr/include/tg_owt/modules/third_party" || die
-	rm -r "${ED}/usr/include/tg_owt/third_party" || die
-
-	# Install a few headers anyway, as required by net-im/telegram-desktop...
-	local headers=(
-		third_party/libyuv/include
-		rtc_base/third_party/sigslot
-		rtc_base/third_party/base64
-	)
-	for dir in "${headers[@]}"; do
-		pushd "${S}/src/${dir}" > /dev/null || die
-		find -type f -name "*.h" -exec install -Dm644 '{}' "${ED}/usr/include/tg_owt/${dir}/{}" \; || die
-		popd > /dev/null || die
-	done
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-17 20:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-01 19:27 [gentoo-commits] repo/gentoo:master commit in: media-libs/tg_owt/, media-libs/tg_owt/files/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2023-04-17 20:16 Georgy Yakovlev
2022-08-02 22:07 Georgy Yakovlev
2022-04-15  6:04 Sam James
2021-12-10 21:31 Georgy Yakovlev
2021-08-05 16:42 Georgy Yakovlev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox