commit 110c7cac30a24d209d7ebe33a9b9b79ebd2aae23
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Thu Jan 9 16:14:12 2020 +0100
Switched to supported fork.
.gitignore | 1 +
libtgvoip-build-fixes.patch | 125 ++++++++++++++++++++++++++------------------
libtgvoip-pr6.patch | 61 +++++++++++++++++++++
libtgvoip.spec | 122 +++++++++---------------------------------
sources | 2 +-
5 files changed, 164 insertions(+), 147 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9a82edc..a78bceb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@
/libtgvoip-2.4.tar.gz
/libtgvoip-2.4.2.tar.gz
/libtgvoip-2.4.4.tar.gz
+/libtgvoip-88b47b6.tar.gz
diff --git a/libtgvoip-build-fixes.patch b/libtgvoip-build-fixes.patch
index 4d78b86..a430e21 100644
--- a/libtgvoip-build-fixes.patch
+++ b/libtgvoip-build-fixes.patch
@@ -1,60 +1,85 @@
-From 4d0a403c58f9f3bbc8704ba595cec175623f7410 Mon Sep 17 00:00:00 2001
+From e0e347b3c1a26754b250d02a78488cf9093a6d7b Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly(a)easycoding.org>
-Date: Thu, 6 Jul 2017 17:27:01 +0200
+Date: Thu, 9 Jan 2020 13:18:09 +0100
Subject: [PATCH] Fixed build of libtgvoip under Fedora as shared library.
---
- libtgvoip.gyp | 13 +++++++------
- 1 file changed, 7 insertions(+), 6 deletions(-)
+ Makefile.am | 7 +++----
+ configure.ac | 13 ++++++++++++-
+ 2 files changed, 15 insertions(+), 5 deletions(-)
-diff --git a/libtgvoip.gyp b/libtgvoip.gyp
-index ec86cbf..c424dbe 100644
---- a/libtgvoip.gyp
-+++ b/libtgvoip.gyp
-@@ -4,7 +4,8 @@
- 'targets': [
- {
- 'target_name': 'libtgvoip',
-- 'type': 'static_library',
-+ 'type': 'shared_library',
-+ 'product_extension': 'so.<!(echo -n "$VOIPVER")',
- 'dependencies': [],
- 'defines': [
- 'WEBRTC_APM_DEBUG_DUMP=0',
-@@ -14,11 +15,11 @@
- 'variables': {
- 'tgvoip_src_loc': '.',
- 'official_build_target%': '',
-- 'linux_path_opus_include%':
'<(DEPTH)/../../../Libraries/opus/include',
- },
- 'include_dirs': [
- '<(tgvoip_src_loc)/webrtc_dsp',
-- '<(linux_path_opus_include)',
-+ '<!(rpm --eval "%{_includedir}")',
-+ '<!(rpm --eval "%{_includedir}/opus")',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
-@@ -72,8 +73,6 @@
- '<(tgvoip_src_loc)/video/VideoSource.h',
- '<(tgvoip_src_loc)/video/VideoRenderer.cpp',
- '<(tgvoip_src_loc)/video/VideoRenderer.h',
-- '<(tgvoip_src_loc)/json11.cpp',
-- '<(tgvoip_src_loc)/json11.hpp',
+diff --git a/Makefile.am b/Makefile.am
+index 03c8866..0320457 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -26,8 +26,7 @@ audio/Resampler.cpp \
+ os/posix/NetworkSocketPosix.cpp \
+ video/VideoSource.cpp \
+ video/VideoRenderer.cpp \
+-video/ScreamCongestionController.cpp \
+-json11.cpp
++video/ScreamCongestionController.cpp
- # Windows
- '<(tgvoip_src_loc)/os/windows/NetworkSocketWinsock.cpp',
-@@ -724,7 +723,9 @@
+ TGVOIP_HDRS = \
+ TgVoip.h \
+@@ -55,7 +54,6 @@ os/posix/NetworkSocketPosix.h \
+ video/VideoSource.h \
+ video/VideoRenderer.h \
+ video/ScreamCongestionController.h \
+-json11.hpp \
+ utils.h
+ if TARGET_OS_OSX
+@@ -751,6 +749,7 @@ else
+ CFLAGS += -DTGVOIP_NO_DSP
+ endif
- ],
-- 'libraries': [],
-+ 'libraries': [
-+ 'json11',
-+ ],
- 'configurations': {
- 'Debug': {},
- 'Release': {},
++libtgvoip_la_LDFLAGS = -version-number
@LIBTGVOIP_MAJOR_VERSION@:@LIBTGVOIP_MINOR_VERSION@:@LIBTGVOIP_PATCH_VERSION@
+ libtgvoip_la_SOURCES = $(SRC) $(TGVOIP_HDRS)
+ tgvoipincludedir = $(includedir)/tgvoip
+ nobase_tgvoipinclude_HEADERS = $(TGVOIP_HDRS)
+@@ -759,4 +758,4 @@ CXXFLAGS += -std=gnu++0x $(CFLAGS)
+ if TARGET_OS_OSX
+ OBJCFLAGS = $(CFLAGS)
+ OBJCXXFLAGS += -std=gnu++0x $(CFLAGS)
+-endif
+\ No newline at end of file
++endif
+diff --git a/configure.ac b/configure.ac
+index 222f541..cfad4ef 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,8 +1,14 @@
+ # -*- Autoconf -*-
+ # Process this file with autoconf to produce a configure script.
+
++# Define version information
++m4_define([libtgvoip_major_version], 2)
++m4_define([libtgvoip_minor_version], 4)
++m4_define([libtgvoip_patch_version], 4)
++m4_define([libtgvoip_version],[libtgvoip_major_version.libtgvoip_minor_version.libtgvoip_patch_version])
++
+ AC_PREREQ([2.69])
+-AC_INIT([libtgvoip], [2.4.4], [
https://github.com/grishka/libtgvoip/issues])
++AC_INIT([libtgvoip], [libtgvoip_version],
[
https://github.com/grishka/libtgvoip/issues])
+ AC_CONFIG_SRCDIR([config.h.in])
+ AC_CONFIG_HEADERS([config.h])
+ AM_INIT_AUTOMAKE([subdir-objects])
+@@ -21,9 +27,14 @@ AC_CHECK_LIB([crypto], [SHA1], [], [AC_MSG_FAILURE([libssl-dev is
required but n
+ AC_CHECK_LIB([m], [floorf])
+ AC_CHECK_LIB([opus], [opus_decoder_create], [], [AC_MSG_FAILURE([libopus-dev is required
but not found])])
+ AC_CHECK_LIB([pthread], [pthread_create])
++AC_CHECK_LIB([json11], [main], [], [AC_MSG_FAILURE([json11-dev is required but not
found])])
+
+ AC_CANONICAL_HOST
+
++AC_SUBST(LIBTGVOIP_MAJOR_VERSION, libtgvoip_major_version)
++AC_SUBST(LIBTGVOIP_MINOR_VERSION, libtgvoip_minor_version)
++AC_SUBST(LIBTGVOIP_PATCH_VERSION, libtgvoip_patch_version)
++
+ AS_CASE([$host_cpu],
+ [i?86], [cpu_x86=yes],
+ [x86_64], [cpu_x86=yes],
--
-2.20.1
+2.24.1
diff --git a/libtgvoip-pr6.patch b/libtgvoip-pr6.patch
new file mode 100644
index 0000000..5202825
--- /dev/null
+++ b/libtgvoip-pr6.patch
@@ -0,0 +1,61 @@
+From d1ae8b3704bb80ffb8f06b471bd5c33d7c8c92cb Mon Sep 17 00:00:00 2001
+From: Ilya Fedin <fedin-ilja2010(a)ya.ru>
+Date: Sun, 5 Jan 2020 12:25:31 +0400
+Subject: [PATCH] Add support for pkg-config
+
+---
+ Makefile.am | 2 ++
+ configure.ac | 4 +++-
+ tgvoip.pc.in | 10 ++++++++++
+ 3 files changed, 15 insertions(+), 1 deletion(-)
+ create mode 100644 tgvoip.pc.in
+
+diff --git a/Makefile.am b/Makefile.am
+index 03c8866..a9c9715 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -755,6 +755,8 @@ libtgvoip_la_SOURCES = $(SRC) $(TGVOIP_HDRS)
+ tgvoipincludedir = $(includedir)/tgvoip
+ nobase_tgvoipinclude_HEADERS = $(TGVOIP_HDRS)
+
++pkgconfig_DATA = tgvoip.pc
++
+ CXXFLAGS += -std=gnu++0x $(CFLAGS)
+ if TARGET_OS_OSX
+ OBJCFLAGS = $(CFLAGS)
+diff --git a/configure.ac b/configure.ac
+index 222f541..e2df927 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -9,6 +9,8 @@ AM_INIT_AUTOMAKE([subdir-objects])
+ AM_SILENT_RULES([yes])
+ LT_INIT
+
++PKG_INSTALLDIR
++
+ # Checks for programs.
+ AC_PROG_CXX
+ AC_PROG_CC
+@@ -109,5 +111,5 @@ AC_FUNC_MALLOC
+ AC_FUNC_REALLOC
+ AC_CHECK_FUNCS([clock_gettime floor gettimeofday inet_ntoa memmove memset select socket
sqrt strcasecmp strchr strerror strncasecmp strstr strtol strtoul uname])
+
+-AC_CONFIG_FILES([Makefile])
++AC_CONFIG_FILES([Makefile tgvoip.pc])
+ AC_OUTPUT
+diff --git a/tgvoip.pc.in b/tgvoip.pc.in
+new file mode 100644
+index 0000000..1ca7758
+--- /dev/null
++++ b/tgvoip.pc.in
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: tgvoip
++Description: VoIP library for Telegram clients
++Version: 2.4.4
++Libs: -L${libdir} -ltgvoip
++Cflags: -I${includedir}/tgvoip
diff --git a/libtgvoip.spec b/libtgvoip.spec
index 208b546..2599c14 100644
--- a/libtgvoip.spec
+++ b/libtgvoip.spec
@@ -1,16 +1,23 @@
+%global commit0 88b47b6f808f2573d4eaf37e1463ecd59c43deda
+%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
+%global date 20191230
+
Name: libtgvoip
Version: 2.4.4
-Release: 2%{?dist}
-Summary: VoIP library for Telegram clients
+Release: 3.%{date}git%{shortcommit0}%{?dist}
# Libtgvoip shared library - Public Domain.
# Bundled webrtc library - BSD with patented echo cancellation algorithms.
License: Public Domain and BSD
-URL:
https://github.com/grishka/%{name}
+URL:
https://github.com/telegramdesktop/%{name}
+Summary: VoIP library for Telegram clients
-Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Source0: %{url}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz
Patch0: %{name}-build-fixes.patch
+#
https://github.com/telegramdesktop/libtgvoip/pull/6
+Patch100: %{name}-pr6.patch
+
Provides: bundled(webrtc-audio-processing) = 0.3
BuildRequires: pulseaudio-libs-devel
@@ -18,10 +25,11 @@ BuildRequires: alsa-lib-devel
BuildRequires: openssl-devel
BuildRequires: json11-devel
BuildRequires: opus-devel
+BuildRequires: automake
+BuildRequires: autoconf
BuildRequires: gcc-c++
-BuildRequires: cmake
+BuildRequires: libtool
BuildRequires: gcc
-BuildRequires: gyp
%description
Provides VoIP library for Telegram clients.
@@ -34,111 +42,33 @@ Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%{summary}.
%prep
-%autosetup -p1
+%autosetup -n %{name}-%{commit0} -p1
+rm -f json11.*
%build
-export VOIPVER="%{version}"
-gyp --format=cmake --depth=. --generator-output=. -Goutput_dir=out -Gconfig=Release
%{name}.gyp
-
-pushd out/Release
- %cmake .
- %make_build
-popd
+autoreconf --force --install
+%configure --disable-static
+%make_build
%install
-# Installing shared library...
-%{__mkdir_p} "%{buildroot}%{_libdir}"
-%{__install} -m 0755 -p out/Release/lib.target/%{name}.so.%{version}
"%{buildroot}%{_libdir}/%{name}.so.%{version}"
-%{__ln_s} %{name}.so.%{version} "%{buildroot}%{_libdir}/%{name}.so.2.4"
-%{__ln_s} %{name}.so.%{version} "%{buildroot}%{_libdir}/%{name}.so.2"
-%{__ln_s} %{name}.so.%{version} "%{buildroot}%{_libdir}/%{name}.so"
-
-# Installing additional development files...
-%{__mkdir_p} "%{buildroot}%{_includedir}/%{name}"
-find . -maxdepth 1 -type f -name "*.h" -exec install -m 0644 -p '{}'
%{buildroot}%{_includedir}/%{name} \;
-%{__mkdir_p} "%{buildroot}%{_includedir}/%{name}/audio"
-find audio -maxdepth 1 -type f -name "*.h" -exec install -m 0644 -p
'{}' %{buildroot}%{_includedir}/%{name}/audio \;
-%{__mkdir_p} "%{buildroot}%{_includedir}/%{name}/video"
-find video -maxdepth 1 -type f -name "*.h" -exec install -m 0644 -p
'{}' %{buildroot}%{_includedir}/%{name}/video \;
+%make_install
+rm -f %{buildroot}%{_libdir}/*.la
%files
%license UNLICENSE
%{_libdir}/%{name}.so.*
%files devel
-%{_includedir}/%{name}
+%{_includedir}/tgvoip/
%{_libdir}/%{name}.so
+%{_libdir}/pkgconfig/tgvoip.pc
%changelog
+* Thu Jan 09 2020 Vitaly Zaitsev <vitaly(a)easycoding.org> -
2.4.4-3.20191230git88b47b6
+- Switched to supported fork.
+
* Fri Aug 09 2019 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
2.4.4-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Mar 12 2019 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.4.4-1
- Updated to 2.4.4 (regular release).
-
-* Sat Mar 09 2019 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.4.2-4
-- Enabled ARM builds again.
-- Minor SPEC fixes.
-
-* Mon Mar 04 2019 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
2.4.2-3
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
-
-* Tue Jan 22 2019 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.4.2-2
-- Rebuilt for Rawhide.
-
-* Sat Jan 12 2019 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.4.2-1
-- Updated to 2.4.2 (regular release).
-
-* Tue Dec 11 2018 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.4-2
-- Backported upstream patch with crash and build fixes.
-
-* Tue Dec 11 2018 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.4-1
-- Updated to 2.4 (regular release).
-
-* Sat Nov 10 2018 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.3-1
-- Updated to 2.3 (regular release).
-
-* Sun Sep 02 2018 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.2.4-1
-- Updated to 2.2.4 (regular release).
-
-* Mon Aug 27 2018 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.2.3-2
-- Added upstream patch with proxy fix.
-
-* Fri Aug 24 2018 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.2.3-1
-- Updated to 2.2.3 (regular release).
-
-* Fri Jul 20 2018 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.2-1
-- Updated to 2.2 (regular release).
-
-* Mon Jul 02 2018 Vitaly Zaitsev <vitaly(a)easycoding.org> - 2.1.1-1
-- Updated to 2.1.1 (regular release).
-
-* Tue Jun 05 2018 Vitaly Zaitsev <vitaly(a)easycoding.org> -
2.1-0.1.20180604git6a8f543
-- Updated to 2.1 (snapshot).
-
-* Tue May 29 2018 Vitaly Zaitsev <vitaly(a)easycoding.org> -
2.0-0.3.20180528git83ac2c6
-- Updated to latest snapshot.
-
-* Sun May 27 2018 Vitaly Zaitsev <vitaly(a)easycoding.org> -
2.0-0.2.20180525gitd2453dd
-- Updated to latest snapshot.
-
-* Thu May 24 2018 Vitaly Zaitsev <vitaly(a)easycoding.org> -
2.0-0.1.20180515gitb52eb58
-- Updated to 2.0-alpha4 (snapshot).
-
-* Fri Dec 29 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.0.3-1
-- Updated to 1.0.3 (regular release).
-
-* Sat Nov 18 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> -
1.0.1-2.20171111git6a0b3b2
-- Provide compactibility with 1.0.
-
-* Sat Nov 18 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> -
1.0.1-1.20171111git6a0b3b2
-- Updated to 1.0.1-git.
-
-* Fri Aug 04 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> -
1.0-3.20170801gitbfd5cfe
-- 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.
-
-* Tue Aug 01 2017 Vitaly Zaitsev <vitaly(a)easycoding.org> -
1.0-1.20170727git01f2701
-- Initial release.
diff --git a/sources b/sources
index a16432a..b156de6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f232e43f65cf9c6ebad831ee24b74d48 libtgvoip-2.4.4.tar.gz
+SHA512 (libtgvoip-88b47b6.tar.gz) =
1c05f1741c1b117c79961641fd4994b6a3c8f95f3fdb2b51a09afc4b900bed7e4f323d9f2da724ea8dd7516fc7b423d965f70ba976736e26e7cba2bf2203eefd