[ffmpeg/f25] Updated to 3.1.10
by Julian Sikorski
commit 85ccc17e129d887435b3c71f09ba44cdbeb7d0b4
Author: Julian Sikorski <belegdol(a)fedoraproject.org>
Date: Mon Aug 7 08:13:12 2017 +0200
Updated to 3.1.10
.gitignore | 1 +
ffmpeg.spec | 5 ++++-
sources | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 63dae20..b1960d0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ ffmpeg-2.8.7.tar.xz
/ffmpeg-3.1.7.tar.xz
/ffmpeg-3.1.8.tar.xz
/ffmpeg-3.1.9.tar.xz
+/ffmpeg-3.1.10.tar.xz
diff --git a/ffmpeg.spec b/ffmpeg.spec
index 3482740..a523922 100644
--- a/ffmpeg.spec
+++ b/ffmpeg.spec
@@ -19,7 +19,7 @@
Summary: Digital VCR and streaming server
Name: ffmpeg
-Version: 3.1.9
+Version: 3.1.10
Release: 1%{?date}%{?date:git}%{?rel}%{?dist}
%if 0%{?_with_amr} || 0%{?_with_gmp}
License: GPLv3+
@@ -329,6 +329,9 @@ install -pm755 tools/qt-faststart $RPM_BUILD_ROOT%{_bindir}
%changelog
+* Mon Aug 07 2017 Julian Sikorski <belegdol(a)fedoraproject.org> - 3.1.10-1
+- Updated to 3.1.10
+
* Mon Jun 26 2017 Julian Sikorski <belegdol(a)fedoraproject.org> - 3.1.9-1
- Updated to 3.1.9
diff --git a/sources b/sources
index b82bfed..80501c2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f7fb77e81502624b98f5d9848cfbfe02 ffmpeg-3.1.9.tar.xz
+733608b2dc58e3a2dfa001da93d4f4cd ffmpeg-3.1.10.tar.xz
7 years, 3 months
[telegram-desktop/f25] Updated to version 1.1.19. Moved VoIP library into a separate package.
by Vitaly Zaitsev
commit 2558a47c1b8ebc5d9363cfb4fc3ccb30a61ee4b3
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Fri Aug 4 20:56:14 2017 +0500
Updated to version 1.1.19. Moved VoIP library into a separate package.
.gitignore | 1 +
fix_libtgvoip.patch | 40 ---------------
sources | 3 +-
...ora.patch => telegram-desktop-build-fixes.patch | 24 +++++----
telegram-desktop.spec | 59 +++++-----------------
5 files changed, 29 insertions(+), 98 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 88a0a76..2bbc98c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,4 @@
/tdesktop-1.1.15.tar.gz
/tdesktop-1.1.17.tar.gz
/tdesktop-1.1.18.tar.gz
+/tdesktop-1.1.19.tar.gz
diff --git a/sources b/sources
index 210b425..97278ee 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,3 @@
ba90e749953f2ac1c013011601a58598 GSL-c5851a8.tar.gz
0373c28165f86474f8abdce278320c1a gyp-a478c1a.tar.gz
-c54cfa5050035c2f981aec6731829926 libtgvoip-e42287b.tar.gz
-e2950a7b0e05bb3fce6d5dce1c47c7b6 tdesktop-1.1.18.tar.gz
+f7fb9f0f5b1106d3fc65c82355fadbe8 tdesktop-1.1.19.tar.gz
diff --git a/fix_build_under_fedora.patch b/telegram-desktop-build-fixes.patch
similarity index 97%
rename from fix_build_under_fedora.patch
rename to telegram-desktop-build-fixes.patch
index c4bc0ae..a979297 100644
--- a/fix_build_under_fedora.patch
+++ b/telegram-desktop-build-fixes.patch
@@ -1,4 +1,4 @@
-From 7b1127cfb2c4b0a86fc3c715a28ae95c076efec4 Mon Sep 17 00:00:00 2001
+From 91c843f152caa7bbbdedf602cf0c5450872bd5dc Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Fri, 31 Mar 2017 14:29:58 +0200
Subject: [PATCH] Fixed build under Fedora using rpmbuild and mock.
@@ -11,16 +11,16 @@ Subject: [PATCH] Fixed build under Fedora using rpmbuild and mock.
Telegram/SourceFiles/ui/text/text_block.cpp | 2 +-
Telegram/SourceFiles/ui/twidget.cpp | 4 +-
Telegram/gyp/PrecompiledHeader.cmake | 4 +-
- Telegram/gyp/Telegram.gyp | 20 ++----
+ Telegram/gyp/Telegram.gyp | 21 ++-----
Telegram/gyp/qt.gypi | 80 +++++++-----------------
Telegram/gyp/qt_rcc.gypi | 2 +-
Telegram/gyp/settings_linux.gypi | 8 +--
- Telegram/gyp/telegram_linux.gypi | 58 +++++-------------
+ Telegram/gyp/telegram_linux.gypi | 60 +++++-------------
Telegram/gyp/telegram_sources.txt | 8 +--
Telegram/gyp/utils.gyp | 4 +-
lib/xdg/telegramdesktop.appdata.xml | 2 +-
lib/xdg/telegramdesktop.desktop | 6 +-
- 16 files changed, 164 insertions(+), 155 deletions(-)
+ 16 files changed, 166 insertions(+), 156 deletions(-)
create mode 100644 Telegram/SourceFiles/qt_functions.cpp
diff --git a/Telegram/SourceFiles/main.cpp b/Telegram/SourceFiles/main.cpp
@@ -243,7 +243,7 @@ index 5d6830e9..c3f08d3f 100644
IMPLICIT_DEPENDS CXX "${_pch_header}"
COMMENT "Precompiling ${_name} for ${_target} (C++)")
diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp
-index 9d92b817..9b456dee 100644
+index 9d92b817..f275c105 100644
--- a/Telegram/gyp/Telegram.gyp
+++ b/Telegram/gyp/Telegram.gyp
@@ -31,7 +31,6 @@
@@ -254,12 +254,12 @@ index 9d92b817..9b456dee 100644
'sp_media_key_tap_loc': '<(submodules_loc)/SPMediaKeyTap',
'emoji_suggestions_loc': '<(submodules_loc)/emoji_suggestions',
'style_files': [
-@@ -79,32 +78,25 @@
+@@ -79,32 +78,24 @@
'codegen.gyp:codegen_lang',
'codegen.gyp:codegen_numbers',
'codegen.gyp:codegen_style',
- 'utils.gyp:Updater',
- '../ThirdParty/libtgvoip/libtgvoip.gyp:libtgvoip',
+- '../ThirdParty/libtgvoip/libtgvoip.gyp:libtgvoip',
],
'defines': [
@@ -499,10 +499,10 @@ index fde88dcd..7d603220 100644
'Debug': {
},
diff --git a/Telegram/gyp/telegram_linux.gypi b/Telegram/gyp/telegram_linux.gypi
-index 2c464928..1b14723d 100644
+index 2c464928..3566d002 100644
--- a/Telegram/gyp/telegram_linux.gypi
+++ b/Telegram/gyp/telegram_linux.gypi
-@@ -27,73 +27,43 @@
+@@ -27,73 +27,45 @@
# QApplication() -> createPlatformIntegration -> QXcbIntegrationPlugin::create
#'xkbcommon',
],
@@ -524,6 +524,7 @@ index 2c464928..1b14723d 100644
+ '<!(rpm --eval "%{_includedir}")/ffmpeg',
+ '<!(rpm --eval "%{_includedir}")/minizip',
+ '<!(rpm --eval "%{_includedir}")/opus',
++ '<!(rpm --eval "%{_includedir}")/libtgvoip',
],
'library_dirs': [
- '/usr/local/lib',
@@ -563,6 +564,7 @@ index 2c464928..1b14723d 100644
+ 'avutil',
+ 'z',
+ 'minizip',
++ 'tgvoip',
# '<!(pkg-config 2> /dev/null --libs <@(pkgconfig_libs))',
],
'cflags_cc': [
@@ -591,10 +593,10 @@ index 2c464928..1b14723d 100644
},
},
diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt
-index d528bcc2..f340589d 100644
+index 40556793..15ff65c9 100644
--- a/Telegram/gyp/telegram_sources.txt
+++ b/Telegram/gyp/telegram_sources.txt
-@@ -584,13 +584,7 @@
+@@ -588,13 +588,7 @@
<(emoji_suggestions_loc)/emoji_suggestions.h
platforms: !win
diff --git a/telegram-desktop.spec b/telegram-desktop.spec
index bb811d6..2e213b6 100644
--- a/telegram-desktop.spec
+++ b/telegram-desktop.spec
@@ -1,6 +1,5 @@
# Telegram Desktop's constants...
%global appname tdesktop
-%global voipver 1.0
# Git revision of GYP...
%global commit1 a478c1ab51ea3e04e79791ac3d1dad01b3f57434
@@ -10,20 +9,15 @@
%global commit2 c5851a8161938798c5594a66420cb814fea92711
%global shortcommit2 %(c=%{commit2}; echo ${c:0:7})
-# Git revision of libtgvoip...
-%global commit3 e42287b6f4a520b7ddabc6cdcff205f4e7e216ec
-%global shortcommit3 %(c=%{commit3}; echo ${c:0:7})
-
Summary: Telegram is a new era of messaging
Name: telegram-desktop
-Version: 1.1.18
-Release: 1%{?dist}
+Version: 1.1.19
+Release: 2%{?dist}
# Application and 3rd-party modules licensing:
# * S0 (Telegram Desktop) - GPLv3+ with OpenSSL exception -- main source;
# * S1 (GYP) - BSD -- build-time dependency;
# * S2 (GSL) - MIT -- build-time dependency;
-# * S3 (libtgvoip) - Public Domain -- shared library;
# * P0 (qt_functions.cpp) - LGPLv3 -- build-time dependency.
License: GPLv3+ and LGPLv3 and BSD and MIT
Group: Applications/Internet
@@ -33,14 +27,11 @@ ExclusiveArch: i686 x86_64
Source0: %{url}/archive/v%{version}.tar.gz#/%{appname}-%{version}.tar.gz
Source1: https://chromium.googlesource.com/external/gyp/+archive/%{commit1}.tar.gz...
Source2: https://github.com/Microsoft/GSL/archive/%{commit2}.tar.gz#/GSL-%{shortco...
-Source3: https://github.com/grishka/libtgvoip/archive/%{commit3}.tar.gz#/libtgvoip...
-Patch0: fix_build_under_fedora.patch
-Patch1: fix_libtgvoip.patch
+Patch0: %{name}-build-fixes.patch
-Provides: libtgvoip = %{voipver}
-Requires: hicolor-icon-theme
Requires: qt5-qtimageformats%{?_isa}
+Requires: hicolor-icon-theme
Requires: gtk3%{?_isa}
%if 0%{?fedora} && 0%{?fedora} >= 24
Recommends: libappindicator-gtk3%{?_isa}
@@ -60,17 +51,14 @@ BuildRequires: mapbox-variant-devel
BuildRequires: ffmpeg-devel >= 3.1
BuildRequires: openal-soft-devel
BuildRequires: qt5-qtbase-devel
+BuildRequires: libtgvoip-devel
BuildRequires: libstdc++-devel
BuildRequires: minizip-devel
+BuildRequires: opus-devel
BuildRequires: gtk3-devel
BuildRequires: dee-devel
BuildRequires: xz-devel
-# Development packages for libtgvoip...
-BuildRequires: pulseaudio-libs-devel
-BuildRequires: alsa-lib-devel
-BuildRequires: opus-devel
-
# Additional development packages...
%if 0%{?fedora} && 0%{?fedora} >= 26
BuildRequires: compat-openssl10-devel
@@ -92,8 +80,7 @@ personal or business messaging needs.
%prep
# Unpacking Telegram Desktop source archive...
-%setup -qn %{appname}-%{version}
-%patch0 -p1
+%autosetup -n %{appname}-%{version} -p1
# Unpacking GYP...
mkdir -p Telegram/ThirdParty/gyp
@@ -109,22 +96,7 @@ pushd Telegram/ThirdParty
mv GSL-%{commit2} GSL
popd
-# Unpacking libtgvoip...
-pushd Telegram/ThirdParty
- rm -rf libtgvoip
- tar -xf %{SOURCE3}
- mv libtgvoip-%{commit3} libtgvoip
-popd
-
-# Patching libtgvoip...
-pushd Telegram/ThirdParty/libtgvoip
-%patch1 -p1
-popd
-
%build
-# Exporting some additional constants...
-export VOIPVER="%{voipver}"
-
# Generating cmake script using GYP...
pushd Telegram/gyp
../ThirdParty/gyp/gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=cmake
@@ -142,12 +114,6 @@ mkdir -p "%{buildroot}%{_bindir}"
chrpath -d out/Release/Telegram
install -m 0755 -p out/Release/Telegram "%{buildroot}%{_bindir}/%{name}"
-# Installing shared libraries...
-mkdir -p "%{buildroot}%{_libdir}"
-install -m 0755 -p out/Release/lib.target/libtgvoip.so.%{voipver} "%{buildroot}%{_libdir}/libtgvoip.so.%{voipver}"
-ln -s libtgvoip.so.%{voipver} "%{buildroot}%{_libdir}/libtgvoip.so.1"
-ln -s libtgvoip.so.%{voipver} "%{buildroot}%{_libdir}/libtgvoip.so"
-
# Installing desktop shortcut...
mv lib/xdg/telegramdesktop.desktop lib/xdg/%{name}.desktop
desktop-file-install --dir="%{buildroot}%{_datadir}/applications" lib/xdg/%{name}.desktop
@@ -171,7 +137,6 @@ install -m 0644 -p lib/xdg/telegramdesktop.appdata.xml "%{buildroot}%{_datadir}/
appstream-util validate-relax --nonet "%{buildroot}%{_datadir}/appdata/%{name}.appdata.xml"
%post
-/sbin/ldconfig
%if (0%{?fedora} && 0%{?fedora} <= 23) || (0%{?rhel} && 0%{?rhel} <= 7)
/bin/touch --no-create %{_datadir}/mime/packages &>/dev/null || :
%endif
@@ -181,7 +146,6 @@ appstream-util validate-relax --nonet "%{buildroot}%{_datadir}/appdata/%{name}.a
%endif
%postun
-/sbin/ldconfig
if [ $1 -eq 0 ] ; then
%if (0%{?fedora} && 0%{?fedora} <= 23) || (0%{?rhel} && 0%{?rhel} <= 7)
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
@@ -201,15 +165,20 @@ fi
%files
%doc README.md changelog.txt
-%license LICENSE Telegram/ThirdParty/libtgvoip/UNLICENSE
+%license LICENSE
%{_bindir}/%{name}
-%{_libdir}/libtgvoip.*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/kde4/services/tg.protocol
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/appdata/%{name}.appdata.xml
%changelog
+* Fri Aug 04 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.1.19-2
+- Moved VoIP library into a separate package.
+
+* Wed Aug 02 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.1.19-1
+- Updated to 1.1.19.
+
* Thu Jul 27 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.1.18-1
- Updated to 1.1.18.
7 years, 3 months
[libtgvoip/f26] (3 commits) ...Fixed build error.
by Vitaly Zaitsev
Summary of changes:
e8905b1... Added some patches to fix build under other architectures. (*)
5e1d743... Fixed build under regular OpenSSL. (*)
9200a3d... Fixed build error. (*)
(*) This commit already existed in another branch; no separate mail sent
7 years, 3 months
[libtgvoip/f25] (3 commits) ...Fixed build error.
by Vitaly Zaitsev
Summary of changes:
e8905b1... Added some patches to fix build under other architectures. (*)
5e1d743... Fixed build under regular OpenSSL. (*)
9200a3d... Fixed build error. (*)
(*) This commit already existed in another branch; no separate mail sent
7 years, 3 months
[libtgvoip/el7] (3 commits) ...Fixed build error.
by Vitaly Zaitsev
Summary of changes:
e8905b1... Added some patches to fix build under other architectures. (*)
5e1d743... Fixed build under regular OpenSSL. (*)
9200a3d... Fixed build error. (*)
(*) This commit already existed in another branch; no separate mail sent
7 years, 3 months
[libtgvoip] Fixed build error.
by Vitaly Zaitsev
commit 9200a3dd3e856785ab8adac1484976693aaa93b6
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Fri Aug 4 17:27:01 2017 +0500
Fixed build error.
libtgvoip-build-fixes.patch | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/libtgvoip-build-fixes.patch b/libtgvoip-build-fixes.patch
index c230fc4..a3ecae5 100644
--- a/libtgvoip-build-fixes.patch
+++ b/libtgvoip-build-fixes.patch
@@ -1,4 +1,4 @@
-From f1fac71ee8917307efb1a50d89b4a880da146e46 Mon Sep 17 00:00:00 2001
+From f6e77fb45052100ae7eeaca658630e0a57d4b34b 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.
@@ -8,8 +8,8 @@ Subject: [PATCH] Fixed build of libtgvoip under Fedora as shared library.
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 +++++++++-
- 5 files changed, 72 insertions(+), 14 deletions(-)
+ webrtc_dsp/webrtc/typedefs.h | 14 +++++++++++-
+ 5 files changed, 74 insertions(+), 14 deletions(-)
diff --git a/VoIPController.cpp b/VoIPController.cpp
index 78e9e4b..fb256e3 100644
@@ -177,14 +177,16 @@ index 402ea17..b11ee58 100644
static inline uint32_t RiffChunkSize(size_t bytes_in_payload) {
diff --git a/webrtc_dsp/webrtc/typedefs.h b/webrtc_dsp/webrtc/typedefs.h
-index c960d95..69740b0 100644
+index c960d95..2252855 100644
--- a/webrtc_dsp/webrtc/typedefs.h
+++ b/webrtc_dsp/webrtc/typedefs.h
-@@ -48,7 +48,17 @@
+@@ -48,7 +48,19 @@
#define WEBRTC_ARCH_32_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN
#else
-#error Please add support for your architecture in typedefs.h
++/* instead of failing, use typical unix defines... */
++#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define WEBRTC_ARCH_BIG_ENDIAN
7 years, 3 months
[libtgvoip] Fixed build under regular OpenSSL.
by Vitaly Zaitsev
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.
7 years, 3 months
[libtgvoip] Added some patches to fix build under other architectures.
by Vitaly Zaitsev
commit e8905b1ce2a58ef91234a7bed0b197d2e65b9dc7
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Fri Aug 4 16:54:47 2017 +0500
Added some patches to fix build under other architectures.
libtgvoip-build-fixes.patch | 150 ++++++++++++++++++++++++++++++++++++++++++--
libtgvoip.spec | 5 +-
2 files changed, 150 insertions(+), 5 deletions(-)
---
diff --git a/libtgvoip-build-fixes.patch b/libtgvoip-build-fixes.patch
index cbd631f..7ae4a62 100644
--- a/libtgvoip-build-fixes.patch
+++ b/libtgvoip-build-fixes.patch
@@ -1,14 +1,17 @@
-From b53352e8801e65c6a2e7ef1573d6f2bf0696c7cd Mon Sep 17 00:00:00 2001
+From a396724480f232267f2b100d35193204e0df3953 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.
---
- libtgvoip.gyp | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
+ 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(-)
diff --git a/libtgvoip.gyp b/libtgvoip.gyp
-index 527708d..c5d2cd5 100644
+index 527708d..f5db56a 100644
--- a/libtgvoip.gyp
+++ b/libtgvoip.gyp
@@ -4,7 +4,8 @@
@@ -35,6 +38,145 @@ index 527708d..c5d2cd5 100644
],
'direct_dependent_settings': {
'include_dirs': [
+@@ -381,9 +382,6 @@
+ 'defines': [
+ 'WEBRTC_POSIX',
+ ],
+- 'cflags_cc': [
+- '-msse2',
+- ],
+ 'direct_dependent_settings': {
+ 'libraries': [
+
+@@ -391,6 +389,13 @@
+ },
+ },
+ ],
++ [
++ '"<!(uname -p)" == "i686"', {
++ 'cflags_cc': [
++ '-msse2',
++ ],
++ }
++ ],
+ ],
+ },
+ ],
+diff --git a/webrtc_dsp/webrtc/common_audio/wav_file.cc b/webrtc_dsp/webrtc/common_audio/wav_file.cc
+index 2b9098a..4f99da7 100644
+--- a/webrtc_dsp/webrtc/common_audio/wav_file.cc
++++ b/webrtc_dsp/webrtc/common_audio/wav_file.cc
+@@ -77,9 +77,6 @@ size_t WavReader::num_samples() const {
+ }
+
+ size_t WavReader::ReadSamples(size_t num_samples, int16_t* samples) {
+-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
+-#error "Need to convert samples to big-endian when reading from WAV file"
+-#endif
+ // There could be metadata after the audio; ensure we don't read it.
+ num_samples = std::min(num_samples, num_samples_remaining_);
+ const size_t read =
+@@ -88,6 +85,12 @@ size_t WavReader::ReadSamples(size_t num_samples, int16_t* samples) {
+ RTC_CHECK(read == num_samples || feof(file_handle_));
+ RTC_CHECK_LE(read, num_samples_remaining_);
+ num_samples_remaining_ -= read;
++#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
++ //convert to big-endian
++ for(size_t idx = 0; idx < num_samples; idx++) {
++ samples[idx] = (samples[idx]<<8) | (samples[idx]>>8);
++ }
++#endif
+ return read;
+ }
+
+@@ -144,10 +147,17 @@ size_t WavWriter::num_samples() const {
+
+ void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) {
+ #ifndef WEBRTC_ARCH_LITTLE_ENDIAN
+-#error "Need to convert samples to little-endian when writing to WAV file"
+-#endif
++ int16_t * le_samples = new int16_t[num_samples];
++ for(size_t idx = 0; idx < num_samples; idx++) {
++ le_samples[idx] = (samples[idx]<<8) | (samples[idx]>>8);
++ }
++ const size_t written =
++ fwrite(le_samples, sizeof(*le_samples), num_samples, file_handle_);
++ delete []le_samples;
++#else
+ const size_t written =
+ fwrite(samples, sizeof(*samples), num_samples, file_handle_);
++#endif
+ RTC_CHECK_EQ(num_samples, written);
+ num_samples_ += written;
+ RTC_CHECK(num_samples_ >= written); // detect size_t overflow
+diff --git a/webrtc_dsp/webrtc/common_audio/wav_header.cc b/webrtc_dsp/webrtc/common_audio/wav_header.cc
+index 402ea17..b11ee58 100644
+--- a/webrtc_dsp/webrtc/common_audio/wav_header.cc
++++ b/webrtc_dsp/webrtc/common_audio/wav_header.cc
+@@ -127,7 +127,39 @@ static inline std::string ReadFourCC(uint32_t x) {
+ return std::string(reinterpret_cast<char*>(&x), 4);
+ }
+ #else
+-#error "Write be-to-le conversion functions"
++static inline void WriteLE16(uint16_t* f, uint16_t x) {
++ *f = ((x << 8) & 0xff00) | ( ( x >> 8) & 0x00ff);
++}
++
++static inline void WriteLE32(uint32_t* f, uint32_t x) {
++ *f = ( (x & 0x000000ff) << 24 )
++ | ((x & 0x0000ff00) << 8)
++ | ((x & 0x00ff0000) >> 8)
++ | ((x & 0xff000000) >> 24 );
++}
++
++static inline void WriteFourCC(uint32_t* f, char a, char b, char c, char d) {
++ *f = (static_cast<uint32_t>(a) << 24 )
++ | (static_cast<uint32_t>(b) << 16)
++ | (static_cast<uint32_t>(c) << 8)
++ | (static_cast<uint32_t>(d) );
++}
++
++static inline uint16_t ReadLE16(uint16_t x) {
++ return (( x & 0x00ff) << 8 )| ((x & 0xff00)>>8);
++}
++
++static inline uint32_t ReadLE32(uint32_t x) {
++ return ( (x & 0x000000ff) << 24 )
++ | ( (x & 0x0000ff00) << 8 )
++ | ( (x & 0x00ff0000) >> 8)
++ | ( (x & 0xff000000) >> 24 );
++}
++
++static inline std::string ReadFourCC(uint32_t x) {
++ x = ReadLE32(x);
++ return std::string(reinterpret_cast<char*>(&x), 4);
++}
+ #endif
+
+ static inline uint32_t RiffChunkSize(size_t bytes_in_payload) {
+diff --git a/webrtc_dsp/webrtc/typedefs.h b/webrtc_dsp/webrtc/typedefs.h
+index c960d95..69740b0 100644
+--- a/webrtc_dsp/webrtc/typedefs.h
++++ b/webrtc_dsp/webrtc/typedefs.h
+@@ -48,7 +48,17 @@
+ #define WEBRTC_ARCH_32_BITS
+ #define WEBRTC_ARCH_LITTLE_ENDIAN
+ #else
+-#error Please add support for your architecture in typedefs.h
++#define WEBRTC_ARCH_LITTLE_ENDIAN
++#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
++#define WEBRTC_ARCH_BIG_ENDIAN
++#else
++#error __BYTE_ORDER__ is not defined
++#endif
++#if defined(__LP64__)
++#define WEBRTC_ARCH_64_BITS
++#else
++#define WEBRTC_ARCH_32_BITS
++#endif
+ #endif
+
+ #if !(defined(WEBRTC_ARCH_LITTLE_ENDIAN) ^ defined(WEBRTC_ARCH_BIG_ENDIAN))
--
2.13.3
diff --git a/libtgvoip.spec b/libtgvoip.spec
index ed38009..175bda8 100644
--- a/libtgvoip.spec
+++ b/libtgvoip.spec
@@ -5,7 +5,7 @@
Summary: VoIP library for Telegram clients
Name: libtgvoip
Version: 1.0
-Release: 2.%{date}git%{shortcommit0}%{?dist}
+Release: 3.%{date}git%{shortcommit0}%{?dist}
# Libtgvoip shared library - Public Domain.
# Bundled webrtc library - BSD with patented echo cancellation algorithms.
@@ -76,6 +76,9 @@ find audio -maxdepth 1 -type f -name "*.h" -exec install -m 0644 -p '{}' %{build
%{_libdir}/%{name}.so
%changelog
+* Fri Aug 04 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.0-3.20170801gitbfd5cfe
+- Fixed build other another architectures.
+
* Wed Aug 02 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.0-2.20170801gitbfd5cfe
- Updated to latest snapshot. Small SPEC fixes. Added virtual provides.
7 years, 3 months