Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] telegram-desktop: update to 2.5.1
@ 2020-12-26 21:24 Johnnynator
  2020-12-26 21:31 ` [PR PATCH] [Updated] " Johnnynator
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Johnnynator @ 2020-12-26 21:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 341 bytes --]

There is a new pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages telegram-desktop-2.5.1
https://github.com/void-linux/void-packages/pull/27459

telegram-desktop: update to 2.5.1


A patch file from https://github.com/void-linux/void-packages/pull/27459.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-desktop-2.5.1-27459.patch --]
[-- Type: text/x-diff, Size: 8890 bytes --]

From 411a01e8ca288fdc42a710408f9662b09caa6b8a Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sat, 26 Dec 2020 14:32:18 +0100
Subject: [PATCH 1/2] telegram-desktop: update to 2.5.1.

---
 .../patches/0002-PPC-big-endian.patch         | 22 -------------------
 srcpkgs/telegram-desktop/template             | 21 +++++++++++-------
 2 files changed, 13 insertions(+), 30 deletions(-)
 delete mode 100644 srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch

diff --git a/srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch b/srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch
deleted file mode 100644
index 32af787c2da..00000000000
--- a/srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Subject: [PATCH] PPC big endian
-
----
- Telegram/SourceFiles/config.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git Telegram/SourceFiles/config.h Telegram/SourceFiles/config.h
-index fb7b54e4d..6a873fbd7 100644
---- Telegram/SourceFiles/config.h
-+++ Telegram/SourceFiles/config.h
-@@ -177,7 +177,7 @@ constexpr auto ApiHash = "344583e45741c457fe1862106095a5eb";
- #endif // TDESKTOP_API_ID && TDESKTOP_API_HASH
- 
- #if Q_BYTE_ORDER == Q_BIG_ENDIAN
--#error "Only little endian is supported!"
-+#warning "Only little endian is supported!"
- #endif // Q_BYTE_ORDER == Q_BIG_ENDIAN
- 
- #if (TDESKTOP_ALPHA_VERSION != 0)
--- 
-2.24.1
-
diff --git a/srcpkgs/telegram-desktop/template b/srcpkgs/telegram-desktop/template
index 730585a10b2..04aa1ec98a6 100644
--- a/srcpkgs/telegram-desktop/template
+++ b/srcpkgs/telegram-desktop/template
@@ -1,7 +1,7 @@
 # Template file for 'telegram-desktop'
 pkgname=telegram-desktop
-version=2.4.7
-revision=2
+version=2.5.1
+revision=1
 wrksrc="tdesktop-${version}-full"
 build_style=cmake
 build_helper="qemu"
@@ -11,13 +11,14 @@ configure_args="-DTDESKTOP_API_ID=209235
  -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
  -DTDESKTOP_LAUNCHER_BASENAME=org.telegram.desktop.desktop
  -DDESKTOP_APP_DISABLE_SPELLCHECK=$(vopt_if spellcheck 'false' 'true')
- -DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION=ON"
+ -DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION=$(vopt_if webrtc 'OFF' 'ON')"
 hostmakedepends="pkg-config qt5-qmake qt5-host-tools python"
 makedepends="alsa-lib-devel ffmpeg-devel libdbusmenu-glib-devel libopenal-devel
  minizip-devel opus-devel xxHash-devel pulseaudio-devel qt5-devel range-v3
- libva-devel rapidjson liblz4-devel liblzma-devel rlottie-devel gtk+3-devel
+ libva-devel rapidjson liblz4-devel liblzma-devel gtk+3-devel
  MesaLib-devel libdbusmenu-qt5-devel qt5-wayland-devel libatomic-devel
- $(vopt_if spellcheck hunspell-devel)"
+ xcb-util-keysyms-devel $(vopt_if spellcheck hunspell-devel)
+ $(vopt_if webrtc tg_owt)"
 depends="qt5-imageformats qt5-core>=5.15.2<5.15.3"
 short_desc="Telegram Desktop messaging app"
 maintainer="John <me@johnnynator.dev>"
@@ -25,10 +26,10 @@ license="GPL-3.0-or-later, OpenSSL"
 homepage="https://desktop.telegram.org/"
 changelog="https://github.com/telegramdesktop/tdesktop/blob/v${version}/changelog.txt"
 distfiles="https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz"
-checksum=7b13df53be5d6b58d07d730c9429e415be2fea7f7be37bcaa80a505152125bc8
+checksum=f1cc5e876deaa4fa4eaafbba95f127d5a3114c166802902b8584099852b9eae2
 
-build_options="spellcheck"
-build_options_default="spellcheck"
+build_options="spellcheck webrtc"
+build_options_default="spellcheck webrtc"
 
 case $XBPS_TARGET_MACHINE in
 	mips*) broken="unsupported";;
@@ -42,6 +43,10 @@ if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt5-devel"
 fi
 
+if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
+	broken="UI doesn't go beyond initial screen, also LE specific code in networking"
+fi
+
 post_extract() {
 	_qt5_dep_ver="${depends#*>=}"
 	_qt5_dep_ver="${_qt5_dep_ver%<*}"

From 37f3b339157f3d56c7c7cff5fdcf2d6bdb231d66 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sat, 26 Dec 2020 21:56:33 +0100
Subject: [PATCH 2/2] New package: tg_owt-0.0.0.1

---
 srcpkgs/tg_owt/patches/libressl.patch      | 70 ++++++++++++++++++++++
 srcpkgs/tg_owt/patches/libressl.patch.args |  1 +
 srcpkgs/tg_owt/template                    | 33 ++++++++++
 3 files changed, 104 insertions(+)
 create mode 100644 srcpkgs/tg_owt/patches/libressl.patch
 create mode 100644 srcpkgs/tg_owt/patches/libressl.patch.args
 create mode 100644 srcpkgs/tg_owt/template

diff --git a/srcpkgs/tg_owt/patches/libressl.patch b/srcpkgs/tg_owt/patches/libressl.patch
new file mode 100644
index 00000000000..fc352a2a64c
--- /dev/null
+++ b/srcpkgs/tg_owt/patches/libressl.patch
@@ -0,0 +1,70 @@
+From 3f2d8238846d4795f1292c05923b9f212dc4d022 Mon Sep 17 00:00:00 2001
+From: Charlie Li <git@vishwin.info>
+Date: Sat, 21 Nov 2020 14:24:04 -0500
+Subject: [PATCH] Fix build with LibreSSL
+
+LibreSSL's dtls1.h uses some definitions from ssl.h and ssl3.h, but
+expects consumers to include them. Reorder and include them before
+dtls1.h.
+
+LibreSSL does not define DTLS1_2_VERSION. Remove them from view.
+---
+ src/rtc_base/openssl_stream_adapter.cc | 19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/src/rtc_base/openssl_stream_adapter.cc b/src/rtc_base/openssl_stream_adapter.cc
+index 7f4b79a5..037002bc 100644
+--- a/src/rtc_base/openssl_stream_adapter.cc
++++ b/src/rtc_base/openssl_stream_adapter.cc
+@@ -17,8 +17,11 @@
+ #include <openssl/tls1.h>
+ #include <openssl/x509v3.h>
+ #ifndef OPENSSL_IS_BORINGSSL
+-#include <openssl/dtls1.h>
+ #include <openssl/ssl.h>
++#ifdef LIBRESSL_VERSION_NUMBER
++#include <openssl/ssl3.h>
++#endif
++#include <openssl/dtls1.h>
+ #endif
+ 
+ #include <memory>
+@@ -392,8 +395,10 @@ SSLProtocolVersion OpenSSLStreamAdapter::GetSslVersion() const {
+   if (ssl_mode_ == SSL_MODE_DTLS) {
+     if (ssl_version == DTLS1_VERSION) {
+       return SSL_PROTOCOL_DTLS_10;
++#ifndef LIBRESSL_VERSION_NUMBER
+     } else if (ssl_version == DTLS1_2_VERSION) {
+       return SSL_PROTOCOL_DTLS_12;
++#endif
+     }
+   } else {
+     if (ssl_version == TLS1_VERSION) {
+@@ -985,15 +990,27 @@ SSL_CTX* OpenSSLStreamAdapter::SetupSSLContext() {
+       case SSL_PROTOCOL_TLS_12:
+       default:
+         SSL_CTX_set_max_proto_version(
++#ifdef LIBRESSL_VERSION_NUMBER
++            ctx, TLS1_2_VERSION);
++#else
+             ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION);
++#endif
+         break;
+     }
+   } else {
+     // TODO(https://bugs.webrtc.org/10261): Make this the default in M84.
+     SSL_CTX_set_min_proto_version(
++#ifdef LIBRESSL_VERSION_NUMBER
++        ctx, TLS1_2_VERSION);
++#else
+         ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION);
++#endif
+     SSL_CTX_set_max_proto_version(
++#ifdef LIBRESSL_VERSION_NUMBER
++        ctx, TLS1_2_VERSION);
++#else
+         ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION);
++#endif
+   }
+ 
+ #ifdef OPENSSL_IS_BORINGSSL
diff --git a/srcpkgs/tg_owt/patches/libressl.patch.args b/srcpkgs/tg_owt/patches/libressl.patch.args
new file mode 100644
index 00000000000..2eba1cb3c5c
--- /dev/null
+++ b/srcpkgs/tg_owt/patches/libressl.patch.args
@@ -0,0 +1 @@
+-Np1
diff --git a/srcpkgs/tg_owt/template b/srcpkgs/tg_owt/template
new file mode 100644
index 00000000000..91f4fa81635
--- /dev/null
+++ b/srcpkgs/tg_owt/template
@@ -0,0 +1,33 @@
+# Template file for 'tg_owt'
+pkgname=tg_owt
+version=0.0.0.1
+revision=1
+_commit=756fd0fb5f40ffb4244c675208e84de781f766f3
+_libvpx_commit=5b63f0f821e94f8072eb483014cfc33b05978bb9
+_libyuv_commit=ad890067f661dc747a975bc55ba3767fe30d4452
+wrksrc="tg_owt-$_commit"
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=OFF"
+hostmakedepends="pkg-config yasm protobuf25"
+makedepends="alsa-lib-devel pulseaudio-devel libressl-devel opus-devel
+ ffmpeg-devel libjpeg-turbo-devel protobuf-devel"
+short_desc="bs"
+maintainer="John <me@johnnynator.dev>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/desktop-app/tg_owt"
+distfiles="https://github.com/desktop-app/tg_owt/archive/${_commit}.tar.gz
+ https://chromium.googlesource.com/webm/libvpx/+archive/${_libvpx_commit}.tar.gz
+ https://chromium.googlesource.com/libyuv/libyuv/+archive/${_libyuv_commit}.tar.gz"
+checksum="bdf262295da94c2732b962a8f35e4b8db88ecdc21b634337f8774dca790bd06b
+ 86eb13d7e9496d28625c827929ab60f83a777cc5be9adc054002a24aac4140ef
+ 59aa76d3bb2972367edeab4e00790823bc3a130162a8628d6334b90c995b658f"
+noextract="${_libvpx_commit}.tar.gz ${_libyuv_commit}.tar.gz"
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi
+
+post_extract() {
+	bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_libvpx_commit}.tar.gz -C ${wrksrc}/src/third_party/libvpx/source/libvpx
+	bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_libyuv_commit}.tar.gz -C ${wrksrc}/src/third_party/libyuv
+}

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

* Re: [PR PATCH] [Updated] telegram-desktop: update to 2.5.1
  2020-12-26 21:24 [PR PATCH] telegram-desktop: update to 2.5.1 Johnnynator
@ 2020-12-26 21:31 ` Johnnynator
  2020-12-27  0:07 ` Johnnynator
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2020-12-26 21:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 346 bytes --]

There is an updated pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages telegram-desktop-2.5.1
https://github.com/void-linux/void-packages/pull/27459

telegram-desktop: update to 2.5.1


A patch file from https://github.com/void-linux/void-packages/pull/27459.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-desktop-2.5.1-27459.patch --]
[-- Type: text/x-diff, Size: 8932 bytes --]

From 411a01e8ca288fdc42a710408f9662b09caa6b8a Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sat, 26 Dec 2020 14:32:18 +0100
Subject: [PATCH 1/2] telegram-desktop: update to 2.5.1.

---
 .../patches/0002-PPC-big-endian.patch         | 22 -------------------
 srcpkgs/telegram-desktop/template             | 21 +++++++++++-------
 2 files changed, 13 insertions(+), 30 deletions(-)
 delete mode 100644 srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch

diff --git a/srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch b/srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch
deleted file mode 100644
index 32af787c2da..00000000000
--- a/srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Subject: [PATCH] PPC big endian
-
----
- Telegram/SourceFiles/config.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git Telegram/SourceFiles/config.h Telegram/SourceFiles/config.h
-index fb7b54e4d..6a873fbd7 100644
---- Telegram/SourceFiles/config.h
-+++ Telegram/SourceFiles/config.h
-@@ -177,7 +177,7 @@ constexpr auto ApiHash = "344583e45741c457fe1862106095a5eb";
- #endif // TDESKTOP_API_ID && TDESKTOP_API_HASH
- 
- #if Q_BYTE_ORDER == Q_BIG_ENDIAN
--#error "Only little endian is supported!"
-+#warning "Only little endian is supported!"
- #endif // Q_BYTE_ORDER == Q_BIG_ENDIAN
- 
- #if (TDESKTOP_ALPHA_VERSION != 0)
--- 
-2.24.1
-
diff --git a/srcpkgs/telegram-desktop/template b/srcpkgs/telegram-desktop/template
index 730585a10b2..04aa1ec98a6 100644
--- a/srcpkgs/telegram-desktop/template
+++ b/srcpkgs/telegram-desktop/template
@@ -1,7 +1,7 @@
 # Template file for 'telegram-desktop'
 pkgname=telegram-desktop
-version=2.4.7
-revision=2
+version=2.5.1
+revision=1
 wrksrc="tdesktop-${version}-full"
 build_style=cmake
 build_helper="qemu"
@@ -11,13 +11,14 @@ configure_args="-DTDESKTOP_API_ID=209235
  -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
  -DTDESKTOP_LAUNCHER_BASENAME=org.telegram.desktop.desktop
  -DDESKTOP_APP_DISABLE_SPELLCHECK=$(vopt_if spellcheck 'false' 'true')
- -DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION=ON"
+ -DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION=$(vopt_if webrtc 'OFF' 'ON')"
 hostmakedepends="pkg-config qt5-qmake qt5-host-tools python"
 makedepends="alsa-lib-devel ffmpeg-devel libdbusmenu-glib-devel libopenal-devel
  minizip-devel opus-devel xxHash-devel pulseaudio-devel qt5-devel range-v3
- libva-devel rapidjson liblz4-devel liblzma-devel rlottie-devel gtk+3-devel
+ libva-devel rapidjson liblz4-devel liblzma-devel gtk+3-devel
  MesaLib-devel libdbusmenu-qt5-devel qt5-wayland-devel libatomic-devel
- $(vopt_if spellcheck hunspell-devel)"
+ xcb-util-keysyms-devel $(vopt_if spellcheck hunspell-devel)
+ $(vopt_if webrtc tg_owt)"
 depends="qt5-imageformats qt5-core>=5.15.2<5.15.3"
 short_desc="Telegram Desktop messaging app"
 maintainer="John <me@johnnynator.dev>"
@@ -25,10 +26,10 @@ license="GPL-3.0-or-later, OpenSSL"
 homepage="https://desktop.telegram.org/"
 changelog="https://github.com/telegramdesktop/tdesktop/blob/v${version}/changelog.txt"
 distfiles="https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz"
-checksum=7b13df53be5d6b58d07d730c9429e415be2fea7f7be37bcaa80a505152125bc8
+checksum=f1cc5e876deaa4fa4eaafbba95f127d5a3114c166802902b8584099852b9eae2
 
-build_options="spellcheck"
-build_options_default="spellcheck"
+build_options="spellcheck webrtc"
+build_options_default="spellcheck webrtc"
 
 case $XBPS_TARGET_MACHINE in
 	mips*) broken="unsupported";;
@@ -42,6 +43,10 @@ if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt5-devel"
 fi
 
+if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
+	broken="UI doesn't go beyond initial screen, also LE specific code in networking"
+fi
+
 post_extract() {
 	_qt5_dep_ver="${depends#*>=}"
 	_qt5_dep_ver="${_qt5_dep_ver%<*}"

From 92d1d85fec094a5efa6e1f569983a06b25b181db Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sat, 26 Dec 2020 21:56:33 +0100
Subject: [PATCH 2/2] New package: tg_owt-0.0.0.1

---
 srcpkgs/tg_owt/patches/libressl.patch      | 70 ++++++++++++++++++++++
 srcpkgs/tg_owt/patches/libressl.patch.args |  1 +
 srcpkgs/tg_owt/template                    | 33 ++++++++++
 3 files changed, 104 insertions(+)
 create mode 100644 srcpkgs/tg_owt/patches/libressl.patch
 create mode 100644 srcpkgs/tg_owt/patches/libressl.patch.args
 create mode 100644 srcpkgs/tg_owt/template

diff --git a/srcpkgs/tg_owt/patches/libressl.patch b/srcpkgs/tg_owt/patches/libressl.patch
new file mode 100644
index 00000000000..fc352a2a64c
--- /dev/null
+++ b/srcpkgs/tg_owt/patches/libressl.patch
@@ -0,0 +1,70 @@
+From 3f2d8238846d4795f1292c05923b9f212dc4d022 Mon Sep 17 00:00:00 2001
+From: Charlie Li <git@vishwin.info>
+Date: Sat, 21 Nov 2020 14:24:04 -0500
+Subject: [PATCH] Fix build with LibreSSL
+
+LibreSSL's dtls1.h uses some definitions from ssl.h and ssl3.h, but
+expects consumers to include them. Reorder and include them before
+dtls1.h.
+
+LibreSSL does not define DTLS1_2_VERSION. Remove them from view.
+---
+ src/rtc_base/openssl_stream_adapter.cc | 19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/src/rtc_base/openssl_stream_adapter.cc b/src/rtc_base/openssl_stream_adapter.cc
+index 7f4b79a5..037002bc 100644
+--- a/src/rtc_base/openssl_stream_adapter.cc
++++ b/src/rtc_base/openssl_stream_adapter.cc
+@@ -17,8 +17,11 @@
+ #include <openssl/tls1.h>
+ #include <openssl/x509v3.h>
+ #ifndef OPENSSL_IS_BORINGSSL
+-#include <openssl/dtls1.h>
+ #include <openssl/ssl.h>
++#ifdef LIBRESSL_VERSION_NUMBER
++#include <openssl/ssl3.h>
++#endif
++#include <openssl/dtls1.h>
+ #endif
+ 
+ #include <memory>
+@@ -392,8 +395,10 @@ SSLProtocolVersion OpenSSLStreamAdapter::GetSslVersion() const {
+   if (ssl_mode_ == SSL_MODE_DTLS) {
+     if (ssl_version == DTLS1_VERSION) {
+       return SSL_PROTOCOL_DTLS_10;
++#ifndef LIBRESSL_VERSION_NUMBER
+     } else if (ssl_version == DTLS1_2_VERSION) {
+       return SSL_PROTOCOL_DTLS_12;
++#endif
+     }
+   } else {
+     if (ssl_version == TLS1_VERSION) {
+@@ -985,15 +990,27 @@ SSL_CTX* OpenSSLStreamAdapter::SetupSSLContext() {
+       case SSL_PROTOCOL_TLS_12:
+       default:
+         SSL_CTX_set_max_proto_version(
++#ifdef LIBRESSL_VERSION_NUMBER
++            ctx, TLS1_2_VERSION);
++#else
+             ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION);
++#endif
+         break;
+     }
+   } else {
+     // TODO(https://bugs.webrtc.org/10261): Make this the default in M84.
+     SSL_CTX_set_min_proto_version(
++#ifdef LIBRESSL_VERSION_NUMBER
++        ctx, TLS1_2_VERSION);
++#else
+         ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION);
++#endif
+     SSL_CTX_set_max_proto_version(
++#ifdef LIBRESSL_VERSION_NUMBER
++        ctx, TLS1_2_VERSION);
++#else
+         ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION);
++#endif
+   }
+ 
+ #ifdef OPENSSL_IS_BORINGSSL
diff --git a/srcpkgs/tg_owt/patches/libressl.patch.args b/srcpkgs/tg_owt/patches/libressl.patch.args
new file mode 100644
index 00000000000..2eba1cb3c5c
--- /dev/null
+++ b/srcpkgs/tg_owt/patches/libressl.patch.args
@@ -0,0 +1 @@
+-Np1
diff --git a/srcpkgs/tg_owt/template b/srcpkgs/tg_owt/template
new file mode 100644
index 00000000000..691e06109dc
--- /dev/null
+++ b/srcpkgs/tg_owt/template
@@ -0,0 +1,33 @@
+# Template file for 'tg_owt'
+pkgname=tg_owt
+version=0.0.0.1
+revision=1
+_commit=756fd0fb5f40ffb4244c675208e84de781f766f3
+_libvpx_commit=5b63f0f821e94f8072eb483014cfc33b05978bb9
+_libyuv_commit=ad890067f661dc747a975bc55ba3767fe30d4452
+wrksrc="tg_owt-$_commit"
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=OFF"
+hostmakedepends="pkg-config yasm protobuf25"
+makedepends="alsa-lib-devel pulseaudio-devel libressl-devel opus-devel
+ ffmpeg-devel libjpeg-turbo-devel protobuf-devel"
+short_desc="WebRTC library for Telegram-desktop"
+maintainer="John <me@johnnynator.dev>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/desktop-app/tg_owt"
+distfiles="https://github.com/desktop-app/tg_owt/archive/${_commit}.tar.gz
+ https://chromium.googlesource.com/webm/libvpx/+archive/${_libvpx_commit}.tar.gz
+ https://chromium.googlesource.com/libyuv/libyuv/+archive/${_libyuv_commit}.tar.gz"
+checksum="@43d09b00a43f9206b1f04c6d6697f4b0cb3be0285100bf5df91144b1d689c89a
+ @ea967f58e720be3a8f8105d48fedb983570679c8ced8ffbad48fb673089c7ed9
+ @1dd51820852df840c339bf3f18e6cf1166de33d5631a69cd1eae5b2b34c113e3"
+skip_extraction="${_libvpx_commit}.tar.gz ${_libyuv_commit}.tar.gz"
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi
+
+post_extract() {
+	bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_libvpx_commit}.tar.gz -C ${wrksrc}/src/third_party/libvpx/source/libvpx
+	bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_libyuv_commit}.tar.gz -C ${wrksrc}/src/third_party/libyuv
+}

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

* Re: [PR PATCH] [Updated] telegram-desktop: update to 2.5.1
  2020-12-26 21:24 [PR PATCH] telegram-desktop: update to 2.5.1 Johnnynator
  2020-12-26 21:31 ` [PR PATCH] [Updated] " Johnnynator
