From 494135d51128210bb7cd31461b2800ea7ac6e6d3 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Wed, 1 Jan 2020 16:25:16 -0600 Subject: gnu: Add libtgvoip. * gnu/packages/telephony.scm (libtgvoip): New variable. --- gnu/packages/telephony.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gnu/packages/telephony.scm') diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index 0c9de8bd0c..e7f294a999 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2019 Pierre Neidhardt ;;; Copyright © 2019 Jan Wielkiewicz ;;; Copyright © 2019 Ivan Vilata i Balaguer +;;; Copyright © 2020 Brett Gilio ;;; ;;; This file is part of GNU Guix. ;;; @@ -947,3 +948,27 @@ (define-public jami (define-public jami-client-gnome (deprecated-package "jami-client-gnome" jami)) + +(define-public libtgvoip + (package + (name "libtgvoip") + (version "2.4.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/zevlg/libtgvoip.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "04dbwd3lwdannhxb2sh6z02i3lka9sb5s039pki6ka4siq5xzk1j")))) + (build-system gnu-build-system) + (inputs + `(("openssl" ,openssl) + ("libopusenc" ,libopusenc))) + (synopsis "VoIP library for Telegram clients") + (description "A collection of libraries and header files for implementing +telephony functionality into custom Telegram clients.") + (home-page "https://github.com/zevlg/libtgvoip") + (license license:unlicense))) -- cgit v1.2.3 From 5a0d73911c93745391a687def9ba8c7d0d41be23 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Sun, 5 Jan 2020 19:03:07 -0600 Subject: gnu: libtgvoip: Update to 2.4.4. * gnu/packages/telephony.scm (libtgvoip): Update to 2.4.4. [source]: Change source URI to reflect upstream. [inputs]: Add pulseaudio and alsa-lib. This change corrects a bug, and allows for cross-compilation on armhf architectures. --- gnu/packages/telephony.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'gnu/packages/telephony.scm') diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index e7f294a999..11eeeedce4 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -952,21 +952,23 @@ (define-public jami-client-gnome (define-public libtgvoip (package (name "libtgvoip") - (version "2.4.2") + (version "2.4.4") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/zevlg/libtgvoip.git") + (url "https://github.com/grishka/libtgvoip.git") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 - "04dbwd3lwdannhxb2sh6z02i3lka9sb5s039pki6ka4siq5xzk1j")))) + "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5")))) (build-system gnu-build-system) (inputs - `(("openssl" ,openssl) - ("libopusenc" ,libopusenc))) + `(("alsa-lib" ,alsa-lib) + ("libopusenc" ,libopusenc) + ("openssl" ,openssl) + ("pulseaudio" ,pulseaudio))) (synopsis "VoIP library for Telegram clients") (description "A collection of libraries and header files for implementing telephony functionality into custom Telegram clients.") -- cgit v1.2.3 From 1792a70655507625cbe654a0eec1428f210d2fd3 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Sun, 5 Jan 2020 19:31:07 -0600 Subject: gnu: libtgvoip: Fix failing build on i686-linux. * gnu/local.mk (libtgvoip): Add patches for libtgvoip-disable-sse2.patch and libtgvoip-disable-webrtc.patch * gnu/packages/patches/libtgvoip-disable-sse2.patch: New file. * gnu/packages/patches/libtgvoip-disable-webrtc.patch: New file. * gnu/packages/telephony.scm (libtgvoip): Fix building on i686-linux. [source]: Reference patches for correcting failing build on i686-linux architecture. Reported-by: Diego Nicola Barbato Fixes . --- gnu/local.mk | 2 + gnu/packages/patches/libtgvoip-disable-sse2.patch | 51 ++++++++++++++++++++++ .../patches/libtgvoip-disable-webrtc.patch | 47 ++++++++++++++++++++ gnu/packages/telephony.scm | 6 +++ 4 files changed, 106 insertions(+) create mode 100644 gnu/packages/patches/libtgvoip-disable-sse2.patch create mode 100644 gnu/packages/patches/libtgvoip-disable-webrtc.patch (limited to 'gnu/packages/telephony.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 83bba6b644..b7fa503257 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1113,6 +1113,8 @@ dist_patch_DATA = \ %D%/packages/patches/libsndfile-CVE-2017-8362.patch \ %D%/packages/patches/libsndfile-CVE-2017-12562.patch \ %D%/packages/patches/libtar-CVE-2013-4420.patch \ + %D%/packages/patches/libtgvoip-disable-sse2.patch \ + %D%/packages/patches/libtgvoip-disable-webrtc.patch \ %D%/packages/patches/libtheora-config-guess.patch \ %D%/packages/patches/libtommath-fix-linkage.patch \ %D%/packages/patches/libtool-skip-tests2.patch \ diff --git a/gnu/packages/patches/libtgvoip-disable-sse2.patch b/gnu/packages/patches/libtgvoip-disable-sse2.patch new file mode 100644 index 0000000000..0e4faeab26 --- /dev/null +++ b/gnu/packages/patches/libtgvoip-disable-sse2.patch @@ -0,0 +1,51 @@ +Copied from Debian. + +Description: Disable SSE2 code on i386 + This patch is not complete. A high-graded solution may use automatic switching + between SSE2 and C++ implementations based on the results of runtime checks. + The webrtc code already provides for one of them inside its GetCPUInfo function. +Bug-Debian: https://bugs.debian.org/892823 +Author: Nicholas Guriev +Last-Update: Tue, 29 Jan 2019 23:26:38 +0300 + +--- a/libtgvoip.gyp ++++ b/libtgvoip.gyp +@@ -871,11 +871,7 @@ + 'WEBRTC_POSIX', + ], + 'conditions': [ +- [ '" +Last-Update: Tue, 29 Jan 2019 23:26:44 +0300 + +--- a/libtgvoip.gyp ++++ b/libtgvoip.gyp +@@ -869,20 +869,18 @@ + '"<(OS)" == "linux"', { + 'defines': [ + 'WEBRTC_POSIX', +- 'WEBRTC_LINUX', + ], + 'conditions': [ + [ '"(pthread_self()); ++ return static_cast(pthread_self()); + #endif + #endif // defined(WEBRTC_POSIX) + } diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index 11eeeedce4..8e7384bf85 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -960,6 +960,12 @@ (define-public libtgvoip (url "https://github.com/grishka/libtgvoip.git") (commit version))) (file-name (git-file-name name version)) + ;; Fix compilation on i686-linux architecture. + ;; NOTE: Applying these patches is order-dependent! + ;; The patch for WebRTC /must/ precede the patch for SSE2. + (patches + (search-patches "libtgvoip-disable-webrtc.patch" + "libtgvoip-disable-sse2.patch")) (sha256 (base32 "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5")))) -- cgit v1.2.3