commit 5e1d743dca0e3365a671dd1e64061a60b502e469
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Fri Aug 4 17:14:33 2017 +0500
Fixed build under regular OpenSSL.
libtgvoip-build-fixes.patch | 26 ++++++++++++++++++++++++--
libtgvoip.spec | 11 +++--------
2 files changed, 27 insertions(+), 10 deletions(-)
---
diff --git a/libtgvoip-build-fixes.patch b/libtgvoip-build-fixes.patch
index 7ae4a62..c230fc4 100644
--- a/libtgvoip-build-fixes.patch
+++ b/libtgvoip-build-fixes.patch
@@ -1,15 +1,37 @@
-From a396724480f232267f2b100d35193204e0df3953 Mon Sep 17 00:00:00 2001
+From f1fac71ee8917307efb1a50d89b4a880da146e46 Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Thu, 6 Jul 2017 17:27:01 +0200
Subject: [PATCH] Fixed build of libtgvoip under Fedora as shared library.
---
+ VoIPController.cpp | 3 ++-
libtgvoip.gyp | 17 +++++++++-----
webrtc_dsp/webrtc/common_audio/wav_file.cc | 20 ++++++++++++----
webrtc_dsp/webrtc/common_audio/wav_header.cc | 34 +++++++++++++++++++++++++++-
webrtc_dsp/webrtc/typedefs.h | 12 +++++++++-
- 4 files changed, 70 insertions(+), 13 deletions(-)
+ 5 files changed, 72 insertions(+), 14 deletions(-)
+diff --git a/VoIPController.cpp b/VoIPController.cpp
+index 78e9e4b..fb256e3 100644
+--- a/VoIPController.cpp
++++ b/VoIPController.cpp
+@@ -102,6 +102,7 @@ bool VoIPController::didInitWin32TimeScale = false;
+ #ifndef TGVOIP_USE_CUSTOM_CRYPTO
+ #include <openssl/sha.h>
+ #include <openssl/aes.h>
++#include <openssl/modes.h>
+ #include <openssl/rand.h>
+
+ void tgvoip_openssl_aes_ige_encrypt(uint8_t* in, uint8_t* out, size_t length, uint8_t*
key, uint8_t* iv){
+@@ -131,7 +132,7 @@ void tgvoip_openssl_sha256(uint8_t* msg, size_t len, uint8_t*
output){
+ void tgvoip_openssl_aes_ctr_encrypt(uint8_t* inout, size_t length, uint8_t* key,
uint8_t* iv, uint8_t* ecount, uint32_t* num){
+ AES_KEY akey;
+ AES_set_encrypt_key(key, 32*8, &akey);
+- AES_ctr128_encrypt(inout, inout, length, &akey, iv, ecount, num);
++ CRYPTO_ctr128_encrypt(inout, inout, length, &akey, iv, ecount, num, (block128_f)
AES_encrypt);
+ }
+
+ voip_crypto_functions_t VoIPController::crypto={
diff --git a/libtgvoip.gyp b/libtgvoip.gyp
index 527708d..f5db56a 100644
--- a/libtgvoip.gyp
diff --git a/libtgvoip.spec b/libtgvoip.spec
index 175bda8..f4e225f 100644
--- a/libtgvoip.spec
+++ b/libtgvoip.spec
@@ -18,18 +18,13 @@ Patch0: %{name}-build-fixes.patch
Provides: bundled(webrtc-audio-processing) = 0.3
BuildRequires: pulseaudio-libs-devel
BuildRequires: alsa-lib-devel
+BuildRequires: openssl-devel
BuildRequires: opus-devel
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gyp
-%if 0%{?fedora} >= 26
-BuildRequires: compat-openssl10-devel
-%else
-BuildRequires: openssl-devel
-%endif
-
%description
Provides VoIP library for Telegram clients.
@@ -41,7 +36,7 @@ Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%{summary}.
%prep
-%autosetup -n %{name}-%{commit0}
+%autosetup -n %{name}-%{commit0} -p1
%build
export VOIPVER="%{version}"
@@ -77,7 +72,7 @@ find audio -maxdepth 1 -type f -name "*.h" -exec install -m
0644 -p '{}' %{build
%changelog
* Fri Aug 04 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> -
1.0-3.20170801gitbfd5cfe
-- Fixed build other another architectures.
+- Fixed build on other architectures. Build against regular OpenSSL.
* Wed Aug 02 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> -
1.0-2.20170801gitbfd5cfe
- Updated to latest snapshot. Small SPEC fixes. Added virtual provides.