@ 2020-12-27  0:07 ` Johnnynator
  2020-12-27 11:44 ` Johnnynator
  2020-12-27 13:04 ` [PR PATCH] [Merged]: " Johnnynator
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2020-12-27  0:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 346 bytes --]

There is an updated pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages telegram-desktop-2.5.1
https://github.com/void-linux/void-packages/pull/27459

telegram-desktop: update to 2.5.1


A patch file from https://github.com/void-linux/void-packages/pull/27459.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-desktop-2.5.1-27459.patch --]
[-- Type: text/x-diff, Size: 11281 bytes --]

From 411a01e8ca288fdc42a710408f9662b09caa6b8a Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sat, 26 Dec 2020 14:32:18 +0100
Subject: [PATCH 1/2] telegram-desktop: update to 2.5.1.

---
 .../patches/0002-PPC-big-endian.patch         | 22 -------------------
 srcpkgs/telegram-desktop/template             | 21 +++++++++++-------
 2 files changed, 13 insertions(+), 30 deletions(-)
 delete mode 100644 srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch

diff --git a/srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch b/srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch
deleted file mode 100644
index 32af787c2da..00000000000
--- a/srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Subject: [PATCH] PPC big endian
-
----
- Telegram/SourceFiles/config.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git Telegram/SourceFiles/config.h Telegram/SourceFiles/config.h
-index fb7b54e4d..6a873fbd7 100644
---- Telegram/SourceFiles/config.h
-+++ Telegram/SourceFiles/config.h
-@@ -177,7 +177,7 @@ constexpr auto ApiHash = "344583e45741c457fe1862106095a5eb";
- #endif // TDESKTOP_API_ID && TDESKTOP_API_HASH
- 
- #if Q_BYTE_ORDER == Q_BIG_ENDIAN
--#error "Only little endian is supported!"
-+#warning "Only little endian is supported!"
- #endif // Q_BYTE_ORDER == Q_BIG_ENDIAN
- 
- #if (TDESKTOP_ALPHA_VERSION != 0)
--- 
-2.24.1
-
diff --git a/srcpkgs/telegram-desktop/template b/srcpkgs/telegram-desktop/template
index 730585a10b2..04aa1ec98a6 100644
--- a/srcpkgs/telegram-desktop/template
+++ b/srcpkgs/telegram-desktop/template
@@ -1,7 +1,7 @@
 # Template file for 'telegram-desktop'
 pkgname=telegram-desktop
-version=2.4.7
-revision=2
+version=2.5.1
+revision=1
 wrksrc="tdesktop-${version}-full"
 build_style=cmake
 build_helper="qemu"
@@ -11,13 +11,14 @@ configure_args="-DTDESKTOP_API_ID=209235
  -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
  -DTDESKTOP_LAUNCHER_BASENAME=org.telegram.desktop.desktop
  -DDESKTOP_APP_DISABLE_SPELLCHECK=$(vopt_if spellcheck 'false' 'true')
- -DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION=ON"
+ -DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION=$(vopt_if webrtc 'OFF' 'ON')"
 hostmakedepends="pkg-config qt5-qmake qt5-host-tools python"
 makedepends="alsa-lib-devel ffmpeg-devel libdbusmenu-glib-devel libopenal-devel
  minizip-devel opus-devel xxHash-devel pulseaudio-devel qt5-devel range-v3
- libva-devel rapidjson liblz4-devel liblzma-devel rlottie-devel gtk+3-devel
+ libva-devel rapidjson liblz4-devel liblzma-devel gtk+3-devel
  MesaLib-devel libdbusmenu-qt5-devel qt5-wayland-devel libatomic-devel
- $(vopt_if spellcheck hunspell-devel)"
+ xcb-util-keysyms-devel $(vopt_if spellcheck hunspell-devel)
+ $(vopt_if webrtc tg_owt)"
 depends="qt5-imageformats qt5-core>=5.15.2<5.15.3"
 short_desc="Telegram Desktop messaging app"
 maintainer="John <me@johnnynator.dev>"
@@ -25,10 +26,10 @@ license="GPL-3.0-or-later, OpenSSL"
 homepage="https://desktop.telegram.org/"
 changelog="https://github.com/telegramdesktop/tdesktop/blob/v${version}/changelog.txt"
 distfiles="https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz"
-checksum=7b13df53be5d6b58d07d730c9429e415be2fea7f7be37bcaa80a505152125bc8
+checksum=f1cc5e876deaa4fa4eaafbba95f127d5a3114c166802902b8584099852b9eae2
 
-build_options="spellcheck"
-build_options_default="spellcheck"
+build_options="spellcheck webrtc"
+build_options_default="spellcheck webrtc"
 
 case $XBPS_TARGET_MACHINE in
 	mips*) broken="unsupported";;
@@ -42,6 +43,10 @@ if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt5-devel"
 fi
 
+if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
+	broken="UI doesn't go beyond initial screen, also LE specific code in networking"
+fi
+
 post_extract() {
 	_qt5_dep_ver="${depends#*>=}"
 	_qt5_dep_ver="${_qt5_dep_ver%<*}"

From 3d50fae52de63909aa80208dccfcda13c9c9fed2 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sat, 26 Dec 2020 21:56:33 +0100
Subject: [PATCH 2/2] New package: tg_owt-0.0.0.1

---
 srcpkgs/tg_owt/patches/libressl.patch      | 70 +++++++++++++++++
 srcpkgs/tg_owt/patches/libressl.patch.args |  1 +
 srcpkgs/tg_owt/patches/system-vpx.patch    | 87 ++++++++++++++++++++++
 srcpkgs/tg_owt/template                    | 30 ++++++++
 4 files changed, 188 insertions(+)
 create mode 100644 srcpkgs/tg_owt/patches/libressl.patch
 create mode 100644 srcpkgs/tg_owt/patches/libressl.patch.args
 create mode 100644 srcpkgs/tg_owt/patches/system-vpx.patch
 create mode 100644 srcpkgs/tg_owt/template

diff --git a/srcpkgs/tg_owt/patches/libressl.patch b/srcpkgs/tg_owt/patches/libressl.patch
new file mode 100644
index 00000000000..fc352a2a64c
--- /dev/null
+++ b/srcpkgs/tg_owt/patches/libressl.patch
@@ -0,0 +1,70 @@
+From 3f2d8238846d4795f1292c05923b9f212dc4d022 Mon Sep 17 00:00:00 2001
+From: Charlie Li <git@vishwin.info>
+Date: Sat, 21 Nov 2020 14:24:04 -0500
+Subject: [PATCH] Fix build with LibreSSL
+
+LibreSSL's dtls1.h uses some definitions from ssl.h and ssl3.h, but
+expects consumers to include them. Reorder and include them before
+dtls1.h.
+
+LibreSSL does not define DTLS1_2_VERSION. Remove them from view.
+---
+ src/rtc_base/openssl_stream_adapter.cc | 19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/src/rtc_base/openssl_stream_adapter.cc b/src/rtc_base/openssl_stream_adapter.cc
+index 7f4b79a5..037002bc 100644
+--- a/src/rtc_base/openssl_stream_adapter.cc
++++ b/src/rtc_base/openssl_stream_adapter.cc
+@@ -17,8 +17,11 @@
+ #include <openssl/tls1.h>
+ #include <openssl/x509v3.h>
+ #ifndef OPENSSL_IS_BORINGSSL
+-#include <openssl/dtls1.h>
+ #include <openssl/ssl.h>
++#ifdef LIBRESSL_VERSION_NUMBER
++#include <openssl/ssl3.h>
++#endif
++#include <openssl/dtls1.h>
+ #endif
+ 
+ #include <memory>
+@@ -392,8 +395,10 @@ SSLProtocolVersion OpenSSLStreamAdapter::GetSslVersion() const {
+   if (ssl_mode_ == SSL_MODE_DTLS) {
+     if (ssl_version == DTLS1_VERSION) {
+       return SSL_PROTOCOL_DTLS_10;
++#ifndef LIBRESSL_VERSION_NUMBER
+     } else if (ssl_version == DTLS1_2_VERSION) {
+       return SSL_PROTOCOL_DTLS_12;
++#endif
+     }
+   } else {
+     if (ssl_version == TLS1_VERSION) {
+@@ -985,15 +990,27 @@ SSL_CTX* OpenSSLStreamAdapter::SetupSSLContext() {
+       case SSL_PROTOCOL_TLS_12:
+       default:
+         SSL_CTX_set_max_proto_version(
++#ifdef LIBRESSL_VERSION_NUMBER
++            ctx, TLS1_2_VERSION);
++#else
+             ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION);
++#endif
+         break;
+     }
+   } else {
+     // TODO(https://bugs.webrtc.org/10261): Make this the default in M84.
+     SSL_CTX_set_min_proto_version(
++#ifdef LIBRESSL_VERSION_NUMBER
++        ctx, TLS1_2_VERSION);
++#else
+         ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION);
++#endif
+     SSL_CTX_set_max_proto_version(
++#ifdef LIBRESSL_VERSION_NUMBER
++        ctx, TLS1_2_VERSION);
++#else
+         ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION);
++#endif
+   }
+ 
+ #ifdef OPENSSL_IS_BORINGSSL
diff --git a/srcpkgs/tg_owt/patches/libressl.patch.args b/srcpkgs/tg_owt/patches/libressl.patch.args
new file mode 100644
index 00000000000..2eba1cb3c5c
--- /dev/null
+++ b/srcpkgs/tg_owt/patches/libressl.patch.args
@@ -0,0 +1 @@
+-Np1
diff --git a/srcpkgs/tg_owt/patches/system-vpx.patch b/srcpkgs/tg_owt/patches/system-vpx.patch
new file mode 100644
index 00000000000..44da5146989
--- /dev/null
+++ b/srcpkgs/tg_owt/patches/system-vpx.patch
@@ -0,0 +1,87 @@
+diff --git CMakeLists.txt CMakeLists.txt
+index d970719..c14226e 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -45,7 +45,6 @@ include(cmake/libpffft.cmake)
+ 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)
+@@ -77,13 +76,6 @@ if (is_x86 OR is_x64)
+         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()
+@@ -97,7 +89,6 @@ else()
+         tg_owt::librnnoise
+         tg_owt::libsrtp
+         tg_owt::libusrsctp
+-        tg_owt::libvpx
+         tg_owt::libyuv
+     )
+ endif()
+@@ -122,6 +113,7 @@ if (APPLE)
+     target_link_libraries(tg_owt PUBLIC tg_owt::libsdkmacos)
+ endif()
+ 
++link_vpx(tg_owt)
+ link_openssl(tg_owt)
+ link_ffmpeg(tg_owt)
+ link_opus(tg_owt)
+@@ -1868,16 +1860,6 @@ elseif (APPLE)
+ endif()
+ 
+ set(vpx_export)
+-if (is_x86 OR is_x64)
+-    set(vpx_export
+-        libvpx_mmx
+-        libvpx_sse2
+-        libvpx_ssse3
+-        libvpx_sse4
+-        libvpx_avx
+-        libvpx_avx2
+-    )
+-endif()
+ 
+ set(export_targets
+     tg_owt
+@@ -1887,7 +1869,6 @@ set(export_targets
+     librnnoise
+     libsrtp
+     libusrsctp
+-    libvpx
+     ${vpx_export}
+     libwebrtcbuild
+     libyuv
+diff --git cmake/external.cmake cmake/external.cmake
+index 964e260..82d68d0 100644
+--- cmake/external.cmake
++++ cmake/external.cmake
+@@ -129,3 +129,15 @@ function(link_dl target_name)
+         target_link_libraries(${target_name} PRIVATE ${CMAKE_DL_LIBS})
+     endif()
+ endfunction()
++
++# libvpx
++function(link_vpx target_name)
++    if (TG_OWT_PACKAGED_BUILD)
++        find_package(PkgConfig REQUIRED)
++        pkg_check_modules(VPX vpx)
++    endif()
++    if (VPX_FOUND)
++        target_include_directories(${target_name} PRIVATE ${VPX_INCLUDE_DIRS})
++        target_link_libraries(${target_name} PRIVATE ${VPX_LINK_LIBRARIES})
++    endif()
++endfunction()
diff --git a/srcpkgs/tg_owt/template b/srcpkgs/tg_owt/template
new file mode 100644
index 00000000000..2a43df5a1fa
--- /dev/null
+++ b/srcpkgs/tg_owt/template
@@ -0,0 +1,30 @@
+# Template file for 'tg_owt'
+pkgname=tg_owt
+version=0.0.0.1
+revision=1
+_commit=756fd0fb5f40ffb4244c675208e84de781f766f3
+_libvpx_commit=5b63f0f821e94f8072eb483014cfc33b05978bb9
+_libyuv_commit=ad890067f661dc747a975bc55ba3767fe30d4452
+wrksrc="tg_owt-$_commit"
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=OFF"
+hostmakedepends="pkg-config yasm protobuf25"
+makedepends="alsa-lib-devel pulseaudio-devel libressl-devel opus-devel
+ libvpx-devel ffmpeg-devel libjpeg-turbo-devel protobuf-devel"
+short_desc="WebRTC library for Telegram-desktop"
+maintainer="John <me@johnnynator.dev>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/desktop-app/tg_owt"
+distfiles="https://github.com/desktop-app/tg_owt/archive/${_commit}.tar.gz
+ https://chromium.googlesource.com/libyuv/libyuv/+archive/${_libyuv_commit}.tar.gz"
+checksum="@43d09b00a43f9206b1f04c6d6697f4b0cb3be0285100bf5df91144b1d689c89a
+ @1dd51820852df840c339bf3f18e6cf1166de33d5631a69cd1eae5b2b34c113e3"
+skip_extraction="${_libvpx_commit}.tar.gz ${_libyuv_commit}.tar.gz"
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi
+
+post_extract() {
+	bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_libyuv_commit}.tar.gz -C ${wrksrc}/src/third_party/libyuv
+}

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

* Re: [PR PATCH] [Updated] telegram-desktop: update to 2.5.1
  2020-12-26 21:24 [PR PATCH] telegram-desktop: update to 2.5.1 Johnnynator
  2020-12-26 21:31 ` [PR PATCH] [Updated] " Johnnynator
  2020-12-27  0:07 ` Johnnynator
@ 2020-12-27 11:44 ` Johnnynator
  2020-12-27 13:04 ` [PR PATCH] [Merged]: " Johnnynator
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2020-12-27 11:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 346 bytes --]

There is an updated pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages telegram-desktop-2.5.1
https://github.com/void-linux/void-packages/pull/27459

telegram-desktop: update to 2.5.1


A patch file from https://github.com/void-linux/void-packages/pull/27459.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-telegram-desktop-2.5.1-27459.patch --]
[-- Type: text/x-diff, Size: 11305 bytes --]

From 74baf1ff1aa0afdd4443c571fa0dab75664e106c Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sat, 26 Dec 2020 14:32:18 +0100
Subject: [PATCH 1/2] telegram-desktop: update to 2.5.1.

---
 .../patches/0002-PPC-big-endian.patch         | 22 -------------------
 srcpkgs/telegram-desktop/template             | 21 +++++++++++-------
 2 files changed, 13 insertions(+), 30 deletions(-)
 delete mode 100644 srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch

diff --git a/srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch b/srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch
deleted file mode 100644
index 32af787c2da..00000000000
--- a/srcpkgs/telegram-desktop/patches/0002-PPC-big-endian.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Subject: [PATCH] PPC big endian
-
----
- Telegram/SourceFiles/config.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git Telegram/SourceFiles/config.h Telegram/SourceFiles/config.h
-index fb7b54e4d..6a873fbd7 100644
---- Telegram/SourceFiles/config.h
-+++ Telegram/SourceFiles/config.h
-@@ -177,7 +177,7 @@ constexpr auto ApiHash = "344583e45741c457fe1862106095a5eb";
- #endif // TDESKTOP_API_ID && TDESKTOP_API_HASH
- 
- #if Q_BYTE_ORDER == Q_BIG_ENDIAN
--#error "Only little endian is supported!"
-+#warning "Only little endian is supported!"
- #endif // Q_BYTE_ORDER == Q_BIG_ENDIAN
- 
- #if (TDESKTOP_ALPHA_VERSION != 0)
--- 
-2.24.1
-
diff --git a/srcpkgs/telegram-desktop/template b/srcpkgs/telegram-desktop/template
index 730585a10b2..04aa1ec98a6 100644
--- a/srcpkgs/telegram-desktop/template
+++ b/srcpkgs/telegram-desktop/template
@@ -1,7 +1,7 @@
 # Template file for 'telegram-desktop'
 pkgname=telegram-desktop
-version=2.4.7
-revision=2
+version=2.5.1
+revision=1
 wrksrc="tdesktop-${version}-full"
 build_style=cmake
 build_helper="qemu"
@@ -11,13 +11,14 @@ configure_args="-DTDESKTOP_API_ID=209235
  -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
  -DTDESKTOP_LAUNCHER_BASENAME=org.telegram.desktop.desktop
  -DDESKTOP_APP_DISABLE_SPELLCHECK=$(vopt_if spellcheck 'false' 'true')
- -DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION=ON"
+ -DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION=$(vopt_if webrtc 'OFF' 'ON')"
 hostmakedepends="pkg-config qt5-qmake qt5-host-tools python"
 makedepends="alsa-lib-devel ffmpeg-devel libdbusmenu-glib-devel libopenal-devel
  minizip-devel opus-devel xxHash-devel pulseaudio-devel qt5-devel range-v3
- libva-devel rapidjson liblz4-devel liblzma-devel rlottie-devel gtk+3-devel
+ libva-devel rapidjson liblz4-devel liblzma-devel gtk+3-devel
  MesaLib-devel libdbusmenu-qt5-devel qt5-wayland-devel libatomic-devel
- $(vopt_if spellcheck hunspell-devel)"
+ xcb-util-keysyms-devel $(vopt_if spellcheck hunspell-devel)
+ $(vopt_if webrtc tg_owt)"
 depends="qt5-imageformats qt5-core>=5.15.2<5.15.3"
 short_desc="Telegram Desktop messaging app"
 maintainer="John <me@johnnynator.dev>"
@@ -25,10 +26,10 @@ license="GPL-3.0-or-later, OpenSSL"
 homepage="https://desktop.telegram.org/"
 changelog="https://github.com/telegramdesktop/tdesktop/blob/v${version}/changelog.txt"
 distfiles="https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz"
-checksum=7b13df53be5d6b58d07d730c9429e415be2fea7f7be37bcaa80a505152125bc8
+checksum=f1cc5e876deaa4fa4eaafbba95f127d5a3114c166802902b8584099852b9eae2
 
-build_options="spellcheck"
-build_options_default="spellcheck"
+build_options="spellcheck webrtc"
+build_options_default="spellcheck webrtc"
 
 case $XBPS_TARGET_MACHINE in
 	mips*) broken="unsupported";;
@@ -42,6 +43,10 @@ if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt5-devel"
 fi
 
+if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
+	broken="UI doesn't go beyond initial screen, also LE specific code in networking"
+fi
+
 post_extract() {
 	_qt5_dep_ver="${depends#*>=}"
 	_qt5_dep_ver="${_qt5_dep_ver%<*}"

From 300074c852155564a52da62156b1bb926d65bc81 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sat, 26 Dec 2020 21:56:33 +0100
Subject: [PATCH 2/2] New package: tg_owt-0.0.0.1

---
 srcpkgs/tg_owt/patches/libressl.patch      | 70 +++++++++++++++++
 srcpkgs/tg_owt/patches/libressl.patch.args |  1 +
 srcpkgs/tg_owt/patches/system-vpx.patch    | 87 ++++++++++++++++++++++
 srcpkgs/tg_owt/template                    | 31 ++++++++
 4 files changed, 189 insertions(+)
 create mode 100644 srcpkgs/tg_owt/patches/libressl.patch
 create mode 100644 srcpkgs/tg_owt/patches/libressl.patch.args
 create mode 100644 srcpkgs/tg_owt/patches/system-vpx.patch
 create mode 100644 srcpkgs/tg_owt/template

diff --git a/srcpkgs/tg_owt/patches/libressl.patch b/srcpkgs/tg_owt/patches/libressl.patch
new file mode 100644
index 00000000000..fc352a2a64c
--- /dev/null
+++ b/srcpkgs/tg_owt/patches/libressl.patch
@@ -0,0 +1,70 @@
+From 3f2d8238846d4795f1292c05923b9f212dc4d022 Mon Sep 17 00:00:00 2001
+From: Charlie Li <git@vishwin.info>
+Date: Sat, 21 Nov 2020 14:24:04 -0500
+Subject: [PATCH] Fix build with LibreSSL
+
+LibreSSL's dtls1.h uses some definitions from ssl.h and ssl3.h, but
+expects consumers to include them. Reorder and include them before
+dtls1.h.
+
+LibreSSL does not define DTLS1_2_VERSION. Remove them from view.
+---
+ src/rtc_base/openssl_stream_adapter.cc | 19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/src/rtc_base/openssl_stream_adapter.cc b/src/rtc_base/openssl_stream_adapter.cc
+index 7f4b79a5..037002bc 100644
+--- a/src/rtc_base/openssl_stream_adapter.cc
++++ b/src/rtc_base/openssl_stream_adapter.cc
+@@ -17,8 +17,11 @@
+ #include <openssl/tls1.h>
+ #include <openssl/x509v3.h>
+ #ifndef OPENSSL_IS_BORINGSSL
+-#include <openssl/dtls1.h>
+ #include <openssl/ssl.h>
++#ifdef LIBRESSL_VERSION_NUMBER
++#include <openssl/ssl3.h>
++#endif
++#include <openssl/dtls1.h>
+ #endif
+ 
+ #include <memory>
+@@ -392,8 +395,10 @@ SSLProtocolVersion OpenSSLStreamAdapter::GetSslVersion() const {
+   if (ssl_mode_ == SSL_MODE_DTLS) {
+     if (ssl_version == DTLS1_VERSION) {
+       return SSL_PROTOCOL_DTLS_10;
++#ifndef LIBRESSL_VERSION_NUMBER
+     } else if (ssl_version == DTLS1_2_VERSION) {
+       return SSL_PROTOCOL_DTLS_12;
++#endif
+     }
+   } else {
+     if (ssl_version == TLS1_VERSION) {
+@@ -985,15 +990,27 @@ SSL_CTX* OpenSSLStreamAdapter::SetupSSLContext() {
+       case SSL_PROTOCOL_TLS_12:
+       default:
+         SSL_CTX_set_max_proto_version(
++#ifdef LIBRESSL_VERSION_NUMBER
++            ctx, TLS1_2_VERSION);
++#else
+             ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION);
++#endif
+         break;
+     }
+   } else {
+     // TODO(https://bugs.webrtc.org/10261): Make this the default in M84.
+     SSL_CTX_set_min_proto_version(
++#ifdef LIBRESSL_VERSION_NUMBER
++        ctx, TLS1_2_VERSION);
++#else
+         ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION);
++#endif
+     SSL_CTX_set_max_proto_version(
++#ifdef LIBRESSL_VERSION_NUMBER
++        ctx, TLS1_2_VERSION);
++#else
+         ctx, ssl_mode_ == SSL_MODE_DTLS ? DTLS1_2_VERSION : TLS1_2_VERSION);
++#endif
+   }
+ 
+ #ifdef OPENSSL_IS_BORINGSSL
diff --git a/srcpkgs/tg_owt/patches/libressl.patch.args b/srcpkgs/tg_owt/patches/libressl.patch.args
new file mode 100644
index 00000000000..2eba1cb3c5c
--- /dev/null
+++ b/srcpkgs/tg_owt/patches/libressl.patch.args
@@ -0,0 +1 @@
+-Np1
diff --git a/srcpkgs/tg_owt/patches/system-vpx.patch b/srcpkgs/tg_owt/patches/system-vpx.patch
new file mode 100644
index 00000000000..44da5146989
--- /dev/null
+++ b/srcpkgs/tg_owt/patches/system-vpx.patch
@@ -0,0 +1,87 @@
+diff --git CMakeLists.txt CMakeLists.txt
+index d970719..c14226e 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -45,7 +45,6 @@ include(cmake/libpffft.cmake)
+ 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)
+@@ -77,13 +76,6 @@ if (is_x86 OR is_x64)
+         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()
+@@ -97,7 +89,6 @@ else()
+         tg_owt::librnnoise
+         tg_owt::libsrtp
+         tg_owt::libusrsctp
+-        tg_owt::libvpx
+         tg_owt::libyuv
+     )
+ endif()
+@@ -122,6 +113,7 @@ if (APPLE)
+     target_link_libraries(tg_owt PUBLIC tg_owt::libsdkmacos)
+ endif()
+ 
++link_vpx(tg_owt)
+ link_openssl(tg_owt)
+ link_ffmpeg(tg_owt)
+ link_opus(tg_owt)
+@@ -1868,16 +1860,6 @@ elseif (APPLE)
+ endif()
+ 
+ set(vpx_export)
+-if (is_x86 OR is_x64)
+-    set(vpx_export
+-        libvpx_mmx
+-        libvpx_sse2
+-        libvpx_ssse3
+-        libvpx_sse4
+-        libvpx_avx
+-        libvpx_avx2
+-    )
+-endif()
+ 
+ set(export_targets
+     tg_owt
+@@ -1887,7 +1869,6 @@ set(export_targets
+     librnnoise
+     libsrtp
+     libusrsctp
+-    libvpx
+     ${vpx_export}
+     libwebrtcbuild
+     libyuv
+diff --git cmake/external.cmake cmake/external.cmake
+index 964e260..82d68d0 100644
+--- cmake/external.cmake
++++ cmake/external.cmake
+@@ -129,3 +129,15 @@ function(link_dl target_name)
+         target_link_libraries(${target_name} PRIVATE ${CMAKE_DL_LIBS})
+     endif()
+ endfunction()
++
++# libvpx
++function(link_vpx target_name)
++    if (TG_OWT_PACKAGED_BUILD)
++        find_package(PkgConfig REQUIRED)
++        pkg_check_modules(VPX vpx)
++    endif()
++    if (VPX_FOUND)
++        target_include_directories(${target_name} PRIVATE ${VPX_INCLUDE_DIRS})
++        target_link_libraries(${target_name} PRIVATE ${VPX_LINK_LIBRARIES})
++    endif()
++endfunction()
diff --git a/srcpkgs/tg_owt/template b/srcpkgs/tg_owt/template
new file mode 100644
index 00000000000..140efc18f59
--- /dev/null
+++ b/srcpkgs/tg_owt/template
@@ -0,0 +1,31 @@
+# Template file for 'tg_owt'
+pkgname=tg_owt
+version=0.0.0.1
+revision=1
+_commit=756fd0fb5f40ffb4244c675208e84de781f766f3
+_libvpx_commit=5b63f0f821e94f8072eb483014cfc33b05978bb9
+_libyuv_commit=ad890067f661dc747a975bc55ba3767fe30d4452
+wrksrc="tg_owt-$_commit"
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=OFF"
+hostmakedepends="pkg-config yasm protobuf25"
+makedepends="alsa-lib-devel pulseaudio-devel libressl-devel opus-devel
+ libvpx-devel ffmpeg-devel libjpeg-turbo-devel protobuf-devel"
+depends="$makedepends"
+short_desc="WebRTC library for Telegram-desktop"
+maintainer="John <me@johnnynator.dev>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/desktop-app/tg_owt"
+distfiles="https://github.com/desktop-app/tg_owt/archive/${_commit}.tar.gz
+ https://chromium.googlesource.com/libyuv/libyuv/+archive/${_libyuv_commit}.tar.gz"
+checksum="@43d09b00a43f9206b1f04c6d6697f4b0cb3be0285100bf5df91144b1d689c89a
+ @1dd51820852df840c339bf3f18e6cf1166de33d5631a69cd1eae5b2b34c113e3"
+skip_extraction="${_libvpx_commit}.tar.gz ${_libyuv_commit}.tar.gz"
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi
+
+post_extract() {
+	bsdtar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_libyuv_commit}.tar.gz -C ${wrksrc}/src/third_party/libyuv
+}

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

* Re: [PR PATCH] [Merged]: telegram-desktop: update to 2.5.1
  2020-12-26 21:24 [PR PATCH] telegram-desktop: update to 2.5.1 Johnnynator
                   ` (2 preceding siblings ...)
  2020-12-27 11:44 ` Johnnynator
@ 2020-12-27 13:04 ` Johnnynator
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2020-12-27 13:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

There's a merged pull request on the void-packages repository

telegram-desktop: update to 2.5.1
https://github.com/void-linux/void-packages/pull/27459

Description:


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

end of thread, other threads:[~2020-12-27 13:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-26 21:24 [PR PATCH] telegram-desktop: update to 2.5.1 Johnnynator
2020-12-26 21:31 ` [PR PATCH] [Updated] " Johnnynator
2020-12-27  0:07 ` Johnnynator
2020-12-27 11:44 ` Johnnynator
2020-12-27 13:04 ` [PR PATCH] [Merged]: " Johnnynator

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).